Support for COMFAST CF-EW72 V2 (MT7621)

Want to get support for COMFAST CF-EW72 V2 (MT7621), which differs from CF-EW72 ("V1").

There was a topic about it, but with no result.
There was a topic with better results - a working firmware here.

Could you please help me getting this for "official support" to make available in snapshots downloads ?

do you own the device ?

Yes, I own this device, and I can confirm the fw from this topic boots OK and LUCI starts.

awesome,

then you shouldn't have much issues adding the device ...

https://openwrt.org/docs/guide-developer/adding_new_device
https://openwrt.org/docs/guide-developer/add.new.device

1 Like

Would like to see some walkthrough, eh..
If I am correct, the right DTS file is a good start?

From my point of view the DTS and an entry in target/linux/ramips/image/mt7621.mk are a good starting point.
With them, you can already create the initramfs image and you can check if networks, LEDs and buttons are working.

1 Like

So, for now it has

  • MT7621
  • MT7613BEN as 5 GHz radio
  • MT7603EN as 2.4 GHz radio
  • NT5CC64M16GP-DI as ram
  • 25L12833F as SPI ROM

Will try to build fw..

Did you already ask the guys from the other threads if they can provide you their current DTS?
If this is not possible, based on the populated hardware, you can check the DTS of similar devices:

  • Beeline Smartbox GIGA
  • Cudy WR1300
  • I-O Data WN-DX1200GR
  • Linksys E5600
  • Linksys EA6350 v4
  • TP-Link Archer A6 v3
  • TP-Link Archer C6 v3
  • TP-Link Archer C6U v1
  • TP-Link EAP235-Wall v1
  • TP-Link TL-WPA8631P v3

No, not tried. Thanks for suggestions.
BTW there is DTS file in one of the threads, and it seems to be working, I could make a running fw already :yay: without wifi, and i will have couple of questions about things like "why there is no br-lan" exists, etc, but somedays.

So, after few tries, i hit problems. Help me please

I use this DTS:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
        compatible = "comfast,cf-ew72-v2", "mediatek,mt7621-soc";
        model = "COMFAST CF-EW72 V2";

        chosen {
                bootargs = "console=ttyS0,115200";
        };

        keys {
                compatible = "gpio-keys";

                reset {
                    label = "reset";
                    gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
                    linux,code = <KEY_RESTART>;
                    debounce-interval = <60>;
                };
        };

        leds {
                compatible = "gpio-leds";

                
        };

        aliases {
            label-mac-device = &wan;
        };
};

&spi0 {
    status = "okay";

    flash@0 {
	compatible = "jedec,spi-nor";
	reg = <0>;
	spi-max-frequency = <14000000>;

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

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

	    partition@30000 {
		label = "config";
		reg = <0x30000 0x10000>;
		read-only;
	    };

	    factory: partition@40000 {
		label = "factory";
		reg = <0x40000 0x10000>;
		read-only;
	    };

	    partition@50000 {
		compatible = "denx,uimage";
		label = "firmware";
		reg = <0x50000 0xfb0000>;
	    };
	};
    };
};

&factory {
        compatible = "nvmem-cells";
        #address-cells = <1>;
        #size-cells = <1>;

        macaddr_factory_e000: macaddr@e000 {
                reg = <0xe000 0x6>;
        };
};

&gmac0 {
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
};


&state_default {
    gpio {
	groups = "i2c", "uart2", "uart3", "sdhci", "jtag";
	function = "gpio";
    };
};

&pcie {
        status = "okay";
};

&pcie0 {
        wifi0: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x0000>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
};

&pcie1 {
        wifi1: wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
};

&switch0 {
        ports {
                wan: port@0 {
                        status = "okay";
                        label = "wan";
                        nvmem-cells = <&macaddr_factory_e000>;
                        nvmem-cell-names = "mac-address";
                        mac-address-increment = <1>;
                };

                port@1 {
                        status = "okay";
                        label = "lan";
                };
        };
};

and this patch to mt7621.mk

define Device/comfast_cf-ew72-v2
  $(Device/dsa-migration)
  $(Device/uimage-lzma-loader)
  IMAGE_SIZE := 15808k
  DEVICE_VENDOR := ComFast
  DEVICE_MODEL := CF-EW72 V2
  DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
        -uboot-envtools
  IMAGES += factory.bin
  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
        check-size | append-metadata
  IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size
endef
TARGET_DEVICES += comfast_cf-ew72-v2

2: GPIO: A device has 7 onboard LEDs, but LEDs who bond to functions can not be controlled using modified gpio-test.sh
LED1 is power
LED2 is controlled using GPIO493 (inverted, 0=on, 1=off), led has no window in case
LED3 is WAN link\data indicator
LED4 is controlled using GPIO496 (inverted, 0=on, 1=off), led has no window in case
LED5 is LAN link\data indicator
LED6 is controlled using GPIO495 (inverted, 0=on, 1=off), led has no window in case
LED7 is WIFI link\data indicator

  1. No wifi working: in LUCI there is only 5 GHz wifi, and AP can not be enabled
Trying to boot from NOR


U-Boot 2018.09-gbef8015-dirty (Dec 09 2020 - 06:28:07 -0500)

CPU:   MediaTek MT7621AT ver 1, eco 3
Clocks: CPU: 880MHz, DDR: 1200MHz, Bus: 220MHz, XTAL: 40MHz
Model: MediaTek MT7621 reference board
DRAM:  128 MiB
Loading Environment from SPI Flash... SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    uartlite0@1e000c00
Out:   uartlite0@1e000c00
Err:   uartlite0@1e000c00
Net:
Warning: eth@1e100000 (eth0) using random MAC address - 5e:69:c8:f8:cf:5b
eth0: eth@1e100000
Hit any key to stop autoboot:  0
Using eth@1e100000 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'firmware_auto.bin'.
Load address: 0x80010000
Loading: *
ARP Retry count exceeded; starting again

*** TFTP client failure: -110 ***
*** Operation Aborted! ***

  *** U-Boot Boot Menu ***

     1. Startup system (Default)
     2. Upgrade firmware
     3. Upgrade bootloader
     4. Upgrade bootloader (advanced mode)
     5. Load image
     0. U-Boot console


  Press UP/DOWN to move, ENTER to select
## Booting kernel from Legacy Image at bfc50000 ...
   Image Name:   MIPS OpenWrt Linux-5.15.123
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    2866937 Bytes = 2.7 MiB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK


OpenWrt kernel loader for MIPS based SoC
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80001000...

