Test environment
i.MX8MP EVK LVDS0
LVDS-HDMI bridge(it6263)
Uboot2022, Uboot2023
Background
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
Update
[2022.9.19] Verify on L5.15.32_2.0.0
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;
// }
[2023.3.14] Verify on L5.15.71
0001-L5.15.71-Add-i.MX8MP-LVDS-support-in-uboot
[2023.9.12]
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));
}
[2024.5.15]
If you are uing simple-panel.c, need use below patch to set display timing from panel to lcdif controller.
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" },
{ }
};
[2024.7.23]
Update patch for L6.6.23(Uboot2023)
View full article