Posts: 3
Joined: Sat Sep 02, 2017 11:35 am

ILI9488 4 Wire SPI display interface driver is not working

Tue Mar 13, 2018 9:25 am


I am currently working on power up TianMa TM035NDH07 (ili9488 driver) display thru the Raspberry Pi CM3 hardware. The hardware itself should not have issue since i have use the same hardware to power on the Adafruit display ( ) successfully. I take from the website,, as reference to create the ili9488 driver. The hardware connection is using: 4-lines SPI and the display data is driving thru the SPI interface as well. i have checked the initialization waveform and i do not think there is any issue there (please see the waveform signal below). For the reset signal, i connect to permanent pull high.
ili9488_init_waveform_sizereduction.jpg (106.27 KiB) Viewed 346 times
After all the above test, the display still cannot display any image.
The ili9488 driver:
------------------------------------START OF ILI9488 DRIVER---------------------------------------
• FB driver for the ILI9488 LCD display controller

• This display uses 9-bit SPI: Data/Command bit + 8 data bits
• For platforms that doesn't support 9-bit, the driver is capable
• of emulating this using 8-bit transfer.
• This is done by transferring eight 9-bit words in 9 bytes.

• Copyright (C) 2013 Christian Vogelgsang
• Based on adafruit22fb.c by Noralf Tronnes

• This program is free software; you can redistribute it and/or modify
• it under the terms of the GNU General Public License as published by
• the Free Software Foundation; either version 2 of the License, or
• (at your option) any later version.

• This program is distributed in the hope that it will be useful,
• but WITHOUT ANY WARRANTY; without even the implied warranty of
• GNU General Public License for more details.

• You should have received a copy of the GNU General Public License
• along with this program; if not, write to the Free Software
• Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define DEBUG 1
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include "fbtft.h"
#define DRVNAME "fb_ili9488"
#define WIDTH 272
#define HEIGHT 480
// use the customer init code.
static int init_display(struct fbtft_par *par)
int ret = 0;
//unsigned displayid;
//displayid = read_displayid(par);
//fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "ili9488 Display ID: 0x%04X\n", displayid);

fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);


//ret = gpio_request(3, "ili9488_ertft035");
ret = gpio_request(3, "fb_ili9488");
pr_err("Titus: %s:%d ret %d\n", __func__, __LINE__, ret);
//ret = gpio_request(4, "ili9488_ertft035");
ret = gpio_request(4, "fb_ili9488");
pr_err("Titus: %s:%d ret %d\n", __func__, __LINE__, ret);
//ret = gpio_request(5, "ili9488_ertft035");
ret = gpio_request(5, "fb_ili9488");
pr_err("Titus: %s:%d ret %d\n", __func__, __LINE__, ret);

//IM0, IM1, IM2 are pulled high for 4wire SPI interface.
gpio_set_value(3, 1);
gpio_set_value(4, 1);
gpio_set_value(5, 1);
//for debugging
//write_reg(par, 0x04); /* display id /
/ startup sequence for ER-TFT035-6 /
write_reg(par, 0x01); / software reset */
gpio_set_value(par->gpio.reset, 1);
gpio_set_value(par->gpio.reset, 0);
gpio_set_value(par->gpio.reset, 1);

pr_err("************* Titus: LCD reset is done! par->gpio.reset %d ************\n", par->gpio.reset);
//write_reg(par, 0x04); //read display identification information for troubleshooting
//unsigned displayid;
//displayid = read_displayid(par);
//fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "ili9488 Display ID: 0x%04X\n", displayid);
write_reg(par, 0xF7, 0xA9, 0x51, 0x2C, 0x82);
write_reg(par, 0xE9, 0x00);
write_reg(par, 0x36, 0x48);
write_reg(par, 0x3A, 0x66);//gate control
//power setting
write_reg(par, 0xC0, 0x1C, 0x1C);
write_reg(par, 0xC1, 0x41);//VGH/VGL control
write_reg(par, 0xC2, 0x33);
write_reg(par, 0xC5, 0x00, 0x50, 0x80); //VCOM
write_reg(par, 0xB0, 0x8A);
write_reg(par, 0xB1, 0xB0);
write_reg(par, 0xB4, 0x02);
//write_reg(par, 0xB6, 0x22, 0x02, 0x3B);
//modified by kschin@20180313.
write_reg(par, 0xB6, 0x02, 0x02, 0x3B);
//gamma cluster setting
write_reg(par, 0xE0, 0x00, 0x04, 0x09, 0x06, 0x16, 0x0C, 0x3D, 0xC7, 0x4D, 0x09, 0x10, 0x0C, 0x1D, 0x21, 0x0F);
write_reg(par, 0xE1, 0x00, 0x1E, 0X22, 0x03, 0x0F, 0x06, 0x32, 0x38, 0x42, 0x03, 0x09, 0x09, 0x34, 0x39, 0x0F);
write_reg(par, 0x2A, 0x00, 0x18, 0x01, 0x27);
write_reg(par, 0x2B, 0x00, 0x00, 0x01, 0xDF);
write_reg(par, 0x11); //sleep out
write_reg(par, 0x29); //display on
pr_err("************* Titus: LCD driver is initialized! ************\n");

return 0;
static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
"%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", func, xs, ys, xe, ye);
/* column address */
write_reg(par, 0x2a, xs >> 8, xs & 0xff, xe >> 8, xe & 0xff);

/* Row address */
write_reg(par, 0x2b, ys >> 8, ys & 0xff, ye >> 8, ye & 0xff);

/* memory write */
write_reg(par, 0x2c);
#define HFLIP 0x01
#define VFLIP 0x02
#define ROWxCOL 0x20
static int set_var(struct fbtft_par *par)
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", func);
switch (par->info->var.rotate) {
case 270:
write_reg(par, 0x36, ROWxCOL | HFLIP | VFLIP | (par->bgr << 3));
case 180:
write_reg(par, 0x36, VFLIP | (par->bgr << 3));
case 90:
write_reg(par, 0x36, ROWxCOL | (par->bgr << 3));
write_reg(par, 0x36, HFLIP | (par->bgr << 3));
return 0;
static struct fbtft_display display = {
.regwidth = 8,
.width = WIDTH,
.height = HEIGHT,
.fbtftops = {
.set_addr_win = set_addr_win,
.set_var = set_var,
.init_display = init_display,
//FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9488_ertft035", &display);
FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9488", &display);
MODULE_DESCRIPTION("FB driver for the ILI9488 LCD Controller");
MODULE_AUTHOR("Titus Rathinaraj Stalin");
------------------------------------END OF ILI9488 DRIVER---------------------------------------
I am running out of method for the troubleshooting, if anyone has any ideas, please help to advise.

Posts: 3
Joined: Sat Sep 02, 2017 11:35 am

Re: ILI9488 4 Wire SPI display interface driver is not working

Thu Mar 15, 2018 1:49 am

one of the loose wire connection has caused this problem, the issue is resolved. thanks everyone.

Posts: 2
Joined: Mon Apr 23, 2018 7:48 am

Re: ILI9488 4 Wire SPI display interface driver is not working

Mon Apr 23, 2018 8:58 am


I try to interface ili9488 SPI TFT to FBTFT, But ili9488 driver is not available,
If you have FBTFT Driver for ili9488 please share...
Or Please guide to How to build driver & Load to RPi3....

Thank You,

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: No registered users and 3 guests