Adding OpenWrt support for Zyxel EX5601-T0

The bootlog you are sharing here has little in common with vanilla OpenWrt. You are using a heavily patched downstream form, with lots of custom drivers, hence it will be difficult to provide support for that here without you at least sharing the full sourcecode. The question remains what you are going to achieve: Do you want to run OpenWrt? Or do you want to run a heavily patched fork, apparently at least partially based on MediaTek SDK (a OpenWrt downstream fork)? If you want to run a fork, please request support from where ever you got that fork from.

To me it looks like what you are trying is to add support for this device to OpenWrt simply by copying stuff from the vendor firmware sources to your OpenWrt tree. This will never work. It's good to have the sourcecode, esp. device tree. But you can't use it as-is and just copy it to OpenWrt. It also simply isn't needed. Example: the SDK driver for nmbm has a equivalent replacement which does not need a fake MTD device, but rather hooks into the NAND driver. We already support many boards for which the vendor firmware is using NMBM...

OpenWrt automatically UBI-attaches any MTD partition called ubi. If you don't want that, rename the partition to ubi1 (in dts), then you will be able to use the cmdline paramter to ubi.mtd=ubi1 vs. ubi.mtd=ubi2 to select which one to attach. I've never seen a paramter rootubi=..., it doesn't appear anywhere in kernel sources nor in documentation...

You are apparently missing all PHY drivers. Most (if not all?) 2.5G PHYs will need a driver. Drivers for Aquantia, MaxLinear and RealTek are enabled in config-5.15 in vanilla OpenWrt -- but you are apparently not using that as also the driver for the MediaTek switch PHY is missing:

In an other bootlog at least the MediaTek driver is present:

Which 2.5G PHY chip is used on that board?

Hi Daniel thank you for supporting me on this.

I'd like your help to only focus on the following:
I did git clone the master branch of openwrt and started working on the DTS and menuconfig for my ex5601-t0
Everything works but the lan and wan 2.5ethernet ports.
When I try to set the registers with mii_mgr (mdio-tools too) I cant make them work:

Owrt 5.15 kernel
root@OpenWrt:/# mii_mgr_cl45 -g -p 0x6 -d 0x0 -r 0x18
Get: port6 dev0h_reg18h = 0x0000
root@OpenWrt:/# mii_mgr_cl45 -g -p 0x5 -d 0x0 -r 0x18
Get: port5 dev0h_reg18h = 0x0000

I came to this conclusion because if I work on openwrt 21.02 there is a different driver from the new one which is the following issue I opened:

CONFIG_MT753X_GSW definition missing in kernel_menconfig · Issue #12491 · openwrt/openwrt (github.com)

With openwrt kernel 5.4 21.02 openwrt version i can correctly set the registers

Owrt 21.02 5.4 kernel
root@OpenWrt:/bin# mii_mgr_cl45 -g -p 0x5 -d 0x0 -r 0x18
Get: port5 dev0h_reg18h = 0x0003
root@OpenWrt:/bin# mii_mgr_cl45 -g -p 0x6 -d 0x0 -r 0x18
Get: port6 dev0h_reg18h = 0x020B

In the issue I opened someone answered that the driver I'm trying to use has been replaced, hence in 5.15 I can't set correctly the registers with the new driver.

the phys are maxlinear and the driver for the phys is working. IMHO the problem is the new driver for the DSA.

Please answer this question.
You will need the correct PHY driver. Sure, you can poke around in the raw PHY registers and probably somehow make things work, but you are wasting your time, as all that will already be done by the PHY driver which just has to be included in your kernel configuration.

If you don't know which PHY chip is used, please share the output of

# show all PHYs on bus
mdio mdio-bus

# identify C45 PHY on address 5
mdio mdio-bus mmd 5:1 raw 2
mdio mdio-bus mmd 5:1 raw 3

# identify C45 PHY on address 6
mdio mdio-bus mmd 6:1 raw 2
mdio mdio-bus mmd 6:1 raw 3
root@OpenWrt:/# mdio mdio-bus
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x01  0x00000000  down
0x02  0x00000000  down
0x03  0x00000000  down
0x04  0x00000000  down
0x05  0x67c9de08  down
0x06  0x67c9de08  down
0x07  0x00000000  down
0x08  0x00000000  down
0x09  0x00000000  down
0x0a  0x00000000  down
0x0b  0x00000000  down
0x0c  0x00000000  down
0x0d  0x00000000  down
0x0e  0x00000000  down
0x0f  0x00000000  down
0x10  0x00000000  down
0x11  0x00000000  down
0x12  0x00000000  down
0x13  0x00000000  down
0x14  0x00000000  down
0x15  0x00000000  down
0x16  0x00000000  down
0x17  0x00000000  down
0x18  0x00000000  down
0x19  0x00000000  down
0x1a  0x00000000  down
0x1b  0x00000000  down
0x1c  0x00000000  down
0x1d  0x00000000  down
0x1e  0x00000000  down
0x1f  0x00000002  down
root@OpenWrt:/# mdio mdio-bus mmd 5:1 raw 2
0x67c9
root@OpenWrt:/# mdio mdio-bus mmd 5:1 raw 3
0xde08
root@OpenWrt:/# mdio mdio-bus mmd 6:1 raw 2
0x67c9
root@OpenWrt:/# mdio mdio-bus mmd 6:1 raw 3
0xde08
root@OpenWrt:/#

So this is MaxLinear GPY211B.
You need to enable CONFIG_MAXLINEAR_GPHY=y which should already be enabled in OpenWrt's target/linux/mediatek/filogic/config-5.15.

You also need to define the PHYs in device tree in the mdio-bus node of the Ethernet:

        phy0: ethernet-phy@5 {
                reg = <5>;
                compatible = "ethernet-phy-ieee802.3-c45";
                phy-mode = "2500base-x";
        };
        phy1: ethernet-phy@6 {
                reg = <6>;
                compatible = "ethernet-phy-ieee802.3-c45";
                phy-mode = "2500base-x";
        };
piameruo@compiler:~/openwrt/target/linux/mediatek/filogic$ cat config-5.15 | grep MAXLINEAR
CONFIG_MAXLINEAR_GPHY=y
piameruo@compiler:~/openwrt/target/linux/mediatek/filogic$

This is the ethernet portion extracted from the zyxel firmware which I'm using actually in this build 5.15

&eth {
	status = "okay";

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";

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

	gmac1: mac@1 {
		compatible = "mediatek,eth-mac";
		reg = <1>;
		phy-mode = "2500base-x";

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

	mdio: mdio-bus {
		#address-cells = <1>;
		#size-cells = <0>;

		phy5: phy@5 {
			compatible = "ethernet-phy-id67c9.de0a";
			reg = <5>;
			reset-gpios = <&pio 6 1>;
			reset-assert-us = <50000>;
			reset-deassert-us = <20000>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <1008 0 0 0>; /* enable led0 for all link/act, and disable led1~3 */
			ifname = "lan5";
		};

		phy6: phy@6 {
			compatible = "ethernet-phy-id67c9.de0a";
			reg = <6>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <240 0 0 0>; /* enable led0 and no pulsing with TX, RX, and disable led1~3 */
			ifname = "eth1";
		};

		switch@0 {
			compatible = "mediatek,mt7531";
			reg = <31>;
			reset-gpios = <&pio 5 0>;

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

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

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

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

				port@5 {
					reg = <5>;
					label = "lan5";
					phy-mode = "2500base-x";

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

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

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

This is wrong. You need to put there

compatible = "ethernet-phy-ieee802.3-c45";

This has no effect in OpenWrt and is not needed.

You need to remove the fixed-link and instead add phy = <&phy6>;

Also here you need to remove the fixed-link and instead add phy = <&phy5>.

Ok I'll try that and rebuild an initram fs with that modifications

thank you

@daniel ok here it is:

&eth {
	status = "okay";

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";

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

	gmac1: mac@1 {
		compatible = "mediatek,eth-mac";
		reg = <1>;
		phy-mode = "2500base-x";
		phy = <&phy6>;
	};

	mdio: mdio-bus {
		#address-cells = <1>;
		#size-cells = <0>;

		phy5: phy@5 {
			compatible = "ethernet-phy-ieee802.3-c45";
			reg = <5>;
			reset-gpios = <&pio 6 1>;
			reset-assert-us = <50000>;
			reset-deassert-us = <20000>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <1008 0 0 0>; /* enable led0 for all link/act, and disable led1~3 */
		};

		phy6: phy@6 {
			compatible = "ethernet-phy-ieee802.3-c45";
			reg = <6>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <240 0 0 0>; /* enable led0 and no pulsing with TX, RX, and disable led1~3 */
			ifname = "eth1";
		};

		switch@0 {
			compatible = "mediatek,mt7531";
			reg = <31>;
			reset-gpios = <&pio 5 0>;

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

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

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

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

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

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

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

root@OpenWrt:/# mii_mgr_cl45 -g -p 0x5 -d 0x0 -r 0x18
Get: port5 dev0h_reg18h = 0x0000
root@OpenWrt:/# mii_mgr_cl45 -g -p 0x6 -d 0x0 -r 0x18
Get: port6 dev0h_reg18h = 0x0000

When I plug the cable into port lan5 traffic is not flowing and this is what I read from serial console.

[  233.447796] mt7530 mdio-bus:1f lan5: Link is Up - 100Mbps/Full - flow control rx/tx
[  233.455469] br-lan: port 5(lan5) entered blocking state
[  233.460690] br-lan: port 5(lan5) entered forwarding state

This is a legacy tool which will not work. Use mdio tool instead.

Please share the complete bootlog, so we can see if the MaxLinear PHY driver was loaded now.

## Loading kernel from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.15.107
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x460000ec
     Data Size:    9120207 Bytes = 8.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x48000000
     Entry Point:  0x48000000
     Hash algo:    crc32
     Hash value:   f5268596
     Hash algo:    sha1
     Hash value:   d70fd804a2bb4c291b0571d4461c718283b3091f
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt zyxel_5601-t0_rfb device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468b2c00
     Data Size:    32768 Bytes = 32 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   1b011712
     Hash algo:    sha1
     Hash value:   742d233fddd15e885522bc50429b3d51924a47ef
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x468b2c00
   Uncompressing Kernel Image
   Loading Device Tree to 000000007f7ee000, end 000000007f7f8fff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.107 (piameruo@compiler) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22419-42a5917786) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Tue Apr 18 23:02:26 2023
[    0.000000] Machine model: Zyxel EX5601-T0
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fbfffff]
[    0.000000]   node   0: [mem 0x000000004fc00000-0x000000004ffbffff]
[    0.000000]   node   0: [mem 0x000000004ffc0000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 17 pages/cpu s29656 r8192 d31784 u69632
[    0.000000] pcpu-alloc: s29656 r8192 d31784 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 981896K/1048576K available (8512K kernel code, 896K rwdata, 2252K rodata, 30080K init, 297K bss, 66680K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 640 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000139] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000146] pid_max: default: 32768 minimum: 301
[    0.000229] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000238] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001132] rcu: Hierarchical SRCU implementation.
[    0.001222] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.001425] smp: Bringing up secondary CPUs ...
[    0.001662] Detected VIPT I-cache on CPU1
[    0.001687] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.001713] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001980] Detected VIPT I-cache on CPU2
[    0.001992] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.002003] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.002225] Detected VIPT I-cache on CPU3
[    0.002235] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.002244] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.002269] smp: Brought up 1 node, 4 CPUs
[    0.002282] SMP: Total of 4 processors activated.
[    0.002286] CPU features: detected: 32-bit EL0 Support
[    0.002289] CPU features: detected: CRC32 instructions
[    0.002360] CPU: All CPU(s) started at EL2
[    0.002370] alternatives: patching kernel code
[    0.004571] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.004592] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.004705] pinctrl core: initialized pinctrl subsystem
[    0.005157] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.005358] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.005378] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.005394] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.005622] thermal_sys: Registered thermal governor 'fair_share'
[    0.005625] thermal_sys: Registered thermal governor 'bang_bang'
[    0.005628] thermal_sys: Registered thermal governor 'step_wise'
[    0.005631] thermal_sys: Registered thermal governor 'user_space'
[    0.005803] ASID allocator initialised with 65536 entries
[    0.006058] pstore: Registered ramoops as persistent store backend
[    0.006062] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.014214] cryptd: max_cpu_qlen set to 1000
[    0.015964] SCSI subsystem initialized
[    0.016041] libata version 3.00 loaded.
[    0.016392] Advanced Linux Sound Architecture Driver Initialized.
[    0.016814] clocksource: Switched to clocksource arch_sys_counter
[    0.017170] NET: Registered PF_INET protocol family
[    0.017258] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.017663] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.017676] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.017683] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.017720] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.017801] TCP: Hash tables configured (established 8192 bind 8192)
[    0.017867] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.017885] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.017974] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.017993] PCI: CLS 0 bytes, default 64
[    0.038957] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.041175] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.041192] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.064908] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    0.064937] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    0.064945] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    0.064997] phy phy-soc:t-phy@11c00000.0: u3 auto load valid efuse: ENABLE with value: 1
[    0.065029] phy phy-soc:t-phy@11c00000.0: pcie auto load valid efuse: ENABLE with value: 1
[    0.065053] phy phy-soc:t-phy@11c00000.0: u3 lane1 efuse - intr 28, rx_imp f, tx_imp e
[    0.065115] /soc/pcie@11280000: Failed to get clk index: 0 ret: -517
[    0.065125] mtk-pcie-gen3 11280000.pcie: failed to get clocks
[    0.067483] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.068048] printk: console [ttyS0] disabled
[    0.088231] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 121, base_baud = 2500000) is a ST16650V2
[    0.782564] printk: console [ttyS0] enabled
[    0.807363] 11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 122, base_baud = 1625000) is a ST16650V2
[    0.837096] 11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 123, base_baud = 1625000) is a ST16650V2
[    0.846909] mtk_rng 1020f000.trng: registered RNG driver
[    0.846966] hwrng: no data available
[    0.852448] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.863715] loop: module loaded
[    0.868055] spi-nand spi0.1: Micron SPI NAND was found.
[    0.873275] spi-nand spi0.1: 512 MiB, block size: 256 KiB, page size: 4096, OOB size: 256
[    0.885916] 5 fixed-partitions partitions found on MTD device spi0.1
[    0.892277] Creating 5 MTD partitions on "spi0.1":
[    0.897057] 0x000000000000-0x000000100000 : "BL2"
[    0.903329] 0x000000100000-0x000000180000 : "u-boot-env"
[    0.909448] 0x000000180000-0x000000380000 : "Factory"
[    0.917049] 0x000000380000-0x000000580000 : "FIP"
[    0.924268] 0x000000580000-0x000004580000 : "ubi"
[    1.241367] mtk_soc_eth 15100000.ethernet: generated random MAC address c2:36:fd:ce:bd:16
[    1.250127] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc00b380000, irq 133
[    1.259302] mtk_soc_eth 15100000.ethernet: generated random MAC address aa:29:65:32:85:d7
[    1.268061] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc00b380000, irq 133
[    1.277569] i2c_dev: i2c /dev entries driver
[    1.282770] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.291401] NET: Registered PF_INET6 protocol family
[    1.296985] Segment Routing with IPv6
[    1.300655] In-situ OAM (IOAM) with IPv6
[    1.304598] NET: Registered PF_PACKET protocol family
[    1.318332] NET: Registered PF_RXRPC protocol family
[    1.323296] Key type rxrpc registered
[    1.327007] Key type rxrpc_s registered
[    1.330846] 8021q: 802.1Q VLAN Support v1.8
[    1.335779] pstore: Using crash dump compression: deflate
[    1.346041] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.353414] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.359675] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    1.368146] phy phy-soc:t-phy@11c00000.0: u3 auto load valid efuse: ENABLE with value: 1
[    1.376240] phy phy-soc:t-phy@11c00000.0: pcie auto load valid efuse: ENABLE with value: 1
[    1.384504] phy phy-soc:t-phy@11c00000.0: u3 lane1 efuse - intr 28, rx_imp f, tx_imp e
[    1.606817] mtk-pcie-gen3 11280000.pcie: PCIe link down, ltssm reg val: 0x1000001
[    1.614304] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    1.658394] mt7530 mdio-bus:1f: no interrupt support
[    1.685382] mt7530 mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.694506] mt7530 mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.703709] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.723522] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.743043] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.834194] mt7530 mdio-bus:1f lan5 (uninitialized): PHY [mdio-bus:05] driver [Generic Clause 45 PHY] (irq=POLL)
[    1.844735] DSA: tree 0 setup
[    1.851605] UBI: auto-attach mtd4
[    1.854915] ubi0: default fastmap pool size: 10
[    1.859439] ubi0: default fastmap WL pool size: 5
[    1.864124] ubi0: attaching mtd4
[    3.695893] ubi0: scanning is finished
[    3.742667] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 36, need 40
[    3.752926] ubi0: attached mtd4 (name "ubi", size 64 MiB)
[    3.758328] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[    3.765182] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[    3.771954] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[    3.778897] ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
[    3.784883] ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
[    3.792084] ubi0: max/mean erase counter: 50/13, WL threshold: 4096, image sequence number: 1658393161
[    3.801367] ubi0: available PEBs: 0, total reserved PEBs: 256, PEBs reserved for bad PEB handling: 36
[    3.810571] ubi0: background thread "ubi_bgt0d" started, PID 459
[    3.824232] block ubiblock0_1: created from ubi0:1(rootfs)
[    3.829717] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    3.837090] ALSA device list:
[    3.840042]   No soundcards found.
[    3.853512] Freeing unused kernel memory: 30080K
[    3.936850] Run /init as init process
[    3.940499]   with arguments:
[    3.943450]     /init
[    3.945707]   with environment:
[    3.948840]     HOME=/
[    3.951185]     TERM=linux
[    4.110394] init: Console is alive
[    4.113880] init: - watchdog -
[    4.121103] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.131328] usbcore: registered new interface driver usbfs
[    4.136851] usbcore: registered new interface driver hub
[    4.142175] usbcore: registered new device driver usb
[    4.150913] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.158068] fsl-ehci: Freescale EHCI Host controller driver
[    4.164211] ehci-platform: EHCI generic platform driver
[    4.170637] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.177221] ohci-platform: OHCI generic platform driver
[    4.185048] phy phy-soc:t-phy@11e10000.1: u2 auto load valid efuse: ENABLE with value: 1
[    4.193205] phy phy-soc:t-phy@11e10000.2: u3 auto load valid efuse: ENABLE with value: 1
[    4.201335] phy phy-soc:t-phy@11e10000.3: u2 auto load valid efuse: ENABLE with value: 1
[    4.209874] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.215093] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    4.225546] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000210010
[    4.234742] xhci-mtk 11200000.usb: irq 126, io mem 0x11200000
[    4.240561] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.245771] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    4.253152] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    4.260515] hub 1-0:1.0: USB hub found
[    4.264269] hub 1-0:1.0: 2 ports detected
[    4.268540] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.276850] hub 2-0:1.0: USB hub found
[    4.280607] hub 2-0:1.0: 1 port detected
[    4.287549] usbcore: registered new interface driver usb-storage
[    4.293740] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.308701] init: - preinit -
[    4.348965] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    4.357403] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    4.365782] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.450088] mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.457599] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   11.367063] random: crng init done
[   14.438786] mt7530 mdio-bus:1f lan1: Link is Down
[   14.445893] procd: - early -
[   14.448829] procd: - watchdog -
[   14.962180] procd: - watchdog -
[   14.965451] procd: - ubus -
[   15.019509] procd: - init -
Please press Enter to activate this console.
[   15.091367] urngd: v1.0.2 started.
[   15.106383] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.116057] NET: Registered PF_ATMPVC protocol family
[   15.121124] NET: Registered PF_ATMSVC protocol family
[   15.128212] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   15.138888] crypto-safexcel 10320000.crypto: EIP97:230(0,1,4,4)-HIA:270(0,5,5),PE:150/433(alg:7fcdfc00)/0/0/0
[   15.153465] usbcore: registered new interface driver cdc_acm
[   15.159136] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.167717] usbcore: registered new interface driver cdc_wdm
[   15.173615] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[   15.181102] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[   15.188911] hso: drivers/net/usb/hso.c: Option Wireless
[   15.194192] usbcore: registered new interface driver hso
[   15.204086] usbcore: registered new interface driver usblp
[   15.211573] usbcore: registered new interface driver usbserial_generic
[   15.218135] usbserial: USB Serial support registered for generic
[   15.224683] usbcore: registered new interface driver cdc_ether
[   15.231236] usbcore: registered new interface driver cdc_ncm
[   15.580136] mt7986-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20221012174648a
[   15.580136]
[   15.598343] mt7986-wmac 18000000.wmac: WM Firmware Version: ____000000, Build Time: 20221012174725
[   15.637614] mt7986-wmac 18000000.wmac: WA Firmware Version: DEV_000000, Build Time: 20221012174937



