From 301628d805019999f1ae9764aadfcface9c4e309 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 10 Sep 2022 11:14:24 +0200 Subject: [PATCH] ASoC: dt-bindings: qcom,q6adm: convert to dtschema 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.", 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." 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 Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220910091428.50418-12-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- .../devicetree/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 a1a8f77..54328d7 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 0000000..d0f7a79 --- /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 + - Srinivas Kandagatla + +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 + #include + + apr { + compatible = "qcom,apr-v2"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + + service@8 { + compatible = "qcom,q6adm"; + reg = ; + 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 15c353a..0000000 --- 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: - Definition: must be "qcom,q6adm-v.". - 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: - Definition: must be "qcom,q6adm-routing". - -- #sound-dai-cells - Usage: required - Value type: - Definition: Must be 0 - -= EXAMPLE -apr-service@8 { - compatible = "qcom,q6adm"; - reg = ; - q6routing: routing { - compatible = "qcom,q6adm-routing"; - #sound-dai-cells = <0>; - }; -}; -- 2.7.4