ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / rt3052_fon_fonera-20n.dts
index 37ae9438f71cd06d3af710df46b7dfcb62f9ed65..b9fb232aa121f55c19503572cff5d70324b981f6 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
@@ -16,7 +14,7 @@
                led-upgrade = &led_power;
        };
 
-       cfi@1f000000 {
+       flash@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
                bank-width = <2>;
                compatible = "gpio-leds";
 
                wifi {
-                       label = "fonera-20n:orange:wifi";
+                       label = "orange:wifi";
                        gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "fonera-20n:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "fonera-20n:orange:usb";
+                       label = "orange:usb";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&otg_port1>;
                        linux,default-trigger = "usbport";
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 };
 
 &wmac {
-       ralink,mtd-eeprom = <&factory 0>;
+       ralink,mtd-eeprom = <&factory 0x0>;
 };
 
 &otg {
        status = "okay";
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};