Adding support for TP-Link XDR-6086

Please look here: https://github.com/openwrt/openwrt/pull/11435

3 Likes

How about xdr-4288? TP-LINK轻舟XDR4288拆机,双频不对称空间流-路由器交流 (acwifi.net)

Please create a new thread for a different device.

2 Likes

xdr-4288 is almost same as xdr-6088 except 5G rf chip

I'm in favor of keeping patches for mtk_eth_soc in generic because both, ramips and mediatek targets use this Ethernet core.

3 Likes

Updated staging tree based on device tree of @Amadeus : https://git.openwrt.org/?p=openwrt/staging/dangole.git;a=commit;h=90f69d2cb0a8b221279859d7524d7f9755285f53

@soxrok2212 Can you give this build it a shot? U-Boot is practically unchanged, but added patch from lynxis and now generate dedicated builds for TL-XDR6086 and TL-XDR6088.

@daniel and I did some testing on the 2.5g ports. When negotiated at 2.5g, speeds were perfect at 2.35gbit/s. However, when switching to a physical 1g device or negotiating at 1g in software, speeds were awful, see:

[ ID][Role] Interval           Transfer     Bitrate         Retr  Cwnd
[  5][RX-S]   0.00-1.00   sec  60.6 MBytes   509 Mbits/sec                  
[  8][TX-S]   0.00-1.00   sec   141 KBytes  1.16 Mbits/sec   18   1.41 KBytes       
[  5][RX-S]   1.00-2.00   sec  82.1 MBytes   688 Mbits/sec                  
[  8][TX-S]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    5   2.83 KBytes       
[  5][RX-S]   2.00-3.00   sec  68.5 MBytes   574 Mbits/sec                  
[  8][TX-S]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    6   2.83 KBytes       
[  5][RX-S]   3.00-4.00   sec  81.9 MBytes   687 Mbits/sec                  
[  8][TX-S]   3.00-4.00   sec  94.7 KBytes   776 Kbits/sec   15   1.41 KBytes       
[  5][RX-S]   4.00-5.00   sec  81.9 MBytes   687 Mbits/sec                  
[  8][TX-S]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec    5   1.41 KBytes       
[  5][RX-S]   5.00-6.00   sec  82.1 MBytes   689 Mbits/sec                  
[  8][TX-S]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec   11   1.41 KBytes       
[  5][RX-S]   6.00-7.00   sec  82.1 MBytes   689 Mbits/sec                  
[  8][TX-S]   6.00-7.00   sec  69.3 KBytes   568 Kbits/sec   11   1.41 KBytes       
[  5][RX-S]   7.00-8.00   sec  60.5 MBytes   507 Mbits/sec                  
[  8][TX-S]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    8   2.83 KBytes       
[  5][RX-S]   8.00-9.00   sec  59.3 MBytes   498 Mbits/sec                  
[  8][TX-S]   8.00-9.00   sec   134 KBytes  1.10 Mbits/sec   22   1.41 KBytes       
[  5][RX-S]   9.00-10.00  sec  82.0 MBytes   688 Mbits/sec                  
[  8][TX-S]   9.00-10.00  sec  66.5 KBytes   544 Kbits/sec   18   1.41 KBytes       
[  5][RX-S]  10.00-10.27  sec  22.2 MBytes   687 Mbits/sec                  
[  8][TX-S]  10.00-10.27  sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][RX-S]   0.00-10.27  sec   763 MBytes   623 Mbits/sec                  receiver
[  8][TX-S]   0.00-10.27  sec   506 KBytes   404 Kbits/sec  119             sender

Looks like there's an issue with 5g radio @daniel

