da8xx-fb.h 1.9 KB

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