ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar7241_tplink_tl-wr842n-v1.dts
index 15cb22b5184a7ae0183773a5ae14fb00eabe0593..02b96912ba9a9dcb64db6b235f8f35ae500be91f 100644 (file)
@@ -1,11 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
+
+#include "ar7241.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-#include "ar7241.dtsi"
-
 / {
        compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
        model = "TP-Link TL-WR842N/ND v1";
@@ -19,8 +18,7 @@
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <20>;
+               compatible = "gpio-keys";
 
                rfkill {
                        label = "rfkill";
                };
        };
 
-       gpio-leds {
+       leds {
                compatible = "gpio-leds";
 
                led_system: system {
-                       label = "tp-link:green:system";
+                       label = "green:system";
                        gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                };
 
                qss {
-                       label = "tp-link:green:qss";
+                       label = "green:qss";
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                };
 
                led3g {
-                       label = "tp-link:green:3g";
+                       label = "green:3g";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&hub_port>;
                        linux,default-trigger = "usbport";
@@ -62,7 +60,7 @@
                compatible = "gpio-leds";
 
                wlan {
-                       label = "tp-link:green:wlan";
+                       label = "green:wlan";
                        gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 };
 
 &usb {
-       #address-cells = <1>;
-       #size-cells = <0>;
        status = "okay";
-
-       hub_port: port@1 {
-               reg = <1>;
-               #trigger-source-cells = <0>;
-       };
 };
 
 &usb_phy {
@@ -96,7 +87,6 @@
 
 &spi {
        status = "okay";
-       num-cs = <1>;
 
        flash@0 {
                compatible = "jedec,spi-nor";
                                reg = <0x0 0x20000>;
                                label = "u-boot";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc00: macaddr@1fc00 {
+                                               reg = <0x1fc00 0x6>;
+                                       };
+                               };
                        };
 
                        partition@20000 {
                #gpio-cells = <2>;
                gpio-controller;
                qca,no-eeprom;
-               mtd-mac-address = <&uboot 0x1fc00>;
+               nvmem-cells = <&macaddr_uboot_1fc00>;
+               nvmem-cell-names = "mac-address";
        };
 };
 
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
-       status = "okay";
-
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
-};
-
-&gpio {
-       status = "okay";
-};
-
-&uart {
-       status = "okay";
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
 };