[PATCH RFC 1/5] dt-bindings: clock: marvell,pxa1908: Add simple-mfd, syscon compatible to apmu

Duje Mihanović posted 5 patches 1 month, 4 weeks ago
There is a newer version of this series
[PATCH RFC 1/5] dt-bindings: clock: marvell,pxa1908: Add simple-mfd, syscon compatible to apmu
Posted by Duje Mihanović 1 month, 4 weeks ago
Add required syscon and simple-mfd compatibles to the APMU controller.
This is required for the SoC's power domain controller as the registers
are shared. The simple-mfd compatible allows devices whose registers are
completely contained in the APMU range (such as the power domain
controller and potentially more) to be children of the clock controller
node.

Also add an optional power-controller child node to the APMU controller
to accommodate the new power domain driver.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
---
 .../devicetree/bindings/clock/marvell,pxa1908.yaml | 36 ++++++++++++++++++----
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
index 4e78933232b6b925811425f853bedf6e9f01a27d..5e924ebd97e6457191ac021addafd22caba48964 100644
--- a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
+++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
@@ -19,11 +19,15 @@ 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: simple-mfd
+          - const: syscon
 
   reg:
     maxItems: 1
@@ -31,18 +35,38 @@ properties:
   '#clock-cells':
     const: 1
 
+  power-controller:
+    description: |
+      Optional power domain controller node.
+    type: object
+    additionalProperties: true
+    properties:
+      compatible:
+        const: marvell,pxa1908-power-controller
+
 required:
   - compatible
   - reg
   - '#clock-cells'
 
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: marvell,pxa1908-apmu
+    then:
+      properties:
+        power-controller: false
+
 additionalProperties: false
 
 examples:
   # APMU block:
   - |
     clock-controller@d4282800 {
-      compatible = "marvell,pxa1908-apmu";
+      compatible = "marvell,pxa1908-apmu", "simple-mfd", "syscon";
       reg = <0xd4282800 0x400>;
       #clock-cells = <1>;
     };

-- 
2.50.1

Re: [PATCH RFC 1/5] dt-bindings: clock: marvell,pxa1908: Add simple-mfd, syscon compatible to apmu
Posted by Krzysztof Kozlowski 1 month, 4 weeks ago
On Wed, Aug 06, 2025 at 07:33:20PM +0200, Duje Mihanović wrote:
> Add required syscon and simple-mfd compatibles to the APMU controller.
> This is required for the SoC's power domain controller as the registers
> are shared. The simple-mfd compatible allows devices whose registers are
> completely contained in the APMU range (such as the power domain
> controller and potentially more) to be children of the clock controller
> node.
> 
> Also add an optional power-controller child node to the APMU controller
> to accommodate the new power domain driver.
> 
> Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
> ---
>  .../devicetree/bindings/clock/marvell,pxa1908.yaml | 36 ++++++++++++++++++----
>  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
> index 4e78933232b6b925811425f853bedf6e9f01a27d..5e924ebd97e6457191ac021addafd22caba48964 100644
> --- a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
> +++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
> @@ -19,11 +19,15 @@ 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: simple-mfd
> +          - const: syscon
>  
>    reg:
>      maxItems: 1
> @@ -31,18 +35,38 @@ properties:
>    '#clock-cells':
>      const: 1
>  
> +  power-controller:
> +    description: |
> +      Optional power domain controller node.
> +    type: object
> +    additionalProperties: true
> +    properties:
> +      compatible:
> +        const: marvell,pxa1908-power-controller

I commented on next patch, so oly to re-iterate here: no, don't create
nodes just to instantiate drivers. You do not have any resources here.

Best regards,
Krzysztof