ath79: add support for Ubiquiti LiteStation SR71
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 21 Dec 2020 22:39:51 +0000 (23:39 +0100)
committerZoltan HERPAI <wigyori@uid0.hu>
Thu, 21 Apr 2022 07:18:35 +0000 (09:18 +0200)
Specifications:

SoC: AR7130
DRAM: 32Mb DDR1
Flash: 16Mb SPI-NOR
LAN: 2x 10/100Mbps via ADM6996 switch on MII
     (1 with PoE)
PCI: 1x mini-PCI
UART: standard UART header
JTAG: yes
LEDs: 8x LEDs

Installation instructions:

The original FIS partitioning does not provide enough
space for the kernel, so the installation must start
with re-partitioning the flash from RedBoot.

The MAC address is stored in the "boardconfig" partition, which is
automatically created.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
target/linux/ath79/dts/ar7130_ubnt_sr71.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
target/linux/ath79/generic/config-default
target/linux/ath79/image/generic-ubnt.mk

diff --git a/target/linux/ath79/dts/ar7130_ubnt_sr71.dts b/target/linux/ath79/dts/ar7130_ubnt_sr71.dts
new file mode 100644 (file)
index 0000000..09fe7ad
--- /dev/null
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar7100.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "ubnt,sr71", "qca,ar7130";
+       model = "Ubiquiti LiteStation SR71";
+
+       aliases {
+               led-boot = &led_system;
+               led-failsafe = &led_system;
+               led-running = &led_system;
+               led-upgrade = &led_system;
+       };
+
+       extosc: ref {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-output-names = "ref";
+               clock-frequency = <40000000>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_system: system {
+                       label = "green:system";
+                       gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+               };
+
+               wlan {
+                       label = "green:wlan";
+                       gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               d28 {
+                       label = "green:d28";
+                       gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               wps {
+                       label = "sw4";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+};
+
+&eth0 {
+       status = "okay";
+};
+
+&eth1 {
+       status = "okay";
+};
+
+&pcie0 {
+       status = "okay";
+};
+
+&spi {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+
+               partitions {
+                       compatible = "ecoscentric,redboot-fis-partitions";
+               };
+       };
+};
+
+&uart {
+       status = "okay";
+};
+
+&eth0 {
+       phy-mode = "mii";
+
+       fixed-link {
+               speed = <100>;
+               full-duplex;
+       };
+};
+
+&eth1 {
+       phy-mode = "rmii";
+
+       fixed-link {
+               speed = <100>;
+               full-duplex;
+       };
+};
index 72141b3e6a4d2b77003727598edba028b1bd0f3a..25cb6a6f3b4359935bfde89481b85c4e70864cf9 100644 (file)
@@ -67,7 +67,8 @@ platform_do_upgrade() {
                ;;
        atheros,pb42|\
        ubnt,routerstation|\
-       ubnt,routerstation-pro)
+       ubnt,routerstation-pro|\
+       ubnt,sr71)
                redboot_fis_do_upgrade "$1" kernel
                ;;
        jjplus,ja76pf2)
index 0ac756642fe15b9af946db5eb6fee4970055843f..2561a6693ae034b951617bff8588cc8ccadc6411 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_MARVELL_PHY=y
 CONFIG_MICREL_PHY=y
 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3
 CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
 CONFIG_MTD_SPLIT_EVA_FW=y
 CONFIG_PHY_AR7100_USB=y
 CONFIG_PHY_AR7200_USB=y
index 0b613df62b4e4b309669023550af3058bacd1319..029c724ca0378613832263e72361bcea60b108b8 100644 (file)
@@ -483,3 +483,22 @@ define Device/ubnt_unifi-ap-pro
   SUPPORTED_DEVICES += uap-pro
 endef
 TARGET_DEVICES += ubnt_unifi-ap-pro
+
+define Device/ubnt_sr71
+  DEVICE_PACKAGES := -uboot-envtools kmod-usb-ohci kmod-usb2 fconfig
+  DEVICE_VENDOR := Ubiquiti
+  DEVICE_MODEL := LiteStation SR71
+  SOC := ar7130
+  BLOCKSIZE := 256k
+  IMAGE_SIZE := 15616k
+  IMAGES += kernel.bin rootfs.bin
+  IMAGE/kernel.bin := append-kernel
+  IMAGE/rootfs.bin := append-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \
+       append-metadata | check-size
+  KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
+  KERNEL_INITRAMFS := kernel-bin | append-dtb
+  UBNT_BOARD := LS-SR71
+  UBNT_CHIP := ar7100
+endef
+TARGET_DEVICES += ubnt_sr71