aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-06-07 04:38:24 -0400
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2011-07-04 11:43:43 -0400
commitb252b0efb605b92a2f5d118e294d088d89cfd286 (patch)
treeaa501248da2e0d369badcefdf027f6cc2ff04b94 /arch/arm
parent827ed9aef2f13000d58616384ea6a22497e787b6 (diff)
OMAP3: Move common regulator configuration to twl-common
Some regulator config can be moved out from board files, since they are close to identical. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c51
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c44
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c22
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c28
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c46
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c50
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c47
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c50
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c44
-rw-r--r--arch/arm/mach-omap2/board-overo.c46
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c27
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c42
-rw-r--r--arch/arm/mach-omap2/twl-common.c42
-rw-r--r--arch/arm/mach-omap2/twl-common.h5
14 files changed, 124 insertions, 420 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 8bbd4e0246b0..bd600cfb7f80 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -283,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
283 REGULATOR_SUPPLY("vcc", "spi1.0"), 283 REGULATOR_SUPPLY("vcc", "spi1.0"),
284}; 284};
285 285
286static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
287 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
288};
289
290/* VPLL2 for digital video outputs */
291static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
292 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
293 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
294};
295
296static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { 286static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
297 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 287 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
298}; 288};
@@ -409,36 +399,6 @@ static struct regulator_init_data sdp3430_vsim = {
409 .consumer_supplies = sdp3430_vsim_supplies, 399 .consumer_supplies = sdp3430_vsim_supplies,
410}; 400};
411 401
412/* VDAC for DSS driving S-Video */
413static struct regulator_init_data sdp3430_vdac = {
414 .constraints = {
415 .min_uV = 1800000,
416 .max_uV = 1800000,
417 .apply_uV = true,
418 .valid_modes_mask = REGULATOR_MODE_NORMAL
419 | REGULATOR_MODE_STANDBY,
420 .valid_ops_mask = REGULATOR_CHANGE_MODE
421 | REGULATOR_CHANGE_STATUS,
422 },
423 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
424 .consumer_supplies = sdp3430_vdda_dac_supplies,
425};
426
427static struct regulator_init_data sdp3430_vpll2 = {
428 .constraints = {
429 .name = "VDVI",
430 .min_uV = 1800000,
431 .max_uV = 1800000,
432 .apply_uV = true,
433 .valid_modes_mask = REGULATOR_MODE_NORMAL
434 | REGULATOR_MODE_STANDBY,
435 .valid_ops_mask = REGULATOR_CHANGE_MODE
436 | REGULATOR_CHANGE_STATUS,
437 },
438 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),
439 .consumer_supplies = sdp3430_vpll2_supplies,
440};
441
442static struct twl4030_platform_data sdp3430_twldata = { 402static struct twl4030_platform_data sdp3430_twldata = {
443 /* platform_data for children goes here */ 403 /* platform_data for children goes here */
444 .gpio = &sdp3430_gpio_data, 404 .gpio = &sdp3430_gpio_data,
@@ -451,16 +411,19 @@ static struct twl4030_platform_data sdp3430_twldata = {
451 .vmmc1 = &sdp3430_vmmc1, 411 .vmmc1 = &sdp3430_vmmc1,
452 .vmmc2 = &sdp3430_vmmc2, 412 .vmmc2 = &sdp3430_vmmc2,
453 .vsim = &sdp3430_vsim, 413 .vsim = &sdp3430_vsim,
454 .vdac = &sdp3430_vdac,
455 .vpll2 = &sdp3430_vpll2,
456}; 414};
457 415
458static int __init omap3430_i2c_init(void) 416static int __init omap3430_i2c_init(void)
459{ 417{
460 /* i2c1 for PMIC only */ 418 /* i2c1 for PMIC only */
461 omap3_pmic_get_config(&sdp3430_twldata, 419 omap3_pmic_get_config(&sdp3430_twldata,
462 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | 420 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
463 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0); 421 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
422 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
423 sdp3430_twldata.vdac->constraints.apply_uV = true;
424 sdp3430_twldata.vpll2->constraints.apply_uV = true;
425 sdp3430_twldata.vpll2->constraints.name = "VDVI";
426
464 omap3_pmic_init("twl4030", &sdp3430_twldata); 427 omap3_pmic_init("twl4030", &sdp3430_twldata);
465 428
466 /* i2c2 on camera connector (for sensor control) and optional isp1301 */ 429 /* i2c2 on camera connector (for sensor control) and optional isp1301 */
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index cb00abc4dd5d..35891d49c631 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -343,10 +343,6 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
343 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), 343 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
344}; 344};
345 345
346static struct regulator_consumer_supply cm_t35_vdac_supply[] = {
347 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
348};
349
350static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { 346static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
351 REGULATOR_SUPPLY("vdvi", "omapdss"), 347 REGULATOR_SUPPLY("vdvi", "omapdss"),
352}; 348};
@@ -381,35 +377,6 @@ static struct regulator_init_data cm_t35_vsim = {
381 .consumer_supplies = cm_t35_vsim_supply, 377 .consumer_supplies = cm_t35_vsim_supply,
382}; 378};
383 379
384/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
385static struct regulator_init_data cm_t35_vdac = {
386 .constraints = {
387 .min_uV = 1800000,
388 .max_uV = 1800000,
389 .valid_modes_mask = REGULATOR_MODE_NORMAL
390 | REGULATOR_MODE_STANDBY,
391 .valid_ops_mask = REGULATOR_CHANGE_MODE
392 | REGULATOR_CHANGE_STATUS,
393 },
394 .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdac_supply),
395 .consumer_supplies = cm_t35_vdac_supply,
396};
397
398/* VPLL2 for digital video outputs */
399static struct regulator_init_data cm_t35_vpll2 = {
400 .constraints = {
401 .name = "VDVI",
402 .min_uV = 1800000,
403 .max_uV = 1800000,
404 .valid_modes_mask = REGULATOR_MODE_NORMAL
405 | REGULATOR_MODE_STANDBY,
406 .valid_ops_mask = REGULATOR_CHANGE_MODE
407 | REGULATOR_CHANGE_STATUS,
408 },
409 .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdvi_supply),
410 .consumer_supplies = cm_t35_vdvi_supply,
411};
412
413static uint32_t cm_t35_keymap[] = { 380static uint32_t cm_t35_keymap[] = {
414 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), 381 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
415 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), 382 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
@@ -493,13 +460,18 @@ static struct twl4030_platform_data cm_t35_twldata = {
493 .gpio = &cm_t35_gpio_data, 460 .gpio = &cm_t35_gpio_data,
494 .vmmc1 = &cm_t35_vmmc1, 461 .vmmc1 = &cm_t35_vmmc1,
495 .vsim = &cm_t35_vsim, 462 .vsim = &cm_t35_vsim,
496 .vdac = &cm_t35_vdac,
497 .vpll2 = &cm_t35_vpll2,
498}; 463};
499 464
500static void __init cm_t35_init_i2c(void) 465static void __init cm_t35_init_i2c(void)
501{ 466{
502 omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, 0); 467 omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
468 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
469
470 cm_t35_twldata.vpll2->constraints.name = "VDVI";
471 cm_t35_twldata.vpll2->num_consumer_supplies =
472 ARRAY_SIZE(cm_t35_vdvi_supply);
473 cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
474
503 omap3_pmic_init("tps65930", &cm_t35_twldata); 475 omap3_pmic_init("tps65930", &cm_t35_twldata);
504} 476}
505 477
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 364942ed36cc..b6002ec31c6a 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -186,10 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
186 .default_device = &devkit8000_lcd_device, 186 .default_device = &devkit8000_lcd_device,
187}; 187};
188 188
189static struct regulator_consumer_supply devkit8000_vdda_dac_supply[] = {
190 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
191};
192
193static uint32_t board_keymap[] = { 189static uint32_t board_keymap[] = {
194 KEY(0, 0, KEY_1), 190 KEY(0, 0, KEY_1),
195 KEY(1, 0, KEY_2), 191 KEY(1, 0, KEY_2),
@@ -289,20 +285,6 @@ static struct regulator_init_data devkit8000_vmmc1 = {
289 .consumer_supplies = devkit8000_vmmc1_supply, 285 .consumer_supplies = devkit8000_vmmc1_supply,
290}; 286};
291 287
292/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
293static struct regulator_init_data devkit8000_vdac = {
294 .constraints = {
295 .min_uV = 1800000,
296 .max_uV = 1800000,
297 .valid_modes_mask = REGULATOR_MODE_NORMAL
298 | REGULATOR_MODE_STANDBY,
299 .valid_ops_mask = REGULATOR_CHANGE_MODE
300 | REGULATOR_CHANGE_STATUS,
301 },
302 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vdda_dac_supply),
303 .consumer_supplies = devkit8000_vdda_dac_supply,
304};
305
306/* VPLL1 for digital video outputs */ 288/* VPLL1 for digital video outputs */
307static struct regulator_init_data devkit8000_vpll1 = { 289static struct regulator_init_data devkit8000_vpll1 = {
308 .constraints = { 290 .constraints = {
@@ -336,7 +318,6 @@ static struct twl4030_platform_data devkit8000_twldata = {
336 /* platform_data for children goes here */ 318 /* platform_data for children goes here */
337 .gpio = &devkit8000_gpio_data, 319 .gpio = &devkit8000_gpio_data,
338 .vmmc1 = &devkit8000_vmmc1, 320 .vmmc1 = &devkit8000_vmmc1,
339 .vdac = &devkit8000_vdac,
340 .vpll1 = &devkit8000_vpll1, 321 .vpll1 = &devkit8000_vpll1,
341 .vio = &devkit8000_vio, 322 .vio = &devkit8000_vio,
342 .keypad = &devkit8000_kp_data, 323 .keypad = &devkit8000_kp_data,
@@ -345,7 +326,8 @@ static struct twl4030_platform_data devkit8000_twldata = {
345static int __init devkit8000_i2c_init(void) 326static int __init devkit8000_i2c_init(void)
346{ 327{
347 omap3_pmic_get_config(&devkit8000_twldata, 328 omap3_pmic_get_config(&devkit8000_twldata,
348 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0); 329 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
330 TWL_COMMON_REGULATOR_VDAC);
349 omap3_pmic_init("tps65930", &devkit8000_twldata); 331 omap3_pmic_init("tps65930", &devkit8000_twldata);
350 /* Bus 3 is attached to the DVI port where devices like the pico DLP 332 /* Bus 3 is attached to the DVI port where devices like the pico DLP
351 * projector don't work reliably with 400kHz */ 333 * projector don't work reliably with 400kHz */
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e0a66878112b..35be778caf1b 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -479,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = {
479 .default_device = &igep2_dvi_device, 479 .default_device = &igep2_dvi_device,
480}; 480};
481 481
482static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
483 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
484 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
485};
486
487static struct regulator_init_data igep2_vpll2 = {
488 .constraints = {
489 .name = "VDVI",
490 .min_uV = 1800000,
491 .max_uV = 1800000,
492 .apply_uV = true,
493 .valid_modes_mask = REGULATOR_MODE_NORMAL
494 | REGULATOR_MODE_STANDBY,
495 .valid_ops_mask = REGULATOR_CHANGE_MODE
496 | REGULATOR_CHANGE_STATUS,
497 },
498 .num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies),
499 .consumer_supplies = igep2_vpll2_supplies,
500};
501
502static void __init igep2_display_init(void) 482static void __init igep2_display_init(void)
503{ 483{
504 int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, 484 int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
@@ -579,9 +559,11 @@ static void __init igep_i2c_init(void)
579 pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); 559 pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
580 560
581 igep_twldata.keypad = &igep2_keypad_pdata; 561 igep_twldata.keypad = &igep2_keypad_pdata;
582 igep_twldata.vpll2 = &igep2_vpll2; 562 /* Get common pmic data */
583 /* Use common codec data */ 563 omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
584 omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0); 564 TWL_COMMON_REGULATOR_VPLL2);
565 igep_twldata.vpll2->constraints.apply_uV = true;
566 igep_twldata.vpll2->constraints.name = "VDVI";
585 } 567 }
586 568
587 omap3_pmic_init("twl4030", &igep_twldata); 569 omap3_pmic_init("twl4030", &igep_twldata);
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index ec61e9c460b2..34f841112768 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -209,15 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = {
209 .default_device = &beagle_dvi_device, 209 .default_device = &beagle_dvi_device,
210}; 210};
211 211
212static struct regulator_consumer_supply beagle_vdac_supply[] = {
213 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
214};
215
216static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
217 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
218 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
219};
220
221static void __init beagle_display_init(void) 212static void __init beagle_display_init(void)
222{ 213{
223 int r; 214 int r;
@@ -351,42 +342,11 @@ static struct regulator_init_data beagle_vsim = {
351 .consumer_supplies = beagle_vsim_supply, 342 .consumer_supplies = beagle_vsim_supply,
352}; 343};
353 344
354/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
355static struct regulator_init_data beagle_vdac = {
356 .constraints = {
357 .min_uV = 1800000,
358 .max_uV = 1800000,
359 .valid_modes_mask = REGULATOR_MODE_NORMAL
360 | REGULATOR_MODE_STANDBY,
361 .valid_ops_mask = REGULATOR_CHANGE_MODE
362 | REGULATOR_CHANGE_STATUS,
363 },
364 .num_consumer_supplies = ARRAY_SIZE(beagle_vdac_supply),
365 .consumer_supplies = beagle_vdac_supply,
366};
367
368/* VPLL2 for digital video outputs */
369static struct regulator_init_data beagle_vpll2 = {
370 .constraints = {
371 .name = "VDVI",
372 .min_uV = 1800000,
373 .max_uV = 1800000,
374 .valid_modes_mask = REGULATOR_MODE_NORMAL
375 | REGULATOR_MODE_STANDBY,
376 .valid_ops_mask = REGULATOR_CHANGE_MODE
377 | REGULATOR_CHANGE_STATUS,
378 },
379 .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
380 .consumer_supplies = beagle_vdvi_supplies,
381};
382
383static struct twl4030_platform_data beagle_twldata = { 345static struct twl4030_platform_data beagle_twldata = {
384 /* platform_data for children goes here */ 346 /* platform_data for children goes here */
385 .gpio = &beagle_gpio_data, 347 .gpio = &beagle_gpio_data,
386 .vmmc1 = &beagle_vmmc1, 348 .vmmc1 = &beagle_vmmc1,
387 .vsim = &beagle_vsim, 349 .vsim = &beagle_vsim,
388 .vdac = &beagle_vdac,
389 .vpll2 = &beagle_vpll2,
390}; 350};
391 351
392static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { 352static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
@@ -398,7 +358,11 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
398static int __init omap3_beagle_i2c_init(void) 358static int __init omap3_beagle_i2c_init(void)
399{ 359{
400 omap3_pmic_get_config(&beagle_twldata, 360 omap3_pmic_get_config(&beagle_twldata,
401 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0); 361 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
362 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
363
364 beagle_twldata.vpll2->constraints.name = "VDVI";
365
402 omap3_pmic_init("twl4030", &beagle_twldata); 366 omap3_pmic_init("twl4030", &beagle_twldata);
403 /* Bus 3 is attached to the DVI port where devices like the pico DLP 367 /* Bus 3 is attached to the DVI port where devices like the pico DLP
404 * projector don't work reliably with 400kHz */ 368 * projector don't work reliably with 400kHz */
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 1ca298a17623..c452b3f3331a 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -430,45 +430,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
430 .rep = 1, 430 .rep = 1,
431}; 431};
432 432
433static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = {
434 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
435};
436
437/* VDAC for DSS driving S-Video */
438static struct regulator_init_data omap3_evm_vdac = {
439 .constraints = {
440 .min_uV = 1800000,
441 .max_uV = 1800000,
442 .apply_uV = true,
443 .valid_modes_mask = REGULATOR_MODE_NORMAL
444 | REGULATOR_MODE_STANDBY,
445 .valid_ops_mask = REGULATOR_CHANGE_MODE
446 | REGULATOR_CHANGE_STATUS,
447 },
448 .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vdda_dac_supply),
449 .consumer_supplies = omap3_evm_vdda_dac_supply,
450};
451
452/* VPLL2 for digital video outputs */
453static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
454 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
455 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
456};
457
458static struct regulator_init_data omap3_evm_vpll2 = {
459 .constraints = {
460 .min_uV = 1800000,
461 .max_uV = 1800000,
462 .apply_uV = true,
463 .valid_modes_mask = REGULATOR_MODE_NORMAL
464 | REGULATOR_MODE_STANDBY,
465 .valid_ops_mask = REGULATOR_CHANGE_MODE
466 | REGULATOR_CHANGE_STATUS,
467 },
468 .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies),
469 .consumer_supplies = omap3_evm_vpll2_supplies,
470};
471
472/* ads7846 on SPI */ 433/* ads7846 on SPI */
473static struct regulator_consumer_supply omap3evm_vio_supply[] = { 434static struct regulator_consumer_supply omap3evm_vio_supply[] = {
474 REGULATOR_SUPPLY("vcc", "spi1.0"), 435 REGULATOR_SUPPLY("vcc", "spi1.0"),
@@ -535,8 +496,6 @@ static struct twl4030_platform_data omap3evm_twldata = {
535 /* platform_data for children goes here */ 496 /* platform_data for children goes here */
536 .keypad = &omap3evm_kp_data, 497 .keypad = &omap3evm_kp_data,
537 .gpio = &omap3evm_gpio_data, 498 .gpio = &omap3evm_gpio_data,
538 .vdac = &omap3_evm_vdac,
539 .vpll2 = &omap3_evm_vpll2,
540 .vio = &omap3evm_vio, 499 .vio = &omap3evm_vio,
541 .vmmc1 = &omap3evm_vmmc1, 500 .vmmc1 = &omap3evm_vmmc1,
542 .vsim = &omap3evm_vsim, 501 .vsim = &omap3evm_vsim,
@@ -545,8 +504,13 @@ static struct twl4030_platform_data omap3evm_twldata = {
545static int __init omap3_evm_i2c_init(void) 504static int __init omap3_evm_i2c_init(void)
546{ 505{
547 omap3_pmic_get_config(&omap3evm_twldata, 506 omap3_pmic_get_config(&omap3evm_twldata,
548 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | 507 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
549 TWL_COMMON_PDATA_AUDIO, 0); 508 TWL_COMMON_PDATA_AUDIO,
509 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
510
511 omap3evm_twldata.vdac->constraints.apply_uV = true;
512 omap3evm_twldata.vpll2->constraints.apply_uV = true;
513
550 omap3_pmic_init("twl4030", &omap3evm_twldata); 514 omap3_pmic_init("twl4030", &omap3evm_twldata);
551 omap_register_i2c_bus(2, 400, NULL, 0); 515 omap_register_i2c_bus(2, 400, NULL, 0);
552 omap_register_i2c_bus(3, 400, NULL, 0); 516 omap_register_i2c_bus(3, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index f5abf766db4f..080d7bd6795e 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -332,10 +332,6 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
332 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), 332 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
333}; 333};
334 334
335static struct regulator_consumer_supply pandora_vdda_dac_supply[] = {
336 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
337};
338
339static struct regulator_consumer_supply pandora_vdds_supplies[] = { 335static struct regulator_consumer_supply pandora_vdds_supplies[] = {
340 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 336 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
341 REGULATOR_SUPPLY("vdds_dsi", "omapdss"), 337 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
@@ -391,36 +387,6 @@ static struct regulator_init_data pandora_vmmc2 = {
391 .consumer_supplies = pandora_vmmc2_supply, 387 .consumer_supplies = pandora_vmmc2_supply,
392}; 388};
393 389
394/* VDAC for DSS driving S-Video */
395static struct regulator_init_data pandora_vdac = {
396 .constraints = {
397 .min_uV = 1800000,
398 .max_uV = 1800000,
399 .apply_uV = true,
400 .valid_modes_mask = REGULATOR_MODE_NORMAL
401 | REGULATOR_MODE_STANDBY,
402 .valid_ops_mask = REGULATOR_CHANGE_MODE
403 | REGULATOR_CHANGE_STATUS,
404 },
405 .num_consumer_supplies = ARRAY_SIZE(pandora_vdda_dac_supply),
406 .consumer_supplies = pandora_vdda_dac_supply,
407};
408
409/* VPLL2 for digital video outputs */
410static struct regulator_init_data pandora_vpll2 = {
411 .constraints = {
412 .min_uV = 1800000,
413 .max_uV = 1800000,
414 .apply_uV = true,
415 .valid_modes_mask = REGULATOR_MODE_NORMAL
416 | REGULATOR_MODE_STANDBY,
417 .valid_ops_mask = REGULATOR_CHANGE_MODE
418 | REGULATOR_CHANGE_STATUS,
419 },
420 .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies),
421 .consumer_supplies = pandora_vdds_supplies,
422};
423
424/* VAUX1 for LCD */ 390/* VAUX1 for LCD */
425static struct regulator_init_data pandora_vaux1 = { 391static struct regulator_init_data pandora_vaux1 = {
426 .constraints = { 392 .constraints = {
@@ -514,8 +480,6 @@ static struct twl4030_platform_data omap3pandora_twldata = {
514 .gpio = &omap3pandora_gpio_data, 480 .gpio = &omap3pandora_gpio_data,
515 .vmmc1 = &pandora_vmmc1, 481 .vmmc1 = &pandora_vmmc1,
516 .vmmc2 = &pandora_vmmc2, 482 .vmmc2 = &pandora_vmmc2,
517 .vdac = &pandora_vdac,
518 .vpll2 = &pandora_vpll2,
519 .vaux1 = &pandora_vaux1, 483 .vaux1 = &pandora_vaux1,
520 .vaux2 = &pandora_vaux2, 484 .vaux2 = &pandora_vaux2,
521 .vaux4 = &pandora_vaux4, 485 .vaux4 = &pandora_vaux4,
@@ -534,7 +498,16 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
534static int __init omap3pandora_i2c_init(void) 498static int __init omap3pandora_i2c_init(void)
535{ 499{
536 omap3_pmic_get_config(&omap3pandora_twldata, 500 omap3_pmic_get_config(&omap3pandora_twldata,
537 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0); 501 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
502 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
503
504 omap3pandora_twldata.vdac->constraints.apply_uV = true;
505
506 omap3pandora_twldata.vpll2->constraints.apply_uV = true;
507 omap3pandora_twldata.vpll2->num_consumer_supplies =
508 ARRAY_SIZE(pandora_vdds_supplies);
509 omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies;
510
538 omap3_pmic_init("tps65950", &omap3pandora_twldata); 511 omap3_pmic_init("tps65950", &omap3pandora_twldata);
539 /* i2c2 pins are not connected */ 512 /* i2c2 pins are not connected */
540 omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, 513 omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 6e59e59c0fbb..8e104980ea26 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -383,52 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
383 .rep = 1, 383 .rep = 1,
384}; 384};
385 385
386static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = {
387 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
388};
389
390/* VDAC for DSS driving S-Video */
391static struct regulator_init_data omap3_stalker_vdac = {
392 .constraints = {
393 .min_uV = 1800000,
394 .max_uV = 1800000,
395 .apply_uV = true,
396 .valid_modes_mask = REGULATOR_MODE_NORMAL
397 | REGULATOR_MODE_STANDBY,
398 .valid_ops_mask = REGULATOR_CHANGE_MODE
399 | REGULATOR_CHANGE_STATUS,
400 },
401 .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vdda_dac_supply),
402 .consumer_supplies = omap3_stalker_vdda_dac_supply,
403};
404
405/* VPLL2 for digital video outputs */
406static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
407 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
408 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
409};
410
411static struct regulator_init_data omap3_stalker_vpll2 = {
412 .constraints = {
413 .name = "VDVI",
414 .min_uV = 1800000,
415 .max_uV = 1800000,
416 .apply_uV = true,
417 .valid_modes_mask = REGULATOR_MODE_NORMAL
418 | REGULATOR_MODE_STANDBY,
419 .valid_ops_mask = REGULATOR_CHANGE_MODE
420 | REGULATOR_CHANGE_STATUS,
421 },
422 .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
423 .consumer_supplies = omap3_stalker_vpll2_supplies,
424};
425
426static struct twl4030_platform_data omap3stalker_twldata = { 386static struct twl4030_platform_data omap3stalker_twldata = {
427 /* platform_data for children goes here */ 387 /* platform_data for children goes here */
428 .keypad = &omap3stalker_kp_data, 388 .keypad = &omap3stalker_kp_data,
429 .gpio = &omap3stalker_gpio_data, 389 .gpio = &omap3stalker_gpio_data,
430 .vdac = &omap3_stalker_vdac,
431 .vpll2 = &omap3_stalker_vpll2,
432 .vmmc1 = &omap3stalker_vmmc1, 390 .vmmc1 = &omap3stalker_vmmc1,
433 .vsim = &omap3stalker_vsim, 391 .vsim = &omap3stalker_vsim,
434}; 392};
@@ -451,7 +409,13 @@ static int __init omap3_stalker_i2c_init(void)
451{ 409{
452 omap3_pmic_get_config(&omap3stalker_twldata, 410 omap3_pmic_get_config(&omap3stalker_twldata,
453 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | 411 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
454 TWL_COMMON_PDATA_AUDIO, 0); 412 TWL_COMMON_PDATA_AUDIO,
413 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
414
415 omap3stalker_twldata.vdac->constraints.apply_uV = true;
416 omap3stalker_twldata.vpll2->constraints.apply_uV = true;
417 omap3stalker_twldata.vpll2->constraints.name = "VDVI";
418
455 omap3_pmic_init("twl4030", &omap3stalker_twldata); 419 omap3_pmic_init("twl4030", &omap3stalker_twldata);
456 omap_register_i2c_bus(2, 400, NULL, 0); 420 omap_register_i2c_bus(2, 400, NULL, 0);
457 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, 421 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 717972c5ce3e..852ea0464057 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -206,42 +206,11 @@ static struct regulator_init_data touchbook_vsim = {
206 .consumer_supplies = touchbook_vsim_supply, 206 .consumer_supplies = touchbook_vsim_supply,
207}; 207};
208 208
209/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
210static struct regulator_init_data touchbook_vdac = {
211 .constraints = {
212 .min_uV = 1800000,
213 .max_uV = 1800000,
214 .valid_modes_mask = REGULATOR_MODE_NORMAL
215 | REGULATOR_MODE_STANDBY,
216 .valid_ops_mask = REGULATOR_CHANGE_MODE
217 | REGULATOR_CHANGE_STATUS,
218 },
219 .num_consumer_supplies = ARRAY_SIZE(touchbook_vdac_supply),
220 .consumer_supplies = touchbook_vdac_supply,
221};
222
223/* VPLL2 for digital video outputs */
224static struct regulator_init_data touchbook_vpll2 = {
225 .constraints = {
226 .name = "VDVI",
227 .min_uV = 1800000,
228 .max_uV = 1800000,
229 .valid_modes_mask = REGULATOR_MODE_NORMAL
230 | REGULATOR_MODE_STANDBY,
231 .valid_ops_mask = REGULATOR_CHANGE_MODE
232 | REGULATOR_CHANGE_STATUS,
233 },
234 .num_consumer_supplies = ARRAY_SIZE(touchbook_vdvi_supply),
235 .consumer_supplies = touchbook_vdvi_supply,
236};
237
238static struct twl4030_platform_data touchbook_twldata = { 209static struct twl4030_platform_data touchbook_twldata = {
239 /* platform_data for children goes here */ 210 /* platform_data for children goes here */
240 .gpio = &touchbook_gpio_data, 211 .gpio = &touchbook_gpio_data,
241 .vmmc1 = &touchbook_vmmc1, 212 .vmmc1 = &touchbook_vmmc1,
242 .vsim = &touchbook_vsim, 213 .vsim = &touchbook_vsim,
243 .vdac = &touchbook_vdac,
244 .vpll2 = &touchbook_vpll2,
245}; 214};
246 215
247static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { 216static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
@@ -254,7 +223,18 @@ static int __init omap3_touchbook_i2c_init(void)
254{ 223{
255 /* Standard TouchBook bus */ 224 /* Standard TouchBook bus */
256 omap3_pmic_get_config(&touchbook_twldata, 225 omap3_pmic_get_config(&touchbook_twldata,
257 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0); 226 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
227 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
228
229 touchbook_twldata.vdac->num_consumer_supplies =
230 ARRAY_SIZE(touchbook_vdac_supply);
231 touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
232
233 touchbook_twldata.vpll2->constraints.name = "VDVI";
234 touchbook_twldata.vpll2->num_consumer_supplies =
235 ARRAY_SIZE(touchbook_vdvi_supply);
236 touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
237
258 omap3_pmic_init("twl4030", &touchbook_twldata); 238 omap3_pmic_init("twl4030", &touchbook_twldata);
259 /* Additional TouchBook bus */ 239 /* Additional TouchBook bus */
260 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, 240 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 776b44412db1..f1f18d03d24c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -265,15 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
265 .default_device = &overo_dvi_device, 265 .default_device = &overo_dvi_device,
266}; 266};
267 267
268static struct regulator_consumer_supply overo_vdda_dac_supply[] = {
269 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
270};
271
272static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
273 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
274 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
275};
276
277static struct mtd_partition overo_nand_partitions[] = { 268static struct mtd_partition overo_nand_partitions[] = {
278 { 269 {
279 .name = "xloader", 270 .name = "xloader",
@@ -447,46 +438,19 @@ static struct regulator_init_data overo_vmmc1 = {
447 .consumer_supplies = overo_vmmc1_supply, 438 .consumer_supplies = overo_vmmc1_supply,
448}; 439};
449 440
450/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
451static struct regulator_init_data overo_vdac = {
452 .constraints = {
453 .min_uV = 1800000,
454 .max_uV = 1800000,
455 .valid_modes_mask = REGULATOR_MODE_NORMAL
456 | REGULATOR_MODE_STANDBY,
457 .valid_ops_mask = REGULATOR_CHANGE_MODE
458 | REGULATOR_CHANGE_STATUS,
459 },
460 .num_consumer_supplies = ARRAY_SIZE(overo_vdda_dac_supply),
461 .consumer_supplies = overo_vdda_dac_supply,
462};
463
464/* VPLL2 for digital video outputs */
465static struct regulator_init_data overo_vpll2 = {
466 .constraints = {
467 .name = "VDVI",
468 .min_uV = 1800000,
469 .max_uV = 1800000,
470 .valid_modes_mask = REGULATOR_MODE_NORMAL
471 | REGULATOR_MODE_STANDBY,
472 .valid_ops_mask = REGULATOR_CHANGE_MODE
473 | REGULATOR_CHANGE_STATUS,
474 },
475 .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
476 .consumer_supplies = overo_vdds_dsi_supply,
477};
478
479static struct twl4030_platform_data overo_twldata = { 441static struct twl4030_platform_data overo_twldata = {
480 .gpio = &overo_gpio_data, 442 .gpio = &overo_gpio_data,
481 .vmmc1 = &overo_vmmc1, 443 .vmmc1 = &overo_vmmc1,
482 .vdac = &overo_vdac,
483 .vpll2 = &overo_vpll2,
484}; 444};
485 445
486static int __init overo_i2c_init(void) 446static int __init overo_i2c_init(void)
487{ 447{
488 omap3_pmic_get_config(&overo_twldata, 448 omap3_pmic_get_config(&overo_twldata,
489 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0); 449 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
450 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
451
452 overo_twldata.vpll2->constraints.name = "VDVI";
453
490 omap3_pmic_init("tps65950", &overo_twldata); 454 omap3_pmic_init("tps65950", &overo_twldata);
491 /* i2c2 pins are used for gpio */ 455 /* i2c2 pins are used for gpio */
492 omap_register_i2c_bus(3, 400, NULL, 0); 456 omap_register_i2c_bus(3, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index e0a2804e2b71..6140290721a0 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -394,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
394 REGULATOR_SUPPLY("vdd", "2-0063"), 394 REGULATOR_SUPPLY("vdd", "2-0063"),
395}; 395};
396 396
397static struct regulator_consumer_supply rx51_vdac_supply[] = {
398 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
399};
400
401static struct regulator_init_data rx51_vaux1 = { 397static struct regulator_init_data rx51_vaux1 = {
402 .constraints = { 398 .constraints = {
403 .name = "V28", 399 .name = "V28",
@@ -514,21 +510,6 @@ static struct regulator_init_data rx51_vsim = {
514 .consumer_supplies = rx51_vsim_supply, 510 .consumer_supplies = rx51_vsim_supply,
515}; 511};
516 512
517static struct regulator_init_data rx51_vdac = {
518 .constraints = {
519 .name = "VDAC",
520 .min_uV = 1800000,
521 .max_uV = 1800000,
522 .apply_uV = true,
523 .valid_modes_mask = REGULATOR_MODE_NORMAL
524 | REGULATOR_MODE_STANDBY,
525 .valid_ops_mask = REGULATOR_CHANGE_MODE
526 | REGULATOR_CHANGE_STATUS,
527 },
528 .num_consumer_supplies = ARRAY_SIZE(rx51_vdac_supply),
529 .consumer_supplies = rx51_vdac_supply,
530};
531
532static struct regulator_init_data rx51_vio = { 513static struct regulator_init_data rx51_vio = {
533 .constraints = { 514 .constraints = {
534 .min_uV = 1800000, 515 .min_uV = 1800000,
@@ -781,7 +762,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
781 .vaux4 = &rx51_vaux4, 762 .vaux4 = &rx51_vaux4,
782 .vmmc1 = &rx51_vmmc1, 763 .vmmc1 = &rx51_vmmc1,
783 .vsim = &rx51_vsim, 764 .vsim = &rx51_vsim,
784 .vdac = &rx51_vdac,
785 .vio = &rx51_vio, 765 .vio = &rx51_vio,
786}; 766};
787 767
@@ -838,7 +818,12 @@ static int __init rx51_i2c_init(void)
838 } 818 }
839 rx51_twldata.vmmc2 = &rx51_vmmc2; 819 rx51_twldata.vmmc2 = &rx51_vmmc2;
840 omap3_pmic_get_config(&rx51_twldata, 820 omap3_pmic_get_config(&rx51_twldata,
841 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0); 821 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC,
822 TWL_COMMON_REGULATOR_VDAC);
823
824 rx51_twldata.vdac->constraints.apply_uV = true;
825 rx51_twldata.vdac->constraints.name = "VDAC";
826
842 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 827 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
843 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 828 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
844 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 829 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6d8df1b40d86..13a644233667 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -226,41 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
226 {} /* Terminator */ 226 {} /* Terminator */
227}; 227};
228 228
229static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
230 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
231 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
232};
233
234static struct regulator_consumer_supply zoom_vdda_dac_supply[] = {
235 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
236};
237
238static struct regulator_init_data zoom_vpll2 = {
239 .constraints = {
240 .min_uV = 1800000,
241 .max_uV = 1800000,
242 .valid_modes_mask = REGULATOR_MODE_NORMAL
243 | REGULATOR_MODE_STANDBY,
244 .valid_ops_mask = REGULATOR_CHANGE_MODE
245 | REGULATOR_CHANGE_STATUS,
246 },
247 .num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
248 .consumer_supplies = zoom_vpll2_supplies,
249};
250
251static struct regulator_init_data zoom_vdac = {
252 .constraints = {
253 .min_uV = 1800000,
254 .max_uV = 1800000,
255 .valid_modes_mask = REGULATOR_MODE_NORMAL
256 | REGULATOR_MODE_STANDBY,
257 .valid_ops_mask = REGULATOR_CHANGE_MODE
258 | REGULATOR_CHANGE_STATUS,
259 },
260 .num_consumer_supplies = ARRAY_SIZE(zoom_vdda_dac_supply),
261 .consumer_supplies = zoom_vdda_dac_supply,
262};
263
264static int zoom_twl_gpio_setup(struct device *dev, 229static int zoom_twl_gpio_setup(struct device *dev,
265 unsigned gpio, unsigned ngpio) 230 unsigned gpio, unsigned ngpio)
266{ 231{
@@ -299,15 +264,14 @@ static struct twl4030_platform_data zoom_twldata = {
299 .vmmc1 = &zoom_vmmc1, 264 .vmmc1 = &zoom_vmmc1,
300 .vmmc2 = &zoom_vmmc2, 265 .vmmc2 = &zoom_vmmc2,
301 .vsim = &zoom_vsim, 266 .vsim = &zoom_vsim,
302 .vpll2 = &zoom_vpll2,
303 .vdac = &zoom_vdac,
304}; 267};
305 268
306static int __init omap_i2c_init(void) 269static int __init omap_i2c_init(void)
307{ 270{
308 omap3_pmic_get_config(&zoom_twldata, 271 omap3_pmic_get_config(&zoom_twldata,
309 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | 272 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
310 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0); 273 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
274 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
311 275
312 if (machine_is_omap_zoom2()) { 276 if (machine_is_omap_zoom2()) {
313 struct twl4030_codec_audio_data *audio_data; 277 struct twl4030_codec_audio_data *audio_data;
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 9e8decf14a22..3aaa46f6cd12 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -87,6 +87,41 @@ static struct twl4030_codec_data omap3_codec_pdata = {
87 .audio = &omap3_audio, 87 .audio = &omap3_audio,
88}; 88};
89 89
90static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
91 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
92};
93
94static struct regulator_init_data omap3_vdac_idata = {
95 .constraints = {
96 .min_uV = 1800000,
97 .max_uV = 1800000,
98 .valid_modes_mask = REGULATOR_MODE_NORMAL
99 | REGULATOR_MODE_STANDBY,
100 .valid_ops_mask = REGULATOR_CHANGE_MODE
101 | REGULATOR_CHANGE_STATUS,
102 },
103 .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies),
104 .consumer_supplies = omap3_vdda_dac_supplies,
105};
106
107static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
108 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
109 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
110};
111
112static struct regulator_init_data omap3_vpll2_idata = {
113 .constraints = {
114 .min_uV = 1800000,
115 .max_uV = 1800000,
116 .valid_modes_mask = REGULATOR_MODE_NORMAL
117 | REGULATOR_MODE_STANDBY,
118 .valid_ops_mask = REGULATOR_CHANGE_MODE
119 | REGULATOR_CHANGE_STATUS,
120 },
121 .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies),
122 .consumer_supplies = omap3_vpll2_supplies,
123};
124
90static struct regulator_init_data omap4_vdac_idata = { 125static struct regulator_init_data omap4_vdac_idata = {
91 .constraints = { 126 .constraints = {
92 .min_uV = 1800000, 127 .min_uV = 1800000,
@@ -259,4 +294,11 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
259 294
260 if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) 295 if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
261 pmic_data->codec = &omap3_codec_pdata; 296 pmic_data->codec = &omap3_codec_pdata;
297
298 /* Common regulator configurations */
299 if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
300 pmic_data->vdac = &omap3_vdac_idata;
301
302 if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
303 pmic_data->vpll2 = &omap3_vpll2_idata;
262} 304}
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
index 3b4b05d529ba..5e83a5bd37fb 100644
--- a/arch/arm/mach-omap2/twl-common.h
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -21,6 +21,11 @@
21#define TWL_COMMON_REGULATOR_VUSB (1 << 9) 21#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
22#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) 22#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
23 23
24/* TWL4030 LDO regulators */
25#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)
26#define TWL_COMMON_REGULATOR_VPLL2 (1 << 5)
27
28
24struct twl4030_platform_data; 29struct twl4030_platform_data;
25 30
26void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, 31void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,