U-boot splash screen dual LVDS Apalis imx8

Hi @henrique.tx ,

I guess that the investigation is still ongoing. When can we expect a decision?

Best regards,
floji

Hi @floji !

We carried out some investigation towards trying to enable video on U-boot trying to enable Toradex LVDS display (Capacitive Touch Display 10.1" LVDS | Toradex Developer Center).

On Toradex BSP 6’s U-boot (specifically this branch: u-boot-toradex.git - U-Boot bootloader for Apalis and Colibri modules) there are some drivers for the lvds display controller for i.MX8QM.

Please find attached the patch that we came up with.

u-boot_splash_wip.patch (37.4 KB)

Please note that this is not the solution, but a work in progress and is not working. I am sharing this here with you so you could continue the investigation on your side. With this patch, seems like the display controller is initialized, but we still can’t get an image out of the display. We know that the backlight is not working for the display on U-boot (PWM limitation on U-boot).

At the moment, we do not have it working. We might try again soon, but there are no guarantees.

Best regards,

Hi @henrique.tx ,

I’m wondering if there is a progress on that topic with BSP 7. The u-boot git history looks quite promising ;-).

Best regards,

Hi @floji !

From Toradex side, I was informed that no extra effort was made to test/support U-Boot’s splash screen feature.

Although it is possible that the upstream project made some advances in that front, from Toradex side it remains in the same state.

If you wanna share what specifically you saw that was interesting, I can take a look as well :slight_smile:

How is it on your side? Is this a decisive requirement for you?

We could introduce you to some of our Toradex Partners that could help you on your specific implementation need for splash screen on U-Boot.

Best regards,

Hi @floji !

Could you please provide an update regarding this thread?

Best regards,

Hi @henrique.tx ,

sure :slight_smile:

We are busy working on other aspects of our application. But we did some research on this topic and are pretty sure now that Variscite/NXP has implemented splash screen for u-boot:
https://www.variscite.com/blog/how-to-change-the-bsp-logos/
https://github.com/varigit/uboot-imx/tree/lf_v2023.04_var03

We would be very happy if Toradex could port the required patches.

Regards, floji

Hi @floji !

Thanks for the reference!

Although I can’t promise anything, I brought it up internally.

Would you be able to help us a bit about your use case? How important for your project it is to have a splash screen on U-boot?

A splash screen like plymouth on Linux is not enough for your use case?

The more details you can share with us about your requirements and use case, the better! :slight_smile:

Best regards,

1 Like

Hi @henrique.tx ,

thanks!

The boot process takes relatively long. That’s why the unit currently display a blank screen for about 5s (before psplash shows up, plymouth takes a little bit longer). With more and more security features applied (signature validation etc.) the time we spend in u-boot will surely increase. Customers tend to get nervous (and act accordingly) if they power on a device with a display that stays black for so long. We want to provide a better user experience. It also can be helpful for diagnostics in field.
A good user experience is very important to us.

Best regards,

1 Like

Hi @floji !

After bringing it up internally, I realized that we had splash screen on LVDS and U-Boot for Apalis iMX8QM on BSP 6.

We invested some more time and made it work on BSP 7 as well.

Below are the necessary patches to enable it. Please note that this might not be the optimized minimal possible set of changes necessary to make it work. These patches are successfully applied (and compiled) on top of commit 5c6f89c91d3d631af5c5d1ba198b620fceb138e2 of Index of /u-boot-toradex.git (part of branch toradex_imx_lf_v2024.04)

0001-Enable-LVDS-support-on-Apalis-iMX8QM.patch (6.4 KB)
0002-Enable-support-to-dynamically-load-splash-screen-fil.patch (2.7 KB)

Also, I have uploaded a video of the splash screen working on U-Boot on LVDS of an Apalis iMX8QM 4GB WB IT V1.1C on an Ixora V1.2A (to prove it is true :stuck_out_tongue: ):

U-Boot Splash Screen - Apalis iMX8QM

As you can see from the patches, there is nothing too special that is needed (although it required quite some work to have it working :wink: ). Internally, we are investigating if this is something we can have ready/easier to use in our BSP. But we can’t promise anything right now. We are also checking the possibility of having it documented as is (making the patches available in Toradex Developer).

Best regards,

1 Like

Hi henrique.tx,

I applied your patch and it worked. Are there any solutions to keep boot splash screen while kernel booting?
Please help me!

Thanks

Hi @henrique.tx ,

thank you very much for the patches.

Unfortunately we are having trouble to get things running. We applied the patches and changed the display parameters to match our display (AUO G215HAN01.2), but the backlight is still not enabled. The pwm-backlight driver is not probed so I guess that this might be the issue. Do we need CONFIG_PWM_IMX to get pwm-backlight working (it is not buildable)?

I have attached our refreshed patches and a few outputs from U-Boot. Can you take a look?

u-boot.txt (48.7 KB)
0201-Enable-LVDS-support-on-Apalis-iMX8QM.patch (6.4 KB)
0202-Enable-support-to-dynamically-load-splash-screen-fil.patch (2.7 KB)

Best regards,

Hi @victorduong !

That is great!

I didn’t look into this, but I remember something about this either in U-Boot (source code or documentation) or somewhere in NXP’s forums. You can try to find something there.

If you can’t find anything, and need further help, please create another thread here in Toradex Community. Please be sure to reference this thread, so you will have more context there.

Best regards,

Hi @floji !

Just to be sure, have you tried the patches (A) on top of commit 5c6f89c91d3d631af5c5d1ba198b620fceb138e2 ot u-boot-toradex, (B) using a Toradex carrier board (e.g. Ixora V1.2A) and (C) with Toradex’s Capacitive Touch 10.1" LVDS Display?

I highly recommend to first test it with this same setup, so we are sure that your setup/workflow is ok.


But, if you can’t (e.g. because you don’t have the Ixora and/or the LVDS display) and you indeed applied the patches on top of the commit aforementioned…

Which carrier board are you using?
Is the LVDS connector of your carrier board exactly the same as the LVDS pinout in Ixora?
If the LVDS connection pinout is exactly the same, have you perhaps modified anything else in U-Boot that could be causing the issue?

My idea here is trying to understand what is different in your setup that could be causing the issue.

Best regards,

Hi @henrique.tx ,

yes, we are building on top of the commit mentioned (see u-boot console output). We are using our own carrier board, but I also have tested with Ixora and our panel. Unfortunately I don’t have the Toradex Touch available.

We did not change LVDS pinout. Our distribution runs on Ixora as well as on our carrier board. I have attached all u-boot patches we apply and the relevant part of the schematic. I doubt that these patches make a difference.
u-boot.zip (221.3 KB)

The backlight is not enabled. I can’t see a difference to the default backlight node of Linux device tree (despite of our backlight driver’s pwm is not being inverted).

Thank you in advance!

Hi @henrique.tx ,

I did a deep dive into the code and can give you an update:

  • pwm-backlight: driver is not probed because it is not used by any other component
  • simple-panel: does not link to backlight (commented out). If it is linked, probing of simple-panel fails due to an error related to pwm.
  • pwm: pwm cannot be probed because the driver for i.mx8 is missing. It cannot be build because required definitions are not present. I guess that pwm is just not implemented for i.mx8 on u-boot.
  • pin muxing: LVDS1_GPIO00 is configured by the patch to PWM0 but ā€œapalis_mx8.cā€ configures it back to GPIO during ā€œboard_gpio_initā€

If ā€œpwmsā€ is commented out from backlight the driver can be probed and the backlight turns on when additionally LVDS1_GPIO00 is enabled as GPIO (ā€œpretendingā€ to be a pwm). The same result when using gpio-backlight instead of pwm-backlight.
Unfortunately still no image is displayed. I guess that there still must be some problem with display timing (replicated working settings from Linux kernel) or pin muxing (which should be unchanged).

Regards,

Hi @floji !

Sorry for the delay.

Maybe this is something that your specific display needs?

If you could get a Toradex Capacitive 10.1" LVDS display, it would be good because you could do a ā€œsanity checkā€ with the patches as-is and then try to understand what are the differences between this one and your display.

IIRC, the following hunk (from the 2nd patch) is LVDS-specific. So I think you need to check how you must ā€œfine-tuneā€ it to make sense for the display you are using.

diff --git a/drivers/video/nxp/imx/imx8_lvds.c b/drivers/video/nxp/imx/imx8_lvds.c
index 829b419d415..18696cde764 100644
--- a/drivers/video/nxp/imx/imx8_lvds.c
+++ b/drivers/video/nxp/imx/imx8_lvds.c
@@ -181,9 +181,8 @@ void imx8_ldb_configure(struct udevice *dev)
                mode =
                        IMX_LVDS_SET_FIELD(LVDS_CTRL_CH0_MODE, LVDS_CTRL_CH0_MODE__DI0) |
                        IMX_LVDS_SET_FIELD(LVDS_CTRL_CH0_DATA_WIDTH, LVDS_CTRL_CH0_DATA_WIDTH__24BIT) |
-                       IMX_LVDS_SET_FIELD(LVDS_CTRL_CH0_BIT_MAP, LVDS_CTRL_CH0_BIT_MAP__JEIDA) |
-                       IMX_LVDS_SET_FIELD(LVDS_CTRL_CH0_10BIT_ENABLE, LVDS_CTRL_CH0_10BIT_ENABLE__10BIT) |
-                       IMX_LVDS_SET_FIELD(LVDS_CTRL_DI0_DATA_WIDTH, LVDS_CTRL_DI0_DATA_WIDTH__USE_30BIT);
+                       IMX_LVDS_SET_FIELD(LVDS_CTRL_CH0_10BIT_ENABLE, LVDS_CTRL_CH0_10BIT_ENABLE__USE_DATA_WIDTH ) |
+                       IMX_LVDS_SET_FIELD(LVDS_CTRL_DI0_DATA_WIDTH, LVDS_CTRL_DI0_DATA_WIDTH__USE_24BIT);

                regmap_write(priv->gpr, LDB_PHY_OFFSET + LVDS_CTRL, mode);

Since your display works on Linux, you can try to check what Linux is doing on its side to make your display work…

Best regards,