---
title: Display for Orange Pi Zero
date: 2017-03-05T17:00:22+00:00
modified: 2025-10-27T10:23:11+00:00
image:: https://kaspars.net/wp-content/uploads/2017/03/display-for-orange-pi-zero.jpg
permalink: https://kaspars.net/blog/spi-display-orange-pi-zero
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
category:
  - Electronics
  - Linux
  - Video Blog
post_tag:
  - Orange Pi Zero
  - raspberrypi
post_format:
  - Video
---

# Display for Orange Pi Zero



After figuring out the [GPIO pin names](https://kaspars.net/blog/linux/orange-pi-zero-gpio) for the [Orange Pi Zero](https://kaspars.net/go/orange-pi-store) expansion port it is relatively easy to configure any TFT display as [a FBTFT device](https://github.com/notro/fbtft/wiki/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](https://github.com/torvalds/linux/tree/master/drivers/staging/fbtft) out of the box.

The display I have is very similar to this [3.2″ Waveshare touch-screen display](http://www.waveshare.com/product/3.2inch-RPi-LCD-B.htm) ([AliExpress](https://kaspars.net/go/waveshare-32inch-display) / [Amazon](https://kaspars.net/go/amazon-waveshare-3-5-touchscreen)) that uses the [ILI9340 LCD driver (PDF)](https://cdn-shop.adafruit.com/datasheets/ILI9340.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 `PA00` maps to **GPIO 0**, connected to `RST`
- H2+ port `PA03` maps to **GPIO 3**, connected to `DC`
- 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 `/dev/fb8`.

Here is the display running `htop`:

[![3.2″ TFT LCD Display for Orange Pi Zero Over SPI](https://kaspars.net/wp-content/uploads/2017/02/orange-pi-zero-tft-lcd-display-320x240-waveshare.jpg?strip=all&quality=90&resize=800,534)](https://kaspars.net/wp-content/uploads/2017/02/orange-pi-zero-tft-lcd-display-320x240-waveshare.jpg)

## Permanent Setup

Create a new file `/etc/modules-load.d/fbtft.conf` with the following content:

```
fbtft_device
```

Create another file `/etc/modprobe.d/fbtft.conf` with the configuration for the `fbtft_device` device:

```
options fbtft_device custom name=fb_ili9340 gpios=dc:3,reset:0 speed=16000000 busnum=1 rotate=90
```

Finally, edit `/boot/armbianEnv.txt` to map the console output to the framebuffer device during the boot, by appending the following:

```
extraargs="fbcon=map:8"
```