1 What: /sys/bus/usb/devices/<INTERFACE>/authorized
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.
13 A deauthorized interface cannot be probed or claimed.
15 What: /sys/bus/usb/devices/usbX/interface_authorized_default
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.
22 What: /sys/bus/usb/device/.../authorized
25 Contact: David Vrabel <david.vrabel@csr.com>
27 Authorized devices are available for use by device
28 drivers, non-authorized one are not. By default, wired
29 USB devices are authorized.
31 What: /sys/bus/usb/drivers/.../new_id
33 Contact: linux-usb@vger.kernel.org
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::
48 # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
50 Here add a new device (0458:7045) using driver_data from
51 an already supported device (0458:704c)::
53 # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
55 Reading from this file will list all dynamically added
56 device IDs in the same format, with one entry per
59 # cat /sys/bus/usb/drivers/foo/new_id
64 The list will be truncated at PAGE_SIZE bytes due to
67 What: /sys/bus/usb-serial/drivers/.../new_id
69 Contact: linux-usb@vger.kernel.org
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.
76 What: /sys/bus/usb/drivers/.../remove_id
78 Contact: CHENG Renquan <rqcheng@smu.edu.sg>
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
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"
93 What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
95 Contact: Andiry Xu <andiry.xu@amd.com>
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.
107 What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1
108 /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2
110 Contact: Kevin Strasser <kevin.strasser@linux.intel.com>
111 Lu Baolu <baolu.lu@linux.intel.com>
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.
123 What: /sys/bus/usb/devices/.../ltm_capable
125 Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com>
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.
135 What: /sys/bus/usb/devices/<INTERFACE>/wireless_status
137 Contact: Bastien Nocera <hadess@hadess.net>
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
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.
152 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>
154 Contact: Lan Tianyu <tianyu.lan@intel.com>
156 The /sys/bus/usb/devices/.../<hub_interface>/port<X>
157 is usb port device's sysfs directory.
159 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/connect_type
161 Contact: Lan Tianyu <tianyu.lan@intel.com>
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.
168 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/location
170 Contact: Bjørn Mork <bjorn@mork.no>
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.
178 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/quirks
180 Contact: Nicolas Boichat <drinkcat@chromium.org>
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
189 - Bit 0 of this field selects the "old" enumeration scheme,
190 as it is considerably faster (it only causes one USB reset
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
202 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/over_current_count
204 Contact: Richard Leitner <richard.leitner@skidata.com>
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.
213 Any time this value changes the corresponding hub device will send a
214 udev event with the following attributes::
216 OVER_CURRENT_PORT=/sys/bus/usb/devices/.../<hub_interface>/port<X>
217 OVER_CURRENT_COUNT=[current value of this sysfs attribute]
219 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/usb3_lpm_permit
221 Contact: Lu Baolu <baolu.lu@linux.intel.com>
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
230 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/connector
232 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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.
239 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/disable
241 Contact: Michael Grzeschik <m.grzeschik@pengutronix.de>
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,
250 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/early_stop
252 Contact: Ray Chi <raychi@google.com>
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.
261 What: /sys/bus/usb/devices/.../<hub_interface>/port<X>/state
263 Contact: Roy Luo <royluo@google.com>
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.
271 What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
273 Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
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.
282 What: /sys/bus/usb/devices/.../power/usb2_lpm_besl
284 Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
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.
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)
298 What: /sys/bus/usb/devices/.../rx_lanes
300 Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
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)
307 What: /sys/bus/usb/devices/.../tx_lanes
309 Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
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)
316 What: /sys/bus/usb/devices/usbX/bAlternateSetting
318 The current interface alternate setting number, in decimal.
320 See USB specs for its meaning.
322 What: /sys/bus/usb/devices/usbX/bcdDevice
324 The device's release number, in hexadecimal.
326 See USB specs for its meaning.
328 What: /sys/bus/usb/devices/usbX/bConfigurationValue
330 While a USB device typically have just one configuration
331 setting, some devices support multiple configurations.
333 This value shows the current configuration, in decimal.
335 Changing its value will change the device's configuration
338 The number of configurations supported by a device is at:
340 /sys/bus/usb/devices/usbX/bNumConfigurations
342 See USB specs for its meaning.
344 What: /sys/bus/usb/devices/usbX/bDeviceClass
346 Class code of the device, in hexadecimal.
348 See USB specs for its meaning.
350 What: /sys/bus/usb/devices/usbX/bDeviceProtocol
352 Protocol code of the device, in hexadecimal.
354 See USB specs for its meaning.
356 What: /sys/bus/usb/devices/usbX/bDeviceSubClass
358 Subclass code of the device, in hexadecimal.
360 See USB specs for its meaning.
362 What: /sys/bus/usb/devices/usbX/bInterfaceClass
364 Class code of the interface, in hexadecimal.
366 See USB specs for its meaning.
368 What: /sys/bus/usb/devices/usbX/bInterfaceNumber
370 Interface number, in hexadecimal.
372 See USB specs for its meaning.
374 What: /sys/bus/usb/devices/usbX/bInterfaceProtocol
376 Protocol code of the interface, in hexadecimal.
378 See USB specs for its meaning.
380 What: /sys/bus/usb/devices/usbX/bInterfaceSubClass
382 Subclass code of the interface, in hexadecimal.
384 See USB specs for its meaning.
386 What: /sys/bus/usb/devices/usbX/bmAttributes
388 Attributes of the current configuration, in hexadecimal.
390 See USB specs for its meaning.
392 What: /sys/bus/usb/devices/usbX/bMaxPacketSize0
394 Maximum endpoint 0 packet size, in decimal.
396 See USB specs for its meaning.
398 What: /sys/bus/usb/devices/usbX/bMaxPower
400 Maximum power consumption of the active configuration of
401 the device, in miliamperes.
403 What: /sys/bus/usb/devices/usbX/bNumConfigurations
405 Number of the possible configurations of the device, in
406 decimal. The current configuration is controlled via:
408 /sys/bus/usb/devices/usbX/bConfigurationValue
410 See USB specs for its meaning.
412 What: /sys/bus/usb/devices/usbX/bNumEndpoints
414 Number of endpoints used on this interface, in hexadecimal.
416 See USB specs for its meaning.
418 What: /sys/bus/usb/devices/usbX/bNumInterfaces
420 Number of interfaces on this device, in decimal.
422 What: /sys/bus/usb/devices/usbX/busnum
426 What: /sys/bus/usb/devices/usbX/configuration
428 Contents of the string descriptor associated with the
429 current configuration. It may include the firmware version
430 of a device and/or its serial number.
432 What: /sys/bus/usb/devices/usbX/descriptors
434 Contains the interface descriptors, in binary.
436 What: /sys/bus/usb/devices/usbX/idProduct
438 Product ID, in hexadecimal.
440 What: /sys/bus/usb/devices/usbX/idVendor
442 Vendor ID, in hexadecimal.
444 What: /sys/bus/usb/devices/usbX/devspec
446 Displays the Device Tree Open Firmware node of the interface.
448 What: /sys/bus/usb/devices/usbX/avoid_reset_quirk
450 Most devices have this set to zero.
452 If the value is 1, enable a USB quirk that prevents this
457 What: /sys/bus/usb/devices/usbX/devnum
459 USB interface device number, in decimal.
461 What: /sys/bus/usb/devices/usbX/devpath
463 String containing the USB interface device path.
465 What: /sys/bus/usb/devices/usbX/manufacturer
467 Vendor specific string containing the name of the
468 manufacturer of the device.
470 What: /sys/bus/usb/devices/usbX/maxchild
472 Number of ports of an USB hub
474 What: /sys/bus/usb/devices/usbX/persist
476 Keeps the device even if it gets disconnected.
478 What: /sys/bus/usb/devices/usbX/product
480 Vendor specific string containing the name of the
483 What: /sys/bus/usb/devices/usbX/speed
485 Shows the device's max speed, according to the USB version,
489 ======= ====================
490 Unknown speed unknown
496 20000 Super Speed+ Gen 2x2
497 ======= ====================
499 What: /sys/bus/usb/devices/usbX/supports_autosuspend
501 Returns 1 if the device doesn't support autosuspend.
502 Otherwise, returns 0.
504 What: /sys/bus/usb/devices/usbX/urbnum
506 Number of URBs submitted for the whole device.
508 What: /sys/bus/usb/devices/usbX/version
510 String containing the USB device version, as encoded
511 at the BCD descriptor.
513 What: /sys/bus/usb/devices/usbX/power/autosuspend
515 Time in milliseconds for the device to autosuspend. If the
516 value is negative, then autosuspend is prevented.
520 What: /sys/bus/usb/devices/usbX/power/active_duration
522 The total time the device has not been suspended.
524 What: /sys/bus/usb/devices/usbX/power/connected_duration
526 The total time (in msec) that the device has been connected.
528 What: /sys/bus/usb/devices/usbX/power/level
531 What: /sys/bus/usb/devices/usbX/ep_<N>/bEndpointAddress
533 The address of the endpoint described by this descriptor,
534 in hexadecimal. The endpoint direction on this bitmapped field
537 /sys/bus/usb/devices/usbX/ep_<N>/direction
539 See USB specs for its meaning.
541 What: /sys/bus/usb/devices/usbX/ep_<N>/bInterval
543 The interval of the endpoint as described on its descriptor,
544 in hexadecimal. The actual interval depends on the version
545 of the USB. Also shown in time units at
546 /sys/bus/usb/devices/usbX/ep_<N>/interval.
548 What: /sys/bus/usb/devices/usbX/ep_<N>/bLength
550 Number of bytes of the endpoint descriptor, in hexadecimal.
552 What: /sys/bus/usb/devices/usbX/ep_<N>/bmAttributes
554 Attributes which apply to the endpoint as described on its
555 descriptor, in hexadecimal. The endpoint type on this
556 bitmapped field is also shown at:
558 /sys/bus/usb/devices/usbX/ep_<N>/type
560 See USB specs for its meaning.
562 What: /sys/bus/usb/devices/usbX/ep_<N>/direction
564 Direction of the endpoint. Can be:
566 - both (on control endpoints)
570 What: /sys/bus/usb/devices/usbX/ep_<N>/interval
572 Interval for polling endpoint for data transfers, in
573 milisseconds or microseconds.
575 What: /sys/bus/usb/devices/usbX/ep_<N>/type
577 Descriptor type. Can be:
585 What: /sys/bus/usb/devices/usbX/ep_<N>/wMaxPacketSize
587 Maximum packet size this endpoint is capable of
588 sending or receiving, in hexadecimal.