The screen is identical to the one made by ElecFreaks (This one!).
Although I got mine really cheap from eBay....
I decided to use notro drivers since they are flexible and already provide a driver for the ILI9341. You can find the source code and install instructions here.
I actually compiled a custom kernel where I added his drivers.
After compilation and module installation I just had to figure out the parameters I needed to use.
But first we still need to hook it up to the RaspPI :-)
I used the following connections, also from notro's Wiki
I used the wiring schema for an Adafruit LCD, check the original table here.
|Display||Driver gpio name||Raspberry Pi||Remark|
|MISO||Used by SD-card|
|SDCS||SD-card Chip Select|
Aside from a normal SPI connection, please notice the BL(led), RST(reset) and D/C(dc) pins since these will be used as parameters for the module.
Once you have everything hooked up, compiled and installed you can test out the screen by loading the module:
sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24,led:18 speed=16000000 rotate=90 bgr=1
If you change one of the pins above, please change the gpios parameter accordingly.
Also, you have the rotate option to put the screen in landscape mode, by default it will be in portrait mode.
The bgr=1 option is to exchange the blue and red colors, by default the colors don't appear correctly and this option is necessary.
Once you load the module nothing will happen on your screen (this made think it wasn't working...) you can test it out by either sending the console to the framebuffer with:
con2fbmap 1 1
(it means, send console 1 to framebuffer 1)
or using X
If you want to make the module load automatically, add the following line to /etc/modules:
fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24,led:18 speed=16000000 rotate=90 bgr=1
EDIT: For the built-in version, you can add this to the kernel command line:
fbtft_device.name=fb_ili9341 fbtft_device.gpios=reset:25,dc:24,led:18 fbtft_device.speed=16000000 fbtft_device.rotate=90 fbtft_device.bgr=1 fbtft_device.custom=1
Hope you find this useful.