After figuring out the GPIO pin names of the Orange Pi Zero expansion port it is relatively easy to configure any TFT display as a FBTFT device attached over the SPI bus, as long as you know the name of the chip used to drive the LCD screen. Here is a list of all the chips supported by the Linux kernel out of the box.
The display I have is very similar to this 3.2″ Waveshare touch-screen display that uses the ILI9340 LCD driver (PDF) chip. It was only a matter of specifying the two GPIO pins used for
DC (Data or Command) and
RST (Reset) in addition to the SPI port.
- H2+ port
PA00maps to GPIO 0, connected to
- H2+ port
PA03maps to GPIO 3, connected to
- H2+ SPI bus 1 is connected to the display module SPI pins.
The following command can be used to load the FBTFT device with the required configuration:
$ sudo modprobe fbtft_device custom name=fb_ili9340 gpios=dc:3,reset:0 speed=16000000 busnum=1 rotate=90
And then map the console output to the newly created framebuffer device:
$ con2fbmap 1 8
where 8 stands for
Here is the display running
Create a new file
/etc/modules-load.d/fbtft.conf with the following content:
Create another file
/etc/modprobe.d/fbtft.conf with the configuration for the
options fbtft_device custom name=fb_ili9340 gpios=dc:3,reset:0 speed=16000000 busnum=1 rotate=90
/boot/armbianEnv.txt to map the console output to the framebuffer device during the boot, by appending the following: