diff --git a/MAINTAINERS b/MAINTAINERS index d724c843653a..8e40092bff2f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15225,3 +15225,7 @@ HARDKERNEL S922D odroidn2 M: Kevin Kim F: arch/arm64/boot/dts/amlogic/meson64_odroidn2_plus.dts F: arch/arm64/boot/dts/amlogic/meson64_odroidn2.dtsi + +HARDKERNEL odroidc4 DTS +M: Kevin Kim +F: arch/arm64/boot/dts/amlogic/overlays/odroidc4/lineout.dts diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts index ae635e658500..4190615a8b60 100644 --- a/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts +++ b/arch/arm64/boot/dts/amlogic/meson64_odroidc4.dts @@ -636,8 +636,10 @@ reg = <0x0 0xFF632000 0x0 0x2000>; is_auge_used = <1>; /* meson or auge chipset used */ tocodec_inout = <1>; - tdmout_index = <0>; - status = "okay"; + tdmout_index = <2>; + ch0_sel = <0>; + ch1_sel = <1>; + status = "disabled"; }; audio_effect:eqdrc{ /*eq_enable = <1>;*/ @@ -672,6 +674,7 @@ }; }; }; + audiolocker: locker { compatible = "amlogic, audiolocker"; clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT @@ -733,6 +736,19 @@ status = "disabled"; }; + tdmc: tdm@2 { + compatible = "amlogic, sm1-snd-tdmc"; + #sound-dai-cells = <0>; + dai-tdm-lane-slot-mask-in = <0 1 0 0>; + dai-tdm-lane-slot-mask-out = <1 0 0 0>; + dai-tdm-clk-sel = <2>; + clocks = <&clkaudio CLKID_AUDIO_MCLK_C + &clkc CLKID_MPLL2>; + clock-names = "mclk", "clk_srcpll"; + i2s2hdmi = <0>; + status = "disabled"; + }; + spdifa: spdif@0 { compatible = "amlogic, sm1-snd-spdif-a"; #sound-dai-cells = <0>; diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile index 2ec52e50c788..40c01e884b3f 100644 --- a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile @@ -14,7 +14,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDC4) += spi0.dtbo \ onewire.dtbo \ can0.dtbo \ hifishield.dtbo \ - hifishield2.dtbo + hifishield2.dtbo \ + lineout.dtbo targets += $(dtbo-y) always := $(dtbo-y) diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/lineout.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/lineout.dts new file mode 100644 index 000000000000..a529c84cc734 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/lineout.dts @@ -0,0 +1,50 @@ +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target = <&amlogic_codec>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@1 { + target = <&tdmc>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@2 { + target-path = "/"; + __overlay__ { + odroid_lineout: odroid_lineout { + compatible = "amlogic, g12a-sound-card"; + aml-audio-card,name = "ODROID-LINEOUT"; + status = "okay"; + + /* ODROID-C4: Line-out(J4)*/ + aml-audio-card,dai-link@0 { + format = "i2s"; + mclk-fs = <256>; + continuous-clock; + bitclock-master = <&tdmc>; + frame-master = <&tdmc>; + cpu { + sound-dai = <&tdmc>; + dai-tdm-slot-tx-mask = <1 1>; + dai-tdm-slot-rx-mask = <1 1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + system-clock-frequency = + <12288000>; + }; + codec { + sound-dai = <&amlogic_codec>; + }; + }; + }; + }; + }; +};