This series adds pin configuration support for TH1520 SoC with a driver ported from Linux kernel, and enables it by default. As a test, random configuration is specified in devicetree, then the effects are verified by reading back registers or observing hardware behavior.
With several downstream patches, I've also successfully brought up the second GMAC controller on TH1520. Since the controller won't work with the default pin configuration, this also serves as a proof of the driver's functionality. This series may depend on the previous series "Bring up secondary cores on Lichee Pi 4A"[1] for a clean apply. An output of pinmux status -a could be obtained here[2]. [1]: https://lore.kernel.org/u-boot/20250606042804.64311-1-zi...@disroot.org/ [2]: https://gist.github.com/ziyao233/55738ed1a33d450ccb1dc3752494a2b4 Yao Zi (3): pinctrl: Port pin controller driver for T-Head TH1520 SoC riscv: dts: th1520: Add pin controllers riscv: cpu: th1520: Enable pinctrl by default MAINTAINERS | 1 + arch/riscv/cpu/th1520/Kconfig | 1 + arch/riscv/dts/th1520.dtsi | 28 ++ configs/th1520_lpi4a_defconfig | 1 + drivers/pinctrl/Kconfig | 8 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-th1520.c | 700 +++++++++++++++++++++++++++++++ 7 files changed, 740 insertions(+) create mode 100644 drivers/pinctrl/pinctrl-th1520.c -- 2.49.0