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/<INTERFACE>/wireless_status
170Date:		February 2023
171Contact:	Bastien Nocera <hadess@hadess.net>
172Description:
173		Some USB devices use a USB receiver dongle to communicate
174		wirelessly with their device using proprietary protocols. This
175		attribute allows user-space to know whether the device is
176		connected to its receiver dongle, and, for example, consider
177		the device to be absent when choosing whether to show the
178		device's battery, show a headset in a list of outputs, or show
179		an on-screen keyboard if the only wireless keyboard is
180		turned off.
181		This attribute is not to be used to replace protocol specific
182		statuses available in WWAN, WLAN/Wi-Fi, Bluetooth, etc.
183		If the device does not use a receiver dongle with a wireless
184		device, then this attribute will not exist.
185
186What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>
187Date:		August 2012
188Contact:	Lan Tianyu <tianyu.lan@intel.com>
189Description:
190		The /sys/bus/usb/devices/.../<hub_interface>/port<X>
191		is usb port device's sysfs directory.
192
193What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/connect_type
194Date:		January 2013
195Contact:	Lan Tianyu <tianyu.lan@intel.com>
196Description:
197		Some platforms provide usb port connect types through ACPI.
198		This attribute is to expose these information to user space.
199		The file will read "hotplug", "hardwired" and "not used" if the
200		information is available, and "unknown" otherwise.
201
202What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/location
203Date:		October 2018
204Contact:	Bjørn Mork <bjorn@mork.no>
205Description:
206		Some platforms provide usb port physical location through
207		firmware. This is used by the kernel to pair up logical ports
208		mapping to the same physical connector. The attribute exposes the
209		raw location value as a hex integer.
210
211
212What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/quirks
213Date:		May 2018
214Contact:	Nicolas Boichat <drinkcat@chromium.org>
215Description:
216		In some cases, we care about time-to-active for devices
217		connected on a specific port (e.g. non-standard USB port like
218		pogo pins), where the device to be connected is known in
219		advance, and behaves well according to the specification.
220		This attribute is a bit-field that controls the behavior of
221		a specific port:
222
223		 - Bit 0 of this field selects the "old" enumeration scheme,
224		   as it is considerably faster (it only causes one USB reset
225		   instead of 2).
226
227		   The old enumeration scheme can also be selected globally
228		   using /sys/module/usbcore/parameters/old_scheme_first, but
229		   it is often not desirable as the new scheme was introduced to
230		   increase compatibility with more devices.
231		 - Bit 1 reduces TRSTRCY to the 10 ms that are required by the
232		   USB 2.0 specification, instead of the 50 ms that are normally
233		   used to help make enumeration work better on some high speed
234		   devices.
235
236What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/over_current_count
237Date:		February 2018
238Contact:	Richard Leitner <richard.leitner@skidata.com>
239Description:
240		Most hubs are able to detect over-current situations on their
241		ports and report them to the kernel. This attribute is to expose
242		the number of over-current situation occurred on a specific port
243		to user space. This file will contain an unsigned 32 bit value
244		which wraps to 0 after its maximum is reached. This file supports
245		poll() for monitoring changes to this value in user space.
246
247		Any time this value changes the corresponding hub device will send a
248		udev event with the following attributes::
249
250		  OVER_CURRENT_PORT=/sys/bus/usb/devices/.../<hub_interface>/port<X>
251		  OVER_CURRENT_COUNT=[current value of this sysfs attribute]
252
253What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/usb3_lpm_permit
254Date:		November 2015
255Contact:	Lu Baolu <baolu.lu@linux.intel.com>
256Description:
257		Some USB3.0 devices are not friendly to USB3 LPM.  usb3_lpm_permit
258		attribute allows enabling/disabling usb3 lpm of a port. It takes
259		effect both before and after a usb device is enumerated. Supported
260		values are "0" if both u1 and u2 are NOT permitted, "u1" if only u1
261		is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and
262		u2 are permitted.
263
264What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/connector
265Date:		December 2021
266Contact:	Heikki Krogerus <heikki.krogerus@linux.intel.com>
267Description:
268		Link to the USB Type-C connector when available. This link is
269		only created when USB Type-C Connector Class is enabled, and
270		only if the system firmware is capable of describing the
271		connection between a port and its connector.
272
273What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/disable
274Date:		June 2022
275Contact:	Michael Grzeschik <m.grzeschik@pengutronix.de>
276Description:
277		This file controls the state of a USB port, including
278		Vbus power output (but only on hubs that support
279		power switching -- most hubs don't support it). If
280		a port is disabled, the port is unusable: Devices
281		attached to the port will not be detected, initialized,
282		or enumerated.
283
284What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/early_stop
285Date:		Sep 2022
286Contact:	Ray Chi <raychi@google.com>
287Description:
288		Some USB hosts have some watchdog mechanisms so that the device
289		may enter ramdump if it takes a long time during port initialization.
290		This attribute allows each port just has two attempts so that the
291		port initialization will be failed quickly. In addition, if a port
292		which is marked with early_stop has failed to initialize, it will ignore
293		all future connections until this attribute is clear.
294
295What:		/sys/bus/usb/devices/.../<hub_interface>/port<X>/state
296Date:		June 2023
297Contact:	Roy Luo <royluo@google.com>
298Description:
299		Indicates current state of the USB device attached to the port.
300		Valid states are: 'not-attached', 'attached', 'powered',
301		'reconnecting', 'unauthenticated', 'default', 'addressed',
302		'configured', and 'suspended'. This file supports poll() to
303		monitor the state change from user space.
304
305What:		/sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
306Date:		May 2013
307Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
308Description:
309		USB 2.0 devices may support hardware link power management (LPM)
310		L1 sleep state. The usb2_lpm_l1_timeout attribute allows
311		tuning the timeout for L1 inactivity timer (LPM timer), e.g.
312		needed inactivity time before host requests the device to go to L1 sleep.
313		Useful for power management tuning.
314		Supported values are 0 - 65535 microseconds.
315
316What:		/sys/bus/usb/devices/.../power/usb2_lpm_besl
317Date:		May 2013
318Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
319Description:
320		USB 2.0 devices that support hardware link power management (LPM)
321		L1 sleep state now use a best effort service latency value (BESL) to
322		indicate the best effort to resumption of service to the device after the
323		initiation of the resume event.
324		If the device does not have a preferred besl value then the host can select
325		one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
326		value in order to tune power saving and service latency.
327
328		Supported values are 0 - 15.
329		More information on how besl values map to microseconds can be found in
330		USB 2.0 ECN Errata for Link Power Management, section 4.10)
331
332What:		/sys/bus/usb/devices/.../rx_lanes
333Date:		March 2018
334Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
335Description:
336		Number of rx lanes the device is using.
337		USB 3.2 adds Dual-lane support, 2 rx and 2 tx lanes over Type-C.
338		Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
339		direction. Devices before USB 3.2 are single lane (rx_lanes = 1)
340
341What:		/sys/bus/usb/devices/.../tx_lanes
342Date:		March 2018
343Contact:	Mathias Nyman <mathias.nyman@linux.intel.com>
344Description:
345		Number of tx lanes the device is using.
346		USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C.
347		Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
348		direction. Devices before USB 3.2 are single lane (tx_lanes = 1)
349
350What:		/sys/bus/usb/devices/usbX/bAlternateSetting
351Description:
352		The current interface alternate setting number, in decimal.
353
354		See USB specs for its meaning.
355
356What:		/sys/bus/usb/devices/usbX/bcdDevice
357Description:
358		The device's release number, in hexadecimal.
359
360		See USB specs for its meaning.
361
362What:		/sys/bus/usb/devices/usbX/bConfigurationValue
363Description:
364		While a USB device typically have just one configuration
365		setting, some devices support multiple configurations.
366
367		This value shows the current configuration, in decimal.
368
369		Changing its value will change the device's configuration
370		to another setting.
371
372		The number of configurations supported by a device is at:
373
374			/sys/bus/usb/devices/usbX/bNumConfigurations
375
376		See USB specs for its meaning.
377
378What:		/sys/bus/usb/devices/usbX/bDeviceClass
379Description:
380		Class code of the device, in hexadecimal.
381
382		See USB specs for its meaning.
383
384What:		/sys/bus/usb/devices/usbX/bDeviceProtocol
385Description:
386		Protocol code of the device, in hexadecimal.
387
388		See USB specs for its meaning.
389
390What:		/sys/bus/usb/devices/usbX/bDeviceSubClass
391Description:
392		Subclass code of the device, in hexadecimal.
393
394		See USB specs for its meaning.
395
396What:		/sys/bus/usb/devices/usbX/bInterfaceClass
397Description:
398		Class code of the interface, in hexadecimal.
399
400		See USB specs for its meaning.
401
402What:		/sys/bus/usb/devices/usbX/bInterfaceNumber
403Description:
404		Interface number, in hexadecimal.
405
406		See USB specs for its meaning.
407
408What:		/sys/bus/usb/devices/usbX/bInterfaceProtocol
409Description:
410		Protocol code of the interface, in hexadecimal.
411
412		See USB specs for its meaning.
413
414What:		/sys/bus/usb/devices/usbX/bInterfaceSubClass
415Description:
416		Subclass code of the interface, in hexadecimal.
417
418		See USB specs for its meaning.
419
420What:		/sys/bus/usb/devices/usbX/bmAttributes
421Description:
422		Attributes of the current configuration, in hexadecimal.
423
424		See USB specs for its meaning.
425
426What:		/sys/bus/usb/devices/usbX/bMaxPacketSize0
427Description:
428		Maximum endpoint 0 packet size, in decimal.
429
430		See USB specs for its meaning.
431
432What:		/sys/bus/usb/devices/usbX/bMaxPower
433Description:
434		Maximum power consumption of the active configuration of
435		the device, in miliamperes.
436
437What:		/sys/bus/usb/devices/usbX/bNumConfigurations
438Description:
439		Number of the possible configurations of the device, in
440		decimal. The current configuration is controlled via:
441
442			/sys/bus/usb/devices/usbX/bConfigurationValue
443
444		See USB specs for its meaning.
445
446What:		/sys/bus/usb/devices/usbX/bNumEndpoints
447Description:
448		Number of endpoints used on this interface, in hexadecimal.
449
450		See USB specs for its meaning.
451
452What:		/sys/bus/usb/devices/usbX/bNumInterfaces
453Description:
454		Number of interfaces on this device, in decimal.
455
456What:		/sys/bus/usb/devices/usbX/busnum
457Description:
458		Number of the bus.
459
460What:		/sys/bus/usb/devices/usbX/configuration
461Description:
462		Contents of the string descriptor associated with the
463		current configuration. It may include the firmware version
464		of a device and/or its serial number.
465
466What:		/sys/bus/usb/devices/usbX/descriptors
467Description:
468		Contains the interface descriptors, in binary.
469
470What:		/sys/bus/usb/devices/usbX/idProduct
471Description:
472		Product ID, in hexadecimal.
473
474What:		/sys/bus/usb/devices/usbX/idVendor
475Description:
476		Vendor ID, in hexadecimal.
477
478What:		/sys/bus/usb/devices/usbX/devspec
479Description:
480		Displays the Device Tree Open Firmware node of the interface.
481
482What:		/sys/bus/usb/devices/usbX/avoid_reset_quirk
483Description:
484		Most devices have this set to zero.
485
486		If the value is 1, enable a USB quirk that prevents this
487		device to use reset.
488
489		(read/write)
490
491What:		/sys/bus/usb/devices/usbX/devnum
492Description:
493		USB interface device number, in decimal.
494
495What:		/sys/bus/usb/devices/usbX/devpath
496Description:
497		String containing the USB interface device path.
498
499What:		/sys/bus/usb/devices/usbX/manufacturer
500Description:
501		Vendor specific string containing the name of the
502		manufacturer of the device.
503
504What:		/sys/bus/usb/devices/usbX/maxchild
505Description:
506		Number of ports of an USB hub
507
508What:		/sys/bus/usb/devices/usbX/persist
509Description:
510		Keeps the device even if it gets disconnected.
511
512What:		/sys/bus/usb/devices/usbX/product
513Description:
514		Vendor specific string containing the name of the
515		device's product.
516
517What:		/sys/bus/usb/devices/usbX/speed
518Description:
519		Shows the device's max speed, according to the USB version,
520		in Mbps.
521		Can be:
522
523			=======		====================
524			Unknown		speed unknown
525			1.5		Low speed
526			15		Full speed
527			480		High Speed
528			5000		Super Speed
529			10000		Super Speed+
530			20000		Super Speed+ Gen 2x2
531			=======		====================
532
533What:		/sys/bus/usb/devices/usbX/supports_autosuspend
534Description:
535		Returns 1 if the device doesn't support autosuspend.
536		Otherwise, returns 0.
537
538What:		/sys/bus/usb/devices/usbX/urbnum
539Description:
540		Number of URBs submitted for the whole device.
541
542What:		/sys/bus/usb/devices/usbX/version
543Description:
544		String containing the USB device version, as encoded
545		at the BCD descriptor.
546
547What:		/sys/bus/usb/devices/usbX/power/autosuspend
548Description:
549		Time in milliseconds for the device to autosuspend. If the
550		value is negative, then autosuspend is prevented.
551
552		(read/write)
553
554What:		/sys/bus/usb/devices/usbX/power/active_duration
555Description:
556		The total time the device has not been suspended.
557
558What:		/sys/bus/usb/devices/usbX/power/connected_duration
559Description:
560		The total time (in msec) that the device has been connected.
561
562What:		/sys/bus/usb/devices/usbX/power/level
563Description:
564
565What:		/sys/bus/usb/devices/usbX/ep_<N>/bEndpointAddress
566Description:
567		The address of the endpoint described by this descriptor,
568		in hexadecimal. The endpoint direction on this bitmapped field
569		is also shown at:
570
571			/sys/bus/usb/devices/usbX/ep_<N>/direction
572
573		See USB specs for its meaning.
574
575What:		/sys/bus/usb/devices/usbX/ep_<N>/bInterval
576Description:
577		The interval of the endpoint as described on its descriptor,
578		in hexadecimal. The actual interval depends on the version
579		of the USB. Also shown in time units at
580		/sys/bus/usb/devices/usbX/ep_<N>/interval.
581
582What:		/sys/bus/usb/devices/usbX/ep_<N>/bLength
583Description:
584		Number of bytes of the endpoint descriptor, in hexadecimal.
585
586What:		/sys/bus/usb/devices/usbX/ep_<N>/bmAttributes
587Description:
588		Attributes which apply to the endpoint as described on its
589		descriptor, in hexadecimal. The endpoint type on this
590		bitmapped field is also shown at:
591
592			/sys/bus/usb/devices/usbX/ep_<N>/type
593
594		See USB specs for its meaning.
595
596What:		/sys/bus/usb/devices/usbX/ep_<N>/direction
597Description:
598		Direction of the endpoint. Can be:
599
600		    - both (on control endpoints)
601		    - in
602		    - out
603
604What:		/sys/bus/usb/devices/usbX/ep_<N>/interval
605Description:
606		Interval for polling endpoint for data transfers, in
607		milisseconds or microseconds.
608
609What:		/sys/bus/usb/devices/usbX/ep_<N>/type
610Description:
611		Descriptor type. Can be:
612
613		    - Control
614		    - Isoc
615		    - Bulk
616		    - Interrupt
617		    - unknown
618
619What:		/sys/bus/usb/devices/usbX/ep_<N>/wMaxPacketSize
620Description:
621		Maximum packet size this endpoint is capable of
622		sending or receiving, in hexadecimal.
623