OpenWrt support for Linksys MX4200

Here's the output from an MX4300:

      0x01   0x02   0x03   0x04
0x0 0x1040 0x1040 0x1040 0x1040 
0x1 0x7949 0x7949 0x7949 0x796d 
0x2 0x004d 0x004d 0x004d 0x004d 
0x3 0xd0b1 0xd0b1 0xd0b1 0xd0b1 
0x4 0x1de1 0x1de1 0x1de1 0x1de1 
0x5 0x0000 0x0000 0x0000 0xcde1 
0x6 0x0004 0x0004 0x0004 0x000f 
0x7 0x2801 0x2801 0x2801 0x2801 
0x8 0x0000 0x0000 0x0000 0x0000 
0x9 0x0600 0x0600 0x0600 0x0600 
0xa 0x0000 0x0000 0x0000 0x7800 
0xb 0x0000 0x0000 0x0000 0x0000 
0xc 0x0000 0x0000 0x0000 0x0000 
0xd 0x4007 0x4007 0x4007 0x4007 
0xe 0x0006 0x0006 0x0006 0x0006 
0xf 0x2000 0x2000 0x2000 0xa000 
0x10 0x6862 0x6862 0x6862 0x6862 
0x11 0x0010 0x0010 0x0010 0xbc1c 
0x12 0x0000 0x0000 0x0000 0x0000 
0x13 0x0000 0x0000 0x0000 0x4c00 
0x14 0x082c 0x082c 0x082c 0x082c 
0x15 0x0000 0x0000 0x0000 0x0000 
0x16 0x2400 0x2400 0x2400 0x2400 
0x17 0x0000 0x0000 0x0000 0x0000 
0x18 0x0000 0x0000 0x0000 0x0000 
0x19 0x0000 0x0000 0x0000 0x0000 
0x1a 0x0000 0x0000 0x0000 0x0000 
0x1b 0x0000 0x0000 0x0000 0x063e 
0x1c 0x0000 0x0000 0x0000 0x0000 
0x1d 0x0000 0x0000 0x0000 0x0000 
0x1e 0x82a0 0x82a0 0x82a0 0x82a0 
0x1f 0x0000 0x0000 0x0000 0x8500 

Please only post your NSS-related question here: Qualcommax NSS Build

1 Like

Only PHY on 0x4 had a cable connected?

HWK the brick one with USB boot

usb boot img /qualcommax-d440c8c/openwrt-qualcommax-ipq807x-linksys_homewrk-initramfs-uImage.itb

      0x01   0x02   0x03   0x04
0x0 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x2 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x3 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x4 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x5 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x6 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x7 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x8 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x9 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xa -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xb -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xc -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xd -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xe -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0xf -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x10 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x11 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x12 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x13 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x14 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x15 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x16 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x17 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x18 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x19 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1a -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1b -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1c -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1d -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1e -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

0x1f -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found
 -ash: mdio: not found

yes, that's correct

Are you sure that you have correct version on USB drive? mdio-tools package is missing.

download and flashed USB again , after boot same out put.

Can you check installed packages

opkg list-installed

?

`ath11k-firmware-ipq8074 - 2024.03.14~795809c7-r2
base-files - 1~37fc0a1
busybox - 1.36.1-r1
ca-bundle - 20240203-r1
dnsmasq - 2.90-r2
dropbear - 2024.85-r1
e2fsprogs - 1.47.0-r2
firewall4 - 2024.05.21~4c01d1eb-r1
fstools - 2024.07.14~408c2cc4-r1
fwtool - 2019.11.12~8f7fe925-r1
getrandom - 2024.04.26~85f10530-r1
hostapd-common - 2024.03.09~695277a5-r3
ipq-wifi-linksys_mx4200 - 2024.07.04~fcdb2e74-r1
iw - 6.9-r1
iwinfo - 2024.07.06~21582013-r1
jansson4 - 2.14-r3
jshn - 2024.03.29~eb9bcb64-r1
jsonfilter - 2024.01.23~594cfa86-r1
kernel - 6.6.47~cb9fcf3a9228ccb437be2f61f48916d4-r1
kmod-ath - 6.6.47.6.9.9-r1
kmod-ath11k - 6.6.47.6.9.9-r1
kmod-ath11k-ahb - 6.6.47.6.9.9-r1
kmod-cfg80211 - 6.6.47.6.9.9-r1
kmod-crypto-aead - 6.6.47-r1
kmod-crypto-ccm - 6.6.47-r1
kmod-crypto-cmac - 6.6.47-r1
kmod-crypto-crc32c - 6.6.47-r1
kmod-crypto-ctr - 6.6.47-r1
kmod-crypto-gcm - 6.6.47-r1
kmod-crypto-geniv - 6.6.47-r1
kmod-crypto-gf128 - 6.6.47-r1
kmod-crypto-ghash - 6.6.47-r1
kmod-crypto-hash - 6.6.47-r1
kmod-crypto-hmac - 6.6.47-r1
kmod-crypto-manager - 6.6.47-r1
kmod-crypto-michael-mic - 6.6.47-r1
kmod-crypto-null - 6.6.47-r1
kmod-crypto-rng - 6.6.47-r1
kmod-crypto-seqiv - 6.6.47-r1
kmod-crypto-sha3 - 6.6.47-r1
kmod-crypto-sha512 - 6.6.47-r1
kmod-fs-ext4 - 6.6.47-r1
kmod-gpio-button-hotplug - 6.6.47-r3
kmod-hwmon-core - 6.6.47-r1
kmod-i2c-core - 6.6.47-r1
kmod-leds-gpio - 6.6.47-r1
kmod-leds-pca963x - 6.6.47-r1
kmod-lib-crc-ccitt - 6.6.47-r1
kmod-lib-crc16 - 6.6.47-r1
kmod-lib-crc32c - 6.6.47-r1
kmod-libphy - 6.6.47-r1
kmod-mac80211 - 6.6.47.6.9.9-r1
kmod-mtd-rw - 6.6.47.2021.02.28~e8776739-r1
kmod-nf-conntrack - 6.6.47-r1
kmod-nf-conntrack6 - 6.6.47-r1
kmod-nf-flow - 6.6.47-r1
kmod-nf-log - 6.6.47-r1
kmod-nf-log6 - 6.6.47-r1
kmod-nf-nat - 6.6.47-r1
kmod-nf-reject - 6.6.47-r1
kmod-nf-reject6 - 6.6.47-r1
kmod-nfnetlink - 6.6.47-r1
kmod-nft-core - 6.6.47-r1
kmod-nft-fib - 6.6.47-r1
kmod-nft-nat - 6.6.47-r1
kmod-nft-offload - 6.6.47-r1
kmod-nls-base - 6.6.47-r1
kmod-phy-aquantia - 6.6.47-r1
kmod-ppp - 6.6.47-r1
kmod-pppoe - 6.6.47-r1
kmod-pppox - 6.6.47-r1
kmod-qca-nss-dp - 6.6.47.2024.04.16~5bf8b91e-r1
kmod-qca-ssdk - 6.6.47.2024.06.13~c451136b-r3
kmod-qrtr - 6.6.47-r1
kmod-qrtr-smd - 6.6.47-r1
kmod-slhc - 6.6.47-r1
kmod-thermal - 6.6.47-r1
kmod-usb-core - 6.6.47-r1
kmod-usb-dwc3 - 6.6.47-r1
kmod-usb-dwc3-qcom - 6.6.47-r1
kmod-usb-xhci-hcd - 6.6.47-r1
kmod-usb3 - 6.6.47-r1
libblkid1 - 2.40.2-r1
libblobmsg-json20240329 - 2024.03.29~eb9bcb64-r1
libc - 1.2.5-r4
libcomerr0 - 1.47.0-r2
libe2p2 - 1.47.0-r2
libext2fs2 - 1.47.0-r2
libgcc1 - 13.3.0-r4
libiwinfo-data - 2024.07.06~21582013-r1
libiwinfo20230701 - 2024.07.06~21582013-r1
libjson-c5 - 0.17-r1
libjson-script20240329 - 2024.03.29~eb9bcb64-r1
libmbedtls21 - 3.6.0-r1
libmnl0 - 1.0.5-r1
libnftnl11 - 1.2.6-r1
libnl-tiny1 - 2023.12.05~965c4bf4-r1
libpthread - 1.2.5-r4
librt - 1.2.5-r4
libsmartcols1 - 2.40.2-r1
libss2 - 1.47.0-r2
libubox20240329 - 2024.03.29~eb9bcb64-r1
libubus20231128 - 2023.11.28~f84eb599-r1
libuci20130104 - 2023.08.10~5781664d-r1
libuclient20201210 - 2024.04.19~e8780fa7-r1
libucode20230711 - 2024.07.11~1a8a0bcf-r1
libudebug - 2023.12.06~6d3f51f9
libustream-mbedtls20201210 - 2024.04.19~524a76e5-r1
libuuid1 - 2.40.2-r1
logd - 2024.04.26~85f10530-r1
losetup - 2.40.2-r1
mtd - 26
nand-utils - 2.2.0-r1
netifd - 2024.08.01~68c8a4f9-r1
nftables-json - 1.0.9-r1
odhcp6c - 2023.05.12~bcd28363-r20
odhcpd-ipv6only - 2024.05.08~a2988231-r1
openwrt-keyring - 2022.03.25~62471e69-r2
opkg - 2022.02.24~d038e5b6-r2
ppp - 2.4.9_git20210104-r5
ppp-mod-pppoe - 2.4.9_git20210104-r5
procd - 2024.07.07~f230c117-r1
procd-seccomp - 2024.07.07~f230c117-r1
procd-ujail - 2024.07.07~f230c117-r1
ubi-utils - 2.2.0-r1
uboot-envtools - 2024.07-r1
ubox - 2024.04.26~85f10530-r1
ubus - 2023.11.28~f84eb599-r1
ubusd - 2023.11.28~f84eb599-r1
uci - 2023.08.10~5781664d-r1
uclient-fetch - 2024.04.19~e8780fa7-r1
ucode - 2024.07.11~1a8a0bcf-r1
ucode-mod-fs - 2024.07.11~1a8a0bcf-r1
ucode-mod-nl80211 - 2024.07.11~1a8a0bcf-r1
ucode-mod-rtnl - 2024.07.11~1a8a0bcf-r1
ucode-mod-ubus - 2024.07.11~1a8a0bcf-r1
ucode-mod-uci - 2024.07.11~1a8a0bcf-r1
ucode-mod-uloop - 2024.07.11~1a8a0bcf-r1
urandom-seed - 3
urngd - 2023.11.01~44365eb1-r1
usign - 2020.05.23~f1f65026-r1
wifi-scripts - 1.0-r1
wireless-regdb - 2024.07.04-r1
wpad-basic-mbedtls - 2024.03.09~695277a5-r3
`

Please check again if you are using correct image: https://github.com/testuser7/openwrt/releases/download/qualcommax-d440c8c/openwrt-qualcommax-ipq807x-linksys_homewrk-initramfs-uImage.itb

I have extracted content and mdio is there.

This is definitely a package from a different version.

Tried NSS build(qualcommax-nss-06036bc) , works ! (i dont know how to check for NSS)
Thanks for including Luci

BTW Thanks to davidlucking for describing the routers - my box says HOMEWRK but the power on screen is the one for MX4300. So I avoid HOMEWRK builds

NSS Offloading for WAN/LAN/WiFi is enabled by default.

If you go to Kernel log, you will see entries like this:

SS Data Plane driver
...
[ 10.300830] qca-nss 39000000.nss: NSS FW Version: NSS.HK.11.4.0.5-6-R
[ 10.300873] qca-nss 39000000.nss: fw of size 835960 bytes copied to addr: 40000000, nss_id: 0
[ 10.308203]
[ 10.350501] qca-nss 39000000.nss: NSS core 0 booted successfully
[ 10.467368] qca-nss 39400000.nss: fw of size 292296 bytes copied to addr: 40800000, nss_id: 1
[ 10.468311]
[ 10.479634] qca-nss 39400000.nss: NSS core 1 booted successfully

it is working now.


      0x01   0x02   0x03   0x04
0x0 0x1040 0x1040 0x1040 0x1040
0x1 0x7949 0x796d 0x7949 0x7949
0x2 0x004d 0x004d 0x004d 0x004d
0x3 0xd0b1 0xd0b1 0xd0b1 0xd0b1
0x4 0x1de1 0x1de1 0x1de1 0x1de1
0x5 0x0000 0xcde1 0x0000 0x0000
0x6 0x0004 0x000f 0x0004 0x0004
0x7 0x2801 0x2801 0x2801 0x2801
0x8 0x0000 0x0000 0x0000 0x0000
0x9 0x0600 0x0600 0x0600 0x0600
0xa 0x0000 0x7800 0x0000 0x0000
0xb 0x0000 0x0000 0x0000 0x0000
0xc 0x0000 0x0000 0x0000 0x0000
0xd 0x4007 0x4007 0x4007 0x4007
0xe 0x03af 0x03af 0x03af 0x03af
0xf 0x2000 0x2000 0x2000 0xa000
0x10 0x6862 0x6862 0x6862 0x6862
0x11 0x0010 0xbc5c 0x0010 0x0010
0x12 0x0000 0x0000 0x0000 0x0000
0x13 0x0000 0x7400 0x0000 0x0000
0x14 0x082c 0x082c 0x082c 0x082c
0x15 0x0000 0x0000 0x0000 0x0000
0x16 0x2400 0x2400 0x2400 0x2400
0x17 0x0000 0x0000 0x0000 0x0000
0x18 0x0000 0x0000 0x0000 0x0000
0x19 0x0000 0x0000 0x0000 0x0000
0x1a 0x0000 0x0000 0x0000 0x0000
0x1b 0x0000 0x0000 0x0000 0x0600
0x1c 0x0000 0x0000 0x0000 0x0000
0x1d 0x0000 0x0000 0x0000 0x0000
0x1e 0x82a0 0x82a0 0x82a0 0x82a0
0x1f 0x0000 0x0000 0x0000 0x8500