[    0.000000] Linux version 5.15.123 (adfilimonov@debian) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r23671-1874a7cfb0) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Wed Aug 2 12:09:24 2023
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is COMFAST CF-EW72 V2
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] percpu: Embedded 11 pages/cpu s14512 r8192 d22352 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00000840
[    0.000000] Readback ErrCtl register=00000840
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 118992K/131072K available (7034K kernel code, 622K rwdata, 1440K rodata, 1260K init, 217K bss, 12080K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000004] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.008027] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.066210] pid_max: default: 32768 minimum: 301
[    0.071631] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.078842] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.090405] rcu: Hierarchical SRCU implementation.
[    0.095895] smp: Bringing up secondary CPUs ...
[    0.101339] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.101365] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.101380] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.101424] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.160670] Synchronize counters for CPU 1: done.
[    0.193193] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.193214] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.193225] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.193253] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.252151] Synchronize counters for CPU 2: done.
[    0.282811] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.282833] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.282845] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.282876] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.337340] Synchronize counters for CPU 3: done.
[    0.367198] smp: Brought up 1 node, 4 CPUs
[    0.375950] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.385750] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.392823] pinctrl core: initialized pinctrl subsystem
[    0.399500] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.429510] clocksource: Switched to clocksource GIC
[    0.435757] NET: Registered PF_INET protocol family
[    0.440851] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.448772] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.457120] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.464796] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.472402] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.479378] TCP: Hash tables configured (established 1024 bind 1024)
[    0.485855] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.492348] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.499674] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.505282] PCI: CLS 0 bytes, default 32
[    0.512170] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.523732] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.529639] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.544359] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.550258] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.556132] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.562263] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    0.568933] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    0.577701] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0060000000
[    0.585806] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    0.949513] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    0.956414] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    0.961279] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    0.966103] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    0.973268] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    0.979581] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.984999] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    0.991853] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.998010] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.003958] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.010181] pci 0000:00:00.0: reg 0x14: [mem 0x60500000-0x6050ffff]
[    1.016426] pci 0000:00:00.0: supports D1
[    1.020359] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.026901] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.032914] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.039090] pci 0000:00:01.0: reg 0x14: [mem 0x60510000-0x6051ffff]
[    1.045396] pci 0000:00:01.0: supports D1
[    1.049313] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.056971] pci 0000:01:00.0: [14c3:7603] type 00 class 0x028000
[    1.062997] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    1.069318] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.076658] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.081857] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.087859] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.094627] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.101807] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.108662] pci 0000:02:00.0: [14c3:7663] type 00 class 0x000280
[    1.114667] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.121841] pci 0000:02:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.128987] pci 0000:02:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.136304] pci 0000:02:00.0: supports D1 D2
[    1.140506] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.147084] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.163126] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.168286] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.174384] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    1.181100] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x604fffff pref]
[    1.188249] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.194900] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.201440] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.208330] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.214927] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.221834] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.228546] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    1.235747] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    1.242483] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x604fffff pref]
[    1.249667] pci 0000:00:00.0: BAR 1: assigned [mem 0x60500000-0x6050ffff]
[    1.256374] pci 0000:00:01.0: BAR 1: assigned [mem 0x60510000-0x6051ffff]
[    1.263132] pci 0000:00:00.0: BAR 7: assigned [io  0x0000-0x0fff]
[    1.269154] pci 0000:00:01.0: BAR 7: assigned [io  0x1000-0x1fff]
[    1.275234] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff]
[    1.281974] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.286866] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.292939] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.299682] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.306835] pci 0000:02:00.0: BAR 0: assigned [mem 0x60300000-0x603fffff 64bit pref]
[    1.314561] pci 0000:02:00.0: BAR 2: assigned [mem 0x60400000-0x60403fff 64bit pref]
[    1.322241] pci 0000:02:00.0: BAR 4: assigned [mem 0x60404000-0x60404fff 64bit pref]
[    1.329942] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.334817] pci 0000:00:01.0:   bridge window [io  0x1000-0x1fff]
[    1.340891] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    1.347604] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x604fffff pref]
[    1.356400] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    1.364603] printk: console [ttyS0] disabled
[    1.368920] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    1.377964] printk: console [ttyS0] enabled
[    1.377964] printk: console [ttyS0] enabled
[    1.386230] printk: bootconsole [early0] disabled
[    1.386230] printk: bootconsole [early0] disabled
[    1.399167] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    1.405859] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[    1.411116] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.417493] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
[    1.424830] OF: Bad cell count for /palmbus@1e000000/spi@b00/flash@0/partitions
[    1.432419] Creating 4 MTD partitions on "spi0.0":
[    1.437219] 0x000000000000-0x000000030000 : "u-boot"
[    1.443376] 0x000000030000-0x000000040000 : "config"
[    1.449399] 0x000000040000-0x000000050000 : "factory"
[    1.455642] 0x000000050000-0x000001000000 : "firmware"
[    1.462076] 2 uimage-fw partitions found on MTD device firmware
[    1.468009] Creating 2 MTD partitions on "firmware":
[    1.472994] 0x000000000000-0x0000002bbf39 : "kernel"
[    1.477945] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    1.487535] 0x0000002bbf39-0x000000fb0000 : "rootfs"
[    1.492587] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    1.502822] mtd: setting mtd5 (rootfs) as root device
[    1.508004] 1 squashfs-split partitions found on MTD device rootfs
[    1.514244] 0x0000006b0000-0x000000fb0000 : "rootfs_data"
[    1.662414] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.674893] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    1.684866] i2c_dev: i2c /dev entries driver
[    1.692193] NET: Registered PF_INET6 protocol family
[    1.699615] Segment Routing with IPv6
[    1.703362] In-situ OAM (IOAM) with IPv6
[    1.707365] NET: Registered PF_PACKET protocol family
[    1.712836] 8021q: 802.1Q VLAN Support v1.8
[    1.722899] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.746308] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.753937] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.754927] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=23)
[    1.774326] mt7530-mdio mdio-bus:1f lan (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=24)
[    1.787458] DSA: tree 0 setup
[    1.800716] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.811906] Freeing unused kernel image (initmem) memory: 1260K
[    1.817852] This architecture does not have kernel memory protection.
[    1.824305] Run /sbin/init as init process
[    2.459044] init: Console is alive
[    2.463031] init: - watchdog -
[    3.403897] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.474708] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.492613] init: - preinit -
[    4.647570] random: jshn: uninitialized urandom read (4 bytes read)
[    4.782410] random: jshn: uninitialized urandom read (4 bytes read)
[    4.817119] random: jshn: uninitialized urandom read (4 bytes read)
[    5.073407] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    5.086467] mt7530-mdio mdio-bus:1f lan: configuring for phy/gmii link mode
[    5.093626] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.102136] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
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
[    7.357477] jffs2: notice: (363) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (0 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
[    7.375613] mount_root: switching to jffs2 overlay
[    7.391197] overlayfs: upper fs does not support tmpfile.
[    7.408120] urandom-seed: Seeding with /etc/urandom.seed
[    7.540744] procd: - early -
[    7.543872] procd: - watchdog -
[    8.152609] procd: - watchdog -
[    8.156405] procd: - ubus -
[    8.244614] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.253208] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.267624] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.279136] procd: - init -
Please press Enter to activate this console.
[    8.965346] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.217459] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[    9.224992] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[    9.540644] pci 0000:00:01.0: enabling device (0006 -> 0007)
[    9.546328] mt7615e 0000:02:00.0: enabling device (0000 -> 0002)
[    9.638853] PPP generic driver version 2.4.2
[    9.645458] NET: Registered PF_PPPOX protocol family
[    9.661994] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.924156] random: jshn: uninitialized urandom read (4 bytes read)
[    9.935301] random: jshn: uninitialized urandom read (4 bytes read)
[   10.368990] urngd: v1.0.2 started.
[   10.984391] random: jshn: uninitialized urandom read (4 bytes read)
[   11.003688] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.151486] mt7615e 0000:02:00.0: mediatek/mt7663pr2h.bin not found, switching to mediatek/mt7663pr2h_rebb.bin
[   11.387369] mt7615e 0000:02:00.0: failed to load mediatek/mt7663pr2h_rebb.bin
[   11.504006] random: crng init done
[   11.507437] random: 35 urandom warning(s) missed due to ratelimiting
[   18.670798] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   18.698758] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   18.707207] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   18.716306] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   18.728228] mt7530-mdio mdio-bus:1f lan: configuring for phy/gmii link mode
[   18.738277] br-lan: port 1(lan) entered blocking state
[   18.743545] br-lan: port 1(lan) entered disabled state
[   18.751755] device lan entered promiscuous mode
[   18.756351] device eth0 entered promiscuous mode
[   18.791768] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   19.792684] br-lan: port 2(phy0-ap0) entered blocking state
[   19.798319] br-lan: port 2(phy0-ap0) entered disabled state
[   19.804639] device phy0-ap0 entered promiscuous mode
[   21.933747] mt7530-mdio mdio-bus:1f lan: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.941704] br-lan: port 1(lan) entered blocking state
[   21.946831] br-lan: port 1(lan) entered forwarding state
[   21.952878] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   23.868863] do_page_fault(): sending SIGSEGV to ujail for invalid read access from 00000036
[   23.877370] epc = 77dadd0b in libubox.so.20230523[77daa000+1f000]
[   23.883597] ra  = 5555482b in ujail[55550000+14000]

Multiple topics, lets have a look:

  • Regarding GPIO, usually I use the script "static" from https://openwrt.org/docs/techref/hardware/port.gpio. Can you try that or provide the output of your script?
  • Regarding boot, the message mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only looks strange. Are you sure that you're using the same flash layout as the OEM partition? Maybe you can compare it to the serial output of an OEM bootlog. Update: Compared with the device tree from the OEM firmware, the layout looks valid
  • Regarding Wifi: Maybe the calibration data are on a different position/partition in your device, can you check the content of the factory partition?

