aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-overo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-overo.c')
-rw-r--r--arch/arm/mach-omap2/board-overo.c83
1 files changed, 17 insertions, 66 deletions
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 175e1ab2b04d..f1f18d03d24c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -74,15 +74,16 @@
74 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 74 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
75 75
76/* fixed regulator for ads7846 */ 76/* fixed regulator for ads7846 */
77static struct regulator_consumer_supply ads7846_supply = 77static struct regulator_consumer_supply ads7846_supply[] = {
78 REGULATOR_SUPPLY("vcc", "spi1.0"); 78 REGULATOR_SUPPLY("vcc", "spi1.0"),
79};
79 80
80static struct regulator_init_data vads7846_regulator = { 81static struct regulator_init_data vads7846_regulator = {
81 .constraints = { 82 .constraints = {
82 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 83 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
83 }, 84 },
84 .num_consumer_supplies = 1, 85 .num_consumer_supplies = ARRAY_SIZE(ads7846_supply),
85 .consumer_supplies = &ads7846_supply, 86 .consumer_supplies = ads7846_supply,
86}; 87};
87 88
88static struct fixed_voltage_config vads7846 = { 89static struct fixed_voltage_config vads7846 = {
@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
264 .default_device = &overo_dvi_device, 265 .default_device = &overo_dvi_device,
265}; 266};
266 267
267static struct regulator_consumer_supply overo_vdda_dac_supply =
268 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
269
270static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
271 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
272 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
273};
274
275static struct mtd_partition overo_nand_partitions[] = { 268static struct mtd_partition overo_nand_partitions[] = {
276 { 269 {
277 .name = "xloader", 270 .name = "xloader",
@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = {
319 {} /* Terminator */ 312 {} /* Terminator */
320}; 313};
321 314
322static struct regulator_consumer_supply overo_vmmc1_supply = { 315static struct regulator_consumer_supply overo_vmmc1_supply[] = {
323 .supply = "vmmc", 316 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
324}; 317};
325 318
326#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 319#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev,
415{ 408{
416 omap2_hsmmc_init(mmc); 409 omap2_hsmmc_init(mmc);
417 410
418 overo_vmmc1_supply.dev = mmc[0].dev;
419
420#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 411#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
421 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ 412 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
422 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 413 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -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
436static struct twl4030_usb_data overo_usb_data = {
437 .usb_mode = T2_USB_MODE_ULPI,
438};
439
440static struct regulator_init_data overo_vmmc1 = { 427static struct regulator_init_data overo_vmmc1 = {
441 .constraints = { 428 .constraints = {
442 .min_uV = 1850000, 429 .min_uV = 1850000,
@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = {
447 | REGULATOR_CHANGE_MODE 434 | REGULATOR_CHANGE_MODE
448 | REGULATOR_CHANGE_STATUS, 435 | REGULATOR_CHANGE_STATUS,
449 }, 436 },
450 .num_consumer_supplies = 1, 437 .num_consumer_supplies = ARRAY_SIZE(overo_vmmc1_supply),
451 .consumer_supplies = &overo_vmmc1_supply, 438 .consumer_supplies = overo_vmmc1_supply,
452};
453
454/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
455static 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 = 1,
465 .consumer_supplies = &overo_vdda_dac_supply,
466};
467
468/* VPLL2 for digital video outputs */
469static 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
483static struct twl4030_codec_audio_data overo_audio_data;
484
485static struct twl4030_codec_data overo_codec_data = {
486 .audio_mclk = 26000000,
487 .audio = &overo_audio_data,
488}; 439};
489 440
490static struct twl4030_platform_data overo_twldata = { 441static 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
501static int __init overo_i2c_init(void) 446static 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);
@@ -615,7 +566,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
615 .reserve = omap_reserve, 566 .reserve = omap_reserve,
616 .map_io = omap3_map_io, 567 .map_io = omap3_map_io,
617 .init_early = overo_init_early, 568 .init_early = overo_init_early,
618 .init_irq = omap_init_irq, 569 .init_irq = omap3_init_irq,
619 .init_machine = overo_init, 570 .init_machine = overo_init,
620 .timer = &omap_timer, 571 .timer = &omap3_timer,
621MACHINE_END 572MACHINE_END