1

I accidentally purchased the 320x240 Capacitive Touch (rather than the newer model) with my new Raspberry Pi 2, and I can't get the screen to work. I have tried using both stock Raspbian with the install script from Adafruit on top and downloading the custom Adafruit image for the screen. In both cases, I am experiencing a completely white screen no matter what I do—not even when I tell the Pi to shutdown -h now does it turn off.

From what I can glean from dmesg, it looks like a compatibility issue since it is an old screen and a newer model Pi.

[  218.596187] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  218.597148] fbtft_device:  SPI devices registered:
[  218.597169] fbtft_device:      ili9340 spi0.0 32000kHz 8 bits mode=0x00
[  218.597177] fbtft_device:  'fb' Platform devices registered:
[  218.597201] fbtft_device:      soc:fb id=-1 pdata? no
[  218.597241] fbtft_device:  display not supported: 'adafruitts'

Further, from other threads, a suggestion was sudo modprobe spi-bcm2708 and sudo modprobe fbtft_device name=adafruitts rotate=90 - which landed me with

pi@raspberrypi ~ $ sudo modprobe spi-bcm2708
ERROR: could not insert 'spi_bcm2708': No such device
pi@raspberrypi ~ $ sudo modprobe fbtft_device name=adafruitts rotate=90
ERROR: could not insert 'fbtft_device': Invalid argument

Thanks in advance for any help you might be able to render.

Edited to add:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy
$ uname -a
Linux raspberrypi 4.0.8-v7+ #805 SMP PREEMPT Thu Jul 16 18:46:20 BST 2015 armv7l GNU/Linux
$ /opt/vc/bin/vcgencmd version
Jul 16 2015 19:17:28
Copyright (c) 2012 Broadcom
version bc619b5e5aa64f2b5fdd24f6b6a4e61907027a35 (clean) (release)

Edited again:

So I removed and reinstalled sudo apt-get remove -y raspberrypi-bootloader; sudo apt-get install -y raspberrypi-bootloader; this got me slightly closer to something useful:

pi@raspberrypi ~ $ sudo modprobe spi-bcm2708
pi@raspberrypi ~ $ sudo modprobe fbtft_device name=adafruitts rotate=90
ERROR: could not insert 'fbtft_device': Invalid argument

Which still leads to above dmesg output indicating that the display is not supported.

2
  • 1
    The error for spi-bcm2708 seems odd -- that is stock on Raspbian for both the armv6 (A/B/+) kernel and the armv7 (Pi 2) one. WRT Adafruit's driver, I'd think they will have source available, so you should be able to build it for the Pi 2 if it hasn't been.
    – goldilocks
    Jul 20, 2015 at 15:27
  • Offhand, I can't find the source, but a reinstall did a litte; sudo modprobe spi-bcm2708 \n pi@raspberrypi ~ $ sudo modprobe fbtft_device name=adafruitts rotate=90 \n ERROR: could not insert 'fbtft_device': Invalid argument
    – Jan
    Jul 20, 2015 at 16:53

1 Answer 1

5

There should not be a driver problem with the 2.8" display and RPi 2 newer kernels, as support is built in (ie you don't need the adafruit kernel) 4.0.7 works. The main problem is with the touch screen support. I have the same set up (but kernel 4.0.9-v7+). To get the display to work, you need either the adafruit dts overlay file pitft28c-overlay.dts (which the adafruit helper script should install in /boot/overlays - and add the sections in /boot/config.txt) OR you can add the file /etc/modprobe.d/fbtft_device.conf. for this to work you need to add: dtparam=spi=on

to /boot/config.txt

This does what you were trying with the modprobe commands - but because support is built in now, it's not referencing adafruit. This is the working /etc/modprobe.d/fbtft_device.conf entry: options fbtft_device custom name=fb_ili9341 speed=32000000 buswidth=8 gpios=reset:23,led:18,dc:25 rotate=90 bgr=1

This should get the display working. My default backlight was dim (about 50%) without the adafruit dts file. It's controlled by pwm on GPIO 18 (on my device anyway). With the adafruit dts file everything is fine.

To get the capacitive touch screen to work is more complicated (resistive works out of the box with the latest kernels), I had to manually add the drivers to the kernel and rebuild it.

What you should see in dmesg is: [ 4.077885] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 4.087244] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned. [ 4.093198] fbtft_of_value: buswidth = 8 [ 4.093211] fbtft_of_value: debug = 0 [ 4.093217] fbtft_of_value: rotate = 90 [ 4.093224] fbtft_of_value: fps = 20 [ 4.498586] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz

The warning message can be ignored, it means that it's using the kernel built in module. lsmod should show this: Module Size Used by fb_ili9340 3379 2 fbtft 27735 1 fb_ili9340 fb_sys_fops 1121 1 fbtft syscopyarea 3069 1 fbtft evdev 10131 2 sysfillrect 3373 1 fbtft joydev 8709 0 sysimgblt 1945 1 fbtft 8812au 1074875 0 spi_bcm2708 5085 0 i2c_bcm2708 4976 0 uio_pdrv_genirq 3001 0 uio 7896 1 uio_pdrv_genirq

there should be no entry for fbtft_device in /etc/modules if you are using the dts files.

For detailed information see here: https://github.com/notro/fbtft/wiki

1
  • Goshdarnit, I have sent the TFT back now (and it looks like it got lost in the mail, too), so I can't even test. Thank you for taking the time to give me this detailed and thoughtful reply.
    – Jan
    Aug 6, 2015 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.