Pirate Audio - kernel driver for LCD

In case anyone is interested in making the Pirate Audio LCD screen work as a kernel / fb controlled device (rather than from userland/python code), here is what I did.

  1. Hardware: The orig pinout showed LCD SIP CS on pin 24, BUT it is actually on Pin 26 - HOWEVER, that is also SPI CE1 (so kernel driver cant really control it…presume userland code just overwrites without checking whether it is used elsewhere??)

SOLUTION:

  • join pin 24, 26 on the PiAudio board
  • Bend over pin 26 on the Rpi connector

2.a Driver (manually loading)
modprobe --first-time fbtft_device name=fb_st7789v custom width=240 height=240 speed=32000000 gpios=led:13,dc:9,cs:8

The Pirate audio LCD will appear as /dev/fb1 (presuming you have std HDMI on /dev/fb0)

2.b. To load driver modules on boot:

  • create file /etc/modules-load.d/fbtft.conf and add lines;

spi-bcm2835
fbtft_device

  • create file /etc/modprobe.d/fbtft.conf and add lines;

options fbtft_device name=fb_st7789v custom width=240 height=240 speed=32000000 gpios=led:13,dc:9,cs:8

Hope that’s useful
Matt

1 Like