ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt5350_dlink_dir-610-a1.dts
index d7dffd6c0cece9294e8d0f85a661e3ff1d6afb98..780e92439b12a90bd8f2e2c93d0c9209c8a05ae5 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt5350.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                led_status: status {
-                       label = "dir-610-a1:green:status";
+                       label = "green:status";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wps {
-                       label = "dir-610-a1:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
@@ -51,7 +49,7 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                        };
 
                        devdata: partition@30000 {
+                               compatible = "nvmem-cells";
                                label = "devdata";
                                reg = <0x30000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_devdata_4000: eeprom@4000 {
+                                       reg = <0x4000 0x200>;
+                               };
+
+                               macaddr_devdata_4004: macaddr@4004 {
+                                       reg = <0x4004 0x6>;
+                               };
                        };
 
                        factory: partition@40000 {
 };
 
 &ethernet {
-       mtd-mac-address = <&devdata 0x4004>;
+       nvmem-cells = <&macaddr_devdata_4004>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 &wmac {
        status = "okay";
        ralink,led-polarity = <1>;
-       ralink,mtd-eeprom = <&devdata 0x4000>;
+       nvmem-cells = <&eeprom_devdata_4000>;
+       nvmem-cell-names = "eeprom";
 };