Spidev @ CoreELEC 9.2.2

Hello to the community,

At CoreELEC 9.2.1, I was able to activate SPI / spidev by dtb overlay, see https://wiki.odroid.com/odroid-n2/application_note/gpio/spi#tab__odroid-n2.
I was also trying to enable it at 9.2.2, but the proposed method does not work anymore:
CoreELEC-N2:~ # fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000/spidev@0 status “okay”
Error at ‘/soc/cbus@ffd00000/spi@13000/spidev@0’: FDT_ERR_NOTFOUND

Is there any other possible way, or do I have to recompile kernel and/or dtb?

Thanks,
bolzenwolf

There is no spidev node, it was removed in nighties some time ago, we can add it back if you require it but I’m curious what is your use case for it?

Hi Adam,
thanks for your answer.
I was building a little retro sound system a few years ago, using an external SPI display connected to a C2. After switching to N2, I was still able to use my previous add-ons without any porting effort.
So, it would be great to have spidev node back, or do you have any other suggestions for SPI communication?

Thanks,
Thomas

I will send you a dtb to try later.

1 Like

Great, thanks a lot.

Dear Adamg, please send me dtb too!
I`ve bought N2 for amblilight (hyperion) . Afrer update to 9.2.2 it is dead :frowning:

Thank you!!!

@bolzenwolf @levran
Here a test image with enabled SPI for N2 & C4:
https://test.coreelec.org/Portisch/CoreELEC-Amlogic-ng.arm-9.2-devel-1591709697.tar

Please update your device with this image and test if SPI is working again, thx!

At least the SPI device is now enabled:

CoreELEC:~ # lsmod | grep spi
spidev                 20480  0
spi_meson_spicc        20480  0
CoreELEC:~ # ls /dev/spidev*
/dev/spidev0.0      /dev/spidev32766.0

EDIT: I performed the test by myself and SPI is working again with tomorrows nightly:

CoreELEC:~/backup # ./spidev_test -D /dev/spidev0.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
01 02 03 04

Great!!!
It works!!!

Hi, I’m running CoreELEC (official): nightly_20200626 on an ODROID N2. Should the SPI module work out of the box @Portisch ? Because I’m unable to find it in the modules.

KodiWohnzimmer:~ # lsmod | grep spi
KodiWohnzimmer:~ # ls /dev/spidev*
ls: /dev/spidev*: No such file or directory
KodiWohnzimmer:~ #

Is it still required to load the module somehow?

EDIT:

Got it to work using the following snippets:

mount -o remount,rw /flash
fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000/spidev@0 status "okay"
fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000 status "okay"
echo "spidev" >> /storage/.config/modules-load.d/spi.conf
echo "spi-meson-spicc" >> /storage/.config/modules-load.d/spi.conf
reboot

Only fdtput with setting status to okay is enough.

1 Like

About | FAQ | Terms of Service | Privacy Policy | Legal Notice