imx8mp uboot display logo according lvds

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8mp uboot display logo according lvds

786 次查看
changxin_liu
Contributor I

 Hi NXP:

Recently,I‘m trying to display logo in uboot according lvds interface.

I find a patch in NXP community about how to display logo in uboot.

imx8mp uboot display logo - NXP Community

but my lcd screen is 25MHz and 800 X 480 resolution,so i need to change the clock

 

this is my change:

changxin_liu_1-1694156622611.png

changxin_liu_0-1694156553442.png

the change in uboot dts is as same as change in kernel.

Is there anything else that needs to be changed?

标记 (1)
0 项奖励
4 回复数

779 次查看
changxin_liu
Contributor I

lcd backlight is on,buf no logo display

my picture format is right, and bmp cmdline parse success,buf not display

  • u-boot=> bmp info $splashimage
    Image size : 800 x 480
    Bits per pixel: 24
    Compression : 0
    u-boot=> bmp display $splashimage
    u-boot=>
0 项奖励

762 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

在defconfig里加上CONFIG_SIMPLE_PANEL=y。

然后最重要的是修改其中的代码,添加获取timing逻辑,你可以参考以下修改(enable部分可以不注释,看你需求),或者你自己添加解析设备树获取timing的代码:

--- 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,
+};
+
 static int simple_panel_enable_backlight(struct udevice *dev)
 {
 	struct simple_panel_priv *priv = dev_get_priv(dev);
 	int ret;
+	debug("%s\n", __func__);
 
-	dm_gpio_set_value(&priv->enable, 1);
+	//dm_gpio_set_value(&priv->enable, 1);
 	if (priv->backlight) {
 		debug("%s: start, backlight = '%s'\n", __func__, priv->backlight->name);
 		ret = backlight_enable(priv->backlight);
@@ -40,8 +55,10 @@ static int simple_panel_set_backlight(struct udevice *dev, int percent)
 	struct simple_panel_priv *priv = dev_get_priv(dev);
 	int ret;
 
+	debug("%s\n", __func__);
+
 	debug("%s: start, backlight = '%s'\n", __func__, priv->backlight->name);
-	dm_gpio_set_value(&priv->enable, 1);
+	//dm_gpio_set_value(&priv->enable, 1);
 	if (priv->backlight) {
 		ret = backlight_set_brightness(priv->backlight, percent);
 		debug("%s: done, ret = %d\n", __func__, ret);
@@ -57,6 +74,8 @@ static int simple_panel_of_to_plat(struct udevice *dev)
 	struct simple_panel_priv *priv = dev_get_priv(dev);
 	int ret;
 
+	debug("%s\n", __func__);
+
 	if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
 		ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev,
 						   "power-supply", &priv->reg);
@@ -91,6 +110,8 @@ static int simple_panel_probe(struct udevice *dev)
 	struct simple_panel_priv *priv = dev_get_priv(dev);
 	int ret;
 
+	debug("%s\n", __func__);
+
 	if (IS_ENABLED(CONFIG_DM_REGULATOR) && priv->reg) {
 		debug("%s: Enable regulator '%s'\n", __func__, priv->reg->name);
 		ret = regulator_set_enable(priv->reg, true);
@@ -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" },
 	{ }
 };
 

 

0 项奖励

768 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

时钟没啥问题,数值都是正确的。

你要不把你跟我说的clock_8mp.c里面的修改复原一下?

0 项奖励

346 次查看
caozhixian
Contributor I

I have encountered the same problem. Have you solved it? If so, can you send a patch?

0 项奖励