NetBSD/share/man/man4/man4.pc532/scn.4

173 lines
5.9 KiB
Groff

.\" $NetBSD: scn.4,v 1.7 2003/05/06 19:05:35 wiz Exp $
.\"
.\" Copyright (c) 1997 Philip L. Budne.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Philip L. Budne.
.\" 4. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
.Dd June 27, 1997
.Dt SCN 4 pc532
.Os
.Sh NAME
.Nm scn
.Nd Signetics DUART serial communications interface
.Sh SYNOPSIS
.Cd "scn0 at mainbus? flags 0x1"
.Cd "scn1 at mainbus? flags 0x0"
.Cd "scn2 at mainbus? flags 0x0"
.Cd "scn3 at mainbus? flags 0x0"
.Cd "scn4 at mainbus? flags 0x0"
.Cd "scn5 at mainbus? flags 0x0"
.Cd "scn6 at mainbus? flags 0x0"
.Cd "scn7 at mainbus? flags 0x0"
.Sh DESCRIPTION
The
.Nm
driver provides support for Signetics SCN2681, SCN2692, and SC26C92
.Tn EIA
.Tn RS-232C
.Pf ( Tn CCITT
.Tn 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.
.Pp
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 separate 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 up to 57600 bps but only one C/T is present in each DUART.
.Pp
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).
.Pp
Attempts to
.Xr open 2
tty0? (dial-in) devices will block for the presence of Carrier
Detect (DCD) and are generally used by
.Xr getty 8 .
.Pp
Attempts to
.Xr open 2
cu0? (callout) devices will succeed when Carrier Detect (DCD) is
not present and are meant for use for dialing out on a modem (for
.Xr pppd 8 ,
.Xr tip 1 ,
kermit, etc).
When the dial-in device is in use, attempts to
.Xr open 2
callout device will fail with
.Dv EBUSY .
.Pp
When the callout device is in use, dial-in device opens with
.Dv O_NONBLOCK
will fail with
.Dv EBUSY .
Other opens will block until the line is available.
.Pp
An optional config file argument
.Ar flags
is supported with the following valued OR-ed together;
.Bl -tag -width 0x4 -offset indent
.It 0x1
Sets software carrier (SOFTCAR); The line will be treated as
hard-wired, with Carrier Detect (DCD) always present.
DTR is not dropped on
.Xr close 2 .
.It 0x2
Sets local line (CLOCAL).
Opens will not block for Carrier Detect (DCD).
.It 0x4
Sets RTS/CTS hardware flow control (CRTSCTS).
.It 0x8
Sets DTR/DCD hardware flow control (MDMBUF).
[Not yet implemented].
.El
.Pp
Various config options exist for the
.Nm
driver;
.Bl -hang -width xxxxxxxxxx -offset indent
.It Cd options SCN_TIMING
.br
Keep information on latency from time of character input
in special rxintr routine to time of soft interrupt.
.It Cd options CONSOLE_SPEED=Bnnn
.br
Sets console speed independent of default speed for other ttys.
.It Cd options SCNDEF_CFLAG="CREAD+CS8+HUPCL"
.br
Sets default flags for scn tty lines.
.El
.Sh FILES
.Bl -tag -width Pa
.It Pa /dev/tty0?
.It Pa /dev/cu0?
.El
.Sh DIAGNOSTICS
.\" talk about reasons!!
.Bl -diag
.It scn%d: fifo overrun
The hardware FIFO in the chip has been overrun.
.It 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.
.El
.Sh SEE ALSO
.Xr termios 4 ,
.Xr tty 4
.Sh HISTORY
The
.Nm
driver first appeared in
.Nx 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.
.Sh BUGS
Configuration should be done on two levels: DUARTs and TTYs.
.Pp
DUART configuration should take duart address in I/O region.
.Pp
TTY configuration should take duart, port number and flags.
.Pp
Some sequences of default tty speeds, opening ports and setting speeds
may work, while others may not, due to the limitations of the chips.
.Pp
The driver should reset SC26C92's to mode 0 on shutdown since the
pc532 monitor PROM does not know about the additional BRG modes.
.Pp
The SOFTCAR flag forced on for the console line.