GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / ABI / testing / sysfs-bus-usb
1 What:           /sys/bus/usb/devices/<INTERFACE>/authorized
2 Date:           August 2015
3 Description:
4                 This allows to authorize (1) or deauthorize (0)
5                 individual interfaces instead a whole device
6                 in contrast to the device authorization.
7                 If a deauthorized interface will be authorized
8                 so the driver probing must be triggered manually
9                 by writing INTERFACE to /sys/bus/usb/drivers_probe
10                 This allows to avoid side-effects with drivers
11                 that need multiple interfaces.
12
13                 A deauthorized interface cannot be probed or claimed.
14
15 What:           /sys/bus/usb/devices/usbX/interface_authorized_default
16 Date:           August 2015
17 Description:
18                 This is used as value that determines if interfaces
19                 would be authorized by default.
20                 The value can be 1 or 0. It's by default 1.
21
22 What:           /sys/bus/usb/device/.../authorized
23 Date:           July 2008
24 KernelVersion:  2.6.26
25 Contact:        David Vrabel <david.vrabel@csr.com>
26 Description:
27                 Authorized devices are available for use by device
28                 drivers, non-authorized one are not.  By default, wired
29                 USB devices are authorized.
30
31                 Certified Wireless USB devices are not authorized
32                 initially and should be (by writing 1) after the
33                 device has been authenticated.
34
35 What:           /sys/bus/usb/device/.../wusb_cdid
36 Date:           July 2008
37 KernelVersion:  2.6.27
38 Contact:        David Vrabel <david.vrabel@csr.com>
39 Description:
40                 For Certified Wireless USB devices only.
41
42                 A devices's CDID, as 16 space-separated hex octets.
43
44 What:           /sys/bus/usb/device/.../wusb_ck
45 Date:           July 2008
46 KernelVersion:  2.6.27
47 Contact:        David Vrabel <david.vrabel@csr.com>
48 Description:
49                 For Certified Wireless USB devices only.
50
51                 Write the device's connection key (CK) to start the
52                 authentication of the device.  The CK is 16
53                 space-separated hex octets.
54
55 What:           /sys/bus/usb/device/.../wusb_disconnect
56 Date:           July 2008
57 KernelVersion:  2.6.27
58 Contact:        David Vrabel <david.vrabel@csr.com>
59 Description:
60                 For Certified Wireless USB devices only.
61
62                 Write a 1 to force the device to disconnect
63                 (equivalent to unplugging a wired USB device).
64
65 What:           /sys/bus/usb/drivers/.../new_id
66 Date:           October 2011
67 Contact:        linux-usb@vger.kernel.org
68 Description:
69                 Writing a device ID to this file will attempt to
70                 dynamically add a new device ID to a USB device driver.
71                 This may allow the driver to support more hardware than
72                 was included in the driver's static device ID support
73                 table at compile time. The format for the device ID is:
74                 idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct
75                 The vendor ID and device ID fields are required, the
76                 rest is optional. The `Ref*` tuple can be used to tell the
77                 driver to use the same driver_data for the new device as
78                 it is used for the reference device.
79                 Upon successfully adding an ID, the driver will probe
80                 for the device and attempt to bind to it.  For example::
81
82                   # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
83
84                 Here add a new device (0458:7045) using driver_data from
85                 an already supported device (0458:704c)::
86
87                   # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
88
89                 Reading from this file will list all dynamically added
90                 device IDs in the same format, with one entry per
91                 line. For example::
92
93                   # cat /sys/bus/usb/drivers/foo/new_id
94                   8086 10f5
95                   dead beef 06
96                   f00d cafe
97
98                 The list will be truncated at PAGE_SIZE bytes due to
99                 sysfs restrictions.
100
101 What:           /sys/bus/usb-serial/drivers/.../new_id
102 Date:           October 2011
103 Contact:        linux-usb@vger.kernel.org
104 Description:
105                 For serial USB drivers, this attribute appears under the
106                 extra bus folder "usb-serial" in sysfs; apart from that
107                 difference, all descriptions from the entry
108                 "/sys/bus/usb/drivers/.../new_id" apply.
109
110 What:           /sys/bus/usb/drivers/.../remove_id
111 Date:           November 2009
112 Contact:        CHENG Renquan <rqcheng@smu.edu.sg>
113 Description:
114                 Writing a device ID to this file will remove an ID
115                 that was dynamically added via the new_id sysfs entry.
116                 The format for the device ID is:
117                 idVendor idProduct.     After successfully
118                 removing an ID, the driver will no longer support the
119                 device.  This is useful to ensure auto probing won't
120                 match the driver to the device.  For example:
121                 # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id
122
123                 Reading from this file will list the dynamically added
124                 device IDs, exactly like reading from the entry
125                 "/sys/bus/usb/drivers/.../new_id"
126
127 What:           /sys/bus/usb/devices/.../power/usb2_hardware_lpm
128 Date:           September 2011
129 Contact:        Andiry Xu <andiry.xu@amd.com>
130 Description:
131                 If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged
132                 in to a xHCI host which support link PM, it will perform a LPM
133                 test; if the test is passed and host supports USB2 hardware LPM
134                 (xHCI 1.0 feature), USB2 hardware LPM will be enabled for the
135                 device and the USB device directory will contain a file named
136                 power/usb2_hardware_lpm.  The file holds a string value (enable
137                 or disable) indicating whether or not USB2 hardware LPM is
138                 enabled for the device. Developer can write y/Y/1 or n/N/0 to
139                 the file to enable/disable the feature.
140
141 What:           /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1
142                 /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2
143 Date:           November 2015
144 Contact:        Kevin Strasser <kevin.strasser@linux.intel.com>
145                 Lu Baolu <baolu.lu@linux.intel.com>
146 Description:
147                 If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged
148                 in to a xHCI host which supports link PM, it will check if U1
149                 and U2 exit latencies have been set in the BOS descriptor; if
150                 the check is passed and the host supports USB3 hardware LPM,
151                 USB3 hardware LPM will be enabled for the device and the USB
152                 device directory will contain two files named
153                 power/usb3_hardware_lpm_u1 and power/usb3_hardware_lpm_u2. These
154                 files hold a string value (enable or disable) indicating whether
155                 or not USB3 hardware LPM U1 or U2 is enabled for the device.
156
157 What:           /sys/bus/usb/devices/.../ltm_capable
158 Date:           July 2012
159 Contact:        Sarah Sharp <sarah.a.sharp@linux.intel.com>
160 Description:
161                 USB 3.0 devices may optionally support Latency Tolerance
162                 Messaging (LTM).  They indicate their support by setting a bit
163                 in the bmAttributes field of their SuperSpeed BOS descriptors.
164                 If that bit is set for the device, ltm_capable will read "yes".
165                 If the device doesn't support LTM, the file will read "no".
166                 The file will be present for all speeds of USB devices, and will
167                 always read "no" for USB 1.1 and USB 2.0 devices.
168
169 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>
170 Date:           August 2012
171 Contact:        Lan Tianyu <tianyu.lan@intel.com>
172 Description:
173                 The /sys/bus/usb/devices/.../<hub_interface>/port<X>
174                 is usb port device's sysfs directory.
175
176 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/connect_type
177 Date:           January 2013
178 Contact:        Lan Tianyu <tianyu.lan@intel.com>
179 Description:
180                 Some platforms provide usb port connect types through ACPI.
181                 This attribute is to expose these information to user space.
182                 The file will read "hotplug", "hardwired" and "not used" if the
183                 information is available, and "unknown" otherwise.
184
185 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/location
186 Date:           October 2018
187 Contact:        Bjørn Mork <bjorn@mork.no>
188 Description:
189                 Some platforms provide usb port physical location through
190                 firmware. This is used by the kernel to pair up logical ports
191                 mapping to the same physical connector. The attribute exposes the
192                 raw location value as a hex integer.
193
194
195 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/quirks
196 Date:           May 2018
197 Contact:        Nicolas Boichat <drinkcat@chromium.org>
198 Description:
199                 In some cases, we care about time-to-active for devices
200                 connected on a specific port (e.g. non-standard USB port like
201                 pogo pins), where the device to be connected is known in
202                 advance, and behaves well according to the specification.
203                 This attribute is a bit-field that controls the behavior of
204                 a specific port:
205
206                  - Bit 0 of this field selects the "old" enumeration scheme,
207                    as it is considerably faster (it only causes one USB reset
208                    instead of 2).
209
210                    The old enumeration scheme can also be selected globally
211                    using /sys/module/usbcore/parameters/old_scheme_first, but
212                    it is often not desirable as the new scheme was introduced to
213                    increase compatibility with more devices.
214                  - Bit 1 reduces TRSTRCY to the 10 ms that are required by the
215                    USB 2.0 specification, instead of the 50 ms that are normally
216                    used to help make enumeration work better on some high speed
217                    devices.
218
219 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/over_current_count
220 Date:           February 2018
221 Contact:        Richard Leitner <richard.leitner@skidata.com>
222 Description:
223                 Most hubs are able to detect over-current situations on their
224                 ports and report them to the kernel. This attribute is to expose
225                 the number of over-current situation occurred on a specific port
226                 to user space. This file will contain an unsigned 32 bit value
227                 which wraps to 0 after its maximum is reached. This file supports
228                 poll() for monitoring changes to this value in user space.
229
230                 Any time this value changes the corresponding hub device will send a
231                 udev event with the following attributes::
232
233                   OVER_CURRENT_PORT=/sys/bus/usb/devices/.../<hub_interface>/port<X>
234                   OVER_CURRENT_COUNT=[current value of this sysfs attribute]
235
236 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/usb3_lpm_permit
237 Date:           November 2015
238 Contact:        Lu Baolu <baolu.lu@linux.intel.com>
239 Description:
240                 Some USB3.0 devices are not friendly to USB3 LPM.  usb3_lpm_permit
241                 attribute allows enabling/disabling usb3 lpm of a port. It takes
242                 effect both before and after a usb device is enumerated. Supported
243                 values are "0" if both u1 and u2 are NOT permitted, "u1" if only u1
244                 is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and
245                 u2 are permitted.
246
247 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/connector
248 Date:           December 2021
249 Contact:        Heikki Krogerus <heikki.krogerus@linux.intel.com>
250 Description:
251                 Link to the USB Type-C connector when available. This link is
252                 only created when USB Type-C Connector Class is enabled, and
253                 only if the system firmware is capable of describing the
254                 connection between a port and its connector.
255
256 What:           /sys/bus/usb/devices/.../<hub_interface>/port<X>/disable
257 Date:           June 2022
258 Contact:        Michael Grzeschik <m.grzeschik@pengutronix.de>
259 Description:
260                 This file controls the state of a USB port, including
261                 Vbus power output (but only on hubs that support
262                 power switching -- most hubs don't support it). If
263                 a port is disabled, the port is unusable: Devices
264                 attached to the port will not be detected, initialized,
265                 or enumerated.
266
267 What:           /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
268 Date:           May 2013
269 Contact:        Mathias Nyman <mathias.nyman@linux.intel.com>
270 Description:
271                 USB 2.0 devices may support hardware link power management (LPM)
272                 L1 sleep state. The usb2_lpm_l1_timeout attribute allows
273                 tuning the timeout for L1 inactivity timer (LPM timer), e.g.
274                 needed inactivity time before host requests the device to go to L1 sleep.
275                 Useful for power management tuning.
276                 Supported values are 0 - 65535 microseconds.
277
278 What:           /sys/bus/usb/devices/.../power/usb2_lpm_besl
279 Date:           May 2013
280 Contact:        Mathias Nyman <mathias.nyman@linux.intel.com>
281 Description:
282                 USB 2.0 devices that support hardware link power management (LPM)
283                 L1 sleep state now use a best effort service latency value (BESL) to
284                 indicate the best effort to resumption of service to the device after the
285                 initiation of the resume event.
286                 If the device does not have a preferred besl value then the host can select
287                 one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
288                 value in order to tune power saving and service latency.
289
290                 Supported values are 0 - 15.
291                 More information on how besl values map to microseconds can be found in
292                 USB 2.0 ECN Errata for Link Power Management, section 4.10)
293
294 What:           /sys/bus/usb/devices/.../rx_lanes
295 Date:           March 2018
296 Contact:        Mathias Nyman <mathias.nyman@linux.intel.com>
297 Description:
298                 Number of rx lanes the device is using.
299                 USB 3.2 adds Dual-lane support, 2 rx and 2 tx lanes over Type-C.
300                 Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
301                 direction. Devices before USB 3.2 are single lane (rx_lanes = 1)
302
303 What:           /sys/bus/usb/devices/.../tx_lanes
304 Date:           March 2018
305 Contact:        Mathias Nyman <mathias.nyman@linux.intel.com>
306 Description:
307                 Number of tx lanes the device is using.
308                 USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C.
309                 Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
310                 direction. Devices before USB 3.2 are single lane (tx_lanes = 1)
311
312 What:           /sys/bus/usb/devices/usbX/bAlternateSetting
313 Description:
314                 The current interface alternate setting number, in decimal.
315
316                 See USB specs for its meaning.
317
318 What:           /sys/bus/usb/devices/usbX/bcdDevice
319 Description:
320                 The device's release number, in hexadecimal.
321
322                 See USB specs for its meaning.
323
324 What:           /sys/bus/usb/devices/usbX/bConfigurationValue
325 Description:
326                 While a USB device typically have just one configuration
327                 setting, some devices support multiple configurations.
328
329                 This value shows the current configuration, in decimal.
330
331                 Changing its value will change the device's configuration
332                 to another setting.
333
334                 The number of configurations supported by a device is at:
335
336                         /sys/bus/usb/devices/usbX/bNumConfigurations
337
338                 See USB specs for its meaning.
339
340 What:           /sys/bus/usb/devices/usbX/bDeviceClass
341 Description:
342                 Class code of the device, in hexadecimal.
343
344                 See USB specs for its meaning.
345
346 What:           /sys/bus/usb/devices/usbX/bDeviceProtocol
347 Description:
348                 Protocol code of the device, in hexadecimal.
349
350                 See USB specs for its meaning.
351
352 What:           /sys/bus/usb/devices/usbX/bDeviceSubClass
353 Description:
354                 Subclass code of the device, in hexadecimal.
355
356                 See USB specs for its meaning.
357
358 What:           /sys/bus/usb/devices/usbX/bInterfaceClass
359 Description:
360                 Class code of the interface, in hexadecimal.
361
362                 See USB specs for its meaning.
363
364 What:           /sys/bus/usb/devices/usbX/bInterfaceNumber
365 Description:
366                 Interface number, in hexadecimal.
367
368                 See USB specs for its meaning.
369
370 What:           /sys/bus/usb/devices/usbX/bInterfaceProtocol
371 Description:
372                 Protocol code of the interface, in hexadecimal.
373
374                 See USB specs for its meaning.
375
376 What:           /sys/bus/usb/devices/usbX/bInterfaceSubClass
377 Description:
378                 Subclass code of the interface, in hexadecimal.
379
380                 See USB specs for its meaning.
381
382 What:           /sys/bus/usb/devices/usbX/bmAttributes
383 Description:
384                 Attributes of the current configuration, in hexadecimal.
385
386                 See USB specs for its meaning.
387
388 What:           /sys/bus/usb/devices/usbX/bMaxPacketSize0
389 Description:
390                 Maximum endpoint 0 packet size, in decimal.
391
392                 See USB specs for its meaning.
393
394 What:           /sys/bus/usb/devices/usbX/bMaxPower
395 Description:
396                 Maximum power consumption of the active configuration of
397                 the device, in miliamperes.
398
399 What:           /sys/bus/usb/devices/usbX/bNumConfigurations
400 Description:
401                 Number of the possible configurations of the device, in
402                 decimal. The current configuration is controlled via:
403
404                         /sys/bus/usb/devices/usbX/bConfigurationValue
405
406                 See USB specs for its meaning.
407
408 What:           /sys/bus/usb/devices/usbX/bNumEndpoints
409 Description:
410                 Number of endpoints used on this interface, in hexadecimal.
411
412                 See USB specs for its meaning.
413
414 What:           /sys/bus/usb/devices/usbX/bNumInterfaces
415 Description:
416                 Number of interfaces on this device, in decimal.
417
418 What:           /sys/bus/usb/devices/usbX/busnum
419 Description:
420                 Number of the bus.
421
422 What:           /sys/bus/usb/devices/usbX/configuration
423 Description:
424                 Contents of the string descriptor associated with the
425                 current configuration. It may include the firmware version
426                 of a device and/or its serial number.
427
428 What:           /sys/bus/usb/devices/usbX/descriptors
429 Description:
430                 Contains the interface descriptors, in binary.
431
432 What:           /sys/bus/usb/devices/usbX/idProduct
433 Description:
434                 Product ID, in hexadecimal.
435
436 What:           /sys/bus/usb/devices/usbX/idVendor
437 Description:
438                 Vendor ID, in hexadecimal.
439
440 What:           /sys/bus/usb/devices/usbX/devspec
441 Description:
442                 Displays the Device Tree Open Firmware node of the interface.
443
444 What:           /sys/bus/usb/devices/usbX/avoid_reset_quirk
445 Description:
446                 Most devices have this set to zero.
447
448                 If the value is 1, enable a USB quirk that prevents this
449                 device to use reset.
450
451                 (read/write)
452
453 What:           /sys/bus/usb/devices/usbX/devnum
454 Description:
455                 USB interface device number, in decimal.
456
457 What:           /sys/bus/usb/devices/usbX/devpath
458 Description:
459                 String containing the USB interface device path.
460
461 What:           /sys/bus/usb/devices/usbX/manufacturer
462 Description:
463                 Vendor specific string containing the name of the
464                 manufacturer of the device.
465
466 What:           /sys/bus/usb/devices/usbX/maxchild
467 Description:
468                 Number of ports of an USB hub
469
470 What:           /sys/bus/usb/devices/usbX/persist
471 Description:
472                 Keeps the device even if it gets disconnected.
473
474 What:           /sys/bus/usb/devices/usbX/product
475 Description:
476                 Vendor specific string containing the name of the
477                 device's product.
478
479 What:           /sys/bus/usb/devices/usbX/speed
480 Description:
481                 Shows the device's max speed, according to the USB version,
482                 in Mbps.
483                 Can be:
484
485                         =======         ====================
486                         Unknown         speed unknown
487                         1.5             Low speed
488                         15              Full speed
489                         480             High Speed
490                         5000            Super Speed
491                         10000           Super Speed+
492                         20000           Super Speed+ Gen 2x2
493                         =======         ====================
494
495 What:           /sys/bus/usb/devices/usbX/supports_autosuspend
496 Description:
497                 Returns 1 if the device doesn't support autosuspend.
498                 Otherwise, returns 0.
499
500 What:           /sys/bus/usb/devices/usbX/urbnum
501 Description:
502                 Number of URBs submitted for the whole device.
503
504 What:           /sys/bus/usb/devices/usbX/version
505 Description:
506                 String containing the USB device version, as encoded
507                 at the BCD descriptor.
508
509 What:           /sys/bus/usb/devices/usbX/power/autosuspend
510 Description:
511                 Time in milliseconds for the device to autosuspend. If the
512                 value is negative, then autosuspend is prevented.
513
514                 (read/write)
515
516 What:           /sys/bus/usb/devices/usbX/power/active_duration
517 Description:
518                 The total time the device has not been suspended.
519
520 What:           /sys/bus/usb/devices/usbX/power/connected_duration
521 Description:
522                 The total time (in msec) that the device has been connected.
523
524 What:           /sys/bus/usb/devices/usbX/power/level
525 Description:
526
527 What:           /sys/bus/usb/devices/usbX/ep_<N>/bEndpointAddress
528 Description:
529                 The address of the endpoint described by this descriptor,
530                 in hexadecimal. The endpoint direction on this bitmapped field
531                 is also shown at:
532
533                         /sys/bus/usb/devices/usbX/ep_<N>/direction
534
535                 See USB specs for its meaning.
536
537 What:           /sys/bus/usb/devices/usbX/ep_<N>/bInterval
538 Description:
539                 The interval of the endpoint as described on its descriptor,
540                 in hexadecimal. The actual interval depends on the version
541                 of the USB. Also shown in time units at
542                 /sys/bus/usb/devices/usbX/ep_<N>/interval.
543
544 What:           /sys/bus/usb/devices/usbX/ep_<N>/bLength
545 Description:
546                 Number of bytes of the endpoint descriptor, in hexadecimal.
547
548 What:           /sys/bus/usb/devices/usbX/ep_<N>/bmAttributes
549 Description:
550                 Attributes which apply to the endpoint as described on its
551                 descriptor, in hexadecimal. The endpoint type on this
552                 bitmapped field is also shown at:
553
554                         /sys/bus/usb/devices/usbX/ep_<N>/type
555
556                 See USB specs for its meaning.
557
558 What:           /sys/bus/usb/devices/usbX/ep_<N>/direction
559 Description:
560                 Direction of the endpoint. Can be:
561
562                     - both (on control endpoints)
563                     - in
564                     - out
565
566 What:           /sys/bus/usb/devices/usbX/ep_<N>/interval
567 Description:
568                 Interval for polling endpoint for data transfers, in
569                 milisseconds or microseconds.
570
571 What:           /sys/bus/usb/devices/usbX/ep_<N>/type
572 Description:
573                 Descriptor type. Can be:
574
575                     - Control
576                     - Isoc
577                     - Bulk
578                     - Interrupt
579                     - unknown
580
581 What:           /sys/bus/usb/devices/usbX/ep_<N>/wMaxPacketSize
582 Description:
583                 Maximum packet size this endpoint is capable of
584                 sending or receiving, in hexadecimal.