summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2012-01-31 17:53:11 +0530
committerAndy Green <andy.green@linaro.org>2012-06-07 09:55:45 +0800
commit97d946f4e174c684d4c0e60a0860f8a72c87d4ca (patch)
tree03a72c25e35e0201fc2dc4bfb5ab9014ce126da5 /drivers/usb
parent1918965f2a9f90f47cf6d9ff6ad6b04410feb22f (diff)
downloadpanda-97d946f4e174c684d4c0e60a0860f8a72c87d4ca.tar.gz
OMAP5: EHCI: Add ehci port support for omap5 evm
On omap5 board port2 is connected to smsc4640 hub having two downstream ports and port3 is connected to SMSC LAN9730 controller so add the port2/3 support and both controllers need gpio reset, update uhh_pdata with appropriate gpio numbers. Currently ehci module limits gpio reset only to two ports hence add port3 gpio reset which will be used in omap5 board by ethernet chip. Both port3 and port2 are configured in hsic mode as per external smsc controllers requirements. Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-omap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 5c78f9e7146..daf30207ae7 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -201,6 +201,10 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
gpio_request_one(pdata->reset_gpio_port[1],
GPIOF_OUT_INIT_LOW, "USB2 PHY reset");
+ if (gpio_is_valid(pdata->reset_gpio_port[2]))
+ gpio_request_one(pdata->reset_gpio_port[2],
+ GPIOF_OUT_INIT_LOW, "USB3 PHY reset");
+
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(10);
}
@@ -262,6 +266,9 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
if (gpio_is_valid(pdata->reset_gpio_port[1]))
gpio_set_value(pdata->reset_gpio_port[1], 1);
+
+ if (gpio_is_valid(pdata->reset_gpio_port[2]))
+ gpio_set_value(pdata->reset_gpio_port[2], 1);
}
return 0;
@@ -270,6 +277,15 @@ err_add_hcd:
disable_put_regulator(pdata);
pm_runtime_put_sync(dev);
+ if (pdata->phy_reset) {
+ if (gpio_is_valid(pdata->reset_gpio_port[0]))
+ gpio_free(pdata->reset_gpio_port[0]);
+ if (gpio_is_valid(pdata->reset_gpio_port[1]))
+ gpio_free(pdata->reset_gpio_port[1]);
+ if (gpio_is_valid(pdata->reset_gpio_port[2]))
+ gpio_free(pdata->reset_gpio_port[2]);
+ }
+
err_io:
iounmap(regs);
return ret;