Skip to content

reset: spacemit: Add support for SpacemiT K3 SoC

Guodong Xu linux-devicetree linux-riscv lkml spacemit 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20251229-k3-reset-8d9b751ef391

Versions newest first

  1. v3 Latest4 patches 2 repliesIn review
  2. v24 patches 7 repliesSuperseded
  3. v14 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Updated dependency status and base information.
- Patch 1:
Add Acked-by from Krzysztof and Alex.
- Patch 2:
Removed trailing blank line from Makefile.
- Patch 1/2/3/4:
Add Acked-by / Reviewed-by from Alex Elder.

- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dt-bindings: soc: spacemit: Add K3 reset support and IDsDocumentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml include/dt-bindings/reset/spacemit,k3-resets.h+178 -10 replies
2/4reset: Create subdirectory for SpacemiT driversdrivers/reset/Kconfig drivers/reset/Makefile drivers/reset/spacemit/Kconfig +2 more+19 -110 replies
3/4reset: spacemit: Extract common K1 reset codedrivers/reset/spacemit/Kconfig drivers/reset/spacemit/Makefile drivers/reset/spacemit/reset-spacemit-common.c +2 more+144 -1010 replies
4/4reset: spacemit: Add SpacemiT K3 reset driverdrivers/reset/spacemit/Kconfig drivers/reset/spacemit/Makefile drivers/reset/spacemit/reset-spacemit-k3.c+245 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlex ElderKrzysztof KozlowskiYixun Lan
SeriesR-b
1/4A-b A-b
2/4R-b
3/4R-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/4] reset: spacemit: Add support for SpacemiT K3 SoC

This series adds support for the reset controller found on the SpacemiT K3 SoC.

The clock driver changes, which defined new auxiliary device name patterns for reset on K1 and K3, have been applied to the clock tree. To facilitate merging, Yixun Lan has created an immutable tag (spacemit-clkrst-v6.20-3) within his pull request to the clock subsystem [1]. Hence, the dependencies mentioned in v2 have now been deblocked, making the reset driver ready to be applied, if it gets approval from review.

In this version (v3), the entire series has been rebased and tested on top of the linux-next tag: next-20260119.

General informaiton about the series:

The K3 reset controller shares the same architecture as the K1. To facilitate support for both and future SoCs, the existing K1 reset driver is refactored with the following changes:

1. The existing K1 driver is moved to a dedicated 'drivers/reset/spacemit/' directory.
2. Common reset operations are extracted into reset-spacemit-common.{c,h}

The K3 driver is implemented using this common infrastructure.

Changes in v3:
- Updated dependency status and base information.
- Patch 1:
Add Acked-by from Krzysztof and Alex.
- Patch 2:
Removed trailing blank line from Makefile.
- Patch 1/2/3/4:
Add Acked-by / Reviewed-by from Alex Elder.

- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Patch 1:
Update the commit message to explain the why.
Update the spacemit,k1-syscon.yaml to point to k3 reset IDs
header file.
- Patch 3:
Use dev->driver->owner for the reset controller owner instead of THIS_MODULE to fix the module reference counting issue pointed out by Krzysztof Kozlowski.
- Patch 3 and 4:
Update the K1_AUX_DEV_ID and K3_AUX_DEV_ID macros to a simpler but direct form, one benefit is to improve the code readability. More discussion can be found in Link [4].
Link to v1: https://lore.kernel.org/r/[email protected]

---
Guodong Xu (4):
dt-bindings: soc: spacemit: Add K3 reset support and IDs
reset: Create subdirectory for SpacemiT drivers
reset: spacemit: Extract common K1 reset code
reset: spacemit: Add SpacemiT K3 reset driver

 .../bindings/soc/spacemit/spacemit,k1-syscon.yaml  |   8 +-
 drivers/reset/Kconfig                              |  12 +-
 drivers/reset/Makefile                             |   2 +-
 drivers/reset/spacemit/Kconfig                     |  36 ++++
 drivers/reset/spacemit/Makefile                    |   5 +
 drivers/reset/spacemit/reset-spacemit-common.c     |  77 +++++++
 drivers/reset/spacemit/reset-spacemit-common.h     |  42 ++++
 .../reset-spacemit-k1.c}                           | 107 +---------
 drivers/reset/spacemit/reset-spacemit-k3.c         | 233 +++++++++++++++++++++
 include/dt-bindings/reset/spacemit,k3-resets.h     | 171 +++++++++++++++
 10 files changed, 583 insertions(+), 110 deletions(-)

---
base-commit: 6ada99659c6d6a0cde83e6c0f4ed0ef0ba1867e1
change-id: 20251229-k3-reset-8d9b751ef391

Best regards,

Signature · 1 line
Guodong Xu <[email protected]>