2023-02-09 02:28:32

by Owen Yang

[permalink] [raw]
Subject: [PATCH] arm64: dts: qcom: sc7280: Adjust zombie PWM frequency

Tune the PWM to solve screen flashing issue and high frequency noise.

Signed-off-by: Owen Yang <[email protected]>
---

arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
index 64deaaabac0f..000f64d27ab9 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
@@ -61,8 +61,8 @@ ap_tp_i2c: &i2c0 {
};

&pm8350c_pwm_backlight {
- /* Set the PWM period to 200 microseconds (5kHz duty cycle) */
- pwms = <&pm8350c_pwm 3 200000>;
+ /* Set the PWM period to 320 microseconds (8kHz duty cycle) */
+ pwms = <&pm8350c_pwm 3 320000>;
};

&pwmleds {
--
2.17.1



2023-02-09 19:45:38

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: qcom: sc7280: Adjust zombie PWM frequency

On Thu, Feb 09, 2023 at 10:28:16AM +0800, Owen Yang wrote:
> Tune the PWM to solve screen flashing issue and high frequency noise.
>
> Signed-off-by: Owen Yang <[email protected]>
> ---
>
> arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
> index 64deaaabac0f..000f64d27ab9 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-zombie.dtsi
> @@ -61,8 +61,8 @@ ap_tp_i2c: &i2c0 {
> };
>
> &pm8350c_pwm_backlight {
> - /* Set the PWM period to 200 microseconds (5kHz duty cycle) */
> - pwms = <&pm8350c_pwm 3 200000>;
> + /* Set the PWM period to 320 microseconds (8kHz duty cycle) */
> + pwms = <&pm8350c_pwm 3 320000>;

Is 'duty cycle' really correct here? The unit of the duty cycle is
percent, not kHz and it shouldn't be impacted by this change. I guess
you mean frequency.

And how does this change result in a frequency of 8kHz? Wouldn't it be
3.125 kHz with a peridod of 320us?