...
The LVDS Display Bridge (LDB) is used to connect the IPU (Image Processing Unit) to the External LVDS Display Interface. Its purpose is to support the flow of synchronous RGB data from the IPU to external display devices through the LVDS interface.
Table of Contents |
---|
Device Tree Overlay
The Device Tree Overlays (DTBO) provide a way to modify the overall device tree without re-compiling the complete device tree.
Overlays are fragments of a complete device tree that can be included or removed according to the environment. The direct consequence is enabling/disabling the hardware components of the system.
The design process of a Device Tree Overlay includes three macro steps:
writing a Device Tree Overlay (.dts) file;
generating a *.dtbo file, output of *.dts file build;
enabling the overlay through *.dtbo file.
For further information on the Device Tree Overlay customization, please refer to the documentation available at following Kernel path:
Code Block |
---|
linux-seco/Documentation/devicetree/overlay-notes.txt |
Some devices are used in the overlays and those devices are pre-enabled by default in the source.
Below is the reference table for the pre-enabled Device Tree Overlay.
...
Boards Family
...
Peripherals
...
Device Tree Overlay
...
i.MX6
...
UART, LVDS, RGB, Audio, HDMI, Touch, GPIO, Pin header selection, etc.
Here you can find the pre-enabled device tree overlay
...
imx6qdl-seco_i.MX6XXX_uart4.dtbo ,imx6qdl-seco_i.MX6XXX_video_LVDS.dtbo,imx6qdl-seco_i.MX6XXX_ac97.dtbo
,imx6qdl-seco_i.MX6XXX_video_HDMI.dtbo
,imx6qdl-seco_i.MX6XXX_cpld_gpio_pwm.dtbo
,imx6qdl-seco_i.MX6XXX_touch_st1232.dtbo
,imx6sx-seco_i.MX6XXX_conn_j9.dtbo
,imx6sx-seco_i.MX6XXX_RGB.dtbo
...
i.MX8
...
HDMI, Display Port, LVDS , Camera, hdmiin, lcdif, Modem, eDP, GPIO,CAN, RTC,PCIe, SPI, DCSS, WiFi/BT, etc.
Here you can find the pre-enabled device tree overlay
...
seco-i.MX8XXX-hdmi.dtbo
,seco-i.MX8XXX-dp.dtbo
,seco-i.MX8XXX-lvds-dual.dtbo
,seco-i.MX8XXX-ov5640-csi0.dtbo
,seco-i.MX8XXX-hdmiin.dtbo
,seco-i.MX8XXX-lcdif-sn65dsi86.dtbo
,seco-i.MX8XXX-modem.dtbo,seco-i.MX8XXX-port1-can.dtbo,seco-i.MX8XXX-port1-rs232.dtbo
,seco-i.MX8XXX-wilink.dtbo
LVDS Customization Guide for i.MX6
The i.MX6-based boards use the fbdev interface for mode setting and output configuration.
There are two IPU units on the i.mx6q SoC, and only one IPU unit on the i.mx6dl SoC. Each IPU unit has two display interfaces. The Vivante X driver can only make use of the first framebuffer /dev/fb0, while the others can be used through the fbdev framebuffer interface.
The assignment of the possible display outputs to the framebuffers (scan-out engines) and their timing configuration can be done both through Kernel command line and within the device tree. The command line settings take precedence over the device tree.
The first and third video output has an additional overlay framebuffer configured.
...
Video output
...
IPU core
...
fb boot name
...
fb device
...
Overlay fb device
...
First
...
IPU1
...
mxcfb0
...
/dev/fb0
...
/dev/fb1
...
Second
...
IPU1
...
mxcfb1
...
/dev/fb2
...
Third
...
IPU2
...
mxcfb2
...
/dev/fb3
...
/dev/fb4
...
Fourth
...
IPU2
...
mxcfb3
...
/dev/fb5
Kernel: Adding Custom LVDS support in Device tree file for i.MX6
Please follow the steps below to add the custom display timing data into the imx6qdl-seco_lvds_display.dtsi
file.
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
...
HoriHorizontal 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.
by using the open source reference available at the following path https://www.epanorama.net/faq/vga2rgb/calc.html .
To obtain the information about the ldb structure, you can refer to the documentation available into the Kernel:
Code Block |
---|
linux-seco/Documentation/devicetree/bindings/display/imx/ldb.txt
linux-seco/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt |
Code Block |
---|
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 the sample timing data for SVGA TFT LCD(800x600) 10.4 inches (BA104S01-100):
Code Block |
---|
name = LBD-SVGA-BA
Clock-frequency = 39600000
Hactive = 800
Vactive = 600
Hback = 45
Hfront = 45
Vback = 25
Vfront = 25
Hsync = 10
Vsync = 10 |
After that, get into the device tree path (arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi
).
Please find below the ldb structure to be added in the imx6qdl-seco_lvds_display.dtsi
file.
Code Block |
---|
cd linux-seco/arch/arm/boot/dts
vi imx6qdl-seco_lvds_display.dtsi |
Now add the newly created lbd structure into the LVDS device tree file and save the file.
You can now check the Device Tree Overlay file whether the LVDS (LDB) is enabled or not. Below is the example to enable the ldb node.
Code Block |
---|
fragment@3 {
target = <&ldb>;
__overlay__ {
status = "okay";
};
}; |
Once the setup is done, you can compile the source.
Info |
---|
From BSP9.0 onwards, the LVDS is enabled by the Device Tree Overlay file, using seco_config tool to load the the device tree overlay in U-Boot level. |
Device tree display overlay for i.MX6
...
Board
...
Type of product
...
Peripheral
...
Overlays
...
Q7-928
...
Qseven module
HDMI
LVDS
...
imx6qdl-seco_quadmo747_928_video_LVDS.dtbo
imx6qdl-seco_quadmo747_928_video_LVDSx2_CLONE.dtbo
imx6qdl-seco_quadmo747_928_video_LVDSx2_DUAL.dtbo
imx6qdl-seco_quadmo747_928_video_HDMI.dtbo
imx6qdl-seco_quadmo747_928_video_LVDS_HDMI.dtbo
imx6qdl-seco_quadmo747_928_video_HDMI_LVDS.dtbo
...
μQ7-962
...
μQseven module
...
HDMI
LVDS
...
imx6qdl-seco_uq7_962_video_LVDS.dtbo
imx6qdl-seco_uq7_962_video_LVDSx2_CLONE.dtbo
imx6qdl-seco_uq7_962_video_LVDSx2_DUAL.dtbo
imx6qdl-seco_uq7_962_video_HDMI.dtbo
imx6qdl-seco_uq7_962_video_LVDS_HDMI.dtbo
imx6qdl-seco_uq7_962_video_HDMI_LVDS.dtbo
...
μQ7-A75-J
...
μQseven module
...
HDMI
LVDS
...
imx6qdl-seco_uQ7_J_A75_video_LVDS.dtbo
imx6qdl-seco_uQ7_J_A75_video_LVDSx2_CLONE.dtbo
imx6qdl-seco_uQ7_J_A75_video_LVDSx2_DUAL.dtbo
imx6qdl-seco_uQ7_J_A75_video_HDMI.dtbo
imx6qdl-seco_uQ7_J_A75_video_LVDS_HDMI.dtbo
imx6qdl-seco_uQ7_J_A75_video_HDMI_LVDS.dtbo
...
SBC-A62-J
...
SBC
...
HDMI
LVDS
Sitronix touch(st1232)
Goodix Touch(gt928)
...
imx6qdl-seco_SBC_A62_touch_gt928.dtbo
imx6qdl-seco_SBC_A62_touch_st1232.dtbo
imx6qdl-seco_SBC_A62_video_LVDS.dtbo
imx6qdl-seco_SBC_A62_video_LVDSx2_CLONE.dtbo
imx6qdl-seco_SBC_A62_video_LVDSx2_DUAL.dtbo
imx6qdl-seco_SBC_A62_video_HDMI.dtbo
imx6qdl-seco_SBC_A62_video_LVDS_HDMI.dtbo
imx6qdl-seco_SBC_A62_video_HDMI_LVDS.dtbo
...
SBC-B08
...
SBC
...
LVDS
RGB
...
imx6sx-seco_SBC_B08_LVDS.dtbo
imx6sx-seco_SBC_B08_RGB.dtbo
...
SYS-B07-7
...
System
...
SBC-C23
...
SBC
...
LVDS
...
imx6sx-seco_SBC_C23_LVDS.dtbo
Info |
---|
From BSP9.0 onwards, our images comes with available pre-built overlays binaries as (.dtbo). |
In Linux BSP 9.0, you can list the available files on the boot partition.
For example, with the SBC-A62-J:
...
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 | HoriHorizontal 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
The i.MX6-based boards use the fbdev interface for mode setting and output configuration.
There are two IPU units on the i.mx6q SoC, and only one IPU unit on the i.mx6dl SoC. Each IPU unit has two display interfaces. The Vivante X driver can only make use of the first framebuffer /dev/fb0, while the others can be used through the fbdev framebuffer interface.
The assignment of the possible display outputs to the framebuffers (scan-out engines) and their timing configuration can be done both through Kernel command line and within the device tree. The command line settings take precedence over the device tree.
The first and third video output has an additional overlay framebuffer configured.
Video output | IPU core | fb boot name | fb device | Overlay fb device |
---|---|---|---|---|
First | IPU1 | mxcfb0 | /dev/fb0 | /dev/fb1 |
Second | IPU1 | mxcfb1 | /dev/fb2 | |
Third | IPU2 | mxcfb2 | /dev/fb3 | /dev/fb4 |
Fourth | IPU2 | mxcfb3 | /dev/fb5 |
Kernel: Adding Custom LVDS support in Device tree file for i.MX6
To obtain the information about the ldb 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
Code Block |
---|
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 the sample timing data for SVGA TFT LCD(800x600) 10.4 inches (BA104S01-100):
Code Block |
---|
name = LBD-SVGA-BA
Clock-frequency = 39600000
Hactive = 800
Vactive = 600
Hback = 45
Hfront = 45
Vback = 25
Vfront = 25
Hsync = 10
Vsync = 10 |
Please follow the steps below to add the custom display timing data into the arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi
.
Code Block |
---|
cd linux-seco/arch/arm/boot/dts
vi imx6qdl-seco_lvds_display.dtsi |
Now add the newly created ldb structure into the LVDS device tree file and save the file.Once the setup is done, you can compile the source.
Info |
---|
From BSP9.0 onwards, the LVDS is enabled by the Device Tree Overlay file, using seco_config tool to load the the device tree overlay in U-Boot level. |
U-Boot: Adding Custom LVDS resolution into list
The resolition 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 follow this step:
...
This file contains the list of display setting to pass to kernel via bootargs.
The selection is performend performed via seco_config command.
Add the custom resolution setting with a new item into the follow structure:
Code Block | ||
---|---|---|
| ||
static lvds_video_spec_t lvds_video_spec_list [] = {
{ "WVGA [800x480]", "LDB-WVGA", "RGB666", "datamap=spwg", "", 1 },
{ "SVGA [800x600]", "LDB-SVGA", "RGB666", "datamap=spwg", "", 1 },
{ "XGA [1024x768]", "LDB-XGA", "RGB666", "datamap=spwg", "", 1 },
{ "WXGA [1368x768]", "LDB-WXGA", "RGB24", "datamap=jeida", "", 1 },
{ "WXGAP60 [1280x800]", "LDB-1280P60", "RGB24,bpp=32","datamap=spwg", "", 1 },
{ "SXGA [1280x1024]", "LDB-SXGA", "RGB24", "datamap=jeida", "", 1 },
{ "HD1080 [1920x1080]", "LDB-1080P60", "RGB24", "datamap=spwg", "ldb=spl0", 2 },
{<DISPLAY NAME>, <KERNEL DISPLAY NAME>, <PIXEL FORMAT>, <DATA MAPPING>, "LDB SETTING", <CHANNEL NUMBER>}
}; |
with:
Field | Description | ||
---|---|---|---|
DISPLAY NAME | name show 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 | splay interface pixel format as below:
| ||
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) |
...