aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPanduranga Mallireddy <panduranga_mallireddy@ti.com>2011-02-15 03:40:35 -0500
committerTony Lindgren <tony@atomide.com>2011-02-22 11:37:03 -0500
commitb17e0979113b7b75bb3f73e2243d156f91698edb (patch)
treea4ac581f468194bbf899ecb64d354c85a26c7f8a
parentedc840613c0fff590cad2deafdeffe6ea51405f7 (diff)
omap: panda: add mmc5/wl1271 device support
Add MMC5 support on PANDA, which has the wl1271 device hardwired to. The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an external IRQ line, and power-controlled by a GPIO-based fixed regulator. Based on the patch for mmc3/wl1271 device support for zoom by Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index d56bef15d3c5..3dd241b95159 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -27,6 +27,7 @@
27#include <linux/i2c/twl.h> 27#include <linux/i2c/twl.h>
28#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
29#include <linux/regulator/fixed.h> 29#include <linux/regulator/fixed.h>
30#include <linux/wl12xx.h>
30 31
31#include <mach/hardware.h> 32#include <mach/hardware.h>
32#include <mach/omap4-common.h> 33#include <mach/omap4-common.h>
@@ -47,6 +48,7 @@
47#define GPIO_HUB_POWER 1 48#define GPIO_HUB_POWER 1
48#define GPIO_HUB_NRESET 62 49#define GPIO_HUB_NRESET 62
49#define GPIO_WIFI_PMENA 43 50#define GPIO_WIFI_PMENA 43
51#define GPIO_WIFI_IRQ 53
50 52
51static struct gpio_led gpio_leds[] = { 53static struct gpio_led gpio_leds[] = {
52 { 54 {
@@ -163,6 +165,15 @@ static struct omap2_hsmmc_info mmc[] = {
163 .gpio_wp = -EINVAL, 165 .gpio_wp = -EINVAL,
164 .gpio_cd = -EINVAL, 166 .gpio_cd = -EINVAL,
165 }, 167 },
168 {
169 .name = "wl1271",
170 .mmc = 5,
171 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
172 .gpio_wp = -EINVAL,
173 .gpio_cd = -EINVAL,
174 .ocr_mask = MMC_VDD_165_195,
175 .nonremovable = true,
176 },
166 {} /* Terminator */ 177 {} /* Terminator */
167}; 178};
168 179
@@ -204,6 +215,12 @@ static struct platform_device omap_vwlan_device = {
204 }, 215 },
205}; 216};
206 217
218struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
219 .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
220 /* PANDA ref clock is 38.4 MHz */
221 .board_ref_clock = 2,
222};
223
207static int omap4_twl6030_hsmmc_late_init(struct device *dev) 224static int omap4_twl6030_hsmmc_late_init(struct device *dev)
208{ 225{
209 int ret = 0; 226 int ret = 0;
@@ -447,6 +464,9 @@ static void __init omap4_panda_init(void)
447 package = OMAP_PACKAGE_CBL; 464 package = OMAP_PACKAGE_CBL;
448 omap4_mux_init(board_mux, package); 465 omap4_mux_init(board_mux, package);
449 466
467 if (wl12xx_set_platform_data(&omap_panda_wlan_data))
468 pr_err("error setting wl12xx data\n");
469
450 omap4_panda_i2c_init(); 470 omap4_panda_i2c_init();
451 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); 471 platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
452 platform_device_register(&omap_vwlan_device); 472 platform_device_register(&omap_vwlan_device);