349 lines · plain
1USB Type-C port devices (eg. /sys/class/typec/port0/)2 3What: /sys/class/typec/<port>/data_role4Date: April 20175Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>6Description:7 The supported USB data roles. This attribute can be used for8 requesting data role swapping on the port. Swapping is supported9 as synchronous operation, so write(2) to the attribute will not10 return until the operation has finished. The attribute is11 notified about role changes so that poll(2) on the attribute12 wakes up. Change on the role will also generate uevent13 KOBJ_CHANGE on the port. The current role is show in brackets,14 for example "[host] device" when DRP port is in host mode.15 16 Valid values: host, device17 18What: /sys/class/typec/<port>/power_role19Date: April 201720Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>21Description:22 The supported power roles. This attribute can be used to request23 power role swap on the port. Swapping is supported as24 synchronous operation, so write(2) to the attribute will not25 return until the operation has finished. The attribute is26 notified about role changes so that poll(2) on the attribute27 wakes up. Change on the role will also generate uevent28 KOBJ_CHANGE. The current role is show in brackets, for example29 "[source] sink" when in source mode.30 31 Valid values: source, sink32 33What: /sys/class/typec/<port>/port_type34Date: May 201735Contact: Badhri Jagan Sridharan <Badhri@google.com>36Description:37 Indicates the type of the port. This attribute can be used for38 requesting a change in the port type. Port type change is39 supported as a synchronous operation, so write(2) to the40 attribute will not return until the operation has finished.41 42 Valid values:43 44 ====== ==============================================45 source (The port will behave as source only DFP port)46 sink (The port will behave as sink only UFP port)47 dual (The port will behave as dual-role-data and48 dual-role-power port)49 ====== ==============================================50 51What: /sys/class/typec/<port>/vconn_source52Date: April 201753Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>54Description:55 Shows is the port VCONN Source. This attribute can be used to56 request VCONN swap to change the VCONN Source during connection57 when both the port and the partner support USB Power Delivery.58 Swapping is supported as synchronous operation, so write(2) to59 the attribute will not return until the operation has finished.60 The attribute is notified about VCONN source changes so that61 poll(2) on the attribute wakes up. Change on VCONN source also62 generates uevent KOBJ_CHANGE.63 64 Valid values:65 66 - "no" when the port is not the VCONN Source67 - "yes" when the port is the VCONN Source68 69What: /sys/class/typec/<port>/power_operation_mode70Date: April 201771Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>72Description:73 Shows the current power operational mode the port is in. The74 power operation mode means current level for VBUS. In case USB75 Power Delivery communication is used for negotiating the levels,76 power operation mode should show "usb_power_delivery".77 78 Valid values:79 80 - default81 - 1.5A82 - 3.0A83 - usb_power_delivery84 85What: /sys/class/typec/<port>/preferred_role86Date: April 201787Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>88Description:89 The user space can notify the driver about the preferred role.90 It should be handled as enabling of Try.SRC or Try.SNK, as91 defined in USB Type-C specification, in the port drivers. By92 default the preferred role should come from the platform.93 94 Valid values: source, sink, none (to remove preference)95 96What: /sys/class/typec/<port>/supported_accessory_modes97Date: April 201798Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>99Description:100 Space separated list of accessory modes, defined in the USB101 Type-C specification, the port supports.102 103What: /sys/class/typec/<port>/usb_power_delivery_revision104Date: April 2017105Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>106Description:107 Revision number of the supported USB Power Delivery108 specification, or 0.0 when USB Power Delivery is not supported.109 110 Example values:111 - "2.0": USB Power Delivery Release 2.0112 - "3.0": USB Power Delivery Release 3.0113 - "3.1": USB Power Delivery Release 3.1114 115What: /sys/class/typec/<port>-{partner|cable}/usb_power_delivery_revision116Date: January 2021117Contact: Benson Leung <bleung@chromium.org>118Description:119 Revision number of the supported USB Power Delivery120 specification of the port partner or cable, or 0.0 when USB121 Power Delivery is not supported.122 123 Example values:124 - "2.0": USB Power Delivery Release 2.0125 - "3.0": USB Power Delivery Release 3.0126 - "3.1": USB Power Delivery Release 3.1127 128What: /sys/class/typec/<port>/usb_typec_revision129Date: April 2017130Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>131Description:132 Revision number of the supported USB Type-C specification.133 134What: /sys/class/typec/<port>/orientation135Date: February 2020136Contact: Badhri Jagan Sridharan <badhri@google.com>137Description:138 Indicates the active orientation of the Type-C connector.139 Valid values:140 - "normal": CC1 orientation141 - "reverse": CC2 orientation142 - "unknown": Orientation cannot be determined.143 144What: /sys/class/typec/<port>/select_usb_power_delivery145Date: May 2022146Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>147Description:148 Lists the USB Power Delivery Capabilities that the port can149 advertise to the partner. The currently used capabilities are in150 brackets. Selection happens by writing to the file.151 152USB Type-C partner devices (eg. /sys/class/typec/port0-partner/)153 154What: /sys/class/typec/<port>-partner/accessory_mode155Date: April 2017156Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>157Description:158 Shows the Accessory Mode name when the partner is an Accessory.159 The Accessory Modes are defined in USB Type-C Specification.160 161What: /sys/class/typec/<port>-partner/supports_usb_power_delivery162Date: April 2017163Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>164Description:165 Shows if the partner supports USB Power Delivery communication:166 Valid values: yes, no167 168What: /sys/class/typec/<port>-partner/number_of_alternate_modes169Date: November 2020170Contact: Prashant Malani <pmalani@chromium.org>171Description:172 Shows the number of alternate modes which are advertised by the partner173 during Power Delivery discovery. This file remains hidden until a value174 greater than or equal to 0 is set by Type C port driver.175 176What: /sys/class/typec/<port>-partner/type177Date: December 2020178Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>179Description: USB Power Delivery Specification defines a set of product types180 for the partner devices. This file will show the product type of181 the partner if it is known. Dual-role capable partners will have182 both UFP and DFP product types defined, but only one that183 matches the current role will be active at the time. If the184 product type of the partner is not visible to the device driver,185 this file will not exist.186 187 When the partner product type is detected, or changed with role188 swap, uvevent is also raised that contains PRODUCT_TYPE=<product189 type> (for example PRODUCT_TYPE=hub).190 191 Valid values:192 193 UFP / device role194 ====================== ==========================195 undefined -196 hub PDUSB Hub197 peripheral PDUSB Peripheral198 psd Power Bank199 ama Alternate Mode Adapter200 ====================== ==========================201 202 DFP / host role203 ====================== ==========================204 undefined -205 hub PDUSB Hub206 host PDUSB Host207 power_brick Power Brick208 amc Alternate Mode Controller209 ====================== ==========================210 211What: /sys/class/typec/<port>-partner/identity/212Date: April 2017213Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>214Description:215 This directory appears only if the port device driver is capable216 of showing the result of Discover Identity USB power delivery217 command. That will not always be possible even when USB power218 delivery is supported, for example when USB power delivery219 communication for the port is mostly handled in firmware. If the220 directory exists, it will have an attribute file for every VDO221 in Discover Identity command result.222 223USB Type-C cable devices (eg. /sys/class/typec/port0-cable/)224 225Note: Electronically Marked Cables will have a device also for one cable plug226(eg. /sys/class/typec/port0-plug0). If the cable is active and has also SOP227Double Prime controller (USB Power Deliver specification ch. 2.4) it will have228second device also for the other plug. Both plugs may have alternate modes as229described in USB Type-C and USB Power Delivery specifications.230 231What: /sys/class/typec/<port>-cable/type232Date: April 2017233Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>234Description: USB Power Delivery Specification defines a set of product types235 for the cables. This file will show the product type of the236 cable if it is known. If the product type of the cable is not237 visible to the device driver, this file will not exist.238 239 When the cable product type is detected, uvevent is also raised240 with PRODUCT_TYPE showing the product type of the cable.241 242 Valid values:243 244 ====================== ==========================245 undefined -246 active Active Cable247 passive Passive Cable248 ====================== ==========================249 250What: /sys/class/typec/<port>-cable/plug_type251Date: April 2017252Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>253Description:254 Shows type of the plug on the cable:255 256 - type-a - Standard A257 - type-b - Standard B258 - type-c259 - captive260 261What: /sys/class/typec/<port>-<plug>/number_of_alternate_modes262Date: November 2020263Contact: Prashant Malani <pmalani@chromium.org>264Description:265 Shows the number of alternate modes which are advertised by the plug266 associated with a particular cable during Power Delivery discovery.267 This file remains hidden until a value greater than or equal to 0268 is set by Type C port driver.269 270 271USB Type-C partner/cable Power Delivery Identity objects272 273NOTE: The following attributes will be applicable to both274partner (e.g /sys/class/typec/port0-partner/) and275cable (e.g /sys/class/typec/port0-cable/) devices. Consequently, the example file276paths below are prefixed with "/sys/class/typec/<port>-{partner|cable}/" to277reflect this.278 279What: /sys/class/typec/<port>-{partner|cable}/identity/280Date: April 2017281Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>282Description:283 This directory appears only if the port device driver is capable284 of showing the result of Discover Identity USB power delivery285 command. That will not always be possible even when USB power286 delivery is supported, for example when USB power delivery287 communication for the port is mostly handled in firmware. If the288 directory exists, it will have an attribute file for every VDO289 in Discover Identity command result.290 291What: /sys/class/typec/<port>-{partner|cable}/identity/id_header292Date: April 2017293Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>294Description:295 ID Header VDO part of Discover Identity command result. The296 value will show 0 until Discover Identity command result becomes297 available. The value can be polled.298 299What: /sys/class/typec/<port>-{partner|cable}/identity/cert_stat300Date: April 2017301Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>302Description:303 Cert Stat VDO part of Discover Identity command result. The304 value will show 0 until Discover Identity command result becomes305 available. The value can be polled.306 307What: /sys/class/typec/<port>-{partner|cable}/identity/product308Date: April 2017309Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>310Description:311 Product VDO part of Discover Identity command result. The value312 will show 0 until Discover Identity command result becomes313 available. The value can be polled.314 315What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo1316Date: October 2020317Contact: Prashant Malani <pmalani@chromium.org>318Description:319 1st Product Type VDO of Discover Identity command result.320 The value will show 0 until Discover Identity command result becomes321 available and a valid Product Type VDO is returned.322 323What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo2324Date: October 2020325Contact: Prashant Malani <pmalani@chromium.org>326Description:327 2nd Product Type VDO of Discover Identity command result.328 The value will show 0 until Discover Identity command result becomes329 available and a valid Product Type VDO is returned.330 331What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo3332Date: October 2020333Contact: Prashant Malani <pmalani@chromium.org>334Description:335 3rd Product Type VDO of Discover Identity command result.336 The value will show 0 until Discover Identity command result becomes337 available and a valid Product Type VDO is returned.338 339 340USB Type-C port alternate mode devices.341 342What: /sys/class/typec/<port>/<alt mode>/supported_roles343Date: April 2017344Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>345Description:346 Space separated list of the supported roles.347 348 Valid values: source, sink349