Re: [RESEND PATCH 1/7] dt-bindings: power: st: add STM32MP PM domain binding
From: Patrick DELAUNAY
Date: Mon Nov 23 2026 - 12:53:50 EST
Hi,
On 11/23/26 12:11, Krzysztof Kozlowski wrote:
On Mon, Nov 16, 2026 at 11:40:26AM +0100, Patrick Delaunay wrote:Thanks for the review. I will drop the redundant “binding” from the subject and
Add binding documentation for the power domains found on
STMicroelectronics STM32MP SoCs.
A nit, subject: drop second/last, redundant "binding". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23
move additionalProperties: false below the required block.
Documentation/devicetree/bindings/power/st,stm32mp-pm-domain.yaml
Signed-off-by: Patrick Delaunay <patrick.delaunay@xxxxxxxxxxx>
---
.../bindings/power/st,stm32mp-pm-domain.yaml | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644
a/Documentation/devicetree/bindings/power/st,stm32mp-pm-domain.yaml b/Documentation/devicetree/bindings/power/st,stm32mp-pm-domain.yaml
diff --git
devices cannot referencenew file mode 100644
index 000000000000..4ab477fb4499
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/st,stm32mp-pm-domain.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/st,stm32mp-pm-domain.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STM32MP generic power domain
+
+maintainers:
+-Patrick Delaunay <patrick.delaunay@xxxxxxxxxxx>
+
+allOf:
+-$ref: /schemas/power/power-domain.yaml#
+
+description: |
+The STM32MP SoCs contain a D1 domain which defines the devices assigned to
+Cortex A cluster, the devices in this domain are functional only when this
+cluster is not in low power modes (Stop modes) with clock OFF.
+
+This PM domain node represents this dependency, based on PM framework and
+without wake-up path support.
+
+properties:
+compatible:
+const: st,stm32mp-pm-domain
+
+'#power-domain-cells':
+const: 0
+
+power-domains:
+maxItems: 1
I don't get the purpose of this binding. There are no resources here, so
this looks like fake intermediary (meaning: non-controllable). Why the
final domain?Regarding the purpose of this domain, I agree that it does not control a power
switch or any other hardware resource. It is an intermediate genpd used to
represent a functional dependency. Devices attached to D1 need the Cortex-A35
cluster to remain in Run1, with their clocks available, regardless of whether
they are wakeup-capable. Wake-up events are handled by EXTI1.
This SoC power domain allows STM32MP to represent two paths in the power-domain
hierarchy for PSCI OSI:
one for device functionality (clock availability → cluster_pd) and
one for wake-up handling (EXTI → ret_pd).
Currently, GENPD_FLAG_ACTIVE_WAKEUP propagates wake-up requirements through the
Linux power-domain hierarchy used by PSCI CPU Idle. As a result, the cluster
domain cannot be powered off when an associated device has an active wakeup
source. Consequently, the PSCI cluster domain cannot enter the associated idle
state (Stop1).
In STM32MP SoCs, D1 domain is a hardware concept shared by PWR and RCC. In RCC,
kernel clocks are supplied to peripherals only when the associated CPU is
running: each device is assigned to a CPU through RIFSC and the IP blocks
associated with CPU1 = Cortex-A35 are not functional in low-power modes when
the associated CPU is stopped in low power mode.
When a node is present and enabled in the Linux device tree, its associated
device is always assigned to CPU1. If the device is not functional in low-power
modes (Stop1/2 and LP-Stop1/2), it is implicitly part of the D1 domain.
The added SoC power domain makes this relationship explicit, although this may
not be the best solution. If this intermediate domain is not the right way to
model the dependency, I would appreciate your guidance on an alternative.
Sorry about that. I understood “power-domain” to be a generic node name, based
+
+additionalProperties: false
this goes after required block.
+
+required:
+-compatible
+-'#power-domain-cells'
+-power-domains
+
+examples:
+-|
+power-domain-d1 {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
If you cannot find a name matching your device, please check in kernel
sources for similar cases or you can grow the spec (via pull request to
DT spec repo).
mainly on the pattern in /bindings/arm/psci.yaml and on node-name patterns such
as power-domain@[0-9a-f]+ used in the power bindings.
I now understand your point: power-domain-d1 is not a generic node name and
it is not a subnode of a power-controller, as described in
bindings/power/power-domain.yaml.
The PWR device, which manages the low-power modes and the power supplies for
each domain (including DVFS for the CPU and GPU), is handled by PSCI firmware.
I added an SoC power domain because I did not want to modify the PSCI binding
or driver; however, this may not be the best solution.
I also considered changing the PSCI domain handling to use a wakeup-source
property, but that would change the behavior of existing device trees.
In the driver drivers/cpuidle/cpuidle-psci-domain.c
static int psci_pd_init(struct device_node *np, bool use_osi)
{
...
/*
* Allow power off when OSI has been successfully enabled.
* PREEMPT_RT is not yet ready to enter domain idle states.
*/
if (use_osi && !IS_ENABLED(CONFIG_PREEMPT_RT)) {
pd->power_off = psci_pd_power_off;
-pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP;
+if (of_property_read_bool(np, "wakeup-source"))
+pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP;
} else {
pd->flags |= GENPD_FLAG_ALWAYS_ON;
}
....
The proposed STM32MP251 device tree becomes
-d1_pd: power-domain-d1 {
-compatible = "st,stm32mp-pm-domain";
-#power-domain-cells = <0>;
-power-domains = <&cluster_pd>;
-};
psci {
bootph-all;
compatible = "arm,psci-1.0";
method = "smc";
cpu0_pd: power-domain-cpu0 {
#power-domain-cells = <0>;
domain-idle-states = <&CPU_PWRDN>;
power-domains = <&cluster_pd>;
};
cluster_pd: power-domain-cluster {
#power-domain-cells = <0>;
domain-idle-states = <&STOP1>, <&LP_STOP1>;
power-domains = <&ret_pd>;
};
+d1_pd: power-domain-d1 {
+#power-domain-cells = <0>;
+power-domains = <&cluster_pd>;
+};
ret_pd: power-domain-retention {
#power-domain-cells = <0>;
domain-idle-states = <&LPLV_STOP1>;
+wakeup-source;
};
};
...
exti1: interrupt-controller@44220000 {
compatible = "st,stm32mp1-exti";
interrupt-controller;
#interrupt-cells = <2>;
power-domains = <&ret_pd>;
...
}
Moreover with this PSCI change, I could remove the need for the D1 domain:
-cluster_pd would not have a wakeup-source property, so the wake-up path would
not propagate.
-ret_pd would have a wakeup-source property, and EXTI1 would belong to this
domain.
psci {
bootph-all;
compatible = "arm,psci-1.0";
method = "smc";
cpu0_pd: power-domain-cpu0 {
#power-domain-cells = <0>;
domain-idle-states = <&CPU_PWRDN>;
power-domains = <&cluster_pd>;
};
cluster_pd: power-domain-cluster {
#power-domain-cells = <0>;
domain-idle-states = <&STOP1>, <&LP_STOP1>;
power-domains = <&ret_pd>;
};
ret_pd: power-domain-retention {
#power-domain-cells = <0>;
domain-idle-states = <&LPLV_STOP1>;
+wakeup-source;
};
};
I add Ulf or Sudeep to the To: list to get feedback on the PSCI domain hierarchy,
Best regards,
Krzysztof
particularly regarding backward compatibility.
For this proposal, I could also use a negated property ("no-wakeup-path' by exmaple)
to avoid breaking backward compatibility (property name to be confirmed,
perhaps need "arm," prefix).
If you think this is an acceptable proposal, I can submit a V2 of the series
using this approach:
in code:
-pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP;
+if (!of_property_read_bool(np, "no-wakeup-path"))
+pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP;
in STM32MP device tree:
cluster_pd: power-domain-cluster {
#power-domain-cells = <0>;
domain-idle-states = <&STOP1>, <&LP_STOP1>;
power-domains = <&ret_pd>;
+no-wakeup-path;
};
the cluster_pd domain can be powered-off even if on device is in the wake-up patch.
Regards
Patrick