ramips: Move LED definition out of included dtsi into dts
authorJo Deisenhofer <jo.deisenhofer@gmail.com>
Fri, 2 Dec 2022 15:39:02 +0000 (16:39 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 14 Jan 2023 18:02:20 +0000 (19:02 +0100)
Prepare for a new target with different led definitions that wants to
include this dtsi. The resulting dtb are unchanged, verified with dtdiff

Signed-off-by: Jo Deisenhofer <jo.deisenhofer@gmail.com>
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts

index ff738a5261382d9c452731b91230ba87e02488e7..59d269bf03eeaed7a3297b5b59177afb93d654b2 100644 (file)
@@ -6,37 +6,10 @@
 #include <dt-bindings/input/input.h>
 
 / {
-       aliases {
-               led-boot = &led_power_yellow;
-               led-failsafe = &led_power_yellow;
-               led-running = &led_power_blue;
-               led-upgrade = &led_power_yellow;
-               label-mac-device = &ethernet;
-       };
-
        chosen {
                bootargs = "console=ttyS0,115200";
        };
 
-       leds {
-               compatible = "gpio-leds";
-
-               led_power_blue: power_blue {
-                       label = "blue:power";
-                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
-               };
-
-               led_power_yellow: power_yellow {
-                       label = "yellow:power";
-                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
-               };
-
-               wan {
-                       label = "blue:wan";
-                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
-               };
-       };
-
        keys {
                compatible = "gpio-keys";
 
index cdf259c51a610dd1eb8c391bb947d7c28f1e69fd..863191bc4b7cfc25ab918fc7c273d60f06e1ee8a 100644 (file)
@@ -5,6 +5,34 @@
 / {
        compatible = "xiaomi,mi-router-4a-100m-intl", "mediatek,mt7628an-soc";
        model = "Xiaomi Mi Router 4A (100M International Edition)";
+
+       aliases {
+               led-boot = &led_power_yellow;
+               led-failsafe = &led_power_yellow;
+               led-running = &led_power_blue;
+               led-upgrade = &led_power_yellow;
+               label-mac-device = &ethernet;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power_blue: power_blue {
+                       label = "blue:power";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_power_yellow: power_yellow {
+                       label = "yellow:power";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               };
+
+               wan {
+                       label = "blue:wan";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+       };
+
 };
 
 &partitions {
index 626b36366d833f089bfb67c8a764bc0cba9a0999..5ddc7af4621e93e6e0433ade9013c8334ca63613 100644 (file)
@@ -5,6 +5,34 @@
 / {
        compatible = "xiaomi,mi-router-4a-100m", "mediatek,mt7628an-soc";
        model = "Xiaomi Mi Router 4A (100M Edition)";
+
+       aliases {
+               led-boot = &led_power_yellow;
+               led-failsafe = &led_power_yellow;
+               led-running = &led_power_blue;
+               led-upgrade = &led_power_yellow;
+               label-mac-device = &ethernet;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power_blue: power_blue {
+                       label = "blue:power";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_power_yellow: power_yellow {
+                       label = "yellow:power";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               };
+
+               wan {
+                       label = "blue:wan";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+       };
+
 };
 
 &partitions {
index e3aae273a9ac6a217c8f820baac5e7cbd21bea80..e9bbf76e4baa28732c275f2d77ce67c004420b89 100644 (file)
@@ -7,8 +7,33 @@
        model = "Xiaomi Mi Router 4C";
 
        aliases {
+               led-boot = &led_power_yellow;
+               led-failsafe = &led_power_yellow;
+               led-running = &led_power_blue;
+               led-upgrade = &led_power_yellow;
                label-mac-device = &ethernet;
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power_blue: power_blue {
+                       label = "blue:power";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_power_yellow: power_yellow {
+                       label = "yellow:power";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               };
+
+               wan {
+                       label = "blue:wan";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+
+       };
+
 };
 
 &flash0 {