public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
@ 2025-10-28  7:04 Yongxing Mou
  2025-10-28  9:08 ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Yongxing Mou @ 2025-10-28  7:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Yongxing Mou

Previously, the eDP panel backlight was enabled via UEFI. Added backlight
control node in kernel DTS due to some meta may not enable the backlight.

Aligned with other x1e80100-based platforms: the PWM signal is controlled
by PMK8550, and the backlight enable signal is handled by PMC8380.

Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -17,6 +17,16 @@ aliases {
 		serial1 = &uart14;
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pmk8550_pwm 0 5000000>;
+		enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
+		power-supply = <&vreg_edp_bl>;
+
+		pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
+		pinctrl-names = "default";
+	};
+
 	wcd938x: audio-codec {
 		compatible = "qcom,wcd9385-codec";
 
@@ -183,6 +193,22 @@ vreg_edp_3p3: regulator-edp-3p3 {
 		regulator-boot-on;
 	};
 
+	vreg_edp_bl: regulator-edp-bl {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VBL9";
+		regulator-min-microvolt = <3600000>;
+		regulator-max-microvolt = <3600000>;
+
+		gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&edp_bl_reg_en>;
+
+		regulator-boot-on;
+	};
+
 	vreg_nvme: regulator-nvme {
 		compatible = "regulator-fixed";
 
@@ -819,6 +845,8 @@ &mdss_dp3 {
 	aux-bus {
 		panel {
 			compatible = "edp-panel";
+
+			backlight = <&backlight>;
 			power-supply = <&vreg_edp_3p3>;
 
 			port {
@@ -879,6 +907,22 @@ usb0_1p8_reg_en: usb0-1p8-reg-en-state {
 	};
 };
 
+&pmc8380_3_gpios {
+	edp_bl_en: edp-bl-en-state {
+		pins = "gpio4";
+		function = "normal";
+		power-source = <1>;
+		input-disable;
+		output-enable;
+	};
+
+	edp_bl_reg_en: edp-bl-reg-en-state {
+		pins = "gpio10";
+		function = "normal";
+	};
+
+};
+
 &pmc8380_5_gpios {
 	usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state {
 		pins = "gpio8";
@@ -890,6 +934,17 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state {
 	};
 };
 
+&pmk8550_gpios {
+	edp_bl_pwm: edp-bl-pwm-state {
+		pins = "gpio5";
+		function = "func3";
+	};
+};
+
+&pmk8550_pwm {
+	status = "okay";
+};
+
 &smb2360_0 {
 	status = "okay";
 };

---
base-commit: f7d2388eeec24966fc4d5cf32d706f0514f29ac5
change-id: 20251028-hamoa_dvt_backlight-373528b7ce7e

Best regards,
-- 
Yongxing Mou <yongxing.mou@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-28  7:04 [PATCH] arm64: dts: qcom: Add backlight support for eDP panel Yongxing Mou
@ 2025-10-28  9:08 ` Konrad Dybcio
  2025-10-30  9:08   ` Yongxing Mou
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-10-28  9:08 UTC (permalink / raw)
  To: Yongxing Mou, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 10/28/25 8:04 AM, Yongxing Mou wrote:
> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
> control node in kernel DTS due to some meta may not enable the backlight.
> 
> Aligned with other x1e80100-based platforms: the PWM signal is controlled
> by PMK8550, and the backlight enable signal is handled by PMC8380.
> 
> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
> ---

The subject must say "hamoa-iot-evk:"
>  arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> @@ -17,6 +17,16 @@ aliases {
>  		serial1 = &uart14;
>  	};
>  
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pmk8550_pwm 0 5000000>;

Try adjusting the backlight value.. you'll find some funny behavior
near the max level.. which reminds me I should send some fixes for
some laptop DTs

[...]

> +	vreg_edp_bl: regulator-edp-bl {
> +		compatible = "regulator-fixed";
> +
> +		regulator-name = "VBL9";
> +		regulator-min-microvolt = <3600000>;
> +		regulator-max-microvolt = <3600000>;
> +
> +		gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&edp_bl_reg_en>;

property-n
property-names

in this order, please

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-28  9:08 ` Konrad Dybcio
@ 2025-10-30  9:08   ` Yongxing Mou
  2025-10-30  9:41     ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Yongxing Mou @ 2025-10-30  9:08 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel



On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>> control node in kernel DTS due to some meta may not enable the backlight.
>>
>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>
>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>> ---
> 
> The subject must say "hamoa-iot-evk:"
Thanks and got it , will fix it in next version.>> 
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 
++++++++++++++++++++++++++++++
>>   1 file changed, 55 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>> @@ -17,6 +17,16 @@ aliases {
>>   		serial1 = &uart14;
>>   	};
>>   
>> +	backlight: backlight {
>> +		compatible = "pwm-backlight";
>> +		pwms = <&pmk8550_pwm 0 5000000>;
> 
> Try adjusting the backlight value.. you'll find some funny behavior
> near the max level.. which reminds me I should send some fixes for
> some laptop DTs
> 
  I tried sliding the backlight between the maximum and minimum values. 
It seems that at a certain sliding speed, when approaching the maximum 
value, there is some brightness flickering. Is this the phenomenon 
you’re referring to?> [...]
> 
>> +	vreg_edp_bl: regulator-edp-bl {
>> +		compatible = "regulator-fixed";
>> +
>> +		regulator-name = "VBL9";
>> +		regulator-min-microvolt = <3600000>;
>> +		regulator-max-microvolt = <3600000>;
>> +
>> +		gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
>> +		enable-active-high;
>> +
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&edp_bl_reg_en>;
> 
> property-n
> property-names
> 
> in this order, please
> 
> KonradThanks and got it ,will fix it in next version.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-30  9:08   ` Yongxing Mou
@ 2025-10-30  9:41     ` Konrad Dybcio
  2025-10-30 11:07       ` Yongxing Mou
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-10-30  9:41 UTC (permalink / raw)
  To: Yongxing Mou, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 10/30/25 10:08 AM, Yongxing Mou wrote:
> 
> 
> On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
>> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>>> control node in kernel DTS due to some meta may not enable the backlight.
>>>
>>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>>
>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>> ---
>>
>> The subject must say "hamoa-iot-evk:"
> Thanks and got it , will fix it in next version.>> arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>>>   1 file changed, 55 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>> @@ -17,6 +17,16 @@ aliases {
>>>           serial1 = &uart14;
>>>       };
>>>   +    backlight: backlight {
>>> +        compatible = "pwm-backlight";
>>> +        pwms = <&pmk8550_pwm 0 5000000>;
>>
>> Try adjusting the backlight value.. you'll find some funny behavior
>> near the max level.. which reminds me I should send some fixes for
>> some laptop DTs
>>
>  I tried sliding the backlight between the maximum and minimum values. It seems that at a certain sliding speed, when approaching the maximum value, there is some brightness flickering. Is this the phenomenon you’re referring to?> [...]

"maybe" - for me it was the brightness actually going down beyond ~80%

The issue is that the PWM hardware can't really do a period that's
== 5000000 ns

But it seems like this is no longer an issue since the driver now
rounds up to the closest supported value, see last couple commits
to drivers/leds/rgb/leds-qcom-lpg.c

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-30  9:41     ` Konrad Dybcio
@ 2025-10-30 11:07       ` Yongxing Mou
  2025-10-30 11:27         ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Yongxing Mou @ 2025-10-30 11:07 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel



On 10/30/2025 5:41 PM, Konrad Dybcio wrote:
> On 10/30/25 10:08 AM, Yongxing Mou wrote:
>>
>>
>> On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
>>> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>>>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>>>> control node in kernel DTS due to some meta may not enable the backlight.
>>>>
>>>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>>>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>>>
>>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>>> ---
>>>
>>> The subject must say "hamoa-iot-evk:"
>> Thanks and got it , will fix it in next version.>> arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>>>>    1 file changed, 55 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>>>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>> @@ -17,6 +17,16 @@ aliases {
>>>>            serial1 = &uart14;
>>>>        };
>>>>    +    backlight: backlight {
>>>> +        compatible = "pwm-backlight";
>>>> +        pwms = <&pmk8550_pwm 0 5000000>;
>>>
>>> Try adjusting the backlight value.. you'll find some funny behavior
>>> near the max level.. which reminds me I should send some fixes for
>>> some laptop DTs
>>>
>>   I tried sliding the backlight between the maximum and minimum values. It seems that at a certain sliding speed, when approaching the maximum value, there is some brightness flickering. Is this the phenomenon you’re referring to?> [...]
> 
> "maybe" - for me it was the brightness actually going down beyond ~80%
> 
> The issue is that the PWM hardware can't really do a period that's
> == 5000000 ns
> 
> But it seems like this is no longer an issue since the driver now
> rounds up to the closest supported value, see last couple commits
> to drivers/leds/rgb/leds-qcom-lpg.c
> 
> Konrad
Oh,thanks for sharing that. I saw the phenomenon you mentioned. 
Previously, my baseline had already merged this patch series: 
https://lore.kernel.org/all/20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org/, 
so I didn’t observe the ‘brightness actually going down beyond ~80%.’and 
just very slight flickering. After I reverted patches, it indeed 
appeared.  So here i want to confirm,
pwms = <&pmk8550_pwm 0 5000000>
can i keep the value 5000000 ?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-30 11:07       ` Yongxing Mou
@ 2025-10-30 11:27         ` Konrad Dybcio
  2025-11-05  9:58           ` Yongxing Mou
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-10-30 11:27 UTC (permalink / raw)
  To: Yongxing Mou, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 10/30/25 12:07 PM, Yongxing Mou wrote:
> 
> 
> On 10/30/2025 5:41 PM, Konrad Dybcio wrote:
>> On 10/30/25 10:08 AM, Yongxing Mou wrote:
>>>
>>>
>>> On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
>>>> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>>>>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>>>>> control node in kernel DTS due to some meta may not enable the backlight.
>>>>>
>>>>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>>>>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>>>>
>>>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>>>> ---
>>>>
>>>> The subject must say "hamoa-iot-evk:"
>>> Thanks and got it , will fix it in next version.>> arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>>>>>    1 file changed, 55 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>> @@ -17,6 +17,16 @@ aliases {
>>>>>            serial1 = &uart14;
>>>>>        };
>>>>>    +    backlight: backlight {
>>>>> +        compatible = "pwm-backlight";
>>>>> +        pwms = <&pmk8550_pwm 0 5000000>;
>>>>
>>>> Try adjusting the backlight value.. you'll find some funny behavior
>>>> near the max level.. which reminds me I should send some fixes for
>>>> some laptop DTs
>>>>
>>>   I tried sliding the backlight between the maximum and minimum values. It seems that at a certain sliding speed, when approaching the maximum value, there is some brightness flickering. Is this the phenomenon you’re referring to?> [...]
>>
>> "maybe" - for me it was the brightness actually going down beyond ~80%
>>
>> The issue is that the PWM hardware can't really do a period that's
>> == 5000000 ns
>>
>> But it seems like this is no longer an issue since the driver now
>> rounds up to the closest supported value, see last couple commits
>> to drivers/leds/rgb/leds-qcom-lpg.c
>>
>> Konrad
> Oh,thanks for sharing that. I saw the phenomenon you mentioned. Previously, my baseline had already merged this patch series: https://lore.kernel.org/all/20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org/, so I didn’t observe the ‘brightness actually going down beyond ~80%.’and just very slight flickering. After I reverted patches, it indeed appeared.  So here i want to confirm,
> pwms = <&pmk8550_pwm 0 5000000>
> can i keep the value 5000000 ?

I think so.. perhaps make sure the period is appropriate for
the backlight device at the other end since you mentioned it's
flickering

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-10-30 11:27         ` Konrad Dybcio
@ 2025-11-05  9:58           ` Yongxing Mou
  2025-11-05 10:02             ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Yongxing Mou @ 2025-11-05  9:58 UTC (permalink / raw)
  To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel



On 10/30/2025 7:27 PM, Konrad Dybcio wrote:
> On 10/30/25 12:07 PM, Yongxing Mou wrote:
>>
>>
>> On 10/30/2025 5:41 PM, Konrad Dybcio wrote:
>>> On 10/30/25 10:08 AM, Yongxing Mou wrote:
>>>>
>>>>
>>>> On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
>>>>> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>>>>>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>>>>>> control node in kernel DTS due to some meta may not enable the backlight.
>>>>>>
>>>>>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>>>>>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>>>>>
>>>>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>>>>> ---
>>>>>
>>>>> The subject must say "hamoa-iot-evk:"
>>>> Thanks and got it , will fix it in next version.>> arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>>>>>>     1 file changed, 55 insertions(+)
>>>>>>
>>>>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>>>>>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>> @@ -17,6 +17,16 @@ aliases {
>>>>>>             serial1 = &uart14;
>>>>>>         };
>>>>>>     +    backlight: backlight {
>>>>>> +        compatible = "pwm-backlight";
>>>>>> +        pwms = <&pmk8550_pwm 0 5000000>;
>>>>>
>>>>> Try adjusting the backlight value.. you'll find some funny behavior
>>>>> near the max level.. which reminds me I should send some fixes for
>>>>> some laptop DTs
>>>>>
>>>>    I tried sliding the backlight between the maximum and minimum values. It seems that at a certain sliding speed, when approaching the maximum value, there is some brightness flickering. Is this the phenomenon you’re referring to?> [...]
>>>
>>> "maybe" - for me it was the brightness actually going down beyond ~80%
>>>
>>> The issue is that the PWM hardware can't really do a period that's
>>> == 5000000 ns
>>>
>>> But it seems like this is no longer an issue since the driver now
>>> rounds up to the closest supported value, see last couple commits
>>> to drivers/leds/rgb/leds-qcom-lpg.c
>>>
>>> Konrad
>> Oh,thanks for sharing that. I saw the phenomenon you mentioned. Previously, my baseline had already merged this patch series: https://lore.kernel.org/all/20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org/, so I didn’t observe the ‘brightness actually going down beyond ~80%.’and just very slight flickering. After I reverted patches, it indeed appeared.  So here i want to confirm,
>> pwms = <&pmk8550_pwm 0 5000000>
>> can i keep the value 5000000 ?
> 
> I think so.. perhaps make sure the period is appropriate for
> the backlight device at the other end since you mentioned it's
> flickering
> 
> Konrad
Compared to ‘brightness actually going down beyond ~80%’, this is just a 
very slight flicker that only occurs when sliding the brightness bar at 
a specific speed.It won’t occur in most cases. Also tried another value 
pwms = <&pmk8550_pwm 0 4266537>, and it looks the same, so can we keep 
it at 5000000 here?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm64: dts: qcom: Add backlight support for eDP panel
  2025-11-05  9:58           ` Yongxing Mou
@ 2025-11-05 10:02             ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2025-11-05 10:02 UTC (permalink / raw)
  To: Yongxing Mou, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 11/5/25 10:58 AM, Yongxing Mou wrote:
> 
> 
> On 10/30/2025 7:27 PM, Konrad Dybcio wrote:
>> On 10/30/25 12:07 PM, Yongxing Mou wrote:
>>>
>>>
>>> On 10/30/2025 5:41 PM, Konrad Dybcio wrote:
>>>> On 10/30/25 10:08 AM, Yongxing Mou wrote:
>>>>>
>>>>>
>>>>> On 10/28/2025 5:08 PM, Konrad Dybcio wrote:
>>>>>> On 10/28/25 8:04 AM, Yongxing Mou wrote:
>>>>>>> Previously, the eDP panel backlight was enabled via UEFI. Added backlight
>>>>>>> control node in kernel DTS due to some meta may not enable the backlight.
>>>>>>>
>>>>>>> Aligned with other x1e80100-based platforms: the PWM signal is controlled
>>>>>>> by PMK8550, and the backlight enable signal is handled by PMC8380.
>>>>>>>
>>>>>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>>>>>> ---
>>>>>>
>>>>>> The subject must say "hamoa-iot-evk:"
>>>>> Thanks and got it , will fix it in next version.>> arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 55 ++++++++++++++++++++++++++++++
>>>>>>>     1 file changed, 55 insertions(+)
>>>>>>>
>>>>>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>>> index 36dd6599402b4650b7f8ad2c0cd22212116a25fe..fda1b3a3c7673be74832c27849231cba4bc1f25f 100644
>>>>>>> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>>> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
>>>>>>> @@ -17,6 +17,16 @@ aliases {
>>>>>>>             serial1 = &uart14;
>>>>>>>         };
>>>>>>>     +    backlight: backlight {
>>>>>>> +        compatible = "pwm-backlight";
>>>>>>> +        pwms = <&pmk8550_pwm 0 5000000>;
>>>>>>
>>>>>> Try adjusting the backlight value.. you'll find some funny behavior
>>>>>> near the max level.. which reminds me I should send some fixes for
>>>>>> some laptop DTs
>>>>>>
>>>>>    I tried sliding the backlight between the maximum and minimum values. It seems that at a certain sliding speed, when approaching the maximum value, there is some brightness flickering. Is this the phenomenon you’re referring to?> [...]
>>>>
>>>> "maybe" - for me it was the brightness actually going down beyond ~80%
>>>>
>>>> The issue is that the PWM hardware can't really do a period that's
>>>> == 5000000 ns
>>>>
>>>> But it seems like this is no longer an issue since the driver now
>>>> rounds up to the closest supported value, see last couple commits
>>>> to drivers/leds/rgb/leds-qcom-lpg.c
>>>>
>>>> Konrad
>>> Oh,thanks for sharing that. I saw the phenomenon you mentioned. Previously, my baseline had already merged this patch series: https://lore.kernel.org/all/20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org/, so I didn’t observe the ‘brightness actually going down beyond ~80%.’and just very slight flickering. After I reverted patches, it indeed appeared.  So here i want to confirm,
>>> pwms = <&pmk8550_pwm 0 5000000>
>>> can i keep the value 5000000 ?
>>
>> I think so.. perhaps make sure the period is appropriate for
>> the backlight device at the other end since you mentioned it's
>> flickering
>>
>> Konrad
> Compared to ‘brightness actually going down beyond ~80%’, this is just a very slight flicker that only occurs when sliding the brightness bar at a specific speed.It won’t occur in most cases. Also tried another value pwms = <&pmk8550_pwm 0 4266537>, and it looks the same, so can we keep it at 5000000 here?

As I said, just put whatever the backlight that the PWM controller
outputs to expects.

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-05 10:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28  7:04 [PATCH] arm64: dts: qcom: Add backlight support for eDP panel Yongxing Mou
2025-10-28  9:08 ` Konrad Dybcio
2025-10-30  9:08   ` Yongxing Mou
2025-10-30  9:41     ` Konrad Dybcio
2025-10-30 11:07       ` Yongxing Mou
2025-10-30 11:27         ` Konrad Dybcio
2025-11-05  9:58           ` Yongxing Mou
2025-11-05 10:02             ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox