ttyS1: tcgetattr: Input/output error

Hi,
Is the UART1 corresponding to /dev/ttyS1 or /dev/tty1?

/dev/ttyS1 Opened Successfully
tcgetattr: Input/output error

Thanks

The following command does not show there are ttyS0/S1/S2 serial port configured in the system, why?

dmesg | grep tty

dmesg | grep tty
[ 0.000000] Kernel command line: earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait root=UUID=a84758d0-f922-43af-a5a1-d0b1f2d3ab42
[ 0.248398] Registered FIQ tty driver
[ 0.270052] console [ttyFIQ0] enabled
[ 0.270343] Registered fiq debugger ttyFIQ0
[ 1.918175] ff0e0000.serial: ttyS4 at MMIO 0xff0e0000 (irq = 11, base_baud = 5078125) is a 16550A
[ 7.445352] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ 7.458213] systemd[1]: Created slice system-getty.slice.
[ 11.773904] tty_port_close_start: tty->count = 1 port count = 2.

UART1: /dev/ttyS1

When enable UART1 in file /boot/hw_intfc.conf,

intfc:uart1=on

you would see

root@rockpis:/# dmesg | grep serial
[    1.887204] ff0a0000.serial: ttyS0 at MMIO 0xff0a0000 (irq = 10, base_baud = 1500000) is a 16550A
[    1.888395] ff0b0000.serial: ttyS1 at MMIO 0xff0b0000 (irq = 11, base_baud = 5078125) is a 16550A
[    1.889554] ff0e0000.serial: ttyS4 at MMIO 0xff0e0000 (irq = 12, base_baud = 5078125) is a 16550A