pwm based backlight driver support for the lcd panel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pwm based backlight driver support for the lcd panel

3,622 Views
ask
Contributor III

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?

0 Kudos
6 Replies

1,457 Views
igorpadykov
NXP Employee
NXP Employee

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

1,457 Views
ask
Contributor III

!Hi igorpadykov,

Thanks for your reply

I could able to controld the lcd panel brightness using led-mxs-pwm functionality.



0 Kudos

1,457 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

1,457 Views
fabio_estevam
NXP Employee
NXP Employee

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.

0 Kudos

1,457 Views
ask
Contributor III

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

0 Kudos

1,457 Views
fabio_estevam
NXP Employee
NXP Employee

You can get it from here:

https://www.kernel.org/

0 Kudos