diff options
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/fsl-mph-dr-of.c | 13 | ||||
-rw-r--r-- | include/linux/fsl_devices.h | 1 |
3 files changed, 23 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 diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 20a53e1..2c4b7d3 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -96,6 +96,7 @@ struct fsl_usb2_platform_data { unsigned has_fsl_erratum_a005275:1; unsigned has_fsl_erratum_a006918:1; unsigned has_fsl_erratum_a005697:1; + unsigned has_fsl_erratum_a007792:1; /* register save area for suspend/resume */ u32 pm_command; |