WDMA + WED #3
Notifications
Due Date
No due date set.
Depends on
#2 Ethernet
airoha_en7523/kernel
Reference: airoha_en7523/kernel#3
Reference in New Issue
Block a user
4d76b59039/sdk/en7529/linux-4.4.115/arch/arm/boot/dts/en7523.dts (L230-L267)IRQs:
4d76b59039/sdk/en7529/linux-4.4.115/arch/mips/econet/irq.c (L172-L179)4d76b59039/sdk/en7529/linux-4.4.115/arch/mips/include/asm/tc3162/tc3182_int_source.h (L37-L44)The WED and WDMA hardware blocks are probably inherited from the EN7528 SoC design. It seems like they took the mips irq indices and mapped them in with an offset of 16.
The wed is supposed to only be able to accelerate in the downstream direction. The NPUs are supposed to be able to do both US/DS. The NPUs are most likely driver dependant.
If the aim is long term linux mainline support then I think the WED path should be taken instead of the NPUs. On the AN7581 the NPUs are standard RISCV32 and in theory one could implement open source packet offloading there. The AN7523 NPU binaries are some kind of obfuscation. Most likely the opcodes are substituted or something.
Anyway wed enabled driver code should be possible to get going as it should be similar to what Mediatek has in main line.
I haven't found any reference drivers in Econet's GPLs so far. I'm going to download them to my computer so I can search better. I found almost nothing in the GPL I have from Airoha.
When I was testing the Mediatek drivers, I couldn't get any signal that was working.
I dont think this hit production devices besides for EN7528. And you need to understand alot about the mt76 to be able to get it working properly. The wed/wdma is from the same generation as MT7622 so maybe it is needed to look back at that platform and its open code to see if the old integration code worked better.
Ok, it looks like the WED is connected to GDM3. So that is how packets come in to the PPE(Frame engine). The frame engine needs proper setup to handle the packets.
Therefore, the functioning of the frame engine is a priority
I found wed and wdma within this module; I'll take a look at it to try and understand how it works
Dump code with ghidra
mt_whnat.ko.c
Ill dig out the mt76 source code with wed support. But dont spend to much time on looking through binaries. I have access to this some where in source form.
Ok, I found code and patches. It is a huge mess. Wed is used to accelerated SoC Wifi tx and NPU seems to handle SoC wifi rx. On the AN7581 I think the NPUs take care of both rx and tx.
The problem is that I very much doubt that things are ABI stable. And the vendor SDK uses binary drivers for the WED part.
So if AN7581 will not use the WED then development of WED hw acceleration support is going to be really hard.
This is mt76 driver. It is a (probably) non working version with regards to NPU acceleration but the WED parts should be ok. The WED driver used is the proprietary one so it can only be used as reference for enabling the kernel woe driver.
Aura E650 boot log
This log is from a fairly new sdk. Both wed and npu is active in the driver.
I will separate the WED from the Ethernet PR and see what is crashing the system after the NPU core 3 starts up
i found this code to wed and wdma in xx530v v2:
343249db33/sdk/an7551/openwrt-wifi/package_Eagle_logan/feeds/wifi_package/mtk/drivers/mt_wifi7/src/mt_wifi/os/linux/plug_in/whnat343249db33/sdk/an7551/openwrt-wifi/package_Kite_logan/feeds/wifi_package/mtk/drivers/mt_wifi7/src/warp_driver/warphttps://sirherobrine23.com.br/tplink_gpl/tplink-xx530v_v2/src/branch/main/sdk/an7551/openwrt-wifi/package_mt76_7915_7916_mp2/package/kernel/mt76/patches
There are what I think are the mt76 patches.
There are some files similar to what we have from iow, and some function signatures are similar to what we have in mt_whnat as a module
patches in code
Sirherobrine23 referenced this issue2026-01-24 11:08:02 +00:00