Jump to content

BananaPro, LeMaker 5in LCD, legacy kernel


zgoda_j

Recommended Posts

I can't get the LeMaker 5in LCD working with Armbian 5.04 legacy on LeMaker BananaPro.

 

First things first:

# uname -a
Linux bpi2 3.4.110-sun7i #12 SMP PREEMPT Tue Mar 1 08:39:29 CET 2016 armv7l GNU/Linux

# lsmod
Module                  Size  Used by
cpufreq_userspace       3524  0 
ft5x_ts                44223  0 
spidev                  6366  0 
ap6211                624553  0 
a20_tp                  3365  0 
8021q                  18593  0 
garp                    6072  1 8021q
stp                     2032  1 garp
llc                     5365  2 stp,garp

# dmesg
[    6.514195] ===========================ft5x_ts_init=====================
[    6.520934] ctp_fetch_sysconfig_para. 
[    6.532065] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe 
[    6.537112] ctp_fetch_sysconfig_para: ctp_twi_id is 3. 
[    6.541967] ctp_fetch_sysconfig_para: screen_max_x = 800. 
[    6.546531] ctp_fetch_sysconfig_para: screen_max_y = 480. 
[    6.552880] ctp_fetch_sysconfig_para: revert_x_flag = 0. 
[    6.566612] ctp_fetch_sysconfig_para: revert_y_flag = 0. 
[    6.571358] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0. 
[    6.579969] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe 
[    6.586732] ctp_init_platform_resource: tp_reset request gpio fail!
[    6.594998] ctp_init_platform_resource: No power port feature present.
[    6.596927] ctp_wakeup. 
[    6.823015] incomplete xfer (0x20)
[    6.825422] incomplete xfer (0x20)
[    6.828058] incomplete xfer (0x20)
[    6.834665] ctp_detect: Detected chip ft5x_ts at adapter 3, address 0x38
[    6.839067] ====ft5x_ts_probe begin=====.  
[    6.847424] input: ft5x_ts as /devices/platform/sunxi-i2c.3/i2c-3/3-0038/input/input1
[    6.852247] ctp_set_irq_mode: config gpio to int mode. 
[    6.866367] ctp_set_irq_mode, 225: gpio_int_info, port = 8, port_num = 9. 
[    6.868298]  INTERRUPT CONFIG
[    6.886136] ==ft5x_ts_probe over =

Fex configuration (taken directly from LeMaker GitHub repo):

[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 3
ctp_twi_addr = 0x38
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_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>

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

The display is powered (power led is on) but looks uninitialized, nothing is displayed. Framebuffer devices are present:

# ls -la /dev | grep fb
crw-rw----  1 root video    29,   0 Mar 15 15:40 fb0
crw-rw----  1 root video    29,   1 Mar 15 15:40 fb1

Am I missing something? Following LeMaker wiki, proper fex and ft5x_ts should be everything to get this LCD working.

Link to comment
Share on other sites

screen0_output_type = 1

screen1_output_type = 2

 

This looks good. Maybe there's something wrong with the kernel command line (/boot/boot.cmd) or the reason is we use a different u-boot? I doubt any of the devs has this LCD (or any of them -- at least I consider them heavily overpriced and use HDMI LCDs instead) and can help. But in case you might provide the contents of uEnv.txt and the u-boot version used with a LeMaker image where the LCD works (you tested that already, right?) anyone might have an idea (or at least googling might be easier whether this is a more general problem)

Link to comment
Share on other sites

On working instance (it's Arch from LeMaker download section):

# cat /boot/uEnv.txt 
aload_script=fatload $device $partition 0x43000000 /script.bin;
aload_kernel=fatload $device $partition 0x48000000 /uImage;bootm 0x48000000
uenvcmd=run aload_script aload_kernel
bootargs=console=ttyS0,115200 consoleblank=0 console=tty0 disp.screen0_output_mode=1920x1080p60:EDID hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet loglevel=3

I don't know how to get uBoot version from within the running linux system, I don't have access to UBOOT button to trigger FEL mode (sbc is enclosed in the case I can't disassemble). I doubt ODM has changed anything there so most probably this is stock LeMaker.

Link to comment
Share on other sites

I don't know how to get uBoot version from within the running linux system

 

Just dump the first sectors through strings and search for 'u-boot':

dd if=/dev/mmcblk0 bs=256K count=1 | strings | grep -i u-boot

Have you had a look into the script.bin used there? Maybe it's setting 'screen1_output_type = 1'?

Link to comment
Share on other sites

Legacy kernel based Armbian is working with 7"LCD from lemaker - you only need to exchange FEX and load the module ... i think 5 and 7 shares same one.

 

Try with removing module: a20_tp

Link to comment
Share on other sites

$ lsmod
Module                  Size  Used by
cpufreq_userspace       3524  0 
spidev                  6366  0 
ft5x_ts                44223  0 
ap6211                624553  0

But I still see nothing on LCD.

 

The difference between 7in and 5in is that 7in is LVDS and 5in is RGB but it's purely internal. I see no changes in display related sections in FEX config and boot args between my working device and the one I'm trying to set up.

 

I'm going to give Bananian a try, maybe this way I get any working configuration. I see LeMaker site has 15.04, will try both 15.04 and 15.08.

Link to comment
Share on other sites

With Bananian 15.08 and procedure from LeMaker wiki I got 5in LCD working, FEX changes is all that is required to have working display (without touch feature, of course). I took the whole sections from https://github.com/LeMaker/fex_configuration/blob/master/fex/banana_pro_5lcd.fex- ctp_para, ctp_list_para, disp_init and lcd0_para. Will debug more later on.

Link to comment
Share on other sites

Currently: U-Boot SPL 2015.10 (Dec 21 2015 - 09:41:49) and it works. It was working with 2015.07 as well.

Well, maybe downgrading u-boot helps with Armbian then? In case you want to try it out (untested, backup from whole card recommended): http://kaiser-edv.de/tmp/4U4tkD/linux-u-boot-bananapipro_5.06_armhf.deb

 

EDIT: Tested and works:

 

 

 

U-Boot SPL 2015.10-armbian (Mar 17 2016 - 14:46:47)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2


U-Boot 2015.10-armbian (Mar 17 2016 - 14:46:47 +0100) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
Card did not respond to voltage select!
*** Warning - MMC init failed, using default environment

Setting up a 720x576i composite-pal console (overscan 32x20)
In:    serial
Out:   vga
Err:   vga
SCSI:  SUNXI SCSI INIT
SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst 
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0 
(FEL boot)
## Executing script at 43100000
Kernel image @ 0x42000000 [ 0x000000 - 0x55d9e0 ]

Starting kernel ...

 

 

Link to comment
Share on other sites

I'm sorry guys, I had one wrong value in FEX in lcd0_para section, lcd_if = 8 (should read 0). I don't know what I was thinking about. Now everything works OK, including touch interface with ft5x_ts. Thank you for your support. :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines