summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
blob: 4cf632bc46215fdadd3674d47d965d960ad8282c (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
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree for ULCB + Kingfisher + Audio Graph Card2 (MIX + TDM Split)
 *
 * Copyright (C) 2022 Renesas Electronics Corp.
 */

/*
 * Note:
 * The HDMI output is ignored due to the limited number of subdevices
 *
 *	(A) CPU0 (2ch) <----> (2ch) (X)	ak4613	   (MIX-0)
 *	(B) CPU1 (2ch)  --/			   (MIX-1)
 *	(C) CPU3 (2ch)  ----> (8ch) (Y)	PCM3168A-p (TDM-0 : 0,1ch)
 *	(D) CPU2 (2ch)  --/			   (TDM-1 : 2,3ch)
 *	(E) CPU4 (2ch)  --/			   (TDM-2 : 4,5ch)
 *	(F) CPU5 (2ch)  --/			   (TDM-3 : 6,7ch)
 *	(G) CPU6 (6ch) <----  (6ch) (Z)	PCM3168A-c
 *
 *	(A) aplay   -D plughw:0,0 xxx.wav (MIX-0)
 *	(B) aplay   -D plughw:0,1 xxx.wav (MIX-1)
 *	(C) aplay   -D plughw:1,0 xxx.wav (TDM-0)
 *	(D) aplay   -D plughw:1,1 xxx.wav (TDM-1)
 *	(E) aplay   -D plughw:1,2 xxx.wav (TDM-2)
 *	(F) aplay   -D plughw:1,3 xxx.wav (TDM-3)
 *
 *	(A) arecord -D plughw:0,0 xxx.wav
 *	(G) arecord -D plughw:1,4 xxx.wav
 */
/ {
	sound_card_kf: expand-sound {
		compatible = "audio-graph-card2";
		label = "snd-kf-split";

		routing = "pcm3168a Playback", "DAI2 Playback",
			  "pcm3168a Playback", "DAI3 Playback",
			  "pcm3168a Playback", "DAI4 Playback",
			  "pcm3168a Playback", "DAI5 Playback",
			  "DAI6 Capture",      "pcm3168a Capture";

		links = <&fe_c		/* (C) CPU2	  */
			 &fe_d		/* (D) CPU3	  */
			 &fe_e		/* (E) CPU4	  */
			 &fe_f		/* (F) CPU5	  */
			 &rsnd_g	/* (G) CPU6	  */
			 &be_y		/* (Y) PCM3168A-p */
		>;

		dpcm {
			#address-cells = <1>;
			#size-cells = <0>;

			ports@0 {
				#address-cells = <1>;
				#size-cells = <0>;
				reg = <0>;

				/*
				 * FE
				 *
				 * (C) CPU2
				 * (D) CPU3
				 * (E) CPU4
				 * (F) CPU5
				 */
			fe_c:	port@2 { reg = <2>; fe_c_ep: endpoint { remote-endpoint = <&rsnd_c_ep>; }; };
			fe_d:	port@3 { reg = <3>; fe_d_ep: endpoint { remote-endpoint = <&rsnd_d_ep>; }; };
			fe_e:	port@4 { reg = <4>; fe_e_ep: endpoint { remote-endpoint = <&rsnd_e_ep>; }; };
			fe_f:	port@5 { reg = <5>; fe_f_ep: endpoint { remote-endpoint = <&rsnd_f_ep>; }; };
			};

			ports@1 {
				reg = <1>;
				/*
				 * BE
				 *
				 * (Y) PCM3168A-p
				 */
			be_y:	port { be_y_ep: endpoint { remote-endpoint = <&pcm3168a_y_ep>; }; };
			};
		};
	};
};

&pcm3168a {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		mclk-fs = <512>;
		prefix = "pcm3168a";

		/*
		 * (Y) PCM3168A-p
		 */
		port@0 {
			reg = <0>;
			convert-channels = <8>; /* to 8ch TDM */
			pcm3168a_y_ep: endpoint {
				remote-endpoint = <&be_y_ep>;
				clocks = <&clksndsel>;
			};
		};
		/*
		 * (Z) PCM3168A-c
		 */
		port@1 {
			reg = <1>;
			pcm3168a_z_ep: endpoint {
				remote-endpoint = <&rsnd_g_ep>;
				clocks = <&clksndsel>;
			};
		};
	};
};

&rcar_sound {
	ports@1 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <1>;

		/*
		 * (C) CPU2
		 */
		port@2 {
			reg = <2>;
			rsnd_c_ep: endpoint {
				remote-endpoint = <&fe_c_ep>;
				bitclock-master;
				frame-master;
				playback = <&ssiu30 &ssi3>;
			};
		};
		/*
		 * (D) CPU3
		 */
		port@3 {
			reg = <3>;
			rsnd_d_ep: endpoint {
				remote-endpoint = <&fe_d_ep>;
				bitclock-master;
				frame-master;
				playback = <&ssiu31 &ssi3>;
			};
		};
		/*
		 * (E) CPU4
		 */
		port@4 {
			reg = <4>;
			rsnd_e_ep: endpoint {
				remote-endpoint = <&fe_e_ep>;
				bitclock-master;
				frame-master;
				playback = <&ssiu32 &ssi3>;
			};
		};
		/*
		 * (F) CPU5
		 */
		port@5 {
			reg = <5>;
			rsnd_f_ep: endpoint {
				remote-endpoint = <&fe_f_ep>;
				bitclock-master;
				frame-master;
				playback = <&ssiu33 &ssi3>;
			};
		};
		/*
		 * (G) CPU6
		 */
		rsnd_g: port@6 {
			reg = <6>;
			rsnd_g_ep: endpoint {
				remote-endpoint = <&pcm3168a_z_ep>;
				bitclock-master;
				frame-master;
				capture = <&ssi4>;
			};
		};
	};
};