airoha: enable I2S sound driver and add nodes for eMMC RFB board
authorChristian Marangi <[email protected]>
Thu, 4 Dec 2025 22:14:30 +0000 (23:14 +0100)
committerChristian Marangi <[email protected]>
Thu, 4 Dec 2025 22:16:13 +0000 (23:16 +0100)
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 <[email protected]>
target/linux/airoha/an7581/config-6.12
target/linux/airoha/dts/an7581-evb-emmc.dts
target/linux/airoha/dts/an7581.dtsi

index 77bd64927646b166b8a8f10d1a50704beadcd75e..da40adadaffc3c1789d41c0c337b99cb94e14738 100644 (file)
@@ -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
index 25d9b87af0f3bece327d501ca1a72ff9dac6c43c..ee800b61314a4d746901ad7eb6bfe0825305302d 100644 (file)
        };
 };
 
+&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>;
 
 
 &i2c0 {
        status = "okay";
+
+       wm8960: codec@1a {
+               compatible = "wlf,wm8960";
+               reg = <0x1a>;
+       };
 };
 
 &pcie0 {
index e50048ac94a09cc663495013ac24ebbd92318179..786044f254a1ec1b3d0bd1ded190f3ed11733a5d 100644 (file)
                regulator-always-on;
        };
 
+       sound: sound {
+               compatible = "airoha,an7581-wm8960-sound";
+
+               status = "disabled";
+
+               platform {
+                       sound-dai = <&afe>;
+               };
+       };
+
        soc {
                compatible = "simple-bus";
                #address-cells = <2>;
                        status = "disabled";
                };
 
+               afe: afe@1fbe2200 {
+                       compatible = "airoha,an7581-afe";
+                       reg = <0x0 0x1fbe2200 0x0 0x9000>;
+
+                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
                uart4: serial@1fbf0600 {
                        compatible = "airoha,en7523-uart";
                        reg = <0x0 0x1fbf0600 0x0 0x30>;