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