[PATCH v2 1/4] dt-bindings: clock: marvell,pxa1908: Add syscon compatible to apmu

Duje Mihanović posted 4 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 1/4] dt-bindings: clock: marvell,pxa1908: Add syscon compatible to apmu
Posted by Duje Mihanović 1 month, 1 week ago
Add required syscon compatible to the APMU controller. This is required
for the SoC's power domain controller as the registers are shared.

Also add a #power-domain-cells property as the node will serve as the
power domain phandle.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
---
v2:
- Drop simple-mfd
- Add #power-domain-cells
---
 .../devicetree/bindings/clock/marvell,pxa1908.yaml | 30 +++++++++++++++++-----
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
index 4e78933232b6b925811425f853bedf6e9f01a27d..6f3a8578fe2a6810911fec5879c07c9ddb34565a 100644
--- a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
+++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
@@ -19,11 +19,14 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - marvell,pxa1908-apbc
-      - marvell,pxa1908-apbcp
-      - marvell,pxa1908-mpmu
-      - marvell,pxa1908-apmu
+    oneOf:
+      - enum:
+          - marvell,pxa1908-apbc
+          - marvell,pxa1908-apbcp
+          - marvell,pxa1908-mpmu
+      - items:
+          - const: marvell,pxa1908-apmu
+          - const: syscon
 
   reg:
     maxItems: 1
@@ -31,6 +34,9 @@ properties:
   '#clock-cells':
     const: 1
 
+  '#power-domain-cells':
+    const: 1
+
 required:
   - compatible
   - reg
@@ -38,11 +44,23 @@ required:
 
 additionalProperties: false
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          const: marvell,pxa1908-apmu
+
+then:
+  properties:
+    '#power-domain-cells': false
+
 examples:
   # APMU block:
   - |
     clock-controller@d4282800 {
-      compatible = "marvell,pxa1908-apmu";
+      compatible = "marvell,pxa1908-apmu", "syscon";
       reg = <0xd4282800 0x400>;
       #clock-cells = <1>;
+      #power-domain-cells = <1>;
     };

-- 
2.50.1

Re: [PATCH v2 1/4] dt-bindings: clock: marvell,pxa1908: Add syscon compatible to apmu
Posted by Rob Herring (Arm) 1 month, 1 week ago
On Thu, 21 Aug 2025 13:17:43 +0200, Duje Mihanović wrote:
> Add required syscon compatible to the APMU controller. This is required
> for the SoC's power domain controller as the registers are shared.
> 
> Also add a #power-domain-cells property as the node will serve as the
> power domain phandle.
> 
> Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
> ---
> v2:
> - Drop simple-mfd
> - Add #power-domain-cells
> ---
>  .../devicetree/bindings/clock/marvell,pxa1908.yaml | 30 +++++++++++++++++-----
>  1 file changed, 24 insertions(+), 6 deletions(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>