SparkFun Top pHAT Hookup Guide

Pages
Contributors: santaimpersonator
Favorited Favorite 2

2.4" TFT Display (Linux 5.4 Update)

For users who are utilizing the latest distribution of the Raspberry Pi OS with a kernel that has been built after the Linux 5.4 update, the fbtft device has been removed from the available driver modules. The following instructions are the Aug 2020 release (2020-08-20) and later. For prior distribution releases, users should refer to the instructions from Archived section.

linux version
Linux version listed.

Download the device tree source file sfe-topphat-overlay.dts by clicking on the link or the button below.

downloaded file
The sfe-topphat-overlay.dts file downloaded to the home directory.

Compile the overlay file from the download location:

language:bash
dtc -@ -I dts -O dtb -o rpi-display.dtbo sfe-topphat-overlay.dts

compile the overlay file
The overlay file compiled and listed in the home directory.

Copy the compiled file to the device tree overlays directory:

language:bash
sudo cp rpi-display.dtbo /boot/overlays

copied file
Compiled file copied to the device tree overlays directory.

Use your preferred text editor to enable the overlay during boot by adding the following line to the end of the /boot/config.txt file. The example below uses nano with the following command: sudo nano /boot/config.txt.

opening text editor
Opening a text editor to modify the /boot/config.txt file.

Add the following text to the end of the /boot/config.txt file:

dtoverlay=rpi-display,speed=32000000,rotate=270

modifying file
Adding changes to the end of the /boot/config.txt file.

Once these changes have been made, reboot the Raspberry Pi with the sudo reboot command for the changes to take effect.