Interfacing LCD (ILI9488) display into warpx board

877 views
Skip to first unread message

TitusRathinaraj Stalin

unread,
Sep 29, 2017, 1:11:30 PM9/29/17
to >warpx.io
Hello Experts,

Want to interface LCD display into my warpx board and referred the following warpx's LCD daughter board.

Reference LCD display : 2.5inch ERTFTM0243 LCD display.
Reference LCD controller : ILI9341
Reference driver : drivers/staging/fbtft/fb_ili9341_ERTFTM0243.c

I am interfacing the below LCD display into warpx board.

LCD controller : ILI9488
Reference LCD display : ER-TFT035-6

http://www.buydisplay.com/download/manual/ER-TFT035-6_Datasheet.pdf
http://www.buydisplay.com/default/serial-spi-3-5-inch-tft-lcd-module-in-320x480-optl-touchscreen-ili9488
http://www.buydisplay.com/download/ic/ILI9488.pdf

I have created the driver (attached) based on the ILI9488 reference code and can't see any changes on LCD display, its simply displaying 'white'

Want to know how warpx team developed the code, so that I can change the driver for my LCD.
drivers/staging/fbtft/fb_ili9341_ERTFTM0243.c
Also I have checked ILI9341 and ILI9488, looks like both are same in registers map.

Can you please tell me what could be the problem ?

&ecspi3 {

    fsl,spi-num-chipselects = <1>;
    cs-gpios = <&gpio5 13 0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_ecspi3>;
    status = "okay";

    spi2p4-display@0{
        compatible = "ilitek,ili9488_ertft035";
        reg = <0>;
        status = "okay";

        spi-max-frequency = <32000000>;
        rotate = <270>;
        bgr;
        fps = <30>;
        buswidth = <8>;
        reset-gpios = <&gpio1 17 0>;
        dc-gpios = <&gpio1 20 0>;
        debug = <0>;
    };
};


ili9488_ER-TFT035.c

TitusRathinaraj Stalin

unread,
Sep 29, 2017, 1:39:37 PM9/29/17
to >warpx.io
I have also referred the below code and it seems used the same LCD init code.
https://github.com/jaretburkett/ILI9488/blob/master/ILI9488.cpp

Here also confirmed that ILI9341 is same as ILI9488.
http://www.instructables.com/id/Arduino-and-35-Inch-320x480-TFT-LCD-ILI9488-SPI-In/

seems, linux driver is also registered as fb0 but nothing displayed. (enabled the linux logo)

usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fbtft_of_value: buswidth = 8
fbtft_of_value: debug = 0
fbtft_of_value: rotate = 270
fbtft_of_value: fps = 30
mmc1: new HS200 MMC card at address 0001
mmcblk1: mmc1:0001 N5WZMB 3.64 GiB
mmcblk1boot0: mmc1:0001 N5WZMB partition 1 2.00 MiB
mmcblk1boot1: mmc1:0001 N5WZMB partition 2 2.00 MiB
mmcblk1rpmb: mmc1:0001 N5WZMB partition 3 512 KiB
 mmcblk1: p1 p2
mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
mmc2: queuing unknown CIS tuple 0x80 (6 bytes)
mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
mmc2: new high speed SDIO card at address 0001
************* NEW:  Titus: LCD driver is initialized! ************
************* NEW:  Titus: LCD set_var is initialized! ************
************* NEW:  Titus: LCD set_gamma is initialized! ************
Console: switching to colour frame buffer device 60x40
graphics fb0: fb_ili9488 frame buffer, 480x320, 300 KiB video memory, 1
6 KiB DMA buffer memory, fps=33, spi2.0 at 32 MHz

Any help or insights for this issue ?

thanks for your help!

TitusRathinaraj Stalin

unread,
Sep 29, 2017, 1:50:13 PM9/29/17
to >warpx.io
Attached the modified code.

ili9488_ER-TFT035.c

Aaron Moore

unread,
Sep 29, 2017, 5:12:16 PM9/29/17
to >warpx.io
Hi Titus,

I took a quick look at the display init code and at quick glance I noticed that register "0xB6" had an extra parameter. 

Also can you comment on the physical interface between warp and your display? For the ILI9341 we used a simple SPI interface which limits the bandwidth. Any details on the display model and how you have it wired up would be helpful in reviewing.

On Friday, September 29, 2017 at 10:50:13 AM UTC-7, TitusRathinaraj Stalin wrote:
Attached the modified code.

TitusRathinaraj Stalin

unread,
Sep 29, 2017, 10:16:28 PM9/29/17
to >warpx.io
Thanks Aaron for your reply.

[Aaron] I took a quick look at the display init code and at quick glance I noticed that register "0xB6" had an extra parameter.

Yes, that 0xB6 register I have taken from below link and mentioned that is needed for ILI9488. And you won't find that 0xB6 register in my old attached code. (tried both), BTW, I can see the 0xB6 register in warp LCD driver fb_ili9341_ERTFTM0243.c
http://www.instructables.com/id/Arduino-and-35-Inch-320x480-TFT-LCD-ILI9488-SPI-In/

[Aaron] Also can you comment on the physical interface between warp and your display? For the ILI9341 we used a simple SPI interface which limits the bandwidth. Any details on the display model and how you have it wired up would be helpful in reviewing.

I have attached the schematics (LCD portion) of my daughter board for warp board.
My daughter board's J3 connector will attach into P1 port of warp main board.

FYI: LCD touch (FT6236) is working.

This is my dts code for SPI pinmuxing.

        pinctrl_ecspi3: ecspi3grp {
            fsl,pins = <
                MX6SL_PAD_EPDC_D10__GPIO1_IO17        0x1b0b1 // ILI9341 RESET

                MX6SL_PAD_EPDC_D13__GPIO1_IO20         0x1b0b1 // ILI9341 DC
                MX6SL_PAD_EPDC_D15__GPIO1_IO22        0x1b0b1 // ILI9341 LED_EN
                MX6SL_PAD_SD1_DAT2__GPIO5_IO13        0x1b0b1 // ILI9341 CS GPIO
                MX6SL_PAD_EPDC_D11__ECSPI3_SCLK        0x1b0b1
                MX6SL_PAD_EPDC_D8__ECSPI3_MOSI        0x1b0b1
                MX6SL_PAD_EPDC_D9__ECSPI3_MISO        0x1b0b1
            >;
        };

LCD_daughter.png

TitusRathinaraj Stalin

unread,
Oct 3, 2017, 12:29:36 AM10/3/17
to >warpx.io
Hi Aaron,
We found problem in HW and now we fixed that issue & got some display on image (3 multiples).
I have attached the current behavior on LCD display and current driver code.
Can you please check and what could be the problem ?
LCD_display.png
ili9488_SPI_Driver.c

Aaron Moore

unread,
Oct 5, 2017, 2:47:20 PM10/5/17
to >warpx.io
Hi Titus,

Ok glad that you got some image up on the screen. I think the issue now is likely how the data is being aligned to the display. Take a look at the bits per pixel. On the ILI9341, we were running as 16 bits per pixel (565) rather than a full 24 bits (888). This affects the alignment of the image data. I noticed that this is configured differently on your display:

write_reg(par, 0x3A, 0x66);

I think your display might be in 666 format (18bits) so take a look at that first.


TitusRathinaraj Stalin

unread,
Oct 6, 2017, 1:02:54 AM10/6/17
to >warpx.io
Hi Aaaron,
Thanks for your reply.
I too suspected the same since I have tried to change this 0x3A register in our warp LCD display and got this same effect, so I tried to set different pixelformat (0x77 and 0x55), but it didn't help much, and it displays simply white screen for other format options.
Any hints further ?

zir...@gmail.com

unread,
Jul 22, 2019, 1:01:40 PM7/22/19
to >warpx.io
Hi,

I am trying to hook up the same display to BBB,

My wiring is:

Breakout board JP2 <-> BBG P8
1 <-> 27 (VSYNC)
2 <-> 29 (HSYNC)
3 <-> 28 (PCLK)
4 <-> 30 (DE)

16 wires DATA to P8  LCD DATA  (I have boot iussue when the first 6 DATA is connected, so I keep untill bottup off, then I conect them)

21 RESET   GPIO_60        P9_12       RST    21       GPIO 60
23 CS      SPI0_CS0       P9_17       CS     23       GPIO 4
24 SCLK    SPI0_SCLK      P9_22       CLK    24/27wr  SPI 0 CLK  (GPIo-115
25 DC      GPIO_48        P9_15       D/C    15       GPIO 48
27 MOSI    SPI0_D1        P9_18       MOSI   27       SPI 0 D1
28 MISO    SPI0_D0        P9_21       MISO   2        SPI 0 D0
29 BL/LED  power          P9_27       LED/BL 29       GPIO 115


How did you insert the driver into the kernel.  

I tried different approeches, none worked fine:

Approach 1

sudo config-pin P9 17 spi_cs
sudo config
-pin P9_18 spi
sudo config
-pin P9_21 spi
sudo config
-pin P9_22 spi_sclk
sudo config
-pin P9_29 gpio out

sudo cp
~/fb_ili9* ./modules/4.14.108-ti-r108/kernel/drivers/staging/fbtft/
sudo depmod
-a
sudo modprobe fbtft_device custom busnum
=1 name=fb_ili9488 gpios=reset:60,dc:48,led:115 speed=16000000


Approach 2

sudo modprobe fb_ili9488
sudo modprobe fbtft_device custom busnum
=1 name=fb_ili9488 gpios=reset:60,dc:48,led:115 speed=16000000
cat
/dev/random > /dev/fb0













Reply all
Reply to author
Forward
0 new messages