I have 3 GPIO chips here (base is equal to numerical), all with 32 GPIO pins (assuming 96 in total), and I can control LEDs 2,4,6, and LEDS 1

I added to static script delay to better handle error messages.

root@OpenWrt:/# ls -1a  /sys/class/gpio
.
..
export
gpiochip416
gpiochip448
gpiochip480
unexport

root@OpenWrt:/# cat /sys/class/gpio/gpiochip*/base
416
448
480

root@OpenWrt:/# cat /sys/class/gpio/gpiochip*/ngpio
32
32
32

root@OpenWrt:/# /tmp/gpio-static.sh 0 96 0
[GPIO416] Trying value 0
[GPIO417] Trying value 0
[GPIO418] Trying value 0
[GPIO419] Trying value 0
[GPIO420] Trying value 0
[GPIO421] Trying value 0
[GPIO422] Trying value 0
[GPIO423] Trying value 0
[GPIO424] Trying value 0
[GPIO425] Trying value 0
[GPIO426] Trying value 0
[GPIO427] Trying value 0
[GPIO428] Trying value 0
[GPIO429] Trying value 0
[GPIO430] Trying value 0
[GPIO431] Trying value 0
[GPIO432] Trying value 0
[GPIO433] Trying value 0
[GPIO434] Trying value 0
[GPIO435] Trying value 0
[GPIO436] Trying value 0
[GPIO437] Trying value 0
[GPIO438] Trying value 0
[GPIO439] Trying value 0
[GPIO440] Trying value 0
[GPIO441] Trying value 0
[GPIO442] Trying value 0
[GPIO443] Trying value 0
[GPIO444] Trying value 0
[GPIO445] Trying value 0
[GPIO446] Trying value 0
[GPIO447] Trying value 0
[GPIO448] Trying value 0
[GPIO449] Trying value 0
[GPIO450] Trying value 0
[GPIO451] Trying value 0
[GPIO452] Trying value 0
[GPIO453] Trying value 0
[GPIO454] Trying value 0
[GPIO455] Trying value 0
[GPIO456] Trying value 0
[GPIO457] Trying value 0
[GPIO458] Trying value 0
[GPIO459] Trying value 0
[GPIO460] Trying value 0
[GPIO461] Trying value 0
[GPIO462] Trying value 0
[GPIO463] Trying value 0
[GPIO464] Trying value 0
[GPIO465] Trying value 0
[GPIO466] Trying value 0
[GPIO467] Trying value 0
[GPIO468] Trying value 0
[GPIO469] Trying value 0
[GPIO470] Trying value 0
[GPIO471] Trying value 0
[GPIO472] Trying value 0
[GPIO473] Trying value 0
[GPIO474] Trying value 0
[GPIO475] Trying value 0
[GPIO476] Trying value 0
[GPIO477] Trying value 0
[GPIO478] Trying value 0
[GPIO479] Trying value 0
[GPIO480] Trying value 0
[GPIO481] Trying value 0
[GPIO482] Trying value 0
[GPIO483] Trying value 0
[GPIO484] Trying value 0
[GPIO485] Trying value 0
[GPIO486] Trying value 0
[GPIO487] Trying value 0
[GPIO488] Trying value 0
[GPIO489] Trying value 0
[GPIO490] Trying value 0
[GPIO491] Trying value 0
[GPIO492] Trying value 0
[GPIO493] Trying value 0
[GPIO494] Trying value 0
[GPIO495] Trying value 0
[GPIO496] Trying value 0
[GPIO497] Trying value 0
[GPIO498] Trying value 0
sh: write error: Resource busy
/tmp/gpio-static.sh: line 9: can't create gpio498/direction: nonexistent directory
/tmp/gpio-static.sh: line 10: can't create gpio498/value: nonexistent directory
sh: write error: Invalid argument
[GPIO499] Trying value 0
sh: write error: Resource busy
/tmp/gpio-static.sh: line 9: can't create gpio499/direction: nonexistent directory
/tmp/gpio-static.sh: line 10: can't create gpio499/value: nonexistent directory
sh: write error: Invalid argument
[GPIO500] Trying value 0
[GPIO501] Trying value 0
[GPIO502] Trying value 0
[GPIO503] Trying value 0
[GPIO504] Trying value 0
[GPIO505] Trying value 0
[GPIO506] Trying value 0
[GPIO507] Trying value 0
[GPIO508] Trying value 0
[GPIO509] Trying value 0
[GPIO510] Trying value 0
[GPIO511] Trying value 0
[GPIO512] Trying[ 1355.452979] invalid GPIO 512
 value 0
[ 1355.457059] export_store: invalid GPIO 512
sh: write error:[ 1355.462467] invalid GPIO 512
 Invalid argumen[ 1355.466349] unexport_store: invalid GPIO 512
t
/tmp/gpio-static.sh: line 9: can't create gpio512/direction: nonexistent directory
/tmp/gpio-static.sh: line 10: can't create gpio512/value: nonexistent directory
sh: write error: Invalid argument





Ok, means LED 1,2,4 and 6 are working (can be controlled via GPIO) but 3,5 and 7 cant? Do you know if the not working pins are really GPIO pins or directly connected to the PHY? Is there any activity on 3,5 or 7 if you connect the corresponding port?

It seems that GPIO498 and GPIO499 that are firing sh: write error: Resource busy event may be the LEDs, but busy with some sort of driver, I'will try to discover schematic later. IMO, not the most important thing among other problems.

UPD: The original FW has option "LED SWITCH", which seems to disable WI-FI led (LED7), which I could not enable\disable using GPIO

Boot logs on original fw CF-EW72V2-V2.6.0.1 part 1

U-Boot 2018.09-gbef8015-dirty (Dec 09 2020 - 06:28:07 -0500)

CPU:   MediaTek MT7621AT ver 1, eco 3
Clocks: CPU: 880MHz, DDR: 1200MHz, Bus: 220MHz, XTAL: 40MHz
Model: MediaTek MT7621 reference board
DRAM:  128 MiB
Loading Environment from SPI Flash... SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    uartlite0@1e000c00
Out:   uartlite0@1e000c00
Err:   uartlite0@1e000c00
Net:
Warning: eth@1e100000 (eth0) using random MAC address - 5e:69:c8:f8:cf:5b
eth0: eth@1e100000
Hit any key to stop autoboot:  0
Using eth@1e100000 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'firmware_auto.bin'.
Load address: 0x80010000
Loading: *
ARP Retry count exceeded; starting again

*** TFTP client failure: -110 ***
*** Operation Aborted! ***

  *** U-Boot Boot Menu ***

     1. Startup system (Default)
     2. Upgrade firmware
     3. Upgrade bootloader
     4. Upgrade bootloader (advanced mode)
     5. Load image
     0. U-Boot console


  Press UP/DOWN to move, ENTER to select
## Booting kernel from Legacy Image at bfc50000 ...
   Image Name:   MIPS LEDE Linux-4.4.198
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1753284 Bytes = 1.7 MiB
   Load Address: 81001000
   Entry Point:  81001000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
[    0.000000] Linux version 4.4.198 (luojiaqiang@comfast-devel-machine) (gcc version 5.5.0 (LEDE GCC 5.5.0 r429-2c4d696a) ) #0 SMP Tue Mar 2 00:47:59 2021
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is COMFAST CF-A560V2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000000ffffff]
[    0.000000]   Normal   [mem 0x0000000001000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] PERCPU: Embedded 10 pages/cpu @81693000 s8544 r8192 d24224 u40960
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00020842
[    0.000000] Readback ErrCtl register=00020842
[    0.000000] Memory: 124060K/131072K available (4112K kernel code, 203K rwdata, 904K rodata, 208K init, 201K bss, 7012K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000008] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.007777] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.070402] pid_max: default: 32768 minimum: 301
[    0.075114] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081639] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    1.680918] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    1.680928] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    1.680939] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    1.681088] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.177572] Synchronize counters for CPU 1: done.
[    1.463681] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    1.463687] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    1.463695] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    1.463763] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.267948] Synchronize counters for CPU 2: done.
[    1.553789] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    1.553795] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    1.553801] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    1.553882] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.353127] Synchronize counters for CPU 3: done.
[    0.357866] Brought up 4 CPUs
[    0.365395] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.375186] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.381493] pinctrl core: initialized pinctrl subsystem
[    0.387245] NET: Registered protocol family 16
[    0.427016] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.432679] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.438280] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.444445] mt7621-pci 1e140000.pcie: Failed to get gpio for PCIe1
[    0.450571] mt7621-pci 1e140000.pcie: Failed to get gpio for PCIe2
[    1.057708] PCIe port 2 link down
[    1.060937] PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.100537] PCI host bridge to bus 0000:00
[    1.104575] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.111423] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.118215] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.124967] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.133638] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.141572] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.150969] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.157678] pci 0000:00:01.0: BAR 9: assigned [mem 0x60100000-0x602fffff pref]
[    1.164834] pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff]
[    1.171585] pci 0000:00:01.0: BAR 1: assigned [mem 0x60310000-0x6031ffff]
[    1.178314] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff]
[    1.185060] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.189970] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.196731] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit pref]
[    1.204417] pci 0000:02:00.0: BAR 2: assigned [mem 0x60200000-0x60203fff 64bit pref]
[    1.212120] pci 0000:02:00.0: BAR 4: assigned [mem 0x60204000-0x60204fff 64bit pref]
[    1.219791] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.224716] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x602fffff pref]
[    1.233607] clocksource: Switched to clocksource GIC
[    1.240339] NET: Registered protocol family 2
[    1.245476] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.252351] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    1.258689] TCP: Hash tables configured (established 1024 bind 1024)
[    1.265046] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.270792] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.277293] NET: Registered protocol family 1
[    1.295994] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.301749] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.314629] io scheduler noop registered
[    1.318469] io scheduler deadline registered (default)
[    1.325148] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    1.332433] console [ttyS0] disabled
[    1.336021] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 33, base_baud = 3125000) is a 16550A
[    1.345004] console [ttyS0] enabled
[    1.345004] console [ttyS0] enabled
[    1.351893] bootconsole [early0] disabled
[    1.351893] bootconsole [early0] disabled
[    1.360373] 1e000d00.uartfull: ttyS1 at MMIO 0x1e000d00 (irq = 34, base_baud = 3125000) is a 16550A
[    1.371596] mt7621_wdt 1e000100.wdt: Initialized
[    1.377570] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[    1.383017] 4 ofpart partitions found on MTD device spi32766.0
[    1.388909] Creating 4 MTD partitions on "spi32766.0":
[    1.394087] 0x000000000000-0x000000030000 : "Bootloader"
[    1.400828] 0x000000030000-0x000000040000 : "Config"
[    1.407109] 0x000000040000-0x000000050000 : "factory"
[    1.413412] 0x000000050000-0x000001000000 : "firmware"
[    1.440834] no rootfs found after FIT image in "firmware"
[    1.488034] 2 uimage-fw partitions found on MTD device firmware
[    1.493991] 0x000000050000-0x0000001fc104 : "kernel"
[    1.500144] 0x0000001fc104-0x000001000000 : "rootfs"
[    1.506221] mtd: device 5 (rootfs) set to be root filesystem
[    1.511972] 1 squashfs-split partitions found on MTD device rootfs
[    1.518189] 0x000000900000-0x000001000000 : "rootfs_data"
[    1.525227] libphy: Fixed MDIO Bus: probed
[    1.563842] libphy: mdio: probed
[    1.568120] mtk_soc_eth 1e100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.579325] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 10
[    1.588366] mtk_soc_eth 1e100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
[    1.599549] mtk_soc_eth 1e100000.ethernet eth1: mediatek frame engine at 0xbe100000, irq 10
[    1.610379] NET: Registered protocol family 10
[    1.616297] NET: Registered protocol family 17
[    1.620817] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.633476] 8021q: 802.1Q VLAN Support v1.8
[    1.673710] mt753x gsw: Switch is MediaTek MT7530 rev 1
[    1.700425] libphy: mt753x_mdio: probed
[    1.710371] hctosys: unable to open rtc device (rtc0)
[    1.724415] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.732012] Freeing unused kernel memory: 208K
[    1.736501] This architecture does not have kernel memory protection.
[    2.402888] init: Console is alive
[    2.406621] init: - watchdog -
[    4.522346] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.631201] Ralink/MTK WiFi EEPROM API Driver loaded.
[    4.645159] SCSI subsystem initialized
[    4.656464] mediatek_soc_hnat 1e100000.hnat: wan = eth1
[    4.661707] mediatek_soc_hnat 1e100000.hnat: ppd = eth0
[    4.666977] mediatek_soc_hnat 1e100000.hnat: gmac num = 2
[    4.672377] mediatek_soc_hnat 1e100000.hnat: foe etry num cfg = 2
[    4.679910] mediatek_soc_hnat 1e100000.hnat: FOE entry number = 4096
[    4.686914] mediatek_soc_hnat 1e100000.hnat: hwnat start
[    4.692957] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.703944] init: - preinit -
[    4.981039] mt753x gsw: Port 1 Link is Up - 1Gbps/Full
[    4.989392] random: procd: uninitialized urandom read (4 bytes read, 95 bits of entropy available)
ifconfig: SIOCSIFHWADDR: Cannot assign requested address
[    5.674991] random: mktemp: uninitialized urandom read (6 bytes read, 117 bits of entropy available)
[    5.689012] random: mktemp: uninitialized urandom read (6 bytes read, 117 bits of entropy available)
[    5.702996] random: mktemp: uninitialized urandom read (6 bytes read, 118 bits of entropy available)
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.865818] random: nonblocking pool is initialized
[    7.929604] jffs2: notice: (489) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.947147] mount_root: switching to jffs2 overlay
[    7.962571] urandom-seed: Seeding with /etc/urandom.seed
[    8.152700] procd: - early -
[    8.155812] procd: - watchdog -
[    8.803769] procd: - watchdog -
[    8.807238] procd: - ubus -
[    8.867095] procd: - init -
Please press Enter to activate this console.
[    9.201703] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.234997] Initializing XFRM netlink socket
[    9.241044] NET: Registered protocol family 15
[    9.250415] l2tp_core: L2TP core driver, V2.0
[    9.256030] l2tp_netlink: L2TP netlink interface
[    9.265991] gre: GRE over IPv4 demultiplexor driver
[    9.272692] ip_gre: GRE over IPv4 tunneling driver
[    9.284320] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.298658] Netfilter messages via NETLINK v0.30.
[    9.307810] ip_set: protocol 6
[    9.347596] i2c /dev entries driver
[    9.364863] u32 classifier
[    9.367626]     input device check on
[    9.371344]     Actions configured
[    9.377705] Mirror/redirect action on
[    9.393647] nf_conntrack version 0.5.0 (1941 buckets, 7764 max)
[   10.287324] register mt_drv
[   10.295756]
[   10.295756]
[   10.295756] === pAd = c0801000, size = 2175376 ===
[   10.295756]
[   10.305348] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x
[   10.312017] <-- RTMPAllocAdapterBlock, Status=0
[   10.316568] pAd->CSRBaseAddress =0xc0700000, csr_addr=0xc0700000!
[   10.322663] device_id =0x7603
[   10.325651] RtmpChipOpsHook(474): Not support for HIF_MT yet!
[   10.331393] mt7603_init()-->
[   10.334288] mt_bcn_buf_init(224): Not support for HIF_MT yet!
[   10.340028] <--mt7603_init()
[   10.343172] match_index_by_chipname() MT7603 found as INDEX0
[   10.348914] l1set_profile_path() profile update from /etc/wireless/mt7603e/mt7603.dat to /tmp/profiles/rt2860v2_2g.dat
[   10.359682] l1set_eeprom_offset() eeprom offset remain 0x0
[   10.365218] l1set_eeprom_size() eeprom size remain 0x200
[   10.370554] l1set_ifname() ifname rename from ra0 to ra
[   10.375790] l1set_ifname() ifname remain ra
[   10.379998] l1set_ifname() ifname remain ra
[   10.384224] l1set_ifname() ifname remain apcli
[   12.416403] register mt7663
[   12.431205]
[   12.431205]
[   12.431205] === pAd = c1001000, size = 4880672 ===
[   12.431205]
[   12.441368] <-- RTMPAllocAdapterBlock, Status=0
[   12.445956] pAd->PciHif.CSRBaseAddress =0xc0f00000, csr_addr=0xc0f00000!
[   12.452664] RTMPInitPCIeDevice():device_id=0x7663
[   12.457390] mt_pci_chip_cfg(): HWVer=0x8b10, FWVer=0x8a01, pAd->ChipID=0x7663
[   12.464550] mt7663_init()-->
[   12.467444] <--mt7663_init()
[   12.471379] <-- RTMPAllocTxRxRingMemory, Status=0
[   12.476151] get_wdev_by_idx: invalid idx(0)
[   12.480341] get_wdev_by_idx: invalid idx(0)
[   12.485715] get_wdev_by_idx: invalid idx(0)
[   12.489903] get_wdev_by_idx: invalid idx(0)
[   12.494113] get_wdev_by_idx: invalid idx(0)
[   12.498293] get_wdev_by_idx: invalid idx(0)
[   12.503680] get_wdev_by_idx: invalid idx(0)
[   12.563907] Bridge firewalling registered
[   12.581813] Ebtables v2.0 registered
[   12.588902] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.698499] get_wdev_by_idx: invalid idx(0)
[   12.708594] get_wdev_by_idx: invalid idx(0)
[   12.877007] xt_time: kernel timezone is -0000
[   12.901172] PPP generic driver version 2.4.2
[   12.906684] PPP MPPE Compression module registered
[   12.912693] NET: Registered protocol family 24
[   12.918485] PPTP driver version 0.8.5
[   12.926466] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   12.933970] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.709577] sysctl (959): drop_caches: 3
[   16.085152] mt753x gsw: Port 1 Link is Up - 1Gbps/Full
[   18.569500] get_wdev_by_idx: invalid idx(0)
[   19.069971] device eth1.1 entered promiscuous mode
[   19.074848] device eth1 entered promiscuous mode
[   19.087363] br-lan: port 1(eth1.1) entered forwarding state
[   19.093101] br-lan: port 1(eth1.1) entered forwarding state
[   19.135378] device eth1.2 entered promiscuous mode
[   19.157945] br-wan: port 1(eth1.2) entered forwarding state
[   19.163707] br-wan: port 1(eth1.2) entered forwarding state
[   20.533502] get_wdev_by_idx: invalid idx(0)
[   20.543750] get_wdev_by_idx: invalid idx(0)
[   21.083620] br-lan: port 1(eth1.1) entered forwarding state
[   21.163605] br-wan: port 1(eth1.2) entered forwarding state
[   22.064711] get_wdev_by_idx: invalid idx(0)
[   22.069118] get_wdev_by_idx: invalid idx(0)
[   23.084156] get_wdev_by_idx: invalid idx(0)
[   23.088394] get_wdev_by_idx: invalid idx(0)
[   24.094128] get_wdev_by_idx: invalid idx(0)
[   24.098365] get_wdev_by_idx: invalid idx(0)
[   25.104083] get_wdev_by_idx: invalid idx(0)
[   25.108314] get_wdev_by_idx: invalid idx(0)
[   26.114136] get_wdev_by_idx: invalid idx(0)
[   26.118371] get_wdev_by_idx: invalid idx(0)
[   27.124111] get_wdev_by_idx: invalid idx(0)
[   27.128350] get_wdev_by_idx: invalid idx(0)
[   28.134069] get_wdev_by_idx: invalid idx(0)
[   28.138296] get_wdev_by_idx: invalid idx(0)
[   29.144065] get_wdev_by_idx: invalid idx(0)
[   29.148292] get_wdev_by_idx: invalid idx(0)
[   30.154065] get_wdev_by_idx: invalid idx(0)
[   30.158293] get_wdev_by_idx: invalid idx(0)
[   30.925439] rai0: ===> main_virtual_if_open
[   30.929649] get_wdev_by_idx: invalid idx(0)
[   30.933885] get_wdev_by_idx: invalid idx(0)
[   30.938072] get_wdev_by_idx: invalid idx(0)
[   30.942251] get_wdev_by_idx: invalid idx(0)
[   30.947537] get_wdev_by_idx: invalid idx(0)
[   30.951790] get_wdev_by_idx: invalid idx(0)
[   33.975763] SSID[0]=COMFAST_6556_5G, EdcaIdx=0
[   33.982049] cfg_mode=14
[   33.984609] cfg_mode=14
[   33.987059] cfg_mode=14
[   33.989512] wmode_band_equal(): Band Equal!
[   33.993897] auto_ch_select_set_cfg(): BandIdx0, AutoChannelAtBootup=0, AutoChannelAlg = 0


Boot logs on original fw CF-EW72V2-V2.6.0.1 part 2

[   34.002340] BssIdx(0) wdev->channel=149
[   34.006239] BssIdx(1) wdev->channel=149
[   34.010076] BssIdx(2) wdev->channel=149
[   34.013965] BssIdx(3) wdev->channel=149
[   34.017803] BssIdx(4) wdev->channel=149
[   34.021635] BssIdx(5) wdev->channel=149
[   34.025530] BssIdx(6) wdev->channel=149
[   34.029367] BssIdx(7) wdev->channel=149
[   34.033199] Index0 Channel=149
[   34.037302] BandSteering=0
[   34.040274] [TxPower] BAND0: 100
[   34.043853] [SKUenable] BAND0: 0
[   34.047346] [PERCENTAGEenable] BAND0: 0
[   34.051261] [BFBACKOFFenable] BAND0: 0
[   34.055721] profile: FragThreshold[0]=2346
[   34.060087] APEdca0
[   34.062362] APEdca1
[   34.064720] APEdca2
[   34.067000] APEdca3
[   34.077992] DfsZeroWait Support=0/0
[   34.082446] DfsZeroWaitCacTime=255/255
[   34.086823] read_itxbf: ITxBfEn = 1
[   34.090310] read_itxbf: BSSID[0]
[   34.093579] read_itxbf: MBSS[0] ITxBfEn = 1
[   34.097768] read_itxbf: More BSSID[1]
[   34.101427] read_itxbf: More MBSS[1] ITxBfEn = 1
[   34.106074] read_itxbf: More BSSID[2]
[   34.109741] read_itxbf: More MBSS[2] ITxBfEn = 1
[   34.114392] read_itxbf: More BSSID[3]
[   34.118059] read_itxbf: More MBSS[3] ITxBfEn = 1
[   34.122671] read_itxbf: More BSSID[4]
[   34.126366] read_itxbf: More MBSS[4] ITxBfEn = 1
[   34.130986] read_itxbf: More BSSID[5]
[   34.134683] read_itxbf: More MBSS[5] ITxBfEn = 1
[   34.139304] read_itxbf: More BSSID[6]
[   34.142962] read_itxbf: More MBSS[6] ITxBfEn = 1
[   34.147611] read_itxbf: More BSSID[7]
[   34.151278] read_itxbf: More MBSS[7] ITxBfEn = 1
[   34.155984] read_itxbf: Common.ITxBfEn = 1
[   34.160193] read_etxbf: ETxBfEnCond = 1
[   34.164073] read_etxbf: BSSID[0]
[   34.167307] read_etxbf: MBSS[0] ETxBfEnCond = 1
[   34.171834] read_etxbf: More BSSID[1]
[   34.175527] read_etxbf: More MBSS[1] ETxBfEnCond = 1
[   34.180496] read_etxbf: More BSSID[2]
[   34.184191] read_etxbf: More MBSS[2] ETxBfEnCond = 1
[   34.189159] read_etxbf: More BSSID[3]
[   34.192819] read_etxbf: More MBSS[3] ETxBfEnCond = 1
[   34.197814] read_etxbf: More BSSID[4]
[   34.201481] read_etxbf: More MBSS[4] ETxBfEnCond = 1
[   34.206483] read_etxbf: More BSSID[5]
[   34.210152] read_etxbf: More MBSS[5] ETxBfEnCond = 1
[   34.215150] read_etxbf: More BSSID[6]
[   34.218817] read_etxbf: More MBSS[6] ETxBfEnCond = 1
[   34.223818] read_etxbf: More BSSID[7]
[   34.227492] read_etxbf: More MBSS[7] ETxBfEnCond = 1
[   34.233165] [RTMPSetProfileParameters]Disable DFS/Zero wait=0/0
[   34.270836] [PMF]Set_PMFMFPC_Proc:: apidx=0, Desired MFPC=0
[   34.276580] [PMF]Set_PMFMFPR_Proc:: apidx=0, Desired MFPR=0
[   34.282301] [PMF]Set_PMFSHA256_Proc:: apidx=0, Desired PMFSHA256=0
[   34.300238] HT: WDEV[0] Ext Channel = ABOVE
[   34.304710] HT: greenap_cap = 0
[   34.335802] WtcSetMaxStaNum: MaxStaNum:100, BssidNum:8, WdsNum:0, ApcliNum:1, MaxNumChipRept:24, MinMcastWcid:126
[   34.346160] Top Init Done!
[   34.348873] Use dev_alloc_skb
[   34.352754] RX[0] DESC a0f2c000 size = 2048
[   34.357253] RX[1] DESC a0f2d000 size = 2048
[   34.361598] cut_through_init(): ct sw token number = 2047
[   34.367290] cut_through_token_list_init(): TokenList inited done!id_head/tail=0/2048
[   34.375071] cut_through_token_list_init(): 80ec3688,80ec3688
[   34.380975] cut_through_token_list_init(): TokenList inited done!id_head/tail=0/2048
[   34.388754] cut_through_token_list_init(): 80ec3698,80ec3698
[   34.394490] Hif Init Done!
[   34.397203] ctl->txq = c14a2dd0
[   34.400338] ctl->rxq = c14a2ddc
[   34.403473] ctl->ackq = c14a2de8
[   34.406730] ctl->kickq = c14a2df4
[   34.410050] ctl->tx_doneq = c14a2e00
[   34.413658] ctl->rx_doneq = c14a2e0c
[   34.417299] mt7663_fw_prepare():using E2 ROM patch
[   34.422087] mt7663_fw_prepare():using E2 firmware
[   34.426858] Parsing patch header
[   34.430089]  Built date: 2009041715da1a1
[   34.434113]
[   34.435600]  Platform: 7663
[   34.438404]  HW/SW version: 0x65322d31
[   34.442172]  Patch version: 0x3830328a
[   34.445986]  Target address: 0xdc000, length: 211488
[   34.451104] patch is not ready && get semaphore success
[   34.456398] Start address = 0xdc000, DL length = 211488, Data mode = 0x80000000
[   34.463863] EventGenericEventHandler: CMD Success
[   34.468613] MtCmdAddressLenReq:(ret = 0)
[   34.474770] MtCmdPatchFinishReq
[   34.478820] EventGenericEventHandler: CMD Success
[   34.483804] release patch semaphore
[   34.487316] Parsing CPU 0 fw tailer
[   34.490803]  Chip ID: 0x08
[   34.493573]  Eco version: 0x01
[   34.496644]  Region number: 0x03
[   34.499878]  Format version: 0x02
[   34.503197]  Format flag: 0x01
[   34.506335]  Ram version: 7663mp1827
[   34.509944]  Built date: 20200904171623
[   34.513967]  Common crc: 0xa3c3110b
[   34.517452] Parsing tailer region 0
[   34.520935]  Decomp crc: 0x0
[   34.523850]  Decomp size: 0x0
[   34.526819]  Decomp block size: 0x0
[   34.530303]  Target address: 0x112c00
[   34.533997]  Download size: 273584
[   34.537400]  Feature set: 0x27
[   34.540462] Parsing tailer region 1
[   34.543987]  Decomp crc: 0x0
[   34.546877]  Decomp size: 0x0
[   34.549839]  Decomp block size: 0x0
[   34.553321]  Target address: 0x2018400
[   34.557137]  Download size: 57616
[   34.560456]  Feature set: 0x07
[   34.563518] Parsing tailer region 2
[   34.567045]  Decomp crc: 0x0
[   34.569922]  Decomp size: 0x0
[   34.572883]  Decomp block size: 0x0
[   34.576395]  Target address: 0x40100000
[   34.580227]  Download size: 14736
[   34.583559]  Feature set: 0x07
[   34.586630]  Release info: header tag = 0, total length = 88
[   34.592288]  tag 1, padding length = 1, tag length = 83
[   34.597533]  payload: t-neptune-main-mt7663e2-1949-MT7663_E2_ASIC_ROM_RAM_Retail_Broadband-20200904171503
[   34.607426] Start address = 0x112c00, DL length = 273584, Data mode = 0x8000000f
[   34.614952] EventGenericEventHandler: CMD Success
[   34.619686] MtCmdAddressLenReq:(ret = 0)
[   34.626723] Start address = 0x2018400, DL length = 57616, Data mode = 0x8000000f
[   34.634363] EventGenericEventHandler: CMD Success
[   34.639110] MtCmdAddressLenReq:(ret = 0)
[   34.643763] Start address = 0x40100000, DL length = 14736, Data mode = 0x8000000f
[   34.651353] EventGenericEventHandler: CMD Success
[   34.656127] MtCmdAddressLenReq:(ret = 0)
[   34.660222] MtCmdFwStartReq: override = 0x1, address = 0x112c00
[   34.705622] EventGenericEventHandler: CMD Success
[   34.710371] MCU Init Done!
[   34.713084] efuse_probe: efuse = 511161
[   34.716951] RtmpChipOpsEepromHook::e2p_type=2, inf_Type=5
[   34.722356] RtmpEepromGetDefault::e2p_dafault=1
[   34.726918] RtmpChipOpsEepromHook: E2P type(2), E2pAccessMode = 2, E2P default = 1
[   34.734518] NVM is FLASH mode. dev_idx [0] FLASH OFFSET [0x8000]
[   34.740530] EEPROM:Read from [factory] offset 0x8000,length 0x800.
[   34.748518] validFlashEepromID(): eeFlashId=7663, pAd->ChipID=7663
[   36.387054] Country Region from e2p = 0
[   36.390912] mt7663_antenna_default_reset() todo
[   36.395504] RTMPReadTxPwrPerRate(444): Don't Support this now!
[   36.401345] RcRadioInit(): DbdcMode=0, ConcurrentBand=1
[   36.406617] RcRadioInit(): pRadioCtrl=87d2ad1c,Band=0,rfcap=3,channel=1,PhyMode=2 extCha=0xf
[   36.415103] AntCfgInit(2996): Not support for HIF_MT yet!
[   36.420521] MtReadPwrLimitTable: RF_LOCKDOWN Feature OFF !!!
[   36.426219] MtReadPwrLimitTable: SKU Path: /etc/wireless/mediatek/mt7613e/SingleSKU.dat
[   36.436481] MtReadPwrLimitTable: RF_LOCKDOWN Feature OFF !!!
[   36.442149] MtReadPwrLimitTable: SKU Path: /etc/wireless/mediatek/mt7613e/SingleSKU_BF.dat
[   36.500270] EEPROM Init Done!
[   36.503274] mt_mac_init()-->
[   36.506241] mt_mac_pse_init(2995): Don't Support this now!
[   36.511729] mt7663_init_mac_cr()-->
[   36.515290] mt7663_init_mac_cr(): TMAC_TRCR0=0x82783c92
[   36.520532] MtAsicSetMacMaxLen(1075): Not support for HIF_MT yet!
[   36.526660] <--mt_mac_init()
[   36.534393] CmdRxHdrTransBLUpdateRsp::EventExtCmdResult.u4Status = 0x0
[   36.542592] CmdRxHdrTransBLUpdateRsp::EventExtCmdResult.u4Status = 0x0
[   36.550838] CmdRxHdrTransBLUpdateRsp::EventExtCmdResult.u4Status = 0x0
[   36.557437] MAC Init Done!
[   36.560157] MT7663BBPInit():BBP Initialization.....
[   36.565085]  Band 0: valid=1, isDBDC=0, Band=2, CBW=1, CentCh/PrimCh=1/1, prim_ch_idx=0, txStream=2
[   36.574178]  Band 1: valid=0, isDBDC=0, Band=0, CBW=0, CentCh/PrimCh=0/0, prim_ch_idx=0, txStream=0
[   36.583221] MT7663BBPInit() todo
[   36.586481] PHY Init Done!
[   36.591496] SSID[0]=COMFAST_6556_5G, EdcaIdx=0
[   36.597815] cfg_mode=14
[   36.600261] cfg_mode=14
[   36.602702] cfg_mode=14
[   36.605202] wmode_band_equal(): Band Equal!
[   36.609495] auto_ch_select_set_cfg(): BandIdx0, AutoChannelAtBootup=0, AutoChannelAlg = 0
[   36.617970] BssIdx(0) wdev->channel=149
[   36.621803] BssIdx(1) wdev->channel=149
[   36.625660] BssIdx(2) wdev->channel=149
[   36.629493] BssIdx(3) wdev->channel=149
[   36.633322] BssIdx(4) wdev->channel=149
[   36.637175] BssIdx(5) wdev->channel=149
[   36.641007] BssIdx(6) wdev->channel=149
[   36.644863] BssIdx(7) wdev->channel=149
[   36.648695] Index0 Channel=149
[   36.652708] BandSteering=0
[   36.655703] [TxPower] BAND0: 100
[   36.659193] [SKUenable] BAND0: 0
[   36.662681] [PERCENTAGEenable] BAND0: 0
[   36.666637] [BFBACKOFFenable] BAND0: 0
[   36.671002] profile: FragThreshold[0]=2346
[   36.675393] APEdca0
[   36.677671] APEdca1
[   36.679945] APEdca2
[   36.682219] APEdca3
[   36.693148] DfsZeroWait Support=0/0
[   36.697627] DfsZeroWaitCacTime=255/255
[   36.701932] read_itxbf: ITxBfEn = 1
[   36.705440] read_itxbf: BSSID[0]
[   36.708666] read_itxbf: MBSS[0] ITxBfEn = 1
[   36.712843] read_itxbf: More BSSID[1]
[   36.716525] read_itxbf: More MBSS[1] ITxBfEn = 1
[   36.721138] read_itxbf: More BSSID[2]
[   36.724820] read_itxbf: More MBSS[2] ITxBfEn = 1
[   36.729434] read_itxbf: More BSSID[3]
[   36.733090] read_itxbf: More MBSS[3] ITxBfEn = 1
[   36.737725] read_itxbf: More BSSID[4]
[   36.741384] read_itxbf: More MBSS[4] ITxBfEn = 1
[   36.746021] read_itxbf: More BSSID[5]
[   36.749680] read_itxbf: More MBSS[5] ITxBfEn = 1
[   36.754310] read_itxbf: More BSSID[6]
[   36.757969] read_itxbf: More MBSS[6] ITxBfEn = 1
[   36.762579] read_itxbf: More BSSID[7]
[   36.766262] read_itxbf: More MBSS[7] ITxBfEn = 1
[   36.770876] read_itxbf: Common.ITxBfEn = 1
[   36.775095] read_etxbf: ETxBfEnCond = 1
[   36.778928] read_etxbf: BSSID[0]
[   36.782150] read_etxbf: MBSS[0] ETxBfEnCond = 1
[   36.786701] read_etxbf: More BSSID[1]
[   36.790362] read_etxbf: More MBSS[1] ETxBfEnCond = 1
[   36.795351] read_etxbf: More BSSID[2]
[   36.799010] read_etxbf: More MBSS[2] ETxBfEnCond = 1
[   36.803989] read_etxbf: More BSSID[3]
[   36.807649] read_etxbf: More MBSS[3] ETxBfEnCond = 1
[   36.812606] read_etxbf: More BSSID[4]
[   36.816287] read_etxbf: More MBSS[4] ETxBfEnCond = 1
[   36.821248] read_etxbf: More BSSID[5]
[   36.824930] read_etxbf: More MBSS[5] ETxBfEnCond = 1
[   36.829891] read_etxbf: More BSSID[6]
[   36.833569] read_etxbf: More MBSS[6] ETxBfEnCond = 1
[   36.838531] read_etxbf: More BSSID[7]
[   36.842187] read_etxbf: More MBSS[7] ETxBfEnCond = 1
[   36.847878] [RTMPSetProfileParameters]Disable DFS/Zero wait=0/0
[   36.885509] [PMF]Set_PMFMFPC_Proc:: apidx=0, Desired MFPC=0
[   36.891240] [PMF]Set_PMFMFPR_Proc:: apidx=0, Desired MFPR=0
[   36.896986] [PMF]Set_PMFSHA256_Proc:: apidx=0, Desired PMFSHA256=0
[   36.914845] HT: WDEV[0] Ext Channel = ABOVE
[   36.919298] HT: greenap_cap = 0
[   36.953774] tx_pwr_comp_init():NotSupportYet!
[   36.958359] MtCmdSetMacTxRx:(ret = 0)
[   36.962141] asic_bss_beacon_init(): NotSupportedFunc for this arch(HIF_MT)!
[   36.969157] AsicDisableSync(): NotSupportedFunc for this arch(HIF_MT)!
[   36.975745] MtAsicSetRalinkBurstMode(2221): Not support for HIF_MT yet!
[   36.982423] MtAsicSetPiggyBack(592): Not support for HIF_MT yet!
[   36.988534] WifiFwdSet::disabled=0
[   36.991971] AsicSetPreTbtt(): NotSupportedFunc for this arch(HIF_MT)!
[   36.998445] Main bssid = 00:00:00:00:00:00
[   37.002603] AsicSetRxFilter(): NotSupportedFunc for this arch(HIF_MT)!
[   37.009277] MtCmdSetMacTxRx:(ret = 0)
[   37.013045] AsicSetRxFilter(): NotSupportedFunc for this arch(HIF_MT)!
[   37.019741] MtCmdSetMacTxRx:(ret = 0)
[   37.023449] INIT REDUCE TCP ACK, rai0
[   37.027133] <==== mt_wifi_init, Status=0
[   37.031053] TxBfModuleEnCtrl:It's not DBDC mode
[   37.035676] MtCmdEDCCACtrl: BandIdx: 0, EDCCACtrl: 1
[   37.053631] MSTA_Init (1) ---> ApCli
[   37.057516] Register MSTA IF (apclii0) , pAd->MSTANum = 1
[   37.064118] Caller: SetCommonHT+0xc4/0x130 [mt7663]
[   37.069165]
[   37.069165] phy_mode=49, ch=149, wdev_type=2
[   37.074999] ht_cap: ht_cap->HtCapInfo,
[   37.078875] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   37.086604] ht_cap: ht_cap->HtCapParm,
[   37.090472] mdpu_density=0, ampdu_factor=3
[   37.096296] WtcSetMaxStaNum: MaxStaNum:100, BssidNum:8, WdsNum:0, ApcliNum:1, MaxNumChipRept:24, MinMcastWcid:126
[   38.037604] RedInit: set Driver/N9 RED Enable to 1.
[   38.042525] RedInit: RED Initiailize Done.
[   38.046705] cp_support_is_enabled: set Driver CP_SUPPORT to Mode 2.
[   38.052975] RTMP_COM_IoctlHandle -> CMD_RTPRIV_IOCTL_VIRTUAL_INF_UP
[   38.059266] wifi_sys_open(), wdev idx = 0
[   38.063283] wdev_attr_update(): wdevId0 = e0:e1:a9:6f:65:56
[   38.068930] [BuildChannelList] BandIdx = 0, PhyMode = 49, ChListNum = 13:
[   38.075845]  [RadarStateCheck] RD_NORMAL_MODE
[   38.081317] AsicSwitchChannel(): 5G Channel:155, then must be Channel_Band:1 !!
[   38.137177] Caller: wlan_operate_init+0xf8/0x10c [mt7663]
[   38.142592]
[   38.142592] phy_mode=49, ch=149, wdev_type=1
[   38.148557] ht_cap: ht_cap->HtCapInfo,
[   38.152397] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   38.160065] ht_cap: ht_cap->HtCapParm,
[   38.163919] mdpu_density=4, ampdu_factor=3
[   38.168352] AP inf up for ra_0(func_idx) OmacIdx=0
[   38.173175] AsicRadioOnOffCtrl(): DbdcIdx=0 RadioOn
[   38.178577] ApAutoChannelAtBootUp----------------->
[   38.183456] ApAutoChannelAtBootUp: AutoChannelBootup[0] = 0
[   38.189071] ApAutoChannelAtBootUp<-----------------
[   38.193981]  ap_run_at_boot() : ACS is disable !!
[   38.199438] [PMF]APPMFInit:: apidx=0, MFPC=0, MFPR=0, SHA256=0
[   38.206287] Caller: SetCommonHT+0xc4/0x130 [mt7663]
[   38.211172]
[   38.211172] phy_mode=49, ch=149, wdev_type=1
[   38.216966] ht_cap: ht_cap->HtCapInfo,
[   38.220806] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   38.228480] ht_cap: ht_cap->HtCapParm,
[   38.232315] mdpu_density=4, ampdu_factor=3
[   38.236498] wifi_sys_linkup(), wdev idx = 0
[   38.240692] wtc_acquire_groupkey_wcid: Found a non-occupied wtbl_idx:135 for WDEV_TYPE:1
[   38.240692]  LinkToOmacIdx = 0, LinkToWdevType = 1
[   38.253852] bssUpdateBmcMngRate (BSS_INFO_BROADCAST_INFO), CmdBssInfoBmcRate.u2BcTransmit= 8192, CmdBssInfoBmcRate.u2McTransmit = 8192
[   38.275053] UpdateBeaconHandler, BCN_UPDATE_INIT, OmacIdx = 0
[   38.280841] MtCmdTxPowerSKUCtrl: fgTxPowerSKUEn: 0, BandIdx: 0
[   38.286790] MtCmdTxBfBackoffCtrl: fgTxBFBackoffEn: 0, BandIdx: 0
[   38.292807] MtCmdTxPowerPercentCtrl: fgTxPowerPercentEn: 0, BandIdx: 0
[   38.299443] AsicSetTxStream(): NotSupportedFunc for this arch(HIF_MT)!
[   38.305993] AsicSetRxStream(): NotSupportedFunc for this arch(HIF_MT)!
[   38.321054] apidx 0 for WscUUIDInit
[   38.324592] Generate UUID for apidx(0)
[   38.375430] device rai0 entered promiscuous mode
[   38.380157] br-lan: port 2(rai0) entered forwarding state
[   38.385617] br-lan: port 2(rai0) entered forwarding state
[   40.383568] br-lan: port 2(rai0) entered forwarding state

Seems I got it working with clean build
DTS: mt7621_comfast_cf-ew72-v2.dts

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
    compatible = "comfast,cf-ew72-v2", "mediatek,mt7621-soc";
    model = "COMFAST CF-EW72 V2";

    chosen {
        bootargs = "console=ttyS0,115200";
    };

    keys {
        compatible = "gpio-keys";

        reset {
            label = "reset";
            gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
            linux,code = <KEY_RESTART>;
            debounce-interval = <60>;
        };
    };

    leds {
        compatible = "gpio-leds";
    };

    aliases {
        label-mac-device = &wan;
    };
};

&spi0 {
    status = "okay";

    flash@0 {
        compatible = "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <50000000>;
        m25p,fast-read;

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

            partition@0 {
                label = "Bootloader";
                reg = <0x0 0x30000>;
                read-only;
            };
            
            partition@0x30000 {
                label = "Config";
                reg = <0x30000 0x10000>;
                read-only;
            };
            
            factory: partition@0x40000 {
                label = "factory";
                reg = <0x40000 0x10000>;
                read-only;
            };
            
            partition@0x50000 {
                label = "firmware";
                compatible = "denx,uimage";
                reg = <0x50000 0xfb0000>;
            };
        };
    };
};


&gmac0 {
    nvmem-cells = <&macaddr_factory_e000>;
    nvmem-cell-names = "mac-address";
};


