PITFT PLUS 3.5" -> support for HX8357D in FBTFT going upstre

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
hkall
 
Posts: 12
Joined: Tue May 19, 2015 5:00 pm

PITFT PLUS 3.5" -> support for HX8357D in FBTFT going upstre

Post by hkall »

I'm using Arch Linux on my RPI2 and purchased a PITFT PLUS 3.5".
As FBTFT is part of the mainline kernel already: Any plans to push support for the HX8357D from Adafruit's FBTFT fork upstream?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by adafruit_support_mike »

We're not in a position to push.

The code is online and Open Source, so if a distro wants to adopt it they're welcome to do so. There are way to many distros for us to wrangle though, so we stick close to the baseline Raspbian.

User avatar
hkall
 
Posts: 12
Joined: Tue May 19, 2015 5:00 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by hkall »

Fair enough, thanks for the very quick reply.
Meanwhile I made it work under ARCH with kernel 3.18.13. The HX8357D fbtft driver just needs a small change to compile under kernel 3.18.
Do you mind if I push the HX8357D driver upstream to the staging drivers of mainline kernel?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by adafruit_support_mike »

Go right ahead.

User avatar
pedro_nf
 
Posts: 18
Joined: Sun Nov 17, 2013 10:09 am

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by pedro_nf »

Hi hkall, can you give me some pointers on how to make the 2.8'' 320x270 TFT w/ touch work with Arch Linux?
Thanks in advance, greetings
Pedro

User avatar
hkall
 
Posts: 12
Joined: Tue May 19, 2015 5:00 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by hkall »

Not sure which controller chips the 2.8" display uses.
1. Have a look at the specs Adafruit provides and note which controllers are used.
2. Check in the kernel soure code which drivers are needed (fbtft LCD controller under drivers/staging/fbtft + touch controller under drivers/input/touchscreen).
3. Check whether Arch Linux provides these modules as packages -> if yes: you're done. just install them.
4. Look at the Arch Linux docu how to build your own kernel
5. Build your own kernel
6. Copy the two new modules to the right place
7. reboot or run ldconfig

User avatar
underu
 
Posts: 2
Joined: Tue Dec 29, 2015 5:11 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by underu »

Hi HKall, when i see your post, i was happy to see that i'm not alone in this world !!! I've buy a Pitft 3.5 plus and a Pi A+, i build a kernel using buildroot 2015.11. Wireless driver, 8192cu, work like a charm.
But now i'm stuck ! I didn't find a way to make this display working, i mean, i'm not looking for an "helper script" or "Kernel-O-matic", and raspbian is pretty cool, but useless since i use only 3 drivers (lcd,wireless, serial), nothing
else, and i don't want to wait until raspbian have loaded the entire planete driver ! Actually my image can boot in less than 10sec, and bring me an gui (QT embeded, ffmpeg,opencv) with the ability to see IPcam (rtsp) stream, deal with
esp8266, pic micro.....but it only work with 4Dsystems LCD(4dpi-32) because they provide a driver on there website, and arietta25 work too, even if the LCD is only 2.8".

In your howto above, i'm stuck on point 1 ;-(( Adafruit specs for Pitft 3.5" is pretty complete as you can see :

" Technical Details
Display current draw is mostly based on the backlight, with full-on backlight the current draw is ~100mA." -< That's it ! nothing about chip or hardware...maybe i'm not looking to right place...
-> on my board, it's writed STMPE610 + HX8357D

I was able to enable and compile the hx8357d, and fbtft, i've copied the overlays file but screen is still blank...i've also copied the contents of *.deb provided by the kernel-o-blablabla, but still blank screen...

i see your patch here http://driverdev.linuxdriverproject.org ... 69764.html
but i'm not a super patch man, some clue would be very helpfull, that's why i've contacted you....and not adafruit support

