ath79: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wa801nd.dtsi
index efe892e2880c16577f574d345a0d464dccae4781..7bad615a6c4ac756d9a8c1dac83c9d73d02e1721 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        aliases {
                compatible = "gpio-leds";
 
                lan {
-                       label = "tp-link:green:lan";
+                       function = LED_FUNCTION_LAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
 
                security_red {
-                       label = "tp-link:red:security";
+                       label = "red:security";
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                };
 
                wlan {
-                       label = "tp-link:green:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_GREEN>;
                        gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                led_system: system {
-                       label = "tp-link:green:system";
+                       label = "green:system";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
 
                security_green {
-                       label = "tp-link:green:security";
+                       label = "green:security";
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
        };
        };
 };
 
-&uart {
-       status = "okay";
-};
-
 &spi {
        status = "okay";
 
-       num-cs = <1>;
-
        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <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 {
 
        phy-handle = <&swphy4>;
 
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
 };