ASoC: dt-bindings: qcom,q6adm: convert to dtschema
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 10 Sep 2022 09:14:24 +0000 (11:14 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Sep 2022 21:12:34 +0000 (22:12 +0100)
Convert Qualcomm Audio Device Manager (Q6ADM) bindings to DT schema.

The original bindings documented:
1. APR service node with compatibles: "qcom,q6adm" and
"qcom,q6adm-v<MAJOR-NUMBER>.<MINOR-NUMBER>",
2. Routing child node with compatible "qcom,q6adm-routing".

The conversion entirely drops (1) because the compatible is already
documented in bindings/soc/qcom/qcom,apr.yaml.  The
"qcom,q6adm-v<MAJOR-NUMBER>.<MINOR-NUMBER>" on the other hand is not
used at all - neither in existing DTS, nor in downstream sources - so
versions seems to be fully auto-detectable.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220910091428.50418-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/sound/qcom,q6adm.txt [deleted file]

index a1a8f77..54328d7 100644 (file)
@@ -112,8 +112,9 @@ patternProperties:
         description: Qualcomm DSP audio ports
 
       routing:
-        # TODO: Waiting for Documentation/devicetree/bindings/sound/qcom,q6adm.txt
         type: object
+        $ref: /schemas/sound/qcom,q6adm-routing.yaml#
+        unevaluatedProperties: false
         description: Qualcomm DSP LPASS audio routing
 
       qcom,protection-domain:
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml b/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml
new file mode 100644 (file)
index 0000000..d0f7a79
--- /dev/null
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/qcom,q6adm-routing.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Audio Device Manager (Q6ADM) routing
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description:
+  Qualcomm Audio Device Manager (Q6ADM) routing node represents routing
+  specific configuration.
+
+properties:
+  compatible:
+    enum:
+      - qcom,q6adm-routing
+
+  "#sound-dai-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/soc/qcom,apr.h>
+    #include <dt-bindings/sound/qcom,q6asm.h>
+
+    apr {
+        compatible = "qcom,apr-v2";
+        qcom,domain = <APR_DOMAIN_ADSP>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        service@8 {
+            compatible = "qcom,q6adm";
+            reg = <APR_SVC_ADM>;
+            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+
+            routing {
+                compatible = "qcom,q6adm-routing";
+                #sound-dai-cells = <0>;
+            };
+        };
+    };
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt b/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
deleted file mode 100644 (file)
index 15c353a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Qualcomm Audio Device Manager (Q6ADM) binding
-
-Q6ADM is one of the APR audio service on Q6DSP.
-Please refer to qcom,apr.txt for details of the coommon apr service bindings
-used by the apr service device.
-
-- but must contain the following property:
-
-- compatible:
-       Usage: required
-       Value type: <stringlist>
-       Definition: must be "qcom,q6adm-v<MAJOR-NUMBER>.<MINOR-NUMBER>".
-                  Or "qcom,q6adm" where the version number can be queried
-                  from DSP.
-                  example "qcom,q6adm-v2.0"
-
-
-= ADM routing
-"routing" subnode of the ADM node represents adm routing specific configuration
-
-- compatible:
-       Usage: required
-       Value type: <stringlist>
-       Definition: must be "qcom,q6adm-routing".
-
-- #sound-dai-cells
-       Usage: required
-       Value type: <u32>
-       Definition: Must be 0
-
-= EXAMPLE
-apr-service@8 {
-       compatible = "qcom,q6adm";
-       reg = <APR_SVC_ADM>;
-       q6routing: routing {
-               compatible = "qcom,q6adm-routing";
-               #sound-dai-cells = <0>;
-       };
-};