blob: 4b8c441cb54b102f4484c50931e55b8275563e08 [file] [log] [blame]
Donghwa Leed84f7832012-04-05 19:36:21 +00001/*
2 * Copyright (C) 2012 Samsung Electronics
3 *
4 * Author: InKi Dae <inki.dae@samsung.com>
5 * Author: Donghwa Lee <dh09.lee@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#ifndef _EXYNOS_MIPI_DSI_LOWLEVEL_H
24#define _EXYNOS_MIPI_DSI_LOWLEVEL_H
25
26void exynos_mipi_dsi_register(struct mipi_dsim_device *dsim);
27void exynos_mipi_dsi_func_reset(struct mipi_dsim_device *dsim);
28void exynos_mipi_dsi_sw_reset(struct mipi_dsim_device *dsim);
29void exynos_mipi_dsi_sw_release(struct mipi_dsim_device *dsim);
30void exynos_mipi_dsi_set_interrupt_mask(struct mipi_dsim_device *dsim,
31 unsigned int mode, unsigned int mask);
32void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
33 unsigned int count);
34void exynos_mipi_dsi_init_fifo_pointer(struct mipi_dsim_device *dsim,
35 unsigned int cfg);
36void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
37 unsigned int value);
38void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
39 unsigned int value);
40void exynos_mipi_dsi_set_main_disp_resol(struct mipi_dsim_device *dsim,
41 unsigned int width_resol, unsigned int height_resol);
42void exynos_mipi_dsi_set_main_disp_vporch(struct mipi_dsim_device *dsim,
43 unsigned int cmd_allow, unsigned int vfront, unsigned int vback);
44void exynos_mipi_dsi_set_main_disp_hporch(struct mipi_dsim_device *dsim,
45 unsigned int front, unsigned int back);
46void exynos_mipi_dsi_set_main_disp_sync_area(struct mipi_dsim_device *dsim,
47 unsigned int vert, unsigned int hori);
48void exynos_mipi_dsi_set_sub_disp_resol(struct mipi_dsim_device *dsim,
49 unsigned int vert, unsigned int hori);
50void exynos_mipi_dsi_init_config(struct mipi_dsim_device *dsim);
51void exynos_mipi_dsi_display_config(struct mipi_dsim_device *dsim,
52 struct mipi_dsim_config *dsim_config);
53void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
54 unsigned int count);
55void exynos_mipi_dsi_enable_lane(struct mipi_dsim_device *dsim,
56 unsigned int lane, unsigned int enable);
57void exynos_mipi_dsi_enable_afc(struct mipi_dsim_device *dsim,
58 unsigned int enable, unsigned int afc_code);
59void exynos_mipi_dsi_enable_pll_bypass(struct mipi_dsim_device *dsim,
60 unsigned int enable);
61void exynos_mipi_dsi_pll_freq_band(struct mipi_dsim_device *dsim,
62 unsigned int freq_band);
63void exynos_mipi_dsi_pll_freq(struct mipi_dsim_device *dsim,
64 unsigned int pre_divider, unsigned int main_divider,
65 unsigned int scaler);
66void exynos_mipi_dsi_pll_stable_time(struct mipi_dsim_device *dsim,
67 unsigned int lock_time);
68void exynos_mipi_dsi_enable_pll(struct mipi_dsim_device *dsim,
69 unsigned int enable);
70void exynos_mipi_dsi_set_byte_clock_src(struct mipi_dsim_device *dsim,
71 unsigned int src);
72void exynos_mipi_dsi_enable_byte_clock(struct mipi_dsim_device *dsim,
73 unsigned int enable);
74void exynos_mipi_dsi_set_esc_clk_prs(struct mipi_dsim_device *dsim,
75 unsigned int enable, unsigned int prs_val);
76void exynos_mipi_dsi_enable_esc_clk_on_lane(struct mipi_dsim_device *dsim,
77 unsigned int lane_sel, unsigned int enable);
78void exynos_mipi_dsi_force_dphy_stop_state(struct mipi_dsim_device *dsim,
79 unsigned int enable);
80unsigned int exynos_mipi_dsi_is_lane_state(struct mipi_dsim_device *dsim);
81void exynos_mipi_dsi_set_stop_state_counter(struct mipi_dsim_device *dsim,
82 unsigned int cnt_val);
83void exynos_mipi_dsi_set_bta_timeout(struct mipi_dsim_device *dsim,
84 unsigned int timeout);
85void exynos_mipi_dsi_set_lpdr_timeout(struct mipi_dsim_device *dsim,
86 unsigned int timeout);
87void exynos_mipi_dsi_set_lcdc_transfer_mode(struct mipi_dsim_device *dsim,
88 unsigned int lp);
89void exynos_mipi_dsi_set_cpu_transfer_mode(struct mipi_dsim_device *dsim,
90 unsigned int lp);
91void exynos_mipi_dsi_enable_hs_clock(struct mipi_dsim_device *dsim,
92 unsigned int enable);
93void exynos_mipi_dsi_dp_dn_swap(struct mipi_dsim_device *dsim,
94 unsigned int swap_en);
95void exynos_mipi_dsi_hs_zero_ctrl(struct mipi_dsim_device *dsim,
96 unsigned int hs_zero);
97void exynos_mipi_dsi_prep_ctrl(struct mipi_dsim_device *dsim,
98 unsigned int prep);
99void exynos_mipi_dsi_clear_interrupt(struct mipi_dsim_device *dsim);
100void exynos_mipi_dsi_clear_all_interrupt(struct mipi_dsim_device *dsim);
101unsigned int exynos_mipi_dsi_is_pll_stable(struct mipi_dsim_device *dsim);
102unsigned int exynos_mipi_dsi_get_fifo_state(struct mipi_dsim_device *dsim);
103unsigned int _exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device
104 *dsim);
105void _exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim);
106void exynos_mipi_dsi_wr_tx_header(struct mipi_dsim_device *dsim,
107 unsigned int di, unsigned int data0, unsigned int data1);
108void exynos_mipi_dsi_wr_tx_data(struct mipi_dsim_device *dsim,
109 unsigned int tx_data);
110
111#endif /* _EXYNOS_MIPI_DSI_LOWLEVEL_H */