Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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. |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 12 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 13 | A deauthorized interface cannot be probed or claimed. |
| 14 | |
| 15 | What: /sys/bus/usb/devices/usbX/interface_authorized_default |
| 16 | Date: August 2015 |
| 17 | Description: |
| 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 | |
| 22 | What: /sys/bus/usb/device/.../authorized |
| 23 | Date: July 2008 |
| 24 | KernelVersion: 2.6.26 |
| 25 | Contact: David Vrabel <david.vrabel@csr.com> |
| 26 | Description: |
| 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 | |
| 35 | What: /sys/bus/usb/device/.../wusb_cdid |
| 36 | Date: July 2008 |
| 37 | KernelVersion: 2.6.27 |
| 38 | Contact: David Vrabel <david.vrabel@csr.com> |
| 39 | Description: |
| 40 | For Certified Wireless USB devices only. |
| 41 | |
| 42 | A devices's CDID, as 16 space-separated hex octets. |
| 43 | |
| 44 | What: /sys/bus/usb/device/.../wusb_ck |
| 45 | Date: July 2008 |
| 46 | KernelVersion: 2.6.27 |
| 47 | Contact: David Vrabel <david.vrabel@csr.com> |
| 48 | Description: |
| 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 | |
| 55 | What: /sys/bus/usb/device/.../wusb_disconnect |
| 56 | Date: July 2008 |
| 57 | KernelVersion: 2.6.27 |
| 58 | Contact: David Vrabel <david.vrabel@csr.com> |
| 59 | Description: |
| 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 | |
| 65 | What: /sys/bus/usb/drivers/.../new_id |
| 66 | Date: October 2011 |
| 67 | Contact: linux-usb@vger.kernel.org |
| 68 | Description: |
| 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 |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 76 | rest is optional. The `Ref*` tuple can be used to tell the |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 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 |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 80 | for the device and attempt to bind to it. For example:: |
| 81 | |
| 82 | # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 83 | |
| 84 | Here add a new device (0458:7045) using driver_data from |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 85 | an already supported device (0458:704c):: |
| 86 | |
| 87 | # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 88 | |
| 89 | Reading from this file will list all dynamically added |
| 90 | device IDs in the same format, with one entry per |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 91 | line. For example:: |
| 92 | |
| 93 | # cat /sys/bus/usb/drivers/foo/new_id |
| 94 | 8086 10f5 |
| 95 | dead beef 06 |
| 96 | f00d cafe |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 97 | |
| 98 | The list will be truncated at PAGE_SIZE bytes due to |
| 99 | sysfs restrictions. |
| 100 | |
| 101 | What: /sys/bus/usb-serial/drivers/.../new_id |
| 102 | Date: October 2011 |
| 103 | Contact: linux-usb@vger.kernel.org |
| 104 | Description: |
| 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 | |
| 110 | What: /sys/bus/usb/drivers/.../remove_id |
| 111 | Date: November 2009 |
| 112 | Contact: CHENG Renquan <rqcheng@smu.edu.sg> |
| 113 | Description: |
| 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 | |
| 127 | What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm |
| 128 | Date: September 2011 |
| 129 | Contact: Andiry Xu <andiry.xu@amd.com> |
| 130 | Description: |
| 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 | |
| 141 | What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1 |
| 142 | /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2 |
| 143 | Date: November 2015 |
| 144 | Contact: Kevin Strasser <kevin.strasser@linux.intel.com> |
| 145 | Lu Baolu <baolu.lu@linux.intel.com> |
| 146 | Description: |
| 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 | |
| 157 | What: /sys/bus/usb/devices/.../removable |
| 158 | Date: February 2012 |
| 159 | Contact: Matthew Garrett <mjg@redhat.com> |
| 160 | Description: |
| 161 | Some information about whether a given USB device is |
| 162 | physically fixed to the platform can be inferred from a |
| 163 | combination of hub descriptor bits and platform-specific data |
| 164 | such as ACPI. This file will read either "removable" or |
| 165 | "fixed" if the information is available, and "unknown" |
| 166 | otherwise. |
| 167 | |
| 168 | What: /sys/bus/usb/devices/.../ltm_capable |
| 169 | Date: July 2012 |
| 170 | Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com> |
| 171 | Description: |
| 172 | USB 3.0 devices may optionally support Latency Tolerance |
| 173 | Messaging (LTM). They indicate their support by setting a bit |
| 174 | in the bmAttributes field of their SuperSpeed BOS descriptors. |
| 175 | If that bit is set for the device, ltm_capable will read "yes". |
| 176 | If the device doesn't support LTM, the file will read "no". |
| 177 | The file will be present for all speeds of USB devices, and will |
| 178 | always read "no" for USB 1.1 and USB 2.0 devices. |
| 179 | |
| 180 | What: /sys/bus/usb/devices/.../(hub interface)/portX |
| 181 | Date: August 2012 |
| 182 | Contact: Lan Tianyu <tianyu.lan@intel.com> |
| 183 | Description: |
| 184 | The /sys/bus/usb/devices/.../(hub interface)/portX |
| 185 | is usb port device's sysfs directory. |
| 186 | |
| 187 | What: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type |
| 188 | Date: January 2013 |
| 189 | Contact: Lan Tianyu <tianyu.lan@intel.com> |
| 190 | Description: |
| 191 | Some platforms provide usb port connect types through ACPI. |
| 192 | This attribute is to expose these information to user space. |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 193 | The file will read "hotplug", "hardwired" and "not used" if the |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 194 | information is available, and "unknown" otherwise. |
| 195 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 196 | What: /sys/bus/usb/devices/.../(hub interface)/portX/location |
| 197 | Date: October 2018 |
| 198 | Contact: Bjørn Mork <bjorn@mork.no> |
| 199 | Description: |
| 200 | Some platforms provide usb port physical location through |
| 201 | firmware. This is used by the kernel to pair up logical ports |
| 202 | mapping to the same physical connector. The attribute exposes the |
| 203 | raw location value as a hex integer. |
| 204 | |
| 205 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 206 | What: /sys/bus/usb/devices/.../(hub interface)/portX/quirks |
| 207 | Date: May 2018 |
| 208 | Contact: Nicolas Boichat <drinkcat@chromium.org> |
| 209 | Description: |
| 210 | In some cases, we care about time-to-active for devices |
| 211 | connected on a specific port (e.g. non-standard USB port like |
| 212 | pogo pins), where the device to be connected is known in |
| 213 | advance, and behaves well according to the specification. |
| 214 | This attribute is a bit-field that controls the behavior of |
| 215 | a specific port: |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 216 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 217 | - Bit 0 of this field selects the "old" enumeration scheme, |
| 218 | as it is considerably faster (it only causes one USB reset |
| 219 | instead of 2). |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 220 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 221 | The old enumeration scheme can also be selected globally |
| 222 | using /sys/module/usbcore/parameters/old_scheme_first, but |
| 223 | it is often not desirable as the new scheme was introduced to |
| 224 | increase compatibility with more devices. |
| 225 | - Bit 1 reduces TRSTRCY to the 10 ms that are required by the |
| 226 | USB 2.0 specification, instead of the 50 ms that are normally |
| 227 | used to help make enumeration work better on some high speed |
| 228 | devices. |
| 229 | |
| 230 | What: /sys/bus/usb/devices/.../(hub interface)/portX/over_current_count |
| 231 | Date: February 2018 |
| 232 | Contact: Richard Leitner <richard.leitner@skidata.com> |
| 233 | Description: |
| 234 | Most hubs are able to detect over-current situations on their |
| 235 | ports and report them to the kernel. This attribute is to expose |
| 236 | the number of over-current situation occurred on a specific port |
| 237 | to user space. This file will contain an unsigned 32 bit value |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 238 | which wraps to 0 after its maximum is reached. This file supports |
| 239 | poll() for monitoring changes to this value in user space. |
| 240 | |
| 241 | Any time this value changes the corresponding hub device will send a |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 242 | udev event with the following attributes:: |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 243 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 244 | OVER_CURRENT_PORT=/sys/bus/usb/devices/.../(hub interface)/portX |
| 245 | OVER_CURRENT_COUNT=[current value of this sysfs attribute] |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 246 | |
| 247 | What: /sys/bus/usb/devices/.../(hub interface)/portX/usb3_lpm_permit |
| 248 | Date: November 2015 |
| 249 | Contact: Lu Baolu <baolu.lu@linux.intel.com> |
| 250 | Description: |
| 251 | Some USB3.0 devices are not friendly to USB3 LPM. usb3_lpm_permit |
| 252 | attribute allows enabling/disabling usb3 lpm of a port. It takes |
| 253 | effect both before and after a usb device is enumerated. Supported |
| 254 | values are "0" if both u1 and u2 are NOT permitted, "u1" if only u1 |
| 255 | is permitted, "u2" if only u2 is permitted, "u1_u2" if both u1 and |
| 256 | u2 are permitted. |
| 257 | |
| 258 | What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout |
| 259 | Date: May 2013 |
| 260 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> |
| 261 | Description: |
| 262 | USB 2.0 devices may support hardware link power management (LPM) |
| 263 | L1 sleep state. The usb2_lpm_l1_timeout attribute allows |
| 264 | tuning the timeout for L1 inactivity timer (LPM timer), e.g. |
| 265 | needed inactivity time before host requests the device to go to L1 sleep. |
| 266 | Useful for power management tuning. |
| 267 | Supported values are 0 - 65535 microseconds. |
| 268 | |
| 269 | What: /sys/bus/usb/devices/.../power/usb2_lpm_besl |
| 270 | Date: May 2013 |
| 271 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> |
| 272 | Description: |
| 273 | USB 2.0 devices that support hardware link power management (LPM) |
| 274 | L1 sleep state now use a best effort service latency value (BESL) to |
| 275 | indicate the best effort to resumption of service to the device after the |
| 276 | initiation of the resume event. |
| 277 | If the device does not have a preferred besl value then the host can select |
| 278 | one instead. This usb2_lpm_besl attribute allows to tune the host selected besl |
| 279 | value in order to tune power saving and service latency. |
| 280 | |
| 281 | Supported values are 0 - 15. |
| 282 | More information on how besl values map to microseconds can be found in |
| 283 | USB 2.0 ECN Errata for Link Power Management, section 4.10) |
| 284 | |
| 285 | What: /sys/bus/usb/devices/.../rx_lanes |
| 286 | Date: March 2018 |
| 287 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> |
| 288 | Description: |
| 289 | Number of rx lanes the device is using. |
| 290 | USB 3.2 adds Dual-lane support, 2 rx and 2 tx lanes over Type-C. |
| 291 | Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per |
| 292 | direction. Devices before USB 3.2 are single lane (rx_lanes = 1) |
| 293 | |
| 294 | What: /sys/bus/usb/devices/.../tx_lanes |
| 295 | Date: March 2018 |
| 296 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> |
| 297 | Description: |
| 298 | Number of tx lanes the device is using. |
| 299 | USB 3.2 adds Dual-lane support, 2 rx and 2 tx -lanes over Type-C. |
| 300 | Inter-Chip SSIC devices support asymmetric lanes up to 4 lanes per |
| 301 | direction. Devices before USB 3.2 are single lane (tx_lanes = 1) |