summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Wilson <evan@oliodevices.com>2014-11-30 20:14:10 -0800
committerEvan Wilson <evan@oliodevices.com>2014-11-30 20:14:10 -0800
commitc48730f1cdc1dbada859a14bf7861684321d4394 (patch)
tree251c14ae090ff66be05488ca1132fd9dc3ab6f68
parentac4c4ff295c03775f4f01ba24656f7e6b6c16ce2 (diff)
downloadolio-linux-3.10-c48730f1cdc1dbada859a14bf7861684321d4394.tar.xz
olio-linux-3.10-c48730f1cdc1dbada859a14bf7861684321d4394.zip
ARM: OMAP2+: omap3h1: Adding tps65910 device to board file
Initializing the voltage rails to the correct values Change-Id: I16fcdb5798185b30946d0e63d44b65f5310a455d
-rw-r--r--arch/arm/mach-omap2/board-omap3h1.c107
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,
};