xref: /freebsd/share/man/man4/udbc.4 (revision d566b6a70bcbc329e8c690464043401fa8bdd49f)
1*d566b6a7STom Jones.\"
2*d566b6a7STom Jones.\" Copyright (c) 2025 The FreeBSD Foundation
3*d566b6a7STom Jones.\"
4*d566b6a7STom Jones.\" This documentation was written by Tom Jones <thj@freebsd.org> under
5*d566b6a7STom Jones.\" sponsorship from the FreeBSD Foundation.
6*d566b6a7STom Jones.\"
7*d566b6a7STom Jones.\" SPDX-License-Identifier: BSD-2-Clause
8*d566b6a7STom Jones.\"
9*d566b6a7STom Jones.\"
10*d566b6a7STom Jones.Dd September 3, 2025
11*d566b6a7STom Jones.Dt UDBC 4
12*d566b6a7STom Jones.Os
13*d566b6a7STom Jones.Sh NAME
14*d566b6a7STom Jones.Nm udbc
15*d566b6a7STom Jones.Nd USB Debug Class device driver
16*d566b6a7STom Jones.Sh SYNOPSIS
17*d566b6a7STom Jones.Cd "device usb"
18*d566b6a7STom Jones.Cd "device ucom"
19*d566b6a7STom Jones.Cd "device udbc"
20*d566b6a7STom Jones.Pp
21*d566b6a7STom JonesIn
22*d566b6a7STom Jones.Xr rc.conf 5 :
23*d566b6a7STom Jones.Cd kld_list="udbc"
24*d566b6a7STom Jones.Sh DESCRIPTION
25*d566b6a7STom JonesThe
26*d566b6a7STom Jones.Nm
27*d566b6a7STom Jonesdriver provides support for USB Debug Class devices whose
28*d566b6a7STom Jonesinterface class is Diagnostic Class and the subclass is DbC.GP.
29*d566b6a7STom Jones.Pp
30*d566b6a7STom JonesThe USB Debug Class is defined in the USB 3.1 Device Class
31*d566b6a7STom JonesSpecification for Debug Devices.
32*d566b6a7STom JonesThis is designed to provide a general-purpose communication channel
33*d566b6a7STom Jonesfor debugging.
34*d566b6a7STom JonesIt has also been widely implemented in USB xHCs
35*d566b6a7STom Jones.Pq USB eXtensible Host Controllers ,
36*d566b6a7STom Joneswhich can be found on many commodity computers,
37*d566b6a7STom Jonesas an optional feature.
38*d566b6a7STom JonesOnce this feature is enabled on a USB xHC, one of the USB ports will
39*d566b6a7STom Jonesbehave as a USB Debug Class device,
40*d566b6a7STom Jonesnot a host port,
41*d566b6a7STom Joneswhen a USB debug cable is connected.
42*d566b6a7STom JonesThe supported class in USB xHCs is typically DbC.GP,
43*d566b6a7STom Joneswhile the specification defines several types of Debug Class devices.
44*d566b6a7STom JonesThe DbC.GP uses IN and OUT endpoint pairs and realizes a single
45*d566b6a7STom Jonesbidirectional serial communication channel.
46*d566b6a7STom JonesOn most systems,
47*d566b6a7STom Jonesincluding
48*d566b6a7STom Jones.Fx ,
49*d566b6a7STom Jonesthe DbC.GP is seen as a simple serial device.
50*d566b6a7STom Jones.Pp
51*d566b6a7STom JonesMost systems with USB xHC can be configured to provide DbC.GP access.
52*d566b6a7STom JonesThe
53*d566b6a7STom Jones.Nm
54*d566b6a7STom Jonesis a driver that connects to DbC.GP-supported devices,
55*d566b6a7STom Jonesoffering
56*d566b6a7STom Jones.Xr tty 4
57*d566b6a7STom Jonesdevices to connect to them via the
58*d566b6a7STom Jones.Xr ucom 4
59*d566b6a7STom Jonesdevice driver.
60*d566b6a7STom Jones.Sh HARDWARE CONFIGURATION
61*d566b6a7STom JonesA native DbC.GP device can be attached using the
62*d566b6a7STom Jones.Nm
63*d566b6a7STom Jonesdriver in a straightforward way.
64*d566b6a7STom Jones.Pp
65*d566b6a7STom JonesA USB xHC DbC.GP device on a target system needs a special hardware
66*d566b6a7STom Jonesconfiguration because all of the ports are supposed to be a USB Host.
67*d566b6a7STom JonesThere is one method to expose DbC.GP is to use a USB 3.1 A-to-A cable
68*d566b6a7STom Jones.Pq section 5.5.2 in USB 3.1 Legacy Cable and Connector Specification .
69*d566b6a7STom JonesWhen this cable is connected to a USB 3.1 port on the target system,
70*d566b6a7STom Jonesthe DbC-enabled USB xHC automatically switches the port as a USB Device.
71*d566b6a7STom JonesThe
72*d566b6a7STom Jones.Nm
73*d566b6a7STom Jonesdriver can find a DbC.GP device on that port.
74*d566b6a7STom Jones.Pp
75*d566b6a7STom JonesNote that a USB xHC with USB 3.2 support
76*d566b6a7STom Jones.Pq USB Type-C connectors
77*d566b6a7STom Jonesis not compatible with the USB 3.1 A-to-A cable.
78*d566b6a7STom JonesConnecting a USB 3.2 C-to-C cable or A-to-C cable does not automatically work,
79*d566b6a7STom Joneseither,
80*d566b6a7STom Jonesbecause it needs role configuration of the port, which is not supported on
81*d566b6a7STom Jones.Fx
82*d566b6a7STom Jonesyet.
83*d566b6a7STom Jones.Sh FILES
84*d566b6a7STom Jones.Bl -tag -width "/dev/ttyU*.*.init" -compact
85*d566b6a7STom Jones.It Pa /dev/ttyU*.*
86*d566b6a7STom Jonesfor callin ports
87*d566b6a7STom Jones.It Pa /dev/ttyU*.*.init
88*d566b6a7STom Jones.It Pa /dev/ttyU*.*.lock
89*d566b6a7STom Jonescorresponding callin initial-state and lock-state devices
90*d566b6a7STom Jones.Pp
91*d566b6a7STom Jones.It Pa /dev/cuaU*.*
92*d566b6a7STom Jonesfor callout ports
93*d566b6a7STom Jones.It Pa /dev/cuaU*.*.init
94*d566b6a7STom Jones.It Pa /dev/cuaU*.*.lock
95*d566b6a7STom Jonescorresponding callout initial-state and lock-state devices
96*d566b6a7STom Jones.El
97*d566b6a7STom Jones.Sh SEE ALSO
98*d566b6a7STom Jones.Xr tty 4 ,
99*d566b6a7STom Jones.Xr ucom 4 ,
100*d566b6a7STom Jones.Xr usb 4 ,
101*d566b6a7STom Jones.Xr xhci 4
102*d566b6a7STom Jones.Sh STANDARDS
103*d566b6a7STom Jones.Rs
104*d566b6a7STom Jones.%T eXtensible Host Controller Interface for Universal Serial Bus (XHCI)
105*d566b6a7STom Jones.%U https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf
106*d566b6a7STom Jones.Re
107*d566b6a7STom Jones.Rs
108*d566b6a7STom Jones.%T USB 3.1 Device Class Specification for Debug Devices
109*d566b6a7STom Jones.%U https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf
110*d566b6a7STom Jones.Re
111*d566b6a7STom Jones.Rs
112*d566b6a7STom Jones.%T USB 3.1 Legacy Cable and Connector Specification
113*d566b6a7STom Jones.%U https://www.usb.org/document-library/usb-31-legacy-cable-and-connector-revision-10
114*d566b6a7STom Jones.Re
115*d566b6a7STom Jones.Sh HISTORY
116*d566b6a7STom JonesThe
117*d566b6a7STom Jones.Nm
118*d566b6a7STom Jonesdriver first appeared
119*d566b6a7STom Jones.Fx
120*d566b6a7STom Jones15.0.
121*d566b6a7STom Jones.Sh AUTHORS
122*d566b6a7STom Jones.An -nosplit
123*d566b6a7STom JonesThe
124*d566b6a7STom Jones.Nm
125*d566b6a7STom Jonesdriver was written by
126*d566b6a7STom Jones.An Hiroki Sato Aq Mt hrs@FreeBSD.org .
127*d566b6a7STom Jones.Sh BUGS
128*d566b6a7STom JonesAccording to the XHCI specification the host side of USB Debug should work with
129*d566b6a7STom Jonesany USB 3.0 port,
130*d566b6a7STom Joneswhether connected directly to a controller or with a hub in between.
131*d566b6a7STom JonesTesting on some controllers has encountered issues when using a hub rather than
132*d566b6a7STom Jonesa directly connected port on the controller.
133