da8xx-fb.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Header file for TI DA8XX LCD controller platform data.
  3. *
  4. * Copyright (C) 2008-2009 MontaVista Software Inc.
  5. * Copyright (C) 2008-2009 Texas Instruments Inc
  6. *
  7. * This file is licensed under the terms of the GNU General Public License
  8. * version 2. This program is licensed "as is" without any warranty of any
  9. * kind, whether express or implied.
  10. */
  11. #ifndef DA8XX_FB_H
  12. #define DA8XX_FB_H
  13. enum panel_type {
  14. QVGA = 0
  15. };
  16. enum panel_shade {
  17. MONOCHROME = 0,
  18. COLOR_ACTIVE,
  19. COLOR_PASSIVE,
  20. };
  21. enum raster_load_mode {
  22. LOAD_DATA = 1,
  23. LOAD_PALETTE,
  24. };
  25. struct display_panel {
  26. enum panel_type panel_type; /* QVGA */
  27. int max_bpp;
  28. int min_bpp;
  29. enum panel_shade panel_shade;
  30. };
  31. struct da8xx_lcdc_platform_data {
  32. const char manu_name[10];
  33. void *controller_data;
  34. const char type[25];
  35. void (*panel_power_ctrl)(int);
  36. };
  37. struct lcd_ctrl_config {
  38. const struct display_panel *p_disp_panel;
  39. /* AC Bias Pin Frequency */
  40. int ac_bias;
  41. /* AC Bias Pin Transitions per Interrupt */
  42. int ac_bias_intrpt;
  43. /* DMA burst size */
  44. int dma_burst_sz;
  45. /* Bits per pixel */
  46. int bpp;
  47. /* FIFO DMA Request Delay */
  48. int fdd;
  49. /* TFT Alternative Signal Mapping (Only for active) */
  50. unsigned char tft_alt_mode;
  51. /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
  52. unsigned char stn_565_mode;
  53. /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
  54. unsigned char mono_8bit_mode;
  55. /* Invert line clock */
  56. unsigned char invert_line_clock;
  57. /* Invert frame clock */
  58. unsigned char invert_frm_clock;
  59. /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
  60. unsigned char sync_edge;
  61. /* Horizontal and Vertical Sync: Control: 0=ignore */
  62. unsigned char sync_ctrl;
  63. /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
  64. unsigned char raster_order;
  65. };
  66. struct lcd_sync_arg {
  67. int back_porch;
  68. int front_porch;
  69. int pulse_width;
  70. };
  71. /* ioctls */
  72. #define FBIOGET_CONTRAST _IOR('F', 1, int)
  73. #define FBIOPUT_CONTRAST _IOW('F', 2, int)
  74. #define FBIGET_BRIGHTNESS _IOR('F', 3, int)
  75. #define FBIPUT_BRIGHTNESS _IOW('F', 3, int)
  76. #define FBIGET_COLOR _IOR('F', 5, int)
  77. #define FBIPUT_COLOR _IOW('F', 6, int)
  78. #define FBIPUT_HSYNC _IOW('F', 9, int)
  79. #define FBIPUT_VSYNC _IOW('F', 10, int)
  80. #endif /* ifndef DA8XX_FB_H */