upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / video / s5p_mipi_dsi_lowlevel.h
1 /* linux/drivers/video/s5p_mipi_dsi_lowlevel.h
2  *
3  * Header file for Samsung SoC MIPI-DSI lowlevel driver.
4  *
5  * Copyright (c) 2011 Samsung Electronics Co., Ltd
6  *
7  * InKi Dae <inki.dae@samsung.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12 */
13
14 #ifndef _S5P_MIPI_DSI_LOWLEVEL_H
15 #define _S5P_MIPI_DSI_LOWLEVEL_H
16
17 void s5p_mipi_dsi_func_reset(struct mipi_dsim_device *dsim);
18 void s5p_mipi_dsi_sw_reset(struct mipi_dsim_device *dsim);
19 void s5p_mipi_dsi_set_interrupt_mask(struct mipi_dsim_device *dsim,
20         unsigned int mode, unsigned int mask);
21 void s5p_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
22                                         unsigned int count);
23 void s5p_mipi_dsi_init_fifo_pointer(struct mipi_dsim_device *dsim,
24                                         unsigned int cfg);
25 void s5p_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
26                                 unsigned int value);
27 void s5p_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
28                                 unsigned int value);
29 void s5p_mipi_dsi_set_main_stand_by(struct mipi_dsim_device *dsim,
30                 unsigned int enable);
31 void s5p_mipi_dsi_set_main_disp_resol(struct mipi_dsim_device *dsim,
32                 unsigned int width_resol, unsigned int height_resol);
33 void s5p_mipi_dsi_set_main_disp_vporch(struct mipi_dsim_device *dsim,
34         unsigned int cmd_allow, unsigned int vfront, unsigned int vback);
35 void s5p_mipi_dsi_set_main_disp_hporch(struct mipi_dsim_device *dsim,
36                         unsigned int front, unsigned int back);
37 void s5p_mipi_dsi_set_main_disp_sync_area(struct mipi_dsim_device *dsim,
38                                 unsigned int vert, unsigned int hori);
39 void s5p_mipi_dsi_set_sub_disp_resol(struct mipi_dsim_device *dsim,
40                                 unsigned int vert, unsigned int hori);
41 void s5p_mipi_dsi_init_config(struct mipi_dsim_device *dsim);
42 void s5p_mipi_dsi_display_config(struct mipi_dsim_device *dsim,
43                                 struct mipi_dsim_config *dsim_config);
44 void s5p_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
45                                 unsigned int count);
46 void s5p_mipi_dsi_enable_lane(struct mipi_dsim_device *dsim, unsigned int lane,
47                                 unsigned int enable);
48 void s5p_mipi_dsi_enable_afc(struct mipi_dsim_device *dsim, unsigned int enable,
49                                 unsigned int afc_code);
50 void s5p_mipi_dsi_enable_pll_bypass(struct mipi_dsim_device *dsim,
51                                 unsigned int enable);
52 void s5p_mipi_dsi_set_pll_pms(struct mipi_dsim_device *dsim, unsigned int p,
53                                 unsigned int m, unsigned int s);
54 void s5p_mipi_dsi_pll_freq_band(struct mipi_dsim_device *dsim,
55                                 unsigned int freq_band);
56 void s5p_mipi_dsi_pll_freq(struct mipi_dsim_device *dsim,
57                         unsigned int pre_divider, unsigned int main_divider,
58                         unsigned int scaler);
59 void s5p_mipi_dsi_pll_stable_time(struct mipi_dsim_device *dsim,
60                         unsigned int lock_time);
61 void s5p_mipi_dsi_enable_pll(struct mipi_dsim_device *dsim,
62                                         unsigned int enable);
63 void s5p_mipi_dsi_set_byte_clock_src(struct mipi_dsim_device *dsim,
64                                         unsigned int src);
65 void s5p_mipi_dsi_enable_byte_clock(struct mipi_dsim_device *dsim,
66                                         unsigned int enable);
67 void s5p_mipi_dsi_set_esc_clk_prs(struct mipi_dsim_device *dsim,
68                                 unsigned int enable, unsigned int prs_val);
69 void s5p_mipi_dsi_enable_esc_clk_on_lane(struct mipi_dsim_device *dsim,
70                                 unsigned int lane_sel, unsigned int enable);
71 void s5p_mipi_dsi_force_dphy_stop_state(struct mipi_dsim_device *dsim,
72                                 unsigned int enable);
73 unsigned int s5p_mipi_dsi_is_lane_state(struct mipi_dsim_device *dsim);
74 void s5p_mipi_dsi_set_stop_state_counter(struct mipi_dsim_device *dsim,
75                                 unsigned int cnt_val);
76 void s5p_mipi_dsi_set_bta_timeout(struct mipi_dsim_device *dsim,
77                                 unsigned int timeout);
78 void s5p_mipi_dsi_set_lpdr_timeout(struct mipi_dsim_device *dsim,
79                                 unsigned int timeout);
80 void s5p_mipi_dsi_set_lcdc_transfer_mode(struct mipi_dsim_device *dsim,
81                                         unsigned int lp);
82 void s5p_mipi_dsi_set_cpu_transfer_mode(struct mipi_dsim_device *dsim,
83                                         unsigned int lp);
84 void s5p_mipi_dsi_enable_hs_clock(struct mipi_dsim_device *dsim,
85                                 unsigned int enable);
86 void s5p_mipi_dsi_dp_dn_swap(struct mipi_dsim_device *dsim,
87                                 unsigned int swap_en);
88 void s5p_mipi_dsi_hs_zero_ctrl(struct mipi_dsim_device *dsim,
89                                 unsigned int hs_zero);
90 void s5p_mipi_dsi_prep_ctrl(struct mipi_dsim_device *dsim, unsigned int prep);
91 unsigned int s5p_mipi_dsi_read_interrupt(struct mipi_dsim_device *dsim);
92 unsigned int s5p_mipi_dsi_read_interrupt_mask(struct mipi_dsim_device *dsim);
93 void s5p_mipi_dsi_clear_interrupt(struct mipi_dsim_device *dsim);
94 void s5p_mipi_dsi_clear_all_interrupt(struct mipi_dsim_device *dsim);
95 unsigned int s5p_mipi_dsi_is_pll_stable(struct mipi_dsim_device *dsim);
96 unsigned int s5p_mipi_dsi_get_fifo_state(struct mipi_dsim_device *dsim);
97 unsigned int _s5p_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim);
98 void _s5p_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim);
99 void s5p_mipi_dsi_wr_tx_header(struct mipi_dsim_device *dsim, unsigned int di,
100                                 unsigned int data0, unsigned int data1);
101 void s5p_mipi_dsi_wr_tx_data(struct mipi_dsim_device *dsim,
102                 unsigned int tx_data);
103 void s5p_mipi_dsi_rd_tx_header(struct mipi_dsim_device *dsim,
104                 unsigned int data0, unsigned int data1);
105 unsigned int s5p_mipi_dsi_rd_rx_fifo(struct mipi_dsim_device *dsim);
106
107 #endif /* _S5P_MIPI_DSI_LOWLEVEL_H */