[OpenWrt-Devel] [PATCH RFC v3] ath79: add support for the ar7240 version of the ubiquiti bullet
Russell Senior
russell at personaltelco.net
Fri Mar 6 01:53:47 EST 2020
Does this look reasonable? Any other comments?
On Sat, Feb 29, 2020 at 5:09 AM Russell Senior <russell at personaltelco.net>
wrote:
>
> The Ubiquiti Bullet M2HP come in two flavors, based on ar7240 and
> ar7241. Both are supported by ar71xx, despite the different SoCs. The
> ath79 target, however, currently supports only the ar7241. The ar7240
> version apparently has a differently wired ethernet interface and the
> ar7241-based image comes up on the ar7240-based versions without a
> working ethernet interface.
>
> This is an attempt to support both flavors of ubnt-bullet-m,
> separately.
>
> Changes since v2:
>
> * generified ar7241_ubnt_xm.dtsi into ar724x_ubnt_xm.dtsi and converted
> the ubnt_xm family of devicetree's to stack #includes rather than chain
> them in order to avoid massive duplication between ar7240 and ar7241.
>
> * fixed a broken reference to ar7241_ubnt_outdoor-xm.dtsi
>
> Changes since v1:
>
> * renamed -v0 and -v1 to -ar7240 and -ar7241, respectively, as
> suggested.
>
> * abstracted ar7241_ubnt_outdoor-xm.dtsi to ar724x_ubnt_outdoor-xm.dtsi,
> so that it could be shared between ar7240 and ar7241. Included the new
> ar724x file in the terminal dts files rather than chain them.
>
> Interested in feedback.
>
> Tested on the AR7240 flavor.
>
> Signed-off-by: Russell Senior <russell at personaltelco.net>
> ---
> .../ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts | 22 +++++++++++++++++++
> .../linux/ath79/dts/ar7241_ubnt_airrouter.dts | 3 ++-
> .../ath79/dts/ar7241_ubnt_bullet-m-ar7241.dts | 15 +++++++++++++
> .../linux/ath79/dts/ar7241_ubnt_bullet-m.dts | 13 -----------
> .../dts/ar7241_ubnt_nanostation-loco-m.dts | 4 +++-
> .../ath79/dts/ar7241_ubnt_nanostation-m.dts | 4 +++-
> .../ath79/dts/ar7241_ubnt_picostation-m.dts | 4 +++-
> .../linux/ath79/dts/ar7241_ubnt_rocket-m.dts | 4 +++-
> ...r7241_ubnt_xm.dtsi => ar724x_ubnt_xm.dtsi} | 5 -----
> ...tdoor.dtsi => ar724x_ubnt_xm_outdoor.dtsi} | 2 --
> .../generic/base-files/etc/board.d/01_leds | 3 ++-
> .../generic/base-files/etc/board.d/02_network | 3 ++-
> .../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 ++-
> target/linux/ath79/image/generic-ubnt.mk | 17 ++++++++++----
> 14 files changed, 70 insertions(+), 32 deletions(-)
> create mode 100644 target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts
> create mode 100644 target/linux/ath79/dts/ar7241_ubnt_bullet-m-ar7241.dts
> delete mode 100644 target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts
> rename target/linux/ath79/dts/{ar7241_ubnt_xm.dtsi =>
> ar724x_ubnt_xm.dtsi} (92%)
> rename target/linux/ath79/dts/{ar7241_ubnt_xm_outdoor.dtsi =>
> ar724x_ubnt_xm_outdoor.dtsi} (94%)
>
> 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";
> +};
> +
> +ð0 {
> + fixed-link {
> + speed = <100>;
> + full-duplex;
> + };
> +};
> +
> +ð1 {
> + compatible = "syscon", "simple-mfd";
> +};
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
> b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
> index ad2762e20c..dd2421da8e 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
> +++ b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts
> @@ -1,7 +1,8 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> /dts-v1/;
>
> -#include "ar7241_ubnt_xm.dtsi"
> +#include "ar7241.dtsi"
> +#include "ar724x_ubnt_xm.dtsi"
>
> / {
> compatible = "ubnt,airrouter", "ubnt,xm", "qca,ar7241";
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_bullet-m-ar7241.dts
> b/target/linux/ath79/dts/ar7241_ubnt_bullet-m-ar7241.dts
> new file mode 100644
> index 0000000000..bb0f19c9eb
> --- /dev/null
> +++ b/target/linux/ath79/dts/ar7241_ubnt_bullet-m-ar7241.dts
> @@ -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,bullet-m-ar7241", "ubnt,xm", "qca,ar7241";
> + model = "Ubiquiti Bullet M AR7241";
> +};
> +
> +ð1 {
> + compatible = "syscon", "simple-mfd";
> +};
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts
> b/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts
> deleted file mode 100644
> index e16b5fa0be..0000000000
> --- a/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> -/dts-v1/;
> -
> -#include "ar7241_ubnt_xm_outdoor.dtsi"
> -
> -/ {
> - compatible = "ubnt,bullet-m", "ubnt,xm", "qca,ar7241";
> - model = "Ubiquiti Bullet M";
> -};
> -
> -ð1 {
> - compatible = "syscon", "simple-mfd";
> -};
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts
> b/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts
> index 386b7c7073..60d5a21a22 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts
> +++ b/target/linux/ath79/dts/ar7241_ubnt_nanostation-loco-m.dts
> @@ -1,7 +1,9 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> /dts-v1/;
>
> -#include "ar7241_ubnt_xm_outdoor.dtsi"
> +#include "ar7241.dtsi"
> +#include "ar724x_ubnt_xm.dtsi"
> +#include "ar724x_ubnt_xm_outdoor.dtsi"
>
> / {
> compatible = "ubnt,nanostation-loco-m", "ubnt,xm", "qca,ar7241";
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_nanostation-m.dts
> b/target/linux/ath79/dts/ar7241_ubnt_nanostation-m.dts
> index eebe65e53f..82344bb5ea 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_nanostation-m.dts
> +++ b/target/linux/ath79/dts/ar7241_ubnt_nanostation-m.dts
> @@ -1,7 +1,9 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> /dts-v1/;
>
> -#include "ar7241_ubnt_xm_outdoor.dtsi"
> +#include "ar7241.dtsi"
> +#include "ar724x_ubnt_xm.dtsi"
> +#include "ar724x_ubnt_xm_outdoor.dtsi"
>
> / {
> compatible = "ubnt,nanostation-m", "ubnt,xm", "qca,ar7241";
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts
> b/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts
> index e2376a1b92..d05aca3e67 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts
> +++ b/target/linux/ath79/dts/ar7241_ubnt_picostation-m.dts
> @@ -1,7 +1,9 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> /dts-v1/;
>
> -#include "ar7241_ubnt_xm_outdoor.dtsi"
> +#include "ar7241.dtsi"
> +#include "ar724x_ubnt_xm.dtsi"
> +#include "ar724x_ubnt_xm_outdoor.dtsi"
>
> / {
> compatible = "ubnt,picostation-m", "ubnt,xm", "qca,ar7241";
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts
> b/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts
> index 35f5205b41..9e342177e2 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts
> +++ b/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts
> @@ -1,7 +1,9 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> /dts-v1/;
>
> -#include "ar7241_ubnt_xm_outdoor.dtsi"
> +#include "ar7241.dtsi"
> +#include "ar724x_ubnt_xm.dtsi"
> +#include "ar724x_ubnt_xm_outdoor.dtsi"
>
> / {
> compatible = "ubnt,rocket-m", "ubnt,xm", "qca,ar7241";
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi
> b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
> similarity index 92%
> rename from target/linux/ath79/dts/ar7241_ubnt_xm.dtsi
> rename to target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
> index e2b653b3a7..b36b0d4fe2 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi
> +++ b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
> @@ -3,12 +3,7 @@
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/input/input.h>
>
> -#include "ar7241.dtsi"
> -
> / {
> - compatible = "ubnt,xm", "qca,ar7241";
> - model = "Ubiquiti Networks XM (rev 1.0) board";
> -
> keys {
> compatible = "gpio-keys";
>
> diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi
> b/target/linux/ath79/dts/ar724x_ubnt_xm_outdoor.dtsi
> similarity index 94%
> rename from target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi
> rename to target/linux/ath79/dts/ar724x_ubnt_xm_outdoor.dtsi
> index 75116edc51..a28f8fbcd4 100644
> --- a/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi
> +++ b/target/linux/ath79/dts/ar724x_ubnt_xm_outdoor.dtsi
> @@ -1,7 +1,5 @@
> // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
>
> -#include "ar7241_ubnt_xm.dtsi"
> -
> / {
> aliases {
> led-boot = &led_link4;
> 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 6668e15a74..857d607668 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
> @@ -242,7 +242,8 @@ tplink,tl-wr842n-v2)
> trendnet,tew-823dru)
> ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"
> ;;
> -ubnt,bullet-m|\
> +ubnt,bullet-m-ar7240|\
> +ubnt,bullet-m-ar7241|\
> ubnt,bullet-m-xw|\
> ubnt,nanostation-loco-m|\
> ubnt,nanostation-loco-m-xw|\
> 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 ef58d9e124..3a1f3d733b 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,7 +41,8 @@ ath79_setup_interfaces()
> tplink,re450-v1|\
> tplink,re450-v2|\
> tplink,tl-wr902ac-v1|\
> - ubnt,bullet-m|\
> + ubnt,bullet-m-ar7240|\
> + ubnt,bullet-m-ar7241|\
> ubnt,bullet-m-xw|\
> ubnt,lap-120|\
> ubnt,litebeam-ac-gen2|\
> 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 96f9d5c0d2..d90abe2981 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-ath9k-eeprom
> @@ -89,7 +89,8 @@ case "$FIRMWARE" in
> tplink,tl-wr2543-v1|\
> tplink,tl-wr842n-v1|\
> ubnt,airrouter|\
> - ubnt,bullet-m|\
> + ubnt,bullet-m-ar7240|\
> + ubnt,bullet-m-ar7241|\
> ubnt,nanostation-loco-m|\
> ubnt,nanostation-m|\
> ubnt,picostation-m|\
> diff --git a/target/linux/ath79/image/generic-ubnt.mk
> b/target/linux/ath79/image/generic-ubnt.mk
> index a4aff09fec..44ce4d9b06 100644
> --- a/target/linux/ath79/image/generic-ubnt.mk
> +++ b/target/linux/ath79/image/generic-ubnt.mk
> @@ -113,13 +113,22 @@ define Device/ubnt_airrouter
> endef
> TARGET_DEVICES += ubnt_airrouter
>
> -define Device/ubnt_bullet-m
> +define Device/ubnt_bullet-m-ar7240
> $(Device/ubnt-xm)
> - DEVICE_MODEL := Bullet-M
> + SOC := ar7240
> + DEVICE_MODEL := Bullet-M AR7240
> DEVICE_PACKAGES += rssileds
> - SUPPORTED_DEVICES += bullet-m
> + SUPPORTED_DEVICES += bullet-m-ar7240
> +endef
> +TARGET_DEVICES += ubnt_bullet-m-ar7240
> +
> +define Device/ubnt_bullet-m-ar7241
> + $(Device/ubnt-xm)
> + DEVICE_MODEL := Bullet-M AR7241
> + DEVICE_PACKAGES += rssileds
> + SUPPORTED_DEVICES += bullet-m-ar7241
> endef
> -TARGET_DEVICES += ubnt_bullet-m
> +TARGET_DEVICES += ubnt_bullet-m-ar7241
>
> define Device/ubnt_bullet-m-xw
> $(Device/ubnt-xw)
> --
> 2.25.1
>
>
> --
> Russell Senior, President
> russell at personaltelco.net
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200305/cabf017c/attachment.htm>
-------------- 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