RN open source component React-Native-Video usage

2023-03-16  

Feisica I.MX 6quad Android 4.2.2 LVDS screen driver transplantation

Category:Android
 
1263 Read 
Comment(0) 
Collection 
Report

directory(?)[+]

platform: FreeScale I.MX 6quad 4 nuclear development boardMCIMX6Q-SDB(without screen)

Operating system: Android 4.2.2_1

kernel: 3.0.35

display: LP101WX1-SLN2 of LG

display parameters: resolution 1280*800, 18 -bit color, 262k color, clock frequency 69.3m Hz

interface: LVDS0

The

display is connected to the development board through the LVDS0 interface. The LVDS0 interface provided by the development board is as follows:

As shown in the figure above, the LVDS0 interface has a total of 33pin, including:

1) Make Cabc_en0, brightness adjustment DSP0_Contrast

2) A set of I2C PIN6 ~ 7

3) Three sets of data cables PIN8 ~ PIN15, a group of clock line PIN17 ~ 18

4) Power, land, etc.

The hardware interface of the

display LP101WX1 is as follows:

As shown in the figure above, the LVDS interface provided by the display has a total of 40pin, including 3 sets of data cables, 1 group of clock lines, PWM feet and LED_EN feet. The connection method of it with the development board is as follows:

1) The three groups of LP101WX0 and the corresponding connection of the three groups of LP101WX0 are connected to the LVDS0 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, land

2     VCC              =>   3.3V

3     VCC      =>   3.3V

10 gnd => ground

13 gnd => ground

16 gnd => ground

19 gnd => ground

3) Connection backlight

31 gnd => ground

35 pwm => 3v3 (Backlight brightness pulse output, first connect 3V3 in the early stage, convenient for debugging)

36 LED_EN => 3V3 (backlight enable)

38    VLED     =>   5V

1. Download from FreeScale’s official website [I.MX 6Software Updates and Releases]-> [Sabre Board for Smart Devices]-> [Android 4.2jellybean]-> [Source Code for I.MX 6QUAD/DUAL] software package, that is, Android_jb4.2.2_1.0.0-Ga_Source, and then refer to Android_JB4.2.2_1.0-Source \ DOCS \ Android_user_guide.pdf to download Android-4.2_R1 source code, and the version (version 3.0.3) 2009.08), and patch android_jb4.2.2_1.0.0-Ga_source.

2, compile Android4.2.2 source code, Lunch option is [Sabresd_6DQ-ENG], generate U-Boot-6Q.BIN, Boot.img, System.img and recovery.img.

3. Modify the FB_VIDEODE-type LDB_MODEDB variable of Drivers/Video/MXC/LDB.C, and change the LDB-XGA members to::

[cpp] 
view plain
copy
  1. {  
  2.     “LDB-XGA”, 60,1280, 800, 14430,  
  3.     80, 48,  
  4.     15, 2,  
  5.     32, 47,  
  6.     0,  
  7.     FB_VMODE_NONINTERLACED,  
  8.     FB_MODE_IS_DETAILED,  
  9. },  

4. Re-compile the kernel UIMAGE, and re-generate boot.image, start the system, set the U-BOOT startup parameter:

[html] 
view plain
copy
  1. setenv bootargs console=ttymxc0,115200 init=/initvideo=mxcfb0:dev=ldb,ldb=sin0 video=mxcfb1:off video=mxcfb2:off fbmem=10Mfb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0androidboot.hardware=freescale  

5. After the system starts, the screen can be lit and output the image, but the image effect is not good, the resolution is not correct, and the display effect is as follows:

but the system output HDMI display is normal.

1. Remove the ldb = sin0 in the U-Boot startup parameter Bootargs. The default display is SIN1, and then the data cable of the screen is connected to the LVDS1 interface, the display effect is the same.

2. Modify the U-Boot startup parameter:

video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=16video=mxcfb1:off video=mxcfb2

or

video=mxcfb0:dev=ldb, bpp=16 video=mxcfb1:off video=mxcfb2

The display effect is still the same.

3. Modify the lvds_xga variable of u-boot-imx/board/freeScale/mx6q_sabresd.c, so that it is the same as the fb_videomode in Kernel’s ldb.c:

[cpp] 
view plain
copy
  1. {  
  2.     ” XGA”, 60,1280, 800, 14430,  
  3.     80, 48,  
  4.     15, 2,  
  5.     32, 47,  
  6.     0,  
  7.     FB_VMODE_NONINTERLACED,  
  8.     FB_MODE_IS_DETAILED,  
  9. },  

Compile, re-generate U-Boot-6Q.bin. After starting the system, the display effect is still the same.

4. Change the lvds_xga variable of U-Boot-IMX/BOARD/Free/MX6Q_SABRESD.C, so that the member of the name is LDB-XGA:

[cpp] 
view plain
copy
  1. {  
  2.     ” LDB-XGA”,60, 1280, 800, 14430,  
  3.     80, 48,  
  4.     15, 2,  
  5.     32, 47,  
  6.     0,  
  7.     FB_VMODE_NONINTERLACED,  
  8.     FB_MODE_IS_DETAILED,  
  9. },  

Compile, re-generate U-Boot-6Q.Bin. After starting the system, the display effect is still the same.

5. Because the color of the screen is 18 -bit, add BPP = 18 to Bootargs, and the effect has not been improved.

Because I had developed the same screen in the Sabrelite IMX 6quad development board before, and Android 4.0.4 debugged the same screen, the display effect was normal, so it was the reason for the system version. 4.0.4 Verification display effect:

1. Download IMX-Android-13.4.1.gz from freeScale’s official website, and then use the document android_user_guide.pdf to download Android-4.0.4_R1.1 source code, and Kernel (version is 3.0.35) and U. -BOOT (version is 2009.08), and patch the patch IMX-Android-13.4.1

2. Modify the FB_Videomode type LDB_MODEDB variables of Drivers/Video/MXC/LDB.C, and change the LDB-XGA members to::

[cpp] 
view plain
copy
  1. {  
  2.     “LDB-XGA”, 60,1280, 800, 14430,  
  3.     80, 48,  
  4.     15, 2,  
  5.     32, 47,  
  6.     0,  
  7.     FB_VMODE_NONINTERLACED,  
  8.     FB_MODE_IS_DETAILED,  
  9. },  

3, compile the Lunch option [SABRESD_6DQ -ng] compile system, burn the image to the SABRE-SD development board, connect the screen to the LVDS1 interface, and set the U-BOOT parameter:

[html] 
view plain
copy
  1. setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0vmalloc=400M init=/init video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=16video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000  

and then start the system.

4. After starting the system, the screen display effect is better than Android 4.2, and the screen resolution is also right. The display effect is as follows:

After hard debugging, I finally found that adding BPP = 32 to Bootargs can solve the problem. The complete BootArgs are as follows:

[plain] 
view plain
copy
  1. console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 ldb=sin0 video=mxcfb1:off video=mxcfb2:off fbmem=64M vmalloc=400M androiconsole=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32 ldb=sin0 video=mxcfb1:off video=mxcfb2:off fbmem=64M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale fb0base=0x27b00000dboot.console=ttymxc0 androidboot.hardware=freescale fb0base=0x27b00000  

After starting the system, the resolution and color are normal.

but still doubt, BPP indicates the number of pixels. The BPP of my screen is 18 and uses 3 sets of data cables. Why is it 32 -bit?

source

Related Posts

jsp: usebean, jsp: setproperty Detailed explanation

Latex Reference Form, Photos, and Formula Automatically add Table, Fig, EQU

Detailed explanation SpringBoot Schedule configuration Amelia

[Reprinted] Some controls of Android soft keyboard

RN open source component React-Native-Video usage

Random Posts

Android fast implementation file download (only 4 lines of code) laer

UE4 Packing Config file configuration

WIN32 program to activate the window of the previous startup program during startup

Mushroom Street Mushroom Street

Android Studio execute error com.android.ddmlib.adbcommandrejectException: Device Unauthorized.leo The following problems occur during the execution of the real machine.