.../devicetree/bindings/phy/spacemit,usb2-phy.yaml | 40 +++++ drivers/phy/Kconfig | 1 + drivers/phy/Makefile | 1 + drivers/phy/spacemit/Kconfig | 13 ++ drivers/phy/spacemit/Makefile | 2 + drivers/phy/spacemit/phy-k1-usb2.c | 200 +++++++++++++++++++++ 6 files changed, 257 insertions(+)
This patch series introduces support for the USB2.0 PHY on the SpacemiT
K1 SoC. The implementation has been tested on the Milk-V Jupiter and
BananaPi-f3.
K1 includes three USB ports as follows[1]:
- A USB2.0 OTG Port
- A USB2.0 Host Only Port
- A USB3.0 Port with a USB2.0 DRD interface
Each of these ports is connected to a USB2.0 PHY responsible for USB2
transmission.
This series is based on 6.18-rc1.
Link: https://developer.spacemit.com/documentation?token=AjHDwrW78igAAEkiHracBI9HnTb#part5 [1]
Signed-off-by: Ze Huang <huangze@whut.edu.cn>
---
Changes in v6:
- phy: spacemit: k1-usb2-phy:
- Fix clock API usage and ensure proper clock disabling in error paths.
- Refactor Register Definitions: Replace address/number-based macros with
feature-based names
- Link to v5: https://lore.kernel.org/all/20250527-b4-k1-usb3-phy-v2-v5-3-2d366b0af999@whut.edu.cn
Changes in v5:
- phy driver for usb2:
- convert readl/writel to regmap
- fix typo: sentinal -> sentinel
- Link to v4: https://lore.kernel.org/r/20250526-b4-k1-usb3-phy-v2-v4-0-eca668fc16a2@whut.edu.cn
Changes in v4:
- combphy driver:
- add in-code comments to indicate that PCIe mode is not yet supported.
- replace custom spacemit_reg_update() with standard regmap API.
- drop spacemit_combphy_wait_ready helper function as only used once.
- Fix PHY init timeout handling: ensure proper error reporting when PLL
lock fails during USB3 PHY initialization
- Link to v3: https://lore.kernel.org/r/20250517-b4-k1-usb3-phy-v2-v3-0-e0655613a163@whut.edu.cn
Changes in v3:
- improve commit message, provide more info about phy hardware
- drop superfluous local variable in `spacemit_combphy_wait_ready`
- replace devm_reset_control_get with devm_reset_control_get_exclusive
- Link to v2: https://lore.kernel.org/r/20250418-b4-k1-usb3-phy-v2-v2-0-b69e02da84eb@whut.edu.cn
Changes in v2:
- combphy dt-bindings:
- fix reg-names
- describe reg
- describe #phy-cells argument
- drop stale ".owner" in driver struct
- add support for usb lfps_thres in combphy
- fix Kconfig depends on
- Link to v1: https://lore.kernel.org/all/20250407-b4-k1-usb3-v3-2-v1-0-bf0bcc41c9ba@whut.edu.cn
Signed-off-by: Ze Huang <huang.ze@linux.dev>
---
Ze Huang (2):
dt-bindings: phy: spacemit: add K1 USB2 PHY
phy: spacemit: support K1 USB2.0 PHY controller
.../devicetree/bindings/phy/spacemit,usb2-phy.yaml | 40 +++++
drivers/phy/Kconfig | 1 +
drivers/phy/Makefile | 1 +
drivers/phy/spacemit/Kconfig | 13 ++
drivers/phy/spacemit/Makefile | 2 +
drivers/phy/spacemit/phy-k1-usb2.c | 200 +++++++++++++++++++++
6 files changed, 257 insertions(+)
---
base-commit: cb6649f6217c0331b885cf787f1d175963e2a1d2
change-id: 20251017-k1-usb2phy-a53ed4ea51b0
Best regards,
--
Ze Huang <huang.ze@linux.dev>
On Fri, 17 Oct 2025 22:49:51 +0800, Ze Huang wrote:
> This patch series introduces support for the USB2.0 PHY on the SpacemiT
> K1 SoC. The implementation has been tested on the Milk-V Jupiter and
> BananaPi-f3.
>
> K1 includes three USB ports as follows[1]:
> - A USB2.0 OTG Port
> - A USB2.0 Host Only Port
> - A USB3.0 Port with a USB2.0 DRD interface
>
> [...]
Applied, thanks!
[1/2] dt-bindings: phy: spacemit: add K1 USB2 PHY
commit: 61b84d5b20af2a4c9944972202c1386026598928
[2/2] phy: spacemit: support K1 USB2.0 PHY controller
commit: fe4bc1a08638309b6be1af37210930b856908eb7
Best regards,
--
~Vinod
On 2025-10-17 22:49, Ze Huang wrote: > This patch series introduces support for the USB2.0 PHY on the SpacemiT > K1 SoC. The implementation has been tested on the Milk-V Jupiter and > BananaPi-f3. > > K1 includes three USB ports as follows[1]: > - A USB2.0 OTG Port > - A USB2.0 Host Only Port > - A USB3.0 Port with a USB2.0 DRD interface > > Each of these ports is connected to a USB2.0 PHY responsible for USB2 > transmission. > > This series is based on 6.18-rc1. > > Link: https://developer.spacemit.com/documentation?token=AjHDwrW78igAAEkiHracBI9HnTb#part5 [1] > > Signed-off-by: Ze Huang <huangze@whut.edu.cn> > --- > Changes in v6: > - phy: spacemit: k1-usb2-phy: > - Fix clock API usage and ensure proper clock disabling in error paths. > - Refactor Register Definitions: Replace address/number-based macros with > feature-based names > - Link to v5: https://lore.kernel.org/all/20250527-b4-k1-usb3-phy-v2-v5-3-2d366b0af999@whut.edu.cn > > Changes in v5: > - phy driver for usb2: > - convert readl/writel to regmap > - fix typo: sentinal -> sentinel > - Link to v4: https://lore.kernel.org/r/20250526-b4-k1-usb3-phy-v2-v4-0-eca668fc16a2@whut.edu.cn > > Changes in v4: > - combphy driver: > - add in-code comments to indicate that PCIe mode is not yet supported. > - replace custom spacemit_reg_update() with standard regmap API. > - drop spacemit_combphy_wait_ready helper function as only used once. > - Fix PHY init timeout handling: ensure proper error reporting when PLL > lock fails during USB3 PHY initialization > - Link to v3: https://lore.kernel.org/r/20250517-b4-k1-usb3-phy-v2-v3-0-e0655613a163@whut.edu.cn > > Changes in v3: > - improve commit message, provide more info about phy hardware > - drop superfluous local variable in `spacemit_combphy_wait_ready` > - replace devm_reset_control_get with devm_reset_control_get_exclusive > - Link to v2: https://lore.kernel.org/r/20250418-b4-k1-usb3-phy-v2-v2-0-b69e02da84eb@whut.edu.cn > > Changes in v2: > - combphy dt-bindings: > - fix reg-names > - describe reg > - describe #phy-cells argument > - drop stale ".owner" in driver struct > - add support for usb lfps_thres in combphy > - fix Kconfig depends on > - Link to v1: https://lore.kernel.org/all/20250407-b4-k1-usb3-v3-2-v1-0-bf0bcc41c9ba@whut.edu.cn > > Signed-off-by: Ze Huang <huang.ze@linux.dev> > > --- > Ze Huang (2): > dt-bindings: phy: spacemit: add K1 USB2 PHY > phy: spacemit: support K1 USB2.0 PHY controller > > .../devicetree/bindings/phy/spacemit,usb2-phy.yaml | 40 +++++ > drivers/phy/Kconfig | 1 + > drivers/phy/Makefile | 1 + > drivers/phy/spacemit/Kconfig | 13 ++ > drivers/phy/spacemit/Makefile | 2 + > drivers/phy/spacemit/phy-k1-usb2.c | 200 +++++++++++++++++++++ > 6 files changed, 257 insertions(+) > --- > base-commit: cb6649f6217c0331b885cf787f1d175963e2a1d2 > change-id: 20251017-k1-usb2phy-a53ed4ea51b0 The whole series is: Tested-by: Aurelien Jarno <aurelien@aurel32.net> -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://aurel32.net
On Fri, 17 Oct 2025 22:49:51 +0800, Ze Huang wrote: > This patch series introduces support for the USB2.0 PHY on the SpacemiT > K1 SoC. The implementation has been tested on the Milk-V Jupiter and > BananaPi-f3. > > K1 includes three USB ports as follows[1]: > - A USB2.0 OTG Port > - A USB2.0 Host Only Port > - A USB3.0 Port with a USB2.0 DRD interface > > Each of these ports is connected to a USB2.0 PHY responsible for USB2 > transmission. > > This series is based on 6.18-rc1. > > Link: https://developer.spacemit.com/documentation?token=AjHDwrW78igAAEkiHracBI9HnTb#part5 [1] > > Signed-off-by: Ze Huang <huangze@whut.edu.cn> Tested-by: Junzhong Pan <panjunzhong@linux.spacemit.com>
© 2016 - 2026 Red Hat, Inc.