ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt2880_buffalo_wzr-agl300nh.dts
index 13f933b6394a918e69767e6807f76de41d4c21d2..4665878d4b24bbdf407af1f0aaa421618098de16 100644 (file)
                        };
 
                        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 {
                compatible = "gpio-leds";
 
                led_router: router {
-                       label = "wzr-agl300nh:green:router";
+                       label = "green:router";
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
                diag {
-                       label = "wzr-agl300nh:red:diag";
+                       label = "red:diag";
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                };
 
                security_g {
-                       label = "wzr-agl300nh:orange:security_g";
+                       label = "orange:security_g";
                        gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                };
 
                security_n {
-                       label = "wzr-agl300nh:orange:security_n";
+                       label = "orange:security_n";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &state_default {
        gpio {
                groups = "i2c", "uartlite", "mdio";
 
 &ethernet {
        status = "okay";
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 
        port@0 {
                mediatek,fixed-link = <1000 1 1 1>;
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };