Skip to content

[PW_SID:1090870] Add TH1520 USB support#1878

Closed
linux-riscv-bot wants to merge 12 commits into
workflow__riscv__fixesfrom
pw1090870
Closed

[PW_SID:1090870] Add TH1520 USB support#1878
linux-riscv-bot wants to merge 12 commits into
workflow__riscv__fixesfrom
pw1090870

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1090870 applied to workflow__riscv__fixes

Name: Add TH1520 USB support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1090870
Version: 1

Icenowy and others added 12 commits May 7, 2026 08:24
TH1520 has a subsystem clock controller called MISC_SUBSYS in its
manual, mainly controlling clocks for USB and MMC/SD in non-TEE
environment.

Add device tree binding for it.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The TH1520 SoC contains a MISC_SUBSYS clock controller, which allows
controlling of USB related clocks and MMC/SD controller AHB bus clocks.

Add support for this clock controller, in order to enable USB support.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The MISC_SUBSYS clock controller on TH1520 SoC is a clock controller
mainly controlling USB-related clocks (which isn't utilized yet) and
MMC/SD controllers' AHB bus clocks.

Add the device tree node for it along with the missing bus clock
references for MMC/SD controllers.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The TH1520 SoC features a Synopsys USB 3.0 FemtoPHY with some custom
glue logic configuring PHY parameters.

Add a binding for it.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The USB PHY on T-Head TH1520 SoC is a Synopsys USB 3.0 FemtoPHY, with
some PHY parameters exported as another system controller along with it.

As a few PHY parameters' default value isn't ready to work, add a driver
configuring them before letting the PHY run, in addition to
clock/reset/regulator management.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The TH1520 SoC contains a Synopsys DesignWare Cores SuperSpeed USB3.0
Dual Role Device controller in addition to a USB2+USB3 combo PHY based
on Synopsys USB3.0 FemtoPHY.

Add device tree nodes for them. The USB controller is quite generic, new
and properly configured during silicon design, but the PHY is a little
quirky.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
GPIO hogs are described in the gpio.txt binding as automatic default
GPIO configuration items.

Allow them for GPIO ports in DesignWare APB GPIO controller nodes.

Cc: Hoan Tran <hoan@os.amperecomputing.com>
Cc: Linus Walleij <linusw@kernel.org>
Cc: Bartosz Golaszewski <brgl@kernel.org>
Cc: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
As a USB hub device, VL817 can surely be connected to external USB
connectors. The binding for such connectors connection is already
described in the generic usb-hub.yaml binding with ports subnode, but
it's not yet allowed in the VL817 binding.

Switch the reference binding from usb-device.yaml to usb-hub.yaml (which
recursively references usb-device.yaml and contains definition for ports
subnode) and allow ports subnode in VL817 binding.

Cc: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Although "D" and "H" are earlier in the alphabet than "P", the DPU and
HDMI nodes were added after PADCTRL node in the Lichee Pi 4A device tree.

Sort the nodes in this device tree.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add nodes for the six I2C on the T-Head TH1520 RISCV SoC.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Reviewed-by: Drew Fustini <dfustini@tenstorrent.com>
[Icenowy: rebase on top of v7.1-rc2]
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Lichee Pi 4A has 3 I2C IO expansion chips onboard, connected to the
I2C0/1/3 busses.

Add device tree nodes for them.

Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
[Icenowy: added commit description]
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The Lichee Pi 4A board features an onboard VIA VL817 hub connected to
the SoC's USB3 as upstream and 4 USB-3.0-capable Type-A ports as
downstream.

Enable SoC USB3 and the hub on Lichee Pi 4A.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 141.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1160.68 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1718.98 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.02 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 87.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[01/12] dt-bindings: clock: thead: add TH1520 MISC subsys clock controller"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 141.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1142.45 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1690.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.12 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[02/12] clk: thead: th1520-ap: add support for MISC subsys clocks"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/12] riscv: dts: thead: Add TH1520 I2C nodes"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/12] riscv: dts: thead: Add TH1520 I2C nodes"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/12] riscv: dts: thead: Add TH1520 I2C nodes"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 10: "[10/12] riscv: dts: thead: Add TH1520 I2C nodes"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1085.66 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1465.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 87.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 11: "[11/12] riscv: dts: thead: Add Lichee Pi 4A IO expansions"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 141.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1084.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1470.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.19 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.58 seconds
Result: WARNING
Output:

WARNING: Possible repeated word: 'on'
#34: FILE: arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi:30:
+		/* Marked as always on on the schematics */

WARNING: DT compatible string vendor "usb2109" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
#215: FILE: arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts:409:
+		compatible = "usb2109,2817";

WARNING: DT compatible string vendor "usb2109" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
#259: FILE: arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts:453:
+		compatible = "usb2109,817";

total: 0 errors, 3 warnings, 0 checks, 270 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 89a7de516fe0 ("riscv: dts: thead: enable USB3 ports on Lichee Pi 4A") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 3 warnings, 0 checks, 270 lines checked
WARNING: DT compatible string vendor "usb2109" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
WARNING: Possible repeated word: 'on'


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
kdoc
Desc: Detects for kdoc errors
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 12: "[12/12] riscv: dts: thead: enable USB3 ports on Lichee Pi 4A"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1090870 branch May 7, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants