OSDN Git Service

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