ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_prolink_pwh2004.dts
index ee4fdd60c49540986af6699d5b84ba844077fe55..736a56f2da0e7533cf8560b6abe2edac15f54042 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "prolink,pwh2004", "ralink,rt3052-soc";
                                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>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                compatible = "gpio-leds";
 
                wifi {
-                       label = "pwh2004:red:wifi";
+                       label = "red:wifi";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "pwh2004:green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };