Skip to content

Commit 6fc013f

Browse files
committed
Merge tag 'amlogic-dt64-4' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt
arm64: dts: Amlogic updates for v5.9 (round 4) - odroid-n2: add audio output * tag 'amlogic-dt64-4' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: odroid-n2: add jack audio output support arm64: dts: meson: odroid-n2: enable audio loopback Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents dae29d6 + 67d141c commit 6fc013f

File tree

1 file changed

+131
-5
lines changed

1 file changed

+131
-5
lines changed

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

Lines changed: 131 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,11 +218,42 @@
209218
sound {
210219
compatible = "amlogic,axg-sound-card";
211220
model = "G12B-ODROID-N2";
212-
audio-aux-devs = <&tdmout_b>;
221+
audio-widgets = "Line", "Lineout";
222+
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
223+
<&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
224+
<&dioo2133>;
213225
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
214226
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
215227
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
216-
"TDM_B Playback", "TDMOUT_B OUT";
228+
"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",
233+
"TDMIN_A IN 4", "TDM_B Loopback",
234+
"TDMIN_B IN 4", "TDM_B Loopback",
235+
"TDMIN_C IN 4", "TDM_B Loopback",
236+
"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",
241+
"TODDR_A IN 0", "TDMIN_A OUT",
242+
"TODDR_B IN 0", "TDMIN_A OUT",
243+
"TODDR_C IN 0", "TDMIN_A OUT",
244+
"TODDR_A IN 1", "TDMIN_B OUT",
245+
"TODDR_B IN 1", "TDMIN_B OUT",
246+
"TODDR_C IN 1", "TDMIN_B OUT",
247+
"TODDR_A IN 2", "TDMIN_C OUT",
248+
"TODDR_B IN 2", "TDMIN_C OUT",
249+
"TODDR_C IN 2", "TDMIN_C OUT",
250+
"TODDR_A IN 6", "TDMIN_LB OUT",
251+
"TODDR_B 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";
217257

218258
assigned-clocks = <&clkc CLKID_MPLL2>,
219259
<&clkc CLKID_MPLL0>,
@@ -236,8 +276,20 @@
236276
sound-dai = <&frddr_c>;
237277
};
238278

239-
/* 8ch hdmi interface */
240279
dai-link-3 {
280+
sound-dai = <&toddr_a>;
281+
};
282+
283+
dai-link-4 {
284+
sound-dai = <&toddr_b>;
285+
};
286+
287+
dai-link-5 {
288+
sound-dai = <&toddr_c>;
289+
};
290+
291+
/* 8ch hdmi interface */
292+
dai-link-6 {
241293
sound-dai = <&tdmif_b>;
242294
dai-format = "i2s";
243295
dai-tdm-slot-tx-mask-0 = <1 1>;
@@ -246,22 +298,56 @@
246298
dai-tdm-slot-tx-mask-3 = <1 1>;
247299
mclk-fs = <256>;
248300

249-
codec {
301+
codec-0 {
250302
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
251303
};
304+
305+
codec-1 {
306+
sound-dai = <&toacodec TOACODEC_IN_B>;
307+
};
308+
};
309+
310+
/* i2s jack output interface */
311+
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+
};
252324
};
253325

254326
/* hdmi glue */
255-
dai-link-4 {
327+
dai-link-8 {
256328
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
257329

258330
codec {
259331
sound-dai = <&hdmi_tx>;
260332
};
261333
};
334+
335+
/* acodec glue */
336+
dai-link-9 {
337+
sound-dai = <&toacodec TOACODEC_OUT>;
338+
339+
codec {
340+
sound-dai = <&acodec>;
341+
};
342+
};
262343
};
263344
};
264345

346+
&acodec {
347+
AVDD-supply = <&vddao_1v8>;
348+
status = "okay";
349+
};
350+
265351
&arb {
266352
status = "okay";
267353
};
@@ -476,14 +562,54 @@
476562
status = "okay";
477563
};
478564

565+
&tdmif_c {
566+
status = "okay";
567+
};
568+
569+
&tdmin_a {
570+
status = "okay";
571+
};
572+
573+
&tdmin_b {
574+
status = "okay";
575+
};
576+
577+
&tdmin_c {
578+
status = "okay";
579+
};
580+
581+
&tdmin_lb {
582+
status = "okay";
583+
};
584+
479585
&tdmout_b {
480586
status = "okay";
481587
};
482588

589+
&tdmout_c {
590+
status = "okay";
591+
};
592+
593+
&toacodec {
594+
status = "okay";
595+
};
596+
483597
&tohdmitx {
484598
status = "okay";
485599
};
486600

601+
&toddr_a {
602+
status = "okay";
603+
};
604+
605+
&toddr_b {
606+
status = "okay";
607+
};
608+
609+
&toddr_c {
610+
status = "okay";
611+
};
612+
487613
&uart_AO {
488614
status = "okay";
489615
pinctrl-0 = <&uart_ao_a_pins>;

0 commit comments

Comments
 (0)