[PATCH 2/2] arm64: dts: meson: add spdif out to khadas-vim2

From: Artem Lapkin
Date: Tue Aug 10 2021 - 00:16:48 EST


Add spdif output audio support to khadas-vim2

Signed-off-by: Artem Lapkin <art@xxxxxxxxxx>
---
.../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 18a4b7a6c5df..a129a827f6ee 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -146,6 +146,13 @@ wifi32k: wifi32k {
pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
};

+ spdif_dit: audio-codec-0 {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ sound-name-prefix = "DIT";
+ };
+
sound {
compatible = "amlogic,gx-sound-card";
model = "KHADAS-VIM2";
@@ -179,11 +186,21 @@ codec-0 {
sound-dai = <&hdmi_tx>;
};
};
+
+ dai-link-3 {
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
+
+ codec-0 {
+ sound-dai = <&spdif_dit>;
+ };
+ };
};
};

&aiu {
status = "okay";
+ pinctrl-0 = <&spdif_out_h_pins>;
+ pinctrl-names = "default";
};

&cec_AO {
--
2.25.1