summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorNikhil Badola <nikhil.badola@freescale.com>2014-03-26 03:17:42 (GMT)
committerJose Rivera <German.Rivera@freescale.com>2014-03-28 01:30:07 (GMT)
commitb6214e2843b10140cebfcd1887d746dbf4c616e2 (patch)
tree5559ed628944d8cf1578eaefb2dd129ad0e92dca /drivers/usb/host
parent224220a55c6b7254739840fadbf3a79722821b1b (diff)
downloadlinux-fsl-qoriq-b6214e2843b10140cebfcd1887d746dbf4c616e2.tar.xz
fsl/usb : Workaround for USB Erratum A007792
USB controller version-2.5 requires to enable internal UTMI phy and program PTS field in PORTSC register before asserting controller reset. This is must for successful resetting of the controller and subsequent enumeration of usb devices Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Change-Id: Ibebdc44bf75f5da69f2e9b6346bfecb442a784b0 Reviewed-on: http://git.am.freescale.net:8181/10301 Reviewed-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-fsl.c9
-rw-r--r--drivers/usb/host/fsl-mph-dr-of.c13
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 4affcd0..e3a386a 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -193,6 +193,15 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
if (pdata->have_sysif_regs && pdata->controller_ver < FSL_USB_VER_1_6)
setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4);
+ /*
+ * Enable UTMI phy and program PTS field in UTMI mode before asserting
+ * controller reset for USB Controller version 2.5
+ */
+ if (pdata->has_fsl_erratum_a007792) {
+ writel_be(CTRL_UTMI_PHY_EN, hcd->regs + FSL_SOC_USB_CTRL);
+ writel(PORT_PTS_UTMI, hcd->regs + FSL_SOC_USB_PORTSC1);
+ }
+
/* Don't need to set host mode here. It will be done by tdi_reset() */
retval = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_NO_SUSPEND);
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 67fe2b6..c2c58cf 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -190,6 +190,14 @@ static bool has_erratum_a005697(void)
return flag;
}
+static bool has_erratum_a007792(int controller_ver)
+{
+ if (controller_ver == FSL_USB_VER_2_5)
+ return true;
+ else
+ return false;
+}
+
static int usb_get_ver_info(struct device_node *np)
{
int ver = -1;
@@ -298,6 +306,11 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
else
pdata->has_fsl_erratum_a005697 = 0;
+ if (has_erratum_a007792(pdata->controller_ver))
+ pdata->has_fsl_erratum_a007792 = 1;
+ else
+ pdata->has_fsl_erratum_a007792 = 0;
+
if (of_get_property(np, "fsl,erratum_a006918", NULL))
pdata->has_fsl_erratum_a006918 = 1;
else