diff mbox series

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

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

Commit Message

Joel Selvaraj April 1, 2022, 12:18 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>
---
Changes in v2:
 - Remove qcom,enabled-strings property as either it or qcom,num-strings
   should be present. qcom,num-strings is specified and sufficient.
   (Marijn Suijten's Suggestion)

 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Marijn Suijten April 6, 2022, 4:21 p.m. UTC | #1
On 2022-04-01 05:48:10, 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>

Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>

> ---
> Changes in v2:
>  - Remove qcom,enabled-strings property as either it or qcom,num-strings
>    should be present. qcom,num-strings is specified and sufficient.
>    (Marijn Suijten's Suggestion)

Thanks :)

>  arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 12 ++++++++++++
>  1 file changed, 12 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..d88dc07205f7 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,17 @@ 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,num-strings = <2>;
> +	qcom,switching-freq = <600>;
> +	qcom,external-pfet;
> +	qcom,cabc;

Unlike the number of connected strings and configured ovp/current
limits, aren't external-pfet (and probably switching-freq, perhaps CABC)
hardware features that are common across all users of `pmi8998`?

- Marijn

> +};
> +
>  &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..d88dc07205f7 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,17 @@  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,num-strings = <2>;
+	qcom,switching-freq = <600>;
+	qcom,external-pfet;
+	qcom,cabc;
+};
+
 &pm8998_pon {
 	resin {
 		compatible = "qcom,pm8941-resin";