All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v4 11/15] ASoC: dt-bindings: qcom,q6adm: convert to dtschema
Date: Sat, 10 Sep 2022 11:14:24 +0200	[thread overview]
Message-ID: <20220910091428.50418-12-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220910091428.50418-1-krzysztof.kozlowski@linaro.org>

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>

---

Changes since v3:
1. New patch.
---
 .../bindings/soc/qcom/qcom,apr.yaml           |  3 +-
 .../bindings/sound/qcom,q6adm-routing.yaml    | 52 +++++++++++++++++++
 .../devicetree/bindings/sound/qcom,q6adm.txt  | 39 --------------
 3 files changed, 54 insertions(+), 40 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.txt

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
index a1a8f77beef7..54328d74af85 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
@@ -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
index 000000000000..d0f7a79e240a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml
@@ -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
index 15c353a20de8..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,q6adm.txt
+++ /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>;
-	};
-};
-- 
2.34.1


  parent reply	other threads:[~2022-09-10  9:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-10  9:14 [PATCH v4 00/15] ASoC/qcom/arm64: Qualcomm ADSP DTS and binding fixes Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 01/15] arm64: dts: qcom: sdm630: align APR services node names with dtschema Krzysztof Kozlowski
2022-09-23 20:28   ` Krzysztof Kozlowski
2022-09-23 20:28     ` Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 02/15] arm64: dts: qcom: sdm845: " Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 03/15] arm64: dts: qcom: sm8250: " Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 04/15] arm64: dts: qcom: msm8996: fix APR services nodes Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 05/15] arm64: dts: qcom: sdm845: align dai node names with dtschema Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 06/15] arm64: dts: qcom: msm8996: " Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 07/15] arm64: dts: qcom: qrb5165-rb5: " Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 08/15] arm64: dts: qcom: sm8250: use generic name for LPASS clock controller Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 09/15] dt-bindings: soc: qcom: apr: correct service children Krzysztof Kozlowski
2022-09-10  9:14   ` Krzysztof Kozlowski
2022-09-10  9:14 ` [PATCH v4 10/15] ASoC: dt-bindings: qcom,q6asm: convert to dtschema Krzysztof Kozlowski
2022-09-13  9:09   ` Krzysztof Kozlowski
2022-09-10  9:14 ` Krzysztof Kozlowski [this message]
2022-09-13 14:52   ` [PATCH v4 11/15] ASoC: dt-bindings: qcom,q6adm: " Rob Herring
2022-09-13 14:52     ` Rob Herring
2022-09-10  9:14 ` [PATCH v4 12/15] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: cleanup example Krzysztof Kozlowski
2022-09-10  9:14   ` [PATCH v4 12/15] ASoC: dt-bindings: qcom, q6dsp-lpass-ports: " Krzysztof Kozlowski
2022-09-13 14:53   ` [PATCH v4 12/15] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: " Rob Herring
2022-09-13 14:53     ` Rob Herring
2022-09-10  9:14 ` [PATCH v4 13/15] ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: " Krzysztof Kozlowski
2022-09-10  9:14   ` [PATCH v4 13/15] ASoC: dt-bindings: qcom, q6dsp-lpass-clocks: " Krzysztof Kozlowski
2022-09-13 14:53   ` [PATCH v4 13/15] ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: " Rob Herring
2022-09-13 14:53     ` Rob Herring
2022-09-10  9:14 ` [PATCH v4 14/15] ASoC: dt-bindings: qcom,q6apm-dai: adjust indentation in example Krzysztof Kozlowski
2022-09-10  9:14   ` [PATCH v4 14/15] ASoC: dt-bindings: qcom, q6apm-dai: " Krzysztof Kozlowski
2022-09-13 14:54   ` [PATCH v4 14/15] ASoC: dt-bindings: qcom,q6apm-dai: " Rob Herring
2022-09-13 14:54     ` Rob Herring
2022-09-10  9:14 ` [PATCH v4 15/15] dt-bindings: soc: qcom: apr: add missing properties Krzysztof Kozlowski
2022-09-13 14:54   ` Rob Herring
2022-09-13 14:54     ` Rob Herring
2022-09-15  9:31 ` (subset) [PATCH v4 00/15] ASoC/qcom/arm64: Qualcomm ADSP DTS and binding fixes Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220910091428.50418-12-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andersson@kernel.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.