Raspberry Pi:

adafruit 2441 3.5" TFT resitive screen

Driver:  https://github.com/notro/fbtft/wiki/fbtft_device

sudo modprobe fbtft_device name=rpi-display txbuflen=32768

[    6.267089] graphics fb1: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 32 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz


Display not support by jessie.

Similar display instructions: https://github.com/notro/fbtft/wiki/LCD-Shields

PiTFT - Assembled 480x320 3.5" TFT+Touchscreen 2097

The 2441 install instructions lead to the 2097 install, so I am guessing that the electronics are the same, just the form factor changed.

Product page: https://www.adafruit.com/products/2097
The FBTFT kernel and image doesn't support this display. Adafruit provides it's own kernel.

However, if you want to stick to the stock kernel source, it's pretty easy to add support for this screen this yourself. Simply modify "drivers/staging/fbtft/fb_ili9340.c" and change the width to 320 and height to 480. This is seemingly backwards, but that's because the screen is actually intended to be used in portrait orientation (imagine the screen in a phone). The Linux driver rotates 90 degrees for landscape orientation. The resistive touch controller works using the "stmpe-ts" driver.

Okay, lets build a driver…


copy getKernel.sh and execute.

Get the fbtft source

git clone moc.buhtig|tig#moc.buhtig|tig:notro/fbtft.git

"how-compile…" is bogus.

Trying https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=149631&p=984214#p984214

as root:

apt-get update -y
apt-get upgrade -y

wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q —tag-update
apt-get install bc
apt-get install libncurses5-dev

cd /root/linux
vi drivers/staging/fbtft/fb_ili9340.c
; change to
; #define WIDTH 320
; #define HEIGHT 480
make prepare
make SUBDIRS=drivers/staging/fbtft/ modules
make SUBDIRS=drivers/staging/fbtft/ modules_install




options fbtft_device name=fb_ili9340 txbuflen=32768


Not loaded on reboot….

sudo modprobe fbtft_device

[ 43.109336] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[ 43.110709] spidev spi0.0: spidev spi0.0 500kHz 8 bits mode=0x00
[ 43.110731] spidev spi0.1: spidev spi0.1 500kHz 8 bits mode=0x00
[ 43.110772] bcm2708_fb soc:fb: soc:fb id=-1 pdata? no
[ 43.110824] spidev spi0.0: Deleting spi0.0
[ 43.111783] fbtft_device: GPIOS used by 'pitft':
[ 43.111810] fbtft_device: 'dc' = GPIO25
[ 43.111844] spidev spi0.1: spidev spi0.1 500kHz 8 bits mode=0x00
[ 43.111866] spi spi0.0: fb_ili9340 spi0.0 32000kHz 8 bits mode=0x00
[ 43.141003] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
[ 43.358297] graphics fb1: fb_ili9340 frame buffer, 320x480, 300 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz

fbcp works.


modprobe fbtft_device
chmod 666 /dev/fb1


options fbtft_device name=pitft rotate=90

sudo SDL_VIDEODRIVER=fbcon SDL_FBDEV=/dev/fb1 mplayer -vo sdl -framedrop BigBuckBunny_320x180.mp4


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License