ath79: Add support for Ubiquiti NanoStation AC loco

Atheros AR9342, 16 MB flash, 64 MB RAM

Successor to the old NanoStation M5 loco with AC wireless.

Includes a mac80211 patch for ath10k_pci because Ubiquiti uses a Ubiquiti
branded and customized QCA988X with vendor id 0777 and device id 11ac for
AC wireless.

Installation

1. Connect to serial header on device (8N1 115200)
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
This commit is contained in:
Tobias Schramm 2018-01-23 11:36:41 +01:00 committed by Mathias Kresin
parent bc5761f90b
commit 5736af8024
4 changed files with 66 additions and 3 deletions

View file

@ -20,6 +20,7 @@ ath79_setup_interfaces()
tplink,tl-mr3040-v2|\ tplink,tl-mr3040-v2|\
tplink,tl-wr703n|\ tplink,tl-wr703n|\
ubnt,bullet-m|\ ubnt,bullet-m|\
ubnt,nanostation-ac-loco|\
ubnt,rocket-m|\ ubnt,rocket-m|\
ubnt,unifiac-lite|\ ubnt,unifiac-lite|\
ubnt,unifiac-mesh|\ ubnt,unifiac-mesh|\

View file

@ -111,6 +111,7 @@ case "$FIRMWARE" in
ubnt,unifiac-lite|\ ubnt,unifiac-lite|\
ubnt,unifiac-mesh|\ ubnt,unifiac-mesh|\
ubnt,unifiac-mesh-pro|\ ubnt,unifiac-mesh-pro|\
ubnt,nanostation-ac-loco|\
ubnt,unifiac-pro) ubnt,unifiac-pro)
ath10kcal_extract "EEPROM" 20480 2116 ath10kcal_extract "EEPROM" 20480 2116
;; ;;

View file

@ -0,0 +1,40 @@
// 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,nanostation-ac-loco", "ubnt,wa";
model = "Ubiquiti Nanostation AC loco (WA)";
};
&mdio0 {
status = "okay";
phy-mask = <4>;
phy4: ethernet-phy@4 {
phy-mode = "rgmii";
reg = <4>;
};
};
&eth0 {
status = "okay";
/* default for ar934x, except for 1000M and 10M */
pll-data = <0x06000000 0x00000101 0x00001313>;
mtd-mac-address = <&eeprom 0x0>;
phy-mode = "rgmii";
phy-handle = <&phy4>;
gmac-config {
device = <&gmac>;
rxd-delay = <3>;
rxdv-delay = <3>;
};
};

View file

@ -1,4 +1,4 @@
DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION
# mkubntimage is using the kernel image direct # mkubntimage is using the kernel image direct
# routerboard creates partitions out of the ubnt header # routerboard creates partitions out of the ubnt header
@ -10,14 +10,14 @@ define Build/mkubntimage
-o $@ -o $@
endef endef
# all UBNT XM device expect the kernel image to have 1024k while flash, when # all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
# booting the image, the size doesn't matter. # booting the image, the size doesn't matter.
define Build/mkubntimage-split define Build/mkubntimage-split
-[ -f $@ ] && ( \ -[ -f $@ ] && ( \
dd if=$@ of=$@.old1 bs=1024k count=1; \ dd if=$@ of=$@.old1 bs=1024k count=1; \
dd if=$@ of=$@.old2 bs=1024k skip=1; \ dd if=$@ of=$@.old2 bs=1024k skip=1; \
$(STAGING_DIR_HOST)/bin/mkfwimage \ $(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \ -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(VERSION_DIST)-$(REVISION) \
-k $@.old1 \ -k $@.old1 \
-r $@.old2 \ -r $@.old2 \
-o $@; \ -o $@; \
@ -27,10 +27,12 @@ endef
# UBNT_BOARD e.g. one of (XS2, XS5, RS, XM) # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
# UBNT_TYPE e.g. one of (BZ, XM, XW) # UBNT_TYPE e.g. one of (BZ, XM, XW)
# UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x) # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
# UBNT_VERSION e.g. one of (6.0.0, 8.5.0)
define Device/ubnt define Device/ubnt
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
IMAGE_SIZE := 7552k IMAGE_SIZE := 7552k
UBNT_BOARD := XM UBNT_BOARD := XM
UBNT_VERSION := 6.0.0
IMAGES += factory.bin IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
@ -52,6 +54,15 @@ define Device/ubnt-bz
ATH_SOC := ar7241 ATH_SOC := ar7241
endef endef
define Device/ubnt-wa
$(Device/ubnt)
UBNT_TYPE := WA
UBNT_CHIP := ar934x
UBNT_BOARD := WA
UBNT_VERSION := 8.5.0
ATH_SOC := ar9342
endef
define Device/ubnt_bullet-m define Device/ubnt_bullet-m
$(Device/ubnt-xm) $(Device/ubnt-xm)
DEVICE_TITLE := Ubiquiti Bullet-M DEVICE_TITLE := Ubiquiti Bullet-M
@ -73,6 +84,16 @@ define Device/ubnt_nano-m
endef endef
TARGET_DEVICES += ubnt_nano-m TARGET_DEVICES += ubnt_nano-m
define Device/ubnt_nanostation-ac-loco
$(Device/ubnt-wa)
DEVICE_TITLE := Ubiquiti Nanostation AC loco
DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
IMAGE_SIZE := 15744k
IMAGES += factory.bin
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
endef
TARGET_DEVICES += ubnt_nanostation-ac-loco
define Device/ubnt_unifi define Device/ubnt_unifi
$(Device/ubnt-bz) $(Device/ubnt-bz)
DEVICE_TITLE := Ubiquiti UniFi DEVICE_TITLE := Ubiquiti UniFi