summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
blob: b39743d3f7c42842254cb9c8219dd2a538cc813c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
Renesas R-Car sound

=============================================
* Modules
=============================================

Renesas R-Car and RZ/G sound is constructed from below modules
(for Gen2 or later)

 SCU		: Sampling Rate Converter Unit
  - SRC		: Sampling Rate Converter
  - CMD
   - CTU	: Channel Transfer Unit
   - MIX	: Mixer
   - DVC	: Digital Volume and Mute Function
 SSIU		: Serial Sound Interface Unit
 SSI		: Serial Sound Interface

See detail of each module's channels, connection, limitation on datasheet

=============================================
* Multi channel
=============================================

Multi channel is supported by Multi-SSI, or TDM-SSI.

 Multi-SSI	: 6ch case, you can use stereo x 3 SSI
 TDM-SSI	: 6ch case, you can use TDM

=============================================
* Enable/Disable each modules
=============================================

See datasheet to check SRC/CTU/MIX/DVC connect-limitation.
DT controls enabling/disabling module.
${LINUX}/arch/arm/boot/dts/r8a7790-lager.dts can be good example.
This is example of

Playback: [MEM] -> [SRC2] -> [DVC0] -> [SSIU0/SSI0] -> [codec]
Capture:  [MEM] <- [DVC1] <- [SRC3] <- [SSIU1/SSI1] <- [codec]

see "Example: simple sound card"

You can use below.
${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example.

	&src0	&ctu00	&mix0	&dvc0	&ssi0
	&src1	&ctu01	&mix1	&dvc1	&ssi1
	&src2	&ctu02			&ssi2
	&src3	&ctu03			&ssi3
	&src4				&ssi4
	&src5	&ctu10			&ssi5
	&src6	&ctu11			&ssi6
	&src7	&ctu12			&ssi7
	&src8	&ctu13			&ssi8
	&src9				&ssi9

=============================================
* SRC (Sampling Rate Converter)
=============================================

 [xx]Hz        [yy]Hz
 ------> [SRC] ------>

SRC can convert [xx]Hz to [yy]Hz. Then, it has below 2 modes

 Asynchronous mode:	input data / output data are based on different clocks.
			you can use this mode on Playback / Capture
 Synchronous mode:	input data / output data are based on same clocks.
			This mode will be used if system doesn't have its input clock,
			for example digital TV case.
			you can use this mode on Playback

------------------
**     Asynchronous mode
------------------

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
see "Example: simple sound card for Asynchronous mode"

------------------
**     Synchronous mode
------------------

	> amixer set "SRC Out Rate" on
	> aplay xxxx.wav
	> amixer set "SRC Out Rate" 48000
	> amixer set "SRC Out Rate" 44100

=============================================
* CTU (Channel Transfer Unit)
=============================================

 [xx]ch        [yy]ch
 ------> [CTU] -------->

CTU can convert [xx]ch to [yy]ch, or exchange outputed channel.
CTU conversion needs matrix settings.
For more detail information, see below

	Renesas R-Car datasheet
	 - Sampling Rate Converter Unit (SCU)
	  - SCU Operation
	   - CMD Block
	    - Functional Blocks in CMD

	Renesas R-Car datasheet
	 - Sampling Rate Converter Unit (SCU)
	  - Register Description
	   - CTUn Scale Value exx Register (CTUn_SVxxR)

	${LINUX}/sound/soc/sh/rcar/ctu.c
	 - comment of header

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
see "Example: simple sound card for channel convert"

Ex) Exchange output channel
 Input -> Output
  1ch  ->  0ch
  0ch  ->  1ch

  example of using matrix
	output 0ch = (input 0ch x 0) + (input 1ch x 1)
	output 1ch = (input 0ch x 1) + (input 1ch x 0)

	amixer set "CTU Reset" on
	amixer set "CTU Pass" 9,10
	amixer set "CTU SV0" 0,4194304
	amixer set "CTU SV1" 4194304,0

 example of changing connection
	amixer set "CTU Reset" on
	amixer set "CTU Pass" 2,1

=============================================
* MIX (Mixer)
=============================================

MIX merges 2 sounds path. You can see 2 sound interface on system,
and these sounds will be merged by MIX.

	aplay -D plughw:0,0 xxxx.wav &
	aplay -D plughw:0,1 yyyy.wav

You need to use "simple-scu-audio-card" or "audio-graph-scu-card" for it.
Ex)
	[MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0]
	                            |
	[MEM] -> [SRC2] -> [CTU03] -+

