diff mbox series

[v4,2/7] dt-bindings: remoteproc: Add bindings for the MT8365 APU

Message ID 20220304161514.994128-3-abailon@baylibre.com (mailing list archive)
State New, archived
Headers show
Series Add support of mt8183 APU | expand

Commit Message

Alexandre Bailon March 4, 2022, 4:15 p.m. UTC
This updates the Mediatek APU bindings to support the MT8365.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
 .../bindings/remoteproc/mtk,apu.yaml          | 45 ++++++++++++++++---
 1 file changed, 39 insertions(+), 6 deletions(-)

Comments

Rob Herring (Arm) March 7, 2022, 11:15 p.m. UTC | #1
On Fri, Mar 04, 2022 at 05:15:09PM +0100, Alexandre Bailon wrote:
> This updates the Mediatek APU bindings to support the MT8365.
> 
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
> ---
>  .../bindings/remoteproc/mtk,apu.yaml          | 45 ++++++++++++++++---
>  1 file changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
> index b640aa96d678..388352ccb2b5 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
> @@ -16,7 +16,9 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: mediatek,mt8183-apu
> +    enum:
> +      - mediatek,mt8183-apu
> +      - mediatek,mt8365-apu
>  
>    reg:
>      maxItems: 1
> @@ -26,13 +28,11 @@ properties:
>  
>    clocks:
>      minItems: 3
> -    maxItems: 3
> +    maxItems: 8
>  
>    clock-names:
> -    items:
> -      - const: axi
> -      - const: ipu
> -      - const: jtag
> +    minItems: 3
> +    maxItems: 8
>  
>    iommus:
>      maxItems: 3
> @@ -69,6 +69,39 @@ required:
>  
>  additionalProperties: false
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt8183-apu
> +    then:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: axi
> +            - const: ipu
> +            - const: jtag
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt8365-apu
> +    then:
> +      properties:
> +        clock-names:
> +          items:
> +            - const: if_ck
> +            - const: edma
> +            - const: ahb
> +            - const: axi
> +            - const: ipu
> +            - const: jtag
> +            - const: smi_cam
> +            - const: ifr_apu_axi

Keep the first 3 clocks the same as prior h/w and keep at the top level. 
Then the if/then just needs to set the number of entries to 3 or 8.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
index b640aa96d678..388352ccb2b5 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,apu.yaml
@@ -16,7 +16,9 @@  maintainers:
 
 properties:
   compatible:
-    const: mediatek,mt8183-apu
+    enum:
+      - mediatek,mt8183-apu
+      - mediatek,mt8365-apu
 
   reg:
     maxItems: 1
@@ -26,13 +28,11 @@  properties:
 
   clocks:
     minItems: 3
-    maxItems: 3
+    maxItems: 8
 
   clock-names:
-    items:
-      - const: axi
-      - const: ipu
-      - const: jtag
+    minItems: 3
+    maxItems: 8
 
   iommus:
     maxItems: 3
@@ -69,6 +69,39 @@  required:
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt8183-apu
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: axi
+            - const: ipu
+            - const: jtag
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt8365-apu
+    then:
+      properties:
+        clock-names:
+          items:
+            - const: if_ck
+            - const: edma
+            - const: ahb
+            - const: axi
+            - const: ipu
+            - const: jtag
+            - const: smi_cam
+            - const: ifr_apu_axi
+
 examples:
   - |
     #include <dt-bindings/clock/mt8183-clk.h>