ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_xiaomi_mi-router-4c.dts
index 4389a9daf4c9b08f352afd7c665ffaf10578ef4a..a406c8f124e02c21e49fa0a88ba023d704c974a4 100644 (file)
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include <dt-bindings/leds/common.h>
+
 #include "mt7628an_xiaomi_mi-router-4.dtsi"
 
 / {
@@ -7,8 +9,36 @@
        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 {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+               };
+
+               led_power_yellow: power_yellow {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_YELLOW>;
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+               };
+
+               wan {
+                       function = LED_FUNCTION_WAN;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
+
+       };
+
 };
 
 &flash0 {
@@ -38,7 +68,8 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {