From: Dave Klotz <DaveWK225@protonmail.com>
To: Yixun Lan <dlan@kernel.org>, Marek Vasut <marek.vasut+usb@mailbox.org>
Cc: u-boot@lists.u-boot-project.org,
Quentin Schulz <quentin.schulz@cherry.de>,
Tom Rini <trini@konsulko.com>,
u-boot-spacemit@groups.io, Eric Chung <eric.chung@riscstar.com>,
Huan Zhou <pericycle.cc@gmail.com>,
Guodong Xu <guodong@riscstar.com>,
Raymond Mao <raymond.mao@riscstar.com>
Subject: [PATCH v3 0/3] usb: add K1 USB2 PHY and generic DWC3 support
Date: Wed, 14 Oct 2026 19:59:55 +0000 [thread overview]
Message-ID: <cover.1792007916.git.DaveWK225@protonmail.com> (raw)
In-Reply-To: <20261006T020608-0400.uboot-k1-usb-v2-cover.DaveWK225@protonmail.com>
This series adds USB host support for the SpacemiT K1: a driver for
the K1's USB 2.0 (UTMI) PHY, which the K3 shares, a flat-node entry
for the K1's DWC3 controller in dwc3-generic, which already handles
clocks, resets, PHYs, VBUS and the host child for other flat-node SoCs,
and the defconfig options to use them.
The v2 USB 3 tests also used my combo PHY series [1]. This series
doesn't depend on it, and USB 3 on main without it is untested.
Yixun asked what "polled first and never write" meant in v2 1/2. It
described an earlier FreeBSD driver, not this patch. That driver waited
for PLL_RDY without ever writing PHY_PLL_DIV_CFG, so on the OrangePi
R2S the PLL never locked and the xHCI reset never completed. This
driver writes the divider first, as Linux does, so v3 keeps only that
reason in the commit message.
On VBUS (v2 2/2): the dwc3-generic host driver already gets
vbus-supply and enables it before registering the xHCI controller,
which is what Linux commit 764c2e6e60bf adds for the K1. The R2S
device tree describes VBUS as a GPIO-switched fixed regulator, so the
board needs CONFIG_DM_REGULATOR_FIXED, which 3/3 enables, but no code.
Details are in my reply to v2 2/2.
Changes in v3:
- 1/3: drop the read-back check of the clock enable bits, drop the HS
DAC +15 % setting and match "spacemit,k3-usb2-phy".
- 2/3: add Marek's Reviewed-by; also match "spacemit,k3-dwc3", which
shares the K1's flat-node layout (not tested on K3).
- 3/3: new; enable USB host and DM_REGULATOR_FIXED in
spacemit_k1_defconfig.
- Rebase onto main.
Testing: v3 has only been build-tested. A RISC-V build of main with
the updated spacemit_k1_defconfig compiles the changed driver files
with W=1 and no warnings, and builds SPL and U-Boot proper (the FIT
image needs OpenSBI's fw_dynamic.bin, as before). checkpatch reports
no issues.
v3 has not been run on hardware. The v2 R2S and RV2 USB results were
taken with the HS DAC setting that v3 drops, so they do not cover v3.
[1] https://lists.u-boot-project.org/pipermail/u-boot/2026-October/633775.html
Dave Klotz (3):
phy: spacemit: add K1 USB 2.0 PHY driver
usb: dwc3: generic: add SpacemiT K1 and K3 support
configs: spacemit_k1: enable USB host
MAINTAINERS | 1 +
configs/spacemit_k1_defconfig | 8 ++
drivers/phy/spacemit/Kconfig | 10 ++
drivers/phy/spacemit/Makefile | 1 +
drivers/phy/spacemit/phy-k1-usb2.c | 153 +++++++++++++++++++++++++++++
drivers/usb/dwc3/dwc3-generic.c | 2 +
6 files changed, 175 insertions(+)
create mode 100644 drivers/phy/spacemit/phy-k1-usb2.c
base-commit: 32ebe922e574a733d01c3f106fa77d9176bfecad
next prev parent reply other threads:[~2026-10-14 20:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 4:28 [PATCH 0/2] usb: add K1 USB2 PHY and generic DWC3 support Dave Klotz
2026-10-06 4:28 ` [PATCH 1/2] phy: spacemit: add K1 USB 2.0 PHY driver Dave Klotz
2026-10-06 4:28 ` [PATCH 2/2] usb: dwc3: generic: add SpacemiT K1 support Dave Klotz
2026-10-06 5:15 ` Marek Vasut
2026-10-06 12:31 ` [PATCH v2 0/2] usb: add K1 USB2 PHY and generic DWC3 support Dave Klotz
2026-10-06 12:32 ` [PATCH v2 1/2] phy: spacemit: add K1 USB 2.0 PHY driver Dave Klotz
2026-10-12 9:04 ` Yixun Lan
2026-10-12 12:17 ` Yixun Lan
2026-10-12 9:37 ` Yixun Lan
2026-10-06 12:32 ` [PATCH v2 2/2] usb: dwc3: generic: add SpacemiT K1 support Dave Klotz
2026-10-12 9:38 ` Marek Vasut
2026-10-12 12:27 ` Yixun Lan
2026-10-14 19:59 ` Dave Klotz
2026-10-14 19:59 ` Dave Klotz [this message]
2026-10-14 20:00 ` [PATCH v3 1/3] phy: spacemit: add K1 USB 2.0 PHY driver Dave Klotz
2026-10-14 20:00 ` [PATCH v3 2/3] usb: dwc3: generic: add SpacemiT K1 and K3 support Dave Klotz
2026-10-14 20:00 ` [PATCH v3 3/3] configs: spacemit_k1: enable USB host Dave Klotz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1792007916.git.DaveWK225@protonmail.com \
--to=davewk225@protonmail.com \
--cc=dlan@kernel.org \
--cc=eric.chung@riscstar.com \
--cc=guodong@riscstar.com \
--cc=marek.vasut+usb@mailbox.org \
--cc=pericycle.cc@gmail.com \
--cc=quentin.schulz@cherry.de \
--cc=raymond.mao@riscstar.com \
--cc=trini@konsulko.com \
--cc=u-boot-spacemit@groups.io \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox