[BPI-R64] loading OpenWRT built files into the board

There is a mt7622 wifi driver patch from here: [BPI-R64] mt7622 mac80211 WiFi driver. It’s working with the latest openwrt source code, i have test it on R64 board.

And I try to build that mt7622 patch into openmptcprouter v0.52.3 branches, but failed, that patch only working with openwrt latest backports source code.

So I checkout the openmptcprouter master latest source code, the openwrt in it can build that mt7622 wifi driver patch.

But after i build and load the squashfs-sysupgrade.bin into R64 with the same steps, It have problem to start.

[   17.194486] 6 cmdlinepart partitions found on MTD device eMMC
[   17.200420] Creating 6 MTD partitions on "eMMC":
[   17.205180] 0x000000000000-0x0000000c0000 : "mbr"
[   17.210492] 0x0000000c0000-0x000000140000 : "uboot"
[   17.215890] 0x000000140000-0x0000001c0000 : "Config"
[   17.221370] 0x0000001c0000-0x000000200000 : "Factory"
[   17.226908] 0x000000200000-0x000004200000 : "Kernel"
[   17.233526] 2 fit-fw partitions found on MTD device Kernel
[   17.239195] 0x000000200000-0x0000004b0000 : "kernel"
[   17.244676] 0x0000004a6574-0x000004200000 : "rootfs"
[   17.250168] mtd: device 6 (rootfs) set to be root filesystem
[   17.256008] 1 squashfs-split partitions found on MTD device rootfs
[   17.262442] 0x000003030000-0x000004200000 : "rootfs_data"
[   17.268352] 0x000004200000-0x000084200000 : "usrdata"
[   17.273948] block2mtd: mtd0: [eMMC] erase_size = 64KiB [65536]
[   17.280014] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01 00:13:15 UTC (946685595)
[   17.291396] squashfs: SQUASHFS error: unable to read id index table
[   17.298001] List of all partitions:
[   17.301659] b300         7634944 mmcblk0
[   17.301662]  driver: mmcblk
[   17.308674]   b301             256 mmcblk0p1 f6ff0fdd-1e96-4a94-ba9b-89e55b8ea4ed
[   17.308676]
[   17.317917]   b302             512 mmcblk0p2 e34c411c-1fb5-47f3-a295-4aa8686eff6e
[   17.317918]
[   17.327166]   b303             512 mmcblk0p3 8660b620-97ca-4c76-b55b-bd47b11a37d9
[   17.327168]
[   17.336415]   b304             256 mmcblk0p4 c246f1d0-56ee-4fd8-859a-c92f8e636e79
[   17.336416]
[   17.345662]   b305           65536 mmcblk0p5 2126e09c-e358-4dfe-9579-d2597a729e75
[   17.345664]
[   17.354916] 1f00             768 mtdblock0
[   17.354918]  (driver?)
[   17.361655] 1f01             512 mtdblock1
[   17.361656]  (driver?)
[   17.368389] 1f02             512 mtdblock2
[   17.368390]  (driver?)
[   17.375128] 1f03             256 mtdblock3
[   17.375130]  (driver?)
[   17.381867] 1f04           65536 mtdblock4
[   17.381869]  (driver?)
[   17.388607] 1f05            2752 mtdblock5
[   17.388609]  (driver?)
[   17.395340] 1f06           62822 mtdblock6
[   17.395342]  (driver?)
[   17.402080] 1f07           18240 mtdblock7
[   17.402081]  (driver?)
[   17.408820] 1f08         2097152 mtdblock8
[   17.408821]  (driver?)
[   17.415551] No filesystem could mount root, tried:
[   17.415552]  squashfs
[   17.420582]
[   17.424448] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,6)
[   17.433058] SMP: stopping secondary CPUs
[   17.437097] Kernel Offset: disabled
[   17.440689] CPU features: 0x0,20002000
[   17.444547] Memory Limit: none
[   17.447691] Rebooting in 1 seconds..

@Ivan_Revyakin, Have you try to build the openmptcprouter master latest source?

Not yet…

Guess it corresponds to “Kernel” part of the MTD. So try to do like this:

… block2mtd.block2mtd=/dev/mmcblk0,[SIZE OF “Kernel” part IN a kB],eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory), [SIZE OF “Kernel” part](Kernel), [SIZE YOU NEED] (usrdata)’

I can build openmptcprouter-v0.52.3, and flash into R64 board success. But build and flash openmptcprouter-v0.53.2 failed. The boot log is:

mmc0 is current device
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 1 ... 1 blocks read: OK
[do_read_image_blks] This is a FIT image,img_size = 0x2e724c
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 5946 ... 5946 blocks read: OK
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
   Using '[email protected]' configuration
   Trying '[email protected]' kernel subimage
     Description:  ARM64 OpenWrt Linux-4.19.84
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x40080010
     Data Size:    3018966 Bytes = 2.9 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41080000
     Entry Point:  0x41080000
     Hash algo:    crc32
     Hash value:   3f30a63f
     Hash algo:    sha1
     Hash value:   b0f0be6f73042bb5d7c5532895bd5721eb78871f
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
   Using '[email protected]' configuration
   Trying '[email protected]' fdt subimage
     Description:  ARM64 OpenWrt BPI-R64 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x40361220
     Data Size:    23070 Bytes = 22.5 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   6f50902d
     Hash algo:    sha1
     Hash value:   a45cf7ff90b8c1baa5e7680293643f6d156ddda2
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x40361220
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 6bff7000, end 6bfffa1d ... OK

Starting kernel ...

[ATF][    14.152996]save kernel info
[ATF][    14.155933]Kernel_EL2
[ATF][    14.158603]Kernel is 64Bit
[ATF][    14.161691]pc=0x41080000, r0=0x6bff7000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x41080000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][    14.179389]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.84 ([email protected]) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r0+11546-a74095c68c)) #0 SMP Tue Nov 19 13:59:03 2019
[    0.000000] Machine model: Bananapi BPI-R64
[    0.000000] On node 0 totalpages: 262096
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 262096 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x3f0 with crng_init=0
[    0.000000] percpu: Embedded 20 pages/cpu s42712 r8192 d31016 u81920
[    0.000000] pcpu-alloc: s42712 r8192 d31016 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258000
[    0.000000] Kernel command line: console=ttyS0,115200n1 rootfstype=squashfs earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory),512M(Kernel),6144M(usrdata)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 1020884K/1048384K available (6206K kernel code, 424K rwdata, 1724K rodata, 320K init, 305K bss, 27500K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000179] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.000186] pid_max: default: 32768 minimum: 301
[    0.000260] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000271] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001090] ASID allocator initialised with 65536 entries
[    0.001144] rcu: Hierarchical SRCU implementation.
[    0.001494] smp: Bringing up secondary CPUs ...
[    0.001798] Detected VIPT I-cache on CPU1
[    0.001836] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001894] smp: Brought up 1 node, 2 CPUs
[    0.001901] SMP: Total of 2 processors activated.
[    0.001906] CPU features: detected: 32-bit EL0 Support
[    0.001972] CPU: All CPU(s) started at EL2
[    0.001981] alternatives: patching kernel code
[    0.002340] devtmpfs: initialized
[    0.005213] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005226] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.005307] pinctrl core: initialized pinctrl subsystem
[    0.005486] reg-dummy reg-dummy: no of_node; not parsing pinctrl DT
[    0.005858] NET: Registered protocol family 16
[    0.006348] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.006477] DMA: preallocated 256 KiB pool for atomic allocations
[    0.015118] mt7622-pinctrl 10211000.pinctrl: try to register 103 pins ...
[    0.016083] mt7622-pinctrl 10211000.pinctrl: no hogs found
[    0.017659] gpiochip_find_base: found new base at 409
[    0.017678] gpio gpiochip0: (pinctrl_moore): created GPIO range 0->102 ==> 10211000.pinctrl PIN 0->102
[    0.017698] mt7622-pinctrl 10211000.pinctrl: request pin 90 (AUXIN3) for pinctrl_moore:499
[    0.017710] gpio gpiochip0: Persistence not supported for GPIO 90
[    0.017719] GPIO line 499 (asm_sel) hogged as output/high
[    0.017851] gpio gpiochip0: (pinctrl_moore): added GPIO chardev (254:0)
[    0.017857] gpiochip_setup_dev: registered GPIOs 409 to 511 on device: gpiochip0 (pinctrl_moore)
[    0.026918] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-1p8v[0]'
[    0.027096] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-3p3v[0]'
[    0.027235] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-5v[0]'
[    0.027524] SCSI subsystem initialized
[    0.027648] libata version 3.00 loaded.
[    0.027790] usbcore: registered new interface driver usbfs
[    0.027818] usbcore: registered new interface driver hub
[    0.027846] usbcore: registered new device driver usb
[    0.028567] Bluetooth: Core ver 2.22
[    0.028601] NET: Registered protocol family 31
[    0.028605] Bluetooth: HCI device and connection manager initialized
[    0.028612] Bluetooth: HCI socket layer initialized
[    0.028620] Bluetooth: L2CAP socket layer initialized
[    0.028648] Bluetooth: SCO socket layer initialized
[    0.029016] clocksource: Switched to clocksource arch_sys_counter
[    0.029916] NET: Registered protocol family 2
[    0.030408] default registered
[    0.030415] default registered
[    0.030418] MPTCP: Stable release v0.95
[    0.030428] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[    0.030447] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.030497] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.030597] TCP: Hash tables configured (established 8192 bind 8192)
[    0.030687] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.030709] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.030802] NET: Registered protocol family 1
[    0.030820] PCI: CLS 0 bytes, default 64
[    0.031349] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
[    0.031553] No memory allocated for crashlog
[    0.031632] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.035261] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.035275] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZO) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.038039] io scheduler noop registered (default)
[    0.038419] mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)
[    0.038704] pinctrl core: add 1 pinctrl maps
[    0.038734] mt7622-pinctrl 10211000.pinctrl: found group selector 70 for pwm_ch7_2
[    0.038745] mt7622-pinctrl 10211000.pinctrl: request pin 101 (PWM7) for 11006000.pwm
[    0.038752] mt7622-pinctrl 10211000.pinctrl: enable function pwm group pwm_ch7_2
[    0.039066] pinctrl core: add 3 pinctrl maps
[    0.039080] pinctrl core: add 3 pinctrl maps
[    0.039096] mt7622-pinctrl 10211000.pinctrl: found group selector 44 for pcie0_pad_perst
[    0.039106] mt7622-pinctrl 10211000.pinctrl: found group selector 40 for pcie0_1_waken
[    0.039116] mt7622-pinctrl 10211000.pinctrl: found group selector 41 for pcie0_1_clkreq
[    0.039126] mt7622-pinctrl 10211000.pinctrl: found group selector 45 for pcie1_pad_perst
[    0.039136] mt7622-pinctrl 10211000.pinctrl: found group selector 42 for pcie1_0_waken
[    0.039146] mt7622-pinctrl 10211000.pinctrl: found group selector 43 for pcie1_0_clkreq
[    0.039154] mt7622-pinctrl 10211000.pinctrl: request pin 83 (PERST0_N) for 1a140000.pcie
[    0.039160] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_pad_perst
[    0.039168] mt7622-pinctrl 10211000.pinctrl: request pin 79 (RTS3_N) for 1a140000.pcie
[    0.039173] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_waken
[    0.039180] mt7622-pinctrl 10211000.pinctrl: request pin 80 (CTS3_N) for 1a140000.pcie
[    0.039186] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_clkreq
[    0.039192] mt7622-pinctrl 10211000.pinctrl: request pin 84 (PERST1_N) for 1a140000.pcie
[    0.039198] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_pad_perst
[    0.039205] mt7622-pinctrl 10211000.pinctrl: request pin 14 (I2C_SDA) for 1a140000.pcie
[    0.039210] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_waken
[    0.039217] mt7622-pinctrl 10211000.pinctrl: request pin 15 (I2C_SCL) for 1a140000.pcie
[    0.039222] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_clkreq
[    0.041553] pinctrl core: add 1 pinctrl maps
[    0.041580] mt7622-pinctrl 10211000.pinctrl: found group selector 47 for pmic_bus
[    0.041590] mt7622-pinctrl 10211000.pinctrl: request pin 71 (PMIC_SCL) for 10001000.pwrap
[    0.041597] mt7622-pinctrl 10211000.pinctrl: request pin 72 (PMIC_SDA) for 10001000.pwrap
[    0.041603] mt7622-pinctrl 10211000.pinctrl: enable function pmic group pmic_bus
[    0.041718] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.055735] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.057993] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    0.058121] pinctrl core: add 1 pinctrl maps
[    0.058154] mt7622-pinctrl 10211000.pinctrl: found group selector 89 for uart0_0_tx_rx
[    0.058164] mt7622-pinctrl 10211000.pinctrl: request pin 6 (TXD0) for 11002000.serial
[    0.058170] mt7622-pinctrl 10211000.pinctrl: request pin 7 (RXD0) for 11002000.serial
[    0.058177] mt7622-pinctrl 10211000.pinctrl: enable function uart group uart0_0_tx_rx
[    0.058344] console [ttyS0] disabled
[    0.078732] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 116, base_baud = 1562500) is a ST16650V2
[    1.664966] console [ttyS0] enabled
[    1.668880] pinctrl core: add 1 pinctrl maps
[    1.673320] mt7622-pinctrl 10211000.pinctrl: found group selector 96 for uart2_1_tx_rx
[    1.681495] mt7622-pinctrl 10211000.pinctrl: request pin 51 (MDI_TP_P0) for 11004000.serial
[    1.690113] mt7622-pinctrl 10211000.pinctrl: request pin 52 (MDI_TN_P0) for 11004000.serial
[    1.698723] mt7622-pinctrl 10211000.pinctrl: enable function uart group uart2_1_tx_rx
[    1.727279] 11004000.serial: ttyS1 at MMIO 0x11004000 (irq = 117, base_baud = 1562500) is a ST16650V2
[    1.737350] 1100c000.serial: ttyS2 at MMIO 0x1100c000 (irq = 123, base_baud = 17499995) is a MediaTek BTIF
[    1.747409] serial serial0: tty port ttyS2 registered
[    1.752939] mtk_rng 1020f000.rng: registered RNG driver
[    1.753069] random: fast init done
[    1.758495] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.761983] random: crng init done
[    1.771094] loop: module loaded
[    1.775586] pinctrl core: add 1 pinctrl maps
[    1.780037] mt7622-pinctrl 10211000.pinctrl: found group selector 75 for spic0_0
[    1.787667] mt7622-pinctrl 10211000.pinctrl: request pin 63 (MDI_TP_P3) for 1100a000.spi
[    1.796017] mt7622-pinctrl 10211000.pinctrl: request pin 64 (MDI_TN_P3) for 1100a000.spi
[    1.804364] mt7622-pinctrl 10211000.pinctrl: request pin 65 (MDI_RP_P3) for 1100a000.spi
[    1.812711] mt7622-pinctrl 10211000.pinctrl: request pin 66 (MDI_RN_P3) for 1100a000.spi
[    1.821058] mt7622-pinctrl 10211000.pinctrl: enable function spi group spic0_0
[    1.828836] pinctrl core: add 1 pinctrl maps
[    1.833269] mt7622-pinctrl 10211000.pinctrl: found group selector 77 for spic1_0
[    1.840930] mt7622-pinctrl 10211000.pinctrl: request pin 67 (MDI_RP_P4) for 11016000.spi
[    1.849279] mt7622-pinctrl 10211000.pinctrl: request pin 68 (MDI_RN_P4) for 11016000.spi
[    1.857620] mt7622-pinctrl 10211000.pinctrl: request pin 69 (MDI_TP_P4) for 11016000.spi
[    1.865967] mt7622-pinctrl 10211000.pinctrl: request pin 70 (MDI_TN_P4) for 11016000.spi
[    1.874313] mt7622-pinctrl 10211000.pinctrl: enable function spi group spic1_0
[    1.882259] mdio_bus fixed-0: GPIO lookup for consumer reset
[    1.888092] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    1.894388] mdio_bus fixed-0: No GPIO consumer reset found
[    1.900065] libphy: Fixed MDIO Bus: probed
[    1.904736] sean debug physpeed = 2500
[    1.931265] mdio_bus mdio-bus: GPIO lookup for consumer reset
[    1.937189] mdio_bus mdio-bus: using device tree for GPIO lookup
[    1.943400] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/[email protected]/mdio-bus[0]'
[    1.953992] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/[email protected]/mdio-bus[0]'
[    1.964491] mdio_bus mdio-bus: using lookup tables for GPIO lookup
[    1.970867] mdio_bus mdio-bus: No GPIO consumer reset found
[    1.976609] libphy: mdio: probed
[    1.979953] mtk_soc_eth 1b100000.ethernet: generated random MAC address 4a:0a:e8:f0:6f:8e
[    1.988391] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/[email protected]/[email protected]/fixed-link[0]'
[    1.999701] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/[email protected]/[email protected][0]'
[    2.010150] mtk_soc_eth 1b100000.ethernet: path gmac1_sgmii in set_mux_gdm1_to_gmac1_esw updated = 1
[    2.019573] mtk_soc_eth 1b100000.ethernet: mux mux_gmac2_gmac0_to_gephy isn't present on the SoC
[    2.028630] mtk_soc_eth 1b100000.ethernet: mux mux_u3_gmac2_to_qphy isn't present on the SoC
[    2.037338] mtk_soc_eth 1b100000.ethernet: path gmac1_sgmii in set_mux_gmac1_gmac2_to_sgmii_rgmii updated = 1
[    2.047566] mtk_soc_eth 1b100000.ethernet: mux mux_gmac12_to_gephy_sgmii isn't present on the SoC
[    2.056763] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    2.067738] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffff8009400000, irq 131
[    2.077177] mtk_soc_eth 1b100000.ethernet: generated random MAC address 3e:38:30:f5:80:25
[    2.085621] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/[email protected]/[email protected]/fixed-link[0]'
[    2.096929] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/[email protected]/[email protected][0]'
[    2.107314] mtk_soc_eth 1b100000.ethernet: path gmac2_rgmii in set_mux_gdm1_to_gmac1_esw updated = 0
[    2.116751] mtk_soc_eth 1b100000.ethernet: mux mux_gmac2_gmac0_to_gephy isn't present on the SoC
[    2.125815] mtk_soc_eth 1b100000.ethernet: mux mux_u3_gmac2_to_qphy isn't present on the SoC
[    2.134523] mtk_soc_eth 1b100000.ethernet: path gmac2_rgmii in set_mux_gmac1_gmac2_to_sgmii_rgmii updated = 0
[    2.144749] mtk_soc_eth 1b100000.ethernet: mux mux_gmac12_to_gephy_sgmii isn't present on the SoC
[    2.153937] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
[    2.164857] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xffffff8009400000, irq 131
[    2.174283] netif_napi_add() called with weight 256 on device
[    2.180598] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.3
[    2.187352] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.2
[    2.194284] xhci-mtk 1a0c0000.usb: Dropping the link to regulator.2
[    2.200799] xhci-mtk 1a0c0000.usb: Dropping the link to regulator.3
[    2.207577] rtc_mt7622 10212800.rtc: rtc core: registered 10212800.rtc as rtc0
[    2.215272] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    2.224593] pinctrl core: add 1 pinctrl maps
[    2.229027] mt7622-pinctrl 10211000.pinctrl: found group selector 109 for watchdog
[    2.236835] mt7622-pinctrl 10211000.pinctrl: request pin 78 (WATCHDOG) for 10212000.watchdog
[    2.245541] mt7622-pinctrl 10211000.pinctrl: enable function watchdog group watchdog
[    2.253549] MTK_WDT_NONRST_REG(20000000)
[    2.257590] RGU get IRQ ID failed
[    2.261146] Bluetooth: HCI UART driver ver 2.3
[    2.265724] Bluetooth: HCI UART protocol H4 registered
[    2.271073] Bluetooth: HCI UART protocol BCSP registered
[    2.276545] Bluetooth: HCI UART protocol ATH3K registered
[    2.282170] Bluetooth: HCI UART protocol Broadcom registered
[    2.288017] Bluetooth: HCI UART protocol QCA registered
[    2.293548] mtk-cpufreq mtk-cpufreq: no of_node; not parsing pinctrl DT
[    2.294053] bluetooth hci0: Direct firmware load for mediatek/mt7622pr2h.bin failed with error -2
[    2.300477] cpu cpu0: Linked as a consumer to regulator.4
[    2.309538] bluetooth hci0: Falling back to syfs fallback for: mediatek/mt7622pr2h.bin
[    2.315152] cpu cpu0: Linked as a consumer to regulator.7
[    2.329567] generic pinconfig core: found bias-pull-up with value 1
[    2.336030] generic pinconfig core: found input-enable with value 1
[    2.342506] generic pinconfig core: found bias-pull-down with value 1
[    2.349154] pinctrl core: add 11 pinctrl maps
[    2.353657] generic pinconfig core: found bias-pull-up with value 1
[    2.360121] generic pinconfig core: found drive-strength with value 4
[    2.366758] generic pinconfig core: found input-enable with value 1
[    2.373231] generic pinconfig core: found bias-pull-down with value 1
[    2.379877] generic pinconfig core: found drive-strength with value 4
[    2.386518] pinctrl core: add 11 pinctrl maps
[    2.391023] mt7622-pinctrl 10211000.pinctrl: found group selector 0 for emmc
[    2.398331] mt7622-pinctrl 10211000.pinctrl: found group selector 0 for emmc
[    2.405644] mt7622-pinctrl 10211000.pinctrl: request pin 40 (NDL4) for 11230000.mmc
[    2.413544] mt7622-pinctrl 10211000.pinctrl: request pin 41 (NDL5) for 11230000.mmc
[    2.421442] mt7622-pinctrl 10211000.pinctrl: request pin 42 (NDL6) for 11230000.mmc
[    2.429339] mt7622-pinctrl 10211000.pinctrl: request pin 43 (NDL7) for 11230000.mmc
[    2.437232] mt7622-pinctrl 10211000.pinctrl: request pin 44 (NRB) for 11230000.mmc
[    2.445040] mt7622-pinctrl 10211000.pinctrl: request pin 45 (NCLE) for 11230000.mmc
[    2.452937] mt7622-pinctrl 10211000.pinctrl: request pin 47 (NDL0) for 11230000.mmc
[    2.460836] mt7622-pinctrl 10211000.pinctrl: request pin 48 (NDL1) for 11230000.mmc
[    2.468728] mt7622-pinctrl 10211000.pinctrl: request pin 49 (NDL2) for 11230000.mmc
[    2.476625] mt7622-pinctrl 10211000.pinctrl: request pin 50 (NDL3) for 11230000.mmc
[    2.484523] mt7622-pinctrl 10211000.pinctrl: enable function emmc group emmc
[    2.491906] mtk-msdc 11230000.mmc: GPIO lookup for consumer wp
[    2.497918] mtk-msdc 11230000.mmc: using device tree for GPIO lookup
[    2.504480] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/[email protected][0]'
[    2.513549] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/[email protected][0]'
[    2.522524] mtk-msdc 11230000.mmc: using lookup tables for GPIO lookup
[    2.529257] mtk-msdc 11230000.mmc: No GPIO consumer wp found
[    2.535167] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.2
[    2.541937] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.1
[    2.548692] mtk-msdc 11230000.mmc: obtain a copy of previously claimed pinctrl
[    2.556395] mt7622-pinctrl 10211000.pinctrl: request pin 40 (NDL4) for 11230000.mmc
[    2.564296] mt7622-pinctrl 10211000.pinctrl: request pin 41 (NDL5) for 11230000.mmc
[    2.572194] mt7622-pinctrl 10211000.pinctrl: request pin 42 (NDL6) for 11230000.mmc
[    2.580092] mt7622-pinctrl 10211000.pinctrl: request pin 43 (NDL7) for 11230000.mmc
[    2.587985] mt7622-pinctrl 10211000.pinctrl: request pin 44 (NRB) for 11230000.mmc
[    2.595792] mt7622-pinctrl 10211000.pinctrl: request pin 45 (NCLE) for 11230000.mmc
[    2.603690] mt7622-pinctrl 10211000.pinctrl: request pin 47 (NDL0) for 11230000.mmc
[    2.611587] mt7622-pinctrl 10211000.pinctrl: request pin 48 (NDL1) for 11230000.mmc
[    2.619484] mt7622-pinctrl 10211000.pinctrl: request pin 49 (NDL2) for 11230000.mmc
[    2.627377] mt7622-pinctrl 10211000.pinctrl: request pin 50 (NDL3) for 11230000.mmc
[    2.635275] mt7622-pinctrl 10211000.pinctrl: enable function emmc group emmc
[    2.667798] generic pinconfig core: found bias-pull-up with value 1
[    2.674268] generic pinconfig core: found drive-strength with value 8
[    2.680917] generic pinconfig core: found input-enable with value 1
[    2.687385] generic pinconfig core: found bias-pull-down with value 1
[    2.694028] generic pinconfig core: found drive-strength with value 12
[    2.700767] generic pinconfig core: found bias-pull-up with value 1
[    2.707230] pinctrl core: add 8 pinctrl maps
[    2.711646] generic pinconfig core: found bias-pull-up with value 1
[    2.718105] generic pinconfig core: found input-enable with value 1
[    2.724578] generic pinconfig core: found bias-pull-down with value 1
[    2.731225] pinctrl core: add 7 pinctrl maps
[    2.735646] mt7622-pinctrl 10211000.pinctrl: found group selector 71 for sd_0
[    2.743036] mt7622-pinctrl 10211000.pinctrl: found group selector 71 for sd_0
[    2.750411] mt7622-pinctrl 10211000.pinctrl: request pin 16 (I2S2_IN) for 11240000.mmc
[    2.758572] mt7622-pinctrl 10211000.pinctrl: request pin 17 (I2S3_IN) for 11240000.mmc
[    2.766739] mt7622-pinctrl 10211000.pinctrl: request pin 18 (I2S4_IN) for 11240000.mmc
[    2.774905] mt7622-pinctrl 10211000.pinctrl: request pin 19 (I2S2_OUT) for 11240000.mmc
[    2.783160] mt7622-pinctrl 10211000.pinctrl: request pin 20 (I2S3_OUT) for 11240000.mmc
[    2.791418] mt7622-pinctrl 10211000.pinctrl: request pin 21 (I2S4_OUT) for 11240000.mmc
[    2.799675] mt7622-pinctrl 10211000.pinctrl: enable function sd group sd_0
[    2.806883] mtk-msdc 11240000.mmc: GPIO lookup for consumer cd
[    2.812899] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    2.819465] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/[email protected][0]' - status (0)
[    2.829251] mt7622-pinctrl 10211000.pinctrl: request pin 81 (TXD3) for pinctrl_moore:490
[    2.837596] gpio gpiochip0: Persistence not supported for GPIO 81
[    2.843886] mtk-msdc 11240000.mmc: Got CD GPIO
[    2.848464] mtk-msdc 11240000.mmc: GPIO lookup for consumer wp
[    2.854479] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    2.861037] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/[email protected][0]'
[    2.870104] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/[email protected][0]'
[    2.879078] mtk-msdc 11240000.mmc: using lookup tables for GPIO lookup
[    2.885804] mtk-msdc 11240000.mmc: No GPIO consumer wp found
[    2.891715] mtk-msdc 11240000.mmc: Linked as a consumer to regulator.2
[    2.898488] mtk-msdc 11240000.mmc: obtain a copy of previously claimed pinctrl
[    2.931010] NET: Registered protocol family 10
[    2.936288] Segment Routing with IPv6
[    2.940128] fullmesh registered
[    2.943360] ndiffports registered
[    2.946774] binder registered
[    2.949858] netlink registered
[    2.953002] roundrobin registered
[    2.956411] redundant registered
[    2.959739] blest registered
[    2.962701] ecf registered
[    2.965486] NET: Registered protocol family 17
[    2.970092] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.983514] 8021q: 802.1Q VLAN Support v1.8
[    2.995767] pinctrl core: add 3 pinctrl maps
[    3.000223] pinctrl core: add 3 pinctrl maps
[    3.004673] mt7622-pinctrl 10211000.pinctrl: found group selector 44 for pcie0_pad_perst
[    3.013038] mt7622-pinctrl 10211000.pinctrl: found group selector 40 for pcie0_1_waken
[    3.021219] mt7622-pinctrl 10211000.pinctrl: found group selector 41 for pcie0_1_clkreq
[    3.029489] mt7622-pinctrl 10211000.pinctrl: found group selector 45 for pcie1_pad_perst
[    3.037842] mt7622-pinctrl 10211000.pinctrl: found group selector 42 for pcie1_0_waken
[    3.046022] mt7622-pinctrl 10211000.pinctrl: found group selector 43 for pcie1_0_clkreq
[    3.054291] mt7622-pinctrl 10211000.pinctrl: request pin 83 (PERST0_N) for 1a140000.pcie
[    3.062652] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_pad_perst
[    3.070922] mt7622-pinctrl 10211000.pinctrl: request pin 79 (RTS3_N) for 1a140000.pcie
[    3.079098] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_waken
[    3.087179] mt7622-pinctrl 10211000.pinctrl: request pin 80 (CTS3_N) for 1a140000.pcie
[    3.095368] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_clkreq
[    3.103558] mt7622-pinctrl 10211000.pinctrl: request pin 84 (PERST1_N) for 1a140000.pcie
[    3.111927] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_pad_perst
[    3.120207] mt7622-pinctrl 10211000.pinctrl: request pin 14 (I2C_SDA) for 1a140000.pcie
[    3.128479] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_waken
[    3.136580] mt7622-pinctrl 10211000.pinctrl: request pin 15 (I2C_SCL) for 1a140000.pcie
[    3.144858] mt7622-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_clkreq
[    3.156263] mtk-msdc 11230000.mmc: phase: [map:7fffffff] [maxlen:31] [final:10]
[    3.165272] mtk-msdc 11230000.mmc: phase: [map:fffffff] [maxlen:28] [final:9]
[    3.173406] mmc0: new HS200 MMC card at address 0001
[    3.178624] mmcblk mmc0:0001: no of_node; not parsing pinctrl DT
[    3.185863] mmcblk0: mmc0:0001 008G30 7.28 GiB
[    3.191411] mmcblk0boot0: mmc0:0001 008G30 partition 1 4.00 MiB
[    3.198377] mmcblk0boot1: mmc0:0001 008G30 partition 2 4.00 MiB
[    3.204597] mmcblk0rpmb: mmc0:0001 008G30 partition 3 4.00 MiB, chardev (250:0)
[    3.214609] Alternate GPT is invalid, using primary GPT.
[    3.220110]  mmcblk0: p1 p2 p3 p4 p5
[    3.253288] mtk-pcie 1a140000.pcie: Port0 link down
[    3.358366] mtk-pcie 1a140000.pcie: Port1 link down
[    3.363544] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00
[    3.369926] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    3.376924] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    3.384018] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.389676] pci_bus 0000:00: scanning bus
[    3.394955] pci_bus 0000:00: fixups for bus
[    3.399270] pci_bus 0000:00: bus scan returning with max=00
[    3.405168] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    3.413617] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    3.421311] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/[email protected][0]' - status (0)
[    3.430744] mt7622-pinctrl 10211000.pinctrl: request pin 54 (MDI_RN_P0) for pinctrl_moore:463
[    4.009019] mt753x [email protected]: LAN/WAN VLAN setting=wllll
[    4.014609] mt753x [email protected]: Switch is MediaTek MT7531BE rev 0
[    6.691065] mt753x [email protected]: >>>>>>>>>>>>>>>>>>>>>>>>>>>>> START CALIBRATION:
[    6.700141] mt753x [email protected]: -------- gephy-calbration (port:0) --------
[    6.723274] CALDLY = 40
[    7.067696]  GE Rext AnaCal Saturation!
[    7.071922] GE Rxet cal something wrong2
[    7.361353]  GE R50 AnaCal Saturation!
[    7.365482]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.647124]  GE R50 AnaCal Saturation!
[    7.651260]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.932947]  GE R50 AnaCal Saturation!
[    7.937076]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.218888]  GE R50 AnaCal Saturation!
[    8.223024]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.233248]  GE 1e_174(0x8080), 1e_175(0x8080)
[    8.304586]  GE Tx offset AnaCal Done! (pair-0)(3)(0x22) 0x1e_172=0x2220
[    8.352166]  GE Tx offset AnaCal Done! (pair-1)(3)(0x22) 0x1e_172=0x2222
[    8.424150]  GE Tx offset AnaCal Done! (pair-2)(6)(0x25) 0x1e_173=0x2520
[    8.455445]  GE Tx offset AnaCal Done! (pair-3)(1)(0x1) 0x1e_173=0x2501
[    8.593959]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x4812)
[    8.657674]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1515)
[    8.727558]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x131b)
[    8.807549]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x131b)
[    8.902930] PORT 0 RX_DC_OFFSET
[    8.923202] before pairA output = f
[    8.929932] after pairA output = 1
[    8.936491] before pairB output = f
[    8.943228] after pairB output = 1
[    8.949795] before pairC output = 1d
[    8.956611] after pairC output = fe
[    8.963266] before pairD output = 1e
[    8.970089] after pairD output = 1
[    8.974052] mt753x [email protected]: -------- gephy-calbration (port:1) --------
[    8.997192] CALDLY = 40
[    9.277227]  GE R50 AnaCal Saturation!
[    9.281365]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.563027]  GE R50 AnaCal Saturation!
[    9.567157]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.848716]  GE R50 AnaCal Saturation!
[    9.852853]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.134470]  GE R50 AnaCal Saturation!
[   10.138599]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.148824]  GE 1e_174(0x8080), 1e_175(0x8080)
[   10.244546]  GE Tx offset AnaCal Done! (pair-0)(6)(0x25) 0x1e_172=0x2520
[   10.283985]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2521
[   10.339695]  GE Tx offset AnaCal Done! (pair-2)(4)(0x23) 0x1e_173=0x2320
[   10.387242]  GE Tx offset AnaCal Done! (pair-3)(3)(0x3) 0x1e_173=0x2303
[   10.494981]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5816)
[   10.548561]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1919)
[   10.638661]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1c24)
[   10.738909]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1d25)
[   10.834272] PORT 1 RX_DC_OFFSET
[   10.854549] before pairA output = f
[   10.861277] after pairA output = ff
[   10.867923] before pairB output = 1e
[   10.874746] after pairB output = 0
[   10.881302] before pairC output = 1e
[   10.888117] after pairC output = 0
[   10.894682] before pairD output = 1b
[   10.901500] after pairD output = fe
[   10.905552] mt753x [email protected]: -------- gephy-calbration (port:2) --------
[   10.928690] CALDLY = 40
[   11.208743]  GE R50 AnaCal Saturation!
[   11.212881]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   11.494123]  GE R50 AnaCal Saturation!
[   11.498252]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   11.779437]  GE R50 AnaCal Saturation!
[   11.783566]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   12.065162]  GE R50 AnaCal Saturation!
[   12.069299]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   12.079519]  GE 1e_174(0x8080), 1e_175(0x8080)
[   12.150823]  GE Tx offset AnaCal Done! (pair-0)(3)(0x22) 0x1e_172=0x2220
[   12.190230]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2221
[   12.237777]  GE Tx offset AnaCal Done! (pair-2)(3)(0x22) 0x1e_173=0x2220
[   12.269060]  GE Tx offset AnaCal Done! (pair-3)(1)(0x1) 0x1e_173=0x2201
[   12.448057]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x4010)
[   12.592726]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0xd0d)
[   12.682723]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x131b)
[   12.793064]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1018)
[   12.888408] PORT 2 RX_DC_OFFSET
[   12.908683] before pairA output = f
[   12.915417] after pairA output = ff
[   12.922070] before pairB output = 1e
[   12.928888] after pairB output = 2
[   12.935453] before pairC output = d
[   12.942187] after pairC output = ff
[   12.948834] before pairD output = e
[   12.955569] after pairD output = 0
[   12.959538] mt753x [email protected]: -------- gephy-calbration (port:3) --------
[   12.982678] CALDLY = 40
[   13.262749]  GE R50 AnaCal Saturation!
[   13.266878]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   13.548540]  GE R50 AnaCal Saturation!
[   13.552678]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   13.834378]  GE R50 AnaCal Saturation!
[   13.838507]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   14.120105]  GE R50 AnaCal Saturation!
[   14.124234]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   14.134462]  GE 1e_174(0x8080), 1e_175(0x8080)
[   14.197635]  GE Tx offset AnaCal Done! (pair-0)(2)(0x21) 0x1e_172=0x2120
[   14.237046]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2121
[   14.292733]  GE Tx offset AnaCal Done! (pair-2)(4)(0x23) 0x1e_173=0x2320
[   14.348415]  GE Tx offset AnaCal Done! (pair-3)(4)(0x23) 0x1e_173=0x2323
[   14.537647]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x3c0f)
[   14.651959]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1111)
[   14.701562]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1921)
[   14.791683]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x131b)
[   14.887035] PORT 3 RX_DC_OFFSET
[   14.907313] before pairA output = c
[   14.914047] after pairA output = 0
[   14.920604] before pairB output = 1d
[   14.927419] after pairB output = fe
[   14.934074] before pairC output = e
[   14.940802] after pairC output = ff
[   14.947448] before pairD output = e
[   14.954182] after pairD output = 1
[   14.958144] mt753x [email protected]: -------- gephy-calbration (port:4) --------
[   14.981286] CALDLY = 40
[   15.261492]  GE R50 AnaCal Saturation!
[   15.265621]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   15.547350]  GE R50 AnaCal Saturation!
[   15.551487]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   15.833261]  GE R50 AnaCal Saturation!
[   15.837390]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   16.119038]  GE R50 AnaCal Saturation!
[   16.123166]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   16.133384]  GE 1e_174(0x8080), 1e_175(0x8080)
[   16.196544]  GE Tx offset AnaCal Done! (pair-0)(2)(0x21) 0x1e_172=0x2120
[   16.276632]  GE Tx offset AnaCal Done! (pair-1)(7)(0x26) 0x1e_172=0x2126
[   16.324180]  GE Tx offset AnaCal Done! (pair-2)(3)(0x22) 0x1e_173=0x2220
[   16.355462]  GE Tx offset AnaCal Done! (pair-3)(1)(0x20) 0x1e_173=0x2220
[   16.504227]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x4c13)
[   16.608396]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1111)
[   16.769292]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0xc14)
[   16.980793]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x70f)
[   17.076057] PORT 4 RX_DC_OFFSET
[   17.096328] before pairA output = e
[   17.103063] after pairA output = 0
[   17.109620] before pairB output = f
[   17.116344] after pairB output = 0
[   17.122906] before pairC output = 1e
[   17.129721] after pairC output = ff
[   17.136367] before pairD output = d
[   17.143102] after pairD output = 0
[   17.150515] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.3
[   17.157268] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.2
[   17.164168] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   17.169577] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 1
[   17.178088] mt753x [email protected]: Port 1 Link is Up - 1Gbps/Full
[   17.183665] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 quirks 0x0000000000210010
[   17.193030] xhci-mtk 1a0c0000.usb: irq 127, io mem 0x1a0c0000
[   17.199465] hub 1-0:1.0: USB hub found
[   17.203345] hub 1-0:1.0: 2 ports detected
[   17.207700] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   17.213103] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 2
[   17.220739] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[   17.227241] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   17.235873] hub 2-0:1.0: USB hub found
[   17.239758] hub 2-0:1.0: 1 port detected
[   17.244159] 6 cmdlinepart partitions found on MTD device eMMC
[   17.250092] Creating 6 MTD partitions on "eMMC":
[   17.254851] 0x000000000000-0x0000000c0000 : "mbr"
[   17.260147] 0x0000000c0000-0x000000140000 : "uboot"
[   17.265542] 0x000000140000-0x0000001c0000 : "Config"
[   17.271052] 0x0000001c0000-0x000000200000 : "Factory"
[   17.276618] 0x000000200000-0x000020200000 : "Kernel"
[   17.283251] 2 fit-fw partitions found on MTD device Kernel
[   17.288908] 0x000000200000-0x0000004f0000 : "kernel"
[   17.294416] 0x0000004e724c-0x000020200000 : "rootfs"
[   17.299937] mtd: device 6 (rootfs) set to be root filesystem
[   17.305776] 1 squashfs-split partitions found on MTD device rootfs
[   17.312195] 0x0000031b0000-0x000020200000 : "rootfs_data"
[   17.318140] 0x000020200000-0x0001a0200000 : "usrdata"
[   17.323753] block2mtd: mtd0: [eMMC] erase_size = 64KiB [65536]
[   17.329808] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01 00:14:46 UTC (946685686)
[   17.340960] squashfs: SQUASHFS error: unable to read id index table
[   17.347567] List of all partitions:
[   17.351211] b300         7634944 mmcblk0
[   17.351213]  driver: mmcblk
[   17.358216]   b301             256 mmcblk0p1 f6ff0fdd-1e96-4a94-ba9b-89e55b8ea4ed
[   17.358218]
[   17.367475]   b302             512 mmcblk0p2 e34c411c-1fb5-47f3-a295-4aa8686eff6e
[   17.367476]
[   17.376725]   b303             512 mmcblk0p3 8660b620-97ca-4c76-b55b-bd47b11a37d9
[   17.376726]
[   17.385973]   b304             256 mmcblk0p4 c246f1d0-56ee-4fd8-859a-c92f8e636e79
[   17.385974]
[   17.395221]   b305          524288 mmcblk0p5 fb7e66fe-12c6-4144-ac50-de42867d8871
[   17.395223]
[   17.404472] 1f00             768 mtdblock0
[   17.404474]  (driver?)
[   17.411214] 1f01             512 mtdblock1
[   17.411216]  (driver?)
[   17.417948] 1f02             512 mtdblock2
[   17.417950]  (driver?)
[   17.424688] 1f03             256 mtdblock3
[   17.424689]  (driver?)
[   17.431427] 1f04          524288 mtdblock4
[   17.431429]  (driver?)
[   17.438161] 1f05            3008 mtdblock5
[   17.438162]  (driver?)
[   17.444900] 1f06          521315 mtdblock6
[   17.444902]  (driver?)
[   17.451638] 1f07          475456 mtdblock7
[   17.451639]  (driver?)
[   17.458371] 1f08         6291456 mtdblock8
[   17.458373]  (driver?)
[   17.465107] No filesystem could mount root, tried:
[   17.465109]  squashfs
[   17.470136]
[   17.474001] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,6)
[   17.482611] SMP: stopping secondary CPUs
[   17.486650] Kernel Offset: disabled
[   17.490242] CPU features: 0x0,20002000
[   17.494100] Memory Limit: none
[   17.497244] Rebooting in 1 seconds..

