SCN(4)

NAME
scn - Signetics serial communications interface

SYNOPSIS
scn0 at mainbus? flags 0x1
scn1 at mainbus? flags 0x0
scn2 at mainbus? flags 0x0
scn3 at mainbus? flags 0x0
scn4 at mainbus? flags 0x0
scn5 at mainbus? flags 0x0
scn6 at mainbus? flags 0x0
scn7 at mainbus? flags 0x0

DESCRIPTION
The scn driver provides support for Signetics SCN2681, SCN2692, and SC26C92 EIA RS-232C (CCITT V.28) DUARTs on the pc532. The MC68681 DUART and SCC2698 OCTART are similar. The SCN2681 and SCN2692 have 3 character FIFOs; the SC26C92 has a 16-character FIFO.

Separate speeds for input and output are supported on each line. The SCN2681 and SCN2692 baud rate generator (BRG) supports the following speeds; 50, 75, 110, 134.5, 150, 200, 300, 600, 1050, 1200, 1800, 2000, 2400, 4800, 7200, 9600, 19200, and 38400 bits per second. However, because the BRG table has two seperate columns of 16 speeds, and the table in use is shared between the input and output sides of the two channels, not all speeds are available at all times. The Counter/Timer will be used, when available to generate additional, arbitrary speeds upto 57600 bps but only one C/T is present in each DUART.

The SC26C92 DUART adds two additional BRG modes (each containing two 16 entry tables with two columns) supporting additional speeds of 450, 880, 900, 1076, 3600, 14400, 28800, 57600, 115200, and 230400 bits per second (as well as some of the speeds listed above).

Opens on tty0? (dialin) devices will wait for the presence of carrier detect and are generally used in the /etc/ttys file. Opens on cu0? (callout) devices will succeed when carrier is not present and are meant for use for dialing out on a modem (for ppp, tip, kermit, etc). Dialout opens when the dialin device is in use will fail with EBUSY. Dialin opens with O_NONBLOCK will fail with EBUSY if the line is in use for dialout. Other opens will wait until the line is available.

An optional config file argument flags is supported with the following valued OR-ed together;

0x1 Sets software carrier (SOFTCAR); The line will be treated as hard-wired, with carrier always present. DTR is not dropped on close.

0x2 Sets local line (CLOCAL). Opens will not wait for carrier.

0x4 Sets RTS/CTS hardware flow control (CRTSCTS).

0x8 Sets DTR/DCD hardware flow control (MDMBUF). [Not yet implemented].

Various config options exist for the scn driver;

options SCN_TIMING
    Keep information on latency from time of character input in special rxintr routine to time of soft interrupt.

options CONSOLE_SPEED=Bnnn
    Sets console speed independant of default speed for other ttys.

options SCNDEF_CFLAG="CREAD+CS8+HUPCL"
    Sets default flags for scn tty lines.

FILES

/dev/tty0?

/dev/cu0?

DIAGNOSTICS

scn%d: fifo overrun The hardware FIFO in the chip has been overrun.

scn%d: ring overrun The internal ring-buffer used to hold characters until a software interrupt service routine runs to process the characters has overflowed.

SEE ALSO
termios(4), tty(4)

HISTORY
The scn driver first appeared in NetBSD 0.9. Original version by Philip Nelson (starting with Minix driver by Philip Nelson), majorly mangled by Phil Budne (using ideas and code from Dave Rand and Chris Torek). Improvements by Ian Dall and Matthias Pfaller.

BUGS
Configuration should be done on two levels: DUARTs and TTYs.

DUART configuration should take duart address in I/O region.

TTY configuration should take duart, port number and flags.

Some sequences of default tty speeds, opening ports and setting speeds may work, while others may not, due to the limitations of the chips.

The driver should reset SC26C92's to mode 0 on shutdown since the pc532 monitor PROM does not know about the additional BRG modes.

The SOFTCAR flag forced on for the console line.