108a7aa1eSSimon Glass /* 208a7aa1eSSimon Glass * Copyright (C) 2012 Samsung Electronics 308a7aa1eSSimon Glass * 408a7aa1eSSimon Glass * Author: Donghwa Lee <dh09.lee@samsung.com> 508a7aa1eSSimon Glass * 608a7aa1eSSimon Glass * SPDX-License-Identifier: GPL-2.0+ 708a7aa1eSSimon Glass */ 808a7aa1eSSimon Glass 908a7aa1eSSimon Glass #ifndef _EXYNOS_EDP_LOWLEVEL_H 1008a7aa1eSSimon Glass #define _EXYNOS_EDP_LOWLEVEL_H 1108a7aa1eSSimon Glass 128c9b8dc0SSimon Glass void exynos_dp_enable_video_bist(struct exynos_dp *dp_regs, 138c9b8dc0SSimon Glass unsigned int enable); 148c9b8dc0SSimon Glass void exynos_dp_enable_video_mute(struct exynos_dp *dp_regs, 158c9b8dc0SSimon Glass unsigned int enable); 168c9b8dc0SSimon Glass void exynos_dp_reset(struct exynos_dp *dp_regs); 178c9b8dc0SSimon Glass void exynos_dp_enable_sw_func(struct exynos_dp *dp_regs, unsigned int enable); 188c9b8dc0SSimon Glass unsigned int exynos_dp_set_analog_power_down(struct exynos_dp *dp_regs, 198c9b8dc0SSimon Glass unsigned int block, u32 enable); 208c9b8dc0SSimon Glass unsigned int exynos_dp_get_pll_lock_status(struct exynos_dp *dp_regs); 218c9b8dc0SSimon Glass int exynos_dp_init_analog_func(struct exynos_dp *dp_regs); 228c9b8dc0SSimon Glass void exynos_dp_init_hpd(struct exynos_dp *dp_regs); 238c9b8dc0SSimon Glass void exynos_dp_init_aux(struct exynos_dp *dp_regs); 248c9b8dc0SSimon Glass void exynos_dp_config_interrupt(struct exynos_dp *dp_regs); 258c9b8dc0SSimon Glass unsigned int exynos_dp_get_plug_in_status(struct exynos_dp *dp_regs); 268c9b8dc0SSimon Glass unsigned int exynos_dp_detect_hpd(struct exynos_dp *dp_regs); 278c9b8dc0SSimon Glass unsigned int exynos_dp_start_aux_transaction(struct exynos_dp *dp_regs); 288c9b8dc0SSimon Glass unsigned int exynos_dp_write_byte_to_dpcd(struct exynos_dp *dp_regs, 298c9b8dc0SSimon Glass unsigned int reg_addr, 3008a7aa1eSSimon Glass unsigned char data); 318c9b8dc0SSimon Glass unsigned int exynos_dp_read_byte_from_dpcd(struct exynos_dp *dp_regs, 328c9b8dc0SSimon Glass unsigned int reg_addr, 3308a7aa1eSSimon Glass unsigned char *data); 348c9b8dc0SSimon Glass unsigned int exynos_dp_write_bytes_to_dpcd(struct exynos_dp *dp_regs, 358c9b8dc0SSimon Glass unsigned int reg_addr, 3608a7aa1eSSimon Glass unsigned int count, 3708a7aa1eSSimon Glass unsigned char data[]); 388c9b8dc0SSimon Glass unsigned int exynos_dp_read_bytes_from_dpcd(struct exynos_dp *dp_regs, 398c9b8dc0SSimon Glass unsigned int reg_addr, 4008a7aa1eSSimon Glass unsigned int count, 4108a7aa1eSSimon Glass unsigned char data[]); 428c9b8dc0SSimon Glass int exynos_dp_select_i2c_device(struct exynos_dp *dp_regs, 438c9b8dc0SSimon Glass unsigned int device_addr, 4408a7aa1eSSimon Glass unsigned int reg_addr); 458c9b8dc0SSimon Glass int exynos_dp_read_byte_from_i2c(struct exynos_dp *dp_regs, 468c9b8dc0SSimon Glass unsigned int device_addr, 4708a7aa1eSSimon Glass unsigned int reg_addr, unsigned int *data); 488c9b8dc0SSimon Glass int exynos_dp_read_bytes_from_i2c(struct exynos_dp *dp_regs, 498c9b8dc0SSimon Glass unsigned int device_addr, 5008a7aa1eSSimon Glass unsigned int reg_addr, unsigned int count, 5108a7aa1eSSimon Glass unsigned char edid[]); 528c9b8dc0SSimon Glass void exynos_dp_reset_macro(struct exynos_dp *dp_regs); 538c9b8dc0SSimon Glass void exynos_dp_set_link_bandwidth(struct exynos_dp *dp_regs, 548c9b8dc0SSimon Glass unsigned char bwtype); 558c9b8dc0SSimon Glass unsigned char exynos_dp_get_link_bandwidth(struct exynos_dp *dp_regs); 568c9b8dc0SSimon Glass void exynos_dp_set_lane_count(struct exynos_dp *dp_regs, unsigned char count); 578c9b8dc0SSimon Glass unsigned int exynos_dp_get_lane_count(struct exynos_dp *dp_regs); 588c9b8dc0SSimon Glass unsigned char exynos_dp_get_lanex_pre_emphasis(struct exynos_dp *dp_regs, 5908a7aa1eSSimon Glass unsigned char lanecnt); 608c9b8dc0SSimon Glass void exynos_dp_set_lane_pre_emphasis(struct exynos_dp *dp_regs, 618c9b8dc0SSimon Glass unsigned int level, unsigned char lanecnt); 628c9b8dc0SSimon Glass void exynos_dp_set_lanex_pre_emphasis(struct exynos_dp *dp_regs, 638c9b8dc0SSimon Glass unsigned char request_val, 6408a7aa1eSSimon Glass unsigned char lanecnt); 658c9b8dc0SSimon Glass void exynos_dp_set_training_pattern(struct exynos_dp *dp_regs, 668c9b8dc0SSimon Glass unsigned int pattern); 678c9b8dc0SSimon Glass void exynos_dp_enable_enhanced_mode(struct exynos_dp *dp_regs, 688c9b8dc0SSimon Glass unsigned char enable); 698c9b8dc0SSimon Glass void exynos_dp_enable_scrambling(struct exynos_dp *dp_regs, 708c9b8dc0SSimon Glass unsigned int enable); 718c9b8dc0SSimon Glass int exynos_dp_init_video(struct exynos_dp *dp_regs); 728c9b8dc0SSimon Glass void exynos_dp_config_video_slave_mode(struct exynos_dp *dp_regs, 738c9b8dc0SSimon Glass struct edp_video_info *video_info); 748c9b8dc0SSimon Glass void exynos_dp_set_video_color_format(struct exynos_dp *dp_regs, 758c9b8dc0SSimon Glass struct edp_video_info *video_info); 768c9b8dc0SSimon Glass int exynos_dp_config_video_bist(struct exynos_dp *dp_regs, 77*8b449a66SSimon Glass struct exynos_dp_priv *priv); 788c9b8dc0SSimon Glass unsigned int exynos_dp_is_slave_video_stream_clock_on( 798c9b8dc0SSimon Glass struct exynos_dp *dp_regs); 808c9b8dc0SSimon Glass void exynos_dp_set_video_cr_mn(struct exynos_dp *dp_regs, unsigned int type, 818c9b8dc0SSimon Glass unsigned int m_value, unsigned int n_value); 828c9b8dc0SSimon Glass void exynos_dp_set_video_timing_mode(struct exynos_dp *dp_regs, 838c9b8dc0SSimon Glass unsigned int type); 848c9b8dc0SSimon Glass void exynos_dp_enable_video_master(struct exynos_dp *dp_regs, 858c9b8dc0SSimon Glass unsigned int enable); 868c9b8dc0SSimon Glass void exynos_dp_start_video(struct exynos_dp *dp_regs); 878c9b8dc0SSimon Glass unsigned int exynos_dp_is_video_stream_on(struct exynos_dp *dp_regs); 8808a7aa1eSSimon Glass 8908a7aa1eSSimon Glass #endif /* _EXYNOS_DP_LOWLEVEL_H */ 90