ath79: add support for Unifi AC Mesh
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 27 Jun 2018 12:33:40 +0000 (14:33 +0200)
committerMathias Kresin <dev@kresin.me>
Thu, 28 Jun 2018 18:31:48 +0000 (20:31 +0200)
The Unifi AC Mesh is equivalent to the Unifi AC Lite. However,
for setting certain parameters with the flashed device it is
helpful that the devices know their variant (e.g. automatically
setting antenna gain for the different antennas in Lite and Mesh).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dts
target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi [new file with mode: 0644]
target/linux/ath79/dts/qca9563_ubnt_unifiac-mesh.dts [new file with mode: 0644]
target/linux/ath79/image/generic-ubnt.mk

index 5601c789b05bb9e8f6d6604826626b66df56d049..579ccc5bd3206330109417d07fa4e8a5e9218d79 100755 (executable)
@@ -16,6 +16,7 @@ ath79_setup_interfaces()
        "tplink,tl-mr10u"|\
        "tplink,tl-wr703n"|\
        "ubnt,unifiac-lite"|\
+       "ubnt,unifiac-mesh"|\
        "ubnt,unifi")
                ucidef_set_interface_lan "eth0"
                ;;
index dff33b70cee79313fd0669f05b97031276e5d7b5..c27b4111dec96a7be19fab32d3e8e3c26306684d 100644 (file)
@@ -96,6 +96,7 @@ case "$FIRMWARE" in
                ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
                ;;
        "ubnt,unifiac-lite"|\
+       "ubnt,unifiac-mesh"|\
        "ubnt,unifiac-pro")
                ath10kcal_extract "EEPROM" 20480 2116
                ;;
index 6b872561ed44dc7760d4d5deea384fca3b2c3969..a3ae7089d5067b3d6bdd3a5cc52a41f55842c5fc 100644 (file)
@@ -1,26 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
-#include "qca9563_ubnt_unifiac.dtsi"
+#include "qca9563_ubnt_unifiac-lite.dtsi"
 
 / {
        compatible = "ubnt,unifiac-lite", "qca,qca9563";
-       model = "Ubiquiti UniFi-AC-LITE/MESH/LR";
-};
-
-&mdio0 {
-       status = "okay";
-
-       phy-mask = <4>;
-       phy4: ethernet-phy@4 {
-               phy-mode = "sgmii";
-               reg = <4>;
-       };
-};
-
-&eth0 {
-       status = "okay";
-
-       mtd-mac-address = <&eeprom 0x0>;
-       phy-handle = <&phy4>;
+       model = "Ubiquiti UniFi-AC-LITE/LR";
 };
diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi
new file mode 100644 (file)
index 0000000..6fe4345
--- /dev/null
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9563_ubnt_unifiac.dtsi"
+
+&mdio0 {
+       status = "okay";
+
+       phy-mask = <4>;
+       phy4: ethernet-phy@4 {
+               phy-mode = "sgmii";
+               reg = <4>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+
+       mtd-mac-address = <&eeprom 0x0>;
+       phy-handle = <&phy4>;
+};
diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-mesh.dts b/target/linux/ath79/dts/qca9563_ubnt_unifiac-mesh.dts
new file mode 100644 (file)
index 0000000..6eed56b
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "qca9563_ubnt_unifiac-lite.dtsi"
+
+/ {
+       compatible = "ubnt,unifiac-mesh", "qca,qca9563";
+       model = "Ubiquiti UniFi-AC-MESH";
+};
index 31905820a09e81cecdbb7a3154a59c0c3436398c..540277d41b88850ca91fdbefcc74e1433fb0dcc6 100644 (file)
@@ -96,6 +96,13 @@ define Device/ubnt_unifiac-lite
 endef
 TARGET_DEVICES += ubnt_unifiac-lite
 
+define Device/ubnt_unifiac-mesh
+  $(Device/ubnt_unifiac)
+  DEVICE_TITLE := Ubiquiti UniFi AC-Mesh
+  SUPPORTED_DEVICES += ubnt-unifiac-mesh
+endef
+TARGET_DEVICES += ubnt_unifiac-mesh
+
 define Device/ubnt_unifiac-pro
   $(Device/ubnt_unifiac)
   DEVICE_TITLE := Ubiquiti UniFi AC-Pro