Archit Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 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 | |
Tomi Valkeinen | 04f0ff0 | 2013-05-24 14:21:56 +0300 | [diff] [blame^] | 30 | #include <video/display_timing.h> |
| 31 | |
Archit Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 32 | struct 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 Valkeinen | c3f80cb | 2013-02-12 14:59:17 +0530 | [diff] [blame] | 39 | * @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 Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 42 | */ |
| 43 | struct 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 Valkeinen | c3f80cb | 2013-02-12 14:59:17 +0530 | [diff] [blame] | 47 | |
| 48 | int num_gpios; |
| 49 | int gpios[10]; |
| 50 | bool gpio_invert[10]; |
Archit Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | /** |
| 54 | * struct panel_n8x0_data - N800 panel driver configuration data |
| 55 | */ |
| 56 | struct 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 Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 61 | }; |
| 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 | |
| 74 | struct 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 | */ |
| 94 | struct 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 | */ |
| 105 | struct tfp410_platform_data { |
| 106 | int i2c_bus_num; |
| 107 | int power_down_gpio; |
| 108 | }; |
| 109 | |
Tomi Valkeinen | c3f80cb | 2013-02-12 14:59:17 +0530 | [diff] [blame] | 110 | /** |
| 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 | */ |
| 118 | struct 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 | */ |
| 130 | struct 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 | */ |
| 139 | struct 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 | */ |
| 148 | struct panel_tpo_td043_data { |
| 149 | int nreset_gpio; |
| 150 | }; |
| 151 | |
Tomi Valkeinen | 2773fef | 2013-05-24 14:18:30 +0300 | [diff] [blame] | 152 | /** |
| 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 | */ |
| 158 | struct encoder_tfp410_platform_data { |
| 159 | const char *name; |
| 160 | const char *source; |
| 161 | int power_down_gpio; |
| 162 | int data_lines; |
| 163 | }; |
| 164 | |
Tomi Valkeinen | a0ee577 | 2013-05-24 14:20:14 +0300 | [diff] [blame] | 165 | /** |
| 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 | */ |
| 172 | struct 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 Valkeinen | 348077b | 2013-05-24 14:20:45 +0300 | [diff] [blame] | 181 | /** |
| 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 | */ |
| 187 | struct connector_dvi_platform_data { |
| 188 | const char *name; |
| 189 | const char *source; |
| 190 | int i2c_bus_num; |
| 191 | }; |
| 192 | |
Tomi Valkeinen | 3cb07ee | 2013-05-24 14:21:08 +0300 | [diff] [blame] | 193 | /** |
| 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 | */ |
| 198 | struct connector_hdmi_platform_data { |
| 199 | const char *name; |
| 200 | const char *source; |
| 201 | }; |
| 202 | |
Tomi Valkeinen | 61a7f24 | 2013-05-24 14:21:30 +0300 | [diff] [blame] | 203 | /** |
| 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 | */ |
| 210 | struct 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 Valkeinen | 04f0ff0 | 2013-05-24 14:21:56 +0300 | [diff] [blame^] | 218 | /** |
| 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 | */ |
| 227 | struct 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 Taneja | a0d8dde | 2013-02-12 16:46:46 +0530 | [diff] [blame] | 239 | #endif /* __OMAP_PANEL_DATA_H */ |