diff mbox series

[2/2] dt-bindings: firmware: qcom,scm: narrow clocks and interconnects

Message ID 20221122092345.44369-2-krzysztof.kozlowski@linaro.org
State Accepted
Commit c5b8840c895a5b0291ef84e3f13d92c3414033e7
Headers show
Series [1/2] dt-bindings: firmware: qcom,scm: document MSM8226 clocks | expand

Commit Message

Krzysztof Kozlowski Nov. 22, 2022, 9:23 a.m. UTC
SCM has clock inputs and interconnects only on some of the SoCs, so
disallow them inb other cases, which makes the binding stricter.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Abel Vesa <abel.vesa@linaro.org>
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Cc: Melody Olvera <quic_molvera@quicinc.com>
---
 .../bindings/firmware/qcom,scm.yaml           | 44 ++++++++++++++++---
 1 file changed, 37 insertions(+), 7 deletions(-)

Comments

Rob Herring Nov. 30, 2022, 7:11 p.m. UTC | #1
On Tue, 22 Nov 2022 10:23:45 +0100, Krzysztof Kozlowski wrote:
> SCM has clock inputs and interconnects only on some of the SoCs, so
> disallow them inb other cases, which makes the binding stricter.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Abel Vesa <abel.vesa@linaro.org>
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Melody Olvera <quic_molvera@quicinc.com>
> ---
>  .../bindings/firmware/qcom,scm.yaml           | 44 ++++++++++++++++---
>  1 file changed, 37 insertions(+), 7 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
index fc986f2f5d30..8e6e9ebb343d 100644
--- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
+++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
@@ -82,6 +82,32 @@  properties:
     description: TCSR hardware block
 
 allOf:
+  # Clocks
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,scm-apq8064
+              - qcom,scm-apq8084
+              - qcom,scm-mdm9607
+              - qcom,scm-msm8226
+              - qcom,scm-msm8660
+              - qcom,scm-msm8916
+              - qcom,scm-msm8953
+              - qcom,scm-msm8960
+              - qcom,scm-msm8974
+              - qcom,scm-msm8976
+              - qcom,scm-sm6375
+    then:
+      required:
+        - clocks
+        - clock-names
+    else:
+      properties:
+        clock-names: false
+        clocks: false
+
   - if:
       properties:
         compatible:
@@ -100,10 +126,6 @@  allOf:
         clocks:
           maxItems: 1
 
-      required:
-        - clocks
-        - clock-names
-
   - if:
       properties:
         compatible:
@@ -128,9 +150,17 @@  allOf:
           minItems: 3
           maxItems: 3
 
-      required:
-        - clocks
-        - clock-names
+  # Interconnects
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - qcom,scm-sm8450
+    then:
+      properties:
+        interconnects: false
 
 required:
   - compatible