Debugging of the android LVDS screen Driver Based on the flykar imx6 sabrelite Development Board

Source: Internet
Author: User
Tags imx6

I. Overview

1. The display drive architecture of flisikar imx6:


2. Objectives:

Because the sabrelite Development Board itself has provided LVDS interface, the target screen is LG's LP101WX1-SLN2, its main parameters are:

Resolution: 1280*800

Color: 18 digits

Color: 262 K

Clock frequency: 69.3 M Hz


2. porting process

1. First, connect the screen interface to the LVDS interface of the sabrelite Development Board. The following LVDS interfaces are provided on the sabrelite Development Board:




As shown in, LVDS has a total of 20 pins, including four data lines, one set of clock lines, and other interfaces such as backlight control, power supply, and ground.

Let's look at the lp101wx1 interface:




It has 40 pin ports, 3 data lines, and 1 set of clock lines. The following describes the wiring steps:

1) connect the three data lines of lp101wx1 and one set of clock lines to the LVDS interface of the Development Board:

Orx0-=> lvds0_tx0_n

Orx0 + => lvds0_tx0_p

...

Orxc-=> lvds0_clk_n

Orxc + => lvds0_clk_p


2) connect the power supply and ground of lp101wx1:

2 VCC => 3.3 V

3 VCC => 3.3 V

10 Gnd => ground

13
Gnd => ground

16
Gnd => ground

19
Gnd => ground


3) connect the backlight of lp101wx1:

31 Gnd => grounding

35 PWM => 3.3 V (backlight brightness adjustment)

36 led_en => enable the backlights, connect to a 10 k resistor, and connect to a 3.3v power supply.

38 vled => backlight power supply, 5 V power supply

2. Modify the android kernel source code.

1) Find the fb_videomode array variable of drivers/Video/mxc/LDB. C, which defines the relevant parameters of the screen. The fb_videomode struct is defined in include/Linux/FB. h:

 
Struct fb_videomode {const char * Name;/* name */u32 refresh;/* refresh frequency */u32 xres; // row pixel u32 yres; // column pixel u32 pixclock; // clock frequency, in PS, 142.16u32 left_margin; // hbpd (horizontal back porch): 80u32 right_margin; // hfpd (horizontal front Porth): 48u32 upper_margin; // vbpd (vertical back porch), 15u32 lower_margin; // vfbd (vertical front porch), 2u32 hsync_len; // heat map (horizontal sync pulse width): 32u32 vsync_len; // vspw (vertical sync pulse width): 47u32 sync; u32 vmode; u32 flag ;};


2) modify the fb_videomode array variable of drivers/Video/mxc/LDB. C to adapt its parameters to the screen parameters of lp101wx1.

static struct fb_videomode ldb_modedb[] = {#if 0{ "LDB-XGA", 60, 1024, 768, 15385, 220, 40, 21, 7, 60, 10, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_DETAILED,}, #endif //add by tonny@2012-06-04 13:43 { "LDB-XGA", 60, 1280, 800, 14430, 80, 48, 15, 2, 32, 47, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_DETAILED,},{ "LDB-1080P60", 60, 1920, 1080, 7692, 100, 40, 30, 3, 10, 2, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_DETAILED,},};
 

LDB-XGA name

Refresh frequency: 60

Resolution: 1280*800

Clock: 10 ^ 12/69300000 = 14430

Sync: 0

Vmode: fb_vmode_noninterlaced

Flag: fb_mode_is_detailed

3) re-compile the kernel, generate boot. IMG, and download it to the sabrelite Development Board.

4) Start the Development Board, enter U-boot, and set the startup parameter in the U-boot command line:

setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=ldb,LDB-XGA, if=RGB666,bpp=16 video=mxcfb1:off video=mxcfb2:off fbmem=10Msaveenv



Among them, Video = mxcfb0: Dev = LDB, The LDB-XGA indicates that the fb0 LDB driver is used.

If = rgb666, bpp = 16 indicates 16-bit color

After setting, use printenv to view the startup parameters:



X6Q SABRELITE U-Boot > printenvbootdelay=3baudrate=115200ipaddr=192.168.1.103serverip=192.168.1.101netmask=255.255.255.0loadaddr=0x10800000rd_loadaddr=0x11000000netdev=eth0ethprime=FEC0bootcmd=booti mmc1ethact=FEC0bootargs=console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=ldb,LDB-XGA, if=RGB666,bpp=16 video=mxcfb1:off video=mxcfb2:off fbmem=10Mstdin=serialstdout=serialstderr=serialEnvironment size: 419/8188 bytesMX6Q SABRELITE U-Boot > 

Use the run bootcmd command to start the development board. Then, you can view the android startup information in the log, and the Android system is displayed normally on the screen.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.