SPI display on J3

How to configure the CM3-Home board to use an SPI display on J3 connector

/boot/config.txt

dtparam=spi=on
dtoverlay=rpi-display,speed=32000000,rotate=270
#dtoverlay=ads7846,cs=0,penirq=34,speed=10000, swapxy=0, pmax=255, xohms=60, xmin=200, xmax=3900, ymin=200, ymax=3900

Enable for Console

Run in console (not desktop terminal):

con2fbmap 1 1

To make it permanent (on Debian) add to the file /boot/cmdline.txt at the end of the line the following Kernel arguments:

fbcon=map:10 fbcon=font:VGA8x8

Raspberry CM3 to SPI display wiring

Signals Raspberry pins
RST GPIO 23
D/C GPIO 24
CS GPIO 8 (CS0)
MISO GPIO 9 (MISO)
MOSI GPIO 10 (MOSI)
SCK GPIO 11 (SCK)
Backlight GPIO18 (1=on)

Raspberry CM3 to ADS7846 touch chip

Signals Raspberry pins
CS (15) GPIO 7 (CS1)
DOUT (12) GPIO 9 (MISO)
DIN (14) GPIO 10 (MOSI)
DCLK (16) GPIO 11 (SCK)
PENIRQ (11) GPIO 25

Usng with Xorg

sudo FRAMEBUFFER=/dev/fb1 startx &
sudo DISPLAY=":0" matchbox-window-manager
sudo DISPLAY=:0 midori -e Fullscreen -a www.tanzolab.it &

Sergio Tanzilli (Autore - Progettista hw & sw - Imprenditore - Musicista dilettante, classe 1964)
Fondatore di Area SX srl, Acme Systems srl e del TanzoLab, si occupa dal 1974 di elettronica digitale, dal 1978 di microprocessori, dal 1992 di microcontroller, dal 1995 di Linux e pubblicazioni su Web, dal 2005 di progettazione, produzione e commercializzazione di schede Linux Embedded.
http://www.tanzilli.com - http://www.acmesystems.it - https://github.com/tanzilli - sergio@tanzilli.com