ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt2880_buffalo_wli-tx4-ag300n.dts
index fd082baf8cbeab8ea32444ae1ec75643ea49e6db..37288e5fc4014e9de9e6dd954d6e977d2ac695d6 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt2880.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                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";
 
                diag {
-                       label = "wli-tx4-ag300n:red:diag";
+                       label = "red:diag";
                        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "wli-tx4-ag300n:blue:power";
+                       label = "blue:power";
                        gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                };
 
                security {
-                       label = "wli-tx4-ag300n:blue:security";
+                       label = "blue:security";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
-&gpio0 {
-       status = "okay";
-};
-
 &ethernet {
        status = "okay";
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
 
        port@0 {
                mediatek,fixed-link = <100 1 1 1>;
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };