DSP Audio Strem bindings have been documented with DSP services bindings which makes it difficult to reuse them, so pull them out in to a dedicated bindings. Also as part of this change convert them into yaml format. This patch also removes q6asm bindings as dsp services are now documented in apr bindings. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> --- .../devicetree/bindings/sound/qcom,q6asm.txt | 70 -------------- .../sound/qcom,q6dsp-audio-stream.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 70 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt deleted file mode 100644 index 8c4883becae9..000000000000 --- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt +++ /dev/null @@ -1,70 +0,0 @@ -Qualcomm Audio Stream Manager (Q6ASM) binding - -Q6ASM is one of the APR audio service on Q6DSP. -Please refer to qcom,apr.txt for details of the common 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,q6asm-v<MAJOR-NUMBER>.<MINOR-NUMBER>". - Or "qcom,q6asm" where the version number can be queried - from DSP. - example "qcom,q6asm-v2.0" - -= ASM DAIs (Digial Audio Interface) -"dais" subnode of the ASM node represents dai specific configuration - -- compatible: - Usage: required - Value type: <stringlist> - Definition: must be "qcom,q6asm-dais". - -- #sound-dai-cells - Usage: required - Value type: <u32> - Definition: Must be 1 - -== ASM DAI is subnode of "dais" and represent a dai, it includes board specific -configuration of each dai. Must contain the following properties. - -- reg - Usage: required - Value type: <u32> - Definition: Must be dai id - -- direction: - Usage: Required for Compress offload dais - Value type: <u32> - Definition: Specifies the direction of the dai stream - Q6ASM_DAI_TX_RX (0) for both tx and rx - Q6ASM_DAI_TX (1) for only tx (Capture/Encode) - Q6ASM_DAI_RX (2) for only rx (Playback/Decode) - -- is-compress-dai: - Usage: Required for Compress offload dais - Value type: <boolean> - Definition: present for Compress offload dais - - -= EXAMPLE -#include <dt-bindings/sound/qcom,q6asm.h> - -apr-service@7 { - compatible = "qcom,q6asm"; - reg = <APR_SVC_ASM>; - q6asmdai: dais { - compatible = "qcom,q6asm-dais"; - #address-cells = <1>; - #size-cells = <0>; - #sound-dai-cells = <1>; - - dai@0 { - reg = <0>; - direction = <Q6ASM_DAI_RX>; - is-compress-dai; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml new file mode 100644 index 000000000000..0e70b486b51a --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-audio-stream.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm DSP Audio Stream binding + +maintainers: + - Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> + +description: | + This binding describes the Qualcomm DSP Audio stream + +properties: + compatible: + const: qcom,q6asm-dais + + reg: + maxItems: 1 + + '#sound-dai-cells': + const: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +#Digital Audio Interfaces +patternProperties: + '^dai@[0-9]+$': + type: object + description: + Q6DSP Audio Stream Digital Audio Interfaces. + + properties: + reg: + description: + Digital Audio Interface ID + + direction: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + description: + Compress DAI direction + 0 = bi-directional + 1 = tx only + 2 = rx only + + is-compress-dai: + type: boolean + description: + Indicate if DAI is for compress offload + + required: + - reg + + additionalProperties: false + +required: + - compatible + - reg + - "#sound-dai-cells" + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,apr.h> + apr { + #address-cells = <1>; + #size-cells = <0>; + apr-service@7 { + reg = <APR_SVC_ASM>; + #address-cells = <1>; + #size-cells = <0>; + q6asmdai@1 { + compatible = "qcom,q6asm-dais"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + + dai@1 { + reg = <1>; + is-compress-dai; + }; + }; + }; + }; -- 2.21.0