diff options
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index a24b1fdda01..04f598778aa 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -28,6 +28,8 @@ #include <linux/mtd/nand.h> #include <linux/regulator/machine.h> +#include <linux/regulator/fixed.h> +#include <linux/mfd/tps65910.h> #include <linux/led-lm3530.h> @@ -164,8 +166,112 @@ static struct platform_device bcm20702_bluetooth_device = { .id = -1, }; +static struct regulator_init_data omap3h1_vbat_data = { + .constraints.always_on = true, +}; + +static struct fixed_voltage_config omap3h1_vbat_pdata = { + .supply_name = "VBAT", + .microvolts = 3800000, + .init_data = &omap3h1_vbat_data, + .gpio = -EINVAL, +}; + +static struct platform_device omap3h1_vbat = { + .name = "reg-fixed-voltage", + .id = -1, + .dev = { + .platform_data = &omap3h1_vbat_pdata, + }, +}; + +static struct regulator_init_data tps65910_dummy = { + .supply_regulator = "VBAT", + .constraints.always_on = true, +}; + +static struct regulator_init_data tps65910_3v3 = { + .supply_regulator = "VBAT", + .constraints = { + .min_uV = 3300000, + .max_uV = 3300000, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = true, + .apply_uV = true, + }, +}; + +static struct regulator_init_data tps65910_1v8 = { + .supply_regulator = "VBAT", + .constraints = { + .min_uV = 1800000, + .max_uV = 1800000, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = true, + }, +}; + +static struct regulator_consumer_supply tps65910_vdd1_supply[] = { + REGULATOR_SUPPLY("vcc", "cpu0"), +}; + +static struct regulator_init_data tps65910_vdd1 = { + .supply_regulator = "VBAT", + .constraints = { + .min_uV = 900000, + .max_uV = 1350000, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + //.always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd1_supply), + .consumer_supplies = tps65910_vdd1_supply, +}; + +static struct regulator_consumer_supply tps65910_vdd2_supply[] = { + REGULATOR_SUPPLY("vcc", "l3_main.0"), +}; + +static struct regulator_init_data tps65910_vdd2 = { + .supply_regulator = "VBAT", + .constraints = { + .min_uV = 900000, + .max_uV = 1200000, + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + //.always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(tps65910_vdd2_supply), + .consumer_supplies = tps65910_vdd2_supply, +}; + +static struct tps65910_board omap3h1_tps65910_pdata = { + .irq = 7 + OMAP_INTC_START, + .en_ck32k_xtal = true, + + .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VIO] = &tps65910_1v8, + .tps65910_pmic_init_data[TPS65910_REG_VDD1] = &tps65910_vdd1, + .tps65910_pmic_init_data[TPS65910_REG_VDD2] = &tps65910_vdd2, + .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VDIG1] = &tps65910_1v8, + .tps65910_pmic_init_data[TPS65910_REG_VDIG2] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VPLL] = &tps65910_1v8, + .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &tps65910_dummy, + .tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &tps65910_3v3, + .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &tps65910_3v3, + .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &tps65910_dummy, +}; + static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { { + I2C_BOARD_INFO("tps65910", 0x2d), + .platform_data = &omap3h1_tps65910_pdata, + }, + { I2C_BOARD_INFO("mpu6515", 0x68), // This is needed for the interrupt wake. IH_GPIO_BASE changed in 3.10 kernel //.irq = (IH_GPIO_BASE + MPUIRQ_GPIO), @@ -185,6 +291,7 @@ static int __init omap3_h1_i2c_init(void) } static struct platform_device *omap3h1_devices[] __initdata = { + &omap3h1_vbat, &bcm20702_bluetooth_device, }; |