1 /*
2  * Header containing platform_data structs for omap panels
3  *
4  * Copyright (C) 2013 Texas Instruments
5  * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
6  *	   Archit Taneja <archit@ti.com>
7  *
8  * Copyright (C) 2011 Texas Instruments
9  * Author: Mayuresh Janorkar <mayur@ti.com>
10  *
11  * Copyright (C) 2010 Canonical Ltd.
12  * Author: Bryan Wu <bryan.wu@canonical.com>
13  *
14  * This program is free software; you can redistribute it and/or modify it
15  * under the terms of the GNU General Public License version 2 as published by
16  * the Free Software Foundation.
17  *
18  * This program is distributed in the hope that it will be useful, but WITHOUT
19  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
21  * more details.
22  *
23  * You should have received a copy of the GNU General Public License along with
24  * this program.  If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #ifndef __OMAP_PANEL_DATA_H
28 #define __OMAP_PANEL_DATA_H
29 
30 #include <video/omapdss.h>
31 #include <video/display_timing.h>
32 
33 struct omap_dss_device;
34 
35 /**
36  * encoder_tfp410 platform data
37  * @name: name for this display entity
38  * @power_down_gpio: gpio number for PD pin (or -1 if not available)
39  * @data_lines: number of DPI datalines
40  */
41 struct encoder_tfp410_platform_data {
42 	const char *name;
43 	const char *source;
44 	int power_down_gpio;
45 	int data_lines;
46 };
47 
48 /**
49  * encoder_tpd12s015 platform data
50  * @name: name for this display entity
51  * @ct_cp_hpd_gpio: CT_CP_HPD gpio number
52  * @ls_oe_gpio: LS_OE gpio number
53  * @hpd_gpio: HPD gpio number
54  */
55 struct encoder_tpd12s015_platform_data {
56 	const char *name;
57 	const char *source;
58 
59 	int ct_cp_hpd_gpio;
60 	int ls_oe_gpio;
61 	int hpd_gpio;
62 };
63 
64 /**
65  * connector_dvi platform data
66  * @name: name for this display entity
67  * @source: name of the display entity used as a video source
68  * @i2c_bus_num: i2c bus number to be used for reading EDID
69  */
70 struct connector_dvi_platform_data {
71 	const char *name;
72 	const char *source;
73 	int i2c_bus_num;
74 };
75 
76 /**
77  * connector_hdmi platform data
78  * @name: name for this display entity
79  * @source: name of the display entity used as a video source
80  */
81 struct connector_hdmi_platform_data {
82 	const char *name;
83 	const char *source;
84 };
85 
86 /**
87  * connector_atv platform data
88  * @name: name for this display entity
89  * @source: name of the display entity used as a video source
90  * @connector_type: composite/svideo
91  * @invert_polarity: invert signal polarity
92  */
93 struct connector_atv_platform_data {
94 	const char *name;
95 	const char *source;
96 
97 	enum omap_dss_venc_type connector_type;
98 	bool invert_polarity;
99 };
100 
101 /**
102  * panel_dpi platform data
103  * @name: name for this display entity
104  * @source: name of the display entity used as a video source
105  * @data_lines: number of DPI datalines
106  * @display_timing: timings for this panel
107  * @backlight_gpio: gpio to enable/disable the backlight (or -1)
108  * @enable_gpio: gpio to enable/disable the panel (or -1)
109  */
110 struct panel_dpi_platform_data {
111 	const char *name;
112 	const char *source;
113 
114 	int data_lines;
115 
116 	const struct display_timing *display_timing;
117 
118 	int backlight_gpio;
119 	int enable_gpio;
120 };
121 
122 /**
123  * panel_dsicm platform data
124  * @name: name for this display entity
125  * @source: name of the display entity used as a video source
126  * @reset_gpio: gpio to reset the panel (or -1)
127  * @use_ext_te: use external TE GPIO
128  * @ext_te_gpio: external TE GPIO
129  * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
130  * @use_dsi_backlight: true if panel uses DSI command to control backlight
131  * @pin_config: DSI pin configuration
132  */
133 struct panel_dsicm_platform_data {
134 	const char *name;
135 	const char *source;
136 
137 	int reset_gpio;
138 
139 	bool use_ext_te;
140 	int ext_te_gpio;
141 
142 	unsigned ulps_timeout;
143 
144 	bool use_dsi_backlight;
145 
146 	struct omap_dsi_pin_config pin_config;
147 };
148 
149 /**
150  * panel_acx565akm platform data
151  * @name: name for this display entity
152  * @source: name of the display entity used as a video source
153  * @reset_gpio: gpio to reset the panel (or -1)
154  * @datapairs: number of SDI datapairs
155  */
156 struct panel_acx565akm_platform_data {
157 	const char *name;
158 	const char *source;
159 
160 	int reset_gpio;
161 
162 	int datapairs;
163 };
164 
165 /**
166  * panel_lb035q02 platform data
167  * @name: name for this display entity
168  * @source: name of the display entity used as a video source
169  * @data_lines: number of DPI datalines
170  * @backlight_gpio: gpio to enable/disable the backlight (or -1)
171  * @enable_gpio: gpio to enable/disable the panel (or -1)
172  */
173 struct panel_lb035q02_platform_data {
174 	const char *name;
175 	const char *source;
176 
177 	int data_lines;
178 
179 	int backlight_gpio;
180 	int enable_gpio;
181 };
182 
183 /**
184  * panel_sharp_ls037v7dw01 platform data
185  * @name: name for this display entity
186  * @source: name of the display entity used as a video source
187  * @data_lines: number of DPI datalines
188  * @resb_gpio: reset signal GPIO
189  * @ini_gpio: power on control GPIO
190  * @mo_gpio: selection for resolution(VGA/QVGA) GPIO
191  * @lr_gpio: selection for horizontal scanning direction GPIO
192  * @ud_gpio: selection for vertical scanning direction GPIO
193  */
194 struct panel_sharp_ls037v7dw01_platform_data {
195 	const char *name;
196 	const char *source;
197 
198 	int data_lines;
199 
200 	int resb_gpio;
201 	int ini_gpio;
202 	int mo_gpio;
203 	int lr_gpio;
204 	int ud_gpio;
205 };
206 
207 /**
208  * panel-tpo-td043mtea1 platform data
209  * @name: name for this display entity
210  * @source: name of the display entity used as a video source
211  * @data_lines: number of DPI datalines
212  * @nreset_gpio: reset signal
213  */
214 struct panel_tpo_td043mtea1_platform_data {
215 	const char *name;
216 	const char *source;
217 
218 	int data_lines;
219 
220 	int nreset_gpio;
221 };
222 
223 /**
224  * panel-nec-nl8048hl11 platform data
225  * @name: name for this display entity
226  * @source: name of the display entity used as a video source
227  * @data_lines: number of DPI datalines
228  * @res_gpio: reset signal
229  * @qvga_gpio: selection for resolution(QVGA/WVGA)
230  */
231 struct panel_nec_nl8048hl11_platform_data {
232 	const char *name;
233 	const char *source;
234 
235 	int data_lines;
236 
237 	int res_gpio;
238 	int qvga_gpio;
239 };
240 
241 /**
242  * panel-tpo-td028ttec1 platform data
243  * @name: name for display entity
244  * @source: name of the display entity used as a video source
245  * @data_lines: number of DPI datalines
246  */
247 struct panel_tpo_td028ttec1_platform_data {
248 	const char *name;
249 	const char *source;
250 
251 	int data_lines;
252 };
253 
254 #endif /* __OMAP_PANEL_DATA_H */
255