ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9331_8dev_carambola2.dts
index ffb9745e0311adf339ac4090d22ec3551e07eb98..f786f425f05abf1a7374bacb8df0743b40ded65d 100644 (file)
@@ -1,17 +1,15 @@
 // 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 = "8devices Carambola2";
        compatible = "8dev,carambola2", "qca,ar9331";
 
        aliases {
-               serial0 = &uart;
                label-mac-device = &wmac;
        };
 
                compatible = "gpio-leds";
 
                wlan {
-                       label = "carambola2:green:wlan";
+                       label = "green:wlan";
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                eth0 {
-                       label = "carambola2:orange:eth0";
+                       label = "orange:eth0";
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                };
 
                eth1 {
-                       label = "carambola2:orange:eth1";
+                       label = "orange:eth1";
                        gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
                };
        };
        clock-frequency = <40000000>;
 };
 
-&uart {
-       status = "okay";
-};
-
-&gpio {
-       status = "okay";
-};
-
 &usb {
        dr_mode = "host";
        status = "okay";
@@ -68,7 +58,6 @@
 };
 
 &spi {
-       num-chipselects = <0>;
        status = "okay";
 
        flash@0 {
                                label = "art";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_art_0: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_art_6: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
+                               };
                        };
                };
        };
 
 &eth0 {
        status = "okay";
-       mtd-mac-address = <&art 0x0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        gmac-config {
                device = <&gmac>;
 
 &eth1 {
        status = "okay";
-       mtd-mac-address = <&art 0x6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {