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"
154 Additional devices used by the simple audio card.
158 $ref: audio-iio-aux.yaml#
165 - simple-scu-audio-card
173 $ref: "#/definitions/label"
175 simple-audio-card,name:
176 description: User specified audio sound card name.
177 $ref: /schemas/types.yaml#/definitions/string
179 simple-audio-card,widgets:
180 $ref: "#/definitions/widgets"
181 simple-audio-card,routing:
182 $ref: "#/definitions/routing"
185 simple-audio-card,frame-master:
186 $ref: "#/definitions/frame-master"
187 simple-audio-card,bitclock-master:
188 $ref: "#/definitions/bitclock-master"
189 simple-audio-card,frame-inversion:
190 $ref: "#/definitions/frame-inversion"
191 simple-audio-card,bitclock-inversion:
192 $ref: "#/definitions/bitclock-inversion"
193 simple-audio-card,format:
194 $ref: "#/definitions/format"
195 simple-audio-card,mclk-fs:
196 $ref: "#/definitions/mclk-fs"
197 simple-audio-card,aux-devs:
198 $ref: "#/definitions/aux-devs"
199 simple-audio-card,additional-devs:
200 $ref: "#/definitions/additional-devs"
201 simple-audio-card,convert-rate:
202 $ref: "#/definitions/convert-rate"
203 simple-audio-card,convert-channels:
204 $ref: "#/definitions/convert-channels"
205 simple-audio-card,prefix:
206 $ref: "#/definitions/prefix"
207 simple-audio-card,pin-switches:
208 $ref: "#/definitions/pin-switches"
209 simple-audio-card,hp-det-gpio:
212 simple-audio-card,hp-det-gpios:
214 simple-audio-card,mic-det-gpio:
217 simple-audio-card,mic-det-gpios:
221 "^simple-audio-card,cpu(@[0-9a-f]+)?$":
222 $ref: "#/definitions/dai"
223 "^simple-audio-card,codec(@[0-9a-f]+)?$":
224 $ref: "#/definitions/dai"
225 "^simple-audio-card,plat(@[0-9a-f]+)?$":
226 $ref: "#/definitions/dai"
228 "^simple-audio-card,dai-link(@[0-9a-f]+)?$":
230 Container for dai-link level properties and the CPU and CODEC sub-nodes.
231 This container may be omitted when the card has only one DAI link.
243 $ref: "#/definitions/frame-master"
245 $ref: "#/definitions/bitclock-master"
247 $ref: "#/definitions/frame-inversion"
249 $ref: "#/definitions/bitclock-inversion"
251 $ref: "#/definitions/format"
253 $ref: "#/definitions/mclk-fs"
255 $ref: "#/definitions/aux-devs"
257 $ref: "#/definitions/convert-rate"
259 $ref: "#/definitions/convert-channels"
261 $ref: "#/definitions/prefix"
263 $ref: "#/definitions/pin-switches"
277 $ref: "#/definitions/dai"
279 $ref: "#/definitions/dai"
280 additionalProperties: false
285 additionalProperties: false
288 # --------------------
290 # --------------------
293 compatible = "simple-audio-card";
294 simple-audio-card,name = "VF610-Tower-Sound-Card";
295 simple-audio-card,format = "left_j";
296 simple-audio-card,bitclock-master = <&dailink0_master>;
297 simple-audio-card,frame-master = <&dailink0_master>;
298 simple-audio-card,widgets =
299 "Microphone", "Microphone Jack",
300 "Headphone", "Headphone Jack",
301 "Speaker", "External Speaker";
302 simple-audio-card,routing =
303 "MIC_IN", "Microphone Jack",
304 "Headphone Jack", "HP_OUT",
305 "External Speaker", "LINE_OUT";
307 simple-audio-card,cpu {
308 sound-dai = <&sh_fsi2 0>;
311 dailink0_master: simple-audio-card,codec {
312 sound-dai = <&ak4648>;
317 # --------------------
319 # --------------------
322 compatible = "simple-audio-card";
323 simple-audio-card,name = "Cubox Audio";
325 #address-cells = <1>;
328 simple-audio-card,dai-link@0 { /* I2S - HDMI */
332 sound-dai = <&audio0>;
335 sound-dai = <&tda998x0>;
339 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
342 sound-dai = <&audio1>;
345 sound-dai = <&tda998x1>;
349 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
352 sound-dai = <&audio2>;
355 sound-dai = <&spdif_codec>;
360 # --------------------
361 # route audio from IMX6 SSI2 through TLV320DAC3100 codec
362 # through TPA6130A2 amplifier to headphones:
363 # --------------------
366 compatible = "simple-audio-card";
368 simple-audio-card,widgets =
369 "Headphone", "Headphone Jack";
370 simple-audio-card,routing =
371 "Headphone Jack", "HPLEFT",
372 "Headphone Jack", "HPRIGHT",
375 simple-audio-card,aux-devs = <&>;
376 simple-audio-card,cpu {
379 simple-audio-card,codec {
380 sound-dai = <&codec>;
385 # --------------------
386 # route audio to/from a codec through an amplifier
387 # designed with a potentiometer driven by IIO:
388 # --------------------
391 compatible = "simple-audio-card";
393 simple-audio-card,aux-devs = <&_in>, <&_out>;
394 simple-audio-card,routing =
395 "CODEC LEFTIN", "AMP_IN LEFT OUT",
396 "CODEC RIGHTIN", "AMP_IN RIGHT OUT",
397 "AMP_OUT LEFT IN", "CODEC LEFTOUT",
398 "AMP_OUT RIGHT IN", "CODEC RIGHTOUT";
400 simple-audio-card,additional-devs {
401 amp_out: iio-aux-out {
402 compatible = "audio-iio-aux";
403 io-channels = <&pot_out 0>, <&pot_out 1>;
404 io-channel-names = "LEFT", "RIGHT";
405 snd-control-invert-range = <1 1>;
406 sound-name-prefix = "AMP_OUT";
410 compatible = "audio-iio-aux";
411 io-channels = <&pot_in 0>, <&pot_in 1>;
412 io-channel-names = "LEFT", "RIGHT";
413 sound-name-prefix = "AMP_IN";
417 simple-audio-card,cpu {
421 simple-audio-card,codec {
422 sound-dai = <&codec>;
427 # --------------------
428 # Sampling Rate Conversion
429 # --------------------
432 compatible = "simple-audio-card";
434 simple-audio-card,name = "rsnd-ak4643";
435 simple-audio-card,format = "left_j";
436 simple-audio-card,bitclock-master = <&sndcodec>;
437 simple-audio-card,frame-master = <&sndcodec>;
439 simple-audio-card,convert-rate = <48000>;
441 simple-audio-card,prefix = "ak4642";
442 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
443 "DAI0 Capture", "ak4642 Capture";
445 sndcpu: simple-audio-card,cpu {
446 sound-dai = <&rcar_sound>;
449 sndcodec: simple-audio-card,codec {
450 sound-dai = <&ak4643>;
451 system-clock-frequency = <11289600>;
455 # --------------------
456 # 2 CPU 1 Codec (Mixing)
457 # --------------------
460 compatible = "simple-audio-card";
461 #address-cells = <1>;
464 simple-audio-card,name = "rsnd-ak4643";
465 simple-audio-card,format = "left_j";
466 simple-audio-card,bitclock-master = <&dpcmcpu>;
467 simple-audio-card,frame-master = <&dpcmcpu>;
469 simple-audio-card,convert-rate = <48000>;
470 simple-audio-card,convert-channels = <2>;
472 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
473 "ak4642 Playback", "DAI1 Playback";
475 dpcmcpu: simple-audio-card,cpu@0 {
477 sound-dai = <&rcar_sound 0>;
480 simple-audio-card,cpu@1 {
482 sound-dai = <&rcar_sound 1>;
485 simple-audio-card,codec {
487 sound-dai = <&ak4643>;
488 clocks = <&audio_clock>;
492 # --------------------
493 # Multi DAI links with DPCM:
496 # CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
497 # CPU2 --/ /* DPCM 3ch/4ch */
498 # CPU3 --/ /* DPCM 5ch/6ch */
499 # CPU4 --/ /* DPCM 7ch/8ch */
500 # CPU5 ------ PCM3168A-c
501 # --------------------
504 compatible = "simple-audio-card";
505 #address-cells = <1>;
508 simple-audio-card,routing =
509 "pcm3168a Playback", "DAI1 Playback",
510 "pcm3168a Playback", "DAI2 Playback",
511 "pcm3168a Playback", "DAI3 Playback",
512 "pcm3168a Playback", "DAI4 Playback";
514 simple-audio-card,dai-link@0 {
517 bitclock-master = <&sndcpu0>;
518 frame-master = <&sndcpu0>;
521 sound-dai = <&rcar_sound 0>;
524 sound-dai = <&ak4613>;
528 simple-audio-card,dai-link@1 {
531 bitclock-master = <&sndcpu1>;
532 frame-master = <&sndcpu1>;
534 convert-channels = <8>; /* TDM Split */
537 sound-dai = <&rcar_sound 1>;
540 sound-dai = <&rcar_sound 2>;
543 sound-dai = <&rcar_sound 3>;
546 sound-dai = <&rcar_sound 4>;
551 dai-tdm-slot-num = <8>;
552 sound-dai = <&pcm3168a 0>;
556 simple-audio-card,dai-link@2 {
559 bitclock-master = <&sndcpu2>;
560 frame-master = <&sndcpu2>;
563 sound-dai = <&rcar_sound 5>;
568 sound-dai = <&pcm3168a 1>;