[PATCH 1/2] omap3: beaglexm: fix EHCI power up GPIO dir
From: Koen Kooi
Date: Thu Jan 06 2011 - 13:08:15 EST
EHCI enable power pin is inverted (active high) in comparison
to vanilla beagle which is active low. Handle this case conditionally.
[nm@xxxxxx: helped split up]
Signed-off-by: Nishanth Menon <nm@xxxxxx>
Signed-off-by: Koen Kooi <koen@xxxxxxxxxxxxxxx>
---
arch/arm/mach-omap2/board-omap3beagle.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 6c12760..1b5aa7a 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -297,9 +297,16 @@ 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;
--
1.6.3.3
--------------070407080708020700080200
Content-Type: text/x-patch;
name="0002-omap3-beaglexm-fix-DVI-reset-GPIO.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="0002-omap3-beaglexm-fix-DVI-reset-GPIO.patch"