I’m trying to get Waveshare’s 3.97” E-Paper Display to work on the aml-s905x-cc-v2 Sweet Potato, and I haven’t been able to do so yet. I confirmed the display module works by running the example code on their wiki page on a Raspberry Pi 1B+.
I loaded Debian 12 from elsewhere on this forum; uname -nr says Linux debian-12-aml-s905x-cc 6.1.74-12781-g74961fb0a5d2.
Per How to Enable SPI on AML-S905X-CC Le Potato , I enabled SPI via sudo ldto enable spicc spicc-spidev. This creates /dev/spidev1.0, not /dev/spidev0.0 as the docs suggest it should; I haven’t been able to figure out why. /sys/bus/spi/devices contains both spi0.0 and spi1.0, but echo spidev0.0 | sudo tee /sys/bus/spi/drivers/spidev/bind gives the error No such device. I don’t know if this numbering mismatch is important.
spi-config -qd /dev/spidev1.0 says /dev/spidev1.0: mode=0, lsb=0, bits=8, speed=30000000, spiready=0.
I patched the example code to account for this change in numbering:
$ diff lib/Config/DEV_Config{.orig,}.c
441c441
< SPI_Handle = lgSpiOpen(0, 0, 10000000, 0);
---
> SPI_Handle = lgSpiOpen(1, 0, 10000000, 0);
Running the resulting binary produces no errors, but also has no effect. I’ve also tried adjusting the bitrate (the third argument there) from the given 10MHz to 1Mhz and 30MHz; neither makes a difference. I confirmed that it does work with the Raspberry Pi at 40MHz; on the RPi, spi-config says /dev/spidev0.0: mode=0, lsb=0, bits=8, speed=125000000, spiready=0, and updating the example code to try to connect at that default 125MHz has no effect - the e-ink display stays blank.
I’m not sure what else to try at this point. My only theory right now is that somehow I’m enabling SPI wrong, and spidev1.0 is using different pins than the display hat expects, but I don’t know how to test that or how to fix it. Does anyone have any suggestions?