[   86.531703] IPv6: ADDRCONF(NETDEV_CHANGE): phy1-ap4: link becomes ready
[  119.316238] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[  119.325016] Mem abort info:
[  119.327809]   ESR = 0x96000005
[  119.330848]   EC = 0x25: DABT (current EL), IL = 32 bits
[  119.336146]   SET = 0, FnV = 0
[  119.339184]   EA = 0, S1PTW = 0
[  119.342309]   FSC = 0x05: level 1 translation fault
[  119.347170] Data abort info:
[  119.350036]   ISV = 0, ISS = 0x00000005
[  119.353853]   CM = 0, WnR = 0
[  119.356814] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000046caf000
[  119.363234] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[  119.371918] Internal error: Oops: 96000005 [#1] SMP
[  119.376778] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet batman_adv pppox ppp_gene2
[  119.376916]  cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact ifb sha1_generic seqiv md5 dn
[  119.487717] CPU: 3 PID: 1672 Comm: hostapd Not tainted 5.15.80 #0
[  119.493791] Hardware name: TP-Link TL-XDR6086 (DT)
[  119.498562] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  119.505503] pc : sta_set_sinfo+0x8f8/0xbbc [mac80211]
[  119.510575] lr : sta_set_sinfo+0x5f0/0xbbc [mac80211]
[  119.515622] sp : ffffffc00bc1b7c0
[  119.518919] x29: ffffffc00bc1b7c0 x28: 0000000000000001 x27: ffffffc00bc1bdd0
[  119.526036] x26: 0000000000000000 x25: ffffff8008cb28c0 x24: ffffff80044b0245
[  119.533151] x23: ffffffc00bc1ba38 x22: ffffff80069b4600 x21: 0000058d1783bf82
[  119.540266] x20: ffffff80044b0000 x19: ffffff800692ec00 x18: 0000000000000000
[  119.547380] x17: 0000000000000000 x16: 000000000000000a x15: 000013536d21e000
[  119.554495] x14: ffffff80044b0c70 x13: 0000000000000040 x12: 0000000000000000
[  119.561611] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[  119.568726] x8 : ffffff800692ed00 x7 : 0000000000000000 x6 : 0000000000002010
[  119.575842] x5 : ffffff80027f03a0 x4 : 0000000000000000 x3 : ffffff800692ec42
[  119.582957] x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000
[  119.590072] Call trace:
[  119.592504]  sta_set_sinfo+0x8f8/0xbbc [mac80211]
[  119.597208]  sta_set_sinfo+0xb18/0xbbc [mac80211]
[  119.601909]  sta_info_destroy_addr_bss+0x4c/0x6c [mac80211]
[  119.607476]  ieee80211_color_change_finish+0x16b8/0x2080 [mac80211]
[  119.613737]  cfg80211_check_station_change+0xfb8/0x3a64 [cfg80211]
[  119.619910]  genl_family_rcv_msg_doit+0xb4/0x110
[  119.624514]  genl_rcv_msg+0xd0/0x1c0
[  119.628075]  netlink_rcv_skb+0x58/0x120
[  119.631895]  genl_rcv+0x34/0x50
[  119.635021]  netlink_unicast+0x1e4/0x2dc
[  119.638928]  netlink_sendmsg+0x1a0/0x3d0
[  119.642835]  ____sys_sendmsg+0x224/0x26c
[  119.646745]  ___sys_sendmsg+0x80/0xf0
[  119.650394]  __sys_sendmsg+0x44/0x84
[  119.653954]  __arm64_sys_sendmsg+0x20/0x2c
[  119.658035]  invoke_syscall.constprop.0+0x4c/0xe0
[  119.662723]  do_el0_svc+0x48/0xe0
[  119.666022]  el0_svc+0x14/0x50
[  119.669066]  el0t_64_sync_handler+0x9c/0x120
[  119.673319]  el0t_64_sync+0x158/0x15c
[  119.676968] Code: d3441c42 12000c00 8b020ca2 f9451c42 (f9400445) 
[  119.683041] ---[ end trace f91c76152ddb6500 ]---
[  119.691405] Kernel panic - not syncing: Oops: Fatal exception
[  119.697135] SMP: stopping secondary CPUs
[  119.701042] Kernel Offset: disabled
[  119.704514] CPU features: 0x0,00000000,20000802
[  119.709027] Memory Limit: none
[  119.715745] Rebooting in 3 seconds..

My AP is on channel 100 (DFS) which works as expected on my Redmi AX6000 (also MT7986), no crashes. Kernel panic right after it brings the first VAP up (presumably after DFS scan). There are 5 VAPs. This works as expected on the Redmi as well. DFS is required to utilize 160MHz continuous here.