&state_default {
    gpio {
        groups = "i2c", "uart2", "uart3", "sdhci", "jtag";
        function = "gpio";
    };
};

&pcie {
    status = "okay";
};

&pcie0 {
    wifi@0,0 {
        compatible = "mediatek,mt76";
        reg = <0x0000 0 0 0 0>;
        mediatek,mtd-eeprom = <&factory 0x0000>;
        ieee80211-freq-limit = <2400000 2500000>;
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <2>;
    };
};

&pcie1 {
    wifi@0,0 {
        compatible = "mediatek,mt76";
        reg = <0x0000 0 0 0 0>;
        mediatek,mtd-eeprom = <&factory 0x8000>;
        ieee80211-freq-limit = <5000000 6000000>;
        nvmem-cells = <&macaddr_factory_e000>;
        nvmem-cell-names = "mac-address";
        mac-address-increment = <3>;
    };
};

&switch0 {
    ports {
        wan: port@0 {
            status = "okay";
            label = "wan";
            nvmem-cells = <&macaddr_factory_e000>;
            nvmem-cell-names = "mac-address";
            mac-address-increment = <0>;
        };

        port@1 {
            status = "okay";
            label = "lan";
            nvmem-cells = <&macaddr_factory_e000>;
            nvmem-cell-names = "mac-address";
            mac-address-increment = <1>;
        };
    };
};

