[OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti LiteBeam AC Gen2

Stijn Tintel stijn at linux-ipv6.be
Mon Dec 2 18:26:29 EST 2019


Hardware:
* SoC: Atheros AR9342-BL1A
* RAM: 64MB DDR2 (Winbond W9751G6KB-25)
* Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G)
* Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support
* Wifi 2.4GHz: Atheros AR9340 v2
* WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2)
* LEDs: 1x Power, 1x Ethernet
* Buttons: 1x Reset
* UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port

The LEDs do not seem to be connected to any GPIO, so there is currently
no way to control them.

Installation via U-Boot, TFTP and serial console:
* Configure your TFTP server with IP 192.168.1.254
* Connect serial console and power up the device
* Hit any key to stop autoboot
* tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin
* bootm 0x81000000
* copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin
  to /tmp
* sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---

Notes:
    Instructions can be found to install OpenWrt via AirOS at [0]. Unfortunately
    they require an AirOS image, which can only be downloaded by accepting
    the EULA. As I do not want to accept this EULA, I have not been able to
    test these instructions and did not include them in the commit message.
    
    Also available in my staging tree at [1]
    
    [0] https://github.com/openwrt/openwrt/pull/689#issuecomment-493658317
    [1] https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads/lbe-5ac-gen2

 .../dts/ar9342_ubnt_litebeam-ac-gen2.dts      | 39 +++++++++++++++++++
 .../generic/base-files/etc/board.d/02_network |  1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |  1 +
 target/linux/ath79/image/generic-ubnt.mk      |  9 +++++
 4 files changed, 50 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts

diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts
new file mode 100644
index 0000000000..d7eacf44d0
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar9342_ubnt_wa.dtsi"
+
+/ {
+	compatible = "ubnt,litebeam-ac-gen2", "ubnt,wa", "qca,ar9342";
+	model = "Ubiquiti LiteBeam AC Gen2";
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <4>;
+	phy4: ethernet-phy at 4 {
+		reg = <4>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	/* default for ar934x, except for 1000M and 10M */
+	pll-data = <0x02000000 0x00000101 0x00001313>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "rgmii-id";
+	phy-handle = <&phy4>;
+
+	gmac-config {
+		device = <&gmac>;
+		rxd-delay = <3>;
+		rxdv-delay = <3>;
+	};
+};
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 e811f85f0e..c194def53d 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
 	ubnt,bullet-m|\
 	ubnt,bullet-m-xw|\
 	ubnt,lap-120|\
+	ubnt,litebeam-ac-gen2|\
 	ubnt,nanobeam-ac|\
 	ubnt,nanostation-ac-loco|\
 	ubnt,rocket-m|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 062caf6ad5..55c6b74e74 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -17,6 +17,7 @@ case "$FIRMWARE" in
 	ubnt,unifiac-mesh|\
 	ubnt,unifiac-mesh-pro|\
 	ubnt,lap-120|\
+	ubnt,litebeam-ac-gen2|\
 	ubnt,nanobeam-ac|\
 	ubnt,nanostation-ac|\
 	ubnt,nanostation-ac-loco|\
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index 19dbe2eb8b..7f59b6e841 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -128,6 +128,15 @@ define Device/ubnt_lap-120
 endef
 TARGET_DEVICES += ubnt_lap-120
 
+define Device/ubnt_litebeam-ac-gen2
+  $(Device/ubnt-wa)
+  DEVICE_TITLE := Ubiquiti LiteBeam AC Gen2
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  IMAGE_SIZE := 15744k
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+endef
+TARGET_DEVICES += ubnt_litebeam-ac-gen2
+
 define Device/ubnt_nanobeam-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := NanoBeam AC
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list