sh_mobile_lcdc.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __ASM_SH_MOBILE_LCDC_H__
  2. #define __ASM_SH_MOBILE_LCDC_H__
  3. #include <linux/fb.h>
  4. enum { RGB8, /* 24bpp, 8:8:8 */
  5. RGB9, /* 18bpp, 9:9 */
  6. RGB12A, /* 24bpp, 12:12 */
  7. RGB12B, /* 12bpp */
  8. RGB16, /* 16bpp */
  9. RGB18, /* 18bpp */
  10. RGB24, /* 24bpp */
  11. SYS8A, /* 24bpp, 8:8:8 */
  12. SYS8B, /* 18bpp, 8:8:2 */
  13. SYS8C, /* 18bpp, 2:8:8 */
  14. SYS8D, /* 16bpp, 8:8 */
  15. SYS9, /* 18bpp, 9:9 */
  16. SYS12, /* 24bpp, 12:12 */
  17. SYS16A, /* 16bpp */
  18. SYS16B, /* 18bpp, 16:2 */
  19. SYS16C, /* 18bpp, 2:16 */
  20. SYS18, /* 18bpp */
  21. SYS24 };/* 24bpp */
  22. enum { LCDC_CHAN_DISABLED = 0,
  23. LCDC_CHAN_MAINLCD,
  24. LCDC_CHAN_SUBLCD };
  25. enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
  26. struct sh_mobile_lcdc_sys_bus_cfg {
  27. unsigned long ldmt2r;
  28. unsigned long ldmt3r;
  29. };
  30. struct sh_mobile_lcdc_sys_bus_ops {
  31. void (*write_index)(void *handle, unsigned long data);
  32. void (*write_data)(void *handle, unsigned long data);
  33. unsigned long (*read_data)(void *handle);
  34. };
  35. struct sh_mobile_lcdc_board_cfg {
  36. void *board_data;
  37. int (*setup_sys)(void *board_data, void *sys_ops_handle,
  38. struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
  39. void (*display_on)(void *board_data);
  40. void (*display_off)(void *board_data);
  41. };
  42. struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */
  43. unsigned long width;
  44. unsigned long height;
  45. };
  46. struct sh_mobile_lcdc_chan_cfg {
  47. int chan;
  48. int bpp;
  49. int interface_type; /* selects RGBn or SYSn I/F, see above */
  50. int clock_divider;
  51. struct fb_videomode lcd_cfg;
  52. struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;
  53. struct sh_mobile_lcdc_board_cfg board_cfg;
  54. struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
  55. };
  56. struct sh_mobile_lcdc_info {
  57. unsigned long lddckr;
  58. int clock_source;
  59. struct sh_mobile_lcdc_chan_cfg ch[2];
  60. };
  61. #endif /* __ASM_SH_MOBILE_LCDC_H__ */