From cd17d8df2a38ccdd98aa1a7b361aa255d53ea5ac Mon Sep 17 00:00:00 2001 From: Flole Systems Date: Mon, 10 Apr 2023 23:36:59 +0200 Subject: filogic: add support for Netgear WAX220 Hardware -------- SOC: MediaTek MT7986 RAM: 1024MB DDR3 FLASH: 128MB SPI-NAND (Winbond) WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz ETH: Realtek RTL8221B-VB-CG 2.5 N-Base-T PHY with PoE UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC) Installation ------------ 1. Download the OpenWrt initramfs image. Copy the image to a TFTP server 2. Connect the TFTP server to the WAX220. Conect to the serial console, interrupt the autoboot process by pressing '0' when prompted. 3. Download & Boot the OpenWrt initramfs image. $ setenv ipaddr 192.168.2.1 $ setenv serverip 192.168.2.2 $ tftpboot openwrt.bin $ bootm 4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade. $ sysupgrade -n Signed-off-by: Flole Systems Signed-off-by: Stefan Agner (cherry picked from commit 984786a2f7ec622c99e8c9cdada65d0ea0cf4e0b) --- target/linux/mediatek/filogic/base-files/etc/board.d/01_leds | 5 +++++ target/linux/mediatek/filogic/base-files/etc/board.d/02_network | 7 +++++++ .../filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 +++++ 3 files changed, 17 insertions(+) (limited to 'target/linux/mediatek/filogic/base-files') diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 1cb00ce26d..0ba825fd2b 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -9,6 +9,11 @@ case $board in cudy,wr3000-v1) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" ;; +netgear,wax220) + ucidef_set_led_netdev "eth0" "LAN" "green:lan" "eth0" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0" + ;; xiaomi,redmi-router-ax6000-stock|\ xiaomi,redmi-router-ax6000-ubootmod) ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index a327a46108..8803326b27 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -11,6 +11,9 @@ mediatek_setup_interfaces() asus,tuf-ax4200) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1 ;; + netgear,wax220) + ucidef_set_interface_lan "eth0" + ;; bananapi,bpi-r3) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan" ;; @@ -66,6 +69,10 @@ mediatek_setup_macs() bananapi,bpi-r3) wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1) ;; + netgear,wax220) + lan_mac=$(mtd_get_mac_ascii u-boot-env mac) + label_mac=$lan_mac + ;; qihoo,360t7) lan_mac=$(mtd_get_mac_ascii factory lanMac) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index a3db00f5e8..3969a7bfe4 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -32,6 +32,11 @@ case "$board" in [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress ;; + netgear,wax220) + hw_mac_addr=$(mtd_get_mac_ascii u-boot-env mac) + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress + ;; qihoo,360t7) addr=$(mtd_get_mac_ascii factory lanMac) [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress -- cgit v1.2.3