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 Device Tree Bindings
10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
15 description: Indicates dai-link frame master.
16 $ref: /schemas/types.yaml#/definitions/phandle-array
20 description: Indicates dai-link bit clock master
21 $ref: /schemas/types.yaml#/definitions/phandle-array
25 description: dai-link uses frame clock inversion
26 $ref: /schemas/types.yaml#/definitions/flag
29 description: dai-link uses bit clock inversion
30 $ref: /schemas/types.yaml#/definitions/flag
33 description: see tdm-slot.txt.
34 $ref: /schemas/types.yaml#/definitions/uint32
37 description: see tdm-slot.txt.
38 $ref: /schemas/types.yaml#/definitions/uint32
40 system-clock-frequency:
42 If a clock is specified and a multiplication factor is given with
43 mclk-fs, the clock will be set to the calculated mclk frequency
44 when the stream starts.
45 $ref: /schemas/types.yaml#/definitions/uint32
47 system-clock-direction-out:
49 specifies clock direction as 'out' on initialization.
50 It is useful for some aCPUs with fixed clocks.
51 $ref: /schemas/types.yaml#/definitions/flag
55 Multiplication factor between stream rate and codec mclk.
56 When defined, mclk-fs property defined in dai-link sub nodes are ignored.
57 $ref: /schemas/types.yaml#/definitions/uint32
61 List of phandles pointing to auxiliary devices, such
62 as amplifiers, to be added to the sound card.
63 $ref: /schemas/types.yaml#/definitions/phandle-array
66 description: CPU to Codec rate convert.
67 $ref: /schemas/types.yaml#/definitions/uint32
70 description: CPU to Codec rate channels.
71 $ref: /schemas/types.yaml#/definitions/uint32
74 description: "device name prefix"
75 $ref: /schemas/types.yaml#/definitions/string
82 A list of the connections between audio components.
83 Each entry is a pair of strings, the first being the
84 connection's sink, the second being the connection's source.
85 $ref: /schemas/types.yaml#/definitions/non-unique-string-array
88 description: User specified audio sound widgets.
89 $ref: /schemas/types.yaml#/definitions/non-unique-string-array
92 description: the widget names for which pin switches must be created.
93 $ref: /schemas/types.yaml#/definitions/string-array
96 description: audio format.
117 $ref: "#/definitions/mclk-fs"
119 $ref: "#/definitions/prefix"
121 $ref: "#/definitions/frame-inversion"
123 $ref: "#/definitions/bitclock-inversion"
125 $ref: /schemas/types.yaml#/definitions/flag
127 $ref: /schemas/types.yaml#/definitions/flag
130 $ref: "#/definitions/dai-tdm-slot-num"
132 $ref: "#/definitions/dai-tdm-slot-width"
135 system-clock-frequency:
136 $ref: "#/definitions/system-clock-frequency"
137 system-clock-direction-out:
138 $ref: "#/definitions/system-clock-direction-out"
147 - simple-scu-audio-card
155 $ref: "#/definitions/label"
157 simple-audio-card,name:
158 description: User specified audio sound card name.
159 $ref: /schemas/types.yaml#/definitions/string
161 # use patternProperties to avoid naming "xxx,yyy" issue
163 "^simple-audio-card,widgets$":
164 $ref: "#/definitions/widgets"
165 "^simple-audio-card,routing$":
166 $ref: "#/definitions/routing"
167 "^simple-audio-card,cpu(@[0-9a-f]+)?":
168 $ref: "#/definitions/dai"
169 "^simple-audio-card,codec(@[0-9a-f]+)?":
170 $ref: "#/definitions/dai"
173 "^simple-audio-card,frame-master$":
174 $ref: "#/definitions/frame-master"
175 "^simple-audio-card,bitclock-master$":
176 $ref: "#/definitions/bitclock-master"
177 "^simple-audio-card,frame-inversion$":
178 $ref: "#/definitions/frame-inversion"
179 "^simple-audio-card,bitclock-inversion$":
180 $ref: "#/definitions/bitclock-inversion"
181 "^simple-audio-card,format$":
182 $ref: "#/definitions/format"
183 "^simple-audio-card,mclk-fs$":
184 $ref: "#/definitions/mclk-fs"
185 "^simple-audio-card,aux-devs$":
186 $ref: "#/definitions/aux-devs"
187 "^simple-audio-card,convert-rate$":
188 $ref: "#/definitions/convert-rate"
189 "^simple-audio-card,convert-channels$":
190 $ref: "#/definitions/convert-channels"
191 "^simple-audio-card,prefix$":
192 $ref: "#/definitions/prefix"
193 "^simple-audio-card,pin-switches$":
194 $ref: "#/definitions/pin-switches"
195 "^simple-audio-card,hp-det-gpio$":
197 "^simple-audio-card,mic-det-gpio$":
200 "^simple-audio-card,dai-link(@[0-9a-f]+)?$":
202 Container for dai-link level properties and the CPU and CODEC sub-nodes.
203 This container may be omitted when the card has only one DAI link.
211 $ref: "#/definitions/frame-master"
213 $ref: "#/definitions/bitclock-master"
215 $ref: "#/definitions/frame-inversion"
217 $ref: "#/definitions/bitclock-inversion"
219 $ref: "#/definitions/format"
221 $ref: "#/definitions/mclk-fs"
223 $ref: "#/definitions/aux-devs"
225 $ref: "#/definitions/convert-rate"
227 $ref: "#/definitions/convert-channels"
229 $ref: "#/definitions/prefix"
231 $ref: "#/definitions/pin-switches"
239 $ref: "#/definitions/dai"
240 "^codec(@[0-9a-f]+)?":
241 $ref: "#/definitions/dai"
242 additionalProperties: false
247 additionalProperties: false
250 #--------------------
252 #--------------------
255 compatible = "simple-audio-card";
256 simple-audio-card,name = "VF610-Tower-Sound-Card";
257 simple-audio-card,format = "left_j";
258 simple-audio-card,bitclock-master = <&dailink0_master>;
259 simple-audio-card,frame-master = <&dailink0_master>;
260 simple-audio-card,widgets =
261 "Microphone", "Microphone Jack",
262 "Headphone", "Headphone Jack",
263 "Speaker", "External Speaker";
264 simple-audio-card,routing =
265 "MIC_IN", "Microphone Jack",
266 "Headphone Jack", "HP_OUT",
267 "External Speaker", "LINE_OUT";
269 simple-audio-card,cpu {
270 sound-dai = <&sh_fsi2 0>;
273 dailink0_master: simple-audio-card,codec {
274 sound-dai = <&ak4648>;
279 #--------------------
281 #--------------------
284 compatible = "simple-audio-card";
285 simple-audio-card,name = "Cubox Audio";
287 #address-cells = <1>;
290 simple-audio-card,dai-link@0 { /* I2S - HDMI */
294 sound-dai = <&audio0>;
297 sound-dai = <&tda998x0>;
301 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
304 sound-dai = <&audio1>;
307 sound-dai = <&tda998x1>;
311 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
314 sound-dai = <&audio2>;
317 sound-dai = <&spdif_codec>;
322 #--------------------
323 # route audio from IMX6 SSI2 through TLV320DAC3100 codec
324 # through TPA6130A2 amplifier to headphones:
325 #--------------------
328 compatible = "simple-audio-card";
330 simple-audio-card,widgets =
331 "Headphone", "Headphone Jack";
332 simple-audio-card,routing =
333 "Headphone Jack", "HPLEFT",
334 "Headphone Jack", "HPRIGHT",
337 simple-audio-card,aux-devs = <&>;
338 simple-audio-card,cpu {
341 simple-audio-card,codec {
342 sound-dai = <&codec>;
347 #--------------------
348 # Sampling Rate Conversion
349 #--------------------
352 compatible = "simple-audio-card";
354 simple-audio-card,name = "rsnd-ak4643";
355 simple-audio-card,format = "left_j";
356 simple-audio-card,bitclock-master = <&sndcodec>;
357 simple-audio-card,frame-master = <&sndcodec>;
359 simple-audio-card,convert-rate = <48000>;
361 simple-audio-card,prefix = "ak4642";
362 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
363 "DAI0 Capture", "ak4642 Capture";
365 sndcpu: simple-audio-card,cpu {
366 sound-dai = <&rcar_sound>;
369 sndcodec: simple-audio-card,codec {
370 sound-dai = <&ak4643>;
371 system-clock-frequency = <11289600>;
375 #--------------------
376 # 2 CPU 1 Codec (Mixing)
377 #--------------------
380 compatible = "simple-audio-card";
381 #address-cells = <1>;
384 simple-audio-card,name = "rsnd-ak4643";
385 simple-audio-card,format = "left_j";
386 simple-audio-card,bitclock-master = <&dpcmcpu>;
387 simple-audio-card,frame-master = <&dpcmcpu>;
389 simple-audio-card,convert-rate = <48000>;
390 simple-audio-card,convert-channels = <2>;
392 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
393 "ak4642 Playback", "DAI1 Playback";
395 dpcmcpu: simple-audio-card,cpu@0 {
397 sound-dai = <&rcar_sound 0>;
400 simple-audio-card,cpu@1 {
402 sound-dai = <&rcar_sound 1>;
405 simple-audio-card,codec {
407 sound-dai = <&ak4643>;
408 clocks = <&audio_clock>;
412 #--------------------
413 # Multi DAI links with DPCM:
416 # CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
417 # CPU2 --/ /* DPCM 3ch/4ch */
418 # CPU3 --/ /* DPCM 5ch/6ch */
419 # CPU4 --/ /* DPCM 7ch/8ch */
420 # CPU5 ------ PCM3168A-c
421 #--------------------
424 compatible = "simple-audio-card";
425 #address-cells = <1>;
428 simple-audio-card,routing =
429 "pcm3168a Playback", "DAI1 Playback",
430 "pcm3168a Playback", "DAI2 Playback",
431 "pcm3168a Playback", "DAI3 Playback",
432 "pcm3168a Playback", "DAI4 Playback";
434 simple-audio-card,dai-link@0 {
437 bitclock-master = <&sndcpu0>;
438 frame-master = <&sndcpu0>;
441 sound-dai = <&rcar_sound 0>;
444 sound-dai = <&ak4613>;
448 simple-audio-card,dai-link@1 {
451 bitclock-master = <&sndcpu1>;
452 frame-master = <&sndcpu1>;
454 convert-channels = <8>; /* TDM Split */
457 sound-dai = <&rcar_sound 1>;
460 sound-dai = <&rcar_sound 2>;
463 sound-dai = <&rcar_sound 3>;
466 sound-dai = <&rcar_sound 4>;
471 dai-tdm-slot-num = <8>;
472 sound-dai = <&pcm3168a 0>;
476 simple-audio-card,dai-link@2 {
479 bitclock-master = <&sndcpu2>;
480 frame-master = <&sndcpu2>;
483 sound-dai = <&rcar_sound 5>;
488 sound-dai = <&pcm3168a 1>;