hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.57k stars 1.14k forks source link

is it possible to use with a rockpro64 from pine64 with a rk3399 #1489

Open hannescam opened 1 year ago

hannescam commented 1 year ago

i want to use this amazing library with the rockpro64 becaue all of my raspberries died

anandrajgupta commented 1 year ago

https://github.com/hzeller/rpi-rgb-led-matrix/issues/1460

hannescam commented 1 year ago

so is it possible to run this code with a led panel on a rk3399? should i just try

hannescam commented 1 year ago

@anandrajgupta i tried and there was a not a raspberry pi error and a premission error

ledvinap commented 1 year ago

@hannescam : At first glance, it may be possible. At minimum, you will need:

Thinking of it, it may be relatively easy to do...

ledvinap commented 1 year ago

GPIO implementation is quite different on rk3399, there is no SET/CLEAR register and 3 IO blocks are connected to 40pin header. High-performace implementation will be more difficult and cooperation with other software using GPIO access will be problematic.

hannescam commented 1 year ago

and what about the allwinner a64 or d1

ledvinap commented 1 year ago

Both have very similar GPIO implementations as Rockchip ...

hannescam commented 1 year ago

what other options are ecxept than a raspberry pi that could work with this software with little/no modification

ledvinap commented 1 year ago

Seems that Broadcom has quite unique GPIO implementation, probably caused by CPU being far prom GPIO (GPU is first-class citizen). rk3399 should be possible, at least as proof-of-concept version. It should be quite easy to rewrite current code to unpack framebuffer data and write it into corresponding registers. Just check usage of other IO in used banks (only GPIO OUT mode is important)

hannescam commented 1 year ago

cool it would be great if this project could be opend up to other platforms (not just these stupid expensive fast braking things i broke 5 allready) but i am not smart egnuth to implement this

bluelasers commented 1 year ago

There may be a way of working around the GPIO issues with a kernel module. However, the GPIO does work differently. This code base uses a kernel module to gain access to the GPIO or bypasses with /dev/mem.

Has anyone tried using /dev/mem with GPIO to see what the performance is on RockChip?

ledvinap commented 1 year ago

@bluelasers : this project does access GPIO directly, both in /dev/gpiomem and /dev/mem case. Problem is cooperating with kernel (or other) code that uses pins in GPIO mode. But is quite possible that no such pins are vital for this use case (pins that use other GPIO mux setting are fine).

hannescam commented 1 year ago

i think with the kernel module it will be too slow i didnt ever develop any kernel modules so correct me if i am wrong

andytheengineerguy commented 12 months ago

Hi @hannescam, any update on this 5 months later? I am running into the same issue using a pine64 OSQuartz. Would love to use a raspberry pi compute module but still, none are available :(

andytheengineerguy commented 12 months ago

@ledvinap, did you ever try the proof of concept version for any rockchip CPU?

ledvinap commented 12 months ago

@andytheengineerguy : Sorry, I didn't even try, I have no use for RK boards.