diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c2a0fca4aa53..ac50bf949447 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/usb/otg.h> | 30 | #include <linux/usb/otg.h> |
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | 32 | ||
33 | #include <linux/wl12xx.h> | ||
34 | #include <linux/regulator/fixed.h> | ||
33 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
34 | #include <linux/mmc/host.h> | 36 | #include <linux/mmc/host.h> |
35 | 37 | ||
@@ -381,6 +383,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
381 | .gpio_cd = -EINVAL, | 383 | .gpio_cd = -EINVAL, |
382 | .gpio_wp = 63, | 384 | .gpio_wp = 63, |
383 | }, | 385 | }, |
386 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
387 | { | ||
388 | .name = "wl1271", | ||
389 | .mmc = 2, | ||
390 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
391 | .gpio_wp = -EINVAL, | ||
392 | .gpio_cd = -EINVAL, | ||
393 | .nonremovable = true, | ||
394 | }, | ||
395 | #endif | ||
384 | {} /* Terminator */ | 396 | {} /* Terminator */ |
385 | }; | 397 | }; |
386 | 398 | ||
@@ -538,6 +550,50 @@ static struct regulator_init_data omap3_evm_vpll2 = { | |||
538 | .consumer_supplies = &omap3_evm_vpll2_supply, | 550 | .consumer_supplies = &omap3_evm_vpll2_supply, |
539 | }; | 551 | }; |
540 | 552 | ||
553 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
554 | |||
555 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | ||
556 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | ||
557 | |||
558 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = { | ||
559 | .supply = "vmmc", | ||
560 | .dev_name = "mmci-omap-hs.1", | ||
561 | }; | ||
562 | |||
563 | /* VMMC2 for driving the WL12xx module */ | ||
564 | static struct regulator_init_data omap3evm_vmmc2 = { | ||
565 | .constraints = { | ||
566 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
567 | }, | ||
568 | .num_consumer_supplies = 1, | ||
569 | .consumer_supplies = &omap3evm_vmmc2_supply, | ||
570 | }; | ||
571 | |||
572 | static struct fixed_voltage_config omap3evm_vwlan = { | ||
573 | .supply_name = "vwl1271", | ||
574 | .microvolts = 1800000, /* 1.80V */ | ||
575 | .gpio = OMAP3EVM_WLAN_PMENA_GPIO, | ||
576 | .startup_delay = 70000, /* 70ms */ | ||
577 | .enable_high = 1, | ||
578 | .enabled_at_boot = 0, | ||
579 | .init_data = &omap3evm_vmmc2, | ||
580 | }; | ||
581 | |||
582 | static struct platform_device omap3evm_vwlan_device = { | ||
583 | .name = "reg-fixed-voltage", | ||
584 | .id = 1, | ||
585 | .dev = { | ||
586 | .platform_data = &omap3evm_vwlan, | ||
587 | }, | ||
588 | }; | ||
589 | |||
590 | struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | ||
591 | .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO), | ||
592 | /* ref clock is 38.4 MHz */ | ||
593 | .board_ref_clock = 2, | ||
594 | }; | ||
595 | #endif | ||
596 | |||
541 | static struct twl4030_platform_data omap3evm_twldata = { | 597 | static struct twl4030_platform_data omap3evm_twldata = { |
542 | .irq_base = TWL4030_IRQ_BASE, | 598 | .irq_base = TWL4030_IRQ_BASE, |
543 | .irq_end = TWL4030_IRQ_END, | 599 | .irq_end = TWL4030_IRQ_END, |
@@ -657,6 +713,21 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
657 | OMAP_PIN_OFF_WAKEUPENABLE), | 713 | OMAP_PIN_OFF_WAKEUPENABLE), |
658 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | 714 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | |
659 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), | 715 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), |
716 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
717 | /* WLAN IRQ - GPIO 149 */ | ||
718 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), | ||
719 | |||
720 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
721 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
722 | |||
723 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
724 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
725 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
726 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
727 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
728 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
729 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
730 | #endif | ||
660 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 731 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
661 | }; | 732 | }; |
662 | #endif | 733 | #endif |
@@ -714,6 +785,13 @@ static void __init omap3_evm_init(void) | |||
714 | ads7846_dev_init(); | 785 | ads7846_dev_init(); |
715 | omap3evm_init_smsc911x(); | 786 | omap3evm_init_smsc911x(); |
716 | omap3_evm_display_init(); | 787 | omap3_evm_display_init(); |
788 | |||
789 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
790 | /* WL12xx WLAN Init */ | ||
791 | if (wl12xx_set_platform_data(&omap3evm_wlan_data)) | ||
792 | pr_err("error setting wl12xx data\n"); | ||
793 | platform_device_register(&omap3evm_vwlan_device); | ||
794 | #endif | ||
717 | } | 795 | } |
718 | 796 | ||
719 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 797 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |