]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - Documentation/devicetree/bindings/sound/renesas,rsnd.txt
Merge remote-tracking branches 'asoc/topic/tas6424', 'asoc/topic/tfa9879', 'asoc...
[mirror_ubuntu-focal-kernel.git] / Documentation / devicetree / bindings / sound / renesas,rsnd.txt
CommitLineData
90e8e50f
KM
1Renesas R-Car sound
2
f1511a14
KM
3=============================================
4* Modules
5=============================================
6
b0a858a4 7Renesas R-Car and RZ/G sound is constructed from below modules
f1511a14
KM
8(for Gen2 or later)
9
10 SCU : Sampling Rate Converter Unit
11 - SRC : Sampling Rate Converter
12 - CMD
13 - CTU : Channel Transfer Unit
14 - MIX : Mixer
15 - DVC : Digital Volume and Mute Function
16 SSIU : Serial Sound Interface Unit
17 SSI : Serial Sound Interface
18
19See detail of each module's channels, connection, limitation on datasheet
20
21=============================================
22* Multi channel
23=============================================
24
25Multi channel is supported by Multi-SSI, or TDM-SSI.
26
27 Multi-SSI : 6ch case, you can use stereo x 3 SSI
28 TDM-SSI : 6ch case, you can use TDM
29
30=============================================
31* Enable/Disable each modules
32=============================================
33
34See datasheet to check SRC/CTU/MIX/DVC connect-limitation.
35DT controls enabling/disabling module.
36${LINUX}/arch/arm/boot/dts/r8a7790-lager.dts can be good example.
37This is example of
38
39Playback: [MEM] -> [SRC2] -> [DVC0] -> [SSIU0/SSI0] -> [codec]
40Capture: [MEM] <- [DVC1] <- [SRC3] <- [SSIU1/SSI1] <- [codec]
41
42 &rcar_sound {
43 ...
44 rcar_sound,dai {
45 dai0 {
46 playback = <&ssi0 &src2 &dvc0>;
47 capture = <&ssi1 &src3 &dvc1>;
48 };
49 };
50 };
51
52You can use below.
53${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example.
54
55 &src0 &ctu00 &mix0 &dvc0 &ssi0
56 &src1 &ctu01 &mix1 &dvc1 &ssi1
57 &src2 &ctu02 &ssi2
58 &src3 &ctu03 &ssi3
59 &src4 &ssi4
60 &src5 &ctu10 &ssi5
61 &src6 &ctu11 &ssi6
62 &src7 &ctu12 &ssi7
63 &src8 &ctu13 &ssi8
64 &src9 &ssi9
65
66=============================================
67* SRC (Sampling Rate Converter)
68=============================================
69
70 [xx]Hz [yy]Hz
71 ------> [SRC] ------>
72
73SRC can convert [xx]Hz to [yy]Hz. Then, it has below 2 modes
74
75 Asynchronous mode: input data / output data are based on different clocks.
76 you can use this mode on Playback / Capture
77 Synchronous mode: input data / output data are based on same clocks.
78 This mode will be used if system doesn't have its input clock,
79 for example digital TV case.
80 you can use this mode on Playback
81
82------------------
83** Asynchronous mode
84------------------
85
0378bb96 86You need to use "simple-scu-audio-card" sound card for it.
f1511a14
KM
87example)
88
89 sound {
0378bb96 90 compatible = "simple-scu-audio-card";
f1511a14
KM
91 ...
92 /*
93 * SRC Asynchronous mode setting
94 * Playback:
95 * All input data will be converted to 48kHz
96 * Capture:
97 * Inputed 48kHz data will be converted to
98 * system specified Hz
99 */
0378bb96 100 simple-audio-card,convert-rate = <48000>;
f1511a14 101 ...
0378bb96 102 simple-audio-card,cpu {
f1511a14
KM
103 sound-dai = <&rcar_sound>;
104 };
0378bb96 105 simple-audio-card,codec {
f1511a14
KM
106 ...
107 };
108 };
109
110------------------
111** Synchronous mode
112------------------
113
114 > amixer set "SRC Out Rate" on
115 > aplay xxxx.wav
116 > amixer set "SRC Out Rate" 48000
117 > amixer set "SRC Out Rate" 44100
118
119=============================================
120* CTU (Channel Transfer Unit)
121=============================================
122
123 [xx]ch [yy]ch
124 ------> [CTU] -------->
125
126CTU can convert [xx]ch to [yy]ch, or exchange outputed channel.
127CTU conversion needs matrix settings.
128For more detail information, see below
129
130 Renesas R-Car datasheet
131 - Sampling Rate Converter Unit (SCU)
132 - SCU Operation
133 - CMD Block
134 - Functional Blocks in CMD
135
136 Renesas R-Car datasheet
137 - Sampling Rate Converter Unit (SCU)
138 - Register Description
139 - CTUn Scale Value exx Register (CTUn_SVxxR)
140
141 ${LINUX}/sound/soc/sh/rcar/ctu.c
142 - comment of header
143
0378bb96 144You need to use "simple-scu-audio-card" sound card for it.
f1511a14
KM
145example)
146
147 sound {
0378bb96 148 compatible = "simple-scu-audio-card";
f1511a14
KM
149 ...
150 /*
151 * CTU setting
152 * All input data will be converted to 2ch
153 * as output data
154 */
0378bb96 155 simple-audio-card,convert-channels = <2>;
f1511a14 156 ...
0378bb96 157 simple-audio-card,cpu {
f1511a14
KM
158 sound-dai = <&rcar_sound>;
159 };
0378bb96 160 simple-audio-card,codec {
f1511a14
KM
161 ...
162 };
163 };
164
165Ex) Exchange output channel
166 Input -> Output
167 1ch -> 0ch
168 0ch -> 1ch
169
170 example of using matrix
171 output 0ch = (input 0ch x 0) + (input 1ch x 1)
172 output 1ch = (input 0ch x 1) + (input 1ch x 0)
173
174 amixer set "CTU Reset" on
175 amixer set "CTU Pass" 9,10
176 amixer set "CTU SV0" 0,4194304
177 amixer set "CTU SV1" 4194304,0
178
179 example of changing connection
180 amixer set "CTU Reset" on
181 amixer set "CTU Pass" 2,1
182
183=============================================
184* MIX (Mixer)
185=============================================
186
187MIX merges 2 sounds path. You can see 2 sound interface on system,
188and these sounds will be merged by MIX.
189
190 aplay -D plughw:0,0 xxxx.wav &
191 aplay -D plughw:0,1 yyyy.wav
192
0378bb96 193You need to use "simple-scu-audio-card" sound card for it.
f1511a14
KM
194Ex)
195 [MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0]
196 |
197 [MEM] -> [SRC2] -> [CTU03] -+
198
199 sound {
2ca69d73
KM
200 #address-cells = <1>;
201 #size-cells = <0>;
202
0378bb96 203 compatible = "simple-scu-audio-card";
f1511a14 204 ...
2ca69d73
KM
205 simple-audio-card,cpu@0 {
206 reg = <0>;
f1511a14
KM
207 sound-dai = <&rcar_sound 0>;
208 };
2ca69d73
KM
209 simple-audio-card,cpu@1 {
210 reg = <1>;
f1511a14
KM
211 sound-dai = <&rcar_sound 1>;
212 };
0378bb96 213 simple-audio-card,codec {
f1511a14
KM
214 ...
215 };
216 };
217
218 &rcar_sound {
219 ...
220 rcar_sound,dai {
221 dai0 {
222 playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
223 };
224 dai1 {
225 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
226 };
227 };
228 };
229
230=============================================
231* DVC (Digital Volume and Mute Function)
232=============================================
233
234DVC controls Playback/Capture volume.
235
236Playback Volume
237 amixer set "DVC Out" 100%
238
239Capture Volume
240 amixer set "DVC In" 100%
241
242Playback Mute
243 amixer set "DVC Out Mute" on
244
245Capture Mute
246 amixer set "DVC In Mute" on
247
248Volume Ramp
249 amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
250 amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
251 amixer set "DVC Out Ramp" on
252 aplay xxx.wav &
253 amixer set "DVC Out" 80% // Volume Down
254 amixer set "DVC Out" 100% // Volume Up
255
256=============================================
257* SSIU (Serial Sound Interface Unit)
258=============================================
259
260There is no DT settings for SSIU, because SSIU will be automatically
261selected via SSI.
262SSIU can avoid some under/over run error, because it has some buffer.
263But you can't use it if SSI was PIO mode.
264In DMA mode, you can select not to use SSIU by using "no-busif" on DT.
265
266 &ssi0 {
267 no-busif;
268 };
269
270=============================================
271* SSI (Serial Sound Interface)
272=============================================
273
274** PIO mode
275
276You can use PIO mode which is for connection check by using.
277Note: The system will drop non-SSI modules in PIO mode
278even though if DT is selecting other modules.
279
280 &ssi0 {
281 pio-transfer
282 };
283
284** DMA mode without SSIU
285
286You can use DMA without SSIU.
287Note: under/over run, or noise are likely to occur
288
289 &ssi0 {
290 no-busif;
291 };
292
293** PIN sharing
294
295Each SSI can share WS pin. It is based on platform.
296This is example if SSI1 want to share WS pin with SSI0
297
298 &ssi1 {
299 shared-pin;
300 };
301
302** Multi-SSI
303
304You can use Multi-SSI.
305This is example of SSI0/SSI1/SSI2 (= for 6ch)
306
307 &rcar_sound {
308 ...
309 rcar_sound,dai {
310 dai0 {
311 playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
312 };
313 };
314 };
315
316** TDM-SSI
317
318You can use TDM with SSI.
319This is example of TDM 6ch.
320Driver can automatically switches TDM <-> stereo mode in this case.
321
322 rsnd_tdm: sound {
323 compatible = "simple-audio-card";
324 ...
325 simple-audio-card,cpu {
326 /* system can use TDM 6ch */
327 dai-tdm-slot-num = <6>;
328 sound-dai = <&rcar_sound>;
329 };
330 simple-audio-card,codec {
331 ...
332 };
333 };
334
335
336=============================================
90e8e50f 337Required properties:
f1511a14
KM
338=============================================
339
56ba98ac
GU
340- compatible : "renesas,rcar_sound-<soctype>", fallbacks
341 "renesas,rcar_sound-gen1" if generation1, and
b0a858a4 342 "renesas,rcar_sound-gen2" if generation2 (or RZ/G1)
ac37a45b 343 "renesas,rcar_sound-gen3" if generation3
56ba98ac 344 Examples with soctypes are:
b0a858a4
BD
345 - "renesas,rcar_sound-r8a7743" (RZ/G1M)
346 - "renesas,rcar_sound-r8a7745" (RZ/G1E)
7667f716 347 - "renesas,rcar_sound-r8a7778" (R-Car M1A)
4eb404d0 348 - "renesas,rcar_sound-r8a7779" (R-Car H1)
56ba98ac
GU
349 - "renesas,rcar_sound-r8a7790" (R-Car H2)
350 - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
4eb404d0
SH
351 - "renesas,rcar_sound-r8a7793" (R-Car M2-N)
352 - "renesas,rcar_sound-r8a7794" (R-Car E2)
ac37a45b 353 - "renesas,rcar_sound-r8a7795" (R-Car H3)
90e8e50f
KM
354- reg : Should contain the register physical address.
355 required register is
356 SRU/ADG/SSI if generation1
357 SRU/ADG/SSIU/SSI if generation2
8bab0dd5
KM
358- rcar_sound,ssi : Should contain SSI feature.
359 The number of SSI subnode should be same as HW.
360 see below for detail.
361- rcar_sound,src : Should contain SRC feature.
362 The number of SRC subnode should be same as HW.
363 see below for detail.
9269e3c3
KM
364- rcar_sound,ctu : Should contain CTU feature.
365 The number of CTU subnode should be same as HW.
366 see below for detail.
70fb1052
KM
367- rcar_sound,mix : Should contain MIX feature.
368 The number of MIX subnode should be same as HW.
369 see below for detail.
34cb6123
KM
370- rcar_sound,dvc : Should contain DVC feature.
371 The number of DVC subnode should be same as HW.
372 see below for detail.
8bab0dd5
KM
373- rcar_sound,dai : DAI contents.
374 The number of DAI subnode should be same as HW.
375 see below for detail.
e3d2cec8
KM
376- #sound-dai-cells : it must be 0 if your system is using single DAI
377 it must be 1 if your system is using multi DAI
5b3889f8
KM
378- clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.
379- clock-names : List of necessary clock names.
380 "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X",
381 "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i"
209c0907
KM
382
383Optional properties:
2a46db4a
KM
384- #clock-cells : it must be 0 if your system has audio_clkout
385 it must be 1 if your system has audio_clkout0/1/2/3
386- clock-frequency : for all audio_clkout0/1/2/3
7dc20319
KM
387- clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn
388 is asynchronizes with lr-clock.
5f440c48
GU
389- resets : References to SSI resets.
390- reset-names : List of valid reset names.
391 "ssi-all", "ssi.X"
90e8e50f
KM
392
393SSI subnode properties:
394- interrupts : Should contain SSI interrupt for PIO transfer
395- shared-pin : if shared clock pin
199e7688 396- pio-transfer : use PIO transfer mode
d9288d0b 397- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case
e80a2fb1
KM
398- dma : Should contain Audio DMAC entry
399- dma-names : SSI case "rx" (=playback), "tx" (=capture)
400 SSIU case "rxu" (=playback), "txu" (=capture)
90e8e50f 401
8bab0dd5 402SRC subnode properties:
e80a2fb1
KM
403- dma : Should contain Audio DMAC entry
404- dma-names : "rx" (=playback), "tx" (=capture)
405
406DVC subnode properties:
407- dma : Should contain Audio DMAC entry
408- dma-names : "tx" (=playback/capture)
8bab0dd5 409
90e8e50f
KM
410DAI subnode properties:
411- playback : list of playback modules
412- capture : list of capture modules
413
f1511a14
KM
414
415=============================================
90e8e50f 416Example:
f1511a14 417=============================================
90e8e50f 418
596f74ec 419rcar_sound: sound@ec500000 {
90e8e50f 420 #sound-dai-cells = <1>;
56ba98ac 421 compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
90e8e50f
KM
422 reg = <0 0xec500000 0 0x1000>, /* SCU */
423 <0 0xec5a0000 0 0x100>, /* ADG */
424 <0 0xec540000 0 0x1000>, /* SSIU */
d3b1c0ba
KM
425 <0 0xec541000 0 0x1280>, /* SSI */
426 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
427 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
90e8e50f 428
bb02714f
KM
429 clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
430 <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
431 <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
432 <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
433 <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
434 <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
435 <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
436 <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
437 <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
438 <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
439 <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
440 <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
441 <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
442 clock-names = "ssi-all",
443 "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
444 "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
445 "src.9", "src.8", "src.7", "src.6", "src.5",
446 "src.4", "src.3", "src.2", "src.1", "src.0",
447 "dvc.0", "dvc.1",
448 "clk_a", "clk_b", "clk_c", "clk_i";
449
34cb6123 450 rcar_sound,dvc {
a5702e1c 451 dvc0: dvc-0 {
e80a2fb1
KM
452 dmas = <&audma0 0xbc>;
453 dma-names = "tx";
454 };
a5702e1c 455 dvc1: dvc-1 {
e80a2fb1
KM
456 dmas = <&audma0 0xbe>;
457 dma-names = "tx";
458 };
34cb6123
KM
459 };
460
70fb1052 461 rcar_sound,mix {
a5702e1c
GU
462 mix0: mix-0 { };
463 mix1: mix-1 { };
70fb1052
KM
464 };
465
9269e3c3 466 rcar_sound,ctu {
a5702e1c
GU
467 ctu00: ctu-0 { };
468 ctu01: ctu-1 { };
469 ctu02: ctu-2 { };
470 ctu03: ctu-3 { };
471 ctu10: ctu-4 { };
472 ctu11: ctu-5 { };
473 ctu12: ctu-6 { };
474 ctu13: ctu-7 { };
9269e3c3
KM
475 };
476
90e8e50f 477 rcar_sound,src {
a5702e1c 478 src0: src-0 {
5cf4f686 479 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
480 dmas = <&audma0 0x85>, <&audma1 0x9a>;
481 dma-names = "rx", "tx";
5cf4f686 482 };
a5702e1c 483 src1: src-1 {
5cf4f686 484 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
485 dmas = <&audma0 0x87>, <&audma1 0x9c>;
486 dma-names = "rx", "tx";
5cf4f686 487 };
a5702e1c 488 src2: src-2 {
5cf4f686 489 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
490 dmas = <&audma0 0x89>, <&audma1 0x9e>;
491 dma-names = "rx", "tx";
5cf4f686 492 };
a5702e1c 493 src3: src-3 {
5cf4f686 494 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
495 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
496 dma-names = "rx", "tx";
5cf4f686 497 };
a5702e1c 498 src4: src-4 {
5cf4f686 499 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
500 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
501 dma-names = "rx", "tx";
5cf4f686 502 };
a5702e1c 503 src5: src-5 {
5cf4f686 504 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
505 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
506 dma-names = "rx", "tx";
5cf4f686 507 };
a5702e1c 508 src6: src-6 {
5cf4f686 509 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
510 dmas = <&audma0 0x91>, <&audma1 0xb4>;
511 dma-names = "rx", "tx";
5cf4f686 512 };
a5702e1c 513 src7: src-7 {
5cf4f686 514 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
515 dmas = <&audma0 0x93>, <&audma1 0xb6>;
516 dma-names = "rx", "tx";
5cf4f686 517 };
a5702e1c 518 src8: src-8 {
5cf4f686 519 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
520 dmas = <&audma0 0x95>, <&audma1 0xb8>;
521 dma-names = "rx", "tx";
5cf4f686 522 };
a5702e1c 523 src9: src-9 {
5cf4f686 524 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
525 dmas = <&audma0 0x97>, <&audma1 0xba>;
526 dma-names = "rx", "tx";
5cf4f686 527 };
90e8e50f
KM
528 };
529
530 rcar_sound,ssi {
a5702e1c 531 ssi0: ssi-0 {
90e8e50f 532 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
533 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
534 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 535 };
a5702e1c 536 ssi1: ssi-1 {
90e8e50f 537 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
538 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
539 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 540 };
a5702e1c 541 ssi2: ssi-2 {
90e8e50f 542 interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
543 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
544 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 545 };
a5702e1c 546 ssi3: ssi-3 {
90e8e50f 547 interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
548 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
549 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 550 };
a5702e1c 551 ssi4: ssi-4 {
90e8e50f 552 interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
553 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
554 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 555 };
a5702e1c 556 ssi5: ssi-5 {
90e8e50f 557 interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
558 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
559 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 560 };
a5702e1c 561 ssi6: ssi-6 {
90e8e50f 562 interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
563 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
564 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 565 };
a5702e1c 566 ssi7: ssi-7 {
90e8e50f 567 interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
568 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
569 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 570 };
a5702e1c 571 ssi8: ssi-8 {
90e8e50f 572 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
573 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
574 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f 575 };
a5702e1c 576 ssi9: ssi-9 {
90e8e50f 577 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
e80a2fb1
KM
578 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
579 dma-names = "rx", "tx", "rxu", "txu";
90e8e50f
KM
580 };
581 };
582
583 rcar_sound,dai {
584 dai0 {
585 playback = <&ssi5 &src5>;
586 capture = <&ssi6>;
587 };
588 dai1 {
589 playback = <&ssi3>;
590 };
591 dai2 {
592 capture = <&ssi4>;
593 };
594 dai3 {
595 playback = <&ssi7>;
596 };
597 dai4 {
598 capture = <&ssi8>;
599 };
600 };
601};
f3f17d32 602
f1511a14 603=============================================
f3f17d32 604Example: simple sound card
f1511a14 605=============================================
f3f17d32
KM
606
607 rsnd_ak4643: sound {
608 compatible = "simple-audio-card";
609
610 simple-audio-card,format = "left_j";
611 simple-audio-card,bitclock-master = <&sndcodec>;
612 simple-audio-card,frame-master = <&sndcodec>;
613
614 sndcpu: simple-audio-card,cpu {
615 sound-dai = <&rcar_sound>;
616 };
617
618 sndcodec: simple-audio-card,codec {
619 sound-dai = <&ak4643>;
620 clocks = <&audio_clock>;
621 };
622 };
623
624&rcar_sound {
625 pinctrl-0 = <&sound_pins &sound_clk_pins>;
626 pinctrl-names = "default";
627
628 /* Single DAI */
629 #sound-dai-cells = <0>;
630
f3f17d32
KM
631
632 rcar_sound,dai {
633 dai0 {
634 playback = <&ssi0 &src2 &dvc0>;
635 capture = <&ssi1 &src3 &dvc1>;
636 };
637 };
638};
639
640&ssi1 {
641 shared-pin;
642};
44bf5361 643
f1511a14 644=============================================
44bf5361 645Example: simple sound card for TDM
f1511a14 646=============================================
44bf5361
KM
647
648 rsnd_tdm: sound {
649 compatible = "simple-audio-card";
650
651 simple-audio-card,format = "left_j";
652 simple-audio-card,bitclock-master = <&sndcodec>;
653 simple-audio-card,frame-master = <&sndcodec>;
654
655 sndcpu: simple-audio-card,cpu {
656 sound-dai = <&rcar_sound>;
657 dai-tdm-slot-num = <6>;
658 };
659
660 sndcodec: simple-audio-card,codec {
661 sound-dai = <&xxx>;
662 };
663 };
b4c83b17 664
f1511a14 665=============================================
b4c83b17 666Example: simple sound card for Multi channel
f1511a14 667=============================================
b4c83b17
KM
668
669&rcar_sound {
670 pinctrl-0 = <&sound_pins &sound_clk_pins>;
671 pinctrl-names = "default";
672
673 /* Single DAI */
674 #sound-dai-cells = <0>;
675
b4c83b17
KM
676
677 rcar_sound,dai {
678 dai0 {
679 playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
680 };
681 };
682};