Title: PWM control [Print This Page] Author: Maverick_by_ Time: 10/25/2022 21:59 Title: PWM control Hello.I try to use PWM to control backlight for LVDS LCD display:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts
Author: 时间的蝴蝶 Time: 10/26/2022 10:06
Try this: echo 100 > /sys/class/backlight/backlight/brightnessAuthor: dengkx Time: 10/26/2022 10:09
He has been used, you can not export.
Thank you a lot ! it works fine now !
Now i have another question - how can i control frequency (and polarity), not only brightness ?
Sure, i can try to change frequency in device tree file in pwms = <&pwm15 0 25000 1>:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts
backlight:backlight {
status = "okay";
enable-gpios = <&pca9555 PCA_IO1_3 GPIO_ACTIVE_HIGH>;
compatible = "pwm-backlight";
pwms = <&pwm15 0 25000 1>;
}Author: Maverick_by_ Time: 10/27/2022 13:31
Yes Sure, i changed frequency (period) to 50000 ns in device tree file in pwms = <&pwm15 0 50000 1>:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts
Then i built kernel and wrote firmware to SOM and everything works fine
Welcome Firefly Open Source Community (https://bbs.t-firefly.com/)