---
title: USB and Type-C
url: https://doc.liz6.com/en/hardware/06-interfaces-and-communication/03-usb-and-type-c
locale: en
area: hardware
tags:
- hardware
- interfaces-and-communication
date: 2026-06-30
modified: 2026-07-16
description: USB and Type-C USB Version Evolution Speed Generations (Ignoring the Naming Disaster) Connector Evolution --- USB Electrical and Topology Differential Signals T…
---

# USB and Type-C

## USB Version Evolution

### Speed Generations (Ignoring the Naming Disaster)

```
Actual Speeds (using marketing names):

USB 2.0 (High Speed):   480 Mbps
USB 3.0 (SuperSpeed):   5 Gbps    ← Also known as USB 3.1 Gen1 / USB 3.2 Gen1
USB 3.1 (SuperSpeed+):  10 Gbps   ← Also known as USB 3.1 Gen2 / USB 3.2 Gen2
USB 3.2 (SuperSpeed 2x2): 20 Gbps  ← Dual-lane, requires Type-C
USB4 20Gbps:             20 Gbps   ← Based on Thunderbolt 3
USB4 40Gbps:             40 Gbps   ← Based on Thunderbolt 3

History of Naming Confusion (if you see these names):
  USB 3.1 Gen1 = USB 3.0 = 5 Gbps
  USB 3.1 Gen2 = USB 3.2 Gen2 = 10 Gbps
  USB 3.2 Gen1x1 = USB 3.0 = 5 Gbps (again...)
  USB 3.2 Gen2x2 = 20 Gbps

Rule: Don't look at the name, just ask "How many Gbps?"
```

### Connector Evolution

```
Type-A: Classic rectangular port, unidirectional insertion (you always have to try three times)
  USB 2.0: 4 pins (VBUS/D-/D+/GND)
  USB 3.0: 9 pins (5 additional high-speed differential pairs)

Type-B: Square port, for printers/Arduino/legacy devices
  USB 3.0 version has an extra chunky bump

Mini-USB: Obsolete (MP3/old phone era)
Micro-USB: Transitional port for the smartphone era, being replaced by Type-C
  Micro-B 3.0: Unreasonably wide "flat port"

Type-C: The unified interface that rules them all ★
  24 pins, reversible, supports simultaneous USB + DP + PD transmission
```

---

## USB Electrical and Topology

### Differential Signals
```
D+/D- (USB 2.0): Half-duplex differential, 3.3V
  Speed Detection: D+ pull-up = Full Speed, D- pull-up = Low Speed

SSTX+/SSTX- (USB 3.x Transmit): Full-duplex differential
SSRX+/SSRX- (USB 3.x Receive): Full-duplex differential
```

### Topology
<svg viewBox="0 0 720 220" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB Physical Topology: Tree structure rooted at Host, up to 7 levels">
  <rect width="720" height="220" fill="#ffffff"/>
  <defs><marker id="mk-topo" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB Physical Topology: Tree structure rooted at Host</text>

  <rect x="30" y="86" width="90" height="44" rx="8" fill="#4f46e5"/>
  <text x="75" y="103" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Host</text>
  <text x="75" y="118" text-anchor="middle" font-size="10" fill="#ffffff">(Controller)</text>

  <rect x="180" y="88" width="80" height="40" rx="7" fill="#e2e8f0"/>
  <text x="220" y="112" text-anchor="middle" font-size="12" font-weight="700" fill="#334155">Hub</text>

  <rect x="330" y="54" width="80" height="40" rx="7" fill="#e2e8f0"/>
  <text x="370" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#334155">Hub</text>

  <rect x="480" y="54" width="110" height="40" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="535" y="78" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <rect x="480" y="104" width="110" height="36" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="535" y="126" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <rect x="330" y="140" width="110" height="36" rx="7" fill="#ccfbf1" stroke="#99f6e4"/>
  <text x="385" y="162" text-anchor="middle" font-size="12" font-weight="700" fill="#0f766e">Device</text>

  <line x1="120" y1="108" x2="176" y2="108" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="236" y1="92" x2="326" y2="76" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="410" y1="74" x2="476" y2="74" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="392" y1="94" x2="476" y2="116" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>
  <line x1="232" y1="128" x2="326" y2="152" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-topo)"/>

  <rect x="40" y="184" width="640" height="30" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="360" y="204" text-anchor="middle" font-size="12.5" fill="#3730a3">Tree structure, up to 7 levels (including Root Hub); Host initiates all transfers, Devices cannot initiate.</text>
</svg>

### Transfer Types
| Type | Characteristics | Application |
|------|------|------|
| Control (Control) | Reliable, guaranteed bandwidth | Enumeration/Configuration |
| Bulk (Bulk) | Reliable, no guaranteed latency | Files/Data |
| Interrupt (Interrupt) | Reliable, guaranteed latency | Keyboard/Mouse |
| Isochronous (Isochronous) | No retransmission, guaranteed bandwidth | Audio/Video |

---

## USB Device Enumeration

<svg viewBox="0 0 720 420" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB Device Enumeration Flow and Descriptor Hierarchy">
  <rect width="720" height="420" fill="#ffffff"/>
  <defs><marker id="mk-enum1" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="26" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB Enumeration: From Insertion to Ready, with Descriptors Refining Layer by Layer</text>

  <text x="20" y="46" font-size="13" font-weight="700" fill="#1f2933">Enumeration Flow (Insertion → Device Ready)</text>

  <rect x="20" y="54" width="100" height="36" rx="6" fill="#e2e8f0"/>
  <text x="70" y="76" text-anchor="middle" font-size="11" font-weight="700" fill="#334155">Insert</text>

  <rect x="135" y="54" width="170" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="220" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host Detects D+/D- Pull-up</text>

  <rect x="320" y="54" width="160" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="400" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host Resets Bus (SEO)</text>

  <rect x="495" y="54" width="200" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="595" y="76" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host Assigns Address (SET_ADDRESS)</text>

  <line x1="120" y1="72" x2="133" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="305" y1="72" x2="318" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="480" y1="72" x2="493" y2="72" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <polyline points="595,90 595,95 150,95 150,100" fill="none" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <rect x="20" y="100" width="260" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="150" y="122" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host Reads Device Descriptor (VID/PID/Class)</text>

  <rect x="300" y="100" width="180" height="36" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="390" y="122" text-anchor="middle" font-size="11" font-weight="600" fill="#3730a3">Host Loads Corresponding Driver</text>

  <rect x="500" y="100" width="170" height="36" rx="6" fill="#dcfce7" stroke="#4ade80"/>
  <text x="585" y="122" text-anchor="middle" font-size="12" font-weight="700" fill="#166534">Device Ready</text>

  <line x1="280" y1="118" x2="298" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="480" y1="118" x2="498" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <line x1="20" y1="148" x2="700" y2="148" stroke="#e2e8f0" stroke-width="1"/>

  <text x="20" y="168" font-size="13" font-weight="700" fill="#1f2933">Descriptor Hierarchy (Dependency, Refining Layer by Layer)</text>

  <rect x="20" y="180" width="300" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="34" y="197" font-size="12" font-weight="700" fill="#3730a3">Device Descriptor</text>
  <text x="34" y="209" font-size="10" fill="#4f46e5">VID/PID/Manufacturer/Product</text>

  <rect x="70" y="224" width="320" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="84" y="241" font-size="12" font-weight="700" fill="#3730a3">Configuration Descriptor</text>
  <text x="84" y="253" font-size="10" fill="#4f46e5">Power Consumption/Interface Count</text>

  <rect x="120" y="268" width="340" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="134" y="285" font-size="12" font-weight="700" fill="#3730a3">Interface Descriptor</text>
  <text x="134" y="297" font-size="10" fill="#4f46e5">HID / MSC / CDC ...</text>

  <rect x="170" y="312" width="360" height="34" rx="6" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="184" y="329" font-size="12" font-weight="700" fill="#3730a3">Endpoint Descriptor</text>
  <text x="184" y="341" font-size="10" fill="#4f46e5">Endpoint Address/Direction/Type</text>

  <line x1="40" y1="214" x2="88" y2="224" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="90" y1="258" x2="138" y2="268" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>
  <line x1="140" y1="302" x2="188" y2="312" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-enum1)"/>

  <rect x="20" y="358" width="680" height="50" rx="8" fill="#eef2ff" stroke="#c7d2fe"/>
  <text x="34" y="378" font-size="12.5" fill="#3730a3">Descriptors are nested: Configuration defines power and interface count, Interface declares the device class (Class),</text>
  <text x="34" y="396" font-size="12.5" fill="#3730a3">and Endpoint is the actual channel for data transmission/reception — driver matching relies on the Interface's Class.</text>
</svg>

---

## Type-C Detailed

### Pinout (24 pins, Symmetrical Front/Back)
```
Side A (Top):                   Side B (Bottom):
GND  TX1+ TX1-  VBUS  CC1   GND  RX2+ RX2-  VBUS  SBU2
D+   D-   SBU1  VBUS  RX1-  D-   D+   SBU1  VBUS  TX2-
                                   (Mirrored Symmetry!)

GND  RX1+ RX1-  VBUS  SBU1  GND  TX2+ TX2-  VBUS  SBU2  ← After Flip

Key Pins:
  CC1/CC2: Detect insertion orientation + PD protocol communication
  SBU1/SBU2: AUX channel for DP Alt Mode
  D+/D-: USB 2.0 compatibility
  4 pairs of SuperSpeed differential pairs (TX1/RX1/TX2/RX2)
```

### Role of CC Pins
```
1. Detect insertion orientation (which side is up)
2. Detect if the counterpart is Host/Device/Power Source
3. Announce current capability via Rp/Rd resistor values:
   - USB Default: 500mA (5V)
   - USB 1.5A:    1.5A  (5V)
   - USB 3.0A:    3.0A  (5V)
4. Serve as the physical layer for USB PD communication (BMC encoding, 300kbps)
```

### Alt Mode
```
The 4 pairs of SuperSpeed channels in Type-C can be reconfigured:

DisplayPort Alt Mode:
  2 lane DP + USB 3.2 → 4K@60Hz + Data Transfer
  4 lane DP           → 5K@60Hz or 8K@30Hz

Thunderbolt Alt Mode: 40Gbps PCIe + DP
HDMI Alt Mode: Not popular, most use DP Alt Mode conversion
```

---

## USB Power Delivery (USB PD)

### PD 3.1 Voltage Levels
```
PD 3.0 (Max 100W):
  5V/9V/15V/20V @ 5A = 100W

PD 3.1 EPR (Max 240W):
  Added 28V/36V/48V @ 5A = 240W

PPS (Programmable Power Supply):
  Voltage adjustable in 20mV steps
  Current limited in 50mA steps
  → Phone directly controls charger voltage/current, eliminating need for internal buck conversion
```

### PD Communication Flow
<svg viewBox="0 0 720 320" xmlns="http://www.w3.org/2000/svg" font-family="-apple-system,'Source Han Sans CN','Microsoft YaHei',sans-serif" role="img" aria-label="USB PD Power Negotiation Flow: Source and Sink handshake via CC line">
  <rect width="720" height="320" fill="#ffffff"/>
  <defs><marker id="mk-pd" markerWidth="10" markerHeight="8" refX="8" refY="3" orient="auto"><path d="M0,0 L8,3 L0,6 Z" fill="#475569"/></marker></defs>
  <text x="360" y="28" text-anchor="middle" font-size="17" font-weight="700" fill="#1f2933">USB PD Negotiation: Source and Sink Handshake via CC Line</text>

  <rect x="60" y="50" width="140" height="44" rx="8" fill="#4f46e5"/>
  <text x="130" y="68" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Source</text>
  <text x="130" y="83" text-anchor="middle" font-size="10" fill="#ffffff">(Charger)</text>

  <rect x="520" y="50" width="140" height="44" rx="8" fill="#0d9488"/>
  <text x="590" y="68" text-anchor="middle" font-size="12" font-weight="700" fill="#ffffff">Sink</text>
  <text x="590" y="83" text-anchor="middle" font-size="10" fill="#ffffff">(Device)</text>

  <line x1="130" y1="94" x2="130" y2="256" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="4 3"/>
  <line x1="590" y1="94" x2="590" y2="256" stroke="#cbd5e1" stroke-width="1.5" stroke-dasharray="4 3"/>

  <line x1="130" y1="118" x2="590" y2="118" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="112" text-anchor="middle" font-size="11" fill="#475569">① Broadcast Capabilities: 5V/3A, 9V/3A, 15V/3A, 20V/5A</text>

  <line x1="590" y1="156" x2="130" y2="156" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="150" text-anchor="middle" font-size="11" fill="#475569">② Request: I want 20V/3A</text>

  <line x1="130" y1="194" x2="590" y2="194" stroke="#475569" stroke-width="1.6" marker-end="url(#mk-pd)"/>
  <text x="360" y="188" text-anchor="middle" font-size="11" fill="#475569">③ Accept → Switch to 20V Output</text>

  <line x1="130" y1="230" x2="590" y2="230" stroke="#475569" stroke-width="1.6" stroke-dasharray="5 4" marker-end="url(#mk-pd)"/>
  <text x="360" y="224" text-anchor="middle" font-size="11" fill="#475569">④ Continuous Negotiation: PPS Dynamic Adjustment (Bidirectional)</text>

  <rect x="40" y="264" width="640" height="42" rx="8" fill="#f0fdfa" stroke="#99f6e4"/>
  <text x="56" y="290" font-size="12.5" fill="#115e59">Communication Protocol: USB PD is based on Type-C CC pins, BMC encoding at 300kbps; PPS allows continuous fine-tuning in 20mV/50mA steps.</text>
</svg>

---

## Common USB Classes (Class)

| Class | Name | Driver Required? | Examples |
|-------|------|-----------|------|
| HID | Human Interface Device | ✅ System Built-in | Keyboard/Mouse/Gamepad |
| MSC | Mass Storage | ✅ | USB Flash Drive/External HDD |
| CDC | Communication Device | ❌ (Driver Needed) | USB-to-Serial Adapter |
| CDC-ACM | Abstract Control Model | ✅ | Virtual Serial Port (Arduino) |
| CDC-NCM | Network Control Model | ❌ | USB Ethernet Adapter |
| Audio | Audio | ✅ (UAC 1.0) | USB Headset/Audio Interface |
| Video | Video | ✅ (UVC) | Webcam |
| DFU | Device Firmware Upgrade | - | For Flashing Firmware |
| MIDI | Musical Instrument | ✅ | MIDI Keyboard |

---

## Quick Reference

```
Want Fast Charging → Look at PD Power (W), not marketing terms like W/QC/Flash Charge
Want Fast Speed → Look at Actual Gbps, not USB 3.x GenXxX names
Type-C ≠ USB 3.x (Can be USB 2.0 only Type-C)
Type-C ≠ Supports PD (Some Type-C ports only provide 5V)
Type-C ≠ Supports Video Output (Requires DP Alt Mode)

When checking specs, verify: Which specification, How much power, How much speed, Does it support video?
```

---
*Keywords: USB, Type-C, PD, PPS, Alt Mode, CC Pin, HID, CDC, Enumeration, Descriptor*
