summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-msm-usb.c
diff options
context:
space:
mode:
authorTim Bird <tbird20d@gmail.com>2014-04-28 15:34:19 +0200
committerFelipe Balbi <balbi@ti.com>2014-04-30 18:29:40 +0200
commit9f27984b9e098ce0a35b210ec0315c76108494e4 (patch)
treebee39ae23a360c05059d13e8edaee6526d28ac38 /drivers/usb/phy/phy-msm-usb.c
parentusb: phy: msm: Correct USB PHY Reset sequence for newer platform (diff)
downloadlinux-9f27984b9e098ce0a35b210ec0315c76108494e4.tar.xz
linux-9f27984b9e098ce0a35b210ec0315c76108494e4.zip
usb: phy: msm: Fix PTS definitions for MSM USB controller
Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB controller. This is a standard chipidea PORTSC definition, where a PHY_TYPE of 10b (<<30) is ULPI and 11b (<<30) is SERIAL. Fix the definitions and use them correctly in the driver code. Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-msm-usb.c')
-rw-r--r--drivers/usb/phy/phy-msm-usb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index bb339963f8bb..db8d96377620 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -287,8 +287,9 @@ static int msm_link_reset(struct msm_otg *motg)
if (motg->phy_number)
writel(readl(USB_PHY_CTRL2) | BIT(16), USB_PHY_CTRL2);
+ /* put transceiver in serial mode as part of reset */
val = readl(USB_PORTSC) & ~PORTSC_PTS_MASK;
- writel(val | PORTSC_PTS_ULPI, USB_PORTSC);
+ writel(val | PORTSC_PTS_SERIAL, USB_PORTSC);
return 0;
}
@@ -308,8 +309,9 @@ static int msm_otg_reset(struct usb_phy *phy)
if (cnt >= LINK_RESET_TIMEOUT_USEC)
return -ETIMEDOUT;
- /* select ULPI phy */
- writel(0x80000000, USB_PORTSC);
+ /* select ULPI phy and clear other status/control bits in PORTSC */
+ writel(PORTSC_PTS_ULPI, USB_PORTSC);
+
writel(0x0, USB_AHBBURST);
writel(0x08, USB_AHBMODE);