UART, I2S, I2C, SPI peripheral support

Dear RockPi4 developers,

I wonder if there’s any progress on the peripheral support for the RockPi4. It would not just be great to use standard Pi HATs, but more importantly, it would allow embedded developers to use your product in their designs. Instead of having hobbyists buy 1 or 2, you can have companies buying hundreds, maybe even thousands of RockPi4 units. I’m one of those people. Think about it. Let me know once you have device tree overlays in place.

Cheers,

Pieter

Hi, Pieter

Work in progress now. Please check

https://github.com/radxa/u-boot/commits/stable-4.4-rockpi4

U-boot dtbo support is added already.

2 Likes

Ok. Seems there is some progress. Libmraa is present now which solves 50% of my needs. But I2S… I really really need it. Has any work been done on overlays for the I2S interface? Thanks.

Which HAT do you want to support on I2S?

Currently we use systems that are compatible with the following:

The Fe-Pi Audio HAT https://fe-pi.com/products/fe-pi-audio-v1

Even better: Hifiberry “DAC+ ADC” HAT https://www.pi-shop.ch/hifiberry-dac-adc

If the Rockpi4 kernel could support these with dt overlays, that would be ideal! Thanks in advance.

Cheers!

We are getting in touch with Hifiberry now. They are kindly sending us some HATs to get them working. I will update the status here.

@jack superb! Thanks in advance!

Hi @jack ! Any progress? :slight_smile:

We just got the hiberry board yesterday. The sample was sent to German, and then was brought to Taiwan computex and then was brought to our office. :joy:

Nice! The Hifiberry “DAC+ ADC” model?

The silkscreen is

HifiBerry DAC+ Light HW1.3

@jack Nice. That should be identical (in terms of drivers) to what we use now.

Hi @jack. Don’t want to push you too hard, but any progress? :smile:

We have some progress. @brian is working on it and we have the sound from the DAC+ now. Please wait for the kernel updates.

2 Likes

Hi, HiFiBerry is supported on ROCK Pi 4. See https://wiki.radxa.com/HiFiBerry

2 Likes

Hello
May someone could give the required hints for how to make this work?

What image must or should be used?
Is it ok to use The Armbian image linked at https://wiki.radxa.com/Rockpi4/downloads ?
If not what else: Ubuntu Server? Debian Desktop?

When I follow these steps on Radxa’s Armbian build
https://wiki.radxa.com/Rockpi4/dev/libmraa
the essential packages installation throw errors

root@rockpi4b:~# sudo apt-get install rockchip-fstab
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  rockchip-fstab
0 upgraded, 1 newly installed, 0 to remove and 131 not upgraded.
Need to get 1,036 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://apt.radxa.com/stretch stretch/main arm64 rockchip-fstab all 0.1 [1,036 B]
Fetched 1,036 B in 0s (4,701 B/s)
Selecting previously unselected package rockchip-fstab.
(Reading database ... 66131 files and directories currently installed.)
Preparing to unpack .../rockchip-fstab_0.1_all.deb ...
Unpacking rockchip-fstab (0.1) ...
Setting up rockchip-fstab (0.1) ...
sed: -e expression #1, char 0: no previous regular expression
mount all partitions
mount: mount point vfat does not exist
dpkg: error processing package rockchip-fstab (--configure):
 subprocess installed post-installation script returned error exit status 32
Errors were encountered while processing:
 rockchip-fstab
E: Sub-process /usr/bin/dpkg returned an error code (1)

and then also

root@rockpi4b:~# sudo apt-get install rockpi4-dtbo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  rockpi4-dtbo
0 upgraded, 1 newly installed, 0 to remove and 131 not upgraded.
1 not fully installed or removed.
Need to get 3,040 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://apt.radxa.com/stretch stretch/main arm64 rockpi4-dtbo all 1.1 [3,040 B]
Fetched 3,040 B in 0s (14.4 kB/s)
Selecting previously unselected package rockpi4-dtbo.
(Reading database ... 66131 files and directories currently installed.)
Preparing to unpack .../rockpi4-dtbo_1.1_all.deb ...
mv: cannot stat '/boot/hw_intfc.conf': No such file or directory
Unpacking rockpi4-dtbo (1.1) ...
Setting up rockpi4-dtbo (1.1) ...
Setting up rockchip-fstab (0.1) ...
sed: -e expression #1, char 0: no previous regular expression
mount all partitions
mount: mount point vfat does not exist
mount: mount point vfat does not exist
dpkg: error processing package rockchip-fstab (--configure):
 subprocess installed post-installation script returned error exit status 32
Errors were encountered while processing:
 rockchip-fstab
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think that is prob old you should try the armbian site maybe.

https://www.armbian.com/rock-pi-4/

Yeah, I already used the image from armbian website. Already when it was only in beta (support) it worked fine for my needs, and I was able to decompile the dtb file, configure the i2c port, recompile, reboot and it worked fine. Even with 400kHz clockrate.

But the same thing does not work for SPI ports.
As SPI1 is used for the flash, I always tried SPI2.
But there is no /dev/spi* and all my attempts wasn’t successful.

Just found this How to use SPI (easiest way)
theoretically answering the question about the images supporting libmraa …

1 Like