diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 111 |
1 files changed, 28 insertions, 83 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index b4d43464a303..c452b3f3331a 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = { | |||
273 | .default_device = &omap3_evm_lcd_device, | 273 | .default_device = &omap3_evm_lcd_device, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { | 276 | static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = { |
277 | .supply = "vmmc", | 277 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
278 | }; | 278 | }; |
279 | 279 | ||
280 | static struct regulator_consumer_supply omap3evm_vsim_supply = { | 280 | static struct regulator_consumer_supply omap3evm_vsim_supply[] = { |
281 | .supply = "vmmc_aux", | 281 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
282 | }; | 282 | }; |
283 | 283 | ||
284 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 284 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -292,8 +292,8 @@ static struct regulator_init_data omap3evm_vmmc1 = { | |||
292 | | REGULATOR_CHANGE_MODE | 292 | | REGULATOR_CHANGE_MODE |
293 | | REGULATOR_CHANGE_STATUS, | 293 | | REGULATOR_CHANGE_STATUS, |
294 | }, | 294 | }, |
295 | .num_consumer_supplies = 1, | 295 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc1_supply), |
296 | .consumer_supplies = &omap3evm_vmmc1_supply, | 296 | .consumer_supplies = omap3evm_vmmc1_supply, |
297 | }; | 297 | }; |
298 | 298 | ||
299 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 299 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -307,8 +307,8 @@ static struct regulator_init_data omap3evm_vsim = { | |||
307 | | REGULATOR_CHANGE_MODE | 307 | | REGULATOR_CHANGE_MODE |
308 | | REGULATOR_CHANGE_STATUS, | 308 | | REGULATOR_CHANGE_STATUS, |
309 | }, | 309 | }, |
310 | .num_consumer_supplies = 1, | 310 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vsim_supply), |
311 | .consumer_supplies = &omap3evm_vsim_supply, | 311 | .consumer_supplies = omap3evm_vsim_supply, |
312 | }; | 312 | }; |
313 | 313 | ||
314 | static struct omap2_hsmmc_info mmc[] = { | 314 | static struct omap2_hsmmc_info mmc[] = { |
@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
365 | mmc[0].gpio_cd = gpio + 0; | 365 | mmc[0].gpio_cd = gpio + 0; |
366 | omap2_hsmmc_init(mmc); | 366 | omap2_hsmmc_init(mmc); |
367 | 367 | ||
368 | /* link regulators to MMC adapters */ | ||
369 | omap3evm_vmmc1_supply.dev = mmc[0].dev; | ||
370 | omap3evm_vsim_supply.dev = mmc[0].dev; | ||
371 | |||
372 | /* | 368 | /* |
373 | * Most GPIOs are for USB OTG. Some are mostly sent to | 369 | * Most GPIOs are for USB OTG. Some are mostly sent to |
374 | * the P2 connector; notably LEDA for the LCD backlight. | 370 | * the P2 connector; notably LEDA for the LCD backlight. |
@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = { | |||
400 | .setup = omap3evm_twl_gpio_setup, | 396 | .setup = omap3evm_twl_gpio_setup, |
401 | }; | 397 | }; |
402 | 398 | ||
403 | static struct twl4030_usb_data omap3evm_usb_data = { | ||
404 | .usb_mode = T2_USB_MODE_ULPI, | ||
405 | }; | ||
406 | |||
407 | static uint32_t board_keymap[] = { | 399 | static uint32_t board_keymap[] = { |
408 | KEY(0, 0, KEY_LEFT), | 400 | KEY(0, 0, KEY_LEFT), |
409 | KEY(0, 1, KEY_DOWN), | 401 | KEY(0, 1, KEY_DOWN), |
@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = { | |||
438 | .rep = 1, | 430 | .rep = 1, |
439 | }; | 431 | }; |
440 | 432 | ||
441 | static struct twl4030_madc_platform_data omap3evm_madc_data = { | ||
442 | .irq_line = 1, | ||
443 | }; | ||
444 | |||
445 | static struct twl4030_codec_audio_data omap3evm_audio_data; | ||
446 | |||
447 | static struct twl4030_codec_data omap3evm_codec_data = { | ||
448 | .audio_mclk = 26000000, | ||
449 | .audio = &omap3evm_audio_data, | ||
450 | }; | ||
451 | |||
452 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = | ||
453 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
454 | |||
455 | /* VDAC for DSS driving S-Video */ | ||
456 | static struct regulator_init_data omap3_evm_vdac = { | ||
457 | .constraints = { | ||
458 | .min_uV = 1800000, | ||
459 | .max_uV = 1800000, | ||
460 | .apply_uV = true, | ||
461 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
462 | | REGULATOR_MODE_STANDBY, | ||
463 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
464 | | REGULATOR_CHANGE_STATUS, | ||
465 | }, | ||
466 | .num_consumer_supplies = 1, | ||
467 | .consumer_supplies = &omap3_evm_vdda_dac_supply, | ||
468 | }; | ||
469 | |||
470 | /* VPLL2 for digital video outputs */ | ||
471 | static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = { | ||
472 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
473 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
474 | }; | ||
475 | |||
476 | static struct regulator_init_data omap3_evm_vpll2 = { | ||
477 | .constraints = { | ||
478 | .min_uV = 1800000, | ||
479 | .max_uV = 1800000, | ||
480 | .apply_uV = true, | ||
481 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
482 | | REGULATOR_MODE_STANDBY, | ||
483 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
484 | | REGULATOR_CHANGE_STATUS, | ||
485 | }, | ||
486 | .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies), | ||
487 | .consumer_supplies = omap3_evm_vpll2_supplies, | ||
488 | }; | ||
489 | |||
490 | /* ads7846 on SPI */ | 433 | /* ads7846 on SPI */ |
491 | static struct regulator_consumer_supply omap3evm_vio_supply = | 434 | static struct regulator_consumer_supply omap3evm_vio_supply[] = { |
492 | REGULATOR_SUPPLY("vcc", "spi1.0"); | 435 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
436 | }; | ||
493 | 437 | ||
494 | /* VIO for ads7846 */ | 438 | /* VIO for ads7846 */ |
495 | static struct regulator_init_data omap3evm_vio = { | 439 | static struct regulator_init_data omap3evm_vio = { |
@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = { | |||
502 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 446 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
503 | | REGULATOR_CHANGE_STATUS, | 447 | | REGULATOR_CHANGE_STATUS, |
504 | }, | 448 | }, |
505 | .num_consumer_supplies = 1, | 449 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vio_supply), |
506 | .consumer_supplies = &omap3evm_vio_supply, | 450 | .consumer_supplies = omap3evm_vio_supply, |
507 | }; | 451 | }; |
508 | 452 | ||
509 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | 453 | #ifdef CONFIG_WL12XX_PLATFORM_DATA |
@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = { | |||
511 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | 455 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) |
512 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | 456 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) |
513 | 457 | ||
514 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = | 458 | static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = { |
515 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | 459 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
460 | }; | ||
516 | 461 | ||
517 | /* VMMC2 for driving the WL12xx module */ | 462 | /* VMMC2 for driving the WL12xx module */ |
518 | static struct regulator_init_data omap3evm_vmmc2 = { | 463 | static struct regulator_init_data omap3evm_vmmc2 = { |
519 | .constraints = { | 464 | .constraints = { |
520 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 465 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
521 | }, | 466 | }, |
522 | .num_consumer_supplies = 1, | 467 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply), |
523 | .consumer_supplies = &omap3evm_vmmc2_supply, | 468 | .consumer_supplies = omap3evm_vmmc2_supply, |
524 | }; | 469 | }; |
525 | 470 | ||
526 | static struct fixed_voltage_config omap3evm_vwlan = { | 471 | static struct fixed_voltage_config omap3evm_vwlan = { |
@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | |||
548 | #endif | 493 | #endif |
549 | 494 | ||
550 | static struct twl4030_platform_data omap3evm_twldata = { | 495 | static struct twl4030_platform_data omap3evm_twldata = { |
551 | .irq_base = TWL4030_IRQ_BASE, | ||
552 | .irq_end = TWL4030_IRQ_END, | ||
553 | |||
554 | /* platform_data for children goes here */ | 496 | /* platform_data for children goes here */ |
555 | .keypad = &omap3evm_kp_data, | 497 | .keypad = &omap3evm_kp_data, |
556 | .madc = &omap3evm_madc_data, | ||
557 | .usb = &omap3evm_usb_data, | ||
558 | .gpio = &omap3evm_gpio_data, | 498 | .gpio = &omap3evm_gpio_data, |
559 | .codec = &omap3evm_codec_data, | ||
560 | .vdac = &omap3_evm_vdac, | ||
561 | .vpll2 = &omap3_evm_vpll2, | ||
562 | .vio = &omap3evm_vio, | 499 | .vio = &omap3evm_vio, |
563 | .vmmc1 = &omap3evm_vmmc1, | 500 | .vmmc1 = &omap3evm_vmmc1, |
564 | .vsim = &omap3evm_vsim, | 501 | .vsim = &omap3evm_vsim, |
@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
566 | 503 | ||
567 | static int __init omap3_evm_i2c_init(void) | 504 | static int __init omap3_evm_i2c_init(void) |
568 | { | 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 | |||
569 | omap3_pmic_init("twl4030", &omap3evm_twldata); | 514 | omap3_pmic_init("twl4030", &omap3evm_twldata); |
570 | omap_register_i2c_bus(2, 400, NULL, 0); | 515 | omap_register_i2c_bus(2, 400, NULL, 0); |
571 | omap_register_i2c_bus(3, 400, NULL, 0); | 516 | omap_register_i2c_bus(3, 400, NULL, 0); |
@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") | |||
740 | .reserve = omap_reserve, | 685 | .reserve = omap_reserve, |
741 | .map_io = omap3_map_io, | 686 | .map_io = omap3_map_io, |
742 | .init_early = omap3_evm_init_early, | 687 | .init_early = omap3_evm_init_early, |
743 | .init_irq = omap_init_irq, | 688 | .init_irq = omap3_init_irq, |
744 | .init_machine = omap3_evm_init, | 689 | .init_machine = omap3_evm_init, |
745 | .timer = &omap_timer, | 690 | .timer = &omap3_timer, |
746 | MACHINE_END | 691 | MACHINE_END |