Skip to content

Commit

Permalink
ath79: add support for Ubiquiti NanoStation AC loco devices
Browse files Browse the repository at this point in the history
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
  • Loading branch information
rogerpueyo committed Jul 12, 2018
1 parent a129c27 commit 271e3a7
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 0 deletions.
1 change: 1 addition & 0 deletions target/linux/ath79/base-files/etc/board.d/02_network
Expand Up @@ -17,6 +17,7 @@ ath79_setup_interfaces()
"tplink,tl-mr10u"|\
"tplink,tl-wr703n"|\
"ubnt,nanobeam-5-ac"|\
"ubnt,nanostation-ac-loco"|\
"ubnt,unifiac-lite"|\
"ubnt,unifiac-mesh"|\
"ubnt,unifi")
Expand Down
Expand Up @@ -100,6 +100,7 @@ case "$FIRMWARE" in
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
;;
"ubnt,nanobeam-5-ac"|\
"ubnt,nanostation-ac-loco"|\
"ubnt,unifiac-lite"|\
"ubnt,unifiac-mesh"|\
"ubnt,unifiac-pro")
Expand Down
111 changes: 111 additions & 0 deletions target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts
@@ -0,0 +1,111 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

#include "ar9342.dtsi"

/ {
compatible = "ubnt,nanostation-ac-loco", "qca,ar9342";
model = "Ubiquiti Nanostation AC loco";

keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;

reset {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
};

&ref {
clock-frequency = <40000000>;
};

&uart {
status = "okay";
};

&gpio {
status = "okay";
};

&pcie {
status = "okay";
};

&spi {
status = "okay";
num-cs = <1>;

flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};

partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
read-only;
};

partition@50000 {
label = "firmware";
reg = <0x050000 0xf60000>;
};

partition@fb0000 {
label = "cfg";
reg = <0xfb0000 0x040000>;
read-only;
};

eeprom: partition@ff0000 {
label = "EEPROM";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};

&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>;
};
7 changes: 7 additions & 0 deletions target/linux/ath79/image/generic-ubnt.mk
Expand Up @@ -108,6 +108,13 @@ define Device/ubnt_nanobeam5-ac
endef
TARGET_DEVICES += ubnt_nanobeam5-ac

define Device/ubnt_nanostation-ac-loco
$(Device/ubnt-wa)
DEVICE_TITLE := Ubiquiti NanoStation AC loco
SUPPORTED_DEVICES += ubnt,nanostation-ac-loco nanostation-ac-loco
endef
TARGET_DEVICES += ubnt_nanostation-ac-loco

define Device/ubnt_unifi
$(Device/ubnt-bz)
DEVICE_TITLE := Ubiquiti UniFi
Expand Down

0 comments on commit 271e3a7

Please sign in to comment.