Hi folks,
I'd like to build a simple rs485 interface onto an A20-OLinuxino-Micro board.
Therefore I was looking into utilizing one of the UARTs (6 or 7) on EXT1 or EXT2, add an external driver chip to it and 'fork' the according kernel module to implement support for switching send/receive with the RTS line.
While that seemed to be an easy approach, I already got stuck with the basics. :-(
dmesg shows me
[ 2.822776] printk: console [ttyS0] disabled
[ 2.842962] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 53, base_baud = 1500000) is a U6_16550A
[ 2.843045] printk: console [ttyS0] enabled
[ 2.866650] 1c29800.serial: ttyS1 at MMIO 0x1c29800 (irq = 54, base_baud = 1500000) is a U6_16550A
[ 2.889933] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 55, base_baud = 1500000) is a U6_16550A
that during the boot process, the kernel seems to 'find' an initialize UART0 (ttyS0 on 0x1c28000), UART6 (ttyS1 on 0x1c29800) and UART7 (ttyS2 on 0x1c29c00).
Nevertheless, if I look into sysfs
# find /sys/devices/ -name 'ttyS*'
/sys/devices/platform/soc/1c28000,serial/tty/ttyS0
/sys/devices/platform/soc/1c29c00,serial/tty/ttyS2
/sys/devices/platform/soc/1c29800,serial/tty/ttyS1
/sys/devices/platform/serial8250/tty/ttyS6
/sys/devices/platform/serial8250/tty/ttyS4
/sys/devices/platform/serial8250/tty/ttyS7
/sys/devices/platform/serial8250/tty/ttyS5
/sys/devices/platform/serial8250/tty/ttyS3
I see that all the other UARTs are also already recognized.
How can I find out
- which module/driver is loaded/used to access ttyS0, ttyS1 and ttyS2
- if ttyS3 - ttyS7 are 'active' and which module/driver was used
- how to prevent the kernel from automatically loading a module for an 'active' ttySx ?
Cheers,
Klaus