diff options
author | Tony Lindgren <tony@atomide.com> | 2011-07-10 14:48:26 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-07-10 14:48:26 -0400 |
commit | 1ad920556f32a5a127397ca461d1a1faaf22c4e0 (patch) | |
tree | cea7ef733c50025496f554f114173e49e52d3028 /arch/arm/mach-omap2 | |
parent | f67df6c670a8fcd3f63728afa2314e7eca653bd7 (diff) | |
parent | 727e18b429e3badda12d1de74f492bfa363a2e94 (diff) |
Merge branch 'cleanup-part-2' into devel-board
Conflicts:
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-rx51-peripherals.c
Diffstat (limited to 'arch/arm/mach-omap2')
21 files changed, 489 insertions, 973 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index adbe82d72d4e..ff1466fbf5c5 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -269,4 +269,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | |||
269 | disp-$(CONFIG_OMAP2_DSS) := display.o | 269 | disp-$(CONFIG_OMAP2_DSS) := display.o |
270 | obj-y += $(disp-m) $(disp-y) | 270 | obj-y += $(disp-m) $(disp-y) |
271 | 271 | ||
272 | obj-y += common-board-devices.o | 272 | obj-y += common-board-devices.o twl-common.o |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 12fae21346cf..bd600cfb7f80 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void) | |||
231 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); | 231 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); |
232 | } | 232 | } |
233 | 233 | ||
234 | static int sdp3430_batt_table[] = { | ||
235 | /* 0 C*/ | ||
236 | 30800, 29500, 28300, 27100, | ||
237 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
238 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
239 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
240 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
241 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
242 | 4040, 3910, 3790, 3670, 3550 | ||
243 | }; | ||
244 | |||
245 | static struct twl4030_bci_platform_data sdp3430_bci_data = { | ||
246 | .battery_tmp_tbl = sdp3430_batt_table, | ||
247 | .tblsize = ARRAY_SIZE(sdp3430_batt_table), | ||
248 | }; | ||
249 | |||
250 | static struct omap2_hsmmc_info mmc[] = { | 234 | static struct omap2_hsmmc_info mmc[] = { |
251 | { | 235 | { |
252 | .mmc = 1, | 236 | .mmc = 1, |
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = { | |||
292 | .setup = sdp3430_twl_gpio_setup, | 276 | .setup = sdp3430_twl_gpio_setup, |
293 | }; | 277 | }; |
294 | 278 | ||
295 | static struct twl4030_usb_data sdp3430_usb_data = { | ||
296 | .usb_mode = T2_USB_MODE_ULPI, | ||
297 | }; | ||
298 | |||
299 | static struct twl4030_madc_platform_data sdp3430_madc_data = { | ||
300 | .irq_line = 1, | ||
301 | }; | ||
302 | |||
303 | /* regulator consumer mappings */ | 279 | /* regulator consumer mappings */ |
304 | 280 | ||
305 | /* ads7846 on SPI */ | 281 | /* ads7846 on SPI */ |
@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = { | |||
307 | REGULATOR_SUPPLY("vcc", "spi1.0"), | 283 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
308 | }; | 284 | }; |
309 | 285 | ||
310 | static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = { | ||
311 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
312 | }; | ||
313 | |||
314 | /* VPLL2 for digital video outputs */ | ||
315 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
316 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
317 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
318 | }; | ||
319 | |||
320 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { | 286 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { |
321 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | 287 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
322 | }; | 288 | }; |
@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = { | |||
433 | .consumer_supplies = sdp3430_vsim_supplies, | 399 | .consumer_supplies = sdp3430_vsim_supplies, |
434 | }; | 400 | }; |
435 | 401 | ||
436 | /* VDAC for DSS driving S-Video */ | ||
437 | static struct regulator_init_data sdp3430_vdac = { | ||
438 | .constraints = { | ||
439 | .min_uV = 1800000, | ||
440 | .max_uV = 1800000, | ||
441 | .apply_uV = true, | ||
442 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
443 | | REGULATOR_MODE_STANDBY, | ||
444 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
445 | | REGULATOR_CHANGE_STATUS, | ||
446 | }, | ||
447 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies), | ||
448 | .consumer_supplies = sdp3430_vdda_dac_supplies, | ||
449 | }; | ||
450 | |||
451 | static struct regulator_init_data sdp3430_vpll2 = { | ||
452 | .constraints = { | ||
453 | .name = "VDVI", | ||
454 | .min_uV = 1800000, | ||
455 | .max_uV = 1800000, | ||
456 | .apply_uV = true, | ||
457 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
458 | | REGULATOR_MODE_STANDBY, | ||
459 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
460 | | REGULATOR_CHANGE_STATUS, | ||
461 | }, | ||
462 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies), | ||
463 | .consumer_supplies = sdp3430_vpll2_supplies, | ||
464 | }; | ||
465 | |||
466 | static struct twl4030_codec_audio_data sdp3430_audio; | ||
467 | |||
468 | static struct twl4030_codec_data sdp3430_codec = { | ||
469 | .audio_mclk = 26000000, | ||
470 | .audio = &sdp3430_audio, | ||
471 | }; | ||
472 | |||
473 | static struct twl4030_platform_data sdp3430_twldata = { | 402 | static struct twl4030_platform_data sdp3430_twldata = { |
474 | .irq_base = TWL4030_IRQ_BASE, | ||
475 | .irq_end = TWL4030_IRQ_END, | ||
476 | |||
477 | /* platform_data for children goes here */ | 403 | /* platform_data for children goes here */ |
478 | .bci = &sdp3430_bci_data, | ||
479 | .gpio = &sdp3430_gpio_data, | 404 | .gpio = &sdp3430_gpio_data, |
480 | .madc = &sdp3430_madc_data, | ||
481 | .keypad = &sdp3430_kp_data, | 405 | .keypad = &sdp3430_kp_data, |
482 | .usb = &sdp3430_usb_data, | ||
483 | .codec = &sdp3430_codec, | ||
484 | 406 | ||
485 | .vaux1 = &sdp3430_vaux1, | 407 | .vaux1 = &sdp3430_vaux1, |
486 | .vaux2 = &sdp3430_vaux2, | 408 | .vaux2 = &sdp3430_vaux2, |
@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = { | |||
489 | .vmmc1 = &sdp3430_vmmc1, | 411 | .vmmc1 = &sdp3430_vmmc1, |
490 | .vmmc2 = &sdp3430_vmmc2, | 412 | .vmmc2 = &sdp3430_vmmc2, |
491 | .vsim = &sdp3430_vsim, | 413 | .vsim = &sdp3430_vsim, |
492 | .vdac = &sdp3430_vdac, | ||
493 | .vpll2 = &sdp3430_vpll2, | ||
494 | }; | 414 | }; |
495 | 415 | ||
496 | static int __init omap3430_i2c_init(void) | 416 | static int __init omap3430_i2c_init(void) |
497 | { | 417 | { |
498 | /* i2c1 for PMIC only */ | 418 | /* i2c1 for PMIC only */ |
419 | omap3_pmic_get_config(&sdp3430_twldata, | ||
420 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
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 | |||
499 | omap3_pmic_init("twl4030", &sdp3430_twldata); | 427 | omap3_pmic_init("twl4030", &sdp3430_twldata); |
428 | |||
500 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ | 429 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ |
501 | omap_register_i2c_bus(2, 400, NULL, 0); | 430 | omap_register_i2c_bus(2, 400, NULL, 0); |
502 | /* i2c3 on display connector (for DVI, tfp410) */ | 431 | /* i2c3 on display connector (for DVI, tfp410) */ |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index f6efff5f1650..a7c0b31fd084 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -372,14 +372,6 @@ static struct omap_musb_board_data musb_board_data = { | |||
372 | .power = 100, | 372 | .power = 100, |
373 | }; | 373 | }; |
374 | 374 | ||
375 | static struct twl4030_usb_data omap4_usbphy_data = { | ||
376 | .phy_init = omap4430_phy_init, | ||
377 | .phy_exit = omap4430_phy_exit, | ||
378 | .phy_power = omap4430_phy_power, | ||
379 | .phy_set_clock = omap4430_phy_set_clk, | ||
380 | .phy_suspend = omap4430_phy_suspend, | ||
381 | }; | ||
382 | |||
383 | static struct omap2_hsmmc_info mmc[] = { | 375 | static struct omap2_hsmmc_info mmc[] = { |
384 | { | 376 | { |
385 | .mmc = 2, | 377 | .mmc = 2, |
@@ -411,10 +403,6 @@ static struct regulator_consumer_supply sdp4430_vaux_supply[] = { | |||
411 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | 403 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
412 | }; | 404 | }; |
413 | 405 | ||
414 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | ||
415 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
416 | }; | ||
417 | |||
418 | static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = { | 406 | static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = { |
419 | .supply = "vmmc", | 407 | .supply = "vmmc", |
420 | .dev_name = "omap_hsmmc.4", | 408 | .dev_name = "omap_hsmmc.4", |
@@ -504,61 +492,6 @@ static struct regulator_init_data sdp4430_vaux1 = { | |||
504 | .consumer_supplies = sdp4430_vaux_supply, | 492 | .consumer_supplies = sdp4430_vaux_supply, |
505 | }; | 493 | }; |
506 | 494 | ||
507 | static struct regulator_init_data sdp4430_vaux2 = { | ||
508 | .constraints = { | ||
509 | .min_uV = 1200000, | ||
510 | .max_uV = 2800000, | ||
511 | .apply_uV = true, | ||
512 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
513 | | REGULATOR_MODE_STANDBY, | ||
514 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
515 | | REGULATOR_CHANGE_MODE | ||
516 | | REGULATOR_CHANGE_STATUS, | ||
517 | }, | ||
518 | }; | ||
519 | |||
520 | static struct regulator_init_data sdp4430_vaux3 = { | ||
521 | .constraints = { | ||
522 | .min_uV = 1000000, | ||
523 | .max_uV = 3000000, | ||
524 | .apply_uV = true, | ||
525 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
526 | | REGULATOR_MODE_STANDBY, | ||
527 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
528 | | REGULATOR_CHANGE_MODE | ||
529 | | REGULATOR_CHANGE_STATUS, | ||
530 | }, | ||
531 | }; | ||
532 | |||
533 | /* VMMC1 for MMC1 card */ | ||
534 | static struct regulator_init_data sdp4430_vmmc = { | ||
535 | .constraints = { | ||
536 | .min_uV = 1200000, | ||
537 | .max_uV = 3000000, | ||
538 | .apply_uV = true, | ||
539 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
540 | | REGULATOR_MODE_STANDBY, | ||
541 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
542 | | REGULATOR_CHANGE_MODE | ||
543 | | REGULATOR_CHANGE_STATUS, | ||
544 | }, | ||
545 | .num_consumer_supplies = 1, | ||
546 | .consumer_supplies = sdp4430_vmmc_supply, | ||
547 | }; | ||
548 | |||
549 | static struct regulator_init_data sdp4430_vpp = { | ||
550 | .constraints = { | ||
551 | .min_uV = 1800000, | ||
552 | .max_uV = 2500000, | ||
553 | .apply_uV = true, | ||
554 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
555 | | REGULATOR_MODE_STANDBY, | ||
556 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
557 | | REGULATOR_CHANGE_MODE | ||
558 | | REGULATOR_CHANGE_STATUS, | ||
559 | }, | ||
560 | }; | ||
561 | |||
562 | static struct regulator_init_data sdp4430_vusim = { | 495 | static struct regulator_init_data sdp4430_vusim = { |
563 | .constraints = { | 496 | .constraints = { |
564 | .min_uV = 1200000, | 497 | .min_uV = 1200000, |
@@ -572,75 +505,10 @@ static struct regulator_init_data sdp4430_vusim = { | |||
572 | }, | 505 | }, |
573 | }; | 506 | }; |
574 | 507 | ||
575 | static struct regulator_init_data sdp4430_vana = { | ||
576 | .constraints = { | ||
577 | .min_uV = 2100000, | ||
578 | .max_uV = 2100000, | ||
579 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
580 | | REGULATOR_MODE_STANDBY, | ||
581 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
582 | | REGULATOR_CHANGE_STATUS, | ||
583 | }, | ||
584 | }; | ||
585 | |||
586 | static struct regulator_init_data sdp4430_vcxio = { | ||
587 | .constraints = { | ||
588 | .min_uV = 1800000, | ||
589 | .max_uV = 1800000, | ||
590 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
591 | | REGULATOR_MODE_STANDBY, | ||
592 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
593 | | REGULATOR_CHANGE_STATUS, | ||
594 | }, | ||
595 | }; | ||
596 | |||
597 | static struct regulator_init_data sdp4430_vdac = { | ||
598 | .constraints = { | ||
599 | .min_uV = 1800000, | ||
600 | .max_uV = 1800000, | ||
601 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
602 | | REGULATOR_MODE_STANDBY, | ||
603 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
604 | | REGULATOR_CHANGE_STATUS, | ||
605 | }, | ||
606 | }; | ||
607 | |||
608 | static struct regulator_init_data sdp4430_vusb = { | ||
609 | .constraints = { | ||
610 | .min_uV = 3300000, | ||
611 | .max_uV = 3300000, | ||
612 | .apply_uV = true, | ||
613 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
614 | | REGULATOR_MODE_STANDBY, | ||
615 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
616 | | REGULATOR_CHANGE_STATUS, | ||
617 | }, | ||
618 | }; | ||
619 | |||
620 | static struct regulator_init_data sdp4430_clk32kg = { | ||
621 | .constraints = { | ||
622 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
623 | .always_on = true, | ||
624 | }, | ||
625 | }; | ||
626 | |||
627 | static struct twl4030_platform_data sdp4430_twldata = { | 508 | static struct twl4030_platform_data sdp4430_twldata = { |
628 | .irq_base = TWL6030_IRQ_BASE, | ||
629 | .irq_end = TWL6030_IRQ_END, | ||
630 | |||
631 | /* Regulators */ | 509 | /* Regulators */ |
632 | .vmmc = &sdp4430_vmmc, | ||
633 | .vpp = &sdp4430_vpp, | ||
634 | .vusim = &sdp4430_vusim, | 510 | .vusim = &sdp4430_vusim, |
635 | .vana = &sdp4430_vana, | ||
636 | .vcxio = &sdp4430_vcxio, | ||
637 | .vdac = &sdp4430_vdac, | ||
638 | .vusb = &sdp4430_vusb, | ||
639 | .vaux1 = &sdp4430_vaux1, | 511 | .vaux1 = &sdp4430_vaux1, |
640 | .vaux2 = &sdp4430_vaux2, | ||
641 | .vaux3 = &sdp4430_vaux3, | ||
642 | .clk32kg = &sdp4430_clk32kg, | ||
643 | .usb = &omap4_usbphy_data | ||
644 | }; | 512 | }; |
645 | 513 | ||
646 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { | 514 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { |
@@ -658,6 +526,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { | |||
658 | }; | 526 | }; |
659 | static int __init omap4_i2c_init(void) | 527 | static int __init omap4_i2c_init(void) |
660 | { | 528 | { |
529 | omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB, | ||
530 | TWL_COMMON_REGULATOR_VDAC | | ||
531 | TWL_COMMON_REGULATOR_VAUX2 | | ||
532 | TWL_COMMON_REGULATOR_VAUX3 | | ||
533 | TWL_COMMON_REGULATOR_VMMC | | ||
534 | TWL_COMMON_REGULATOR_VPP | | ||
535 | TWL_COMMON_REGULATOR_VANA | | ||
536 | TWL_COMMON_REGULATOR_VCXIO | | ||
537 | TWL_COMMON_REGULATOR_VUSB | | ||
538 | TWL_COMMON_REGULATOR_CLK32KG); | ||
661 | omap4_pmic_init("twl6030", &sdp4430_twldata); | 539 | omap4_pmic_init("twl6030", &sdp4430_twldata); |
662 | omap_register_i2c_bus(2, 400, NULL, 0); | 540 | omap_register_i2c_bus(2, 400, NULL, 0); |
663 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, | 541 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index fcd403224f98..3af8aab435b5 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -339,10 +339,6 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = { | |||
339 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), | 339 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
340 | }; | 340 | }; |
341 | 341 | ||
342 | static struct regulator_consumer_supply cm_t35_vdac_supply[] = { | ||
343 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
344 | }; | ||
345 | |||
346 | static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { | 342 | static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { |
347 | REGULATOR_SUPPLY("vdvi", "omapdss"), | 343 | REGULATOR_SUPPLY("vdvi", "omapdss"), |
348 | }; | 344 | }; |
@@ -377,39 +373,6 @@ static struct regulator_init_data cm_t35_vsim = { | |||
377 | .consumer_supplies = cm_t35_vsim_supply, | 373 | .consumer_supplies = cm_t35_vsim_supply, |
378 | }; | 374 | }; |
379 | 375 | ||
380 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
381 | static struct regulator_init_data cm_t35_vdac = { | ||
382 | .constraints = { | ||
383 | .min_uV = 1800000, | ||
384 | .max_uV = 1800000, | ||
385 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
386 | | REGULATOR_MODE_STANDBY, | ||
387 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
388 | | REGULATOR_CHANGE_STATUS, | ||
389 | }, | ||
390 | .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdac_supply), | ||
391 | .consumer_supplies = cm_t35_vdac_supply, | ||
392 | }; | ||
393 | |||
394 | /* VPLL2 for digital video outputs */ | ||
395 | static struct regulator_init_data cm_t35_vpll2 = { | ||
396 | .constraints = { | ||
397 | .name = "VDVI", | ||
398 | .min_uV = 1800000, | ||
399 | .max_uV = 1800000, | ||
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(cm_t35_vdvi_supply), | ||
406 | .consumer_supplies = cm_t35_vdvi_supply, | ||
407 | }; | ||
408 | |||
409 | static struct twl4030_usb_data cm_t35_usb_data = { | ||
410 | .usb_mode = T2_USB_MODE_ULPI, | ||
411 | }; | ||
412 | |||
413 | static uint32_t cm_t35_keymap[] = { | 376 | static uint32_t cm_t35_keymap[] = { |
414 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), | 377 | 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), | 378 | KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), |
@@ -488,21 +451,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = { | |||
488 | }; | 451 | }; |
489 | 452 | ||
490 | static struct twl4030_platform_data cm_t35_twldata = { | 453 | static struct twl4030_platform_data cm_t35_twldata = { |
491 | .irq_base = TWL4030_IRQ_BASE, | ||
492 | .irq_end = TWL4030_IRQ_END, | ||
493 | |||
494 | /* platform_data for children goes here */ | 454 | /* platform_data for children goes here */ |
495 | .keypad = &cm_t35_kp_data, | 455 | .keypad = &cm_t35_kp_data, |
496 | .usb = &cm_t35_usb_data, | ||
497 | .gpio = &cm_t35_gpio_data, | 456 | .gpio = &cm_t35_gpio_data, |
498 | .vmmc1 = &cm_t35_vmmc1, | 457 | .vmmc1 = &cm_t35_vmmc1, |
499 | .vsim = &cm_t35_vsim, | 458 | .vsim = &cm_t35_vsim, |
500 | .vdac = &cm_t35_vdac, | ||
501 | .vpll2 = &cm_t35_vpll2, | ||
502 | }; | 459 | }; |
503 | 460 | ||
504 | static void __init cm_t35_init_i2c(void) | 461 | static void __init cm_t35_init_i2c(void) |
505 | { | 462 | { |
463 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, | ||
464 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
465 | |||
466 | cm_t35_twldata.vpll2->constraints.name = "VDVI"; | ||
467 | cm_t35_twldata.vpll2->num_consumer_supplies = | ||
468 | ARRAY_SIZE(cm_t35_vdvi_supply); | ||
469 | cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply; | ||
470 | |||
506 | omap3_pmic_init("tps65930", &cm_t35_twldata); | 471 | omap3_pmic_init("tps65930", &cm_t35_twldata); |
507 | } | 472 | } |
508 | 473 | ||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 949dbeabab26..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 | ||
189 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply[] = { | ||
190 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
191 | }; | ||
192 | |||
193 | static uint32_t board_keymap[] = { | 189 | static 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) */ | ||
293 | static 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 */ |
307 | static struct regulator_init_data devkit8000_vpll1 = { | 289 | static struct regulator_init_data devkit8000_vpll1 = { |
308 | .constraints = { | 290 | .constraints = { |
@@ -332,27 +314,10 @@ static struct regulator_init_data devkit8000_vio = { | |||
332 | .consumer_supplies = devkit8000_vio_supply, | 314 | .consumer_supplies = devkit8000_vio_supply, |
333 | }; | 315 | }; |
334 | 316 | ||
335 | static struct twl4030_usb_data devkit8000_usb_data = { | ||
336 | .usb_mode = T2_USB_MODE_ULPI, | ||
337 | }; | ||
338 | |||
339 | static struct twl4030_codec_audio_data devkit8000_audio_data; | ||
340 | |||
341 | static struct twl4030_codec_data devkit8000_codec_data = { | ||
342 | .audio_mclk = 26000000, | ||
343 | .audio = &devkit8000_audio_data, | ||
344 | }; | ||
345 | |||
346 | static struct twl4030_platform_data devkit8000_twldata = { | 317 | static struct twl4030_platform_data devkit8000_twldata = { |
347 | .irq_base = TWL4030_IRQ_BASE, | ||
348 | .irq_end = TWL4030_IRQ_END, | ||
349 | |||
350 | /* platform_data for children goes here */ | 318 | /* platform_data for children goes here */ |
351 | .usb = &devkit8000_usb_data, | ||
352 | .gpio = &devkit8000_gpio_data, | 319 | .gpio = &devkit8000_gpio_data, |
353 | .codec = &devkit8000_codec_data, | ||
354 | .vmmc1 = &devkit8000_vmmc1, | 320 | .vmmc1 = &devkit8000_vmmc1, |
355 | .vdac = &devkit8000_vdac, | ||
356 | .vpll1 = &devkit8000_vpll1, | 321 | .vpll1 = &devkit8000_vpll1, |
357 | .vio = &devkit8000_vio, | 322 | .vio = &devkit8000_vio, |
358 | .keypad = &devkit8000_kp_data, | 323 | .keypad = &devkit8000_kp_data, |
@@ -360,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = { | |||
360 | 325 | ||
361 | static int __init devkit8000_i2c_init(void) | 326 | static int __init devkit8000_i2c_init(void) |
362 | { | 327 | { |
328 | omap3_pmic_get_config(&devkit8000_twldata, | ||
329 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
330 | TWL_COMMON_REGULATOR_VDAC); | ||
363 | omap3_pmic_init("tps65930", &devkit8000_twldata); | 331 | omap3_pmic_init("tps65930", &devkit8000_twldata); |
364 | /* 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 |
365 | * 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 f683835f936c..35be778caf1b 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -443,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { | |||
443 | .setup = igep_twl_gpio_setup, | 443 | .setup = igep_twl_gpio_setup, |
444 | }; | 444 | }; |
445 | 445 | ||
446 | static struct twl4030_usb_data igep_usb_data = { | ||
447 | .usb_mode = T2_USB_MODE_ULPI, | ||
448 | }; | ||
449 | |||
450 | static int igep2_enable_dvi(struct omap_dss_device *dssdev) | 446 | static int igep2_enable_dvi(struct omap_dss_device *dssdev) |
451 | { | 447 | { |
452 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); | 448 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); |
@@ -483,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = { | |||
483 | .default_device = &igep2_dvi_device, | 479 | .default_device = &igep2_dvi_device, |
484 | }; | 480 | }; |
485 | 481 | ||
486 | static struct regulator_consumer_supply igep2_vpll2_supplies[] = { | ||
487 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
488 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
489 | }; | ||
490 | |||
491 | static struct regulator_init_data igep2_vpll2 = { | ||
492 | .constraints = { | ||
493 | .name = "VDVI", | ||
494 | .min_uV = 1800000, | ||
495 | .max_uV = 1800000, | ||
496 | .apply_uV = true, | ||
497 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
498 | | REGULATOR_MODE_STANDBY, | ||
499 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
500 | | REGULATOR_CHANGE_STATUS, | ||
501 | }, | ||
502 | .num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies), | ||
503 | .consumer_supplies = igep2_vpll2_supplies, | ||
504 | }; | ||
505 | |||
506 | static void __init igep2_display_init(void) | 482 | static void __init igep2_display_init(void) |
507 | { | 483 | { |
508 | 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, |
@@ -522,13 +498,6 @@ static void __init igep_init_early(void) | |||
522 | m65kxxxxam_sdrc_params); | 498 | m65kxxxxam_sdrc_params); |
523 | } | 499 | } |
524 | 500 | ||
525 | static struct twl4030_codec_audio_data igep2_audio_data; | ||
526 | |||
527 | static struct twl4030_codec_data igep2_codec_data = { | ||
528 | .audio_mclk = 26000000, | ||
529 | .audio = &igep2_audio_data, | ||
530 | }; | ||
531 | |||
532 | static int igep2_keymap[] = { | 501 | static int igep2_keymap[] = { |
533 | KEY(0, 0, KEY_LEFT), | 502 | KEY(0, 0, KEY_LEFT), |
534 | KEY(0, 1, KEY_RIGHT), | 503 | KEY(0, 1, KEY_RIGHT), |
@@ -561,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = { | |||
561 | }; | 530 | }; |
562 | 531 | ||
563 | static struct twl4030_platform_data igep_twldata = { | 532 | static struct twl4030_platform_data igep_twldata = { |
564 | .irq_base = TWL4030_IRQ_BASE, | ||
565 | .irq_end = TWL4030_IRQ_END, | ||
566 | |||
567 | /* platform_data for children goes here */ | 533 | /* platform_data for children goes here */ |
568 | .usb = &igep_usb_data, | ||
569 | .gpio = &igep_twl4030_gpio_pdata, | 534 | .gpio = &igep_twl4030_gpio_pdata, |
570 | .vmmc1 = &igep_vmmc1, | 535 | .vmmc1 = &igep_vmmc1, |
571 | .vio = &igep_vio, | 536 | .vio = &igep_vio, |
@@ -581,6 +546,8 @@ static void __init igep_i2c_init(void) | |||
581 | { | 546 | { |
582 | int ret; | 547 | int ret; |
583 | 548 | ||
549 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0); | ||
550 | |||
584 | if (machine_is_igep0020()) { | 551 | if (machine_is_igep0020()) { |
585 | /* | 552 | /* |
586 | * Bus 3 is attached to the DVI port where devices like the | 553 | * Bus 3 is attached to the DVI port where devices like the |
@@ -591,9 +558,12 @@ static void __init igep_i2c_init(void) | |||
591 | if (ret) | 558 | if (ret) |
592 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); | 559 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); |
593 | 560 | ||
594 | igep_twldata.codec = &igep2_codec_data; | ||
595 | igep_twldata.keypad = &igep2_keypad_pdata; | 561 | igep_twldata.keypad = &igep2_keypad_pdata; |
596 | igep_twldata.vpll2 = &igep2_vpll2; | 562 | /* Get common pmic data */ |
563 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, | ||
564 | TWL_COMMON_REGULATOR_VPLL2); | ||
565 | igep_twldata.vpll2->constraints.apply_uV = true; | ||
566 | igep_twldata.vpll2->constraints.name = "VDVI"; | ||
597 | } | 567 | } |
598 | 568 | ||
599 | omap3_pmic_init("twl4030", &igep_twldata); | 569 | omap3_pmic_init("twl4030", &igep_twldata); |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 5d4328f19c0f..218764c9377e 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -199,20 +199,12 @@ static void __init omap_ldp_init_early(void) | |||
199 | omap2_init_common_devices(NULL, NULL); | 199 | omap2_init_common_devices(NULL, NULL); |
200 | } | 200 | } |
201 | 201 | ||
202 | static struct twl4030_usb_data ldp_usb_data = { | ||
203 | .usb_mode = T2_USB_MODE_ULPI, | ||
204 | }; | ||
205 | |||
206 | static struct twl4030_gpio_platform_data ldp_gpio_data = { | 202 | static struct twl4030_gpio_platform_data ldp_gpio_data = { |
207 | .gpio_base = OMAP_MAX_GPIO_LINES, | 203 | .gpio_base = OMAP_MAX_GPIO_LINES, |
208 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 204 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
209 | .irq_end = TWL4030_GPIO_IRQ_END, | 205 | .irq_end = TWL4030_GPIO_IRQ_END, |
210 | }; | 206 | }; |
211 | 207 | ||
212 | static struct twl4030_madc_platform_data ldp_madc_data = { | ||
213 | .irq_line = 1, | ||
214 | }; | ||
215 | |||
216 | static struct regulator_consumer_supply ldp_vmmc1_supply[] = { | 208 | static struct regulator_consumer_supply ldp_vmmc1_supply[] = { |
217 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | 209 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
218 | }; | 210 | }; |
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = { | |||
253 | }; | 245 | }; |
254 | 246 | ||
255 | static struct twl4030_platform_data ldp_twldata = { | 247 | static struct twl4030_platform_data ldp_twldata = { |
256 | .irq_base = TWL4030_IRQ_BASE, | ||
257 | .irq_end = TWL4030_IRQ_END, | ||
258 | |||
259 | /* platform_data for children goes here */ | 248 | /* platform_data for children goes here */ |
260 | .madc = &ldp_madc_data, | ||
261 | .usb = &ldp_usb_data, | ||
262 | .vmmc1 = &ldp_vmmc1, | 249 | .vmmc1 = &ldp_vmmc1, |
263 | .vaux1 = &ldp_vaux1, | 250 | .vaux1 = &ldp_vaux1, |
264 | .gpio = &ldp_gpio_data, | 251 | .gpio = &ldp_gpio_data, |
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = { | |||
267 | 254 | ||
268 | static int __init omap_i2c_init(void) | 255 | static int __init omap_i2c_init(void) |
269 | { | 256 | { |
257 | omap3_pmic_get_config(&ldp_twldata, | ||
258 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0); | ||
270 | omap3_pmic_init("twl4030", &ldp_twldata); | 259 | omap3_pmic_init("twl4030", &ldp_twldata); |
271 | omap_register_i2c_bus(2, 400, NULL, 0); | 260 | omap_register_i2c_bus(2, 400, NULL, 0); |
272 | omap_register_i2c_bus(3, 400, NULL, 0); | 261 | omap_register_i2c_bus(3, 400, NULL, 0); |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 78cf5f221f83..32f5f895568a 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -236,15 +236,6 @@ static struct omap_dss_board_info beagle_dss_data = { | |||
236 | .default_device = &beagle_dvi_device, | 236 | .default_device = &beagle_dvi_device, |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static struct regulator_consumer_supply beagle_vdac_supply[] = { | ||
240 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
241 | }; | ||
242 | |||
243 | static struct regulator_consumer_supply beagle_vdvi_supplies[] = { | ||
244 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
245 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
246 | }; | ||
247 | |||
248 | static void __init beagle_display_init(void) | 239 | static void __init beagle_display_init(void) |
249 | { | 240 | { |
250 | int r; | 241 | int r; |
@@ -371,58 +362,11 @@ static struct regulator_init_data beagle_vsim = { | |||
371 | .consumer_supplies = beagle_vsim_supply, | 362 | .consumer_supplies = beagle_vsim_supply, |
372 | }; | 363 | }; |
373 | 364 | ||
374 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
375 | static struct regulator_init_data beagle_vdac = { | ||
376 | .constraints = { | ||
377 | .min_uV = 1800000, | ||
378 | .max_uV = 1800000, | ||
379 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
380 | | REGULATOR_MODE_STANDBY, | ||
381 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
382 | | REGULATOR_CHANGE_STATUS, | ||
383 | }, | ||
384 | .num_consumer_supplies = ARRAY_SIZE(beagle_vdac_supply), | ||
385 | .consumer_supplies = beagle_vdac_supply, | ||
386 | }; | ||
387 | |||
388 | /* VPLL2 for digital video outputs */ | ||
389 | static struct regulator_init_data beagle_vpll2 = { | ||
390 | .constraints = { | ||
391 | .name = "VDVI", | ||
392 | .min_uV = 1800000, | ||
393 | .max_uV = 1800000, | ||
394 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
395 | | REGULATOR_MODE_STANDBY, | ||
396 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
397 | | REGULATOR_CHANGE_STATUS, | ||
398 | }, | ||
399 | .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies), | ||
400 | .consumer_supplies = beagle_vdvi_supplies, | ||
401 | }; | ||
402 | |||
403 | static struct twl4030_usb_data beagle_usb_data = { | ||
404 | .usb_mode = T2_USB_MODE_ULPI, | ||
405 | }; | ||
406 | |||
407 | static struct twl4030_codec_audio_data beagle_audio_data; | ||
408 | |||
409 | static struct twl4030_codec_data beagle_codec_data = { | ||
410 | .audio_mclk = 26000000, | ||
411 | .audio = &beagle_audio_data, | ||
412 | }; | ||
413 | |||
414 | static struct twl4030_platform_data beagle_twldata = { | 365 | static struct twl4030_platform_data beagle_twldata = { |
415 | .irq_base = TWL4030_IRQ_BASE, | ||
416 | .irq_end = TWL4030_IRQ_END, | ||
417 | |||
418 | /* platform_data for children goes here */ | 366 | /* platform_data for children goes here */ |
419 | .usb = &beagle_usb_data, | ||
420 | .gpio = &beagle_gpio_data, | 367 | .gpio = &beagle_gpio_data, |
421 | .codec = &beagle_codec_data, | ||
422 | .vmmc1 = &beagle_vmmc1, | 368 | .vmmc1 = &beagle_vmmc1, |
423 | .vsim = &beagle_vsim, | 369 | .vsim = &beagle_vsim, |
424 | .vdac = &beagle_vdac, | ||
425 | .vpll2 = &beagle_vpll2, | ||
426 | }; | 370 | }; |
427 | 371 | ||
428 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | 372 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { |
@@ -433,6 +377,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | |||
433 | 377 | ||
434 | static int __init omap3_beagle_i2c_init(void) | 378 | static int __init omap3_beagle_i2c_init(void) |
435 | { | 379 | { |
380 | omap3_pmic_get_config(&beagle_twldata, | ||
381 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
382 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
383 | |||
384 | beagle_twldata.vpll2->constraints.name = "VDVI"; | ||
385 | |||
436 | omap3_pmic_init("twl4030", &beagle_twldata); | 386 | omap3_pmic_init("twl4030", &beagle_twldata); |
437 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 387 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
438 | * projector don't work reliably with 400kHz */ | 388 | * 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 57bce0f2e195..c452b3f3331a 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -396,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = { | |||
396 | .setup = omap3evm_twl_gpio_setup, | 396 | .setup = omap3evm_twl_gpio_setup, |
397 | }; | 397 | }; |
398 | 398 | ||
399 | static struct twl4030_usb_data omap3evm_usb_data = { | ||
400 | .usb_mode = T2_USB_MODE_ULPI, | ||
401 | }; | ||
402 | |||
403 | static uint32_t board_keymap[] = { | 399 | static uint32_t board_keymap[] = { |
404 | KEY(0, 0, KEY_LEFT), | 400 | KEY(0, 0, KEY_LEFT), |
405 | KEY(0, 1, KEY_DOWN), | 401 | KEY(0, 1, KEY_DOWN), |
@@ -434,56 +430,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = { | |||
434 | .rep = 1, | 430 | .rep = 1, |
435 | }; | 431 | }; |
436 | 432 | ||
437 | static struct twl4030_madc_platform_data omap3evm_madc_data = { | ||
438 | .irq_line = 1, | ||
439 | }; | ||
440 | |||
441 | static struct twl4030_codec_audio_data omap3evm_audio_data; | ||
442 | |||
443 | static struct twl4030_codec_data omap3evm_codec_data = { | ||
444 | .audio_mclk = 26000000, | ||
445 | .audio = &omap3evm_audio_data, | ||
446 | }; | ||
447 | |||
448 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = { | ||
449 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
450 | }; | ||
451 | |||
452 | /* VDAC for DSS driving S-Video */ | ||
453 | static struct regulator_init_data omap3_evm_vdac = { | ||
454 | .constraints = { | ||
455 | .min_uV = 1800000, | ||
456 | .max_uV = 1800000, | ||
457 | .apply_uV = true, | ||
458 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
459 | | REGULATOR_MODE_STANDBY, | ||
460 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
461 | | REGULATOR_CHANGE_STATUS, | ||
462 | }, | ||
463 | .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vdda_dac_supply), | ||
464 | .consumer_supplies = omap3_evm_vdda_dac_supply, | ||
465 | }; | ||
466 | |||
467 | /* VPLL2 for digital video outputs */ | ||
468 | static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = { | ||
469 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
470 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
471 | }; | ||
472 | |||
473 | static struct regulator_init_data omap3_evm_vpll2 = { | ||
474 | .constraints = { | ||
475 | .min_uV = 1800000, | ||
476 | .max_uV = 1800000, | ||
477 | .apply_uV = true, | ||
478 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
479 | | REGULATOR_MODE_STANDBY, | ||
480 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
481 | | REGULATOR_CHANGE_STATUS, | ||
482 | }, | ||
483 | .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies), | ||
484 | .consumer_supplies = omap3_evm_vpll2_supplies, | ||
485 | }; | ||
486 | |||
487 | /* ads7846 on SPI */ | 433 | /* ads7846 on SPI */ |
488 | static struct regulator_consumer_supply omap3evm_vio_supply[] = { | 434 | static struct regulator_consumer_supply omap3evm_vio_supply[] = { |
489 | REGULATOR_SUPPLY("vcc", "spi1.0"), | 435 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
@@ -547,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | |||
547 | #endif | 493 | #endif |
548 | 494 | ||
549 | static struct twl4030_platform_data omap3evm_twldata = { | 495 | static struct twl4030_platform_data omap3evm_twldata = { |
550 | .irq_base = TWL4030_IRQ_BASE, | ||
551 | .irq_end = TWL4030_IRQ_END, | ||
552 | |||
553 | /* platform_data for children goes here */ | 496 | /* platform_data for children goes here */ |
554 | .keypad = &omap3evm_kp_data, | 497 | .keypad = &omap3evm_kp_data, |
555 | .madc = &omap3evm_madc_data, | ||
556 | .usb = &omap3evm_usb_data, | ||
557 | .gpio = &omap3evm_gpio_data, | 498 | .gpio = &omap3evm_gpio_data, |
558 | .codec = &omap3evm_codec_data, | ||
559 | .vdac = &omap3_evm_vdac, | ||
560 | .vpll2 = &omap3_evm_vpll2, | ||
561 | .vio = &omap3evm_vio, | 499 | .vio = &omap3evm_vio, |
562 | .vmmc1 = &omap3evm_vmmc1, | 500 | .vmmc1 = &omap3evm_vmmc1, |
563 | .vsim = &omap3evm_vsim, | 501 | .vsim = &omap3evm_vsim, |
@@ -565,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
565 | 503 | ||
566 | static int __init omap3_evm_i2c_init(void) | 504 | static int __init omap3_evm_i2c_init(void) |
567 | { | 505 | { |
506 | omap3_pmic_get_config(&omap3evm_twldata, | ||
507 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
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 | |||
568 | omap3_pmic_init("twl4030", &omap3evm_twldata); | 514 | omap3_pmic_init("twl4030", &omap3evm_twldata); |
569 | omap_register_i2c_bus(2, 400, NULL, 0); | 515 | omap_register_i2c_bus(2, 400, NULL, 0); |
570 | 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 d4ea9408560e..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 | ||
335 | static struct regulator_consumer_supply pandora_vdda_dac_supply[] = { | ||
336 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
337 | }; | ||
338 | |||
339 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { | 335 | static 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 */ | ||
395 | static 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 */ | ||
410 | static 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 */ |
425 | static struct regulator_init_data pandora_vaux1 = { | 391 | static struct regulator_init_data pandora_vaux1 = { |
426 | .constraints = { | 392 | .constraints = { |
@@ -508,29 +474,12 @@ static struct platform_device pandora_vwlan_device = { | |||
508 | }, | 474 | }, |
509 | }; | 475 | }; |
510 | 476 | ||
511 | static struct twl4030_usb_data omap3pandora_usb_data = { | ||
512 | .usb_mode = T2_USB_MODE_ULPI, | ||
513 | }; | ||
514 | |||
515 | static struct twl4030_codec_audio_data omap3pandora_audio_data; | ||
516 | |||
517 | static struct twl4030_codec_data omap3pandora_codec_data = { | ||
518 | .audio_mclk = 26000000, | ||
519 | .audio = &omap3pandora_audio_data, | ||
520 | }; | ||
521 | |||
522 | static struct twl4030_bci_platform_data pandora_bci_data; | 477 | static struct twl4030_bci_platform_data pandora_bci_data; |
523 | 478 | ||
524 | static struct twl4030_platform_data omap3pandora_twldata = { | 479 | static struct twl4030_platform_data omap3pandora_twldata = { |
525 | .irq_base = TWL4030_IRQ_BASE, | ||
526 | .irq_end = TWL4030_IRQ_END, | ||
527 | .gpio = &omap3pandora_gpio_data, | 480 | .gpio = &omap3pandora_gpio_data, |
528 | .usb = &omap3pandora_usb_data, | ||
529 | .codec = &omap3pandora_codec_data, | ||
530 | .vmmc1 = &pandora_vmmc1, | 481 | .vmmc1 = &pandora_vmmc1, |
531 | .vmmc2 = &pandora_vmmc2, | 482 | .vmmc2 = &pandora_vmmc2, |
532 | .vdac = &pandora_vdac, | ||
533 | .vpll2 = &pandora_vpll2, | ||
534 | .vaux1 = &pandora_vaux1, | 483 | .vaux1 = &pandora_vaux1, |
535 | .vaux2 = &pandora_vaux2, | 484 | .vaux2 = &pandora_vaux2, |
536 | .vaux4 = &pandora_vaux4, | 485 | .vaux4 = &pandora_vaux4, |
@@ -548,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { | |||
548 | 497 | ||
549 | static int __init omap3pandora_i2c_init(void) | 498 | static int __init omap3pandora_i2c_init(void) |
550 | { | 499 | { |
500 | omap3_pmic_get_config(&omap3pandora_twldata, | ||
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 | |||
551 | omap3_pmic_init("tps65950", &omap3pandora_twldata); | 511 | omap3_pmic_init("tps65950", &omap3pandora_twldata); |
552 | /* i2c2 pins are not connected */ | 512 | /* i2c2 pins are not connected */ |
553 | 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 b8ad4dd5bbbf..8e104980ea26 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -349,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { | |||
349 | .setup = omap3stalker_twl_gpio_setup, | 349 | .setup = omap3stalker_twl_gpio_setup, |
350 | }; | 350 | }; |
351 | 351 | ||
352 | static struct twl4030_usb_data omap3stalker_usb_data = { | ||
353 | .usb_mode = T2_USB_MODE_ULPI, | ||
354 | }; | ||
355 | |||
356 | static uint32_t board_keymap[] = { | 352 | static uint32_t board_keymap[] = { |
357 | KEY(0, 0, KEY_LEFT), | 353 | KEY(0, 0, KEY_LEFT), |
358 | KEY(0, 1, KEY_DOWN), | 354 | KEY(0, 1, KEY_DOWN), |
@@ -387,69 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = { | |||
387 | .rep = 1, | 383 | .rep = 1, |
388 | }; | 384 | }; |
389 | 385 | ||
390 | static struct twl4030_madc_platform_data omap3stalker_madc_data = { | ||
391 | .irq_line = 1, | ||
392 | }; | ||
393 | |||
394 | static struct twl4030_codec_audio_data omap3stalker_audio_data; | ||
395 | |||
396 | static struct twl4030_codec_data omap3stalker_codec_data = { | ||
397 | .audio_mclk = 26000000, | ||
398 | .audio = &omap3stalker_audio_data, | ||
399 | }; | ||
400 | |||
401 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = { | ||
402 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
403 | }; | ||
404 | |||
405 | /* VDAC for DSS driving S-Video */ | ||
406 | static struct regulator_init_data omap3_stalker_vdac = { | ||
407 | .constraints = { | ||
408 | .min_uV = 1800000, | ||
409 | .max_uV = 1800000, | ||
410 | .apply_uV = true, | ||
411 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
412 | | REGULATOR_MODE_STANDBY, | ||
413 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
414 | | REGULATOR_CHANGE_STATUS, | ||
415 | }, | ||
416 | .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vdda_dac_supply), | ||
417 | .consumer_supplies = omap3_stalker_vdda_dac_supply, | ||
418 | }; | ||
419 | |||
420 | /* VPLL2 for digital video outputs */ | ||
421 | static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = { | ||
422 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
423 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
424 | }; | ||
425 | |||
426 | static struct regulator_init_data omap3_stalker_vpll2 = { | ||
427 | .constraints = { | ||
428 | .name = "VDVI", | ||
429 | .min_uV = 1800000, | ||
430 | .max_uV = 1800000, | ||
431 | .apply_uV = true, | ||
432 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
433 | | REGULATOR_MODE_STANDBY, | ||
434 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
435 | | REGULATOR_CHANGE_STATUS, | ||
436 | }, | ||
437 | .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies), | ||
438 | .consumer_supplies = omap3_stalker_vpll2_supplies, | ||
439 | }; | ||
440 | |||
441 | static struct twl4030_platform_data omap3stalker_twldata = { | 386 | static struct twl4030_platform_data omap3stalker_twldata = { |
442 | .irq_base = TWL4030_IRQ_BASE, | ||
443 | .irq_end = TWL4030_IRQ_END, | ||
444 | |||
445 | /* platform_data for children goes here */ | 387 | /* platform_data for children goes here */ |
446 | .keypad = &omap3stalker_kp_data, | 388 | .keypad = &omap3stalker_kp_data, |
447 | .madc = &omap3stalker_madc_data, | ||
448 | .usb = &omap3stalker_usb_data, | ||
449 | .gpio = &omap3stalker_gpio_data, | 389 | .gpio = &omap3stalker_gpio_data, |
450 | .codec = &omap3stalker_codec_data, | ||
451 | .vdac = &omap3_stalker_vdac, | ||
452 | .vpll2 = &omap3_stalker_vpll2, | ||
453 | .vmmc1 = &omap3stalker_vmmc1, | 390 | .vmmc1 = &omap3stalker_vmmc1, |
454 | .vsim = &omap3stalker_vsim, | 391 | .vsim = &omap3stalker_vsim, |
455 | }; | 392 | }; |
@@ -470,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = { | |||
470 | 407 | ||
471 | static int __init omap3_stalker_i2c_init(void) | 408 | static int __init omap3_stalker_i2c_init(void) |
472 | { | 409 | { |
410 | omap3_pmic_get_config(&omap3stalker_twldata, | ||
411 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
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 | |||
473 | omap3_pmic_init("twl4030", &omap3stalker_twldata); | 419 | omap3_pmic_init("twl4030", &omap3stalker_twldata); |
474 | omap_register_i2c_bus(2, 400, NULL, 0); | 420 | omap_register_i2c_bus(2, 400, NULL, 0); |
475 | 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 57e6ed34ebbc..852ea0464057 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -206,58 +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) */ | ||
210 | static 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 */ | ||
224 | static 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 | |||
238 | static struct twl4030_usb_data touchbook_usb_data = { | ||
239 | .usb_mode = T2_USB_MODE_ULPI, | ||
240 | }; | ||
241 | |||
242 | static struct twl4030_codec_audio_data touchbook_audio_data; | ||
243 | |||
244 | static struct twl4030_codec_data touchbook_codec_data = { | ||
245 | .audio_mclk = 26000000, | ||
246 | .audio = &touchbook_audio_data, | ||
247 | }; | ||
248 | |||
249 | static struct twl4030_platform_data touchbook_twldata = { | 209 | static struct twl4030_platform_data touchbook_twldata = { |
250 | .irq_base = TWL4030_IRQ_BASE, | ||
251 | .irq_end = TWL4030_IRQ_END, | ||
252 | |||
253 | /* platform_data for children goes here */ | 210 | /* platform_data for children goes here */ |
254 | .usb = &touchbook_usb_data, | ||
255 | .gpio = &touchbook_gpio_data, | 211 | .gpio = &touchbook_gpio_data, |
256 | .codec = &touchbook_codec_data, | ||
257 | .vmmc1 = &touchbook_vmmc1, | 212 | .vmmc1 = &touchbook_vmmc1, |
258 | .vsim = &touchbook_vsim, | 213 | .vsim = &touchbook_vsim, |
259 | .vdac = &touchbook_vdac, | ||
260 | .vpll2 = &touchbook_vpll2, | ||
261 | }; | 214 | }; |
262 | 215 | ||
263 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | 216 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { |
@@ -269,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | |||
269 | static int __init omap3_touchbook_i2c_init(void) | 222 | static int __init omap3_touchbook_i2c_init(void) |
270 | { | 223 | { |
271 | /* Standard TouchBook bus */ | 224 | /* Standard TouchBook bus */ |
272 | omap3_pmic_init("twl4030", &touchbook_twldata); | 225 | omap3_pmic_get_config(&touchbook_twldata, |
226 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
227 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
273 | 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 | |||
238 | omap3_pmic_init("twl4030", &touchbook_twldata); | ||
274 | /* Additional TouchBook bus */ | 239 | /* Additional TouchBook bus */ |
275 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, | 240 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, |
276 | ARRAY_SIZE(touchBook_i2c_boardinfo)); | 241 | ARRAY_SIZE(touchBook_i2c_boardinfo)); |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index ee2034e37468..9aaa96057666 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -154,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = { | |||
154 | .power = 100, | 154 | .power = 100, |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static struct twl4030_usb_data omap4_usbphy_data = { | ||
158 | .phy_init = omap4430_phy_init, | ||
159 | .phy_exit = omap4430_phy_exit, | ||
160 | .phy_power = omap4430_phy_power, | ||
161 | .phy_set_clock = omap4430_phy_set_clk, | ||
162 | .phy_suspend = omap4430_phy_suspend, | ||
163 | }; | ||
164 | |||
165 | static struct omap2_hsmmc_info mmc[] = { | 157 | static struct omap2_hsmmc_info mmc[] = { |
166 | { | 158 | { |
167 | .mmc = 1, | 159 | .mmc = 1, |
@@ -181,10 +173,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
181 | {} /* Terminator */ | 173 | {} /* Terminator */ |
182 | }; | 174 | }; |
183 | 175 | ||
184 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | ||
185 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
186 | }; | ||
187 | |||
188 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = { | 176 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = { |
189 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"), | 177 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"), |
190 | }; | 178 | }; |
@@ -269,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
269 | return 0; | 257 | return 0; |
270 | } | 258 | } |
271 | 259 | ||
272 | static struct regulator_init_data omap4_panda_vaux2 = { | 260 | /* Panda board uses the common PMIC configuration */ |
273 | .constraints = { | 261 | static struct twl4030_platform_data omap4_panda_twldata; |
274 | .min_uV = 1200000, | ||
275 | .max_uV = 2800000, | ||
276 | .apply_uV = true, | ||
277 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
278 | | REGULATOR_MODE_STANDBY, | ||
279 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
280 | | REGULATOR_CHANGE_MODE | ||
281 | | REGULATOR_CHANGE_STATUS, | ||
282 | }, | ||
283 | }; | ||
284 | |||
285 | static struct regulator_init_data omap4_panda_vaux3 = { | ||
286 | .constraints = { | ||
287 | .min_uV = 1000000, | ||
288 | .max_uV = 3000000, | ||
289 | .apply_uV = true, | ||
290 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
291 | | REGULATOR_MODE_STANDBY, | ||
292 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
293 | | REGULATOR_CHANGE_MODE | ||
294 | | REGULATOR_CHANGE_STATUS, | ||
295 | }, | ||
296 | }; | ||
297 | |||
298 | /* VMMC1 for MMC1 card */ | ||
299 | static struct regulator_init_data omap4_panda_vmmc = { | ||
300 | .constraints = { | ||
301 | .min_uV = 1200000, | ||
302 | .max_uV = 3000000, | ||
303 | .apply_uV = true, | ||
304 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
305 | | REGULATOR_MODE_STANDBY, | ||
306 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
307 | | REGULATOR_CHANGE_MODE | ||
308 | | REGULATOR_CHANGE_STATUS, | ||
309 | }, | ||
310 | .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc_supply), | ||
311 | .consumer_supplies = omap4_panda_vmmc_supply, | ||
312 | }; | ||
313 | |||
314 | static struct regulator_init_data omap4_panda_vpp = { | ||
315 | .constraints = { | ||
316 | .min_uV = 1800000, | ||
317 | .max_uV = 2500000, | ||
318 | .apply_uV = true, | ||
319 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
320 | | REGULATOR_MODE_STANDBY, | ||
321 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
322 | | REGULATOR_CHANGE_MODE | ||
323 | | REGULATOR_CHANGE_STATUS, | ||
324 | }, | ||
325 | }; | ||
326 | |||
327 | static struct regulator_init_data omap4_panda_vana = { | ||
328 | .constraints = { | ||
329 | .min_uV = 2100000, | ||
330 | .max_uV = 2100000, | ||
331 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
332 | | REGULATOR_MODE_STANDBY, | ||
333 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
334 | | REGULATOR_CHANGE_STATUS, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | static struct regulator_init_data omap4_panda_vcxio = { | ||
339 | .constraints = { | ||
340 | .min_uV = 1800000, | ||
341 | .max_uV = 1800000, | ||
342 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
343 | | REGULATOR_MODE_STANDBY, | ||
344 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
345 | | REGULATOR_CHANGE_STATUS, | ||
346 | }, | ||
347 | }; | ||
348 | |||
349 | static struct regulator_init_data omap4_panda_vdac = { | ||
350 | .constraints = { | ||
351 | .min_uV = 1800000, | ||
352 | .max_uV = 1800000, | ||
353 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
354 | | REGULATOR_MODE_STANDBY, | ||
355 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
356 | | REGULATOR_CHANGE_STATUS, | ||
357 | }, | ||
358 | }; | ||
359 | |||
360 | static struct regulator_init_data omap4_panda_vusb = { | ||
361 | .constraints = { | ||
362 | .min_uV = 3300000, | ||
363 | .max_uV = 3300000, | ||
364 | .apply_uV = true, | ||
365 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
366 | | REGULATOR_MODE_STANDBY, | ||
367 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
368 | | REGULATOR_CHANGE_STATUS, | ||
369 | }, | ||
370 | }; | ||
371 | |||
372 | static struct regulator_init_data omap4_panda_clk32kg = { | ||
373 | .constraints = { | ||
374 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
375 | }, | ||
376 | }; | ||
377 | |||
378 | static struct twl4030_platform_data omap4_panda_twldata = { | ||
379 | .irq_base = TWL6030_IRQ_BASE, | ||
380 | .irq_end = TWL6030_IRQ_END, | ||
381 | |||
382 | /* Regulators */ | ||
383 | .vmmc = &omap4_panda_vmmc, | ||
384 | .vpp = &omap4_panda_vpp, | ||
385 | .vana = &omap4_panda_vana, | ||
386 | .vcxio = &omap4_panda_vcxio, | ||
387 | .vdac = &omap4_panda_vdac, | ||
388 | .vusb = &omap4_panda_vusb, | ||
389 | .vaux2 = &omap4_panda_vaux2, | ||
390 | .vaux3 = &omap4_panda_vaux3, | ||
391 | .clk32kg = &omap4_panda_clk32kg, | ||
392 | .usb = &omap4_usbphy_data, | ||
393 | }; | ||
394 | 262 | ||
395 | /* | 263 | /* |
396 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM | 264 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM |
@@ -404,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = { | |||
404 | 272 | ||
405 | static int __init omap4_panda_i2c_init(void) | 273 | static int __init omap4_panda_i2c_init(void) |
406 | { | 274 | { |
275 | omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB, | ||
276 | TWL_COMMON_REGULATOR_VDAC | | ||
277 | TWL_COMMON_REGULATOR_VAUX2 | | ||
278 | TWL_COMMON_REGULATOR_VAUX3 | | ||
279 | TWL_COMMON_REGULATOR_VMMC | | ||
280 | TWL_COMMON_REGULATOR_VPP | | ||
281 | TWL_COMMON_REGULATOR_VANA | | ||
282 | TWL_COMMON_REGULATOR_VCXIO | | ||
283 | TWL_COMMON_REGULATOR_VUSB | | ||
284 | TWL_COMMON_REGULATOR_CLK32KG); | ||
407 | omap4_pmic_init("twl6030", &omap4_panda_twldata); | 285 | omap4_pmic_init("twl6030", &omap4_panda_twldata); |
408 | omap_register_i2c_bus(2, 400, NULL, 0); | 286 | omap_register_i2c_bus(2, 400, NULL, 0); |
409 | /* | 287 | /* |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 9883313bc076..f949a9954d76 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 | ||
268 | static struct regulator_consumer_supply overo_vdda_dac_supply[] = { | ||
269 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
270 | }; | ||
271 | |||
272 | static struct regulator_consumer_supply overo_vdds_dsi_supply[] = { | ||
273 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
274 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
275 | }; | ||
276 | |||
277 | static struct mtd_partition overo_nand_partitions[] = { | 268 | static struct mtd_partition overo_nand_partitions[] = { |
278 | { | 269 | { |
279 | .name = "xloader", | 270 | .name = "xloader", |
@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = { | |||
433 | .setup = overo_twl_gpio_setup, | 424 | .setup = overo_twl_gpio_setup, |
434 | }; | 425 | }; |
435 | 426 | ||
436 | static struct twl4030_usb_data overo_usb_data = { | ||
437 | .usb_mode = T2_USB_MODE_ULPI, | ||
438 | }; | ||
439 | |||
440 | static struct regulator_init_data overo_vmmc1 = { | 427 | static struct regulator_init_data overo_vmmc1 = { |
441 | .constraints = { | 428 | .constraints = { |
442 | .min_uV = 1850000, | 429 | .min_uV = 1850000, |
@@ -451,55 +438,19 @@ static struct regulator_init_data overo_vmmc1 = { | |||
451 | .consumer_supplies = overo_vmmc1_supply, | 438 | .consumer_supplies = overo_vmmc1_supply, |
452 | }; | 439 | }; |
453 | 440 | ||
454 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
455 | static struct regulator_init_data overo_vdac = { | ||
456 | .constraints = { | ||
457 | .min_uV = 1800000, | ||
458 | .max_uV = 1800000, | ||
459 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
460 | | REGULATOR_MODE_STANDBY, | ||
461 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
462 | | REGULATOR_CHANGE_STATUS, | ||
463 | }, | ||
464 | .num_consumer_supplies = ARRAY_SIZE(overo_vdda_dac_supply), | ||
465 | .consumer_supplies = overo_vdda_dac_supply, | ||
466 | }; | ||
467 | |||
468 | /* VPLL2 for digital video outputs */ | ||
469 | static struct regulator_init_data overo_vpll2 = { | ||
470 | .constraints = { | ||
471 | .name = "VDVI", | ||
472 | .min_uV = 1800000, | ||
473 | .max_uV = 1800000, | ||
474 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
475 | | REGULATOR_MODE_STANDBY, | ||
476 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
477 | | REGULATOR_CHANGE_STATUS, | ||
478 | }, | ||
479 | .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply), | ||
480 | .consumer_supplies = overo_vdds_dsi_supply, | ||
481 | }; | ||
482 | |||
483 | static struct twl4030_codec_audio_data overo_audio_data; | ||
484 | |||
485 | static struct twl4030_codec_data overo_codec_data = { | ||
486 | .audio_mclk = 26000000, | ||
487 | .audio = &overo_audio_data, | ||
488 | }; | ||
489 | |||
490 | static struct twl4030_platform_data overo_twldata = { | 441 | static struct twl4030_platform_data overo_twldata = { |
491 | .irq_base = TWL4030_IRQ_BASE, | ||
492 | .irq_end = TWL4030_IRQ_END, | ||
493 | .gpio = &overo_gpio_data, | 442 | .gpio = &overo_gpio_data, |
494 | .usb = &overo_usb_data, | ||
495 | .codec = &overo_codec_data, | ||
496 | .vmmc1 = &overo_vmmc1, | 443 | .vmmc1 = &overo_vmmc1, |
497 | .vdac = &overo_vdac, | ||
498 | .vpll2 = &overo_vpll2, | ||
499 | }; | 444 | }; |
500 | 445 | ||
501 | static int __init overo_i2c_init(void) | 446 | static int __init overo_i2c_init(void) |
502 | { | 447 | { |
448 | omap3_pmic_get_config(&overo_twldata, | ||
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 | |||
503 | omap3_pmic_init("tps65950", &overo_twldata); | 454 | omap3_pmic_init("tps65950", &overo_twldata); |
504 | /* i2c2 pins are used for gpio */ | 455 | /* i2c2 pins are used for gpio */ |
505 | 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-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 54dceb163415..7dfed24ee12e 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = { | |||
79 | .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), | 79 | .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static struct twl4030_usb_data rm680_usb_data = { | ||
83 | .usb_mode = T2_USB_MODE_ULPI, | ||
84 | }; | ||
85 | |||
86 | static struct twl4030_platform_data rm680_twl_data = { | 82 | static struct twl4030_platform_data rm680_twl_data = { |
87 | .irq_base = TWL4030_IRQ_BASE, | ||
88 | .irq_end = TWL4030_IRQ_END, | ||
89 | .gpio = &rm680_gpio_data, | 83 | .gpio = &rm680_gpio_data, |
90 | .usb = &rm680_usb_data, | ||
91 | /* add rest of the children here */ | 84 | /* add rest of the children here */ |
92 | }; | 85 | }; |
93 | 86 | ||
94 | static void __init rm680_i2c_init(void) | 87 | static void __init rm680_i2c_init(void) |
95 | { | 88 | { |
89 | omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0); | ||
96 | omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); | 90 | omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); |
97 | omap_register_i2c_bus(2, 400, NULL, 0); | 91 | omap_register_i2c_bus(2, 400, NULL, 0); |
98 | omap_register_i2c_bus(3, 400, NULL, 0); | 92 | 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 7d3775425170..8946d7232f3c 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -348,10 +348,6 @@ static struct twl4030_keypad_data rx51_kp_data = { | |||
348 | .rep = 1, | 348 | .rep = 1, |
349 | }; | 349 | }; |
350 | 350 | ||
351 | static struct twl4030_madc_platform_data rx51_madc_data = { | ||
352 | .irq_line = 1, | ||
353 | }; | ||
354 | |||
355 | /* Enable input logic and pull all lines up when eMMC is on. */ | 351 | /* Enable input logic and pull all lines up when eMMC is on. */ |
356 | static struct omap_board_mux rx51_mmc2_on_mux[] = { | 352 | static struct omap_board_mux rx51_mmc2_on_mux[] = { |
357 | OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), | 353 | OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
@@ -458,10 +454,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = { | |||
458 | REGULATOR_SUPPLY("vdd", "2-0063"), | 454 | REGULATOR_SUPPLY("vdd", "2-0063"), |
459 | }; | 455 | }; |
460 | 456 | ||
461 | static struct regulator_consumer_supply rx51_vdac_supply[] = { | ||
462 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
463 | }; | ||
464 | |||
465 | static struct regulator_init_data rx51_vaux1 = { | 457 | static struct regulator_init_data rx51_vaux1 = { |
466 | .constraints = { | 458 | .constraints = { |
467 | .name = "V28", | 459 | .name = "V28", |
@@ -604,21 +596,6 @@ static struct regulator_init_data rx51_vsim = { | |||
604 | .consumer_supplies = rx51_vsim_supply, | 596 | .consumer_supplies = rx51_vsim_supply, |
605 | }; | 597 | }; |
606 | 598 | ||
607 | static struct regulator_init_data rx51_vdac = { | ||
608 | .constraints = { | ||
609 | .name = "VDAC", | ||
610 | .min_uV = 1800000, | ||
611 | .max_uV = 1800000, | ||
612 | .apply_uV = true, | ||
613 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
614 | | REGULATOR_MODE_STANDBY, | ||
615 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
616 | | REGULATOR_CHANGE_STATUS, | ||
617 | }, | ||
618 | .num_consumer_supplies = ARRAY_SIZE(rx51_vdac_supply), | ||
619 | .consumer_supplies = rx51_vdac_supply, | ||
620 | }; | ||
621 | |||
622 | static struct regulator_init_data rx51_vio = { | 599 | static struct regulator_init_data rx51_vio = { |
623 | .constraints = { | 600 | .constraints = { |
624 | .min_uV = 1800000, | 601 | .min_uV = 1800000, |
@@ -726,10 +703,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = { | |||
726 | .setup = rx51_twlgpio_setup, | 703 | .setup = rx51_twlgpio_setup, |
727 | }; | 704 | }; |
728 | 705 | ||
729 | static struct twl4030_usb_data rx51_usb_data = { | ||
730 | .usb_mode = T2_USB_MODE_ULPI, | ||
731 | }; | ||
732 | |||
733 | static struct twl4030_ins sleep_on_seq[] __initdata = { | 706 | static struct twl4030_ins sleep_on_seq[] __initdata = { |
734 | /* | 707 | /* |
735 | * Turn off everything | 708 | * Turn off everything |
@@ -901,14 +874,9 @@ struct twl4030_codec_data rx51_codec_data __initdata = { | |||
901 | }; | 874 | }; |
902 | 875 | ||
903 | static struct twl4030_platform_data rx51_twldata __initdata = { | 876 | static struct twl4030_platform_data rx51_twldata __initdata = { |
904 | .irq_base = TWL4030_IRQ_BASE, | ||
905 | .irq_end = TWL4030_IRQ_END, | ||
906 | |||
907 | /* platform_data for children goes here */ | 877 | /* platform_data for children goes here */ |
908 | .gpio = &rx51_gpio_data, | 878 | .gpio = &rx51_gpio_data, |
909 | .keypad = &rx51_kp_data, | 879 | .keypad = &rx51_kp_data, |
910 | .madc = &rx51_madc_data, | ||
911 | .usb = &rx51_usb_data, | ||
912 | .power = &rx51_t2scripts_data, | 880 | .power = &rx51_t2scripts_data, |
913 | .codec = &rx51_codec_data, | 881 | .codec = &rx51_codec_data, |
914 | 882 | ||
@@ -919,7 +887,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = { | |||
919 | .vpll1 = &rx51_vpll1, | 887 | .vpll1 = &rx51_vpll1, |
920 | .vpll2 = &rx51_vpll2, | 888 | .vpll2 = &rx51_vpll2, |
921 | .vsim = &rx51_vsim, | 889 | .vsim = &rx51_vsim, |
922 | .vdac = &rx51_vdac, | ||
923 | .vintana1 = &rx51_vintana1, | 890 | .vintana1 = &rx51_vintana1, |
924 | .vintana2 = &rx51_vintana2, | 891 | .vintana2 = &rx51_vintana2, |
925 | .vintdig = &rx51_vintdig, | 892 | .vintdig = &rx51_vintdig, |
@@ -984,6 +951,13 @@ static int __init rx51_i2c_init(void) | |||
984 | rx51_twldata.vaux3 = &rx51_vaux3_cam; | 951 | rx51_twldata.vaux3 = &rx51_vaux3_cam; |
985 | } | 952 | } |
986 | rx51_twldata.vmmc2 = &rx51_vmmc2; | 953 | rx51_twldata.vmmc2 = &rx51_vmmc2; |
954 | omap3_pmic_get_config(&rx51_twldata, | ||
955 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, | ||
956 | TWL_COMMON_REGULATOR_VDAC); | ||
957 | |||
958 | rx51_twldata.vdac->constraints.apply_uV = true; | ||
959 | rx51_twldata.vdac->constraints.name = "VDAC"; | ||
960 | |||
987 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); | 961 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); |
988 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, | 962 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, |
989 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); | 963 | 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 8495f82fcbab..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 | ||
229 | static struct regulator_consumer_supply zoom_vpll2_supplies[] = { | ||
230 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
231 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
232 | }; | ||
233 | |||
234 | static struct regulator_consumer_supply zoom_vdda_dac_supply[] = { | ||
235 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
236 | }; | ||
237 | |||
238 | static 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 | |||
251 | static 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 | |||
264 | static int zoom_twl_gpio_setup(struct device *dev, | 229 | static int zoom_twl_gpio_setup(struct device *dev, |
265 | unsigned gpio, unsigned ngpio) | 230 | unsigned gpio, unsigned ngpio) |
266 | { | 231 | { |
@@ -285,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute) | |||
285 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | 250 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); |
286 | } | 251 | } |
287 | 252 | ||
288 | static int zoom_batt_table[] = { | ||
289 | /* 0 C*/ | ||
290 | 30800, 29500, 28300, 27100, | ||
291 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
292 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
293 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
294 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
295 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
296 | 4040, 3910, 3790, 3670, 3550 | ||
297 | }; | ||
298 | |||
299 | static struct twl4030_bci_platform_data zoom_bci_data = { | ||
300 | .battery_tmp_tbl = zoom_batt_table, | ||
301 | .tblsize = ARRAY_SIZE(zoom_batt_table), | ||
302 | }; | ||
303 | |||
304 | static struct twl4030_usb_data zoom_usb_data = { | ||
305 | .usb_mode = T2_USB_MODE_ULPI, | ||
306 | }; | ||
307 | |||
308 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | 253 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
309 | .gpio_base = OMAP_MAX_GPIO_LINES, | 254 | .gpio_base = OMAP_MAX_GPIO_LINES, |
310 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 255 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -312,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = { | |||
312 | .setup = zoom_twl_gpio_setup, | 257 | .setup = zoom_twl_gpio_setup, |
313 | }; | 258 | }; |
314 | 259 | ||
315 | static struct twl4030_madc_platform_data zoom_madc_data = { | ||
316 | .irq_line = 1, | ||
317 | }; | ||
318 | |||
319 | static struct twl4030_codec_audio_data zoom_audio_data; | ||
320 | |||
321 | static struct twl4030_codec_data zoom_codec_data = { | ||
322 | .audio_mclk = 26000000, | ||
323 | .audio = &zoom_audio_data, | ||
324 | }; | ||
325 | |||
326 | static struct twl4030_platform_data zoom_twldata = { | 260 | static struct twl4030_platform_data zoom_twldata = { |
327 | .irq_base = TWL4030_IRQ_BASE, | ||
328 | .irq_end = TWL4030_IRQ_END, | ||
329 | |||
330 | /* platform_data for children goes here */ | 261 | /* platform_data for children goes here */ |
331 | .bci = &zoom_bci_data, | ||
332 | .madc = &zoom_madc_data, | ||
333 | .usb = &zoom_usb_data, | ||
334 | .gpio = &zoom_gpio_data, | 262 | .gpio = &zoom_gpio_data, |
335 | .keypad = &zoom_kp_twl4030_data, | 263 | .keypad = &zoom_kp_twl4030_data, |
336 | .codec = &zoom_codec_data, | ||
337 | .vmmc1 = &zoom_vmmc1, | 264 | .vmmc1 = &zoom_vmmc1, |
338 | .vmmc2 = &zoom_vmmc2, | 265 | .vmmc2 = &zoom_vmmc2, |
339 | .vsim = &zoom_vsim, | 266 | .vsim = &zoom_vsim, |
340 | .vpll2 = &zoom_vpll2, | ||
341 | .vdac = &zoom_vdac, | ||
342 | }; | 267 | }; |
343 | 268 | ||
344 | static int __init omap_i2c_init(void) | 269 | static int __init omap_i2c_init(void) |
345 | { | 270 | { |
271 | omap3_pmic_get_config(&zoom_twldata, | ||
272 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
273 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, | ||
274 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
275 | |||
346 | if (machine_is_omap_zoom2()) { | 276 | if (machine_is_omap_zoom2()) { |
347 | zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ | 277 | struct twl4030_codec_audio_data *audio_data; |
348 | zoom_audio_data.hs_extmute = 1; | 278 | audio_data = zoom_twldata.codec->audio; |
349 | zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; | 279 | |
280 | audio_data->ramp_delay_value = 3; /* 161 ms */ | ||
281 | audio_data->hs_extmute = 1; | ||
282 | audio_data->set_hs_extmute = zoom2_set_hs_extmute; | ||
350 | } | 283 | } |
351 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); | 284 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); |
352 | omap_register_i2c_bus(2, 400, NULL, 0); | 285 | omap_register_i2c_bus(2, 400, NULL, 0); |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index 0043fa8e3703..bcb0c5817167 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -20,36 +20,15 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c/twl.h> | ||
25 | |||
26 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
27 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/ads7846.h> | 25 | #include <linux/spi/ads7846.h> |
29 | 26 | ||
30 | #include <plat/i2c.h> | ||
31 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
32 | #include <plat/nand.h> | 28 | #include <plat/nand.h> |
33 | 29 | ||
34 | #include "common-board-devices.h" | 30 | #include "common-board-devices.h" |
35 | 31 | ||
36 | static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||
37 | .addr = 0x48, | ||
38 | .flags = I2C_CLIENT_WAKE, | ||
39 | }; | ||
40 | |||
41 | void __init omap_pmic_init(int bus, u32 clkrate, | ||
42 | const char *pmic_type, int pmic_irq, | ||
43 | struct twl4030_platform_data *pmic_data) | ||
44 | { | ||
45 | strncpy(pmic_i2c_board_info.type, pmic_type, | ||
46 | sizeof(pmic_i2c_board_info.type)); | ||
47 | pmic_i2c_board_info.irq = pmic_irq; | ||
48 | pmic_i2c_board_info.platform_data = pmic_data; | ||
49 | |||
50 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | ||
51 | } | ||
52 | |||
53 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ | 32 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ |
54 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 33 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
55 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { | 34 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { |
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index 679719051df5..a0b4a42836ab 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -1,33 +1,11 @@ | |||
1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ | 1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ |
2 | #define __OMAP_COMMON_BOARD_DEVICES__ | 2 | #define __OMAP_COMMON_BOARD_DEVICES__ |
3 | 3 | ||
4 | #include "twl-common.h" | ||
5 | |||
4 | #define NAND_BLOCK_SIZE SZ_128K | 6 | #define NAND_BLOCK_SIZE SZ_128K |
5 | 7 | ||
6 | struct twl4030_platform_data; | ||
7 | struct mtd_partition; | 8 | struct mtd_partition; |
8 | |||
9 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | ||
10 | struct twl4030_platform_data *pmic_data); | ||
11 | |||
12 | static inline void omap2_pmic_init(const char *pmic_type, | ||
13 | struct twl4030_platform_data *pmic_data) | ||
14 | { | ||
15 | omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); | ||
16 | } | ||
17 | |||
18 | static inline void omap3_pmic_init(const char *pmic_type, | ||
19 | struct twl4030_platform_data *pmic_data) | ||
20 | { | ||
21 | omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); | ||
22 | } | ||
23 | |||
24 | static inline void omap4_pmic_init(const char *pmic_type, | ||
25 | struct twl4030_platform_data *pmic_data) | ||
26 | { | ||
27 | /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ | ||
28 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | ||
29 | } | ||
30 | |||
31 | struct ads7846_platform_data; | 9 | struct ads7846_platform_data; |
32 | 10 | ||
33 | void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | 11 | void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c new file mode 100644 index 000000000000..3aaa46f6cd12 --- /dev/null +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -0,0 +1,304 @@ | |||
1 | /* | ||
2 | * twl-common.c | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc.. | ||
5 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * version 2 as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
19 | * 02110-1301 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c/twl.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/regulator/machine.h> | ||
27 | #include <linux/regulator/fixed.h> | ||
28 | |||
29 | #include <plat/i2c.h> | ||
30 | #include <plat/usb.h> | ||
31 | |||
32 | #include "twl-common.h" | ||
33 | |||
34 | static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||
35 | .addr = 0x48, | ||
36 | .flags = I2C_CLIENT_WAKE, | ||
37 | }; | ||
38 | |||
39 | void __init omap_pmic_init(int bus, u32 clkrate, | ||
40 | const char *pmic_type, int pmic_irq, | ||
41 | struct twl4030_platform_data *pmic_data) | ||
42 | { | ||
43 | strncpy(pmic_i2c_board_info.type, pmic_type, | ||
44 | sizeof(pmic_i2c_board_info.type)); | ||
45 | pmic_i2c_board_info.irq = pmic_irq; | ||
46 | pmic_i2c_board_info.platform_data = pmic_data; | ||
47 | |||
48 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | ||
49 | } | ||
50 | |||
51 | static struct twl4030_usb_data omap4_usb_pdata = { | ||
52 | .phy_init = omap4430_phy_init, | ||
53 | .phy_exit = omap4430_phy_exit, | ||
54 | .phy_power = omap4430_phy_power, | ||
55 | .phy_set_clock = omap4430_phy_set_clk, | ||
56 | .phy_suspend = omap4430_phy_suspend, | ||
57 | }; | ||
58 | |||
59 | static struct twl4030_usb_data omap3_usb_pdata = { | ||
60 | .usb_mode = T2_USB_MODE_ULPI, | ||
61 | }; | ||
62 | |||
63 | static int omap3_batt_table[] = { | ||
64 | /* 0 C */ | ||
65 | 30800, 29500, 28300, 27100, | ||
66 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
67 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
68 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
69 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
70 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
71 | 4040, 3910, 3790, 3670, 3550 | ||
72 | }; | ||
73 | |||
74 | static struct twl4030_bci_platform_data omap3_bci_pdata = { | ||
75 | .battery_tmp_tbl = omap3_batt_table, | ||
76 | .tblsize = ARRAY_SIZE(omap3_batt_table), | ||
77 | }; | ||
78 | |||
79 | static struct twl4030_madc_platform_data omap3_madc_pdata = { | ||
80 | .irq_line = 1, | ||
81 | }; | ||
82 | |||
83 | static struct twl4030_codec_audio_data omap3_audio; | ||
84 | |||
85 | static struct twl4030_codec_data omap3_codec_pdata = { | ||
86 | .audio_mclk = 26000000, | ||
87 | .audio = &omap3_audio, | ||
88 | }; | ||
89 | |||
90 | static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { | ||
91 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
92 | }; | ||
93 | |||
94 | static 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 | |||
107 | static struct regulator_consumer_supply omap3_vpll2_supplies[] = { | ||
108 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
109 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
110 | }; | ||
111 | |||
112 | static 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 | |||
125 | static struct regulator_init_data omap4_vdac_idata = { | ||
126 | .constraints = { | ||
127 | .min_uV = 1800000, | ||
128 | .max_uV = 1800000, | ||
129 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
130 | | REGULATOR_MODE_STANDBY, | ||
131 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
132 | | REGULATOR_CHANGE_STATUS, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static struct regulator_init_data omap4_vaux2_idata = { | ||
137 | .constraints = { | ||
138 | .min_uV = 1200000, | ||
139 | .max_uV = 2800000, | ||
140 | .apply_uV = true, | ||
141 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
142 | | REGULATOR_MODE_STANDBY, | ||
143 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
144 | | REGULATOR_CHANGE_MODE | ||
145 | | REGULATOR_CHANGE_STATUS, | ||
146 | }, | ||
147 | }; | ||
148 | |||
149 | static struct regulator_init_data omap4_vaux3_idata = { | ||
150 | .constraints = { | ||
151 | .min_uV = 1000000, | ||
152 | .max_uV = 3000000, | ||
153 | .apply_uV = true, | ||
154 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
155 | | REGULATOR_MODE_STANDBY, | ||
156 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
157 | | REGULATOR_CHANGE_MODE | ||
158 | | REGULATOR_CHANGE_STATUS, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct regulator_consumer_supply omap4_vmmc_supply[] = { | ||
163 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
164 | }; | ||
165 | |||
166 | /* VMMC1 for MMC1 card */ | ||
167 | static struct regulator_init_data omap4_vmmc_idata = { | ||
168 | .constraints = { | ||
169 | .min_uV = 1200000, | ||
170 | .max_uV = 3000000, | ||
171 | .apply_uV = true, | ||
172 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
173 | | REGULATOR_MODE_STANDBY, | ||
174 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
175 | | REGULATOR_CHANGE_MODE | ||
176 | | REGULATOR_CHANGE_STATUS, | ||
177 | }, | ||
178 | .num_consumer_supplies = ARRAY_SIZE(omap4_vmmc_supply), | ||
179 | .consumer_supplies = omap4_vmmc_supply, | ||
180 | }; | ||
181 | |||
182 | static struct regulator_init_data omap4_vpp_idata = { | ||
183 | .constraints = { | ||
184 | .min_uV = 1800000, | ||
185 | .max_uV = 2500000, | ||
186 | .apply_uV = true, | ||
187 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
188 | | REGULATOR_MODE_STANDBY, | ||
189 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
190 | | REGULATOR_CHANGE_MODE | ||
191 | | REGULATOR_CHANGE_STATUS, | ||
192 | }, | ||
193 | }; | ||
194 | |||
195 | static struct regulator_init_data omap4_vana_idata = { | ||
196 | .constraints = { | ||
197 | .min_uV = 2100000, | ||
198 | .max_uV = 2100000, | ||
199 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
200 | | REGULATOR_MODE_STANDBY, | ||
201 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
202 | | REGULATOR_CHANGE_STATUS, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct regulator_init_data omap4_vcxio_idata = { | ||
207 | .constraints = { | ||
208 | .min_uV = 1800000, | ||
209 | .max_uV = 1800000, | ||
210 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
211 | | REGULATOR_MODE_STANDBY, | ||
212 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
213 | | REGULATOR_CHANGE_STATUS, | ||
214 | }, | ||
215 | }; | ||
216 | |||
217 | static struct regulator_init_data omap4_vusb_idata = { | ||
218 | .constraints = { | ||
219 | .min_uV = 3300000, | ||
220 | .max_uV = 3300000, | ||
221 | .apply_uV = true, | ||
222 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
223 | | REGULATOR_MODE_STANDBY, | ||
224 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
225 | | REGULATOR_CHANGE_STATUS, | ||
226 | }, | ||
227 | }; | ||
228 | |||
229 | static struct regulator_init_data omap4_clk32kg_idata = { | ||
230 | .constraints = { | ||
231 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
236 | u32 pdata_flags, u32 regulators_flags) | ||
237 | { | ||
238 | if (!pmic_data->irq_base) | ||
239 | pmic_data->irq_base = TWL6030_IRQ_BASE; | ||
240 | if (!pmic_data->irq_end) | ||
241 | pmic_data->irq_end = TWL6030_IRQ_END; | ||
242 | |||
243 | /* Common platform data configurations */ | ||
244 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
245 | pmic_data->usb = &omap4_usb_pdata; | ||
246 | |||
247 | /* Common regulator configurations */ | ||
248 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
249 | pmic_data->vdac = &omap4_vdac_idata; | ||
250 | |||
251 | if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2) | ||
252 | pmic_data->vaux2 = &omap4_vaux2_idata; | ||
253 | |||
254 | if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3) | ||
255 | pmic_data->vaux3 = &omap4_vaux3_idata; | ||
256 | |||
257 | if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc) | ||
258 | pmic_data->vmmc = &omap4_vmmc_idata; | ||
259 | |||
260 | if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp) | ||
261 | pmic_data->vpp = &omap4_vpp_idata; | ||
262 | |||
263 | if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana) | ||
264 | pmic_data->vana = &omap4_vana_idata; | ||
265 | |||
266 | if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio) | ||
267 | pmic_data->vcxio = &omap4_vcxio_idata; | ||
268 | |||
269 | if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb) | ||
270 | pmic_data->vusb = &omap4_vusb_idata; | ||
271 | |||
272 | if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && | ||
273 | !pmic_data->clk32kg) | ||
274 | pmic_data->clk32kg = &omap4_clk32kg_idata; | ||
275 | } | ||
276 | |||
277 | void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
278 | u32 pdata_flags, u32 regulators_flags) | ||
279 | { | ||
280 | if (!pmic_data->irq_base) | ||
281 | pmic_data->irq_base = TWL4030_IRQ_BASE; | ||
282 | if (!pmic_data->irq_end) | ||
283 | pmic_data->irq_end = TWL4030_IRQ_END; | ||
284 | |||
285 | /* Common platform data configurations */ | ||
286 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
287 | pmic_data->usb = &omap3_usb_pdata; | ||
288 | |||
289 | if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci) | ||
290 | pmic_data->bci = &omap3_bci_pdata; | ||
291 | |||
292 | if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) | ||
293 | pmic_data->madc = &omap3_madc_pdata; | ||
294 | |||
295 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) | ||
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; | ||
304 | } | ||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h new file mode 100644 index 000000000000..5e83a5bd37fb --- /dev/null +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef __OMAP_PMIC_COMMON__ | ||
2 | #define __OMAP_PMIC_COMMON__ | ||
3 | |||
4 | #define TWL_COMMON_PDATA_USB (1 << 0) | ||
5 | #define TWL_COMMON_PDATA_BCI (1 << 1) | ||
6 | #define TWL_COMMON_PDATA_MADC (1 << 2) | ||
7 | #define TWL_COMMON_PDATA_AUDIO (1 << 3) | ||
8 | |||
9 | /* Common LDO regulators for TWL4030/TWL6030 */ | ||
10 | #define TWL_COMMON_REGULATOR_VDAC (1 << 0) | ||
11 | #define TWL_COMMON_REGULATOR_VAUX1 (1 << 1) | ||
12 | #define TWL_COMMON_REGULATOR_VAUX2 (1 << 2) | ||
13 | #define TWL_COMMON_REGULATOR_VAUX3 (1 << 3) | ||
14 | |||
15 | /* TWL6030 LDO regulators */ | ||
16 | #define TWL_COMMON_REGULATOR_VMMC (1 << 4) | ||
17 | #define TWL_COMMON_REGULATOR_VPP (1 << 5) | ||
18 | #define TWL_COMMON_REGULATOR_VUSIM (1 << 6) | ||
19 | #define TWL_COMMON_REGULATOR_VANA (1 << 7) | ||
20 | #define TWL_COMMON_REGULATOR_VCXIO (1 << 8) | ||
21 | #define TWL_COMMON_REGULATOR_VUSB (1 << 9) | ||
22 | #define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) | ||
23 | |||
24 | /* TWL4030 LDO regulators */ | ||
25 | #define TWL_COMMON_REGULATOR_VPLL1 (1 << 4) | ||
26 | #define TWL_COMMON_REGULATOR_VPLL2 (1 << 5) | ||
27 | |||
28 | |||
29 | struct twl4030_platform_data; | ||
30 | |||
31 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | ||
32 | struct twl4030_platform_data *pmic_data); | ||
33 | |||
34 | static inline void omap2_pmic_init(const char *pmic_type, | ||
35 | struct twl4030_platform_data *pmic_data) | ||
36 | { | ||
37 | omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); | ||
38 | } | ||
39 | |||
40 | static inline void omap3_pmic_init(const char *pmic_type, | ||
41 | struct twl4030_platform_data *pmic_data) | ||
42 | { | ||
43 | omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); | ||
44 | } | ||
45 | |||
46 | static inline void omap4_pmic_init(const char *pmic_type, | ||
47 | struct twl4030_platform_data *pmic_data) | ||
48 | { | ||
49 | /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ | ||
50 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | ||
51 | } | ||
52 | |||
53 | void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
54 | u32 pdata_flags, u32 regulators_flags); | ||
55 | |||
56 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
57 | u32 pdata_flags, u32 regulators_flags); | ||
58 | |||
59 | #endif /* __OMAP_PMIC_COMMON__ */ | ||