[PATCH v5 0/2] PM: spacemit: Add power domain support
From: Yixun Lan
Date: Wed Nov 18 2026 - 18:13:51 EST
In this series, we try to add a Power Domain driver support for SpacemiT
K1/K3 SoCs, the driver implement the power-switch functionaly which support
power on/off, and it's based on Linux Generic PM Domain framework and
similiar to vendor K1's implementation, but unlike the K3's vendor
version which is more complicated.
The DT documentation for Power Domain already exist in below file,
and APMU already has #power-domain-cells property.
Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
The previous DTS patch is obsolete, so I dropped it. For devices required
PM feature, it need to add a "power-domains" property, and should send in
a separate patch.
In order to test this series, a prerequisite CCU patches are needed,
which can be found here [1].
Hi Ulf,
Would you be ok to take this version? only minor change updated.
I think the sudden removal of pmdomain supplier is kind of an
independent common issue (exist in other platfroms too), I do not
want to addresse it in this series, see a possible solution in separate
patch here [2], or Icenowy's preference in comment[3], or whatever
way to take. Just let me know what you think..
Link: https://lore.kernel.org/spacemit/20261008-04-k3-clk-pm-aux-v1-0-8372d7307694@xxxxxxxxxx/ [1]
Link: https://lore.kernel.org/spacemit/20261112-01-pm-device-link-v1-1-8932e0862378@xxxxxxxxxx/ [2]
Link: https://lore.kernel.org/spacemit/b7d7ac2eee0e64aa7c267def5c2a8a022c7da425.camel@xxxxxxxxxx [3]
Signed-off-by: Yixun Lan <dlan@xxxxxxxxxx>
---
Changes in v5:
- drop pm_index
- fix dev_err() to return error code
- Link to v4: https://patch.msgid.link/20261112-04-k3-pm-support-v4-0-de3931aa5153@xxxxxxxxxx
Changes in v4:
- adjust Kconfig help message
- drop unused include header
- propagate regmap_read_x() error code
- simplify spacemit_pm_is_off_state()
- Link to v3: https://patch.msgid.link/20261108-04-k3-pm-support-v3-0-b9dc0857039b@xxxxxxxxxx
Changes in v3:
- collect tags
- rename spacemit_pm_is_off_state()
- implement a remove() function
- use proper type in struct spacemit_pm_domain_param
- refactor struct spacemit_pmu
- Link to v2: https://patch.msgid.link/20261008-04-k3-pm-support-v2-0-6f778a53dd2d@xxxxxxxxxx
Changes in v2:
- convert to auxilary driver
- no need dt-binding doc, drop it
- drop dts patch
- support to build as module
- set always on for K3 audio pm
- no global variable for struct spacemit_pmu
- no force to do power-off in spacemit_pd_power_on()
- check return value of pm_genpd_init()
- adjust license header format
- Link to v1: https://patch.msgid.link/20260918-04-k3-pm-support-v1-0-0acd2b36b96f@xxxxxxxxxx
---
Yixun Lan (2):
dt-bindings: power: spacemit: Add power domain controller IDs
pmdomain: spacemit: Add power domain driver
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/Makefile | 1 +
drivers/pmdomain/spacemit/Kconfig | 21 ++
drivers/pmdomain/spacemit/Makefile | 1 +
drivers/pmdomain/spacemit/spacemit-pm-domains.c | 422 ++++++++++++++++++++++++
include/dt-bindings/power/spacemit,k1-power.h | 14 +
include/dt-bindings/power/spacemit,k3-power.h | 12 +
7 files changed, 472 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20260909-04-k3-pm-support-0bef40e87fd7
Best regards,
--
Yixun Lan <dlan@xxxxxxxxxx>