From 0d12c035fdcc360a912d5f20dfd62a5ec486d8ac Mon Sep 17 00:00:00 2001 From: tonymac32 Date: Mon, 20 Jul 2020 01:02:44 -0400 Subject: [PATCH] [ meson64 ] enable Analog Codec Libretech-cc --- .../board-libretech-cc-dts-dac-sound.patch | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 patch/kernel/meson64-current/board-libretech-cc-dts-dac-sound.patch diff --git a/patch/kernel/meson64-current/board-libretech-cc-dts-dac-sound.patch b/patch/kernel/meson64-current/board-libretech-cc-dts-dac-sound.patch new file mode 100644 index 000000000..44b244ea4 --- /dev/null +++ b/patch/kernel/meson64-current/board-libretech-cc-dts-dac-sound.patch @@ -0,0 +1,78 @@ +From 8bf63f418f5e3061f471c0484c095757fddc572e Mon Sep 17 00:00:00 2001 +From: tonymac32 +Date: Mon, 20 Jul 2020 00:12:05 -0400 +Subject: [PATCH] board-libretech-cc-add-audio-dac + +Signed-off-by: tonymac32 +--- + .../amlogic/meson-gxl-s905x-libretech-cc.dts | 30 +++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +index 24754383b..7a8070587 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts ++++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +@@ -22,6 +22,13 @@ + ethernet0 = ðmac; + }; + ++ dio2133: analog-amplifier { ++ compatible = "simple-audio-amplifier"; ++ sound-name-prefix = "AU2"; ++ VCC-supply = <&hdmi_5v>; ++ enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -129,6 +136,12 @@ + sound { + compatible = "amlogic,gx-sound-card"; + model = "GX-SOUND-CARD"; ++ audio-aux-devs = <&dio2133>; ++ audio-widgets = "Line", "Lineout"; ++ audio-routing = "AU2 INL", "ACODEC LOLN", ++ "AU2 INR", "ACODEC LORN", ++ "Lineout", "AU2 OUTL", ++ "Lineout", "AU2 OUTR"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; +@@ -150,6 +163,10 @@ + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; ++ ++ codec-1 { ++ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; ++ }; + }; + + dai-link-2 { +@@ -159,9 +176,22 @@ + sound-dai = <&hdmi_tx>; + }; + }; ++ ++ dai-link-3 { ++ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; ++ ++ codec-0 { ++ sound-dai = <&acodec>; ++ }; ++ }; + }; + }; + ++&acodec { ++ AVDD-supply = <&vddio_ao18>; ++ status = "okay"; ++}; ++ + &aiu { + status = "okay"; + }; +-- +Created with Armbian build tools https://github.com/armbian/build +