Access to SPI / UART / I2C


#1

Hi,

When using the Ubuntu server image, I tried to use the SPI and UART peripherals. But it seems that the default UART port (PIN 14 and 15 on the connector) outputs the linux debug serial. Is there any way to change the default behavior and get access to the UART peripheral on those RPi standard pins for user programms? (To gain compability with some RPi HATs).

I also can’t seem to find a spidev device for the SPI peripheral (PIN 19, 21, 23, 24). Is the software support already implemented?

Haven’t had the time to look for the I2C devices, but when we are already at the topic, are they supported yet (PIN 3 and 5, and also the PI HAT EEPROM reading I2C device on Pin 27 and 28)?


#2

On Raspberry it works like this to disable that terminal on the UART:

systemctl disable getty@tty1.service
systemctl stop serial-getty@ttyAMA0.service
systemctl disable serial-getty@ttyAMA0.service


#3

That still leaves the kernel console output on boot on serial0 on a Raspberry Pi. You need to remove the serial configuration inside the /boot/cmdline.txt to free the serial device.

So the question still is: How to do all these things on a Rockpi 4?


#4

Yes, and indeed /boot is empty :frowning:

Which also leads me to believe that the device tree is one giant lump, and quite likely static (?). Seeing this file, for instance:

I agree, HAT compatibility is essential. Why else have pin and voltage compatibility with the 40 pin Pi2 header…


#5

Currently the device for ROCK Pi 4 is everything in a single dtb. Device tree overlay is not enabled yet. We are working on it now. Next release we will enable dtb overlay support.


#6

@Jack thanks for the info! Looking forward a lot. Do you think it’s worth it to hack the kernel myself? Is this page up to date? https://wiki.radxa.com/Rockpi4/dev/Debian


#7

Looking for info on the gpio pin comparison the rpi 3. I have a HAT that uses the serial port 0 and i2c on rpi

(here are the rpi pin assignments I use)
gpio 14 pin 8 txd0
gpio 15 pin 10 rxd0

and the i2c bus 1

gpio 02 pin 3 sda1
gpio 03 pin 5 sdl1

the wiki for rockpi is confusing - https://wiki.radxa.com/Rockpi4/hardware/gpio

Is there a better link to verify the pin assignments for the gpio on the Rock pi 4


#8

Hi,

We have added the GPIO number in the GPIO table.

https://wiki.radxa.com/Rockpi4/hardware/rockpi4#gpio


#9

Nice, is the device tree also functional now?


#10

I’m also interested in using the I2C port in order to switch from other boards to this one.
my question is: I have a MVP product demo in mid of April. any chance to have it supported until then?