[openwrt/openwrt] airoha: enable I2S sound driver and add nodes for eMMC RFB board

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 4 14:16:31 PST 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7b55651e61334f9a7f347519842df44058e79e59

commit 7b55651e61334f9a7f347519842df44058e79e59
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Dec 4 23:14:30 2025 +0100

    airoha: enable I2S sound driver and add nodes for eMMC RFB board
    
    Enable I2S sound driver and add nodes for eMMC RFB board since it's the
    one that always have the I2C codec and can use the sound card.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/airoha/an7581/config-6.12      |  5 +++++
 target/linux/airoha/dts/an7581-evb-emmc.dts | 18 ++++++++++++++++++
 target/linux/airoha/dts/an7581.dtsi         | 17 +++++++++++++++++
 3 files changed, 40 insertions(+)

diff --git a/target/linux/airoha/an7581/config-6.12 b/target/linux/airoha/an7581/config-6.12
index 77bd649276..da40adadaf 100644
--- a/target/linux/airoha/an7581/config-6.12
+++ b/target/linux/airoha/an7581/config-6.12
@@ -357,9 +357,14 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SKB_EXTENSIONS=y
 CONFIG_SMP=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_AN7581=y
+CONFIG_SND_SOC_AN7581_WM8960=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SOC_BUS=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SOUND=y
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_VMEMMAP=y
diff --git a/target/linux/airoha/dts/an7581-evb-emmc.dts b/target/linux/airoha/dts/an7581-evb-emmc.dts
index 25d9b87af0..ee800b6131 100644
--- a/target/linux/airoha/dts/an7581-evb-emmc.dts
+++ b/target/linux/airoha/dts/an7581-evb-emmc.dts
@@ -28,6 +28,19 @@
 	};
 };
 
+&sound {
+	audio-routing = "Headphone", "HP_L",
+			"Headphone", "HP_R",
+			"LINPUT1", "AMIC",
+			"RINPUT1", "AMIC";
+
+	status = "okay";
+
+	codec {
+		sound-dai = <&wm8960>;
+	};
+};
+
 &en7581_pinctrl {
 	gpio-ranges = <&en7581_pinctrl 0 13 47>;
 
@@ -160,6 +173,11 @@
 
 &i2c0 {
 	status = "okay";
+
+	wm8960: codec at 1a {
+		compatible = "wlf,wm8960";
+		reg = <0x1a>;
+	};
 };
 
 &pcie0 {
diff --git a/target/linux/airoha/dts/an7581.dtsi b/target/linux/airoha/dts/an7581.dtsi
index e50048ac94..786044f254 100644
--- a/target/linux/airoha/dts/an7581.dtsi
+++ b/target/linux/airoha/dts/an7581.dtsi
@@ -360,6 +360,16 @@
 		regulator-always-on;
 	};
 
+	sound: sound {
+		compatible = "airoha,an7581-wm8960-sound";
+
+		status = "disabled";
+
+		platform {
+			sound-dai = <&afe>;
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <2>;
@@ -419,6 +429,13 @@
 			status = "disabled";
 		};
 
+		afe: afe at 1fbe2200 {
+			compatible = "airoha,an7581-afe";
+			reg = <0x0 0x1fbe2200 0x0 0x9000>;
+
+			interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		uart4: serial at 1fbf0600 {
 			compatible = "airoha,en7523-uart";
 			reg = <0x0 0x1fbf0600 0x0 0x30>;




More information about the lede-commits mailing list