Cudy P2 5G support

Hello everyone,

I recently purchased a Cudy P2 5G CPE and I saw there's no support for OpenWrt yet.

I noticed the M3000 has OpenWrt support and the two devices share very similar hardware specs.

P2: https://www.cudy.com/en-us/products/p2-1-0#specs
M3000: https://www.cudy.com/en-us/products/m3000-1-0#specs

They have the very same CPU and the same amount and type of ROM/RAM, so I suspect the board could very much be shared between the models.

The only difference would be the 5G modem included in the P2 which is a Quectel RG500U-EB, showing up as connected to a "pci0" interface from the router logs.

Would it be possible to flash the M3000 OpenWrt version onto the P2 someway?
Where should I start if I wanted to take this further?

tftpboot maybe, cortex a53 is NOT a cpu, it is series like "intel netburst"

I downloaded the sysupgrade file and I had a look at the metadata. It reads "mt7981", so this is in principle supportable.
You will have to do the work since you are the one with the hardware. You also need a transitional firmware from Cudy as the upgrade files are signed and/or encrypted.

NEVER ever flash a firmware upgrade file that is not intended for your router to a device if you're not 1000% sure what you're doing. If the partitions do not align and you're unlucky, you destroy some vital data that cannot be restored.

have you taken it apart to see if serial access is possible?

Hi all. I asked cudy about intermediate firmware for this router. They send me one, and they also send me reference dts. Here it is:

/dts-v1/;
#include "mt7981.dtsi"
/ {
	model = "MediaTek MT7981 RFB/R91";
	compatible = "mediatek,mt7981-spim-snand-rfb";
	chosen {
		bootargs = "console=ttyS0,115200n1 loglevel=8  \
				earlycon=uart8250,mmio32,0x11002000";
	};

	memory {
		// fpga ddr2: 128MB*2
		reg = <0 0x40000000 0 0x10000000>;
	};

	gsw: gsw@0 {
                compatible = "mediatek,mt753x";
                mediatek,ethsys = <&ethsys>;
                #address-cells = <1>;
                #size-cells = <0>;
	};

	gpio-leds {
		compatible = "gpio-leds";
		status {
			label = "oem:green:status";
			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
		};

		wifi {
			label = "oem:green:wifi";
			gpios = <&pio 13 GPIO_ACTIVE_HIGH>;
		};

		blue {
			label = "oem:green:blue";
			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
		};

		yellow {
			label = "oem:green:yellow";
			gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
		};

		red {
			label = "oem:green:red";
			gpios = <&pio 26 GPIO_ACTIVE_HIGH>;
		};

		siglow {
			label = "oem:green:siglow";
			gpios = <&pio 27 GPIO_ACTIVE_HIGH>;
		};

		sigmid {
			label = "oem:green:sigmid";
			gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
		};

		sighigh {
			label = "oem:green:sighigh";
			gpios = <&pio 30 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;

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

		wps {
			label = "wps";
			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	gpio_export {
		compatible = "gpio-export";
		#size-cells = <0>;

		voippwr {
			gpio-export,name = "voippwr";
			gpio-export,output = <0>;
			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
		};

		voip_volte {
			gpio-export,name = "voip_volte";
			gpio-export,output = <1>;
			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
		};

		5gpwr {
			gpio-export,name = "pwr";
			gpio-export,output = <0>;
			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
		};
		
		usb5g {
			gpio-export,name = "4g";
			gpio-export,output = <0>;
			gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
		};
		
		ant {
			gpio-export,name = "ant";
			gpio-export,output = <0>;
			gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
		};
	};

	nmbm_spim_nand {
		compatible = "generic,nmbm";

		#address-cells = <1>;
		#size-cells = <1>;

		lower-mtd-device = <&spi_nand>;
		forced-create;

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

			partition@0 {
				label = "BL2";
				reg = <0x00000 0x0100000>;
				read-only;
			};

			partition@100000 {
				label = "u-boot-env";
				reg = <0x0100000 0x0080000>;
			};

			partition@180000 {
				label = "Factory";
				reg = <0x180000 0x0200000>;
			};
			
			bdinfo: partition@380000 {
				label = "bdinfo";
				reg = <0x380000 0x0040000>;
			};

			partition@3C0000 {
				label = "FIP";
				reg = <0x3C0000 0x0200000>;
			};

			partition@5C0000 {
				label = "ubi";
				reg = <0x5C0000 0x4000000>;
			};
		};
	};

	sound_wm8960 {
		compatible = "mediatek,mt79xx-wm8960-machine";
		mediatek,platform = <&afe>;
		audio-routing = "Headphone", "HP_L",
				"Headphone", "HP_R",
				"LINPUT1", "AMIC",
				"RINPUT1", "AMIC";
		mediatek,audio-codec = <&wm8960>;
		status = "disabled";
	};

	sound_si3218x {
		compatible = "mediatek,mt79xx-si3218x-machine";
		mediatek,platform = <&afe>;
		mediatek,ext-codec = <&proslic_spi>;
		status = "disabled";
	};
};

&afe {
	pinctrl-names = "default";
	pinctrl-0 = <&pcm_pins>;
	status = "okay";
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c_pins>;
	status = "disabled";

	wm8960: wm8960@1a {
		compatible = "wlf,wm8960";
		reg = <0x1a>;
	};
};

&uart0 {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&eth {
        status = "okay";
        lower-mtd-name = "bdinfo";

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

			fixed-link {
				speed = <2500>;
				full-duplex;
				pause;
			};
        };
		
        mdio: mdio-bus {
			#address-cells = <1>;
			#size-cells = <0>;
		};
};

&gsw {
        mediatek,mdio = <&mdio>;
        mediatek,portmap = "wllll";
        mediatek,mdio_master_pinmux = <1>;
        reset-gpios = <&pio 39 0>;
        interrupt-parent = <&pio>;
        interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
        status = "okay";

        port6: port@6 {
                compatible = "mediatek,mt753x-port";
                reg = <6>;
                phy-mode = "sgmii";
                fixed-link {
                        speed = <2500>;
                        full-duplex;
                };
        };
};

&hnat {
	mtketh-wan = "eth0.2";
	mtketh-lan = "eth0.1";
	mtketh-ppd = "eth0";
	mtketh-max-gmac = <1>;
	status = "okay";
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_flash_pins>;
	status = "okay";
	spi_nand: spi_nand@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "spi-nand";
		reg = <0>;
		spi-max-frequency = <52000000>;
		spi-tx-bus-width = <4>;
		spi-rx-bus-width = <4>;
	};
};

&spi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&spic_pins>;
	status = "disabled";

	proslic_spi: proslic_spi@0 {
		compatible = "silabs,proslic_spi";
		reg = <0>;
		spi-max-frequency = <10000000>;
		spi-cpha = <1>;
		spi-cpol = <1>;
		channel_count = <1>;
		debug_level = <4>;       /* 1 = TRC, 2 = DBG, 4 = ERR */
		reset_gpio = <&pio 15 0>;
		ig,enable-spi = <1>;     /* 1: Enable, 0: Disable */
	};
};

&pio {

	i2c_pins: i2c-pins-g0 {
                mux {
                        function = "i2c";
                        groups = "i2c0_0";
                };
        };

        pcm_pins: pcm-pins-g0 {
                mux {
                        function = "pcm";
                        groups = "pcm";
                };
        };

        pwm0_pin: pwm0-pin-g0 {
                mux {
                        function = "pwm";
                        groups = "pwm0_0";
                };
        };

        pwm1_pin: pwm1-pin-g0 {
                mux {
                        function = "pwm";
                        groups = "pwm1_0";
                };
        };

        pwm2_pin: pwm2-pin {
                mux {
                        function = "pwm";
                        groups = "pwm2";
                };
        };

	spi0_flash_pins: spi0-pins {
		mux {
			function = "spi";
			groups = "spi0", "spi0_wp_hold";
		};

		conf-pu {
			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
		};

		conf-pd {
			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
		};
	};

	spic_pins: spi1-pins {
		mux {
			function = "spi";
			groups = "spi1_1";
		};
	};

	uart1_pins: uart1-pins-g1 {
                mux {
                        function = "uart";
                        groups = "uart1_1";
                };
        };

	uart2_pins: uart2-pins-g1 {
		mux {
                        function = "uart";
                        groups = "uart2_1";
                };
        };

	pcie_pins: pcie-pins {
		mux {
			function = "pcie";
			groups = "pcie_clk", "pcie_wake", "pcie_pereset";
		};

	};

};

&xhci {
	phys = <&u2port0 PHY_TYPE_USB2>;
	status = "okay";
};

&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_pins>;
	status = "okay";
};

I don’t have this device on hand, but i’ve baked a initramfs image, that is heavily based on M3000 if anyone wants to try.

WARNING!!! TRY AT YOUT OWN RISK ! ETHERNET PORTS PROBABLY WON”T WORK, LED”S TOO. UART SERIAL ACCESS ABSOLUTELY NESSESARY !!!

I have a couple lines from oem bootlog for those interested:

Wed May  6 16:33:14 2026 kern.info kernel: [    1.325487] spi-nand spi0.0: ESMT SPI NAND was found. Flash Model: F50L1G41LC, ID: 8C2C
Wed May  6 16:33:14 2026 kern.info kernel: [    1.333494] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64

Wed May  6 16:33:14 2026 kern.info kernel: [    1.521176] nmbm nmbm_spim_nand: Signature found at block 1023 [0x07fe0000]
Wed May  6 16:33:14 2026 kern.info kernel: [    1.529105] nmbm nmbm_spim_nand: First info table with writecount 0 found in block 960
Wed May  6 16:33:14 2026 kern.info kernel: [    1.539778] nmbm nmbm_spim_nand: Second info table with writecount 0 found in block 963
Wed May  6 16:33:14 2026 kern.info kernel: [    1.547793] nmbm nmbm_spim_nand: NMBM has been successfully attached
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.554412] 6 fixed-partitions partitions found on MTD device nmbm_spim_nand
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.561471] Creating 6 MTD partitions on "nmbm_spim_nand":
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.566955] 0x000000000000-0x000000100000 : "BL2"
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.572177] 0x000000100000-0x000000180000 : "u-boot-env"
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.577983] 0x000000180000-0x000000380000 : "Factory"
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.583541] 0x000000380000-0x0000003c0000 : "bdinfo"
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.588998] 0x0000003c0000-0x0000005c0000 : "FIP"
Wed May  6 16:33:14 2026 kern.notice kernel: [    1.594194] 0x0000005c0000-0x0000045c0000 : "ubi"
Wed May  6 16:33:14 2026 kern.info kernel: [    1.599978] [mtk_hw_init] reset_lock:0, force:0
Wed May  6 16:33:14 2026 kern.info kernel: [    1.604541] [mtk_hw_init] execute fe cold reset
Wed May  6 16:33:14 2026 kern.info kernel: [    1.620079] mtk_soc_eth 15100000.ethernet: MDC is running on 2500000 Hz
Wed May  6 16:33:14 2026 kern.info kernel: [    1.647512] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc012a80000, irq 80



