ath79: add support for Ubiquiti AirRouter
authorRussell Senior <russell@personaltelco.net>
Mon, 26 Nov 2018 22:28:00 +0000 (14:28 -0800)
committerJohn Crispin <john@phrozen.org>
Mon, 3 Dec 2018 06:58:56 +0000 (07:58 +0100)
Indoor low-power router with 2.4 GHz radio

CPU:    Atheros AR7241 rev 1
RAM:    32 MB
Flash:  8 MB NOR SPI
Switch: Atheros AR7240
Ports:  1x WAN, 4x LAN 10/100 Ethernet
WLAN:   Atheros AR9285 (2.4 GHz)
USB:    1x USB2 host port

Note: Ethernet WAN/LAN port naming is reversed from ar71xx.
WAN is eth0; LAN is eth1.1.

UART settings: 115200, 8N1

                LEDs
        +--------------------------
        |
        |
        |
        |
        |
        |
        |
        |
    VCC | x x
     RX | * x
        | x x
        | x x
     TX | * x
    GND | * x
        |
        |
        |
        |
        +--------------------------
                ETHERNET PORTS

Installation from Ubiquiti firmware, is as for other ubnt-xm AirOs devices.

Signed-off-by: Russell Senior <russell@personaltelco.net>
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/dts/ar7241_ubnt_airrouter.dts [new file with mode: 0644]
target/linux/ath79/image/generic-ubnt.mk

index b9d6c709e7d91c7b42280a5318b8f4a3e04d6994..d79ba04a44767eb882a3917d7442235131fa650c 100755 (executable)
@@ -124,7 +124,8 @@ ath79_setup_interfaces()
        buffalo,whr-g301n|\
        tplink,tl-mr3220-v1|\
        tplink,tl-mr3420-v1|\
-       tplink,tl-wr841-v7)
+       tplink,tl-wr841-v7|\
+       ubnt,airrouter)
                ucidef_set_interface_wan "eth0"
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
index 020abe2913145daeff11310eb7d0d370e569f7d4..68f70174bbeda7448978981776dd764a5b5bfbcc 100644 (file)
@@ -141,6 +141,7 @@ case "$FIRMWARE" in
        tplink,tl-wr741-v1|\
        tplink,tl-wr743nd-v1|\
        tplink,tl-wr841-v7|\
+       ubnt,airrouter|\
        ubnt,bullet-m|\
        ubnt,nano-m|\
        ubnt,rocket-m)
diff --git a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
new file mode 100644 (file)
index 0000000..fbe289f
--- /dev/null
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7241_ubnt_xm.dtsi"
+
+/ {
+       compatible = "ubnt,airrouter", "qca,ar7241";
+       model = "Ubiquiti AirRouter";
+
+       aliases {
+               led-boot = &globe;
+               led-failsafe = &globe;
+               led-running = &globe;
+               led-upgrade = &globe;
+       };
+
+       airrouter-leds {
+               compatible = "gpio-leds";
+
+               globe: globe {
+                       label = "ubnt:green:globe";
+                       gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+               };
+
+               power {
+                       label = "ubnt:green:power";
+                       gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
+
+&usb_phy {
+        status = "okay";
+};
+
+&usb {
+        status = "okay";
+};
index 66c16e44b023043ff5f905d8e3cfb8e751a1ce1c..88be9a78b4921aa7c9a12961fa21dfe43765a015 100644 (file)
@@ -78,6 +78,13 @@ define Device/ubnt-xw
   ATH_SOC := ar9342
 endef
 
+define Device/ubnt_airrouter
+  $(Device/ubnt-xm)
+  DEVICE_TITLE := Ubiquiti AirRouter
+  SUPPORTED_DEVICES += airrouter
+endef
+TARGET_DEVICES += ubnt_airrouter
+
 define Device/ubnt_bullet-m
   $(Device/ubnt-xm)
   DEVICE_TITLE := Ubiquiti Bullet-M