Attempting to Use spicc-st7789v-240x240.dts Overlay with Waveshare 2-inch LCD Module on aml-s905x-cc Le Potato

Hello everyone,

I’ve been working on integrating the Waveshare 2-inch LCD module ( with my aml-s905x-cc Le Potato board running Raspbian 11 Bullseye. The LCD uses the ST7789V driver and communicates via SPI.

Additional Context : I have the UART-A overlay enabled on my Le Potato board to utilize the UART functionality on pins 8 (TX), 10 (RX), 16 (CTS), and 18 (RTS). However, based on the pin assignments, I believe there shouldn’t be any conflicts between the UART-A and the LCD SPI functionalities.

To get started, I tried using an existing device tree overlay, spicc-st7789v-240x240.dts, which seemed close to what I needed, even though my LCD resolution is 240x320. Here’s a brief overview of what I tried and the issues I faced:

  1. Overlay and Wiring: I initially wired the LCD according to the provided documentation. Realizing that the spicc-st7789v-240x240.dts overlay had specific GPIO assignments, I rewired the LCD to match the overlay.
  2. Driver Loading: I found two potential drivers in the kernel for the ST7789V - one in the DRM directory (panel-sitronix-st7789v.ko) and another in the staging/fbtft directory (fb_st7789v.ko). I attempted to load both using insmod, but faced issues with the fb_st7789v.ko due to missing symbols related to the fbtft module.
  3. Testing with modetest: After successfully loading the panel-sitronix-st7789v.ko module, I attempted to set display modes using modetest. However, I couldn’t set the correct mode for the LCD. The available modes didn’t match the LCD’s resolution.
  4. Current Status: The LCD panel is not displaying anything. I’ve checked dmesg for any hints or errors, but couldn’t find any direct issues related to the LCD initialization or mode setting.

I wanted to reach out to the community to see if anyone has faced a similar challenge or has insights into making this LCD work with Le Potato using the mentioned overlay.

Any suggestions, advice, or shared experiences would be greatly appreciated!

Thanks in advance, Nick Ferrara

I have successfully made it work by doing sudo ldto merge spicc spicc-st7789v-240x240 with fb_st7789v driver seeming to operate without my doing anything. I even can write to the display making it a white background sudo dd if=/dev/zero bs=1 count=153600 2>/dev/null | tr "\000" "\377" > /dev/fb1, however, there is a constant artifact in the top of the screen. I attempted to modify the existing overlay spicc-st7789v-240x240 by adjusting the width and height to 320 in two different attempts, but the issue was not resolved. Note I modified and compiled the overlay doing:

  • nano spicc-st7789v-240x240.dts (change width or height)
  • cc -E -nostdinc -I/home/potato/libretech-wiring-tool/include/ -x assembler-with-cpp -undef -o spicc-st7789v-240x240.pre.dts spicc-st7789v-240x240.dts
  • dtc -@ -q -I dts -O dtb -o spicc-st7789v-240x320.dtbo spicc-st7789v-240x240.pre.dts
  • sudo ldto merge spicc-st7789v-240x320


We have that in our labs and tuning it as we speak. There should be an overlay for it soon.

We just added a st7789v-240x320 display overlay using the legacy fbtft driver. You can try that one and let us know.

Our test display is 2" but might be different than the waveshare one.

Its great news that you guys are working on it right now!

So my display is actually utilizing the fbtft driver already, but the artifact appeared. I have made sure the wired connections are correct and messed around with the dimensions from the overlay, but nothing changes. Have you guys had issues with artifacts? I hope not, but maybe its a hardware issue with the LCD screen itself. Here is my linux output that shows this:

potato@raspberrypi:~ $ lsmod | grep fbtft
fbtft 40960 1 fb_st7789v
fb_sys_fops 16384 2 drm_kms_helper,fbtft
syscopyarea 16384 2 drm_kms_helper,fbtft
sysfillrect 16384 2 drm_kms_helper,fbtft
sysimgblt 16384 2 drm_kms_helper,fbtft

potato@raspberrypi:~ $ dmesg | grep fbtft
[ 8.331845] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 8.390465] fb_st7789v spi0.0: fbtft_property_value: width = 320
[ 8.390491] fb_st7789v spi0.0: fbtft_property_value: height = 240
[ 8.390503] fb_st7789v spi0.0: fbtft_property_value: buswidth = 16
[ 13.022377] fb_st7789v spi0.0: fbtft_update_display: write_vmem failed to update display buffer

potato@raspberrypi:~ $ ls /dev/fb*
/dev/fb0 /dev/fb1

UPDATE: It seems to work with the new overlay added to github for the 240x320 LCD screen!!! I think the rotate = <180> line did the trick. Thank you so much for developing this…it was perfect timing for me as I am implementing LCD screens this week on my prototype device.

Make sure to adjust the height and width parameters. Variations have the addressing hooked up slightly differently. Best to parameterize by display. If you can take a picture of the front and back of the display, we will add the necessary bits to the overlay to identify it.

It seems to be working with the new overlay you guys put up “spicc-st7789v-240x320-legacy.dts”, but here is the picture of the front and back of the display in case you mean something more specific that I am missing. Thank you!

1 Like

Yeah, make sure to try to switch the width and height numbers since the display readout may be different on variations.

1 Like