aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2017-12-13 00:07:44 -0500
committerJonathan Corbet <corbet@lwn.net>2017-12-21 15:39:30 -0500
commit90b2a01e68167665a3f86c477414e795cd4a0139 (patch)
treeab4df61949546b85330bf43b512bab46100d6d71 /Documentation/driver-api
parent481f2720042685b855be183758d51a8d0e9d009c (diff)
usb: doc: Update document for USB3 debug port usage
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Cc: Mathias Nyman <mathias.nyman@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/usb/usb3-debug-port.rst52
1 files changed, 52 insertions, 0 deletions
diff --git a/Documentation/driver-api/usb/usb3-debug-port.rst b/Documentation/driver-api/usb/usb3-debug-port.rst
index feb1a36a65b7..b9fd131f4723 100644
--- a/Documentation/driver-api/usb/usb3-debug-port.rst
+++ b/Documentation/driver-api/usb/usb3-debug-port.rst
@@ -98,3 +98,55 @@ you to check the sanity of the setup.
98 cat /dev/ttyUSB0 98 cat /dev/ttyUSB0
99 done 99 done
100 ===== end of bash scripts =============== 100 ===== end of bash scripts ===============
101
102Serial TTY
103==========
104
105The DbC support has been added to the xHCI driver. You can get a
106debug device provided by the DbC at runtime.
107
108In order to use this, you need to make sure your kernel has been
109configured to support USB_XHCI_DBGCAP. A sysfs attribute under
110the xHCI device node is used to enable or disable DbC. By default,
111DbC is disabled::
112
113 root@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc
114 disabled
115
116Enable DbC with the following command::
117
118 root@target:/sys/bus/pci/devices/0000:00:14.0# echo enable > dbc
119
120You can check the DbC state at anytime::
121
122 root@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc
123 enabled
124
125Connect the debug target to the debug host with a USB 3.0 super-
126speed A-to-A debugging cable. You can see /dev/ttyDBC0 created
127on the debug target. You will see below kernel message lines::
128
129 root@target: tail -f /var/log/kern.log
130 [ 182.730103] xhci_hcd 0000:00:14.0: DbC connected
131 [ 191.169420] xhci_hcd 0000:00:14.0: DbC configured
132 [ 191.169597] xhci_hcd 0000:00:14.0: DbC now attached to /dev/ttyDBC0
133
134Accordingly, the DbC state has been brought up to::
135
136 root@target:/sys/bus/pci/devices/0000:00:14.0# cat dbc
137 configured
138
139On the debug host, you will see the debug device has been enumerated.
140You will see below kernel message lines::
141
142 root@host: tail -f /var/log/kern.log
143 [ 79.454780] usb 2-2.1: new SuperSpeed USB device number 3 using xhci_hcd
144 [ 79.475003] usb 2-2.1: LPM exit latency is zeroed, disabling LPM.
145 [ 79.475389] usb 2-2.1: New USB device found, idVendor=1d6b, idProduct=0010
146 [ 79.475390] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
147 [ 79.475391] usb 2-2.1: Product: Linux USB Debug Target
148 [ 79.475392] usb 2-2.1: Manufacturer: Linux Foundation
149 [ 79.475393] usb 2-2.1: SerialNumber: 0001
150
151The debug device works now. You can use any communication or debugging
152program to talk between the host and the target.