see "Example: simple sound card for MIXer"

=============================================
* DVC (Digital Volume and Mute Function)
=============================================

DVC controls Playback/Capture volume.

Playback Volume
	amixer set "DVC Out" 100%

Capture Volume
	amixer set "DVC In" 100%

Playback Mute
	amixer set "DVC Out Mute" on

Capture Mute
	amixer set "DVC In Mute" on

Volume Ramp
	amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
	amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
	amixer set "DVC Out Ramp" on
	aplay xxx.wav &
	amixer set "DVC Out"  80%  // Volume Down
	amixer set "DVC Out" 100%  // Volume Up

=============================================
* SSIU (Serial Sound Interface Unit)
=============================================

SSIU can avoid some under/over run error, because it has some buffer.
But you can't use it if SSI was PIO mode.
In DMA mode, you can select not to use SSIU by using "no-busif" via SSI.

SSIU handles BUSIF which will be used for TDM Split mode.
This driver is assuming that audio-graph card will be used.

TDM Split mode merges 4 sounds. You can see 4 sound interface on system,
and these sounds will be merged SSIU/SSI.

	aplay -D plughw:0,0 xxxx.wav &
	aplay -D plughw:0,1 xxxx.wav &
	aplay -D plughw:0,2 xxxx.wav &
	aplay -D plughw:0,3 xxxx.wav

	          2ch                     8ch
	[MEM] -> [SSIU 30] -+-> [SSIU 3] --> [Codec]
	          2ch       |
	[MEM] -> [SSIU 31] -+
	          2ch       |
	[MEM] -> [SSIU 32] -+
	          2ch       |
	[MEM] -> [SSIU 33] -+

see "Example: simple sound card for TDM Split"

=============================================
* SSI (Serial Sound Interface)
=============================================

**  PIO mode

You can use PIO mode which is for connection check by using.
Note: The system will drop non-SSI modules in PIO mode
even though if DT is selecting other modules.

	&ssi0 {
		pio-transfer
	};

** DMA mode without SSIU

You can use DMA without SSIU.
Note: under/over run, or noise are likely to occur

	&ssi0 {
		no-busif;
	};

** PIN sharing

Each SSI can share WS pin. It is based on platform.
This is example if SSI1 want to share WS pin with SSI0

	&ssi1 {
		shared-pin;
	};

** Multi-SSI

You can use Multi-SSI.
This is example of SSI0/SSI1/SSI2 (= for 6ch)

see "Example: simple sound card for Multi channel"

** TDM-SSI

You can use TDM with SSI.
This is example of TDM 6ch.
Driver can automatically switches TDM <-> stereo mode in this case.

see "Example: simple sound card for TDM"

=============================================
Required properties:
=============================================

- compatible			: "renesas,rcar_sound-<soctype>", fallbacks
				  "renesas,rcar_sound-gen1" if generation1, and
				  "renesas,rcar_sound-gen2" if generation2 (or RZ/G1)
				  "renesas,rcar_sound-gen3" if generation3 (or RZ/G2)
				  Examples with soctypes are:
				    - "renesas,rcar_sound-r8a7742" (RZ/G1H)
				    - "renesas,rcar_sound-r8a7743" (RZ/G1M)
				    - "renesas,rcar_sound-r8a7744" (RZ/G1N)
				    - "renesas,rcar_sound-r8a7745" (RZ/G1E)
				    - "renesas,rcar_sound-r8a77470" (RZ/G1C)
				    - "renesas,rcar_sound-r8a774a1" (RZ/G2M)
				    - "renesas,rcar_sound-r8a774b1" (RZ/G2N)
				    - "renesas,rcar_sound-r8a774c0" (RZ/G2E)
				    - "renesas,rcar_sound-r8a774e1" (RZ/G2H)
				    - "renesas,rcar_sound-r8a7778" (R-Car M1A)
				    - "renesas,rcar_sound-r8a7779" (R-Car H1)
				    - "renesas,rcar_sound-r8a7790" (R-Car H2)
				    - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
				    - "renesas,rcar_sound-r8a7793" (R-Car M2-N)
				    - "renesas,rcar_sound-r8a7794" (R-Car E2)
				    - "renesas,rcar_sound-r8a7795" (R-Car H3)
				    - "renesas,rcar_sound-r8a7796" (R-Car M3-W)
				    - "renesas,rcar_sound-r8a77965" (R-Car M3-N)
				    - "renesas,rcar_sound-r8a77990" (R-Car E3)
				    - "renesas,rcar_sound-r8a77995" (R-Car D3)
- reg				: Should contain the register physical address.
				  required register is
				   SRU/ADG/SSI      if generation1
				   SRU/ADG/SSIU/SSI/AUDIO-DMAC-periperi if generation2/generation3
				   Select extended AUDIO-DMAC-periperi address if SoC has it,
				   otherwise select normal AUDIO-DMAC-periperi address.
- reg-names			: Should contain the register names.
				   scu/adg/ssi	if generation1
				   scu/adg/ssiu/ssi/audmapp if generation2/generation3
- rcar_sound,ssi		: Should contain SSI feature.
				  The number of SSI subnode should be same as HW.
				  see below for detail.
- rcar_sound,ssiu		: Should contain SSIU feature.
				  The number of SSIU subnode should be same as HW.
				  see below for detail.
- rcar_sound,src		: Should contain SRC feature.
				  The number of SRC subnode should be same as HW.
				  see below for detail.
- rcar_sound,ctu		: Should contain CTU feature.
				  The number of CTU subnode should be same as HW.
				  see below for detail.
- rcar_sound,mix		: Should contain MIX feature.
				  The number of MIX subnode should be same as HW.
				  see below for detail.
- rcar_sound,dvc		: Should contain DVC feature.
				  The number of DVC subnode should be same as HW.
				  see below for detail.
- rcar_sound,dai		: DAI contents.
				  The number of DAI subnode should be same as HW.
				  see below for detail.
- #sound-dai-cells		: it must be 0 if your system is using single DAI
				  it must be 1 if your system is using multi  DAI
- clocks			: References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.
- clock-names			: List of necessary clock names.
				  "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X",
				  "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i"

Optional properties:
- #clock-cells			: it must be 0 if your system has audio_clkout
				  it must be 1 if your system has audio_clkout0/1/2/3
- clock-frequency		: for all audio_clkout0/1/2/3
- clkout-lr-asynchronous	: boolean property. it indicates that audio_clkoutn
				  is asynchronizes with lr-clock.
- resets			: References to SSI resets.
- reset-names			: List of valid reset names.
				  "ssi-all", "ssi.X"

SSI subnode properties:
- interrupts			: Should contain SSI interrupt for PIO transfer
- shared-pin			: if shared clock pin
- pio-transfer			: use PIO transfer mode
- no-busif			: BUSIF is not ussed when [mem -> SSI] via DMA case
- dma				: Should contain Audio DMAC entry
- dma-names			: SSI  case "rx"  (=playback), "tx"  (=capture)
				  Deprecated: see SSIU subnode properties
				  SSIU case "rxu" (=playback), "txu" (=capture)

SSIU subnode properties:
- dma				: Should contain Audio DMAC entry
- dma-names			: "rx" (=playback), "tx" (=capture)

SRC subnode properties:
- dma				: Should contain Audio DMAC entry
- dma-names			: "rx" (=playback), "tx" (=capture)

DVC subnode properties:
- dma				: Should contain Audio DMAC entry
- dma-names			: "tx" (=playback/capture)

DAI subnode properties:
- playback			: list of playback modules
- capture			: list of capture  modules


=============================================
Example:
=============================================

rcar_sound: sound@ec500000 {
	#sound-dai-cells = <1>;
	compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
	reg =	<0 0xec500000 0 0x1000>, /* SCU */
		<0 0xec5a0000 0 0x100>,  /* ADG */
		<0 0xec540000 0 0x1000>, /* SSIU */
		<0 0xec541000 0 0x1280>, /* SSI */
		<0 0xec740000 0 0x200>;  /* Audio DMAC peri peri*/
	reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";

	clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
		<&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
		<&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
		<&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
		<&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
		<&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
		<&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
		<&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
		<&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
		<&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
		<&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
		<&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
		<&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
	clock-names = "ssi-all",
			"ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
			"ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
			"src.9", "src.8", "src.7", "src.6", "src.5",
			"src.4", "src.3", "src.2", "src.1", "src.0",
			"dvc.0", "dvc.1",
			"clk_a", "clk_b", "clk_c", "clk_i";

	rcar_sound,dvc {
		dvc0: dvc-0 {
			dmas = <&audma0 0xbc>;
			dma-names = "tx";
		};
		dvc1: dvc-1 {
			dmas = <&audma0 0xbe>;
			dma-names = "tx";
		};
	};

	rcar_sound,mix {
		mix0: mix-0 { };
		mix1: mix-1 { };
	};

	rcar_sound,ctu {
		ctu00: ctu-0 { };
		ctu01: ctu-1 { };
		ctu02: ctu-2 { };
		ctu03: ctu-3 { };
		ctu10: ctu-4 { };
		ctu11: ctu-5 { };
		ctu12: ctu-6 { };
		ctu13: ctu-7 { };
	};

	rcar_sound,src {
		src0: src-0 {
			interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x85>, <&audma1 0x9a>;
			dma-names = "rx", "tx";
		};
		src1: src-1 {
			interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x87>, <&audma1 0x9c>;
			dma-names = "rx", "tx";
		};
		src2: src-2 {
			interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x89>, <&audma1 0x9e>;
			dma-names = "rx", "tx";
		};
		src3: src-3 {
			interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x8b>, <&audma1 0xa0>;
			dma-names = "rx", "tx";
		};
		src4: src-4 {
			interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x8d>, <&audma1 0xb0>;
			dma-names = "rx", "tx";
		};
		src5: src-5 {
			interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x8f>, <&audma1 0xb2>;
			dma-names = "rx", "tx";
		};
		src6: src-6 {
			interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x91>, <&audma1 0xb4>;
			dma-names = "rx", "tx";
		};
		src7: src-7 {
			interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x93>, <&audma1 0xb6>;
			dma-names = "rx", "tx";
		};
		src8: src-8 {
			interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x95>, <&audma1 0xb8>;
			dma-names = "rx", "tx";
		};
		src9: src-9 {
			interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x97>, <&audma1 0xba>;
			dma-names = "rx", "tx";
		};
	};

	rcar_sound,ssiu {
		ssiu00: ssiu-0 {
			dmas = <&audma0 0x15>, <&audma1 0x16>;
			dma-names = "rx", "tx";
		};
		ssiu01: ssiu-1 {
			dmas = <&audma0 0x35>, <&audma1 0x36>;
			dma-names = "rx", "tx";
		};

		...

		ssiu95: ssiu-49 {
			dmas = <&audma0 0xA5>, <&audma1 0xA6>;
			dma-names = "rx", "tx";
		};
		ssiu96: ssiu-50 {
			dmas = <&audma0 0xA7>, <&audma1 0xA8>;
			dma-names = "rx", "tx";
		};
		ssiu97: ssiu-51 {
			dmas = <&audma0 0xA9>, <&audma1 0xAA>;
			dma-names = "rx", "tx";
		};
	};

	rcar_sound,ssi {
		ssi0: ssi-0 {
			interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x01>, <&audma1 0x02>;
			dma-names = "rx", "tx";
		};
		ssi1: ssi-1 {
			interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x03>, <&audma1 0x04>;
			dma-names = "rx", "tx";
		};

		...

		ssi8: ssi-8 {
			interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x11>, <&audma1 0x12>;
			dma-names = "rx", "tx";
		};
		ssi9: ssi-9 {
			interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
			dmas = <&audma0 0x13>, <&audma1 0x14>;
			dma-names = "rx", "tx";
		};
	};

	rcar_sound,dai {
		dai0 {
			playback = <&ssi5 &src5>;
			capture  = <&ssi6>;
		};
		dai1 {
			playback = <&ssi3>;
		};
		dai2 {
			capture  = <&ssi4>;
		};
		dai3 {
			playback = <&ssi7>;
		};
		dai4 {
			capture  = <&ssi8>;
		};
	};
};

=============================================
Example: simple sound card
=============================================

	rsnd_ak4643: sound {
		compatible = "simple-audio-card";

		simple-audio-card,format = "left_j";
		simple-audio-card,bitclock-master = <&sndcodec>;
		simple-audio-card,frame-master = <&sndcodec>;

		sndcpu: simple-audio-card,cpu {
			sound-dai = <&rcar_sound>;
		};

		sndcodec: simple-audio-card,codec {
			sound-dai = <&ak4643>;
			clocks = <&audio_clock>;
		};
	};

&rcar_sound {
	pinctrl-0 = <&sound_pins &sound_clk_pins>;
	pinctrl-names = "default";

	/* Single DAI */
	#sound-dai-cells = <0>;


	rcar_sound,dai {
		dai0 {
			playback = <&ssi0 &src2 &dvc0>;
			capture  = <&ssi1 &src3 &dvc1>;
		};
	};
};

&ssi1 {
	shared-pin;
};

=============================================
Example: simple sound card for Asynchronous mode
=============================================

sound {
	compatible = "simple-scu-audio-card";
	...
	/*
	 * SRC Asynchronous mode setting
	 * Playback:
	 * All input data will be converted to 48kHz
	 * Capture:
	 * Inputed 48kHz data will be converted to
	 * system specified Hz
	 */
	simple-audio-card,convert-rate = <48000>;
	...
	simple-audio-card,cpu {
		sound-dai = <&rcar_sound>;
	};
	simple-audio-card,codec {
		...
	};
};

=============================================
Example: simple sound card for channel convert
=============================================

sound {
	compatible = "simple-scu-audio-card";
	...
	/*
	 * CTU setting
	 * All input data will be converted to 2ch
	 * as output data
	 */
	simple-audio-card,convert-channels = <2>;
	...
	simple-audio-card,cpu {
		sound-dai = <&rcar_sound>;
	};
	simple-audio-card,codec {
		...
	};
};

=============================================
Example: simple sound card for MIXer
=============================================

sound {
	compatible = "simple-scu-audio-card";
	...
	simple-audio-card,cpu@0 {
		sound-dai = <&rcar_sound 0>;
	};
	simple-audio-card,cpu@1 {
		sound-dai = <&rcar_sound 1>;
	};
	simple-audio-card,codec {
		...
	};
};

&rcar_sound {
	...
	rcar_sound,dai {
		dai0 {
			playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
		};
		dai1 {
			playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
		};
	};
};

=============================================
Example: simple sound card for TDM
=============================================

rsnd_tdm: sound {
	compatible = "simple-audio-card";

	simple-audio-card,format = "left_j";
	simple-audio-card,bitclock-master = <&sndcodec>;
	simple-audio-card,frame-master = <&sndcodec>;

	sndcpu: simple-audio-card,cpu {
		sound-dai = <&rcar_sound>;
		dai-tdm-slot-num = <6>;
	};

	sndcodec: simple-audio-card,codec {
		sound-dai = <&xxx>;
	};
};

=============================================
Example: simple sound card for TDM Split
=============================================

sound_card: sound {
	compatible = "audio-graph-scu-card";
	prefix = "xxxx";
	routing = "xxxx Playback", "DAI0 Playback",
		  "xxxx Playback", "DAI1 Playback",
		  "xxxx Playback", "DAI2 Playback",
		  "xxxx Playback", "DAI3 Playback";
	convert-channels = <8>; /* TDM Split */

	dais = <&rsnd_port0     /* playback ch1/ch2 */
		&rsnd_port1     /* playback ch3/ch4 */
		&rsnd_port2     /* playback ch5/ch6 */
		&rsnd_port3     /* playback ch7/ch8 */
		>;
};

audio-codec {
	...
	port {
		codec_0: endpoint@1 {
			remote-endpoint = <&rsnd_ep0>;
		};
		codec_1: endpoint@2 {
			remote-endpoint = <&rsnd_ep1>;
		};
		codec_2: endpoint@3 {
			remote-endpoint = <&rsnd_ep2>;
		};
		codec_3: endpoint@4 {
			remote-endpoint = <&rsnd_ep3>;
		};
	};
};

&rcar_sound {
	...
	ports {
		rsnd_port0: port@0 {
			rsnd_ep0: endpoint {
				remote-endpoint = <&codec_0>;
				...
				playback = <&ssiu30 &ssi3>;
			};
		};
		rsnd_port1: port@1 {
			rsnd_ep1: endpoint {
				remote-endpoint = <&codec_1>;
				...
				playback = <&ssiu31 &ssi3>;
			};
		};
		rsnd_port2: port@2 {
			rsnd_ep2: endpoint {
				remote-endpoint = <&codec_2>;
				...
				playback = <&ssiu32 &ssi3>;
			};
		};
		rsnd_port3: port@3 {
			rsnd_ep3: endpoint {
				remote-endpoint = <&codec_3>;
				...
				playback = <&ssiu33 &ssi3>;
			};
		};
	};
};

=============================================
Example: simple sound card for Multi channel
=============================================

&rcar_sound {
	pinctrl-0 = <&sound_pins &sound_clk_pins>;
	pinctrl-names = "default";

	/* Single DAI */
	#sound-dai-cells = <0>;


	rcar_sound,dai {
		dai0 {
			playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
		};
	};
};