ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_mercury_mac1200r-v2.dts
index 82adae13dbdc78876b59aa2d447456815468281d..f79d2d2641daca0ab361aa228e2bfc1921370bd5 100644 (file)
@@ -1,5 +1,3 @@
-/dts-v1/;
-
 #include "mt7628an.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
                led-upgrade = &led_status;
        };
 
-       chosen {
-               bootargs = "console=ttyS0,57600";
-       };
-
        leds {
                compatible = "gpio-leds";
+
                led_status: status {
-                       label = "mac1200rv2:green:status";
-                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+                       label = "green:status";
+                       gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
                };
        };
 };
@@ -32,9 +27,9 @@
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
-               reg = <0 0>;
+               reg = <0>;
                spi-max-frequency = <10000000>;
 
                partitions {
 
 &ethernet {
        pinctrl-names = "default";
-       mtd-mac-address = <&factory 0xd>;
-       mediatek,portmap = "llllw";
+       nvmem-cells = <&macaddr_factory_d>;
+       nvmem-cell-names = "mac-address";
+};
+
+&esw {
+       mediatek,portmap = <0x2f>;
 };
 
 &wmac {
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_d: macaddr@d {
+               reg = <0xd 0x6>;
+       };
+};