ath79: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_etactica_eg200.dts
index 5b9dbede970ba01513caa7305b341d85852e7086..402fca80a1eacb63db0a3681953641393930891e 100644 (file)
@@ -1,11 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "ar9331.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "ar9331.dtsi"
-
 / {
        model = "eTactica EG200";
        compatible = "etactica,eg200", "qca,ar9331";
@@ -14,7 +13,6 @@
                led-boot = &led_etactica;
                led-failsafe = &led_etactica;
                led-upgrade = &led_etactica;
-               serial0 = &uart;
        };
 
        keys {
                pinctrl-0 = <&switch_led_disable_pins>;
 
                modbus {
-                       label = "eg200:red:modbus";
+                       label = "red:modbus";
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
                };
 
                led_etactica: etactica {
-                       label = "eg200:red:etactica";
+                       label = "red:etactica";
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                eth0 {
-                       label = "eg200:red:eth0";
+                       label = "red:eth0";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "eg200:red:wlan";
+                       label = "red:wlan";
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
        };
 };
 
-&uart {
-       status = "okay";
-};
-
-&gpio {
-       status = "okay";
-};
-
 &usb {
        dr_mode = "host";
        status = "okay";
@@ -73,7 +63,8 @@
 
 &eth0 {
        status = "okay";
-       mtd-mac-address = <&art 0x0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        gmac-config {
                device = <&gmac>;
@@ -88,7 +79,6 @@
 };
 
 &spi {
-       num-chipselects = <1>;
        status = "okay";
 
        flash@0 {
 &wmac {
        status = "okay";
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&art 0x1002>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
 };