Switch PWM off between U-Boot and Linux

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

Switch PWM off between U-Boot and Linux

1,894 Views
steffendoster
Contributor IV

Hi,

I have a (serious) problem with my LVDS-Display on an i.MX6:

The Brightness of this display is controlled by PWM1. I already managed to set different brightnes in u-boot and linux.

The Problem is on startup, when u-boot finished its work and Linux is just loaded:
Between u-boot end and linux start, the pin (GPIO_9__PWM1_OUT) is set to 1 regardless of what is set by u-boot. The result is a Image on my LVDS-Display that slowly fades to white.

If I get u-boot to set this pin to 0 before it closes itself, the display would turn off the Backlight and everything would be fine. Linux then would turn the pwm on again if it's ready to display its logo.

But I simply have no clue how tu turn this pin off on u-boot exit. I already tried to set the pin as gpio and turn it off with <gpio clear 9> in bootcmd. (This works as long as u-boot is active)

But just after u-boot exits the pin is high again. And it's driving the pin high. A Pull-Down didn't work either.

Any suggestions?

Labels (3)
0 Kudos
2 Replies

870 Views
b36401
NXP Employee
NXP Employee

I can suggest you to add setting the pin to 0 in u-boot code directly befor loading Linux kernel.

Or you can turn the display off at all before Linux boot. 

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

870 Views
steffendoster
Contributor IV

I already tried to do this by defining the Pin as GPIO in U-Boot and set it to '0' before booting the linux kernel.

But straight after U-Boot is closed and the kernel starts, the Pin is reset to '1'. And it drives high, there is no pull-up on the line but a pull-down. The problem is, it seems that I can't controll this Pin for one to two seconds between U-Boot releases it and Linux takes over control.

This is some weird behaviour, why is the normal mode of a Pin active high?

Sadly I can't reset or power off the display because I'm not connected to this signals, I can only power off backlight.

0 Kudos