ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt3352_zyxel_nbg-419n-v2.dts
index 95044fca9fe67734efd21aad24b25c2f51172827..8b7c47e88b57cea233203c8518961fd7b17cd74c 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "rt3352.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "nbg-419n2:green:power";
+                       label = "green:power";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wps {
-                       label = "nbg-419n2:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
                usb {
-                       label = "nbg-419n2:green:usb";
+                       label = "green:usb";
                        gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&ohci_port1>, <&ehci_port1>;
                        linux,default-trigger = "usbport";
@@ -64,7 +62,7 @@
 
        flash@0 {
                compatible = "jedec,spi-nor";
-               reg = <0 0>;
+               reg = <0>;
                spi-max-frequency = <10000000>;
 
                partitions {
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x28>;
+       nvmem-cells = <&macaddr_factory_28>;
+       nvmem-cell-names = "mac-address";
 };
 
 &esw {
 &ohci {
        status = "okay";
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_28: macaddr@28 {
+               reg = <0x28 0x6>;
+       };
+};