I also try to upgrade from v0.52.3 to v0.53.2 with sysupgrade, also failed.

[email protected]:~# sysupgrade -F /tmp/openmptcprouter-v0.53.2-r0\+11546-a74
095c68c-mediatek-mt7622-BPI-R64-initramfs-kernel.bin
Image metadata not found
Sysupgrade is not supported on your board yet.
Image check failed but --force given - will update anyway!
Saving config files...
Commencing upgrade. Closing all shell sessions.
killall: telnetd: no process killed
Sending TERM to remaining processes ... ubusd urngd sh sh sh sh ntpd sh adb adb dnsmasq vnstatd sh sleep sleep sh sleep sleep logd rpcd netifd rngd odhcpd crond uhttpd unbound
Sending KILL to remaining processes ...
Switching to ramdisk...
Performing system upgrade...
Could not open mtd device: firmware
Can't open device for writing!
sysupgrade aborted with ret[  152.122889] reboot: Restarting system

@bourne_hlm How did you build openmptcprouter image?? I see that there is no official support for R64. Can you share what need to be modify there?

BTW I do have exactly same issue when I build latest OpenWRT (with kernel 5.4) and load into eMMC. I remember that I build it few months ago and load with exactly same steps and there was no issue. It was definitely 4.19 but do not know more details.

