ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_planex_mzk-dp150n.dts
index 510755e155bcea642c55814e1734e33e525b64af..db349de5e10423b1c429bdcbcc884b36c747bc42 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt5350.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -20,7 +18,7 @@
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "mzk-dp150n:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
-&gpio1 {
-       status = "okay";
-};
-
 &spi0 {
        status = "okay";
 
                                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 {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
        ralink,led-polarity = <1>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };