omap-panel-data.h 5.8 KB

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