Re: [PATCH RFC 2/5] dt-bindings: power: Add Marvell PXA1908 domains

Krzysztof Kozlowski
2025-08-08T07:52:26Z

On Wed, Aug 06, 2025 at 07:33:21PM +0200, Duje Mihanović wrote:
> Add device tree bindings for Marvell PXA1908's power domains.
>
> Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
> ---
> .../power/marvell,pxa1908-power-controller.yaml | 105 +++++++++++++++++++++
> include/dt-bindings/power/marvell,pxa1908-power.h | 17 ++++
> 2 files changed, 122 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/marvell,pxa1908-power-controller.yaml b/Documentation/devicetree/bindings/power/marvell,pxa1908-power-controller.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..1cf3a45d56cbb7b75f7204d656016a9a569da186
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/marvell,pxa1908-power-controller.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/marvell,pxa1908-power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell PXA1908 Power Domain Controller
> +
> +maintainers:
> + - Duje Mihanović <duje@dujemihanovic.xyz>
> +
> +description: |
> + The Marvell PXA1908 SoC includes multiple power domains which can be powered
> + on/off to save power when different IP cores are not in use.
> +
> +properties:
> + $nodename:
> + pattern: '^power-controller$'
> +
> + compatible:
> + const: marvell,pxa1908-power-controller
> +
> + '#power-domain-cells':
> + const: 1

So this is power domain controller?

> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> +patternProperties:
> + "^power-domain@[0-9a-f]+$":
> + type: object

And this is as well?

You duplicated them.

> +
> + description: |
> + Represents a power domain within the power controller node as documented
> + in Documentation/devicetree/bindings/power/power-domain.yaml.

We do not represent individual power domains, just like we do not
represent individual clocks.

> +
> + properties:
> + reg:
> + description: |
> + Power domain index. Valid values are defined in:
> + "include/dt-bindings/power/marvell,pxa1908-power.h"
> + maxItems: 1

So no address space, thus this is not a separate device node.

> +
> + clocks:
> + description: |

Drop everywhere |

> + A number of phandles to clocks that need to be enabled during domain
> + power up.

This does not exist in your example, so it is just confusing.

> +
> + '#power-domain-cells':
> + const: 0
> +
> + required:
> + - reg
> +
> + unevaluatedProperties: false
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/power/marvell,pxa1908-power.h>
> +
> + clock-controller@d4282800 {
> + compatible = "marvell,pxa1908-apmu", "simple-mfd", "syscon";
> + reg = <0xd4282800 0x400>;
> + #clock-cells = <1>;
> +
> + power-controller {
> + compatible = "marvell,pxa1908-power-controller";

No address space, so this should be folded into the parent.

Best regards,
Krzysztof