ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt2880_airlink101_ar725w.dts
index 9673b21ba905910d525ee197cfd138e550e2f448..f41a9b8561edfc2411982443f3345b3bab1f2d91 100644 (file)
                                reg = <0x40000 0x10000>;
                                label = "factory";
                                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 {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "ar725w:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
                };
 
                wpsred {
-                       label = "ar725w:red:wps";
+                       label = "red:wps";
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
                wpsblue {
-                       label = "ar725w:blue:wps";
+                       label = "blue:wps";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &state_default {
        gpio {
                groups = "i2c", "spi", "uartlite";
 
 &ethernet {
        status = "okay";
-       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>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };