ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt3052_unbranded_xdx-rn502j.dts
index 88cec02756ea1069753e67c37c2d11fea71e7d11..dc07c597c3fbcdfff2608a25628f5167c55729be 100644 (file)
@@ -2,10 +2,11 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        compatible = "unbranded,xdx-rn502j", "ralink,rt3052-soc";
-       model = "XDX RN502J";
+       model = "Unbranded XDX-RN502J";
 
        aliases {
                led-boot = &led_power;
                                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";
 
                wifi {
-                       label = "xdxrn502j:green:wifi";
+                       label = "green:wifi";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "xdxrn502j:green:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio0 9 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 {