dt-bindings: firmware: qcom,scm: narrow clocks and interconnects
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 22 Nov 2022 09:23:45 +0000 (10:23 +0100)
committerBjorn Andersson <andersson@kernel.org>
Wed, 11 Jan 2023 04:07:53 +0000 (22:07 -0600)
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>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221122092345.44369-2-krzysztof.kozlowski@linaro.org
Documentation/devicetree/bindings/firmware/qcom,scm.yaml

index fc986f2..8e6e9eb 100644 (file)
@@ -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