da8xx-fb.h 2.0 KB

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