Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mediatek: add support for Elecom WRC-X6000QS#21387

Closed
minihui-me wants to merge 1 commit into
openwrt:mainfrom
minihui-me:add-elecom-x6000qs
Closed

mediatek: add support for Elecom WRC-X6000QS#21387
minihui-me wants to merge 1 commit into
openwrt:mainfrom
minihui-me:add-elecom-x6000qs

Conversation

@minihui-me

@minihui-me minihui-me commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

mediatek: add support for Elecom WRC-X6000QS

Elecom WRC-X6000QS is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN, based on MT7986b

Specification:

  • SoC : MediaTek MT7986B
  • RAM : DDR3 512 MiB
  • Flash : Winbond 128MiB SPI NAND
  • WLAN : 2.4/5 GHz 4T4R (MediaTek MT7986)
  • Ethernet : 5x 10/100/1000 Mbps
    • wan : Maxlinear Ethernet GPY211C
    • lan : MediaTek MT7531
  • LEDs/Keys (GPIO): 11x/4x
  • UART : through-hole on PCB (J1)
    • assignment : 3.3V, TX, RX, NC, GND from tri-angle marking
    • settings : 115200n8
  • Power : 12 VDC, 2 A

Flash layout:
dev: offset size name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"

UBI layout:
name: size:
kernel 0x00364000 dynamic
rootfs 0x00FFC000 dynamic
rootfs_data 0x01A47000 dynamic

Flash instruction using factory.bin image:

  1. Boot WRC-X6000QS in router mode normally
  2. Access to the WebUI ("http://192.168.2.1/") on the device
    -> その他設定 (Other settings)
    -> フォームウェア更新 (Update firmware)
    -> ローカルファイル指定 (Specify local file)
  3. Select the OpenWrt factory.bin image and click apply ("適用") button
  4. Wait ~120 seconds to complete flashing

Switching to the stock firmware:

  1. Load the elecom.sh script
    . /lib/upgrade/elecom.sh

  2. Check the current index of firmware partition
    mstc_rw_bootnum

  3. Set the bootnum to opposite value between 1 and 2
    mstc_rw_bootnum value

    example:

    • step2 returned "1": mstc_rw_bootnum 2
    • step2 returned "2": mstc_rw_bootnum 1
  4. Reboot, to stock FW

  5. Flash the stock FW to fuly revert back to original.

Note 1: With the stock firmware, it will flash to another partition and
toggle boot to that partition when any firmware is flashed.
For example when booting on ubi, the new firmware will be flashed
to ubi_2 and the router will boot from ubi_2 afterwards.
The 5th byte of the Persist partition is the boot value (0x01 or 0x02).

During my tests, it never switched to another boot partition if the
firmware failed boot. So if openwrt doesn't boot,
UART might be required to recover.

Note 2: bootmenu_delay=0 is set from factory so uboot menu is hidden.

Signed-off-by: Yuhei Amemiya [email protected]

@minihui-me

minihui-me commented Jan 4, 2026

Copy link
Copy Markdown
Contributor Author

This is my first PR to a new device not really similar to anything else
so please review and correct especially dts.

I don't fully understand dts so there might be errors or trashes in it.

Thank you!

Tested:
2.5G WAN, LAN, 2.4G and 5G wifi
All LEDs, all buttons and switches
Flash from stock with factory.bin, upgrade with sysupgrade.bin

Problem:
When routing from LAN to WAN it only has about 100Mbps
Something is very wrong...

Full boot log
***mstc_get_bootnum_from_persist***

Reading from 0x0 to 0x5fb34250, size 0x10 ... OK
1b 05 ce 17  01 01 
mstc_bootnum:01 
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: attached mtd7 (name "ubi", size 50 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 400, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 400, PEBs reserved for bad PEB handling: 19
Reading from volume 'kernel' to 0x46000000, size 0x0 ... OK
## Loading kernel from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.12.63
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x460000e8
     Data Size:    4480552 Bytes = 4.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x48000000
     Entry Point:  0x48000000
     Hash algo:    crc32
     Hash value:   2d07e2b9
     Hash algo:    sha1
     Hash value:   c26a2bf531ab646153da299a91300430d6e73c18
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt elecom_wrc-x6000qs device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x46446054
     Data Size:    23508 Bytes = 23 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    crc32
     Hash value:   51fea2e5
     Hash algo:    sha1
     Hash value:   f7d0146c1881826dc7ceb70d630a54a35bcfb127
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Loading fdt from 0x46446054 to 0x47000000
   Booting using the fdt blob at 0x47000000
   Uncompressing Kernel Image
   Loading Device Tree to 000000005f7f0000, end 000000005f7f8bd3 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.12.63 (yuuhei@y-vm-arm-build) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 14.3.0 r32510-9934c716ed) 14.3.0, GNU ld (GNU6
[    0.000000] Machine model: ELECOM WRC-X6000QS
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[    0.000000] OF: reserved mem: 0x000000004fc00000..0x000000004fcfffff (1024 KiB) nomap non-reusable wmcpu-reserved@4fc00000
[    0.000000] OF: reserved mem: 0x000000004fd00000..0x000000004fd3ffff (256 KiB) nomap non-reusable wo-emi@4fd00000
[    0.000000] OF: reserved mem: 0x000000004fd40000..0x000000004fd7ffff (256 KiB) nomap non-reusable wo-emi@4fd40000
[    0.000000] OF: reserved mem: 0x000000004fd80000..0x000000004ffbffff (2304 KiB) nomap non-reusable wo-data@4fd80000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fbfffff]
[    0.000000]   node   0: [mem 0x000000004fc00000-0x000000004ffbffff]
[    0.000000]   node   0: [mem 0x000000004ffc0000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 20 pages/cpu s42520 r8192 d31208 u81920
[    0.000000] pcpu-alloc: s42520 r8192 d31208 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: 
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 131072
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 0MB
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: SWIOTLB bounce buffer size roundup to 1MB
[    0.000000] software IO TLB: mapped [mem 0x000000005fcc0000-0x000000005fdc0000] (1MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 640 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: GICD_CTRL.DS=0, SCR_EL3.FIQ=0
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000075] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000083] pid_max: default: 32768 minimum: 301
[    0.002535] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.002543] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.004402] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.005116] rcu: Hierarchical SRCU implementation.
[    0.005119] rcu:     Max phase no-delay instances is 1000.
[    0.005260] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.005512] smp: Bringing up secondary CPUs ...
[    0.005809] Detected VIPT I-cache on CPU1
[    0.005850] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.005878] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.006245] Detected VIPT I-cache on CPU2
[    0.006272] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.006287] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.006655] Detected VIPT I-cache on CPU3
[    0.006679] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.006691] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.006734] smp: Brought up 1 node, 4 CPUs
[    0.006739] SMP: Total of 4 processors activated.
[    0.006741] CPU: All CPU(s) started at EL2
[    0.006743] CPU features: detected: 32-bit EL0 Support
[    0.006746] CPU features: detected: CRC32 instructions
[    0.006772] alternatives: applying system-wide alternatives
[    0.006900] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.007024] Memory: 491768K/524288K available (9280K kernel code, 986K rwdata, 2768K rodata, 448K init, 298K bss, 29596K reserved, 0K cma-reserved)
[    0.009756] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009771] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.009858] 29280 pages in range for non-PLT usage
[    0.009861] 520800 pages in range for PLT usage
[    0.011108] pinctrl core: initialized pinctrl subsystem
[    0.012168] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.012428] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.012449] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.012467] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.012800] thermal_sys: Registered thermal governor 'fair_share'
[    0.012803] thermal_sys: Registered thermal governor 'bang_bang'
[    0.012806] thermal_sys: Registered thermal governor 'step_wise'
[    0.012809] thermal_sys: Registered thermal governor 'user_space'
[    0.012836] ASID allocator initialised with 65536 entries
[    0.013412] pstore: Using crash dump compression: deflate
[    0.013416] pstore: Registered ramoops as persistent store backend
[    0.013418] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.014573] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    0.028258] cryptd: max_cpu_qlen set to 1000
[    0.030078] SCSI subsystem initialized
[    0.030167] libata version 3.00 loaded.
[    0.031481] clocksource: Switched to clocksource arch_sys_counter
[    0.033423] NET: Registered PF_INET protocol family
[    0.033518] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.034488] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.034499] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.034506] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.034532] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.034630] TCP: Hash tables configured (established 4096 bind 4096)
[    0.034904] MPTCP token hash table entries: 512 (order: 2, 12288 bytes, linear)
[    0.034989] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.035002] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.035165] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.035187] PCI: CLS 0 bytes, default 64
[    0.036256] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    0.040412] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.040417] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.088844] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.089830] printk: legacy console [ttyS0] disabled
[    0.110163] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 116, base_baud = 2500000) is a ST16650V2
[    0.110200] printk: legacy console [ttyS0] enabled
[    0.906069] mtk_rng 1020f000.rng: registered RNG driver
[    0.906304] random: crng init done
[    0.916862] loop: module loaded
[    0.921331] spi-nand spi0.1: Winbond SPI NAND was found.
[    0.926666] spi-nand spi0.1: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.935514] Signature found at block 1023 [0x07fe0000]
[    0.940637] NMBM management region starts at block 960 [0x07800000]
[    0.948333] First info table with writecount 0 found in block 960
[    0.958764] Second info table with writecount 0 found in block 963
[    0.964951] NMBM has been successfully attached
[    0.969672] 13 fixed-partitions partitions found on MTD device spi0.1
[    0.976459] Creating 13 MTD partitions on "spi0.1":
[    0.981326] 0x000000000000-0x000000100000 : "BL2"
[    0.987098] 0x000000100000-0x000000180000 : "Ubootenv"
[    0.992763] 0x000000180000-0x000000380000 : "Factory"
[    0.999694] 0x000000380000-0x000000580000 : "FIP"
[    1.005891] 0x000000580000-0x0000005a0000 : "Fwheader"
[    1.011307] 0x0000005a0000-0x0000037a0000 : "firmware1"
[    1.049330] 1 mstc-boot partitions found on MTD device firmware1
[    1.055348] Creating 1 MTD partitions on "firmware1":
[    1.060384] 0x000000000000-0x000003200000 : "ubi"
[    1.065483] 0x0000037a0000-0x000003b20000 : "Config"
[    1.072934] 0x000003b20000-0x000003b40000 : "Fwheader_2"
[    1.078555] 0x000003b40000-0x000006d40000 : "firmware2"
[    1.112433] 1 mstc-boot partitions found on MTD device firmware2
[    1.118428] Creating 1 MTD partitions on "firmware2":
[    1.123482] 0x000000000000-0x000003200000 : "ubi2"
[    1.128667] 0x000006d40000-0x0000070c0000 : "Config_2"
[    1.136062] 0x0000070c0000-0x0000071c0000 : "persist"
[    1.141929] 0x0000071c0000-0x000007200000 : "Mrd"
[    1.147002] 0x000007200000-0x000007580000 : "Backup"
[    1.312478] Maxlinear Ethernet GPY211C mdio-bus:05: Firmware Version: 8.111 (0x886F)
[    1.328573] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc081780000, irq 120
[    1.338415] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc081780000, irq 120
[    1.348122] i2c_dev: i2c /dev entries driver
[    1.353708] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.362161] NET: Registered PF_INET6 protocol family
[    1.367752] Segment Routing with IPv6
[    1.371423] In-situ OAM (IOAM) with IPv6
[    1.375385] NET: Registered PF_PACKET protocol family
[    1.380510] 8021q: 802.1Q VLAN Support v1.8
[    1.452865] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.461827] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.471551] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=124)
[    1.492685] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=125)
[    1.513502] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=126)
[    1.534333] mt7530-mdio mdio-bus:1f lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=127)
[    1.545751] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    1.552471] DSA: tree 0 setup
[    1.555988] UBI: auto-attach mtd6
[    1.559298] ubi0: default fastmap pool size: 20
[    1.563837] ubi0: default fastmap WL pool size: 10
[    1.568612] ubi0: attaching mtd6
[    1.971267] ubi0: scanning is finished
[    1.982811] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 17, need 19
[    1.993103] ubi0: attached mtd6 (name "ubi", size 50 MiB)
[    1.998490] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.005354] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.012127] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.019068] ubi0: good PEBs: 400, bad PEBs: 0, corrupted PEBs: 0
[    2.025060] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    2.032267] ubi0: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 0
[    2.040596] ubi0: available PEBs: 0, total reserved PEBs: 400, PEBs reserved for bad PEB handling: 17
[    2.049802] ubi0: background thread "ubi_bgt0d" started, PID 632
[    2.050593] block ubiblock0_1: created from ubi0:1(rootfs)
[    2.061273] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    2.068299] clk: Disabling unused clocks
[    2.072463] PM: genpd: Disabling unused power domains
[    2.083951] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.091275] Freeing unused kernel memory: 448K
[    2.095754] Run /sbin/init as init process
[    2.099835]   with arguments:
[    2.102795]     /sbin/init
[    2.105488]   with environment:
[    2.108614]     HOME=/
[    2.110959]     TERM=linux
[    2.307021] init: Console is alive
[    2.310511] init: - watchdog -
[    2.686529] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.704907] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    2.716007] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.732157] init: - preinit -
[    3.054759] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    3.063216] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    3.083505] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.332050] UBIFS (ubi0:2): Mounting in unauthenticated mode
[    7.337782] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 784
[    7.386744] UBIFS (ubi0:2): recovery needed
[    7.489714] UBIFS (ubi0:2): recovery completed
[    7.494205] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    7.502022] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    7.511917] UBIFS (ubi0:2): FS size: 34791424 bytes (33 MiB, 274 LEBs), max 284 LEBs, journal size 1777664 bytes (1 MiB, 14 LEBs)
[    7.523545] UBIFS (ubi0:2): reserved for root: 1643284 bytes (1604 KiB)
[    7.530140] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID 9F26D201-2FC1-495E-BA4E-74333A078249, small LPT model
[    7.545651] mount_root: switching to ubifs overlay
[    7.555368] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    7.571601] urandom-seed: Seeding with /etc/urandom.seed
[    7.631970] procd: - early -
[    7.634904] procd: - watchdog -
[    8.176139] procd: - watchdog -
[    8.185524] procd: - ubus -
[    8.342193] procd: - init -
Please press Enter to activate this console.
[    8.619224] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.642588] GACT probability on
[    8.646402] Mirror/redirect action on
[    8.654296] u32 classifier
[    8.657005]     input device check on
[    8.660651]     Actions configured
[    8.673881] Loading modules backported from Linux version v6.18-0-g7d0a66e4b
[    8.680924] Backport generated by backports.git 4d44cef
[    8.699702] xt_time: kernel timezone is -0000
[    8.803223] urngd: v1.0.2 started.
[    9.185941] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20240823160739a
[    9.185941] 
[    9.372784] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20240823160804
[    9.474232] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20240823160840
[    9.580779] mt798x-wmac 18000000.wifi: missing precal data, size=362512
[    9.587818] mt798x-wmac 18000000.wifi: registering led 'mt76-phy0'
[    9.723329] mt798x-wmac 18000000.wifi: registering led 'mt76-phy1'
[    9.889551] PPP generic driver version 2.4.2
[    9.894823] NET: Registered PF_PPPOX protocol family
[    9.902769] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.362742] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[   12.382008] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   12.390628] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   12.405920] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   12.416925] br-lan: port 1(lan1) entered blocking state
[   12.422191] br-lan: port 1(lan1) entered disabled state
[   12.427436] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   12.433715] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   12.443348] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   12.465199] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   12.472852] br-lan: port 2(lan2) entered blocking state
[   12.478094] br-lan: port 2(lan2) entered disabled state
[   12.483392] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[   12.491312] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[   12.507024] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   12.518085] br-lan: port 3(lan3) entered blocking state
[   12.523398] br-lan: port 3(lan3) entered disabled state
[   12.528655] mt7530-mdio mdio-bus:1f lan3: entered allmulticast mode
[   12.536831] mt7530-mdio mdio-bus:1f lan3: entered promiscuous mode
[   12.551503] mt7530-mdio mdio-bus:1f lan4: configuring for phy/gmii link mode
[   12.562230] br-lan: port 4(lan4) entered blocking state
[   12.567451] br-lan: port 4(lan4) entered disabled state
[   12.572692] mt7530-mdio mdio-bus:1f lan4: entered allmulticast mode
[   12.580920] mt7530-mdio mdio-bus:1f lan4: entered promiscuous mode
[   12.591668] mtk_soc_eth 15100000.ethernet eth1: PHY [mdio-bus:05] driver [Maxlinear Ethernet GPY211C] (irq=POLL)
[   12.601857] mtk_soc_eth 15100000.ethernet eth1: configuring for phy/2500base-x link mode
[   15.763548] mt7530-mdio mdio-bus:1f lan2: Link is Up - 1Gbps/Full - flow control rx/tx
[   15.763574] br-lan: port 2(lan2) entered blocking state
[   15.776679] br-lan: port 2(lan2) entered forwarding state
[   16.792456] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control off
iperf3 from 2.5G WAN port to server
Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 39702 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   285 MBytes  2.39 Gbits/sec    0    776 KBytes       
[  5]   1.00-2.00   sec   283 MBytes  2.37 Gbits/sec    0    776 KBytes       
[  5]   2.00-3.00   sec   283 MBytes  2.38 Gbits/sec    0    870 KBytes       
[  5]   3.00-4.00   sec   283 MBytes  2.37 Gbits/sec    0    870 KBytes       
[  5]   4.00-5.00   sec   283 MBytes  2.37 Gbits/sec    0    870 KBytes       
[  5]   5.00-6.00   sec   283 MBytes  2.37 Gbits/sec    0    870 KBytes       
[  5]   6.00-7.00   sec   284 MBytes  2.38 Gbits/sec    0   1.14 MBytes       
[  5]   7.00-8.00   sec   283 MBytes  2.37 Gbits/sec    0   1.20 MBytes       
[  5]   8.00-9.00   sec   282 MBytes  2.37 Gbits/sec    0   1.20 MBytes       
[  5]   9.00-10.00  sec   283 MBytes  2.38 Gbits/sec    0   1.20 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.77 GBytes  2.38 Gbits/sec    0            sender
[  5]   0.00-10.00  sec  2.76 GBytes  2.37 Gbits/sec                  receiver

iperf Done.
iperf3 from PC over WiFi to router
Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 57881 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   185 MBytes  1.55 Gbits/sec                  
[  5]   1.00-2.00   sec   185 MBytes  1.56 Gbits/sec                  
[  5]   2.00-3.01   sec   186 MBytes  1.56 Gbits/sec                  
[  5]   3.01-4.00   sec   186 MBytes  1.57 Gbits/sec                  
[  5]   4.00-5.00   sec   158 MBytes  1.33 Gbits/sec                  
[  5]   5.00-6.00   sec   163 MBytes  1.37 Gbits/sec                  
[  5]   6.00-7.00   sec   182 MBytes  1.52 Gbits/sec                  
[  5]   7.00-8.00   sec   181 MBytes  1.52 Gbits/sec                  
[  5]   8.00-9.01   sec   181 MBytes  1.52 Gbits/sec                  
[  5]   9.01-10.00  sec   179 MBytes  1.51 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  1.75 GBytes  1.50 Gbits/sec                  sender
[  5]   0.00-10.01  sec  1.74 GBytes  1.50 Gbits/sec                  receiver

iperf Done.
iperf3 from PC over WiFi NAT WAN to server
Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 55142 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec  10.2 MBytes  85.6 Mbits/sec                  
[  5]   1.01-2.00   sec  10.5 MBytes  88.1 Mbits/sec                  
[  5]   2.00-3.00   sec  10.6 MBytes  89.5 Mbits/sec                  
[  5]   3.00-4.00   sec  10.9 MBytes  90.9 Mbits/sec                  
[  5]   4.00-5.00   sec  10.6 MBytes  89.5 Mbits/sec                  
[  5]   5.00-6.00   sec  10.8 MBytes  89.9 Mbits/sec                  
[  5]   6.00-7.00   sec  10.6 MBytes  89.2 Mbits/sec                  
[  5]   7.00-8.00   sec  10.5 MBytes  87.9 Mbits/sec                  
[  5]   8.00-9.00   sec  10.2 MBytes  86.3 Mbits/sec                  
[  5]   9.00-10.00  sec  10.0 MBytes  83.8 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec   105 MBytes  88.1 Mbits/sec                  sender
[  5]   0.00-10.03  sec   105 MBytes  87.7 Mbits/sec                  receiver

iperf Done.

iperf3 from PC over WiFi to bridged 2.5G WAN as pure AP
Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 57523 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   187 MBytes  1.56 Gbits/sec                  
[  5]   1.00-2.00   sec   187 MBytes  1.57 Gbits/sec                  
[  5]   2.00-3.00   sec   191 MBytes  1.60 Gbits/sec                  
[  5]   3.00-4.00   sec   193 MBytes  1.61 Gbits/sec                  
[  5]   4.00-5.00   sec   192 MBytes  1.61 Gbits/sec                  
[  5]   5.00-6.00   sec   188 MBytes  1.58 Gbits/sec                  
[  5]   6.00-7.00   sec   189 MBytes  1.59 Gbits/sec                  
[  5]   7.00-8.00   sec   190 MBytes  1.59 Gbits/sec                  
[  5]   8.00-9.00   sec   190 MBytes  1.59 Gbits/sec                  
[  5]   9.00-10.01  sec   189 MBytes  1.59 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.01  sec  1.85 GBytes  1.59 Gbits/sec                  sender
[  5]   0.00-10.01  sec  1.85 GBytes  1.59 Gbits/sec                  receiver

iperf Done.

Comment on lines +64 to +69
led_2g_r: led-5 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN;
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
function-enumerator = <0>;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
led_2g_r: led-5 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN;
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
function-enumerator = <0>;
};
led_2g_r: led-5 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
};

ref: https://elixir.bootlin.com/linux/v6.12.63/source/include/dt-bindings/leds/common.h#L109

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Thank you


led_2g_g: led-6 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


led_2g_w: led-7 {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_WLAN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment on lines +86 to +91
led_5g_r: led-8 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
function-enumerator = <1>;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
led_5g_r: led-8 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
function-enumerator = <1>;
};
led_5g_r: led-8 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_WLAN_5GHZ;
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
};


led_5g_g: led-9 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


led_5g_w: led-10 {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_WLAN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

read-only;
};

partition@5A0000 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use lowercase characters for unit addresses.

Suggested change
partition@5A0000 {
partition@5a0000 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Thank you

@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 2 times, most recently from ca46e72 to d193cec Compare January 4, 2026 15:13
@github-actions github-actions Bot added the target/mediatek pull request/issue for mediatek target label Jan 4, 2026
@minihui-me

Copy link
Copy Markdown
Contributor Author

It seems the routing can be fast right after openwrt starts, but drops dramatically afterwards.

iperf3 from PC over WiFi routed to WAN
Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 60517 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.01   sec  37.8 MBytes   315 Mbits/sec                  
[  5]   1.01-2.00   sec   157 MBytes  1.32 Gbits/sec                  
[  5]   2.00-3.01   sec   162 MBytes  1.36 Gbits/sec                  
[  5]   3.01-4.00   sec   161 MBytes  1.35 Gbits/sec                  
[  5]   4.00-5.00   sec   163 MBytes  1.36 Gbits/sec                  
[  5]   5.00-6.00   sec   161 MBytes  1.35 Gbits/sec                  
[  5]   6.00-7.01   sec   162 MBytes  1.36 Gbits/sec                  
[  5]   7.01-8.00   sec  94.8 MBytes   796 Mbits/sec                  
[  5]   8.00-9.01   sec  59.9 MBytes   502 Mbits/sec                  
[  5]   9.01-10.01  sec  59.8 MBytes   501 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.01  sec  1.19 GBytes  1.02 Gbits/sec                  sender
[  5]   0.00-10.08  sec  1.19 GBytes  1.01 Gbits/sec                  receiver

iperf Done.

Connecting to host x.x.x.x, port 5201
[  5] local x.x.x.x port 60747 connected to x.x.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  7.62 MBytes  63.7 Mbits/sec                  
[  5]   1.00-2.00   sec  11.0 MBytes  92.6 Mbits/sec                  
[  5]   2.00-3.01   sec  11.4 MBytes  95.0 Mbits/sec                  
[  5]   3.01-4.00   sec  11.1 MBytes  93.3 Mbits/sec                  
[  5]   4.00-5.01   sec  11.1 MBytes  93.3 Mbits/sec                  
[  5]   5.01-6.00   sec  11.1 MBytes  93.7 Mbits/sec                  
[  5]   6.00-7.00   sec  11.5 MBytes  96.1 Mbits/sec                  
[  5]   7.00-8.00   sec  11.4 MBytes  95.5 Mbits/sec                  
[  5]   8.00-9.00   sec  11.0 MBytes  92.4 Mbits/sec                  
[  5]   9.00-10.00  sec  11.2 MBytes  94.4 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec   108 MBytes  91.0 Mbits/sec                  sender
[  5]   0.00-10.03  sec   108 MBytes  90.8 Mbits/sec                  receiver

iperf Done.

@minihui-me

minihui-me commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

It seems it's a common problem with mtk that routing between LAN and WAN is of low performance but internet is just fine. Same 80Mbps goes with other openwrt forks with mtk hnat support. Reproducable on another MT8721 device, very similar results. If I copy files off a server on the WAN, it will be around 10MB/s but the internet is still 500Mbps+

When downloading at 55MB/s from the internet, the CPU is about 15-20%

I think everything is working as expected now

@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 2 times, most recently from 40ed57b to 2bdb92c Compare February 27, 2026 18:06
@minihui-me minihui-me marked this pull request as ready for review February 27, 2026 19:44
@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 2 times, most recently from cd24510 to 1f62912 Compare February 27, 2026 19:53
@minihui-me

minihui-me commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

I think this can be merged. I just built and tested an hour ago on the latest main, also checked factory.bin on latest stock firmware 1.15

@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 2 times, most recently from 6cef703 to 32b1e3f Compare March 2, 2026 12:59
@minihui-me minihui-me marked this pull request as draft March 2, 2026 13:04
@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 3 times, most recently from 9277be3 to ed5d3d1 Compare March 2, 2026 13:35
@minihui-me minihui-me marked this pull request as ready for review March 2, 2026 13:37
@minihui-me

Copy link
Copy Markdown
Contributor Author

I'm sorry I messed it up but had it back on track now.

Comment on lines +216 to +221
wf_2g_5g_pins: wf-2g-5g-pins {
mux {
function = "wifi";
groups = "wf_2g", "wf_5g";
};
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently inside the spi_flash_pins node, it should go outside of it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved

status = "okay";
};

ethsys: syscon@15000000 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ethsys node exists in the arch/arm64/boot/dts/mediatek/mt7986a.dtsi file already. extend that instead dof creating here a new soc node and a new ethsys .

For example:

&ethsys {
			eth_reset: reset-controller {
        		compatible = "ti,syscon-reset";
        		#reset-cells = <1>;

        		ti,reset-bits = <0x34 0x04 0x34 0x04 0x34 0x04 0x28>;
    		};
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I have cleaned up the code so duplicates are removed.

@minihui-me minihui-me force-pushed the add-elecom-x6000qs branch 9 times, most recently from 795e4ae to e404288 Compare March 24, 2026 20:13
@minihui-me

Copy link
Copy Markdown
Contributor Author

Also added LED on WAN port Maxlinear GPY211C

@hauke

hauke commented Mar 25, 2026

Copy link
Copy Markdown
Member

/claude

@github-actions

github-actions Bot commented Mar 25, 2026

Copy link
Copy Markdown

Claude finished @hauke's task in 4m 19s —— View job


Code Review

  • Read CLAUDE.md and repository guidelines
  • Read all changed files
  • Compare with similar device DTS implementations
  • Review DTS file for correctness
  • Review board config files
  • Post comprehensive review feedback

DTS File: mt7986b-elecom-wrc-x6000qs.dts

1. Missing pinctrl reference in &spi0

The spi_flash_pins pinctrl group is defined in &pio but never applied to &spi0. Other MT7986b devices (e.g., mercusys mr90x, buffalo WSR-6000AX8) include:

&spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&spi_flash_pins>;
    ...
}

Without this, the SPI pin mux configuration won't be applied by the pinctrl framework. The device appears to work because the bootloader likely set pins already, but this is not correct DTS practice. Fix this →

2. Wrong pinctrl function name for SPI flash

At line 161, function = "flash" is used, but other MT7986b devices use function = "spi":

# Current (elecom):
function = "flash";

# Other MT7986b devices (buffalo, mercusys):
function = "spi";

Fix this →

3. drive-strength uses raw integer instead of macro

Lines 167 and 173 use drive-strength = <8> whereas other MT7986b devices in this tree use drive-strength = <MTK_DRIVE_8mA> from <dt-bindings/pinctrl/mt65xx.h>. Using the macro is consistent with the rest of the codebase. Fix this →

4. wf_2g_5g_pins missing conf section

Other MT7986b devices include a conf section in wf_2g_5g_pins to set drive strength on all WiFi pins:

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

Fix this →

5. Unused phy@6 node

phy6: phy@6 at line 240 is defined but never referenced anywhere. gmac1 uses phy-handle = <&phy5>. This appears to be leftover and should be removed. Fix this →

6. Switch keys missing linux,input-type = <EV_SW>

switch-ap (line 106) and switch-router (line 124) are hardware switches (not momentary buttons), but they're missing linux,input-type = <EV_SW>. Without this property, the kernel will default to EV_KEY, which means userspace won't see proper switch state on boot. See the buffalo DTS for the correct pattern:

key-router {
    label = "router";
    gpios = <&pio 18 GPIO_ACTIVE_LOW>;
    linux,code = <BTN_0>;
    linux,input-type = <EV_SW>;
};

Fix this →

7. Missing &crypto node

Other MT7986b devices enable the crypto engine with &crypto { status = "okay"; }. The elecom DTS is missing this, which will prevent hardware crypto acceleration. Fix this →

8. Style: memory node missing unit address

The memory node (line 131) should be memory@40000000 to match the base address in reg and follow DTS conventions. Compare with other MT7986b devices:

# Current:
memory {
    device_type = "memory";
    reg = <0x00 0x40000000 0x00 0x20000000>;
};

# Correct style:
memory@40000000 {
    reg = <0 0x40000000 0 0x20000000>;
    device_type = "memory";
};

9. Style: hex notation in partitions node

Lines 317-318 use <0x01> for address/size cells:

#address-cells = <0x01>;
#size-cells = <0x01>;

Should be <1> to match the rest of the codebase. Fix this →

10. Pervasive trailing whitespace

There are trailing whitespace characters on many lines throughout the file (lines 15, 18, 21, 24, 25, 29, etc.). This should be cleaned up. Most editors/git diff will flag these.

11. &ethsys reset controller

The &ethsys block adds a ti,syscon-reset controller. Reviewer hauke asked if there's a driver for the ppe device (likely from a previous iteration). Now that it's just the reset controller — is this actually needed for the ethernet to work on this device, or is it leftover from initial testing? Other MT7986b devices in the tree (buffalo, mercusys, tplink) don't define this. If it's not needed, it should be removed.

12. led_power_w (white power LED)

There is a led_power_w (white, GPIO 20) alongside red/green/blue power LEDs. The function LED_FUNCTION_POWER with a white color appears unusual — typically power LEDs are RGB combinations or a single color. Is this LED actually used for power indication on the hardware? If it has a different purpose, a different function should be used.


Board Config Files

The changes to 01_leds, 02_network, and platform.sh look correct:

  • 01_leds: The WAN LED using mdio-bus:05:white:wan matches the led@0 defined in phy5's leds node. ✓
  • 02_network: lan1 lan2 lan3 lan4 eth1 is correct for a 4-port LAN + GPY211C WAN setup. ✓
  • platform.sh: The mstc_rw_bootnum dual-partition upgrade logic shared with wrc-x3000gs3 looks correct. ✓

filogic.mk

  • DEVICE_DTS_LOADADDR := 0x47000000 matches the load address in the boot log. ✓
  • IMAGE_SIZE := 51200k (50 MiB) matches the UBI partition size from the flash layout. ✓
  • DEVICE_PACKAGES := kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware — correct for MT7986b. ✓
  • The mstc-header 5.04(XZQ.0)b90 COMD uses the same value as the X3000GS3. Please confirm this is the correct firmware version string for the X6000QS (the WebUI accepts it based on testing, but documenting where this value comes from would be helpful).

Summary: The board configuration files are good. The main items in the DTS that need attention before merge are: the missing pinctrl-0 reference in &spi0 (#1), the wrong function name in spi_flash_pins (#2), the missing conf section in wf_2g_5g_pins (#4), missing linux,input-type for switches (#6), missing &crypto (#7), and the unused phy@6 (#5). The trailing whitespace (#10) should also be cleaned up.

Elecom WRC-X6000QS is a 4804Mbps 4xMIMO 2.4/5 GHz 11ax (Wi-Fi 6) router
with 2.5Gbps WAN, based on MT7986b

Specification:

- SoC             : MediaTek MT7986B
- RAM             : DDR3 512 MiB
- Flash           : Winbond 128MiB SPI NAND
- WLAN            : 2.4/5 GHz 4T4R (MediaTek MT7986)
- Ethernet        : 5x 10/100/1000 Mbps
  - wan           : Maxlinear Ethernet GPY211C
  - lan           : MediaTek MT7531
- LEDs/Keys (GPIO): 11x/4x
- UART            : through-hole on PCB (J1)
  - assignment    : 3.3V, TX, RX, NC, GND from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 2 A

Flash layout:
dev:  offset     size        name
mtd0: 0x00000000 0x00100000 "BL2"
mtd1: 0x00100000 0x00080000 "Ubootenv"
mtd2: 0x00180000 0x00200000 "Factory"
mtd3: 0x00380000 0x00200000 "FIP"
mtd4: 0x00580000 0x00020000 "Fwheader"
mtd5: 0x005a0000 0x03200000 "ubi"
mtd6: 0x037a0000 0x00380000 "Config"
mtd7: 0x03b20000 0x00020000 "Fwheader_2"
mtd8: 0x03b40000 0x03200000 "ubi_2"
mtd9: 0x06d40000 0x00380000 "Config_2"
mtd10: 0x070c0000 0x00100000 "persist"
mtd11: 0x071c0000 0x00040000 "Mrd"
mtd12: 0x07200000 0x00380000 "Backup"

UBI layout:
name:       size:
kernel      0x00364000  dynamic
rootfs      0x00FFC000  dynamic
rootfs_data 0x01A47000  dynamic

Flash instruction using factory.bin image:

1. Boot WRC-X6000QS in router mode normally
2. Access to the WebUI ("http://192.168.2.1/") on the device
   -> その他設定 (Other settings)
   -> フォームウェア更新 (Update firmware)
   -> ローカルファイル指定 (Specify local file)
3. Select the OpenWrt factory.bin image and click apply ("適用") button
4. Wait ~120 seconds to complete flashing

Switching to the stock firmware:

1. Load the elecom.sh script
   . /lib/upgrade/elecom.sh

2. Check the current index of firmware partition
   mstc_rw_bootnum

3. Set the bootnum to opposite value between 1 and 2
   mstc_rw_bootnum value

   example:
   - step2 returned "1": mstc_rw_bootnum 2
   - step2 returned "2": mstc_rw_bootnum 1

4. Reboot, to stock FW

5. Flash the stock FW to fuly revert back to original.

Note 1: With the stock firmware, it will flash to another partition and
  toggle boot to that partition when any firmware is flashed.
  For example when booting on ubi, the new firmware will be flashed
  to ubi_2 and the router will boot from ubi_2 afterwards.
  The 5th byte of the Persist partition is the boot value (0x01 or 0x02).

  During my tests, it never switched to another boot partition if the
  firmware failed boot. So if openwrt doesn't boot,
  UART might be required to recover.

Note 2: bootmenu_delay=0 is set from factory so uboot menu is hidden.

Signed-off-by: Yuhei Amemiya <[email protected]>
@minihui-me

Copy link
Copy Markdown
Contributor Author

I have made changes regarding 1, 2, 3, 4, 5, 6, 7, 8, 9, and dropped 11, suggested by Claude
I have removed all tabs in empty lines so grep -n '[[:blank:]]$' returns nothing.
Regarding 12, this device has WRGB in Power, WRB in 2.4G and 5G, and R in WPS.
As for mstc-header 5.04(XZQ.0)b90 COMD, I just copied over from X3000GS3. I have no idea what X6000QS should be. I will be happy to test if someone could suggest otherwise, or how to find out what it should be.


button-reset {
label = "reset";
gpios = <&pio 11 GPIO_ACTIVE_HIGH>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this GPIO_ACTIVE_LOW?

stock dts:

		button@2 {
			label = "reset";
			linux,code = <0x198>;
			gpios = <0x0d 0x0b 0x01>;    // <--- the 3rd value (0x01): GPIO_ACTIVE_LOW
			linux,input-type = <0x01>;
			debounce-interval = <0x3c>;
		};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check again but at least one of them is randomly triggering openwrt to enter failsafe mode on boot


button-wps {
label = "wps";
gpios = <&pio 16 GPIO_ACTIVE_HIGH>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this GPIO_ACTIVE_LOW?

stock dts:

		button@1 {
			label = "wps";
			linux,code = <0x211>;
			gpios = <0x0d 0x10 0x01>;    // <--- the 3rd value (0x01): GPIO_ACTIVE_LOW
			linux,input-type = <0x01>;
			debounce-interval = <0x3c>;
		};

label = "wps";
gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WPS_BUTTON>;
linux,input-type = <EV_SW>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a switch, but button.

label = "ap";
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux,input-type = <EV_SW>; is missing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, this and "router" button in this dts are also used for repeater mode, so those gpio pins cannot be assigned to each function on a one-to-one relationship.

ref: musashino-build@5f595e0

@musashino205

Copy link
Copy Markdown
Contributor

I made some fixes and improvements for WRC-X6000QS and WRC-X6000GSD.

https://github.com/musashino-build/openwrt/commits/devadd/wrc-x6000gsd/

@minihui-me

Copy link
Copy Markdown
Contributor Author

@musashino205 Do you mind just take over?

@minihui-me

Copy link
Copy Markdown
Contributor Author

The previous LAN speed problem is identified as I am running 2.5Gb on 10Gb RJ45 SFP+ that they report to the switch as 10Gb causing other 10Gb senders to pause. So it's a problem of my setup.

@musashino205

Copy link
Copy Markdown
Contributor

@musashino205 Do you mind just take over?

OK, I'll prepare.

@minihui-me

Copy link
Copy Markdown
Contributor Author

@musashino205 Do you mind just take over?

OK, I'll prepare.

Thank you very much.
I think you are way more experienced and it seems you got the hardware.
But if you need me on anything I would be very happy to help.
引き続きよろしくお願いいたします。

compatible = "spi-nand";
reg = <1>;

spi-max-frequency = <20000000>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

52 MHz should work fine. Can it go higher?

Suggested change
spi-max-frequency = <20000000>;
spi-max-frequency = <52000000>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied on #22926, thanks!

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fresh review of 1 commit (2d7a58f). Several issues already raised by other reviewers (button polarities, EV_SW on switch-ap, EV_SW mistakenly on the WPS button, repeater-mode use of router/AP switches) are not duplicated here.


Generated by Claude Code

Comment on lines +300 to +301
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines are indented with 4 spaces, while the rest of the file (and every other DTS in target/linux/mediatek/dts/) uses tabs. Replace with tabs to match the file's existing style.

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;
pinctrl-names = "default";
pinctrl-0 = <&spi_flash_pins>;

Generated by Claude Code

Comment on lines +302 to +303
num-cs = <2>;
cs-gpios = <0>, <0>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: num-cs = <2>; and cs-gpios = <0>, <0>; are unusual here — none of the other in-tree mt7986b boards (e.g. mt7986b-buffalo-wsr-6000ax8.dts, mt7986b-mercusys-mr90x-v1-common.dtsi, mt7981b-elecom-wrc-x3000gs3.dts) set these properties, and they all attach flash@0 rather than flash@1. Is there a hardware reason this device needs flash@1 (CS#1) and the placeholder cs-gpios = <0>, <0>; over the simpler flash@0 pattern?


Generated by Claude Code

KERNEL_IN_UBI := 1
IMAGE_SIZE := 51200k
IMAGES := sysupgrade.bin factory.bin
IMAGE/factory.bin := sysupgrade-tar | mstc-header 5.04(XZQ.0)b90 COMD | \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the mstc-header 5.04(XZQ.0)b90 COMD magic string is copied verbatim from elecom_wrc-x3000gs3 — the contributor noted in a comment they had no idea what the correct value should be for the X6000QS and just reused the X3000GS3 string. The factory image apparently flashes successfully, but it would be worth confirming whether the stock firmware version/model code for the X6000QS actually matches the X3000GS3, otherwise this should be replaced with the correct device-specific value before merge.


Generated by Claude Code

@hauke

hauke commented May 2, 2026

Copy link
Copy Markdown
Member

Support for this device was merged in 16d159c using #22926.

@hauke hauke closed this May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/mediatek pull request/issue for mediatek target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants