TP-Link EX820v (MT7986) Switch Setup

Hi All im looking to get this device setup and continue on from the MR here : (https://github.com/openwrt/openwrt/pull/13900)

I have almost everything working other than the 2.5Gbps LAN port, the device has 1x2.5Gbps WAN, 1x2.5Gbps + 3x1Gbps LAN.

The WAN and 2 1Gbps LAN ports all work as expected as does the 2.5 and 5ghz WiFi. Only the 2.5Gbps port does not seem to work. Neither side of the link detects a cable. (below is the switch and mac section of the DTS)

&gmac1 {
	phy-mode = "2500base-x";
	label = "eth2";
	phy = <&phy6>;
};

&phy6 {
	compatible = "ethernet-phy-ieee802.3-c45";
};

&phy5 {
	compatible = "ethernet-phy-ieee802.3-c45";
};

&mdio {
	reset-delay-us = <1500000>;
	reset-post-delay-us = <1000000>;
};

&switch {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@5 {
			reg = <5>;
			label = "lan6";
			phy-mode = "2500base-x";
			phy = <&phy5>;
		};

		port@6 {
			reg = <6>;
			ethernet = <&gmac0>;
			phy-mode = "2500base-x";

			fixed-link {
				speed = <2500>;
				full-duplex;
				pause;
			};
		};
	};
};

Im assuming the port thats causing the issue would show as lan6 ?

Im not too familiar with the mtk setups, so any advice would be appreciated

Ok iv done some more testing, @daniel / @bmork iv seen that you where able to assist in resolving something similar on the EX5601

I have tested a few mdio / reset configurations, I either get a failed probe of lan6 or it show as a "Generic Clause 45 PHY", so there is somthing wrong with the init process.

Below are the mdio DTS setups I have tried along with the resulting logs for the mdio-bus pobing

&mdio {
	reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
	reset-delay-us = <1500000>;
	reset-post-delay-us = <1000000>;
	
	phy5: phy@5 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <5>;
	};
	
	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};
	
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};


[    4.150439] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    4.159390] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    4.170119] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.192168] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.213984] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.235777] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.257560] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.268739] mt7530-mdio mdio-bus:1f lan6 (uninitialized): validation of  with support 00,00000000,00000000,00006000
[    4.284734] mt7530-mdio mdio-bus:1f lan6 (uninitialized): failed to connect to PHY: -EINVAL
[    4.293066] mt7530-mdio mdio-bus:1f lan6 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5
[    4.303473] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode

&mdio {
	phy5: phy@5 {
		reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
		reset-delay-us = <1500000>;
		reset-post-delay-us = <1000000>;
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <5>;
	};
	
	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};
	
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};

[    1.530241] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.539192] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.549921] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.572001] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.593800] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.615600] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.637405] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.648606] mt7530-mdio mdio-bus:1f lan6 (uninitialized): validation of  with support 00,00000000,00000000,00006000
[    1.664601] mt7530-mdio mdio-bus:1f lan6 (uninitialized): failed to connect to PHY: -EINVAL
[    1.672937] mt7530-mdio mdio-bus:1f lan6 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5
[    1.683360] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
&mdio {
	reset-delay-us = <1500000>;
	reset-post-delay-us = <1000000>;

	phy5: phy@5 {
		reg = <5>;
		reset-gpios = <&pio 6 1>;
		reset-deassert-us = <20000>;
		compatible = "ethernet-phy-ieee802.3-c45";
	};
	
	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};
	
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};

[    1.570327] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.579028] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.590012] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.612104] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.633915] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.655724] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.677521] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.768218] mt7530-mdio mdio-bus:1f lan6 (uninitialized): PHY [mdio-bus:05] driver [Generic Clause 45 PHY] (irq=POLL)
&mdio {
	reset-delay-us = <1500000>;
	reset-post-delay-us = <1000000>;

	phy5: phy@5 {
		reg = <5>;
		compatible = "ethernet-phy-ieee802.3-c45";
		reset-gpios = <&pio 6 1>;
		reset-assert-us = <50000>;
		reset-deassert-us = <20000>;
		phy-mode = "2500base-x";
	};
	
	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};
	
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};

