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.63k stars 1.15k forks source link

Trying to port lib to work with rk3566 and rk3399. #1515

Open kvjoshi opened 1 year ago

kvjoshi commented 1 year ago

Due to the recent shortages of rpi , im trying to make the script work on rk3599 initially and later on rk3399 for rock 3 and rockpi 4.

any guidance would be appreciated if anyone has tried to do so.

hzeller commented 1 year ago

You essentially need to read the datasheet of your SoC and re-implement the interface provided by gpio.h. If your SoC has a way to memory map GPIO pins (most important for fast access), you should be ready to go.

If you also has a way to create nicely timed pulses per hardware (as implemented as the HardwarePinPulser in gpio.cc, the output might also be pretty glitch-free. If not, the fallback implementation that manually wiggles the pin with a usleep() is a good default.

kvjoshi commented 1 year ago

ok thanks , looking at the datasheets now.

652436962 commented 1 year ago

ok thanks , looking at the datasheets now.

hello have you finish it?

kvjoshi commented 1 year ago

no. i put it on hold , mapping different gpio blocks is a little time consuming. shifted to teensy SmartMatrix as an alternative. will be resuming next month, was facing issues with accessing dev/mem

xuniuer commented 1 year ago

Eager for further update on porting lib with rock chip...

jaygarcia commented 1 year ago

You essentially need to read the datasheet of your SoC and re-implement the interface provided by gpio.h. If your SoC has a way to memory map GPIO pins (most important for fast access), you should be ready to go.

If you also has a way to create nicely timed pulses per hardware (as implemented as the HardwarePinPulser in gpio.cc, the output might also be pretty glitch-free. If not, the fallback implementation that manually wiggles the pin with a usleep() is a good default.

Thank you @hzeller ! I started to look at the internals to begin porting this for the Orange Pi5B. Assuming i can get one set working with being wired directly, I will work on a compatible daughter board using the schematics you have in this repo as a base.

My goal is to create a PR for all of this to use and hopefully get Electro Dragon to mass produce the daughter boards.

More to come :)

kvjoshi commented 1 year ago

@jaygarcia all the best. due to changes in my schedule, I had to bench the port for rockchip.

SturdyCat commented 11 months ago

no. i put it on hold , mapping different gpio blocks is a little time consuming. shifted to teensy SmartMatrix as an alternative. will be resuming next month, was facing issues with accessing dev/mem

@kvjoshi Closing kernel "CONFIG_STRICT_DEVMEM" makes "mmap" work.

paulpham1407 commented 8 months ago

@SturdyCat , How to shutdown kernel CONFIG_STRICT_DEVMEM=n