1 1
both5

OrangePi Prime // issues with accessing gpio uart1&uart3

Recommended Posts

Greetings.

 

Please help with accessing GPIO's UART1 and UART3.

Currently installed nightly build:

root@orangepiprime:~/sunxi-DT-overlays/sun50i-h5# cat /etc/armbian-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=orangepiprime
BOARD_NAME="Orange Pi Prime"
BOARDFAMILY=sun50iw2
VERSION=5.46.180607
LINUXFAMILY=sunxi64
BRANCH=next
ARCH=arm64
IMAGE_TYPE=nightly
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
 

Added DT overlays for all GPIO uarts:

root@orangepiprime:/boot# cat armbianEnv.txt
verbosity=1
console=both
overlay_prefix=sun50i-h5
rootdev=UUID=666e2e1a-80be-4261-9e66-4cd8a4b14679
rootfstype=ext4
overlays=uart1 uart2 uart3
param_uart2_rtscts=0
param_uart3_rtscts=0
param_uart1_rtscts=0
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
 

UART2 successfully working over PA1&PA0 bus pins as documented.

 

UART1 and 3 remain silent even though both status "okay":

root@orangepiprime:/boot# cat /proc/device-tree/soc/serial@01c28400/status
okay

root@orangepiprime:/boot# cat /proc/device-tree/soc/serial@01c28000/status
okay

root@orangepiprime:/boot# cat /proc/device-tree/soc/serial@01c28800/status
okay

root@orangepiprime:/boot# cat /proc/device-tree/soc/serial@01c28c00/status
okay

 

Local echo test works only on UART2:

root@orangepiprime:/boot# cat -v < /dev/ttyS3
^C
root@orangepiprime:/boot# cat -v < /dev/ttyS2
TEST
^C
root@orangepiprime:/boot# cat -v < /dev/ttyS1
^C
Echo sent with "echo TEST > /dev/ttyS<port number>"

Appropriate pins been looped with the jumper:

UART1 PG6 with PG7

UART2 PA1 with PA0

UART3 PA13 with PA14

 

What am I doing wrong? Could it be uarts are reserved for something else?

 

Thank you in advance.

Share this post


Link to post
Share on other sites

Probably I should add some more:

1. I tried two different boards of the same type, so it's not a particular board issue

2. I tried stable build at first, so it's not a nightly build effect

 

Fell into despair after week of experiments and searching. I just need at least a couple uarts (more than one). 

I would use UART0 if I only knew how to disable TTL or redirect output to not working uart. Sadly I didn't find any good/understandable solution for that too.
 

Share this post


Link to post
Share on other sites

If someone's interested. I finally found out a solution for myself by disabling console output on ttyS0:

1. armbianEnt.txt changes

-console=both

+console=display

+overlays=uart2 (this one just to enable uart2 as per overlays how-to)

2. sudo systemctl daemon-reload (somehow getty unit always appears as changed after boot)

sudo systemctl disable serial-getty@ttyS0.service

reboot

 

Have two UARTs(0&2) available now.

 

Sadly still have no solution on how to force 1&3 to be working.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1