ath79: improve support for D-Link DIR-8x9 A1 series
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c25-v1.dts
index 881e3a1822531cd78aa40e1fe003f987f158887a..4b371e0e8e8893a9f22964b7afc5203386b6d9c2 100644 (file)
@@ -1,17 +1,20 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "qca956x.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "qca956x.dtsi"
-
 / {
        compatible = "tplink,archer-c25-v1", "qca,qca9561";
        model = "TP-Link Archer C25 v1";
 
-       chosen {
-               bootargs = "console=ttyS0,115200n8";
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+               label-mac-device = &eth0;
        };
 
        led_spi {
        keys {
                compatible = "gpio-keys";
 
-               wifi_button {
+               wifi {
                        label = "WiFi button";
                        linux,code = <KEY_RFKILL>;
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
                };
 
-               reset_button {
+               reset {
                        label = "Reset button";
                        linux,code = <KEY_RESTART>;
                        gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                };
        };
 
-       aliases {
-               led-boot = &power;
-               led-failsafe = &power;
-               led-running = &power;
-               led-upgrade = &power;
-       };
-
        leds {
                compatible = "gpio-leds";
 
-               power: power {
-                       label = "tp-link:green:power";
+               led_power: power {
+                       label = "green:power";
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
                        default-state = "on";
                };
 
                wps {
-                       label = "tp-link:green:wps";
+                       label = "green:wps";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                };
 
                wlan2g {
-                       label = "tp-link:green:wlan2g";
+                       label = "green:wlan2g";
                        gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy1tpt";
                };
 
                wlan5g {
-                       label = "tp-link:green:wlan5g";
+                       label = "green:wlan5g";
                        gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                wan_green {
-                       label = "tp-link:green:wan";
+                       label = "green:wan";
                        gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
                };
 
                wan_amber {
-                       label = "tp-link:amber:wan";
+                       label = "amber:wan";
                        gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
                };
 
                lan1 {
-                       label = "tp-link:green:lan1";
+                       label = "green:lan1";
                        gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
                };
 
                lan2 {
-                       label = "tp-link:green:lan2";
+                       label = "green:lan2";
                        gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
                };
 
                lan3 {
-                       label = "tp-link:green:lan3";
+                       label = "green:lan3";
                        gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
                };
 
                lan4 {
-                       label = "tp-link:green:lan4";
+                       label = "green:lan4";
                        gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
                };
        };
 
 &spi {
        status = "okay";
-       num-cs = <1>;
 
        flash@0 {
                compatible = "jedec,spi-nor";
        };
 };
 
-&uart {
-       status = "okay";
-};
-
 &pcie {
        status = "okay";
 };
 
 &eth0 {
-       phy-mode = "mii";
+       status = "okay";
+
        phy-handle = <&swphy4>;
 
-       status = "okay";
-       mtd-mac-address = <&info 0x8>;
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
        status = "okay";
-       mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <1>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
 };
 
 &wmac {
        status = "okay";
+
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
 };