Got the same problem. Found that DHCPOFFER packet contains wrong (partial) UDP checksum thus is dropped by the dhcp client. Fixed by turning off tx checksum offloading for the mesh interface on the primary router:

root@mx4300:~# ethtool --offload phy2-mesh0 tx-checksumming off
4 Likes

Thanks, cable was connected to the port with label lan3 (0x02) or lan1 (0x04)?

@robimarko It seams that registers for phy 0x02 and 0x04 are mixed.
Does this mean that the ports are configured incorrectly in dts:

&mdio {
	status = "okay";

	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;

	ethernet-phy-package@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "qcom,qca8075-package";
		reg = <0>;

		qca8075_1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
		};

		qca8075_2: ethernet-phy@2 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <2>;
		};

		qca8075_3: ethernet-phy@3 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <3>;
		};

		qca8075_4: ethernet-phy@4 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <4>;
		};
	};
};

&switch {
	status = "okay";

	switch_lan_bmp = <(ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
	switch_wan_bmp = <ESS_PORT2>; /* wan port bitmap */
	switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/

	qcom,port_phyinfo {
		port@2 {
			port_id = <2>;
			phy_address = <1>;
		};

		port@3 {
			port_id = <3>;
			phy_address = <2>;
		};

		port@4 {
			port_id = <4>;
			phy_address = <3>;
		};

		port@5 {
			port_id = <5>;
			phy_address = <4>;
		};
	};
};

&dp2 {
	status = "okay";
	phy-handle = <&qca8075_1>;
	label = "wan";
};

&dp3 {
	status = "okay";
	phy-handle = <&qca8075_2>;
	label = "lan3";
};

&dp4 {
	status = "okay";
	phy-handle = <&qca8075_3>;
	label = "lan2";
};

&dp5 {
	status = "okay";
	phy-handle = <&qca8075_4>;
	label = "lan1";
};

?

It was for sure connected to PHY at 0x4, as that one is the only one with a link-up.

What do you mean by registers are mixed?

Registers changed after cable connection for:

  • MX4300 (registers changed only for phy 0x04)
	0x01	0x02	0x03	0x04
0x1	0x7949	0x7949	0x7949	0x796d
0x5	0x0000	0x0000	0x0000	0xcde1
0x6	0x0004	0x0004	0x0004	0x000f
0xa	0x0000	0x0000	0x0000	0x7800
0xf	0x2000	0x2000	0x2000	0xa000
0x11	0x0010	0x0010	0x0010	0xbc1c
0x13	0x0000	0x0000	0x0000	0x4c00
0x1b	0x0000	0x0000	0x0000	0x063e
0x1f	0x0000	0x0000	0x0000	0x8500
  • HomeWRK (some registers are changed for phy 0x02 and other for phy 0x04)
	0x01	0x02	0x03	0x04
0x1	0x7949	0x796d	0x7949	0x7949
0x5	0x0000	0xcde1	0x0000	0x0000
0x6	0x0004	0x000f	0x0004	0x0004
0xa	0x0000	0x7800	0x0000	0x0000
0xf	0x2000	0x2000	0x2000	0xa000
0x11	0x0010	0xbc5c	0x0010	0x0010
0x13	0x0000	0x7400	0x0000	0x0000
0x1b	0x0000	0x0000	0x0000	0x0600
0x1f	0x0000	0x0000	0x0000	0x8500

Wait, can we restart here?

Is MX4300 broken as well?
If not, then I dont see a point in dumping anything from it.

Which port is connected on the HomeWRK (I guess one with PHY at 0x2 because it detected a link)?

MX4300 is OK.

@flyingdida Can you answer?

mdio report that all ports are down even if cable is connected to one of them: OpenWrt support for Linksys MX4200 - #1633 by lytr

And that is extremely weird, since register 0x1 is the generic 802.3 status register and its BIT(2) for link status in 1 and thus it sees a link in the dump you provided.

Even more so, the PHY specific status register (0x11) which always has the current info sees 1G, full-duplex link.

Do note that the MDIO tool only interprets generic 802.3 registers, while the kernel driver (And thus ethtool) will use the PHY specific register instead