Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The aim of this section is to properly configure the LVDS settings.

...

Verify the signal timing specifications of the LCD in the datasheet and then calculate following parameters:

Parameter

Definition

hback-porch

hfront-porch

Horizontal Front Porch in pixels

vback-porch

vfront-porch

Vertical Front Porch in pixels

hsync-len

vsync-len

...

by using the open source reference available at the following path https://www.epanorama.net/faq/vga2rgb/calc.html .LDB Structure format:

To obtain the information about the ldb structure, you can refer to the documentation available into the Kernel:

...

The MIPI DSI support on i.MX8-based boards is enabled via the device trees located in the Kernel source at arch/arm64/boot/dts/seco. MIPI-DSI on i.MX8 with IPU is supported with Synopsys hardware while i.MX8 uses the Mixel and the Advantec panels.

SECO boards with i.MX8 SoC support the following MIPI-DSI interfaces:

...

The connected panel is represented in the device tree in its own node. That node references the used LDB/LVDS channel through its node 'port' (RIFORMULARE). Both panel-simple and panel-lvds driver can be used, as described below. NON CAPISCO SE QUI DOVREBBE ESSERCI UN SECONDO PUNTO ELENCO, MI SEMBRA CHE LE OPZIONI DA SPIEGARE SIANO 2.

  • Panel Simple

Set the compatible property to an existing or newly added panel from the panel-simple driver.

...

There are the following statements in the drivers/gpu/drm/panel/panel-simple.c file (NON HO CAPITO)

Code Block
static const struct display_timing auo_p215hca_high_timing = {
        .pixelclock = { 139000000, 160000000, 165000000 },
        .hactive = { 1920, 1920, 1920 },
        .hfront_porch = { 1, 85, 90 },
        .hsync_len = { 1, 10, 45 },
        .hback_porch = { 1, 85, 150 },
        .vactive = { 1080, 1080, 1080 },
        .vfront_porch = { 3, 20, 50 },
        .vsync_len = { 6, 10,60  },
        .vback_porch = { 11, 20, 37 },
        .flags = DISPLAY_FLAGS_HSYNC_LOW |
                   DISPLAY_FLAGS_VSYNC_LOW |
                   DISPLAY_FLAGS_DE_LOW |
                   DISPLAY_FLAGS_PIXDATA_NEGEDGE,
};

static const struct panel_desc auo_p215hca_high = {
        .timings = &auo_p215hca_high_timing,
        .num_timings = 1,
        .bpc = 8,
        .size = {
                .width = 68,
                .height = 121,
        },
        .delay = {
                /*
                 * The panel spec recommends one second delay
                 * to the below items.  However, it's a bit too
                 * long in pratical.  Based on tests, it turns
                 * out 100 milliseconds is fine.
                 */
                .prepare = 100,
                .enable = 100,
                .unprepare = 100,
                .disable = 100,
        },
        .bus_format = MEDIA_BUS_FMT_RGB888_1X24,//MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
};

static const struct of_device_id platform_of_match[] = {
	{
    }, {
                .compatible = "auo,p215hca-high",
                .data = &auo_p215hca_high,
       }, {
		/* sentinel */
	}
};
MODULE_DEVICE_TABLE(of, platform_of_match);

...

After the timing parameter need to call the device tree file with compatible device on the panel. (NON HO CAPITO)

Please refer the respective SECO boards device tree (.dts)file. PER FARE COSA? QUELLO CHE รจ SCRITTO SOPRA?

E.g.: seco-imx8mm-c72.dts

...

  • lvds,datamap: can be configured as jeida or spwg, other configurations are not supported.

  • lvds,dual-channel:if inserted, it enables bridge dual channel output. The DSI video signal is splitted in LVDS channel A and LVDS channel B, refer to sn65dsi84 datasheet for more informations.

  • lvds,preserve-dsi-timings:this parameter is useful when the LVDS display timing is synchronized with Data Enable, while it should be removed if the panel is not DE sync. LVDS panels that are not synchronized with Data Enable must be configured without lvds, preserve-dsi-timing parameter and clocks = <&si5351a 0> should be commented out to ensure timing sync. QUI COSA VA IN CORSIVO/CODICE?

Note

The above configurations can be useless in some cases and prevent the panel from turning on.
This is due to the i.MX8 DSI video driver that recalculates the panel timing to adapt them to the i.MX8 DSI video output. In these cases, a fine tuning in the admitted panel timing is necessary: clocks, front and back porch until the LVDS panel turns on.

...