diff mbox series

[v7,2/4] dt-bindings: mailbox: qcom: correct clocks for IPQ6018 and IPQ8074

Message ID 20220711105931.43164-2-robimarko@gmail.com (mailing list archive)
State Superseded
Headers show
Series [v7,1/4] dt-bindings: mailbox: qcom: set correct #clock-cells | expand

Commit Message

Robert Marko July 11, 2022, 10:59 a.m. UTC
IPQ6018 APSS driver is registered by APCS as they share the same register
space, and it uses "pll" and "xo" as inputs.

Correct the allowed clocks for IPQ6018 and IPQ8074 as they share the same
driver to allow "pll" and "xo" as clock-names.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 .../mailbox/qcom,apcs-kpss-global.yaml        | 44 ++++++++++++++-----
 1 file changed, 32 insertions(+), 12 deletions(-)

Comments

Krzysztof Kozlowski July 12, 2022, 8:56 a.m. UTC | #1
On 11/07/2022 12:59, Robert Marko wrote:
> IPQ6018 APSS driver is registered by APCS as they share the same register
> space, and it uses "pll" and "xo" as inputs.
> 
> Correct the allowed clocks for IPQ6018 and IPQ8074 as they share the same
> driver to allow "pll" and "xo" as clock-names.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
>  .../mailbox/qcom,apcs-kpss-global.yaml        | 44 ++++++++++++++-----
>  1 file changed, 32 insertions(+), 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> index 95ecb84e3278..939ce63fa824 100644
> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> @@ -41,10 +41,6 @@ properties:
>    clocks:
>      description: phandles to the parent clocks of the clock driver
>      minItems: 2

You need maxItems (widest) as well.

> -    items:
> -      - description: primary pll parent of the clock driver
> -      - description: auxiliary parent
> -      - description: reference clock
>  
>    '#mbox-cells':
>      const: 1
> @@ -54,10 +50,6 @@ properties:
>  
>    clock-names:
>      minItems: 2

You need maxItems as well.

> -    items:
> -      - const: pll
> -      - const: aux
> -      - const: ref

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index 95ecb84e3278..939ce63fa824 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -41,10 +41,6 @@  properties:
   clocks:
     description: phandles to the parent clocks of the clock driver
     minItems: 2
-    items:
-      - description: primary pll parent of the clock driver
-      - description: auxiliary parent
-      - description: reference clock
 
   '#mbox-cells':
     const: 1
@@ -54,10 +50,6 @@  properties:
 
   clock-names:
     minItems: 2
-    items:
-      - const: pll
-      - const: aux
-      - const: ref
 
 required:
   - compatible
@@ -71,8 +63,6 @@  allOf:
       properties:
         compatible:
           enum:
-            - qcom,ipq6018-apcs-apps-global
-            - qcom,ipq8074-apcs-apps-global
             - qcom,msm8916-apcs-kpss-global
             - qcom,msm8994-apcs-kpss-global
             - qcom,msm8996-apcs-hmss-global
@@ -86,7 +76,13 @@  allOf:
     then:
       properties:
         clocks:
-          maxItems: 2
+          items:
+            - description: primary pll parent of the clock driver
+            - description: auxiliary parent
+        clock-names:
+          items:
+            - const: pll
+            - const: aux
   - if:
       properties:
         compatible:
@@ -95,7 +91,31 @@  allOf:
     then:
       properties:
         clocks:
-          maxItems: 3
+          items:
+            - description: primary pll parent of the clock driver
+            - description: auxiliary parent
+            - description: reference clock
+        clock-names:
+          items:
+            - const: pll
+            - const: aux
+            - const: ref
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,ipq6018-apcs-apps-global
+            - qcom,ipq8074-apcs-apps-global
+    then:
+      properties:
+        clocks:
+          items:
+            - description: primary pll parent of the clock driver
+            - description: XO clock
+        clock-names:
+          items:
+            - const: pll
+            - const: xo
   - if:
       properties:
         compatible: