ath79: add support for Ubiquiti PowerBridge M
authorVieno Hakkerinen <vieno@hakkerinen.eu>
Fri, 10 Jul 2020 21:23:01 +0000 (23:23 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 15 Jul 2020 16:33:56 +0000 (18:33 +0200)
This adds support for the Ubiquiti PowerBridge M, which has the same
board/LEDs as the Bullet M XM, but different case and antennas.

Specifications:
- AR7241 SoC @ 400 MHz
- 64 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- Internal antenna: 25 dBi
- 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 Bullet M (XM) 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_powerbridge-m-squashfs-factory.bin

Signed-off-by: Vieno Hakkerinen <vieno@hakkerinen.eu>
target/linux/ath79/dts/ar7241_ubnt_powerbridge-m.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/image/generic-ubnt.mk

diff --git a/target/linux/ath79/dts/ar7241_ubnt_powerbridge-m.dts b/target/linux/ath79/dts/ar7241_ubnt_powerbridge-m.dts
new file mode 100644 (file)
index 0000000..3bf9ca4
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7241.dtsi"
+#include "ar724x_ubnt_xm.dtsi"
+#include "ar724x_ubnt_xm_outdoor.dtsi"
+
+/ {
+       compatible = "ubnt,powerbridge-m", "ubnt,xm", "qca,ar7241";
+       model = "Ubiquiti PowerBridge M";
+};
+
+&eth1 {
+       compatible = "syscon", "simple-mfd";
+};
index f3f87425607b5a3dfc53cc0388f50497fc3f37a9..636ff16a174124c831992a588747bd986da68f7e 100755 (executable)
@@ -315,6 +315,7 @@ ubnt,nanostation-loco-m-xw|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
 ubnt,picostation-m|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
 ubnt,picostation-m|\
+ubnt,powerbridge-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 f93d91437485d7ff3eba8a4c9ca45ce1ccaca17f..e301b6f6163a2b024d5aeff5307631d60f25e116 100755 (executable)
@@ -63,6 +63,7 @@ ath79_setup_interfaces()
        ubnt,picostation-m|\
        ubnt,powerbeam-5ac-500|\
        ubnt,powerbeam-5ac-gen2|\
        ubnt,picostation-m|\
        ubnt,powerbeam-5ac-500|\
        ubnt,powerbeam-5ac-gen2|\
+       ubnt,powerbridge-m|\
        ubnt,rocket-m|\
        ubnt,unifiac-lite|\
        ubnt,unifiac-lr|\
        ubnt,rocket-m|\
        ubnt,unifiac-lite|\
        ubnt,unifiac-lr|\
@@ -513,6 +514,7 @@ ath79_setup_macs()
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
        ubnt,picostation-m|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
        ubnt,picostation-m|\
+       ubnt,powerbridge-m|\
        ubnt,rocket-m|\
        ubnt,unifi)
                label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
        ubnt,rocket-m|\
        ubnt,unifi)
                label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
index 2573f66f4acaed81187fa3d6b1158a208d4d7d2a..90752a8f9be65f22036db592a0ea0ad26661e484 100644 (file)
@@ -111,6 +111,7 @@ case "$FIRMWARE" in
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
        ubnt,picostation-m|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
        ubnt,picostation-m|\
+       ubnt,powerbridge-m|\
        ubnt,rocket-m)
                caldata_extract "art" 0x1000 0x1000
                ;;
        ubnt,rocket-m)
                caldata_extract "art" 0x1000 0x1000
                ;;
index 3f4cc139169b0470a0c6ed716eaeaa4f7373be01..e9202eadf7e63ceef2ca680192fe337dc4b1f026 100644 (file)
@@ -269,6 +269,15 @@ define Device/ubnt_powerbeam-5ac-gen2
 endef
 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
 
 endef
 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
 
+define Device/ubnt_powerbridge-m
+  $(Device/ubnt-xm)
+  SOC := ar7241
+  DEVICE_MODEL := PowerBridge M
+  DEVICE_PACKAGES += rssileds
+  SUPPORTED_DEVICES += bullet-m
+endef
+TARGET_DEVICES += ubnt_powerbridge-m
+
 define Device/ubnt_rocket-m
   $(Device/ubnt-xm)
   SOC := ar7241
 define Device/ubnt_rocket-m
   $(Device/ubnt-xm)
   SOC := ar7241