coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
edp.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __RK_DP_H
4 #define __RK_DP_H
5 
6 #include <edid.h>
7 
8 struct rk_edp_regs {
9  u8 res0[0x10];
11  u8 res1[0x4];
18  u8 res2[0xc];
20  u8 res3[0x4];
57  u8 res4[0x28];
59  u8 res5[4];
61  u8 res6[0xc];
64  u8 res7[0x4];
71  u8 res8[0x224];
73  u8 res9[0x14];
75  u8 res10[0x48];
82  u8 res11[0x4];
88  u8 res12[0x08];
91  u8 res13[0x200];
97  u8 res14[0x4];
99  u8 res15[0x24];
101  u8 res16[0x4];
103  u8 res17[0x34];
108  u8 res18[0x4];
110  u8 res19[0x1c];
114  u8 res20[0x14];
116  u8 res21[0x1c];
124  u8 res22[0x14];
126  u8 res23[0x8];
128  u8 res24[0x20];
131  u8 res25[0x10];
133  u8 res26[0x4];
144  u8 res27[0x18];
147  u8 res29[0x1e0];
151  u8 res30[0x10];
153 };
154 check_member(rk_edp_regs, pll_reg_5, 0xa00);
155 
156 /* func_en_1 */
157 #define VID_CAP_FUNC_EN_N (0x1 << 6)
158 #define VID_FIFO_FUNC_EN_N (0x1 << 5)
159 #define AUD_FIFO_FUNC_EN_N (0x1 << 4)
160 #define AUD_FUNC_EN_N (0x1 << 3)
161 #define HDCP_FUNC_EN_N (0x1 << 2)
162 #define SW_FUNC_EN_N (0x1 << 0)
163 
164 /* func_en_2 */
165 #define SSC_FUNC_EN_N (0x1 << 7)
166 #define AUX_FUNC_EN_N (0x1 << 2)
167 #define SERDES_FIFO_FUNC_EN_N (0x1 << 1)
168 #define LS_CLK_DOMAIN_FUNC_EN_N (0x1 << 0)
169 
170 /* video_ctl_1 */
171 #define VIDEO_EN (0x1 << 7)
172 #define VIDEO_MUTE (0x1 << 6)
173 
174 /* video_ctl_2 */
175 #define IN_D_RANGE_MASK (0x1 << 7)
176 #define IN_D_RANGE_SHIFT (7)
177 #define IN_D_RANGE_CEA (0x1 << 7)
178 #define IN_D_RANGE_VESA (0x0 << 7)
179 #define IN_BPC_MASK (0x7 << 4)
180 #define IN_BPC_SHIFT (4)
181 #define IN_BPC_12_BITS (0x3 << 4)
182 #define IN_BPC_10_BITS (0x2 << 4)
183 #define IN_BPC_8_BITS (0x1 << 4)
184 #define IN_BPC_6_BITS (0x0 << 4)
185 #define IN_COLOR_F_MASK (0x3 << 0)
186 #define IN_COLOR_F_SHIFT (0)
187 #define IN_COLOR_F_YCBCR444 (0x2 << 0)
188 #define IN_COLOR_F_YCBCR422 (0x1 << 0)
189 #define IN_COLOR_F_RGB (0x0 << 0)
190 
191 /* video_ctl_3 */
192 #define IN_YC_COEFFI_MASK (0x1 << 7)
193 #define IN_YC_COEFFI_SHIFT (7)
194 #define IN_YC_COEFFI_ITU709 (0x1 << 7)
195 #define IN_YC_COEFFI_ITU601 (0x0 << 7)
196 #define VID_CHK_UPDATE_TYPE_MASK (0x1 << 4)
197 #define VID_CHK_UPDATE_TYPE_SHIFT (4)
198 #define VID_CHK_UPDATE_TYPE_1 (0x1 << 4)
199 #define VID_CHK_UPDATE_TYPE_0 (0x0 << 4)
200 
201 /* video_ctl_4 */
202 #define BIST_EN (0x1 << 3)
203 #define BIST_WH_64 (0x1 << 2)
204 #define BIST_WH_32 (0x0 << 2)
205 #define BIST_TYPE_COLR_BAR (0x0 << 0)
206 #define BIST_TYPE_GRAY_BAR (0x1 << 0)
207 #define BIST_TYPE_MOBILE_BAR (0x2 << 0)
208 
209 /* video_ctl_8 */
210 #define VID_HRES_TH(x) (((x) & 0xf) << 4)
211 #define VID_VRES_TH(x) (((x) & 0xf) << 0)
212 
213 /* video_ctl_10 */
214 #define F_SEL (0x1 << 4)
215 #define INTERACE_SCAN_CFG (0x1 << 2)
216 #define INTERACD_SCAN_CFG_OFFSET 2
217 #define VSYNC_POLARITY_CFG (0x1 << 1)
218 #define VSYNC_POLARITY_CFG_OFFSET 1
219 #define HSYNC_POLARITY_CFG (0x1 << 0)
220 #define HSYNC_POLARITY_CFG_OFFSET 0
221 
222 /* dp_pd */
223 #define PD_INC_BG (0x1 << 7)
224 #define PD_EXP_BG (0x1 << 6)
225 #define PD_AUX (0x1 << 5)
226 #define PD_PLL (0x1 << 4)
227 #define PD_CH3 (0x1 << 3)
228 #define PD_CH2 (0x1 << 2)
229 #define PD_CH1 (0x1 << 1)
230 #define PD_CH0 (0x1 << 0)
231 
232 /* line_map */
233 #define LANE3_MAP_LOGIC_LANE_0 (0x0 << 6)
234 #define LANE3_MAP_LOGIC_LANE_1 (0x1 << 6)
235 #define LANE3_MAP_LOGIC_LANE_2 (0x2 << 6)
236 #define LANE3_MAP_LOGIC_LANE_3 (0x3 << 6)
237 #define LANE2_MAP_LOGIC_LANE_0 (0x0 << 4)
238 #define LANE2_MAP_LOGIC_LANE_1 (0x1 << 4)
239 #define LANE2_MAP_LOGIC_LANE_2 (0x2 << 4)
240 #define LANE2_MAP_LOGIC_LANE_3 (0x3 << 4)
241 #define LANE1_MAP_LOGIC_LANE_0 (0x0 << 2)
242 #define LANE1_MAP_LOGIC_LANE_1 (0x1 << 2)
243 #define LANE1_MAP_LOGIC_LANE_2 (0x2 << 2)
244 #define LANE1_MAP_LOGIC_LANE_3 (0x3 << 2)
245 #define LANE0_MAP_LOGIC_LANE_0 (0x0 << 0)
246 #define LANE0_MAP_LOGIC_LANE_1 (0x1 << 0)
247 #define LANE0_MAP_LOGIC_LANE_2 (0x2 << 0)
248 #define LANE0_MAP_LOGIC_LANE_3 (0x3 << 0)
249 
250 /* analog_ctl_2 */
251 #define SEL_24M (0x1 << 3)
252 
253 /* common_int_sta_1 */
254 #define VSYNC_DET (0x1 << 7)
255 #define PLL_LOCK_CHG (0x1 << 6)
256 #define SPDIF_ERR (0x1 << 5)
257 #define SPDIF_UNSTBL (0x1 << 4)
258 #define VID_FORMAT_CHG (0x1 << 3)
259 #define AUD_CLK_CHG (0x1 << 2)
260 #define VID_CLK_CHG (0x1 << 1)
261 #define SW_INT (0x1 << 0)
262 
263 /* common_int_sta_2 */
264 #define ENC_EN_CHG (0x1 << 6)
265 #define HW_BKSV_RDY (0x1 << 3)
266 #define HW_SHA_DONE (0x1 << 2)
267 #define HW_AUTH_STATE_CHG (0x1 << 1)
268 #define HW_AUTH_DONE (0x1 << 0)
269 
270 /* common_int_sta_3 */
271 #define AFIFO_UNDER (0x1 << 7)
272 #define AFIFO_OVER (0x1 << 6)
273 #define R0_CHK_FLAG (0x1 << 5)
274 
275 /* common_int_sta_4 */
276 #define PSR_ACTIVE (0x1 << 7)
277 #define PSR_INACTIVE (0x1 << 6)
278 #define SPDIF_BI_PHASE_ERR (0x1 << 5)
279 #define HOTPLUG_CHG (0x1 << 2)
280 #define HPD_LOST (0x1 << 1)
281 #define PLUG (0x1 << 0)
282 
283 /* dp_int_sta */
284 #define INT_HPD (0x1 << 6)
285 #define HW_LT_DONE (0x1 << 5)
286 #define SINK_LOST (0x1 << 3)
287 #define LINK_LOST (0x1 << 2)
288 #define RPLY_RECEIV (0x1 << 1)
289 #define AUX_ERR (0x1 << 0)
290 
291 /* int_ctl */
292 #define SOFT_INT_CTRL (0x1 << 2)
293 #define INT_POL (0x1 << 0)
294 
295 /* sys_ctl_1 */
296 #define DET_STA (0x1 << 2)
297 #define FORCE_DET (0x1 << 1)
298 #define DET_CTRL (0x1 << 0)
299 
300 /* sys_ctl_2 */
301 #define CHA_CRI(x) (((x) & 0xf) << 4)
302 #define CHA_STA (0x1 << 2)
303 #define FORCE_CHA (0x1 << 1)
304 #define CHA_CTRL (0x1 << 0)
305 
306 /* sys_ctl_3 */
307 #define HPD_STATUS (0x1 << 6)
308 #define F_HPD (0x1 << 5)
309 #define HPD_CTRL (0x1 << 4)
310 #define HDCP_RDY (0x1 << 3)
311 #define STRM_VALID (0x1 << 2)
312 #define F_VALID (0x1 << 1)
313 #define VALID_CTRL (0x1 << 0)
314 
315 /* sys_ctl_4 */
316 #define FIX_M_AUD (0x1 << 4)
317 #define ENHANCED (0x1 << 3)
318 #define FIX_M_VID (0x1 << 2)
319 #define M_VID_UPDATE_CTRL (0x3 << 0)
320 
321 /* pll_reg_2 */
322 #define LDO_OUTPUT_V_SEL_145 (2 << 6)
323 #define KVCO_DEFALUT (1 << 4)
324 #define CHG_PUMP_CUR_SEL_5US (1 << 2)
325 #define V2L_CUR_SEL_1MA (1 << 0)
326 
327 /* pll_reg_3 */
328 #define LOCK_DET_CNT_SEL_256 (2 << 5)
329 #define LOOP_FILTER_RESET (0 << 4)
330 #define PALL_SSC_RESET (0 << 3)
331 #define LOCK_DET_BYPASS (0 << 2)
332 #define PLL_LOCK_DET_MODE (0 << 1)
333 #define PLL_LOCK_DET_FORCE (0 << 0)
334 
335 /* pll_reg_5 */
336 #define REGULATOR_V_SEL_950MV (2 << 4)
337 #define STANDBY_CUR_SEL (0 << 3)
338 #define CHG_PUMP_INOUT_CTRL_1200MV (1 << 1)
339 #define CHG_PUMP_INPUT_CTRL_OP (0 << 0)
340 
341 /* ssc_reg */
342 #define SSC_OFFSET (0 << 6)
343 #define SSC_MODE (1 << 4)
344 #define SSC_DEPTH (9 << 0)
345 
346 /* tx_common */
347 #define TX_SWING_PRE_EMP_MODE (1 << 7)
348 #define PRE_DRIVER_PW_CTRL1 (0 << 5)
349 #define LP_MODE_CLK_REGULATOR (0 << 4)
350 #define RESISTOR_MSB_CTRL (0 << 3)
351 #define RESISTOR_CTRL (7 << 0)
352 
353 /* dp_aux */
354 #define DP_AUX_COMMON_MODE (0 << 4)
355 #define DP_AUX_EN (0 << 3)
356 #define AUX_TERM_50OHM (3 << 0)
357 
358 /* dp_bias */
359 #define DP_BG_OUT_SEL (4 << 4)
360 #define DP_DB_CUR_CTRL (0 << 3)
361 #define DP_BG_SEL (1 << 2)
362 #define DP_RESISTOR_TUNE_BG (2 << 0)
363 
364 /* dp_reserv2 */
365 #define CH1_CH3_SWING_EMP_CTRL (5 << 4)
366 #define CH0_CH2_SWING_EMP_CTRL (5 << 0)
367 
368 /* dp_training_ptn_set */
369 #define SCRAMBLING_DISABLE (0x1 << 5)
370 #define SCRAMBLING_ENABLE (0x0 << 5)
371 #define LINK_QUAL_PATTERN_SET_MASK (0x7 << 2)
372 #define LINK_QUAL_PATTERN_SET_HBR2 (0x5 << 2)
373 #define LINK_QUAL_PATTERN_SET_80BIT (0x4 << 2)
374 #define LINK_QUAL_PATTERN_SET_PRBS7 (0x3 << 2)
375 #define LINK_QUAL_PATTERN_SET_D10_2 (0x1 << 2)
376 #define LINK_QUAL_PATTERN_SET_DISABLE (0x0 << 2)
377 #define SW_TRAINING_PATTERN_SET_MASK (0x3 << 0)
378 #define SW_TRAINING_PATTERN_SET_PTN2 (0x2 << 0)
379 #define SW_TRAINING_PATTERN_SET_PTN1 (0x1 << 0)
380 #define SW_TRAINING_PATTERN_SET_DISABLE (0x0 << 0)
381 
382 /* dp_hw_link_training_ctl */
383 #define HW_LT_ERR_CODE_MASK 0x70
384 #define HW_LT_ERR_CODE_SHIFT 4
385 #define HW_LT_EN (0x1 << 0)
386 
387 /* dp_debug_ctl */
388 #define PLL_LOCK (0x1 << 4)
389 #define F_PLL_LOCK (0x1 << 3)
390 #define PLL_LOCK_CTRL (0x1 << 2)
391 #define POLL_EN (0x1 << 1)
392 #define PN_INV (0x1 << 0)
393 
394 /* aux_ch_sta */
395 #define AUX_BUSY (0x1 << 4)
396 #define AUX_STATUS_MASK (0xf << 0)
397 
398 /* aux_ch_defer_ctl */
399 #define DEFER_CTRL_EN (0x1 << 7)
400 #define DEFER_COUNT(x) (((x) & 0x7f) << 0)
401 
402 /* aux_rx_comm */
403 #define AUX_RX_COMM_I2C_DEFER (0x2 << 2)
404 #define AUX_RX_COMM_AUX_DEFER (0x2 << 0)
405 
406 /* buffer_data_ctl */
407 #define BUF_CLR (0x1 << 7)
408 #define BUF_HAVE_DATA (0x1 << 4)
409 #define BUF_DATA_COUNT(x) (((x) & 0xf) << 0)
410 
411 /* aux_ch_ctl_1 */
412 #define AUX_LENGTH(x) (((x - 1) & 0xf) << 4)
413 #define AUX_TX_COMM_MASK (0xf << 0)
414 #define AUX_TX_COMM_DP_TRANSACTION (0x1 << 3)
415 #define AUX_TX_COMM_I2C_TRANSACTION (0x0 << 3)
416 #define AUX_TX_COMM_MOT (0x1 << 2)
417 #define AUX_TX_COMM_WRITE (0x0 << 0)
418 #define AUX_TX_COMM_READ (0x1 << 0)
419 
420 /* aux_ch_ctl_2 */
421 #define PD_AUX_IDLE (0x1 << 3)
422 #define ADDR_ONLY (0x1 << 1)
423 #define AUX_EN (0x1 << 0)
424 
425 /* tx_sw_reset */
426 #define RST_DP_TX (0x1 << 0)
427 
428 /* analog_ctl_1 */
429 #define TX_TERMINAL_CTRL_50_OHM (0x1 << 4)
430 
431 /* analog_ctl_3 */
432 #define DRIVE_DVDD_BIT_1_0625V (0x4 << 5)
433 #define VCO_BIT_600_MICRO (0x5 << 0)
434 
435 /* pll_filter_ctl_1 */
436 #define PD_RING_OSC (0x1 << 6)
437 #define AUX_TERMINAL_CTRL_37_5_OHM (0x0 << 4)
438 #define AUX_TERMINAL_CTRL_45_OHM (0x1 << 4)
439 #define AUX_TERMINAL_CTRL_50_OHM (0x2 << 4)
440 #define AUX_TERMINAL_CTRL_65_OHM (0x3 << 4)
441 #define TX_CUR1_2X (0x1 << 2)
442 #define TX_CUR_16_MA (0x3 << 0)
443 
444 /* Definition for DPCD Register */
445 #define DPCD_DPCD_REV (0x0000)
446 #define DPCD_MAX_LINK_RATE (0x0001)
447 #define DPCD_MAX_LANE_COUNT (0x0002)
448 #define DP_MAX_LANE_COUNT_MASK 0x1f
449 #define DP_TPS3_SUPPORTED (1 << 6)
450 #define DP_ENHANCED_FRAME_CAP (1 << 7)
451 
452 #define DPCD_LINK_BW_SET (0x0100)
453 #define DPCD_LANE_COUNT_SET (0x0101)
454 
455 #define DPCD_TRAINING_PATTERN_SET (0x0102)
456 #define DP_TRAINING_PATTERN_DISABLE 0
457 #define DP_TRAINING_PATTERN_1 1
458 #define DP_TRAINING_PATTERN_2 2
459 #define DP_TRAINING_PATTERN_3 3
460 #define DP_TRAINING_PATTERN_MASK 0x3
461 
462 #define DPCD_TRAINING_LANE0_SET (0x0103)
463 #define DP_TRAIN_VOLTAGE_SWING_MASK 0x3
464 #define DP_TRAIN_VOLTAGE_SWING_SHIFT 0
465 #define DP_TRAIN_MAX_SWING_REACHED (1 << 2)
466 #define DP_TRAIN_VOLTAGE_SWING_400 (0 << 0)
467 #define DP_TRAIN_VOLTAGE_SWING_600 (1 << 0)
468 #define DP_TRAIN_VOLTAGE_SWING_800 (2 << 0)
469 #define DP_TRAIN_VOLTAGE_SWING_1200 (3 << 0)
470 
471 #define DP_TRAIN_PRE_EMPHASIS_MASK (3 << 3)
472 #define DP_TRAIN_PRE_EMPHASIS_0 (0 << 3)
473 #define DP_TRAIN_PRE_EMPHASIS_3_5 (1 << 3)
474 #define DP_TRAIN_PRE_EMPHASIS_6 (2 << 3)
475 #define DP_TRAIN_PRE_EMPHASIS_9_5 (3 << 3)
476 
477 #define DP_TRAIN_PRE_EMPHASIS_SHIFT 3
478 #define DP_TRAIN_MAX_PRE_EMPHASIS_REACHED (1 << 5)
479 
480 #define DPCD_LANE0_1_STATUS (0x0202)
481 #define DPCD_LANE2_3_STATUS (0x0203)
482 #define DP_LANE_CR_DONE (1 << 0)
483 #define DP_LANE_CHANNEL_EQ_DONE (1 << 1)
484 #define DP_LANE_SYMBOL_LOCKED (1 << 2)
485 #define DP_CHANNEL_EQ_BITS (DP_LANE_CR_DONE |\
486  DP_LANE_CHANNEL_EQ_DONE |\
487  DP_LANE_SYMBOL_LOCKED)
488 
489 #define DPCD_LANE_ALIGN_STATUS_UPDATED (0x0204)
490 #define DP_INTERLANE_ALIGN_DONE (1 << 0)
491 #define DP_DOWNSTREAM_PORT_STATUS_CHANGED (1 << 6)
492 #define DP_LINK_STATUS_UPDATED (1 << 7)
493 
494 #define DPCD_ADJUST_REQUEST_LANE0_1 (0x0206)
495 #define DPCD_ADJUST_REQUEST_LANE2_3 (0x0207)
496 #define DP_ADJUST_VOLTAGE_SWING_LANE0_MASK 0x03
497 #define DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT 0
498 #define DP_ADJUST_PRE_EMPHASIS_LANE0_MASK 0x0c
499 #define DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT 2
500 #define DP_ADJUST_VOLTAGE_SWING_LANE1_MASK 0x30
501 #define DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT 4
502 #define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0
503 #define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6
504 
505 #define DPCD_TEST_REQUEST (0x0218)
506 #define DPCD_TEST_RESPONSE (0x0260)
507 #define DPCD_TEST_EDID_CHECKSUM (0x0261)
508 #define DPCD_LINK_POWER_STATE (0x0600)
509 #define DP_SET_POWER_D0 0x1
510 #define DP_SET_POWER_D3 0x2
511 #define DP_SET_POWER_MASK 0x3
512 
513 #define AUX_ADDR_7_0(x) (((x) >> 0) & 0xff)
514 #define AUX_ADDR_15_8(x) (((x) >> 8) & 0xff)
515 #define AUX_ADDR_19_16(x) (((x) >> 16) & 0x0f)
516 
517 #define STREAM_ON_TIMEOUT 100
518 #define PLL_LOCK_TIMEOUT 10
519 #define DP_INIT_TRIES 10
520 
521 #define EDID_ADDR 0x50
522 #define EDID_LENGTH 0x80
523 #define EDID_HEADER 0x00
524 #define EDID_EXTENSION_FLAG 0x7e
525 
529 };
530 
536 };
537 
541 };
542 
545  CEA
546 };
547 
551 };
552 
555  REGISTER_M
556 };
557 
561 };
562 
568  DP_NONE
569 };
570 
575 };
576 
581  COLOR_12
582 };
583 
586  LINK_RATE_2_70GBPS = 0x0a
587 };
588 
592  LANE_CNT4 = 4
593 };
594 
600  FAILED
601 };
602 
608 };
609 
615 };
616 
624  POWER_ALL
625 };
626 
627 struct link_train {
628  unsigned char revision;
631 };
632 
633 struct rk_edp {
634  struct rk_edp_regs *regs;
635  struct link_train link_train;
637 };
638 
639 int rk_edp_prepare(void);
640 int rk_edp_enable(void);
641 void rk_edp_init(void);
642 int rk_edp_get_edid(struct edid *edid);
643 #endif
link_training_state
Definition: edp.h:595
@ LT_CLK_RECOVERY
Definition: edp.h:597
@ LT_START
Definition: edp.h:596
@ LT_EQ_TRAINING
Definition: edp.h:598
@ FINISHED
Definition: edp.h:599
@ FAILED
Definition: edp.h:600
analog_power_block
Definition: edp.h:617
@ CH0_BLOCK
Definition: edp.h:619
@ POWER_ALL
Definition: edp.h:624
@ AUX_BLOCK
Definition: edp.h:618
@ CH1_BLOCK
Definition: edp.h:620
@ CH3_BLOCK
Definition: edp.h:622
@ ANALOG_TOTAL
Definition: edp.h:623
@ CH2_BLOCK
Definition: edp.h:621
color_space
Definition: edp.h:571
@ CS_YCBCR422
Definition: edp.h:573
@ CS_RGB
Definition: edp.h:572
@ CS_YCBCR444
Definition: edp.h:574
pattern_set
Definition: edp.h:563
@ DP_NONE
Definition: edp.h:568
@ TRAINING_PTN2
Definition: edp.h:567
@ D10_2
Definition: edp.h:565
@ PRBS7
Definition: edp.h:564
@ TRAINING_PTN1
Definition: edp.h:566
clock_recovery_m_value_type
Definition: edp.h:553
@ CALCULATED_M
Definition: edp.h:554
@ REGISTER_M
Definition: edp.h:555
dp_irq_type
Definition: edp.h:531
@ DP_IRQ_TYPE_HP_CHANGE
Definition: edp.h:534
@ DP_IRQ_TYPE_HP_CABLE_OUT
Definition: edp.h:533
@ DP_IRQ_TYPE_HP_CABLE_IN
Definition: edp.h:532
@ DP_IRQ_TYPE_UNKNOWN
Definition: edp.h:535
link_lane_count_type
Definition: edp.h:589
@ LANE_CNT2
Definition: edp.h:591
@ LANE_CNT1
Definition: edp.h:590
@ LANE_CNT4
Definition: edp.h:592
int rk_edp_enable(void)
Definition: edp.c:986
voltage_swing_level
Definition: edp.h:603
@ VOLTAGE_LEVEL_1
Definition: edp.h:605
@ VOLTAGE_LEVEL_3
Definition: edp.h:607
@ VOLTAGE_LEVEL_2
Definition: edp.h:606
@ VOLTAGE_LEVEL_0
Definition: edp.h:604
check_member(rk_edp_regs, pll_reg_5, 0xa00)
dpcd_request
Definition: edp.h:526
@ DPCD_READ
Definition: edp.h:527
@ DPCD_WRITE
Definition: edp.h:528
color_depth
Definition: edp.h:577
@ COLOR_10
Definition: edp.h:580
@ COLOR_8
Definition: edp.h:579
@ COLOR_6
Definition: edp.h:578
@ COLOR_12
Definition: edp.h:581
int rk_edp_prepare(void)
Definition: edp.c:969
link_rate_type
Definition: edp.h:584
@ LINK_RATE_2_70GBPS
Definition: edp.h:586
@ LINK_RATE_1_62GBPS
Definition: edp.h:585
dynamic_range
Definition: edp.h:543
@ CEA
Definition: edp.h:545
@ VESA
Definition: edp.h:544
pll_status
Definition: edp.h:548
@ DP_PLL_UNLOCKED
Definition: edp.h:549
@ DP_PLL_LOCKED
Definition: edp.h:550
color_coefficient
Definition: edp.h:538
@ COLOR_YCBCR709
Definition: edp.h:540
@ COLOR_YCBCR601
Definition: edp.h:539
int rk_edp_get_edid(struct edid *edid)
Definition: edp.c:954
void rk_edp_init(void)
Definition: edp.c:994
video_timing_recognition_type
Definition: edp.h:558
@ VIDEO_TIMING_FROM_REGISTER
Definition: edp.h:560
@ VIDEO_TIMING_FROM_CAPTURE
Definition: edp.h:559
pre_emphasis_level
Definition: edp.h:610
@ PRE_EMPHASIS_LEVEL_0
Definition: edp.h:611
@ PRE_EMPHASIS_LEVEL_2
Definition: edp.h:613
@ PRE_EMPHASIS_LEVEL_3
Definition: edp.h:614
@ PRE_EMPHASIS_LEVEL_1
Definition: edp.h:612
uint32_t u32
Definition: stdint.h:51
uint8_t u8
Definition: stdint.h:45
Definition: edid.h:49
Definition: edp.h:8
u32 analog_ctl_2
Definition: edp.h:74
u32 dp_video_fifo_thrd
Definition: edp.h:125
u8 res4[0x28]
Definition: edp.h:57
u32 pll_reg_5
Definition: edp.h:152
u32 active_line_sta_l
Definition: edp.h:42
u32 dp_reserv1
Definition: edp.h:69
u8 res14[0x4]
Definition: edp.h:97
u32 tx_common
Definition: edp.h:62
u8 res12[0x08]
Definition: edp.h:88
u32 dp_training_ptn_set
Definition: edp.h:106
u32 soc_general_ctl
Definition: edp.h:146
u32 aux_addr_15_8
Definition: edp.h:141
u8 res23[0x8]
Definition: edp.h:126
u8 res26[0x4]
Definition: edp.h:133
u8 res15[0x24]
Definition: edp.h:99
u32 dp_tx_version
Definition: edp.h:10
u32 pll_reg_3
Definition: edp.h:149
u32 dp_m_cal_ctl
Definition: edp.h:129
u8 res1[0x4]
Definition: edp.h:11
u32 dp_int_sta
Definition: edp.h:83
u8 res10[0x48]
Definition: edp.h:75
u32 h_b_porch_l
Definition: edp.h:37
u32 lane_map
Definition: edp.h:72
u32 h_f_porch_sta_h
Definition: edp.h:52
u32 link_bw_set
Definition: edp.h:104
u32 total_line_sta_l
Definition: edp.h:40
u32 h_f_porch_h
Definition: edp.h:34
u8 res30[0x10]
Definition: edp.h:151
u32 vid_status
Definition: edp.h:39
u8 res25[0x10]
Definition: edp.h:131
u32 v_b_porch_sta
Definition: edp.h:46
u32 sys_ctl_4
Definition: edp.h:95
u32 int_state
Definition: edp.h:76
u32 dp_vid_ctl
Definition: edp.h:96
u8 res21[0x1c]
Definition: edp.h:116
u32 vsync
Definition: edp.h:27
u32 h_f_porch_l
Definition: edp.h:33
u32 common_int_mask_1
Definition: edp.h:84
u32 h_f_porch_sta_l
Definition: edp.h:51
u32 common_int_sta_2
Definition: edp.h:78
u8 res11[0x4]
Definition: edp.h:82
u32 aux_addr_19_16
Definition: edp.h:142
u32 total_pixel_sta_h
Definition: edp.h:48
u32 n_vid_2
Definition: edp.h:122
u32 h_b_porch_h
Definition: edp.h:38
u32 total_pixel_l
Definition: edp.h:29
u8 res2[0xc]
Definition: edp.h:18
u32 aux_rx_comm
Definition: edp.h:137
u32 video_ctl_10
Definition: edp.h:21
u32 hysnc_h
Definition: edp.h:36
u32 v_f_porch
Definition: edp.h:26
u32 total_pixel_h
Definition: edp.h:30
u32 pll_reg_1
Definition: edp.h:58
u32 spdif_biphase_int_sta
Definition: edp.h:81
u8 res20[0x14]
Definition: edp.h:114
u32 common_int_mask_4
Definition: edp.h:87
u32 active_pixel_l
Definition: edp.h:31
u8 res6[0xc]
Definition: edp.h:61
u32 tx_common2
Definition: edp.h:63
u32 total_line_h
Definition: edp.h:23
u32 active_line_sta_h
Definition: edp.h:43
u32 n_vid_1
Definition: edp.h:121
u32 int_sta_mask
Definition: edp.h:89
u32 sys_ctl_1
Definition: edp.h:92
u32 total_line_l
Definition: edp.h:22
u32 hsync_l
Definition: edp.h:35
u32 active_line_l
Definition: edp.h:24
u32 dp_debug_ctl
Definition: edp.h:111
u32 aux_ch_ctl_1
Definition: edp.h:139
u32 active_pixel_sta_l
Definition: edp.h:49
u32 vsync_sta
Definition: edp.h:45
u32 sys_ctl_3
Definition: edp.h:94
u32 hpd_deglitch_l
Definition: edp.h:112
u32 dp_aud_ctl
Definition: edp.h:98
u32 hsync_sta_h
Definition: edp.h:54
u32 h_b_porch__sta_h
Definition: edp.h:56
u32 total_line_sta_h
Definition: edp.h:41
u32 m_vid_2
Definition: edp.h:119
u32 n_vid_0
Definition: edp.h:120
u32 common_int_sta_3
Definition: edp.h:79
u32 aux_ch_ctl_2
Definition: edp.h:143
u8 res19[0x1c]
Definition: edp.h:110
u32 dp_bias
Definition: edp.h:66
u32 sys_ctl_2
Definition: edp.h:93
u8 res17[0x34]
Definition: edp.h:103
u8 res18[0x4]
Definition: edp.h:108
u8 res3[0x4]
Definition: edp.h:20
u32 dp_aux
Definition: edp.h:65
u32 aux_addr_7_0
Definition: edp.h:140
u32 video_ctl_8
Definition: edp.h:19
u8 res0[0x10]
Definition: edp.h:9
u8 res9[0x14]
Definition: edp.h:73
u32 active_line_h
Definition: edp.h:25
u32 m_vid_mon
Definition: edp.h:123
u32 hsync_sta_l
Definition: edp.h:53
u32 dp_reserv2
Definition: edp.h:70
u32 buf_data_ctl
Definition: edp.h:138
u32 v_b_porch
Definition: edp.h:28
u32 m_vid_0
Definition: edp.h:117
u8 res29[0x1e0]
Definition: edp.h:147
u32 common_int_mask_3
Definition: edp.h:86
u32 aux_ch_sta
Definition: edp.h:134
u32 video_ctl_2
Definition: edp.h:15
u32 dp_hdcp_ctl
Definition: edp.h:102
u32 buf_data[16]
Definition: edp.h:145
u8 res27[0x18]
Definition: edp.h:144
u32 common_int_sta_1
Definition: edp.h:77
u32 video_ctl_1
Definition: edp.h:14
u32 hpd_deglitch_h
Definition: edp.h:113
u8 res7[0x4]
Definition: edp.h:64
u32 dp_test
Definition: edp.h:67
u32 m_vid_1
Definition: edp.h:118
u32 pll_reg_2
Definition: edp.h:148
u32 dp_link_debug_ctl
Definition: edp.h:115
u32 func_en_1
Definition: edp.h:12
u8 res8[0x224]
Definition: edp.h:71
u32 dp_pd
Definition: edp.h:68
u32 lane_count_set
Definition: edp.h:105
u32 func_en_2
Definition: edp.h:13
u32 m_vid_gen_filter_th
Definition: edp.h:130
u32 video_ctl_3
Definition: edp.h:16
u32 h_b_porch_sta_l
Definition: edp.h:55
u32 pll_reg_4
Definition: edp.h:150
u32 active_pixel_sta_h
Definition: edp.h:50
u32 dp_hw_link_training
Definition: edp.h:109
u32 ssc_reg
Definition: edp.h:60
u32 active_pixel_h
Definition: edp.h:32
u32 common_int_mask_2
Definition: edp.h:85
u32 aux_err_num
Definition: edp.h:135
u32 dp_audio_margin
Definition: edp.h:127
u8 res5[4]
Definition: edp.h:59
u8 res13[0x200]
Definition: edp.h:91
u32 m_aud_gen_filter_th
Definition: edp.h:132
u32 total_pixel_sta_l
Definition: edp.h:47
u32 pkt_send_ctl
Definition: edp.h:100
u32 int_ctl
Definition: edp.h:90
u8 res22[0x14]
Definition: edp.h:124
u32 common_int_sta_4
Definition: edp.h:80
u32 ln_link_trn_ctl[4]
Definition: edp.h:107
u32 video_ctl_4
Definition: edp.h:17
u32 v_f_porch_sta
Definition: edp.h:44
u8 res16[0x4]
Definition: edp.h:101
u32 aux_ch_defer_dtl
Definition: edp.h:136
u8 res24[0x20]
Definition: edp.h:128
Definition: edp.h:633
struct rk_edp_regs * regs
Definition: edp.h:634
u8 train_set[4]
Definition: edp.h:636