So my question is, do you know an easy way to install the driver for the Pitft 3.5" plus on any 4.X kernel, by easy i mean like "go to driver/video....update Kconfig, Makefile, and git the driver...make...modprobe", no
deb, no rapsbian, no kernel-o-matic, and of course no "Why did you don't use our blablablabla..."

I've spend so many time on this driver, that i'm didn't remenber my name !!

Thanks in advance, by the way, i wish you all the best for next years

User avatar
underu
 
Posts: 2
Joined: Tue Dec 29, 2015 5:11 pm

Re: PITFT PLUS 3.5" -> support for HX8357D in FBTFT going up

Post by underu »

ok, it's work !! sorry for the post

basically to get the Pitft 3.5 plus driver into buildroot 2015.11 you need to:

install buildroot
git clone git://git.buildroot.net/buildroot
cd buildroot
make raspberrypi_defconfig

configure build options
make menuconfig
->Toolchain-> kernel header 4.1.x and enable RPC, WCHAR, C++
->Kernel-> Kernel version (Custom git..), URL=https://github.com/adafruit/adafruit-raspberrypi-linux, custom repository version = rpi-4.1.y
i recommend to install some package like tslib, iw, wpa_supplicant, qt-embeded....

download the kernel and exit from menu
make linux-menuconfig

install the driver located here https://github.com/adafruit/adafruit-rpi-fbtft/
cd output/build/linux-rpi-4.1.y/drivers/video/fbdev

Like described in the README but instead of notro git put this one :
cd drivers/video/fbdev
git clone https://github.com/adafruit/adafruit-rpi-fbtft/

Add to drivers/video/fbdev/Kconfig: source "drivers/video/fbdev/fbtft/Kconfig"
Add to drivers/video/fbdev/Makefile: obj-y += fbtft/

avoid compile error, modifiy line 211 of fb_hx8357d.c in drivers/video/fbdev/fbtft like this

FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &display);

enable yours drivers, eg Pitft 3.5 plus enable hx8357d,

cd ~/buildroot
make linux-menuconfig
-> Device Drivers -> SPI -> enable BCM2835 and BCM2708, User mode SPI driver support
-> Frame buffer Deives -> BCM2708 framebuffer support
-> Support for small TFT LCD display modules -> (make sure your driver is selected * or M) hx8357d
-> Backlight & LCD device support -> (make sure your driver is selected * or M) in my case M on Himax HX-8357 LCD driver
-> Generic GPIO based (don't know if needed)
enable console if needed and exit

build the thing
make
deploy file in output directory, don't forget to create boot dir in rootfs and add an entry to fstab, and copy overlays directory including adafruit device tree to /boot/overlays

Add the following line to boot/config.txt

[pi1]
device_tree=bcm2708-rpi-b-plus.dtb
[pi2]
device_tree=bcm2709-rpi-2-b.dtb
[all]
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft35r,rotate=90,speed=42000000,fps=20

and in cmdline.txt after rootwait
fbcon=map:10 fbcon=font:VGA8x

load the kernel somewhere in /etc/init.d/Sxxxxx in my case i've created a file S30gui with start field like that :
case "$1" in
start)
echo "Starting gui..."
modprobe fbtft_device name=adafruitrt35 rotate=270
modprobe fb_hx8357d
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0

to know your model name, go to buildroot/output/build/linux-rpi-4.1.y/drivers/video/fbdev/fbtft
edit fbtft_device.c
find your model chip, in my board it's writed hx8357d :

...
/* LCD component of adafruit touchscreen */
.name = "adafruitrt35",
.spi = &(struct spi_board_info) {
.modalias = "fb_hx8357d",

boot into your brand new kernel, and enjoy !!!

usefull page was :
https://github.com/notro/fbtft/wiki
https://github.com/raspberrypi/firmware ... ays/README
https://github.com/adafruit/adafruit-rp ... t_device.c
https://learn.adafruit.com/adafruit-pit ... ed-install

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”