ramips: fix dts error in LED color/function conversion
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_zyxel_keenetic.dts
index e6b6de9e5adcbad84df605456ddc8b5c04f83553..a1ac3239b135a2778de6bf2fa9dbdbb2f2cb6989 100644 (file)
@@ -1,9 +1,8 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "zyxel,keenetic", "ralink,rt3052-soc";
@@ -16,7 +15,7 @@
                led-upgrade = &led_power;
        };
 
-       cfi@1f000000 {
+       flash@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
                bank-width = <2>;
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_factory_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       macaddr_factory_28: macaddr@28 {
+                                               reg = <0x28 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "kn:green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "kn:green:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&otg_port1>;
                        linux,default-trigger = "usbport";
                };
 
                wps {
-                       label = "kn:green:wps";
+                       function = LED_FUNCTION_WPS;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &otg {