aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@misterjones.org>2010-12-20 21:48:16 -0500
committerTony Lindgren <tony@atomide.com>2010-12-20 21:48:16 -0500
commitda07c0cff295d887427ad2519e452ee3c27e47ff (patch)
tree10cbaaebc19ff5666d441574f458b801fb44bc08 /arch/arm/mach-omap2/board-igep0020.c
parentcd303e1712e3ebdf174bb378bb8df851eac2701a (diff)
Fix IGEPv2 second MMC channel power supply
Commit 72f381ba056 (omap3: Remove VMMC2 regulator on IGEP v2) removed an unused regulator entry, but left the second MMC channel (used by the Libertas WLAN module) without link to power regulator. This causes the SDIO module to fail being detected. This patch adds the two regulators that actually feed the WLAN module (1v8 from the TWL4030 VIO LDO, and a fixed 3v3). With that patch, the second channel is properly detected. Details of the power supply implementation were kindly provided by Enric Balletbo i Serra. Also change vmmc1 to use symbolic names instead of direct device reference. Tested on an IGEPv2 Rev-B. Signed-off-by: Marc Zyngier <maz@misterjones.org> Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com> Cc: Tony Lindgren <tony@atomide.com> 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.c61
1 files changed, 51 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 59b95f2389dd..3bee9a1f0a21 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.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
@@ -246,9 +247,8 @@ static inline void __init igep2_init_smsc911x(void)
246static inline void __init igep2_init_smsc911x(void) { } 247static inline void __init igep2_init_smsc911x(void) { }
247#endif 248#endif
248 249
249static struct regulator_consumer_supply igep2_vmmc1_supply = { 250static struct regulator_consumer_supply igep2_vmmc1_supply =
250 .supply = "vmmc", 251 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
251};
252 252
253/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 253/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
254static struct regulator_init_data igep2_vmmc1 = { 254static struct regulator_init_data igep2_vmmc1 = {
@@ -265,6 +265,52 @@ static struct regulator_init_data igep2_vmmc1 = {
265 .consumer_supplies = &igep2_vmmc1_supply, 265 .consumer_supplies = &igep2_vmmc1_supply,
266}; 266};
267 267
268static struct regulator_consumer_supply igep2_vio_supply =
269 REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
270
271static struct regulator_init_data igep2_vio = {
272 .constraints = {
273 .min_uV = 1800000,
274 .max_uV = 1800000,
275 .apply_uV = 1,
276 .valid_modes_mask = REGULATOR_MODE_NORMAL
277 | REGULATOR_MODE_STANDBY,
278 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
279 | REGULATOR_CHANGE_MODE
280 | REGULATOR_CHANGE_STATUS,
281 },
282 .num_consumer_supplies = 1,
283 .consumer_supplies = &igep2_vio_supply,
284};
285
286static struct regulator_consumer_supply igep2_vmmc2_supply =
287 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
288
289static struct regulator_init_data igep2_vmmc2 = {
290 .constraints = {
291 .valid_modes_mask = REGULATOR_MODE_NORMAL,
292 .always_on = 1,
293 },
294 .num_consumer_supplies = 1,
295 .consumer_supplies = &igep2_vmmc2_supply,
296};
297
298static struct fixed_voltage_config igep2_vwlan = {
299 .supply_name = "vwlan",
300 .microvolts = 3300000,
301 .gpio = -EINVAL,
302 .enabled_at_boot = 1,
303 .init_data = &igep2_vmmc2,
304};
305
306static struct platform_device igep2_vwlan_device = {
307 .name = "reg-fixed-voltage",
308 .id = 0,
309 .dev = {
310 .platform_data = &igep2_vwlan,
311 },
312};
313
268static struct omap2_hsmmc_info mmc[] = { 314static struct omap2_hsmmc_info mmc[] = {
269 { 315 {
270 .mmc = 1, 316 .mmc = 1,
@@ -362,12 +408,6 @@ static int igep2_twl_gpio_setup(struct device *dev,
362 omap2_hsmmc_init(mmc); 408 omap2_hsmmc_init(mmc);
363 409
364 /* 410 /*
365 * link regulators to MMC adapters ... we "know" the
366 * regulators will be set up only *after* we return.
367 */
368 igep2_vmmc1_supply.dev = mmc[0].dev;
369
370 /*
371 * REVISIT: need ehci-omap hooks for external VBUS 411 * REVISIT: need ehci-omap hooks for external VBUS
372 * power switch and overcurrent detect 412 * power switch and overcurrent detect
373 */ 413 */
@@ -478,6 +518,7 @@ static void __init igep2_display_init(void)
478 518
479static struct platform_device *igep2_devices[] __initdata = { 519static struct platform_device *igep2_devices[] __initdata = {
480 &igep2_dss_device, 520 &igep2_dss_device,
521 &igep2_vwlan_device,
481}; 522};
482 523
483static void __init igep2_init_irq(void) 524static void __init igep2_init_irq(void)
@@ -505,7 +546,7 @@ static struct twl4030_platform_data igep2_twldata = {
505 .gpio = &igep2_twl4030_gpio_pdata, 546 .gpio = &igep2_twl4030_gpio_pdata,
506 .vmmc1 = &igep2_vmmc1, 547 .vmmc1 = &igep2_vmmc1,
507 .vpll2 = &igep2_vpll2, 548 .vpll2 = &igep2_vpll2,
508 549 .vio = &igep2_vio,
509}; 550};
510 551
511static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = { 552static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {