Problem with resistive touch screen on Colibri iMX6

I am testing the 7" resistive touch screen with our extension board and our image.

In the boot stage I can see the Toradex logo on the screen but once the u-boot loads the kernel, the screen goes completely dark, no back light.

&backlight {
#if 0 /* PWM polarity: if 1 is brightest */
	pwms = <&pwm3 0 5000000 0>;
#if 0 /* Fusion 7 needs 10kHz PWM frequency */
	pwms = <&pwm3 0 100000 0>;
#endif
#else /* PWM polarity: if 0 is brightest */
	pwms = <&pwm3 0 5000000 1>;
#endif
	brightness-levels = <0 4 8 16 32 64 128 255>;
	default-brightness-level = <6>;
	status = "okay";
};

The code above is part of our device tree and I have tried every possible settings following instructions in this site: http://developer.toradex.com/knowledge-base/backlight-(linux) but with no luck.

Since the screen is working in u-boot stage, it should be my kernel problem instead of the hardware problem. Do I need to enable specific driver? I use the same kernel as the official build does, with bbappend file just to add our own device tree and kernel config.

This is a part of my config file that relative with touchscreen:

CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_OF_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_CT36X_WLD=y
CONFIG_TOUCHSCREEN_FUSION_F0710A=m
CONFIG_TOUCHSCREEN_STMPE=y
CONFIG_INPUT_MISC=y

Here is the boot log
https://paste2.org/1s3GVDzH
Here is the dmesg
https://paste2.org/mPXpjX2E

Thank you for your time.

Hi

Can you attach the output optained with dmesg when logging in over the serial console?

On what pin did you connect the backlight PWM?

Max

I posted the logs at the end of my question. I’ll try my best to answer your question but I am not the hardware guy so maybe not accurate. We use TPS61165 as our PWM control I think, we connect it with the BL_ON, and brightness pin. I don’t think that is the hardware or pin mux issue because it is working before getting into the kernel.

Hi

We’ve seen issues when we used a TPS61165 as a backlight controller. Brightness can be controlled in two ways in that chip, either with PWM or with a digital one wire protocol.

If the PWM frequency is to low it can happen that the TPS goes int digital mode.

Additionally our default device tree and the device tree snippet you posted assume that a ‘0’ on the PWM signals results in maximum brightness, but the TPS is at maximum backlight current when the PWM signals is set to ‘1’.

What happens if you change the device tree to have the following pwm settings active:

pwms = <&pwm3 0 100000 0>;

i.e using 10kHz (100000ns period) and not inverted PWM output.

One strange thing is that the backlight works in U-Boot, as by default we output ‘0’ on the PWM pin which, for your setup, should result in no backlight.

Max

I changed from pwms = <&pwm3 0 5000000 1>; to pwms = <&pwm3 0 100000 0>;, still getting the same behaviour. In u-boot, the screen works but after the device tree is loaded, screen turn completely dark. I tried to change the bl_power and max_brightness, not effect.

Then I think you should investigate how the hardware is really connected.

Actually I made a stupid mistake that is didn’t uncomment the /* #define PCAP */. However I get the problem that black color turns red.