Le Potato S905X USBTV and APA102 Leds

Hi, i’ just got a Le Potato board and i’m struggling to replicate the setup i had with RPI3, i use Kodi + APA102 Leds atached to the board with Hyperion Plus a Fushicai USB grabber and i’m having the following issues with CoreELEC and if someone can at least point me to a direction i would be very happy, the issues are the following:

1 - My grabber is not recognized as /dev/video0 in CoreELEC
2 - My Hyperion looks for an interface called /dev/spidev.00, but it appears that is not present in the latest builds, i read something about binding spi interface to the gpio but i’m not really sure if this is done in latest CoreELEC

i tried the latest stable LibreElec, it recognizes my grabber but not spidev interface, maybe because of the old kernel? i’m really lost here so i’ll apreciate any tips before going to the “attach your leds to arduino uno” route, since i was using everything with just a RPI3 before.

Thanks in advance!

@Portisch may be able to offer more help here.

You do not need the usb grabber for the amlogic device. It have a frame grabber already implemented. You just need a hardware (Arduino/RPI) to make a connection between the Le Potato and the leds. I use a Arduino uno for this. And use the hyperion.ng addon from the CoreELEC repo!
I don’t know anything about a spidev device. And the hyperion.ng addon does not use video0, it uses amvideocap.

Thanks for the response. Is there any way to attach my leds directly to my board’s GPIO instead of using Arduino just like i was doing with my RPI?

In this post from le potato support forum they talk about some device tree overlay structure using lc_overlay tool to bind the SPI interface to GPIO, i think that’s what spidev is all about, but i’m not sure.

@Portisch in your setup you have ambilight for every HDMI source? That’s how i was using back then. Can i achieve this using the internal frame grabber?

Hmmm, does Hyperion.ng support SPI direct? Then I guess it should be possible to use one of the gpio pins. This will need more research.

And I do not have a usb grabber. I just use everything with the CE device. Live TV, DVD, movies, YouTube,…
So yes, it support only the HDMI on the CE device. But there are some options to use another grabber what get choosen by a higher priority like the Boblight server.

May you try this:
Check if driver is loaded:
ls /dev/spi*

If nothing:
mount -o rw,remount /flash

Then:
fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000 status okay

Reboot and check again the driver.

This for the N2 but maybe it is the same on Le Potato.

Unfortunately didn’t worked

Error at '/soc/cbus@ffd00000/spi@13000': FDT_ERR_NOTFOUND

As far as I can tell, the Le Potato DTB doesn’t define SPI.
It’s possible on the N2, not the Le Potato. At least without some more intricate DTB tweaking.

I thought this patchwork introduced SPI on this board, sorry if i’m saying nonsense, i really feel i’m outta my league talking about DTB tweaks.

https://patchwork.kernel.org/patch/9746585/

and here

Hi there,
supporting SPI on the LePotato would be really great to directly communicate to the LEDs.
Are there any news? There are some threads on the internet that seem to have this issue but it has not yet been solved.
I’m willing to help if someone could tell me if it’s really possible and with a small hint to a starting point.
Thanks a lot!

Seems like only a device tree patch and maybe a small kernel patch is needed: https://forum.loverpi.com/discussion/334/spi-device-interface - Why is this still not implemented?

I have added spi on the lepotato to the list of things for the developers to look at for the next release.

1 Like

In the meantime I got a bit-banging driver to work: https://github.com/V10lator/linux-amlogic/blob/DT2/arch/arm64/boot/dts/amlogic/coreelec-gxl/lepotato_SPI.dts

MOSI is pin 38
CLK is pin 40

So not the best mapping but bettern than nothing.

Download dtb: LePotato_dtb.img (110 KB)

//EDIT: New dtb for Coreelec Matrix 19 (build against 19.0-Matrix_nightly_20201227) : LePotato_dtb.img (110 KB)