Adafruit's 2.8" PiTFT Capacitive Touch Screen

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Adafruit's 2.8" PiTFT Capacitive Touch Screen

Postby ggalt » Fri Dec 19, 2014 8:26 pm

All:

I'm just starting out on trying to get Adafruit's 2.8" Capacitive touchscreen (https://www.adafruit.com/products/1983)working on my Pi Model B+ using Arch. Adafruit has created a custom kernel for use of this device https://gist.github.com/ladyada/f86f777df68fe41181b0, but I'm not a fan of Raspian and I was hoping to recompile the Arch kernel to add the modules I might need. Unfortunately, Raspian uses Kconfig kernel configuration files, and I'm not familiar with these newer style of configuration files. Does anyone know of a utilitiy that will allow me to convert either the specialized Raspian kconfig files into the old-school config files or the old-school file from Arch into the new-fangled kconfig file format? If I can get them into the same format, I'm hoping a diff will at least get me started on firguring out how to reconfigure the Arch kernel.

FYI, it looks like there is something called the "fbtft_device" module that seems to be the primary focus of the changes, but I'm still trying to sort it out.

George
ggalt
 
Posts: 15
Joined: Wed Mar 06, 2013 10:13 pm
Location: Washington DC

Re: Adafruit's 2.8" PiTFT Capacitive Touch Screen

Postby ggalt » Tue Jan 06, 2015 9:17 pm

All:

I've finally gotten back to this project after the holidays, but I've hit a wall. I'm trying to rebuild the kernel to include the appropriate configuration for loading the module, but the server listed in the raspberrypi PKGBUILD file that host a few of the patches has been down for a while. It's Paulo's patches hosted on algo.ing.unimo.it. Downforeveryoneorjustme has shown the site down for the past few days. Does anyone have these patches or knows anyone administering the site?

Thanks,

George
ggalt
 
Posts: 15
Joined: Wed Mar 06, 2013 10:13 pm
Location: Washington DC

Re: Adafruit's 2.8" PiTFT Capacitive Touch Screen

Postby PLyttle » Fri Feb 27, 2015 12:10 pm

The latest ARCH kernel now supports Notro's fbtft drivers for small screen TFT devices

for the Adafruit 2.8 capacitive display you need a separate device tree overlay:

$this->bbcode_second_pass_code('', '
/*
* Device Tree overlay for Adafruit 2.8" 320x240 TFT w/Cap Touch Screen for Raspberry Pi
* The touchscreen does not (yet) work
*
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";

spidev@0{
status = "disabled";
};

spidev@1{
status = "disabled";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
pitft_pins: pitft_pins {
brcm,pins = <25>;
brcm,function = <1>; /* out */
};
};
};

fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;

pitft: pitft@0{
compatible = "ilitek,ili9341";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pitft_pins>;

spi-max-frequency = <32000000>;
rotate = <90>;
fps = <25>;
bgr;
buswidth = <8>;
dc-gpios = <&gpio 25 0>;
debug = <0>;
};

};
};

fragment@3 {
target-path = "/soc";
__overlay__ {
backlight {
compatible = "gpio-backlight";
gpios = <&gpio 18 0>;
default-on;
};
};
};

__overrides__ {
speed = <&pitft>,"spi-max-frequency:0";
rotate = <&pitft>,"rotate:0";
fps = <&pitft>,"fps:0";
debug = <&pitft>,"debug:0";
};
};
')

compile using the dtc-overlay package (don't forget the -@ switch). Copy the .dtb file to /boot/overlays and include it in /boot/config.txt.
$this->bbcode_second_pass_code('', 'device_tree_overlay=pitft28') Or whatever name you gave it (mine is obviously named pitft28-overlay.dtb)

If you also add:
$this->bbcode_second_pass_code('', 'fbcon=map:1 fbcon=font:default8x9')
to the command line in /boot/cmdline.txt, the screen displays the console

This also works for the Pi version 2

To enable the device without device tree you can type "modprobe fbtft-device name=pitft rotate=90"
this should work, albeit that it uses the ili9340 driver (the screen uses the ili9341. )

succes LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Adafruit's 2.8" PiTFT Capacitive Touch Screen

Postby polylux » Thu Mar 19, 2015 11:01 am

Hey there!

I got my screen yesterday and I'm very happy with it. As all my devices run arch linux I was glad to find this thread seeing that the screen is compatible with alarm.
I'm not too familiar with the device tree overlay aspects so I started out uncommenting the config.txt line for the pitft with resistive touch capabilities.
This worked out of the box, I got my console session and I'm able to start into X. As stated in the comment of the above overlay file, capacitive touch doesn't work yet so I guess it doesn't matter that I use the overlay for the resistive version of the screen.

As stated, I'm not familiar with overlays. Can someone quickly explain to me what's missing to enable the touch feature of the screen? Seeing that everything else works I take it it's only some config work. Wouldn't that be something we could achieve with assistance from Adafruit?

Cheers,
p.
polylux
 
Posts: 3
Joined: Thu Mar 19, 2015 10:51 am


Return to Raspberry Pi

Who is online

Users browsing this forum: Google [Bot] and 82 guests