bmips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / bmips / dts / bcm6358-huawei-hg556a-b.dts
index 716c6227f8a0680be9812e8f3695ac789436739d..554ef1993e7b4586eca83a2548f0dacaa337b81b 100644 (file)
@@ -1,19 +1,18 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+#include <dt-bindings/leds/common.h>
+
 #include "bcm6358.dtsi"
 
 / {
-       compatible = "huawei,hg556a-b", "brcm,bcm6358";
        model = "Huawei EchoLife HG556a (version B)";
+       compatible = "huawei,hg556a-b", "brcm,bcm6358";
 
        aliases {
                led-boot = &led_power_red;
                led-failsafe = &led_power_red;
                led-running = &led_power_red;
                led-upgrade = &led_power_red;
-
-               led-dsl = &led_dsl_red;
-               led-usb = &led_hspa_red;
        };
 
        keys {
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                };
 
-               led_hspa_red: led@1 {
+               led@1 {
                        label = "red:hspa";
                        gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
                };
 
-               led_dsl_red: led@2 {
+               led@2 {
                        label = "red:dsl";
                        gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
                };
 
                led_power_red: led@3 {
-                       label = "red:power";
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
 
                compatible = "gpio-leds";
 
                wlan {
-                       label = "red:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_RED>;
                        gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "phy0tpt";
                };
 &ethernet1 {
        status = "okay";
 
-       nvmem-cells = <&macaddr_cfe_6a0>;
+       nvmem-cells = <&macaddr_cfe_6a0 0>;
        nvmem-cell-names = "mac-address";
 
        phy-mode = "mii";
 
                qca,no-eeprom;
 
-               nvmem-cells = <&macaddr_cfe_6a0>;
+               nvmem-cells = <&macaddr_cfe_6a0 1>;
                nvmem-cell-names = "mac-address";
-               mac-address-increment = <1>;
 
                #gpio-cells = <2>;
                gpio-controller;
                #address-cells = <1>;
                #size-cells = <1>;
 
-               cfe: partition@0 {
+               partition@0 {
                        label = "cfe";
                        reg = <0x000000 0x020000>;
                        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@20000 {
                        label = "cal_data";
                        reg = <0xee0000 0x100000>;
                        read-only;
+
+                       nvmem-layout {
+                               compatible = "fixed-layout";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               cal_data_1e000: cal@1e000 {
+                                       reg = <0x1e000 0xeb8>;
+                               };
+                       };
                };
 
                partition@fe0000 {
 &usbh {
        status = "okay";
 };
-
-&cal_data {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       cal_data_1e000: cal@1e000 {
-               reg = <0x1e000 0xeb8>;
-       };
-};
-
-&cfe {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_cfe_6a0: macaddr@6a0 {
-               reg = <0x6a0 0x6>;
-       };
-};