17f59c150SStefan KochWhat: /sys/bus/usb/devices/INTERFACE/authorized 27f59c150SStefan KochDate: August 2015 37f59c150SStefan KochDescription: 47f59c150SStefan Koch This allows to authorize (1) or deauthorize (0) 57f59c150SStefan Koch individual interfaces instead a whole device 67f59c150SStefan Koch in contrast to the device authorization. 77f59c150SStefan Koch If a deauthorized interface will be authorized 87f59c150SStefan Koch so the driver probing must be triggered manually 97f59c150SStefan Koch by writing INTERFACE to /sys/bus/usb/drivers_probe 107f59c150SStefan Koch This allows to avoid side-effects with drivers 117f59c150SStefan Koch that need multiple interfaces. 127f59c150SStefan Koch A deauthorized interface cannot be probed or claimed. 137f59c150SStefan Koch 147f59c150SStefan KochWhat: /sys/bus/usb/devices/usbX/interface_authorized_default 157f59c150SStefan KochDate: August 2015 167f59c150SStefan KochDescription: 177f59c150SStefan Koch This is used as value that determines if interfaces 187f59c150SStefan Koch would be authorized by default. 197f59c150SStefan Koch The value can be 1 or 0. It's by default 1. 207f59c150SStefan Koch 21c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../authorized 22c8cf2465SDavid VrabelDate: July 2008 23c8cf2465SDavid VrabelKernelVersion: 2.6.26 24c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 25c8cf2465SDavid VrabelDescription: 26c8cf2465SDavid Vrabel Authorized devices are available for use by device 27c8cf2465SDavid Vrabel drivers, non-authorized one are not. By default, wired 28c8cf2465SDavid Vrabel USB devices are authorized. 29c8cf2465SDavid Vrabel 30c8cf2465SDavid Vrabel Certified Wireless USB devices are not authorized 31c8cf2465SDavid Vrabel initially and should be (by writing 1) after the 32c8cf2465SDavid Vrabel device has been authenticated. 33c8cf2465SDavid Vrabel 34c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_cdid 35c8cf2465SDavid VrabelDate: July 2008 36c8cf2465SDavid VrabelKernelVersion: 2.6.27 37c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 38c8cf2465SDavid VrabelDescription: 39c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 40c8cf2465SDavid Vrabel 41c8cf2465SDavid Vrabel A devices's CDID, as 16 space-separated hex octets. 42c8cf2465SDavid Vrabel 43c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_ck 44c8cf2465SDavid VrabelDate: July 2008 45c8cf2465SDavid VrabelKernelVersion: 2.6.27 46c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 47c8cf2465SDavid VrabelDescription: 48c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 49c8cf2465SDavid Vrabel 50c8cf2465SDavid Vrabel Write the device's connection key (CK) to start the 51c8cf2465SDavid Vrabel authentication of the device. The CK is 16 52c8cf2465SDavid Vrabel space-separated hex octets. 53c8cf2465SDavid Vrabel 54c8cf2465SDavid VrabelWhat: /sys/bus/usb/device/.../wusb_disconnect 55c8cf2465SDavid VrabelDate: July 2008 56c8cf2465SDavid VrabelKernelVersion: 2.6.27 57c8cf2465SDavid VrabelContact: David Vrabel <david.vrabel@csr.com> 58c8cf2465SDavid VrabelDescription: 59c8cf2465SDavid Vrabel For Certified Wireless USB devices only. 60c8cf2465SDavid Vrabel 61c8cf2465SDavid Vrabel Write a 1 to force the device to disconnect 62c8cf2465SDavid Vrabel (equivalent to unplugging a wired USB device). 630c7a2b72SCHENG Renquan 64ff231db8SJosua DietzeWhat: /sys/bus/usb/drivers/.../new_id 65ff231db8SJosua DietzeDate: October 2011 66ff231db8SJosua DietzeContact: linux-usb@vger.kernel.org 67ff231db8SJosua DietzeDescription: 68ff231db8SJosua Dietze Writing a device ID to this file will attempt to 69ff231db8SJosua Dietze dynamically add a new device ID to a USB device driver. 70ff231db8SJosua Dietze This may allow the driver to support more hardware than 71ff231db8SJosua Dietze was included in the driver's static device ID support 72ff231db8SJosua Dietze table at compile time. The format for the device ID is: 732fc82c2dSWolfram Sang idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct 74ff231db8SJosua Dietze The vendor ID and device ID fields are required, the 752fc82c2dSWolfram Sang rest is optional. The Ref* tuple can be used to tell the 762fc82c2dSWolfram Sang driver to use the same driver_data for the new device as 772fc82c2dSWolfram Sang it is used for the reference device. 78ff231db8SJosua Dietze Upon successfully adding an ID, the driver will probe 79ff231db8SJosua Dietze for the device and attempt to bind to it. For example: 80ff231db8SJosua Dietze # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id 81ff231db8SJosua Dietze 822fc82c2dSWolfram Sang Here add a new device (0458:7045) using driver_data from 832fc82c2dSWolfram Sang an already supported device (0458:704c): 842fc82c2dSWolfram Sang # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id 852fc82c2dSWolfram Sang 86e6bbcef0SBjørn Mork Reading from this file will list all dynamically added 87e6bbcef0SBjørn Mork device IDs in the same format, with one entry per 88e6bbcef0SBjørn Mork line. For example: 89e6bbcef0SBjørn Mork # cat /sys/bus/usb/drivers/foo/new_id 90e6bbcef0SBjørn Mork 8086 10f5 91e6bbcef0SBjørn Mork dead beef 06 92e6bbcef0SBjørn Mork f00d cafe 93e6bbcef0SBjørn Mork 94e6bbcef0SBjørn Mork The list will be truncated at PAGE_SIZE bytes due to 95e6bbcef0SBjørn Mork sysfs restrictions. 96e6bbcef0SBjørn Mork 97ff231db8SJosua DietzeWhat: /sys/bus/usb-serial/drivers/.../new_id 98ff231db8SJosua DietzeDate: October 2011 99ff231db8SJosua DietzeContact: linux-usb@vger.kernel.org 100ff231db8SJosua DietzeDescription: 101ff231db8SJosua Dietze For serial USB drivers, this attribute appears under the 102ff231db8SJosua Dietze extra bus folder "usb-serial" in sysfs; apart from that 103ff231db8SJosua Dietze difference, all descriptions from the entry 104ff231db8SJosua Dietze "/sys/bus/usb/drivers/.../new_id" apply. 105ff231db8SJosua Dietze 1060c7a2b72SCHENG RenquanWhat: /sys/bus/usb/drivers/.../remove_id 1070c7a2b72SCHENG RenquanDate: November 2009 1080c7a2b72SCHENG RenquanContact: CHENG Renquan <rqcheng@smu.edu.sg> 1090c7a2b72SCHENG RenquanDescription: 1100c7a2b72SCHENG Renquan Writing a device ID to this file will remove an ID 1110c7a2b72SCHENG Renquan that was dynamically added via the new_id sysfs entry. 1120c7a2b72SCHENG Renquan The format for the device ID is: 1130c7a2b72SCHENG Renquan idVendor idProduct. After successfully 1140c7a2b72SCHENG Renquan removing an ID, the driver will no longer support the 1150c7a2b72SCHENG Renquan device. This is useful to ensure auto probing won't 1160c7a2b72SCHENG Renquan match the driver to the device. For example: 1170c7a2b72SCHENG Renquan # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id 118ef955341SOliver Neukum 119e6bbcef0SBjørn Mork Reading from this file will list the dynamically added 120e6bbcef0SBjørn Mork device IDs, exactly like reading from the entry 121e6bbcef0SBjørn Mork "/sys/bus/usb/drivers/.../new_id" 122e6bbcef0SBjørn Mork 123c1045e87SAndiry XuWhat: /sys/bus/usb/devices/.../power/usb2_hardware_lpm 124c1045e87SAndiry XuDate: September 2011 125c1045e87SAndiry XuContact: Andiry Xu <andiry.xu@amd.com> 126c1045e87SAndiry XuDescription: 127ceb6c9c8SRafael J. Wysocki If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged 128ceb6c9c8SRafael J. Wysocki in to a xHCI host which support link PM, it will perform a LPM 129ceb6c9c8SRafael J. Wysocki test; if the test is passed and host supports USB2 hardware LPM 130ceb6c9c8SRafael J. Wysocki (xHCI 1.0 feature), USB2 hardware LPM will be enabled for the 131ceb6c9c8SRafael J. Wysocki device and the USB device directory will contain a file named 132ceb6c9c8SRafael J. Wysocki power/usb2_hardware_lpm. The file holds a string value (enable 133ceb6c9c8SRafael J. Wysocki or disable) indicating whether or not USB2 hardware LPM is 134ceb6c9c8SRafael J. Wysocki enabled for the device. Developer can write y/Y/1 or n/N/0 to 135ceb6c9c8SRafael J. Wysocki the file to enable/disable the feature. 1360846e7e9SMatthew Garrett 137bf5ce5bfSLu BaoluWhat: /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1 138bf5ce5bfSLu Baolu /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2 139bf5ce5bfSLu BaoluDate: November 2015 140655fe4efSKevin StrasserContact: Kevin Strasser <kevin.strasser@linux.intel.com> 141bf5ce5bfSLu Baolu Lu Baolu <baolu.lu@linux.intel.com> 142655fe4efSKevin StrasserDescription: 143a2e66ad3SValentin Rothberg If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged 144a2e66ad3SValentin Rothberg in to a xHCI host which supports link PM, it will check if U1 145a2e66ad3SValentin Rothberg and U2 exit latencies have been set in the BOS descriptor; if 146bf5ce5bfSLu Baolu the check is passed and the host supports USB3 hardware LPM, 147a2e66ad3SValentin Rothberg USB3 hardware LPM will be enabled for the device and the USB 148bf5ce5bfSLu Baolu device directory will contain two files named 149bf5ce5bfSLu Baolu power/usb3_hardware_lpm_u1 and power/usb3_hardware_lpm_u2. These 150bf5ce5bfSLu Baolu files hold a string value (enable or disable) indicating whether 151bf5ce5bfSLu Baolu or not USB3 hardware LPM U1 or U2 is enabled for the device. 152655fe4efSKevin Strasser 1530846e7e9SMatthew GarrettWhat: /sys/bus/usb/devices/.../removable 1540846e7e9SMatthew GarrettDate: February 2012 1550846e7e9SMatthew GarrettContact: Matthew Garrett <mjg@redhat.com> 1560846e7e9SMatthew GarrettDescription: 1570846e7e9SMatthew Garrett Some information about whether a given USB device is 1580846e7e9SMatthew Garrett physically fixed to the platform can be inferred from a 159c94bed8eSMasanari Iida combination of hub descriptor bits and platform-specific data 1600846e7e9SMatthew Garrett such as ACPI. This file will read either "removable" or 1610846e7e9SMatthew Garrett "fixed" if the information is available, and "unknown" 1620846e7e9SMatthew Garrett otherwise. 163024f117cSSarah Sharp 164024f117cSSarah SharpWhat: /sys/bus/usb/devices/.../ltm_capable 165024f117cSSarah SharpDate: July 2012 166024f117cSSarah SharpContact: Sarah Sharp <sarah.a.sharp@linux.intel.com> 167024f117cSSarah SharpDescription: 168024f117cSSarah Sharp USB 3.0 devices may optionally support Latency Tolerance 169024f117cSSarah Sharp Messaging (LTM). They indicate their support by setting a bit 170024f117cSSarah Sharp in the bmAttributes field of their SuperSpeed BOS descriptors. 171024f117cSSarah Sharp If that bit is set for the device, ltm_capable will read "yes". 172024f117cSSarah Sharp If the device doesn't support LTM, the file will read "no". 173024f117cSSarah Sharp The file will be present for all speeds of USB devices, and will 174024f117cSSarah Sharp always read "no" for USB 1.1 and USB 2.0 devices. 175fa2a9566SLan Tianyu 176fa2a9566SLan TianyuWhat: /sys/bus/usb/devices/.../(hub interface)/portX 177fa2a9566SLan TianyuDate: August 2012 178fa2a9566SLan TianyuContact: Lan Tianyu <tianyu.lan@intel.com> 179fa2a9566SLan TianyuDescription: 180fa2a9566SLan Tianyu The /sys/bus/usb/devices/.../(hub interface)/portX 181fa2a9566SLan Tianyu is usb port device's sysfs directory. 182cef7468cSLan Tianyu 183cef7468cSLan TianyuWhat: /sys/bus/usb/devices/.../(hub interface)/portX/connect_type 184cef7468cSLan TianyuDate: January 2013 185cef7468cSLan TianyuContact: Lan Tianyu <tianyu.lan@intel.com> 186cef7468cSLan TianyuDescription: 187cef7468cSLan Tianyu Some platforms provide usb port connect types through ACPI. 188cef7468cSLan Tianyu This attribute is to expose these information to user space. 189cef7468cSLan Tianyu The file will read "hotplug", "wired" and "not used" if the 190cef7468cSLan Tianyu information is available, and "unknown" otherwise. 19117f34867SMathias Nyman 19217f34867SMathias NymanWhat: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout 19317f34867SMathias NymanDate: May 2013 19417f34867SMathias NymanContact: Mathias Nyman <mathias.nyman@linux.intel.com> 19517f34867SMathias NymanDescription: 19617f34867SMathias Nyman USB 2.0 devices may support hardware link power management (LPM) 19717f34867SMathias Nyman L1 sleep state. The usb2_lpm_l1_timeout attribute allows 19817f34867SMathias Nyman tuning the timeout for L1 inactivity timer (LPM timer), e.g. 19917f34867SMathias Nyman needed inactivity time before host requests the device to go to L1 sleep. 20017f34867SMathias Nyman Useful for power management tuning. 20117f34867SMathias Nyman Supported values are 0 - 65535 microseconds. 20217f34867SMathias Nyman 20317f34867SMathias NymanWhat: /sys/bus/usb/devices/.../power/usb2_lpm_besl 20417f34867SMathias NymanDate: May 2013 20517f34867SMathias NymanContact: Mathias Nyman <mathias.nyman@linux.intel.com> 20617f34867SMathias NymanDescription: 20717f34867SMathias Nyman USB 2.0 devices that support hardware link power management (LPM) 20817f34867SMathias Nyman L1 sleep state now use a best effort service latency value (BESL) to 20917f34867SMathias Nyman indicate the best effort to resumption of service to the device after the 21017f34867SMathias Nyman initiation of the resume event. 21117f34867SMathias Nyman If the device does not have a preferred besl value then the host can select 21217f34867SMathias Nyman one instead. This usb2_lpm_besl attribute allows to tune the host selected besl 21317f34867SMathias Nyman value in order to tune power saving and service latency. 21417f34867SMathias Nyman 21517f34867SMathias Nyman Supported values are 0 - 15. 21617f34867SMathias Nyman More information on how besl values map to microseconds can be found in 21717f34867SMathias Nyman USB 2.0 ECN Errata for Link Power Management, section 4.10) 218