]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: new target mt7622-ubnt-unifi-6-lr-v1
authorHenrik Riomar <henrik.riomar@gmail.com>
Tue, 31 May 2022 17:18:06 +0000 (19:18 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 11 Jun 2022 18:50:26 +0000 (19:50 +0100)
Based on current mt7622-ubnt-unifi-6-lr, this is a preparation for
adding a v2 version of this target

* v1 - with led-bar
* v2 - two simple GPIO connected LEDs (in later commits)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added SUPPORTED_DEVICES for compatibility with existing setups]
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts
target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts [moved from target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts with 95% similarity]
target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dtsi [new file with mode: 0644]
target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi
target/linux/mediatek/image/mt7622.mk

index e573d30912f4660b951d26663d6bc8f3d75c2f4c..8a9d0a1887cdc7ba707018fce55f2be82e61d25a 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "mt7622-ubnt-unifi-6-lr.dtsi"
+#include "mt7622-ubnt-unifi-6-lr-v1.dtsi"
 
 / {
        model = "Ubiquiti UniFi 6 LR (U-Boot mod)";
similarity index 95%
rename from target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts
rename to target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dts
index 9b676b43c1bd17602db6a7b4475c8227afb33b3b..d0048d47158bc4311d380656a23c98e43c48fcb0 100644 (file)
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "mt7622-ubnt-unifi-6-lr.dtsi"
+#include "mt7622-ubnt-unifi-6-lr-v1.dtsi"
 
 / {
-       model = "Ubiquiti UniFi 6 LR";
+       model = "Ubiquiti UniFi 6 LR v1";
        compatible = "ubnt,unifi-6-lr", "mediatek,mt7622";
 };
 
diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dtsi b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-v1.dtsi
new file mode 100644 (file)
index 0000000..8f15d3f
--- /dev/null
@@ -0,0 +1,27 @@
+#include "mt7622-ubnt-unifi-6-lr.dtsi"
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       status = "okay";
+
+       led-controller@30 {
+               compatible = "ubnt,ledbar";
+               reg = <0x30>;
+
+               enable-gpio = <&pio 59 0>;
+
+               red {
+                       label = "red";
+               };
+
+               green {
+                       label = "green";
+               };
+
+               led_blue: blue {
+                       label = "blue";
+               };
+       };
+};
+
index ae587a11a0a7f03a365f3ae1a624e02416fd3b48..0827f18e4800bf82c1d1c688077c8aa5be6a2e86 100644 (file)
        /* MT7915 Bluetooth */
 };
 
-&i2c0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c0_pins>;
-       status = "okay";
-
-       led-controller@30 {
-               compatible = "ubnt,ledbar";
-               reg = <0x30>;
-
-               enable-gpio = <&pio 59 0>;
-
-               red {
-                       label = "red";
-               };
-
-               green {
-                       label = "green";
-               };
-
-               led_blue: blue {
-                       label = "blue";
-               };
-       };
-};
-
 &watchdog {
        pinctrl-names = "default";
        pinctrl-0 = <&watchdog_pins>;
index aba8bdfe0ba622e80a7bb8ff4cd3570a0a517246..d6308f2ef63f0f533e2adc66adf93bcec7e772f2 100644 (file)
@@ -242,15 +242,17 @@ define Device/totolink_a8000ru
 endef
 TARGET_DEVICES += totolink_a8000ru
 
-define Device/ubnt_unifi-6-lr
+define Device/ubnt_unifi-6-lr-v1
   DEVICE_VENDOR := Ubiquiti
   DEVICE_MODEL := UniFi 6 LR
+  DEVICE_VARIANT := v1
   DEVICE_DTS_CONFIG := config@1
-  DEVICE_DTS := mt7622-ubnt-unifi-6-lr
+  DEVICE_DTS := mt7622-ubnt-unifi-6-lr-v1
   DEVICE_DTS_DIR := ../dts
   DEVICE_PACKAGES := kmod-mt7915e kmod-leds-ubnt-ledbar
+  SUPPORTED_DEVICES += ubnt,unifi-6-lr
 endef
-TARGET_DEVICES += ubnt_unifi-6-lr
+TARGET_DEVICES += ubnt_unifi-6-lr-v1
 
 define Device/ubnt_unifi-6-lr-ubootmod
   DEVICE_VENDOR := Ubiquiti