diff options
author | Enric Balletbo i Serra <eballetbo@gmail.com> | 2011-01-10 08:26:13 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-01-10 17:33:09 -0500 |
commit | a271c6cd209674118e5ec221de922bc59c0c9454 (patch) | |
tree | c921bdb2b92949a9f11c9756cffea5de1bb2ecdf /arch/arm/mach-omap2/board-igep0030.c | |
parent | 7b0d4b71f5b17f22914bc6b2e36c4cd7cdc56a28 (diff) |
omap3: igep3: Fix IGEP module second MMC channel power supply
The second MMC channel (used by the WLAN/BT module) is not linked to
power regulator. This causes the WLAN/BT module to fail being detected if
CONFIG_REGULATOR_DUMMY is not set.
This patch adds the two regulators that actually feed the WLAN/BT module
(1v8 from the TWL4030 VIO LDO, and a fixed 3v3). With that patch, the
second channel is properly detected.
Also change vmmc1 to use symbolic names instead of direct device
reference.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0030.c')
-rw-r--r-- | arch/arm/mach-omap2/board-igep0030.c | 65 |
1 files changed, 55 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index f0a85c1d24a7..11b944f93d24 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | 20 | ||
21 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/regulator/fixed.h> | ||
22 | #include <linux/i2c/twl.h> | 23 | #include <linux/i2c/twl.h> |
23 | #include <linux/mmc/host.h> | 24 | #include <linux/mmc/host.h> |
24 | 25 | ||
@@ -140,9 +141,8 @@ static void __init igep3_flash_init(void) | |||
140 | static void __init igep3_flash_init(void) {} | 141 | static void __init igep3_flash_init(void) {} |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | static struct regulator_consumer_supply igep3_vmmc1_supply = { | 144 | static struct regulator_consumer_supply igep3_vmmc1_supply = |
144 | .supply = "vmmc", | 145 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); |
145 | }; | ||
146 | 146 | ||
147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
148 | static struct regulator_init_data igep3_vmmc1 = { | 148 | static struct regulator_init_data igep3_vmmc1 = { |
@@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = { | |||
159 | .consumer_supplies = &igep3_vmmc1_supply, | 159 | .consumer_supplies = &igep3_vmmc1_supply, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct regulator_consumer_supply igep3_vio_supply = | ||
163 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | ||
164 | |||
165 | static struct regulator_init_data igep3_vio = { | ||
166 | .constraints = { | ||
167 | .min_uV = 1800000, | ||
168 | .max_uV = 1800000, | ||
169 | .apply_uV = 1, | ||
170 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
171 | | REGULATOR_MODE_STANDBY, | ||
172 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
173 | | REGULATOR_CHANGE_MODE | ||
174 | | REGULATOR_CHANGE_STATUS, | ||
175 | }, | ||
176 | .num_consumer_supplies = 1, | ||
177 | .consumer_supplies = &igep3_vio_supply, | ||
178 | }; | ||
179 | |||
180 | static struct regulator_consumer_supply igep3_vmmc2_supply = | ||
181 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | ||
182 | |||
183 | static struct regulator_init_data igep3_vmmc2 = { | ||
184 | .constraints = { | ||
185 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
186 | .always_on = 1, | ||
187 | }, | ||
188 | .num_consumer_supplies = 1, | ||
189 | .consumer_supplies = &igep3_vmmc2_supply, | ||
190 | }; | ||
191 | |||
192 | static struct fixed_voltage_config igep3_vwlan = { | ||
193 | .supply_name = "vwlan", | ||
194 | .microvolts = 3300000, | ||
195 | .gpio = -EINVAL, | ||
196 | .enabled_at_boot = 1, | ||
197 | .init_data = &igep3_vmmc2, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device igep3_vwlan_device = { | ||
201 | .name = "reg-fixed-voltage", | ||
202 | .id = 0, | ||
203 | .dev = { | ||
204 | .platform_data = &igep3_vwlan, | ||
205 | }, | ||
206 | }; | ||
207 | |||
162 | static struct omap2_hsmmc_info mmc[] = { | 208 | static struct omap2_hsmmc_info mmc[] = { |
163 | [0] = { | 209 | [0] = { |
164 | .mmc = 1, | 210 | .mmc = 1, |
@@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev, | |||
254 | mmc[0].gpio_cd = gpio + 0; | 300 | mmc[0].gpio_cd = gpio + 0; |
255 | omap2_hsmmc_init(mmc); | 301 | omap2_hsmmc_init(mmc); |
256 | 302 | ||
257 | /* | ||
258 | * link regulators to MMC adapters ... we "know" the | ||
259 | * regulators will be set up only *after* we return. | ||
260 | */ | ||
261 | igep3_vmmc1_supply.dev = mmc[0].dev; | ||
262 | |||
263 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 303 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
264 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | 304 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) |
265 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) | 305 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) |
@@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = { | |||
287 | .usb_mode = T2_USB_MODE_ULPI, | 327 | .usb_mode = T2_USB_MODE_ULPI, |
288 | }; | 328 | }; |
289 | 329 | ||
330 | static struct platform_device *igep3_devices[] __initdata = { | ||
331 | &igep3_vwlan_device, | ||
332 | }; | ||
333 | |||
290 | static void __init igep3_init_irq(void) | 334 | static void __init igep3_init_irq(void) |
291 | { | 335 | { |
292 | omap2_init_common_infrastructure(); | 336 | omap2_init_common_infrastructure(); |
@@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = { | |||
303 | .usb = &igep3_twl4030_usb_data, | 347 | .usb = &igep3_twl4030_usb_data, |
304 | .gpio = &igep3_twl4030_gpio_pdata, | 348 | .gpio = &igep3_twl4030_gpio_pdata, |
305 | .vmmc1 = &igep3_vmmc1, | 349 | .vmmc1 = &igep3_vmmc1, |
350 | .vio = &igep3_vio, | ||
306 | }; | 351 | }; |
307 | 352 | ||
308 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { | 353 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { |
@@ -387,7 +432,7 @@ static void __init igep3_init(void) | |||
387 | 432 | ||
388 | /* Register I2C busses and drivers */ | 433 | /* Register I2C busses and drivers */ |
389 | igep3_i2c_init(); | 434 | igep3_i2c_init(); |
390 | 435 | platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); | |
391 | omap_serial_init(); | 436 | omap_serial_init(); |
392 | usb_musb_init(&musb_board_data); | 437 | usb_musb_init(&musb_board_data); |
393 | usb_ehci_init(&ehci_pdata); | 438 | usb_ehci_init(&ehci_pdata); |