ODROID-C4:Support line-out audio (J4)

Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: I055737bbc41b11974ca4032c52e7cc335103d509
This commit is contained in:
ckkim
2020-08-20 14:30:42 +09:00
parent b58fcf48f1
commit d96a6170c8
4 changed files with 74 additions and 3 deletions

View File

@@ -15225,3 +15225,7 @@ HARDKERNEL S922D odroidn2
M: Kevin Kim <ckkim@hardkernel.com>
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 <ckkim@hardkernel.com>
F: arch/arm64/boot/dts/amlogic/overlays/odroidc4/lineout.dts

View File

@@ -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>;

View File

@@ -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)

View File

@@ -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>;
};
};
};
};
};
};