[PATCH v2 6/6] arm64: dts: amlogic: gx: add AUDIN node
Valerio Setti
vsetti at baylibre.com
Thu Sep 17 14:02:36 PDT 2026
AUDIN provides audio input support to Amlogic Meson GXBB/GXL platforms.
What's missing after this to get capture support working is to connect a
capture capable codec to the SoC. For example to test these changes an
NXP SGTL5000 chip has been connected to an OdroidC2 (Meson GXBB) board
using a custom hat board.
The following additions/overlay are required on top of
'amlogic/meson-gxbb-odroidc2.dts' to make that hat board to work:
&sound {
audio-routing = "AUDIN I2S Formatter", "AIU I2S Encoder Capture";
dai-link-1 {
codec-1 {
sound-dai = <&sgtl5000>;
};
};
dai-link-3 {
sound-dai = <&audin 0>;
};
};
&audin {
status = "okay";
};
Then, from userspace:
$ amixer sset 'AUDIN FIFO0 SRC SEL' 'I2S'
$ arecord -l # find the "FIFO Capture" device
$ arecord -D hw:0,<N> -f S16_LE -r 48000 -c 2 /tmp/in.wav
Signed-off-by: Valerio Setti <vsetti at baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 9 +++++++++
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 ++++++
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 ++++++
3 files changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index c1d8e81d95cb..54b6cc0bb8ff 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -436,6 +436,15 @@ watchdog at 98d0 {
reg = <0x0 0x098d0 0x0 0x10>;
clocks = <&xtal>;
};
+
+ audin: audio-controller at a000 {
+ compatible = "amlogic,gx-audin";
+ reg = <0x0 0xa000 0x0 0x148>;
+ interrupts = <GIC_SPI 7 IRQ_TYPE_EDGE_RISING>;
+ sound-name-prefix = "AUDIN";
+ #sound-dai-cells = <1>;
+ status = "disabled";
+ };
};
gic: interrupt-controller at c4301000 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index a9c830a570cc..7ad69992a226 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -84,6 +84,12 @@ &aiu {
resets = <&reset RESET_AIU>;
};
+&audin {
+ compatible = "amlogic,gxbb-audin", "amlogic,gx-audin";
+ clocks = <&clkc CLKID_I2S_SPDIF>;
+ resets = <&reset RESET_AUDIN>;
+};
+
&aobus {
pinctrl_aobus: pinctrl at 14 {
compatible = "amlogic,meson-gxbb-aobus-pinctrl";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index d5e0f72892f8..9181eba81eb7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -100,6 +100,12 @@ &aiu {
resets = <&reset RESET_AIU>;
};
+&audin {
+ compatible = "amlogic,gxl-audin", "amlogic,gx-audin";
+ clocks = <&clkc CLKID_I2S_SPDIF>;
+ resets = <&reset RESET_AUDIN>;
+};
+
&apb {
usb2_phy0: phy at 78000 {
compatible = "amlogic,meson-gxl-usb2-phy";
--
2.47.3
More information about the linux-amlogic
mailing list