Tezi kernel - add support for a custom display clock-frequency - native LVDS on Verdin imx8mp

Hi Toradex,

There is an article Verdin iMX8M Plus LVDS Known issues, which describes that any native LVDS display connected to imx8mp is forced to use clock-frequency 74.25MHz for single channel and 148.5Mhz for dual channel.

This article explains, how to customize Torizon kernel in Yocto image to solve this issue, and I can confirm, that in my case it helped to solve the issue.

However, I would also like to customize Toradex Easy Installer (TEZI) that is an excellent tool for image deployments. I have a customized TEZI FIT image that uses my custom device tree, but again I am facing an issue with display, which I am pretty sure is again related to clock-frequency. Note that I also had to create a custom boot.scr, as current boot.scr implementation does not allow you to boot without overlays.

What I would need is a customized TEZI kernel, which will patch drivers/gpu/drm/imx/imx8mp-ldb.c in the same way as suggested in Verdin iMX8M Plus LVDS Known issues.

Would it be possible to either expose TEZI kernel for customization, or to find some other way to patch imx8mp-ldb.c? Maybe we could have some environment variable, that I could set in a customized boot.scr.

This Feature Request is not urgent. I can temporarily work around TEZI GUI by using TEZI autoinstall feature to deploy a patched Torizon Yocto image automatically (from a local USB stick).

Best Regards,
Jaroslav

The R&D team will review your request and implement it if resources are available. However, I wouldn’t expect this to happen any time soon."

1 Like

Hello @alex.tx,

Thank you!

I would also like to point out, as you very well describe in Verdin iMX8M Plus LVDS Known issues, that a simple patch of drivers/gpu/drm/imx/imx8mp-ldb.c is enough for BSP 6 for frequencies 51.6 MHz, 56.2 MHz, 74.25 MHz, 84.8 MHz, 92.8 MHz, 148.5 MHz, based on drivers/clk/imx/clk-imx8mp.c (dividing each number by 7):

static const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = {
	PLL_1443X_RATE(1039500000U, 173, 2, 1, 16384),
	PLL_1443X_RATE(650000000U, 325, 3, 2, 0),
	PLL_1443X_RATE(594000000U, 198, 2, 2, 0),
	PLL_1443X_RATE(519750000U, 173, 2, 2, 16384),
	PLL_1443X_RATE(393216000U, 262, 2, 3, 9437),
	PLL_1443X_RATE(361267200U, 361, 3, 3, 17511),
};

You could consider a more complex solution to patch also clk-imx8mp.c for BSP 6 (or clk-imx8mp.c for BSP 5), but I do not need it for my use case. Resolution 1024x600 with 60 Hz refresh rate can use 51.6 MHz already supported in BSP 6.

Best Regards,
Jaroslav