Merge branch 'vendor/GCC47'
[dragonfly.git] / share / man / man4 / usb.4
1 .\" Copyright (c) 1997, 1998 Nick Hibma <n_hibma@FreeBSD.org>
2 .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: head/share/man/man4/usb.4 258618 2013-11-26 07:52:40Z lwhsu $
26 .\"
27 .Dd July 7, 2014
28 .Dt USB 4
29 .Os
30 .Sh NAME
31 .Nm usb
32 .Nd Universal Serial Bus
33 .Sh SYNOPSIS
34 To compile this driver into the kernel,
35 place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "device usb"
39 .Ed
40 .Pp
41 Alternatively, to load the driver as a
42 module at boot time, place the following line in
43 .Xr loader.conf 5 :
44 .Bd -literal -offset indent
45 usb_load="YES"
46 .Ed
47 .Sh USERLAND PROGRAMMING
48 USB functions can be accessed from userland through the libusb library.
49 See
50 .Xr libusb 3
51 for more information.
52 .Sh DESCRIPTION
53 .Dx
54 provides machine-independent bus support and drivers for
55 .Tn USB
56 devices in host and device side mode.
57 .Pp
58 The
59 .Nm
60 driver has three layers:
61 .Bl -tag -width 6n -offset indent
62 .It USB Controller (Bus)
63 .It USB Device
64 .It USB Driver
65 .El
66 .Pp
67 The controller attaches to a physical bus
68 like
69 .Xr pci 4 .
70 The
71 .Tn USB
72 bus attaches to the controller, and the root hub attaches
73 to the controller.
74 Any devices attached to the bus will attach to the root hub
75 or another hub attached to the
76 .Tn USB
77 bus.
78 .Pp
79 The
80 .Nm uhub
81 device will always be present as it is needed for the
82 root hub.
83 .Pp
84 .Dx
85 provides support for the following devices.
86 .Ss Storage devices
87 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
88 .\".It Xr natausb 4
89 .\"...
90 .It Xr umass 4
91 Mass Storage Devices, e.g., external disk drives
92 .It Xr usfs 4
93 Mass storage driver for device-side mode
94 .El
95 .Ss Wired network interfaces
96 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
97 .\".It Xr aue 4
98 .\"ADMtek AN986 Pegasus Ethernet driver
99 .It Xr axe 4
100 ASIX Electronics AX88x7x/760 USB Ethernet driver
101 .\".It Xr cue 4
102 .\"CATC USB-EL1210A Ethernet driver
103 .\".It Xr kue 4
104 .\"Kawasaki LSI KL5KUSB101B Ethernet driver
105 .\".It Xr lgue 4
106 .\"USB CDC (communication device class) driver for the LG P-500 smartphone
107 .\".It Xr rue 4
108 .\"RealTek RTL8150 Ethernet driver
109 .It Xr udav 4
110 Davicom DM9601 USB Ethernet driver
111 .El
112 .Ss Wireless network interfaces
113 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
114 .It Xr ndis 4
115 NDIS miniport driver wrapper
116 .It Xr rum 4
117 Ralink Technology RT2501USB/RT2601USB IEEE 802.11 driver
118 .It Xr run 4
119 Ralink Technology RT2700U/RT2800U/RT3000U IEEE 802.11 driver
120 .\".It Xr ubt 4
121 .\"Bluetooth adapters
122 .\".It Xr ural 4
123 .\"Ralink Technology RT2500USB IEEE 802.11 driver
124 .It Xr urndis 4
125 RNDIS USB ethernet driver
126 .It Xr urtwn 4
127 Realtek RTL8188CU/RTL8192CU IEEE 802.11 driver
128 .El
129 .Ss Serial and parallel interfaces
130 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
131 .\".It Xr moscom 4
132 .\"MosChip Semiconductor MCS7703 based serial adapters
133 .It Xr u3g 4
134 support for 3G datacards
135 .It Xr uark 4
136 Arkmicro Technologies ARK3116 based serial adapters
137 .It Xr ubsa 4
138 Belkin serial adapters
139 .It Xr ubser 4
140 support for BWCT console serial adapters
141 .It Xr uchcom 4
142 WinChipHead CH341/CH340 serial adapters
143 .It Xr ucom 4
144 tty support
145 .It Xr ucycom 4
146 Cypress CY7C63743 and CY7C64013 USB to RS232 bridges
147 .It Xr ufoma 4
148 mobile phone support
149 .It Xr uftdi 4
150 serial devices based on the FTDI chips
151 .It Xr ugensa 4
152 generic serial device
153 .It Xr uipaq 4
154 support for iPAQ units
155 .It Xr ulpt 4
156 printer support
157 .It Xr umcs 4
158 serial adapters based on the MCS7820 and MCS7840 chips
159 .It Xr umct 4
160 Magic Control Technology USB-232 based serial adapters
161 .It Xr umodem 4
162 modem support
163 .It Xr umoscom 4
164 serial adapters based on the MCS7703 chip
165 .It Xr uplcom 4
166 Prolific PL-2303/2303X/2303HX serial adapters
167 .It Xr uslcom 4
168 Silicon Laboratories CP2101, CP2102 and CP2103 USB to serial bridge
169 .\".It Xr uticom 4
170 .\"Texas Instruments TUSB3410 RS232 to USB converter
171 .It Xr uvisor 4
172 support for the Handspring Visor, a Palmpilot compatible PDA
173 .It Xr uvscom 4
174 SUNTAC Slipper U VS-10U serial adapters
175 .El
176 .\".Ss Audio devices
177 .\".Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
178 .\".It Xr snd_uaudio 4
179 .\"audio device driver
180 .\".It Xr urio 4
181 .\"driver for the Rio500 MP3 player
182 .\".El
183 .Ss Radio receiver devices
184 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
185 .It Xr ufm 4
186 Cypress Semiconductor FM Radio
187 .El
188 .Ss Human Interface Devices
189 .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
190 .It Xr uep 4
191 eGalax touchscreen driver
192 .It Xr uhid 4
193 generic driver for Human Interface Devices
194 .It Xr ukbd 4
195 keyboards that follow the boot protocol
196 .It Xr ums 4
197 mouse devices
198 .El
199 .\".Ss Miscellaneous devices
200 .\".Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact
201 .\".It Xr uscanner 4
202 .\"scanner support
203 .\".El
204 .Sh INTRODUCTION TO USB
205 The
206 .Tn USB
207 is a system where external devices can be connected to a PC.
208 The most common USB speeds are:
209 .Bl -tag -width 6n -offset indent
210 .It Low Speed (1.5MBit/sec)
211 .It Full Speed (12MBit/sec)
212 .It High Speed (480MBit/sec)
213 .El
214 .Pp
215 Each
216 .Tn USB
217 has a USB controller that is the master of the bus.
218 The physical communication is simplex which means the host controller only communicates with one USB device at a time.
219 .Pp
220 There can be up to 127 devices connected to an USB HUB tree.
221 The addresses are assigned
222 dynamically by the host when each device is attached to the bus.
223 .Pp
224 Within each device there can be up to 16 endpoints.
225 Each endpoint
226 is individually addressed and the addresses are static.
227 Each of these endpoints will communicate in one of four different modes:
228 .Em control , isochronous , bulk ,
229 or
230 .Em interrupt .
231 A device always has at least one endpoint.
232 This endpoint has address 0 and is a control
233 endpoint and is used to give commands to and extract basic data,
234 such as descriptors, from the device.
235 Each endpoint, except the control endpoint, is unidirectional.
236 .Pp
237 The endpoints in a device are grouped into interfaces.
238 An interface is a logical unit within a device; e.g.\&
239 a compound device with both a keyboard and a trackball would present
240 one interface for each.
241 An interface can sometimes be set into different modes,
242 called alternate settings, which affects how it operates.
243 Different alternate settings can have different endpoints
244 within it.
245 .Pp
246 A device may operate in different configurations.
247 Depending on the
248 configuration, the device may present different sets of endpoints
249 and interfaces.
250 .Pp
251 The bus enumeration of the
252 .Tn USB
253 bus proceeds in several steps:
254 .Bl -enum
255 .It
256 Any interface specific driver can attach to the device.
257 .It
258 If none is found, generic interface class drivers can attach.
259 .El
260 .Sh SEE ALSO
261 The
262 .Tn USB
263 specifications can be found at:
264 .Pp
265 .D1 Pa http://www.usb.org/developers/docs/
266 .Pp
267 .Xr libusb 3 ,
268 .\".Xr aue 4 ,
269 .Xr axe 4 ,
270 .\".Xr axge 4 ,
271 .\".Xr cue 4 ,
272 .Xr ehci 4 ,
273 .\".Xr kue 4 ,
274 .\".Xr mos 4 ,
275 .Xr ndis 4 ,
276 .Xr ohci 4 ,
277 .Xr pci 4 ,
278 .\".Xr rue 4 ,
279 .Xr rum 4 ,
280 .Xr run 4 ,
281 .Xr u3g 4 ,
282 .Xr uark 4 ,
283 .Xr ubsa 4 ,
284 .Xr ubser 4 ,
285 .Xr uchcom 4 ,
286 .Xr ucom 4 ,
287 .Xr ucycom 4 ,
288 .Xr udav 4 ,
289 .Xr uep 4 ,
290 .Xr ufm 4 ,
291 .Xr ufoma 4 ,
292 .Xr uftdi 4 ,
293 .Xr ugensa 4 ,
294 .Xr uhci 4 ,
295 .Xr uhid 4 ,
296 .Xr uipaq 4 ,
297 .Xr ukbd 4 ,
298 .Xr ulpt 4 ,
299 .Xr umass 4 ,
300 .Xr umcs 4 ,
301 .Xr umct 4 ,
302 .Xr umodem 4 ,
303 .Xr umoscom 4 ,
304 .Xr ums 4 ,
305 .Xr uplcom 4 ,
306 .\".Xr urio 4 ,
307 .Xr urtwn 4 ,
308 .Xr usfs 4 ,
309 .Xr uslcom 4 ,
310 .Xr uvisor 4 ,
311 .Xr uvscom 4 ,
312 .Xr xhci 4 ,
313 .Xr usbconfig 8 ,
314 .Xr usbdi 9
315 .Sh STANDARDS
316 The
317 .Nm
318 module complies with the USB 2.0 standard.
319 .Sh HISTORY
320 The
321 .Nm
322 module has been inspired by the
323 .Nx
324 USB stack initially written by Lennart Augustsson.
325 The
326 .Nm
327 module was written by
328 .An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org .