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