ramips: fix LED labels for Asus RT-AC65P
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 17 Aug 2020 12:57:52 +0000 (14:57 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 17 Aug 2020 13:00:43 +0000 (15:00 +0200)
The leds block was copied over from the RT-AC85P DTS to the common
DTSI while keeping the device-specific model name in the label.

This moves the LEDs back to the DTS files and adjusts the names to
properly resemble the model name of the devices used at, just like
it is handled on most other devices.

Fixes: 7c5f712e4fec ("ramips: add support for Asus RT-AC65P")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/dts/mt7621_asus_rt-ac65p.dts
target/linux/ramips/dts/mt7621_asus_rt-ac85p.dts
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration

index 07a714a840ca8dd27424cceef54d0d08c627398b..eaa82012c2f12824f0d3c2efe2e2d531e77a2758 100644 (file)
@@ -6,4 +6,32 @@
 / {
        compatible = "asus,rt-ac65p", "mediatek,mt7621-soc";
        model = "ASUS RT-AC65P";
+
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power: power {
+                       label = "rt-ac65p:blue:power";
+                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan5g {
+                       label = "rt-ac65p:blue:wlan5g";
+                       gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy1radio";
+               };
+
+               wlan2g {
+                       label = "rt-ac65p:blue:wlan2g";
+                       gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0radio";
+               };
+       };
 };
index add33bf2d12e12cb1b40aa8827d840be73f2ca81..28928b1d4c93545bdec2eb86459e303fe349c6e7 100644 (file)
@@ -6,4 +6,32 @@
 / {
        compatible = "asus,rt-ac85p", "mediatek,mt7621-soc";
        model = "ASUS RT-AC85P";
+
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power: power {
+                       label = "rt-ac85p:blue:power";
+                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan5g {
+                       label = "rt-ac85p:blue:wlan5g";
+                       gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy1radio";
+               };
+
+               wlan2g {
+                       label = "rt-ac85p:blue:wlan2g";
+                       gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0radio";
+               };
+       };
 };
index 0921a477e926a015cfb00974cf0c2f19a1861bdf..f31e74b0516001daeea0f69e5ea1ce39d6b3be91 100644 (file)
@@ -6,13 +6,6 @@
 #include <dt-bindings/input/input.h>
 
 / {
-       aliases {
-               led-boot = &led_power;
-               led-failsafe = &led_power;
-               led-running = &led_power;
-               led-upgrade = &led_power;
-       };
-
        keys {
                compatible = "gpio-keys";
 
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
-
-       leds {
-               compatible = "gpio-leds";
-
-               led_power: power {
-                       label = "rt-ac85p:blue:power";
-                       gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
-               };
-               wlan2g {
-                       label = "rt-ac85p:blue:wlan2g";
-                       gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy0radio";
-               };
-
-               wlan5g {
-                       label = "rt-ac85p:blue:wlan5g";
-                       gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
-                       linux,default-trigger = "phy1radio";
-               };
-       };
 };
 
 &i2c {
index f9cf3eae0a034f9160960f51b56e19aa3fb806bf..4b298654b668ab67146c8302f17df6877727b6af 100644 (file)
@@ -5,6 +5,9 @@ board=$(board_name)
 boardonly="${board##*,}"
 
 case "$board" in
+asus,rt-ac65p)
+       migrate_leds "^rt-ac85p:=rt-ac65p:"
+       ;;
 mikrotik,routerboard-750gr3)
        migrate_leds "^rb750gr3:=$boardonly:"
        ;;