summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch
blob: 34b32d8f19db2e8503c5d53b7a11ba3b476735c5 (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
From 455f26d0de1cf6eaeb0aa5b58725e3e34d8d34bd Mon Sep 17 00:00:00 2001
From: Nguyen Dang <nguyen.dang.wh@rvc.renesas.com>
Date: Tue, 6 Nov 2018 11:36:15 +0700
Subject: [PATCH 5/6] ADSP: integrate ADSP sound for E3 board

Signed-off-by: Nguyen Dang <nguyen.dang.wh@renesas.com>
[takeshi.kihara.df: fix W=1 dtc warning]
[takeshi.kihara.df: support for dt file separation by E3 ES1.0 SoC]
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
---
 .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 84 +++++++++++++++++--
 .../boot/dts/renesas/r8a77990-es10-ebisu.dts  | 84 +++++++++++++++++--
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |  5 ++
 3 files changed, 163 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
index 26081a6e1866..20fdb4085d87 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
@@ -221,11 +221,27 @@
 	};
 
 	sound_card: sound {
-		compatible = "audio-graph-card";
+		compatible = "audio-graph-scu-card";
 
 		label = "rcar-sound";
 
-		dais = <&rsnd_port0>;
+		prefix = "ak4613";
+		routing = "ak4613 Playback", "DAI0 Playback",
+				"DAI0 Capture",   "ak4613 Capture",
+				"ak4613 Playback", "Playback0",
+				"ak4613 Playback", "Playback1",
+				"ak4613 Playback", "Playback2",
+				"ak4613 Playback", "Playback3",
+				"Capture0", "ak4613 Capture",
+				"Capture1", "ak4613 Capture",
+				"Capture2", "ak4613 Capture",
+				"Capture3", "ak4613 Capture";
+
+		dais = <&adsp_port0
+			&adsp_port1
+			&adsp_port2
+			&adsp_port3
+			&rsnd_port0>;
 	};
 
 	vbus0_usb2: regulator-vbus0-usb2 {
@@ -501,8 +517,27 @@
 		asahi-kasei,out5-single-end;
 		asahi-kasei,out6-single-end;
 
-		port {
-			ak4613_endpoint: endpoint {
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			ak4613_endpoint0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&adsp_endpoint0>;
+			};
+			ak4613_endpoint1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&adsp_endpoint1>;
+			};
+			ak4613_endpoint2: endpoint@2 {
+				reg = <2>;
+				remote-endpoint = <&adsp_endpoint2>;
+			};
+			ak4613_endpoint3: endpoint@3 {
+				reg = <3>;
+				remote-endpoint = <&adsp_endpoint3>;
+			};
+			ak4613_endpoint4: endpoint@4 {
+				reg = <4>;
 				remote-endpoint = <&rsnd_endpoint0>;
 			};
 		};
@@ -702,6 +737,45 @@
 	status = "okay";
 };
 
