Overlay for LCD backlight

Hi there,

Hardware:
Colibri iMX6DL
with Viola Carrier Board Rev 1.2
TorizonCore 5.7.2

image

We’re trying to use a LCD connected to the Unified Interface Display Connect (X7 on the Viola Rev 1.2 carrier board).
And wanted to initially check that the backlight is working.

Checking the X7 connection details, we can see that…
BL_ON SOIMM Number = 71 –> GPIO3_IO26
PWM_A SOIMM Number = 59 –> PW3_OUT, GPIO2_IO09, GPIO2_IO16

We then created a new overlay file…
colibri-imx6_panel-st7789v-2.8inch_overlay.dts, with the following settings…
(taking the timings from the MIDAS MDT0280A1IHR-MULTI 240x320 display datasheet using the ST7789V Controller IC)

/* Copyright 2023 */

// Enable the parallel RGB interface on the Colibri iMX6DL.
// Make sure to also select a valid display configuration.

/dts-v1/;
/plugin/;

/ {
        compatible = "toradex,colibri_imx6dl";
};

&backlight {
	pwms = <&pwm3 0 6666667>;
	status = "okay";
};

&lcd_display {
	status = "okay";
};

&pwm3 {
	status = "okay";
};

&panel_dpi {
	compatible = "panel-dpi";
	status = "okay";
	data-mapping = "bgr666";

	width-mm = <44>;
	height-mm = <58>;

	panel-timing {
		clock-frequency = <6350000>;

		hactive = <240>;
		vactive = <320>;

		hsync-len = <30>;
		hfront-porch = <10>;
		hback-porch = <20>;

		vsync-len = <22>;
		vfront-porch = <4>;
		vback-porch = <18>;
	};
};

After deploying the overlay and rebooting, the backlight does not show.
Is there a way in which to test BL_ON & PWM just to confirm that is working?

Many Thanks Jon

Hello @jon2023 ,
Would it be possible for you to share the datasheet of the display that you are using?

Best regards,
Josep

Yeah sure,

Should be attached…
MDT0280A1IHR-MULTI.pdf (1.7 MB)

Timings on Page 6
image

And page 7

And the calculated values…
hsync-len: HORIZONTAL_BLANKING_PERIOD =
tHBP + tHFP = 20 + 10 = 30

tHBP = 20

tHFP = 10

vsync-len: VERTICAL_BLANKING_PERIOD =
tVBP + tVFP = 18 + 4 = 22

tVBP = 18

tVFP = 4

And from the MIDAS datasheet…
DOTCLK (DCLK) frequency: 6.35MHz

Let me know if you need any more details

Many Thanks Jon

Hi there,

Hardware:
Colibri iMX6DL
with Viola Carrier Board Rev 1.2
TorizonCore 5.7.2

image

We’ve managed to get the backlight (BL_ON) and brightness to change using the command line…
$ echo 0 > bl_power
$ echo 7 > brightness

Next we a looking to output something on the connected LCD screen…
Checking the modes…
$ cat /sys/class/graphics/fb0/modes

U:240x320p-0

and running the fbset command, we get…

mode “240x320-0”
# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
geometry 240 320 240 320 16
timings 0 0 0 0 0 0 0
accel true
rgba 5/11,6/5,5/0,0/0
endmode

Should the D:, H: and V: details show different values?
Should the timings show different values?

$ cat /proc/cmdline shows this…
enable_wait_mode=off galcore.contiguousSize=50331648 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/138ddb3d76cc0356ed5c9f44787061a6af39984f5b69bd5c5bcb7a907219187c/0

Which seems to indicate that the lcd display isn’t enabled correctly.

Let me know if there is something that I’m missing or can try out.

Many Thanks
Jon

Hi @jon2023 ,

I noticed in your overlay that you considered hsync-len = hfront-porch + hback-porch and vsync-len = vfront-porch + vback-porch, and I don’t think that’s correct value for them, based on the kernel documentation.

hsync-len and vsync-len are the horizontal and vertical sync lengths respectively, and each one should have its own value in the datasheet. From the datasheet you provided they should be (typical values):

  • hsync-len: 10 DOTCLKs
  • vsync-len: 2 lines

Try setting these new values to your overlay and see if you can get the display to work.

Best regards,
Lucas Akira

Thanks Lucas,

I shall try updating values and hopefully that will do the trick :slight_smile:

Cheers
Jon

Hello @jon2023 ,
Do you have any updates on this topic?

Best regards,
Josep