ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / rt3052_netgear_wnce2001.dts
index 3f0d93d8a4c7248d86649f50d6073f040d343810..c65fc100d8cd612594933e3450850c6d6c93c7bf 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                led_power_green: power-green {
-                       label = "wnce2001:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
                power-red {
-                       label = "wnce2001:red:power";
+                       label = "red:power";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wlan-green {
-                       label = "wnce2001:green:wlan";
+                       label = "green:wlan";
                        gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
                };
 
                wlan-red {
-                       label = "wnce2001:red:wlan";
+                       label = "red:wlan";
                        gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
                };
        };
@@ -77,7 +75,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
+               function = "gpio";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       ralink,mtd-eeprom = <&factory 0x0>;
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
 };