From d12306c829a8c2825d5e64f5e7cd1fcbdf5abce8 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Thu, 30 Mar 2023 13:45:08 +0200 Subject: [PATCH 294/469] arm64: dts: rk3399-pinephone-pro: Switch LED backlight PWM from 1kHz to 20kHz This gets rid of measurable backlight flicker, because LED driver's feedback voltage reference lowpass filter is now driven above the cutoff frequency of 5 kHz. Also adapt the brightness levels curve, to make sure the lowest setting satisfies requirement to have duty cycle at least 250ns. Backlight LED driver doesn't react to smaller pulses on the EN/PWM pin. Signed-off-by: Ondrej Jirman --- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 873f88565cb0..c252ff2e604e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -208,6 +208,14 @@ ppkb_battery: keyboard-battery { backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm0 0 50000 0>; + brightness-levels = + <0 250 360 470 580 690 810 949 1110 1294 1502 + 1737 1998 2289 2610 2964 3351 3774 4233 4731 + 5268 5847 6467 7133 7845 8604 9412 10271 11182 + 12146 13164 14239 15374 16568 17822 19140 20521 + 21969 23483 25068 26722 28447 30247 32121 34071 + 36099 38210 40400 42669 45026 47468 50000>; + default-brightness-level = <17>; }; leds { -- 2.34.1