Wed May  6 16:33:14 2026 kern.info kernel: [    1.620079] mtk_soc_eth 15100000.ethernet: MDC is running on 2500000 Hz
Wed May  6 16:33:14 2026 kern.info kernel: [    1.647512] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc012a80000, irq 80
Wed May  6 16:33:14 2026 kern.err kernel: [    1.656577] (unnamed net_device) (dummy): netif_napi_add() called with weight 256
Wed May  6 16:33:14 2026 kern.info kernel: [    2.212420] mt753x gsw@0: LAN/WAN VLAN setting=wllll
Wed May  6 16:33:14 2026 kern.info kernel: [    2.217652] mt753x gsw@0: Switch is MediaTek MT7531AE rev 1
Wed May  6 16:33:14 2026 kern.info kernel: [    2.227413] mt753x gsw@0: HWSTRAP=0xfb XTAL=25MHz
Wed May  6 16:33:14 2026 kern.info kernel: [    3.871702] mt753x gsw@0: >>>>>>>>>>>>>>>>>>>>>>>>>>>>> START CALIBRATION:
Wed May  6 16:33:14 2026 kern.info kernel: [    3.879681] mt753x gsw@0: -------- gephy-calbration (port:0) --------



Wed May  6 16:33:14 2026 kern.notice kernel: [    7.730863] UBI: auto-attach mtd6
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.734188] ubi0: attaching mtd6
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.953944] ubi0: scanning is finished
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.963144] ubi0: attached mtd6 (name "ubi", size 64 MiB)
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.968546] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.975410] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.982187] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.989136] ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
Wed May  6 16:33:14 2026 kern.notice kernel: [    7.995131] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
Wed May  6 16:33:14 2026 kern.notice kernel: [    8.002341] ubi0: max/mean erase counter: 7/3, WL threshold: 4096, image sequence number: 1792215068
Wed May  6 16:33:14 2026 kern.notice kernel: [    8.011459] ubi0: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 19
Wed May  6 16:33:14 2026 kern.notice kernel: [    8.020670] ubi0: background thread "ubi_bgt0d" started, PID 794
Wed May  6 16:33:14 2026 kern.info kernel: [    8.021319] block ubiblock0_1: created from ubi0:1(rootfs)
Wed May  6 16:33:14 2026 kern.notice kernel: [    8.032161] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem


Wed May  6 16:33:43 2026 kern.info kernel: [   49.685374] mt753x gsw@0: Port 1 Link is Up - 1Gbps/Full
Wed May  6 16:33:43 2026 kern.notice kernel: [   49.690786] gmac: port1 linkup

EDIT: I also pulled dts file from sysupgrade from Cudy:

/dts-v1/;

/ {
    #address-cells = <0x01>;
    #size-cells = <0x01>;
    compatible = "mediatek,mt7981\0mediatek,mt7981-rfb";
    interrupt-parent = <0x01>;
    model = "mt7981-rfb";

    apmixedsys@1001e000 {
        #clock-cells = <0x01>;
        compatible = "mediatek,mt7981-fixed-plls";
        phandle = <0x03>;
        reg = <0x1001e000 0x1000>;
        u-boot,dm-pre-reloc;
    };

    chosen {
        stdout-path = "/serial@11002000";
        tick-timer = "/timer@10008000";
    };

    config {
        gpio_power_clr = <0x06 0x08>;
        reset_led = "oem:green:internet";
        system_led = "oem:green:status";
    };

    cpus {
        #address-cells = <0x01>;
        #size-cells = <0x00>;

        cpu@0 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x00>;
        };

        cpu@1 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x01>;
        };
    };

    ethernet@15100000 {
        #address-cells = <0x01>;
        #size-cells = <0x00>;
        compatible = "mediatek,mt7981-eth\0syscon";
        mediatek,ethsys = <0x09>;
        mediatek,gmac-id = <0x00>;
        mediatek,sgmiisys = <0x0a>;
        mediatek,switch = "mt7531";
        phy-mode = "sgmii";
        reg = <0x15100000 0x20000>;
        reset-gpios = <0x0b 0x27 0x00>;
        reset-names = "fe";
        resets = <0x09 0x06>;
        status = "okay";

        fixed-link {
            full-duplex;
            speed = <0x3e8>;
        };
    };

    gpio-keys-polled {
        compatible = "gpio-keys";

        reset-button {
            gpios = <0x0b 0x01 0x01>;
            label = "reset";
        };
    };

    gpt_dummy20m {
        #clock-cells = <0x00>;
        clock-frequency = <0xc65d40>;
        compatible = "fixed-clock";
        phandle = <0x02>;
        u-boot,dm-pre-reloc;
    };

    infracfg@10001000 {
        #clock-cells = <0x01>;
        clock-parent = <0x05>;
        compatible = "mediatek,mt7981-infracfg";
        phandle = <0x04>;
        reg = <0x10001000 0x30>;
        u-boot,dm-pre-reloc;
    };

    infracfg_ao@10001000 {
        #clock-cells = <0x01>;
        clock-parent = <0x04>;
        compatible = "mediatek,mt7981-infracfg_ao";
        phandle = <0x06>;
        reg = <0x10001000 0x80>;
        u-boot,dm-pre-reloc;
    };

    interrupt-controller@c000000 {
        #interrupt-cells = <0x03>;
        compatible = "arm,gic-v3";
        interrupt-controller;
        interrupt-parent = <0x01>;
        interrupts = <0x01 0x09 0x04>;
        phandle = <0x01>;
        reg = <0xc000000 0x40000 0xc080000 0x200000>;
    };

    leds {
        compatible = "gpio-leds";

        led@0 {
            gpios = <0x0b 0x02 0x00>;
            label = "oem:green:status";
        };

        led@1 {
            gpios = <0x0b 0x0d 0x00>;
            label = "oem:green:wifi";
        };

        led@2 {
            gpios = <0x0b 0x0e 0x00>;
            label = "oem:green:blue";
        };

        led@3 {
            gpios = <0x0b 0x0f 0x00>;
            label = "oem:green:yellow";
        };

        led@4 {
            gpios = <0x0b 0x1a 0x00>;
            label = "oem:green:red";
        };

        led@5 {
            gpios = <0x0b 0x1b 0x00>;
            label = "oem:green:siglow";
        };

        led@6 {
            gpios = <0x0b 0x1c 0x00>;
            label = "oem:green:sigmid";
        };

        led@7 {
            gpios = <0x0b 0x1e 0x01>;
            label = "oem:green:sighigh";
        };
    };

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

    mmc@11230000 {
        assigned-clock-parents = <0x05 0x1c 0x05 0x02>;
        assigned-clocks = <0x05 0x55 0x05 0x54>;
        clock-names = "source\0hclk\0source_cg";
        clocks = <0x05 0x34 0x05 0x33 0x06 0x1f>;
        compatible = "mediatek,mt7981-mmc";
        interrupts = <0x00 0x8f 0x04>;
        reg = <0x11230000 0x1000 0x11c20000 0x1000>;
        status = "disabled";
    };

    pinctrl@11d00000 {
        compatible = "mediatek,mt7981-pinctrl";
        reg = <0x11d00000 0x1000 0x11c00000 0x1000 0x11c10000 0x1000 0x11d20000 0x1000 0x11e00000 0x1000 0x11e20000 0x1000 0x11f00000 0x1000 0x11f10000 0x1000 0x1000b000 0x1000>;
        reg-names = "gpio_base\0iocfg_rt_base\0iocfg_rm_base\0iocfg_rb_base\0iocfg_lb_base\0iocfg_bl_base\0iocfg_tm_base\0iocfg_tl_base\0eint";

        gpio-controller {
            #gpio-cells = <0x02>;
            gpio-controller;
            phandle = <0x0b>;
        };

        one-pwm-pins {

            mux {
                function = "pwm";
                groups = "pwm0_1";
            };
        };

        spi0-pins-func-1 {
            phandle = <0x0c>;

            conf-pd {
                bias-pull-down = <0x67>;
                drive-strength = <0x08>;
                pins = "SPI0_CLK\0SPI0_MOSI\0SPI0_MISO";
            };

            conf-pu {
                bias-pull-up = <0x67>;
                drive-strength = <0x08>;
                pins = "SPI0_CS\0SPI0_HOLD\0SPI0_WP";
            };

            mux {
                function = "flash";
                groups = "spi0\0spi0_wp_hold";
            };
        };

        spi1-pins-func-1 {

            mux {
                function = "spi";
                groups = "spi1_1";
            };
        };

        spi1-pins-func-3 {
            phandle = <0x08>;

            mux {
                function = "uart";
                groups = "uart1_2";
            };
        };

        three-pwm-pins {

            mux {
                function = "pwm";
                groups = "pwm0_1\0pwm1_0\0pwm2";
            };
        };

        two-pwm-pins {
            phandle = <0x07>;

            mux {
                function = "pwm";
                groups = "pwm0_1\0pwm1_0";
            };
        };
    };

    pwm@10048000 {
        #clock-cells = <0x01>;
        #pwm-cells = <0x02>;
        assigned-clock-parents = <0x05 0x00>;
        assigned-clocks = <0x05 0x51>;
        clock-names = "top\0main\0pwm1\0pwm2\0pwm3";
        clocks = <0x04 0x05 0x06 0x2d 0x06 0x03 0x06 0x04 0x06 0x04>;
        compatible = "mediatek,mt7981-pwm";
        interrupts = <0x00 0x89 0x04>;
        pinctrl-0 = <0x07>;
        pinctrl-names = "default";
        reg = <0x10048000 0x1000>;
        status = "okay";
    };

    serial@11002000 {
        assigned-clock-parents = <0x05 0x00 0x04 0x01>;
        assigned-clocks = <0x05 0x50 0x06 0x25>;
        clocks = <0x06 0x12>;
        compatible = "mediatek,hsuart";
        interrupts = <0x00 0x7b 0x04>;
        mediatek,force-highspeed;
        reg = <0x11002000 0x400>;
        status = "okay";
        u-boot,dm-pre-reloc;
    };

    serial@11003000 {
        assigned-clock-parents = <0x05 0x00 0x04 0x01>;
        assigned-clocks = <0x05 0x50 0x06 0x26>;
        clocks = <0x06 0x13>;
        compatible = "mediatek,hsuart";
        interrupts = <0x00 0x7c 0x04>;
        mediatek,force-highspeed;
        pinctrl-0 = <0x08>;
        pinctrl-names = "default";
        reg = <0x11003000 0x400>;
        status = "disabled";
    };

    serial@11004000 {
        assigned-clock-parents = <0x05 0x00 0x04 0x01>;
        assigned-clocks = <0x05 0x50 0x06 0x27>;
        clocks = <0x06 0x14>;
        compatible = "mediatek,hsuart";
        interrupts = <0x00 0x7c 0x04>;
        mediatek,force-highspeed;
        reg = <0x11004000 0x400>;
        status = "disabled";
    };

    snand@11005000 {
        assigned-clock-parents = <0x05 0x06 0x05 0x06>;
        assigned-clocks = <0x05 0x4d 0x05 0x4c>;
        clock-names = "pad_clk\0nfi_clk\0nfi_hclk";
        clocks = <0x06 0x18 0x06 0x17 0x06 0x19>;
        compatible = "mediatek,mt7986-snand";
        reg = <0x11005000 0x1000 0x11006000 0x1000>;
        reg-names = "nfi\0ecc";
        status = "disabled";
    };

    spi@11009000 {
        assigned-clock-parents = <0x05 0x02 0x05 0x02>;
        assigned-clocks = <0x05 0x4e 0x04 0x28>;
        clock-names = "sel-clk\0spi-clk";
        clocks = <0x06 0x1a 0x05 0x4e>;
        compatible = "mediatek,ipm-spi";
        interrupts = <0x00 0x8e 0x04>;
        reg = <0x11009000 0x100>;
        status = "disabled";
    };

    spi@1100a000 {
        #address-cells = <0x01>;
        #size-cells = <0x00>;
        assigned-clock-parents = <0x05 0x02 0x05 0x02>;
        assigned-clocks = <0x05 0x4e 0x04 0x28>;
        clock-names = "sel-clk\0spi-clk";
        clocks = <0x06 0x1a 0x05 0x4e>;
        compatible = "mediatek,ipm-spi";
        dma_ext;
        enhance_timing;
        interrupts = <0x00 0x8c 0x04>;
        ipm_design;
        must_tx;
        pinctrl-0 = <0x0c>;
        pinctrl-names = "default";
        reg = <0x1100a000 0x100>;
        sample_sel = <0x00>;
        status = "okay";
        support_quad;
        tick_dly = <0x02>;

        spi_nand@0 {
            compatible = "spi-nand";
            reg = <0x00>;
            spi-max-frequency = <0x3197500>;
        };
    };

    spi@1100b000 {
        compatible = "mediatek,ipm-spi";
        interrupts = <0x00 0x8d 0x04>;
        reg = <0x1100b000 0x100>;
        status = "disabled";
    };

    syscon@10060000 {
        #clock-cells = <0x01>;
        compatible = "mediatek,mt7986-sgmiisys\0syscon";
        phandle = <0x0a>;
        pn_swap;
        reg = <0x10060000 0x1000>;
    };

    syscon@10070000 {
        #clock-cells = <0x01>;
        compatible = "mediatek,mt7986-sgmiisys\0syscon";
        reg = <0x10070000 0x1000>;
    };

    syscon@15000000 {
        #clock-cells = <0x01>;
        #reset-cells = <0x01>;
        clock-parent = <0x05>;
        compatible = "mediatek,mt7981-ethsys\0syscon";
        phandle = <0x09>;
        reg = <0x15000000 0x1000>;
    };

    timer {
        arm,cpu-registers-not-fw-configured;
        clock-frequency = <0xc65d40>;
        compatible = "arm,armv8-timer";
        interrupt-parent = <0x01>;
        interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>;
    };

    timer@10008000 {
        clock-names = "gpt-clk";
        clocks = <0x02>;
        compatible = "mediatek,mt7986-timer";
        interrupts = <0x00 0x82 0x04>;
        reg = <0x10008000 0x1000>;
        u-boot,dm-pre-reloc;
    };

    topckgen@1001b000 {
        #clock-cells = <0x01>;
        clock-parent = <0x03>;
        compatible = "mediatek,mt7981-topckgen";
        phandle = <0x05>;
        reg = <0x1001b000 0x1000>;
        u-boot,dm-pre-reloc;
    };

    watchdog@1001c000 {
        #reset-cells = <0x01>;
        compatible = "mediatek,mt7986-wdt";
        interrupts = <0x00 0x6e 0x04>;
        reg = <0x1001c000 0x1000>;
        status = "disabled";
    };
};

I have UART access:

UART log to starting kernel:

F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [1000]
T0: 0000 0252 [010F]
Jump to BL

NOTICE:  BL2: v2.7(release):f0ff4aea06-dirty
NOTICE:  BL2: Built : 11:23:05, Sep 18 2025
NOTICE:  WDT: disabled
NOTICE:  EMI: Using DDR3 settings

dump toprgu registers data:
1001c000 | 00000000 0000ffe0 00000000 00000000
1001c010 | 00000fff 00000000 00f00000 00000000
1001c020 | 00000000 00000000 00000000 00000000
1001c030 | 003c0003 003c0003 00000000 00000000
1001c040 | 00000000 00000000 00000000 00000000
1001c050 | 00000000 00000000 00000000 00000000
1001c060 | 00000000 00000000 00000000 00000000
1001c070 | 00000000 00000000 00000000 00000000
1001c080 | 00000000 00000000 00000000 00000000

dump drm registers data:
1001d000 | 00000000 00000000 00000000 00000000
1001d010 | 00000000 00000000 00000000 00000000
1001d020 | 00000000 00000000 00000000 00000000
1001d030 | 00a083f1 000003ff 00100000 00000000
1001d040 | 00000000 00000000 00020303 000000ff
1001d050 | 00000000 00000000 00000000 00000000
1001d060 | 00000002 00000000 00000000 00000000
drm: 500 = 0x8
[DDR Reserve] ddr reserve mode not be enabled yet
DDR RESERVE Success 0
[EMI] ComboMCP not ready, using default setting
BYTE_swap:0
BYTE_swap:0
Window Sum 576, worse bit 0, min window 72
Window Sum 588, worse bit 8, min window 72
Window Sum 384, worse bit 0, min window 48
Window Sum 372, worse bit 8, min window 46
Window Sum 394, worse bit 2, min window 48
Window Sum 378, worse bit 9, min window 46
Window Sum 406, worse bit 1, min window 50
Window Sum 396, worse bit 9, min window 48
Window Sum 412, worse bit 2, min window 50
Window Sum 404, worse bit 9, min window 48
Window Sum 426, worse bit 3, min window 50
Window Sum 418, worse bit 9, min window 50
Window Sum 438, worse bit 0, min window 54
Window Sum 422, worse bit 9, min window 52
Window Sum 444, worse bit 3, min window 54
Window Sum 434, worse bit 9, min window 52
Window Sum 452, worse bit 1, min window 56
Window Sum 442, worse bit 9, min window 54
Window Sum 458, worse bit 2, min window 56
Window Sum 450, worse bit 14, min window 54
Window Sum 462, worse bit 3, min window 56
Window Sum 458, worse bit 9, min window 56
Window Sum 474, worse bit 3, min window 58
Window Sum 466, worse bit 8, min window 58
Window Sum 478, worse bit 4, min window 58
Window Sum 486, worse bit 2, min window 60
Window Sum 478, worse bit 8, min window 58
Window Sum 484, worse bit 8, min window 60
NOTICE:  EMI: Detected DRAM size: 256MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  CPU: MT7981 (1300MHz)
NOTICE:  SPI_NAND parses attributes from parameter page.
NOTICE:  SPI_NAND Detected ID 0x8c
NOTICE:  Page size 2048, Block size 131072, size 134217728
NOTICE:  Initializing NMBM ...
NOTICE:  Signature found at block 1023 [0x07fe0000]
NOTICE:  First info table with writecount 0 found in block 960
NOTICE:  Second info table with writecount 0 found in block 963
NOTICE:  NMBM has been successfully attached in read-only mode
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.7(release):f0ff4aea06-dirty
NOTICE:  BL31: Built : 11:23:05, Sep 18 2025
NOTICE:  Hello BL31!!!


U-Boot 2022.07-rc3 (Sep 18 2025 - 11:23:05 +0000), Build: jenkins-mtk_mt7981_router_v2.4-46

CPU:   MediaTek MT7981
Model: mt7981-rfb
DRAM:  256 MiB
Core:  48 devices, 20 uclasses, devicetree: embed

Initializing NMBM ...
spi-nand: spi_nand spi_nand@0: ESMT SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Could not find a valid device for nmbm0
Signature found at block 1023 [0x07fe0000]
First info table with writecount 0 found in block 960
Second info table with writecount 0 found in block 963
NMBM has been successfully attached

Loading Environment from MTD... *** Warning - bad CRC, using default environment

In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Net:
Warning: ethernet@15100000 (eth0) using random MAC address - da:48:69:2d:82:47
eth0: ethernet@15100000
gpio: pin 6 (gpio 6) value is 0
gpio: pin 8 (gpio 8) value is 0
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: attached mtd7 (name "ubi", size 64 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 7/3, WL threshold: 4096, image sequence number: 1792215068
ubi0: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 19
Reading from volume 'kernel' to 0x46000000, size 0x0 ... OK
## Loading kernel from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.4.246
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x460000c0
     Data Size:    3254572 Bytes = 3.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x48080000
     Entry Point:  0x48080000
     Hash algo:    crc32
     Hash value:   7db14024
     Hash algo:    sha1
     Hash value:   0ab4ab82785f183fe653c836e14abddc141c8f63
   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 R91 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4631ab20
     Data Size:    19273 Bytes = 18.8 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   971a1b41
     Hash algo:    sha1
     Hash value:   f4b79b3f810395192052a2c102b1a42891ec8cf6
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x4631ab20
   Uncompressing Kernel Image
   Loading Device Tree to 000000004f7f1000, end 000000004f7f8b48 ... OK

Starting kernel ...

I’m starting a new topic, cause the old one is pretty much dead. I gained UART access to this router, here is a picture of it’s location. It’s next to external antenna connectors and it is clearly marked

I can boot initramfs images from WR3000E, WR3000H and WR3000S. Closest one is WR3000E, because both ports are working. Here is log from console from booting up WR3000E initramfs:

F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [1000]
T0: 0000 0252 [010F]
Jump to BL

NOTICE:  BL2: v2.7(release):f0ff4aea06-dirty
NOTICE:  BL2: Built : 11:23:05, Sep 18 2025
NOTICE:  WDT: disabled
NOTICE:  EMI: Using DDR3 settings

dump toprgu registers data:
1001c000 | 00000000 0000ffe0 00000000 00000000
1001c010 | 00000fff 00000000 00f00000 00000000
1001c020 | 00000000 00000000 00000000 00000000
1001c030 | 003c0003 003c0003 00000000 00000000
1001c040 | 00000000 00000000 00000000 00000000
1001c050 | 00000000 00000000 00000000 00000000
1001c060 | 00000000 00000000 00000000 00000000
1001c070 | 00000000 00000000 00000000 00000000
1001c080 | 00000000 00000000 00000000 00000000

dump drm registers data:
1001d000 | 00000000 00000000 00000000 00000000
1001d010 | 00000000 00000000 00000000 00000000
1001d020 | 00000000 00000000 00000000 00000000
1001d030 | 00a083f1 000003ff 00100000 00000000
1001d040 | 00000000 00000000 00020303 000000ff
1001d050 | 00000000 00000000 00000000 00000000
1001d060 | 00000002 00000000 00000000 00000000
drm: 500 = 0x8
[DDR Reserve] ddr reserve mode not be enabled yet
DDR RESERVE Success 0
[EMI] ComboMCP not ready, using default setting
BYTE_swap:0
BYTE_swap:0
Window Sum 580, worse bit 0, min window 72
Window Sum 584, worse bit 8, min window 72
Window Sum 394, worse bit 2, min window 48
Window Sum 378, worse bit 9, min window 46
Window Sum 402, worse bit 3, min window 48
Window Sum 388, worse bit 9, min window 46
Window Sum 410, worse bit 2, min window 50
Window Sum 400, worse bit 9, min window 48
Window Sum 420, worse bit 3, min window 50
Window Sum 408, worse bit 9, min window 48
Window Sum 430, worse bit 4, min window 52
Window Sum 422, worse bit 8, min window 52
Window Sum 438, worse bit 2, min window 54
Window Sum 428, worse bit 9, min window 52
Window Sum 448, worse bit 3, min window 54
Window Sum 438, worse bit 8, min window 54
Window Sum 452, worse bit 1, min window 56
Window Sum 446, worse bit 9, min window 54
Window Sum 456, worse bit 2, min window 56
Window Sum 456, worse bit 14, min window 54
Window Sum 470, worse bit 2, min window 58
Window Sum 464, worse bit 9, min window 56
Window Sum 478, worse bit 4, min window 58
Window Sum 470, worse bit 8, min window 58
Window Sum 482, worse bit 5, min window 58
Window Sum 478, worse bit 14, min window 58
Window Sum 486, worse bit 2, min window 60
Window Sum 480, worse bit 8, min window 58
Window Sum 482, worse bit 8, min window 58
NOTICE:  EMI: Detected DRAM size: 256MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  CPU: MT7981 (1300MHz)
NOTICE:  SPI_NAND parses attributes from parameter page.
NOTICE:  SPI_NAND Detected ID 0x8c
NOTICE:  Page size 2048, Block size 131072, size 134217728
NOTICE:  Initializing NMBM ...
NOTICE:  Signature found at block 1023 [0x07fe0000]
NOTICE:  First info table with writecount 0 found in block 960
NOTICE:  Second info table with writecount 0 found in block 963
NOTICE:  NMBM has been successfully attached in read-only mode
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.7(release):f0ff4aea06-dirty
NOTICE:  BL31: Built : 11:23:05, Sep 18 2025
NOTICE:  Hello BL31!!!


U-Boot 2022.07-rc3 (Sep 18 2025 - 11:23:05 +0000), Build: jenkins-mtk_mt7981_router_v2.4-46

CPU:   MediaTek MT7981
Model: mt7981-rfb
DRAM:  256 MiB
Core:  48 devices, 20 uclasses, devicetree: embed

Initializing NMBM ...
spi-nand: spi_nand spi_nand@0: ESMT SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Could not find a valid device for nmbm0
Signature found at block 1023 [0x07fe0000]
First info table with writecount 0 found in block 960
Second info table with writecount 0 found in block 963
NMBM has been successfully attached

Loading Environment from MTD... *** Warning - bad CRC, using default environment

In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Net:
Warning: ethernet@15100000 (eth0) using random MAC address - c6:82:02:7f:00:69
eth0: ethernet@15100000
gpio: pin 6 (gpio 6) value is 0
gpio: pin 8 (gpio 8) value is 0
RESET button is pressed for:  2 second(s)
LED 'oem:green:internet' not found (err=-19)

*** Upgrading oem fit Firmware ***

Using ethernet@15100000 device
TFTP from server 192.168.1.88; our IP address is 192.168.1.112
Filename 'recovery.bin'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
MT7981> tftpboot luci-25.12-snapshot-r32909-7014bb7ee2-mediatek-filogic-cudy_wr3000e-v1-initramfs-kernel.bin
Using ethernet@15100000 device
TFTP from server 192.168.1.88; our IP address is 192.168.1.112
Filename 'luci-25.12-snapshot-r32909-7014bb7ee2-mediatek-filogic-cudy_wr3000e-v1-initramfs-kernel.bin'.
Load address: 0x46000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####################
         12.8 MiB/s
done
Bytes transferred = 10786748 (a497bc hex)
MT7981> bootm
## Loading kernel from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.12.85
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x460000e8
     Data Size:    4301332 Bytes = 4.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x48000000
     Entry Point:  0x48000000
     Hash algo:    crc32
     Hash value:   beaaea05
     Hash algo:    sha1
     Hash value:   ab526856d131b1ffb02a78ecc881a5fc774325a6
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading ramdisk from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'initrd-1' ramdisk subimage
     Description:  ARM64 OpenWrt cudy_wr3000e-v1 initrd
     Type:         RAMDisk Image
     Compression:  Unknown Compression
     Data Start:   0x4641a438
     Data Size:    6460552 Bytes = 6.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    crc32
     Hash value:   5975d922
     Hash algo:    sha1
     Hash value:   be7d41e32ffe1f70a38f973cf3dd922ddd3a9ef4
   Verifying Hash Integrity ... crc32+ sha1+ OK
WARNING: 'compression' nodes for ramdisks are deprecated, please fix your .its file!
## Loading fdt from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt cudy_wr3000e-v1 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x46a439cc
     Data Size:    22970 Bytes = 22.4 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   0e527d27
     Hash algo:    sha1
     Hash value:   3bbd0b7882f97542f20ece17cc52e85b72f4b5df
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x46a439cc
   Uncompressing Kernel Image
   Loading Ramdisk to 4f1d1000, end 4f7fa488 ... OK
   Loading Device Tree to 000000004f1c8000, end 000000004f1d09b9 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.12.85 (cezary@eko.one.pl) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 14.3.0 r32355-02f9e71dd2) 14.3.0, GNU ld (GNU Binutils) 2.44) #0 SMP Sat May  2 22:14:43 2026
[    0.000000] Machine model: Cudy WR3000E v1
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[    0.000000] OF: reserved mem: 0x0000000047c80000..0x0000000047d7ffff (1024 KiB) nomap non-reusable wmcpu-reserved@47c80000
[    0.000000] OF: reserved mem: 0x0000000047d80000..0x0000000047dbffff (256 KiB) nomap non-reusable wo-emi@47d80000
[    0.000000] OF: reserved mem: 0x0000000047dc0000..0x0000000047ffffff (2304 KiB) nomap non-reusable wo-data@47dc0000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000004fffffff]
[    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-0x0000000047c7ffff]
[    0.000000]   node   0: [mem 0x0000000047c80000-0x0000000047ffffff]
[    0.000000]   node   0: [mem 0x0000000048000000-0x000000004fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000004fffffff]
[    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 20 pages/cpu s42584 r8192 d31144 u81920
[    0.000000] pcpu-alloc: s42584 r8192 d31144 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    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] alternatives: applying boot alternatives
[    0.000000] Kernel command line:
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65536
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB
[    0.000000] software IO TLB: area num 2.
[    0.000000] software IO TLB: SWIOTLB bounce buffer size roundup to 0MB
[    0.000000] software IO TLB: mapped [mem 0x000000004fe49000-0x000000004fec9000] (0MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=2.
[    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] Root IRQ handler: 0xffffffc080010080
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: GICD_CTRL.DS=0, SCR_EL3.FIQ=0
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    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.000078] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000086] pid_max: default: 32768 minimum: 301
[    0.003033] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.003040] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.005138] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.005936] rcu: Hierarchical SRCU implementation.
[    0.005943] rcu:     Max phase no-delay instances is 1000.
[    0.006133] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.006360] smp: Bringing up secondary CPUs ...
[    0.006715] Detected VIPT I-cache on CPU1
[    0.006762] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.006791] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.006873] smp: Brought up 1 node, 2 CPUs
[    0.006879] SMP: Total of 2 processors activated.
[    0.006881] CPU: All CPU(s) started at EL2
[    0.006884] CPU features: detected: 32-bit EL0 Support
[    0.006887] CPU features: detected: CRC32 instructions
[    0.006912] alternatives: applying system-wide alternatives
[    0.007041] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.007166] Memory: 231092K/262144K available (9536K kernel code, 992K rwdata, 1832K rodata, 512K init, 316K bss, 29408K reserved, 0K cma-reserved)
[    0.010197] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.010215] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.010271] 29424 pages in range for non-PLT usage
[    0.010274] 520944 pages in range for PLT usage
[    0.011775] pinctrl core: initialized pinctrl subsystem
[    0.014140] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.014440] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.014466] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.014488] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.014885] thermal_sys: Registered thermal governor 'fair_share'
[    0.014889] thermal_sys: Registered thermal governor 'bang_bang'
[    0.014892] thermal_sys: Registered thermal governor 'step_wise'
[    0.014894] thermal_sys: Registered thermal governor 'user_space'
[    0.014942] ASID allocator initialised with 65536 entries
[    0.015826] pstore: Using crash dump compression: deflate
[    0.015830] pstore: Registered ramoops as persistent store backend
[    0.015833] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.017347] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    0.033743] cryptd: max_cpu_qlen set to 1000
[    0.035117] SCSI subsystem initialized
[    0.035266] libata version 3.00 loaded.
[    0.037019] clocksource: Switched to clocksource arch_sys_counter
[    0.039220] NET: Registered PF_INET protocol family
[    0.039328] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.040615] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.040632] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.040642] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.040661] TCP bind hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.040709] TCP: Hash tables configured (established 2048 bind 2048)
[    0.040900] MPTCP token hash table entries: 256 (order: 1, 6144 bytes, linear)
[    0.041001] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.041017] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.041199] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.041223] PCI: CLS 0 bytes, default 64
[    0.041398] Unpacking initramfs...
[    0.057523] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[    0.062699] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.062708] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.118856] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.129854] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.132882] printk: legacy console [ttyS0] disabled
[    0.153202] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 72, base_baud = 2500000) is a ST16650V2
[    0.153245] printk: legacy console [ttyS0] enabled
[    0.928400] random: crng init done
[    0.934443] loop: module loaded
[    0.948878] spi-nand spi0.0: calibration result: 0x3
[    0.953999] spi-nand spi0.0: ESMT SPI NAND was found.
[    0.959123] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.967858] Signature found at block 1023 [0x07fe0000]
[    0.973000] NMBM management region starts at block 960 [0x07800000]
[    0.980315] First info table with writecount 0 found in block 960
[    0.989354] Second info table with writecount 0 found in block 963
[    0.995545] NMBM has been successfully attached
[    1.923951] Freeing initrd memory: 6308K
[    1.935438] 6 fixed-partitions partitions found on MTD device spi0.0
[    1.942070] Creating 6 MTD partitions on "spi0.0":
[    1.946861] 0x000000000000-0x000000100000 : "BL2"
[    1.952773] 0x000000100000-0x000000180000 : "u-boot-env"
[    1.959060] 0x000000180000-0x000000380000 : "Factory"
[    1.966227] 0x000000380000-0x0000003c0000 : "bdinfo"
[    1.972400] 0x0000003c0000-0x0000005c0000 : "FIP"
[    1.979033] 0x0000005c0000-0x0000045c0000 : "ubi"
[    2.033502] ubi0: default fastmap pool size: 25
[    2.038066] ubi0: default fastmap WL pool size: 12
[    2.042848] ubi0: attaching mtd5
[    2.334127] ubi0: scanning is finished
[    2.343131] ubi0 warning: 0xffffffc080616068: cannot reserve enough PEBs for bad PEB handling, reserved 17, need 19
[    2.354067] ubi0: attached mtd5 (name "ubi", size 64 MiB)
[    2.359489] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.366352] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.373133] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.380087] ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
[    2.386080] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    2.393294] ubi0: max/mean erase counter: 7/3, WL threshold: 4096, image sequence number: 1792215068
[    2.402416] ubi0: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 17
[    2.411635] ubi0: background thread "ubi_bgt0d" started, PID 267
[    2.418248] block ubiblock0_1: created from ubi0:1(rootfs)
[    2.423733] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    2.570555] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc081600000, irq 75
[    2.580409] i2c_dev: i2c /dev entries driver
[    2.586290] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    2.595104] NET: Registered PF_INET6 protocol family
[    2.600909] Segment Routing with IPv6
[    2.604591] In-situ OAM (IOAM) with IPv6
[    2.608586] NET: Registered PF_PACKET protocol family
[    2.613664] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.626910] 8021q: 802.1Q VLAN Support v1.8
[    2.741809] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    2.751246] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    2.761354] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=79)
[    2.782453] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=80)
[    2.803388] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=81)
[    2.824326] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=82)
[    2.845230] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=83)
[    2.856410] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    2.863159] DSA: tree 0 setup
[    2.866409] clk: Disabling unused clocks
[    2.870631] PM: genpd: Disabling unused power domains
[    2.876077] Freeing unused kernel memory: 512K
[    2.880576] Run /init as init process
[    2.884227]   with arguments:
[    2.887188]     /init
[    2.889451]   with environment:
[    2.892579]     HOME=/
[    2.894927]     TERM=linux
[    3.162454] init: Console is alive
[    3.165970] init: - watchdog -
[    3.174965] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.182351] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    3.197531] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.215648] init: - preinit -
[    3.339732] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    3.348218] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    3.378716] mt7530-mdio 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.917805] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.533278] mt7530-mdio mdio-bus:1f lan1: Link is Down
[    7.542254] procd: - early -
[    7.545197] procd: - watchdog -
[    8.077504] procd: - watchdog -
[    8.080797] procd: - ubus -
[    8.135201] procd: - init -
Please press Enter to activate this console.
[    8.325855] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.343337] tun: Universal TUN/TAP device driver, 1.6
[    8.353184] crypto-safexcel 10320000.crypto: EIP97:230(0,1,4,4)-HIA:270(0,5,5),PE:150/433(alg:7fcdfc00)/0/0/0
[    8.391089] Loading modules backported from Linux version v6.18.7-0-g5dfbc5357
[    8.398380] Backport generated by backports.git c8a37ce
[    8.535912] urngd: v1.0.2 started.
[    8.727321] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20240823161240a
[    8.747749] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20240823161304
[    8.790130] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20240823161841
[    8.887349] mt798x-wmac 18000000.wifi: registering led 'mt76-phy0'
[    8.978370] mt798x-wmac 18000000.wifi: registering led 'mt76-phy1'
[    9.051743] mtdblock: MTD device 'bdinfo' is NAND, please consider using UBI block devices instead.
[    9.125335] PPP generic driver version 2.4.2
[    9.130728] NET: Registered PF_PPPOX protocol family
[    9.138394] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    9.146229] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    9.158957] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.200052] mtdblock: MTD device 'bdinfo' is NAND, please consider using UBI block devices instead.
[   15.177818] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[   15.201712] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   15.211496] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   15.218530] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   15.234783] br-lan: port 1(lan1) entered blocking state
[   15.240095] br-lan: port 1(lan1) entered disabled state
[   15.245343] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   15.251671] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   15.266720] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   15.303607] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   15.327418] br-lan: port 2(lan2) entered blocking state
[   15.332653] br-lan: port 2(lan2) entered disabled state
[   15.337968] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[   15.348112] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[   15.366584] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   15.374991] br-lan: port 3(lan3) entered blocking state
[   15.380259] br-lan: port 3(lan3) entered disabled state
[   15.385513] mt7530-mdio mdio-bus:1f lan3: entered allmulticast mode
[   15.394806] mt7530-mdio mdio-bus:1f lan3: entered promiscuous mode
[   15.413931] mt7530-mdio mdio-bus:1f lan4: configuring for phy/gmii link mode
[   15.425991] br-lan: port 4(lan4) entered blocking state
[   15.431263] br-lan: port 4(lan4) entered disabled state
[   15.436508] mt7530-mdio mdio-bus:1f lan4: entered allmulticast mode
[   15.450963] mt7530-mdio mdio-bus:1f lan4: entered promiscuous mode
[   15.471146] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   18.354380] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   18.354406] br-lan: port 1(lan1) entered blocking state
[   18.367528] br-lan: port 1(lan1) entered forwarding state
[   90.921492] br-lan: port 1(lan1) entered disabled state
[   90.921597] mt7530-mdio mdio-bus:1f lan1: Link is Down
[   98.593498] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx

To gain access to console, you need to hold reset button during power up, and wait 2-5 seconds, then router will enter tftp recovery and if it doesn’t get the image it expects, then times out, and console is available. The reference dts is in the old thread. Main problem that i have, is that no matter what kind of initramfs image i make, it stops at initializing switch, and then i have link is down message, and i have no working ethernet ports. Maybe someone else will have better luck…

I’m posting my dts file and makefile. Maybe someone will have a idea how to wire those ethernet ports up…

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

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include "mt7981b.dtsi"

/ {
	aliases {
		label-mac-device = &gmac0;
		led-boot = &led_status;
		led-failsafe = &led_status;
		led-running = &led_status;
		led-upgrade = &led_status;
		serial0 = &uart0;
	};

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

	gpio-keys {
		compatible = "gpio-keys";

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

		wps {
			label = "wps";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_export {
		compatible = "gpio-export";
		#size-cells = <0>;

		voippwr {
			gpio-export,name = "voippwr";
			gpio-export,output = <0>;
			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
		};

		voip_volte {
			gpio-export,name = "voip_volte";
			gpio-export,output = <1>;
			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
		};

		5gpwr {
			gpio-export,name = "pwr";
			gpio-export,output = <0>;
			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
		};
		
		usb5g {
			gpio-export,name = "4g";
			gpio-export,output = <0>;
			gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
		};
		
		ant {
			gpio-export,name = "ant";
			gpio-export,output = <0>;
			gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led_status: status {
			function = LED_FUNCTION_STATUS;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
		};

		wifi {
			function = LED_FUNCTION_WLAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&pio 13 GPIO_ACTIVE_HIGH>;
		};

		blue {
			function = LED_FUNCTION_;
			color = <LED_COLOR_ID_BLUE>;
			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
		};

		yellow {
			label = "oem:green:yellow";
			gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
		};

		red {
			label = "oem:green:red";
			gpios = <&pio 26 GPIO_ACTIVE_HIGH>;
		};

		signal-low {
			function = LED_FUNCTION_SIGNAL_LOW;
			color = <LED_COLOR_ID_RED>;
			gpios = <&pio 27 GPIO_ACTIVE_HIGH>;
		};

		signal-mid {
			function = LED_FUNCTION_SIGNAL_MID;
			color = <LED_COLOR_ID_YELLOW>;
			gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
		};

		signal-high {
			function = LED_FUNCTION_SIGNAL_HIGH;
			color = <LED_COLOR_ID_WHITE>;
			gpios = <&pio 30 GPIO_ACTIVE_LOW>;
		};

	};
};

&uart0 {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&eth {
	pinctrl-names = "default";
	pinctrl-0 = <&mdio_pins>;
	status = "okay";

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

		nvmem-cell-names = "mac-address";
		nvmem-cells = <&macaddr_bdinfo_de00 0>;

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

&mdio_bus {
	switch: switch@1f {
		compatible = "mediatek,mt7531";
		reg = <31>;
		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
		interrupt-controller;
		#interrupt-cells = <1>;
		interrupt-parent = <&pio>;
		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
	};
};

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

		port@0 {
			reg = <0>;
			label = "wan";

			nvmem-cell-names = "mac-address";
			nvmem-cells = <&macaddr_bdinfo_de00 0>;
		};

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

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

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

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

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

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

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

	spi_nand: flash@0 {
		compatible = "spi-nand";
		reg = <0>;
		spi-max-frequency = <52000000>;

		spi-cal-enable;
		spi-cal-mode = "read-data";
		spi-cal-datalen = <7>;
		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
		spi-cal-addrlen = <5>;
		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;

		spi-tx-bus-width = <4>;
		spi-rx-bus-width = <4>;
		mediatek,nmbm;
		mediatek,bmt-max-ratio = <1>;
		mediatek,bmt-max-reserved-blocks = <64>;

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

			partition@0 {
				label = "BL2";
				reg = <0x00000 0x0100000>;
				read-only;
			};

			partition@100000 {
				label = "u-boot-env";
				reg = <0x0100000 0x0080000>;
				read-only;
			};

			partition@180000 {
				label = "Factory";
				reg = <0x180000 0x0200000>;
				read-only;

				nvmem-layout {
					compatible = "fixed-layout";
					#address-cells = <1>;
					#size-cells = <1>;

					eeprom_factory_0: eeprom@0 {
						reg = <0x0 0x1000>;
					};
				};
			};

			partition@380000 {
				label = "bdinfo";
				reg = <0x380000 0x0040000>;
				read-only;

				nvmem-layout {
					compatible = "fixed-layout";
					#address-cells = <1>;
					#size-cells = <1>;

					macaddr_bdinfo_de00: macaddr@de00 {
						compatible = "mac-base";
						reg = <0xde00 0x6>;
						#nvmem-cell-cells = <1>;
					};
				};
			};

			partition@3c0000 {
				label = "FIP";
				reg = <0x3c0000 0x0200000>;
				read-only;
			};

			ubi: partition@5c0000 {
				label = "ubi";
				reg = <0x5c0000 0x4000000>;
				compatible = "linux,ubi";
			};
		};
	};
};

&pio {
	spi0_flash_pins: spi0-pins {
		mux {
			function = "spi";
			groups = "spi0", "spi0_wp_hold";
		};
		conf-pu {
			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
		};

		conf-pd {
			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
		};
		
		pcie_pins: pcie-pins {
		mux {
			function = "pcie";
			groups = "pcie_clk", "pcie_wake", "pcie_pereset";
		};
	};
};

&xhci {
	status = "okay";
};

&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_pins>;
	status = "okay";
};


&wifi {
	status = "okay";
	nvmem-cells = <&eeprom_factory_0>;
	nvmem-cell-names = "eeprom";
};

Makefile:

define Device/cudy_p2-v1
  DEVICE_VENDOR := Cudy
  DEVICE_MODEL := P2 5G
  DEVICE_VARIANT := v1
  DEVICE_DTS := mt7981b-cudy-p2-v1
  DEVICE_DTS_DIR := ../dts
  SUPPORTED_DEVICES += R91
  DEVICE_DTS_LOADADDR := 0x44000000
  BLOCKSIZE := 128k
  PAGESIZE := 2048
  IMAGE_SIZE := 65536k
  KERNEL_IN_UBI := 1
  KERNEL := kernel-bin | lzma | \
	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
  KERNEL_INITRAMFS := kernel-bin | lzma | \
	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
  IMAGES := sysupgrade.bin
  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
endef
TARGET_DEVICES += cudy_p2-v1

hacked

 #include "mt7981b.dtsi"
 
 / {
+	model = "Cudy P2 5G";
+	compatible = "cudy,p2-5g", "mediatek,mt7981";
 
 	aliases {
 		label-mac-device = &gmac0;

model missing

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

		port@0 {
			reg = <0>;
			label = "wan";

			nvmem-cell-names = "mac-address";
			nvmem-cells = <&macaddr_bdinfo_de00 0>;
		};

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

-		port@2 {
-			reg = <2>;
-			label = "lan2";
-		};
-
-		port@3 {
-			reg = <3>;
-			label = "lan3";
-		};
-
-		port@4 {
-			reg = <4>;
-			label = "lan4";
-		};
-
		port@6 {
			reg = <6>;
			label = "cpu";
			ethernet = <&gmac0>;
			phy-mode = "2500base-x";

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

from the picture you have only lan and wan

File
target/linux/mediatek/filogic/base-files/etc/board.d/02_network

		;;
	comfast,cf-wr632ax|\
	comfast,cf-wr632ax-ubootmod|\
+	cudy,p2-5g\
	keenetic,kn-3911|\
	smartrg,sdg-8622|\
	smartrg,sdg-8632|\
	smartrg,sdg-8733a|\
	yuncore,ax835)
		ucidef_set_interfaces_lan_wan lan wan
		;;

I actually succeded in flashing it. I modified initramfs from WR3000E, and it booted up. Sysupgrade from initramfs worked too since flash layout is the same as in M3000, WR3000E, WR3000S. But i couldn’t get the modem to work. It shows up as a USB0 device, but usb hub is on a pci bridge. I got plenty of AER errors in the log, and modem just showed up and disappeared in a loop. It works only in ncm mode, it just wouldn’t switch to mbim or anything different. So, for now i just put it aside.

Please show the output of cat /sys/kernel/debug/usb/devices

It shows up as a Quectel RG500U-EB with a ID 2c7c-0900. But it’s a LGA type modem, so it’s soldered onto the mainboard. The driver in use was rndis-host.

I’m posting last working log before all the AER errors i had:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.18.26 (lukasz@lukasz-mint) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 14.3.0 r34342-472c325fb8) 14.3.0, GNU ld (GNU Binutils) 2.44) #0 SMP Thu May  7 19:14:08 2026
[    0.000000] KASLR disabled due to lack of seed
[    0.000000] Machine model: Cudy P2 5G
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[    0.000000] OF: reserved mem: 0x0000000047c80000..0x0000000047d7ffff (1024 KiB) nomap non-reusable wmcpu-reserved@47c80000
[    0.000000] OF: reserved mem: 0x0000000047d80000..0x0000000047dbffff (256 KiB) nomap non-reusable wo-emi@47d80000
[    0.000000] OF: reserved mem: 0x0000000047dc0000..0x0000000047ffffff (2304 KiB) nomap non-reusable wo-data@47dc0000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000004fffffff]
[    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-0x0000000047c7ffff]
[    0.000000]   node   0: [mem 0x0000000047c80000-0x0000000047ffffff]
[    0.000000]   node   0: [mem 0x0000000048000000-0x000000004fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000004fffffff]
[    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 20 pages/cpu s43480 r8192 d30248 u81920
[    0.000000] pcpu-alloc: s43480 r8192 d30248 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GICv3 CPU interface
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line:
[    0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB
[    0.000000] software IO TLB: area num 2.
[    0.000000] software IO TLB: SWIOTLB bounce buffer size roundup to 0MB
[    0.000000] software IO TLB: mapped [mem 0x000000004fe4b000-0x000000004fecb000] (0MB)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65536
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=2.
[    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] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: GICD_CTLR.DS=0, SCR_EL3.FIQ=0
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer 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.000089] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000097] pid_max: default: 32768 minimum: 301
[    0.002510] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.002518] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.007571] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.008339] rcu: Hierarchical SRCU implementation.
[    0.008346] rcu:     Max phase no-delay instances is 1000.
[    0.008561] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.008767] smp: Bringing up secondary CPUs ...
[    0.009151] Detected VIPT I-cache on CPU1
[    0.009196] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.009223] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.009302] smp: Brought up 1 node, 2 CPUs
[    0.009307] SMP: Total of 2 processors activated.
[    0.009310] CPU: All CPU(s) started at EL2
[    0.009313] CPU features: detected: 32-bit EL0 Support
[    0.009316] CPU features: detected: CRC32 instructions
[    0.009343] alternatives: applying system-wide alternatives
[    0.009487] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.009615] Memory: 235624K/262144K available (9664K kernel code, 1014K rwdata, 2972K rodata, 960K init, 295K bss, 24812K reserved, 0K cma-reserved)
[    0.012904] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012930] posixtimers hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.012956] futex hash table entries: 512 (32768 bytes on 1 NUMA nodes, total 32 KiB, linear).
[    0.012994] 28992 pages in range for non-PLT usage
[    0.012996] 520512 pages in range for PLT usage
[    0.014578] pinctrl core: initialized pinctrl subsystem
[    0.015782] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.016081] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.016106] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.016127] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.016539] thermal_sys: Registered thermal governor 'fair_share'
[    0.016543] thermal_sys: Registered thermal governor 'bang_bang'
[    0.016546] thermal_sys: Registered thermal governor 'step_wise'
[    0.016549] thermal_sys: Registered thermal governor 'user_space'
[    0.016611] ASID allocator initialised with 65536 entries
[    0.017286] pstore: Using crash dump compression: deflate
[    0.017291] pstore: Registered ramoops as persistent store backend
[    0.017293] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.018937] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    0.020270] /soc/pcie@11280000: Fixed dependency cycle(s) with /soc/pcie@11280000/interrupt-controller
[    0.038301] SCSI subsystem initialized
[    0.038471] libata version 3.00 loaded.
[    0.040195] clocksource: Switched to clocksource arch_sys_counter
[    0.042627] NET: Registered PF_INET protocol family
[    0.042726] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.043779] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.043792] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.043806] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.043825] TCP bind hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.043873] TCP: Hash tables configured (established 2048 bind 2048)
[    0.044085] MPTCP token hash table entries: 256 (order: 1, 6144 bytes, linear)
[    0.044191] UDP hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.044211] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.044415] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.044448] PCI: CLS 0 bytes, default 64
[    0.045457] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[    0.050645] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.050653] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.053988] cryptd: max_cpu_qlen set to 1000
[    0.108153] gpio-export gpio-export: 5 gpio(s) exported
[    0.109185] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    0.109208] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    0.109218] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    0.113172] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.114377] printk: legacy console [ttyS0] disabled
[    0.134758] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 72, base_baud = 2500000) is a ST16650V2
[    0.134799] printk: legacy console [ttyS0] enabled
[    0.953503] mtk_rng trng: registered RNG driver
[    0.953543] random: crng init done
[    0.964533] loop: module loaded
[    0.970554] spi-nand spi0.0: calibration result: 0x3
[    0.975611] spi-nand spi0.0: ESMT SPI NAND was found.
[    0.980668] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.989220] Signature found at block 1023 [0x07fe0000]
[    0.994372] NMBM management region starts at block 960 [0x07800000]
[    1.001752] First info table with writecount 0 found in block 960
[    1.010717] Second info table with writecount 0 found in block 963
[    1.016898] NMBM has been successfully attached
[    1.021642] 6 fixed-partitions partitions found on MTD device spi0.0
[    1.028243] Creating 6 MTD partitions on "spi0.0":
[    1.033069] 0x000000000000-0x000000100000 : "BL2"
[    1.038988] 0x000000100000-0x000000180000 : "u-boot-env"
[    1.045117] 0x000000180000-0x000000380000 : "Factory"
[    1.052429] 0x000000380000-0x0000003c0000 : "bdinfo"
[    1.058239] 0x0000003c0000-0x0000005c0000 : "FIP"
[    1.064992] 0x0000005c0000-0x0000045c0000 : "ubi"
[    1.119962] ubi0: default fastmap pool size: 25
[    1.124524] ubi0: default fastmap WL pool size: 12
[    1.129308] ubi0: attaching mtd5
[    1.397110] ubi0: scanning is finished
[    1.406509] ubi0: attached mtd5 (name "ubi", size 64 MiB)
[    1.411930] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.418792] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.425573] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.432531] ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
[    1.438524] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.445737] ubi0: max/mean erase counter: 8/3, WL threshold: 4096, image sequence number: 1792215068
[    1.454862] ubi0: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 19
[    1.464082] ubi0: background thread "ubi_bgt0d" started, PID 214
[    1.464792] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.475584] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    1.487323] mtk_soc_eth 15100000.ethernet: legacy DT: using hard-coded SRAM offset.
[    1.495350] mtk_soc_eth 15100000.ethernet: legacy DT: missing interrupt-names.
[    1.637937] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc081700000, irq 75
[    1.647796] i2c_dev: i2c /dev entries driver
[    1.654033] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.662879] NET: Registered PF_INET6 protocol family
[    1.668702] Segment Routing with IPv6
[    1.672431] In-situ OAM (IOAM) with IPv6
[    1.676402] NET: Registered PF_PACKET protocol family
[    1.681736] 8021q: 802.1Q VLAN Support v1.8
[    1.703586] phy phy-soc:usb-phy@11e10000.1: type_sw - reg 0x218, index 0
[    1.712587] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.719908] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.726225] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    1.777662] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.786403] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.804237] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=78)
[    1.829834] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=79)
[    1.846161] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    1.852920] DSA: tree 0 setup
[    1.856181] clk: Disabling unused clocks
[    1.860381] PM: genpd: Disabling unused power domains
[    1.865614] check access for rdinit=/init failed: -2, ignoring
[    1.871490] mtk-pcie-gen3 11280000.pcie: set MEM trans window[0]: cpu_addr = 0x20000000, pci_addr = 0x20000000, size = 0x10000000
[    1.883434] mtk-pcie-gen3 11280000.pcie: PCI host bridge to bus 0000:00
[    1.890045] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.895555] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    1.902443] pci_bus 0000:00: scanning bus
[    1.906470] pci 0000:00:00.0: [14c3:1f32] type 01 class 0x060400 PCIe Root Port
[    1.913799] pci 0000:00:00.0: BAR 0 [mem 0x00000000-0x00007fff 64bit]
[    1.920239] pci 0000:00:00.0: PCI bridge to [bus 00]
[    1.925196] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.931284] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    1.938065] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
[    1.945848] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    1.951938] pci 0000:00:00.0: PME# disabled
[    1.957174] pci_bus 0000:00: fixups for bus
[    1.961372] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.968061] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.976070] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.982853] pci_bus 0000:01: scanning bus
[    1.986887] pci 0000:01:00.0: [16c3:abcd] type 00 class 0x0d8000 PCIe Endpoint
[    1.994165] pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x03ffffff pref]
[    2.000523] pci 0000:01:00.0: BAR 1 [mem 0x00000000-0x0000ffff]
[    2.006434] pci 0000:01:00.0: BAR 2 [mem 0x00000000-0x01ffffff pref]
[    2.012785] pci 0000:01:00.0: BAR 3 [mem 0x00000000-0x0000ffff]
[    2.018696] pci 0000:01:00.0: BAR 4 [mem 0x00000000-0x000fffff]
[    2.024612] pci 0000:01:00.0: BAR 5 [mem 0x00000000-0x0000ffff]
[    2.030641] pci 0000:01:00.0: supports D1
[    2.034640] pci 0000:01:00.0: PME# supported from D0 D1 D3hot D3cold
[    2.040991] pci 0000:01:00.0: PME# disabled
[    2.060228] pci 0000:01:00.0: ASPM: default states L0s L1
[    2.065649] pci_bus 0000:01: fixups for bus
[    2.069821] pci_bus 0000:01: bus scan returning with max=01
[    2.075403] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.082037] pci_bus 0000:00: bus scan returning with max=01
[    2.087612] pci 0000:00:00.0: bridge window [mem 0x20000000-0x261fffff]: assigned
[    2.095093] pci 0000:00:00.0: BAR 0 [mem 0x26200000-0x26207fff 64bit]: assigned
[    2.102405] pci 0000:01:00.0: BAR 0 [mem 0x20000000-0x23ffffff pref]: assigned
[    2.109619] pci 0000:01:00.0: BAR 2 [mem 0x24000000-0x25ffffff pref]: assigned
[    2.116837] pci 0000:01:00.0: BAR 4 [mem 0x26000000-0x260fffff]: assigned
[    2.123625] pci 0000:01:00.0: BAR 1 [mem 0x26100000-0x2610ffff]: assigned
[    2.130409] pci 0000:01:00.0: BAR 3 [mem 0x26110000-0x2611ffff]: assigned
[    2.137189] pci 0000:01:00.0: BAR 5 [mem 0x26120000-0x2612ffff]: assigned
[    2.143974] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.148930] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x261fffff]
[    2.155714] pci_bus 0000:00: resource 4 [mem 0x20000000-0x2fffffff]
[    2.161974] pci_bus 0000:01: resource 1 [mem 0x20000000-0x261fffff]
[    2.168254] pci 0000:00:00.0: save config 0x00: 0x1f3214c3
[    2.173734] pci 0000:00:00.0: save config 0x04: 0x00100000
[    2.179208] pci 0000:00:00.0: save config 0x08: 0x06040001
[    2.184691] pci 0000:00:00.0: save config 0x0c: 0x00010000
[    2.190165] pci 0000:00:00.0: save config 0x10: 0x26200004
[    2.195644] pci 0000:00:00.0: save config 0x14: 0x00000000
[    2.201123] pci 0000:00:00.0: save config 0x18: 0x00010100
[    2.206597] pci 0000:00:00.0: save config 0x1c: 0x000001f1
[    2.212075] pci 0000:00:00.0: save config 0x20: 0x26102000
[    2.217549] pci 0000:00:00.0: save config 0x24: 0x0001fff1
[    2.223027] pci 0000:00:00.0: save config 0x28: 0x00000000
[    2.228502] pci 0000:00:00.0: save config 0x2c: 0x00000000
[    2.233979] pci 0000:00:00.0: save config 0x30: 0x00000000
[    2.239453] pci 0000:00:00.0: save config 0x34: 0x00000080
[    2.244935] pci 0000:00:00.0: save config 0x38: 0x00000000
[    2.250415] pci 0000:00:00.0: save config 0x3c: 0x00020100
[    2.256026] pcieport 0000:00:00.0: assign IRQ: got 81
[    2.261079] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    2.267168] pcieport 0000:00:00.0: enabling bus mastering
[    2.273186] mtk-pcie-gen3 11280000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11280c00 data 0
[    2.281629] mtk-pcie-gen3 11280000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11280c00 data 1
[    2.290055] mtk-pcie-gen3 11280000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11280c00 data 2
[    2.298484] mtk-pcie-gen3 11280000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11280c00 data 3
[    2.306921] mtk-pcie-gen3 11280000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11280c00 data 4
[    2.315351] mtk-pcie-gen3 11280000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11280c00 data 5
[    2.323780] mtk-pcie-gen3 11280000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11280c00 data 6
[    2.332209] mtk-pcie-gen3 11280000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11280c00 data 7
[    2.340638] mtk-pcie-gen3 11280000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11280c00 data 8
[    2.349063] mtk-pcie-gen3 11280000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11280c00 data 9
[    2.357492] mtk-pcie-gen3 11280000.pcie: msi#0xa address_hi 0x0 address_lo 0x11280c00 data 10
[    2.366011] mtk-pcie-gen3 11280000.pcie: msi#0xb address_hi 0x0 address_lo 0x11280c00 data 11
[    2.374528] mtk-pcie-gen3 11280000.pcie: msi#0xc address_hi 0x0 address_lo 0x11280c00 data 12
[    2.383044] mtk-pcie-gen3 11280000.pcie: msi#0xd address_hi 0x0 address_lo 0x11280c00 data 13
[    2.391559] mtk-pcie-gen3 11280000.pcie: msi#0xe address_hi 0x0 address_lo 0x11280c00 data 14
[    2.400071] mtk-pcie-gen3 11280000.pcie: msi#0xf address_hi 0x0 address_lo 0x11280c00 data 15
[    2.408588] mtk-pcie-gen3 11280000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11280c00 data 16
[    2.417191] mtk-pcie-gen3 11280000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11280c00 data 17
[    2.425796] mtk-pcie-gen3 11280000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11280c00 data 18
[    2.434399] mtk-pcie-gen3 11280000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11280c00 data 19
[    2.443001] mtk-pcie-gen3 11280000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11280c00 data 20
[    2.451604] mtk-pcie-gen3 11280000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11280c00 data 21
[    2.460207] mtk-pcie-gen3 11280000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11280c00 data 22
[    2.468806] mtk-pcie-gen3 11280000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11280c00 data 23
[    2.477408] mtk-pcie-gen3 11280000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11280c00 data 24
[    2.486013] mtk-pcie-gen3 11280000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11280c00 data 25
[    2.494616] mtk-pcie-gen3 11280000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11280c00 data 26
[    2.503219] mtk-pcie-gen3 11280000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11280c00 data 27
[    2.511823] mtk-pcie-gen3 11280000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11280c00 data 28
[    2.520425] mtk-pcie-gen3 11280000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11280c00 data 29
[    2.529024] mtk-pcie-gen3 11280000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11280c00 data 30
[    2.537626] mtk-pcie-gen3 11280000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11280c00 data 31
[    2.546901] mtk-pcie-gen3 11280000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11280c00 data 0
[    2.555469] pcieport 0000:00:00.0: PME: Signaling with IRQ 82
[    2.561478] pcieport 0000:00:00.0: AER: enabled with IRQ 82
[    2.567191] pcieport 0000:00:00.0: bwctrl: enabled with IRQ 82
[    2.573076] pcieport 0000:00:00.0: save config 0x00: 0x1f3214c3
[    2.578987] pcieport 0000:00:00.0: save config 0x04: 0x00100406
[    2.584911] pcieport 0000:00:00.0: save config 0x08: 0x06040001
[    2.590830] pcieport 0000:00:00.0: save config 0x0c: 0x00010000
[    2.596739] pcieport 0000:00:00.0: save config 0x10: 0x26200004
[    2.602653] pcieport 0000:00:00.0: save config 0x14: 0x00000000
[    2.608561] pcieport 0000:00:00.0: save config 0x18: 0x00010100
[    2.614478] pcieport 0000:00:00.0: save config 0x1c: 0x000001f1
[    2.620392] pcieport 0000:00:00.0: save config 0x20: 0x26102000
[    2.626299] pcieport 0000:00:00.0: save config 0x24: 0x0001fff1
[    2.632213] pcieport 0000:00:00.0: save config 0x28: 0x00000000
[    2.638122] pcieport 0000:00:00.0: save config 0x2c: 0x00000000
[    2.644036] pcieport 0000:00:00.0: save config 0x30: 0x00000000
[    2.649944] pcieport 0000:00:00.0: save config 0x34: 0x00000080
[    2.655860] pcieport 0000:00:00.0: save config 0x38: 0x00000000
[    2.661774] pcieport 0000:00:00.0: save config 0x3c: 0x00020151
[    2.667794] pci 0000:01:00.0: save config 0x00: 0xabcd16c3
[    2.673288] pci 0000:01:00.0: save config 0x04: 0x00110000
[    2.678764] pci 0000:01:00.0: save config 0x08: 0x0d800001
[    2.684246] pci 0000:01:00.0: save config 0x0c: 0x00000000
[    2.689721] pci 0000:01:00.0: save config 0x10: 0x20000008
[    2.695201] pci 0000:01:00.0: save config 0x14: 0x26100000
[    2.700682] pci 0000:01:00.0: save config 0x18: 0x24000008
[    2.706157] pci 0000:01:00.0: save config 0x1c: 0x26110000
[    2.711652] pci 0000:01:00.0: save config 0x20: 0x26000000
[    2.717127] pci 0000:01:00.0: save config 0x24: 0x26120000
[    2.722608] pci 0000:01:00.0: save config 0x28: 0x00000000
[    2.728083] pci 0000:01:00.0: save config 0x2c: 0x00000000
[    2.733565] pci 0000:01:00.0: save config 0x30: 0x00000000
[    2.739040] pci 0000:01:00.0: save config 0x34: 0x00000040
[    2.744520] pci 0000:01:00.0: save config 0x38: 0x00000000
[    2.749995] pci 0000:01:00.0: save config 0x3c: 0x000001ff
[    2.760799] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.768343] Freeing unused kernel memory: 960K
[    2.772877] Run /sbin/init as init process
[    2.776965]   with arguments:
[    2.779920]     /sbin/init
[    2.782637]   with environment:
[    2.785767]     HOME=/
[    2.788115]     TERM=linux
[    3.073660] init: Console is alive
[    3.077185] init: - watchdog -
[    3.532889] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.573050] usbcore: registered new interface driver usbfs
[    3.578576] usbcore: registered new interface driver hub
[    3.583948] usbcore: registered new device driver usb
[    3.590326] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    3.603775] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    3.611660] debugfs: 'type' already exists in 'phy-soc:usb-phy@11e10000.1'
[    3.618538] debugfs: 'efuse' already exists in 'phy-soc:usb-phy@11e10000.1'
[    3.625513] debugfs: 'intr' already exists in 'phy-soc:usb-phy@11e10000.1'
[    3.632386] debugfs: 'tx-imp' already exists in 'phy-soc:usb-phy@11e10000.1'
[    3.639421] debugfs: 'rx-imp' already exists in 'phy-soc:usb-phy@11e10000.1'
[    3.646709] xhci-mtk 11200000.usb: xHCI Host Controller
[    3.651969] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    3.662365] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    3.671534] xhci-mtk 11200000.usb: irq 83, io mem 0x11200000
[    3.677299] xhci-mtk 11200000.usb: xHCI Host Controller
[    3.682529] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    3.689919] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    3.697388] hub 1-0:1.0: USB hub found
[    3.701185] hub 1-0:1.0: 1 port detected
[    3.705433] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.713896] hub 2-0:1.0: USB hub found
[    3.717667] hub 2-0:1.0: 1 port detected
[    3.729382] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.748223] init: - preinit -
[    3.770452] pcieport 0000:00:00.0: AER: Uncorrectable (Fatal) error message received from 0000:00:00.0
[    3.779768] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrectable (Fatal), type=Transaction Layer, (Receiver ID)
[    3.790653] pcieport 0000:00:00.0:   device [14c3:1f32] error status/mask=00000020/00400000
[    3.798999] pcieport 0000:00:00.0:    [ 5] SDES                   (First)
[    3.805784] pcieport 0000:00:00.0: AER: broadcast error_detected message
[    3.812476] pci 0000:01:00.0: AER: can't recover (no error_detected callback)
[    3.830258] pcieport 0000:00:00.0: waiting 100 ms for downstream link
[    3.989491] pci 0000:01:00.0: ready 0ms after bus reset
[    3.994748] pcieport 0000:00:00.0: AER: Root Port link has been reset (0)
[    4.001605] pcieport 0000:00:00.0: AER: device recovery failed
[    4.185322] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    4.193928] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    4.228582] mt7530-mdio 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
[    4.992969] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    8.430471] UBIFS (ubi0:2): default file-system created
[    8.436145] UBIFS (ubi0:2): Mounting in unauthenticated mode
[    8.441907] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 743
[    8.491962] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    8.499794] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    8.509726] UBIFS (ubi0:2): FS size: 49520640 bytes (47 MiB, 390 LEBs), max 400 LEBs, journal size 2539520 bytes (2 MiB, 20 LEBs)
[    8.521379] UBIFS (ubi0:2): reserved for root: 2338982 bytes (2284 KiB)
[    8.527982] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID D97B9005-25BF-4E43-A8F5-1ECAE48E6E40, small LPT model
[    8.540819] mount_root: overlay filesystem has not been fully initialized yet
[    8.548159] mount_root: switching to ubifs overlay
[    8.555723] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    8.567559] urandom-seed: Seed file not found (/etc/urandom.seed)
[    8.642255] mt7530-mdio mdio-bus:1f lan1: Link is Down
[    8.652623] procd: - early -
[    8.655561] procd: - watchdog -
[    9.201555] procd: - watchdog -
[    9.206412] procd: - ubus -
[    9.282894] procd: - init -
Please press Enter to activate this console.
[    9.667055] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.715985] crypto-safexcel 10320000.crypto: EIP97:230(0,1,4,4)-HIA:270(0,5,5),PE:150/433(alg:7fcdfc00)/0/0/0
[    9.740600] usbcore: registered new interface driver cdc_wdm
[    9.747072] Loading modules backported from Linux version v6.18.26-0-g1fe060681
[    9.754415] Backport generated by backports.git 6ecbb44
[    9.769839] usbcore: registered new interface driver usbserial_generic
[    9.776431] usbserial: USB Serial support registered for generic
[    9.783916] usbcore: registered new interface driver cdc_ether
[    9.791175] usbcore: registered new interface driver cdc_ncm
[    9.811329] usbcore: registered new interface driver huawei_cdc_ncm
[    9.839806] urngd: v1.0.2 started.
[   10.324954] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20240823161240a
[   10.509805] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20240823161304
[   10.607148] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20240823161841
[   10.735555] PPP generic driver version 2.4.2
[   10.741153] NET: Registered PF_PPPOX protocol family
[   10.748665] usbcore: registered new interface driver qmi_wwan
[   10.755994] usbcore: registered new interface driver rndis_host
[   10.764776] usbcore: registered new interface driver cdc_mbim
[   10.776149] usbcore: registered new interface driver option
[   10.781869] usbserial: USB Serial support registered for GSM modem (1-port)
[   10.792898] usbcore: registered new interface driver qcserial
[   10.798709] usbserial: USB Serial support registered for Qualcomm USB modem
[   10.806470] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.730259] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[   13.921419] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-11200000.usb-1, RNDIS device, 92:01:b3:e3:cc:69
[   13.937280] option 1-1:1.2: GSM modem (1-port) converter detected
[   13.943634] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[   13.950771] option 1-1:1.3: GSM modem (1-port) converter detected
[   13.957050] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[   13.964211] option 1-1:1.4: GSM modem (1-port) converter detected
[   13.970576] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[   13.977731] option 1-1:1.5: GSM modem (1-port) converter detected
[   13.984111] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[   13.992382] option 1-1:1.6: GSM modem (1-port) converter detected
[   13.998710] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
[   17.632121] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[   17.651124] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   17.663395] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   17.670178] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   17.686110] br-lan: port 1(lan1) entered blocking state
[   17.691386] br-lan: port 1(lan1) entered disabled state
[   17.696642] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   17.702966] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   17.714349] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   18.222717] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   20.827745] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.835693] br-lan: port 1(lan1) entered blocking state
[   20.840920] br-lan: port 1(lan1) entered forwarding state
[  108.076855] mt7530-mdio mdio-bus:1f lan1: Link is Down
[  108.082043] br-lan: port 1(lan1) entered disabled state