Here's the relevant config:

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/18000000.wmac'
	option channel '11'
	option band '2g'
	option htmode 'HE20'
	option he_su_beamformee '1'
	option he_bss_color '30'
	option country 'US'
	option cell_density '0'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/18000000.wmac+1'
	option band '5g'
	option he_su_beamformee '1'
	option he_bss_color '30'
	option country 'US'
	option cell_density '0'
	option htmode 'HE160'
	option channel '100'
1 Like

I've stacked a bunch of patches from Lorenzo on top, RX WED and improvements for reset of Ethernet, PPE, WED and WiFi units. I also used newer binutils and gcc for testing, so that could as well be the cause (and kinda looks like it, because the call trace doesn't even show any places in those drivers, but only Linux netlink and cfg80211 infrastructure). Please try your own build, and maybe even try without all the other patches. I've prepared a git tree here. In your openwrt tree, please do:

git fetch https://git.openwrt.org/openwrt/staging/dangole.git tl-xdr608x
git checkout FETCH_HEAD
2 Likes

This was my own build from your staging tree last night. I'll try a build from this one now and report back.

2 Likes

@daniel when you get a chance, could you pull latest openwrt/mt76 in? Some changes just landed.

1 Like

Still crashing on that branch

Now updated and rebased on latest mt76 changes: https://git.openwrt.org/?p=openwrt/staging/dangole.git;a=shortlog;h=refs/heads/main

3 Likes

Lorenzo has just published a new version of his current work on WED and mtk_eth_soc which he is going to send upstream. I've now squashed that into my staging tree as well.

2 Likes

Still kernel panicking :frowning: I cleared out my build dir completely and started completely fresh.

I'm trying to reproduce this on BPi-R3 with your wifi configuration, but for now I don't manage...
Update: now continously run iperf3 with only one client connected (intel ax210) to 5 GHz wifi and things looks quite good, 1.3 Gbits/sec ...
Can you provide me with more information regarding how to trigger the crash?

2 Likes

I think we made a mistake somewhere, 2.4G and 5G have the same MAC address for starts. Device tree seems to be the culprit. The following allows the 5G radio to start normally, though with a random MAC instead of factory MAC.

&wmac {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&wf_2g_5g_pins>;

    mediatek,mtd-eeprom = <&factory 0x0>;
};

Second issue - WAN interface continuously going up and down:

[ 1054.715776] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1058.881253] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1130.554031] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1133.681395] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1194.970093] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1199.126168] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1230.297796] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1233.415610] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1327.948404] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1332.113971] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1335.220233] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1339.376083] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1350.802937] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1353.919485] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1359.113133] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1363.268825] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1368.462953] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1371.580055] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1381.968516] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1386.123539] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1579.355393] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1583.511026] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1587.666333] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1591.822086] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1787.132588] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1790.260193] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1795.445477] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1799.602410] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 2093.607215] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 2097.763555] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 2161.135928] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 2165.300518] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx

The following seems to be working. dbdc seems to break it; I'm not even sure what it is.

&wmac {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&wf_2g_5g_pins>;

	mediatek,mtd-eeprom = <&factory 0x0>;
    nvmem-cells = <&macaddr_config_1c>;
    nvmem-cell-names = "mac-address";
    mac-address-increment = <2>;
};

Update: seems to be crashing again. Will need to debug more later.

1 Like

I received the xdr6086 router I borrowed yesterday and corrected some details of the code accordingly.

The current problems are concentrated on the 2.5g port. First, the rtl8221b phy connected to the mt7531 switch cannot be automatically negotiated, so it cannot work at 1Gbps. Secondly, the level leds of the two 2.5G ports are not light. It seems that there are still a lot of work to do.

4 Likes

DBDC == dual band dual congruent == single front-end like MT7976 which does several bands (2.4G/5G) at the same time. This solution is not used by that device which apparently has two separate frontends, one 4T4R for 2.4G and one 4T4R for 5G.
Probably I copied this pinctrl assignment from @Amadeus device tree and didn't notice...

Regarding MAC address: As there is only one node in DTS responsible for both PHYs, I guess we will have to assign MAC address for at least one of them from userspace. Do you know the MAC addresses the stock firmware assigns to each wifi interface?

4 Likes