[PATCH 03/11] arm64: dts: qcom: sdm845-lg-common: Add leds

Paul Sajna posted 11 patches 2 weeks, 4 days ago
There is a newer version of this series
[PATCH 03/11] arm64: dts: qcom: sdm845-lg-common: Add leds
Posted by Paul Sajna 2 weeks, 4 days ago
Add the multicolor status led in the phone's notch

Co-authored-by: Amir Dahan <system64fumo@protonmail.com>
Signed-off-by: Amir Dahan <system64fumo@protonmail.com>
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 1acc418b943443f3ba4f8a8a1cfe2c575da11876..d6129ce03f537f0c8c78c2ae5f39be6146cab7dc 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -6,6 +6,7 @@
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 
@@ -603,6 +604,31 @@ vol_up_pin_a: vol-up-active-state {
 	};
 };
 
+&pmi8998_lpg {
+	status = "okay";
+
+	led@0 {
+		label = "blue";
+		reg = <3>;
+		color = <LED_COLOR_ID_BLUE>;
+		default-state = "off";
+	};
+
+	led@1 {
+		label = "green";
+		reg = <4>;
+		color = <LED_COLOR_ID_GREEN>;
+		default-state = "off";
+	};
+
+	led@2 {
+		label = "red";
+		reg = <5>;
+		color = <LED_COLOR_ID_RED>;
+		default-state = "off";
+	};
+};
+
 &qupv3_id_0 {
 	status = "okay";
 };

-- 
2.51.0
Re: [PATCH 03/11] arm64: dts: qcom: sdm845-lg-common: Add leds
Posted by Dmitry Baryshkov 2 weeks, 3 days ago
On Sat, Sep 13, 2025 at 04:56:36PM -0700, Paul Sajna wrote:
> Add the multicolor status led in the phone's notch
> 
> Co-authored-by: Amir Dahan <system64fumo@protonmail.com>
> Signed-off-by: Amir Dahan <system64fumo@protonmail.com>
> Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> index 1acc418b943443f3ba4f8a8a1cfe2c575da11876..d6129ce03f537f0c8c78c2ae5f39be6146cab7dc 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
> @@ -6,6 +6,7 @@
>   */
>  
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
>  #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  
> @@ -603,6 +604,31 @@ vol_up_pin_a: vol-up-active-state {
>  	};
>  };
>  
> +&pmi8998_lpg {
> +	status = "okay";

This should be described as a multi-led. See msm8998-sony-xperia-yoshino
for an example.

> +
> +	led@0 {
> +		label = "blue";
> +		reg = <3>;
> +		color = <LED_COLOR_ID_BLUE>;
> +		default-state = "off";
> +	};
> +
> +	led@1 {
> +		label = "green";
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		default-state = "off";
> +	};
> +
> +	led@2 {
> +		label = "red";
> +		reg = <5>;
> +		color = <LED_COLOR_ID_RED>;
> +		default-state = "off";
> +	};
> +};
> +
>  &qupv3_id_0 {
>  	status = "okay";
>  };
> 
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry