1USB Type-C port devices (eg. /sys/class/typec/port0/) 2 3What: /sys/class/typec/<port>/data_role 4Date: April 2017 5Contact: Heikki Krogerus <[email protected]> 6Description: 7 The supported USB data roles. This attribute can be used for 8 requesting data role swapping on the port. Swapping is supported 9 as synchronous operation, so write(2) to the attribute will not 10 return until the operation has finished. The attribute is 11 notified about role changes so that poll(2) on the attribute 12 wakes up. Change on the role will also generate uevent 13 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, device 17 18What: /sys/class/typec/<port>/power_role 19Date: April 2017 20Contact: Heikki Krogerus <[email protected]> 21Description: 22 The supported power roles. This attribute can be used to request 23 power role swap on the port. Swapping is supported as 24 synchronous operation, so write(2) to the attribute will not 25 return until the operation has finished. The attribute is 26 notified about role changes so that poll(2) on the attribute 27 wakes up. Change on the role will also generate uevent 28 KOBJ_CHANGE. The current role is show in brackets, for example 29 "[source] sink" when in source mode. 30 31 Valid values: source, sink 32 33What: /sys/class/typec/<port>/port_type 34Date: May 2017 35Contact: Badhri Jagan Sridharan <[email protected]> 36Description: 37 Indicates the type of the port. This attribute can be used for 38 requesting a change in the port type. Port type change is 39 supported as a synchronous operation, so write(2) to the 40 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 and 48 dual-role-power port) 49 ====== ============================================== 50 51What: /sys/class/typec/<port>/vconn_source 52Date: April 2017 53Contact: Heikki Krogerus <[email protected]> 54Description: 55 Shows is the port VCONN Source. This attribute can be used to 56 request VCONN swap to change the VCONN Source during connection 57 when both the port and the partner support USB Power Delivery. 58 Swapping is supported as synchronous operation, so write(2) to 59 the attribute will not return until the operation has finished. 60 The attribute is notified about VCONN source changes so that 61 poll(2) on the attribute wakes up. Change on VCONN source also 62 generates uevent KOBJ_CHANGE. 63 64 Valid values: 65 66 - "no" when the port is not the VCONN Source 67 - "yes" when the port is the VCONN Source 68 69What: /sys/class/typec/<port>/power_operation_mode 70Date: April 2017 71Contact: Heikki Krogerus <[email protected]> 72Description: 73 Shows the current power operational mode the port is in. The 74 power operation mode means current level for VBUS. In case USB 75 Power Delivery communication is used for negotiating the levels, 76 power operation mode should show "usb_power_delivery". 77 78 Valid values: 79 80 - default 81 - 1.5A 82 - 3.0A 83 - usb_power_delivery 84 85What: /sys/class/typec/<port>/preferred_role 86Date: April 2017 87Contact: Heikki Krogerus <[email protected]> 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, as 91 defined in USB Type-C specification, in the port drivers. By 92 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_modes 97Date: April 2017 98Contact: Heikki Krogerus <[email protected]> 99Description: 100 Space separated list of accessory modes, defined in the USB 101 Type-C specification, the port supports. 102 103What: /sys/class/typec/<port>/usb_power_delivery_revision 104Date: April 2017 105Contact: Heikki Krogerus <[email protected]> 106Description: 107 Revision number of the supported USB Power Delivery 108 specification, or 0 when USB Power Delivery is not supported. 109 110What: /sys/class/typec/<port>/usb_typec_revision 111Date: April 2017 112Contact: Heikki Krogerus <[email protected]> 113Description: 114 Revision number of the supported USB Type-C specification. 115 116What: /sys/class/typec/<port>/orientation 117Date: February 2020 118Contact: Badhri Jagan Sridharan <[email protected]> 119Description: 120 Indicates the active orientation of the Type-C connector. 121 Valid values: 122 - "normal": CC1 orientation 123 - "reverse": CC2 orientation 124 - "unknown": Orientation cannot be determined. 125 126USB Type-C partner devices (eg. /sys/class/typec/port0-partner/) 127 128What: /sys/class/typec/<port>-partner/accessory_mode 129Date: April 2017 130Contact: Heikki Krogerus <[email protected]> 131Description: 132 Shows the Accessory Mode name when the partner is an Accessory. 133 The Accessory Modes are defined in USB Type-C Specification. 134 135What: /sys/class/typec/<port>-partner/supports_usb_power_delivery 136Date: April 2017 137Contact: Heikki Krogerus <[email protected]> 138Description: 139 Shows if the partner supports USB Power Delivery communication: 140 Valid values: yes, no 141 142What: /sys/class/typec/<port>-partner/number_of_alternate_modes 143Date: November 2020 144Contact: Prashant Malani <[email protected]> 145Description: 146 Shows the number of alternate modes which are advertised by the partner 147 during Power Delivery discovery. This file remains hidden until a value 148 greater than or equal to 0 is set by Type C port driver. 149 150What: /sys/class/typec/<port>-partner>/identity/ 151Date: April 2017 152Contact: Heikki Krogerus <[email protected]> 153Description: 154 This directory appears only if the port device driver is capable 155 of showing the result of Discover Identity USB power delivery 156 command. That will not always be possible even when USB power 157 delivery is supported, for example when USB power delivery 158 communication for the port is mostly handled in firmware. If the 159 directory exists, it will have an attribute file for every VDO 160 in Discover Identity command result. 161 162What: /sys/class/typec/<port>-partner/identity/id_header 163Date: April 2017 164Contact: Heikki Krogerus <[email protected]> 165Description: 166 ID Header VDO part of Discover Identity command result. The 167 value will show 0 until Discover Identity command result becomes 168 available. The value can be polled. 169 170What: /sys/class/typec/<port>-partner/identity/cert_stat 171Date: April 2017 172Contact: Heikki Krogerus <[email protected]> 173Description: 174 Cert Stat VDO part of Discover Identity command result. The 175 value will show 0 until Discover Identity command result becomes 176 available. The value can be polled. 177 178What: /sys/class/typec/<port>-partner/identity/product 179Date: April 2017 180Contact: Heikki Krogerus <[email protected]> 181Description: 182 Product VDO part of Discover Identity command result. The value 183 will show 0 until Discover Identity command result becomes 184 available. The value can be polled. 185 186 187USB Type-C cable devices (eg. /sys/class/typec/port0-cable/) 188 189Note: Electronically Marked Cables will have a device also for one cable plug 190(eg. /sys/class/typec/port0-plug0). If the cable is active and has also SOP 191Double Prime controller (USB Power Deliver specification ch. 2.4) it will have 192second device also for the other plug. Both plugs may have alternate modes as 193described in USB Type-C and USB Power Delivery specifications. 194 195What: /sys/class/typec/<port>-cable/type 196Date: April 2017 197Contact: Heikki Krogerus <[email protected]> 198Description: 199 Shows if the cable is active. 200 Valid values: active, passive 201 202What: /sys/class/typec/<port>-cable/plug_type 203Date: April 2017 204Contact: Heikki Krogerus <[email protected]> 205Description: 206 Shows type of the plug on the cable: 207 208 - type-a - Standard A 209 - type-b - Standard B 210 - type-c 211 - captive 212 213What: /sys/class/typec/<port>-cable/identity/ 214Date: April 2017 215Contact: Heikki Krogerus <[email protected]> 216Description: 217 This directory appears only if the port device driver is capable 218 of showing the result of Discover Identity USB power delivery 219 command. That will not always be possible even when USB power 220 delivery is supported. If the directory exists, it will have an 221 attribute for every VDO returned by Discover Identity command. 222 223What: /sys/class/typec/<port>-cable/identity/id_header 224Date: April 2017 225Contact: Heikki Krogerus <[email protected]> 226Description: 227 ID Header VDO part of Discover Identity command result. The 228 value will show 0 until Discover Identity command result becomes 229 available. The value can be polled. 230 231What: /sys/class/typec/<port>-cable/identity/cert_stat 232Date: April 2017 233Contact: Heikki Krogerus <[email protected]> 234Description: 235 Cert Stat VDO part of Discover Identity command result. The 236 value will show 0 until Discover Identity command result becomes 237 available. The value can be polled. 238 239What: /sys/class/typec/<port>-cable/identity/product 240Date: April 2017 241Contact: Heikki Krogerus <[email protected]> 242Description: 243 Product VDO part of Discover Identity command result. The value 244 will show 0 until Discover Identity command result becomes 245 available. The value can be polled. 246 247 248USB Type-C port alternate mode devices. 249 250What: /sys/class/typec/<port>/<alt mode>/supported_roles 251Date: April 2017 252Contact: Heikki Krogerus <[email protected]> 253Description: 254 Space separated list of the supported roles. 255 256 Valid values: source, sink 257