omap3: beaglexm: fix EHCI power up GPIO dir
authorKoen Kooi <koen@beagleboard.org>
Tue, 11 Jan 2011 17:13:35 +0000 (17:13 +0000)
committerTony Lindgren <tony@atomide.com>
Tue, 11 Jan 2011 23:20:19 +0000 (15:20 -0800)
EHCI enable power pin is inverted (active high) in comparison
to vanilla beagle which is active low. Handle this case conditionally.

Without this fix, Beagle XM 4 port EHCI will not function and no
networking will be available

[nm@ti.com: split up, added descriptive changelogs]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Koen Kooi <koen@beagleboard.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-omap3beagle.c

index 6c127605942ffd1fdfaec8dc1f013507dacb7f6d..af1166bd1c868e462e87d97c99f0f134781b679a 100644 (file)
@@ -297,9 +297,15 @@ static int beagle_twl_gpio_setup(struct device *dev,
        gpio_request(gpio + 1, "EHCI_nOC");
        gpio_direction_input(gpio + 1);
 
-       /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+       /*
+        * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+        * high / others active low)
+        */
        gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-       gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+               gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+       else
+               gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
This page took 0.025687 seconds and 5 git commands to generate.