The aim of this section is to properly configure custom display: LVDS and eDP panels.
Table of Contents |
---|
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 custom display following steps are needed:
1. Kernel: Adding Custom LVDS support in Device tree file
The target file to edit is linux-seco/arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi. This last contains the list of available LVDS resolutions.
Code Block |
---|
cd linux-seco/arch/arm/boot/dts
vi imx6qdl-seco_lvds_display.dtsi |
A newest one have to be enclosed into “timing” structure.
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
Is this the struct you were talking about?
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>;
}; |
Here below an example of lbd structure got for SVGA TFT LCD(800x600) 10.4 inches panel (datasheet avalaible here) is the sample timing data for SVGA TFT LCD(800x600) 10.4 inches (BA104S01-100):
...
The aim of this section is to properly configure custom display: LVDS and eDP panels.
Table of Contents |
---|
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 custom display following steps are needed:
1. Kernel: Adding Custom LVDS support in Device tree file
The target file to edit is linux-seco/arch/arm/boot/dts/imx6qdl-seco_lvds_display.dtsi. This last contains the list of available LVDS resolutions.
Code Block |
---|
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
Here below data timing structure:
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>;
}; |
Here below an example of ldb structure got for SVGA TFT LCD(800x600 BA104S01-100 ) 10.4 inches panel (datasheet avalaible here).
...
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 |
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 steps below described:
The target file to edit is u-boot-seco/cmd/cmd_seco_config.c. This last contains the list of available LVDS resolutions to pass to kernel via bootargs (selection is performed via seco_config command).
Code Block |
---|
cd u-boot-seco/cmd/
vi cmd_seco_config.c |
Add the custom resolution settings by appending new items into the following structure:
Code Block | ||
---|---|---|
| ||
static lvds_video_spec_t lvds_video_spec_list [] = { { "WVGA name = LBD-SVGA-BA [800x480]", "LDB-WVGA", "RGB666", "datamap=spwg", "", 1 }, Clock-frequency = 39600000 { "SVGA [800x600]", "LDB-SVGA", "RGB666", Hactive = 800 "datamap=spwg", "", 1 }, { "XGA [1024x768]", Vactive = 600"LDB-XGA", "RGB666", "datamap=spwg", "", 1 }, Hback = 45 { "WXGA [1368x768]", "LDB-WXGA", "RGB24", "datamap=jeida", "", Hfront =1 45}, { "WXGAP60 [1280x800]", "LDB-1280P60", "RGB24,bpp=32","datamap=spwg", "", 1 }, Vback = 25 { "SXGA [1280x1024]", "LDB-SXGA", "RGB24", Vfront = 25"datamap=jeida", "", 1 }, { "HD1080 [1920x1080]", "LDB-1080P60", "RGB24", Hsync "datamap= 10 spwg", "ldb=spl0", 2 }, {<DISPLAY NAME>, <KERNEL DISPLAY NAME>, <PIXEL FORMAT>, <DATA MAPPING>, "LDB SETTING", Vsync<CHANNEL =NUMBER>} 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 steps below described:
The target file to edit is u-boot-seco/cmd/cmd_seco_config.c. This last contains the list of available LVDS resolutions to pass to kernel via bootargs (selection is performed via seco_config command).
Code Block |
---|
cd u-boot-seco/cmd/
vi cmd_seco_config.c |
Add the custom resolution settings by appending new items into the following 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>}
}; |
The fields <DISPLAY NAME>, <KERNEL DISPLAY NAME>, <PIXEL FORMAT>, <DATA MAPPING>, "LDB SETTING", <CHANNEL NUMBER>
are here described:
...
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:
...
}; |
The fields <DISPLAY NAME>, <KERNEL DISPLAY NAME>, <PIXEL FORMAT>, <DATA MAPPING>, "LDB SETTING", <CHANNEL NUMBER>
are here described:
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 |
Code Block |
---|
}, { .bus = -1, .addr = -1, .pixfmt = IPU_PIX_FMT_RGB24, .detect = NULL, .enable = |
...
enable_lvds, |
...
.mode = { |
...
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. Under the sub-structure
...
// Rif. Panel 1024x768 Panel UMSH-8596MD-15T .name = "LDB-1280P60", .refresh = 60, .xres |
...
= |
...
1280, . |
...
yres = |
...
800, . |
...
pixclock = |
...
15128, .left_margin = 220, . |
...
right_margin = |
...
40, . |
...
upper_margin = |
...
21, . |
...
lower_margin = |
...
7, .hsync_len = 60, |
...
|
...
|
...
|
...
|
...
|
...
.vsync_len = 10, |
...
.sync |
...
|
...
= 0, . |
...
vmode |
...
|
...
= |
...
FB_VMODE_NONINTERLACED } }, { . |
...
bus = -1, |
...
|
...
.addr = -1, .pixfmt = IPU_PIX_FMT_RGB24, . |
...
detect = NULL, .enable = |
...
enable_lvds, .mode = { |
...
// new |
...
data |
...
structure .name |
...
= |
...
"NEW CUSTOM RESOLUTION", .refresh |
...
= <custom refresh>, |
...
|
...
.xres |
...
= <custom |
...
horiz. |
...
resolution>, .yres |
...
= |
...
<custom vert. resolution>, .pixclock |
...
= <pixel clock in us>, |
...
|
...
.left_margin = <horiz. back porch>, |
...
|
...
|
...
.right_margin = <horiz. front porch>, |
...
.upper_margin = <vert. back porch>, |
...
|
...
.lower_margin = <vert. front porch>, |
...
|
...
|
...
.hsync_len = <horiz. SYNC lenght>, |
...
|
...
Insert the new custom resolution, starting from the one above and edit the sub-structure "mode", 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
.vsync_len = <vert. SYNC lenght>,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED
} |
4. Boot with new resolution
...
Tip |
---|
The board has now successfully been loaded with new custom LVDS resolution |
...
Display Customization Guide for i.MX8
...