On 6/29/26 10:43 AM, Jens Wiklander wrote:
Sync Linux kernel dwc3 changes from v4.15 to v4.16.
The following files are preserved accross the import:
Makefile Kconfig dwc3-meson-g12a.c dwc3-meson-gxl.c dwc3-omap.c
dwc3-uniphier.c dwc3-generic.h dwc3-generic.c dwc3-generic-sti.c
dwc3-layerscape.c ti_usb_phy.c
Skipping unused files:
debugfs.c drd.c dwc3-exynos.c dwc3-haps.c dwc3-imx8mp.c dwc3-keystone.c
dwc3-octeon.c dwc3-of-simple.c dwc3-pci.c dwc3-qcom.c dwc3-qcom-legacy.c
dwc3-rtk.c dwc3-st.c dwc3-xilinx.c host.c trace.c trace.h ulpi.c
Note that this is a raw import and doesn't build.
A fixup commit at the end of the series fixes that.
List of commits: git log --oneline v4.15..v4.16
Commits imported:
084a804e0120 usb: dwc3: Fix lock-up on ID change during system suspend/resume
98112041bcca usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init
during suspend/resume
b16ea8b9492e usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
c49f63055e25 usb: dwc3: omap: don't miss events during suspend/resume
c4a5153e87fd usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode
00b42170c86f usb: dwc3: Undo PHY init if soft reset fails
f035d139ffec usb: dwc3: ep0: Reset TRB counter for ep0 IN
6180026341e8 usb: dwc3: gadget: Set maxpacket size for ep0 IN
bff52352e0cc usb: dwc3: of-simple: fix oops by unbalanced clk disable call
f1faf88c137b Merge tag 'phy-for-4.16' of
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
958e052c5448 Merge tag 'usb-for-v4.16' of
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
d8c80bb3b55b phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800
d9e3d899bc7a Merge 4.15-rc4 into usb-next
42bf02ec6e42 usb: dwc3: Allow disabling of metastability workaround
204ec1af6257 usb: dwc3: Make sparse a bit happier
19e0b203bfbd usb: dwc3: ep0: use gadget->isoch_delay for isoch_delay value
0c5d2954f690 usb: dwc3: debug: decode a few more features
Signed-off-by: Jens Wiklander <[email protected]>
Tested-by: Alexey Charkov <[email protected]>
---
drivers/usb/dwc3/core.c | 93 ++++++++++++++++++++++++++++-----------
drivers/usb/dwc3/core.h | 26 +++++++----
drivers/usb/dwc3/debug.h | 9 ++++
drivers/usb/dwc3/ep0.c | 13 +++---
drivers/usb/dwc3/gadget.c | 8 +++-
5 files changed, 106 insertions(+), 43 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 07832509584f..e94bf91cc58a 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -100,6 +100,8 @@ static void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode)
reg &= ~(DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_OTG));
reg |= DWC3_GCTL_PRTCAPDIR(mode);
dwc3_writel(dwc->regs, DWC3_GCTL, reg);
+
+ dwc->current_dr_role = mode;
}
static void __dwc3_set_mode(struct work_struct *work)
@@ -133,8 +135,6 @@ static void __dwc3_set_mode(struct work_struct *work)
dwc3_set_prtcap(dwc, dwc->desired_dr_role);
- dwc->current_dr_role = dwc->desired_dr_role;
-
spin_unlock_irqrestore(&dwc->lock, flags);
switch (dwc->desired_dr_role) {
@@ -147,6 +147,7 @@ static void __dwc3_set_mode(struct work_struct *work)
otg_set_vbus(dwc->usb2_phy->otg, true);
phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST);
+ phy_calibrate(dwc->usb2_generic_phy);
Does this actually compile ? I don't think U-Boot code base contains
phy_calibrate() function ?