smb: client: Fix minor whitespace errors and warnings
[linux-modified.git] / Documentation / devicetree / bindings / sound / qcom,sm8250.yaml
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
7 title: Qualcomm Technologies Inc. ASoC sound card drivers
8
9 maintainers:
10   - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12 description:
13   This bindings describes Qualcomm SoC based sound cards
14   which uses LPASS internal codec for audio.
15
16 properties:
17   compatible:
18     oneOf:
19       - items:
20           - enum:
21               - lenovo,yoga-c630-sndcard
22               - qcom,db845c-sndcard
23           - const: qcom,sdm845-sndcard
24       - enum:
25           - qcom,apq8016-sbc-sndcard
26           - qcom,msm8916-qdsp6-sndcard
27           - qcom,qrb5165-rb5-sndcard
28           - qcom,sc7180-qdsp6-sndcard
29           - qcom,sc8280xp-sndcard
30           - qcom,sdm845-sndcard
31           - qcom,sm8250-sndcard
32           - qcom,sm8450-sndcard
33
34   audio-routing:
35     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
36     description:
37       A list of the connections between audio components. Each entry is a
38       pair of strings, the first being the connection's sink, the second
39       being the connection's source. Valid names could be power supplies,
40       MicBias of codec and the jacks on the board.
41
42   aux-devs:
43     $ref: /schemas/types.yaml#/definitions/phandle-array
44     description: |
45       List of phandles pointing to auxiliary devices, such
46       as amplifiers, to be added to the sound card.
47
48   model:
49     $ref: /schemas/types.yaml#/definitions/string
50     description: User visible long sound card name
51
52   pin-switches:
53     description: List of widget names for which pin switches should be created.
54     $ref: /schemas/types.yaml#/definitions/string-array
55
56   widgets:
57     description: User specified audio sound widgets.
58     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
59
60   # Only valid for some compatibles (see allOf if below)
61   reg: true
62   reg-names: true
63
64 patternProperties:
65   ".*-dai-link$":
66     description:
67       Each subnode represents a dai link. Subnodes of each dai links would be
68       cpu/codec dais.
69
70     type: object
71
72     properties:
73       link-name:
74         description: Indicates dai-link name and PCM stream name.
75         $ref: /schemas/types.yaml#/definitions/string
76         maxItems: 1
77
78       cpu:
79         description: Holds subnode which indicates cpu dai.
80         type: object
81         additionalProperties: false
82
83         properties:
84           sound-dai:
85             maxItems: 1
86
87       platform:
88         description: Holds subnode which indicates platform dai.
89         type: object
90         additionalProperties: false
91
92         properties:
93           sound-dai:
94             maxItems: 1
95
96       codec:
97         description: Holds subnode which indicates codec dai.
98         type: object
99         additionalProperties: false
100
101         properties:
102           sound-dai:
103             minItems: 1
104             maxItems: 4
105
106     required:
107       - link-name
108       - cpu
109
110     additionalProperties: false
111
112 required:
113   - compatible
114   - model
115
116 allOf:
117   - if:
118       properties:
119         compatible:
120           contains:
121             enum:
122               - qcom,apq8016-sbc-sndcard
123               - qcom,msm8916-qdsp6-sndcard
124     then:
125       properties:
126         reg:
127           items:
128             - description: Microphone I/O mux register address
129             - description: Speaker I/O mux register address
130         reg-names:
131           items:
132             - const: mic-iomux
133             - const: spkr-iomux
134       required:
135         - compatible
136         - model
137         - reg
138         - reg-names
139     else:
140       properties:
141         reg: false
142         reg-names: false
143
144 additionalProperties: false
145
146 examples:
147
148   - |
149     #include <dt-bindings/sound/qcom,q6afe.h>
150     #include <dt-bindings/sound/qcom,q6asm.h>
151     sound {
152         compatible = "qcom,qrb5165-rb5-sndcard";
153         model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
154         audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
155                     "SpkrRight IN", "WSA_SPK2 OUT",
156                     "VA DMIC0", "vdd-micb",
157                     "VA DMIC1", "vdd-micb";
158
159         mm1-dai-link {
160             link-name = "MultiMedia0";
161             cpu {
162                 sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
163             };
164         };
165
166         mm2-dai-link {
167             link-name = "MultiMedia2";
168             cpu {
169                 sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
170             };
171         };
172
173         mm3-dai-link {
174             link-name = "MultiMedia3";
175             cpu {
176                 sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
177             };
178         };
179
180         hdmi-dai-link {
181             link-name = "HDMI Playback";
182             cpu {
183                 sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
184             };
185
186             platform {
187                 sound-dai = <&q6routing>;
188             };
189
190             codec {
191                 sound-dai = <&lt9611_codec 0>;
192             };
193         };
194
195         wsa-dai-link {
196             link-name = "WSA Playback";
197             cpu {
198                 sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
199             };
200
201             platform {
202                 sound-dai = <&q6routing>;
203             };
204
205             codec {
206                 sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
207             };
208         };
209
210         va-dai-link {
211             link-name = "VA Capture";
212             cpu {
213                 sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
214             };
215
216             platform {
217                 sound-dai = <&q6routing>;
218             };
219
220             codec {
221                 sound-dai = <&vamacro 0>;
222             };
223         };
224     };
225
226   - |
227     #include <dt-bindings/sound/qcom,lpass.h>
228     sound@7702000 {
229         compatible = "qcom,apq8016-sbc-sndcard";
230         reg = <0x07702000 0x4>, <0x07702004 0x4>;
231         reg-names = "mic-iomux", "spkr-iomux";
232
233         model = "DB410c";
234         audio-routing =
235             "AMIC2", "MIC BIAS Internal2",
236             "AMIC3", "MIC BIAS External1";
237
238         pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
239         pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
240         pinctrl-names = "default", "sleep";
241
242         quaternary-dai-link {
243             link-name = "ADV7533";
244             cpu {
245                 sound-dai = <&lpass MI2S_QUATERNARY>;
246             };
247             codec {
248                 sound-dai = <&adv_bridge 0>;
249             };
250         };
251
252         primary-dai-link {
253             link-name = "WCD";
254             cpu {
255                 sound-dai = <&lpass MI2S_PRIMARY>;
256             };
257             codec {
258                 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
259             };
260         };
261
262         tertiary-dai-link {
263             link-name = "WCD-Capture";
264             cpu {
265                 sound-dai = <&lpass MI2S_TERTIARY>;
266             };
267             codec {
268                 sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
269             };
270         };
271     };
272
273   - |
274     #include <dt-bindings/sound/qcom,q6afe.h>
275     #include <dt-bindings/sound/qcom,q6asm.h>
276     sound@7702000 {
277         compatible = "qcom,msm8916-qdsp6-sndcard";
278         reg = <0x07702000 0x4>, <0x07702004 0x4>;
279         reg-names = "mic-iomux", "spkr-iomux";
280
281         model = "msm8916";
282         widgets =
283             "Speaker", "Speaker",
284             "Headphone", "Headphones";
285         pin-switches = "Speaker";
286         audio-routing =
287             "Speaker", "Speaker Amp OUT",
288             "Speaker Amp IN", "HPH_R",
289             "Headphones", "HPH_L",
290             "Headphones", "HPH_R",
291             "AMIC1", "MIC BIAS Internal1",
292             "AMIC2", "MIC BIAS Internal2",
293             "AMIC3", "MIC BIAS Internal3";
294         aux-devs = <&speaker_amp>;
295
296         pinctrl-names = "default", "sleep";
297         pinctrl-0 = <&cdc_pdm_lines_act>;
298         pinctrl-1 = <&cdc_pdm_lines_sus>;
299
300         mm1-dai-link {
301             link-name = "MultiMedia1";
302             cpu {
303                 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
304             };
305         };
306
307         primary-dai-link {
308             link-name = "Primary MI2S";
309             cpu {
310                 sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
311             };
312             platform {
313                 sound-dai = <&q6routing>;
314             };
315             codec {
316                 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
317             };
318         };
319     };