ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt3883_trendnet_tew-691gr.dts
index 855d908c8cec94b7e6f5f1e85c85572efa1e5e72..112e5a6fbc8742f74b6f6d81e602d8c9e9a14d6a 100644 (file)
                        };
 
                        factory: partition@40000 {
-                               reg = <0x00040000 0x00010000>;
+                               compatible = "nvmem-cells";
                                label = "factory";
+                               reg = <0x00040000 0x00010000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x200>;
+                               };
+
+                               macaddr_factory_4: macaddr@4 {
+                                       reg = <0x4 0x6>;
+                               };
                        };
 
                        partition@50000 {
@@ -77,7 +88,7 @@
                compatible = "gpio-leds";
 
                led_wps: wps {
-                       label = "tew-691gr:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 
        port@0 {
                phy-handle = <&phy0>;
 
 &wmac {
        status = "okay";
-       ralink,mtd-eeprom = <&factory 0x0>;
        ralink,5ghz = <0>;
-       mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <1>;
+       nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
+       nvmem-cell-names = "eeprom", "mac-address";
+       mac-address-increment = <1>;
 };