1865868_zh-CN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1865868_zh-CN

1865868_zh-CN

在 uboot 中启用 IMX8MP LVDS 面板

我们目前正在为IMX8MP板在L5.15.52中启用LVDS显示器。我们遵循了NXP社区网站上的指南( https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Add-i-MX8MP-LVDS-driver-in-uboot/ta-p/14... ),但我们使用的是LVDS面板,而不是LVDS转HDMI桥接器。因此,我们对U-Boot设备树文件进行了一些修改,并将面板添加为简单面板。

驱动程序运行并在 uboot 中打印以下内容:

[*]-视频链接 0 (1280 x 800)
[0] LCD 控制器@32e90000,视频
[1] LVDS 通道@0,显示
[2] LVDS 面板,面板

问题是LVDS端口没有数据,我的意思是LVDS通道0上有4条数据线和1条clk线,clk有74M,数据0和数据1保持高位,数据2和数据3有一些数据(我用示波器测量了结果)。我附上了一张图片来证明这一点)。

我可以确认硬件没有问题,因为内核可以正常显示 LVDS 。

您能帮忙检查一下发生了什么吗?

我使用 simple-panel 作为面板驱动,以及以下 dts :

背光:背光{
兼容=“pwm背光”;
pwms = <&pwm1 0 50000>; /* 周期 = 5000000 ns => f = 200 Hz */
亮度级别 = <0 100>;
插值步数 = <100>;
默认亮度级别 = <100>;
状态 = “好的”;
};

lvds_panel:lvds面板{
兼容=“简单面板”;
背光 = <&backlight>;

显示时间 {
本机模式 = <&timing0>;

计时0:计时0{
时钟频率=<71100000>;
活性=<1280>;
虚激活 = <800>;
h后廊=<40>;
hfront-porch = <40>;
v后廊=<3>;
v前廊=<10>;
水平同步长度 = <80>;
垂直同步长度 = <10>;
};
};

港口 {
panel_lvds_in:端点{
远程端点 = <&lvds_out>;
};
};
};

&lcdif2 {
状态 = “好的”;
};

&ldb_phy {
状态 = “好的”;
};

&ldb {
状态 = “好的”;

lvds通道@0 {
fsl,数据映射=“spwg”;
fsl,数据宽度=<24>;
状态 = “好的”;

端口@1 {
注册=<1>;

lvds_out:端点{
远程端点=<&panel_lvds_in>;
};
};

};
};

i.MX 8 系列 | i.MX 8QuadMax (8QM) | 8QuadPlusi.MX 8M | i.MX 8M Mini | i.MX 8M Nano回复:在 uboot 中启用 IMX8MP LVDS 面板你好,我也遇到过和你类似的问题。请问一下你把logo.bmp文件放在uboot的什么位置了?回复:在 uboot 中启用 IMX8MP LVDS 面板

它起作用了,我忘记在 uboot 中放一张图片/徽标了。

回复:在 uboot 中启用 IMX8MP LVDS 面板

你好@leavs

这是关于 simple_panel.c 的演示补丁,我只是在代码中设置了时间,而不是 dts。您可以测试它并添加代码以读取设备树中的时间。

diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index f9281d5e83..692c96dcaa 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -18,12 +18,27 @@ struct simple_panel_priv {
 	struct gpio_desc enable;
 };
 
+/* define your panel timing here and
+ * copy it in simple_panel_get_display_timing */
+static const struct display_timing boe_ev121wxm_n10_1850_timing = {
+	.pixelclock.typ		= 71143000,
+	.hactive.typ		= 1280,
+	.hfront_porch.typ	= 32,
+	.hback_porch.typ	= 80,
+	.hsync_len.typ		= 48,
+	.vactive.typ		= 800,
+	.vfront_porch.typ	= 6,
+	.vback_porch.typ	= 14,
+	.vsync_len.typ		= 3,
+};
+
@@ -100,10 +121,18 @@ static int simple_panel_probe(struct udevice *dev)
 
 	return 0;
 }
+static int simple_panel_get_display_timing(struct udevice *dev,
+					    struct display_timing *timings)
+{
+	memcpy(timings, &boe_ev121wxm_n10_1850_timing, sizeof(*timings));
+
+	return 0;
+}
 
 static const struct panel_ops simple_panel_ops = {
 	.enable_backlight	= simple_panel_enable_backlight,
 	.set_backlight		= simple_panel_set_backlight,
+	.get_display_timing = simple_panel_get_display_timing,
 };
 
 static const struct udevice_id simple_panel_ids[] = {
@@ -115,6 +144,7 @@ static const struct udevice_id simple_panel_ids[] = {
 	{ .compatible = "lg,lb070wv8" },
 	{ .compatible = "sharp,lq123p1jx31" },
 	{ .compatible = "boe,nv101wxmn51" },
+	{ .compatible = "boe,ev121wxm-n10-1850" },
 	{ }
 };

回复:在 uboot 中启用 IMX8MP LVDS 面板

@Zhiming_Liu

我添加了新的 PLL 表,结果是一样的。

我检查了代码细节,发现 arch/arm/mach-imx/imx8m/clock_imx8mm.c 中的 clock_init() 函数没有运行,并且函数 enable_display_clk() 也没有运行,因为我在 arch/arm/mach-imx/imx8m/clock_imx8mm.c 中添加了一些调试日志。

我不知道为什么这个 clock_init() 没有在这个 BSP 中被调用。

您对此有何看法?

回复:在 uboot 中启用 IMX8MP LVDS 面板

你好@leavs

请尝试以下 PLL 设置。

/* 将视频 PLL 设置为 995.4Mhz 用于 LVDS,p = 15,m = 622,k = 8192,s = 0 */

Zhiming_Liu_0-1715749775491.png

Zhiming_Liu_1-1715749790766.png



Tags (1)
No ratings
Version history
Last update:
‎01-06-2026 01:32 AM
Updated by: