DP AUX(DisplayPort Auxiliary Channel)的功能是作為 DisplayPort 接口中的輔助通信通道,
負責控制、管理和雙向通信。
核心功能可以概括為以下幾類:
一、顯示器識別與配置- 讀取顯示器能力(EDID)
- 支持的分辨率、刷新率
- 色深、色彩格式
- HDR、FreeSync / G-Sync 能力等
- 鏈路配置(Link Training)
- Lane 數量(1/2/4 lanes)
- 鏈路速率(RBR / HBR / HBR2 / HBR3 / UHBR)
- 電壓擺幅(Voltage Swing)與預加重參數(Pre-emphasis)
用於協商並設置:
AUX 通道用於 讀寫顯示器的 DPCD 寄存器,實現:
- 顯示器狀態監控
- 功能開啟/關閉
- 錯誤狀態反饋
AUX 通道用於 讀寫顯示器的 DPCD 寄存器,實現:
- DP 使用 AUX 通道模擬 I²C 總線:
- 讀取 EDID(替代 HDMI/VGA 的 DDC)
- 支持顯示器的 I²C 設備訪問
- 減少引腳數量,提高抗幹擾能力
Physical Layer
AUX(Auxiliary Channel) 是一條低速、差分、雙向、半雙工的通信通道
| 參數 | 典型值 | 說明 |
|---|---|---|
| 信號類型 | 差分信號 | AUX_P / AUX_N |
| 工作方式 | 半雙工、雙向 | 同一對線收發切换 |
| 差分擺幅 (Vdiff) | ≈ 400 mVpp | 典型差分峰峰值 |
| 共模电壓 (Vcm) | ≈ 0.5 V | 接收端偏置 |
| 數據速率 | ≈ 1 Mbps | 低速控制通道 |
| 編碼方式 | manchester-ii | |
| 差分阻抗 | 100 Ω | 走線與終端匹配 |
| 耦合方式 | AC 耦合 | 串聯隔直電容 |
| 拓樸结構 | 點對點 | 非多點總線 |
Manchester Encoding 曼徹斯特編碼
AUX使用的是Manchester-ii即IEEE 802.3 Ethernet(10BASE-T)版本
- 位元 0:高 -> 低, falling edge
- 位元 1:低 -> 高, rising edge
以數值0x14為例,實際波形如下 (差分訊號經比較器輸出為邏輯訊號)
AUX Transaction Syntax 協議語法
-
協議內容區分二類:
- Native AUX transaction syntax
- I2C-over-AUX transaction
Aux的通訊都是由 主機 發起 Request,裝置 回覆 Reply,無論Write/Read
主機送出Request後會等待400us的timeout,裝置則是有300us的時間來回覆
Native Aux transaction syntax
| Precharge | SYNC | STOP | Command | Address | Length | Data | STOP |
Request Transaction
- Precharge : 10到16個連續位元0的波形為Aux充能common mode voltage
- SYNC : 16個連續位元0波形
- STOP : AUX_P to hight, AUX_N to low 2個時脈, 然後AUX_P to low, AUX_N to high 2個時脈 (如果時脈為 1M bps,2個時脈即 2us)
- Command : 4 bits write - 1000 (8)
- Address : 20 bits
- Length : 8 bits 0000b - 1 byte
- Data : 1 ~ 16 bytes
read - 1001 (9)
0001b - 2 byte 以此類推
| Precharge | SYNC | STOP | Command | Data | STOP |
Reply Transaction
- Precharge : 10到16個連續位元0的波形為Aux充能common mode voltage
- SYNC : 16個連續位元0波形
- STOP : AUX_P to hight, AUX_N to low 2個時脈, 然後AUX_P to low, AUX_N to high 2個時脈 (如果時脈為 1M bps,2個時脈即 2us)
- Command : 4 bits ACK - 0000 (0)
- Data : 0 ~ 16 bytes
NACK - 0001 (1)
DEFER - 0011 (3)
這是一個native write實際的波形
Requester對位置0x107寫入1個byte 0x80,Repiler回覆了ACK確認動作無誤
可以看到在data 0x80後接上STOP,然後Requester釋放了Aux bus的控制(Hi-Z)
native read波形
Requester預對位置0x0000讀取16個bytes,Repiler確認ACK並回覆16 bytes的data
什麼是DP Link Training
DP Link Training 是 Source(顯卡)與 Sink(顯示器)在開始傳送影像前,用來協商並校準實體傳輸鏈路的流程,
確保高速差分訊號能可靠傳輸。
目標是確認:
- 可用的 Lane 數
- 可用的 Link Rate
- 合適的 電壓擺幅(Voltage Swing)
- 合適的 預加重(Pre-emphasis)
Aux Link Training 的角色
利用 AUX Channel 進行 Link Training 的控制、回饋與狀態交換
AUX Channel 負責:
- Source 寫入訓練參數
- Sink 回報訓練結果(Clock Recovery 是否成功等)
- 讀寫 DPCD Register(0x100~0x11F 等)
Link Training 主要流程(DP 1.x 為例)
能力探索(Capability Discovery)
- 最大 Link Rate
- 最大 Lane Count
- 是否支援 SSC、TPS3 / TPS4(DP 1.2+)
Clock Recovery(CR)Training
- Link Rate
- Lane Count
- Voltage Swing = Level 0
- Pre-emphasis = Level 0
- CLOCK_RECOVERY_DONE(每個 Lane)
- Source 提高 Voltage Swing / Pre-emphasis
- 重試(有最大次數限制)
Channel Equalization(EQ)Training
- CHANNEL_EQ_DONE
- SYMBOL_LOCKED
- Voltage Swing
- Pre-emphasis
Link Training Complete
- Source 停止 Training Pattern
- 切換到 Normal Video Stream
- 開始送影像資料(Main Link)
Source 透過 AUX 讀取 Sink 的 DPCD:
目的:讓 Sink 能正確鎖定時鐘。
流程:
1.Source 設定初始:
2.Source 傳送 Training Pattern 1 (TPS1)
3.Sink 透過 DPCD 回報:
4.若失敗:
✅成功條件:所有 Lane 的 CR 都完成
目的:確保資料眼圖品質足夠。
流程:
1.Source 傳送 TPS2 / TPS3(依 DP 版本)
Sink 回報:
3.Source 可能再微調:
✅成功條件:CR + EQ 全部完成
Link Training範例
這是對一塊eDP panel的training過程
➕Native Write(8) Addr:0x00600 Length:1 Data:01
00600h SET_POWER & SET_DP_PWR_VOLTAGE
[2:0]SET_POWER_STATE: 1,
Set local Sink device and all downstream Sink devices to D0 (normal operation mode)
➕Native Read(9) Addr:0x00600 Length:1 Data:01
00600h SET_POWER & SET_DP_PWR_VOLTAGE
[2:0]SET_POWER_STATE: 1,
Set local Sink device and all downstream Sink devices to D0 (normal operation mode)
➕Native Read(9) Addr:0x00000 Length:16 Data:14 14 C4 81 00 00 01 C0 02 00 00 00 00 01 01 00
00000h DPCD_REV
[7:0]Revision Number: 14h, DPCD r1.4
00001h MAX_LINK_RATE
[7:0]MAX_LINK_RATE: 14h, 5.4Gbps/lane
00002h MAX_LANE_COUNT
[4:0]MAX_LANE_COUNT: 04h, 4 lanes
[5]POST_LT_ADJ_REQ_SUPPORTED: 0, Post-Link Training Adjust Request is not supported
[6]TPS3_SUPPORTED: 1,TPS3 is supported
[7]ENHANCED_FRAME_CAP: 1,Enhanced Framing symbol sequence for BS and BR is supported
00003h MAX_DOWNSPREAD
[0]MAX_DOWNSPREAD: 1,Up to 0.5% down-spread
[6]NO_AUX_TRANSACTION_LINK_TRAINING: 0,Requires AUX transactions to synchronize to a DPTX
[7]TPS4_SUPPORTED: 1,TPS4 is supported
00004h NORP & DP_PWR_VOLTAGE_CAP
[0]NORP: 0,One receiver port
[5]5V_DP_PWR_CAP: 0,Downstream device is not capable of producing +4.9 to +5.5V on the DP_PWR pin of its DP connector
[6]12V_DP_PWR_CAP: 0,Downstream device is not capable of producing +12V +-10%
[7]18V_DP_PWR_CAP: 0,Downstream device is not capable of producing +18V +-10%
00005h DOWN_STREAM_PORT_PRESENT
[0]DFP_PRESENT: 0
[2:1]DFP_TYPE: 0,DisplayPort
[3]FORMAT_CONVERSION: 0,This Branch device does not have a format conversion block
[4]DETAILED_CAP_INFO_AVAILABLE: 0,DFP capability field is 1 byte per port
00006h MAIN_LINK_CHANNEL_CODING
[0]8b/10b: 1,DisplayPort receiver supports the Main-Link channel coding specification
00007h DOWN_STREAM_PORT_COUNT
[3:0]DFP_COUNT: 0
[6]MSA_TIMING_PAR_IGNORED: 1,Sink device is capable of rendering the incoming video stream
[7]OUI Support: 1,OUI is supported
00008h RECEIVE_PORT0_CAP_0
[1]LOCAL_EDID_PRESENT: 1,This receiver port has a local EDID
[2]ASSOCIATED_TO_PRECEDING_PORT: 0,This port is used for the main isochronous stream
[3]HBLANK_EXPANSION_CAPABLE: 0,DPRX is not capable of Horizontal Blanking Expansion operation
[4]BUFFER_SIZE_UNIT: 0,Units are in pixel counts
[5]BUFFER_SIZE_PER_PORT: 0,Buffer size is per-lane
[6]HBLANK_REDUCTION_CAPABLE: 0,DPRX cannot reduce the HBlank pixel count
00009h RECEIVE_PORT0_CAP_1
[7:0]BUFFER_SIZE: 32 (0)
0000Ah RECEIVE_PORT1_CAP_0
[1]LOCAL_EDID_PRESENT: 0,This receiver port does not have a local EDID
[2]ASSOCIATED_TO_PRECEDING_PORT: 0,This port is used for the main isochronous stream
[3]HBLANK_EXPANSION_CAPABLE: 0,DPRX is not capable of Horizontal Blanking Expansion operation
[4]BUFFER_SIZE_UNIT: 0,Units are in pixel counts
[5]BUFFER_SIZE_PER_PORT: 0,Buffer size is per-lane
[6]HBLANK_REDUCTION_CAPABLE: 0,DPRX cannot reduce the HBlank pixel count
0000Bh RECEIVE_PORT1_CAP_1
[7:0]BUFFER_SIZE: 32 (0)
0000Ch I2C Speed Control Capabilities Bit Map
[7:0]I2C Speed Control Capabilities Bit Map: 00h,RESERVED
0000Dh eDP_CONFIGURATION_CAP
[0]ALTERNATE_SCRAMBLER_RESET_CAPABLE: 1,Can use the eDP alternate scrambler reset value of FFFEh
[3]DPCD_DISPLAY_CONTROL_CAPABLE: 0
0000Eh TRAINING_AUX_RD_INTERVAL
[6:0]TRAINING_AUX_RD_INTERVAL: 01h,100us for the Main-Link Clock Recovery phase; 4ms for the Main-Link Channel Equalization phase
[7]EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT: 0,Not present
0000Fh ADAPTOR_CAP
[0]FORCE_LOAD_SENSE_CAP: 0,Does not support VGA force load adaptor sense mechanism
[1]ALTERNATE_I2C_PATTERN_CAP: 0,Does not support alternate I2C patterns






留言
張貼留言