diff mbox series

[3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel

Message ID BY5PR02MB70091CBCF76C99109C72E7C8D91F9@BY5PR02MB7009.namprd02.prod.outlook.com (mailing list archive)
State Superseded
Headers show
Series drm/panel: nt36672a: add backlight support | expand

Commit Message

Joel Selvaraj March 30, 2022, 6:56 a.m. UTC
Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
Enable and link it to the panel to use it.

Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
---
 .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Marijn Suijten March 30, 2022, 7:17 a.m. UTC | #1
On 2022-03-30 12:26:39, Joel Selvaraj wrote:
> Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
> Enable and link it to the panel to use it.
> 
> Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
> ---
>  .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> index 798fc72578a7..3ebb0f9905d3 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> @@ -231,6 +231,7 @@ panel@0 {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> +		backlight = <&pmi8998_wled>;
>  		reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>  
>  		port {
> @@ -314,6 +315,18 @@ vol_up_pin_a: vol-up-active {
>  	};
>  };
>  
> +&pmi8998_wled {
> +	status = "okay";
> +	qcom,current-boost-limit = <970>;
> +	qcom,ovp-millivolt = <29600>;
> +	qcom,current-limit-microamp = <20000>;
> +	qcom,enabled-strings = <0 1>;
> +	qcom,num-strings = <2>;

No need to set both nowadays, the driver will even print a warning in
this case:

    https://lore.kernel.org/linux-arm-msm/20211115203459.1634079-6-marijn.suijten@somainline.org/

Sticking with qcom,num-strings is probably the right choice here.

- Marijn

> +	qcom,switching-freq = <600>;
> +	qcom,external-pfet;
> +	qcom,cabc;
> +};
> +
>  &pm8998_pon {
>  	resin {
>  		compatible = "qcom,pm8941-resin";
> -- 
> 2.35.1
>
Joel Selvaraj March 30, 2022, 7:48 a.m. UTC | #2
Hi Marijn,

On 30/03/22 12:47, Marijn Suijten wrote:
 > On 2022-03-30 12:26:39, Joel Selvaraj wrote:
 >> Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
 >> Enable and link it to the panel to use it.
 >>
 >> Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
 >> ---
 >>   .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
 >>   1 file changed, 13 insertions(+)
 >>
 >> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts 
b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
 >> index 798fc72578a7..3ebb0f9905d3 100644
 >> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
 >> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
 >> @@ -231,6 +231,7 @@ panel@0 {
 >>   		#address-cells = <1>;
 >>   		#size-cells = <0>;
 >>
 >> +		backlight = <&pmi8998_wled>;
 >>   		reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
 >>
 >>   		port {
 >> @@ -314,6 +315,18 @@ vol_up_pin_a: vol-up-active {
 >>   	};
 >>   };
 >>
 >> +&pmi8998_wled {
 >> +	status = "okay";
 >> +	qcom,current-boost-limit = <970>;
 >> +	qcom,ovp-millivolt = <29600>;
 >> +	qcom,current-limit-microamp = <20000>;
 >> +	qcom,enabled-strings = <0 1>;
 >> +	qcom,num-strings = <2>;
 >
 > No need to set both nowadays, the driver will even print a warning in
 > this case:
 >
 > 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flinux-arm-msm%2F20211115203459.1634079-6-marijn.suijten%40somainline.org%2F&amp;data=04%7C01%7C%7C2104b54ac0f54308dd1208da121d706a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637842214894184949%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=GYmzHoy6tTAE7ZNTqclfCZH5Fnu%2Bh5d5JHOwsm4wVro%3D&amp;reserved=0
 >
 > Sticking with qcom,num-strings is probably the right choice here.

Ok. Thanks. Will fix it in the next version.

Regards
Joel

 >
 > - Marijn
 >
 >> +	qcom,switching-freq = <600>;
 >> +	qcom,external-pfet;
 >> +	qcom,cabc;
 >> +};
 >> +
 >>   &pm8998_pon {
 >>   	resin {
 >>   		compatible = "qcom,pm8941-resin";
 >> --
 >> 2.35.1
 >>
 > .
 >
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
index 798fc72578a7..3ebb0f9905d3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
@@ -231,6 +231,7 @@  panel@0 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		backlight = <&pmi8998_wled>;
 		reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
 
 		port {
@@ -314,6 +315,18 @@  vol_up_pin_a: vol-up-active {
 	};
 };
 
+&pmi8998_wled {
+	status = "okay";
+	qcom,current-boost-limit = <970>;
+	qcom,ovp-millivolt = <29600>;
+	qcom,current-limit-microamp = <20000>;
+	qcom,enabled-strings = <0 1>;
+	qcom,num-strings = <2>;
+	qcom,switching-freq = <600>;
+	qcom,external-pfet;
+	qcom,cabc;
+};
+
 &pm8998_pon {
 	resin {
 		compatible = "qcom,pm8941-resin";