aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-regulators.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-04-02 08:24:21 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-03 13:40:28 -0400
commita652f3d24cd27e2d6aefb38b6bcf7151ed4c04e3 (patch)
tree16965e827fa63d68866ea683eabca10c83d4e3ad /arch/arm/mach-ux500/board-mop500-regulators.c
parentda45edc7f8e6930eb32e316bed3936bd05deeedd (diff)
ARM: ux500: Regulators: Bring the AB8500 regulator platform data up-to-date
Quite a few changes in this patch, including: supply-name changes, new consumers, initialisation and capability updates and new regulators. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-regulators.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c75
1 files changed, 47 insertions, 28 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 832966311c29..ff3c9f016591 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -66,7 +66,7 @@ static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
66 /* BH1780GLS ambient light sensor */ 66 /* BH1780GLS ambient light sensor */
67 REGULATOR_SUPPLY("vcc", "2-0029"), 67 REGULATOR_SUPPLY("vcc", "2-0029"),
68 /* lsm303dlh accelerometer */ 68 /* lsm303dlh accelerometer */
69 REGULATOR_SUPPLY("vdd", "3-0018"), 69 REGULATOR_SUPPLY("vdd", "2-0018"),
70 /* lsm303dlhc accelerometer */ 70 /* lsm303dlhc accelerometer */
71 REGULATOR_SUPPLY("vdd", "2-0019"), 71 REGULATOR_SUPPLY("vdd", "2-0019"),
72 /* lsm303dlh magnetometer */ 72 /* lsm303dlh magnetometer */
@@ -93,9 +93,16 @@ static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
93 REGULATOR_SUPPLY("vmmc", "sdi4"), 93 REGULATOR_SUPPLY("vmmc", "sdi4"),
94 /* AB8500 audio codec */ 94 /* AB8500 audio codec */
95 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"), 95 REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
96 /* AB8500 accessory detect 1 */
97 REGULATOR_SUPPLY("vcc-N2158", "ab8500-acc-det.0"),
98 /* AB8500 Tv-out device */
99 REGULATOR_SUPPLY("vcc-N2158", "mcde_tv_ab8500.4"),
100 /* AV8100 HDMI device */
101 REGULATOR_SUPPLY("vcc-N2158", "av8100_hdmi.3"),
96}; 102};
97 103
98static struct regulator_consumer_supply ab8500_vaux3_consumers[] = { 104static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
105 REGULATOR_SUPPLY("v-SD-STM", "stm"),
99 /* External MMC slot power */ 106 /* External MMC slot power */
100 REGULATOR_SUPPLY("vmmc", "sdi0"), 107 REGULATOR_SUPPLY("vmmc", "sdi0"),
101}; 108};
@@ -126,6 +133,10 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
126 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"), 133 REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
127 /* Internal general-purpose ADC */ 134 /* Internal general-purpose ADC */
128 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"), 135 REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
136 /* ADC for charger */
137 REGULATOR_SUPPLY("vddadc", "ab8500-charger.0"),
138 /* AB8500 Tv-out device */
139 REGULATOR_SUPPLY("vtvout", "mcde_tv_ab8500.4"),
129}; 140};
130 141
131static struct regulator_consumer_supply ab8500_vaud_consumers[] = { 142static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
@@ -153,6 +164,8 @@ static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
153 REGULATOR_SUPPLY("v-intcore", NULL), 164 REGULATOR_SUPPLY("v-intcore", NULL),
154 /* USB Transceiver */ 165 /* USB Transceiver */
155 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"), 166 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
167 /* Handled by abx500 clk driver */
168 REGULATOR_SUPPLY("v-intcore", "abx500-clk.0"),
156}; 169};
157 170
158static struct regulator_consumer_supply ab8505_usb_consumers[] = { 171static struct regulator_consumer_supply ab8505_usb_consumers[] = {
@@ -161,8 +174,15 @@ static struct regulator_consumer_supply ab8505_usb_consumers[] = {
161}; 174};
162 175
163static struct regulator_consumer_supply ab8500_vana_consumers[] = { 176static struct regulator_consumer_supply ab8500_vana_consumers[] = {
164 /* External displays, connector on board, 1v8 power supply */ 177 /* DB8500 DSI */
165 REGULATOR_SUPPLY("vsmps2", "mcde.0"), 178 REGULATOR_SUPPLY("vdddsi1v2", "mcde"),
179 REGULATOR_SUPPLY("vdddsi1v2", "b2r2_core"),
180 REGULATOR_SUPPLY("vdddsi1v2", "b2r2_1_core"),
181 REGULATOR_SUPPLY("vdddsi1v2", "dsilink.0"),
182 REGULATOR_SUPPLY("vdddsi1v2", "dsilink.1"),
183 REGULATOR_SUPPLY("vdddsi1v2", "dsilink.2"),
184 /* DB8500 CSI */
185 REGULATOR_SUPPLY("vddcsi1v2", "mmio_camera"),
166}; 186};
167 187
168/* ab8500 regulator register initialization */ 188/* ab8500 regulator register initialization */
@@ -304,9 +324,9 @@ static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
304 */ 324 */
305 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x03, 0x00), 325 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x03, 0x00),
306 /* 326 /*
307 * Vaux1Sel = 2.5 V 327 * Vaux1Sel = 2.8 V
308 */ 328 */
309 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x08), 329 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x0C),
310 /* 330 /*
311 * Vaux2Sel = 2.9 V 331 * Vaux2Sel = 2.9 V
312 */ 332 */
@@ -342,18 +362,11 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
342 [AB8500_LDO_AUX1] = { 362 [AB8500_LDO_AUX1] = {
343 .constraints = { 363 .constraints = {
344 .name = "V-DISPLAY", 364 .name = "V-DISPLAY",
345 .min_uV = 2500000, 365 .min_uV = 2800000,
346 .max_uV = 2900000, 366 .max_uV = 3300000,
347 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 367 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
348 REGULATOR_CHANGE_STATUS, 368 REGULATOR_CHANGE_STATUS,
349 .boot_on = 1, /* display is on at boot */ 369 .boot_on = 1, /* display is on at boot */
350 /*
351 * This voltage cannot be disabled right now because
352 * it is somehow affecting the external MMC
353 * functionality, though that typically will use
354 * AUX3.
355 */
356 .always_on = 1,
357 }, 370 },
358 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), 371 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
359 .consumer_supplies = ab8500_vaux1_consumers, 372 .consumer_supplies = ab8500_vaux1_consumers,
@@ -365,7 +378,10 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
365 .min_uV = 1100000, 378 .min_uV = 1100000,
366 .max_uV = 3300000, 379 .max_uV = 3300000,
367 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 380 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
368 REGULATOR_CHANGE_STATUS, 381 REGULATOR_CHANGE_STATUS |
382 REGULATOR_CHANGE_MODE,
383 .valid_modes_mask = REGULATOR_MODE_NORMAL |
384 REGULATOR_MODE_IDLE,
369 }, 385 },
370 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers), 386 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
371 .consumer_supplies = ab8500_vaux2_consumers, 387 .consumer_supplies = ab8500_vaux2_consumers,
@@ -377,7 +393,10 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
377 .min_uV = 1100000, 393 .min_uV = 1100000,
378 .max_uV = 3300000, 394 .max_uV = 3300000,
379 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 395 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
380 REGULATOR_CHANGE_STATUS, 396 REGULATOR_CHANGE_STATUS |
397 REGULATOR_CHANGE_MODE,
398 .valid_modes_mask = REGULATOR_MODE_NORMAL |
399 REGULATOR_MODE_IDLE,
381 }, 400 },
382 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers), 401 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
383 .consumer_supplies = ab8500_vaux3_consumers, 402 .consumer_supplies = ab8500_vaux3_consumers,
@@ -431,15 +450,23 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
431 [AB8500_LDO_INTCORE] = { 450 [AB8500_LDO_INTCORE] = {
432 .constraints = { 451 .constraints = {
433 .name = "V-INTCORE", 452 .name = "V-INTCORE",
434 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 453 .min_uV = 1250000,
454 .max_uV = 1350000,
455 .input_uV = 1800000,
456 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
457 REGULATOR_CHANGE_STATUS |
458 REGULATOR_CHANGE_MODE |
459 REGULATOR_CHANGE_DRMS,
460 .valid_modes_mask = REGULATOR_MODE_NORMAL |
461 REGULATOR_MODE_IDLE,
435 }, 462 },
436 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers), 463 .num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
437 .consumer_supplies = ab8500_vintcore_consumers, 464 .consumer_supplies = ab8500_vintcore_consumers,
438 }, 465 },
439 /* supply for U8500 CSI/DSI, VANA LDO */ 466 /* supply for U8500 CSI-DSI, VANA LDO */
440 [AB8500_LDO_ANA] = { 467 [AB8500_LDO_ANA] = {
441 .constraints = { 468 .constraints = {
442 .name = "V-CSI/DSI", 469 .name = "V-CSI-DSI",
443 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 470 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
444 }, 471 },
445 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers), 472 .num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
@@ -999,16 +1026,8 @@ void mop500_regulator_init(void)
999 struct regulator_init_data *regulator; 1026 struct regulator_init_data *regulator;
1000 1027
1001 /* 1028 /*
1002 * Handle VextSupply1 on older boards than HREFP_V22_V1x 1029 * Temporarily turn on Vaux2 on 8520 machine
1003 * (turn off in suspend)
1004 */ 1030 */
1005 if (cpu_is_u8500v20() || cpu_is_u8500v21()) {
1006 /* disable VextSupply1 in suspend */
1007 regulator = &ab8500_ext_regulators[AB8500_EXT_SUPPLY1];
1008 regulator->constraints.state_mem.disabled = 1;
1009 regulator->constraints.state_standby.disabled = 1;
1010 }
1011
1012 if (cpu_is_u8520()) { 1031 if (cpu_is_u8520()) {
1013 /* Vaux2 initialized to be on */ 1032 /* Vaux2 initialized to be on */
1014 ab8500_modify_reg_init(AB8505_VAUX12REGU, 0x0f, 0x05); 1033 ab8500_modify_reg_init(AB8505_VAUX12REGU, 0x0f, 0x05);