ath79: add support for Ubiquiti Picostation M (XM)
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 17 Feb 2020 23:08:18 +0000 (00:08 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 21 Feb 2020 13:12:30 +0000 (14:12 +0100)
This adds support for the Ubiquiti Picostation M (XM), which has the
same board/LEDs as the Bullet M XM, but different case and antennas.

Specifications:
- AR7241 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- External antenna: 5 dBi (USA), 2 dBi (EU)
- POWER/LAN green LEDs
- 4x RSSI LEDs (red, orange, green, green)
- UART (115200 8N1) on PCB

Flashing via WebUI:
  Upload the factory image via the stock firmware web UI.

  Attention: airOS firmware versions >= 5.6 have a new bootloader with
  an incompatible partition table!

  Please downgrade to <= 5.5 _before_ flashing OpenWrt!
  Refer to the device's Wiki page for further information.

Flashing via TFTP:
  Same procedure as other NanoStation M boards.

- Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
  button on the device or on the PoE supply pressed
- Power on the device via PoE (keep reset button pressed)
- Keep pressing until LEDs flash alternatively LED1+LED3 =>
  LED2+LED4 => LED1+LED3, etc.
- Release reset button
- The device starts a TFTP server at 192.168.1.20
- Set a static IP on the computer (e.g., 192.168.1.21/24)
- Upload via tftp the factory image:
  $ tftp 192.168.1.20
  tftp> bin
  tftp> trace
  tftp> put openwrt-ath79-generic-xxxxx-ubnt_picostation-m-squashfs-factory.bin

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 6fdaf16dd0623db1a324d33fdf0bc1654365ee62)

target/linux/ath79/base-files/etc/board.d/01_leds
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts [new file with mode: 0644]
target/linux/ath79/image/generic-ubnt.mk

index c8b7541b0870fddbcac7e8da7b1005686b34082b..f600c6f779e639d8777069f619325a491fe04eef 100755 (executable)
@@ -203,6 +203,7 @@ ubnt,bullet-m-xw|\
 ubnt,nanostation-loco-m|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
 ubnt,nanostation-loco-m|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
+ubnt,picostation-m|\
 ubnt,rocket-m)
        ucidef_set_rssimon "wlan0" "200000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
 ubnt,rocket-m)
        ucidef_set_rssimon "wlan0" "200000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
index 177666c30d62ce6d1cd2613cfcc6e7fc8827d1f4..3df6fde229c907ea3a8351f737edf3b7478694d1 100755 (executable)
@@ -39,6 +39,7 @@ ath79_setup_interfaces()
        ubnt,nanobeam-ac|\
        ubnt,nanostation-ac-loco|\
        ubnt,nanostation-loco-m|\
        ubnt,nanobeam-ac|\
        ubnt,nanostation-ac-loco|\
        ubnt,nanostation-loco-m|\
+       ubnt,picostation-m|\
        ubnt,rocket-m|\
        ubnt,unifiac-lite|\
        ubnt,unifiac-lr|\
        ubnt,rocket-m|\
        ubnt,unifiac-lite|\
        ubnt,unifiac-lr|\
index 21a59ee7d1cd167b595719f40776d7ad08431ec4..1469765bd9f2701bb87cfa85afc7ccfd7e5825e2 100644 (file)
@@ -175,6 +175,7 @@ case "$FIRMWARE" in
        ubnt,bullet-m|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
        ubnt,bullet-m|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
+       ubnt,picostation-m|\
        ubnt,rocket-m)
                ath9k_eeprom_extract "art" 4096 4096
                ;;
        ubnt,rocket-m)
                ath9k_eeprom_extract "art" 4096 4096
                ;;
diff --git a/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts b/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts
new file mode 100644 (file)
index 0000000..e2376a1
--- /dev/null
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7241_ubnt_xm_outdoor.dtsi"
+
+/ {
+       compatible = "ubnt,picostation-m", "ubnt,xm", "qca,ar7241";
+       model = "Ubiquiti Picostation M";
+};
+
+&eth1 {
+       compatible = "syscon", "simple-mfd";
+};
index 43be87e3d5cb11e3dacf0a25a3a086d9640aa20b..1ae16554bc3f95580cbc8aea5d732c97a1a036ed 100644 (file)
@@ -101,6 +101,14 @@ define Device/ubnt_bullet-m-xw
 endef
 TARGET_DEVICES += ubnt_bullet-m-xw
 
 endef
 TARGET_DEVICES += ubnt_bullet-m-xw
 
+define Device/ubnt_picostation-m
+  $(Device/ubnt-xm)
+  DEVICE_TITLE := Ubiquiti Picostation M
+  DEVICE_PACKAGES += rssileds
+  SUPPORTED_DEVICES += bullet-m
+endef
+TARGET_DEVICES += ubnt_picostation-m
+
 define Device/ubnt_rocket-m
   $(Device/ubnt-xm)
   DEVICE_TITLE := Ubiquiti Rocket-M
 define Device/ubnt_rocket-m
   $(Device/ubnt-xm)
   DEVICE_TITLE := Ubiquiti Rocket-M