sysfs-bus-usb 20 KB

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