xref: /freebsd/share/man/man4/uart.4 (revision af2e25a6d2210d392ac60bc6aaca6202b8a1d0fb)
127d5dc18SMarcel Moolenaar.\"
227d5dc18SMarcel Moolenaar.\" Copyright (c) 2003 Marcel Moolenaar
327d5dc18SMarcel Moolenaar.\" All rights reserved.
427d5dc18SMarcel Moolenaar.\"
527d5dc18SMarcel Moolenaar.\" Redistribution and use in source and binary forms, with or without
627d5dc18SMarcel Moolenaar.\" modification, are permitted provided that the following conditions
727d5dc18SMarcel Moolenaar.\" are met:
827d5dc18SMarcel Moolenaar.\"
927d5dc18SMarcel Moolenaar.\" 1. Redistributions of source code must retain the above copyright
1027d5dc18SMarcel Moolenaar.\"    notice, this list of conditions and the following disclaimer.
1127d5dc18SMarcel Moolenaar.\" 2. Redistributions in binary form must reproduce the above copyright
1227d5dc18SMarcel Moolenaar.\"    notice, this list of conditions and the following disclaimer in the
1327d5dc18SMarcel Moolenaar.\"    documentation and/or other materials provided with the distribution.
1427d5dc18SMarcel Moolenaar.\"
1527d5dc18SMarcel Moolenaar.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1627d5dc18SMarcel Moolenaar.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1727d5dc18SMarcel Moolenaar.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1827d5dc18SMarcel Moolenaar.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1927d5dc18SMarcel Moolenaar.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2027d5dc18SMarcel Moolenaar.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2127d5dc18SMarcel Moolenaar.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2227d5dc18SMarcel Moolenaar.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2327d5dc18SMarcel Moolenaar.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2427d5dc18SMarcel Moolenaar.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2527d5dc18SMarcel Moolenaar.\"
2627d5dc18SMarcel Moolenaar.\" $FreeBSD$
2727d5dc18SMarcel Moolenaar.\"
28af2e25a6SMarcel Moolenaar.Dd March 29, 2006
2927d5dc18SMarcel Moolenaar.Dt UART 4
3027d5dc18SMarcel Moolenaar.Os
3127d5dc18SMarcel Moolenaar.\"
3227d5dc18SMarcel Moolenaar.Sh NAME
3327d5dc18SMarcel Moolenaar.Nm uart
3427d5dc18SMarcel Moolenaar.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
3527d5dc18SMarcel Moolenaar.\"
3627d5dc18SMarcel Moolenaar.Sh SYNOPSIS
3727d5dc18SMarcel Moolenaar.Cd "device uart"
3827d5dc18SMarcel Moolenaar.Pp
3927d5dc18SMarcel Moolenaar.Cd "device puc"
4027d5dc18SMarcel Moolenaar.Cd "device uart"
41af2e25a6SMarcel Moolenaar.Pp
42af2e25a6SMarcel Moolenaar.Cd "device scc"
43af2e25a6SMarcel Moolenaar.Cd "device uart"
4427d5dc18SMarcel Moolenaar.\"
4527d5dc18SMarcel Moolenaar.Sh DESCRIPTION
4627d5dc18SMarcel MoolenaarThe
4727d5dc18SMarcel Moolenaar.Nm
4827d5dc18SMarcel Moolenaardevice driver provides support for various classes of UARTs implementing the
4927d5dc18SMarcel MoolenaarEIA RS-232C (CCITT V.24) serial communications interface.
50c48524c2SMike PritchardEach such interface is controlled by a separate and independent instance of
5127d5dc18SMarcel Moolenaarthe
5227d5dc18SMarcel Moolenaar.Nm
5327d5dc18SMarcel Moolenaardriver.
5427d5dc18SMarcel MoolenaarThe primary support for devices that contain multiple serial interfaces or
5527d5dc18SMarcel Moolenaarthat contain other functionality besides one or more serial interfaces is
5627d5dc18SMarcel Moolenaarprovided by the
57af2e25a6SMarcel Moolenaar.Xr puc 4 ,
58af2e25a6SMarcel Moolenaaror
59af2e25a6SMarcel Moolenaar.Xr scc 4
60af2e25a6SMarcel Moolenaardevice drivers.
6127d5dc18SMarcel MoolenaarHowever, the serial interfaces of those devices that are managed by the
62af2e25a6SMarcel Moolenaar.Xr puc 4 ,
63af2e25a6SMarcel Moolenaaror
64af2e25a6SMarcel Moolenaar.Xr scc 4
65af2e25a6SMarcel Moolenaardriver are each independently controlled by the
6627d5dc18SMarcel Moolenaar.Nm
6727d5dc18SMarcel Moolenaardriver.
6827d5dc18SMarcel MoolenaarAs such, the
69af2e25a6SMarcel Moolenaar.Xr puc 4 ,
70af2e25a6SMarcel Moolenaaror
71af2e25a6SMarcel Moolenaar.Xr scc 4
7227d5dc18SMarcel Moolenaardriver provides umbrella functionality for the
7327d5dc18SMarcel Moolenaar.Nm
7427d5dc18SMarcel Moolenaardriver and hides the complexities that are inherent when elementary components
7527d5dc18SMarcel Moolenaarare packaged together.
7627d5dc18SMarcel Moolenaar.Pp
7727d5dc18SMarcel MoolenaarThe
7827d5dc18SMarcel Moolenaar.Nm
7927d5dc18SMarcel Moolenaardriver has a modular design to allow it to be used on differing hardware and
8027d5dc18SMarcel Moolenaarfor various purposes.
8127d5dc18SMarcel MoolenaarIn the following sections the components are discussed in detail.
8227d5dc18SMarcel MoolenaarOptions are described in the section that covers the component to which each
8327d5dc18SMarcel Moolenaaroption applies.
8427d5dc18SMarcel Moolenaar.\"
8527d5dc18SMarcel Moolenaar.Ss CORE COMPONENT
8627d5dc18SMarcel MoolenaarAt the heart of the
8727d5dc18SMarcel Moolenaar.Nm
88fdae0df4SHiten Pandyadriver is the core component.
89fdae0df4SHiten PandyaIt contains the bus attachments and the low-level interrupt handler.
9027d5dc18SMarcel Moolenaar.\"
9127d5dc18SMarcel Moolenaar.Ss HARDWARE DRIVERS
9227d5dc18SMarcel MoolenaarThe core component and the kernel interfaces talk to the hardware through the
9327d5dc18SMarcel Moolenaarhardware interface.
9427d5dc18SMarcel MoolenaarThis interface serves as an abstraction of the hardware and allows varying
9527d5dc18SMarcel MoolenaarUARTs to be used for serial communications.
9627d5dc18SMarcel Moolenaar.\"
9727d5dc18SMarcel Moolenaar.Ss SYSTEM DEVICES
9827d5dc18SMarcel MoolenaarSystem devices are UARTs that have a special purpose by way of hardware
9927d5dc18SMarcel Moolenaardesign or software setup.
10027d5dc18SMarcel MoolenaarFor example, Sun UltraSparc machines use UARTs as their keyboard interface.
10127d5dc18SMarcel MoolenaarSuch an UART cannot be used for general purpose communications.
10227d5dc18SMarcel MoolenaarLikewise, when the kernel is configured for a serial console, the
10327d5dc18SMarcel Moolenaarcorresponding UART will in turn be a system device so that the kernel can
10427d5dc18SMarcel Moolenaaroutput boot messages early on in the boot process.
10527d5dc18SMarcel Moolenaar.\"
10627d5dc18SMarcel Moolenaar.Ss KERNEL INTERFACES
10727d5dc18SMarcel MoolenaarThe last but not least of the components is the kernel interface.
10827d5dc18SMarcel MoolenaarThis component ultimately determines how the UART is made visible to the
10927d5dc18SMarcel Moolenaarkernel in particular and to users in general.
11027d5dc18SMarcel MoolenaarThe default kernel interface is the TTY interface.
11127d5dc18SMarcel MoolenaarThis allows the UART to be used for terminals, modems and serial line IP
11227d5dc18SMarcel Moolenaarapplications.
11327d5dc18SMarcel MoolenaarSystem devices, with the notable exception of serial consoles, generally
11427d5dc18SMarcel Moolenaarhave specialized kernel interfaces.
11527d5dc18SMarcel Moolenaar.\"
116a814fd62SMarcel Moolenaar.Sh HARDWARE
117a814fd62SMarcel MoolenaarThe
118a814fd62SMarcel Moolenaar.Nm
119a814fd62SMarcel Moolenaardriver supports the following classes of UARTs:
120a814fd62SMarcel Moolenaar.Pp
121a814fd62SMarcel Moolenaar.Bl -bullet -compact
122a814fd62SMarcel Moolenaar.It
123a814fd62SMarcel MoolenaarNS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or
124af2e25a6SMarcel Moolenaarthe 16950 UARTs.
125a814fd62SMarcel Moolenaar.It
126af2e25a6SMarcel MoolenaarSCC: serial communications controllers supported by the
127af2e25a6SMarcel Moolenaar.Xr scc 4
128af2e25a6SMarcel Moolenaardevice driver.
129a814fd62SMarcel Moolenaar.El
130a814fd62SMarcel Moolenaar.\"
13106f40e96SJohn-Mark Gurney.Sh FILES
13206f40e96SJohn-Mark Gurney.Bl -tag -width /dev/ttyu?.init -compact
13306f40e96SJohn-Mark Gurney.It Pa /dev/ttyu?
13406f40e96SJohn-Mark Gurneyfor callin ports
13506f40e96SJohn-Mark Gurney.It Pa /dev/ttyu?.init
13606f40e96SJohn-Mark Gurney.It Pa /dev/ttyu?.lock
13706f40e96SJohn-Mark Gurneycorresponding callin initial-state and lock-state devices
13806f40e96SJohn-Mark Gurney.Pp
13906f40e96SJohn-Mark Gurney.It Pa /dev/cuau?
14006f40e96SJohn-Mark Gurneyfor callout ports
14106f40e96SJohn-Mark Gurney.It Pa /dev/cuau?.init
14206f40e96SJohn-Mark Gurney.It Pa /dev/cuau?.lock
14306f40e96SJohn-Mark Gurneycorresponding callout initial-state and lock-state devices
14406f40e96SJohn-Mark Gurney.El
14527d5dc18SMarcel Moolenaar.Sh SEE ALSO
146af2e25a6SMarcel Moolenaar.Xr puc 4 ,
147af2e25a6SMarcel Moolenaar.Xr scc 4
14827d5dc18SMarcel Moolenaar.\"
14927d5dc18SMarcel Moolenaar.Sh HISTORY
15027d5dc18SMarcel MoolenaarThe
15127d5dc18SMarcel Moolenaar.Nm
15227d5dc18SMarcel Moolenaardevice driver first appeared in
15327d5dc18SMarcel Moolenaar.Fx 5.2 .
154fdae0df4SHiten Pandya.Sh AUTHORS
155af2e25a6SMarcel MoolenaarThe
156af2e25a6SMarcel Moolenaar.Nm
157af2e25a6SMarcel Moolenaardevice driver and this manual page were written by
15806b7363bSMarcel Moolenaar.An Marcel Moolenaar Aq marcel@xcllnt.net .
159