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