BusyBox v1.36.0 (2023-04-14 08:27:09 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22599-1416b9bbe9
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):/#
root@(none):/#

root@OpenWrt:/# mdio mdio-bus
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x01  0x00000000  down
0x02  0x00000000  down
0x03  0x00000000  down
0x04  0x00000000  down
0x05  0x67c9de08  up
0x06  0x67c9de08  down
0x07  0x00000000  down
0x08  0x00000000  down
0x09  0x00000000  down
0x0a  0x00000000  down
0x0b  0x00000000  down
0x0c  0x00000000  down
0x0d  0x00000000  down
0x0e  0x00000000  down
0x0f  0x00000000  down
0x10  0x00000000  down
0x11  0x00000000  down
0x12  0x00000000  down
0x13  0x00000000  down
0x14  0x00000000  down
0x15  0x00000000  down
0x16  0x00000000  down
0x17  0x00000000  down
0x18  0x00000000  down
0x19  0x00000000  down
0x1a  0x00000000  down
0x1b  0x00000000  down
0x1c  0x00000000  down
0x1d  0x00000000  down
0x1e  0x00000000  down
0x1f  0x00000002  down
root@OpenWrt:/# mdio mdio-bus mmd 5:1 raw 18
0x0000
root@OpenWrt:/# mdio mdio-bus mmd 5:1 raw 2
0x67c9
root@OpenWrt:/# mdio mdio-bus mmd 5:1 raw 3
0xde08
root@OpenWrt:/#

The MaxLinear PHY driver is not being loaded. Please check if the driver is present:

ls /sys/bus/mdio_bus/drivers

Ok, so the driver is there. Question remains why it doesn't get probed.
Can you try moving

reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
reset-assert-us = <50000>;
reset-deassert-us = <20000>;

from the PHY up to the mdio bus? Apparently this reset line is used for both PHYs.

this way?

&eth {
	status = "okay";

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";

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

	gmac1: mac@1 {
		compatible = "mediatek,eth-mac";
		reg = <1>;
		phy-mode = "2500base-x";
		phy = <&phy6>;
	};

	mdio: mdio-bus {
		#address-cells = <1>;
		#size-cells = <0>;
		reset-gpios = <&pio 6 1>;
		reset-assert-us = <50000>;
		reset-deassert-us = <20000>;

		phy5: phy@5 {
			compatible = "ethernet-phy-ieee802.3-c45";
			reg = <5>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <1008 0 0 0>; /* enable led0 for all link/act, and disable led1~3 */
		};

		phy6: phy@6 {
			compatible = "ethernet-phy-ieee802.3-c45";
			reg = <6>;
			phy-mode = "2500base-x";
			maxlinear,led-reg = <240 0 0 0>; /* enable led0 and no pulsing with TX, RX, and disable led1~3 */
			ifname = "eth1";
		};

		switch@0 {
			compatible = "mediatek,mt7531";
			reg = <31>;
			reset-gpios = <&pio 5 0>;

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

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

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

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

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

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

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

Yes, that looks good.

1 Like
Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.107 (piameruo@compiler) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22419-42a5917786) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Tue Apr 18 23:02:26 2023
[    0.000000] Machine model: Zyxel EX5601-T0
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fbfffff]
[    0.000000]   node   0: [mem 0x000000004fc00000-0x000000004ffbffff]
[    0.000000]   node   0: [mem 0x000000004ffc0000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 17 pages/cpu s29656 r8192 d31784 u69632
[    0.000000] pcpu-alloc: s29656 r8192 d31784 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 981896K/1048576K available (8512K kernel code, 896K rwdata, 2252K rodata, 30080K init, 297K bss, 66680K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 640 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000139] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000146] pid_max: default: 32768 minimum: 301
[    0.000232] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000242] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001134] rcu: Hierarchical SRCU implementation.
[    0.001217] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.001424] smp: Bringing up secondary CPUs ...
[    0.001665] Detected VIPT I-cache on CPU1
[    0.001689] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.001716] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001986] Detected VIPT I-cache on CPU2
[    0.001998] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.002009] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.002232] Detected VIPT I-cache on CPU3
[    0.002242] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.002251] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.002276] smp: Brought up 1 node, 4 CPUs
[    0.002290] SMP: Total of 4 processors activated.
[    0.002293] CPU features: detected: 32-bit EL0 Support
[    0.002296] CPU features: detected: CRC32 instructions
[    0.002368] CPU: All CPU(s) started at EL2
[    0.002379] alternatives: patching kernel code
[    0.004571] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.004593] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.004707] pinctrl core: initialized pinctrl subsystem
[    0.005153] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.005355] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.005376] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.005392] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.005618] thermal_sys: Registered thermal governor 'fair_share'
[    0.005621] thermal_sys: Registered thermal governor 'bang_bang'
[    0.005624] thermal_sys: Registered thermal governor 'step_wise'
[    0.005627] thermal_sys: Registered thermal governor 'user_space'
[    0.005799] ASID allocator initialised with 65536 entries
[    0.006048] pstore: Registered ramoops as persistent store backend
[    0.006052] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.014230] cryptd: max_cpu_qlen set to 1000
[    0.015983] SCSI subsystem initialized
[    0.016060] libata version 3.00 loaded.
[    0.016410] Advanced Linux Sound Architecture Driver Initialized.
[    0.016840] clocksource: Switched to clocksource arch_sys_counter
[    0.017198] NET: Registered PF_INET protocol family
[    0.017284] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.017690] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.017704] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.017711] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.017749] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.017828] TCP: Hash tables configured (established 8192 bind 8192)
[    0.017894] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.017912] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.018002] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.018022] PCI: CLS 0 bytes, default 64
[    0.038947] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.041189] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.041208] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.065292] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    0.065325] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    0.065336] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    0.065391] phy phy-soc:t-phy@11c00000.0: u3 auto load valid efuse: ENABLE with value: 1
[    0.065424] phy phy-soc:t-phy@11c00000.0: pcie auto load valid efuse: ENABLE with value: 1
[    0.065448] phy phy-soc:t-phy@11c00000.0: u3 lane1 efuse - intr 28, rx_imp f, tx_imp e
[    0.065513] /soc/pcie@11280000: Failed to get clk index: 0 ret: -517
[    0.065524] mtk-pcie-gen3 11280000.pcie: failed to get clocks
[    0.067929] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.068486] printk: console [ttyS0] disabled
[    0.088672] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 121, base_baud = 2500000) is a ST16650V2
[    0.783137] printk: console [ttyS0] enabled
[    0.807945] 11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 122, base_baud = 1625000) is a ST16650V2
[    0.837679] 11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 123, base_baud = 1625000) is a ST16650V2
[    0.847471] mtk_rng 1020f000.trng: registered RNG driver
[    0.847532] hwrng: no data available
[    0.852983] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.864267] loop: module loaded
[    0.868618] spi-nand spi0.1: Micron SPI NAND was found.
[    0.873837] spi-nand spi0.1: 512 MiB, block size: 256 KiB, page size: 4096, OOB size: 256
[    0.886557] 5 fixed-partitions partitions found on MTD device spi0.1
[    0.892933] Creating 5 MTD partitions on "spi0.1":
[    0.897714] 0x000000000000-0x000000100000 : "BL2"
[    0.903956] 0x000000100000-0x000000180000 : "u-boot-env"
[    0.910085] 0x000000180000-0x000000380000 : "Factory"
[    0.917657] 0x000000380000-0x000000580000 : "FIP"
[    0.924879] 0x000000580000-0x000004580000 : "ubi"
[    1.146336] mtk_soc_eth 15100000.ethernet: generated random MAC address 12:20:29:73:5f:3d
[    1.155113] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc00b380000, irq 133
[    1.164292] mtk_soc_eth 15100000.ethernet: generated random MAC address 0a:e7:f9:a8:f5:a4
[    1.173032] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc00b380000, irq 133
[    1.182544] i2c_dev: i2c /dev entries driver
[    1.187795] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.196369] NET: Registered PF_INET6 protocol family
[    1.201933] Segment Routing with IPv6
[    1.205601] In-situ OAM (IOAM) with IPv6
[    1.209548] NET: Registered PF_PACKET protocol family
[    1.223425] NET: Registered PF_RXRPC protocol family
[    1.228419] Key type rxrpc registered
[    1.232066] Key type rxrpc_s registered
[    1.235903] 8021q: 802.1Q VLAN Support v1.8
[    1.240907] pstore: Using crash dump compression: deflate
[    1.251147] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.258498] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.264750] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    1.273222] phy phy-soc:t-phy@11c00000.0: u3 auto load valid efuse: ENABLE with value: 1
[    1.281332] phy phy-soc:t-phy@11c00000.0: pcie auto load valid efuse: ENABLE with value: 1
[    1.289596] phy phy-soc:t-phy@11c00000.0: u3 lane1 efuse - intr 28, rx_imp f, tx_imp e
[    1.516848] mtk-pcie-gen3 11280000.pcie: PCIe link down, ltssm reg val: 0x1000001
[    1.524335] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    1.568448] mt7530 mdio-bus:1f: no interrupt support
[    1.595458] mt7530 mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.604582] mt7530 mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.613779] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.633606] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.653147] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=POLL)
[    1.664137] mt7530 mdio-bus:1f lan5 (uninitialized): validation of  with support 0000000,00000000,00006000 and advertisement 0000000,00000000,00000000 failed: -22
[    1.678666] mt7530 mdio-bus:1f lan5 (uninitialized): failed to connect to PHY: -EINVAL
[    1.686566] mt7530 mdio-bus:1f lan5 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5
[    1.696252] DSA: tree 0 setup
[    1.703143] UBI: auto-attach mtd4
[    1.706454] ubi0: default fastmap pool size: 10
[    1.710996] ubi0: default fastmap WL pool size: 5
[    1.715681] ubi0: attaching mtd4
[    3.548629] ubi0: scanning is finished
[    3.595402] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 36, need 40
[    3.605695] ubi0: attached mtd4 (name "ubi", size 64 MiB)
[    3.611093] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[    3.617951] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[    3.624717] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[    3.631660] ubi0: good PEBs: 256, bad PEBs: 0, corrupted PEBs: 0
[    3.637650] ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
[    3.644850] ubi0: max/mean erase counter: 50/13, WL threshold: 4096, image sequence number: 1658393161
[    3.654133] ubi0: available PEBs: 0, total reserved PEBs: 256, PEBs reserved for bad PEB handling: 36
[    3.663336] ubi0: background thread "ubi_bgt0d" started, PID 457
[    3.671082] block ubiblock0_1: created from ubi0:1(rootfs)
[    3.676559] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    3.683934] ALSA device list:
[    3.686892]   No soundcards found.
[    3.700374] Freeing unused kernel memory: 30080K
[    3.796876] Run /init as init process
[    3.800523]   with arguments:
[    3.803473]     /init
[    3.805731]   with environment:
[    3.808864]     HOME=/
[    3.811208]     TERM=linux
[    3.969917] init: Console is alive
[    3.973402] init: - watchdog -
[    3.980730] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.990988] usbcore: registered new interface driver usbfs
[    3.996493] usbcore: registered new interface driver hub
[    4.001868] usbcore: registered new device driver usb
[    4.010579] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.017696] fsl-ehci: Freescale EHCI Host controller driver
[    4.023874] ehci-platform: EHCI generic platform driver
[    4.030316] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.036883] ohci-platform: OHCI generic platform driver
[    4.044722] phy phy-soc:t-phy@11e10000.1: u2 auto load valid efuse: ENABLE with value: 1
[    4.052873] phy phy-soc:t-phy@11e10000.2: u3 auto load valid efuse: ENABLE with value: 1
[    4.061005] phy phy-soc:t-phy@11e10000.3: u2 auto load valid efuse: ENABLE with value: 1
[    4.069548] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.074766] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    4.085221] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000210010
[    4.094409] xhci-mtk 11200000.usb: irq 126, io mem 0x11200000
[    4.100229] xhci-mtk 11200000.usb: xHCI Host Controller
[    4.105440] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    4.112822] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    4.120183] hub 1-0:1.0: USB hub found
[    4.123936] hub 1-0:1.0: 2 ports detected
[    4.128227] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.136529] hub 2-0:1.0: USB hub found
[    4.140290] hub 2-0:1.0: 1 port detected
[    4.147242] usbcore: registered new interface driver usb-storage
[    4.153430] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.168358] init: - preinit -
[    4.208157] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    4.216599] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    4.224867] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.290103] mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.297615] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   11.367093] random: crng init done
[   14.297446] mt7530 mdio-bus:1f lan1: Link is Down
[   14.304610] procd: - early -
[   14.307547] procd: - watchdog -
[   14.820929] procd: - watchdog -
[   14.824200] procd: - ubus -
[   14.877251] procd: - init -
Please press Enter to activate this console.
[   14.948125] urngd: v1.0.2 started.
[   14.969256] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.978916] NET: Registered PF_ATMPVC protocol family
[   14.983967] NET: Registered PF_ATMSVC protocol family
[   14.990856] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   15.001610] crypto-safexcel 10320000.crypto: EIP97:230(0,1,4,4)-HIA:270(0,5,5),PE:150/433(alg:7fcdfc00)/0/0/0
[   15.016175] usbcore: registered new interface driver cdc_acm
[   15.021985] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.030651] usbcore: registered new interface driver cdc_wdm
[   15.036555] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[   15.044030] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[   15.051891] hso: drivers/net/usb/hso.c: Option Wireless
[   15.057184] usbcore: registered new interface driver hso
[   15.067023] usbcore: registered new interface driver usblp
[   15.074488] usbcore: registered new interface driver usbserial_generic
[   15.081049] usbserial: USB Serial support registered for generic
[   15.087599] usbcore: registered new interface driver cdc_ether
[   15.094107] usbcore: registered new interface driver cdc_ncm
[   15.450187] mt7986-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20221012174648a
[   15.450187]
[   15.468474] mt7986-wmac 18000000.wmac: WM Firmware Version: ____000000, Build Time: 20221012174725
[   15.507646] mt7986-wmac 18000000.wmac: WA Firmware Version: DEV_000000, Build Time: 20221012174937
[   19.436726] PPP generic driver version 2.4.2
[   19.441754] NET: Registered PF_PPPOX protocol family
[   19.447625] usbcore: registered new interface driver qmi_wwan
[   19.454103] usbcore: registered new interface driver rndis_host
[   19.462670] usbcore: registered new interface driver option
[   19.468320] usbserial: USB Serial support registered for GSM modem (1-port)
[   19.476990] kmodloader: done loading kernel modules from /etc/modules.d/*
[   21.631849] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[   21.643622] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   21.652094] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   21.653201] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   21.668191] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   21.674686] br-lan: port 1(lan1) entered blocking state
[   21.679975] br-lan: port 1(lan1) entered disabled state
[   21.686698] device lan1 entered promiscuous mode
[   21.691355] device eth0 entered promiscuous mode
[   21.705160] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   21.714687] br-lan: port 2(lan2) entered blocking state
[   21.719983] br-lan: port 2(lan2) entered disabled state
[   21.727041] device lan2 entered promiscuous mode
[   21.736307] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   21.745804] br-lan: port 3(lan3) entered blocking state
[   21.751094] br-lan: port 3(lan3) entered disabled state
[   21.758212] device lan3 entered promiscuous mode
[   24.811380] mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   24.818893] br-lan: port 1(lan1) entered blocking state
[   24.824103] br-lan: port 1(lan1) entered forwarding state
[   24.829954] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
root@OpenWrt:/# ethtool eth 1
netlink error: no device matches name (offset 24)
netlink error: No such device

root@OpenWrt:/# ethtool eth 0
netlink error: no device matches name (offset 24)
netlink error: No such device
root@OpenWrt:/# ethtool lan5
netlink error: no device matches name (offset 24)
netlink error: No such device

root@OpenWrt:/# mdio mdio-bus
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x01  0x00000000  down
0x02  0x00000000  down
0x03  0x00000000  down
0x04  0x00000000  down
0x05  0x67c9de08  down
0x06  0x67c9de08  down
0x07  0x00000000  down
0x08  0x00000000  down
0x09  0x00000000  down
0x0a  0x00000000  down
0x0b  0x00000000  down
0x0c  0x00000000  down
0x0d  0x00000000  down
0x0e  0x00000000  down
0x0f  0x00000000  down
0x10  0x00000000  down
0x11  0x00000000  down
0x12  0x00000000  down
0x13  0x00000000  down
0x14  0x00000000  down
0x15  0x00000000  down
0x16  0x00000000  down
0x17  0x00000000  down
0x18  0x00000000  down
0x19  0x00000000  down
0x1a  0x00000000  down
0x1b  0x00000000  down
0x1c  0x00000000  down
0x1d  0x00000000  down
0x1e  0x00000000  down
0x1f  0x00000002  down

Ok, so that made it a bit worse :confused:

Im sorry for going back to this but the only thing that seems different from 5.4 is the new DSA driver.

CONFIG_MT753X_GSW definition missing in kernel_menconfig · Issue #12491 · openwrt/openwrt (github.com)

But I fully trust you so I consider myself a total noob on that.

No, the old proprietary switch driver is sunset a long time ago, it was just forgotten to actually also remove it from the tree. For sure it is not needed.

1 Like