diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3pandora.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 119 |
1 files changed, 43 insertions, 76 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 23f71d40883e..080d7bd6795e 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { | |||
320 | .setup = omap3pandora_twl_gpio_setup, | 320 | .setup = omap3pandora_twl_gpio_setup, |
321 | }; | 321 | }; |
322 | 322 | ||
323 | static struct regulator_consumer_supply pandora_vmmc1_supply = | 323 | static struct regulator_consumer_supply pandora_vmmc1_supply[] = { |
324 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); | 324 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
325 | 325 | }; | |
326 | static struct regulator_consumer_supply pandora_vmmc2_supply = | ||
327 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
328 | 326 | ||
329 | static struct regulator_consumer_supply pandora_vmmc3_supply = | 327 | static struct regulator_consumer_supply pandora_vmmc2_supply[] = { |
330 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); | 328 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1") |
329 | }; | ||
331 | 330 | ||
332 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | 331 | static struct regulator_consumer_supply pandora_vmmc3_supply[] = { |
333 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | 332 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), |
333 | }; | ||
334 | 334 | ||
335 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { | 335 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { |
336 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), | 336 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), |
@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = { | |||
338 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | 338 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static struct regulator_consumer_supply pandora_vcc_lcd_supply = | 341 | static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { |
342 | REGULATOR_SUPPLY("vcc", "display0"); | 342 | REGULATOR_SUPPLY("vcc", "display0"), |
343 | }; | ||
343 | 344 | ||
344 | static struct regulator_consumer_supply pandora_usb_phy_supply = | 345 | static struct regulator_consumer_supply pandora_usb_phy_supply[] = { |
345 | REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"); | 346 | REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"), |
347 | }; | ||
346 | 348 | ||
347 | /* ads7846 on SPI and 2 nub controllers on I2C */ | 349 | /* ads7846 on SPI and 2 nub controllers on I2C */ |
348 | static struct regulator_consumer_supply pandora_vaux4_supplies[] = { | 350 | static struct regulator_consumer_supply pandora_vaux4_supplies[] = { |
@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = { | |||
351 | REGULATOR_SUPPLY("vcc", "3-0067"), | 353 | REGULATOR_SUPPLY("vcc", "3-0067"), |
352 | }; | 354 | }; |
353 | 355 | ||
354 | static struct regulator_consumer_supply pandora_adac_supply = | 356 | static struct regulator_consumer_supply pandora_adac_supply[] = { |
355 | REGULATOR_SUPPLY("vcc", "soc-audio"); | 357 | REGULATOR_SUPPLY("vcc", "soc-audio"), |
358 | }; | ||
356 | 359 | ||
357 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 360 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
358 | static struct regulator_init_data pandora_vmmc1 = { | 361 | static struct regulator_init_data pandora_vmmc1 = { |
@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = { | |||
365 | | REGULATOR_CHANGE_MODE | 368 | | REGULATOR_CHANGE_MODE |
366 | | REGULATOR_CHANGE_STATUS, | 369 | | REGULATOR_CHANGE_STATUS, |
367 | }, | 370 | }, |
368 | .num_consumer_supplies = 1, | 371 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc1_supply), |
369 | .consumer_supplies = &pandora_vmmc1_supply, | 372 | .consumer_supplies = pandora_vmmc1_supply, |
370 | }; | 373 | }; |
371 | 374 | ||
372 | /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ | 375 | /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ |
@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = { | |||
380 | | REGULATOR_CHANGE_MODE | 383 | | REGULATOR_CHANGE_MODE |
381 | | REGULATOR_CHANGE_STATUS, | 384 | | REGULATOR_CHANGE_STATUS, |
382 | }, | 385 | }, |
383 | .num_consumer_supplies = 1, | 386 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc2_supply), |
384 | .consumer_supplies = &pandora_vmmc2_supply, | 387 | .consumer_supplies = pandora_vmmc2_supply, |
385 | }; | ||
386 | |||
387 | /* VDAC for DSS driving S-Video */ | ||
388 | static struct regulator_init_data pandora_vdac = { | ||
389 | .constraints = { | ||
390 | .min_uV = 1800000, | ||
391 | .max_uV = 1800000, | ||
392 | .apply_uV = true, | ||
393 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
394 | | REGULATOR_MODE_STANDBY, | ||
395 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
396 | | REGULATOR_CHANGE_STATUS, | ||
397 | }, | ||
398 | .num_consumer_supplies = 1, | ||
399 | .consumer_supplies = &pandora_vdda_dac_supply, | ||
400 | }; | ||
401 | |||
402 | /* VPLL2 for digital video outputs */ | ||
403 | static struct regulator_init_data pandora_vpll2 = { | ||
404 | .constraints = { | ||
405 | .min_uV = 1800000, | ||
406 | .max_uV = 1800000, | ||
407 | .apply_uV = true, | ||
408 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
409 | | REGULATOR_MODE_STANDBY, | ||
410 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
411 | | REGULATOR_CHANGE_STATUS, | ||
412 | }, | ||
413 | .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies), | ||
414 | .consumer_supplies = pandora_vdds_supplies, | ||
415 | }; | 388 | }; |
416 | 389 | ||
417 | /* VAUX1 for LCD */ | 390 | /* VAUX1 for LCD */ |
@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = { | |||
425 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 398 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
426 | | REGULATOR_CHANGE_STATUS, | 399 | | REGULATOR_CHANGE_STATUS, |
427 | }, | 400 | }, |
428 | .num_consumer_supplies = 1, | 401 | .num_consumer_supplies = ARRAY_SIZE(pandora_vcc_lcd_supply), |
429 | .consumer_supplies = &pandora_vcc_lcd_supply, | 402 | .consumer_supplies = pandora_vcc_lcd_supply, |
430 | }; | 403 | }; |
431 | 404 | ||
432 | /* VAUX2 for USB host PHY */ | 405 | /* VAUX2 for USB host PHY */ |
@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = { | |||
440 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 413 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
441 | | REGULATOR_CHANGE_STATUS, | 414 | | REGULATOR_CHANGE_STATUS, |
442 | }, | 415 | }, |
443 | .num_consumer_supplies = 1, | 416 | .num_consumer_supplies = ARRAY_SIZE(pandora_usb_phy_supply), |
444 | .consumer_supplies = &pandora_usb_phy_supply, | 417 | .consumer_supplies = pandora_usb_phy_supply, |
445 | }; | 418 | }; |
446 | 419 | ||
447 | /* VAUX4 for ads7846 and nubs */ | 420 | /* VAUX4 for ads7846 and nubs */ |
@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = { | |||
470 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 443 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
471 | | REGULATOR_CHANGE_STATUS, | 444 | | REGULATOR_CHANGE_STATUS, |
472 | }, | 445 | }, |
473 | .num_consumer_supplies = 1, | 446 | .num_consumer_supplies = ARRAY_SIZE(pandora_adac_supply), |
474 | .consumer_supplies = &pandora_adac_supply, | 447 | .consumer_supplies = pandora_adac_supply, |
475 | }; | 448 | }; |
476 | 449 | ||
477 | /* Fixed regulator internal to Wifi module */ | 450 | /* Fixed regulator internal to Wifi module */ |
@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = { | |||
479 | .constraints = { | 452 | .constraints = { |
480 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 453 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
481 | }, | 454 | }, |
482 | .num_consumer_supplies = 1, | 455 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply), |
483 | .consumer_supplies = &pandora_vmmc3_supply, | 456 | .consumer_supplies = pandora_vmmc3_supply, |
484 | }; | 457 | }; |
485 | 458 | ||
486 | static struct fixed_voltage_config pandora_vwlan = { | 459 | static struct fixed_voltage_config pandora_vwlan = { |
@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = { | |||
501 | }, | 474 | }, |
502 | }; | 475 | }; |
503 | 476 | ||
504 | static struct twl4030_usb_data omap3pandora_usb_data = { | ||
505 | .usb_mode = T2_USB_MODE_ULPI, | ||
506 | }; | ||
507 | |||
508 | static struct twl4030_codec_audio_data omap3pandora_audio_data; | ||
509 | |||
510 | static struct twl4030_codec_data omap3pandora_codec_data = { | ||
511 | .audio_mclk = 26000000, | ||
512 | .audio = &omap3pandora_audio_data, | ||
513 | }; | ||
514 | |||
515 | static struct twl4030_bci_platform_data pandora_bci_data; | 477 | static struct twl4030_bci_platform_data pandora_bci_data; |
516 | 478 | ||
517 | static struct twl4030_platform_data omap3pandora_twldata = { | 479 | static struct twl4030_platform_data omap3pandora_twldata = { |
518 | .irq_base = TWL4030_IRQ_BASE, | ||
519 | .irq_end = TWL4030_IRQ_END, | ||
520 | .gpio = &omap3pandora_gpio_data, | 480 | .gpio = &omap3pandora_gpio_data, |
521 | .usb = &omap3pandora_usb_data, | ||
522 | .codec = &omap3pandora_codec_data, | ||
523 | .vmmc1 = &pandora_vmmc1, | 481 | .vmmc1 = &pandora_vmmc1, |
524 | .vmmc2 = &pandora_vmmc2, | 482 | .vmmc2 = &pandora_vmmc2, |
525 | .vdac = &pandora_vdac, | ||
526 | .vpll2 = &pandora_vpll2, | ||
527 | .vaux1 = &pandora_vaux1, | 483 | .vaux1 = &pandora_vaux1, |
528 | .vaux2 = &pandora_vaux2, | 484 | .vaux2 = &pandora_vaux2, |
529 | .vaux4 = &pandora_vaux4, | 485 | .vaux4 = &pandora_vaux4, |
@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { | |||
541 | 497 | ||
542 | static int __init omap3pandora_i2c_init(void) | 498 | static int __init omap3pandora_i2c_init(void) |
543 | { | 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 | |||
544 | omap3_pmic_init("tps65950", &omap3pandora_twldata); | 511 | omap3_pmic_init("tps65950", &omap3pandora_twldata); |
545 | /* i2c2 pins are not connected */ | 512 | /* i2c2 pins are not connected */ |
546 | omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, | 513 | omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, |
@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | |||
643 | .reserve = omap_reserve, | 610 | .reserve = omap_reserve, |
644 | .map_io = omap3_map_io, | 611 | .map_io = omap3_map_io, |
645 | .init_early = omap3pandora_init_early, | 612 | .init_early = omap3pandora_init_early, |
646 | .init_irq = omap_init_irq, | 613 | .init_irq = omap3_init_irq, |
647 | .init_machine = omap3pandora_init, | 614 | .init_machine = omap3pandora_init, |
648 | .timer = &omap_timer, | 615 | .timer = &omap3_timer, |
649 | MACHINE_END | 616 | MACHINE_END |