Difference between revisions of "BananaPro/Pi:LCD Module"

From BananaPro/Pi
Jump to: navigation, search
(Enable the touche screen)
(Quick Way For Linux)
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
== Overview ==
 +
LeMaker team has designed three different size LCD modules, inlcude 3.5 inch, 5.0 inch, 7.0 inch and 10.1 inch: <br>
 +
#3.5 inch LCD module is RGB interface with 320*240 resolution (with '''ft5x_ts'''). <br />
 +
#5.0 inch LCD module is RGB interface with 800*480 resolution (with '''ft5x_ts'''). <br />
 +
#7.0 inch LCD module is LVDS interface with 1024*600 resolution (with '''ft5x_ts'''). <br />
 +
#10.1 inch LCD module is LVDS interface with 1280*800 resolution (with '''gt9xx_ts'''). <br />
 +
[[File:600px-Lcd 3.5 5.0 7.0 10.1.jpg|600px]]
  
== Description ==
+
==Preparation==
LeMaker team has designed three different size LCD modules, inlcude 3.5 inch, 5.0 inch and 7.0 inch: <br>
+
<b><big>Connect the LCD module</big></b><br>
#3.5 inch LCD module is RGB interface with 320*240 resolution. <br />
+
#5.0 inch LCD module is RGB interface with 640*480 resolution. <br />
+
#7.0 inch LCD module is LVDS interface with 1024*600 resolution. <br />
+
[[File:Lcd 3.5 5.0 7.0.jpg|600px]]
+
 
+
== Connect the LCD module ==
+
 
You need connect the LCD module into the CON2 interface on the Banana Pro/Pi board. On Banana Pro there is also a DISPLAY print near the display interface.<br />
 
You need connect the LCD module into the CON2 interface on the Banana Pro/Pi board. On Banana Pro there is also a DISPLAY print near the display interface.<br />
  
  
'''Step 1''': You should prepare one bananaPi/Pro,one LCD module and one cable.<br />
+
'''1''': You should prepare one bananaPi/Pro,one LCD module and one cable.<br />
 
[[File:Lcd connect line.jpg|600px]]
 
[[File:Lcd connect line.jpg|600px]]
  
  
'''step 2''': We use the cable to connect the LCD modulewith the bananaPi/Pro.Please notice the details,as shown below.
+
'''2''': We use the cable to connect the LCD modulewith the bananaPi/Pro.Please notice the details,as shown below.
 
{|
 
{|
 
|[[File:Lcd connect board.jpg|300px]]
 
|[[File:Lcd connect board.jpg|300px]]
Line 23: Line 24:
  
  
'''step 3''': then,you should modify the SD card which is burned with the system such as linux and android,as shown in the content(For Linux and For Android), choose different operation according to different system.<br />
+
'''3''': then,you should modify the SD card which is burned with the system such as linux and android,as shown in the content(For Linux and For Android), choose different operation according to different system.<br />
  
  
'''step 4''': You use Micro USB Power Adapter connect the Micro USB Power Input.
+
'''4''': You use Micro USB Power Adapter connect the Micro USB Power Input.
  
 
+
== Implementation ==
 
+
=== For Linux ===
== For Linux ==
+
<b>Step 1:Replace the configuration file</b> <br />
=== Replace the configuration file ===
+
 
In order to use the LCD module, you need modify the script.bin file in your OS. You can donwload the modified file for each size LCD module from LeMaker github:<br />
 
In order to use the LCD module, you need modify the script.bin file in your OS. You can donwload the modified file for each size LCD module from LeMaker github:<br />
 
https://github.com/LeMaker/fex_configuration<br />
 
https://github.com/LeMaker/fex_configuration<br />
 +
 
<source lang="bash">
 
<source lang="bash">
 
  sudo git clone https://github.com/LeMaker/fex_configuration.git
 
  sudo git clone https://github.com/LeMaker/fex_configuration.git
Line 49: Line 50:
 
</source>
 
</source>
  
You will see 6 bin files, 3 for Banana Pro and 3 for Banana Pi. On Banana Pro, you need use the files named banana_pro_<span style="color:red">X</span>lcd.bin. On Banana Pi, you need use the files named banana_pi_<span style="color:red">X</span>lcd.bin.(<span style="color:red">X</span> should be 35, 5 or 7, choose the right file according to what size LCD you use)
+
You will see 7 bin files, 4 for Banana Pro and 3 for Banana Pi. On Banana Pro, you need use the files named banana_pro_<span style="color:red">X</span>lcd.bin. On Banana Pi, you need use the files named banana_pi_<span style="color:red">X</span>lcd.bin.(<span style="color:red">X</span> should be 35, 5, 7 or 10.1 choose the right file according to what size LCD you use)
 
Rename the corresponded bin file that you use to script.bin, and replace the new script.bin file with the old on in your OS.<br />
 
Rename the corresponded bin file that you use to script.bin, and replace the new script.bin file with the old on in your OS.<br />
 
The script.bin file is located at the first partition of your SD card with OS.
 
The script.bin file is located at the first partition of your SD card with OS.
 +
 +
'''You also can download the script.bin files from [http://mirror.lemaker.org/pro_script.bin.zip http://mirror.lemaker.org/pro_script.bin.zip]'''<br />
  
 
Then replace the script.bin file with the one for X inch lcd:
 
Then replace the script.bin file with the one for X inch lcd:
 
<source lang="bash">
 
<source lang="bash">
  sudo mount /dev/mmcblk0pl /mnt
+
  sudo mount /dev/mmcblk0p1 /mnt
  sudo cp banana_pro_Xld.bin /mnt/script.bin
+
  sudo cp banana_pro_Xlcd.bin /mnt/script.bin
 
  sync
 
  sync
 
  sudo umount /mnt
 
  sudo umount /mnt
 
</source>
 
</source>
 +
note this commond:sudo cp banana_pro_<span style="color:red">X</span>ld.bin /mnt/script.bin
  
=== Enable the touche screen ===
+
Then reboot the system.
 +
 
 +
<b>Step 2:Enable the touche screen</b> <br />
 
To use the touche screen, we need load the touch screen driver:
 
To use the touche screen, we need load the touch screen driver:
 +
 +
'''For 3.5, 5.0, 7.0 inch LCD screen:'''<br />
 
<source lang="bash">
 
<source lang="bash">
 
  sudo modprobe ft5x_ts
 
  sudo modprobe ft5x_ts
Line 69: Line 77:
 
So you should edit the '''/etc/modules''' file,and add the content below into the file:
 
So you should edit the '''/etc/modules''' file,and add the content below into the file:
 
<source lang="bash">
 
<source lang="bash">
  sudo vi ft5x_ts
+
  ft5x_ts
 
</source>
 
</source>
You can use the touch screen when we restart our BananaPi/Pro everytime.
 
  
== For Android ==
+
'''For 10 inch LCD screen:'''(Screen type: BL101-LVDS-001)<br />
 +
The Linux OS images that you can download from [http://www.lemaker.org/product-bananapro-resource.html Banana Pro Resource] don't support 10.1 inch TP. We should replace the '''uImage'''and '''driver modules''' files.
 +
 
 +
 
 +
'''Step 1''': Refer to [http://www.lemaker.org/product-bananapro-guide.html Banana Pro Quick Start Guide] to install Linux OS image.<br />
 +
 
 +
 
 +
'''Step 2''': Refer to http://wiki.lemaker.org/BananaPro/Pi:Building_u-boot,_script.bin_and_linux-kernel to obtian and compile Banana Pro BSP.<br />
 +
You also can download platform firmware package from http://mirror.lemaker.org/BananaPro_hwpack_LCD10.1.tar.xz to obtian the '''uImage''' and '''dirver modules'''.
 +
 
 +
 
 +
'''Step 3''': Replace kernel image and driver modules.<br />
 +
After compiled the Banana Pro BSP or downloaded BananaPro_hwpack_LCD10.1.tar.xz, and then extract the platform firmware package:<br />
 +
<source lang="bash">
 +
tar -Jxvf BananaPro_hwpack.tar.xz
 +
ls
 +
bootloader  kernel  rootfs
 +
</source>
 +
 
 +
Copy '''kernel/uImage''' to replace the uImage files in the MicroSD card.<br />
 +
 
 +
Copy '''rootfs/lib/modules''' to replace the dirver files in ''/lib/modules'' in the MicroSD card.<br />
 +
 
 +
 
 +
'''Step 4''':  Replace script.bin files <br />
 +
We use the '''banana_pro_10.1lcd.bin ''' to replace the script.bin files in MicroSD card.<br />
 +
 
 +
 
 +
'''Step 5''': Reboot system, and then load touchscreen module dirver:
 +
<source lang="bash">
 +
sudo modprobe gt9xx_ts
 +
</source>
 +
 
 +
If you want to use the touch screen when restart BananaPi/Pro everytime, we should edit the '''/etc/modules''' file,and add the content below into the file:
 +
gt9xx_ts
 +
 
 +
=== For Android ===
 
To make lcd work under android, we need use the tool DragonFace to edit the Android image. First please download the latest Android image for Banana Pro or Banana Pi, and then load the Android image into the DragonFace. The method to load the Android image into the DrangonFace and edit the image special files can refer to:  
 
To make lcd work under android, we need use the tool DragonFace to edit the Android image. First please download the latest Android image for Banana Pro or Banana Pi, and then load the Android image into the DragonFace. The method to load the Android image into the DrangonFace and edit the image special files can refer to:  
[http://forum.lemaker.org/thread-1332-1-7-how_to_modify_android_image.html How to modify Android image].
+
[http://forum.lemaker.org/thread-1332-1-7-how_to_modify_android_image.html How to modify Android image].<br>
=== Modify System Configuration file ===
+
<b><big>Step 1:Modify System Configuration file</big></b><br>
 
Click the Advanced Settings -> System Configuration file, and you can edit the fex system configuration file. <br />
 
Click the Advanced Settings -> System Configuration file, and you can edit the fex system configuration file. <br />
 
In [disp_init] section, the four parameters below need to to be shown like that below, others can be the same:  
 
In [disp_init] section, the four parameters below need to to be shown like that below, others can be the same:  
Line 97: Line 140:
 
</source>
 
</source>
 
<br /><br />
 
<br /><br />
In [lcd0_para], please ensure it is shown like below:<br />
+
In <b>[lcd0_para]</b>, please ensure it is shown like below:<br />
'''For 7inch parameters:'''
+
'''1.For 7inch parameters:'''
 
<source lang="bash">  
 
<source lang="bash">  
 
[lcd0_para]
 
[lcd0_para]
Line 173: Line 216:
 
</source>  
 
</source>  
  
'''For 5inch LCD:'''
+
'''2.For 5inch LCD:'''
 
<source lang="bash">
 
<source lang="bash">
 
[lcd0_para]
 
[lcd0_para]
Line 243: Line 286:
 
lcdvsync = port:PD27<2><0><3><default>
 
lcdvsync = port:PD27<2><0><3><default>
 
</source>
 
</source>
'''For 3.5inch LCD:'''
+
'''3.For 3.5inch LCD:'''
 
<source lang="bash">
 
<source lang="bash">
 
[lcd0_para]
 
[lcd0_para]
Line 314: Line 357:
 
</source>
 
</source>
 
<br /><br />
 
<br /><br />
In [ctp_para] section: <br />
+
In <b>[ctp_para]</b> section: <br />
'''For 7inch LCD touch screen:'''
+
'''1.For 7inch LCD touch screen:'''
 
<source lang="bash">
 
<source lang="bash">
 
[ctp_para]
 
[ctp_para]
Line 331: Line 374:
 
ctp_io_port            = port:PH09<0><default><default><default>
 
ctp_io_port            = port:PH09<0><default><default><default>
 
</source>  
 
</source>  
'''For 5inch LCD touch screen:'''
+
'''2.For 5inch LCD touch screen:'''
 
<source lang="bash">
 
<source lang="bash">
 
[ctp_para]
 
[ctp_para]
Line 347: Line 390:
 
ctp_io_port            = port:PH09<0><default><default><default>
 
ctp_io_port            = port:PH09<0><default><default><default>
 
</source>
 
</source>
'''For 3.5inch LCD touch screen:'''
+
'''3.For 3.5inch LCD touch screen:'''
 
<source lang="bash">
 
<source lang="bash">
 
[ctp_para]
 
[ctp_para]
Line 366: Line 409:
 
</source>
 
</source>
 
<br /><br />
 
<br /><br />
In [ctp_list_para] section:
+
In <b>[ctp_list_para]</b> section:
 
<source lang="bash">
 
<source lang="bash">
 
[ctp_list_para]
 
[ctp_list_para]
Line 377: Line 420:
 
</source>
 
</source>
  
=== Modify the init.sun7i.rc ===
+
<b>Step 3:Modify the init.sun7i.rc</b><br>
 
Please make sure that the lines below are shown:
 
Please make sure that the lines below are shown:
 
<source lang="bash">
 
<source lang="bash">
Line 385: Line 428:
 
</source>
 
</source>
  
=== Save ===
+
 
 +
 
 +
<b>Step 4:Save</b><br>
 
After modified the necessary parameters, please <span style="color:red">'''save and exit'''</span>. If you do not save the modification, it will not take effect. When you click the save button, it will tell you save it as a new image file.
 
After modified the necessary parameters, please <span style="color:red">'''save and exit'''</span>. If you do not save the modification, it will not take effect. When you click the save button, it will tell you save it as a new image file.
 +
 +
  
 
=== Attention ===
 
=== Attention ===
 
When you use LCD under Android, you need disconnect the HDMI with Banana Pro/Pi.
 
When you use LCD under Android, you need disconnect the HDMI with Banana Pro/Pi.
  
== External Link ==
+
=== Quick Way for Linux ===
 +
<b>Step 1:Replace the configuration file</b> <br />
 +
In order to use the LCD module, you need modify the script.bin file in your OS. You can donwload the modified file for each size LCD module from LeMaker github:<br />
 +
https://github.com/LeMaker/fex_configuration<br />
 +
Enter into the ''fex_configuration'':<br>
 +
You will find two directories, bin and fex. In the bin directories there are compiled bin files that you can use it directly.<br>
 +
Enter the bin directory:<br>
 +
 
 +
'''You also can download the script.bin files from [http://mirror.lemaker.org/pro_script.bin.zip http://mirror.lemaker.org/pro_script.bin.zip]'''
 +
 
 +
<b>Step 2:The banna_pro_xlcd.bin name to script.bin.</b> <br />
 +
Use the  bananapro memory card into the computer after the bannapro need banana_pro_xlcd.bin file into the the  bananapro memory card,then you can change the banana_pro_xlcd.bin to the script.bin. For example, if you want the banana_pro_5lcd.bin  to drive the LCD screen, as long as you put the banana_pro_5lcd.bin.bin into your memory card, and change the banana_pro_5lcd.bin to the script.bin, then inserted the memory card bananapro demoboard start again<br>
 +
Note:change the banana_pro_5lcd.bin to the script.bin<br>
 +
 
 +
== See Also ==
 
Youtube video for Camera module: [https://www.youtube.com/watch?v=lGEAjXEIJ9Q&list=UUbiGcwDWZjz05njNPrJU7jA ExplainingComputers]
 
Youtube video for Camera module: [https://www.youtube.com/watch?v=lGEAjXEIJ9Q&list=UUbiGcwDWZjz05njNPrJU7jA ExplainingComputers]
 +
 +
[[Category:Display]]

Latest revision as of 09:30, 25 May 2016

Overview

LeMaker team has designed three different size LCD modules, inlcude 3.5 inch, 5.0 inch, 7.0 inch and 10.1 inch:

  1. 3.5 inch LCD module is RGB interface with 320*240 resolution (with ft5x_ts).
  2. 5.0 inch LCD module is RGB interface with 800*480 resolution (with ft5x_ts).
  3. 7.0 inch LCD module is LVDS interface with 1024*600 resolution (with ft5x_ts).
  4. 10.1 inch LCD module is LVDS interface with 1280*800 resolution (with gt9xx_ts).

600px-Lcd 3.5 5.0 7.0 10.1.jpg

Preparation

Connect the LCD module
You need connect the LCD module into the CON2 interface on the Banana Pro/Pi board. On Banana Pro there is also a DISPLAY print near the display interface.


1: You should prepare one bananaPi/Pro,one LCD module and one cable.
Lcd connect line.jpg


2: We use the cable to connect the LCD modulewith the bananaPi/Pro.Please notice the details,as shown below.

Lcd connect board.jpg Lcd connect module.jpg

The ends of the cable connect bananaPi/Pro and LCD module,silver bars which is at the ends of the cable should insert pins(Display interface) uniformly.Picture one show that silver bars face the bananaPi/Pro icon,Picture two show that silver bars face the back of the LCD module .


3: then,you should modify the SD card which is burned with the system such as linux and android,as shown in the content(For Linux and For Android), choose different operation according to different system.


4: You use Micro USB Power Adapter connect the Micro USB Power Input.

Implementation

For Linux

Step 1:Replace the configuration file
In order to use the LCD module, you need modify the script.bin file in your OS. You can donwload the modified file for each size LCD module from LeMaker github:
https://github.com/LeMaker/fex_configuration

 sudo git clone https://github.com/LeMaker/fex_configuration.git

Enter into the fex_configuration:

 cd fex_configuration

You will find two directories, bin and fex. In the bin directories there are compiled bin files that you can use it directly.
Enter the bin directory:

 cd bin

You will see 7 bin files, 4 for Banana Pro and 3 for Banana Pi. On Banana Pro, you need use the files named banana_pro_Xlcd.bin. On Banana Pi, you need use the files named banana_pi_Xlcd.bin.(X should be 35, 5, 7 or 10.1 choose the right file according to what size LCD you use) Rename the corresponded bin file that you use to script.bin, and replace the new script.bin file with the old on in your OS.
The script.bin file is located at the first partition of your SD card with OS.

You also can download the script.bin files from http://mirror.lemaker.org/pro_script.bin.zip

Then replace the script.bin file with the one for X inch lcd:

 sudo mount /dev/mmcblk0p1 /mnt
 sudo cp banana_pro_Xlcd.bin /mnt/script.bin
 sync
 sudo umount /mnt

note this commond:sudo cp banana_pro_Xld.bin /mnt/script.bin

Then reboot the system.

Step 2:Enable the touche screen
To use the touche screen, we need load the touch screen driver:

For 3.5, 5.0, 7.0 inch LCD screen:

 sudo modprobe ft5x_ts

So you should edit the /etc/modules file,and add the content below into the file:

 ft5x_ts

For 10 inch LCD screen:(Screen type: BL101-LVDS-001)
The Linux OS images that you can download from Banana Pro Resource don't support 10.1 inch TP. We should replace the uImageand driver modules files.


Step 1: Refer to Banana Pro Quick Start Guide to install Linux OS image.


Step 2: Refer to http://wiki.lemaker.org/BananaPro/Pi:Building_u-boot,_script.bin_and_linux-kernel to obtian and compile Banana Pro BSP.
You also can download platform firmware package from http://mirror.lemaker.org/BananaPro_hwpack_LCD10.1.tar.xz to obtian the uImage and dirver modules.


Step 3: Replace kernel image and driver modules.
After compiled the Banana Pro BSP or downloaded BananaPro_hwpack_LCD10.1.tar.xz, and then extract the platform firmware package:

tar -Jxvf BananaPro_hwpack.tar.xz 
ls
bootloader  kernel  rootfs

Copy kernel/uImage to replace the uImage files in the MicroSD card.

Copy rootfs/lib/modules to replace the dirver files in /lib/modules in the MicroSD card.


Step 4: Replace script.bin files
We use the banana_pro_10.1lcd.bin to replace the script.bin files in MicroSD card.


Step 5: Reboot system, and then load touchscreen module dirver:

sudo modprobe gt9xx_ts

If you want to use the touch screen when restart BananaPi/Pro everytime, we should edit the /etc/modules file,and add the content below into the file:

gt9xx_ts

For Android

To make lcd work under android, we need use the tool DragonFace to edit the Android image. First please download the latest Android image for Banana Pro or Banana Pi, and then load the Android image into the DragonFace. The method to load the Android image into the DrangonFace and edit the image special files can refer to: How to modify Android image.
Step 1:Modify System Configuration file
Click the Advanced Settings -> System Configuration file, and you can edit the fex system configuration file.
In [disp_init] section, the four parameters below need to to be shown like that below, others can be the same:

disp_init_enable        = 1
disp_mode               = 0
 
screen0_output_type     = 1
screen0_output_mode     = 5
 
screen1_output_type     = 3
screen1_output_mode     = 4



In [audio_para] section:

[audio_para]
audio_used          = 1
audio_pa_ctrl        = port:PH26<1><default><default><0>



In [lcd0_para], please ensure it is shown like below:
1.For 7inch parameters:

 
[lcd0_para]
lcd_used                = 1
 
lcd_x                   = 1024
lcd_y                   = 600
lcd_width               = 155
lcd_height              = 86
lcd_dclk_freq           = 55
lcd_pwm_not_used        = 0
lcd_pwm_ch              = 0
lcd_pwm_freq            = 22000
lcd_pwm_pol             = 1
lcd_if                  = 3
lcd_hbp                 = 150
lcd_ht                  = 1344
lcd_vbp                 = 20
lcd_vt                  = 1270
lcd_vspw                = 10
lcd_hspw                = 50
lcd_hv_if               = 0
lcd_hv_smode            = 0
lcd_hv_s888_if          = 0
lcd_hv_syuv_if          = 0
lcd_lvds_ch             = 0
lcd_lvds_mode           = 0
lcd_lvds_bitwidth       = 0
lcd_lvds_io_cross       = 0
lcd_cpu_if              = 0
lcd_frm                 = 0
lcd_io_cfg0             = 0x00000000
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0         = 0x00000000
lcd_gamma_tbl_1         = 0x00010101
lcd_gamma_tbl_255       = 0x00ffffff
 
lcd_bl_en_used          = 1
lcd_bl_en               = port:PH08<1><0><default><1>
 
lcd_power_used          = 1
lcd_power               = port:PH12<1><0><default><1>
lcd_pwm_used            = 1
lcd_pwm                 = port:PB02<2><0><default><default>
 
lcdd0                   = port:PD00<3><0><default><default>
lcdd1                   = port:PD01<3><0><default><default>
lcdd2                   = port:PD02<3><0><default><default>
lcdd3                   = port:PD03<3><0><default><default>
lcdd4                   = port:PD04<3><0><default><default>
lcdd5                   = port:PD05<3><0><default><default>
lcdd6                   = port:PD06<3><0><default><default>
lcdd7                   = port:PD07<3><0><default><default>
lcdd8                   = port:PD08<3><0><default><default>
lcdd9                   = port:PD09<3><0><default><default>
lcdd10                  = port:PD10<2><0><default><default>
lcdd11                  = port:PD11<2><0><default><default>
lcdd12                  = port:PD12<2><0><default><default>
lcdd13                  = port:PD13<2><0><default><default>
lcdd14                  = port:PD14<2><0><default><default>
lcdd15                  = port:PD15<2><0><default><default>
lcdd16                  = port:PD16<2><0><default><default>
lcdd17                  = port:PD17<2><0><default><default>
lcdd18                  = port:PD18<2><0><default><default>
lcdd19                  = port:PD19<2><0><default><default>
lcdd20                  = port:PD20<2><0><default><default>
lcdd21                  = port:PD21<2><0><default><default>
lcdd22                  = port:PD22<2><0><default><default>
lcdd23                  = port:PD23<2><0><default><default>
lcdclk                  = port:PD24<2><0><default><default>
lcdde                   = port:PD25<2><0><default><default>
lcdhsync                = port:PD26<2><0><default><default>
lcdvsync                = port:PD27<2><0><default><default>

2.For 5inch LCD:

[lcd0_para]
lcd_used = 1
lcd_x = 800
lcd_y = 480
lcd_dclk_freq = 30
lcd_pwm_not_used = 0
lcd_pwm_ch = 0
lcd_pwm_freq = 22000
lcd_pwm_pol = 0
lcd_max_bright = 240
lcd_min_bright = 64
lcd_if = 0
lcd_hbp = 88
lcd_ht = 928
lcd_vbp = 32
lcd_vt = 1050
lcd_vspw = 3
lcd_hspw = 48
lcd_hv_if = 0
lcd_hv_smode = 0
lcd_hv_s888_if = 0
lcd_hv_syuv_if = 0
lcd_lvds_ch = 0
lcd_lvds_mode = 0
lcd_lvds_bitwidth = 0
lcd_lvds_io_cross = 0
lcd_cpu_if = 0
lcd_frm = 0
lcd_io_cfg0 = 268435456
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0 = 0x0
lcd_gamma_tbl_1 = 0x10101
lcd_gamma_tbl_255 = 0xffffff
lcd_bl_en_used = 1
lcd_bl_en = port:PH08<1><0><default><1>
lcd_power_used = 1
lcd_power = port:PH12<1><0><default><1>
lcd_pwm_used = 1
lcd_pwm = port:PB02<2><0><default><default>
lcdd0 = port:PD00<2><0><3><default>
lcdd1 = port:PD01<2><0><3><default>
lcdd2 = port:PD02<2><0><3><default>
lcdd3 = port:PD03<2><0><3><default>
lcdd4 = port:PD04<2><0><3><default>
lcdd5 = port:PD05<2><0><3><default>
lcdd6 = port:PD06<2><0><3><default>
lcdd7 = port:PD07<2><0><3><default>
lcdd8 = port:PD08<2><0><3><default>
lcdd9 = port:PD09<2><0><3><default>
lcdd10 = port:PD10<2><0><3><default>
lcdd11 = port:PD11<2><0><3><default>
lcdd12 = port:PD12<2><0><3><default>
lcdd13 = port:PD13<2><0><3><default>
lcdd14 = port:PD14<2><0><3><default>
lcdd15 = port:PD15<2><0><3><default>
lcdd16 = port:PD16<2><0><3><default>
lcdd17 = port:PD17<2><0><3><default>
lcdd18 = port:PD18<2><0><3><default>
lcdd19 = port:PD19<2><0><3><default>
lcdd20 = port:PD20<2><0><3><default>
lcdd21 = port:PD21<2><0><3><default>
lcdd22 = port:PD22<2><0><3><default>
lcdd23 = port:PD23<2><0><3><default>
lcdclk = port:PD24<2><0><3><default>
lcdde = port:PD25<2><0><3><default>
lcdhsync = port:PD26<2><0><3><default>
lcdvsync = port:PD27<2><0><3><default>

3.For 3.5inch LCD:

[lcd0_para]
lcd_used = 1
lcd_x = 320
lcd_y = 240
lcd_dclk_freq = 7
lcd_pwm_not_used = 0
lcd_pwm_ch = 0
lcd_pwm_freq = 22000
lcd_pwm_pol = 0
lcd_max_bright = 240
lcd_min_bright = 64
lcd_if = 0
lcd_hbp = 68
lcd_ht = 408
lcd_vbp = 18
lcd_vt = 524
lcd_vspw = 3
lcd_hspw = 30
lcd_hv_if = 0
lcd_hv_smode = 0
lcd_hv_s888_if = 0
lcd_hv_syuv_if = 0
lcd_lvds_ch = 0
lcd_lvds_mode = 0
lcd_lvds_bitwidth = 0
lcd_lvds_io_cross = 0
lcd_cpu_if = 0
lcd_frm = 0
lcd_io_cfg0 = 268435456
lcd_gamma_correction_en = 0
lcd_gamma_tbl_0 = 0x0
lcd_gamma_tbl_1 = 0x10101
lcd_gamma_tbl_255 = 0xffffff
lcd_bl_en_used = 1
lcd_bl_en = port:PH08<1><0><default><1>
lcd_power_used = 1
lcd_power = port:PH12<1><0><default><1>
lcd_pwm_used = 1
lcd_pwm = port:PB02<2><0><default><default>
lcdd0 = port:PD00<2><0><3><default>
lcdd1 = port:PD01<2><0><3><default>
lcdd2 = port:PD02<2><0><3><default>
lcdd3 = port:PD03<2><0><3><default>
lcdd4 = port:PD04<2><0><3><default>
lcdd5 = port:PD05<2><0><3><default>
lcdd6 = port:PD06<2><0><3><default>
lcdd7 = port:PD07<2><0><3><default>
lcdd8 = port:PD08<2><0><3><default>
lcdd9 = port:PD09<2><0><3><default>
lcdd10 = port:PD10<2><0><3><default>
lcdd11 = port:PD11<2><0><3><default>
lcdd12 = port:PD12<2><0><3><default>
lcdd13 = port:PD13<2><0><3><default>
lcdd14 = port:PD14<2><0><3><default>
lcdd15 = port:PD15<2><0><3><default>
lcdd16 = port:PD16<2><0><3><default>
lcdd17 = port:PD17<2><0><3><default>
lcdd18 = port:PD18<2><0><3><default>
lcdd19 = port:PD19<2><0><3><default>
lcdd20 = port:PD20<2><0><3><default>
lcdd21 = port:PD21<2><0><3><default>
lcdd22 = port:PD22<2><0><3><default>
lcdd23 = port:PD23<2><0><3><default>
lcdclk = port:PD24<2><0><3><default>
lcdde = port:PD25<1><0><3><0>
lcdhsync = port:PD26<2><0><3><default>
lcdvsync = port:PD27<2><0><3><default>



In [ctp_para] section:
1.For 7inch LCD touch screen:

[ctp_para]
ctp_used                = 1
ctp_twi_id              = 3
ctp_twi_name            = "ft5x_ts"
ctp_screen_max_x        = 1024
ctp_screen_max_y        = 600
ctp_revert_x_flag       = 0
ctp_revert_y_flag       = 0
ctp_exchange_x_y_flag   = 0
 
ctp_int_port            = port:PH09<6><default><default><default>
ctp_wakeup              = port:PH07<1><default><default><1>
ctp_io_port             = port:PH09<0><default><default><default>

2.For 5inch LCD touch screen:

[ctp_para]
ctp_used                = 1
ctp_twi_id              = 3
ctp_twi_name            = "ft5x_ts"
ctp_screen_max_x        = 800
ctp_screen_max_y        = 480
ctp_revert_x_flag       = 0
ctp_revert_y_flag       = 0
ctp_exchange_x_y_flag   = 0
 
ctp_int_port            = port:PH09<6><default><default><default>
ctp_wakeup              = port:PH07<1><default><default><1>
ctp_io_port             = port:PH09<0><default><default><default>

3.For 3.5inch LCD touch screen:

[ctp_para]
[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 3
ctp_twi_addr = 0x38
ctp_screen_max_x = 320
ctp_screen_max_y = 240
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_exchange_x_y_flag = 0
ctp_firm = 1
ctp_int_port = port:PH09<6><default><default><default>
ctp_wakeup = port:PH07<1><default><default><1>
ctp_io_port = port:PH09<0><default><default><default>



In [ctp_list_para] section:

[ctp_list_para]
ctp_det_used              = 1
ft5x_ts                   = 1
gt82x                     = 0
gslX680                   = 0
gt9xx_ts                  = 0
gt811                     = 0

Step 3:Modify the init.sun7i.rc
Please make sure that the lines below are shown:

#ctp module
    insmod /system/vendor/modules/sw_device.ko
    #insmod /system/vendor/modules/ft5x_ts.ko


Step 4:Save
After modified the necessary parameters, please save and exit. If you do not save the modification, it will not take effect. When you click the save button, it will tell you save it as a new image file.


Attention

When you use LCD under Android, you need disconnect the HDMI with Banana Pro/Pi.

Quick Way for Linux

Step 1:Replace the configuration file
In order to use the LCD module, you need modify the script.bin file in your OS. You can donwload the modified file for each size LCD module from LeMaker github:
https://github.com/LeMaker/fex_configuration
Enter into the fex_configuration:
You will find two directories, bin and fex. In the bin directories there are compiled bin files that you can use it directly.
Enter the bin directory:

You also can download the script.bin files from http://mirror.lemaker.org/pro_script.bin.zip

Step 2:The banna_pro_xlcd.bin name to script.bin.
Use the bananapro memory card into the computer after the bannapro need banana_pro_xlcd.bin file into the the bananapro memory card,then you can change the banana_pro_xlcd.bin to the script.bin. For example, if you want the banana_pro_5lcd.bin to drive the LCD screen, as long as you put the banana_pro_5lcd.bin.bin into your memory card, and change the banana_pro_5lcd.bin to the script.bin, then inserted the memory card bananapro demoboard start again
Note:change the banana_pro_5lcd.bin to the script.bin

See Also

Youtube video for Camera module: ExplainingComputers