The RK3399 chip has 5 serial ports (0-4) and I got curious about using one other than "2" for some experiments. This naturally leads to asking just what pins I ought to connect to, which leads to an examination of the TRM (technical reference manual) and the schematic, and a number of discoveries which I will try to summarize here.
In short, only Uart4 is available for use on the Orange Pi 4 board. All of the ports are routed to various package pins through the usual "iomux", which needs to be configured to cause the uart to drive the pins. That is only half the story. The other half is what the pin is connected to on the board.
Here is the story with the various serial ports.
Uart 0 - internally connected to the AP6256 Wifi chip Uart 1 - internally connected to the RTL8211E ethernet Phy Uart 2 - our console, but see below Uart 3 - internally connected to the RTL8211E ethernet Phy Uart 4 - available on the 40 pin header, pins 19 and 21 (GPIO1 A7 and GPIO1 B0)The Uart 2 has some surprising issues. It can be routed to 3 different sets of pins, but only one will actually drive the console header, as follows:
Uart 2A - GPIO4 B0 and B1 -- internally connected to the SD card Uart 2B - GPIO4 C0 and C1 -- on 40 pin header, pins 8 and 10 Uart 2C - GPIO4 C3 and C4 -- connected to the 3 pin console headerSo, we want to use "2C". We could use "2B" and connect to the pins on the 40 pin IO header, but this is better left for use with i2c3
0 - gpio 1 - uart2dbgc 2 - uarthdcp 3 - reservedSo what do we use? Setting 1 or 2? As it turns out, setting 1 does the job.
Be careful reading the datasheet (as on page 56 which shows the function settings for GPIO4). It shows Func1 through Func 4, but of course to get "Func2" you write 1.
Tom's electronics pages / [email protected]