[PATCH v2 0/4] reset: spacemit: Add support for SpacemiT K3 SoC

Guodong Xu guodong at riscstar.com
Thu Jan 8 06:22:13 PST 2026


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

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.

This patchset is based on v6.19-rc4 and depends on the K3 clock drirver
patchset [3] and the K1 common clock work [2] and [1]:

Link: https://lore.kernel.org/all/20251219012819.440972-1-inochiama@gmail.com/ [1]
Link: https://lore.kernel.org/lkml/20260108-06-k1-clk-common-v4-0-badf635993d3@gentoo.org/ [2]
Link: https://lore.kernel.org/lkml/20260108-k3-clk-v5-0-42a11b74ad58@gentoo.org/ [3]
Link: https://lore.kernel.org/all/cc1cb833-2c4a-4e20-a50d-109a4919e274@riscstar.com/ [4]

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/20251229-k3-reset-v1-0-eda0747bded3@riscstar.com

Signed-off-by: Guodong Xu <guodong at riscstar.com>
---
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                    |   6 +
 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, 584 insertions(+), 110 deletions(-)
---
base-commit: f10c325a345fef0a688a2bcdfab1540d1c924148
change-id: 20251229-k3-reset-8d9b751ef391
prerequisite-message-id: <20251219012819.440972-1-inochiama at gmail.com>
prerequisite-patch-id: df430730ed961011cee5c5d47b7ace84b3c5ebb7
prerequisite-patch-id: 64003618c33be925602e46b7543f2c13d3f36474
prerequisite-message-id: <20260108-06-k1-clk-common-v4-0-badf635993d3 at gentoo.org>
prerequisite-patch-id: 96cd13293b888c05f400daf529c3cacf17ddf002
prerequisite-patch-id: 5f6579799919c4e2e12c8c836ac4164b00ccaaa3
prerequisite-patch-id: 11e8d5cbe6f3610aa362dc0051b3173001d0a5f4
prerequisite-patch-id: 622d6606913609be04f66006609550e8c3e7f22b
prerequisite-message-id: <20260108-k3-clk-v5-0-42a11b74ad58 at gentoo.org>
prerequisite-patch-id: 44a51fa6a6f0f9d2c5b7bf3295f3272d6bb7005a
prerequisite-patch-id: dce85ac6e4e94b1d2622a8231ddab3de766373ff
prerequisite-patch-id: af1fb571f0d19d72e69dd41d15fc2dbd730b17c7
prerequisite-patch-id: 1318bffbbe6044cb4ef0f77c6756ff96d69ecdf3
prerequisite-patch-id: 8856cecc299cdffcd18acf9a7476175a4d65e62e

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




More information about the linux-riscv mailing list