[RFC PATCH v2 00/64] drivers: usb: dwc3: sync code with Linux v6.16-rc7
Jens Wiklander
jens.wiklander at linaro.org
Tue May 19 09:48:43 CEST 2026
Hi,
On Mon, May 11, 2026 at 8:31 AM Michal Simek <michal.simek at amd.com> wrote:
>
>
>
> On 5/8/26 17:42, Simon Glass wrote:
> > Hi Jens,
> >
> > On Thu, 7 May 2026 at 03:28, Jens Wiklander <jens.wiklander at linaro.org> wrote:
> >>
> >> Hi,
> >>
> >> This is a follow-up to Jerome's patchset [1], addressing previous feedback
> >> regarding the monolithic nature of the driver update.
> >>
> >> The DWC3 USB driver was forked from the Linux kernel v3.19-rc1 eleven years
> >> ago by commit 85d5e7075f33 ("usb: dwc3: add dwc3 folder from linux kernel
> >> to u-boot"). Since then, not many kernel changes have been ported back into
> >> U-Boot.
> >>
> >> This series synchronizes the DWC3 core with Linux v6.16-rc7. To provide
> >> a clear audit trail and maintain bisectability, I have structured the
> >> series as follows:
> >>
> >> 1. Restore to Baseline: The first commit reverts U-Boot-specific changes
> >> to drivers/usb/dwc3 to return the directory to a clean v3.19-rc1 state.
> >> 2. Milestone Imports: A sequence of 50+ commits follows, each performing
> >> a "snapshot" import of the drivers/usb/dwc3 directory for every major
> >> kernel version (v3.19 through v6.16-rc7).
> >> 3. U-Boot Adaptation: The final commits (based on Jerome's original work)
> >> re-introduce the necessary glue code, XHCI/UDC updates, and build fixes
> >> required for U-Boot integration.
> >>
> >> The final diff is identical to [1]. I decided to stick with that for now to
> >> focus on the method of how we import or update the code.
> >>
> >> Note that this is compile-tested only. The CI pipeline on source.denx.de
> >> was used as an OK/NOK indicator [2].
> >>
> >> The previous patchset was tested on xilinx_zynqmp_kria_defconfig and since
> >> this diff is identical to the previous, it should still work on that
> >> platform. With the help of a custom build script [3] and with an additional
> >> patch [4], I could boot the Kria KV260 board and make it detect a USB SSD
> >> plugged into one of its USB 3.0 ports. It certainly doesn't mean all
> >> platforms using the DWC3 driver are still OK, but at least there is some
> >> hope. If this breaks your platform I'd like to know, and if you can send a
> >> fix it's even better.
> >>
> >> I tried cherry-picking all the 1000+ patches in v3.19-rc1..v6.16-rc7. There
> >> were a few conflicts, even when backing out the original U-Boot patches on
> >> top of the original v3.19-rc1 import. However, the resulting state still
> >> diverged significantly from [1].
> >>
> >> Instead, I've imported each new kernel in a separate commit. That way it's
> >> very clear which kernel patches are included. Since there aren't too many
> >> patches for each kernel I'm listing the relevant commits in the U-Boot
> >> commit message for easier reference. I did this with a script so it's easy
> >> to make changes, if the approach is OK but we need to tune it. With this
> >> approach it should be easy to tell if a Fixes patch for the kernel might
> >> also be needed here.
> >>
> >> Thanks,
> >> Jens
> >>
> >> [1] https://lore.kernel.org/all/20251121153812.2076440-1-jerome.forissier@linaro.org/
> >> [2] https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/30004
> >> [3] https://source.denx.de/u-boot/u-boot-extras/-/raw/master/contrib/jforissier/zynqmp_kv260_build.sh
> >> [4] https://gitlab.com/Linaro/trustedsubstrate/meta-ts/-/raw/master/meta-trustedsubstrate/recipes-bsp/u-boot/u-boot/zynqmp-kria-starter/0001-kv260-fix-usb.patch
> >>
> >> RFC v1 -> RFC v2:
> >> - Split the v1 ("usb: dwc3: re-import from kernel v6.16-rc7") into ("usb:
> >> dwc3: restore to original v3.19-rc1 kernel import"), ("usb: dwc3: import
> >> from kernel v3.19)..("usb: dwc3: import from kernel v6.16-rc7")
> >>
> >> Jens Wiklander (60):
> >> usb: dwc3: restore to original v3.19-rc1 kernel import
> >> usb: dwc3: import from kernel v3.19
> >> usb: dwc3: import from kernel v4.0
> >> usb: dwc3: import from kernel v4.1
> >> usb: dwc3: import from kernel v4.2
> >> usb: dwc3: import from kernel v4.3
> >> usb: dwc3: import from kernel v4.4
> >> usb: dwc3: import from kernel v4.5
> >> usb: dwc3: import from kernel v4.6
> >> usb: dwc3: import from kernel v4.7
> >> usb: dwc3: import from kernel v4.8
> >> usb: dwc3: import from kernel v4.9
> >> usb: dwc3: import from kernel v4.10
> >> usb: dwc3: import from kernel v4.11
> >> usb: dwc3: import from kernel v4.12
> >> usb: dwc3: import from kernel v4.13
> >> usb: dwc3: import from kernel v4.14
> >> usb: dwc3: import from kernel v4.15
> >> usb: dwc3: import from kernel v4.16
> >> usb: dwc3: import from kernel v4.17
> >> usb: dwc3: import from kernel v4.18
> >> usb: dwc3: import from kernel v4.19
> >> usb: dwc3: import from kernel v4.20
> >> usb: dwc3: import from kernel v5.0
> >> usb: dwc3: import from kernel v5.1
> >> usb: dwc3: import from kernel v5.2
> >> usb: dwc3: import from kernel v5.3
> >> usb: dwc3: import from kernel v5.4
> >> usb: dwc3: import from kernel v5.5
> >> usb: dwc3: import from kernel v5.6
> >> usb: dwc3: import from kernel v5.7
> >> usb: dwc3: import from kernel v5.8
> >> usb: dwc3: import from kernel v5.9
> >> usb: dwc3: import from kernel v5.10
> >> usb: dwc3: import from kernel v5.11
> >> usb: dwc3: import from kernel v5.12
> >> usb: dwc3: import from kernel v5.13
> >> usb: dwc3: import from kernel v5.14
> >> usb: dwc3: import from kernel v5.15
> >> usb: dwc3: import from kernel v5.16
> >> usb: dwc3: import from kernel v5.17
> >> usb: dwc3: import from kernel v5.18
> >> usb: dwc3: import from kernel v5.19
> >> usb: dwc3: import from kernel v6.0
> >> usb: dwc3: import from kernel v6.1
> >> usb: dwc3: import from kernel v6.2
> >> usb: dwc3: import from kernel v6.3
> >> usb: dwc3: import from kernel v6.4
> >> usb: dwc3: import from kernel v6.5
> >> usb: dwc3: import from kernel v6.6
> >> usb: dwc3: import from kernel v6.7
> >> usb: dwc3: import from kernel v6.8
> >> usb: dwc3: import from kernel v6.9
> >> usb: dwc3: import from kernel v6.10
> >> usb: dwc3: import from kernel v6.11
> >> usb: dwc3: import from kernel v6.12
> >> usb: dwc3: import from kernel v6.13
> >> usb: dwc3: import from kernel v6.14
> >> usb: dwc3: import from kernel v6.15
> >> usb: dwc3: import from kernel v6.16-rc7
> >>
> >> Jerome Forissier (4):
> >> usb: host: re-import xhci-ext-caps.h from kernel v6.16-rc7
> >> usb: gadget: re-import epautoconf.c from kernel v6.16-rc7
> >> usb: udc: re-import udc-core.c from kernel v6.16-rc7
> >> usb: fix build after resync of DWC3 with kernel v6.16-rc7
> >>
> >> drivers/usb/cdns3/ep0.c | 8 +-
> >> drivers/usb/common/common.c | 23 +
> >> drivers/usb/dwc3/Makefile | 57 +-
> >> drivers/usb/dwc3/core.c | 1780 ++++++----
> >> drivers/usb/dwc3/core.h | 1120 +++++--
> >> drivers/usb/dwc3/debug.h | 432 +++
> >> drivers/usb/dwc3/dwc3-omap.c | 2 -
> >> drivers/usb/dwc3/ep0.c | 737 +++--
> >> drivers/usb/dwc3/gadget.c | 4152 ++++++++++++++++--------
> >> drivers/usb/dwc3/gadget.h | 124 +-
> >> drivers/usb/dwc3/glue.h | 36 +
> >> drivers/usb/dwc3/io.h | 29 +-
> >> drivers/usb/dwc3/linux-compat.h | 16 -
> >> drivers/usb/dwc3/samsung_usb_phy.c | 77 -
> >> drivers/usb/dwc3/ti_usb_phy.c | 2 -
> >> drivers/usb/gadget/at91_udc.c | 46 -
> >> drivers/usb/gadget/atmel_usba_udc.c | 102 +-
> >> drivers/usb/gadget/ci_udc.c | 419 ---
> >> drivers/usb/gadget/composite.c | 2 +-
> >> drivers/usb/gadget/dwc2_udc_otg.c | 174 +-
> >> drivers/usb/gadget/epautoconf.c | 289 +-
> >> drivers/usb/gadget/ether.c | 21 +-
> >> drivers/usb/gadget/f_acm.c | 20 +-
> >> drivers/usb/gadget/f_fastboot.c | 10 +-
> >> drivers/usb/gadget/f_mass_storage.c | 5 +-
> >> drivers/usb/gadget/f_rockusb.c | 11 +-
> >> drivers/usb/gadget/f_sdp.c | 12 +-
> >> drivers/usb/gadget/f_thor.c | 19 +-
> >> drivers/usb/gadget/udc/Makefile | 1 +
> >> drivers/usb/gadget/udc/udc-core.c | 1096 ++++++-
> >> drivers/usb/host/xhci-dwc3.c | 4 +-
> >> drivers/usb/host/xhci-ext-caps.h | 158 +
> >> drivers/usb/host/xhci-exynos5.c | 2 +-
> >> drivers/usb/mtu3/mtu3_gadget_ep0.c | 16 +-
> >> drivers/usb/musb-new/musb_gadget_ep0.c | 24 +-
> >> drivers/usb/musb-new/musb_uboot.c | 39 -
> >> include/dm/device_compat.h | 13 +
> >> include/dm/read.h | 46 +
> >> include/linux/compat.h | 15 +
> >> include/linux/usb/ch9.h | 25 +-
> >> include/linux/usb/gadget.h | 520 +--
> >> include/linux/usb/otg.h | 10 +
> >> include/linux/usb/phy.h | 56 +
> >> 43 files changed, 7659 insertions(+), 4091 deletions(-)
> >> create mode 100644 drivers/usb/dwc3/debug.h
> >> create mode 100644 drivers/usb/dwc3/glue.h
> >> delete mode 100644 drivers/usb/dwc3/linux-compat.h
> >> delete mode 100644 drivers/usb/dwc3/samsung_usb_phy.c
> >> create mode 100644 drivers/usb/host/xhci-ext-caps.h
> >>
> >>
> >> base-commit: 0f865ab5d68484b4dc1724809de1be06edc85df1
>
> Why is it based on such a old commit ID?
I wanted to keep the same diff as in Jerome's original patch so that
we can evaluate the method without distractions.
It seems the method is acceptable, so I'll prepare a rebased version.
Cheers,
Jens
>
> Thanks,
> Michal
>
> commit 0f865ab5d68484b4dc1724809de1be06edc85df1
> Author: Tom Rini <trini at konsulko.com>
> AuthorDate: Mon Oct 20 13:55:08 2025 -0600
> Commit: Tom Rini <trini at konsulko.com>
> CommitDate: Mon Oct 20 13:55:37 2025 -0600
>
> spl: Restore args file being default in falcon mode
>
> When falcon mode is enabled and SPL_OS_BOOT_SECURE is not enabled,
> restore the previous default behavior of having an args file be
> expected. Platforms which are using a FIT image here and do not need
> this can update at their convenience to disable this option now.
>
> Fixes: b1a3ed068869 ("spl: make args file optional in falcon mode")
> Signed-off-by: Tom Rini <trini at konsulko.com>
>
>
More information about the U-Boot
mailing list