Skip to content

Commit 94e181a

Browse files
arinc9ffainelli
authored andcommitted
ARM: dts: BCM5301X: use color and function on ASUS RT-AC3100 and RT-AC88U
As the label property for LEDs is deprecated, use the color and function properties to describe the LEDs on the device tree file for ASUS RT-AC3100 and ASUS RT-AC88U. Reorder the LED and button nodes in alphabetical order. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Link: https://lore.kernel.org/r/20240414-for-soc-asus-rt-ac3100-improvements-v1-1-0e40caf1a70a@arinc9.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
1 parent d990221 commit 94e181a

1 file changed

Lines changed: 32 additions & 22 deletions

File tree

arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "bcm47094.dtsi"
77
#include "bcm5301x-nand-cs0-bch8.dtsi"
88

9+
#include <dt-bindings/leds/common.h>
10+
911
/ {
1012
chosen {
1113
bootargs = "earlycon";
@@ -25,49 +27,57 @@
2527
leds {
2628
compatible = "gpio-leds";
2729

30+
led-lan {
31+
color = <LED_COLOR_ID_WHITE>;
32+
function = LED_FUNCTION_LAN;
33+
gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
34+
};
35+
2836
led-power {
29-
label = "white:power";
37+
color = <LED_COLOR_ID_WHITE>;
38+
function = LED_FUNCTION_POWER;
3039
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
3140
linux,default-trigger = "default-on";
3241
};
3342

34-
led-wan-red {
35-
label = "red:wan";
36-
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
37-
};
38-
39-
led-lan {
40-
label = "white:lan";
41-
gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
42-
};
43-
4443
led-usb2 {
45-
label = "white:usb2";
44+
color = <LED_COLOR_ID_WHITE>;
45+
function = LED_FUNCTION_USB;
46+
function-enumerator = <1>;
4647
gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
4748
trigger-sources = <&ehci_port2>;
4849
linux,default-trigger = "usbport";
4950
};
5051

5152
led-usb3 {
52-
label = "white:usb3";
53+
color = <LED_COLOR_ID_WHITE>;
54+
function = LED_FUNCTION_USB;
55+
function-enumerator = <2>;
5356
gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
5457
trigger-sources = <&ehci_port1>, <&xhci_port1>;
5558
linux,default-trigger = "usbport";
5659
};
5760

61+
led-wan-red {
62+
color = <LED_COLOR_ID_RED>;
63+
function = LED_FUNCTION_WAN;
64+
gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
65+
};
66+
5867
led-wps {
59-
label = "white:wps";
68+
color = <LED_COLOR_ID_WHITE>;
69+
function = LED_FUNCTION_WPS;
6070
gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
6171
};
6272
};
6373

6474
gpio-keys {
6575
compatible = "gpio-keys";
6676

67-
button-wps {
68-
label = "WPS";
69-
linux,code = <KEY_WPS_BUTTON>;
70-
gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
77+
button-led {
78+
label = "Backlight";
79+
linux,code = <KEY_BRIGHTNESS_ZERO>;
80+
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
7181
};
7282

7383
button-reset {
@@ -82,10 +92,10 @@
8292
gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
8393
};
8494

85-
button-led {
86-
label = "Backlight";
87-
linux,code = <KEY_BRIGHTNESS_ZERO>;
88-
gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
95+
button-wps {
96+
label = "WPS";
97+
linux,code = <KEY_WPS_BUTTON>;
98+
gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
8999
};
90100
};
91101
};

0 commit comments

Comments
 (0)