This series adds USB host support for the SpacemiT K1: a driver for the K1's USB 2.0 (UTMI) PHY, and a flat-node entry for the SoC's DWC3 controller in dwc3-generic, which already handles clocks, resets, PHYs and the host child for other flat-node SoCs. No K1-specific glue is needed. USB 3 additionally needs the posted combo PHY series [1].
The patches apply to next at bd2f5794 and to current next (ed869863c7e2), after the posted combo PHY series [1]. They also apply with the pending DWC3 resync [2], which does not change dwc3-generic.c. The existing DWC3 flat-node users keep their original rk_ops entries. [1] https://lists.u-boot-project.org/pipermail/u-boot/2026-October/633775.html [2] https://lists.u-boot-project.org/pipermail/u-boot/2026-October/633722.html A targeted RISC-V build on current next (ed869863c7e2), with the posted combo PHY prerequisites and these two patches, compiles the K1 USB2 PHY and generic DWC3 objects without compiler warnings. The configuration checks pass. Complete R2S and RV2 firmware builds on current next (ed869863c7e2), with the maintained K1 prerequisites and these two patches, also pass, and the compiled generic DWC3 objects retain rk_ops. With that firmware on both boards, seven 64 MiB raw/FAT read pairs pass SHA-256 and byte comparison at 5 Gb/s, including reads after each of three USB resets and after a stop/start cycle. Automatic USB EFI selection and boot of the USB-loaded FreeBSD kernel with the board's native root also pass. Cold-boot, full USB-root and sustained testing remain open. Changes in v2: - Drop the rk_ops rename from patch 2/2, as requested by Marek Vasut. Add only the spacemit,k1-dwc3 compatible entry using the existing rk_ops. - Patch 1/2 is unchanged. Dave Klotz (2): phy: spacemit: add K1 USB 2.0 PHY driver usb: dwc3: generic: add SpacemiT K1 support MAINTAINERS | 1 + drivers/phy/spacemit/Kconfig | 9 ++ drivers/phy/spacemit/Makefile | 1 + drivers/phy/spacemit/phy-k1-usb2.c | 173 +++++++++++++++++++++++++++++ drivers/usb/dwc3/dwc3-generic.c | 1 + 5 files changed, 185 insertions(+)