Ok I maneged to load latest Openwrt into R64 and start from eMMC.

Steps that I did:

  1. clone OpenWRT,
  2. change kernel to 4.19 in openwrt/target/linux/mediatek/makefile
  3. set target in make menuconfig 4 make defconfig (im not sure if that is needed)
  4. do kernel config as @bourne_hlm
"Device Drivers"-->"Memory Technology Device (MTD) support"-->"Command line partition table parsing"
"Device Drivers"-->"Memory Technology Device (MTD) support""Self-contained MTD device drivers"-->"MTD using block device"
"Device Drivers"-->"MMC/SD/SDIO card suport"->"MMC block device driver"
  1. add attached patch into openwrt/target/linux/mediatek/patches-4.19 1000-R64_OpenWRT_4_19_eMMC.patch (2.9 KB), it is modified patch @nagi fromhttp://forum.banana-pi.org/t/bpi-r64-mt7622-mac80211-wifi-driver/10246
  2. build and then use openwrt-mediatek-mt7622-bpi_bananapi-r64-squashfs-sysupgrade.bin with option 2 in u-boot.

I try to do the same without changing kernel to 4.19 and this patch 1000-R64_OpenWRT_5_4_eMMC.patch (1.9 KB) , but it do not mount rootfs and stuck on :

6 cmdlinepart partitions found on MTD device eMMC<\r> Creating 6 MTD partitions on “eMMC”:<\r> 0x000000000000-0x0000000c0000 : “preloader”<\r> 0x0000000c0000-0x000000140000 : “uboot”<\r> 0x000000140000-0x0000001c0000 : “uboot-env”<\r> 0x0000001c0000-0x000000200000 : “Factory”<\r> 0x000000200000-0x000004200000 : “firmware”<\r> 2 fit-fw partitions found on MTD device firmware<\r> 0x000000200000-0x0000004f0000 : “kernel”<\r> 0x0000004e71ec-0x000004200000 : “rootfs”<\r> mtd: device 6 (rootfs) set to be root filesystem<\r> 1 squashfs-split partitions found on MTD device rootfs<\r> 0x000000d50000-0x000004200000 : “rootfs_data”<\r> 0x000004200000-0x000084200000 : “usrdata”<\r> block2mtd: mtd0: [eMMC] erase_size = 64KiB [65536]<\r>

kernel is not hanging as I can see logs when I disconnect ethernet cable. It just not going forward. I try to trace where it stuck and as far as I go is to

int vfs_get_tree(struct fs_context *fc)

in linux/fs/super.c whitch is call by

static int do_new_mount(struct path *path, const char *fstype, int sb_flags, int mnt_flags, const char *name, void *data)

