diff options
author | Felipe Balbi <balbi@ti.com> | 2014-06-23 17:18:24 -0500 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-07-09 22:11:51 +0200 |
commit | 5ba95541b700d2edecb4d97d4b905f51ed8551b3 (patch) | |
tree | 26c9d9f31c03ce6815b63ef152d026a895907004 /drivers/usb | |
parent | 26707d9e6bb0d2e5e6de706cd68bddcea34e731f (diff) | |
download | u-boot-imx-5ba95541b700d2edecb4d97d4b905f51ed8551b3.zip u-boot-imx-5ba95541b700d2edecb4d97d4b905f51ed8551b3.tar.gz u-boot-imx-5ba95541b700d2edecb4d97d4b905f51ed8551b3.tar.bz2 |
usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x
Newer AM437x silicon requires us to explicitly power up
the USB2 PHY. By implementing usb_phy_power() we can
achieve that.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/phy/omap_usb_phy.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/usb/phy/omap_usb_phy.c b/drivers/usb/phy/omap_usb_phy.c index af46db2..f78d532 100644 --- a/drivers/usb/phy/omap_usb_phy.c +++ b/drivers/usb/phy/omap_usb_phy.c @@ -222,7 +222,22 @@ static void am437x_enable_usb2_phy2(struct omap_xhci *omap) void usb_phy_power(int on) { - return; + u32 val; + + /* USB1_CTRL */ + val = readl(USB1_CTRL); + if (on) { + /* + * these bits are re-used on AM437x to power up/down the USB + * CM and OTG PHYs, if we don't toggle them, USB will not be + * functional on newer silicon revisions + */ + val &= ~(USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN); + } else { + val |= USB1_CTRL_CM_PWRDN | USB1_CTRL_OTG_PWRDN; + } + + writel(val, USB1_CTRL); } #endif /* CONFIG_AM437X_USB2PHY2_HOST */ |