diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3pandora.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 2d2e6fc127ac..7c222ba17dea 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
35 | #include <linux/mmc/host.h> | 35 | #include <linux/mmc/host.h> |
36 | #include <linux/mmc/card.h> | 36 | #include <linux/mmc/card.h> |
37 | #include <linux/regulator/fixed.h> | ||
37 | 38 | ||
38 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
@@ -345,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply = | |||
345 | static struct regulator_consumer_supply pandora_vmmc2_supply = | 346 | static struct regulator_consumer_supply pandora_vmmc2_supply = |
346 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 347 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); |
347 | 348 | ||
349 | static struct regulator_consumer_supply pandora_vmmc3_supply = | ||
350 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); | ||
351 | |||
348 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | 352 | static struct regulator_consumer_supply pandora_vdda_dac_supply = |
349 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 353 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
350 | 354 | ||
@@ -489,6 +493,33 @@ static struct regulator_init_data pandora_vsim = { | |||
489 | .consumer_supplies = &pandora_adac_supply, | 493 | .consumer_supplies = &pandora_adac_supply, |
490 | }; | 494 | }; |
491 | 495 | ||
496 | /* Fixed regulator internal to Wifi module */ | ||
497 | static struct regulator_init_data pandora_vmmc3 = { | ||
498 | .constraints = { | ||
499 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
500 | }, | ||
501 | .num_consumer_supplies = 1, | ||
502 | .consumer_supplies = &pandora_vmmc3_supply, | ||
503 | }; | ||
504 | |||
505 | static struct fixed_voltage_config pandora_vwlan = { | ||
506 | .supply_name = "vwlan", | ||
507 | .microvolts = 1800000, /* 1.8V */ | ||
508 | .gpio = PANDORA_WIFI_NRESET_GPIO, | ||
509 | .startup_delay = 50000, /* 50ms */ | ||
510 | .enable_high = 1, | ||
511 | .enabled_at_boot = 0, | ||
512 | .init_data = &pandora_vmmc3, | ||
513 | }; | ||
514 | |||
515 | static struct platform_device pandora_vwlan_device = { | ||
516 | .name = "reg-fixed-voltage", | ||
517 | .id = 1, | ||
518 | .dev = { | ||
519 | .platform_data = &pandora_vwlan, | ||
520 | }, | ||
521 | }; | ||
522 | |||
492 | static struct twl4030_usb_data omap3pandora_usb_data = { | 523 | static struct twl4030_usb_data omap3pandora_usb_data = { |
493 | .usb_mode = T2_USB_MODE_ULPI, | 524 | .usb_mode = T2_USB_MODE_ULPI, |
494 | }; | 525 | }; |
@@ -645,19 +676,8 @@ static void pandora_wl1251_init(void) | |||
645 | if (pandora_wl1251_pdata.irq < 0) | 676 | if (pandora_wl1251_pdata.irq < 0) |
646 | goto fail_irq; | 677 | goto fail_irq; |
647 | 678 | ||
648 | ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset"); | ||
649 | if (ret < 0) | ||
650 | goto fail_irq; | ||
651 | |||
652 | /* start powered so that it probes with MMC subsystem */ | ||
653 | ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1); | ||
654 | if (ret < 0) | ||
655 | goto fail_nreset; | ||
656 | |||
657 | return; | 679 | return; |
658 | 680 | ||
659 | fail_nreset: | ||
660 | gpio_free(PANDORA_WIFI_NRESET_GPIO); | ||
661 | fail_irq: | 681 | fail_irq: |
662 | gpio_free(PANDORA_WIFI_IRQ_GPIO); | 682 | gpio_free(PANDORA_WIFI_IRQ_GPIO); |
663 | fail: | 683 | fail: |
@@ -669,6 +689,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
669 | &pandora_keys_gpio, | 689 | &pandora_keys_gpio, |
670 | &pandora_dss_device, | 690 | &pandora_dss_device, |
671 | &pandora_wl1251_data, | 691 | &pandora_wl1251_data, |
692 | &pandora_vwlan_device, | ||
672 | }; | 693 | }; |
673 | 694 | ||
674 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 695 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |