Some Bits: Nelson's log

Chromebooks identify USB C details

I learned something neat from a Google engineer on Reddit the other day: Chromebooks have superpowers when diagnosing USB-C connections that PCs don’t have. Including reading the e-marker built into the cable that identifies its capabilities.

Modern USB is a remarkably complex thing, with both the cable and the device on the other end negotiating capabilities like speeds, power for charging, etc. Most of that isn’t particularly visible to the user, not without USB debugging hardware. But turns out on a Chromebook it’s as simple as plugging in the USB device, going to chrome://system, and reading the info from typec_connector_class. At the bottom is an example with my Chromebook plugged into an Anker 65W charger, charging at 37W on a cable that nominally supports 100W.

Yeah I’ve got no idea what all that debug dump means either. I asked Gemini and it identifies the charger as doing Power Delivery 3.0 and that it offers various charging power settings including a programmable power up to 11V at 4.55A.

As for the cable, Gemini says that Vbus Current Handling: 0x2 is the cable’s way of saying it can handle 3A at most, which makes me wonder about that 100W claim on the cable. The product_type_vdo1: 0x84050 is a bitmask identifying various cable capabilities. This one is USB 2.0 only, 3A max. Ie: a “charging cable” and not a very good one at that. (The neat thing about this cable is it has a little display built in, that’s what says it’s charging at 37W. Maybe 15V or 20V and not at full 3A draw?)

The Reddit discussion has more detail. The Linux typec driver is doing a bunch of work along with a typec daemon in userspace. Unfortunately it requires cooperation from the firmware on the computer to make this information available to the kernel and PC hardware doesn’t do it.

port0
uevent: DEVTYPE=typec_port
TYPEC_PORT=port0
vconn_source: yes
supported_accessory_modes: none
power_role: source [sink]
data_role: [host] device
preferred_role: source
power_operation_mode: usb_power_delivery
usb_power_delivery_revision: 0.0
usb_typec_revision: 0.0
waiting_for_supplier: 0
port0-partner
uevent: DEVTYPE=typec_partner
accessory_mode: none
usb_power_delivery_revision: 3.0
type: not_ufp
number_of_alternate_modes: 0
supports_usb_power_delivery: yes
identity
id_header: 0x180ffff
USB Vendor ID: 0xffff
Reserved: 0x0
Product Type (DFP): 0x3
Modal Operation Supported: 0x0
Product Type (UFP/Cable Plug): 0x0
USB Capable as a USB Device: 0x0
USB Capable as a USB Host: 0x0
product: 0xffffffff
bcdDevice: 0xffff
USB Product ID: 0xffff
cert_stat: 0x0
XID: 0x0
product_type_vdo1: 0x0
Port Number: 0x0
Reserved: 0x0
Host Capability: 0x0
Reserved: 0x0
DFP VDO Version: 0x0
product_type_vdo2: 0x0
product_type_vdo3: 0x0
pd0
uevent: DEVTYPE=usb_power_delivery
revision: 3.0
sink-capabilities
uevent:
source-capabilities
uevent:
4:fixed_supply
uevent:
maximum_current: 2050mA
voltage: 20000mV
1:fixed_supply
uevent:
dual_role_power: 0
unconstrained_power: 1
usb_communication_capable: 0
unchunked_extended_messages_supported: 0
maximum_current: 3000mA
usb_suspend_supported: 0
dual_role_data: 1
voltage: 5000mV
2:fixed_supply
uevent:
maximum_current: 3000mA
voltage: 9000mV
3:fixed_supply
uevent:
maximum_current: 2730mA
voltage: 15000mV
5:programmable_supply
uevent:
pps_power_limited: 1
minimum_voltage: 3300mV
maximum_voltage: 11000mV
maximum_current: 4550mA
port0-cable
uevent: DEVTYPE=typec_cable
usb_power_delivery_revision: 2.0
type: passive
plug_type: type-c
identity
id_header: 0x18000000
USB Vendor ID: 0x0
Reserved: 0x0
Modal Operation Supported: 0x0
Product Type: 0x3
USB Capable as a USB Device: 0x0
USB Capable as a USB Host: 0x0
product: 0x0
bcdDevice: 0x0
USB Product ID: 0x0
cert_stat: 0x0
XID: 0x0
product_type_vdo1: 0x84050
USB Speed: 0x0
SOP'' Controller Present: 0x0
Vbus Through Cable: 0x1
Vbus Current Handling: 0x2
SSRX2 Directionality Support: 0x0
SSRX1 Directionality Support: 0x0
SSTX2 Directionality Support: 0x0
SSTX1 Directionality Support: 0x0
Cable Termination Type: 0x0
Cable Latency: 0x2
Reserved: 0x0
USB Type-C Plug to USB Type: 0x2
Reserved: 0x0
Firmware Version: 0x0
HW Version: 0x0
product_type_vdo2: 0x0
product_type_vdo3: 0x0
port0-plug0
uevent: DEVTYPE=typec_plug
number_of_alternate_modes: 0
physical_location
panel: left
horizontal_position: left