Why ??

First you should discover with the vendor firmware, all quirks
Also boot only via initramfs

Can you go back to stock fw, via tftp ?

Do you have a shell ?

Uhh, do you see log read above your post ? That proves that i succesfully build a image for this router, and flashed it without problems. And yes, i also went back to stock Cudy firmware using tftp recovery.

Good.

can you log in ?
If not can you dump the flash/firmware via initramfs ?

We need the devicetree from the flash

There is no ssh access in Cudy firmware. And, like i said, it is possible to boot initramfs from WR3000E, H, or S, because flash layout is the same. I confirmed it, here:

[    0.970554] spi-nand spi0.0: calibration result: 0x3
[    0.975611] spi-nand spi0.0: ESMT SPI NAND was found.
[    0.980668] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.989220] Signature found at block 1023 [0x07fe0000]
[    0.994372] NMBM management region starts at block 960 [0x07800000]
[    1.001752] First info table with writecount 0 found in block 960
[    1.010717] Second info table with writecount 0 found in block 963
[    1.016898] NMBM has been successfully attached
[    1.021642] 6 fixed-partitions partitions found on MTD device spi0.0
[    1.028243] Creating 6 MTD partitions on "spi0.0":
[    1.033069] 0x000000000000-0x000000100000 : "BL2"
[    1.038988] 0x000000100000-0x000000180000 : "u-boot-env"
[    1.045117] 0x000000180000-0x000000380000 : "Factory"
[    1.052429] 0x000000380000-0x0000003c0000 : "bdinfo"
[    1.058239] 0x0000003c0000-0x0000005c0000 : "FIP"
[    1.064992] 0x0000005c0000-0x0000045c0000 : "ubi"
[    1.119962] ubi0: default fastmap pool size: 25
[    1.124524] ubi0: default fastmap WL pool size: 12
[    1.129308] ubi0: attaching mtd5
[    1.397110] ubi0: scanning is finished
[    1.406509] ubi0: attached mtd5 (name "ubi", size 64 MiB)
[    1.411930] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.418792] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.425573] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.432531] ubi0: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
[    1.438524] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.445737] ubi0: max/mean erase counter: 8/3, WL threshold: 4096, image sequence number: 1792215068
[    1.454862] ubi0: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 19
[    1.464082] ubi0: background thread "ubi_bgt0d" started, PID 214
[    1.464792] block ubiblock0_1: created from ubi0:1(rootfs)
[    1.475584] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem

And here is the reference dts i got from Cudy:

/dts-v1/;
#include "mt7981.dtsi"
/ {
	model = "MediaTek MT7981 RFB/R91";
	compatible = "mediatek,mt7981-spim-snand-rfb";
	chosen {
		bootargs = "console=ttyS0,115200n1 loglevel=8  \
				earlycon=uart8250,mmio32,0x11002000";
	};

	memory {
		// fpga ddr2: 128MB*2
		reg = <0 0x40000000 0 0x10000000>;
	};

	gsw: gsw@0 {
                compatible = "mediatek,mt753x";
                mediatek,ethsys = <&ethsys>;
                #address-cells = <1>;
                #size-cells = <0>;
	};

	gpio-leds {
		compatible = "gpio-leds";
		status {
			label = "oem:green:status";
			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
		};

		wifi {
			label = "oem:green:wifi";
			gpios = <&pio 13 GPIO_ACTIVE_HIGH>;
		};

		blue {
			label = "oem:green:blue";
			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
		};

		yellow {
			label = "oem:green:yellow";
			gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
		};

		red {
			label = "oem:green:red";
			gpios = <&pio 26 GPIO_ACTIVE_HIGH>;
		};

		siglow {
			label = "oem:green:siglow";
			gpios = <&pio 27 GPIO_ACTIVE_HIGH>;
		};

		sigmid {
			label = "oem:green:sigmid";
			gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
		};

		sighigh {
			label = "oem:green:sighigh";
			gpios = <&pio 30 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;

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

		wps {
			label = "wps";
			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	gpio_export {
		compatible = "gpio-export";
		#size-cells = <0>;

		voippwr {
			gpio-export,name = "voippwr";
			gpio-export,output = <0>;
			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
		};

		voip_volte {
			gpio-export,name = "voip_volte";
			gpio-export,output = <1>;
			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
		};

		5gpwr {
			gpio-export,name = "pwr";
			gpio-export,output = <0>;
			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
		};
		
		usb5g {
			gpio-export,name = "4g";
			gpio-export,output = <0>;
			gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
		};
		
		ant {
			gpio-export,name = "ant";
			gpio-export,output = <0>;
			gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
		};
	};

	nmbm_spim_nand {
		compatible = "generic,nmbm";

		#address-cells = <1>;
		#size-cells = <1>;

		lower-mtd-device = <&spi_nand>;
		forced-create;

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

			partition@0 {
				label = "BL2";
				reg = <0x00000 0x0100000>;
				read-only;
			};

			partition@100000 {
				label = "u-boot-env";
				reg = <0x0100000 0x0080000>;
			};

			partition@180000 {
				label = "Factory";
				reg = <0x180000 0x0200000>;
			};
			
			bdinfo: partition@380000 {
				label = "bdinfo";
				reg = <0x380000 0x0040000>;
			};

			partition@3C0000 {
				label = "FIP";
				reg = <0x3C0000 0x0200000>;
			};

			partition@5C0000 {
				label = "ubi";
				reg = <0x5C0000 0x4000000>;
			};
		};
	};

	sound_wm8960 {
		compatible = "mediatek,mt79xx-wm8960-machine";
		mediatek,platform = <&afe>;
		audio-routing = "Headphone", "HP_L",
				"Headphone", "HP_R",
				"LINPUT1", "AMIC",
				"RINPUT1", "AMIC";
		mediatek,audio-codec = <&wm8960>;
		status = "disabled";
	};

	sound_si3218x {
		compatible = "mediatek,mt79xx-si3218x-machine";
		mediatek,platform = <&afe>;
		mediatek,ext-codec = <&proslic_spi>;
		status = "disabled";
	};
};

&afe {
	pinctrl-names = "default";
	pinctrl-0 = <&pcm_pins>;
	status = "okay";
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c_pins>;
	status = "disabled";

	wm8960: wm8960@1a {
		compatible = "wlf,wm8960";
		reg = <0x1a>;
	};
};

&uart0 {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&eth {
        status = "okay";
        lower-mtd-name = "bdinfo";

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

			fixed-link {
				speed = <2500>;
				full-duplex;
				pause;
			};
        };
		
        mdio: mdio-bus {
			#address-cells = <1>;
			#size-cells = <0>;
		};
};

&gsw {
        mediatek,mdio = <&mdio>;
        mediatek,portmap = "wllll";
        mediatek,mdio_master_pinmux = <1>;
        reset-gpios = <&pio 39 0>;
        interrupt-parent = <&pio>;
        interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
        status = "okay";

        port6: port@6 {
                compatible = "mediatek,mt753x-port";
                reg = <6>;
                phy-mode = "sgmii";
                fixed-link {
                        speed = <2500>;
                        full-duplex;
                };
        };
};

&hnat {
	mtketh-wan = "eth0.2";
	mtketh-lan = "eth0.1";
	mtketh-ppd = "eth0";
	mtketh-max-gmac = <1>;
	status = "okay";
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_flash_pins>;
	status = "okay";
	spi_nand: spi_nand@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "spi-nand";
		reg = <0>;
		spi-max-frequency = <52000000>;
		spi-tx-bus-width = <4>;
		spi-rx-bus-width = <4>;
	};
};

&spi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&spic_pins>;
	status = "disabled";

	proslic_spi: proslic_spi@0 {
		compatible = "silabs,proslic_spi";
		reg = <0>;
		spi-max-frequency = <10000000>;
		spi-cpha = <1>;
		spi-cpol = <1>;
		channel_count = <1>;
		debug_level = <4>;       /* 1 = TRC, 2 = DBG, 4 = ERR */
		reset_gpio = <&pio 15 0>;
		ig,enable-spi = <1>;     /* 1: Enable, 0: Disable */
	};
};

