da8xx-fb.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_shade {
  14. MONOCHROME = 0,
  15. COLOR_ACTIVE,
  16. COLOR_PASSIVE,
  17. };
  18. enum raster_load_mode {
  19. LOAD_DATA = 1,
  20. LOAD_PALETTE,
  21. };
  22. enum da8xx_frame_complete {
  23. DA8XX_FRAME_WAIT,
  24. DA8XX_FRAME_NOWAIT,
  25. };
  26. struct da8xx_lcdc_platform_data {
  27. const char manu_name[10];
  28. void *controller_data;
  29. const char type[25];
  30. void (*panel_power_ctrl)(int);
  31. };
  32. struct lcd_ctrl_config {
  33. enum panel_shade panel_shade;
  34. /* AC Bias Pin Frequency */
  35. int ac_bias;
  36. /* AC Bias Pin Transitions per Interrupt */
  37. int ac_bias_intrpt;
  38. /* DMA burst size */
  39. int dma_burst_sz;
  40. /* Bits per pixel */
  41. int bpp;
  42. /* FIFO DMA Request Delay */
  43. int fdd;
  44. /* TFT Alternative Signal Mapping (Only for active) */
  45. unsigned char tft_alt_mode;
  46. /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
  47. unsigned char stn_565_mode;
  48. /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
  49. unsigned char mono_8bit_mode;
  50. /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
  51. unsigned char sync_edge;
  52. /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
  53. unsigned char raster_order;
  54. /* DMA FIFO threshold */
  55. int fifo_th;
  56. };
  57. struct lcd_sync_arg {
  58. int back_porch;
  59. int front_porch;
  60. int pulse_width;
  61. };
  62. /* ioctls */
  63. #define FBIOGET_CONTRAST _IOR('F', 1, int)
  64. #define FBIOPUT_CONTRAST _IOW('F', 2, int)
  65. #define FBIGET_BRIGHTNESS _IOR('F', 3, int)
  66. #define FBIPUT_BRIGHTNESS _IOW('F', 3, int)
  67. #define FBIGET_COLOR _IOR('F', 5, int)
  68. #define FBIPUT_COLOR _IOW('F', 6, int)
  69. #define FBIPUT_HSYNC _IOW('F', 9, int)
  70. #define FBIPUT_VSYNC _IOW('F', 10, int)
  71. /* Proprietary FB_SYNC_ flags */
  72. #define FB_SYNC_CLK_INVERT 0x40000000
  73. #endif /* ifndef DA8XX_FB_H */