sed13806.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * (C) Copyright 2002
  3. * Stäubli Faverges - <www.staubli.com>
  4. * Pierre AUBERT p.aubert@staubli.com
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. /* Video support for Epson SED13806 chipset */
  9. #ifndef _SED13806_H_
  10. #define _SED13806_H_
  11. /* General definitions */
  12. #define FRAME_BUFFER_OFFSET 0x200000 /* Frame buffer offset */
  13. #define TOTAL_SPACE_SIZE 0x400000
  14. #define DEFAULT_VIDEO_MEMORY_SIZE 0x140000 /* Video Memory Size */
  15. #define HWCURSORSIZE 1024 /* Size of memory reserved
  16. for HW cursor*/
  17. /* Offset of chipset registers */
  18. #define BLT_CTRL0 (0x0100)
  19. #define BLT_CTRL1 (0x0101)
  20. #define BLT_ROP (0x0102)
  21. #define BLT_OP (0x0103)
  22. #define BLT_SRC_ADDR0 (0x0104)
  23. #define BLT_SRC_ADDR1 (0x0105)
  24. #define BLT_SRC_ADDR2 (0x0106)
  25. #define BLT_DST_ADDR0 (0x0108)
  26. #define BLT_DST_ADDR1 (0x0109)
  27. #define BLT_DST_ADDR2 (0x010A)
  28. #define BLT_MEM_OFF0 (0x010C)
  29. #define BLT_MEM_OFF1 (0x010D)
  30. #define BLT_WIDTH0 (0x0110)
  31. #define BLT_WIDTH1 (0x0111)
  32. #define BLT_HEIGHT0 (0x0112)
  33. #define BLT_HEIGHT1 (0x0113)
  34. #define BLT_BGCOLOR0 (0x0114)
  35. #define BLT_BGCOLOR1 (0x0115)
  36. #define BLT_FGCOLOR0 (0x0118)
  37. #define BLT_FGCOLOR1 (0x0119)
  38. #define BLT_REG (0x100000)
  39. /* Lookup table registers */
  40. #define REG_LUT_ADDR 0x1e2
  41. #define REG_LUT_DATA 0x1e4
  42. /* Cursor/Ink registers */
  43. #define LCD_CURSOR_CNTL (0x0070)
  44. #define LCD_CURSOR_START (0x0071)
  45. #define LCD_CURSOR_XL (0x0072)
  46. #define LCD_CURSOR_XM (0x0073)
  47. #define LCD_CURSOR_YL (0x0074)
  48. #define LCD_CURSOR_YM (0x0075)
  49. #define LCD_CURSOR_COL0_B (0x0076)
  50. #define LCD_CURSOR_COL0_G (0x0077)
  51. #define LCD_CURSOR_COL0_R (0x0078)
  52. #define LCD_CURSOR_COL1_B (0x007A)
  53. #define LCD_CURSOR_COL1_G (0x007B)
  54. #define LCD_CURSOR_COL1_R (0x007C)
  55. #define LCD_CURSOR_FIFO (0x007E)
  56. typedef struct
  57. {
  58. unsigned short Index;
  59. unsigned char Value;
  60. } S1D_REGS;
  61. /* Board specific functions */
  62. unsigned int board_video_init (void);
  63. void board_validate_screen (unsigned int base);
  64. const S1D_REGS *board_get_regs (void);
  65. int board_get_width (void);
  66. int board_get_height (void);
  67. #endif /* _SED13806_H_ */