From 3dca527e6d1e19aa97ece32c27af5a59ecbe646d Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 1 Sep 2025 18:30:27 +0200 Subject: [PATCH] airoha: add NPU and reserved memory node for AN7581 Add the NPU and reserved memory node for AN7581 dtsi since it's not supported. Link: https://github.com/openwrt/openwrt/pull/19816 Signed-off-by: Christian Marangi --- target/linux/airoha/dts/an7581.dtsi | 58 ++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/target/linux/airoha/dts/an7581.dtsi b/target/linux/airoha/dts/an7581.dtsi index 086cae977f7..6d18d199266 100644 --- a/target/linux/airoha/dts/an7581.dtsi +++ b/target/linux/airoha/dts/an7581.dtsi @@ -17,29 +17,39 @@ #size-cells = <2>; ranges; - npu-binary@84000000 { + atf@80000000 { + no-map; + reg = <0x0 0x80000000 0x0 0x200000>; + }; + + npu_binary: npu-binary@84000000 { no-map; reg = <0x0 0x84000000 0x0 0xa00000>; }; - npu-flag@84b0000 { + qdma0_buf: qdma0-buf@87000000 { + no-map; + reg = <0x0 0x87000000 0x0 0x2000000>; + }; + + qdma1_buf: qdma1-buf@89000000 { no-map; - reg = <0x0 0x84b00000 0x0 0x100000>; + reg = <0x0 0x89000000 0x0 0x1000000>; }; - npu-pkt@85000000 { + npu_pkt: npu-pkt@8a000000 { no-map; - reg = <0x0 0x85000000 0x0 0x1a00000>; + reg = <0x0 0x8a000000 0x0 0x2c00000>; }; - npu-phyaddr@86b00000 { + npu_txpkt: npu-txpkt@8cc00000 { no-map; - reg = <0x0 0x86b00000 0x0 0x100000>; + reg = <0x0 0x8cc00000 0x0 0x4000000>; }; - npu-rxdesc@86d00000 { + npu_txbufid: npu-txbufid@90c00000 { no-map; - reg = <0x0 0x86d00000 0x0 0x100000>; + reg = <0x0 0x90c00000 0x0 0x6800>; }; }; @@ -666,6 +676,31 @@ }; }; + npu: npu@1e900000 { + compatible = "airoha,en7581-npu"; + reg = <0x0 0x1e900000 0x0 0x313000>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + memory-region = <&npu_binary>, <&npu_pkt>, <&npu_txpkt>, + <&npu_txbufid>; + memory-region-names = "binary", "pkt", "tx-pkt", + "tx-bufid"; + status = "disabled"; + }; + eth: ethernet@1fb50000 { compatible = "airoha,en7581-eth"; reg = <0 0x1fb50000 0 0x2600>, @@ -696,6 +731,11 @@ , ; + memory-region = <&qdma0_buf>, <&qdma1_buf>; + memory-region-names = "qdma0-buf", "qdma1-buf"; + + airoha,npu = <&npu>; + status = "disabled"; #address-cells = <1>; -- 2.47.2