1.\" $NetBSD: com.4,v 1.18 2011/06/07 20:22:56 wiz Exp $ 2.\" 3.\" Copyright (c) 1990, 1991 The Regents of the University of California. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" the Systems Programming Group of the University of Utah Computer 8.\" Science Department. 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91 34.\" 35.Dd June 7, 2011 36.Dt COM 4 37.Os 38.Sh NAME 39.Nm com 40.Nd serial communications interface for 41.Tn RS-232C 42.Sh SYNOPSIS 43.Cd "com0 at isa? port" \&"IO_COM1\&" irq 4 44.Cd "com1 at isa? port" \&"IO_COM2\&" irq 3 45.Cd "com* at acpi?" 46.Cd "com* at cardbus?" 47.Cd "com* at isapnp?" 48.Cd "com* at mca? slot ?" 49.Cd "com* at mhzc?" 50.Cd "com* at ofisa?" 51.Cd "com* at pcmcia?" 52.Cd "com* at pcmcom?" 53.Cd "com* at pnpbios? index ?" 54.Cd "com* at puc? port ?" 55.Cd "com* at xirc?" 56.Cd options COM_HAYESP 57.Cd options PPS_SYNC 58.Cd options PPS_TRAILING_EDGE 59.Cd options RND_COM 60.Ss Arm32 61.Cd "com0 at mainbus? base 0x00210fe0" 62.Cd "com1 at mainbus? base 0x00210be0" 63.Ss HP 9000/300 and 400 Series 64.Cd "com* at dio? scode ?" 65.Cd "com* at frodo? offset ?" 66.Ss HP 9000/700 and 800 Series 67.Cd "com* at dino?" 68.Cd "com* at gsc?" 69.Cd "com* at ssio?" 70.Ss IBM PowerPC 4xx 71.Cd "com* at opb?" 72.Ss SPARC 73.Cd "com* at ebus?" 74.Cd "com* at obio0" 75.Sh DESCRIPTION 76The 77.Nm 78driver provides support for NS8250-, NS16450-, and NS16550-based 79.Tn EIA 80.Tn RS-232C 81.Pf ( Tn CCITT 82.Tn V.28 ) 83communications interfaces. 84The NS8250 and NS16450 have single character 85buffers, and the NS16550 has a 16 character buffer. 86.Pp 87Input and output for each line may set to one of following baud rates; 8850, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 8919200, 38400, 57600, or 115200, or any other baud rate which is a factor 90of 115200. 91.Pp 92The ttyXX devices are traditional dial-in devices; the dtyXX devices are 93used for dial-out. 94(See 95.Xr tty 4 . ) 96.Pp 97.Cd options COM_HAYESP 98adds support for the Hayes ESP serial board. 99.Pp 100.Cd options PPS_SYNC 101enables code to use the Data Carrier Detect (DCD) signal line for attachment 102to an external precision clock source 103.Po 104e.g., 105.Tn GPS , 106.Tn CDMA 107.Pc 108which generates a Pulse Per Second (PPS) signal. 109This is used by 110.Xr ntpd 8 111to discipline the system clock, and more accurately count/measure time. 112See 113.Xr options 4 114for more discussion. 115.Pp 116With 117.Cd options RND_COM 118enabled, the 119.Nm 120driver can be used to collect entropy for the 121.Xr rnd 4 122entropy pool. 123The entropy is generated from interrupt randomness. 124.Ss Arm32 specific 125If 126.Dq flags 1 127is specified, the 128.Nm 129driver will not set the 130.Dv MCR_IENABLE 131bit on the UART. 132This is mainly for use on AST multiport boards, where the 133.Dv MCR_IENABLE 134bit is used to control whether or not the devices use a shared 135interrupt. 136.Sh FILES 137.Bl -tag -width Pa -compact 138.It Pa /dev/dty00 139.It Pa /dev/dty01 140.It Pa /dev/dty02 141.It Pa /dev/tty00 142.It Pa /dev/tty01 143.It Pa /dev/tty02 144.El 145.Sh DIAGNOSTICS 146.Bl -diag 147.It com%d: %d silo overflows 148The input 149.Dq silo 150has overflowed and incoming data has been lost. 151.It com%d: weird interrupt: iir=%x 152The device has generated an unexpected interrupt 153with the code listed. 154.El 155.Sh SEE ALSO 156.Xr acpi 4 , 157.Xr ast 4 , 158.Xr cardbus 4 , 159.Xr isa 4 , 160.Xr isapnp 4 , 161.Xr mca 4 , 162.Xr mhzc 4 , 163.Xr ofisa 4 , 164.Xr options 4 , 165.Xr pcmcia 4 , 166.Xr pcmcom 4 , 167.Xr pnpbios 4 , 168.Xr puc 4 , 169.Xr rtfps 4 , 170.Xr tty 4 , 171.Xr xirc 4 , 172.Xr ntpd 8 173.Sh HISTORY 174The 175.Nm 176driver was originally derived from the HP9000/300 177.Ic dca 178driver. 179.Sh BUGS 180Data loss is possible on busy systems with unbuffered UARTs at high speed. 181.Pp 182The name of this driver and the constants which define the locations 183of the various serial ports are holdovers from 184.Tn DOS . 185