SPI on Orange PI PC (Dietpi V.126) Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
BastelWastl

SPI on Orange PI PC (Dietpi V.126)

Post by BastelWastl »

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!
BastelWastl

Re: SPI on Orange PI PC (Dietpi V.126)

Post by BastelWastl »

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.)
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: SPI on Orange PI PC (Dietpi V.126)

Post by k-plan »

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- ... /?ALLSTEPS

http://forum.armbian.com/index.php/topi ... nge-pi-h3/

http://orange314.com/Hardware
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
BastelWastl

Re: SPI on Orange PI PC (Dietpi V.126)

Post by BastelWastl »

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: I think the current Kernel does not fully support SPI on the Orange Pi PC.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: SPI on Orange PI PC (Dietpi V.126)

Post by Fourdee »

BastelWastl wrote: 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:

Code: Select all

lsmod
Maybe there is a disabled module for SPi:

Code: Select all

cat /etc/modules
ARMbian docs has 1 mention of SPI: http://docs.armbian.com/Hardware_Allwinner-H3/

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
BastelWastl

Re: SPI on Orange PI PC (Dietpi V.126)

Post by BastelWastl »

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.
Post Reply