diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2015-08-10 16:52:56 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-28 12:33:20 -0400 |
commit | 0a7ab045b9b50b20806c0dd523c068c19f4f9cde (patch) | |
tree | 93973e0bafb8e09d65f8edc9265da6386a637d30 /drivers/usb/dwc3/ti_usb_phy.c | |
parent | 7beaf8b6903f2ef4ab8d1d36ee4b0ea4e8611ffd (diff) | |
download | u-boot-imx-0a7ab045b9b50b20806c0dd523c068c19f4f9cde.zip u-boot-imx-0a7ab045b9b50b20806c0dd523c068c19f4f9cde.tar.gz u-boot-imx-0a7ab045b9b50b20806c0dd523c068c19f4f9cde.tar.bz2 |
TI PHY: Add support to control 2nd USB PHY in DRA7xx/AM57xx
Added support to power on/power off the second USB PHY present in
DRA7xx and AM57xx.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/usb/dwc3/ti_usb_phy.c')
-rw-r--r-- | drivers/usb/dwc3/ti_usb_phy.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c index e6048eb..4159e5a 100644 --- a/drivers/usb/dwc3/ti_usb_phy.c +++ b/drivers/usb/dwc3/ti_usb_phy.c @@ -193,8 +193,11 @@ void ti_usb2_phy_power(struct ti_usb_phy *phy, int on) val = readl(phy->usb2_phy_power); if (on) { -#ifdef CONFIG_DRA7XX - val &= ~OMAP_CTRL_DEV_PHY_PD; +#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX) + if (phy->index == 1) + val &= ~OMAP_CTRL_USB2_PHY_PD; + else + val &= ~OMAP_CTRL_DEV_PHY_PD; #elif defined(CONFIG_AM43XX) val &= ~(AM437X_CTRL_USB2_PHY_PD | AM437X_CTRL_USB2_OTG_PD); @@ -202,8 +205,12 @@ void ti_usb2_phy_power(struct ti_usb_phy *phy, int on) AM437X_CTRL_USB2_OTGSESSEND_EN); #endif } else { -#ifdef CONFIG_DRA7XX - val |= OMAP_CTRL_DEV_PHY_PD; +#if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX) + if (phy->index == 1) + val |= OMAP_CTRL_USB2_PHY_PD; + else + val |= OMAP_CTRL_DEV_PHY_PD; + #elif defined(CONFIG_AM43XX) val &= ~(AM437X_CTRL_USB2_OTGVDET_EN | AM437X_CTRL_USB2_OTGSESSEND_EN); |