Hello OpenWRT gurus!
I've been working on getting the TP-Link Deco X55 Pro working the past few weeks. I've had a bit of success with booting a initramfs custom build from the latest OpenWRT code on github and getting one of the two 2.5Gbe ports to work.
Per the FCC internal pictures and the boot log /running system info, the device has a Mediatek MT7981 SOC with 512MB RAM and two RTL8221b PHY chips for the two RJ-45 ethernet ports it has. For wireless it uses the MediaTek MT7976DAN chip which appears to work OK for both 2.4Mhz and 5Mhz radios on the custom build.
I soldered in a pin header to the UART and have it connected to an FTDI-USB adapter where I can connect at 115200bps. I can interrupt u-boot and execute commands to interrogate the system and also load and boot kernels using kermit over the serial port (since the network HW doesn't appear to be supported by the u-boot version that is used)
The opensource files provided by TP-Link has a DTS file in it, which I was able to confirm is the one used by the stock firmware. Between the version of OpenWRT used in the stock firmware (12.09-rc1) and the current OpenWRT, it seems there have been a lot of code changes around the realtek drivers in the kernel so I'm not sure what the appropriate settings should be. I've looked at the configuration code, existing issues, and forum posts for similar devices and for issues with the RTL8211B phy but haven't found anything that gets the second port to work.
One change I made in the DTS was to remove the following configuration for the gmacs in the eth node. Neither wired ports would come up with this set. After removing it, the LAN port eth1 comes up and appears to work ok.
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
Currently the eth section of the DTS file looks like this
ð {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-handle = <&phy6>;
phy-mode = "2500base-x";
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-handle = <&phy5>;
phy-mode = "2500base-x";
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
phy5: phy@5 {
compatible = "ethernet-phy-ieee802.3-c45";
reg = <0x5>;
interrupt-parent = <&pio>;
reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
reset-assert-us = <100000>;
reset-deassert-us = <100000>;
phy-mode = "2500base-x";
partner_gmac = <1>;
};
phy6: phy@6 {
compatible = "ethernet-phy-ieee802.3-c45";
reg = <0x6>;
interrupt-parent = <&pio>;
reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
reset-assert-us = <100000>;
reset-deassert-us = <100000>;
phy-mode = "2500base-x";
partner_gmac = <0>;
};
};
};
After booting the custom build, the WAN port eth0 does not want to work no matter what I try
ethtool -S eth0 yeilds the following output, indicating that the interface isn't able to recieve any packets
NIC statistics:
tx_bytes: 3490
tx_packets: 29
tx_skip: 0
tx_collisions: 0
rx_bytes: 0
rx_packets: 0
rx_overflow: 0
rx_fcs_errors: 151
rx_short_errors: 902
rx_long_errors: 0
rx_checksum_errors: 0
rx_flow_control_packets: 0
rx_xdp_redirect: 0
rx_xdp_pass: 0
rx_xdp_drop: 0
rx_xdp_tx: 0
rx_xdp_tx_errors: 0
tx_xdp_xmit: 0
tx_xdp_xmit_errors: 0
The MT7981 mtk_soc_eth and the realtek driver seems to detect the hardware correctly and do not throw any errors on boot. Both ports show as link up in logs and link lights on the switch they are plugged into with both correctly negiotiating 1Gbs speed.
[ 8.511821] mtk_soc_eth 15100000.ethernet eth0: PHY [mdio-bus:06] driver [RTL8221B-VB-CG 2.5Gbps PHY] (irq=POLL)
[ 8.526060] mtk_soc_eth 15100000.ethernet eth0: configuring for phy/2500base-x link mode
[ 12.693041] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 18.725949] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[ 18.882037] mtk_soc_eth 15100000.ethernet eth1: PHY [mdio-bus:05] driver [RTL8221B-VB-CG 2.5Gbps PHY] (irq=POLL)
[ 18.896119] mtk_soc_eth 15100000.ethernet eth1: configuring for phy/2500base-x link mode
[ 18.943650] mtk_soc_eth 15100000.ethernet eth1: entered allmulticast mode
[ 18.950574] mtk_soc_eth 15100000.ethernet eth1: entered promiscuous mode
[ 19.191686] mtk_soc_eth 15100000.ethernet eth0: PHY [mdio-bus:06] driver [RTL8221B-VB-CG 2.5Gbps PHY] (irq=POLL)
[ 19.201878] mtk_soc_eth 15100000.ethernet eth0: configuring for phy/sgmii link mode
[ 22.372672] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 23.093021] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
The output for the MDIO bus for the two phys does show some differences, but I'm not sure how to interpret them.
eth0-gmac0 eth1-gmac1
phy6 phy5
phy:1 0x6 0xc000 0xc000
phy:1 0x5 0x008b 0x008b
phy:1 0x2 0x001c 0x001c
phy:1 0x3 0xc849 0xc849
phy:3 0x2 0x001c 0x001c
phy:3 0x3 0xc849 0xc849
phy:7 0x2 0x001c 0x001c
phy:7 0x3 0xc849 0xc849
phy:30 0x8 0x5555 0x4b3c
phy:30 0x2 0x0000 0x5555
phy:30 0x3 0x0000 0xd555
phy:31 0x8 0x8000 0x8000
phy:31 0x2 0x001c 0x001c
phy:31 0x3 0xc849 0xc849
phy:30 0xa662 0x0000 0xa8c0
phy:30 0xa4d2 0x0608 0x5555
phy:30 0xa4d4 0x0008 0xffff
phy:7 0x1 0x002d 0x002d
phy:1 0x8 0x8200 0x8200
phy:1 0xb 0x41a0 0x41a0
phy:1 0x15 0x0001 0x0001
phy:3 0x14 0x0006 0x0006
phy:3 0x15 0x0001 0x0001
phy:7 0x3c 0x0006 0x0006
phy:7 0xe3 0x0000 0x0000
Any suggestions or tips to get over this hurdle would be appreciated.