-
Notifications
You must be signed in to change notification settings - Fork 494
Home
Linux Framebuffer drivers for small TFT LCD display modules.
<img src="http://www.adafruit.com/images/ID797.jpg" title="Video: Raspberry Pi boots with Adafruit 2.2" LCD display" border="10" />
- Supported LCD modules
- Raspberry Pi LCD Shields
- Step-by-step using FBTFT
- Install
- Using fbtft_device
- Framebuffer use
- Debug
- Backlight
- Touchpanel
- Source code
- News
For a list of all wikipages see Pages
FBTFT development has moved
The FBTFT drivers are now in the Linux kernel: drivers/staging/fbtft (details).
Raspberry Pi kernel with FBTFT support: https://github.com/notro/rpi-firmware
Raspian checklist
- Expand the filesystem
sudo raspi-config
- FBTFT on Raspian
The FBTFT kernel is now Device Tree enabled, following the way of the official kernel.
It works both with Pi1 and Pi2.
There are still wrinkles to iron out in the official kernel, so those will also be present in the FBTFT kernel.
To continue using fbtft_device, add to /boot/config.txt:
dtparam=spi=on
With Device Tree there is no need for fbtft_device, ads7846_device and friends. Device Tree overlays can be used instead.
These overlays are currently available (choose one and add to config.txt):
dtoverlay=rpi-display
dtoverlay=pitft
dtoverlay=hy28a
dtoverlay=piscreen
Note: I could not get touch to work with pitft on the Pi2 (alert me if this works for someone).
The module stmpe_ts
must loaded manually.
See for FBTFT RPI overlays more.
Install
FBTFT drivers as loadable modules
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
sudo reboot
FBTFT drivers built into the kernel proper (discontinued, 3.12.34)
sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update
sudo reboot
A particular commit can be installed like this:
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update f5fda53ad421799c7266310d87045cab0b525dec
-
2015-02-07
- Add Raspberry Pi 2 support
-
2014-12-07
-
2014-11-28
-
2014-08-02
- add er_tftm050_2 and er_tftm070_5 support
- add RA8875 support
- add support for PiScreen
- add ILI9486 support
- add S6D02A1 support (Wolfgang Buening)
Use rpi-source to get the matching kernel source, making it easy to build modules.
Run like this:
REPO_URI=https://github.com/notro/rpi-firmware rpi-source
Examples on how to build various modules
Discontinued
2015-02-12
The FBTFT images are now discontinued (I don't have time to make new releases).
Most of the changes from the Raspian image are listed here: FBTFT on Raspian
Raspberry Pi image with FBTFT support.
Wiki: https://github.com/notro/fbtft-spindle/wiki/FBTFT-image
FBTFT drivers as loadable modules. See 'Step-by-step' for loading drivers.
FBFTF drivers are built into the kernel. More info: branch: builtin
If you want to help out with my cost for displays and other accessories related to this project:
Using the Adafruit 2.2" display as an example
sudo modprobe fbtft_device name=adafruit22
dmesg will show the default pin assignements, and that the driver is loaded.
fbtft_device: SPI devices registered:
fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00
fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
fbtft_device: 'fb' Platform devices registered:
fbtft_device: bcm2708_fb id=-1 pdata? no
fbtft_device: Deleting spi0.0
fbtft_device: GPIOS used by 'adafruit22':
fbtft_device: 'reset' = GPIO25
fbtft_device: 'led' = GPIO23
fbtft_device: SPI devices registered:
fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
fbtft_device: fb_hx8340bn spi0.0 32000kHz 8 bits mode=0x00
graphics fb1: fb_hx8340bn frame buffer, 176x220, 75 KiB video memory, 16 KiB buffer memory, fps=20, spi0.0 at 32 MHz
FRAMEBUFFER=/dev/fb1 startx
con2fbmap 1 1
Add to file /etc/modules
fbtft_device name=adafruit22 verbose=0
Auto login: modify file /etc/inittab
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
Auto startx: modify file /etc/rc.local
su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx &"
Ref: http://elinux.org/RPi_Debian_Auto_Login
Add kernel argument to file /boot/cmdline.txt
fbcon=map:10
For more: Boot console
Add to file /etc/modules-load.d/raspberrypi.conf
fbtft_device
Add to file /etc/modprobe.d/fbtft.conf
options fbtft_device name=adafruit22
If you find bugs or have problems, please submit an issue.
Without the help from other people, this project would not exist
- Matt Porter wrote st7735fb which FBTFT grew from
- Texy has provided much input and testing that have helped move this project forward
- Derek Campbell did the work to implement DMA
- Several people have provided drivers and improvements
- Donations have helped me buy displays and accessories
Also thanks to people that help answering questions about FBTFT.