Linux HowTo: What can a program find out about a USB-C cable attached to the computer?

Original Source Link

I plug an unknown USB-C cable into my computer.
Theoretically, could a program read information about that cable? In particular:

  1. What version of USB it supports: 2.0, 3.1, etc.
  2. Whether it supports Thunderbolt, etc.
  3. Whether it supports Power Delivery, Quick Charge, VOOC, SuperCharge, Pump Express, Super FlashCharge, etc.
  4. Up to what speed it can transfer data.
  5. Up to what wattage/amperage it can charge a high-spec device.


  • I am on Linux, but answers for other OSes are fine too.
  • Let’s say nothing is connected at the other end of the cable. But if really necessary, we can say a recent rooted Android phone is connected and can run whatever code is needed.

All answers of what Type-C connector can do and can’t are given in its specifications.

In brief, Type-C cable specs are nearly independent from USB data and USB Power Delivery (Type-C can support anything).

By specs, Type-C connector/cable provides two methods of self-identification.

First one is by combination of resistor pulls-up and pulls-down on both sides of CC wires. Since there are two CC pins in Type-C connectors, and several analog levels, many combinations are available. Other than connect function itself and basic determination of source-sink roles and power capacity, several “alternate” functions are defined, as Display Port, Audio, and Debug mode.

The second amendment to Type-C is the mandatory embedding of e-markers into every C-C cable. The information in e-marker contains name of manufacturer and current carrying capability of particular cable.

The state of CC1/CC2 pins is usually acquired by a special CC-controller chip. The CC-controller communicates with main system by I2C interface. The register-based interface is standardized in Intel document USB Type-C Connector System Software Interface Specification

Microsoft provides a special UCSI driver to communicate the state of Type-C connector to Windows. I am certain that Linux does have the corresponding driver as well, take a look at this article.

So, partial answer your set of questions can be found in the following EE article. #1 and #5 is supported. #4 is the same as #1. Regarding #3, Type-C connector supports only one “charging signature”, which is Power Delivery specification. Regarding the second part of your notes, if nothing is connected on the other end of CC cable, I am not sure if presence of Ra alone will trigger any detection of the cable, need to check on this.

Tagged : / / / /

Leave a Reply

Your email address will not be published. Required fields are marked *