Hi all,
I am using imx287 processor based board for one of my Infotainment project. In this product lcd panel backlight is controlling by PWM4. I tried to enable the CONFIG_BACKLIGHT_PWM and HAVE_PWM options, but those are not available in my ltib setup. I tried to build these options by modifying the corresponding make files (drivers/video/backlight/Makefile and arch/arm/plat-mxc) and ended up with build erros. Please let me know whether I am following wrong approach?
Hi ashok
please refer to attached Linux Manual
Chapter 28 LED Pulse Width Modulator (PWM) Driver
Examples for two control the brightness of the LEDs on the MX28 EVK:
# ./devices/platform/mxs-leds.0/leds/led-pwm0
# ./devices/platform/mxs-leds.0/leds/led-pwm1
Usable settings are 0 to 127
echo 127 > /sys/devices/platform/mxs-leds.0/leds/led-pwm0/brightness //Led0 On
echo 0 > /sys/devices/platform/mxs-leds.0/leds/led-pwm0/brightness //Led0 Off
echo 127 > /sys/devices/platform/mxs-leds.0/leds/led-pwm1/brightness //Led1 On
echo 0 > /sys/devices/platform/mxs-leds.0/leds/led-pwm1/brightness //Led1 Off
Best regards
igor
!Hi igorpadykov,
Thanks for your reply
I could able to controld the lcd panel brightness using led-mxs-pwm functionality.
Hi ashok
Please look below links for pwm
https://github.com/boundarydevices/linux-imx6/commit/63b106e30a42e5ee89c4c7d
0644e853f013276db
https://community.freescale.com/message/433746#433746
Best regards
igor
In a 3.17 kernel you can see arch/arm/boot/dts/imx28-evk.dts and search for the 'backlight' node.
It is controlled by PWM2 and you can easily change it to PWM4 as per your needs.
Hi Fabio,
Please can you share me the link for 3.17 kernel.
Linux kernel I am using 2.6.35.3. I am following chapters 9,10, and 11 of the MX28_EVK_Linux_Reference_Manual.pdf and also refering drivers/video/mxs/lcd_43wvf1g.c file. It was configured to pwm2 and changed it to pwm4 as per my needs. I also got sysfs entries as follows.
/sys/devices/platform/mxs-bl.0/backlight/mxs-bl$ ls
actual_brightness brightness max_brightness subsystem
bl_power device power uevent
Default values are as follows:
/sys/devices/platform/mxs-bl.0/backlight/mxs-bl$ cat brightness
50
/sys/devices/platform/mxs-bl.0/backlight/mxs-bl$ cat bl_power
1
I changed bl_power to 0 brightness to 100, there is no effect on the display. I am not seeing backlight.
Please let me know do we have to configure any other settings.
If we change it gpio it is working fine. I am able to see the backlight.
Thanks and Regards
Ashok .K
You can get it from here: