SPI on the Mainline 5.4

Hello guys, would love to get your input regarding the SPI interface on Rockpi 4.
I got a bunch of them, mostly As and using them for different projects. Haven’t used SPI up to now tho.
Now I need to use a 2.4 inch SPI display on a 1.4A, that’s got however no SPI flash soldered. Dunno why this how i got them from Allnet.

I’m running Ambian Buster 5.4.32. I’ve enabled spi-spidev overlay. Now it seems to be enabled and showing on port 1, device 0: /dev/spidev1.0 . UART4 isn’t activated.
Went on and did a loop test on GPIO1_B0 with GPIO1_A7 and it seems to communicate.
Did the binding:

MISO isn’t needed for this display.
GPIO1_A7 : SDA (MOSI)
GPIO1_B1 : SCK
GPIO1_B2 : CS (living the CS floating makes no difference )
Bound RESET and A0 in the ST7735 driver on different pins (settled for GPIO4_D2 and GPIO4_D5)
VCC and Backlight to 3.3V and Ground pin.

The ST7735 driver together with the GPIO handling I’ve implemented it in Python and test it on the Display on two other micro-controllers using spidev hardware interface also on 3.3V. There everything works fine, however on the Rockpi i see the GPIO pins for the Command line (A0) and Reset getting exported and set High or Low accordingly for communication with the display. However the display doesn’t seem to be getting anything.

So what am I missing here? Is the SPI1 port activated and running?, dunno how to check that anymore, I’ve run out of ideas. The kernel doesn’t complain about anything SPI related …
The CS pin should also be controlled by the hw right? The other controllers did handled that too.
Is the 1.4 hardware rev i got different regarding the SPI ports layout ? I have’t looked into the rock-pi-4 device tree but if the NOR SPI would be present it would be bound to SPI0 not 1 right?
I have’t tried the SPI2 port since i there is no CS overlay yet.
Hope somebody knows more. Thanks!
Bert

Did you check the raspi-config Interfacing Options to see if SPI is enabled?

I don’t have a rock-pi so I don’t know if this is possible.

Hi oket,
the tool is called armbian-config in Armbian. Its’ no use tho, afaik there should be a “Hardware” tab where you could check the state or enable/disable modules, however i haven’t seen this tab in the image I’m running. I suspect it’s specific for the pre 5.x kernels images or so. Since now every IO is device-tree-overlay driven, could be that it was removed or it’s just buggy on the rockpi images.

Anyway, the SPI “seems to enabled” or so-ish because:

overlay is activated:
*loads at boot without any errors
*/dev/ shows it enabled and running;
*/sys/class/spi_master/spi1/ is populated and it shows stats and such…
Tested the SPI using a loopback SPI test and it seems the MOSI and MISO communicate with each-other.

I reckon it’s either something related with the overlay and its params or some hardware peculiarity since I have v1.4 but have no SPI flash installed …

Maybe somebody from radxa would care to join in and share their knowledge with us? :see_no_evil:

Perhaps you should start to support people that provide you software support?

Lol, here comes the armbian police to arrest me for not paying my leeching tax .
So what is my sin here? Asking radxa questions?
I thought radxa supports you already as I am supporting them when i’m buying their hardware.