notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.85k stars 494 forks source link

PiTFT not supported? #103

Closed mwagner closed 10 years ago

mwagner commented 10 years ago

When installing the custom kernel from Adafruit the display works fine. But when installing your kernel https://github.com/notro/rpi-firmware/tree/master I get following error message.

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

How to fix this?

notro commented 10 years ago

the name is pitft. Adafuit has it's own patched version of fbtft_device.

mwagner commented 10 years ago

Ok with device name pitft it works, but I'm not able to use the GPIOs. Should I compile the kernel using adafruit's fbtft files found on git https://github.com/adafruit/adafruit-rpi-fbtft instead? What patch files should I use then as your patch files are different from the ones adafruit is linking to from their website?

notro commented 10 years ago

Which GPIOs are you referring to?

mwagner commented 10 years ago

I try to access the GPIO by making a device oink as per adafruit manual sudo sh -c "echo 252 > /sys/class/gpio/export" ls -l /sys/class/gpio

The output is (and this is where I miss the gpio252): -rwxrwx--- 1 root gpio 4096 Apr 29 14:19 export
lrwxrwxrwx 1 root gpio 0 Jan 1 1970 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
-rwxrwx--- 1 root gpio 4096 Jan 1 1970 unexport
https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/extras

notro commented 10 years ago

In the plug'n play image mentioned here: http://forums.adafruit.com/viewtopic.php?f=50&t=51468 /etc/modules has these additions:

stmpe_device cs=1 chip=stmpe610 blocks=gpio,ts irq-pullup irq-gpio=24 irq-base=330 sample-time=4 mod-12b=1 ref-sel=0 adc-freq=2 ave-ctrl=3 touch-det-delay=4 settling=2 fraction-z=7 i-drive=0
gpio_backlight_device gpio=252
#rpi-power-switch gpio_pin=22

stmpe_device adds the touch device and the gpio chip which exposes GPIO252 gpio_backlight_device turns this gpio into a regular linux backlight device

notro commented 10 years ago

Closing issue since there has been no activity for more than 2 months. Reopen if needed.