This is Device Tree Overlays of WaveShare SpotPear 3.2" TFT LCD and WaveShare SpotPear 3.5" TFT LCD for the Raspberry PI and PI 2 using notro's FBTFT driver.
Note that the waveshare 3.5/4.0" lcd's overlay is almost same with JBTek overlay.
=== Update: The fbtft drivers have been absorbed into the official linux kernel tree. Step 1 can be skipped.
- Follow the steps on notro's wiki for installing the fbtft driver on your pi/pi2 (Your PI will not boot with the LCD attached until the right overlay is specified in /boot/config.txt)
- Clone my repo onto your pi
git clone https://github.com/swkim01/waveshare-dtoverlays.git
- According to your LCD's type, copy the overlay file waveshare32b-overlay.dtb or waveshare35b-overlay.dtb to
/boot/overlays
as root
sudo cp waveshare-dtoverlays/waveshare32b-overlay.dtb /boot/overlays/
or
sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/
- Specify this overlay file in your
/boot/config.txt
along with activating SPI
dtparam=spi=on
dtoverlay=waveshare32b
or
dtparam=spi=on
dtoverlay=waveshare35a
You can configure some parameters of the lcd module like this:
dtoverlay=waveshare32b:rotate=270
dtoverlay=waveshare35a:swapxy=1
- reboot your raspberry pi
After then, you have to calibrate touch position as to FBTFT wiki.