From bc356de2850f14629cb1301be719772fa1212e72 Mon Sep 17 00:00:00 2001 From: Mauri Sandberg Date: Mon, 7 Sep 2020 22:04:26 +0300 Subject: ath79: Add support for Buffalo WZR-HP-G300NH This device is a wireless router working on 2.4GHz band based on Qualcom/Atheros AR9132 rev 2 SoC and is accompanied by Atheros AR9103 wireless chip and Realtek RTL8366RB/S switches. Due to two different switches being used also two different devices are provided. Specification: - 400 MHz CPU - 64 MB of RAM - 32 MB of FLASH (NOR) - 3x3:2 2.4 GHz 802.11bgn - 5x 10/100/1000 Mbps Ethernet - 4x LED, 3x button, On/Off slider, Auto/On/Off slider - 1x USB 2.0 - bare UART header place on PCB Flash instruction: - NOTE: Pay attention to the switch variant and choose the image to flash accordingly. (dmesg / kernel logs can tell it) - Methods for flashing - Apply factory image in OEM firmware web-gui. - Sysupgrade on top of existing OpenWRT image - U-Boot TFPT recovery for both stock or OpenWRT images: The device U-boot contains a TFTP server that by default has an address 192.168.11.1 (MAC 02:AA:BB:CC:DD:1A). During the boot there is a time window, during which the device allows an image to be uploaded from a client with address 192.168.11.2. The image will be written on flash automatically. 1) Have a computer with static IP address 192.168.11.2 and the router device switched off. 2) Connect the LAN port next to the WAN port in the device and the computer using a network switch. 3) Assign IP 192.168.11.1 the MAC address 02:AA:BB:CC:DD:1A arp -s 192.168.11.1 02:AA:BB:CC:DD:1A 4) Initiate an upload using TFTP image variant curl -T tftp://192.168.11.1 5) Switch on the device. The image will be uploaded subsequently. You can keep an eye on the diag light on the device, it should keep on blinking for a while indicating the writing of the image. General notes: - In the stock firmware the MAC address is the same among all interfaces so it is left here that way too. Recovery: - TFTP method - U-boot serial console Differences to ar71xx platform - This device is split in two different targets now due to hardware being a bit different under the hood. Dynamic solution within the same image is left for later time. - GPIOs for a sliding On/Off switch, marked 'Movie engine' on the device cover, were the wrong way around and were renamed qos_on -> movie_off, qos_off -> movie_on. Associated key codes remained the same they were. The device tree source code is mostly based on musashino's work Signed-off-by: Mauri Sandberg --- target/linux/ath79/generic/base-files/etc/board.d/01_leds | 4 ++++ target/linux/ath79/generic/base-files/etc/board.d/02_network | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'target/linux/ath79/generic/base-files/etc') diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 31bc8f70df..783b55ec32 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -83,6 +83,10 @@ avm,fritzdvbc) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan1" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "80" "100" ;; +buffalo,wzr-hp-g300nh-rb|\ +buffalo,wzr-hp-g300nh-s) + ucidef_set_led_netdev "router" "Router" "green:router" "eth1" + ;; comfast,cf-e110n-v2) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1" ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index aa5a336c57..e0c4f31e9d 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -155,6 +155,13 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; + buffalo,wzr-hp-g300nh-rb|\ + buffalo,wzr-hp-g300nh-s|\ + dlink,dir-825-b1) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" + ;; buffalo,wzr-hp-g302h-a1a0) ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" @@ -211,11 +218,6 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:2" "2:lan:1" ;; - dlink,dir-825-b1) - ucidef_set_interface_wan "eth1" - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" - ;; dlink,dir-825-c1|\ dlink,dir-835-a1|\ dlink,dir-842-c1|\ -- cgit v1.2.3