ath79: add support for ubnt_bullet-m-ar7240 variant
authorRussell Senior <russell@personaltelco.net>
Thu, 19 Mar 2020 11:27:28 +0000 (04:27 -0700)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 21 Mar 2020 18:22:21 +0000 (19:22 +0100)
This adds support for the Ubiquiti Bullet M (AR7240).

Specifications:
- AR7240 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- External antenna
- 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 Ubiquiti 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_bullet-m-ar7240-squashfs-factory.bin

The "fixed-link" section of the device tree is needed to avoid errors like this:

  Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings?

With "fixed-link", the errors go away and eth0 comes up reliably.

Signed-off-by: Russell Senior <russell@personaltelco.net>
[fix SUPPORTED_DEVICES]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.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/ar7240_ubnt_bullet-m-ar7240.dts b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts
new file mode 100644 (file)
index 0000000..58b35f5
--- /dev/null
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240.dtsi"
+#include "ar724x_ubnt_xm.dtsi"
+#include "ar724x_ubnt_xm_outdoor.dtsi"
+
+/ {
+       compatible = "ubnt,bullet-m-ar7240", "ubnt,xm", "qca,ar7240";
+       model = "Ubiquiti Bullet M XM (AR7240)";
+};
+
+&eth0 {
+       fixed-link {
+               speed = <100>;
+               full-duplex;
+       };
+};
+
+&eth1 {
+       compatible = "syscon", "simple-mfd";
+};
index 227ccf0dfec2a92eb7902dd34f794c1ea51e30d3..2df7dca89d8c5d89f8a9568665fbf9c9d98e1824 100755 (executable)
@@ -250,6 +250,7 @@ tplink,tl-wr842n-v2)
 trendnet,tew-823dru)
        ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"
        ;;
+ubnt,bullet-m-ar7240|\
 ubnt,bullet-m-ar7241|\
 ubnt,bullet-m-xw|\
 ubnt,nanostation-loco-m|\
index dbb722482b775d371cea9961f61cada4adc5a9fd..fc1fee484472b07e1a8f43aabd112723dc242428 100755 (executable)
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
        tplink,re450-v1|\
        tplink,re450-v2|\
        tplink,tl-wr902ac-v1|\
+       ubnt,bullet-m-ar7240|\
        ubnt,bullet-m-ar7241|\
        ubnt,bullet-m-xw|\
        ubnt,lap-120|\
@@ -446,6 +447,7 @@ ath79_setup_macs()
                label_mac=$wan_mac
                ;;
        ubnt,airrouter|\
+       ubnt,bullet-m-ar7240|\
        ubnt,bullet-m-ar7241|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
index 38f158896b01b7b005cbc6185a04727a54036afe..0cf8b43514741e2b972f3f0a9b4041d7fbec8b28 100644 (file)
@@ -85,6 +85,7 @@ case "$FIRMWARE" in
        tplink,tl-wr2543-v1|\
        tplink,tl-wr842n-v1|\
        ubnt,airrouter|\
+       ubnt,bullet-m-ar7240|\
        ubnt,bullet-m-ar7241|\
        ubnt,nanostation-loco-m|\
        ubnt,nanostation-m|\
index 49020230894233b5982fd1d225129bd40309d250..95853b6c461250fff8cb401d95c67f673f20368f 100644 (file)
@@ -113,6 +113,16 @@ define Device/ubnt_airrouter
 endef
 TARGET_DEVICES += ubnt_airrouter
 
+define Device/ubnt_bullet-m-ar7240
+  $(Device/ubnt-xm)
+  SOC := ar7240
+  DEVICE_MODEL := Bullet-M
+  DEVICE_VARIANT := XM (AR7240)
+  DEVICE_PACKAGES += rssileds
+  SUPPORTED_DEVICES += bullet-m
+endef
+TARGET_DEVICES += ubnt_bullet-m-ar7240
+
 define Device/ubnt_bullet-m-ar7241
   $(Device/ubnt-xm)
   SOC := ar7241