10 #include <soc/sysreg.h>
22 static inline void fwadl(
unsigned long l,
void *v) {
26 #define lwrite32(a,b) fwadl((unsigned long)(a), (void *)(b))
28 static inline unsigned long fradl(
void *v) {
29 unsigned long l = readl(v);
34 #define lread32(a) fradl((void *)(a))
36 #define lwrite32(a,b) write32((void *)(b), (unsigned long)(a))
37 #define lread32(a) read32((void *)(a))
269 unsigned int retry_cnt = 10;
299 if (retry_cnt == 0) {
407 if (timeout_loop == 0)
419 unsigned int ret = 0;
420 unsigned int retry_cnt;
431 if (retry_cnt == 0) {
535 *data = (
unsigned char)(reg & 0xff);
542 unsigned char data[])
545 unsigned int start_offset;
546 unsigned int cur_data_count;
547 unsigned int cur_data_idx;
548 unsigned int retry_cnt;
549 unsigned int ret = 0;
556 while (start_offset <
count) {
558 if ((
count - start_offset) > 16)
561 cur_data_count =
count - start_offset;
573 for (cur_data_idx = 0; cur_data_idx < cur_data_count;
575 reg = data[start_offset + cur_data_idx];
577 (4 * cur_data_idx)));
591 if (retry_cnt == 0) {
599 start_offset += cur_data_count;
607 unsigned char data[])
610 unsigned int start_offset;
611 unsigned int cur_data_count;
612 unsigned int cur_data_idx;
613 unsigned int retry_cnt;
614 unsigned int ret = 0;
621 while (start_offset <
count) {
623 if ((
count - start_offset) > 16)
626 cur_data_count =
count - start_offset;
649 if (retry_cnt == 0) {
658 for (cur_data_idx = 0; cur_data_idx < cur_data_count;
662 data[start_offset + cur_data_idx] = (
unsigned char)reg;
665 start_offset += cur_data_count;
711 for (i = 0; i < 10; i++) {
750 unsigned int cur_data_idx;
751 unsigned int defer = 0;
754 for (i = 0; i <
count; i += 16) {
755 for (j = 0; j < 100; j++) {
803 for (cur_data_idx = 0; cur_data_idx < 16; cur_data_idx++) {
805 + 4 * cur_data_idx));
806 edid[i + cur_data_idx] = (
unsigned char)reg;
845 ret = (
unsigned char)reg;
879 return lread32(reg_list[lanecnt]);
883 unsigned char lanecnt)
892 lwrite32(request_val, reg_list[lanecnt]);
912 for (i = 0; i < lanecnt; i++) {
913 reg = level << reg_shift[i];
1058 unsigned int n_value)
static const u32 pattern[8]
#define printk(level,...)
void mdelay(unsigned int msecs)
unsigned int exynos_dp_write_bytes_to_dpcd(u32 reg_addr, unsigned int count, unsigned char data[])
unsigned int exynos_dp_read_bytes_from_dpcd(u32 reg_addr, unsigned int count, unsigned char data[])
static void exynos_dp_reset_aux(void)
void exynos_dp_set_video_cr_mn(unsigned int type, unsigned int m_value, unsigned int n_value)
unsigned int exynos_dp_get_plug_in_status(void)
void exynos_dp_enable_video_master(unsigned int enable)
static void exynos_dp_init_interrupt(void)
static struct exynos_dp *const dp_regs
void exynos_dp_config_interrupt(void)
int exynos_dp_read_byte_from_i2c(u32 device_addr, u32 reg_addr, unsigned int *data)
unsigned int exynos_dp_detect_hpd(void)
unsigned int exynos_dp_get_lane_count(void)
void exynos_dp_reset(void)
unsigned int exynos_dp_is_slave_video_stream_clock_on(void)
void exynos_dp_set_link_bandwidth(unsigned char bwtype)
unsigned int exynos_dp_read_byte_from_dpcd(u32 reg_addr, unsigned char *data)
int exynos_dp_read_bytes_from_i2c(u32 device_addr, u32 reg_addr, unsigned int count, unsigned char edid[])
unsigned int exynos_dp_get_pll_lock_status(void)
void exynos_dp_enable_sw_func(unsigned int enable)
void dp_phy_control(unsigned int enable)
void exynos_dp_set_video_color_format(struct edp_video_info *video_info)
int exynos_dp_select_i2c_device(u32 device_addr, u32 reg_addr)
unsigned char exynos_dp_get_lanex_pre_emphasis(unsigned char lanecnt)
void exynos_dp_set_lane_count(unsigned char count)
unsigned int exynos_dp_is_video_stream_on(void)
void exynos_dp_set_training_pattern(unsigned int pattern)
int exynos_dp_init_video(void)
void exynos_dp_disable_video_bist(void)
unsigned int exynos_dp_start_aux_transaction(void)
void exynos_dp_enable_enhanced_mode(unsigned char enable)
unsigned int exynos_dp_write_byte_to_dpcd(u32 reg_addr, u8 data)
void exynos_dp_set_lane_pre_emphasis(unsigned int level, unsigned char lanecnt)
void exynos_dp_start_video(void)
int exynos_dp_init_analog_func(void)
void exynos_dp_enable_scrambling(unsigned int enable)
void exynos_dp_init_aux(void)
void exynos_dp_enable_video_mute(unsigned int enable)
static void exynos_dp_init_analog_param(void)
unsigned char exynos_dp_get_link_bandwidth(void)
static void exynos_dp_set_pll_power(unsigned int enable)
void exynos_dp_set_lanex_pre_emphasis(unsigned char request_val, unsigned char lanecnt)
static void exynos_dp_enable_video_input(u32 enable)
void exynos_dp_config_video_slave_mode(struct edp_video_info *video_info)
void exynos_dp_reset_macro(void)
void exynos_dp_init_hpd(void)
unsigned int exynos_dp_set_analog_power_down(unsigned int block, u32 enable)
void exynos_dp_set_video_timing_mode(unsigned int type)
#define AUX_RX_COMM_I2C_DEFER
#define VSYNC_POLARITY_CFG
#define LS_CLK_DOMAIN_FUNC_EN_N
#define SW_TRAINING_PATTERN_SET_PTN1
#define AUX_TX_COMM_I2C_TRANSACTION
#define SCRAMBLING_ENABLE
#define IN_YC_COEFFI_MASK
#define INTERACE_SCAN_CFG
#define DRIVE_DVDD_BIT_1_0625V
#define AUX_ADDR_19_16(x)
#define AUX_TX_COMM_DP_TRANSACTION
#define IN_YC_COEFFI_ITU601
#define LINK_QUAL_PATTERN_SET_PRBS7
#define LINK_QUAL_PATTERN_SET_DISABLE
#define AUD_FIFO_FUNC_EN_N
#define SERDES_FIFO_FUNC_EN_N
#define AUX_RX_COMM_AUX_DEFER
#define AUX_TX_COMM_WRITE
#define SW_TRAINING_PATTERN_SET_PTN2
#define IN_YC_COEFFI_ITU709
@ VIDEO_TIMING_FROM_CAPTURE
#define SCRAMBLING_DISABLE
#define LINK_QUAL_PATTERN_SET_D10_2
#define HSYNC_POLARITY_CFG
#define AUDIO_MODE_SPDIF_MODE
#define VIDEO_MODE_SLAVE_MODE
#define VIDEO_MODE_MASTER_MODE
#define MASTER_VID_FUNC_EN_N
#define VIDEO_MASTER_MODE_EN
#define SLAVE_VID_FUNC_EN_N
#define SW_TRAINING_PATTERN_SET_NORMAL
#define DP_PLL_REF_BIT_1_1250V
#define DP_PLL_LOOP_BIT_DEFAULT
#define COMMON_INT_MASK_3
#define VCO_BIT_000_MICRO
#define EXYNOS_DP_SUCCESS
#define COMMON_INT_MASK_2
#define TX_DVDD_BIT_1_0625V
#define TX_TERMINAL_CTRL_61_OHM
#define SEL_BG_NEW_BANDGAP
#define SWING_A_30PER_G_NORMAL
#define PRE_EMPHASIS_SET_3_SHIFT
#define PRE_EMPHASIS_SET_1_SHIFT
#define AUX_TERMINAL_CTRL_52_OHM
#define COMMON_INT_MASK_4
#define AUX_BIT_PERIOD_EXPECTED_DELAY(x)
#define PRE_EMPHASIS_SET_2_SHIFT
#define COMMON_INT_MASK_1
#define AUX_HW_RETRY_COUNT_SEL(x)
#define PRE_EMPHASIS_SET_0_SHIFT
#define SEL_CURRENT_DEFAULT
#define INTERACE_SCAN_CFG_SHIFT
#define AUX_HW_RETRY_INTERVAL_600_MICROSECONDS
#define H_S_POLARITY_CFG_SHIFT
#define DP_TIMEOUT_LOOP_COUNT
#define V_S_POLARITY_CFG_SHIFT
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
static struct exynos5_power *const exynos_power
#define EXYNOS_DP_PHY_ENABLE
uint32_t dptx_phy_control
u32 ln1_link_training_ctl
u32 ln0_link_training_ctl
u32 ln3_link_training_ctl
u32 ln2_link_training_ctl
enum color_coefficient ycbcr_coeff
enum color_depth color_depth
enum dynamic_range dynamic_range
enum color_space color_space
unsigned int h_sync_polarity
unsigned int v_sync_polarity