1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) 2012 Samsung Electronics 4 * 5 * Author: Donghwa Lee <dh09.lee@samsung.com> 6 */ 7 8 #ifndef _EXYNOS_EDP_LOWLEVEL_H 9 #define _EXYNOS_EDP_LOWLEVEL_H 10 11 void exynos_dp_enable_video_bist(struct exynos_dp *dp_regs, 12 unsigned int enable); 13 void exynos_dp_enable_video_mute(struct exynos_dp *dp_regs, 14 unsigned int enable); 15 void exynos_dp_reset(struct exynos_dp *dp_regs); 16 void exynos_dp_enable_sw_func(struct exynos_dp *dp_regs, unsigned int enable); 17 unsigned int exynos_dp_set_analog_power_down(struct exynos_dp *dp_regs, 18 unsigned int block, u32 enable); 19 unsigned int exynos_dp_get_pll_lock_status(struct exynos_dp *dp_regs); 20 int exynos_dp_init_analog_func(struct exynos_dp *dp_regs); 21 void exynos_dp_init_hpd(struct exynos_dp *dp_regs); 22 void exynos_dp_init_aux(struct exynos_dp *dp_regs); 23 void exynos_dp_config_interrupt(struct exynos_dp *dp_regs); 24 unsigned int exynos_dp_get_plug_in_status(struct exynos_dp *dp_regs); 25 unsigned int exynos_dp_detect_hpd(struct exynos_dp *dp_regs); 26 unsigned int exynos_dp_start_aux_transaction(struct exynos_dp *dp_regs); 27 unsigned int exynos_dp_write_byte_to_dpcd(struct exynos_dp *dp_regs, 28 unsigned int reg_addr, 29 unsigned char data); 30 unsigned int exynos_dp_read_byte_from_dpcd(struct exynos_dp *dp_regs, 31 unsigned int reg_addr, 32 unsigned char *data); 33 unsigned int exynos_dp_write_bytes_to_dpcd(struct exynos_dp *dp_regs, 34 unsigned int reg_addr, 35 unsigned int count, 36 unsigned char data[]); 37 unsigned int exynos_dp_read_bytes_from_dpcd(struct exynos_dp *dp_regs, 38 unsigned int reg_addr, 39 unsigned int count, 40 unsigned char data[]); 41 int exynos_dp_select_i2c_device(struct exynos_dp *dp_regs, 42 unsigned int device_addr, 43 unsigned int reg_addr); 44 int exynos_dp_read_byte_from_i2c(struct exynos_dp *dp_regs, 45 unsigned int device_addr, 46 unsigned int reg_addr, unsigned int *data); 47 int exynos_dp_read_bytes_from_i2c(struct exynos_dp *dp_regs, 48 unsigned int device_addr, 49 unsigned int reg_addr, unsigned int count, 50 unsigned char edid[]); 51 void exynos_dp_reset_macro(struct exynos_dp *dp_regs); 52 void exynos_dp_set_link_bandwidth(struct exynos_dp *dp_regs, 53 unsigned char bwtype); 54 unsigned char exynos_dp_get_link_bandwidth(struct exynos_dp *dp_regs); 55 void exynos_dp_set_lane_count(struct exynos_dp *dp_regs, unsigned char count); 56 unsigned int exynos_dp_get_lane_count(struct exynos_dp *dp_regs); 57 unsigned char exynos_dp_get_lanex_pre_emphasis(struct exynos_dp *dp_regs, 58 unsigned char lanecnt); 59 void exynos_dp_set_lane_pre_emphasis(struct exynos_dp *dp_regs, 60 unsigned int level, unsigned char lanecnt); 61 void exynos_dp_set_lanex_pre_emphasis(struct exynos_dp *dp_regs, 62 unsigned char request_val, 63 unsigned char lanecnt); 64 void exynos_dp_set_training_pattern(struct exynos_dp *dp_regs, 65 unsigned int pattern); 66 void exynos_dp_enable_enhanced_mode(struct exynos_dp *dp_regs, 67 unsigned char enable); 68 void exynos_dp_enable_scrambling(struct exynos_dp *dp_regs, 69 unsigned int enable); 70 int exynos_dp_init_video(struct exynos_dp *dp_regs); 71 void exynos_dp_config_video_slave_mode(struct exynos_dp *dp_regs, 72 struct edp_video_info *video_info); 73 void exynos_dp_set_video_color_format(struct exynos_dp *dp_regs, 74 struct edp_video_info *video_info); 75 int exynos_dp_config_video_bist(struct exynos_dp *dp_regs, 76 struct exynos_dp_priv *priv); 77 unsigned int exynos_dp_is_slave_video_stream_clock_on( 78 struct exynos_dp *dp_regs); 79 void exynos_dp_set_video_cr_mn(struct exynos_dp *dp_regs, unsigned int type, 80 unsigned int m_value, unsigned int n_value); 81 void exynos_dp_set_video_timing_mode(struct exynos_dp *dp_regs, 82 unsigned int type); 83 void exynos_dp_enable_video_master(struct exynos_dp *dp_regs, 84 unsigned int enable); 85 void exynos_dp_start_video(struct exynos_dp *dp_regs); 86 unsigned int exynos_dp_is_video_stream_on(struct exynos_dp *dp_regs); 87 88 #endif /* _EXYNOS_DP_LOWLEVEL_H */ 89