1 USB Type-C port devices (eg. /sys/class/typec/port0/)
3 What: /sys/class/typec/<port>/data_role
5 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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.
16 Valid values: host, device
18 What: /sys/class/typec/<port>/power_role
20 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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.
31 Valid values: source, sink
33 What: /sys/class/typec/<port>/port_type
35 Contact: Badhri Jagan Sridharan <Badhri@google.com>
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.
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
49 ====== ==============================================
51 What: /sys/class/typec/<port>/vconn_source
53 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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.
66 - "no" when the port is not the VCONN Source
67 - "yes" when the port is the VCONN Source
69 What: /sys/class/typec/<port>/power_operation_mode
71 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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".
85 What: /sys/class/typec/<port>/preferred_role
87 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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.
94 Valid values: source, sink, none (to remove preference)
96 What: /sys/class/typec/<port>/supported_accessory_modes
98 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
100 Space separated list of accessory modes, defined in the USB
101 Type-C specification, the port supports.
103 What: /sys/class/typec/<port>/usb_power_delivery_revision
105 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
107 Revision number of the supported USB Power Delivery
108 specification, or 0.0 when USB Power Delivery is not supported.
111 - "2.0": USB Power Delivery Release 2.0
112 - "3.0": USB Power Delivery Release 3.0
113 - "3.1": USB Power Delivery Release 3.1
115 What: /sys/class/typec/<port>-{partner|cable}/usb_power_delivery_revision
117 Contact: Benson Leung <bleung@chromium.org>
119 Revision number of the supported USB Power Delivery
120 specification of the port partner or cable, or 0.0 when USB
121 Power Delivery is not supported.
124 - "2.0": USB Power Delivery Release 2.0
125 - "3.0": USB Power Delivery Release 3.0
126 - "3.1": USB Power Delivery Release 3.1
128 What: /sys/class/typec/<port>/usb_typec_revision
130 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
132 Revision number of the supported USB Type-C specification.
134 What: /sys/class/typec/<port>/orientation
136 Contact: Badhri Jagan Sridharan <badhri@google.com>
138 Indicates the active orientation of the Type-C connector.
140 - "normal": CC1 orientation
141 - "reverse": CC2 orientation
142 - "unknown": Orientation cannot be determined.
144 What: /sys/class/typec/<port>/select_usb_power_delivery
146 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
148 Lists the USB Power Delivery Capabilities that the port can
149 advertise to the partner. The currently used capabilities are in
150 brackets. Selection happens by writing to the file.
152 USB Type-C partner devices (eg. /sys/class/typec/port0-partner/)
154 What: /sys/class/typec/<port>-partner/accessory_mode
156 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
158 Shows the Accessory Mode name when the partner is an Accessory.
159 The Accessory Modes are defined in USB Type-C Specification.
161 What: /sys/class/typec/<port>-partner/supports_usb_power_delivery
163 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
165 Shows if the partner supports USB Power Delivery communication:
166 Valid values: yes, no
168 What: /sys/class/typec/<port>-partner/number_of_alternate_modes
170 Contact: Prashant Malani <pmalani@chromium.org>
172 Shows the number of alternate modes which are advertised by the partner
173 during Power Delivery discovery. This file remains hidden until a value
174 greater than or equal to 0 is set by Type C port driver.
176 What: /sys/class/typec/<port>-partner/type
178 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
179 Description: USB Power Delivery Specification defines a set of product types
180 for the partner devices. This file will show the product type of
181 the partner if it is known. Dual-role capable partners will have
182 both UFP and DFP product types defined, but only one that
183 matches the current role will be active at the time. If the
184 product type of the partner is not visible to the device driver,
185 this file will not exist.
187 When the partner product type is detected, or changed with role
188 swap, uvevent is also raised that contains PRODUCT_TYPE=<product
189 type> (for example PRODUCT_TYPE=hub).
194 ====================== ==========================
197 peripheral PDUSB Peripheral
199 ama Alternate Mode Adapter
200 ====================== ==========================
203 ====================== ==========================
207 power_brick Power Brick
208 amc Alternate Mode Controller
209 ====================== ==========================
211 What: /sys/class/typec/<port>-partner/identity/
213 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
215 This directory appears only if the port device driver is capable
216 of showing the result of Discover Identity USB power delivery
217 command. That will not always be possible even when USB power
218 delivery is supported, for example when USB power delivery
219 communication for the port is mostly handled in firmware. If the
220 directory exists, it will have an attribute file for every VDO
221 in Discover Identity command result.
223 USB Type-C cable devices (eg. /sys/class/typec/port0-cable/)
225 Note: Electronically Marked Cables will have a device also for one cable plug
226 (eg. /sys/class/typec/port0-plug0). If the cable is active and has also SOP
227 Double Prime controller (USB Power Deliver specification ch. 2.4) it will have
228 second device also for the other plug. Both plugs may have alternate modes as
229 described in USB Type-C and USB Power Delivery specifications.
231 What: /sys/class/typec/<port>-cable/type
233 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
234 Description: USB Power Delivery Specification defines a set of product types
235 for the cables. This file will show the product type of the
236 cable if it is known. If the product type of the cable is not
237 visible to the device driver, this file will not exist.
239 When the cable product type is detected, uvevent is also raised
240 with PRODUCT_TYPE showing the product type of the cable.
244 ====================== ==========================
247 passive Passive Cable
248 ====================== ==========================
250 What: /sys/class/typec/<port>-cable/plug_type
252 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
254 Shows type of the plug on the cable:
256 - type-a - Standard A
257 - type-b - Standard B
261 What: /sys/class/typec/<port>-<plug>/number_of_alternate_modes
263 Contact: Prashant Malani <pmalani@chromium.org>
265 Shows the number of alternate modes which are advertised by the plug
266 associated with a particular cable during Power Delivery discovery.
267 This file remains hidden until a value greater than or equal to 0
268 is set by Type C port driver.
271 USB Type-C partner/cable Power Delivery Identity objects
273 NOTE: The following attributes will be applicable to both
274 partner (e.g /sys/class/typec/port0-partner/) and
275 cable (e.g /sys/class/typec/port0-cable/) devices. Consequently, the example file
276 paths below are prefixed with "/sys/class/typec/<port>-{partner|cable}/" to
279 What: /sys/class/typec/<port>-{partner|cable}/identity/
281 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
283 This directory appears only if the port device driver is capable
284 of showing the result of Discover Identity USB power delivery
285 command. That will not always be possible even when USB power
286 delivery is supported, for example when USB power delivery
287 communication for the port is mostly handled in firmware. If the
288 directory exists, it will have an attribute file for every VDO
289 in Discover Identity command result.
291 What: /sys/class/typec/<port>-{partner|cable}/identity/id_header
293 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
295 ID Header VDO part of Discover Identity command result. The
296 value will show 0 until Discover Identity command result becomes
297 available. The value can be polled.
299 What: /sys/class/typec/<port>-{partner|cable}/identity/cert_stat
301 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
303 Cert Stat VDO part of Discover Identity command result. The
304 value will show 0 until Discover Identity command result becomes
305 available. The value can be polled.
307 What: /sys/class/typec/<port>-{partner|cable}/identity/product
309 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
311 Product VDO part of Discover Identity command result. The value
312 will show 0 until Discover Identity command result becomes
313 available. The value can be polled.
315 What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo1
317 Contact: Prashant Malani <pmalani@chromium.org>
319 1st Product Type VDO of Discover Identity command result.
320 The value will show 0 until Discover Identity command result becomes
321 available and a valid Product Type VDO is returned.
323 What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo2
325 Contact: Prashant Malani <pmalani@chromium.org>
327 2nd Product Type VDO of Discover Identity command result.
328 The value will show 0 until Discover Identity command result becomes
329 available and a valid Product Type VDO is returned.
331 What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo3
333 Contact: Prashant Malani <pmalani@chromium.org>
335 3rd Product Type VDO of Discover Identity command result.
336 The value will show 0 until Discover Identity command result becomes
337 available and a valid Product Type VDO is returned.
340 USB Type-C port alternate mode devices.
342 What: /sys/class/typec/<port>/<alt mode>/supported_roles
344 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
346 Space separated list of the supported roles.
348 Valid values: source, sink