&pio {

	i2c_pins: i2c-pins-g0 {
                mux {
                        function = "i2c";
                        groups = "i2c0_0";
                };
        };

        pcm_pins: pcm-pins-g0 {
                mux {
                        function = "pcm";
                        groups = "pcm";
                };
        };

        pwm0_pin: pwm0-pin-g0 {
                mux {
                        function = "pwm";
                        groups = "pwm0_0";
                };
        };

        pwm1_pin: pwm1-pin-g0 {
                mux {
                        function = "pwm";
                        groups = "pwm1_0";
                };
        };

        pwm2_pin: pwm2-pin {
                mux {
                        function = "pwm";
                        groups = "pwm2";
                };
        };

	spi0_flash_pins: spi0-pins {
		mux {
			function = "spi";
			groups = "spi0", "spi0_wp_hold";
		};

		conf-pu {
			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
		};

		conf-pd {
			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
			drive-strength = <MTK_DRIVE_8mA>;
			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
		};
	};

	spic_pins: spi1-pins {
		mux {
			function = "spi";
			groups = "spi1_1";
		};
	};

	uart1_pins: uart1-pins-g1 {
                mux {
                        function = "uart";
                        groups = "uart1_1";
                };
        };

	uart2_pins: uart2-pins-g1 {
		mux {
                        function = "uart";
                        groups = "uart2_1";
                };
        };

	pcie_pins: pcie-pins {
		mux {
			function = "pcie";
			groups = "pcie_clk", "pcie_wake", "pcie_pereset";
		};

	};

};

&xhci {
	phys = <&u2port0 PHY_TYPE_USB2>;
	status = "okay";
};

&pcie {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_pins>;
	status = "okay";
};

Yeah I know :frowning:

currently working on my own miracle with siflower ...

Try to remove either the xgci or pcie port in the dts.
There is some multi/comby phy for both of them.

If i remove either usb phy or pcie node, modem isn't showing up. So those have to stay. The main problem right now, is that modem shows up and dissapears every 30 seconds or so, and i can't even test if it's connecting to network. And it won't change to MBIM or other mode thru AT commands. On top of that i can't find at commands manual for this modem on the web.