diff mbox series

[2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c

Message ID 20220505022706.1692554-3-bjorn.andersson@linaro.org (mailing list archive)
State Accepted
Commit f23f1fa880bfbf47404aef9aaaff1dc7804d4df7
Headers show
Series arm64: dts: qcom: Add a few LPG LEDs | expand

Commit Message

Bjorn Andersson May 5, 2022, 2:27 a.m. UTC
The DB845c has 4 "user LEDs", the last one is already supported as it's
just wired to a gpio. Now that the LPG binding is in place we can wire
up the other 3 LEDs as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Pavel Machek May 30, 2022, 7:06 a.m. UTC | #1
Hi!

> The DB845c has 4 "user LEDs", the last one is already supported as it's
> just wired to a gpio. Now that the LPG binding is in place we can wire
> up the other 3 LEDs as well.


> +&pmi8998_lpg {
> +	status = "okay";
> +
> +	qcom,power-source = <1>;
> +
> +	led@3 {
> +		reg = <3>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <3>;
> +
> +		linux,default-trigger = "heartbeat";
> +		default-state = "on";
> +	};
> +
> +	led@4 {
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <2>;
> +	};
> +
> +	led@5 {
> +		reg = <5>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <1>;
> +	};

Do the LEDs have some kind of markings? Marking them as "indicator" is not too useful.

Best regards,
									Pavel
Bjorn Andersson June 30, 2022, 3:54 a.m. UTC | #2
On Mon 30 May 02:06 CDT 2022, Pavel Machek wrote:

> Hi!
> 
> > The DB845c has 4 "user LEDs", the last one is already supported as it's
> > just wired to a gpio. Now that the LPG binding is in place we can wire
> > up the other 3 LEDs as well.
> 
> 
> > +&pmi8998_lpg {
> > +	status = "okay";
> > +
> > +	qcom,power-source = <1>;
> > +
> > +	led@3 {
> > +		reg = <3>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_HEARTBEAT;
> > +		function-enumerator = <3>;
> > +
> > +		linux,default-trigger = "heartbeat";
> > +		default-state = "on";
> > +	};
> > +
> > +	led@4 {
> > +		reg = <4>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_INDICATOR;
> > +		function-enumerator = <2>;
> > +	};
> > +
> > +	led@5 {
> > +		reg = <5>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_INDICATOR;
> > +		function-enumerator = <1>;
> > +	};
> 
> Do the LEDs have some kind of markings? Marking them as "indicator" is not too useful.
> 

Unfortunately no, there is just 4 green LEDs tightly packed together (3
driven by the lpg, 1 by a gpio), with no indications of which is which.

Regards,
Bjorn
Caleb Connolly July 1, 2022, 6:49 p.m. UTC | #3
On 05/05/2022 03:27, Bjorn Andersson wrote:
> The DB845c has 4 "user LEDs", the last one is already supported as it's
> just wired to a gpio. Now that the LPG binding is in place we can wire
> up the other 3 LEDs as well.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> ---
>   arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 194ebeb3259c..e4d3de0a1e6d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -5,6 +5,7 @@
>
>   /dts-v1/;
>
> +#include <dt-bindings/leds/common.h>
>   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>   #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>   #include <dt-bindings/sound/qcom,q6afe.h>
> @@ -606,6 +607,36 @@ resin {
>   	};
>   };
>
> +&pmi8998_lpg {
> +	status = "okay";
> +
> +	qcom,power-source = <1>;
> +
> +	led@3 {
> +		reg = <3>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <3>;
> +
> +		linux,default-trigger = "heartbeat";
> +		default-state = "on";
> +	};
> +
> +	led@4 {
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <2>;
> +	};
> +
> +	led@5 {
> +		reg = <5>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <1>;
> +	};
> +};
> +
>   /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
>   &q6afedai {
>   	qi2s@22 {
> --
> 2.35.1
>

--
Kind Regards,
Caleb
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 194ebeb3259c..e4d3de0a1e6d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -5,6 +5,7 @@ 
 
 /dts-v1/;
 
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include <dt-bindings/sound/qcom,q6afe.h>
@@ -606,6 +607,36 @@  resin {
 	};
 };
 
+&pmi8998_lpg {
+	status = "okay";
+
+	qcom,power-source = <1>;
+
+	led@3 {
+		reg = <3>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <3>;
+
+		linux,default-trigger = "heartbeat";
+		default-state = "on";
+	};
+
+	led@4 {
+		reg = <4>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <2>;
+	};
+
+	led@5 {
+		reg = <5>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <1>;
+	};
+};
+
 /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
 &q6afedai {
 	qi2s@22 {