xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree for ULCB + Kingfisher + Simple Audio Card (MIX + TDM Split)
4 *
5 * Copyright (C) 2022 Renesas Electronics Corp.
6 */
7
8/*
9 * Note:
10 * The HDMI output is ignored due to the limited number of subdevices
11 *
12 *	(A) CPU0 (2ch) <----> (2ch) (X)	ak4613	   (MIX-0)
13 *	(B) CPU1 (2ch)  --/			   (MIX-1)
14 *	(C) CPU3 (2ch)  ----> (8ch) (Y)	PCM3168A-p (TDM-0 : 0,1ch)
15 *	(D) CPU2 (2ch)  --/			   (TDM-1 : 2,3ch)
16 *	(E) CPU4 (2ch)  --/			   (TDM-2 : 4,5ch)
17 *	(F) CPU5 (2ch)  --/			   (TDM-3 : 6,7ch)
18 *	(G) CPU6 (6ch) <----  (6ch) (Z)	PCM3168A-c
19 *
20 *	(A) aplay   -D plughw:0,0 xxx.wav (MIX-0)
21 *	(B) aplay   -D plughw:0,1 xxx.wav (MIX-1)
22 *	(C) aplay   -D plughw:1,0 xxx.wav (TDM-0)
23 *	(D) aplay   -D plughw:1,1 xxx.wav (TDM-1)
24 *	(E) aplay   -D plughw:1,2 xxx.wav (TDM-2)
25 *	(F) aplay   -D plughw:1,3 xxx.wav (TDM-3)
26 *
27 *	(A) arecord -D plughw:0,0 xxx.wav
28 *	(G) arecord -D plughw:1,4 xxx.wav
29 */
30
31/ {
32	sound_card_kf: expand-sound {
33		#address-cells = <1>;
34		#size-cells = <0>;
35
36		compatible = "simple-scu-audio-card";
37		label = "snd-kf-split";
38
39		simple-audio-card,routing = "pcm3168a Playback", "DAI2 Playback",
40					    "pcm3168a Playback", "DAI3 Playback",
41					    "pcm3168a Playback", "DAI4 Playback",
42					    "pcm3168a Playback", "DAI5 Playback";
43
44		simple-audio-card,dai-link@0 {
45			#address-cells = <1>;
46			#size-cells = <0>;
47			reg = <0>;
48			convert-channels = <8>; /* to 8ch TDM */
49
50			/*
51			 * (C) CPU2
52			 */
53			cpu@0 {
54				reg = <0>;
55				bitclock-master;
56				frame-master;
57				sound-dai = <&rcar_sound 2>;
58			};
59			/*
60			 * (D) CPU3
61			 */
62			cpu@1 {
63				reg = <1>;
64				sound-dai = <&rcar_sound 3>;
65			};
66			/*
67			 * (E) CPU4
68			 */
69			cpu@2 {
70				reg = <2>;
71				sound-dai = <&rcar_sound 4>;
72			};
73			/*
74			 * (F) CPU5
75			 */
76			cpu@3 {
77				reg = <3>;
78				sound-dai = <&rcar_sound 5>;
79			};
80			/*
81			 * (Y) PCM3168A-p
82			 */
83			codec {
84				prefix = "pcm3168a";
85				mclk-fs = <512>;
86				sound-dai = <&pcm3168a 0>;
87			};
88		};
89
90		simple-audio-card,dai-link@1 {
91			reg = <1>;
92			/*
93			 * (G) CPU6
94			 */
95			cpu {
96				bitclock-master;
97				frame-master;
98				sound-dai = <&rcar_sound 6>;
99			};
100			/*
101			 * (Z) PCM3168A-c
102			 */
103			codec {
104				prefix = "pcm3168a";
105				mclk-fs = <512>;
106				sound-dai = <&pcm3168a 1>;
107			};
108		};
109	};
110};
111
112&pcm3168a {
113	/*
114	 * (Y) PCM3168A-p
115	 * (Z) PCM3168A-c
116	 */
117	#sound-dai-cells = <1>;
118};
119
120&rcar_sound {
121	rcar_sound,dai@1 {
122		reg = <1>;
123
124		/* dai0-1 are defined in ulcb.dtsi */
125
126		/*
127		 * (C) CPU2
128		 */
129		dai2 {
130			playback = <&ssiu30 &ssi3>;
131		};
132		/*
133		 * (D) CPU3
134		 */
135		dai3 {
136			playback = <&ssiu31 &ssi3>;
137		};
138		/*
139		 * (E) CPU4
140		 */
141		dai4 {
142			playback = <&ssiu32 &ssi3>;
143		};
144		/*
145		 * (F) CPU5
146		 */
147		dai5 {
148			playback = <&ssiu33 &ssi3>;
149		};
150		/*
151		 * (G) CPU6
152		 */
153		dai6 {
154			capture = <&ssi4>;
155		};
156	};
157};
158