LCD Turn-on/off of Lime2 rev.k using Armbian_5.89 with Ubuntu bionic

Started by tejas.s, July 26, 2019, 06:26:46 PM

Previous topic - Next topic

tejas.s

We are using the newer version of Lime2 i.e, Rev.k in one of our projects. We need to power-down the LCD during certain stages of operation and power-on the LCD back again.

In the earlier versions of Lime2 i.e, Rev.G, The duty_percentage of PWM pin 'pwm0' was used to turn-off the LCD. By setting the duty_percenatge to '1' the LCD would turn-off and by setting the duty_percentage to '75' the LCD would turn-on with reduced brightness.

The commands are as follows,
echo 1 > /sys/class/pwm-sunxi/pwm0/duty_percent   -- to turn-off the display.
echo 75 > /sys/class/pwm-sunxi/pwm0/duty_percent   -- to turn-on the display.


How to achieve the same in with the newer kernel?

I tried to access the PB2/PWM0 in /sys/class/pwm/pwmchip0, but i get an error "resource is busy"
I tried to access the "LCD_PWR" pin i.e, Gpio PH8. But i get an error "resource is busy".

I used /sys/kernel/debug/gpio and found that PH8 is being  used by the pinctrl library.

I even tried using "xbacklight" debian package but it doesnot work. The PWM frequency doesnt change with this package.

What are the options to turn-ON/off the LCD?

selfbg

You want to turn off the display entirely or reduce the backlight to 0?

Also which panel you're using, because the paths may different?


tejas.s

selfbg,

Thank you for the reply.

I want to turn-off the LCD. To turn-off the LCD, GPIO "PH8" should be logic "0" is my understanding.

If we cant access the PH8 pin then I would like to reduce the backlight or Brightness of the LCD to the least value possible. To reduce the Brightness of the LCD we need to change the duty cycle of the PWM wave generated in the pin PB2/PWM0.

I am using the 7" lcd with capacitive touch screen.




selfbg

To reduce brightness to 0 use:

echo 0 > /sys/class/backlight/backlight/brightness


Maximum level is 10:

echo 10 > /sys/class/backlight/backlight/brightness


To turn-off lcd use:

echo 1 > /sys/devices/platform/display-engine/graphics/fb0/blank


And to turn it on again:

echo 0 > /sys/devices/platform/display-engine/graphics/fb0/blank



tejas.s

selfbg,

Thank you for the reply.

The brightness increase and decrease command is working and the brightness is reducing as per command.
But, the commands to change turn-on and turn-off the lcd is not working.

The brightness control command solved my issue. Thank you.

Terry_TT

Quote from: tejas.s on August 03, 2019, 02:28:20 PMselfbg,

Thank you for the reply.

The brightness increase and decrease command is working and the brightness is reducing as per command.
But, the commands to change turn-on and turn-off the lcd is not working.

The brightness control command solved my issue. Thank you.


If we cant access the PH8 pin then I would like to reduce the backlight or Brightness of the LCD to the least value possible. To reduce the Brightness of the LCD we need to change the duty cycle of the PWM wave generated in the pin PB2/PWM0.