ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_tenda_w306r-v2.dts
index 3602fa2648515f8def1cf2fe7f0084d02f57d3ef..8a60184959f21df5ba2fd414f47477c48bd4cc1f 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                led_sys: sys {
-                       label = "w306r-v20:green:sys";
+                       label = "green:sys";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wps {
-                       label = "w306r-v20:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
@@ -87,7 +85,8 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 &wmac {
        ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};