.. | .. |
---|
20 | 20 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
21 | 21 | Description: |
---|
22 | 22 | The supported power roles. This attribute can be used to request |
---|
23 | | - power role swap on the port when the port supports USB Power |
---|
24 | | - Delivery. Swapping is supported as synchronous operation, so |
---|
25 | | - write(2) to the attribute will not return until the operation |
---|
26 | | - has finished. The attribute is notified about role changes so |
---|
27 | | - that poll(2) on the attribute wakes up. Change on the role will |
---|
28 | | - also generate uevent KOBJ_CHANGE. The current role is show in |
---|
29 | | - brackets, for example "[source] sink" when in source mode. |
---|
| 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 | 30 | |
---|
31 | 31 | Valid values: source, sink |
---|
32 | 32 | |
---|
.. | .. |
---|
40 | 40 | attribute will not return until the operation has finished. |
---|
41 | 41 | |
---|
42 | 42 | Valid values: |
---|
43 | | - - source (The port will behave as source only DFP port) |
---|
44 | | - - sink (The port will behave as sink only UFP port) |
---|
45 | | - - dual (The port will behave as dual-role-data and |
---|
| 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 |
---|
46 | 48 | dual-role-power port) |
---|
| 49 | + ====== ============================================== |
---|
47 | 50 | |
---|
48 | 51 | What: /sys/class/typec/<port>/vconn_source |
---|
49 | 52 | Date: April 2017 |
---|
.. | .. |
---|
59 | 62 | generates uevent KOBJ_CHANGE. |
---|
60 | 63 | |
---|
61 | 64 | Valid values: |
---|
| 65 | + |
---|
62 | 66 | - "no" when the port is not the VCONN Source |
---|
63 | 67 | - "yes" when the port is the VCONN Source |
---|
64 | 68 | |
---|
.. | .. |
---|
72 | 76 | power operation mode should show "usb_power_delivery". |
---|
73 | 77 | |
---|
74 | 78 | Valid values: |
---|
| 79 | + |
---|
75 | 80 | - default |
---|
76 | 81 | - 1.5A |
---|
77 | 82 | - 3.0A |
---|
.. | .. |
---|
100 | 105 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
101 | 106 | Description: |
---|
102 | 107 | Revision number of the supported USB Power Delivery |
---|
103 | | - specification, or 0 when USB Power Delivery is not supported. |
---|
| 108 | + specification, or 0.0 when USB Power Delivery is not supported. |
---|
| 109 | + |
---|
| 110 | + Example values: |
---|
| 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 |
---|
| 114 | + |
---|
| 115 | +What: /sys/class/typec/<port>-{partner|cable}/usb_power_delivery_revision |
---|
| 116 | +Date: January 2021 |
---|
| 117 | +Contact: Benson Leung <bleung@chromium.org> |
---|
| 118 | +Description: |
---|
| 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. |
---|
| 122 | + |
---|
| 123 | + Example values: |
---|
| 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 |
---|
104 | 127 | |
---|
105 | 128 | What: /sys/class/typec/<port>/usb_typec_revision |
---|
106 | 129 | Date: April 2017 |
---|
.. | .. |
---|
108 | 131 | Description: |
---|
109 | 132 | Revision number of the supported USB Type-C specification. |
---|
110 | 133 | |
---|
| 134 | +What: /sys/class/typec/<port>/orientation |
---|
| 135 | +Date: February 2020 |
---|
| 136 | +Contact: Badhri Jagan Sridharan <badhri@google.com> |
---|
| 137 | +Description: |
---|
| 138 | + Indicates the active orientation of the Type-C connector. |
---|
| 139 | + Valid values: |
---|
| 140 | + - "normal": CC1 orientation |
---|
| 141 | + - "reverse": CC2 orientation |
---|
| 142 | + - "unknown": Orientation cannot be determined. |
---|
111 | 143 | |
---|
112 | 144 | USB Type-C partner devices (eg. /sys/class/typec/port0-partner/) |
---|
113 | 145 | |
---|
.. | .. |
---|
125 | 157 | Shows if the partner supports USB Power Delivery communication: |
---|
126 | 158 | Valid values: yes, no |
---|
127 | 159 | |
---|
| 160 | +What: /sys/class/typec/<port>-partner/number_of_alternate_modes |
---|
| 161 | +Date: November 2020 |
---|
| 162 | +Contact: Prashant Malani <pmalani@chromium.org> |
---|
| 163 | +Description: |
---|
| 164 | + Shows the number of alternate modes which are advertised by the partner |
---|
| 165 | + during Power Delivery discovery. This file remains hidden until a value |
---|
| 166 | + greater than or equal to 0 is set by Type C port driver. |
---|
| 167 | + |
---|
| 168 | +What: /sys/class/typec/<port>-partner/type |
---|
| 169 | +Date: December 2020 |
---|
| 170 | +Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
| 171 | +Description: USB Power Delivery Specification defines a set of product types |
---|
| 172 | + for the partner devices. This file will show the product type of |
---|
| 173 | + the partner if it is known. Dual-role capable partners will have |
---|
| 174 | + both UFP and DFP product types defined, but only one that |
---|
| 175 | + matches the current role will be active at the time. If the |
---|
| 176 | + product type of the partner is not visible to the device driver, |
---|
| 177 | + this file will not exist. |
---|
| 178 | + |
---|
| 179 | + When the partner product type is detected, or changed with role |
---|
| 180 | + swap, uvevent is also raised that contains PRODUCT_TYPE=<product |
---|
| 181 | + type> (for example PRODUCT_TYPE=hub). |
---|
| 182 | + |
---|
| 183 | + Valid values: |
---|
| 184 | + |
---|
| 185 | + UFP / device role |
---|
| 186 | + ====================== ========================== |
---|
| 187 | + undefined - |
---|
| 188 | + hub PDUSB Hub |
---|
| 189 | + peripheral PDUSB Peripheral |
---|
| 190 | + psd Power Bank |
---|
| 191 | + ama Alternate Mode Adapter |
---|
| 192 | + ====================== ========================== |
---|
| 193 | + |
---|
| 194 | + DFP / host role |
---|
| 195 | + ====================== ========================== |
---|
| 196 | + undefined - |
---|
| 197 | + hub PDUSB Hub |
---|
| 198 | + host PDUSB Host |
---|
| 199 | + power_brick Power Brick |
---|
| 200 | + amc Alternate Mode Controller |
---|
| 201 | + ====================== ========================== |
---|
| 202 | + |
---|
128 | 203 | What: /sys/class/typec/<port>-partner>/identity/ |
---|
129 | 204 | Date: April 2017 |
---|
130 | 205 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
.. | .. |
---|
137 | 212 | directory exists, it will have an attribute file for every VDO |
---|
138 | 213 | in Discover Identity command result. |
---|
139 | 214 | |
---|
140 | | -What: /sys/class/typec/<port>-partner/identity/id_header |
---|
141 | | -Date: April 2017 |
---|
142 | | -Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
143 | | -Description: |
---|
144 | | - ID Header VDO part of Discover Identity command result. The |
---|
145 | | - value will show 0 until Discover Identity command result becomes |
---|
146 | | - available. The value can be polled. |
---|
147 | | - |
---|
148 | | -What: /sys/class/typec/<port>-partner/identity/cert_stat |
---|
149 | | -Date: April 2017 |
---|
150 | | -Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
151 | | -Description: |
---|
152 | | - Cert Stat VDO part of Discover Identity command result. The |
---|
153 | | - value will show 0 until Discover Identity command result becomes |
---|
154 | | - available. The value can be polled. |
---|
155 | | - |
---|
156 | | -What: /sys/class/typec/<port>-partner/identity/product |
---|
157 | | -Date: April 2017 |
---|
158 | | -Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
159 | | -Description: |
---|
160 | | - Product VDO part of Discover Identity command result. The value |
---|
161 | | - will show 0 until Discover Identity command result becomes |
---|
162 | | - available. The value can be polled. |
---|
163 | | - |
---|
164 | | - |
---|
165 | 215 | USB Type-C cable devices (eg. /sys/class/typec/port0-cable/) |
---|
166 | 216 | |
---|
167 | 217 | Note: Electronically Marked Cables will have a device also for one cable plug |
---|
.. | .. |
---|
173 | 223 | What: /sys/class/typec/<port>-cable/type |
---|
174 | 224 | Date: April 2017 |
---|
175 | 225 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
176 | | -Description: |
---|
177 | | - Shows if the cable is active. |
---|
178 | | - Valid values: active, passive |
---|
| 226 | +Description: USB Power Delivery Specification defines a set of product types |
---|
| 227 | + for the cables. This file will show the product type of the |
---|
| 228 | + cable if it is known. If the product type of the cable is not |
---|
| 229 | + visible to the device driver, this file will not exist. |
---|
| 230 | + |
---|
| 231 | + When the cable product type is detected, uvevent is also raised |
---|
| 232 | + with PRODUCT_TYPE showing the product type of the cable. |
---|
| 233 | + |
---|
| 234 | + Valid values: |
---|
| 235 | + |
---|
| 236 | + ====================== ========================== |
---|
| 237 | + undefined - |
---|
| 238 | + active Active Cable |
---|
| 239 | + passive Passive Cable |
---|
| 240 | + ====================== ========================== |
---|
179 | 241 | |
---|
180 | 242 | What: /sys/class/typec/<port>-cable/plug_type |
---|
181 | 243 | Date: April 2017 |
---|
182 | 244 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
183 | 245 | Description: |
---|
184 | 246 | Shows type of the plug on the cable: |
---|
| 247 | + |
---|
185 | 248 | - type-a - Standard A |
---|
186 | 249 | - type-b - Standard B |
---|
187 | 250 | - type-c |
---|
188 | 251 | - captive |
---|
189 | 252 | |
---|
190 | | -What: /sys/class/typec/<port>-cable/identity/ |
---|
| 253 | +What: /sys/class/typec/<port>-<plug>/number_of_alternate_modes |
---|
| 254 | +Date: November 2020 |
---|
| 255 | +Contact: Prashant Malani <pmalani@chromium.org> |
---|
| 256 | +Description: |
---|
| 257 | + Shows the number of alternate modes which are advertised by the plug |
---|
| 258 | + associated with a particular cable during Power Delivery discovery. |
---|
| 259 | + This file remains hidden until a value greater than or equal to 0 |
---|
| 260 | + is set by Type C port driver. |
---|
| 261 | + |
---|
| 262 | + |
---|
| 263 | +USB Type-C partner/cable Power Delivery Identity objects |
---|
| 264 | + |
---|
| 265 | +NOTE: The following attributes will be applicable to both |
---|
| 266 | +partner (e.g /sys/class/typec/port0-partner/) and |
---|
| 267 | +cable (e.g /sys/class/typec/port0-cable/) devices. Consequently, the example file |
---|
| 268 | +paths below are prefixed with "/sys/class/typec/<port>-{partner|cable}/" to |
---|
| 269 | +reflect this. |
---|
| 270 | + |
---|
| 271 | +What: /sys/class/typec/<port>-{partner|cable}/identity/ |
---|
191 | 272 | Date: April 2017 |
---|
192 | 273 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
193 | 274 | Description: |
---|
194 | 275 | This directory appears only if the port device driver is capable |
---|
195 | 276 | of showing the result of Discover Identity USB power delivery |
---|
196 | 277 | command. That will not always be possible even when USB power |
---|
197 | | - delivery is supported. If the directory exists, it will have an |
---|
198 | | - attribute for every VDO returned by Discover Identity command. |
---|
| 278 | + delivery is supported, for example when USB power delivery |
---|
| 279 | + communication for the port is mostly handled in firmware. If the |
---|
| 280 | + directory exists, it will have an attribute file for every VDO |
---|
| 281 | + in Discover Identity command result. |
---|
199 | 282 | |
---|
200 | | -What: /sys/class/typec/<port>-cable/identity/id_header |
---|
| 283 | +What: /sys/class/typec/<port>-{partner|cable}/identity/id_header |
---|
201 | 284 | Date: April 2017 |
---|
202 | 285 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
203 | 286 | Description: |
---|
.. | .. |
---|
205 | 288 | value will show 0 until Discover Identity command result becomes |
---|
206 | 289 | available. The value can be polled. |
---|
207 | 290 | |
---|
208 | | -What: /sys/class/typec/<port>-cable/identity/cert_stat |
---|
| 291 | +What: /sys/class/typec/<port>-{partner|cable}/identity/cert_stat |
---|
209 | 292 | Date: April 2017 |
---|
210 | 293 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
211 | 294 | Description: |
---|
.. | .. |
---|
213 | 296 | value will show 0 until Discover Identity command result becomes |
---|
214 | 297 | available. The value can be polled. |
---|
215 | 298 | |
---|
216 | | -What: /sys/class/typec/<port>-cable/identity/product |
---|
| 299 | +What: /sys/class/typec/<port>-{partner|cable}/identity/product |
---|
217 | 300 | Date: April 2017 |
---|
218 | 301 | Contact: Heikki Krogerus <heikki.krogerus@linux.intel.com> |
---|
219 | 302 | Description: |
---|
.. | .. |
---|
221 | 304 | will show 0 until Discover Identity command result becomes |
---|
222 | 305 | available. The value can be polled. |
---|
223 | 306 | |
---|
| 307 | +What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo1 |
---|
| 308 | +Date: October 2020 |
---|
| 309 | +Contact: Prashant Malani <pmalani@chromium.org> |
---|
| 310 | +Description: |
---|
| 311 | + 1st Product Type VDO of Discover Identity command result. |
---|
| 312 | + The value will show 0 until Discover Identity command result becomes |
---|
| 313 | + available and a valid Product Type VDO is returned. |
---|
| 314 | + |
---|
| 315 | +What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo2 |
---|
| 316 | +Date: October 2020 |
---|
| 317 | +Contact: Prashant Malani <pmalani@chromium.org> |
---|
| 318 | +Description: |
---|
| 319 | + 2nd 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. |
---|
| 322 | + |
---|
| 323 | +What: /sys/class/typec/<port>-{partner|cable}/identity/product_type_vdo3 |
---|
| 324 | +Date: October 2020 |
---|
| 325 | +Contact: Prashant Malani <pmalani@chromium.org> |
---|
| 326 | +Description: |
---|
| 327 | + 3rd 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. |
---|
| 330 | + |
---|
224 | 331 | |
---|
225 | 332 | USB Type-C port alternate mode devices. |
---|
226 | 333 | |
---|