summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorMaulik Mankad <x0082077@ti.com>2009-10-29 11:34:40 +0530
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2009-10-31 19:29:35 +0530
commite34268fc6c5b48c85a9fb7d0d34aebb3a2d5e1c3 (patch)
tree19beb0f4902a7361ea14d6037e8b30effee59738 /arch/arm/mach-omap2
parent0945108d4b814c6691a5ea143601a48e66fd521f (diff)
OMAP: EHCI: GPIO Hack for PHY reset issue
Signed-off-by: Maulik Mankad <x0082077@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/usb-ehci.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index 0a868ac5965f..1621e048c135 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -18,6 +18,7 @@
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/delay.h>
+#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <asm/io.h>
@@ -381,6 +382,18 @@ void __init usb_ehci_init(enum ehci_hcd_omap_mode phy_mode,
if (cpu_is_omap34xx())
setup_ehci_io_mux(phy_mode);
+#define USBHOST_PORT1_GPIO 57
+#define USBHOST_PORT2_GPIO 61
+ /* EHCI PHY Reset hacks */
+ gpio_request(USBHOST_PORT1_GPIO, "USB1 PHY RESET");
+ gpio_direction_output(USBHOST_PORT1_GPIO, 1);
+ gpio_request(USBHOST_PORT2_GPIO, "USB2 PHY RESET");
+ gpio_direction_output(USBHOST_PORT2_GPIO, 1);
+ udelay(500);
+ gpio_set_value(USBHOST_PORT1_GPIO, 0);
+ gpio_set_value(USBHOST_PORT2_GPIO, 0);
+
+
if (platform_device_register(&ehci_device) < 0) {
printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
return;