ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9331_tplink_tl-mr3040-v2.dts
index 5e1dac40b5386038a8c1015682015860fc5a0249..df39577110e52f2eb28a686859bb3ff29cca582f 100644 (file)
@@ -1,10 +1,10 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "ar9331.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
-
-#include "ar9331.dtsi"
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "TP-Link TL-MR3040 V2";
        aliases {
                led-boot = &led_lan;
                led-failsafe = &led_lan;
+               label-mac-device = &eth0;
        };
 
        leds {
                compatible = "gpio-leds";
 
+               pinctrl-names = "default";
+               pinctrl-0 = <&switch_led_disable_pins>;
+
                wlan {
-                       label = "tp-link:green:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
-                       default-state = "off";
                        linux,default-trigger = "phy0tpt";
                };
 
                led_lan: lan {
-                       label = "tp-link:green:lan";
+                       function = LED_FUNCTION_LAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
-                       default-state = "off";
                };
 
                led3g {
-                       label = "tp-link:green:3g";
+                       label = "green:3g";
                        gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
-                       default-state = "off";
                        trigger-sources = <&hub_port>;
                        linux,default-trigger = "usbport";
                };
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <20>;
+               compatible = "gpio-keys";
 
                reset {
                        label = "reset";
@@ -73,7 +75,7 @@
                regulator-name = "usb_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
-               gpio = <&gpio 18 GPIO_ACTIVE_HIGH>;
+               gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
 };
        clock-frequency = <25000000>;
 };
 
-&uart {
-       status = "okay";
-};
-
-&gpio {
-       status = "okay";
-};
-
 &usb {
-       #address-cells = <1>;
-       #size-cells = <0>;
        dr_mode = "host";
        vbus-supply = <&reg_usb_vbus>;
        status = "okay";
-
-       hub_port: port@1 {
-               reg = <1>;
-               #trigger-source-cells = <0>;
-       };
 };
 
 &usb_phy {
 };
 
 &spi {
-       num-chipselects = <1>;
        status = "okay";
 
        flash@0 {
                compatible = "jedec,spi-nor";
-               spi-max-frequency = <104000000>;
+               spi-max-frequency = <50000000>;
                reg = <0>;
 
                partitions {
                        #address-cells = <1>;
                        #size-cells = <1>;
 
-                       uboot:  partition@0 {
+                       uboot: partition@0 {
                                label = "u-boot";
                                reg = <0x000000 0x020000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc00: macaddr@1fc00 {
+                                               reg = <0x1fc00 0x6>;
+                                       };
+                               };
                        };
 
                        partition@20000 {
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
        gmac-config {
                device = <&gmac>;
 
 
 &eth1 {
        status = "okay";
+
        compatible = "syscon", "simple-mfd";
 };
 
 &wmac {
        status = "okay";
+
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
 };