ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt3052_aximcom_mr-102n.dts
index b364c3a8650289c1e091b5a150086cc2b5314f19..9aac3f9d8e73e6444b7bd2d391636149c44af633 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 = "aximcom,mr-102n", "ralink,rt3052-soc";
@@ -16,7 +15,7 @@
                led-upgrade = &led_status;
        };
 
-       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_4: macaddr@4 {
+                                               reg = <0x4 0x6>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                compatible = "gpio-leds";
 
                usb {
-                       label = "mr-102n:green:usb";
+                       function = LED_FUNCTION_USB;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&otg_port1>;
                        linux,default-trigger = "usbport";
                };
 
                led_status: status {
-                       label = "mr-102n:amber:status";
+                       function = LED_FUNCTION_STATUS;
+                       color = <LED_COLOR_ID_AMBER>;
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "mr-102n:green:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &otg {