2da45ff9da63fcf47f70d9353918a6629959c789
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-5.10 / 035-v5.18-0003-ARM-dts-NSP-MX6X-correct-LED-function-types.patch
1 From 482c85c7fc95c572d368b2214b9e9d2c4a2e5789 Mon Sep 17 00:00:00 2001
2 From: Matthew Hagan <mnhagan88@gmail.com>
3 Date: Wed, 23 Feb 2022 23:50:40 +0000
4 Subject: [PATCH] ARM: dts: NSP: MX6X: correct LED function types
5
6 Currently, the amber LED will remain always on. This is due to a
7 misinterpretation of the LED sub-node properties, where-by "default-state"
8 was used to indicate the initial state when powering on the device. When in
9 use, however, this resulted in the amber LED always being on. Instead change
10 this to only indicate a fault state.
11
12 Assign LED_FUNCTION_POWER to the green PWM LED.
13
14 These changes bring the MX64/65 in line with the MR32's devicetree.
15
16 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
17 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
18 ---
19 arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 3 +--
20 arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi | 3 +--
21 arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi | 2 +-
22 3 files changed, 3 insertions(+), 5 deletions(-)
23
24 --- a/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
25 +++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
26 @@ -57,10 +57,9 @@
27
28 led-4 {
29 /* amber:power */
30 - function = LED_FUNCTION_POWER;
31 + function = LED_FUNCTION_FAULT;
32 color = <LED_COLOR_ID_AMBER>;
33 gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
34 - default-state = "on";
35 };
36
37 led-5 {
38 --- a/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
39 +++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
40 @@ -106,10 +106,9 @@
41
42 led-a {
43 /* amber:power */
44 - function = LED_FUNCTION_POWER;
45 + function = LED_FUNCTION_FAULT;
46 color = <LED_COLOR_ID_AMBER>;
47 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
48 - default-state = "on";
49 };
50
51 led-b {
52 --- a/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
53 +++ b/arch/arm/boot/dts/bcm958625-meraki-mx6x-common.dtsi
54 @@ -22,7 +22,7 @@
55 };
56
57 led-2 {
58 - function = LED_FUNCTION_INDICATOR;
59 + function = LED_FUNCTION_POWER;
60 color = <LED_COLOR_ID_GREEN>;
61 pwms = <&pwm 2 50000>;
62 max-brightness = <255>;