omap-panel-data.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. #ifndef __OMAP_PANEL_DATA_H
  27. #define __OMAP_PANEL_DATA_H
  28. #include <video/omapdss.h>
  29. #include <video/display_timing.h>
  30. struct omap_dss_device;
  31. /**
  32. * struct panel_generic_dpi_data - panel driver configuration data
  33. * @name: panel name
  34. * @platform_enable: platform specific panel enable function
  35. * @platform_disable: platform specific panel disable function
  36. * @num_gpios: number of gpios connected to panel
  37. * @gpios: gpio numbers on the platform
  38. * @gpio_invert: configure gpio as active high or low
  39. */
  40. struct panel_generic_dpi_data {
  41. const char *name;
  42. int (*platform_enable)(struct omap_dss_device *dssdev);
  43. void (*platform_disable)(struct omap_dss_device *dssdev);
  44. int num_gpios;
  45. int gpios[10];
  46. bool gpio_invert[10];
  47. };
  48. /**
  49. * struct panel_n8x0_data - N800 panel driver configuration data
  50. */
  51. struct panel_n8x0_data {
  52. int (*platform_enable)(struct omap_dss_device *dssdev);
  53. void (*platform_disable)(struct omap_dss_device *dssdev);
  54. int panel_reset;
  55. int ctrl_pwrdown;
  56. };
  57. /**
  58. * struct nokia_dsi_panel_data - Nokia DSI panel driver configuration data
  59. * @name: panel name
  60. * @use_ext_te: use external TE
  61. * @ext_te_gpio: external TE GPIO
  62. * @esd_interval: interval of ESD checks, 0 = disabled (ms)
  63. * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
  64. * @use_dsi_backlight: true if panel uses DSI command to control backlight
  65. * @pin_config: DSI pin configuration
  66. */
  67. struct nokia_dsi_panel_data {
  68. const char *name;
  69. int reset_gpio;
  70. bool use_ext_te;
  71. int ext_te_gpio;
  72. unsigned esd_interval;
  73. unsigned ulps_timeout;
  74. bool use_dsi_backlight;
  75. struct omap_dsi_pin_config pin_config;
  76. };
  77. /**
  78. * struct picodlp_panel_data - picodlp panel driver configuration data
  79. * @picodlp_adapter_id: i2c_adapter number for picodlp
  80. */
  81. struct picodlp_panel_data {
  82. int picodlp_adapter_id;
  83. int emu_done_gpio;
  84. int pwrgood_gpio;
  85. };
  86. /**
  87. * struct tfp410_platform_data - tfp410 panel driver configuration data
  88. * @i2c_bus_num: i2c bus id for the panel
  89. * @power_down_gpio: gpio number for PD pin (or -1 if not available)
  90. */
  91. struct tfp410_platform_data {
  92. int i2c_bus_num;
  93. int power_down_gpio;
  94. };
  95. /**
  96. * sharp ls panel driver configuration data
  97. * @resb_gpio: reset signal
  98. * @ini_gpio: power on control
  99. * @mo_gpio: selection for resolution(VGA/QVGA)
  100. * @lr_gpio: selection for horizontal scanning direction
  101. * @ud_gpio: selection for vertical scanning direction
  102. */
  103. struct panel_sharp_ls037v7dw01_data {
  104. int resb_gpio;
  105. int ini_gpio;
  106. int mo_gpio;
  107. int lr_gpio;
  108. int ud_gpio;
  109. };
  110. /**
  111. * acx565akm panel driver configuration data
  112. * @reset_gpio: reset signal
  113. */
  114. struct panel_acx565akm_data {
  115. int reset_gpio;
  116. };
  117. /**
  118. * nec nl8048 panel driver configuration data
  119. * @res_gpio: reset signal
  120. * @qvga_gpio: selection for resolution(QVGA/WVGA)
  121. */
  122. struct panel_nec_nl8048_data {
  123. int res_gpio;
  124. int qvga_gpio;
  125. };
  126. /**
  127. * tpo td043 panel driver configuration data
  128. * @nreset_gpio: reset signal
  129. */
  130. struct panel_tpo_td043_data {
  131. int nreset_gpio;
  132. };
  133. /**
  134. * encoder_tfp410 platform data
  135. * @name: name for this display entity
  136. * @power_down_gpio: gpio number for PD pin (or -1 if not available)
  137. * @data_lines: number of DPI datalines
  138. */
  139. struct encoder_tfp410_platform_data {
  140. const char *name;
  141. const char *source;
  142. int power_down_gpio;
  143. int data_lines;
  144. };
  145. /**
  146. * encoder_tpd12s015 platform data
  147. * @name: name for this display entity
  148. * @ct_cp_hpd_gpio: CT_CP_HPD gpio number
  149. * @ls_oe_gpio: LS_OE gpio number
  150. * @hpd_gpio: HPD gpio number
  151. */
  152. struct encoder_tpd12s015_platform_data {
  153. const char *name;
  154. const char *source;
  155. int ct_cp_hpd_gpio;
  156. int ls_oe_gpio;
  157. int hpd_gpio;
  158. };
  159. /**
  160. * connector_dvi platform data
  161. * @name: name for this display entity
  162. * @source: name of the display entity used as a video source
  163. * @i2c_bus_num: i2c bus number to be used for reading EDID
  164. */
  165. struct connector_dvi_platform_data {
  166. const char *name;
  167. const char *source;
  168. int i2c_bus_num;
  169. };
  170. /**
  171. * connector_hdmi platform data
  172. * @name: name for this display entity
  173. * @source: name of the display entity used as a video source
  174. */
  175. struct connector_hdmi_platform_data {
  176. const char *name;
  177. const char *source;
  178. };
  179. /**
  180. * connector_atv platform data
  181. * @name: name for this display entity
  182. * @source: name of the display entity used as a video source
  183. * @connector_type: composite/svideo
  184. * @invert_polarity: invert signal polarity
  185. */
  186. struct connector_atv_platform_data {
  187. const char *name;
  188. const char *source;
  189. enum omap_dss_venc_type connector_type;
  190. bool invert_polarity;
  191. };
  192. /**
  193. * panel_dpi platform data
  194. * @name: name for this display entity
  195. * @source: name of the display entity used as a video source
  196. * @data_lines: number of DPI datalines
  197. * @display_timing: timings for this panel
  198. * @backlight_gpio: gpio to enable/disable the backlight (or -1)
  199. * @enable_gpio: gpio to enable/disable the panel (or -1)
  200. */
  201. struct panel_dpi_platform_data {
  202. const char *name;
  203. const char *source;
  204. int data_lines;
  205. const struct display_timing *display_timing;
  206. int backlight_gpio;
  207. int enable_gpio;
  208. };
  209. /**
  210. * panel_dsicm platform data
  211. * @name: name for this display entity
  212. * @source: name of the display entity used as a video source
  213. * @reset_gpio: gpio to reset the panel (or -1)
  214. * @use_ext_te: use external TE GPIO
  215. * @ext_te_gpio: external TE GPIO
  216. * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
  217. * @use_dsi_backlight: true if panel uses DSI command to control backlight
  218. * @pin_config: DSI pin configuration
  219. */
  220. struct panel_dsicm_platform_data {
  221. const char *name;
  222. const char *source;
  223. int reset_gpio;
  224. bool use_ext_te;
  225. int ext_te_gpio;
  226. unsigned ulps_timeout;
  227. bool use_dsi_backlight;
  228. struct omap_dsi_pin_config pin_config;
  229. };
  230. /**
  231. * panel_acx565akm platform data
  232. * @name: name for this display entity
  233. * @source: name of the display entity used as a video source
  234. * @reset_gpio: gpio to reset the panel (or -1)
  235. * @datapairs: number of SDI datapairs
  236. */
  237. struct panel_acx565akm_platform_data {
  238. const char *name;
  239. const char *source;
  240. int reset_gpio;
  241. int datapairs;
  242. };
  243. /**
  244. * panel_lb035q02 platform data
  245. * @name: name for this display entity
  246. * @source: name of the display entity used as a video source
  247. * @data_lines: number of DPI datalines
  248. * @backlight_gpio: gpio to enable/disable the backlight (or -1)
  249. * @enable_gpio: gpio to enable/disable the panel (or -1)
  250. */
  251. struct panel_lb035q02_platform_data {
  252. const char *name;
  253. const char *source;
  254. int data_lines;
  255. int backlight_gpio;
  256. int enable_gpio;
  257. };
  258. /**
  259. * panel_sharp_ls037v7dw01 platform data
  260. * @name: name for this display entity
  261. * @source: name of the display entity used as a video source
  262. * @data_lines: number of DPI datalines
  263. * @resb_gpio: reset signal GPIO
  264. * @ini_gpio: power on control GPIO
  265. * @mo_gpio: selection for resolution(VGA/QVGA) GPIO
  266. * @lr_gpio: selection for horizontal scanning direction GPIO
  267. * @ud_gpio: selection for vertical scanning direction GPIO
  268. */
  269. struct panel_sharp_ls037v7dw01_platform_data {
  270. const char *name;
  271. const char *source;
  272. int data_lines;
  273. int resb_gpio;
  274. int ini_gpio;
  275. int mo_gpio;
  276. int lr_gpio;
  277. int ud_gpio;
  278. };
  279. /**
  280. * panel-tpo-td043mtea1 platform data
  281. * @name: name for this display entity
  282. * @source: name of the display entity used as a video source
  283. * @data_lines: number of DPI datalines
  284. * @nreset_gpio: reset signal
  285. */
  286. struct panel_tpo_td043mtea1_platform_data {
  287. const char *name;
  288. const char *source;
  289. int data_lines;
  290. int nreset_gpio;
  291. };
  292. /**
  293. * panel-nec-nl8048hl11 platform data
  294. * @name: name for this display entity
  295. * @source: name of the display entity used as a video source
  296. * @data_lines: number of DPI datalines
  297. * @res_gpio: reset signal
  298. * @qvga_gpio: selection for resolution(QVGA/WVGA)
  299. */
  300. struct panel_nec_nl8048hl11_platform_data {
  301. const char *name;
  302. const char *source;
  303. int data_lines;
  304. int res_gpio;
  305. int qvga_gpio;
  306. };
  307. #endif /* __OMAP_PANEL_DATA_H */