i.MX8MP EVK LVDS0
LVDS-HDMI bridge(it6263)
L5.15.5_1.0.0
Some customers need show logo using LVDS panel.
Current BSP doesn't support LVDS driver in Uboot.
This patch provides i.MX8MPlus LVDS driver support in Uboot.
If you want to connect it to LVDS panel , you need port your lvds panel driver like simple-panel.c
0001-L5.15.32-Add-i.MX8MP-LVDS-driver-in-uboot
'probe device is failed, ret -2, probe video device failed, ret -19' is caused by below code. It has been merged in attachment.
// /* Only handle devices that have a valid ofnode */
// if (dev_has_ofnode(dev) && !(dev->driver->flags & DM_FLAG_IGNORE_DEFAULT_CLKS)) {
// /*
// * Process 'assigned-{clocks/clock-parents/clock-rates}'
// * properties
// */
// ret = clk_set_defaults(dev, CLK_DEFAULTS_PRE);
// if (ret)
// goto fail;
// }
0001-L5.15.71-Add-i.MX8MP-LVDS-support-in-uboot
For some panel with low DE, you need uncomment CTRL_INV_DE line and set this bit to 1.
#include <linux/string.h>
@@ -110,9 +111,8 @@ static void lcdifv3_set_mode(struct lcdifv3_priv *priv,
writel(CTRL_INV_HS, (ulong)(priv->reg_base + LCDIFV3_CTRL_SET));
/* SEC MIPI DSI specific */
- writel(CTRL_INV_PXCK, (ulong)(priv->reg_base + LCDIFV3_CTRL_CLR));
- writel(CTRL_INV_DE, (ulong)(priv->reg_base + LCDIFV3_CTRL_CLR));
-
+ //writel(CTRL_INV_PXCK, (ulong)(priv->reg_base + LCDIFV3_CTRL_CLR));
+ //writel(CTRL_INV_DE, (ulong)(priv->reg_base + LCDIFV3_CTRL_CLR));
}
Hi Sir ,
I saw you had posted the LVDS driver patch for imx8MP.
May I know if there's a patch for old U-boot versions just like L5.10.72 and L5.5.70 ? thnaks.
Hi @Phil_liu
You can try to use it in L5.10.72
HI @Zhiming_Liu,
We tried the patch in Yocto 3.0 bsp , but we still get patch fail message. So,please help to provide Yocto 3.0 patch , thanks.
Where do we find the version number (like L5.15.71)?
Hello,
I need to apply 0001-L5.15.71-Add-i.MX8MP-LVDS-support-in-uboot.patch.
I have u-boot-imx 5.15.71 'IMX8MP) but after applying the patch, I have this compilation error :
u-boot-imx/2022.04-r0/git/drivers/video/nxp/imx/imx_lcdifv3.c:349: undefined reference to `display_enable'
Any idea ?
Thanks.
Just enable CONFIG_DISPLAY in your u-boot configuration build.
Now it compile but no splash screen...
Hi Sir ,
I use the LVDS panel and apply the L5.10.72 patch to the imx8mp uboot (Android 11.0.0_2.6.0), and first remove all the kernel panel drivers to verify whether the uboot patch settings are correct. The result is that I can see Android log, but I can't see the bootloader logo.
Therefore, after the board is powered on, there will be a black screen for a period of time, and then you will see the Android log.
However I want to know how to enable uboot logo? It seems that it was not added originally.
Wilson
Hi @Wilson_S
The default code has enabled the logo. You can test under Yocto BSP, it's very fast to verify it. Just need bitbake imx-boot and download it to ram with 'uuu imx-boot-xxxx'. You will see logo or not.
Hi Sir ,
We use Android 11.0.0_2.6.0. Has NXP verified the uboot logo on Android 11? Is the enable method of uboot logo the same as Yocto?
Thanks!
Wilson
Hi @Wilson_S
Yes, the default uboot source code has enabled the logo
Hi Sir ,
Thanks for your quick reply!
It seems that I used the L5.10.72 patch and did not bring up the panel during the bootloader stage.
We had already confirmed below
1. We used Logic Analyzer to measure the Panel’s power up sequence and it was correct.
2. Video Timing is also correct ,becasue it works fine in kernel.
So the only question left is the setting of PLL such as "clock_imx8mm.c" or LVDS configuration
such as "imx_lcdifv3."?
We use a 1920 x 720 panel, Pixel clock is 47Mhz, dual LVDS channel, what else needs to be set?
Wilson
Hi @Wilson_S
1.The default lvds driver only enable one channel, you need add flags to enable another channel. Also need check pixel format in driver, the default setting is JEIDA format.
2.After enabling dual channel in LVDS_CTRL register, the clock is key point. You need add new PLL table to support dual channel panel. The default setting in patch is single channel PIXEL_CLK=74.25Mhz, so LDB_CLK_ROOT= PIXEL_CLK * 7, LDB_CLK_ROOT = VIDEO_PLL / 2
+ /* 519.75Mhz LVDS PLL ref from video PLL */
+ clock_set_target_val(MEDIA_LDB_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(7) |CLK_ROOT_POST_DIV(CLK_ROOT_POST_DIV2));
For dual channel, LDB_CLK_ROOT=PIXEL_CLK* 3.5, then you will get the VIDEO_PLL value :PIXEL_CLK*7.
For P,M,K,S value in PLL table, you can calculate them from formula in RM(CCM chapter).
Hi Sir ,
1.The default lvds driver only enable one channel, you need add flags to enable another channel.
-> I only find LDB_CH1_MODE_EN_TO_DI0 & LDB_CH1_MODE_EN_TO_DI1 but I could not find where to set this flag in the imx8mp_lvds.c and could you tell me how to enable the flag ? or provide a patch ?
Thanks!
Wilson
Dear @Zhiming_Liu:
The LVDS patch disabled MIPI-DSI port. Currently, uboot only create one video link.
Is it possible to have two or three video link output in parallel on u-boot?
I mean the uboot video link :
MIPI-DSI =>
[*]-Video Link 0
[0] lcd-controller@32e80000, video
[1] mipi_dsi@32e60000, video_bridge
[2] panel_dsi, panel
LVDS =>
[*]-Video Link 0
[0] lcd-controller@32e90000, video
[1] lvds-channel@0, display
[2] panel_lvds, video_bridge
Actually, we also requre HDMI video link, we need three video link to display logo at the smae time.
Hi @ching-julo
From the default videolink design, only can output a videolink one time. Maybe you can refer the code and modify it, the code is very simple: drivers/video/video_link.c
For HDMI driver, there is no such reference driver currently.
It appears to me that this patch is incomplete. Particularly, it is missing clock configuration for a number of clocks needed for this to work.
Is my observation accurate?
I couldn't manage to adapt this patch for my specific LVDS screen (clock needs to be modified and I'm using the simple-panel driver).
U-boot freezes after calling the function imx8mp_lvds_phy_power_on (->media_blk_write(priv, LVDS_CTRL, HS_DISABLE);).
Do you know when this driver will be available in a future release of NXP u-boot?
Extract of my DTS :