Ubuntu server 18.04 uart 4 not working

We bought two new rock pi 4b board.
Whenever we trying to access uart 4 some time working some time not working if we reboot also same issue.
sudo cat /dev/ttyS4
cat: /dev/ttyS4: Input/output error

Note - old borad working fine
Why we getting error ?
How to resolve ?

Regards,
Vasu

Because uart (except 0) is disabled by default

Manually enabled - /boot/hw_intfc.conf
intfc:uart2=on
intfc:uart4= on

intfc:dtoverlay=console-on-ttyS2
intfc:dtoverlay=console-on-ttyS4

But still same issue.
Other boards also we did same thing working fine.
New boards only we facing this issue.
how to solve ?

#intfc:dtoverlay=console-on-ttyS2
#intfc:dtoverlay=console-on-ttyS4
intfc:spi1=off
#intfc:dtoverlay=devspi1
#intfc:dtoverlay=spi1-flash

Hi Jolla,
Thank you for your reply,
Now it’s working.
I having few doubts if you know please clarify.

How /boot/hw_intfc.conf file is working ?
When uart driver check this file ?

Thanks & Regards
Vasu

hw_intf.conf controls what device tree is loaded at boot time. device tree specify the hardware resource kernel can use. you can check below for more info.

https://wiki.radxa.com/Rockpi4/hardware/devtree_overlays

Hi jack,
How can we use uart2(debug) for our application ?
Our application contains two uart.
If possible to use uart2 for our data sending purpose.