from linux/fs/namespace.c

The omr 0.53 have problem to build into R64, but 0.54.7 can build into R64. It’s the same steps in this post.

But in OMR there are no config files for R64 only for R2, do I have to manually create them?

I am too try compile OpenWrt by yourse instruction but I get error during compilation:

        Applying /home/osboxes/openwrt/target/linux/mediatek/patches-4.19/1000-R64_OpenWRT_4_19_eMMC.patch using plaintext: 
patching file arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
Hunk #1 FAILED at 16.
1 out of 3 hunks FAILED -- saving rejects to file arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts.rej
patching file arch/arm64/boot/dts/mediatek/mt7622-lynx-rfb1.dts
Hunk #1 succeeded at 549 with fuzz 2.
patching file arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
Hunk #1 succeeded at 549 with fuzz 2.
Patch failed!  Please fix /home/osboxes/openwrt/target/linux/mediatek/patches-4.19/1000-R64_OpenWRT_4_19_eMMC.patch!
make[4]: *** [Makefile:28: /home/osboxes/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.108/.prepared_11e8f7ae2a19576aff9cc35fd671fae0] Error 1
make[4]: Leaving directory '/home/osboxes/openwrt/target/linux/mediatek'
make[3]: *** [Makefile:13: compile] Error 2
make[3]: Leaving directory '/home/osboxes/openwrt/target/linux'
time: target/linux/compile#7.71#5.48#11.62
make[2]: *** [target/Makefile:25: target/linux/compile] Error 2
make[2]: Leaving directory '/home/osboxes/openwrt'
make[1]: *** [target/Makefile:18: /home/osboxes/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/osboxes/openwrt'
make: *** [/home/osboxes/openwrt/include/toplevel.mk:220: world] Error 2

I am patching files manualy (in file target/linux/mediatek/files-4.19/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts) and its works.

it seems kernel 5.4 doesn’t have this option

"Device Drivers"-->"Memory Technology Device (MTD) support"-->"Command line partition table parsing"

Try make kernel_menuconfig,search for this option (/) and look at depencies…i guess there is one not set maybe it is renamed:

https://cateee.net/lkddb/web-lkddb/MTD_CMDLINE_PARTS.html

says 5.4+

looks like it is moved

  • <5.4 found in drivers/mtd/Kconfig
  • 5.4+ found in drivers/mtd/parsers/Kconfig

drivers/mtd/parsers is always included

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/mtd/Makefile?h=v5.4.32#n10

if CONFIG_MTD is set

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/Makefile?h=v5.4.32#n83

cmdline_parts depends only on mtd

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/mtd/parsers/Kconfig?h=v5.4.32#n23

looks similar on 4.19:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/mtd/Kconfig?h=v4.19.32#n75

Yep, it moved, it’s now located in

Symbol: MTD_CMDLINE_PARTS [=n]
Type : tristate
Prompt: Command line partition table parsing
Location: -> Device Drivers
-> Memory Technology Device (MTD) support (MTD [=y])
(1) -> Partition parsers

do you have it still in your config? strange that it does not apply

Yep, I had to re-enable it on my kernel 5.4 config, building now…

Here is a call log where kernel hangs, maybe it will help trace the problem:

[4.256655] 0x0000001c0000-0x000000200000 : "Factory"

[    4.262036] 0x000000200000-0x000004200000 : "firmware"

[    4.268648] 2 fit-fw partitions found on MTD device firmware

[    4.274334] 0x000000200000-0x0000004f0000 : "kernel"

[    4.279696] 0x0000004eb0b8-0x000004200000 : "rootfs"

[    4.285000] mtd: device 6 (rootfs) set to be root filesystem

[    4.290666] 1 squashfs-split partitions found on MTD device rootfs

[    4.296842] 0x000001850000-0x000004200000 : "rootfs_data"

[    4.302578] 0x000004200000-0x000084200000 : "usrdata"

[    4.307980] block2mtd: mtd0: [eMMC] erase_size = 64KiB [65536]

[    4.313844] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:00:04 UTC (946684804)

[    4.781405] mt753x [email protected]: Port 1 Link is Up - 1Gbps/Full

[   62.481202] INFO: task swapper/0:1 blocked for more than 30 seconds.

[   62.481268] Bluetooth: hci0: Failed to load firmware file (-11)

[   62.487554]       Not tainted 5.4.33 #0

[   62.487556] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

[   62.505119] swapper/0       D    0     1      0 0x00000028

[   62.510600] Call trace:

[   62.513044]  __switch_to+0xbc/0x210

[   62.516532]  __schedule+0x26c/0x3c0

[   62.520018]  schedule+0x30/0xb0

[   62.523155]  io_schedule+0x18/0x38

[   62.526556]  do_read_cache_page+0x434/0x640

[   62.530736]  read_cache_page+0x10/0x18

[   62.534482]  block2mtd_read+0x80/0x150

[   62.538228]  part_read+0x34/0x80

[   62.541451]  mtd_read_oob+0xa0/0xb8

[   62.544929]  mtd_read+0x30/0x48

[   62.548067]  mtdblock_readsect+0x14c/0x160

[   62.552159]  mtd_queue_rq+0x318/0x4d0

[   62.555821]  __blk_mq_try_issue_directly+0x120/0x1a0

[   62.560781]  blk_mq_try_issue_directly+0x40/0xd0

[   62.565395]  blk_mq_make_request+0x390/0x3c0

[   62.569663]  generic_make_request+0x94/0x2b8

[   62.573929]  submit_bio+0x40/0x158

[   62.577328]  submit_bh_wbc+0x184/0x1d0

[   62.581066]  ll_rw_block+0x108/0x110

[   62.584641]  squashfs_read_data+0x280/0x558

[   62.588820]  squashfs_read_table+0xbc/0x150

[   62.592999]  squashfs_read_id_index_table+0x54/0x88

[   62.597873]  squashfs_fill_super+0x290/0x5b8

[   62.602141]  get_tree_bdev+0x17c/0x250

[   62.605886]  squashfs_get_tree+0x14/0x20

[   62.609805]  vfs_get_tree+0x24/0xb0

[   62.613292]  do_mount+0x50c/0x930

[   62.616597]  ksys_mount+0xdc/0xf8

[   62.619910]  do_mount_root+0x28/0x9c

[   62.623480]  mount_block_root+0x11c/0x280

[   62.627485]  mount_root+0xd8/0xe8

[   62.630796]  prepare_namespace+0x128/0x160

[   62.634887]  kernel_init_freeable+0x230/0x254

[   62.639240]  kernel_init+0x10/0xfc

[   62.642638]  ret_from_fork+0x10/0x18

[   62.646225] Kernel panic - not syncing: hung_task: blocked tasks

[   62.652223] SMP: stopping secondary CPUs

[   62.656136] Kernel Offset: disabled

[   62.659615] CPU features: 0x0002,20002000

[   62.663613] Memory Limit: none

[   62.666658] Rebooting in 1 seconds..

I did more tests. I put into emmc 5.4 image and then load initramfs with 4.19 intro RAM. With that I was able to

mount /dev/mtdblock6 /root2

But when I flash emmc with squashfs 4.19 and start intramfs from 5.4 build the same command hangs the same way as above.

That means that the issue is with kernel difference only not the image or process of openwrt image build.

OK, let me summarize information from this thread.

How to build OpenWRT for BPI-R64 and boot it from eMMC

Fetch latest OpenWRT sources:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a

Change kernel version in target/linux/mediatek/Makefile to 4.19 since eMMC is broken in 5.4:

KERNEL_PATCHVER:=4.19
KERNEL_TESTING_PATCHVER:=4.19

Add following lines to target/linux/mediatek/mt7622/config-4.19:

CONFIG_MMC_BLOCK=y
CONFIG_MTD_BLOCK2MTD=y
CONFIG_MTD_CMDLINE_PARTS=y

Copy 1000-add-factory-eeprom-and-emmc-mtd.patch (1.1 КБ) to target/linux/mediatek/patches-4.19 This patch:

  • Adds virtual MTD device (block2mtd) using cmdline which makes eMMC acting like MTD flashes, so OpenWRT can work correctly with eMMC
  • Specifies MTD partitions for block2mtd using cmdline (mtd0: mbr, mtd1: u-boot, mtd2: u-boot env, mtd3: calibration data, mtd4: openwrt firmware (up to 7GiB)
  • Enables wmac (internal WiFi) and tells driver to use mtd3 partition (mmcblk0p4 actually) as source for calibration data (make sure that it’s flashed there)

It’s assumed, that your /dev/mmcblk0p5 has size of 7G (7168 MiB) and it whole used as r/w rootfs (which maybe not a good idea). You can modify bootargs in patch “…7168M(firmware)”) for smaller rootfs size.

Configure OpenWRT

make menuconfig

At least, set following options:

Target System ---> MediaTek Ralink ARM
Subtarget ---> MT7622
Target Profile ---> Bpi Banana Pi R64

Build

make -j4

Result file: bin/targets/mediatek/mt7622/openwrt-mediatek-mt7622-bpi_bananapi-r64-squashfs-sysupgrade.bin, flash it using u-boot:

    2. System Load Linux Kernel then write to Flash via TFTP

Done.

Some time after boot OpenWRT will initialize root partition with JFFS2 filesystem:

[email protected]:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.3M      3.3M         0 100% /rom
tmpfs                   499.2M    652.0K    498.6M   0% /tmp
tmpfs                   499.2M     52.0K    499.1M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock7            3.3G      9.0M      3.3G   0% /overlay
overlayfs:/overlay        3.3G      9.0M      3.3G   0% /

Dunno, why there is only 3.3G of 7G, maybe some limits of JFFS2 or OpenWRT

Maybe that will helps somebody.

2 Likes

Hi. I have followed this thread and in particular the useful summary posted by @Kosyak I have one question:

Do I need to do anything specific to “make sure that calibration data is flashed in mtd3 partition”?

I managed to compile and get running OpenWRT with 5.4 kernel following @kosyak’s instructions. As @DanielRiot mentioned MTD_CMDLINE_PARTS was moved in kernel 5.4.

However I’m struggling to solve these issues:

  1. How to get an RW filesystem and make changes to survive reboot. My df output is as follows, no eMMC storage is mounted:
[email protected]:/# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   497.8M     68.0K    497.7M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
  1. How to get 5GHz WiFi module MT7615 working. I compiled the kernel with kmod-mt7615e module. However (a) kernel boot log ends with this output.
[   31.769783] mt7615e 0000:01:00.0: Message -4294967280 (seq 1) timeout
[   31.776237] mt7615e 0000:01:00.0: Failed to get patch semaphore

(b) iw phy command shows that I have two WiFi cards installed

[email protected]:# iw phy
Wiphy phy1
    max # scan SSIDs: 4
    max scan IEs length: 2304 bytes
    max # sched scan SSIDs: 0
    max # match sets: 0
    max # scan plans: 1
    max scan plan interval: 0
    max scan plan iterations: 0
    Retry short limit: 7
    Retry long limit: 4
    Coverage class: 0 (up to 0m)
    Device supports T-DLS.
    Available Antennas: TX 0xf RX 0xf
    Configured Antennas: TX 0xf RX 0xf
    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor
             * mesh point
    Band 1:
            Capabilities: 0x1ff
                    RX LDPC
                    HT20/HT40
                    SM Power Save disabled
                    RX Greenfield
                    RX HT20 SGI
                    RX HT40 SGI
                    TX STBC
                    RX STBC 1-stream
                    Max AMSDU length: 3839 bytes
                    No DSSS/CCK HT40
            Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
            Minimum RX AMPDU time spacing: No restriction (0x00)
            HT TX/RX MCS rate indexes supported: 0-31
            Frequencies:
                    * 2412 MHz [1] (6.0 dBm)
                    * 2417 MHz [2] (6.0 dBm)
                    * 2422 MHz [3] (6.0 dBm)
                    * 2427 MHz [4] (6.0 dBm)
                    * 2432 MHz [5] (6.0 dBm)
                    * 2437 MHz [6] (6.0 dBm)
                    * 2442 MHz [7] (6.0 dBm)
                    * 2447 MHz [8] (6.0 dBm)
                    * 2452 MHz [9] (6.0 dBm)
                    * 2457 MHz [10] (6.0 dBm)
                    * 2462 MHz [11] (6.0 dBm)
                    * 2467 MHz [12] (6.0 dBm) (no IR)
                    * 2472 MHz [13] (6.0 dBm) (no IR)
                    * 2484 MHz [14] (6.0 dBm) (no IR)
    valid interface combinations:
             * #{ IBSS } <= 1, #{ managed, AP, mesh point } <= 4,
               total <= 4, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 }

    HT Capability overrides:
             * MCS: ff ff ff ff ff ff ff ff ff ff
             * maximum A-MSDU length
             * supported channel width
             * short GI for 40 MHz
             * max A-MPDU length exponent
             * min MPDU start spacing
    Supported extended features:
            * [ VHT_IBSS ]: VHT-IBSS
            * [ RRM ]: RRM
            * [ SET_SCAN_DWELL ]: scan dwell setting
            * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
            * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
            * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
            * [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
Wiphy phy0
    max # scan SSIDs: 4
    max scan IEs length: 539 bytes
    max # sched scan SSIDs: 10
    max # match sets: 16
    max # scan plans: 1
    max scan plan interval: 10
    max scan plan iterations: 0
    Retry short limit: 7
    Retry long limit: 4
    Coverage class: 0 (up to 0m)
    Device supports T-DLS.
    Available Antennas: TX 0xf RX 0xf
    Configured Antennas: TX 0xf RX 0xf
    Supported interface modes:
             * IBSS
             * managed
             * AP
             * AP/VLAN
             * monitor
             * mesh point
    Band 1:
            Capabilities: 0x1ff
                    RX LDPC
                    HT20/HT40
                    SM Power Save disabled
                    RX Greenfield
                    RX HT20 SGI
                    RX HT40 SGI
                    TX STBC
                    RX STBC 1-stream
                    Max AMSDU length: 3839 bytes
                    No DSSS/CCK HT40
            Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
            Minimum RX AMPDU time spacing: No restriction (0x00)
            HT TX/RX MCS rate indexes supported: 0-31
            Frequencies:
                    * 2412 MHz [1] (6.0 dBm)
                    * 2417 MHz [2] (6.0 dBm)
                    * 2422 MHz [3] (6.0 dBm)
                    * 2427 MHz [4] (6.0 dBm)
                    * 2432 MHz [5] (6.0 dBm)
                    * 2437 MHz [6] (6.0 dBm)
                    * 2442 MHz [7] (6.0 dBm)
                    * 2447 MHz [8] (6.0 dBm)
                    * 2452 MHz [9] (6.0 dBm)
                    * 2457 MHz [10] (6.0 dBm)
                    * 2462 MHz [11] (6.0 dBm)
                    * 2467 MHz [12] (6.0 dBm) (no IR)
                    * 2472 MHz [13] (6.0 dBm) (no IR)
                    * 2484 MHz [14] (6.0 dBm) (no IR)
    Band 2:
            Capabilities: 0x1ff
                    RX LDPC
                    HT20/HT40
                    SM Power Save disabled
                    RX Greenfield
                    RX HT20 SGI
                    RX HT40 SGI
                    TX STBC
                    RX STBC 1-stream
                    Max AMSDU length: 3839 bytes
                    No DSSS/CCK HT40
            Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
            Minimum RX AMPDU time spacing: No restriction (0x00)
            HT TX/RX MCS rate indexes supported: 0-31
            VHT Capabilities (0x338001fa):
                    Max MPDU length: 11454
                    Supported Channel Width: 160 MHz, 80+80 MHz
                    RX LDPC
                    short GI (80 MHz)
                    short GI (160/80+80 MHz)
                    TX STBC
                    RX antenna pattern consistency
                    TX antenna pattern consistency
            VHT RX MCS set:
                    1 streams: MCS 0-9
                    2 streams: MCS 0-9
                    3 streams: MCS 0-9
                    4 streams: MCS 0-9
                    5 streams: not supported
                    6 streams: not supported
                    7 streams: not supported
                    8 streams: not supported
            VHT RX highest supported: 0 Mbps
            VHT TX MCS set:
                    1 streams: MCS 0-9
                    2 streams: MCS 0-9
                    3 streams: MCS 0-9
                    4 streams: MCS 0-9
                    5 streams: not supported
                    6 streams: not supported
                    7 streams: not supported
                    8 streams: not supported
            VHT TX highest supported: 0 Mbps
            Frequencies:
                    * 5180 MHz [36] (6.0 dBm)
                    * 5200 MHz [40] (6.0 dBm)
                    * 5220 MHz [44] (6.0 dBm)
                    * 5240 MHz [48] (6.0 dBm)
                    * 5260 MHz [52] (6.0 dBm) (no IR, radar detection)
                    * 5280 MHz [56] (6.0 dBm) (no IR, radar detection)
                    * 5300 MHz [60] (6.0 dBm) (no IR, radar detection)
                    * 5320 MHz [64] (6.0 dBm) (no IR, radar detection)
                    * 5500 MHz [100] (6.0 dBm) (no IR, radar detection)
                    * 5520 MHz [104] (6.0 dBm) (no IR, radar detection)
                    * 5540 MHz [108] (6.0 dBm) (no IR, radar detection)
                    * 5560 MHz [112] (6.0 dBm) (no IR, radar detection)
                    * 5580 MHz [116] (6.0 dBm) (no IR, radar detection)
                    * 5600 MHz [120] (6.0 dBm) (no IR, radar detection)
                    * 5620 MHz [124] (6.0 dBm) (no IR, radar detection)
                    * 5640 MHz [128] (6.0 dBm) (no IR, radar detection)
                    * 5660 MHz [132] (6.0 dBm) (no IR, radar detection)
                    * 5680 MHz [136] (6.0 dBm) (no IR, radar detection)
                    * 5700 MHz [140] (6.0 dBm) (no IR, radar detection)
                    * 5745 MHz [149] (6.0 dBm) (no IR)
                    * 5765 MHz [153] (6.0 dBm) (no IR)
                    * 5785 MHz [157] (6.0 dBm) (no IR)
                    * 5805 MHz [161] (6.0 dBm) (no IR)
                    * 5825 MHz [165] (6.0 dBm) (no IR)
    valid interface combinations:
             * #{ IBSS } <= 1, #{ managed, AP, mesh point } <= 4,
               total <= 4, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 }

    HT Capability overrides:
             * MCS: ff ff ff ff ff ff ff ff ff ff
             * maximum A-MSDU length
             * supported channel width
             * short GI for 40 MHz
             * max A-MPDU length exponent
             * min MPDU start spacing
    Supported extended features:
            * [ VHT_IBSS ]: VHT-IBSS
            * [ RRM ]: RRM
            * [ SET_SCAN_DWELL ]: scan dwell setting
            * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
            * [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
            * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
            * [ AIRTIME_FAIRNESS ]: airtime fairness scheduling

iw dev also shows two wireless devices present:

[email protected]:/# iw dev
phy#1
        Interface wlan1
                ifindex 5
                wdev 0x100000001
                addr 32:77:40:57:eb:91
                type managed
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlan0
                ifindex 4
                wdev 0x1
                addr 76:1d:f7:5a:e5:75
                type managed
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

But iw scan works only for embedded 2.4GHz WiFi module and not for 5GHz PCI card.

[email protected]:/# iw dev wlan0 scan
command failed: Network is down (-100)

[email protected]:/# iw dev wlan1 scan
BSS 78:81:02:f5:1d:3a(on wlan1)
        TSF: 3303131239365 usec (38d, 05:32:11)
        freq: 2412
        beacon interval: 100 TUs
        capability: ESS (0x0411)
        signal: -80.00 dBm
        last seen: 1036 ms ago
        SSID: MGTS_GPON_6241
        RSN:     * Version: 1
                 * Group cipher: CCMP
                 * Pairwise ciphers: CCMP
                 * Authentication suites: PSK
                 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
        HT capabilities:
                Capabilities: 0x8bc
                        HT20
                        SM Power Save disabled
                        RX Greenfield
                        RX HT20 SGI
                        TX STBC
                        No RX STBC
                        Max AMSDU length: 7935 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT RX MCS rate indexes supported: 0-15
                HT TX MCS rate indexes are undefined
        HT operation:
                 * primary channel: 1
                 * secondary channel offset: no secondary
                 * STA channel width: 20 MHz