Difference between revisions of "IoTGateway/BSP/Linux/AM335x/V2/Hardware module/LCD Module"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
{{DISPLAYTITLE:Display Module}} [[IoTGateway/BSP/Linux/AM335x/Hardware_module|<font style="background-color:yellow"><big><big>→Hardware Module</big></big> </font>]]
+
{{DISPLAYTITLE:Display Module}} [[IoTGateway/BSP/Linux/AM335x/Hardware_module|<font style="background-color:yellow"><big><big>→Hardware Module</big></big></font>]]
  
 
__TOC__
 
__TOC__
  
= LVDS timing setting on SDK =
+
= display timing setting on SDK =
  
*Add timing structure into dispaly driver
+
If you want to select or change the type of LVDS panel, please set the parameter of "native-mode" in linux-4.1.6+gitAUTOINC+52c4aa7cdb-g52c4aa7/arch/arm/boot/dts/am335x-rsb4221.dts file to your panel parameter, which is shown as below:
 
+
<pre>display-timings {
LDB-XGA is an example for the resolution of your LVDS panel. You can input the actual resolution of your LVDS panel here, such as 800x480, 1024x768, etc. The system will accomplish the corresponding parameters automatically. If the panel has problem to be activated, you may need to check the panel datasheet to configure the panel related parameters. The LVDS video mode database is stored in linux-3.2.0/drivers/video/da8xx-fb.c. You can add a new one for your LVDS panel.
+
native-mode = <&timing2>;
<pre>static struct da8xx_panel known_lcd_panels[] = {
+
...
{
+
...
.name = "TFC_S9700RTWV35TR_01B",
+
timing2: 1360x768 {
.width = 800,
+
hactive = <1024>;
.height = 480,
+
vactive = <768>;
.hfp = 127,
+
hback-porch = <120>;
.hbp = 127,
+
hfront-porch = <120>;
.hsw = 2,
+
hsync-len = <104>;
.vfp = 22,
+
vback-porch = <20>;
.vbp = 22,
+
vfront-porch = <20>;
.vsw = 1,
+
vsync-len = <1>;
.pxl_clk = 20000000,
+
clock-frequency = <60000000>;
.invert_pxl_clk = 0,
+
hsync-active = <0>;
},
+
vsync-active = <0>;
}
+
};
 +
};
 
</pre>
 
</pre>
  
 
The definition of da8xx_panel in linux-3.2.0/ drivers/video/da8xx-fb.c: The name field is optional. If you input this value, it can be used in U-Boot environment settings. The refresh field is the screen refresh frame rate, such as 60Hz, 70Hz. The resolution can be filled in the xres & yres fields. The pixel clock (pixclock) is equaled to 10ʌ12 /(Total horizontal line * Total vertical line * DCLK). For example, the total horizontal line is 1344 DCLK, and total vertical number is 806 horizontal lines. The frame rate is 60 MHz. Therefore, we can get 10 12 /(1344*806*60) = 15385.<br/>The margin values can be seen as front porch & back porch.<br/>The sync_len means pulse width.<br/>The sync value indicates the sync polarity (low or high).
 
The definition of da8xx_panel in linux-3.2.0/ drivers/video/da8xx-fb.c: The name field is optional. If you input this value, it can be used in U-Boot environment settings. The refresh field is the screen refresh frame rate, such as 60Hz, 70Hz. The resolution can be filled in the xres & yres fields. The pixel clock (pixclock) is equaled to 10ʌ12 /(Total horizontal line * Total vertical line * DCLK). For example, the total horizontal line is 1344 DCLK, and total vertical number is 806 horizontal lines. The frame rate is 60 MHz. Therefore, we can get 10 12 /(1344*806*60) = 15385.<br/>The margin values can be seen as front porch & back porch.<br/>The sync_len means pulse width.<br/>The sync value indicates the sync polarity (low or high).
<pre>struct da8xx_panel {
 
const char
 
name[25];
 
/* Full name <vendor>_<model> */
 
unsigned short width;
 
unsigned short height;
 
int      hfp;  /* Horizontal front porch*/
 
int      hbp;  /* Horizontal back porch*/
 
int      hsw;  /* Horizontal Sync Pulse Width*/
 
int      vfp;  /* Vertical front porch*/
 
int      vbp;  /* Vertical back porch*/
 
int      vsw; /* ertical Sync Pulse Width*/
 
unsigned int pxl_clk;  /* Pixel clock*/
 
unsigned charinvert_pxl_clk;  /* Invert Pixel clock */
 
};
 
</pre>
 
 
*Select the suitable panel timing
 
 
LVDS (Single) out, please set in u-boot as below:
 
 
'''7’’ panle '''(TFC_S9700RTWV35TR_01B):
 
<pre>setenv mmcargs "run bootargs_defaults;setenv bootargs ${bootargs} console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} lvds_panel=TFC_S9700RTWV35TR_01B"
 
</pre>
 
 
'''15’’ panle '''(INNOLUX_G150XGE_L04):
 
<pre>setenv mmcargs "run bootargs_defaults;setenv  bootargs ${bootargs} console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} lvds_panel=INNOLUX_G150XGE_L04"
 
</pre>
 
 
'''18’’ panle '''(AUO_G185XW01_V1):
 
<pre>setenv mmcargs "run bootargs_defaults;setenv bootargs ${bootargs}  console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} lvds_panel=AUO_G185XW01_V1"
 
</pre>
 
 
= VGA Timing setting on SDK =
 
 
*Add timing structure into dispaly driver
 
 
Same as LVDS.
 
 
*Select the suitable VGA timing.
 
 
'''1024x768@60 resolution:'''
 
<pre>setenv mmcargs "run bootargs_defaults;setenv bootargs ${bootargs} console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} video_mode= VGA_1024x768@60"
 
</pre>
 
 
'''800x600@60 resolution:'''
 
<pre>setenv mmcargs "run bootargs_defaults;setenv bootargs ${bootargs} console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} video_mode= VGA_800x600@60"
 
</pre>
 
 
'''1360x768@60 resolution:'''
 
<pre>setenv mmcargs "run bootargs_defaults;setenv bootargs ${bootargs} console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method} video_mode= VGA_1360x768@60"
 
</pre>
 

Revision as of 04:37, 8 February 2017

→Hardware Module

display timing setting on SDK

If you want to select or change the type of LVDS panel, please set the parameter of "native-mode" in linux-4.1.6+gitAUTOINC+52c4aa7cdb-g52c4aa7/arch/arm/boot/dts/am335x-rsb4221.dts file to your panel parameter, which is shown as below:

display-timings {
native-mode = <&timing2>;
...
...
timing2: 1360x768 {
hactive = <1024>;
vactive = <768>;
hback-porch = <120>;
hfront-porch = <120>;
hsync-len = <104>;
vback-porch = <20>;
vfront-porch = <20>;
vsync-len = <1>;
clock-frequency = <60000000>;
hsync-active = <0>;
vsync-active = <0>;
};
};

The definition of da8xx_panel in linux-3.2.0/ drivers/video/da8xx-fb.c: The name field is optional. If you input this value, it can be used in U-Boot environment settings. The refresh field is the screen refresh frame rate, such as 60Hz, 70Hz. The resolution can be filled in the xres & yres fields. The pixel clock (pixclock) is equaled to 10ʌ12 /(Total horizontal line * Total vertical line * DCLK). For example, the total horizontal line is 1344 DCLK, and total vertical number is 806 horizontal lines. The frame rate is 60 MHz. Therefore, we can get 10 12 /(1344*806*60) = 15385.
The margin values can be seen as front porch & back porch.
The sync_len means pulse width.
The sync value indicates the sync polarity (low or high).