ROC-RK3328-CC (Renegade) 480x320 ILI9486 SPI Touchscreen Display

ILI9486 is the chip powering most 3.5" SPI displays targeted for Raspberry Pi and features a 480x320 resolution. The touch controller is based on XPT2046 chip.

Some common names for compatible displays are:

  1. MHS3528
  2. MPI3501
  3. Waveshare 3.5’ RPi LCD A
  4. Velleman VMP400 (Rebrand MPI3501)

The upstream Linux driver was fixed by one our consultancy BayLibre on 2022-11-28 and that software work should appear in Linux 6.3. You will need to use our kernel with at least version 6.0.10-00437 or higher.

To get it working:

  1. sudo apt update
  2. sudo apt dist-upgrade
  3. sudo ldto enable spi0-cs1
  4. sudo ldto enable spi0-cs1-ili9486-xpt2046

If the ldto command cannot be found, install the libretech-wiring-tool. Our new images already include this so you can skip if you are using a recent image.

To apply permanently on every boot.

  1. sudo ldto merge spi0-cs1
  2. sudo ldto merge spi0-cs1-ili9486-xpt2046

To remove:

  1. sudo ldto reset
  2. sudo reboot

If you do not reboot after reset, you will not get the correct results if you merge again.

ili9486-xpt2046 is the generic overlay. We have pre-tuned the touchscreen for
mhs3528 and mpi3501 displays. To use the pre-tuned overlays, replace ili9486-xpt2046 from the instructions above with the name of the display.

If you are using X11 or Raspbian Desktop, you need to create the file /usr/share/X11/xorg.conf.d/10-ili9486.conf if it does not exist already with the following contents:

Section "OutputClass"
	Identifier	"ILI9486"
	MatchDriver	"ili9486"
	Driver		"modesetting"
	Option		"PrimaryGPU" "true"

Also disable HDMI as the primary output by editing /usr/share/X11/xorg.conf.d/10-rockchip.conf and commenting out or removing the the PrimaryGPU option.

Section "OutputClass"
	Identifier      "Rockchip"
	MatchDriver     "rockchip"
	Driver          "modesetting"
	#Option		"PrimaryGPU" "true"
1 Like

Can confirm that these instructions work! Thank you so much!

I noticed performance issues with my Renegade as well as my Le Potato using the following display:

On my Raspberry Pi 3B (1GB RAM) with the same display the GUI works smoothly and opening Chromium and browsing is not an issue. On the Renegade and Le Potato however it is practically unusable due to VERY high lag. On the Le Potato I cannot even open Chromium.

Looks like there might be a display driver issue. Any idea what I can do?

I already did:
-sudo apt update
-sudo apt dist-upgrade
-sudo apt install libretech-gpio libretech-dtoverlay
-reinstalled chromium

We are using the Linux kernel driver for ili9486. The code for LCD show does a bunch of hacks and create buffers and buffer diffs in userspace and copies it to the LCD for better performance.

1 Like