2019-06-24 07:22:16

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH v8 1/5] usb: fsl: Set USB_EN bit to select ULPI phy

From: Nikhil Badola <[email protected]>

Set USB_EN bit to select ULPI phy for USB controller version 2.5

Signed-off-by: Nikhil Badola <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
Change in v2:
replace Yinbo.Zhu with Yinbo Zhu.
Change in v3:
Code base already has patch[5/6], so remove it.
Change in v4:
Incorrect indentation of the continuation line.

drivers/usb/host/ehci-fsl.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index e3d0c1c25160..38674b7aa51e 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -122,6 +122,12 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
tmp |= 0x4;
iowrite32be(tmp, hcd->regs + FSL_SOC_USB_CTRL);
}
+
+ /* Set USB_EN bit to select ULPI phy for USB controller version 2.5 */
+ if (pdata->controller_ver == FSL_USB_VER_2_5 &&
+ pdata->phy_mode == FSL_USB2_PHY_ULPI)
+ iowrite32be(USB_CTRL_USB_EN, hcd->regs + FSL_SOC_USB_CTRL);
+
/*
* Enable UTMI phy and program PTS field in UTMI mode before asserting
* controller reset for USB Controller version 2.5
--
2.17.1


2019-06-24 07:22:36

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH v8 5/5] usb :fsl: Change string format for errata property

From: Nikhil Badola <[email protected]>

Remove USB errata checking code from driver. Applicability of erratum
is retrieved by reading corresponding property in device tree.
This property is written during device tree fixup.

Signed-off-by: Ramneek Mehresh <[email protected]>
Signed-off-by: Nikhil Badola <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
drivers/usb/host/fsl-mph-dr-of.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 762b97600ab0..ae8f60f6e6a5 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -226,11 +226,8 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
of_property_read_bool(np, "fsl,usb_erratum-a005697");
pdata->has_fsl_erratum_a006918 =
of_property_read_bool(np, "fsl,usb_erratum-a006918");
-
- if (of_get_property(np, "fsl,usb_erratum_14", NULL))
- pdata->has_fsl_erratum_14 = 1;
- else
- pdata->has_fsl_erratum_14 = 0;
+ pdata->has_fsl_erratum_14 =
+ of_property_read_bool(np, "fsl,usb_erratum-14");

/*
* Determine whether phy_clk_valid needs to be checked
--
2.17.1