]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
airoha: an7583: add NPU nodes and enable kernel config
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 23 Oct 2025 14:23:42 +0000 (16:23 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Thu, 23 Oct 2025 14:23:42 +0000 (16:23 +0200)
Add relevant nodes for NPU support for Airoha AN7583 and enable the
kernel config to enable support in the Airoha Ethernet driver.

NPU firmware is scheduled to be upstreamed to linux-firmware and will be
added once present upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/airoha/an7583/config-6.12
target/linux/airoha/dts/an7583-evb-emmc.dts
target/linux/airoha/dts/an7583-evb.dts
target/linux/airoha/dts/an7583.dtsi

index 8c9a5f436e0b3aa688d220af52c95970aaf57f54..2457704df493126bd3072b7cafb608a2817ad90b 100644 (file)
@@ -242,6 +242,7 @@ CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 CONFIG_NET_AIROHA=y
 CONFIG_NET_AIROHA_FLOW_STATS=y
+CONFIG_NET_AIROHA_NPU=y
 CONFIG_NET_DEVLINK=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MT7530=y
index df5ee5bde0118098cab014362a8a1a21a3e3e972..6477832a20a50a2e9958658e0132d0dab88cd373 100644 (file)
        };
 };
 
+&npu {
+       status = "okay";
+};
+
 &eth {
        status = "okay";
        nvmem-cells = <&mac_factory_2c0000>;
index 30f1cf0800fada8575d60ef67d11d6df62dad75c..95ac20e72792124a717ea267c77709eaaec6f6c8 100644 (file)
        status = "okay";
 };
 
+&npu {
+       status = "okay";
+};
+
 &eth {
        status = "okay";
 };
index 43e60ebf667ecbb6f703b898dff7d5d05ae8c252..49a0616a3977a4bdbf9cc7c3860cbfaee614b4ba 100644 (file)
                        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               npu: npu@1e900000 {
+                       compatible = "airoha,an7583-npu";
+                       reg = <0x0 0x1e900000 0x0 0x313000>;
+                       interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+                       memory-region = <&npu_binary>;
+                       memory-region-names = "binary";
+
+                       status = "disabled";
+               };
+
                pon_pcs: pcs@1fa08000 {
                        compatible = "airoha,an7583-pcs-pon";
                        reg = <0x0 0x1fa08000 0x0 0x1000>,
                        memory-region = <&qdma0_buf>, <&qdma1_buf>;
                        memory-region-names = "qdma0-buf", "qdma1-buf";
 
+                       airoha,npu = <&npu>;
+
                        status = "disabled";
 
                        #address-cells = <1>;