ath79: ar: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
index 2bacd08245c17f2d82e376ed1b9a5bbe690e9101..a8608a77e1949ecc69e8f735cea2b08f14a545d1 100644 (file)
@@ -1,13 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include "ar9331.dtsi"
+
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "ar9331.dtsi"
-
 / {
        aliases {
-               serial0 = &uart;
                led-boot = &led_system;
                led-failsafe = &led_system;
                led-running = &led_system;
@@ -30,7 +29,7 @@
                compatible = "gpio-leds";
 
                led_system: system {
-                       label = "tl-wr703n:blue:system";
+                       label = "blue:system";
                        gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
                };
        };
@@ -47,8 +46,6 @@
 &spi {
        status = "okay";
 
-       num-cs = <1>;
-
        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                                reg = <0x0 0x20000>;
                                label = "u-boot";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc00: macaddr@1fc00 {
+                                               reg = <0x1fc00 0x6>;
+                                       };
+                               };
                        };
 
                        partition@20000 {
@@ -83,7 +90,8 @@
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
 
        gmac-config {
                device = <&gmac>;
        compatible = "syscon", "simple-mfd";
 };
 
-&gpio {
-       status = "okay";
-};
-
-&uart {
-       status = "okay";
-};
-
 &usb {
        dr_mode = "host";
        vbus-supply = <&reg_usb_vbus>;
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
 };