bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6328-comtrend-ar-5387un.dts
index a0d1c117f74755b373dd351b81d0b6b4ea14e671..402e54e5df7392c61f772aae2b756fe24240421d 100644 (file)
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+#include <dt-bindings/leds/common.h>
+
 #include "bcm6328.dtsi"
 
 / {
@@ -31,9 +33,8 @@
                pci-bus = <1>;
                pci-dev = <0>;
 
-               nvmem-cells = <&macaddr_cfe_6a0>;
+               nvmem-cells = <&macaddr_cfe_6a0 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
 
                brcm,sprom = "brcm/bcm43225-sprom.bin";
                brcm,sprom-fixups = <2 0x05bb>,
@@ -70,7 +71,7 @@
 &ethernet {
        status = "okay";
 
-       nvmem-cells = <&macaddr_cfe_6a0>;
+       nvmem-cells = <&macaddr_cfe_6a0 0>;
        nvmem-cell-names = "mac-address";
 };
 
                        #address-cells = <1>;
                        #size-cells = <1>;
 
-                       cfe: partition@0 {
+                       partition@0 {
                                reg = <0x000000 0x010000>;
                                label = "cfe";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_cfe_6a0: macaddr@6a0 {
+                                               compatible = "mac-base";
+                                               reg = <0x6a0 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        partition@10000 {
 
        led_power_red: led@4 {
                reg = <4>;
-               label = "red:power";
+               function = LED_FUNCTION_POWER;
+               color = <LED_COLOR_ID_RED>;
                panic-indicator;
        };
 
 
        led_power_green: led@8 {
                reg = <8>;
-               label = "green:power";
+               function = LED_FUNCTION_POWER;
+               color = <LED_COLOR_ID_GREEN>;
        };
 
        led@11 {
 &usbh {
        status = "okay";
 };
-
-&cfe {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_cfe_6a0: macaddr@6a0 {
-               reg = <0x6a0 0x6>;
-       };
-};