提交 0a7ab045 编写于 作者: K Kishon Vijay Abraham I 提交者: Tom Rini

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: NKishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: NTom Rini <trini@konsulko.com>
上级 7beaf8b6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册