there is a pin named LCD0_BKLT_PWM ,But how can I setup the pwm frequency and duty? I can’t find it in TRM datasheet.could you tell me which regisiter can I set?
Hi BillBai, you can refer to below registers’ description in TRM.
DC_DISP_SD_BL_PARAMETERS_0
DC_DISP_SD_BL_TF_0
DC_DISP_SD_BL_CONTROL_0
SOR_NV_PDISP_SOR_PWM_DIV_0
SOR_NV_PDISP_SOR_PWM_CTL_0
Hi BillBai
You can control it by the sysfs. This pin is for the PWM0 for tegra_pwm.
sudo su
export PWM=0
echo $PWM > /sys/class/pwm/pwmchip0/export
than you can control this it by the enable/ duty_cycle, period .... at below dir.
/sys/class/pwm/pwmchip0/pwm0
Hi ShaneCCC,
How to enable the PWM0 by default, not by the sysfs.
For DTSI, I add the following code, but it’s not work.
backlight {
compatible = "pwm-backlight";
status = "okay";
panel-a-wuxga-8-0-bl {
pwms = <&tegra_pwm 0 40161>;
};
}
BRs
Thanks
Pan Andy
@PanAndy
I think you can try to add the script to /init/nv.conf