diff options
author | Dan Murphy <dmurphy@ti.com> | 2013-10-11 12:28:18 -0500 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-10-20 23:42:41 +0200 |
commit | 3d799c7f5e0dd2bea3f4ec839ad7692f7122d992 (patch) | |
tree | 0cce5e5408e5949d608b39ddbb80e2a5476ddf06 /drivers | |
parent | 834e91af432479e3808e9cbd1d38199f724fc5aa (diff) | |
download | u-boot-imx-3d799c7f5e0dd2bea3f4ec839ad7692f7122d992.zip u-boot-imx-3d799c7f5e0dd2bea3f4ec839ad7692f7122d992.tar.gz u-boot-imx-3d799c7f5e0dd2bea3f4ec839ad7692f7122d992.tar.bz2 |
usb: am437x: Add support for am437x xhci USB host
Add the support for the am437x xhci usb host.
The xHCI host on AM437 is connected to a usb2 phy so need to
add support to enable those clocks.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/phy/omap_usb_phy.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c index f074a88..af46db2 100644 --- a/drivers/usb/phy/omap_usb_phy.c +++ b/drivers/usb/phy/omap_usb_phy.c @@ -207,6 +207,25 @@ void usb_phy_power(int on) } #endif /* CONFIG_OMAP_USB2PHY2_HOST */ +#ifdef CONFIG_AM437X_USB2PHY2_HOST +static void am437x_enable_usb2_phy2(struct omap_xhci *omap) +{ + const u32 usb_otg_ss_clk_val = (USBOTGSSX_CLKCTRL_MODULE_EN | + USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960); + + writel(usb_otg_ss_clk_val, PRM_PER_USB_OTG_SS0_CLKCTRL); + writel(usb_otg_ss_clk_val, PRM_PER_USB_OTG_SS1_CLKCTRL); + + writel(USBPHYOCPSCP_MODULE_EN, PRM_PER_USBPHYOCP2SCP0_CLKCTRL); + writel(USBPHYOCPSCP_MODULE_EN, PRM_PER_USBPHYOCP2SCP1_CLKCTRL); +} + +void usb_phy_power(int on) +{ + return; +} +#endif /* CONFIG_AM437X_USB2PHY2_HOST */ + void omap_reset_usb_phy(struct dwc3 *dwc3_reg) { /* Assert USB3 PHY reset */ @@ -231,6 +250,10 @@ void omap_enable_phy(struct omap_xhci *omap) omap_enable_usb2_phy2(omap); #endif +#ifdef CONFIG_AM437X_USB2PHY2_HOST + am437x_enable_usb2_phy2(omap); +#endif + #ifdef CONFIG_OMAP_USB3PHY1_HOST omap_enable_usb3_phy(omap); omap_usb3_phy_init(omap->usb3_phy); |