sysfs-bus-usb 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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 <david.vrabel@csr.com>
  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 <david.vrabel@csr.com>
  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 <david.vrabel@csr.com>
  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 <david.vrabel@csr.com>
  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: linux-usb@vger.kernel.org
  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: linux-usb@vger.kernel.org
  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 <rqcheng@smu.edu.sg>
  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 <andiry.xu@amd.com>
  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 <kevin.strasser@linux.intel.com>
  123. Lu Baolu <baolu.lu@linux.intel.com>
  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/.../removable
  135. Date: February 2012
  136. Contact: Matthew Garrett <mjg@redhat.com>
  137. Description:
  138. Some information about whether a given USB device is
  139. physically fixed to the platform can be inferred from a
  140. combination of hub descriptor bits and platform-specific data
  141. such as ACPI. This file will read either "removable" or
  142. "fixed" if the information is available, and "unknown"
  143. otherwise.
  144. What: /sys/bus/usb/devices/.../ltm_capable
  145. Date: July 2012
  146. Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com>
  147. Description:
  148. USB 3.0 devices may optionally support Latency Tolerance
  149. Messaging (LTM). They indicate their support by setting a bit
  150. in the bmAttributes field of their SuperSpeed BOS descriptors.
  151. If that bit is set for the device, ltm_capable will read "yes".
  152. If the device doesn't support LTM, the file will read "no".
  153. The file will be present for all speeds of USB devices, and will
  154. always read "no" for USB 1.1 and USB 2.0 devices.
  155. What: /sys/bus/usb/devices/.../(hub interface)/portX
  156. Date: August 2012
  157. Contact: Lan Tianyu <tianyu.lan@intel.com>
  158. Description:
  159. The /sys/bus/usb/devices/.../(hub interface)/portX
  160. is usb port device's sysfs directory.
  161. What: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type
  162. Date: January 2013
  163. Contact: Lan Tianyu <tianyu.lan@intel.com>
  164. Description:
  165. Some platforms provide usb port connect types through ACPI.
  166. This attribute is to expose these information to user space.
  167. The file will read "hotplug", "hardwired" and "not used" if the
  168. information is available, and "unknown" otherwise.
  169. What: /sys/bus/usb/devices/.../(hub interface)/portX/location
  170. Date: October 2018
  171. Contact: Bjørn Mork <bjorn@mork.no>
  172. Description:
  173. Some platforms provide usb port physical location through
  174. firmware. This is used by the kernel to pair up logical ports
  175. mapping to the same physical connector. The attribute exposes the
  176. raw location value as a hex integer.
  177. What: /sys/bus/usb/devices/.../(hub interface)/portX/quirks
  178. Date: May 2018
  179. Contact: Nicolas Boichat <drinkcat@chromium.org>
  180. Description:
  181. In some cases, we care about time-to-active for devices
  182. connected on a specific port (e.g. non-standard USB port like
  183. pogo pins), where the device to be connected is known in
  184. advance, and behaves well according to the specification.
  185. This attribute is a bit-field that controls the behavior of
  186. a specific port:
  187. - Bit 0 of this field selects the "old" enumeration scheme,
  188. as it is considerably faster (it only causes one USB reset
  189. instead of 2).
  190. The old enumeration scheme can also be selected globally
  191. using /sys/module/usbcore/parameters/old_scheme_first, but
  192. it is often not desirable as the new scheme was introduced to
  193. increase compatibility with more devices.
  194. - Bit 1 reduces TRSTRCY to the 10 ms that are required by the
  195. USB 2.0 specification, instead of the 50 ms that are normally
  196. used to help make enumeration work better on some high speed
  197. devices.
  198. What: /sys/bus/usb/devices/.../(hub interface)/portX/over_current_count
  199. Date: February 2018
  200. Contact: Richard Leitner <richard.leitner@skidata.com>
  201. Description:
  202. Most hubs are able to detect over-current situations on their
  203. ports and report them to the kernel. This attribute is to expose
  204. the number of over-current situation occurred on a specific port
  205. to user space. This file will contain an unsigned 32 bit value
  206. which wraps to 0 after its maximum is reached. This file supports
  207. poll() for monitoring changes to this value in user space.
  208. Any time this value changes the corresponding hub device will send a
  209. udev event with the following attributes::
  210. OVER_CURRENT_PORT=/sys/bus/usb/devices/.../(hub interface)/portX
  211. OVER_CURRENT_COUNT=[current value of this sysfs attribute]
  212. What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit
  213. Date: November 2015
  214. Contact: Lu Baolu <baolu.lu@linux.intel.com>
  215. Description:
  216. Some USB3.0 devices are not friendly to USB3 LPM. usb3_lpm_permit
  217. attribute allows enabling/disabling usb3 lpm of a port. It takes
  218. effect both before and after a usb device is enumerated. Supported
  219. values are "0" if both u1 and u2 are NOT permitted, "u1" if only u1
  220. is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and
  221. u2 are permitted.
  222. What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
  223. Date: May 2013
  224. Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
  225. Description:
  226. USB 2.0 devices may support hardware link power management (LPM)
  227. L1 sleep state. The usb2_lpm_l1_timeout attribute allows
  228. tuning the timeout for L1 inactivity timer (LPM timer), e.g.
  229. needed inactivity time before host requests the device to go to L1 sleep.
  230. Useful for power management tuning.
  231. Supported values are 0 - 65535 microseconds.
  232. What: /sys/bus/usb/devices/.../power/usb2_lpm_besl
  233. Date: May 2013
  234. Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
  235. Description:
  236. USB 2.0 devices that support hardware link power management (LPM)
  237. L1 sleep state now use a best effort service latency value (BESL) to
  238. indicate the best effort to resumption of service to the device after the
  239. initiation of the resume event.
  240. If the device does not have a preferred besl value then the host can select
  241. one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
  242. value in order to tune power saving and service latency.
  243. Supported values are 0 - 15.
  244. More information on how besl values map to microseconds can be found in
  245. USB 2.0 ECN Errata for Link Power Management, section 4.10)
  246. What: /sys/bus/usb/devices/.../rx_lanes
  247. Date: March 2018
  248. Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
  249. Description:
  250. Number of rx lanes the device is using.
  251. USB 3.2 adds Dual-lane support, 2 rx and 2 tx lanes over Type-C.
  252. Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
  253. direction. Devices before USB 3.2 are single lane (rx_lanes = 1)
  254. What: /sys/bus/usb/devices/.../tx_lanes
  255. Date: March 2018
  256. Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
  257. Description:
  258. Number of tx lanes the device is using.
  259. USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C.
  260. Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per
  261. direction. Devices before USB 3.2 are single lane (tx_lanes = 1)