mediatek: add support for Netgear WAX206

Specifications:
* SoC: MediaTek MT7622BV
* RAM: DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
* Flash: SPI-NAND 256 MiB (Toshiba TC58CVG1S3HRAIJ)
* Wi-Fi 2.4/5 GHz 4T4R:
  * 2.4 GHz: MediaTek MT7622BV
  * 5 GHz: MediaTek MT7915AN/MT7975AN
* Ethernet: 4x 10/100/1000 Mbps LAN,
            1x 10/100/1000/2500 Mbps WAN (Realtek RTL8221B PHY)
* Switch: MediaTek MT7531AE
* LEDs/Keys: 8/1 (Power, Internet, LAN1, LAN2, LAN3, LAN4,
             Wifin and Wifia dual-colour LEDs + Reset pin)
* UART: Marked J19 on board VCC GND TX RX, beginning from "1". 3.3v,
        115200n8
* Power: 12 VDC, 2.5 A

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* U-Boot allows booting an initramfs image via TFTP as follows:
  setenv ipaddr 192.168.1.1
  setenv serverip 192.168.1.100
  tftpboot openwrt-mediatek-mt7622-netgear_wax206-initramfs-recovery.itb
  bootm

Known Limitations:
* The 2.5G WAN port labeled 'wan' only works for speeds up to 1G at the
  moment. If connected to a multi-gig port the speed has to be manually
  set to 1G/full either for the switch port or in OpenWrt. For example
  add the following to /etc/rc.local to set it on boot:
  /usr/sbin/ethtool -s wan speed 1000 duplex full

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References to WAX206 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX206_V1.0.4.0_Source.rar

* openwrt/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
  DTS file for this device.
* openwrt/target/linux/mediatek/image/mt7622.mk
  Image creation code for this device

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
[fix WAN port (1G only), adjust partition layout, adjust image creation]
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
This commit is contained in:
Marcel Ziswiler
2022-09-29 22:40:31 +02:00
committed by Hauke Mehrtens
parent 4536c76b55
commit f6d2a23cbc
5 changed files with 591 additions and 1 deletions

View File

@@ -228,6 +228,33 @@ define Device/mediatek_mt7622-rfb1-ubi
endef
TARGET_DEVICES += mediatek_mt7622-rfb1-ubi
define Device/netgear_wax206
$(Device/dsa-migration)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := WAX206
DEVICE_DTS := mt7622-netgear-wax206
DEVICE_DTS_DIR := ../dts
NETGEAR_ENC_MODEL := WAX206
NETGEAR_ENC_REGION := US
DEVICE_PACKAGES := kmod-mt7915-firmware
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
KERNEL_SIZE := 6144k
IMAGE_SIZE := 32768k
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \
append-squashfs4-fakeroot
# recovery can also be used with stock firmware web-ui, hence the padding...
KERNEL_INITRAMFS := kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 128k
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
IMAGES += factory.img
IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \
append-ubi | check-size | netgear-encrypted-factory
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += netgear_wax206
define Device/ruijie_rg-ew3200gx-pro
DEVICE_VENDOR := Ruijie
DEVICE_MODEL := RG-EW3200GX PRO