aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorJonas Zetterberg <jozz@jozz.se>2010-02-14 14:33:24 -0500
committerTony Lindgren <tony@atomide.com>2010-02-19 18:22:17 -0500
commitc67b0d987088ae0339edc66de63aea5ac3d76c0d (patch)
tree1f895d2091e39c1fce0bb2d1b26b88edbef212ec /arch/arm/mach-omap2/board-igep0020.c
parentcd2b90d9f7bd33f415e7f17e6ea34808b2ff0e29 (diff)
IGEPv2: Added WIFI support
Enabled VMMC2 LDO voltage regulator on TWL4030. Added GPIO's (power down and reset) for WIFI chip. Signed-off-by: Anders Hedlund <anders.j.hedlund@gmail.com> Signed-off-by: Jonas Zetterberg <jozz@jozz.se> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 3d1fde79ab45..4a5d663e2869 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -42,6 +42,8 @@
42#define IGEP2_GPIO_LED0_GREEN 27 42#define IGEP2_GPIO_LED0_GREEN 27
43#define IGEP2_GPIO_LED1_RED 28 43#define IGEP2_GPIO_LED1_RED 28
44#define IGEP2_GPIO_DVI_PUP 170 44#define IGEP2_GPIO_DVI_PUP 170
45#define IGEP2_GPIO_WIFI_NPD 94
46#define IGEP2_GPIO_WIFI_NRESET 95
45 47
46#if defined(CONFIG_MTD_ONENAND_OMAP2) || \ 48#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
47 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) 49 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
@@ -209,6 +211,10 @@ static struct regulator_consumer_supply igep2_vmmc1_supply = {
209 .supply = "vmmc", 211 .supply = "vmmc",
210}; 212};
211 213
214static struct regulator_consumer_supply igep2_vmmc2_supply = {
215 .supply = "vmmc",
216};
217
212/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 218/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
213static struct regulator_init_data igep2_vmmc1 = { 219static struct regulator_init_data igep2_vmmc1 = {
214 .constraints = { 220 .constraints = {
@@ -224,6 +230,21 @@ static struct regulator_init_data igep2_vmmc1 = {
224 .consumer_supplies = &igep2_vmmc1_supply, 230 .consumer_supplies = &igep2_vmmc1_supply,
225}; 231};
226 232
233/* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */
234static struct regulator_init_data igep2_vmmc2 = {
235 .constraints = {
236 .min_uV = 1850000,
237 .max_uV = 3150000,
238 .valid_modes_mask = REGULATOR_MODE_NORMAL
239 | REGULATOR_MODE_STANDBY,
240 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
241 | REGULATOR_CHANGE_MODE
242 | REGULATOR_CHANGE_STATUS,
243 },
244 .num_consumer_supplies = 1,
245 .consumer_supplies = &igep2_vmmc2_supply,
246};
247
227static struct omap2_hsmmc_info mmc[] = { 248static struct omap2_hsmmc_info mmc[] = {
228 { 249 {
229 .mmc = 1, 250 .mmc = 1,
@@ -251,6 +272,7 @@ static int igep2_twl_gpio_setup(struct device *dev,
251 * regulators will be set up only *after* we return. 272 * regulators will be set up only *after* we return.
252 */ 273 */
253 igep2_vmmc1_supply.dev = mmc[0].dev; 274 igep2_vmmc1_supply.dev = mmc[0].dev;
275 igep2_vmmc2_supply.dev = mmc[1].dev;
254 276
255 return 0; 277 return 0;
256}; 278};
@@ -364,6 +386,7 @@ static struct twl4030_platform_data igep2_twldata = {
364 .codec = &igep2_codec_data, 386 .codec = &igep2_codec_data,
365 .gpio = &igep2_gpio_data, 387 .gpio = &igep2_gpio_data,
366 .vmmc1 = &igep2_vmmc1, 388 .vmmc1 = &igep2_vmmc1,
389 .vmmc2 = &igep2_vmmc2,
367 .vpll2 = &igep2_vpll2, 390 .vpll2 = &igep2_vpll2,
368 391
369}; 392};
@@ -440,6 +463,23 @@ static void __init igep2_init(void)
440 gpio_set_value(IGEP2_GPIO_LED1_RED, 0); 463 gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
441 } else 464 } else
442 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); 465 pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n");
466
467 /* GPIO W-LAN + Bluetooth combo module */
468 if ((gpio_request(IGEP2_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) &&
469 (gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) {
470 gpio_export(IGEP2_GPIO_WIFI_NPD, 0);
471/* gpio_set_value(IGEP2_GPIO_WIFI_NPD, 0); */
472 } else
473 pr_warning("IGEP v2: Could not obtain gpio GPIO_WIFI_NPD\n");
474
475 if ((gpio_request(IGEP2_GPIO_WIFI_NRESET, "GPIO_WIFI_NRESET") == 0) &&
476 (gpio_direction_output(IGEP2_GPIO_WIFI_NRESET, 1) == 0)) {
477 gpio_export(IGEP2_GPIO_WIFI_NRESET, 0);
478 gpio_set_value(IGEP2_GPIO_WIFI_NRESET, 0);
479 udelay(10);
480 gpio_set_value(IGEP2_GPIO_WIFI_NRESET, 1);
481 } else
482 pr_warning("IGEP v2: Could not obtain gpio GPIO_WIFI_NRESET\n");
443} 483}
444 484
445static void __init igep2_map_io(void) 485static void __init igep2_map_io(void)