Skip to content

Commit 67d141c

Browse files
jbrun3tkhilman
authored andcommitted
arm64: dts: meson: odroid-n2: add jack audio output support
Add support for audio on jack socket of the odroid-n2 Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a7a8047 commit 67d141c

File tree

1 file changed

+74
-5
lines changed

1 file changed

+74
-5
lines changed

arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "meson-g12b-s922x.dtsi"
1010
#include <dt-bindings/input/input.h>
1111
#include <dt-bindings/gpio/meson-g12a-gpio.h>
12+
#include <dt-bindings/sound/meson-g12a-toacodec.h>
1213
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
1314

1415
/ {
@@ -20,6 +21,14 @@
2021
ethernet0 = &ethmac;
2122
};
2223

24+
dioo2133: audio-amplifier-0 {
25+
compatible = "simple-audio-amplifier";
26+
enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
27+
VCC-supply = <&vcc_5v>;
28+
sound-name-prefix = "U19";
29+
status = "okay";
30+
};
31+
2332
chosen {
2433
stdout-path = "serial0:115200n8";
2534
};
@@ -209,16 +218,26 @@
209218
sound {
210219
compatible = "amlogic,axg-sound-card";
211220
model = "G12B-ODROID-N2";
212-
audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
213-
<&tdmin_c>, <&tdmin_lb>;
221+
audio-widgets = "Line", "Lineout";
222+
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
223+
<&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
224+
<&dioo2133>;
214225
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
215226
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
216227
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
217228
"TDM_B Playback", "TDMOUT_B OUT",
229+
"TDMOUT_C IN 0", "FRDDR_A OUT 2",
230+
"TDMOUT_C IN 1", "FRDDR_B OUT 2",
231+
"TDMOUT_C IN 2", "FRDDR_C OUT 2",
232+
"TDM_C Playback", "TDMOUT_C OUT",
218233
"TDMIN_A IN 4", "TDM_B Loopback",
219234
"TDMIN_B IN 4", "TDM_B Loopback",
220235
"TDMIN_C IN 4", "TDM_B Loopback",
221236
"TDMIN_LB IN 1", "TDM_B Loopback",
237+
"TDMIN_A IN 5", "TDM_C Loopback",
238+
"TDMIN_B IN 5", "TDM_C Loopback",
239+
"TDMIN_C IN 5", "TDM_C Loopback",
240+
"TDMIN_LB IN 2", "TDM_C Loopback",
222241
"TODDR_A IN 0", "TDMIN_A OUT",
223242
"TODDR_B IN 0", "TDMIN_A OUT",
224243
"TODDR_C IN 0", "TDMIN_A OUT",
@@ -230,7 +249,11 @@
230249
"TODDR_C IN 2", "TDMIN_C OUT",
231250
"TODDR_A IN 6", "TDMIN_LB OUT",
232251
"TODDR_B IN 6", "TDMIN_LB OUT",
233-
"TODDR_C IN 6", "TDMIN_LB OUT";
252+
"TODDR_C IN 6", "TDMIN_LB OUT",
253+
"U19 INL", "ACODEC LOLP",
254+
"U19 INR", "ACODEC LORP",
255+
"Lineout", "U19 OUTL",
256+
"Lineout", "U19 OUTR";
234257

235258
assigned-clocks = <&clkc CLKID_MPLL2>,
236259
<&clkc CLKID_MPLL0>,
@@ -275,22 +298,56 @@
275298
dai-tdm-slot-tx-mask-3 = <1 1>;
276299
mclk-fs = <256>;
277300

278-
codec {
301+
codec-0 {
279302
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
280303
};
304+
305+
codec-1 {
306+
sound-dai = <&toacodec TOACODEC_IN_B>;
307+
};
281308
};
282309

283-
/* hdmi glue */
310+
/* i2s jack output interface */
284311
dai-link-7 {
312+
sound-dai = <&tdmif_c>;
313+
dai-format = "i2s";
314+
dai-tdm-slot-tx-mask-0 = <1 1>;
315+
mclk-fs = <256>;
316+
317+
codec-0 {
318+
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
319+
};
320+
321+
codec-1 {
322+
sound-dai = <&toacodec TOACODEC_IN_C>;
323+
};
324+
};
325+
326+
/* hdmi glue */
327+
dai-link-8 {
285328
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
286329

287330
codec {
288331
sound-dai = <&hdmi_tx>;
289332
};
290333
};
334+
335+
/* acodec glue */
336+
dai-link-9 {
337+
sound-dai = <&toacodec TOACODEC_OUT>;
338+
339+
codec {
340+
sound-dai = <&acodec>;
341+
};
342+
};
291343
};
292344
};
293345

346+
&acodec {
347+
AVDD-supply = <&vddao_1v8>;
348+
status = "okay";
349+
};
350+
294351
&arb {
295352
status = "okay";
296353
};
@@ -505,6 +562,10 @@
505562
status = "okay";
506563
};
507564

565+
&tdmif_c {
566+
status = "okay";
567+
};
568+
508569
&tdmin_a {
509570
status = "okay";
510571
};
@@ -525,6 +586,14 @@
525586
status = "okay";
526587
};
527588

589+
&tdmout_c {
590+
status = "okay";
591+
};
592+
593+
&toacodec {
594+
status = "okay";
595+
};
596+
528597
&tohdmitx {
529598
status = "okay";
530599
};

0 commit comments

Comments
 (0)