Display Configuration Guide
The aim of this section is to properly configure custom display: LVDS and eDP panels.
External references are available here:
Standard Display Timings
Verify the signal timing specifications of the LCD in the datasheet and then calculate following parameters:
Parameter | Definition |
---|---|
hback-porch | Horizontal Back Porch (HBP) - Number of pixel clock pulses between HSYNC signal and the first valid pixel data. |
hfront-porch | Horizontal Front porch (HFP) - Number of pixel clock pulses between the last valid pixel data in the line and the next HSYNC pulse. |
vback-porch | Vertical Back Porch (VBP) - Number of lines (HSYNC pulses) from a VSYNC signal to the first valid line. |
vfront-porch | Vertical Front Porch (VFP) - Number of lines (HSYNC pulses) between the last valid line of the frame and the next VSYNC pulse. |
hsync-len | Number of PIXCLK pulses when a HSYNC signal is active. |
vsync-len | Number of HSYNC pulses when a VSYNC signal is active. |
LVDS Customization Guide for i.MX6
In order to bring up a custom display, follow the steps below.
1. Kernel: Adding Custom LVDS support in Device tree file
The target file to be edited is linux-seco/arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi. This one contains the list of available LVDS resolutions.
cd linux-seco/arch/arm/boot/dts
vi imx6qdl-seco_lvds_display.dtsi
In order to add a new LVDS into the above mentioned list, timing structure must be modified to include it.
To obtain the information about the ldb (lvds bridge) structure, you can refer to the documentation available into the Kernel:
linux-seco/Documentation/devicetree/bindings/display/imx/ldb.txt
linux-seco/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt
Below is the data timing structure:
timing9: $name {
clock-frequency = <$Clock-frequency>;
hactive = <$Hactive>;
vactive = <$Vactive>;
hback-porch = <$Hback>;
hfront-porch = <$Hfront>;
vback-porch = <$Vback>;
vfront-porch = <$Vfront>;
hsync-len = <$Hsync>;
vsync-len = <$Vsync>;
};
Below is an example of ldb structure got for SVGA TFT LCD(800x600 BA104S01-100 ) 10.4 inches panel (datasheet avalaible here).
name = LBD-SVGA-BA
Clock-frequency = 39600000
Hactive = 800
Vactive = 600
Hback = 45
Hfront = 45
Vback = 25
Vfront = 25
Hsync = 10
Vsync = 10
2. U-Boot: Adding Custom LVDS resolution into list
The resolution to use is passed from U-Boot to the kernel via bootargs. The seco_config command help the user to perform the selection of the video settings and resolution.
In order to add a new custom LVDS resolution, please follow the steps described below:
The target file to be edited is u-boot-seco/cmd/cmd_seco_config.c. This one contains the list of available LVDS resolutions to pass to kernel via bootargs (selection is performed via seco_config command).
Add the custom resolution settings by appending new items into the following structure:
The fields <DISPLAY NAME>, <KERNEL DISPLAY NAME>, <PIXEL FORMAT>, <DATA MAPPING>, "LDB SETTING", <CHANNEL NUMBER>
are described in the table below:
Field | Description |
---|---|
DISPLAY NAME | Name shown into the resolution list when seco_config command is used |
KERNEL DISPLAY NAME | Name of the resolution added into the kernel file arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi ($name variable) |
PIXEL FORMAT | Display interface pixel format: |
DATA MAPPING | Color signals mapping order [ jeida | spwg | vesa ] |
LDB SETTING | i.MX6 LVDS setting. Leave empty to use the default (display single channel) (ldb=spl0 -> split mode, used for display dual channel) |
CHANNEL NUMBER | Number of channel to use (leave 1 for default configuration) |
3. U-Boot: Adding Custom LVDS resolution for Splash Screen
Also the U-Boot uses the Display to display the Splash Screen. So, if the scope is to use also the custom resolution at U-Boot level, this task have to be performed:
Editing the file board/seco/common/display.c
A new node into struct display_info_t const displays[] must to be added.
Starting from the above structure (data timings structure), edit the sub-structure "mode" by considering the following fields:
Field | Description |
---|---|
name | name of the resolution, to use at U-Boot level |
refresh | refrash rate of the panel (pixecl clock / [ ( tot horiz. pixel) * (tot vert. pixel) ] |
xres | horizontal active area |
yres | vertical active area |
pixclock | pixel clock in pico seconds |
left_margin | horizontal back porch |
right_margin | horizontal fromt porch |
upper_margin | vertical back porch |
lower_margin | vertical fromt porch |
hsync_len | horizontal SYNC |
vsync_len | vertical SYNC |
4. Boot with new resolution
Set the right resolution at U-Boot:
Set the right resolution at kernel, using
seco_config
command:
The board has now successfully been loaded with new custom LVDS resolution
Display Customization Guide for i.MX8
The MIPI DSI support on i.MX8-based boards is configured via the overlays device trees and Kernel sources.
SECO boards with i.MX8 SoC support the following MIPI-DSI interface to LVDS / eDP bridges:
Texas Instruments SN65DSI84 MIPI® DSI bridge to FlatLink™ LVDS single-channel DSI to dual-link LVDS bridge;
Texas Instruments SN65DSI86 Dual-channel MIPI® DSI to embedded DisplayPort™ (eDP ) bridge.
DCSS vs eLCDIF
i.MX8M boards come with 2 display controllers, DCSS and eLCDIF:
DCCS can be connected to HDMI, DP or MIPI-DSI and supports up to 4K resolution;
eLCDIF can be connected only to MIPI-DSI and supports up to 1080p resolution.
Adding Custom LVDS / eDP panel support in panel-simple.c for i.MX8
The panel is configured by the following nodes located in the board device tree, for example arch/arm64/boot/dts/seco/seco-imx8mm-c61.dts:
These nodes represent the links between the device tree and the panel-simple.c structure through the compatible property to an existing or newly added panel from the panel-simple driver.
Example: Configure the custom display timing for AUO Panel model p215hca
In SECO BSP's the references panels are configured and tested with 10000 on/off cycle. Below is the panel structure from drivers/gpu/drm/panel/panel-simple.c for LVDS 1920x1080 from SECO BSP9:
In this case the configured panel is the: auo,p215hca-high. All the parameters configured in struct display_timing are derived from the panel datasheet.
After setting up the panel configuration, you need to check the following file for the LVDS (for the eDP this section can be skipped):
This is the content:
To complete the bridge configuration, it is necessary to correctly configure the following parameters:
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.
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
andclocks = <&si5351a 0>
should be commented out to ensure timing sync.
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.
SECO preconfigured Panels
Below are some pre-built Device Tree Overlay files for i.MX8-based boards.
Once the setup has been defined, the Kernel, including LVDS display resolution, can be built. After compiling, please copy the file into the device and boot the board by setting up the custom device tree file with the support of seco_config file.
Device tree display overlay for i.MX8
Board | Type of product | Peripheral | Overlays |
---|---|---|---|
SM-C12 | SMARC module | MIPI-DSI to LVDS
|
|
SBC-C20 | SBC | MIPI-DSI to LVDS |
|
Q7-C25 | Qseven module | MIPI-DSI to LVDS MIPI-DSI to eDP
|
|
μQ7-C72 | μQseven module | MIPI-DSI to LVDS MIPI-DSI to eDP |
|
SBC-C61 | SBC | MIPI-DSI to LVDS MIPI-DSI to eDP |
|
SBC-C57 | SBC | MIPI-DSI to eDP |
|
SM-D16 | SMARC module | MIPI-DSI to eDP
|
|
In Linux BSP 9.0, you can list the available files on the boot partition.
For example, with the SBC-C61:
Once it is done, you can boot the board using seco_config
tool to configure the Device Tree Overlay.
Below are the commands for the setup:
The board will boot with your display configuration.