ath79: improve support for D-Link DIR-8x9 A1 series
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_8dev_carambola2.dts
index 8af378ef9296bd72e0310ca6f9d21a127808ba13..d99e0a422a70471b6d360fd35e2b3c44e331d86b 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";
 };
 
 &spi {
-       num-chipselects = <0>;
        status = "okay";
 
        flash@0 {
                compatible = "jedec,spi-nor";
-               spi-max-frequency = <104000000>;
+               spi-max-frequency = <50000000>;
                reg = <0>;
 
                partitions {
@@ -81,7 +70,7 @@
                        #address-cells = <1>;
                        #size-cells = <1>;
 
-                       uboot:  partition@0 {
+                       uboot: partition@0 {
                                label = "u-boot";
                                reg = <0x000000 0x040000>;
                                read-only;
 
 &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 {
        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>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
 };