ramips: use NVMEM cells with mt76 EEPROM for Netgear R6220 & WNDR3700 v5
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_edimax_3g-6200nl.dts
index 7742561e508f54f4052578d419e205e3ebae3133..3767afb4527c9b961329095dc368320da854d97a 100644 (file)
@@ -1,9 +1,8 @@
-/dts-v1/;
-
 #include "rt3050.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
        compatible = "edimax,3g-6200nl", "ralink,rt3050-soc";
@@ -16,7 +15,7 @@
                led-upgrade = &led_internet;
        };
 
-       cfi@1f000000 {
+       flash@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
                bank-width = <2>;
@@ -52,7 +51,9 @@
                        };
 
                        partition@50000 {
-                               compatible = "edimax,uimage";
+                               compatible = "openwrt,uimage", "denx,uimage";
+                               openwrt,offset = <FW_EDIMAX_OFFSET>;
+                               openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
                                label = "firmware";
                                reg = <0x50000 0x390000>;
                        };
                compatible = "gpio-leds";
 
                led_internet: internet {
-                       label = "3g-6200nl:green:internet";
+                       label = "green:internet";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "3g-6200nl:green:wlan";
+                       label = "green:wlan";
                        gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
        };
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
-                       ralink,function = "gpio";
-               };
+&state_default {
+       gpio {
+               groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+               function = "gpio";
        };
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4>;
+       nvmem-cells = <&macaddr_factory_4>;
+       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_4: macaddr@4 {
+               reg = <0x4 0x6>;
+       };
+};