SUCCESS with adafruit PiTFT Plus 3,5" 480x320 display

Raspberry Pi 2

SUCCESS with adafruit PiTFT Plus 3,5" 480x320 display

Postby neXusPi2 » Sat Aug 29, 2015 5:14 pm

I've purchased a PiTFT Plus 3,5" from adafruit for my rpi2 but I don't get it properly working. Can someone help?

What I've done:

1. kernel patching
Since the fbtft module of the current ARCH kernel 4.1.6 does not support the hx8357d micro-controller I've rebuild the ARCH kernel with updated fbtft sources from the official kernel 4.2-rc8 that comes with hx8357d support. I've also patched the kernel config to make sure that hx8357d is built as module like all the other ones.

2. /boot/config.txt patching
I've edited my /boot/config.txt
$this->bbcode_second_pass_code('', 'device_tree_param=spi=on
device_tree=bcm2709-rpi-2-b.dtb
dtparam=spi=on
dtoverlay=pitft35r,rotate=270,speed=42000000,fps=20')
to enable SPI and PiTFT support like documented by adafruit.

3. reboot & module check
So far, so good. After a reboot lsmod shows me that the module is properly loaded:
$this->bbcode_second_pass_code('', '[neXusPi2@alarmpi ~]$ lsmod
Module Size Used by
joydev 8691 0
evdev 9674 0
hid_logitech_hidpp 9333 0
fb_hx8357d 3490 0
fbtft 33359 1 fb_hx8357d
syscopyarea 2971 1 fbtft
sysfillrect 3424 1 fbtft
sysimgblt 2186 1 fbtft
fb_sys_fops 1475 1 fbtft
hid_logitech_dj 10958 0
i2c_bcm2708 5670 0
spi_bcm2835 7318 0
bcm2835_gpiomem 3464 0
uio_pdrv_genirq 3285 0
uio 9036 1 uio_pdrv_genirq
sch_fq_codel 7315 2
snd_bcm2835 21900 0
snd_pcm 86256 1 snd_bcm2835
snd_timer 19906 1 snd_pcm
snd 61579 3 snd_bcm2835,snd_timer,snd_pcm
bcm2708_rng 1171 0
rng_core 8018 1 bcm2708_rng
ip_tables 12274 0
x_tables 16490 1 ip_tables
ipv6 348264 26')
The framebuffer device /dev/fb1 is also available, looks good. But the display keeps white, adafruit says that it should turn into black when the kernel loads the module.

4. device tree overlays
Unfortunately, ARCH doesn't offer a suitable overlay for this display, so I've copied the pitft35r-overlay.dtb binary from raspbian to my ARCH installation (/boot/overlays) and reboot the system. The display is still white :(

I've decided to recompile the overlay on my ARCH machine. I followed this HOWTO and modified the dtc.sh file to suppress the dependency check because all dependencies are already resolved on my ARCH system and apt-get is not available ;)
After the dtc compilation was ready I've taken the overlay source code (dts) from here and compiled it with my dtc. The resulting overlay binary pitft35r-overlay.dtb was properly saved to /boot/overlays, looks good.

After a reboot, the display still keeps white, the self-compiled overlay seems to fail like the one from raspbian.

What I'm doing wrong?
neXusPi2
 
Posts: 16
Joined: Sun Feb 22, 2015 2:41 pm

Re: SUCCESS with adafruit PiTFT Plus 3,5" 480x320 display

Postby neXusPi2 » Sat Aug 29, 2015 8:25 pm

Both, the raspbian overlay and the self-compiled overlay are fine. The problem is the SPI frequency of 42MHz. This is mentioned as good starting point by adafruit but this doesn't work for me. Instead, I've to reduce the speed to 16MHz or 32MHz, then the display runs perfectly.
neXusPi2
 
Posts: 16
Joined: Sun Feb 22, 2015 2:41 pm

Re: SUCCESS with adafruit PiTFT Plus 3,5" 480x320 display

Postby sirmonkey » Sun Sep 13, 2015 3:03 am

Update: just found the "raspberrypi" headers package... let me try building agian :-)
gets: modprobe: ERROR: could not insert 'fbtft': Exec format error
not sure why now. everything looks alot better.

Hey :-)
I'm trying to do the same thing.... so 2 main questions:
1. mind posting the module ?

2. mind explain step 1 in more depth?
I've followed all i could find in the wiki ( haven't compiled a kernel since ~2.4, mandrake 8 or so). but i couldn't find kernel-source package in and the bland kernel.org doesn't seem to be correct. so i'm getting:
fbtft: no symbol version for module_layout
when trying to modprobe. and guessing its because kernel version problems....

Thanks
sirmonkey
 
Posts: 5
Joined: Fri Sep 11, 2015 9:58 pm


Return to Broadcom

Who is online

Users browsing this forum: No registered users and 4 guests