diff mbox series

[v2,1/4] dt-bindings: remoteproc: qcom: sc7180-pas: Add ADSP compatible

Message ID 20230905-sc7180-adsp-rproc-v2-1-8ab7f299600a@trvn.ru (mailing list archive)
State Superseded
Headers show
Series sc7180: Add ADSP | expand

Commit Message

Nikita Travkin Sept. 5, 2023, 10:41 a.m. UTC
SC7180 has an ADSP remoteproc. Add it's compatible to the bindings and
refactor the schema conditionals to fit the ADSP.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
v2: Refactor similar to qcom,sm8150-pas.yaml
---
 .../bindings/remoteproc/qcom,sc7180-pas.yaml       | 81 +++++++++++++++-------
 1 file changed, 56 insertions(+), 25 deletions(-)

Comments

Krzysztof Kozlowski Sept. 6, 2023, 1:34 p.m. UTC | #1
On 05/09/2023 12:41, Nikita Travkin wrote:
> SC7180 has an ADSP remoteproc. Add it's compatible to the bindings and
> refactor the schema conditionals to fit the ADSP.
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
> v2: Refactor similar to qcom,sm8150-pas.yaml
> ---


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

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
index 689d5d535331..f10f329677d8 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml
@@ -16,6 +16,7 @@  description:
 properties:
   compatible:
     enum:
+      - qcom,sc7180-adsp-pas
       - qcom,sc7180-mpss-pas
       - qcom,sc7280-mpss-pas
 
@@ -30,26 +31,6 @@  properties:
     items:
       - const: xo
 
-  interrupts:
-    minItems: 6
-
-  interrupt-names:
-    minItems: 6
-
-  power-domains:
-    minItems: 2
-    items:
-      - description: CX power domain
-      - description: MX power domain
-      - description: MSS power domain
-
-  power-domain-names:
-    minItems: 2
-    items:
-      - const: cx
-      - const: mx
-      - const: mss
-
   memory-region:
     maxItems: 1
     description: Reference to the reserved-memory for the Hexagon core
@@ -71,6 +52,40 @@  required:
 
 allOf:
   - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sc7180-adsp-pas
+    then:
+      properties:
+        interrupts:
+          maxItems: 5
+        interrupt-names:
+          maxItems: 5
+    else:
+      properties:
+        interrupts:
+          minItems: 6
+        interrupt-names:
+          minItems: 6
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sc7180-adsp-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: LCX power domain
+            - description: LMX power domain
+        power-domain-names:
+          items:
+            - const: lcx
+            - const: lmx
+
   - if:
       properties:
         compatible:
@@ -79,15 +94,31 @@  allOf:
     then:
       properties:
         power-domains:
-          minItems: 3
+          items:
+            - description: CX power domain
+            - description: MX power domain
+            - description: MSS power domain
         power-domain-names:
-          minItems: 3
-    else:
+          items:
+            - const: cx
+            - const: mx
+            - const: mss
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sc7280-mpss-pas
+    then:
       properties:
         power-domains:
-          maxItems: 2
+          items:
+            - description: CX power domain
+            - description: MX power domain
         power-domain-names:
-          maxItems: 2
+          items:
+            - const: cx
+            - const: mx
 
 unevaluatedProperties: false