ath79: add support for Extreme Networks WS-AP3805i
authorAlbin Hellström <albin.hellstrom@gmail.com>
Thu, 7 Jan 2021 21:51:06 +0000 (22:51 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 28 Aug 2022 23:09:17 +0000 (01:09 +0200)
Specifications:

 - SoC:    Qualcomm Atheros QCA9557-AT4A
 - RAM:    2x 128MB Nanya NT5TU64M16HG
 - FLASH:  64MB - SPANSION FL512SAIFG1
 - LAN:    Atheros AR8035-A (RGMII GbE with PoE+ IN)
 - WLAN2:  Qualcomm Atheros QCA9557 2x2 2T2R
 - WLAN5:  Qualcomm Atheros QCA9882-BR4A 2x2 2T2R
 - SERIAL: UART pins at J10 (115200 8n1)
           Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
 - LEDs: Power (Green/Amber)
   WiFi 5 (Green)
   WiFi 2 (Green)
 - BTN: Reset

Installation:

1. Download the OpenWrt initramfs-image.

Place it into a TFTP server root directory and rename it to 1D01A8C0.img
Configure the TFTP server to listen at 192.168.1.66/24.

2. Connect the TFTP server to the access point.

3. Connect to the serial console of the access point.

Attach power and interrupt the boot procedure when prompted.

Credentials are admin / new2day

4. Configure U-Boot for booting OpenWrt from ram and flash:

 $ setenv boot_openwrt 'setenv bootargs; bootm 0xa1280000'
 $ setenv ramboot_openwrt 'setenv serverip 192.168.1.66;
   tftpboot 0x89000000 1D01A8C0.img; bootm'
 $ setenv bootcmd 'run boot_openwrt'
 $ saveenv

5. Load OpenWrt into memory:

 $ run ramboot_openwrt

6. Transfer the OpenWrt sysupgrade image to the device.

Write the image to flash using sysupgrade:

 $ sysupgrade -n /path/to/openwrt-sysupgrade.bin

Signed-off-by: Albin Hellström <albin.hellstrom@gmail.com>
[rename vendor - minor style fixes - update commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts b/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts
new file mode 100644 (file)
index 0000000..8b1477b
--- /dev/null
@@ -0,0 +1,199 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca955x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "extreme-networks,ws-ap3805i", "qca,qca9557";
+       model = "Extreme Networks AP3805i";
+
+       aliases {
+               led-boot = &led_power_green;
+               led-failsafe = &led_power_amber;
+               led-running = &led_power_green;
+               led-upgrade = &led_power_amber;
+               label-mac-device = &eth0;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power_green: power_green {
+                       label = "green:power";
+                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+               };
+
+               led_power_amber: power_amber {
+                       label = "amber:power";
+                       gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan5 {
+                       label = "green:wlan5";
+                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               wlan2 {
+                       label = "green:wlan2";
+                       gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy1tpt";
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       watchdog {
+               compatible = "linux,wdt-gpio";
+               gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+               hw_algo = "toggle";
+               hw_margin_ms = <20000>;
+               always-running;
+       };
+};
+
+&wdt {
+       status = "disabled";
+};
+
+&wmac {
+       status = "okay";
+
+       qca,no-eeprom;
+};
+
+&pcie0 {
+       status = "okay";
+
+       wifi@0,0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0 0 0 0 0>;
+       };
+};
+
+&mdio0 {
+       status = "okay";
+
+       phy5: ethernet-phy@5 {
+               reg = <5>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+
+       phy-handle = <&phy5>;
+       phy-mode = "rgmii-id";
+
+       pll-data = <0x82000000 0x80000101 0x80001313>;
+
+       gmac-config {
+               device = <&gmac>;
+               rgmii-enabled = <1>;
+       };
+};
+
+&spi {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <50000000>;
+               m25p,fast-read;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot-bak";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "u-boot";
+                               reg = <0x080000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@100000 {
+                               label = "cfg1";
+                               reg = <0x100000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               label = "cfg2";
+                               reg = <0x140000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@180000 {
+                               label = "nvram4";
+                               reg = <0x180000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@1c0000 {
+                               label = "nvram3";
+                               reg = <0x1c0000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "nvram2";
+                               reg = <0x200000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@240000 {
+                               label = "nvram1";
+                               reg = <0x240000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@280000 {
+                               label = "PriImg";
+                               reg = <0x280000 0x1000000>;
+                               read-only;
+                       };
+
+                       partition@1280000 {
+                               label = "SecImg";
+                               reg = <0x1280000 0x1000000>;
+                               read-only;
+                       };
+
+                       partition@2280000 {
+                               label = "firmware";
+                               compatible = "denx,uimage";
+                               reg = <0x2280000 0x1cc0000>;
+                       };
+
+                       partition@3f40000 {
+                               label = "cert";
+                               reg = <0x3f40000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@3fc0000 {
+                               label = "art";
+                               reg = <0x3fc0000 0x40000>;
+                               read-only;
+                       };
+               };
+       };
+};
index c576dacee50eda6bebb2d2099f7f40c9dff03746..20dc5641177816277ab4f7b6203dd3aa8541e1a7 100644 (file)
@@ -43,6 +43,7 @@ ath79_setup_interfaces()
        engenius,ecb1750|\
        engenius,ecb600|\
        enterasys,ws-ap3705i|\
+       extreme-networks,ws-ap3805i|\
        glinet,gl-ar300m-lite|\
        glinet,gl-usb150|\
        hak5,wifi-pineapple-nano|\
index 95439b9b276938d0532fb5527250a5947a66d86e..df293c44db0a75b71a43a5dbfabcdf6be7e31466 100644 (file)
@@ -59,6 +59,10 @@ case "$FIRMWARE" in
                caldata_extract "calibrate" 0x1000 0x440
                ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1)
                ;;
+       extreme-networks,ws-ap3805i)
+               caldata_extract "art" 0x1000 0x440
+               ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
+               ;;
        nec,wg800hp)
                caldata_extract "art" 0x1000 0x440
                ath9k_patch_mac $(mtd_get_mac_text board_data 0x680)
index 0aa3e006f6db99a7336d163990cc2509c6b34b21..9d258083070d10fa61e6233e1f5840befd8dff7c 100644 (file)
@@ -93,6 +93,10 @@ case "$FIRMWARE" in
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) 1)
                ;;
+       extreme-networks,ws-ap3805i)
+               caldata_extract "art" 0x5000 0x844
+               ath10k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR0)
+               ;;
        glinet,gl-ar750)
                caldata_extract "art" 0x5000 0x844
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
index c2c79133420deaee6ed4b673e73eb267c845f58c..d9cb8d2b82e94bd31c73450048de1996dfcfbf9d 100644 (file)
@@ -15,6 +15,7 @@ preinit_set_mac_address() {
        enterasys,ws-ap3705i)
                ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env0 ethaddr)
                ;;
+       extreme-networks,ws-ap3805i|\
        siemens,ws-ap3610)
                ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
                ;;
index 575004ea15ae2119686d92fc534f5471bef5db11..d205fd8d9e9705044e875c0b504d42bcd6de4a97 100644 (file)
@@ -1278,6 +1278,16 @@ define Device/etactica_eg200
 endef
 TARGET_DEVICES += etactica_eg200
 
+define Device/extreme-networks_ws-ap3805i
+  SOC := qca9557
+  BLOCKSIZE := 256k
+  DEVICE_VENDOR := Extreme Networks
+  DEVICE_MODEL := WS-AP3805i
+  DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
+  IMAGE_SIZE := 29440k
+endef
+TARGET_DEVICES += extreme-networks_ws-ap3805i
+
 define Device/glinet_6408
   $(Device/tplink-8mlzma)
   SOC := ar9331