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:
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.
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.
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.