xref: /freebsd/share/man/man4/uart.4 (revision 9fd69f37d28cfd7438cac3eeb45fe9dd46b4d7dd)
1.\"
2.\" Copyright (c) 2003 Marcel Moolenaar
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\"
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd March 12, 2008
29.Dt UART 4
30.Os
31.Sh NAME
32.Nm uart
33.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
34.Sh SYNOPSIS
35.Cd "device uart"
36.Pp
37.Cd "device puc"
38.Cd "device uart"
39.Pp
40.Cd "device scc"
41.Cd "device uart"
42.Pp
43In
44.Pa /boot/device.hints :
45.Cd hint.uart.0.disabled="1"
46.Cd hint.uart.0.baud="38400"
47.Cd hint.uart.0.port="0x3f8"
48.Cd hint.uart.0.flags="0x10"
49.Ed
50.Pp
51With
52.Ar flags
53encoded as:
54.Bl -tag -compact -width 0x000000
55.It 0x00010
56device is potential system console
57.It 0x00080
58use this port for remote kernel debugging
59.It 0x00100
60set RX FIFO trigger level to ``low'' (NS8250 only)
61.It 0x00200
62set RX FIFO trigger level to ``medium low'' (NS8250 only)
63.It 0x00400
64set RX FIFO trigger level to ``medium high'' (default, NS8250 only)
65.It 0x00800
66set RX FIFO trigger level to ``high'' (NS8250 only)
67.El
68.\"
69.Sh DESCRIPTION
70The
71.Nm
72device driver provides support for various classes of UARTs implementing the
73EIA RS-232C (CCITT V.24) serial communications interface.
74Each such interface is controlled by a separate and independent instance of
75the
76.Nm
77driver.
78The primary support for devices that contain multiple serial interfaces or
79that contain other functionality besides one or more serial interfaces is
80provided by the
81.Xr puc 4 ,
82or
83.Xr scc 4
84device drivers.
85However, the serial interfaces of those devices that are managed by the
86.Xr puc 4 ,
87or
88.Xr scc 4
89driver are each independently controlled by the
90.Nm
91driver.
92As such, the
93.Xr puc 4 ,
94or
95.Xr scc 4
96driver provides umbrella functionality for the
97.Nm
98driver and hides the complexities that are inherent when elementary components
99are packaged together.
100.Pp
101The
102.Nm
103driver has a modular design to allow it to be used on differing hardware and
104for various purposes.
105In the following sections the components are discussed in detail.
106Options are described in the section that covers the component to which each
107option applies.
108.\"
109.Ss CORE COMPONENT
110At the heart of the
111.Nm
112driver is the core component.
113It contains the bus attachments and the low-level interrupt handler.
114.\"
115.Ss HARDWARE DRIVERS
116The core component and the kernel interfaces talk to the hardware through the
117hardware interface.
118This interface serves as an abstraction of the hardware and allows varying
119UARTs to be used for serial communications.
120.\"
121.Ss SYSTEM DEVICES
122System devices are UARTs that have a special purpose by way of hardware
123design or software setup.
124For example, Sun UltraSparc machines use UARTs as their keyboard interface.
125Such an UART cannot be used for general purpose communications.
126Likewise, when the kernel is configured for a serial console, the
127corresponding UART will in turn be a system device so that the kernel can
128output boot messages early on in the boot process.
129.\"
130.Ss KERNEL INTERFACES
131The last but not least of the components is the kernel interface.
132This component ultimately determines how the UART is made visible to the
133kernel in particular and to users in general.
134The default kernel interface is the TTY interface.
135This allows the UART to be used for terminals, modems and serial line IP
136applications.
137System devices, with the notable exception of serial consoles, generally
138have specialized kernel interfaces.
139.\"
140.Sh HARDWARE
141The
142.Nm
143driver supports the following classes of UARTs:
144.Pp
145.Bl -bullet -compact
146.It
147NS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or
148the 16950 UARTs.
149.It
150SCC: serial communications controllers supported by the
151.Xr scc 4
152device driver.
153.El
154.\"
155.Sh FILES
156.Bl -tag -width ".Pa /dev/ttyu?.init" -compact
157.It Pa /dev/ttyu?
158for callin ports
159.It Pa /dev/ttyu?.init
160.It Pa /dev/ttyu?.lock
161corresponding callin initial-state and lock-state devices
162.Pp
163.It Pa /dev/cuau?
164for callout ports
165.It Pa /dev/cuau?.init
166.It Pa /dev/cuau?.lock
167corresponding callout initial-state and lock-state devices
168.El
169.Sh SEE ALSO
170.Xr puc 4 ,
171.Xr scc 4
172.\"
173.Sh HISTORY
174The
175.Nm
176device driver first appeared in
177.Fx 5.2 .
178.Sh AUTHORS
179The
180.Nm
181device driver and this manual page were written by
182.An Marcel Moolenaar Aq marcel@xcllnt.net .
183