summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayavardhan Vennapusa <vvreddy@codeaurora.org>2017-05-04 13:00:54 +0530
committerVijayavardhan Vennapusa <vvreddy@codeaurora.org>2017-05-18 18:33:56 +0530
commit3962558023b59fe41f94daadfb68bcf11015c712 (patch)
treeb37ce2d61162d5e387a81751f9106406e0193878
parent74fd4e30fc565dfbce5b0ce1ce56c0c42696338a (diff)
usb-phy-qusb: powerdown PHY during disconnect to avoid leakage
Currently PHY driver is using TCSR_QUSB2PHY_CLAMP_DIG_N_1P8 register to avoid leakage issue seen during disconnect. But this could fail USB ports working independently if this register is used as that could clamp both inputs going to two QUSB2 PHY on platforms having USB2 port. To fix this, it is recommended to powerdown QUSB2 PHY by setting powerdown bit in QUSB2PHY_PORT_POWER_DOWN register during disconnect and removing writing 0x0 to TCSR register. Removed updating TCSR register from dts file as separate change. Change-Id: I6b0915faa346e5d88310106eeddb3c7a1bfb1d08 Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
-rw-r--r--drivers/usb/phy/phy-msm-qusb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-msm-qusb.c b/drivers/usb/phy/phy-msm-qusb.c
index 5867c6c204c9..6a2529ec1511 100644
--- a/drivers/usb/phy/phy-msm-qusb.c
+++ b/drivers/usb/phy/phy-msm-qusb.c
@@ -752,6 +752,9 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
writel_relaxed(0x00,
qphy->base + QUSB2PHY_PORT_INTR_CTRL);
+ /* Disable PHY */
+ writel_relaxed(POWER_DOWN,
+ qphy->base + QUSB2PHY_PORT_POWERDOWN);
/* Make sure that above write is completed */
wmb();