SPI on Orange PI PC (Dietpi V.126)

Hello,
I’m working on a project which uses SPI to control a 8x8 LED Matrix via Python. On my original Raspberry Pi 2 everything works fine, so the code is not the problem. When I try the same on my Orange Pi PC (also using DietPi V.126, same Libraries, …) the code runs without error but the Matrix shows not what it should. Is SPI fully supported in the DietPi Image for Orange Pi PC? I applied the same configuration settings in dietpi-config / config.txt. Anyone here using SPI on a Orange Pi PC? Many thanks for any hint!

Bootlog contains the following messages:

root@OrangePi:~# dmesg|grep spi
[ 0.435183] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[ 0.435198] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
[ 0.435772] spi spi0: master is unqueued, this is deprecated

Does that mean SPI is not properly supported in the Orange Pi PC image? I updated to V129 in the meantime.
(My Raspberry Pi doesn’t show these messages with the same Dietpi-Version, everything works fine there.)

Hi,

no really ken with SPI or Orange Pi, but I think it’s a problem with GPIO pinout (numbering).
OrangePI PC has a armbian based image now. https://github.com/Fourdee/DietPi/issues/349

Please have a look:

http://www.instructables.com/id/Orange-Pi-One-Python-GPIO-basic/?ALLSTEPS

http://forum.armbian.com/index.php/topic/759-tutorial-i2s-on-orange-pi-h3/

http://orange314.com/Hardware

Thanks a lot for your reply!
I’m using SPI in one direction only, so I use Pins 19 (MOSI), 23 (CLK) and 24 (CS / CE). These Pins are exactly the same (according to the H3 GPIO Pinout documentation) on the Raspberry PI - where everything works. Also the other GPIO-Pins that I use are working on the OPi PC, only SPI drives me crazy… :roll_eyes: I think the current Kernel does not fully support SPI on the Orange Pi PC.

Hi,

We use ARMbian buildtools to compile our OPi PC image. In turn, it compiles the sun8i kernel.

Unfortunately, when it comes to GPIO/SPI, my experience is limited to HATS and audio cards.

Might be worth checking the loaded modules with:

lsmod

Maybe there is a disabled module for SPi:

cat /etc/modules

ARMbian docs has 1 mention of SPI: H2+ and H3 - Armbian Documentation

Beyond that, your best bet would be to ask the OPi PC comminuty. Might also be worth trying the base ARMbian image and seeing if you have any success with SPI there.

Hi Fourdee,

thanks for your feedback! I checked the running modules, only 8189es was configured to load. I saw that there is a ‘gpio_sunxi’ in modules so I enabled that but without success. The boot-message still appears. I’ll try to dig deeper in the armbian-corner…
Anyway: Thanks for the great work! For me DietPi is by far the best light-weight system - so comfortable and easy to configure.