summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-12-02 15:55:03 +0100
committerMark Brown <broonie@kernel.org>2021-12-13 23:43:59 +0100
commitb7875d88bf70100d2fe0dc08072018f994ccd6c4 (patch)
tree71fa2aaa44440a339735f75931297f6be555a97f /Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
parentASoC: dt-bindings: qcom: sm8250: Document "aux-devs" (diff)
downloadlinux-b7875d88bf70100d2fe0dc08072018f994ccd6c4.tar.xz
linux-b7875d88bf70100d2fe0dc08072018f994ccd6c4.zip
ASoC: dt-bindings: qcom: apq8016-sbc: Move to qcom,sm8250 DT schema
All the Qualcomm sound card drivers use the same common device tree parsing code, so the allowed device tree nodes are almost the same for all of them. Convert the qcom,apq8016-sbc-sndcard documentation to a DT schema by adding it to the existing qcom,sm8250 schema. The only speciality of qcom,apq8016-sbc-sndcard is that it has memory resources for setting up an I/O mux. This can be handled using a conditional if statement that only requires it for the apq8016-sbc compatible. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211202145505.58852-4-stephan@gerhold.net Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/sound/qcom,sm8250.yaml')
-rw-r--r--Documentation/devicetree/bindings/sound/qcom,sm8250.yaml83
1 files changed, 81 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
index 3123382297b8..97f13a0a71a9 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
@@ -4,18 +4,19 @@
$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Qualcomm Technologies Inc. SM8250 ASoC sound card driver
+title: Qualcomm Technologies Inc. ASoC sound card drivers
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
- This bindings describes SC8250 SoC based sound cards
+ This bindings describes Qualcomm SoC based sound cards
which uses LPASS internal codec for audio.
properties:
compatible:
enum:
+ - qcom,apq8016-sbc-sndcard
- qcom,sm8250-sndcard
- qcom,qrb5165-rb5-sndcard
@@ -37,6 +38,10 @@ properties:
$ref: /schemas/types.yaml#/definitions/string
description: User visible long sound card name
+ # Only valid for some compatibles (see allOf if below)
+ reg: true
+ reg-names: true
+
patternProperties:
".*-dai-link$":
description:
@@ -79,6 +84,33 @@ required:
- compatible
- model
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,apq8016-sbc-sndcard
+ then:
+ properties:
+ reg:
+ items:
+ - description: Microphone I/O mux register address
+ - description: Speaker I/O mux register address
+ reg-names:
+ items:
+ - const: mic-iomux
+ - const: spkr-iomux
+ required:
+ - compatible
+ - model
+ - reg
+ - reg-names
+ else:
+ properties:
+ reg: false
+ reg-names: false
+
additionalProperties: false
examples:
@@ -160,3 +192,50 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/sound/qcom,lpass.h>
+ sound@7702000 {
+ compatible = "qcom,apq8016-sbc-sndcard";
+ reg = <0x07702000 0x4>, <0x07702004 0x4>;
+ reg-names = "mic-iomux", "spkr-iomux";
+
+ model = "DB410c";
+ audio-routing =
+ "AMIC2", "MIC BIAS Internal2",
+ "AMIC3", "MIC BIAS External1";
+
+ pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
+ pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
+ pinctrl-names = "default", "sleep";
+
+ quaternary-dai-link {
+ link-name = "ADV7533";
+ cpu {
+ sound-dai = <&lpass MI2S_QUATERNARY>;
+ };
+ codec {
+ sound-dai = <&adv_bridge 0>;
+ };
+ };
+
+ primary-dai-link {
+ link-name = "WCD";
+ cpu {
+ sound-dai = <&lpass MI2S_PRIMARY>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
+ };
+ };
+
+ tertiary-dai-link {
+ link-name = "WCD-Capture";
+ cpu {
+ sound-dai = <&lpass MI2S_TERTIARY>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
+ };
+ };
+ };