diff --git a/target/linux/airoha/dts/an7581-evb.dts b/target/linux/airoha/dts/an7581-evb.dts index 1d7b1a6a316..4045eb104aa 100644 --- a/target/linux/airoha/dts/an7581-evb.dts +++ b/target/linux/airoha/dts/an7581-evb.dts @@ -8,6 +8,7 @@ #include #include #include "an7581.dtsi" +#include "an7581-npu-wlan.dtsi" / { model = "Airoha AN7581 Evaluation Board"; diff --git a/target/linux/airoha/dts/an7581-npu-mt7992.dtsi b/target/linux/airoha/dts/an7581-npu-mt7992.dtsi index 0985b737349..3ab7051c66a 100644 --- a/target/linux/airoha/dts/an7581-npu-mt7992.dtsi +++ b/target/linux/airoha/dts/an7581-npu-mt7992.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +#include "an7581-npu-wlan.dtsi" + &npu { firmware-name = "airoha/en7581_npu_rv32.bin", "airoha/en7581_npu_data.bin"; diff --git a/target/linux/airoha/dts/an7581-npu-mt7996.dtsi b/target/linux/airoha/dts/an7581-npu-mt7996.dtsi index 404e159a9ce..24585be6c1d 100644 --- a/target/linux/airoha/dts/an7581-npu-mt7996.dtsi +++ b/target/linux/airoha/dts/an7581-npu-mt7996.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +#include "an7581-npu-wlan.dtsi" + &npu { firmware-name = "airoha/en7581_MT7996_npu_rv32.bin", "airoha/en7581_MT7996_npu_data.bin"; diff --git a/target/linux/airoha/dts/an7581-npu-wlan.dtsi b/target/linux/airoha/dts/an7581-npu-wlan.dtsi new file mode 100644 index 00000000000..bbb1824fd6c --- /dev/null +++ b/target/linux/airoha/dts/an7581-npu-wlan.dtsi @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +/* + * Memory regions used by the NPU Wi-Fi packet offloading only. Boards that + * do not run an Airoha-offloaded Wi-Fi chip must not reserve them: the NPU + * needs the binary region alone to run its firmware and to offload flows. + */ + +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + npu_pkt: npu-pkt@8a000000 { + no-map; + reg = <0x0 0x8a000000 0x0 0x2c00000>; + }; + + npu_txpkt: npu-txpkt@8cc00000 { + no-map; + reg = <0x0 0x8cc00000 0x0 0x4000000>; + }; + + npu_txbufid: npu-txbufid@90c00000 { + no-map; + reg = <0x0 0x90c00000 0x0 0x6800>; + }; + + npu_ba: npu-ba@90c06800 { + no-map; + reg = <0x0 0x90c06800 0x0 0x200000>; + }; + }; +}; + +&npu { + memory-region = <&npu_binary>, <&npu_pkt>, <&npu_txpkt>, + <&npu_txbufid>, <&npu_ba>; + memory-region-names = "binary", "pkt", "tx-pkt", + "tx-bufid", "ba"; +}; diff --git a/target/linux/airoha/dts/an7581.dtsi b/target/linux/airoha/dts/an7581.dtsi index fdefa82580b..af5a5f4dae4 100644 --- a/target/linux/airoha/dts/an7581.dtsi +++ b/target/linux/airoha/dts/an7581.dtsi @@ -39,26 +39,6 @@ no-map; reg = <0x0 0x89000000 0x0 0x1000000>; }; - - npu_pkt: npu-pkt@8a000000 { - no-map; - reg = <0x0 0x8a000000 0x0 0x2c00000>; - }; - - npu_txpkt: npu-txpkt@8cc00000 { - no-map; - reg = <0x0 0x8cc00000 0x0 0x4000000>; - }; - - npu_txbufid: npu-txbufid@90c00000 { - no-map; - reg = <0x0 0x90c00000 0x0 0x6800>; - }; - - npu_ba: npu-ba@90c06800 { - no-map; - reg = <0x0 0x90c06800 0x0 0x200000>; - }; }; psci { @@ -904,10 +884,9 @@ , , ; - memory-region = <&npu_binary>, <&npu_pkt>, <&npu_txpkt>, - <&npu_txbufid>, <&npu_ba>; - memory-region-names = "binary", "pkt", "tx-pkt", - "tx-bufid", "ba"; + memory-region = <&npu_binary>; + memory-region-names = "binary"; + status = "disabled"; };