2014年9月25日 星期四

USB Type-C Configuration Channel (CC) pin function (English version)

USB Type-C Configuration Channel (CC) pin function

When you realized the Type-C Configuration Channel pin function, you would understand the detection mechanism of Type-C. The six items as below are Type-C CC function.
1. Detect attach of USB ports, e.g. a DFP to a UFP
DFP (Downstream Facing Port) is Host, UFP(Upstream Facing Port) is Device. There is a pullup resistor Rp in DFP side and there is a pulldown resistor Rd in UFP side. Before the connecting between DFP and UFP, the DFP VBUS source have no output. After the connecting between DFP and UFP, the CC pin in DFP detected the voltage level of CC pin was dropped by Rd, then DFP know the UFP is attahced,DFP would turn on the MOSFET in VBUS path and supply VBUS to
UFP.


There are 2 CC pin in DFP side, DFP detect the three kinds of pulldown resistance,  Open, Ra and Rd,  DFP can identify the state of connecting accroding to the CC1,CC2 table as below. 

2. Resolve cable orientation and twist connections to establish USB data bus routing
The Type-C can be plugged with upside-up and upside-down. When the DFP detected the CC1 pin was pulled down, it is upside-up plug. When the CC2 pin was pulled down, it is upside-down plug. The figure as below show the MUX is used Type-C USB3.1 signal path switch. Since the data rate of USB3.1 is up to 10 Gbps, we need to add MUX to avoid the trace branch or stub.

3. Establish DFP and UFP roles between two attached ports
Besides the DFP, UFP, the Type-C defined another port, DRP (Dual Role port). DRP can change to DFP or UFP.  When the DRP is connected to DFP, the DRP will change to UFP. When the DRP is connected to UFP, the DRP will change to DFP. When two DRP are connected together, it will be random that one to be DFP and the other to be UFP.

4. Discover and configure VBUS: USB Type-C Current modes or USB Power Delivery
The table as below show the power capability of each USB standard. The pure Type-C can support up to 5V / 3A. If USB PD is combined with Type-C, the power capability can be up to 20V /5A. The USB PD protocol is transmitted over the CC line connection.   

Type-C can support maximum current at 1.5A and 3A mode. How the Type-C port choose which current mode to run? The maximum current depend on DFP output  capability, DFP inform the UFP which current mode the DFP can support by the voltage value on CC pin. The resistance of Pulldown resistor ,Rd is fixed at 5.1K on UFP side. DFP can use Pullup resistor,Rp or current source, IP to produce voltage on CC pin. The variant of Pullup resistance or current will make the voltage on CC pin differentiallyThen, the UFP monitor the voltage on CC pin to know the output  capability of DFP.

Type-C spec define the Pullup resistance and current source for each current mode.
For example, when the DFP provide the 330uA to CC pin, the voltage of CC pin will be 330uA * 5.1k=1.683V. According to the table as below, this DPF  will be classified to be vRd-3.0 by the UFP. When the DFP provide the resistor Pullup to 4.75~5.5V with resistance 10k, the voltage of CC pin will be 5v * 5.1k /(5.1k+10k)=1.688V. This DPF  also will be classified to be vRd-3.0 by the UFP.

The BMC PD controller send the USB PD protocol over the CC pin connection.

5. Configure VCONN
Type-C spec define the Active cable which include circuit inside of the cable and need to be supplied power. There are two CC pin, CC1 and CC2. When one of the CC pin is used for connecting bwtween the DFP and UFP. The other CC pin can be used to supply power to Active cable. The name of this power rail is VCONN. When the DFP CC detected the Pulldown resistor, Ra , the CC pin will be switched from Pullup Rp to VCONN. The resistance of Ra  is 800~  1200ohm. The VCONN need to supply 4.75~5.5v and output power 1Watt.


6. Discover and configure optional Alternate and Accessory modes
Type-C spec define the Alternate and Accessory mode. The Host, Device, Cable can send structure VDM (Vendor defined message) to exchange the information and discover USB ID. When the Host communicated with the device and enter the alternate mode by VDM, The Type-C pin define can be  changed to support PCIe or DisplayPort. The example as below is Type-C docking application. It used MUX to switch one of PCIe and USB3.1 signal to Type-C port. The Type-C port can be used for docking with Ethernet port.

When the CC1 and CC2 are pull-down with resistance ( ≤Ra), the Host know the device is audio device , then Host enter accessory mode and switch USB signal to Audio signal.

Reference
1. www.usb.org  "USB Type-C Specification Release 1.0"

4 則留言:

Roman 提到...

Hi Kevin,
这篇Blog中所讲关于CC的所有功能,如排的顺序,其实正好也是Type C 工作的流程,对吗?

KevinZheng USB&DSP&Firmware 提到...

Hi Roman
是的

xyz 提到...

Thank you share

YYZ 提到...

Hi Kevin,
Is it possible to enabled Vbus as UFP without physically reverse the cable?
1. CC1 5.1k to Ground, Vbus is 5V on side A.
2. open CC1, side A no Vbus.
3. CC2 5.1k to Ground, Vbus is 5V on side B.

Above will only work on cut-out type C cable, but it doesn't work with both end Type-C.
What is the solution?

Thanks,
YYZ