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 when USB Power Delivery is not supported.
110 What: /sys/class/typec/<port>/usb_typec_revision
112 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
114 Revision number of the supported USB Type-C specification.
116 What: /sys/class/typec/<port>/orientation
118 Contact: Badhri Jagan Sridharan <badhri@google.com>
120 Indicates the active orientation of the Type-C connector.
122 - "normal": CC1 orientation
123 - "reverse": CC2 orientation
124 - "unknown": Orientation cannot be determined.
126 USB Type-C partner devices (eg. /sys/class/typec/port0-partner/)
128 What: /sys/class/typec/<port>-partner/accessory_mode
130 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
132 Shows the Accessory Mode name when the partner is an Accessory.
133 The Accessory Modes are defined in USB Type-C Specification.
135 What: /sys/class/typec/<port>-partner/supports_usb_power_delivery
137 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
139 Shows if the partner supports USB Power Delivery communication:
140 Valid values: yes, no
142 What: /sys/class/typec/<port>-partner>/identity/
144 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
146 This directory appears only if the port device driver is capable
147 of showing the result of Discover Identity USB power delivery
148 command. That will not always be possible even when USB power
149 delivery is supported, for example when USB power delivery
150 communication for the port is mostly handled in firmware. If the
151 directory exists, it will have an attribute file for every VDO
152 in Discover Identity command result.
154 What: /sys/class/typec/<port>-partner/identity/id_header
156 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
158 ID Header VDO part of Discover Identity command result. The
159 value will show 0 until Discover Identity command result becomes
160 available. The value can be polled.
162 What: /sys/class/typec/<port>-partner/identity/cert_stat
164 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
166 Cert Stat 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.
170 What: /sys/class/typec/<port>-partner/identity/product
172 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
174 Product VDO part of Discover Identity command result. The value
175 will show 0 until Discover Identity command result becomes
176 available. The value can be polled.
179 USB Type-C cable devices (eg. /sys/class/typec/port0-cable/)
181 Note: Electronically Marked Cables will have a device also for one cable plug
182 (eg. /sys/class/typec/port0-plug0). If the cable is active and has also SOP
183 Double Prime controller (USB Power Deliver specification ch. 2.4) it will have
184 second device also for the other plug. Both plugs may have alternate modes as
185 described in USB Type-C and USB Power Delivery specifications.
187 What: /sys/class/typec/<port>-cable/type
189 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
191 Shows if the cable is active.
192 Valid values: active, passive
194 What: /sys/class/typec/<port>-cable/plug_type
196 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
198 Shows type of the plug on the cable:
200 - type-a - Standard A
201 - type-b - Standard B
205 What: /sys/class/typec/<port>-cable/identity/
207 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
209 This directory appears only if the port device driver is capable
210 of showing the result of Discover Identity USB power delivery
211 command. That will not always be possible even when USB power
212 delivery is supported. If the directory exists, it will have an
213 attribute for every VDO returned by Discover Identity command.
215 What: /sys/class/typec/<port>-cable/identity/id_header
217 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
219 ID Header VDO part of Discover Identity command result. The
220 value will show 0 until Discover Identity command result becomes
221 available. The value can be polled.
223 What: /sys/class/typec/<port>-cable/identity/cert_stat
225 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
227 Cert Stat 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.
231 What: /sys/class/typec/<port>-cable/identity/product
233 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
235 Product VDO part of Discover Identity command result. The value
236 will show 0 until Discover Identity command result becomes
237 available. The value can be polled.
240 USB Type-C port alternate mode devices.
242 What: /sys/class/typec/<port>/<alt mode>/supported_roles
244 Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com>
246 Space separated list of the supported roles.
248 Valid values: source, sink