Introduce Block Ack memory region used by NPU MT7996 (Eagle) offloading. Signed-off-by: Lorenzo Bianconi --- .../devicetree/bindings/net/airoha,en7581-npu.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml b/Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml index 59c57f58116b568092446e6cfb7b6bd3f4f47b82..42bc0f2a42a91236c858241ca76aa0b0ddac8d54 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,7 @@ properties: - const: pkt - const: tx-pkt - const: tx-bufid + - const: ba required: - compatible @@ -93,7 +93,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"; }; }; -- 2.52.0 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 --- 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 22f72c146065998d5450477f664ed308b1569aa3..a56b3780bb627cc393b94210b6b5c72cc95baea3 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); -- 2.52.0