jz4740_fb.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * You should have received a copy of the GNU General Public License along
  10. * with this program; if not, write to the Free Software Foundation, Inc.,
  11. * 675 Mass Ave, Cambridge, MA 02139, USA.
  12. *
  13. */
  14. #ifndef __ASM_MACH_JZ4740_JZ4740_FB_H__
  15. #define __ASM_MACH_JZ4740_JZ4740_FB_H__
  16. #include <linux/fb.h>
  17. enum jz4740_fb_lcd_type {
  18. JZ_LCD_TYPE_GENERIC_16_BIT = 0,
  19. JZ_LCD_TYPE_GENERIC_18_BIT = 0 | (1 << 4),
  20. JZ_LCD_TYPE_SPECIAL_TFT_1 = 1,
  21. JZ_LCD_TYPE_SPECIAL_TFT_2 = 2,
  22. JZ_LCD_TYPE_SPECIAL_TFT_3 = 3,
  23. JZ_LCD_TYPE_NON_INTERLACED_CCIR656 = 5,
  24. JZ_LCD_TYPE_INTERLACED_CCIR656 = 7,
  25. JZ_LCD_TYPE_SINGLE_COLOR_STN = 8,
  26. JZ_LCD_TYPE_SINGLE_MONOCHROME_STN = 9,
  27. JZ_LCD_TYPE_DUAL_COLOR_STN = 10,
  28. JZ_LCD_TYPE_DUAL_MONOCHROME_STN = 11,
  29. JZ_LCD_TYPE_8BIT_SERIAL = 12,
  30. };
  31. #define JZ4740_FB_SPECIAL_TFT_CONFIG(start, stop) (((start) << 16) | (stop))
  32. /*
  33. * width: width of the lcd display in mm
  34. * height: height of the lcd display in mm
  35. * num_modes: size of modes
  36. * modes: list of valid video modes
  37. * bpp: bits per pixel for the lcd
  38. * lcd_type: lcd type
  39. */
  40. struct jz4740_fb_platform_data {
  41. unsigned int width;
  42. unsigned int height;
  43. size_t num_modes;
  44. struct fb_videomode *modes;
  45. unsigned int bpp;
  46. enum jz4740_fb_lcd_type lcd_type;
  47. struct {
  48. uint32_t spl;
  49. uint32_t cls;
  50. uint32_t ps;
  51. uint32_t rev;
  52. } special_tft_config;
  53. unsigned pixclk_falling_edge:1;
  54. unsigned date_enable_active_low:1;
  55. };
  56. #endif