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