Message ID | 20250528-pmdomain-hierarchy-onecell-v2-0-7885ae45e59c@baylibre.com |
---|---|
Headers | show |
Series | pmdomains: core: add support for domain hierarchies in DT | expand |
On Wed, 28 May 2025 at 23:59, Kevin Hilman <khilman@baylibre.com> wrote: > > Add support for nexus map to be able to support hierarchical power > domains for providers with #power-domain-cells > 0. > > Suggested-by: Rob Herring <robh@kernel.org> > Signed-off-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe > --- > Documentation/devicetree/bindings/power/power-domain.yaml | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/Documentation/devicetree/bindings/power/power-domain.yaml b/Documentation/devicetree/bindings/power/power-domain.yaml > index 8fdb529d560b..9f099d326aee 100644 > --- a/Documentation/devicetree/bindings/power/power-domain.yaml > +++ b/Documentation/devicetree/bindings/power/power-domain.yaml > @@ -68,6 +68,15 @@ properties: > by the given provider should be subdomains of the domain specified > by this binding. > > + power-domains-map: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + Nexus node mapping property that establishes parent-child relationships > + for PM domains using the format defined in the Device Tree specification > + section 2.5.1. Each map entry consists of child domain specifier, > + parent phandle, and optional parent specifier arguments. This property > + is only supported for onecell providers (#power-domain-cells = 1). > + > required: > - "#power-domain-cells" > > @@ -133,3 +142,29 @@ examples: > min-residency-us = <7000>; > }; > }; > + > + - | > + // Example using power-domains-map for Nexus mapping > + main_pd: power-controller@12370000 { > + compatible = "foo,power-controller"; > + reg = <0x12370000 0x1000>; > + #power-domain-cells = <0>; > + }; > + > + wkup_pd: power-controller@12380000 { > + compatible = "foo,power-controller"; > + reg = <0x12380000 0x1000>; > + #power-domain-cells = <0>; > + }; > + > + scmi_pds protocol@11 { > + compatible = "arm,scmi-power-domain"; > + reg = <0x11>; > + #power-domain-cells = <1>; > + power-domains-map = <15 &main_pd>, > + <19 &wkup_pd>; > + }; > + > + // In this example using Nexus node mapping: > + // - Child domain 15 (scmi_pds 15) becomes a subdomain of main_pd > + // - Child domain 19 (scmi_pds 19) becomes a subdomain of wkup_pd > > -- > 2.49.0 >
Currently, PM domains can only support hierarchy for simple providers (e.g. ones with #power-domain-cells = 0). Add support for oncell providers as well by adding support for a nexus node map, as described in section 2.5.1 of the DT spec. Signed-off-by: Kevin Hilman <khilman@baylibre.com> --- Changes in v2: - Use nexus map instead of creating new property as suggested by Rob H. - Link to v1: https://lore.kernel.org/r/20250528-pmdomain-hierarchy-onecell-v1-1-851780700c68@baylibre.com --- Kevin Hilman (2): dt-bindings: power: add nexus map for power-domains pmdomain: core: use DT map to support hierarchy Documentation/devicetree/bindings/power/power-domain.yaml | 35 ++++++++++++++++++++ drivers/pmdomain/core.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) --- base-commit: 0ff41df1cb268fc69e703a08a57ee14ae967d0ca change-id: 20250528-pmdomain-hierarchy-onecell-a46fad47d855 Best regards,