Enable IMX8MP LVDS panel in uboot We're currently working on enabling an LVDS display in L5.15.52 for an IMX8MP board. We followed a guide on the NXP community website (https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Add-i-MX8MP-LVDS-driver-in-uboot/ta-p/14...), but we're using an LVDS panel instead of an LVDS to HDMI bridge. Consequently, we made some modifications to the U-Boot device tree files and added the panel as a simple panel. The driver works and print the following in uboot, [*]-Video Link 0 (1280 x 800) [0] lcd-controller@32e90000, video [1] lvds-channel@0, display [2] lvds-panel, panel The questions is that there is no data from the LVDS port, I mean there are 4 data lines and 1 clk line on the LVDS cahnnel 0, the clk has 74M, data 0 and data 1 keep high, data 2 and data 3 has some data(I measured the results using an oscilloscope. I attached one picture to show that). I can confirm that the hardware is ok as the kernel can display LVDS well. can you help check what happen? I use simple-panel as panel driver, and the following dts, backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm1 0 50000>; /* period = 5000000 ns => f = 200 Hz */ brightness-levels = <0 100>; num-interpolated-steps = <100>; default-brightness-level = <100>; status = "okay"; }; lvds_panel: lvds-panel { compatible = "simple-panel"; backlight = <&backlight>; display-timings { native-mode = <&timing0>; timing0: timing0 { clock-frequency = <71100000>; hactive = <1280>; vactive = <800>; hback-porch = <40>; hfront-porch = <40>; vback-porch = <3>; vfront-porch = <10>; hsync-len = <80>; vsync-len = <10>; }; }; port { panel_lvds_in: endpoint { remote-endpoint = <&lvds_out>; }; }; }; &lcdif2 { status = "okay"; }; &ldb_phy { status = "okay"; }; &ldb { status = "okay"; lvds-channel@0 { fsl,data-mapping = "spwg"; fsl,data-width = <24>; status = "okay"; port@1 { reg = <1>; lvds_out: endpoint { remote-endpoint = <&panel_lvds_in>; }; }; }; }; i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Re: Enable IMX8MP LVDS panel in uboot Hello, I have encountered a problem similar to yours. May I ask where did you put the logo.bmp file in uboot? Re: Enable IMX8MP LVDS panel in uboot It works, I forget to put one picture/logo in the uboot. Re: Enable IMX8MP LVDS panel in uboot Hi @leavs
This is a demo patch about simple_panel.c, i just set timing in code not dts. You can test it and add code to read timing in device tree.
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" },
{ }
};
Re: Enable IMX8MP LVDS panel in uboot Hi @Zhiming_Liu I added the new PLL table, the result is same. I checked the code detail and find that the clock_init() function in arch/arm/mach-imx/imx8m/clock_imx8mm.c is not run, and the function enable_display_clk() is also not run as I added some debug log in arch/arm/mach-imx/imx8m/clock_imx8mm.c. I don't know why this clock_init() is not called in this BSP. What do you think about this? Re: Enable IMX8MP LVDS panel in uboot Hi @leavs
Please try below PLL settings.
/* Set Video PLL to 995.4Mhz for LVDS, p = 15, m = 622, k = 8192, s = 0 */
記事全体を表示