Junky
Junky

Reputation: 93

PiTFT touchscreen Buildroot

I'm trying to build a raspberry pi image with buildroot to use the PiTFT screen.

Buildroot works well and after using:

modprobe fbtft_device name=pitft rotate=90
FRAMEBUFFER=/dev/fb1 startx

the TinyX server is started on the PiTFT but the touchscreen does not work.

I have read this post: TinyX shows display using builtin fbtft touchscreen driver but touch doesn't work

and configured the stmpe-spi and stmpe-ts in buildroot menuconfig. Now I have build the stmpe-ts as module so I can start it when I want but, when i start it with:

modprobe stmpe-ts

the module loads (i guess) there is a folder added in /sys/platforms/drivers but there is no message in dmesg and there is no input added in /dev or /dev/input. I don't see anything regarding stmpe (or stmpe-spi) in the dmesg and I think it doesn't load the spi driver correctly. I just don't understand how I can make it load correctly.

If anyone knows how to make it work, please help. If you need anything, from config files to my complete buildroot folder, please ask.

Greetings, Junky

Upvotes: 1

Views: 1285

Answers (2)

Junky
Junky

Reputation: 93

thanks to @JacobD I managed to get it working, I have documented everything in the following GitHub wiki:

https://github.com/Junky2008/Buildroot_PiTFT

It is not finished yet, so please feel free to suggest additions or improvements.

Greetings,

Junky

Upvotes: 0

JacobD
JacobD

Reputation: 627

Try this:

modprobe fbtft_device name=pitft rotate=90
modprobe 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

It works for me in an init.d startup script. I am using it for the capacitive touch screen, though.

Upvotes: 1

Related Questions