aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-3430sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-3430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c113
1 files changed, 50 insertions, 63 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index d4e41ef86aa5..5464bec156ad 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -307,34 +307,16 @@ static struct omap_dss_board_info sdp3430_dss_data = {
307 .default_device = &sdp3430_lcd_device, 307 .default_device = &sdp3430_lcd_device,
308}; 308};
309 309
310static struct platform_device sdp3430_dss_device = { 310static struct regulator_consumer_supply sdp3430_vdda_dac_supply =
311 .name = "omapdss", 311 REGULATOR_SUPPLY("vdda_dac", "omapdss");
312 .id = -1,
313 .dev = {
314 .platform_data = &sdp3430_dss_data,
315 },
316};
317
318static struct regulator_consumer_supply sdp3430_vdda_dac_supply = {
319 .supply = "vdda_dac",
320 .dev = &sdp3430_dss_device.dev,
321};
322
323static struct platform_device *sdp3430_devices[] __initdata = {
324 &sdp3430_dss_device,
325};
326 312
327static struct omap_board_config_kernel sdp3430_config[] __initdata = { 313static struct omap_board_config_kernel sdp3430_config[] __initdata = {
328}; 314};
329 315
330static void __init omap_3430sdp_init_irq(void) 316static void __init omap_3430sdp_init_early(void)
331{ 317{
332 omap_board_config = sdp3430_config;
333 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
334 omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
335 omap2_init_common_infrastructure(); 318 omap2_init_common_infrastructure();
336 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); 319 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
337 omap_init_irq();
338} 320}
339 321
340static int sdp3430_batt_table[] = { 322static int sdp3430_batt_table[] = {
@@ -370,18 +352,6 @@ static struct omap2_hsmmc_info mmc[] = {
370 {} /* Terminator */ 352 {} /* Terminator */
371}; 353};
372 354
373static struct regulator_consumer_supply sdp3430_vmmc1_supply = {
374 .supply = "vmmc",
375};
376
377static struct regulator_consumer_supply sdp3430_vsim_supply = {
378 .supply = "vmmc_aux",
379};
380
381static struct regulator_consumer_supply sdp3430_vmmc2_supply = {
382 .supply = "vmmc",
383};
384
385static int sdp3430_twl_gpio_setup(struct device *dev, 355static int sdp3430_twl_gpio_setup(struct device *dev,
386 unsigned gpio, unsigned ngpio) 356 unsigned gpio, unsigned ngpio)
387{ 357{
@@ -392,13 +362,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
392 mmc[1].gpio_cd = gpio + 1; 362 mmc[1].gpio_cd = gpio + 1;
393 omap2_hsmmc_init(mmc); 363 omap2_hsmmc_init(mmc);
394 364
395 /* link regulators to MMC adapters ... we "know" the
396 * regulators will be set up only *after* we return.
397 */
398 sdp3430_vmmc1_supply.dev = mmc[0].dev;
399 sdp3430_vsim_supply.dev = mmc[0].dev;
400 sdp3430_vmmc2_supply.dev = mmc[1].dev;
401
402 /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ 365 /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
403 gpio_request(gpio + 7, "sub_lcd_en_bkl"); 366 gpio_request(gpio + 7, "sub_lcd_en_bkl");
404 gpio_direction_output(gpio + 7, 0); 367 gpio_direction_output(gpio + 7, 0);
@@ -427,6 +390,34 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = {
427 .irq_line = 1, 390 .irq_line = 1,
428}; 391};
429 392
393/* regulator consumer mappings */
394
395/* ads7846 on SPI */
396static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
397 REGULATOR_SUPPLY("vcc", "spi1.0"),
398};
399
400static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
401 REGULATOR_SUPPLY("vdda_dac", "omapdss"),
402};
403
404/* VPLL2 for digital video outputs */
405static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
406 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
407};
408
409static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
410 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
411};
412
413static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
414 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
415};
416
417static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
418 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
419};
420
430/* 421/*
431 * Apply all the fixed voltages since most versions of U-Boot 422 * Apply all the fixed voltages since most versions of U-Boot
432 * don't bother with that initialization. 423 * don't bother with that initialization.
@@ -469,6 +460,8 @@ static struct regulator_init_data sdp3430_vaux3 = {
469 .valid_ops_mask = REGULATOR_CHANGE_MODE 460 .valid_ops_mask = REGULATOR_CHANGE_MODE
470 | REGULATOR_CHANGE_STATUS, 461 | REGULATOR_CHANGE_STATUS,
471 }, 462 },
463 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vaux3_supplies),
464 .consumer_supplies = sdp3430_vaux3_supplies,
472}; 465};
473 466
474/* VAUX4 for OMAP VDD_CSI2 (camera) */ 467/* VAUX4 for OMAP VDD_CSI2 (camera) */
@@ -495,8 +488,8 @@ static struct regulator_init_data sdp3430_vmmc1 = {
495 | REGULATOR_CHANGE_MODE 488 | REGULATOR_CHANGE_MODE
496 | REGULATOR_CHANGE_STATUS, 489 | REGULATOR_CHANGE_STATUS,
497 }, 490 },
498 .num_consumer_supplies = 1, 491 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc1_supplies),
499 .consumer_supplies = &sdp3430_vmmc1_supply, 492 .consumer_supplies = sdp3430_vmmc1_supplies,
500}; 493};
501 494
502/* VMMC2 for MMC2 card */ 495/* VMMC2 for MMC2 card */
@@ -510,8 +503,8 @@ static struct regulator_init_data sdp3430_vmmc2 = {
510 .valid_ops_mask = REGULATOR_CHANGE_MODE 503 .valid_ops_mask = REGULATOR_CHANGE_MODE
511 | REGULATOR_CHANGE_STATUS, 504 | REGULATOR_CHANGE_STATUS,
512 }, 505 },
513 .num_consumer_supplies = 1, 506 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc2_supplies),
514 .consumer_supplies = &sdp3430_vmmc2_supply, 507 .consumer_supplies = sdp3430_vmmc2_supplies,
515}; 508};
516 509
517/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ 510/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
@@ -525,8 +518,8 @@ static struct regulator_init_data sdp3430_vsim = {
525 | REGULATOR_CHANGE_MODE 518 | REGULATOR_CHANGE_MODE
526 | REGULATOR_CHANGE_STATUS, 519 | REGULATOR_CHANGE_STATUS,
527 }, 520 },
528 .num_consumer_supplies = 1, 521 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vsim_supplies),
529 .consumer_supplies = &sdp3430_vsim_supply, 522 .consumer_supplies = sdp3430_vsim_supplies,
530}; 523};
531 524
532/* VDAC for DSS driving S-Video */ 525/* VDAC for DSS driving S-Video */
@@ -540,16 +533,8 @@ static struct regulator_init_data sdp3430_vdac = {
540 .valid_ops_mask = REGULATOR_CHANGE_MODE 533 .valid_ops_mask = REGULATOR_CHANGE_MODE
541 | REGULATOR_CHANGE_STATUS, 534 | REGULATOR_CHANGE_STATUS,
542 }, 535 },
543 .num_consumer_supplies = 1, 536 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
544 .consumer_supplies = &sdp3430_vdda_dac_supply, 537 .consumer_supplies = sdp3430_vdda_dac_supplies,
545};
546
547/* VPLL2 for digital video outputs */
548static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
549 {
550 .supply = "vdds_dsi",
551 .dev = &sdp3430_dss_device.dev,
552 }
553}; 538};
554 539
555static struct regulator_init_data sdp3430_vpll2 = { 540static struct regulator_init_data sdp3430_vpll2 = {
@@ -567,9 +552,7 @@ static struct regulator_init_data sdp3430_vpll2 = {
567 .consumer_supplies = sdp3430_vpll2_supplies, 552 .consumer_supplies = sdp3430_vpll2_supplies,
568}; 553};
569 554
570static struct twl4030_codec_audio_data sdp3430_audio = { 555static struct twl4030_codec_audio_data sdp3430_audio;
571 .audio_mclk = 26000000,
572};
573 556
574static struct twl4030_codec_data sdp3430_codec = { 557static struct twl4030_codec_data sdp3430_codec = {
575 .audio_mclk = 26000000, 558 .audio_mclk = 26000000,
@@ -800,8 +783,11 @@ static struct omap_musb_board_data musb_board_data = {
800static void __init omap_3430sdp_init(void) 783static void __init omap_3430sdp_init(void)
801{ 784{
802 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 785 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
786 omap_board_config = sdp3430_config;
787 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
788 omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
803 omap3430_i2c_init(); 789 omap3430_i2c_init();
804 platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); 790 omap_display_init(&sdp3430_dss_data);
805 if (omap_rev() > OMAP3430_REV_ES1_0) 791 if (omap_rev() > OMAP3430_REV_ES1_0)
806 ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; 792 ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
807 else 793 else
@@ -813,7 +799,7 @@ static void __init omap_3430sdp_init(void)
813 omap_serial_init(); 799 omap_serial_init();
814 usb_musb_init(&musb_board_data); 800 usb_musb_init(&musb_board_data);
815 board_smc91x_init(); 801 board_smc91x_init();
816 board_flash_init(sdp_flash_partitions, chip_sel_3430); 802 board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
817 sdp3430_display_init(); 803 sdp3430_display_init();
818 enable_board_wakeup_source(); 804 enable_board_wakeup_source();
819 usb_ehci_init(&ehci_pdata); 805 usb_ehci_init(&ehci_pdata);
@@ -822,9 +808,10 @@ static void __init omap_3430sdp_init(void)
822MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") 808MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
823 /* Maintainer: Syed Khasim - Texas Instruments Inc */ 809 /* Maintainer: Syed Khasim - Texas Instruments Inc */
824 .boot_params = 0x80000100, 810 .boot_params = 0x80000100,
825 .map_io = omap3_map_io,
826 .reserve = omap_reserve, 811 .reserve = omap_reserve,
827 .init_irq = omap_3430sdp_init_irq, 812 .map_io = omap3_map_io,
813 .init_early = omap_3430sdp_init_early,
814 .init_irq = omap_init_irq,
828 .init_machine = omap_3430sdp_init, 815 .init_machine = omap_3430sdp_init,
829 .timer = &omap_timer, 816 .timer = &omap_timer,
830MACHINE_END 817MACHINE_END