openwrt-pf/package
Murad Rabadanov 6c303018b3 mediatek: filogic: add support for netis N6 V2
netis N6 V2 is a MT7981B-based router, hardware-compatible with
netis NX32U (confirmed via bootloader cross-flash). GPIO mappings
not covered by the vendor DTS were verified against NX32U and via
live link/carrier testing on switch ports, plus direct LED-toggle
confirmation on the physical device.

Hardware:
  SoC:      MediaTek MT7981B (Filogic 820)
  RAM:      256 MiB DDR3 (ESMT M15T2G16128A-AZR1-EFB, DDR3-1866)
  Flash:    128 MiB SPI-NAND
  Ethernet: 4x 1GbE (mt7531 switch: wan, lan1, lan2, lan3),
            2.5GbE internal CPU-switch link (gmac0, 2500base-x)
  WiFi:     MT7981 integrated 2.4GHz + MT7976C 5GHz radio,
            802.11ax, 2x2 MU-MIMO, HE160 supported (confirmed live;
            vendor firmware ships with HE80 for the AX1800 rating)
  USB:      1x USB 3.0 (vbus GPIO 23, active high)
  Buttons:  mesh/rfkill (GPIO 0), reset (GPIO 1)
  LEDs:     power (GPIO 4), status (GPIO 5), wan (GPIO 9),
            wlan 2.4GHz (GPIO 34, phy0tpt trigger),
            wlan 5GHz (GPIO 35, phy1tpt trigger),
            usb (GPIO 13, usbport trigger)
            all active low
  UART:     115200n8, uart0

MAC addresses:
  Interface   | Source           | Offset   | Address (this unit)
  ------------|------------------|----------|--------------------
  WAN         | Factory mac-base | 0x1fef26 | 30:07:5c:dc:7a:d2
  LAN/CPU     | Factory mac-base | 0x1fef20 | 30:07:5c:dc:7a:d0 (label)
  WiFi 2.4GHz | radio calibration (auto)     | 30:07:5c:dc:7a:d1
  WiFi 5GHz   | radio calibration (auto)     | b2:07:5c:dc:7a:d1

  LAN address matches the label on the device enclosure. WAN uses
  macaddr_factory_1fef26 on switch port@0, LAN/CPU uses
  macaddr_factory_1fef20 on port@6 (mt7531 switch). WiFi MACs are not
  set explicitly in DTS -- mt76 derives them from the radio's own
  calibration data, confirmed live to match the stock firmware value.

The USB LED (GPIO 13) was missed in the initial GPIO mapping pass --
it isn't referenced anywhere in the vendor DTS or any other board
signal, so it went unnoticed until manual GPIO toggling (`gpio clear
13` at the U-Boot prompt) confirmed it live on the physical device.
The USB LED on GPIO 13 uses the usbport trigger with trigger-sources
on both xhci ports, hence kmod-usb-ledtrig-usbport in DEVICE_PACKAGES.

The included U-Boot defenv for this board also avoids a silent
failure in ubi_write_production/ubi_write_recovery: these call
`ubi remove <vol>` without first detaching/reattaching the UBI
device, which fails silently on a busy volume while the boot script
proceeds as if it succeeded. Worked around here by adding
`ubi detach ; ubi part ubi ;` before the remove, a pattern already
used in other boards' defenvs (see issue #18231). Only this board's
defenv is touched -- other boards' defenv files are unchanged.

Known upstream issue (not specific to this port): probing
u-boot-env-layout on the ubootenv/ubootenv2 UBI volumes logs
"Invalid calculated CRC32" on every boot, see mediatek/filogic
issues #21876 and #22383.

Installation:
  Requires network access to stock firmware SSH (enabled by default)
  and a TFTP server on the same subnet.
  1. Set up a TFTP server on your PC at 192.168.1.254, serving the
     files from this release.
  2. SSH into stock firmware: ssh root@192.168.1.1
  3. Copy bl31-uboot.fip to the router and write it to the FIP
     partition: mtd write bl31-uboot.fip FIP
  4. Erase the ubi partition: mtd erase ubi
  5. Reboot. The new bootloader will detect the missing production
     image and automatically fetch initramfs-recovery.itb via TFTP.
  6. Once recovery has booted, SSH in again and sysupgrade to the
     production image: sysupgrade squashfs-sysupgrade.itb

Signed-off-by: Murad Rabadanov <the21.21@mail.ru>
Link: https://github.com/openwrt/openwrt/pull/24089
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-08-02 23:45:58 +02:00
..
base-files base-files: fix missing tabs 2026-07-26 18:02:42 +02:00
boot mediatek: filogic: add support for netis N6 V2 2026-08-02 23:45:58 +02:00
devel package: binutils: deduplicate ld 2026-04-18 19:34:21 +02:00
firmware ixp4xx-microcode: use the linux-firmware images 2026-08-01 18:36:20 +02:00
kernel kernel: netfilter: add kmod-nft-core dep to kmod-nf-flow 2026-08-01 23:43:05 +02:00
libs gettext-full: update to 0.24.2 2026-07-30 19:40:44 +02:00
network ppp: fix precompiled filter option 2026-08-01 12:20:52 +02:00
system fstools: update to git HEAD of 2026-07-25 2026-07-25 17:30:51 +01:00
utils ucode-mod-bpf: bump PKG_RELEASE 2026-07-20 10:43:36 +02:00
Makefile build: add CycloneDX SBOM processing to apk 2026-05-17 12:21:09 +02:00