xref: /linux/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml (revision 8716bd241fa120aacce5e0136125b7ecc74fe3b2)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Technologies Inc. ASoC sound card drivers
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12description:
13  This bindings describes Qualcomm SoC based sound cards
14  which uses LPASS internal codec for audio.
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - enum:
21              - lenovo,yoga-c630-sndcard
22              - qcom,db845c-sndcard
23          - const: qcom,sdm845-sndcard
24      - items:
25          - enum:
26              - qcom,sm8550-sndcard
27              - qcom,sm8650-sndcard
28          - const: qcom,sm8450-sndcard
29      - enum:
30          - qcom,apq8096-sndcard
31          - qcom,qcm6490-idp-sndcard
32          - qcom,qcs6490-rb3gen2-sndcard
33          - qcom,qrb5165-rb5-sndcard
34          - qcom,sc7180-qdsp6-sndcard
35          - qcom,sc8280xp-sndcard
36          - qcom,sdm845-sndcard
37          - qcom,sm8250-sndcard
38          - qcom,sm8450-sndcard
39          - qcom,x1e80100-sndcard
40
41  audio-routing:
42    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
43    description:
44      A list of the connections between audio components. Each entry is a
45      pair of strings, the first being the connection's sink, the second
46      being the connection's source. Valid names could be power supplies,
47      MicBias of codec and the jacks on the board.
48
49  aux-devs:
50    $ref: /schemas/types.yaml#/definitions/phandle-array
51    description: |
52      List of phandles pointing to auxiliary devices, such
53      as amplifiers, to be added to the sound card.
54
55  model:
56    $ref: /schemas/types.yaml#/definitions/string
57    description: User visible long sound card name
58
59patternProperties:
60  ".*-dai-link$":
61    description:
62      Each subnode represents a dai link. Subnodes of each dai links would be
63      cpu/codec dais.
64
65    type: object
66
67    properties:
68      link-name:
69        description: Indicates dai-link name and PCM stream name.
70        $ref: /schemas/types.yaml#/definitions/string
71        maxItems: 1
72
73      cpu:
74        description: Holds subnode which indicates cpu dai.
75        type: object
76        additionalProperties: false
77
78        properties:
79          sound-dai:
80            maxItems: 1
81
82      platform:
83        description: Holds subnode which indicates platform dai.
84        type: object
85        additionalProperties: false
86
87        properties:
88          sound-dai:
89            maxItems: 1
90
91      codec:
92        description: Holds subnode which indicates codec dai.
93        type: object
94        additionalProperties: false
95
96        properties:
97          sound-dai:
98            minItems: 1
99            maxItems: 8
100
101    required:
102      - link-name
103      - cpu
104
105    additionalProperties: false
106
107required:
108  - compatible
109  - model
110
111additionalProperties: false
112
113examples:
114
115  - |
116    #include <dt-bindings/sound/qcom,q6afe.h>
117    #include <dt-bindings/sound/qcom,q6asm.h>
118    sound {
119        compatible = "qcom,qrb5165-rb5-sndcard";
120        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
121        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
122                    "SpkrRight IN", "WSA_SPK2 OUT",
123                    "VA DMIC0", "vdd-micb",
124                    "VA DMIC1", "vdd-micb";
125
126        mm1-dai-link {
127            link-name = "MultiMedia0";
128            cpu {
129                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
130            };
131        };
132
133        mm2-dai-link {
134            link-name = "MultiMedia2";
135            cpu {
136                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
137            };
138        };
139
140        mm3-dai-link {
141            link-name = "MultiMedia3";
142            cpu {
143                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
144            };
145        };
146
147        hdmi-dai-link {
148            link-name = "HDMI Playback";
149            cpu {
150                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
151            };
152
153            platform {
154                sound-dai = <&q6routing>;
155            };
156
157            codec {
158                sound-dai = <&lt9611_codec 0>;
159            };
160        };
161
162        wsa-dai-link {
163            link-name = "WSA Playback";
164            cpu {
165                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
166            };
167
168            platform {
169                sound-dai = <&q6routing>;
170            };
171
172            codec {
173                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
174            };
175        };
176
177        va-dai-link {
178            link-name = "VA Capture";
179            cpu {
180                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
181            };
182
183            platform {
184                sound-dai = <&q6routing>;
185            };
186
187            codec {
188                sound-dai = <&vamacro 0>;
189            };
190        };
191    };
192