ath79: Add support for Ubiquiti NanoBeam AC Gen1 XC
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Sun, 16 Jan 2022 18:00:19 +0000 (19:00 +0100)
committerPetr Štetiar <ynezz@true.cz>
Sat, 19 Feb 2022 12:10:01 +0000 (13:10 +0100)
The Ubiquiti NanoBeam AC Gen1 XC (NBE-5AC-19) is an outdoor 802.11ac CPE
with a waterproof casing (ultrasonically welded) and bulb shaped.

Hardware:
 - SoC: Qualcomm Atheros QCA9558
 - RAM: 128 MB DDR2
 - Flash: 16 MB SPI NOR
 - Ethernet: 1x GbE, AR8033 phy connected via SGMII
 - PSU: 24 Vdc passive PoE
 - WiFi 5 GHz: Qualcomm Atheros QCA988X
 - Buttons: 1x reset
 - LEDs: 1x power, 1x Ethernet, 4x RSSI, all blue
 - Internal antenna: 19 dBi planar

Installation from stock airOS firmware:
 - Follow instructions for XC-type Ubiquiti devices on OpenWrt wiki at
   https://openwrt.org/toh/ubiquiti/common

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/image/generic-ubnt.mk

diff --git a/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts b/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts
new file mode 100644 (file)
index 0000000..1438807
--- /dev/null
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Device Tree file for Ubiquiti Nanobeam NBE-5AC-19 (XC)
+ *
+ * Copyright (C) 2022 Daniel González Cabanelas <dgcbueu@gmail.com>
+ * based on device tree from qca9558_ubnt_powerbeam-5ac-500.dts
+ */
+#include "qca955x_ubnt_xc.dtsi"
+
+/ {
+       compatible = "ubnt,nanobeam-ac-xc", "ubnt,xc", "qca,qca9558";
+       model = "Ubiquiti NanoBeam AC Gen1 (XC)";
+
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "Reset button";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+
+       led_spi {
+               compatible = "spi-gpio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               sck-gpios  = <&gpio 0 GPIO_ACTIVE_HIGH>;
+               mosi-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+               cs-gpios   = <&gpio 3 GPIO_ACTIVE_HIGH>;
+               num-chipselects = <1>;
+
+               led_gpio: led_gpio@0 {
+                       compatible = "fairchild,74hc595";
+                       reg = <0>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       registers-number = <1>;
+                       spi-max-frequency = <10000000>;
+                       enable-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               rssi0 {
+                       label = "blue:rssi0";
+                       gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
+               };
+               rssi1 {
+                       label = "blue:rssi1";
+                       gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
+               };
+               rssi2 {
+                       label = "blue:rssi2";
+                       gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
+               };
+               rssi3 {
+                       label = "blue:rssi3";
+                       gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
+               };
+               led_power: power {
+                       label = "blue:power";
+                       gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+       };
+};
+
+&mdio0 {
+       status = "okay";
+
+       phy-mask = <4>;
+       phy4: ethernet-phy@4 {
+               phy-mode = "sgmii";
+               reg = <4>;
+               at803x-override-sgmii-link-check;
+       };
+};
+
+&eth0 {
+       status = "okay";
+
+       pll-reg = <0 0x48 0>;
+       pll-data = <0x03000000 0x00000101 0x00001313>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+       phy-mode = "sgmii";
+       phy-handle = <&phy4>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index c8717ce0cc648f29a5bc938a8781656f28d9c9b7..18904f8528318094fbf8d10b99e68bbc9150f030 100644 (file)
@@ -414,6 +414,7 @@ trendnet,tew-823dru)
 ubnt,bullet-ac|\
 ubnt,nanobeam-ac|\
 ubnt,nanobeam-ac-gen2|\
+ubnt,nanobeam-ac-xc|\
 ubnt,nanostation-ac|\
 ubnt,powerbeam-5ac-gen2)
        ucidef_set_rssimon "wlan0" "200000" "1"
index b80f8cd2662d7fff63c69aca4ff3877bf2ec1176..447d1cdea2060691bb0fdf8b287ab116d3e9de98 100644 (file)
@@ -85,6 +85,7 @@ ath79_setup_interfaces()
        ubnt,lap-120|\
        ubnt,litebeam-ac-gen2|\
        ubnt,nanobeam-ac|\
+       ubnt,nanobeam-ac-xc|\
        ubnt,nanobridge-m|\
        ubnt,nanostation-ac-loco|\
        ubnt,nanostation-loco-m|\
@@ -714,6 +715,7 @@ ath79_setup_macs()
                ;;
        ubnt,litebeam-ac-gen2|\
        ubnt,nanobeam-ac-gen2|\
+       ubnt,nanobeam-ac-xc|\
        ubnt,powerbeam-5ac-500|\
        ubnt,powerbeam-5ac-gen2)
                label_mac=$(mtd_get_mac_binary art 0x5006)
index 787d56c237fc988e9e60541bb40317d526a6608a..cf16fa23182c5c64896d829f37f2dffc406d02e4 100644 (file)
@@ -37,6 +37,7 @@ case "$FIRMWARE" in
        ubnt,litebeam-ac-gen2|\
        ubnt,nanobeam-ac|\
        ubnt,nanobeam-ac-gen2|\
+       ubnt,nanobeam-ac-xc|\
        ubnt,nanostation-ac|\
        ubnt,nanostation-ac-loco|\
        ubnt,powerbeam-5ac-500|\
index bb5eaa5458bc8af90dffac3fa28359cc957786d7..9470adf48b135fea5eb73cf246a69da3b2e7f057 100644 (file)
@@ -246,6 +246,15 @@ define Device/ubnt_nanobeam-ac-gen2
 endef
 TARGET_DEVICES += ubnt_nanobeam-ac-gen2
 
+define Device/ubnt_nanobeam-ac-xc
+  $(Device/ubnt-xc)
+  SOC := qca9558
+  DEVICE_MODEL := NanoBeam AC
+  DEVICE_VARIANT := Gen1 (XC)
+  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
+endef
+TARGET_DEVICES += ubnt_nanobeam-ac-xc
+
 define Device/ubnt_nanobridge-m
   $(Device/ubnt-xm)
   SOC := ar7241