Patchworkβ [1/2] AM35xx: Add USB EHCI support

login
register
about
Submitter Ajay Kumar Gupta
Date 2009-11-04 14:18:32
Message ID <1257344313-14370-1-git-send-email-ajay.gupta@ti.com>
Download mbox | patch
Permalink /patch/57589/
State Accepted, archived
Delegated to: Tony Lindgren
Headers show

Comments

Ajay Kumar Gupta - 2009-11-04 14:18:32
AM3517 EVM has one EHCI interface on baseboard using port1 and another
EHCI interface on UI card using port2.

GPIO57 is used as port1 PHY reset system reset line is used as port2
PHY reset.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
---
Both the patches are created against linux-omap/master branch and
on top of below patches supporting AM35xx.
[1] AM35xx: Runtime detection of the device
[2] AM35xx: Define the AM3517EVM board
[3] AM35xx: Add support for AM3517 EVM board
[4] AM35xx: Defconfig for AM3517 EVM board

 arch/arm/mach-omap2/board-am3517evm.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 23cf949..415a13d 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -28,6 +28,7 @@ 
 
 #include <plat/board.h>
 #include <plat/common.h>
+#include <plat/usb.h>
 
 /*
  * Board initialization
@@ -48,12 +49,24 @@  static void __init am3517_evm_init_irq(void)
 	omap_gpio_init();
 }
 
+static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
+	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+	.phy_reset  = true,
+	.reset_gpio_port[0]  = 57,
+	.reset_gpio_port[1]  = -EINVAL,
+	.reset_gpio_port[2]  = -EINVAL
+};
+
 static void __init am3517_evm_init(void)
 {
 	platform_add_devices(am3517_evm_devices,
 				ARRAY_SIZE(am3517_evm_devices));
 
 	omap_serial_init();
+	usb_ehci_init(&ehci_pdata);
 }
 
 static void __init am3517_evm_map_io(void)