Closed kiwifruktish closed 3 years ago
I did get better color now when making changes to https://gist.github.com/ont/52c91e4ff090ee805e27 with:
import time
import RPi.GPIO as g
g.setmode(g.BOARD)
pins = [
7, # cs
11, # wr - clock (rising edge)
12, # rs - data/command
15, # d1
16, # d2
18, # d3
19, # d4 (???)
21, # d6 (???)
22, # d5 (???)
23, # d7
24, # d8
26 # rst
]
CSX = 7
DCX = 12
WRX = 11
RES = 26
D = [
15, # d1
16, # d2
18, # d3
19, # d4 (???)
22, # d5 (???)
21, # d6 (???)
23, # d7
24, # d8
]
def init():
# prepare raspberry pins for output
for x in pins:
print x
g.setup(x, g.OUT)
g.output(x, 1)
# hard reset sequence
g.output(RES, 1)
time.sleep(0.005) ## 5 ms
g.output(RES, 0)
time.sleep(0.015) ## 15 ms
g.output(RES, 1)
time.sleep(0.015) ## 15 ms
g.output(CSX, 1)
g.output(WRX, 1)
g.output(CSX, 0)
def send_data(cs, byte):
g.output(DCX, cs)
g.output(WRX, 0)
for i in xrange(8):
g.output( D[i], (byte >> i) & 1 )
g.output(WRX, 1)
def cmd(byte):
send_data(0, byte)
def data(byte):
send_data(1, byte)
init()
#cmd( 0xE9 )
#data( 0x20 )
cmd( 0x11 ) #Exit Sleep
time.sleep( 0.100 )
cmd( 0xD1 ) # VCOM Control
data( 0x00 ) # SEL/VCM
data( 0x0C ) # VCM
data( 0x0F ) # VDV
cmd( 0xD0 ) # Power_Setting
data( 0x07 ) # VC
data( 0x04 ) # BT
data( 0x00 ) # VRH
cmd( 0x36 ) # Set_address_mode
data( 0x48 )
# 0x48 = 0b01001000
# 0 - top to bottom
# 1 - right to left
# 0 - normal mode of columns order
# 0 - refresh top to bottom
# 1 - RGB or BGR (here BGR order)
# 0 - <skip>
# 0 - no hflip
# 0 - no flip
cmd(0xE0)
data(0x00)
data(0x04)
data(0x0E)
data(0x08)
data(0x17)
data(0x0A)
data(0x40)
data(0x79)
data(0x4D)
data(0x07)
data(0x0E)
data(0x0A)
data(0x1A)
data(0x1D)
data(0x0F)
cmd(0xE1)
data(0x00)
data(0x1B)
data(0x1F)
data(0x02)
data(0x10)
data(0x05)
data(0x32)
data(0x34)
data(0x43)
data(0x02)
data(0x0A)
data(0x09)
data(0x33)
data(0x37)
data(0x0F)
cmd(0xB1)
data(0xB0)
cmd(0xB4)
data(0x02)
cmd(0xF7)
data(0xA9)
data(0x51)
data(0x2C)
data(0x82)
cmd(0XB0)
data(0x00)
cmd( 0x3A ) # Set pixel format
data( 0x55 )
cmd( 0xC1 ) # Display timing setting for normal/partial mode
data( 0x41 )
cmd( 0xC0 ) # Set Default Gamma
data( 0x18 )
data( 0x16 )
cmd( 0xC5 ) # Set frame rate
data( 0x00 )
data( 0x1E )
data( 0x80 )
cmd( 0xD2 ) # Power setting
data( 0x01 )
data( 0x44 )
cmd( 0xC8 ) # Set Gamma
data( 0x04 )
data( 0x67 )
data( 0x35 )
data( 0x04 )
data( 0x08 )
data( 0x06 )
data( 0x24 )
data( 0x01 )
data( 0x37 )
data( 0x40 )
data( 0x03 )
data( 0x10 )
data( 0x08 )
data( 0x80 )
data( 0x00 )
cmd( 0x2A )
data( 0x00 )
data( 0x00 )
data( 0x01 )
data( 0x3F )
cmd( 0x2B )
data( 0x00 )
data( 0x00 )
data( 0x01 )
data( 0xDF )
cmd( 0x29 ) #display on
cmd( 0x2C ) #display on
x1 = 100
y1 = 100
x2 = 200
y2 = 200
cmd(0x2a) # Set_column_address
data(x1>>8)
data(x1)
data(x2>>8)
data(x2)
cmd(0x2b) # Set_page_address
data(y1>>8)
data(y1)
data(y2>>8)
data(y2)
cmd(0x2c) # Write_memory_start
# write pixel by pixel
for x in xrange(100):
for y in xrange(100):
data(0xee) ## low part of word
data(0) ## hight part of word
g.output(CSX, 1) ## end command / data session
This is the screen:
This is what happens when you run win32_screem.rar that was for the 3.6 screen:
It seams it shouldn't be that much different to get it running, sure its a cheap screen from aliexpress ;)
I have the exact same screen (even though I ordered a different one), so very keen on your progress!
ok, now i have stuff on the screen :P but it is mirrored :( hahah
sudo modprobe fbtft_device name=flexpfb rotate=180 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8
sudo modprobe flexfb width=320 height=480 buswidth=8 init=-1,0xb0,0x0,-1,0x11,-2,120,-1,0x3A,0x55,-1,0xC2,0x33,-1,0xC5,0x00,0x1E,0x80,-1,0xE0,0x00,0x04,0x0E,0x08,0x17,0x0A,0x40,0x79,0x4D,0x07,0x0E,0x0A,0x1A,0x1D,0x0F,-1,0xE1,0x00,0x1B,0x1F,0x02,0x10,0x05,0x32,0x34,0x43,0x02,0x0A,0x09,0x33,0x37,0x0F,-1,0x11,-1,0x29,-3
con2fbmap 1 1
Now mirroring is need to be fixed and rotate need to be fixed some how ;)
Register 0x36 is usually responsible for rotation/flip/mirror/bgr
Thanks,worked.
Some stuff left to Workout.
Everything's working now but the screen looks like it is "lagging" every lines updates way to slow, any use'?
Yes it's slow to drive a parallel bus with gpiolib. If you use a Pi and can build your own kernel, you can add the optimization that was left out when fbtft went into staging: https://github.com/notro/fbtft/blob/master/fbtft-io.c#L133 See here for preformance numbers with this optimization: https://github.com/notro/fbtft/wiki/Performance#itdb28
If you want a visual comparison, I created a short video a month ago of two TFTs running next to each other, one with optimization and the other without the optimization. https://www.youtube.com/watch?v=TyqHsEw4ids
That's a different optimization: DMA. The display we are talking about here is driven with a 8-bit parallel bus directly, no SPI. Upstream FBTFT uses gpiolib and sets one bit at a time (unless it's the same value as the previous one), whereas the old optimized FBTFT wrote directly to the hw register making it possible to set 8 bit in one go.
For any one that wants the screen to show some thing ;) :
pi@raspberrypi ~ $ cat /etc/modules snd-bcm2835 fbtft_device name=flexpfb rotate=180 fps=60 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8
#
# flexfb width=480 height=320 buswidth=8 init=-1,0xb0,0x0,-1,0x11,-2,120,-1,0x3A,0x55,-1,0xC2,0x33,-1,0xC5,0x00,0x1E,0x80,-1,0x36,0x28,-1,0xB1,0xB0,-1,0xE0,0x00,0x04,0x0E,0x08,0x17,0x0A,0x40,0x79,0x4D,0x07,0x0E,0x0A,0x1A,0x1D,0x0F,-1,0xE1,0x00,0x1B,0x1F,0x02,0x10,0x05,0x32,0x34,0x43,0x02,0x0A,0x09,0x33,0x37,0x0F,-1,0x11,-1,0x29,-3
notro, stupid question, isent it just possible to change like fb_ili9486.c and make it as a new driver?
I asked my supplier for the driver and this is what I got back
/*************************************************/
void initi(void)
{
res=1;
delay(1);
res=0;
delay(10);
res=1;
delay(120);
/***************************************/
write_command(0xE0);
write_data(0x00);
write_data(0x04);
write_data(0x0E);
write_data(0x08);
write_data(0x17);
write_data(0x0A);
write_data(0x40);
write_data(0x79);
write_data(0x4D);
write_data(0x07);
write_data(0x0E);
write_data(0x0A);
write_data(0x1A);
write_data(0x1D);
write_data(0x0F);
write_command(0xE1);
write_data(0x00);
write_data(0x1B);
write_data(0x1F);
write_data(0x02);
write_data(0x10);
write_data(0x05);
write_data(0x32);
write_data(0x34);
write_data(0x43);
write_data(0x02);
write_data(0x0A);
write_data(0x09);
write_data(0x33);
write_data(0x37);
write_data(0x0F);
write_command(0xC0);
write_data(0x18);
write_data(0x16);
write_command(0xC1);
write_data(0x41);
write_command(0xC5);
write_data(0x00);
write_data(0x1E); //VCOM
write_data(0x80);
write_command(0x36);
write_data(0x48);
write_command(0x3A); //Interface Mode Control
write_data(0x55); //16BIT
write_command(0xB1); //Frame rate 70HZ
write_data(0xB0);
write_command(0xB4);
write_data(0x02);
write_command(0xE9);
write_data(0x00);
write_command(0XF7);
write_data(0xA9);
write_data(0x51);
write_data(0x2C);
write_data(0x82);
//**********set rgb interface mode******************
write_command(0XB0); //Interface Mode Control
write_data(0x00); //set DE,HS,VS,PCLK polarity
write_command(0xB6);
write_data(0x30); //30 set rgb
write_data(0x02); //GS,SS 02£¨42
write_data(0x3B);
/**************************************************/
write_command(0x2A); //Frame rate control
write_data(0x00);
write_data(0x00);
write_data(0x01);
write_data(0x3F);
write_command(0x2B); //Display function control
write_data(0x00);
write_data(0x00);
write_data(0x01);
write_data(0xDF);
write_command(0x21);
write_command(0x11);
delay(120);
write_command(0x29); //display on
write_command(0x2c);
}
//******************************************
void LCD_Enter_Standby(void)
{
write_command(0x28);//display off
delay(10);
write_command(0x10);
delay(120);
RGB_OFF();
}
void LCD_Exit_Standby (void)
{
RGB_ON();
delay(10);
write_command(0x11);// Exit Sleep/ Standby mode
delay(120);
write_command(0x29);
}
Not sure if that's of any use to anyone.
@kiwifruktish How do I use that example you've got above?
isent it just possible to change like fb_ili9486.c and make it as a new driver?
Sure it's possible. I'm working on some patches and one of the big changes is moving away from having controller drivers to display drivers instead. The main reason for this is that the Device Tree guys won't allow register initialisation sequences in DT. https://github.com/notro/linux-staging/commits/next
@toxaq i used same example from the supplier,
"sudo nano /etc/modules" and add to enable screen: fbtft_device name=flexpfb rotate=180 fps=60 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8
#
# flexfb width=480 height=320 buswidth=8 init=-1,0xb0,0x0,-1,0x11,-2,120,-1,0x3A,0x55,-1,0xC2,0x33,-1,0xC5,0x00,0x1E,0x80,-1,0x36,0x28,-1,0xB1,0xB0,-1,0xE0,0x00,0x04,0x0E,0x08,0x17,0x0A,0x40,0x79,0x4D,0x07,0x0E,0x0A,0x1A,0x1D,0x0F,-1,0xE1,0x00,0x1B,0x1F,0x02,0x10,0x05,0x32,0x34,0x43,0x02,0x0A,0x09,0x33,0x37,0x0F,-1,0x11,-1,0x29,-3
"sudo nano /boot/cmdline.txt" Enable the Boot Splash Screen by adding: fbcon=map:10 fbcon=font:VGA8x8 fbcon=rotate:3
please note that it will "lag" until we have a driver that dont use "gpiolib".
@notro
I made changes to fb_ili9486.c By changing "static int default_initsequence[] = {" to: /* this init sequence matches PiScreen / static int default_initsequence[] = { / Interface Mode Control / -1, 0xb0, 0x0, / Sleep OUT / -1, 0x11, -2, 120, / Interface Pixel Format / -1, 0x3A, 0x55, / Power Control 3 / -1, 0xC2, 0x33, / VCOM Control 1 / -1, 0xC5, 0x00, 0x1E, 0x80, / PGAMCTRL(Positive Gamma Control) / -1, 0xE0, 0x00, 0x04, 0x0E, 0x08, 0x17, 0x0A, 0x40, 0x79, 0x4D, 0x07, 0x0E, 0x0A, 0x1A, 0x1D, 0x0F, / NGAMCTRL(Negative Gamma Control) / -1, 0xE1, 0x00, 0x1B, 0x1F, 0x02, 0x10, 0x05, 0x32, 0x34, 0x43, 0x02, 0x0A, 0x09, 0x33, 0x37, 0x0F, / Sleep OUT / -1, 0x11, / Display ON / -1, 0x29, / end marker */ -3 };
And started "fbtft_device custom name=fb_ili9486 rotate=90 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8"
It worked after build, but still "laggy" because of gpiolib i guess.
But maybe you want to add a fb_ili9488 to next release ;)
I won't be making a fb_ili9488 because many of these drivers are mipi compliant so I will add a mipi module instead that will cover many of the fbtft supported controllers: https://github.com/notro/linux-staging/blob/next/drivers/staging/fbtft/lcdctrl/mipi-dbi.c
This also solves the problem of the hardcoded register 0x36 values for rotation. Not all displays are equal in this respect, so currently they have to use flexfb.
Then there will be display drivers that use this module: https://github.com/notro/linux-staging/blob/next/drivers/staging/fbtft/ada-mipifb.c
So I'm moving away from controller drivers to display drivers mainly for the DT reason I mentioned earlier.
If I still find fbtft fun to work on when all this is in place, I will have a look at the SMI driver and see if I can add support for that in fbtft: https://github.com/raspberrypi/linux/pull/1105 But anyway that will be months away. I would need to make a generic parallel bus subsystem first.
Guy's I don't know how you did this but after I added : fbtft_device name=flexpfb rotate=180 fps=60 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8 flexfb width=480 height=320 buswidth=8 init=-1,0xb0,0x0,-1,0x11,-2,120,-1,0x3A,0x55,-1,0xC2,0x33,-1,0xC5,0x00,0x1E,0x80,-1,0x36,0x28,-1,0xB1,0xB0,-1,0xE0,0x00,0x04,0x0E,0x08,0x17,0x0A,0x40,0x79,0x4D,0x07,0x0E,0x0A,0x1A,0x1D,0x0F,-1,0xE1,0x00,0x1B,0x1F,0x02,0x10,0x05,0x32,0x34,0x43,0x02,0x0A,0x09,0x33,0x37,0x0F,-1,0x11,-1,0x29,-3
to my /etc/modules , all I can see it's just a black screen ...
did you add any thing to cmdline.txt ? if not you have to add:
fbcon=map:10 fbcon=font:VGA8x8 fbcon=rotate:3
before rootwait i think. and reboot or just type "con2fbmap 1 1" when module is loaded if you dont want to restart for the moment.
@kiwifruktish , Thank you. You were right, also I had to use this FRAMEBUFFER=/dev/fb1 startx to start the x . It is very very laggy .. :)
@kiwifruktish Hi, I have obtained the same yellow square with you, but how to di to redirect console on TFT screen? Sorry but I'm dummy user ;-) Thanks
I found a kernel for the ili9488 lcd and a raspbian image with kernel for this display. I attached the link of the page.
http://www.ittgroup.ee/et/ekraanid-ja-naidikud/626-lcd-tft-ekraan-395-480x320-raspberry-pi-le.html
In the bottom of the page there are two links,Kernel and Raspberry Pi image, click one of them and enjoy!
Bye.
@callievi Hi, thanks to info but yunpan360.cn website release always an unknow error to download win32_3.95screem.zip 952.6Mb file so, I ask to show your cloud public link to download correclly resource. Thanks ;-)
PS https://www.raspberrypi.org/forums/viewtopic.php?t=122736&p=826897
Why with this distribution when I connect my wireless device IRQ32 disable and ext keyb don't work anymore? ;-/
I do not know, I used raspbian modify kernel. You have download the kernel file o the win32 file? Il 19/ott/2015 16:41, "Luigi" notifications@github.com ha scritto:
[image: img_0136] https://cloud.githubusercontent.com/assets/4547349/10580876/0c1f2144-7680-11e5-8e05-4c272cf89de4.JPG Why with this distribution when I connect my wireless device IRQ32 disable and ext keyb don't work anymore? ;-/
— Reply to this email directly or view it on GitHub https://github.com/notro/fbtft/issues/311#issuecomment-149235627.
...maybe error config into etc/ files! Now I havn't. into games-python foldere only 640x480 games trailer? ;-) Thanks Bye
I've been trying to follow along on this thread, but am unfortunately not experienced enough in this environment to get my display as far along as everyone here has. Mine is still that ugly faded image that doesn't fill up the screen.
Is there any possibility anyone would be willing to create and share an image that has this display working properly?
Thanks.
FYI
Thanks. That's very thoughtful. I had done that already, but my display is the same as that faded image that doesn't fill the screen in the earlier picture. I'm hoping someone sorts out the display, and then makes a new image. The photo of your screen looks great.
I have a PiZero with this screen and I have attempted using the kernel. The image shows up on the screen but I'm unable to use any of my USB devices. Can you guys help me figure this out? Thanks
Hi 1ucian, try to see this https://github.com/notro/fbtft/issues/254
...too late! ;-)
Haha thanks, I was able to get it running. The only thing I'm trying to figure out now is how to add the optimization to my kernel to make the screen respond a bit faster.
...here is the kernel for the mcufriend 3.95 tft screen ., Should work for the raspberry pi b and raspberry pi B+ Also enable spi in the raspi-config
Rename your kernel.img and add the kernel.img from the zip file,if or when you update your pi, you should put back the orignal kernel file and after updating put back the 3.95 tft kernel file. Let me know if you discover any info.Thanks
Hola chicoos, tengo un problema... y es que no se como hacer funcionar la misma pantalla de la que hablais (ili9488) en la Raspberry Pi2... Osea me descargo el win32_3.95screem.zip de la pagina ( http://www.ittgroup.ee/et/ekraanid-ja-naidikud/626-lcd-tft-ekraan-395-480x320-raspberry-pi-le.html ) y escribo la imagen el una tarjeta micro SD virgen (sin nada escrito) y luego la meto en la raspberryPi2 y conecto la pantalla por los GPIO, despues conecto todo a la fuente de alimentacion y la pantalla se queda todo el rato en blanco... cuando pasa eso intento conectar la raspberry a la pantalla de un ordenador mediante el cable HDMI pero en la pantalla del ordenador no aparece nada.....
ayudaa que puedo hacer?? o como lo hago?? he mirado en esta pagina y no entiendo cômo lo hace o que hace... ( http://appdictive.dk/blog/projects/2015/10/30/cheap_tft_display_on_raspberry_pi/ ) no entiendo los procedimientos o si tiene que tener antes la imagen de raspbian instalada.. alguien me podria dar unas instrucciones que seguir paso a paso??? o un video de como se hace??? un saluditoo
Hola chica, the image is writing for only PI "tarjeta" ;-) please try to test on this card and AFTER move at PI2 I admit GPIO pinout compatibility for first 26 pins but you can writed an error on image SDcard! PLEASE community admit UK "idioma" so please write so! ;-) Asta luego
Jajajaja excuse me i was thinking in my lenguaje... Now im going to write in UK lenguaje :P
El viernes, 15 de enero de 2016, Luigi notifications@github.com escribió:
Hola chica, the image is writing for only PI "tarjeta" ;-) please try to test on this card and AFTER move at PI2 I admit GPIO pinout compatibility for first 26 pins but you can writed an error on image SDcard! PLEASE community admit UK "idioma" so please write so! ;-) Asta luego
— Reply to this email directly or view it on GitHub https://github.com/notro/fbtft/issues/311#issuecomment-171970174.
Helloooo,? I have a problem ... and i dont konw who i can running the same screen from which you speak (ili9488) in the Pi2 Raspberry ... I downloaded the win32_3.95screem.zip of the page (http://www.ittgroup.ee/et/ekraanid-ja-naidikud/626-lcd-tft-ekraan-395-480x320-raspberry-pi-le.html ) and write the image virgin micro SD card (nothing written) and then get into the raspberryPi2 and connect the screen by GPIO, then connect everything to the power supply and all the while the screen goes white. .. when that happens I try to connect the raspberry to a computer screen using the HDMI cable but the computer screen does not show anything .....
Help what can i do ?? I've looked in this page and i dont understand how it does ... (http://appdictive.dk/blog/projects/2015/10/30/cheap_tft_display_on_raspberry_pi/) I dont understand the procedures or if the SD card have to be installed before the image of raspbian .. someone could give me some instructions to follow step by step ??? or a video of how to do ???
I have same case, until now I have Blank white Screen with follow instruction from: http://www.ittgroup.ee/et/ekraanid-ja-naidikud/626-lcd-tft-ekraan-395-480x320-raspberry-pi-le.html
Hello. I'm hoping someone has found a solution for this. I've compiled the kernel with the fbtft from here, the one that was supposed to help with the lag, but it still didn't solve the issue. I can still see scanlines every time an image loads onto the screen or they change. Is there anyway to solve that problem?
@gicuuu3 With the kernel you built, is there any noticeable difference between that and the one without the optimizations? Even if it doesn't render at usable speeds, do you notice an increase in the speed of the display? I'm looking forward to do this as it'll make my display usable, but in order to compile a Kernel with the module from github I have to read a lot, as I never cross compiled a kernel.
@thelinkin3000 It wasn't a major optimization. If you were to read the comment referring to the optimization(the one in the code itself, referred by the link mentioned above), it says that it's gonna give a 40 to 50% boost in speed. Can't say it was noticeable. I used this reference to cross compile it(in case you might find it useful): https://www.raspberrypi.org/documentation/linux/kernel/building.md
Hello everyone, I am trying to use this screen and I'm having some troubles. Using raspberry pi zero. I am willing to use it for gameboy-like device with retropie.
I tried different things :
Anyone made it work well on rpi zero could explain me how to do it ? :)
Sorry I don't know much about LCD drivers/linux kernel etc. @gibo65 could you explain me how to use what you posted for @1ucian ?
It would be great if someone can give me the big picture on how this is working : linux-kernel kernel-drivers/rpi gpio/screen spec. And how to modify. It seems that I lack some basic knowledge to understand the different solutions discussed here. Is there somewhere to start? :)
Has anyone tried to compile the kernel with this optimization https://github.com/notro/fbtft/blob/master/fbtft-io.c#L133 on Raspberry Pi 2? I used this guide https://github.com/notro/fbtft/wiki/Build-kernel-and-fbtft-drivers but no luck, still laggy((
Tried to compile fbtft with -O3, -O2 flags, but this didn't help, display update time has increased from 178 ms to 280 ms(((
Hi there. Thanks for your efforts!
I have a 3.5" ILI9488 module from buydisplays and need to get it working via native SPI. As of now I tried ili9481 and 9486 modules by notro (thank you Sir) and custom init strings from this topic. All I achieved for the moment is the screen (9481 driver) or half the screen (9486 driver) changing from white to gray on modprobe. Nothing more happens whatever I do.
Is there a reason to try new DBI branch? If so, is there anything "for dummies" to start from? I'm new to low-level hardware under linux.
Thank you!!
If wiring and the init string is corrrect it should turn black. Many drivers set register 0x36 in the set_var() function and can cause trouble if it doesn't match your panel. This register controls flip/mirror. The flexfb driver doesn't set this register, so you can use it with the default setaddrwin=0 setting. https://github.com/notro/fbtft/wiki/flexfb
Notro, thanks a lot. It does not turn black in any case. This occurred once, when I occassionally told buswidth=8 instead of 9 used, and I could not repeat this. Even when it has, the module did not react to filling it from /dev/urandom or fbi viewer, so it's not initted yet. I keep trying. Can the init string be different for parallel and SPI modes?!
Can the init string be different for parallel and SPI modes?!
Not that I know of. The interface type is usally set with the IM[0:3] pins.
I tried both 3-wire/9bit and 4-wire/8bit. The fbtft_device requires dc gpio in both modes. Gray screen and no response in any mode. Bum. Will try with arduino first, there's too much unknown variables as of now. The init string is the first, as avr/stm forums say very different things from this thread. Am I right that '-1' stands for command, and the rest is data? Sorry for being that dumb.
And here is some more info:
same as in https://github.com/notro/fbtft/issues/254
So the first part will probebly be if im not wrong: sudo modprobe fbtft_device name=flexpfb rotate=180 fps=70 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8 But it is the other part im not realy sure how it should be, sudo modprobe flexfb ...
Documentation can be found at https://www.lpcware.com/system/files/ILI9488_Preliminary_DS_V090.pdf
I tested https://gist.github.com/ont/52c91e4ff090ee805e27 and it did work but i dont think the color is 100% right but it works.
When runing: fbtft_device name=flexpfb rotate=180 fps=70 gpios=dc:18,reset:7,wr:17,cs:4,db00:22,db01:23,db02:24,db03:10,db04:25,db05:9,db06:11,db07:8 flexfb width=320 height=480 buswidth=8 init=-1,0xE9,0x20,-1,0x11,-2,100,-1,0x3A,0x55,-1,0xD1,0x00,0x6B,0x19,-1,0xD0,0x07,0x07,0x80,-1,0x36,0x48,-1,0xC1,0x10,0x10,0x02,0x02,-1,0xC0,0x00,0x35,0x00,0x00,0x01,0x02,-1,0xC5,0x01,-1,0xD2,0x01,0x22,-1,0xC8,0x01,0x52,0x37,0x10,0x0D,0x01,0x04,0x51,0x77,0x01,0x01,0x0d,0x08,0x80,0x00,-1,0xEA,0x80,-1,0x29,-3
i have the fallowing info in dmesg: [ 11.796719] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 11.823613] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned. [ 11.841446] fbtft_device: SPI devices registered: [ 11.846408] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00 [ 11.859142] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00 [ 11.865906] fbtft_device: 'fb' Platform devices registered: [ 11.871856] fbtft_device: soc:fb id=-1 pdata? no [ 11.880554] fbtft_device: GPIOS used by 'flexpfb': [ 11.885527] fbtft_device: 'dc' = GPIO18 [ 11.889726] fbtft_device: 'reset' = GPIO7 [ 11.910401] fbtft_device: 'wr' = GPIO17 [ 11.914643] fbtft_device: 'cs' = GPIO4 [ 11.918726] fbtft_device: 'db00' = GPIO22 [ 11.924882] fbtft_device: 'db01' = GPIO23 [ 11.929237] fbtft_device: 'db02' = GPIO24 [ 11.933886] fbtft_device: 'db03' = GPIO10 [ 11.938259] fbtft_device: 'db04' = GPIO25 [ 11.942750] fbtft_device: 'db05' = GPIO9 [ 11.947021] fbtft_device: 'db06' = GPIO11 [ 11.951531] fbtft_device: 'db07' = GPIO8 [ 11.955834] fbtft_device: 'fb' Platform devices registered: [ 11.961746] fbtft_device: soc:fb id=-1 pdata? no [ 11.966941] fbtft_device: flexpfb id=0 pdata? yes [ 12.053062] flexfb: module is from the staging directory, the quality is unknown, you have been warned. [ 12.745963] Console: switching to colour frame buffer device 40x60 [ 12.770403] graphics fb1: flexfb frame buffer, 320x480, 300 KiB video memory, 4 KiB DMA buffer memory, fps=100
But still no picture when adding: fbcon=map:10 fbcon=font:VGA8x8 fbcon=rotate:3 to cmd before rootwait.