[OpenWrt-Devel] [PATCH v4 3/4] ath79: add support for ubnt_bullet-m-ar7240 variant

mail at adrianschmutzler.de mail at adrianschmutzler.de
Wed Mar 18 07:02:46 EDT 2020


Hi,

I will merge patches 1 and 2 from this set in a minute (with minor fixes/adjustments).

While I still don't think the naming is solved nicely, I also still don't know a better, so let's apply it way, names can still be changed later.

Some comments on this one below.

I do not see why patch 4 is necessary at all, because the variant will be inherited from ubnt_xw.

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Russell Senior
> Sent: Mittwoch, 11. März 2020 02:06
> To: openwrt-devel at lists.openwrt.org
> Cc: Russell Senior <russell at personaltelco.net>
> Subject: [OpenWrt-Devel] [PATCH v4 3/4] ath79: add support for
> ubnt_bullet-m-ar7240 variant
> 
> 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
> 
> Signed-off-by: Russell Senior <russell at personaltelco.net>
> ---
>  .../ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts | 22
> +++++++++++++++++++
>  .../generic/base-files/etc/board.d/01_leds    |  1 +
>  .../generic/base-files/etc/board.d/02_network |  1 +
>  .../etc/hotplug.d/firmware/10-ath9k-eeprom    |  1 +
>  target/linux/ath79/image/generic-ubnt.mk      | 10 +++++++++
>  5 files changed, 35 insertions(+)
>  create mode 100644 target/linux/ath79/dts/ar7240_ubnt_bullet-m-
> ar7240.dts
> 
> 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
> index 0000000000..99bf971eec
> --- /dev/null
> +++ b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts
> @@ -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 AR7240";
> +};
> +
> +&eth0 {
> +	fixed-link {
> +		speed = <100>;
> +		full-duplex;
> +	};

Are you sure this is needed/correct? I haven't found something like that for any ar7240 device, and eth0 is connected via swphy4 in ar7240.dtsi ...

> +};
> +
> +&eth1 {
> +	compatible = "syscon", "simple-mfd";
> +};
> diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
> b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
> index cf9dfd2b0d..98cdd6b7d4 100755
> --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
> +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
> @@ -245,6 +245,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|\
> diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network
> b/target/linux/ath79/generic/base-files/etc/board.d/02_network
> index 24ba524c73..f0d96a1273 100755
> --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
> +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
> @@ -41,6 +41,7 @@ ath79_setup_interfaces()
>  	tplink,re450-v1|\
>  	tplink,re450-v2|\
>  	tplink,tl-wr902ac-v1|\
> +	ubnt,bullet-m-ar7240|\

There is/was a second occurrence of bullet-m in 02_network below, please also add the new variant there.

>  	ubnt,bullet-m-ar7241|\
>  	ubnt,bullet-m-xw|\
>  	ubnt,lap-120|\
> diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-
> ath9k-eeprom b/target/linux/ath79/generic/base-
> files/etc/hotplug.d/firmware/10-ath9k-eeprom
> index 225915ef3b..08d0e27acc 100644
> --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-
> ath9k-eeprom
> +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-at
> +++ h9k-eeprom
> @@ -90,6 +90,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|\
> diff --git a/target/linux/ath79/image/generic-ubnt.mk
> b/target/linux/ath79/image/generic-ubnt.mk
> index 9752319209..5808d8f424 100644
> --- a/target/linux/ath79/image/generic-ubnt.mk
> +++ b/target/linux/ath79/image/generic-ubnt.mk
> @@ -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-ar7240

This should be

SUPPORTED_DEVICES += bullet-m

I'm not sure whether we should enable sysupgrade from the previous undistinguished ar7241 ath79 version (ubnt,bullet-m) as well?

Best

Adrian

> +endef
> +TARGET_DEVICES += ubnt_bullet-m-ar7240
> +
>  define Device/ubnt_bullet-m-ar7241
>    $(Device/ubnt-xm)
>    SOC := ar7241
> --
> 2.25.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200318/aca7632a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list