hi NXP:
Recently, I'm debugging a problem about how to display the logo in uboot。I use imx8mp board android11 system.
i find a patch in NXP community :
This patch said : Current BSP doesn't support LVDS driver in Uboot.
I use the patch, but it no use. At last I found I don't have the driver in uboot about This node:
ldb_phy: phy@32ec0128 {
compatible = "fsl,imx8mp-lvds-phy";
#address-cells = <1>;
#size-cells = <0>;
gpr = <&mediamix_blk_ctl>;
clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
clock-names = "apb";
power-domains = <&mediamix_pd>;
status = "disabled";
ldb_phy1: port@0 {
reg = <0>;
#phy-cells = <0>;
};
ldb_phy2: port@1 {
reg = <1>;
#phy-cells = <0>;
};
};
I grep the all uboot, but Nothing there .
I try to delete this driver in kernel (because kernel have this driver),and i found the screen is not lit.
So, I wonder if the lack of this driver in uboot makes me unable to support this LVDS。
Looking forward to your reply, thank you!
1.为了保持和Linux中dts的一致性,所以这个节点没有删除,和这个PHY驱动本身没有关系。LVDS PHY的寄存器控制已经包含在了imx8mp_lvds.c中,驱动中只打开了LVDS0端口。
2.这个LVDS补丁是基于IT6263(LVDS转HDMI)转接板实现的,这个补丁不包括LVDS屏幕驱动,如果你接了其他LVDS屏幕,需要修改设备树以及仿照67191屏幕驱动做移植。
我用了最新patch
https://community.nxp.com/t5/user/viewprofilepage/user-id/151788
imx8mp-evk通过hdmi连接了一台显示器。
启动log 显示 it6263_i2c_reg_read, read err -121
这个错误原因是我的显示器与你提供patch的参数不一致导致的吗?
[*]-Video Link 0imx8mp_ldb_probe
imx8mp_ldb_probe
lcdifv3_video_probe000
it6263_i2c_reg_read, read err -121
faill to read from it6263 revision, ret -121
(1280 x 720)
[0] lcd-controller@32e90000, video
[1] lvds-channel@0, display
[2] lvds-to-hdmi-bridge@4c, video_bridge
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
补丁不包括对it6263驱动的修改,你的这个问题和硬件有关,无法建立i2c通信或者是转接板坏了。
我使用的就是一个普通的lvds屏幕,对应的驱动在uboot里面文件使用是“simple_panel.c”但是在我的uboot里面会有报错:
CPU: i.MX8MP[6] rev1.1 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 26C
Reset cause: POR
Model: NXP i.MX8MPlus LPDDR4 EVK board
DRAM: 4 GiB
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... trying mode widtsignal_voltageh 8 (at 200 MHz)
*** Warning - bad CRC, using default environment
probe video device failed, ret -2
[0] lcd-controller@32e90000, video
[1] lvds-channel@0, display
[2] lvds0_panel, panel
probe video device failed, ret -2
Error: 1 bit/pixel mode, but BMP has 8 bit/pixel
In: serial
Out: serial
Err: serial
这里有一个 probe video device failed, ret -2。 如果这里没有报错,我就会得到对应的vedio设备的分辨率。我自己和同事一起查看这个报错,也尝试去解决,但是并没有什么进度。
对应的报错发现在:
drivers/video/video_link.c文件中
struct udevice *video_link_get_video_device(void)
{
int ret;
if (video_off)
return NULL;
if (curr_video_link >= video_links_num)
return NULL;
if (video_links[curr_video_link].dev_num == 0)
return NULL;
ret = device_probe(video_links[curr_video_link].link_devs[0]);
if (ret) {
printf("probe video device failed, ret %d\n", ret);
return NULL;
}
return video_links[curr_video_link].link_devs[0];
}
另外我试着在uboot的dts中去配置backlight和lvds的供电使能gpio。但是并没有什么作用,于是我在对应的board/freescale/imx8mp_evk/imx8mp_evk.c.里面去拉高gpio,并已经生效。
附件为我的dts配置:imx8mp-evk.dts,我不知道我的dts配置是否会导致上面probe device会有错误。我们之前并没有调试过uboot阶段的dts,请您帮我看看,谢谢!
期待您的回复!
Hi NXP members:
We user normal lvds display,follow those patchs, lvds device can probe ok,but I can't display info on the screen, Whether some default information will be displayed initially, or how to control the display of some information?
Thanks,
Hello,
How do you calculate the following parameters in your patch:
#define VIDEO_PLL_RATE 995400000U
#define CONFIG_IMX6_PWM_PER_CLK 66000000
Is this something that is specific to the screen I'm trying to implement?
Hello XHHYY,
Thanks for the patches. Appreciate it.
The clock settings were missing in the original patch.
After applying the patch, start up is stuck after entering the function "imx8mp_lvds_phy_init:"
static int imx8mp_lvds_phy_init(struct udevice *dev)
{
struct imx8mp_ldb_priv *priv = dev_get_priv(dev);
media_blk_write(priv, LVDS_CTRL, CC_ADJ(0x2) | PRE_EMPH_EN | PRE_EMPH_ADJ(0x3));
return 0;
}
did you have similliar issues during debugging?
No,I didn't have this problem.
Maybe your configuration is wrong, Please check your DTS and clock_imx8mm.c or compare the patch and your codec, maybe can help you.
I hope you can succeed and good luck.
Hi @c-luo,
I rechecked clock setting and DTB.
The function "get_dsi_phy_ref_clk()" is defined in clcok_imx8mm.c but never used elsewhere.
get_root_clock(MEDIA_LDB_CLK_ROOT) is never set in my case.
I suspect, the clock settings for the MEDIA BLOCK CONTROL is missing in my case and hence not able to access the LDB phy registers and hangs while read/write to 0x32EC_0000+offset.
If possible, Could also provide the dm tree output to compare. Additonally, which uboot version did you use?
Hi harlin, Even we are getting the same issue, could you be able to solve this prob
Regards,
Srinu
Hi harlin,
Great, can you help me on this how to solve, exactly media_blk_write call is failing and could able get write the lvds control register, I have verified both address and value in __write_32 function and both are correct.
Regards,
Srinu Inaganti
我们已经成功在imx8mp的UBoot里面显示lvds单通道1280x800 及以下分辨率。现在问题是,如何在UBoot里面配置双通道lvds,实现1920x1080输出呢?我们现在用的屏幕是1920x1080 分辨率,双通道lvds。