Adding support for TP-Link XDR-6086

I have tested your kernel which I ported here by adding dts file and .config. And compiled a simple busybox as rootfs. Then enter the shell console and type ip link set eth1 up and ip link set lan5 up. They are both in no carrier status when connected to 1G cable
although 2.5G works fine. I checked ethtool it showed Supported link modes: 2500baseT/Full and Advertised link modes: 2500baseT/Full.

I think this issue is related to the MAC driver. I will try to debug.

Here the link: https://drive.google.com/drive/folders/1fYGVS_10bem-XnCuxbxrUXyr8Shb4G32?usp=share_link

Regards,
Paul

Thank you, I couldn't find anyone sharing it on the internet.

Thanks a lot, I will test it later.

I wonder has anyone tested any devices with mtk soc with 2.5GMAC and the PHY is not working at rate adaptor mode? Has anyone tested this configuration with 10M or 100M speed?

I have tested in my branch which imported some patches, but when the link speed is 10M or 100M, we will get a watchdog warning that shows transmit queue timed out. This happens if we will the iperf between WAN and LAN with different speeds without limiting the bandwidth. The detailed debug message is here.

I think this issue is related to flow control or something else, but I have no idea how to debug and solve it.

I have tested your kernel with TP-Link TL-XDR6088 with busybox rootfs. Directly adding the device tree of my hardware can get the system to boot up. But the 2.5G PHY does not work. Then I take some patches you can see here. Then I get both WAN and LAN5 to work at 2.5G speed.

But when the link partner is at 1G speed, I can get the WAN link up but never receive any ethernet frame. I checked /proc/interrupts and get no interrupts on this network interface. As for the LAN5 port, will not advertise 1G speed, so the link is never up.

Hey @cyyself,

I've seen that message about transmit queue 3 timed out on another MT7986A router too (Banana Pi R3). I had a 2.5Gbps SFP Ethernet adapter plugged in (now removed to see if it was related), a 1Gbps ethernet connection to WAN, and a 1Gbps ethernet connection to LAN1 (now also removed).

OpenWrt SNAPSHOT r22171-fdd1af9a44
mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control off
mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
[89180.305644] ------------[ cut here ]------------
[89180.310269] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 3 timed out
[89180.317259] WARNING: CPU: 2 PID: 0 at dev_watchdog+0x358/0x380
[89180.323086] Modules linked in: ch341 usbserial xhci_mtk_hcd xhci_hcd usbcore usb_common xt_quota xt_pkttype xt_owner xt_cgroup xt_addrtype xt_tcpmss xt_statistic xt_length xt_hl xt_ecn xt_dscp xt_HL xt_DSCP xt_CLASSIFY ipt_ECN xt_socket nf_socket_ipv6 nf_socket_ipv4 pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_CT wireguard pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_compat nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mt7915e mt76_connac_lib mt76 mac80211 libchacha20poly1305 iptable_mangle iptable_filter ipt_REJECT ip_tables chacha_neon cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG xfrm_interface x_tables slhc poly1305_neon
[89180.323235]  nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 libcurve25519_generic libchacha hwmon crc_ccitt compat crypto_safexcel cls_bpf act_bpf sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact dummy ip6_udp_tunnel udp_tunnel ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel ipcomp esp4 ah4 ipip tunnel6 tunnel4 ip_tunnel veth xfrm_user xfrm_ipcomp af_key xfrm_algo sha1_generic seqiv md5 echainiv des_generic libdes cbc authencesn authenc btrfs xor xor_neon raid6_pq libcrc32c leds_gpio gpio_button_hotplug [last unloaded: ch341]
[89180.467381] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.15.94 #0
[89180.473370] Hardware name: Bananapi BPI-R3 (DT)
[89180.477883] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[89180.484823] pc : dev_watchdog+0x358/0x380
[89180.488820] lr : dev_watchdog+0x358/0x380
[89180.492812] sp : ffffffc008d9bd60
[89180.496110] x29: ffffffc008d9bd60 x28: 0000000000000140 x27: 00000000ffffffff
[89180.503227] x26: 0000000000000000 x25: 0000000000000002 x24: ffffff800096a4c0
[89180.510342] x23: 0000000000000000 x22: 0000000000000001 x21: ffffffc008be6000
[89180.517457] x20: ffffff800096a000 x19: 0000000000000003 x18: ffffffc008c00328
[89180.524573] x17: ffffffc076fc6000 x16: ffffffc008d9c000 x15: 0000000000000e31
[89180.531687] x14: 00000000000004bb x13: ffffffc008d9ba88 x12: ffffffc008c58328
[89180.538802] x11: 712074696d736e61 x10: ffffffc008c58328 x9 : 0000000000000000
[89180.545917] x8 : ffffffc008c002d8 x7 : ffffffc008c00328 x6 : 0000000000000001
[89180.553033] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[89180.560148] x2 : ffffff807fba2230 x1 : ffffffc076fc6000 x0 : 000000000000003f
[89180.567265] Call trace:
[89180.569698]  dev_watchdog+0x358/0x380
[89180.573346]  call_timer_fn+0x30/0x144
[89180.576996]  __run_timers.part.0+0x240/0x2ec
[89180.581250]  run_timer_softirq+0x38/0x70
[89180.585157]  _stext+0x118/0x348
[89180.588284]  __irq_exit_rcu+0xdc/0xfc
[89180.591933]  irq_exit+0xc/0x1c
[89180.594972]  handle_domain_irq+0x60/0x8c
[89180.598879]  gic_handle_irq+0x50/0x120
[89180.602615]  call_on_irq_stack+0x28/0x40
[89180.606523]  do_interrupt_handler+0x4c/0x54
[89180.610690]  el1_interrupt+0x2c/0x4c
[89180.614252]  el1h_64_irq_handler+0x14/0x20
[89180.618333]  el1h_64_irq+0x74/0x78
[89180.621718]  arch_cpu_idle+0x14/0x20
[89180.625278]  default_idle_call+0x38/0x124
[89180.629271]  do_idle+0xac/0x110
[89180.632398]  cpu_startup_entry+0x24/0x50
[89180.636305]  secondary_start_kernel+0x130/0x140
[89180.640819]  __secondary_switched+0x50/0x54
[89180.644989] ---[ end trace 3332f3534140faee ]---
[89180.649621] mtk_soc_eth 15100000.ethernet eth0: transmit timed out
[89180.786463] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[89181.316168] mtk_soc_eth 15100000.ethernet: warm reset failed
[89181.334970] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[89181.343371] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/2500base-x link mode
[89181.343386] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx

So it looks like it might be to do with the actual chipset and not the TL-XDR6088 specifically. (Good news I think?)

I guess the three important questions are:
1- Why is this happening?
2- Why is the warm reset failing?
3- Is there a workaround for now? (like can flow control be disabled?)

There is a working tutorial in English to install Openwrt or X-wrt on this device? I don't care About 2.5gbps port, just need one working 1gbps Rj45 and wireless to use this as a dumb ap

1 Like

recently my device has been automatically restarting every day, and after the restart, the network configuration is lost (no SSID broadcast, interface and subnet configuration restored to default). The only way to restore the configuration is to unplug the device power (SSID and network configuration are restored). I don't have a serial cable, do you have any ideas on how I can use the kernel log or system log to find out the reason for the restart? @cyyself

这个2.5g,硬件加速,都正常用了半个月了。

Thanks my friend but I guess that's the instructions to build the installation file. I need the instructions to root and install, I don't have enough skill to do it without a step by step guide

试下这个
https://openwrt.org/inbox/toh/tp-link/xdr-
6086#rooting
or 这个https://www.right.com.cn/FORUM/thread-8275955-1-1.html

1 Like
2 Likes

@cyyself Hello,

Please, what are the steps in u-boot menu to come back to original TP-Link firmware?
I should mention that prior to install OpenWRT I did a backup for mtdblock9 and now wanted to come back to original firmware. I want to be sure I'm not messing something as I not very knowledge with u-boot.

Thank you,
Paul.

dd: command gave me this error Operation not permitted

root@OpenWrt:/# dd of=/dev/mtdblock0 if=/tmp/backup.img bs=131072 conv=sync
[ 1920.921893] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
dd: error writing '/dev/mtdblock0': Operation not permitted
1+0 records in
0+0 records out

Why would you want to write the backup of mtdblock9 to mtdblock0? Was that on purpose?

NB: I'm not familiar with this device, I just came by your post.

Before flashing OpenWRT I saved the entire stock partition (mtd9) that is basicly the whole SPI-NAND - "backup.img"
I'm not looking on writing entire flash memory, I need to have TP-Link factory boot ready. I believe that when using this dd: command - "dd bs=131072 conv=sync of=/dev/mtdblock0 if=/tmp/backup.img" I can get in recovery mode., and after reboot to load the original TP-Link factory firmware.
Doing dd: on mtdblock0 (for sure original "backup.img" 128M cannot fit in "bl2"), I will write only "bl2" leaving the rest untouched (art, wireless calibration data etc).

You are very lucky that this didn't work, you would have bricked the device if it did.
In order to restore the stock firmware bootloader, you have to write not only bl2, but at least also bl3/u-boot, otherwise you end up with a brick for sure.

Thank you for your feedback. However, is there a way to go back on factory firmware? What are the steps to accomplish this?
Much appreciated your help!

You have to write all /dev/mtdX partitions one by one. Use mtd write /tmp/filenameX.img /dev/mtdX instead of dd. If you are sure you know what you are doing (and I mean be really sure, you have only one shot!), then

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1

that will unlock the otherwise read-only MTD partitions.

1 Like