regs-ldm.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. /*
  2. * arch/arm/mach-w90x900/include/mach/regs-serial.h
  3. *
  4. * Copyright (c) 2009 Nuvoton technology corporation
  5. * All rights reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * Description:
  13. * Nuvoton Display, LCM Register list
  14. * Author: Wang Qiang (rurality.linux@gmail.com) 2009/12/11
  15. *
  16. */
  17. #ifndef __ASM_ARM_W90X900_REGS_LDM_H
  18. #define __ASM_ARM_W90X900_REGS_LDM_H
  19. #include <mach/map.h>
  20. /* Display Controller Control/Status Register */
  21. #define REG_LCM_DCCS (0x00)
  22. #define LCM_DCCS_ENG_RST (1 << 0)
  23. #define LCM_DCCS_VA_EN (1 << 1)
  24. #define LCM_DCCS_OSD_EN (1 << 2)
  25. #define LCM_DCCS_DISP_OUT_EN (1 << 3)
  26. #define LCM_DCCS_DISP_INT_EN (1 << 4)
  27. #define LCM_DCCS_CMD_ON (1 << 5)
  28. #define LCM_DCCS_FIELD_INTR (1 << 6)
  29. #define LCM_DCCS_SINGLE (1 << 7)
  30. enum LCM_DCCS_VA_SRC {
  31. LCM_DCCS_VA_SRC_YUV422 = (0 << 8),
  32. LCM_DCCS_VA_SRC_YCBCR422 = (1 << 8),
  33. LCM_DCCS_VA_SRC_RGB888 = (2 << 8),
  34. LCM_DCCS_VA_SRC_RGB666 = (3 << 8),
  35. LCM_DCCS_VA_SRC_RGB565 = (4 << 8),
  36. LCM_DCCS_VA_SRC_RGB444LOW = (5 << 8),
  37. LCM_DCCS_VA_SRC_RGB444HIGH = (7 << 8)
  38. };
  39. /* Display Device Control Register */
  40. #define REG_LCM_DEV_CTRL (0x04)
  41. enum LCM_DEV_CTRL_SWAP_YCbCr {
  42. LCM_DEV_CTRL_SWAP_UYVY = (0 << 1),
  43. LCM_DEV_CTRL_SWAP_YUYV = (1 << 1),
  44. LCM_DEV_CTRL_SWAP_VYUY = (2 << 1),
  45. LCM_DEV_CTRL_SWAP_YVYU = (3 << 1)
  46. };
  47. enum LCM_DEV_CTRL_RGB_SHIFT {
  48. LCM_DEV_CTRL_RGB_SHIFT_NOT = (0 << 3),
  49. LCM_DEV_CTRL_RGB_SHIFT_ONECYCLE = (1 << 3),
  50. LCM_DEV_CTRL_RGB_SHIFT_TWOCYCLE = (2 << 3),
  51. LCM_DEV_CTRL_RGB_SHIFT_NOT_DEF = (3 << 3)
  52. };
  53. enum LCM_DEV_CTRL_DEVICE {
  54. LCM_DEV_CTRL_DEVICE_YUV422 = (0 << 5),
  55. LCM_DEV_CTRL_DEVICE_YUV444 = (1 << 5),
  56. LCM_DEV_CTRL_DEVICE_UNIPAC = (4 << 5),
  57. LCM_DEV_CTRL_DEVICE_SEIKO_EPSON = (5 << 5),
  58. LCM_DEV_CTRL_DEVICE_HIGH_COLOR = (6 << 5),
  59. LCM_DEV_CTRL_DEVICE_MPU = (7 << 5)
  60. };
  61. #define LCM_DEV_CTRL_LCD_DDA (8)
  62. #define LCM_DEV_CTRL_YUV2CCIR (16)
  63. enum LCM_DEV_CTRL_LCD_SEL {
  64. LCM_DEV_CTRL_LCD_SEL_RGB_GBR = (0 << 17),
  65. LCM_DEV_CTRL_LCD_SEL_BGR_RBG = (1 << 17),
  66. LCM_DEV_CTRL_LCD_SEL_GBR_RGB = (2 << 17),
  67. LCM_DEV_CTRL_LCD_SEL_RBG_BGR = (3 << 17)
  68. };
  69. enum LCM_DEV_CTRL_FAL_D {
  70. LCM_DEV_CTRL_FAL_D_FALLING = (0 << 19),
  71. LCM_DEV_CTRL_FAL_D_RISING = (1 << 19),
  72. };
  73. enum LCM_DEV_CTRL_H_POL {
  74. LCM_DEV_CTRL_H_POL_LOW = (0 << 20),
  75. LCM_DEV_CTRL_H_POL_HIGH = (1 << 20),
  76. };
  77. enum LCM_DEV_CTRL_V_POL {
  78. LCM_DEV_CTRL_V_POL_LOW = (0 << 21),
  79. LCM_DEV_CTRL_V_POL_HIGH = (1 << 21),
  80. };
  81. enum LCM_DEV_CTRL_VR_LACE {
  82. LCM_DEV_CTRL_VR_LACE_NINTERLACE = (0 << 22),
  83. LCM_DEV_CTRL_VR_LACE_INTERLACE = (1 << 22),
  84. };
  85. enum LCM_DEV_CTRL_LACE {
  86. LCM_DEV_CTRL_LACE_NINTERLACE = (0 << 23),
  87. LCM_DEV_CTRL_LACE_INTERLACE = (1 << 23),
  88. };
  89. enum LCM_DEV_CTRL_RGB_SCALE {
  90. LCM_DEV_CTRL_RGB_SCALE_4096 = (0 << 24),
  91. LCM_DEV_CTRL_RGB_SCALE_65536 = (1 << 24),
  92. LCM_DEV_CTRL_RGB_SCALE_262144 = (2 << 24),
  93. LCM_DEV_CTRL_RGB_SCALE_16777216 = (3 << 24),
  94. };
  95. enum LCM_DEV_CTRL_DBWORD {
  96. LCM_DEV_CTRL_DBWORD_HALFWORD = (0 << 26),
  97. LCM_DEV_CTRL_DBWORD_FULLWORD = (1 << 26),
  98. };
  99. enum LCM_DEV_CTRL_MPU68 {
  100. LCM_DEV_CTRL_MPU68_80_SERIES = (0 << 27),
  101. LCM_DEV_CTRL_MPU68_68_SERIES = (1 << 27),
  102. };
  103. enum LCM_DEV_CTRL_DE_POL {
  104. LCM_DEV_CTRL_DE_POL_HIGH = (0 << 28),
  105. LCM_DEV_CTRL_DE_POL_LOW = (1 << 28),
  106. };
  107. #define LCM_DEV_CTRL_CMD16 (29)
  108. #define LCM_DEV_CTRL_CM16t18 (30)
  109. #define LCM_DEV_CTRL_CMD_LOW (31)
  110. /* MPU-Interface LCD Write Command */
  111. #define REG_LCM_MPU_CMD (0x08)
  112. /* Interrupt Control/Status Register */
  113. #define REG_LCM_INT_CS (0x0c)
  114. #define LCM_INT_CS_DISP_F_EN (1 << 0)
  115. #define LCM_INT_CS_UNDERRUN_EN (1 << 1)
  116. #define LCM_INT_CS_BUS_ERROR_INT (1 << 28)
  117. #define LCM_INT_CS_UNDERRUN_INT (1 << 29)
  118. #define LCM_INT_CS_DISP_F_STATUS (1 << 30)
  119. #define LCM_INT_CS_DISP_F_INT (1 << 31)
  120. /* CRTC Display Size Control Register */
  121. #define REG_LCM_CRTC_SIZE (0x10)
  122. #define LCM_CRTC_SIZE_VTTVAL(x) ((x) << 16)
  123. #define LCM_CRTC_SIZE_HTTVAL(x) ((x) << 0)
  124. /* CRTC Display Enable End */
  125. #define REG_LCM_CRTC_DEND (0x14)
  126. #define LCM_CRTC_DEND_VDENDVAL(x) ((x) << 16)
  127. #define LCM_CRTC_DEND_HDENDVAL(x) ((x) << 0)
  128. /* CRTC Internal Horizontal Retrace Control Register */
  129. #define REG_LCM_CRTC_HR (0x18)
  130. #define LCM_CRTC_HR_EVAL(x) ((x) << 16)
  131. #define LCM_CRTC_HR_SVAL(x) ((x) << 0)
  132. /* CRTC Horizontal Sync Control Register */
  133. #define REG_LCM_CRTC_HSYNC (0x1C)
  134. #define LCM_CRTC_HSYNC_SHIFTVAL(x) ((x) << 30)
  135. #define LCM_CRTC_HSYNC_EVAL(x) ((x) << 16)
  136. #define LCM_CRTC_HSYNC_SVAL(x) ((x) << 0)
  137. /* CRTC Internal Vertical Retrace Control Register */
  138. #define REG_LCM_CRTC_VR (0x20)
  139. #define LCM_CRTC_VR_EVAL(x) ((x) << 16)
  140. #define LCM_CRTC_VR_SVAL(x) ((x) << 0)
  141. /* Video Stream Frame Buffer-0 Starting Address */
  142. #define REG_LCM_VA_BADDR0 (0x24)
  143. /* Video Stream Frame Buffer-1 Starting Address */
  144. #define REG_LCM_VA_BADDR1 (0x28)
  145. /* Video Stream Frame Buffer Control Register */
  146. #define REG_LCM_VA_FBCTRL (0x2C)
  147. #define LCM_VA_FBCTRL_IO_REGION_HALF (1 << 28)
  148. #define LCM_VA_FBCTRL_FIELD_DUAL (1 << 29)
  149. #define LCM_VA_FBCTRL_START_BUF (1 << 30)
  150. #define LCM_VA_FBCTRL_DB_EN (1 << 31)
  151. /* Video Stream Scaling Control Register */
  152. #define REG_LCM_VA_SCALE (0x30)
  153. #define LCM_VA_SCALE_XCOPY_INTERPOLATION (0 << 15)
  154. #define LCM_VA_SCALE_XCOPY_DUPLICATION (1 << 15)
  155. /* Image Stream Active Window Coordinates */
  156. #define REG_LCM_VA_WIN (0x38)
  157. /* Image Stream Stuff Pixel */
  158. #define REG_LCM_VA_STUFF (0x3C)
  159. /* OSD Window Starting Coordinates */
  160. #define REG_LCM_OSD_WINS (0x40)
  161. /* OSD Window Ending Coordinates */
  162. #define REG_LCM_OSD_WINE (0x44)
  163. /* OSD Stream Frame Buffer Starting Address */
  164. #define REG_LCM_OSD_BADDR (0x48)
  165. /* OSD Stream Frame Buffer Control Register */
  166. #define REG_LCM_OSD_FBCTRL (0x4c)
  167. /* OSD Overlay Control Register */
  168. #define REG_LCM_OSD_OVERLAY (0x50)
  169. /* OSD Overlay Color-Key Pattern Register */
  170. #define REG_LCM_OSD_CKEY (0x54)
  171. /* OSD Overlay Color-Key Mask Register */
  172. #define REG_LCM_OSD_CMASK (0x58)
  173. /* OSD Window Skip1 Register */
  174. #define REG_LCM_OSD_SKIP1 (0x5C)
  175. /* OSD Window Skip2 Register */
  176. #define REG_LCM_OSD_SKIP2 (0x60)
  177. /* OSD horizontal up scaling control register */
  178. #define REG_LCM_OSD_SCALE (0x64)
  179. /* MPU Vsync control register */
  180. #define REG_LCM_MPU_VSYNC (0x68)
  181. /* Hardware cursor control Register */
  182. #define REG_LCM_HC_CTRL (0x6C)
  183. /* Hardware cursot tip point potison on va picture */
  184. #define REG_LCM_HC_POS (0x70)
  185. /* Hardware Cursor Window Buffer Control Register */
  186. #define REG_LCM_HC_WBCTRL (0x74)
  187. /* Hardware cursor memory base address register */
  188. #define REG_LCM_HC_BADDR (0x78)
  189. /* Hardware cursor color ram register mapped to bpp = 0 */
  190. #define REG_LCM_HC_COLOR0 (0x7C)
  191. /* Hardware cursor color ram register mapped to bpp = 1 */
  192. #define REG_LCM_HC_COLOR1 (0x80)
  193. /* Hardware cursor color ram register mapped to bpp = 2 */
  194. #define REG_LCM_HC_COLOR2 (0x84)
  195. /* Hardware cursor color ram register mapped to bpp = 3 */
  196. #define REG_LCM_HC_COLOR3 (0x88)
  197. #endif /* __ASM_ARM_W90X900_REGS_LDM_H */