顯示具有 USB PD 標籤的文章。 顯示所有文章
顯示具有 USB PD 標籤的文章。 顯示所有文章

2021年6月4日 星期五

USB PD 3.1 EPR mode for 28V, 36V,48V application

 

It is defined VBUS 5V~20V in USB PD 3.0 version, it is added 28V, 36V, 48V in USB PD 3.1 spec, that is called EPR(Extended Power Range. Base on maximum 5A current condition, the maximum power support to 48V/5A=240W.




It also added the function like the PPS in PD 3.1 EPR mode. it is called the EPR AVS(Adjustable Voltage Supply).  The minimum voltage step is 20mV in PPS, however the minimum voltage step is 100mV in AVS. Sink can ask Source to output 15.1V、15.2V.....47.9V、48V. There are CV(Constant voltage) and CL(Current limit) modes in PPS, but there is only CV mode in AVS.


There are only Fixed output voltage 28V, 386,48V in EPR mode, but output voltage can be 100mV a step between 15V to 48V after enter AVS mode,

The Source device's PDP(PD Power) between 100W and 140W can use only EPR 28V,  it can't operateon 36V and 48V. The Source device's PDP above 180W can use EPR 48V mode.


If Source and Sink want to enter EPR mode, the cable EPR is needed. The communication procedure is showed as below. Establishing standard PD contract at first, when Sink ask to enter EPR mode the ,Source would try to communicate with cable to identify if Cable is EPR Cable. EPR Type-C cable can resist voltage 50V, it is different from standard Type-C 20V cable. But if cable is part of EPR Source device, Source can bypass the action of identifying EPR cable.



Reference:1.https://www.usb.org/sites/default/files/USB%20Power%20Delivery%2020210602.zip
USB_PD_R3_1 V1.0 202105.pdf




2021年6月3日 星期四

USB PD 3.1 EPR模式在28V, 36V, 48V應用

 

在PD3.0的規範,只有定義到5V~20V,但在PD3.1版本,新增了28V,36,48V,稱為EPR(Extended Power Range)。在最大電流5A的條件下,表示最大功率為48V/5A=240W。



在PD3.1與EPR的模式下,也加入了類似PPS的功能,稱為EPR AVS(Adjustable Voltage Supply)。在PPS裡,最小電壓步階是20mV,在AVS裡,最小電壓步階是100mV。Sink可以要求Source輸出15.1V、15.2V.....47.9V、48V。在PSS有Current limit mode,讓Source進入限流模式,但在AVS只有CV(constant voltage)模式。



在EPR模式,只有28V,36V,48V,但進到AVS模式,就可以在15V~48V之間的電壓,每100mV步階升壓。


在Source設置的輸出功率 PDP,在100W~140W,只能用EPR模式的28V,不能用36V與48V。PDP要到180W以上,才能用到EPR的48V。

在Source與Sink要進到EPR模式,需要搭配EPR Cable,溝通流程如下圖,在一開始先建標準的PD溝通,當Sink要求要進到EPR模式後,Source就會試著跟Cable溝通,確認連接的Cable是否為EPR Cable。EPR Type-C Cable能承受50V的電壓,與標準Type-C Cable 20V不同,所以要操作在EPR模式,一定要使用EPR Cable。但如果EPR Source本身就是有帶線的,Source與Cable是一體的,Source就可以省略掉確認EPR cable這個動作。


Reference:1.https://www.usb.org/sites/default/files/USB%20Power%20Delivery%2020210602.zip
USB_PD_R3_1 V1.0 202105.pdf




2017年2月20日 星期一

USB PD 3.0 Programmable Power Supply(PPS)

2017/1 USB協會在USB PD 3.0的規範上,加了PPS協議。這個協議讓
讓高通的QC, MTK的PE+,OPPO的VOOC等快充標準,將來可以透過
PPS,兼容於USB協會定義的USB PD。

為什麼PPS可以相容這些主流的快充標準呢? 因為它可以達到3V~21V
輸出。即可以輸出高壓低電流,也可以輸出低壓高電流(5A)。










在USB PD 3.0的規範,多了Alert、Battery Status, Get_Country_Info的
資訊可以溝通。























在Source Capability裡,多了APDO,這用來表示Power source它可以
輸出的電壓範圍與最大電流。例如你可以設定Source的APDO為
3V~5.5V/4A,那Sink就可以發PRDO去要求3V~5.5V之間的任何一個
電壓點,最小以20mV為一個間隔。






















































Reference:
1. http://www.usb.org/developers/docs/usb_31_021517.zip
    => "USB_PD_R3_0 V1.1 20170112.pdf"



2016年4月19日 星期二

USB Type-C Port Controller


USB Org defined the Port Controller and its architecture in Oct 2015. The Type-C
port Manager is moved out from PD controller.  The MCU or EC(embeded
controller) can be the Type-C port Manager, it can control many Type-C Port
Controllers by I2C at the same time.


The TCPM (Type-C Port Manger) is used to decide these Type-C PD port function
and behavior, The TCPC (Type-C Port Controller) is passive and is used for Type-C
logic and PD data transceiver. Many registers are defined in TCPC spec, the TCPM
can read /write these register to get status of Type-C port and control TCPC.


The following are how the TCPM and TCPC finish the Type-C connection and 
VBUS 5V to HighVoltage transition.  

DRP Type-C port initialize and CC connection.



1. Before the connection. TCPC set TCPC to be DRP.
Write ROLE_CONTROLROLE_CONTROL.DRP = 1b ;TCPM set TCPC to be DRP. 
ROLE_CONTROL.CC2=01b or 10b ;set initial status of CC1 and CC2 to be Rp or Rd.
ROLE_CONTROL.CC1=01b or 10b  
ROLE_CONTROL.CC1=ROLE_CONTROL.CC2
POWER_CONTROL.AutoDischargeDisconnect=0 ;set no autodischarge when CC Disconnect.
Write COMMAND.Look4Connection TCPM wrote Look4Connection to TCPC to ask TCPC start to detect connection according to Role_Control register setting and toggle Rp/Rd.
Set CC_STATUS.Looking4Connection=1b ;After TCPC received Look4Connection command, the TCPC register CC_STATUS.Looking4Connection would be "1b". And then TCPC start to toggling the CC.

2. After the connection.
Potential_Connect_as_Source ; When TCPC to be Source
Either CC line = Src.Rd or both CC lines = Src.Ra ; if  One of the CC pin voltage is vRd or both CC pin voltage are vRa.
for >tTCPCFilter  ;Debounce time(4~500us)
Set Source Status
CC_STATUS.Looking4Connnection=0b ;TCPC stop to detect connection.
CC_STATUS.ConnectResult=0b ; TCPC set this CC pin is to be Rp.


Potential_Connect_as_Sink ;When TCPC to be Sink
Either CC line != Snk.Open ;if  One of the CC pin voltage >vRa. 
for >tTCPCFilter  ;Debounce time(4~500us)
CC_STATUS.Looking4Connection=0b ;TCPC stop to detect connection.
CC_STATUS.ConnectResult=1b  ;TCPC set CC to be Rd.

3. TCPC alert the TCPM 
TCPC Set ALERT.CcStatus=1b   ;TCPC Alert register's b0 =>CC status=1 mean the status of CC has been changed.
TCPM read ALERT      ;TCPM detect Alert and then read the Alert register
TCPM check if "ALERT.CcStatus=1b?" ;check if the status of CC have been changed
Yes=>TCPM check if "C_STATUS.Looking4Connection=0 ?" ; If yes, check if TCPC stop to detect connection. If yes, enter debounce time.
Read CC_STATUSDebounce for tCCDebounce  ;Debounce time (100ms~200ms)
Write ROLE_CONTROL.CC1 & CC2 per decision ;TCPM set TCPC's Role_control register CC1 or CC2 to be Ra,Rd or Rp.
Write TCPC_CONTROl.PlugOrientation  ;TCPM set PlugOrientation of TCPC_control register to be CC1 or CC2. 
Write POWER_CONTROL.AutoDischargeDisconnect=1 & POWER_CONTROL.EnableVconnConnection
;TCPM enable TCPC VBUS Autodischarge, The TCPC would discharge VBUS when the VBUS was under vSafe0V(max) or VBUS_STOP_Discharge_Threshold. TCPM set TCPC to output VCONN if one of CC is Ra.
Write Alert.CcStatus=0b ;Clear the CcStatus of Alert register.

4.Connection Established, TCPM monitor the Alert signal




Support USB PD and change the VBUS voltage.



1. Currently the TCPC is output VBUS 5V
Sourcing 5V over VBUS ;VBUS output 5V
POWER_STATUS.SourcingVBUS=1  ;the status SourcingVBUS=1 mean this TCPC output VBUS 5V now.
POWER_STATUS.SourcingHighVoltage=0  ;the SourcingHighVoltage=0 mean the VBUS is 5V not high voltage now. 

2. After TCPM accepted the request from far end Sink side for High voltage VBUS. TCPM would send Vendor Defined command to set the target voltage of HighVoltage. 

3.Write command.SourceVbusHighVoltage ;TCPM write SourceVbusHighVoltage to command register 

4.After TCPC received the SourceVbusHighVoltage, TCPC change the VBUS from 5V to HighVoltage.And then..
 TCPC set POWER_STATUS.SourcingHighVoltage=1  ;TCPC set register Power_Status SourcingHighVoltage bit to be "1b"。
 TCPC set ALERT.PowerStatus     ;TCPC set register Alert Power status bit to be "1b".

5.TCPM read alert register and recognize the TCPC has finished the HighVoltage VBUS transition.




1.USB 3.1 spec http://www.usb.org/developers/docs/

2015年10月27日 星期二

USB Power delivery for Alternative mode



USB PD除了電源需求的溝通,也可以用來溝通彼此的信號需求,例如使用原來
Type-C USB3.x的通道,用來傳輸Displayport,PCIE等高速訊號。

下面是DFP端與UFP端交握的過程,DFP端利用PD的protocol,來得知對方是什麼
樣的裝置,UFP端也會讓DFP端知道它支援那些高速訊號,再由DFP端來決定要
提供USB或Displayport或PCIE給UFP端。




1.Discover Identity VDM command

 Send VDM 1xxFh,FF00h,8001h
 Receive VDM from UFP side and check if ACK bits is “01”h
 Check device or Cable spec


2. Discover SVIDs VDM command

   Send VDM,1xxFh,FF00h,8002h
  Receive VDM from UFP side and check if ACK bits is “01”h
  Check device SVID


3.Discover Modes VDM command
Send VDM,1xxFh,xxxxh (SVID),8003h
Receive VDM from UFP side and check if ACK bits is “01”h
Check device Mode


4.Enter Mode


Check which mode you want to enter.
Send VDM,1xxFh,xxxxh (SVID),8x04h (x is object mode position)
Receive VDM from UFP side and check if ACK bits is “01”h


5.Control Mux

Control the Super speed Mux by MCU or PD IC. Depend
on the mode you want to enter.





Reference
1. USB PD 2.0
2. VESA, DisplayPort Technology Update
https://www.vesa.org/wp-content/uploads/2015/07/VESA-Taiwan-Press-61115.pdf












2015年4月16日 星期四

USB Power Delivery for USB Type C

這篇文章是來解釋USB PD在TypeC是如何來進行的。TypeC與Type A/B在流程
上不同的是,Type-C需要先建透過CC pin去建立兩端DFP與UFP。而TypeA/B
的角色從Connector的公母端,就已經確定的,而TypeAB則是用ID pin來判斷
誰是DFP或UFP。當DFP與UFP透過Type-C連接,會先進行下面四點,這個在
我的另一篇網誌有解釋過了。

1. Detect attach of USB ports, e.g. a DFP to a UFP
2. Resolve cable orientation and twist connections to establish USB data 
    bus routing
3. Establish DFP and UFP roles between two attached ports
4. Configure VBUS: USB Type-C Current modes

在上面四點完成後,便開始進行USB PD的連接與溝通,這時VBUS電壓是5V,
電流是依照Type-C current mode,再來便是進行Power Negotiation 
(PD spec 8.3.2.3)。
1.Power Source會周期性的持續送Source Capabilities messages,
2.當Source收到SINK送出的GoodCRC,表示兩端PD已連接。
3. 連接後,SINK會送出Request message,裡面包括
4.Source認可SINK的Request後,發Accept給UFP。
5.Source轉換到SINK Request的電壓後,發PS_RDY給SINK。。
6.Power Negotiation完成,SINK開始依照新的供電來運作。

PD Negotiation的第3個動作,如果Source的Capabilities不能滿走SINK在電壓
或電流的需求,SINK送出的Request message (Table 6-13)便會設置Capability
Mismatch bitSource端在接收到後,Source端可以送出Get Sink Capabilities
,來得到SINK再回Sink Capabilities。之後Source再去確認,是否它可以得到更
大的供電能力來提供SINK。






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"

2014年9月24日 星期三

USB Power Delivery Protocol Layer

USB Power delivery定義了Protocol layer,利用Protocol制定的message來溝通。
下面為他們所制定的message格式。


每段message都會有16bits的header用來表示message的類別,如果是data message
,後面會有0~7個Data Objects,而control message被包含在16bits的header裡。


這16bits header的格式如下
Number of Data Objects:它讓接受端知道header後面會有幾個data objects。
MessageID:讓接受端知道,目前是第幾段message,在一開機時,應該為0。
Port Role:表示目前發出message的是0(Sink) or 1(Source)。
Specification Revision:表示發送端支援00(PD reversion 1.0) or
                                         01(PD reversion 2.0)。
Message Type:message分為control與data兩種,而data meesage會在header後面
                           跟隨data object。而conrol message沒有data object。

Control Message:當Number of data objects為0,表示這段message為Control
                                    message。Control message用來做兩端的溝通。


Data message:用來傳送資料。


   有下面四種種類的data object
 Power Data Object (PDO) :
Source端用來送出自已的供電能力,另外當Source端送出PDO,但Sink端發出Reject message來表示Source的供電能力不符合Sink端的需求,Source端可以要求Sink送出
PDO來表示Sink端需要的電力為何。

 Request Data Object (RDO) :
當Source端發送PDO後,例如是12/1.5A,Sink端可以發送RDO來表示自已只需要0.5A。


 BIST Data Object (BDO) :
用來做physical layter test,算是debug mode。

 Vendor Defined Data Object (VDO) :
用來傳VDM,可以知道另一端的Product ID、Cable ID。在確認ID後,如果device支援alternate mode,在Type-C port可以用MUX開關,讓原的USB訊號,改傳PCIE、DisplayPort訊號。如果device為audio裝置,可以從USB訊號PIN傳類比的耳
機訊號。是一個讓USB port延伸更多功能的方式。

Reference
1. Universal Serial Bus  Power Delivery Specification_Revision  2 .0,   V0. 90