&factory {
    compatible = "nvmem-cells";
    #address-cells = <1>;
    #size-cells = <1>;
    

    macaddr_factory_e000: macaddr@e000 {
        reg = <0xe000 0x6>;
    };
};

mt7621.mk

define Device/comfast_cf-ew72-v2
  $(Device/dsa-migration)
  $(Device/uimage-lzma-loader)
  IMAGE_SIZE := 15808k
  DEVICE_VENDOR := ComFast
  DEVICE_MODEL := CF-EW72 V2
  DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
    -uboot-envtools
  IMAGES += factory.bin
  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
        check-size | append-metadata
  IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size
endef
TARGET_DEVICES += comfast_cf-ew72-v2

LEDs are on the way

1 Like

Help wanted.

Currently I get all devices "shown", but during boot (bootlog without wifi.reg) I have error that indicate that wifi interfaces somewhy did not load correctrly - they get random MAC address, but work.

mt7603e 0000:01:00.0: Invalid MAC address, using random address 2e:3c:e3:36:88:a6
mt7615e 0000:02:00.0: Invalid MAC address, using random address 2a:9f:53:39:c7:42

DTS: https://pastebin.com/7P2DDBKz

The message Invalid MAC address, using random address is in mt76 code is used only when 00:00:00:00:00:00 or FF:FF:FF:FF:FF:FF is passed to driver (according to mt76 source).

I confirmed there is no mac-address files in /sys/firmware

#  find /sys/firmware/devicetree/base/ | grep mac-address
/sys/firmware/devicetree/base/ethernet@1e100000/mdio-bus/switch@1f/ports/port@1/mac-address
/sys/firmware/devicetree/base/ethernet@1e100000/mdio-bus/switch@1f/ports/port@0/mac-address
/sys/firmware/devicetree/base/ethernet@1e100000/mac@0/mac-address

I could connect both 2.4G and 5G WiFi networks and get IP via DHCP (so I assume it works)

Decompiling /sys/firmware/fdt gave me warnings about no reg in wifi sections. (decompiled fdt)

n$ dtc -I dtb -O dts ~/fdt > ~/fdt.dec
<stdout>: Warning (unit_address_vs_reg): /pcie@1e140000/pcie@0,0/wifi@0,0: node has a unit name, but no reg or ranges property
<stdout>: Warning (unit_address_vs_reg): /pcie@1e140000/pcie@1,0/wifi@0,0: node has a unit name, but no reg or ranges property
<stdout>: Warning (avoid_unnecessary_addr_size): /palmbus@1e000000/spi@b00/flash@0/partitions/partition@40000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
<stdout>: Warning (interrupt_provider): /palmbus@1e000000/gpio@600: Missing #address-cells in interrupt provider
<stdout>: Warning (interrupt_provider): /interrupt-controller@1fbc0000: Missing #address-cells in interrupt provider
<stdout>: Warning (interrupt_provider): /ethernet@1e100000/mdio-bus/switch@1f: Missing #address-cells in interrupt provider

But if I uncomment reg = <0x0000 0 0 0 0>; in wifi sections, it never gets detected (bootlog with wifi.reg)

What am I doing wrong ?

Are the MAC addresses stored in the declared areas of the dts? Can you dump the partition and have a look at the content at the specified addresses?