aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/twl-common.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2012-02-20 05:26:07 -0500
committerKevin Hilman <khilman@ti.com>2012-03-06 20:35:42 -0500
commit23e22a5ed4a5ad26ef89c30decd414024f871664 (patch)
tree0cbec150b400d2bbea3d56ee57fc9601c85561f1 /arch/arm/mach-omap2/twl-common.c
parentf9d29f1617eb1b2f1fd41622bd1a0fc51658d2f0 (diff)
arm: omap3: add common twl configurations for vdd1 and vdd2
VDD1 and VDD2 are the core voltage regulators on OMAP3. VDD1 is used to control MPU/IVA voltage, and VDD2 is used for CORE. These regulators are needed by DVFS. Voltage ranges for VDD1 and VDD2 are taken from twl4030/twl5030 data manuals: - SWCS019L : TWL4030 ES3.1 Data Manual rev L - SWCS030E : TWL5030 ES1.2 Data Manual rev E Signed-off-by: Tero Kristo <t-kristo@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.c')
-rw-r--r--arch/arm/mach-omap2/twl-common.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 10b20c652e5d..913d6c3c4cb6 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -126,6 +126,38 @@ static struct regulator_init_data omap3_vpll2_idata = {
126 .consumer_supplies = omap3_vpll2_supplies, 126 .consumer_supplies = omap3_vpll2_supplies,
127}; 127};
128 128
129static struct regulator_consumer_supply omap3_vdd1_supply[] = {
130 REGULATOR_SUPPLY("vcc", "mpu.0"),
131};
132
133static struct regulator_consumer_supply omap3_vdd2_supply[] = {
134 REGULATOR_SUPPLY("vcc", "l3_main.0"),
135};
136
137static struct regulator_init_data omap3_vdd1 = {
138 .constraints = {
139 .name = "vdd_mpu_iva",
140 .min_uV = 600000,
141 .max_uV = 1450000,
142 .valid_modes_mask = REGULATOR_MODE_NORMAL,
143 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
144 },
145 .num_consumer_supplies = ARRAY_SIZE(omap3_vdd1_supply),
146 .consumer_supplies = omap3_vdd1_supply,
147};
148
149static struct regulator_init_data omap3_vdd2 = {
150 .constraints = {
151 .name = "vdd_core",
152 .min_uV = 600000,
153 .max_uV = 1450000,
154 .valid_modes_mask = REGULATOR_MODE_NORMAL,
155 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
156 },
157 .num_consumer_supplies = ARRAY_SIZE(omap3_vdd2_supply),
158 .consumer_supplies = omap3_vdd2_supply,
159};
160
129void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, 161void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
130 u32 pdata_flags, u32 regulators_flags) 162 u32 pdata_flags, u32 regulators_flags)
131{ 163{
@@ -133,6 +165,10 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
133 pmic_data->irq_base = TWL4030_IRQ_BASE; 165 pmic_data->irq_base = TWL4030_IRQ_BASE;
134 if (!pmic_data->irq_end) 166 if (!pmic_data->irq_end)
135 pmic_data->irq_end = TWL4030_IRQ_END; 167 pmic_data->irq_end = TWL4030_IRQ_END;
168 if (!pmic_data->vdd1)
169 pmic_data->vdd1 = &omap3_vdd1;
170 if (!pmic_data->vdd2)
171 pmic_data->vdd2 = &omap3_vdd2;
136 172
137 /* Common platform data configurations */ 173 /* Common platform data configurations */
138 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) 174 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)