blob: 4e0fc1a8c843fb2c9d2b37f0d9589ac15bc2b1d5 [file] [log] [blame]
Archit Tanejaa0d8dde2013-02-12 16:46:46 +05301/*
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
Tomi Valkeinen04f0ff02013-05-24 14:21:56 +030030#include <video/display_timing.h>
31
Archit Tanejaa0d8dde2013-02-12 16:46:46 +053032struct omap_dss_device;
33
34/**
35 * struct panel_generic_dpi_data - panel driver configuration data
36 * @name: panel name
37 * @platform_enable: platform specific panel enable function
38 * @platform_disable: platform specific panel disable function
Tomi Valkeinenc3f80cb2013-02-12 14:59:17 +053039 * @num_gpios: number of gpios connected to panel
40 * @gpios: gpio numbers on the platform
41 * @gpio_invert: configure gpio as active high or low
Archit Tanejaa0d8dde2013-02-12 16:46:46 +053042 */
43struct panel_generic_dpi_data {
44 const char *name;
45 int (*platform_enable)(struct omap_dss_device *dssdev);
46 void (*platform_disable)(struct omap_dss_device *dssdev);
Tomi Valkeinenc3f80cb2013-02-12 14:59:17 +053047
48 int num_gpios;
49 int gpios[10];
50 bool gpio_invert[10];
Archit Tanejaa0d8dde2013-02-12 16:46:46 +053051};
52
53/**
54 * struct panel_n8x0_data - N800 panel driver configuration data
55 */
56struct panel_n8x0_data {
57 int (*platform_enable)(struct omap_dss_device *dssdev);
58 void (*platform_disable)(struct omap_dss_device *dssdev);
59 int panel_reset;
60 int ctrl_pwrdown;
Archit Tanejaa0d8dde2013-02-12 16:46:46 +053061};
62
63/**
64 * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration data
65 * @name: panel name
66 * @use_ext_te: use external TE
67 * @ext_te_gpio: external TE GPIO
68 * @esd_interval: interval of ESD checks, 0 = disabled (ms)
69 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
70 * @use_dsi_backlight: true if panel uses DSI command to control backlight
71 * @pin_config: DSI pin configuration
72 */
73
74struct nokia_dsi_panel_data {
75 const char *name;
76
77 int reset_gpio;
78
79 bool use_ext_te;
80 int ext_te_gpio;
81
82 unsigned esd_interval;
83 unsigned ulps_timeout;
84
85 bool use_dsi_backlight;
86
87 struct omap_dsi_pin_config pin_config;
88};
89
90/**
91 * struct picodlp_panel_data - picodlp panel driver configuration data
92 * @picodlp_adapter_id: i2c_adapter number for picodlp
93 */
94struct picodlp_panel_data {
95 int picodlp_adapter_id;
96 int emu_done_gpio;
97 int pwrgood_gpio;
98};
99
100/**
101 * struct tfp410_platform_data - tfp410 panel driver configuration data
102 * @i2c_bus_num: i2c bus id for the panel
103 * @power_down_gpio: gpio number for PD pin (or -1 if not available)
104 */
105struct tfp410_platform_data {
106 int i2c_bus_num;
107 int power_down_gpio;
108};
109
Tomi Valkeinenc3f80cb2013-02-12 14:59:17 +0530110/**
111 * sharp ls panel driver configuration data
112 * @resb_gpio: reset signal
113 * @ini_gpio: power on control
114 * @mo_gpio: selection for resolution(VGA/QVGA)
115 * @lr_gpio: selection for horizontal scanning direction
116 * @ud_gpio: selection for vertical scanning direction
117 */
118struct panel_sharp_ls037v7dw01_data {
119 int resb_gpio;
120 int ini_gpio;
121 int mo_gpio;
122 int lr_gpio;
123 int ud_gpio;
124};
125
126/**
127 * acx565akm panel driver configuration data
128 * @reset_gpio: reset signal
129 */
130struct panel_acx565akm_data {
131 int reset_gpio;
132};
133
134/**
135 * nec nl8048 panel driver configuration data
136 * @res_gpio: reset signal
137 * @qvga_gpio: selection for resolution(QVGA/WVGA)
138 */
139struct panel_nec_nl8048_data {
140 int res_gpio;
141 int qvga_gpio;
142};
143
144/**
145 * tpo td043 panel driver configuration data
146 * @nreset_gpio: reset signal
147 */
148struct panel_tpo_td043_data {
149 int nreset_gpio;
150};
151
Tomi Valkeinen2773fef2013-05-24 14:18:30 +0300152/**
153 * encoder_tfp410 platform data
154 * @name: name for this display entity
155 * @power_down_gpio: gpio number for PD pin (or -1 if not available)
156 * @data_lines: number of DPI datalines
157 */
158struct encoder_tfp410_platform_data {
159 const char *name;
160 const char *source;
161 int power_down_gpio;
162 int data_lines;
163};
164
Tomi Valkeinena0ee5772013-05-24 14:20:14 +0300165/**
166 * encoder_tpd12s015 platform data
167 * @name: name for this display entity
168 * @ct_cp_hpd_gpio: CT_CP_HPD gpio number
169 * @ls_oe_gpio: LS_OE gpio number
170 * @hpd_gpio: HPD gpio number
171 */
172struct encoder_tpd12s015_platform_data {
173 const char *name;
174 const char *source;
175
176 int ct_cp_hpd_gpio;
177 int ls_oe_gpio;
178 int hpd_gpio;
179};
180
Tomi Valkeinen348077b2013-05-24 14:20:45 +0300181/**
182 * connector_dvi platform data
183 * @name: name for this display entity
184 * @source: name of the display entity used as a video source
185 * @i2c_bus_num: i2c bus number to be used for reading EDID
186 */
187struct connector_dvi_platform_data {
188 const char *name;
189 const char *source;
190 int i2c_bus_num;
191};
192
Tomi Valkeinen3cb07ee2013-05-24 14:21:08 +0300193/**
194 * connector_hdmi platform data
195 * @name: name for this display entity
196 * @source: name of the display entity used as a video source
197 */
198struct connector_hdmi_platform_data {
199 const char *name;
200 const char *source;
201};
202
Tomi Valkeinen61a7f242013-05-24 14:21:30 +0300203/**
204 * connector_atv platform data
205 * @name: name for this display entity
206 * @source: name of the display entity used as a video source
207 * @connector_type: composite/svideo
208 * @invert_polarity: invert signal polarity
209 */
210struct connector_atv_platform_data {
211 const char *name;
212 const char *source;
213
214 enum omap_dss_venc_type connector_type;
215 bool invert_polarity;
216};
217
Tomi Valkeinen04f0ff02013-05-24 14:21:56 +0300218/**
219 * panel_dpi platform data
220 * @name: name for this display entity
221 * @source: name of the display entity used as a video source
222 * @data_lines: number of DPI datalines
223 * @display_timing: timings for this panel
224 * @backlight_gpio: gpio to enable/disable the backlight (or -1)
225 * @enable_gpio: gpio to enable/disable the panel (or -1)
226 */
227struct panel_dpi_platform_data {
228 const char *name;
229 const char *source;
230
231 int data_lines;
232
233 const struct display_timing *display_timing;
234
235 int backlight_gpio;
236 int enable_gpio;
237};
238
Archit Tanejaa0d8dde2013-02-12 16:46:46 +0530239#endif /* __OMAP_PANEL_DATA_H */