ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_arcwireless_freestation5.dts
index 8ac118c83fb04e40fd7d013601cdb641dafac18c..ecce4335ff0f84cfa3ca14f1482a4e84c3932f72 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #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 {
                 * not present in the Freestation5 device.
                 */
                wifi {
-                       label = "freestation5:unknown:wifi";
+                       label = "unknown:wifi";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
 
                powerg {
-                       label = "freestation5:unknown:powerg";
+                       label = "unknown:powerg";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "freestation5:unknown:usb";
+                       label = "unknown:usb";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &otg {