From 40f9e446033e3aef3bc230858c98f57bbcc53f5a Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Thu, 8 Jan 2026 16:05:07 +0100 Subject: [PATCH 1/2] dt-bindings: net: airoha: npu: Add BA memory region Introduce Block Ack memory region used by NPU MT7996 (Eagle) offloading. Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20260108-airoha-ba-memory-region-v3-1-bf1814e5dcc4@kernel.org Signed-off-by: Jakub Kicinski --- .../bindings/net/airoha,en7581-npu.yaml | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml b/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml index 59c57f58116b..19860b41286f 100644 --- a/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml +++ b/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml @@ -42,14 +42,13 @@ properties: - description: wlan irq line5 memory-region: - oneOf: - - items: - - description: NPU firmware binary region - - items: - - description: NPU firmware binary region - - description: NPU wlan offload RX buffers region - - description: NPU wlan offload TX buffers region - - description: NPU wlan offload TX packet identifiers region + items: + - description: NPU firmware binary region + - description: NPU wlan offload RX buffers region + - description: NPU wlan offload TX buffers region + - description: NPU wlan offload TX packet identifiers region + - description: NPU wlan Block Ack buffers region + minItems: 1 memory-region-names: items: @@ -57,6 +56,8 @@ properties: - const: pkt - const: tx-pkt - const: tx-bufid + - const: ba + minItems: 1 required: - compatible @@ -93,7 +94,7 @@ examples: , ; memory-region = <&npu_firmware>, <&npu_pkt>, <&npu_txpkt>, - <&npu_txbufid>; - memory-region-names = "firmware", "pkt", "tx-pkt", "tx-bufid"; + <&npu_txbufid>, <&npu_ba>; + memory-region-names = "firmware", "pkt", "tx-pkt", "tx-bufid", "ba"; }; }; From 875a59c9a9e584d99d8e9e5aa8435ec9300bfe91 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Thu, 8 Jan 2026 16:05:08 +0100 Subject: [PATCH 2/2] net: airoha: npu: Init BA memory region if provided via DTS Initialize NPU Block Ack memory region if reserved via DTS. Block Ack memory region is used by NPU MT7996 (Eagle) offloading. Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20260108-airoha-ba-memory-region-v3-2-bf1814e5dcc4@kernel.org Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/airoha/airoha_npu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/airoha/airoha_npu.c b/drivers/net/ethernet/airoha/airoha_npu.c index 22f72c146065..a56b3780bb62 100644 --- a/drivers/net/ethernet/airoha/airoha_npu.c +++ b/drivers/net/ethernet/airoha/airoha_npu.c @@ -519,6 +519,14 @@ static int airoha_npu_wlan_init_memory(struct airoha_npu *npu) if (err) return err; + if (of_property_match_string(npu->dev->of_node, "memory-region-names", + "ba") >= 0) { + cmd = WLAN_FUNC_SET_WAIT_DRAM_BA_NODE_ADDR; + err = airoha_npu_wlan_set_reserved_memory(npu, 0, "ba", cmd); + if (err) + return err; + } + cmd = WLAN_FUNC_SET_WAIT_IS_FORCE_TO_CPU; return airoha_npu_wlan_msg_send(npu, 0, cmd, &val, sizeof(val), GFP_KERNEL);