ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_librerouter_librerouter-v1.dts
index 3b7e3aceda659d273afe04e84849bab47c8478de..6cd8ba4578beeacd9f831cd9ca53df814b316912 100644 (file)
@@ -1,49 +1,43 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "qca955x.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "qca9557.dtsi"
-
 / {
        compatible = "librerouter,librerouter-v1", "qca,qca9558";
        model = "LibreRouter v1";
 
-       chosen {
-               bootargs = "console=ttyS0,115200n8";
-       };
-
        aliases {
-               led-boot = &system;
-               led-failsafe = &system;
-               led-running = &system;
-               led-upgrade = &system;
+               led-boot = &led_system;
+               led-failsafe = &led_system;
+               led-running = &led_system;
+               led-upgrade = &led_system;
        };
 
        leds {
                compatible = "gpio-leds";
 
-               system: system {
-                       label = "librerouter-v1:green:system";
+               led_system: system {
+                       label = "green:system";
                        gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
 
                wifi_green {
-                       label = "librerouter-v1:green:wlan2g";
+                       label = "green:wlan2g";
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                status_blue {
-                       label = "librerouter-v1:blue:status";
+                       label = "blue:status";
                        gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
                };
-
        };
 
-       button {
+       keys {
                compatible = "gpio-keys";
 
                reset {
@@ -52,7 +46,6 @@
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
                        debounce-interval = <60>;
                };
-
        };
 
        watchdog {
@@ -62,7 +55,6 @@
                hw_margin_ms = <1000>;
                always-running;
        };
-
 };
 
 &pcie0 {
        };
 };
 
-&uart {
-       status = "okay";
-};
-
-&gpio {
-       status = "okay";
-};
-
 &usb_phy0 {
        status = "okay";
 };
 
 &spi {
        status = "okay";
-       num-cs = <1>;
 
        flash@0 {
                compatible = "jedec,spi-nor";
        status = "okay";
 
        pll-data = <0xa6000000 0x00000101 0x00001616>;
-       mtd-mac-address = <&art 0x0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
 
        phy-handle = <&phy0>;
-
 };
 
 &eth1 {
        status = "okay";
 
-       phy-mode = "sgmii";
        pll-data = <0x03000101 0x00000101 0x00001616>;
-       mtd-mac-address = <&art 0x6>;
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&art 0xc>;
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&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>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
 };