1 # SPDX-License-Identifier: GPL-2.0
4 $id: http://devicetree.org/schemas/sound/simple-card.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Simple Audio Card Driver
10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
15 description: Indicates dai-link frame master.
16 $ref: /schemas/types.yaml#/definitions/phandle
19 description: Indicates dai-link bit clock master
20 $ref: /schemas/types.yaml#/definitions/phandle
23 description: dai-link uses frame clock inversion
24 $ref: /schemas/types.yaml#/definitions/flag
27 description: dai-link uses bit clock inversion
28 $ref: /schemas/types.yaml#/definitions/flag
31 description: see tdm-slot.txt.
32 $ref: /schemas/types.yaml#/definitions/uint32
35 description: see tdm-slot.txt.
36 $ref: /schemas/types.yaml#/definitions/uint32
38 system-clock-frequency:
40 If a clock is specified and a multiplication factor is given with
41 mclk-fs, the clock will be set to the calculated mclk frequency
42 when the stream starts.
43 $ref: /schemas/types.yaml#/definitions/uint32
45 system-clock-direction-out:
47 specifies clock direction as 'out' on initialization.
48 It is useful for some aCPUs with fixed clocks.
49 $ref: /schemas/types.yaml#/definitions/flag
53 Specifies that the clock frequency should not be modified.
54 Implied when system-clock-frequency is specified, but can be used when
55 a clock is mapped to the device whose frequency cannot or should not be
56 changed. When mclk-fs is also specified, this restricts the device to a
57 single fixed sampling rate.
58 $ref: /schemas/types.yaml#/definitions/flag
62 Multiplication factor between stream rate and codec mclk.
63 When defined, mclk-fs property defined in dai-link sub nodes are ignored.
64 $ref: /schemas/types.yaml#/definitions/uint32
68 List of phandles pointing to auxiliary devices, such
69 as amplifiers, to be added to the sound card.
70 $ref: /schemas/types.yaml#/definitions/phandle-array
73 description: CPU to Codec rate convert.
74 $ref: /schemas/types.yaml#/definitions/uint32
77 description: CPU to Codec rate channels.
78 $ref: /schemas/types.yaml#/definitions/uint32
81 description: "device name prefix"
82 $ref: /schemas/types.yaml#/definitions/string
89 A list of the connections between audio components.
90 Each entry is a pair of strings, the first being the
91 connection's sink, the second being the connection's source.
92 $ref: /schemas/types.yaml#/definitions/non-unique-string-array
95 description: User specified audio sound widgets.
96 $ref: /schemas/types.yaml#/definitions/non-unique-string-array
99 description: the widget names for which pin switches must be created.
100 $ref: /schemas/types.yaml#/definitions/string-array
103 description: audio format.
124 $ref: "#/definitions/mclk-fs"
126 $ref: "#/definitions/prefix"
128 $ref: "#/definitions/frame-inversion"
130 $ref: "#/definitions/bitclock-inversion"
132 $ref: /schemas/types.yaml#/definitions/flag
134 $ref: /schemas/types.yaml#/definitions/flag
137 $ref: "#/definitions/dai-tdm-slot-num"
139 $ref: "#/definitions/dai-tdm-slot-width"
142 system-clock-frequency:
143 $ref: "#/definitions/system-clock-frequency"
144 system-clock-direction-out:
145 $ref: "#/definitions/system-clock-direction-out"
147 $ref: "#/definitions/system-clock-fixed"
156 - simple-scu-audio-card
164 $ref: "#/definitions/label"
166 simple-audio-card,name:
167 description: User specified audio sound card name.
168 $ref: /schemas/types.yaml#/definitions/string
170 simple-audio-card,widgets:
171 $ref: "#/definitions/widgets"
172 simple-audio-card,routing:
173 $ref: "#/definitions/routing"
176 simple-audio-card,frame-master:
177 $ref: "#/definitions/frame-master"
178 simple-audio-card,bitclock-master:
179 $ref: "#/definitions/bitclock-master"
180 simple-audio-card,frame-inversion:
181 $ref: "#/definitions/frame-inversion"
182 simple-audio-card,bitclock-inversion:
183 $ref: "#/definitions/bitclock-inversion"
184 simple-audio-card,format:
185 $ref: "#/definitions/format"
186 simple-audio-card,mclk-fs:
187 $ref: "#/definitions/mclk-fs"
188 simple-audio-card,aux-devs:
189 $ref: "#/definitions/aux-devs"
190 simple-audio-card,convert-rate:
191 $ref: "#/definitions/convert-rate"
192 simple-audio-card,convert-channels:
193 $ref: "#/definitions/convert-channels"
194 simple-audio-card,prefix:
195 $ref: "#/definitions/prefix"
196 simple-audio-card,pin-switches:
197 $ref: "#/definitions/pin-switches"
198 simple-audio-card,hp-det-gpio:
200 simple-audio-card,mic-det-gpio:
204 "^simple-audio-card,cpu(@[0-9a-f]+)?$":
205 $ref: "#/definitions/dai"
206 "^simple-audio-card,codec(@[0-9a-f]+)?$":
207 $ref: "#/definitions/dai"
209 "^simple-audio-card,dai-link(@[0-9a-f]+)?$":
211 Container for dai-link level properties and the CPU and CODEC sub-nodes.
212 This container may be omitted when the card has only one DAI link.
220 $ref: "#/definitions/frame-master"
222 $ref: "#/definitions/bitclock-master"
224 $ref: "#/definitions/frame-inversion"
226 $ref: "#/definitions/bitclock-inversion"
228 $ref: "#/definitions/format"
230 $ref: "#/definitions/mclk-fs"
232 $ref: "#/definitions/aux-devs"
234 $ref: "#/definitions/convert-rate"
236 $ref: "#/definitions/convert-channels"
238 $ref: "#/definitions/prefix"
240 $ref: "#/definitions/pin-switches"
248 $ref: "#/definitions/dai"
249 "^codec(@[0-9a-f]+)?":
250 $ref: "#/definitions/dai"
251 additionalProperties: false
256 additionalProperties: false
259 #--------------------
261 #--------------------
264 compatible = "simple-audio-card";
265 simple-audio-card,name = "VF610-Tower-Sound-Card";
266 simple-audio-card,format = "left_j";
267 simple-audio-card,bitclock-master = <&dailink0_master>;
268 simple-audio-card,frame-master = <&dailink0_master>;
269 simple-audio-card,widgets =
270 "Microphone", "Microphone Jack",
271 "Headphone", "Headphone Jack",
272 "Speaker", "External Speaker";
273 simple-audio-card,routing =
274 "MIC_IN", "Microphone Jack",
275 "Headphone Jack", "HP_OUT",
276 "External Speaker", "LINE_OUT";
278 simple-audio-card,cpu {
279 sound-dai = <&sh_fsi2 0>;
282 dailink0_master: simple-audio-card,codec {
283 sound-dai = <&ak4648>;
288 #--------------------
290 #--------------------
293 compatible = "simple-audio-card";
294 simple-audio-card,name = "Cubox Audio";
296 #address-cells = <1>;
299 simple-audio-card,dai-link@0 { /* I2S - HDMI */
303 sound-dai = <&audio0>;
306 sound-dai = <&tda998x0>;
310 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
313 sound-dai = <&audio1>;
316 sound-dai = <&tda998x1>;
320 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
323 sound-dai = <&audio2>;
326 sound-dai = <&spdif_codec>;
331 #--------------------
332 # route audio from IMX6 SSI2 through TLV320DAC3100 codec
333 # through TPA6130A2 amplifier to headphones:
334 #--------------------
337 compatible = "simple-audio-card";
339 simple-audio-card,widgets =
340 "Headphone", "Headphone Jack";
341 simple-audio-card,routing =
342 "Headphone Jack", "HPLEFT",
343 "Headphone Jack", "HPRIGHT",
346 simple-audio-card,aux-devs = <&>;
347 simple-audio-card,cpu {
350 simple-audio-card,codec {
351 sound-dai = <&codec>;
356 #--------------------
357 # Sampling Rate Conversion
358 #--------------------
361 compatible = "simple-audio-card";
363 simple-audio-card,name = "rsnd-ak4643";
364 simple-audio-card,format = "left_j";
365 simple-audio-card,bitclock-master = <&sndcodec>;
366 simple-audio-card,frame-master = <&sndcodec>;
368 simple-audio-card,convert-rate = <48000>;
370 simple-audio-card,prefix = "ak4642";
371 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
372 "DAI0 Capture", "ak4642 Capture";
374 sndcpu: simple-audio-card,cpu {
375 sound-dai = <&rcar_sound>;
378 sndcodec: simple-audio-card,codec {
379 sound-dai = <&ak4643>;
380 system-clock-frequency = <11289600>;
384 #--------------------
385 # 2 CPU 1 Codec (Mixing)
386 #--------------------
389 compatible = "simple-audio-card";
390 #address-cells = <1>;
393 simple-audio-card,name = "rsnd-ak4643";
394 simple-audio-card,format = "left_j";
395 simple-audio-card,bitclock-master = <&dpcmcpu>;
396 simple-audio-card,frame-master = <&dpcmcpu>;
398 simple-audio-card,convert-rate = <48000>;
399 simple-audio-card,convert-channels = <2>;
401 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
402 "ak4642 Playback", "DAI1 Playback";
404 dpcmcpu: simple-audio-card,cpu@0 {
406 sound-dai = <&rcar_sound 0>;
409 simple-audio-card,cpu@1 {
411 sound-dai = <&rcar_sound 1>;
414 simple-audio-card,codec {
416 sound-dai = <&ak4643>;
417 clocks = <&audio_clock>;
421 #--------------------
422 # Multi DAI links with DPCM:
425 # CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
426 # CPU2 --/ /* DPCM 3ch/4ch */
427 # CPU3 --/ /* DPCM 5ch/6ch */
428 # CPU4 --/ /* DPCM 7ch/8ch */
429 # CPU5 ------ PCM3168A-c
430 #--------------------
433 compatible = "simple-audio-card";
434 #address-cells = <1>;
437 simple-audio-card,routing =
438 "pcm3168a Playback", "DAI1 Playback",
439 "pcm3168a Playback", "DAI2 Playback",
440 "pcm3168a Playback", "DAI3 Playback",
441 "pcm3168a Playback", "DAI4 Playback";
443 simple-audio-card,dai-link@0 {
446 bitclock-master = <&sndcpu0>;
447 frame-master = <&sndcpu0>;
450 sound-dai = <&rcar_sound 0>;
453 sound-dai = <&ak4613>;
457 simple-audio-card,dai-link@1 {
460 bitclock-master = <&sndcpu1>;
461 frame-master = <&sndcpu1>;
463 convert-channels = <8>; /* TDM Split */
466 sound-dai = <&rcar_sound 1>;
469 sound-dai = <&rcar_sound 2>;
472 sound-dai = <&rcar_sound 3>;
475 sound-dai = <&rcar_sound 4>;
480 dai-tdm-slot-num = <8>;
481 sound-dai = <&pcm3168a 0>;
485 simple-audio-card,dai-link@2 {
488 bitclock-master = <&sndcpu2>;
489 frame-master = <&sndcpu2>;
492 sound-dai = <&rcar_sound 5>;
497 sound-dai = <&pcm3168a 1>;