[PATCH 0/8] riscv: spacemit: k1: add clock reset drivers, switch to upstream DT

Guodong Xu guodong at riscstar.com
Sun May 10 14:06:22 CEST 2026


Currently U-Boot's SpacemiT K1 ships its own arch/riscv/dts/k1.dtsi and a
spacemit,k1-reset binding that has no node in the upstream
(kernel-mainline) K1 dts. After list discussion [1], this series
moves U-Boot to the upstream DT before further K1 work lands.

In the upstream DT, each K1 syscon provides both clocks and resets.
The kernel's clock driver spawns the reset child via the auxiliary
bus. This patchset does the same in U-Boot: each clock driver
spawns a UCLASS_RESET sibling on the same ofnode.

Patch 1/8 adds the K1 clock driver.
Patch 2/8 adds a new syscon-bound reset driver with no DT of_match. At this
          point, the legacy reset driver and local dts are still there.
Patch 3/8 has each per-syscon clock driver spawn the reset child on the
          same ofnode, the way the kernel uses auxiliary devices.
Patch 4/8 enables the clock driver.
Patch 5/8 switches BPI-F3 to dts/upstream/.
Patch 6/8, 7/8 and 8/8 clean up the legacy reset driver and local dts files.

Old and new reset drivers coexist from 2/8 through 6/8 so the series
is bisectable.

The K1 SPL bring-up [2] and PIN/SPI [3] series will be rebased on
this and resent once it lands.

Link: https://lore.kernel.org/u-boot/20260507140558.GU1614990@bill-the-cat/ [1]
Link: https://lore.kernel.org/u-boot/20260325223232.1553212-1-raymondmaoca@gmail.com/ [2]
Link: https://lore.kernel.org/u-boot/20260422143112.1329478-1-raymondmaoca@gmail.com/ [3]

Signed-off-by: Guodong Xu <guodong at riscstar.com>
---
Guodong Xu (7):
      reset: spacemit: k1: introduce syscon-bound reset driver
      clk: spacemit: k1: spawn reset device from per-syscon clock drivers
      configs: bananapi-f3: enable Spacemit K1 clock driver
      dts: k1: switch BPI-F3 build to upstream DT
      dts: k1: drop legacy local DT files
      reset: spacemit: k1: drop legacy spacemit,k1-reset driver
      dt-bindings: reset: drop spacemit-k1-reset.h

Junhui Liu (1):
      clk: spacemit: Add support for K1 SoC

 arch/riscv/dts/Makefile                       |    1 -
 arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi     |   30 +
 arch/riscv/dts/k1-bananapi-f3.dts             |   28 -
 arch/riscv/dts/k1-pinctrl.dtsi                |   19 -
 arch/riscv/dts/k1.dtsi                        |  480 -------
 configs/bananapi-f3_defconfig                 |    6 +-
 drivers/clk/Kconfig                           |    5 +-
 drivers/clk/Makefile                          |    1 +
 drivers/clk/spacemit/Kconfig                  |   23 +
 drivers/clk/spacemit/Makefile                 |    7 +
 drivers/clk/spacemit/clk-k1.c                 | 1759 +++++++++++++++++++++++++
 drivers/clk/spacemit/clk_common.h             |   79 ++
 drivers/clk/spacemit/clk_ddn.c                |   93 ++
 drivers/clk/spacemit/clk_ddn.h                |   53 +
 drivers/clk/spacemit/clk_mix.c                |  403 ++++++
 drivers/clk/spacemit/clk_mix.h                |  224 ++++
 drivers/clk/spacemit/clk_pll.c                |  157 +++
 drivers/clk/spacemit/clk_pll.h                |   81 ++
 drivers/reset/Kconfig                         |    7 -
 drivers/reset/Makefile                        |    2 +-
 drivers/reset/reset-spacemit-k1.c             |  548 --------
 drivers/reset/spacemit/Makefile               |    5 +
 drivers/reset/spacemit/reset-spacemit-k1.c    |  289 ++++
 include/dt-bindings/reset/spacemit-k1-reset.h |  118 --
 include/soc/spacemit/k1-reset.h               |   23 +
 include/soc/spacemit/k1-syscon.h              |  149 +++
 26 files changed, 3384 insertions(+), 1206 deletions(-)
---
base-commit: 24db98cdf911b6ca362209e674bf9412441c1095
change-id: 20260510-b4-k1-clk-reset-upstream-dts-cbf1f3a79cfb

Best regards,
--  
Guodong Xu <guodong at riscstar.com>



More information about the U-Boot mailing list