ramips: use fixed layout cell "mac-base" for Netgear R6220
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_r6220.dts
index 281c0d53319fe1acee0e6fa2295695fad9255dbb..146b7ee752ac9dd763f55a5f67ba512412ee8651 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,r6220", "mediatek,mt7621-soc";
        model = "Netgear R6220";
 
-       keys {
-               compatible = "gpio-keys";
-
-               wps {
-                       label = "wps";
-                       gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
-                       linux,code = <KEY_WPS_BUTTON>;
-               };
-
-               wifi {
-                       label = "wifi";
-                       gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
-                       linux,code = <KEY_RFKILL>;
-               };
-
-               reset {
-                       label = "reset";
-                       gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
-                       linux,code = <KEY_RESTART>;
-               };
+       aliases {
+               label-mac-device = &gmac0;
        };
 };
 
-&leds {
-       wps {
-               gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
-               label = "r6220:green:wps";
-       };
-};
-
-&led_power {
-       label = "r6220:green:power";
-};
-
-&led_usb {
-       label = "r6220:green:usb";
-};
-
-&led_internet {
-       label = "r6220:green:wan";
-};
-
-&led_wifi {
-       label = "r6220:green:wifi";
-};
-
 &nand {
        status = "okay";
 
                };
 
                factory: partition@2e00000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0x2e00000 0x100000>;
                        read-only;
+
+                       nvmem-layout {
+                               compatible = "fixed-layout";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_factory_4: macaddr@4 {
+                                       compatible = "mac-base";
+                                       reg = <0x4 0x6>;
+                                       #nvmem-cell-cells = <1>;
+                               };
+                       };
                };
 
                partition@4200000 {
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_4 0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       nvmem-cells = <&macaddr_factory_4 1>;
+       nvmem-cell-names = "mac-address";
+};