ramips: use NVMEM cells with mt76 EEPROM for Netgear R6220 & WNDR3700 v5
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_netgear_wndr3700-v5.dts
index 5cf09ac7c49e34c96180c2e6efa1cb5c6fabb78e..8252d2b9ff7d8d81aa41c42a8d789cd272235808 100644 (file)
@@ -1,58 +1,16 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
+// SPDX-License-Identifier: GPL-2.0-only
 
-#include "mt7621_netgear_sercomm.dtsi"
+#include "mt7621_netgear_sercomm_ayx.dtsi"
 
 / {
        compatible = "netgear,wndr3700-v5", "mediatek,mt7621-soc";
        model = "Netgear WNDR3700 v5";
 
-       keys {
-               compatible = "gpio-keys";
-
-               wps {
-                       label = "wps";
-                       gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_WPS_BUTTON>;
-               };
-
-               wifi {
-                       label = "wifi";
-                       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_RFKILL>;
-               };
-
-               reset {
-                       label = "reset";
-                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_RESTART>;
-               };
+       aliases {
+               label-mac-device = &gmac0;
        };
 };
 
-&leds {
-       wps {
-               gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
-               label = "wndr3700-v5:green:wps";
-       };
-};
-
-&led_power {
-       label = "wndr3700-v5:green:power";
-};
-
-&led_usb {
-       label = "wndr3700-v5:green:usb";
-};
-
-&led_internet {
-       label = "wndr3700-v5:green:wan";
-};
-
-&led_wifi {
-       label = "wndr3700-v5:green:wifi";
-};
-
 &spi0 {
        status = "okay";
 
                                label = "factory";
                                reg = <0xf30000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
+                                               reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       eeprom1: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_4 0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       nvmem-cells = <&macaddr_factory_4 1>;
+       nvmem-cell-names = "mac-address";
+};