![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <commonlib/bsd/helpers.h>
#include <console/console.h>
#include <delay.h>
#include <device/mmio.h>
#include <edid.h>
#include <soc/addressmap.h>
#include <soc/dptx.h>
#include <soc/dptx_hal.h>
#include <soc/dptx_reg.h>
#include <soc/dp_intf.h>
#include <string.h>
Go to the source code of this file.
#define DP_CHANNEL_EQ_BITS |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
|
static |
Definition at line 182 of file dptx.c.
References BIOS_ERR, dptx_hal_auxread_bytes(), length, mdelay(), printk, and retry.
Referenced by dptx_auxread_dpcd().
|
static |
Definition at line 195 of file dptx.c.
References DP_AUX_MAX_PAYLOAD_BYTES, dptx_auxread_bytes(), length, MIN, and offset.
Referenced by dptx_check_sinkcap(), dptx_fec_ready(), dptx_get_edid(), dptx_set_trainingstart(), dptx_train_tps1(), dptx_train_tps2_3(), and dptx_trainingflow().
|
static |
Definition at line 153 of file dptx.c.
References BIOS_ERR, dptx_hal_auxwrite_bytes(), length, mdelay(), printk, and retry.
Referenced by dptx_auxwrite_dpcd().
|
static |
Definition at line 166 of file dptx.c.
References DP_AUX_MAX_PAYLOAD_BYTES, dptx_auxwrite_bytes(), length, MIN, and offset.
Referenced by dptx_check_sinkcap(), dptx_fec_ready(), dptx_get_edid(), dptx_set_trainingstart(), dptx_train_tps1(), dptx_train_tps2_3(), and dptx_trainingflow().
Definition at line 297 of file dptx.c.
References DP_CHANNEL_EQ_BITS, DP_INTERLANE_ALIGN_DONE, DP_LANE_ALIGN_STATUS_UPDATED, dptx_get_lane_status(), and dptx_link_status().
Referenced by dptx_train_tps2_3().
Definition at line 376 of file dptx.c.
References edid::mode, edid_mode::va, and edid_mode::vbl.
Referenced by dptx_setsdp_downcnt_init(), and dptx_setsdp_downcnt_init_inhblanking().
Definition at line 868 of file dptx.c.
References BIOS_INFO, BIT, buffer, dptx_training_info::down_stream_port_present, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, dptx_training_info::dp_mstbranch, dptx_training_info::dp_mstcap, DPCD_00000, DPCD_00021, DPCD_00200, DPCD_00600, DPCD_02003, dptx_training_info::dpcd_rev, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), dptx_fec_ready(), FEC_BIT_ERROR_COUNT, dptx_training_info::linklane_count, dptx_training_info::linkrate, MAX_LANECOUNT, mdelay(), memcpy(), memset(), MIN, printk, mtk_dp::rx_cap, dptx_training_info::sink_extcap_en, dptx_training_info::sink_ssc_en, dptx_training_info::sys_max_linkrate, dptx_training_info::tps3, dptx_training_info::tps4, and mtk_dp::train_info.
Referenced by mtk_edp_init().
|
static |
Definition at line 249 of file dptx.c.
References DP_LANE_CR_DONE, and dptx_get_lane_status().
Referenced by dptx_train_tps1(), and dptx_train_tps2_3().
Definition at line 323 of file dptx.c.
References BIOS_DEBUG, BIT, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), mtk_dp::has_fec, and printk.
Referenced by dptx_check_sinkcap().
Definition at line 211 of file dptx.c.
References BIOS_ERR, decode_edid(), DP_AUX_I2C_READ, DP_AUX_I2C_WRITE, DP_AUX_MAX_PAYLOAD_BYTES, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), mtk_dp::edid, EDID_CONFORMANT, ONE_BLOCK_SIZE, and printk.
Referenced by mtk_edp_init().
Definition at line 239 of file dptx.c.
References DP_LANE0_1_STATUS, dptx_link_status(), and s.
Referenced by dptx_channel_eq_ok(), and dptx_clock_recovery_ok().
Definition at line 1049 of file dptx.c.
References dptx_hal_analog_power_en(), dptx_hal_aux_setting(), dptx_hal_digital_setting(), dptx_hal_digital_swreset(), dptx_hal_hpd_detect_setting(), dptx_hal_hpd_int_en(), dptx_hal_init_setting(), dptx_hal_phy_setidlepattern(), and dptx_hal_phy_setting().
Referenced by mtk_edp_init().
Definition at line 355 of file dptx.c.
References dptx_info::depth, DP_COLOR_DEPTH_8BIT, DP_COLOR_FORMAT_RGB_444, DP_LANECOUNT_4, DP_LINKRATE_HBR2, DP_LINKRATE_HBR3, mtk_dp::dp_ready, DPTX_NTSTATE_STARTUP, mtk_dp::dsc_enable, EDP_BASE, dptx_info::format, mtk_dp::has_dsc, mtk_dp::has_fec, mtk_dp::info, dptx_training_info::linklane_count, dptx_training_info::linkrate, mtk_dp::power_on, mtk_dp::regs, dptx_training_info::sink_extcap_en, dptx_training_info::sink_ssc_en, dptx_training_info::sys_max_linkrate, dptx_training_info::tps3, dptx_training_info::tps4, mtk_dp::train_info, mtk_dp::training_state, and mtk_dp::video_enable.
Referenced by mtk_edp_init().
Definition at line 234 of file dptx.c.
References DP_LANE0_1_STATUS.
Referenced by dptx_channel_eq_ok(), and dptx_get_lane_status().
Definition at line 280 of file dptx.c.
References BIOS_ERR, DP_TRAINING_AUX_RD_INTERVAL, DP_TRAINING_AUX_RD_MASK, mdelay(), and printk.
Referenced by dptx_train_tps2_3().
Definition at line 263 of file dptx.c.
References BIOS_ERR, DP_DPCD_REV, DP_DPCD_REV_14, DP_TRAINING_AUX_RD_INTERVAL, DP_TRAINING_AUX_RD_MASK, mdelay(), and printk.
Referenced by dptx_train_tps1().
Definition at line 1081 of file dptx.c.
References dptx_hal_set_color_depth().
Referenced by dptx_video_config().
Definition at line 1076 of file dptx.c.
References misc_t::color_format, and dptx_hal_set_color_format().
Referenced by dptx_video_config().
Definition at line 516 of file dptx.c.
References dptx_hal_bypassmsa_en(), and dptx_set_tu().
Referenced by dptx_video_enable().
Definition at line 474 of file dptx.c.
References misc_t::cmisc, misc_t::color_depth, misc_t::color_format, dptx_info::depth, DP_COLOR_FORMAT_RAW, DP_COLOR_FORMAT_RGB_444, DP_COLOR_FORMAT_YONLY, DP_COLOR_FORMAT_YUV_420, DP_COLOR_FORMAT_YUV_422, DP_COLOR_FORMAT_YUV_444, misc_t::dp_misc, dptx_hal_setmisc(), dptx_info::format, mtk_dp::info, and misc_t::spec_def2.
Referenced by dptx_video_config().
|
static |
Definition at line 951 of file dptx.c.
References BIOS_INFO, buffer, dptx_training_info::cr_done, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, DP_LANECOUNT_1, DP_LANECOUNT_2, DP_LANECOUNT_4, DP_LINKRATE_HBR, DP_LINKRATE_HBR2, DP_LINKRATE_HBR25, DP_LINKRATE_HBR3, DP_LINKRATE_RBR, DPCD_00200, DPCD_00600, DPCD_02002, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), DPTX_PASS, dptx_training_changemode(), dptx_trainingflow(), DPTX_TRANING_FAIL, dptx_training_info::eq_done, dptx_training_info::linklane_count, dptx_training_info::linkrate, MAX_LANECOUNT, printk, mtk_dp::rx_cap, dptx_training_info::sink_count_num, dptx_training_info::sink_extcap_en, dptx_training_info::sys_max_linkrate, and mtk_dp::train_info.
Referenced by mtk_edp_init().
Definition at line 444 of file dptx.c.
References BIOS_DEBUG, dptx_hal_get_colorbpp(), dptx_hal_settu_setencoder(), dptx_hal_settu_sramrd_start(), dptx_setsdp_downcnt_init(), dptx_setsdp_downcnt_init_inhblanking(), DPTX_TBC_BUF_READSTARTADRTHRD, mtk_dp::edid, edid_mode::ha, dptx_training_info::linklane_count, dptx_training_info::linkrate, MIN, edid::mode, edid_mode::pixel_clock, printk, and mtk_dp::train_info.
Referenced by dptx_set_dptxout().
Definition at line 381 of file dptx.c.
References BIOS_DEBUG, count, DP_LANECOUNT_1, DP_LANECOUNT_2, DP_LANECOUNT_4, dptx_check_res_sample_rate(), dptx_hal_setsdp_downcnt_init(), mtk_dp::edid, dptx_training_info::linklane_count, dptx_training_info::linkrate, edid::mode, offset, edid_mode::pixel_clock, printk, and mtk_dp::train_info.
Referenced by dptx_set_tu().
Definition at line 413 of file dptx.c.
References BIOS_ERR, count, DP_LANECOUNT_1, DP_LANECOUNT_2, DP_LANECOUNT_4, dptx_check_res_sample_rate(), dptx_hal_setsdp_downcnt_init_inhblanking(), mtk_dp::edid, dptx_training_info::linklane_count, dptx_training_info::linkrate, edid::mode, offset, edid_mode::pixel_clock, printk, and mtk_dp::train_info.
Referenced by dptx_set_tu().
|
static |
Definition at line 630 of file dptx.c.
References BIOS_INFO, BIT, dptx_training_info::cr_done, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, DPCD_00102, DPCD_00103, DPCD_00202, DPCD_00206, DPCD_0200C, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), dptx_clock_recovery_ok(), dptx_hal_set_txtrainingpattern(), dptx_hal_setscramble(), dptx_link_train_clock_recovery_delay(), dptx_training_checkswingpre(), printk, mtk_dp::rx_cap, dptx_training_info::sink_extcap_en, mtk_dp::train_info, TRAIN_STEP_FAIL_BREAK, TRAIN_STEP_FAIL_NOT_BREAK, and TRAIN_STEP_SUCCESS.
Referenced by dptx_trainingflow().
|
static |
Definition at line 693 of file dptx.c.
References BIOS_INFO, BIT, dptx_training_info::cr_done, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, DPCD_00102, DPCD_00103, DPCD_00202, DPCD_00206, DPCD_0200C, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), dptx_channel_eq_ok(), dptx_clock_recovery_ok(), dptx_hal_set_txtrainingpattern(), dptx_link_train_channel_eq_delay(), dptx_training_checkswingpre(), dptx_training_info::eq_done, printk, mtk_dp::rx_cap, dptx_training_info::sink_extcap_en, dptx_training_info::tps3, dptx_training_info::tps4, mtk_dp::train_info, TRAIN_STEP_FAIL_BREAK, TRAIN_STEP_FAIL_NOT_BREAK, and TRAIN_STEP_SUCCESS.
Referenced by dptx_trainingflow().
Definition at line 942 of file dptx.c.
References dptx_hal_phyd_reset(), dptx_hal_reset_swing_preemphasis(), dptx_hal_ssc_en(), mdelay(), dptx_training_info::sink_ssc_en, and mtk_dp::train_info.
Referenced by dptx_set_trainingstart().
|
static |
Definition at line 522 of file dptx.c.
References BIT, dptx_hal_setswing_preemphasis(), DPTX_LANE0, DPTX_LANE1, DPTX_LANE2, DPTX_LANE3, DPTX_PREEMPHASIS3, DPTX_SWING3, and mdelay().
Referenced by dptx_train_tps1(), dptx_train_tps2_3(), and dptx_trainingflow().
Definition at line 770 of file dptx.c.
References BIOS_ERR, BIOS_INFO, DP_AUX_NATIVE_READ, DP_AUX_NATIVE_WRITE, DPCD_00100, DPCD_00101, DPCD_00102, DPCD_00107, DPCD_00600, DPTX_AUX_SET_ENAHNCED_FRAME, dptx_auxread_dpcd(), dptx_auxwrite_dpcd(), dptx_hal_set_ef_mode(), dptx_hal_set_txlane(), dptx_hal_set_txrate(), dptx_hal_set_txtrainingpattern(), dptx_hal_setscramble(), DPTX_PASS, DPTX_TRAIN_MAX_ITERATION, DPTX_TRAIN_RETRY_LIMIT, dptx_train_tps1(), dptx_train_tps2_3(), dptx_training_checkswingpre(), DPTX_TRANING_FAIL, ENABLE_DPTX_EF_MODE, dptx_training_info::linklane_count, dptx_training_info::linkrate, mdelay(), memset(), printk, dptx_training_info::sink_ssc_en, mtk_dp::train_info, TRAIN_STEP_FAIL_BREAK, and TRAIN_STEP_SUCCESS.
Referenced by dptx_set_trainingstart().
Definition at line 1086 of file dptx.c.
References dptx_info::depth, dptx_hal_overwrite_mn(), dptx_hal_set_msa(), dptx_set_color_depth(), dptx_set_color_format(), dptx_set_misc(), dptx_info::format, and mtk_dp::info.
Referenced by mtk_edp_init().
Definition at line 1063 of file dptx.c.
References BIOS_INFO, dptx_hal_verify_clock(), dptx_set_dptxout(), dptx_videomute(), and printk.
Referenced by mtk_edp_init().
Definition at line 318 of file dptx.c.
References dptx_hal_videomute().
Referenced by dptx_video_enable().
int mtk_edp_init | ( | struct edid * | edid | ) |
Definition at line 1100 of file dptx.c.
References BIOS_ERR, dp_intf_config(), dptx_check_sinkcap(), dptx_get_edid(), dptx_hal_hpd_high(), dptx_init_port(), dptx_init_variable(), dptx_set_trainingstart(), dptx_video_config(), dptx_video_enable(), and printk.
Referenced by configure_display().