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:
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:
sudo apt update
sudo apt dist-upgrade
sudo ldto enable spi0-cs1
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.
sudo ldto merge spi0-cs1
sudo ldto merge spi0-cs1-ili9486-xpt2046
sudo ldto reset
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" EndSection
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" EndSection