[    1.640253] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.648949] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.659933] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.682035] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.703859] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.725663] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.747492] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.838184] mt7530-mdio mdio-bus:1f lan6 (uninitialized): PHY [mdio-bus:05] driver [Generic Clause 45 PHY] (irq=POLL)

Also note the switch port setup is always the same (shown below).

&switch {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@5 {
			reg = <5>;
			label = "lan6";

			phy-mode = "2500base-x";
			phy = <&phy5>;
		};

		port@6 {
			reg = <6>;
			ethernet = <&gmac0>;
			phy-mode = "2500base-x";

			fixed-link {
				speed = <2500>;
				full-duplex;
				pause;
			};
		};
	};
};

Any advice on debugging this would be appreciated

The best is to inspect the MDIO bus using the mdio tool from mdio-tools package. Build an image including that package, and try

mdio mdio-bus

You should see all (C22) PHY IDs present on the bus. For C45 IDs, you will need to query:

for x in $(seq 0 31); do
  echo "MDIO address $x:"
  mdio mdio-bus mmd $x:7 2
  mdio mdio-bus mmd $x:7 3
done

not sure I follow this. You say that this device has

1x2.5Gbps WAN, 1x2.5Gbps + 3x1Gbps LAN.

and that you

have almost everything working other than the 2.5Gbps WAN port

Yet the DTS example shows "lan1", "lan2", "lan3", "lan4", "lan6" and "eth2". That's one port too many....

And your logs shows "lan6" failing. This is not the wan port, is it? It also shows a "wan" port succeeding using one of the built-in 1g phys in the switch? This appears to be the 7th port here?

I am very confused....

I assume your device might be pretty similar to the Zyxel EX5700 I got, where there is one 2.5g phy connected to gmac1 ("wan") and one 2.5g phy connected to switch port 5. Is that correct? Please clean up your DTS accordingly to make this less confusing.

It's also interesting to know if both 2.5g ports are failing or if you actually have the gmac1 ("eth2") working? If not, then maybe you're just missing a phy driver? Do what @daniel said and we'll know.

To clarify, the WAN 2.5Gbps port works as expected. It's only the LAN side 2.5Gbps

I'll cleanup the switch DTS later today

"Zyxel EX5700 I got, where there is one 2.5g phy connected to gmac1 ("wan") and one 2.5g phy connected to switch port 5""

Yes that is exactly the setup here

Humm i get the flowing, so it seems that its either in a reset state or somethings lower down is broken

MDIO address 0:
0x0000
0x0000
MDIO address 1:
0x0000
0x0000
MDIO address 2:
0x0000
0x0000
MDIO address 3:
0x0000
0x0000
MDIO address 4:
0x0000
0x0000
MDIO address 5:
0x67c9
0xde10
MDIO address 6:
0x67c9
0xde10
MDIO address 7:
0x0000
0x0000
MDIO address 8:
0x0000
0x0000
MDIO address 9:
0x0000
0x0000
MDIO address 10:
0x0000
0x0000
MDIO address 11:
0x0000
0x0000
MDIO address 12:
0x0000
0x0000
MDIO address 13:
0x0000
0x0000
MDIO address 14:
0x0000
0x0000
MDIO address 15:
0x0000
0x0000
MDIO address 16:
0x0000
0x0000
MDIO address 17:
0x0000
0x0000
MDIO address 18:
0x0000
0x0000
MDIO address 19:
0x0000
0x0000
MDIO address 20:
0x0000
0x0000
MDIO address 21:
0x0000
0x0000
MDIO address 22:
0x0000
0x0000
MDIO address 23:
0x0000
0x0000
MDIO address 24:
0x0000
0x0000
MDIO address 25:
0x0000
0x0000
MDIO address 26:
0x0000
0x0000
MDIO address 27:
0x0000
0x0000
MDIO address 28:
0x0000
0x0000
MDIO address 29:
0x0000
0x0000
MDIO address 30:
0x0000
0x0000
MDIO address 31:
0x0000
0x0000

So you've got two GPY211Cs, just like my EX5700. Good

Yes that's what it should be, on phy5 and 6

@daniel / @bmork

forcing the vid/pid of the phy gets the port to work

&mdio {
	reset-delay-us = <1500000>;
	reset-post-delay-us = <1000000>;

	phy5: phy@5 {
		reg = <5>;
		compatible = "ethernet-phy-id67c9.de0a"";
		reset-gpios = <&pio 6 1>;
		reset-deassert-us = <20000>;
	};
	
	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};
	
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};

Init

[    1.548790] mt7530-mdio mdio-bus:1f: no interrupt support
[    1.620325] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.629276] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.640008] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.662083] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.683898] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.705711] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.727516] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.778455] mt7530-mdio mdio-bus:1f lan6 (uninitialized): PHY [mdio-bus:05] driver [Maxlinear Ethernet GPY211C] (irq=POLL)
[    1.789897] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode

[   21.890594] mt7530-mdio mdio-bus:1f lan6: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   21.890613] br-lan: port 5(lan6) entered blocking state
[   21.903889] br-lan: port 5(lan6) entered forwarding state

I know this isnt something that should be needed, but im unsure as to what is stopping the auto detection from working

I believe that's a symptom of the phy not being finished resetting by the time the bus is probed. Yes, I know, that's where you started. But the answer is still in the reset logic, I believe.

And I'm still curious as to how you don't have any problems with the gmac1 phy, regardless of reset settings. That doesn't make sense

And I'm still curious as to how you don't have any problems with the gmac1 phy, regardless of reset settings. That doesn't make sense

Yeah, in fact I can remove the reset entries entirely and that phy still registers fine. I'll try double the reset post delay and see if that helps (when it's defined in the mdio block)

@daniel / @bmork

the following worked, im not sure why the post-delay needs to be so high, but anything under 2000000 doesn't work

&mdio {
	reset-gpios = <&pio 6 1>;
	reset-delay-us = <1500000>;
	reset-post-delay-us = <3000000>;
	
	phy5: phy@5 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <5>;
	};

	phy6: phy@6 {
		compatible = "ethernet-phy-ieee802.3-c45";
		reg = <6>;
	};

	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 5 0>;
	};
};
[    4.119244] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    4.129974] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.152041] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.173885] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.195701] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.217503] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=POLL)
[    4.228418] mt7530-mdio mdio-bus:1f lan6 (uninitialized): PHY [mdio-bus:05] driver [Maxlinear Ethernet GPY211C] (irq=POLL)

So now all networking components are working, here is the DTS

// SPDX-License-Identifier: (GL-2.0 OR MIT)

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

#include "mt7986a-rfb.dtsi"

/ {
	compatible = "tplink,ex820v", "mediatek,mt7986a";
	model = "TP-Link EX820v";

	aliases {
		serial0 = &uart0;

		led-boot = &led_status_green;
		led-failsafe = &led_status_green;
		led-running = &led_status_green;
		led-upgrade = &led_status_green;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	memory@0x40000000 {
		reg = <0 0x40000000 0 0x20000000>;
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};

	leds {
		compatible = "gpio-leds";

	 	led-0 {
			label = "green:lan2";
			gpios = <&pio 7 GPIO_ACTIVE_LOW>;
		};

		led-1 {
			label = "green:lan1";
			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
		};

		led-2 {
			label = "green:lan0";
			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
		};

		led-3 {
			label = "green:wan";
			gpios = <&pio 13 GPIO_ACTIVE_LOW>;
		};

		led-4 {
			label = "orange:status";
			gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
		};

		led_status_green: led-5 {
			label = "green:status";
			gpios = <&pio 17 GPIO_ACTIVE_HIGH>;
			panic-indicator;
		};
	};
};

&crypto {
	status = "okay";
};


&gmac0 {
	label = "eth2";
};

&gmac1 {
	phy-mode = "2500base-x";
	label = "eth1";
	phy = <&phy6>;
};

&phy6 {
	compatible = "ethernet-phy-ieee802.3-c45";
};

&phy5 {
	compatible = "ethernet-phy-ieee802.3-c45";
};

&switch {
	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			label = "lan3";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan1";
		};
		
		port@3 {
			status = "disabled";
			reg = <3>;
		};

		port@4 {
			status = "disabled";
			reg = <4>;
		};

		port@5 {
			reg = <5>;
			label = "lan4";

			phy-mode = "2500base-x";
			phy = <&phy5>;
		};

		port@6 {
			reg = <6>;
			ethernet = <&gmac0>;
			phy-mode = "2500base-x";

			fixed-link {
				speed = <2500>;
				full-duplex;
				pause;
			};
		};
	};
};

&mdio {
	reset-delay-us = <1500000>;
	reset-post-delay-us = <3000000>;
};

&pio {
	spi_flash_pins: spi-flash-pins-33-to-38 {
		mux {
			function = "spi";
			groups = "spi0", "spi0_wp_hold";
		};
		conf-pu {
			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
			drive-strength = <8>;
			mediatek,pull-up-adv = <0>; /* bias-disable */
		};
		conf-pd {
			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
			drive-strength = <8>;
			mediatek,pull-down-adv = <0>; /* bias-disable */
		};
	};

	wf_2g_5g_pins: wf_2g_5g-pins {
		mux {
			function = "wifi";
			groups = "wf_2g", "wf_5g";
		};
		conf {
			pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
			       "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
			       "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
			       "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
			       "WF1_TOP_CLK", "WF1_TOP_DATA";
			drive-strength = <4>;
		};
	};
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi_flash_pins>;
	status = "okay";

	flash@0 {
		compatible = "spi-nand";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0>;

		spi-max-frequency = <20000000>;
		spi-tx-bus-width = <4>;
		spi-rx-bus-width = <4>;

		partitions: partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "boot";
				reg = <0x0 0x200000>;
				read-only;
			};

			partition@200000 {
				label = "u-boot-env";
				reg = <0x200000 0x100000>;
			};

			misc_ro: partition@300000 {
				label = "misc_ro";
				reg = <0x300000 0x600000>;
				// phandle = <0x20>;
			};

			partition@900000 {
				label = "misc_rw";
				reg = <0x900000 0x600000>;
			};

			partition@f00000 {
				label = "ubi0";
				reg = <0xf00000 0x2800000>;
			};

			partition@3700000 {
				label = "ubi1";
				reg = <0x3700000 0x2800000>;
			};

			partition@5f00000 {
				label = "misc_rw_bak";
				reg = <0x5f00000 0x600000>;
			};

			partition@6500000 {
				label = "bflag";
				reg = <0x6500000 0x600000>;
			};

			partition@6b00000 {
				label = "misc_isp";
				reg = <0x6b00000 0x600000>;
			};

			partition@w {
				label = "whole";
				reg = <0x00 0x7800000>;
			};
		};
	};
};

&trng {
	status = "okay";
};

&uart0 {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&wifi {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&wf_2g_5g_pins>;
	mediatek,mtd-eeprom = <&misc_ro 0>;
};

it has a small change to mt7986a-rfb.dtsi, but i think this is more in line with other devices anyway.

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index 26d560bd4b..3c1e2d1711 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -86,12 +86,13 @@
 };
 
 &mdio {
+       reset-gpios = <&pio 6 1>;
+       reset-delay-us = <1500000>;
+       reset-post-delay-us = <1000000>;
+
        phy5: phy@5 {
                compatible = "ethernet-phy-id67c9.de0a";
                reg = <5>;
-
-               reset-gpios = <&pio 6 1>;
-               reset-deassert-us = <20000>;
        };
 
        phy6: phy@6 {

This is a partial device tree for a Mediatek reference board. It's only included and used by the two variants of that board, mt7986a-rfb-spim-nand.dts and mt7986a-rfb-spim-nand.dts

You should not include or modify this file. Take a look at the target/linux/mediatek/dts/mt7986*.dts files and do what they do instead.

Fair enough, was basing this off of a partially reviewed MR from a while back, later this week I'll remake the dts using the mt7986a.dtsi as the others do.