diff mbox series

[2/6] dt-bindings: power: pd-samsung: Allow pd nodes to be children of PMU

Message ID 20230308230931.27261-3-semen.protsenko@linaro.org
State New
Headers show
Series soc: samsung: pm_domains: Add Exynos850 support | expand

Commit Message

Sam Protsenko March 8, 2023, 11:09 p.m. UTC
Introduce a new "samsung,pd-index" property to choose a specific power
domain. This way it would be possible to avoid specifying any addresses
in power domain nodes, relying solely on syscon regmap from the parent
node (which should be a PMU system controller). Therefore the "reg"
property is deprecated now, as it's more logical to describe power
domains as children of PMU node, because PD registers reside in the PMU
area.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 .../devicetree/bindings/power/pd-samsung.yaml         | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski March 10, 2023, 2:41 p.m. UTC | #1
On 09/03/2023 00:09, Sam Protsenko wrote:
> Introduce a new "samsung,pd-index" property to choose a specific power
> domain. This way it would be possible to avoid specifying any addresses
> in power domain nodes, relying solely on syscon regmap from the parent
> node (which should be a PMU system controller). Therefore the "reg"
> property is deprecated now, as it's more logical to describe power
> domains as children of PMU node, because PD registers reside in the PMU
> area.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
>  .../devicetree/bindings/power/pd-samsung.yaml         | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/power/pd-samsung.yaml b/Documentation/devicetree/bindings/power/pd-samsung.yaml
> index a353a705292c..73178b1a56ea 100644
> --- a/Documentation/devicetree/bindings/power/pd-samsung.yaml
> +++ b/Documentation/devicetree/bindings/power/pd-samsung.yaml
> @@ -25,6 +25,10 @@ properties:
>  
>    reg:
>      maxItems: 1
> +    deprecated: true
> +    description:
> +      Physical base address and length of Power Domains area (if not a child of
> +      PMU).
>  
>    clocks:
>      deprecated: true
> @@ -45,10 +49,15 @@ properties:
>    power-domains:
>      maxItems: 1
>  
> +  samsung,pd-index:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: |
> +      Power domain index (if a child of PMU). Valid values are defined in::
> +        "include/dt-bindings/power/samsung,exynos850-power.h" - for Exynos850

DT nodes should not have any IDs, except what is in 'reg'. Thus please
go with Marek's proposal of merging power domains into PMU driver and
using proper xlate.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/pd-samsung.yaml b/Documentation/devicetree/bindings/power/pd-samsung.yaml
index a353a705292c..73178b1a56ea 100644
--- a/Documentation/devicetree/bindings/power/pd-samsung.yaml
+++ b/Documentation/devicetree/bindings/power/pd-samsung.yaml
@@ -25,6 +25,10 @@  properties:
 
   reg:
     maxItems: 1
+    deprecated: true
+    description:
+      Physical base address and length of Power Domains area (if not a child of
+      PMU).
 
   clocks:
     deprecated: true
@@ -45,10 +49,15 @@  properties:
   power-domains:
     maxItems: 1
 
+  samsung,pd-index:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      Power domain index (if a child of PMU). Valid values are defined in::
+        "include/dt-bindings/power/samsung,exynos850-power.h" - for Exynos850
+
 required:
   - compatible
   - "#power-domain-cells"
-  - reg
 
 unevaluatedProperties: false