+&rcar_adsp_sound {
+	status = "okay";
+	/* Multiple DAI */
+	#sound-dai-cells = <1>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		adsp_port0: port@0 {
+			reg = <0>;
+			adsp_endpoint0: endpoint {
+				remote-endpoint = <&ak4613_endpoint0>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port1: port@1 {
+			reg = <1>;
+			adsp_endpoint1: endpoint {
+				remote-endpoint = <&ak4613_endpoint1>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port2: port@2 {
+			reg = <2>;
+			adsp_endpoint2: endpoint {
+				remote-endpoint = <&ak4613_endpoint2>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port3: port@3 {
+			reg = <3>;
+			adsp_endpoint3: endpoint {
+				remote-endpoint = <&ak4613_endpoint3>;
+				dai-format = "left_j";
+			};
+		};
+	};
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins &sound_clk_pins>;
 	pinctrl-names = "default";
@@ -737,7 +811,7 @@
 	ports {
 		rsnd_port0: port@0 {
 			rsnd_endpoint0: endpoint {
-				remote-endpoint = <&ak4613_endpoint>;
+				remote-endpoint = <&ak4613_endpoint4>;
 
 				dai-format = "left_j";
 				bitclock-master = <&rsnd_endpoint0>;
diff --git a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts
index 087d5533f3db..61e18309c4a4 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts
@@ -221,11 +221,27 @@
 	};
 
 	sound_card: sound {
-		compatible = "audio-graph-card";
+		compatible = "audio-graph-scu-card";
 
 		label = "rcar-sound";
 
-		dais = <&rsnd_port0>;
+		prefix = "ak4613";
+		routing = "ak4613 Playback", "DAI0 Playback",
+				"DAI0 Capture",   "ak4613 Capture",
+				"ak4613 Playback", "Playback0",
+				"ak4613 Playback", "Playback1",
+				"ak4613 Playback", "Playback2",
+				"ak4613 Playback", "Playback3",
+				"Capture0", "ak4613 Capture",
+				"Capture1", "ak4613 Capture",
+				"Capture2", "ak4613 Capture",
+				"Capture3", "ak4613 Capture";
+
+		dais = <&adsp_port0
+			&adsp_port1
+			&adsp_port2
+			&adsp_port3
+			&rsnd_port0>;
 	};
 
 	vbus0_usb2: regulator-vbus0-usb2 {
@@ -501,8 +517,27 @@
 		asahi-kasei,out5-single-end;
 		asahi-kasei,out6-single-end;
 
-		port {
-			ak4613_endpoint: endpoint {
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			ak4613_endpoint0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&adsp_endpoint0>;
+			};
+			ak4613_endpoint1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&adsp_endpoint1>;
+			};
+			ak4613_endpoint2: endpoint@2 {
+				reg = <2>;
+				remote-endpoint = <&adsp_endpoint2>;
+			};
+			ak4613_endpoint3: endpoint@3 {
+				reg = <3>;
+				remote-endpoint = <&adsp_endpoint3>;
+			};
+			ak4613_endpoint4: endpoint@4 {
+				reg = <4>;
 				remote-endpoint = <&rsnd_endpoint0>;
 			};
 		};
@@ -702,6 +737,45 @@
 	status = "okay";
 };
 
+&rcar_adsp_sound {
+	status = "okay";
+	/* Multiple DAI */
+	#sound-dai-cells = <1>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		adsp_port0: port@0 {
+			reg = <0>;
+			adsp_endpoint0: endpoint {
+				remote-endpoint = <&ak4613_endpoint0>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port1: port@1 {
+			reg = <1>;
+			adsp_endpoint1: endpoint {
+				remote-endpoint = <&ak4613_endpoint1>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port2: port@2 {
+			reg = <2>;
+			adsp_endpoint2: endpoint {
+				remote-endpoint = <&ak4613_endpoint2>;
+				dai-format = "left_j";
+			};
+		};
+		adsp_port3: port@3 {
+			reg = <3>;
+			adsp_endpoint3: endpoint {
+				remote-endpoint = <&ak4613_endpoint3>;
+				dai-format = "left_j";
+			};
+		};
+	};
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins &sound_clk_pins>;
 	pinctrl-names = "default";
@@ -737,7 +811,7 @@
 	ports {
 		rsnd_port0: port@0 {
 			rsnd_endpoint0: endpoint {
-				remote-endpoint = <&ak4613_endpoint>;
+				remote-endpoint = <&ak4613_endpoint4>;
 
 				dai-format = "left_j";
 				bitclock-master = <&rsnd_endpoint0>;
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index bd4d71e2b93e..845399adcbdb 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -181,6 +181,11 @@
 		method = "smc";
 	};
 
+	rcar_adsp_sound: adsp_sound {
+		compatible =  "renesas,rcar_adsp_sound_gen3";
+		status = "disabled";
+	};
+
 	/* External SCIF clock - to be overridden by boards that provide it */
 	scif_clk: scif {
 		compatible = "fixed-clock";
-- 
2.19.1