vpbe_osd_regs.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. /*
  2. * Copyright (C) 2006-2010 Texas Instruments Inc
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef _VPBE_OSD_REGS_H
  18. #define _VPBE_OSD_REGS_H
  19. /* VPBE Global Registers */
  20. #define VPBE_PID 0x0
  21. #define VPBE_PCR 0x4
  22. /* VPSS CLock Registers */
  23. #define VPSSCLK_PID 0x00
  24. #define VPSSCLK_CLKCTRL 0x04
  25. /* VPSS Buffer Logic Registers */
  26. #define VPSSBL_PID 0x00
  27. #define VPSSBL_PCR 0x04
  28. #define VPSSBL_BCR 0x08
  29. #define VPSSBL_INTSTAT 0x0C
  30. #define VPSSBL_INTSEL 0x10
  31. #define VPSSBL_EVTSEL 0x14
  32. #define VPSSBL_MEMCTRL 0x18
  33. #define VPSSBL_CCDCMUX 0x1C
  34. /* DM365 ISP5 system configuration */
  35. #define ISP5_PID 0x0
  36. #define ISP5_PCCR 0x4
  37. #define ISP5_BCR 0x8
  38. #define ISP5_INTSTAT 0xC
  39. #define ISP5_INTSEL1 0x10
  40. #define ISP5_INTSEL2 0x14
  41. #define ISP5_INTSEL3 0x18
  42. #define ISP5_EVTSEL 0x1c
  43. #define ISP5_CCDCMUX 0x20
  44. /* VPBE On-Screen Display Subsystem Registers (OSD) */
  45. #define OSD_MODE 0x00
  46. #define OSD_VIDWINMD 0x04
  47. #define OSD_OSDWIN0MD 0x08
  48. #define OSD_OSDWIN1MD 0x0C
  49. #define OSD_OSDATRMD 0x0C
  50. #define OSD_RECTCUR 0x10
  51. #define OSD_VIDWIN0OFST 0x18
  52. #define OSD_VIDWIN1OFST 0x1C
  53. #define OSD_OSDWIN0OFST 0x20
  54. #define OSD_OSDWIN1OFST 0x24
  55. #define OSD_VIDWINADH 0x28
  56. #define OSD_VIDWIN0ADL 0x2C
  57. #define OSD_VIDWIN0ADR 0x2C
  58. #define OSD_VIDWIN1ADL 0x30
  59. #define OSD_VIDWIN1ADR 0x30
  60. #define OSD_OSDWINADH 0x34
  61. #define OSD_OSDWIN0ADL 0x38
  62. #define OSD_OSDWIN0ADR 0x38
  63. #define OSD_OSDWIN1ADL 0x3C
  64. #define OSD_OSDWIN1ADR 0x3C
  65. #define OSD_BASEPX 0x40
  66. #define OSD_BASEPY 0x44
  67. #define OSD_VIDWIN0XP 0x48
  68. #define OSD_VIDWIN0YP 0x4C
  69. #define OSD_VIDWIN0XL 0x50
  70. #define OSD_VIDWIN0YL 0x54
  71. #define OSD_VIDWIN1XP 0x58
  72. #define OSD_VIDWIN1YP 0x5C
  73. #define OSD_VIDWIN1XL 0x60
  74. #define OSD_VIDWIN1YL 0x64
  75. #define OSD_OSDWIN0XP 0x68
  76. #define OSD_OSDWIN0YP 0x6C
  77. #define OSD_OSDWIN0XL 0x70
  78. #define OSD_OSDWIN0YL 0x74
  79. #define OSD_OSDWIN1XP 0x78
  80. #define OSD_OSDWIN1YP 0x7C
  81. #define OSD_OSDWIN1XL 0x80
  82. #define OSD_OSDWIN1YL 0x84
  83. #define OSD_CURXP 0x88
  84. #define OSD_CURYP 0x8C
  85. #define OSD_CURXL 0x90
  86. #define OSD_CURYL 0x94
  87. #define OSD_W0BMP01 0xA0
  88. #define OSD_W0BMP23 0xA4
  89. #define OSD_W0BMP45 0xA8
  90. #define OSD_W0BMP67 0xAC
  91. #define OSD_W0BMP89 0xB0
  92. #define OSD_W0BMPAB 0xB4
  93. #define OSD_W0BMPCD 0xB8
  94. #define OSD_W0BMPEF 0xBC
  95. #define OSD_W1BMP01 0xC0
  96. #define OSD_W1BMP23 0xC4
  97. #define OSD_W1BMP45 0xC8
  98. #define OSD_W1BMP67 0xCC
  99. #define OSD_W1BMP89 0xD0
  100. #define OSD_W1BMPAB 0xD4
  101. #define OSD_W1BMPCD 0xD8
  102. #define OSD_W1BMPEF 0xDC
  103. #define OSD_VBNDRY 0xE0
  104. #define OSD_EXTMODE 0xE4
  105. #define OSD_MISCCTL 0xE8
  106. #define OSD_CLUTRAMYCB 0xEC
  107. #define OSD_CLUTRAMCR 0xF0
  108. #define OSD_TRANSPVAL 0xF4
  109. #define OSD_TRANSPVALL 0xF4
  110. #define OSD_TRANSPVALU 0xF8
  111. #define OSD_TRANSPBMPIDX 0xFC
  112. #define OSD_PPVWIN0ADR 0xFC
  113. /* bit definitions */
  114. #define VPBE_PCR_VENC_DIV (1 << 1)
  115. #define VPBE_PCR_CLK_OFF (1 << 0)
  116. #define VPSSBL_INTSTAT_HSSIINT (1 << 14)
  117. #define VPSSBL_INTSTAT_CFALDINT (1 << 13)
  118. #define VPSSBL_INTSTAT_IPIPE_INT5 (1 << 12)
  119. #define VPSSBL_INTSTAT_IPIPE_INT4 (1 << 11)
  120. #define VPSSBL_INTSTAT_IPIPE_INT3 (1 << 10)
  121. #define VPSSBL_INTSTAT_IPIPE_INT2 (1 << 9)
  122. #define VPSSBL_INTSTAT_IPIPE_INT1 (1 << 8)
  123. #define VPSSBL_INTSTAT_IPIPE_INT0 (1 << 7)
  124. #define VPSSBL_INTSTAT_IPIPEIFINT (1 << 6)
  125. #define VPSSBL_INTSTAT_OSDINT (1 << 5)
  126. #define VPSSBL_INTSTAT_VENCINT (1 << 4)
  127. #define VPSSBL_INTSTAT_H3AINT (1 << 3)
  128. #define VPSSBL_INTSTAT_CCDC_VDINT2 (1 << 2)
  129. #define VPSSBL_INTSTAT_CCDC_VDINT1 (1 << 1)
  130. #define VPSSBL_INTSTAT_CCDC_VDINT0 (1 << 0)
  131. /* DM365 ISP5 bit definitions */
  132. #define ISP5_INTSTAT_VENCINT (1 << 21)
  133. #define ISP5_INTSTAT_OSDINT (1 << 20)
  134. /* VMOD TVTYP options for HDMD=0 */
  135. #define SDTV_NTSC 0
  136. #define SDTV_PAL 1
  137. /* VMOD TVTYP options for HDMD=1 */
  138. #define HDTV_525P 0
  139. #define HDTV_625P 1
  140. #define HDTV_1080I 2
  141. #define HDTV_720P 3
  142. #define OSD_MODE_CS (1 << 15)
  143. #define OSD_MODE_OVRSZ (1 << 14)
  144. #define OSD_MODE_OHRSZ (1 << 13)
  145. #define OSD_MODE_EF (1 << 12)
  146. #define OSD_MODE_VVRSZ (1 << 11)
  147. #define OSD_MODE_VHRSZ (1 << 10)
  148. #define OSD_MODE_FSINV (1 << 9)
  149. #define OSD_MODE_BCLUT (1 << 8)
  150. #define OSD_MODE_CABG_SHIFT 0
  151. #define OSD_MODE_CABG (0xff << 0)
  152. #define OSD_VIDWINMD_VFINV (1 << 15)
  153. #define OSD_VIDWINMD_V1EFC (1 << 14)
  154. #define OSD_VIDWINMD_VHZ1_SHIFT 12
  155. #define OSD_VIDWINMD_VHZ1 (3 << 12)
  156. #define OSD_VIDWINMD_VVZ1_SHIFT 10
  157. #define OSD_VIDWINMD_VVZ1 (3 << 10)
  158. #define OSD_VIDWINMD_VFF1 (1 << 9)
  159. #define OSD_VIDWINMD_ACT1 (1 << 8)
  160. #define OSD_VIDWINMD_V0EFC (1 << 6)
  161. #define OSD_VIDWINMD_VHZ0_SHIFT 4
  162. #define OSD_VIDWINMD_VHZ0 (3 << 4)
  163. #define OSD_VIDWINMD_VVZ0_SHIFT 2
  164. #define OSD_VIDWINMD_VVZ0 (3 << 2)
  165. #define OSD_VIDWINMD_VFF0 (1 << 1)
  166. #define OSD_VIDWINMD_ACT0 (1 << 0)
  167. #define OSD_OSDWIN0MD_ATN0E (1 << 14)
  168. #define OSD_OSDWIN0MD_RGB0E (1 << 13)
  169. #define OSD_OSDWIN0MD_BMP0MD_SHIFT 13
  170. #define OSD_OSDWIN0MD_BMP0MD (3 << 13)
  171. #define OSD_OSDWIN0MD_CLUTS0 (1 << 12)
  172. #define OSD_OSDWIN0MD_OHZ0_SHIFT 10
  173. #define OSD_OSDWIN0MD_OHZ0 (3 << 10)
  174. #define OSD_OSDWIN0MD_OVZ0_SHIFT 8
  175. #define OSD_OSDWIN0MD_OVZ0 (3 << 8)
  176. #define OSD_OSDWIN0MD_BMW0_SHIFT 6
  177. #define OSD_OSDWIN0MD_BMW0 (3 << 6)
  178. #define OSD_OSDWIN0MD_BLND0_SHIFT 3
  179. #define OSD_OSDWIN0MD_BLND0 (7 << 3)
  180. #define OSD_OSDWIN0MD_TE0 (1 << 2)
  181. #define OSD_OSDWIN0MD_OFF0 (1 << 1)
  182. #define OSD_OSDWIN0MD_OACT0 (1 << 0)
  183. #define OSD_OSDWIN1MD_OASW (1 << 15)
  184. #define OSD_OSDWIN1MD_ATN1E (1 << 14)
  185. #define OSD_OSDWIN1MD_RGB1E (1 << 13)
  186. #define OSD_OSDWIN1MD_BMP1MD_SHIFT 13
  187. #define OSD_OSDWIN1MD_BMP1MD (3 << 13)
  188. #define OSD_OSDWIN1MD_CLUTS1 (1 << 12)
  189. #define OSD_OSDWIN1MD_OHZ1_SHIFT 10
  190. #define OSD_OSDWIN1MD_OHZ1 (3 << 10)
  191. #define OSD_OSDWIN1MD_OVZ1_SHIFT 8
  192. #define OSD_OSDWIN1MD_OVZ1 (3 << 8)
  193. #define OSD_OSDWIN1MD_BMW1_SHIFT 6
  194. #define OSD_OSDWIN1MD_BMW1 (3 << 6)
  195. #define OSD_OSDWIN1MD_BLND1_SHIFT 3
  196. #define OSD_OSDWIN1MD_BLND1 (7 << 3)
  197. #define OSD_OSDWIN1MD_TE1 (1 << 2)
  198. #define OSD_OSDWIN1MD_OFF1 (1 << 1)
  199. #define OSD_OSDWIN1MD_OACT1 (1 << 0)
  200. #define OSD_OSDATRMD_OASW (1 << 15)
  201. #define OSD_OSDATRMD_OHZA_SHIFT 10
  202. #define OSD_OSDATRMD_OHZA (3 << 10)
  203. #define OSD_OSDATRMD_OVZA_SHIFT 8
  204. #define OSD_OSDATRMD_OVZA (3 << 8)
  205. #define OSD_OSDATRMD_BLNKINT_SHIFT 6
  206. #define OSD_OSDATRMD_BLNKINT (3 << 6)
  207. #define OSD_OSDATRMD_OFFA (1 << 1)
  208. #define OSD_OSDATRMD_BLNK (1 << 0)
  209. #define OSD_RECTCUR_RCAD_SHIFT 8
  210. #define OSD_RECTCUR_RCAD (0xff << 8)
  211. #define OSD_RECTCUR_CLUTSR (1 << 7)
  212. #define OSD_RECTCUR_RCHW_SHIFT 4
  213. #define OSD_RECTCUR_RCHW (7 << 4)
  214. #define OSD_RECTCUR_RCVW_SHIFT 1
  215. #define OSD_RECTCUR_RCVW (7 << 1)
  216. #define OSD_RECTCUR_RCACT (1 << 0)
  217. #define OSD_VIDWIN0OFST_V0LO (0x1ff << 0)
  218. #define OSD_VIDWIN1OFST_V1LO (0x1ff << 0)
  219. #define OSD_OSDWIN0OFST_O0LO (0x1ff << 0)
  220. #define OSD_OSDWIN1OFST_O1LO (0x1ff << 0)
  221. #define OSD_WINOFST_AH_SHIFT 9
  222. #define OSD_VIDWIN0OFST_V0AH (0xf << 9)
  223. #define OSD_VIDWIN1OFST_V1AH (0xf << 9)
  224. #define OSD_OSDWIN0OFST_O0AH (0xf << 9)
  225. #define OSD_OSDWIN1OFST_O1AH (0xf << 9)
  226. #define OSD_VIDWINADH_V1AH_SHIFT 8
  227. #define OSD_VIDWINADH_V1AH (0x7f << 8)
  228. #define OSD_VIDWINADH_V0AH_SHIFT 0
  229. #define OSD_VIDWINADH_V0AH (0x7f << 0)
  230. #define OSD_VIDWIN0ADL_V0AL (0xffff << 0)
  231. #define OSD_VIDWIN1ADL_V1AL (0xffff << 0)
  232. #define OSD_OSDWINADH_O1AH_SHIFT 8
  233. #define OSD_OSDWINADH_O1AH (0x7f << 8)
  234. #define OSD_OSDWINADH_O0AH_SHIFT 0
  235. #define OSD_OSDWINADH_O0AH (0x7f << 0)
  236. #define OSD_OSDWIN0ADL_O0AL (0xffff << 0)
  237. #define OSD_OSDWIN1ADL_O1AL (0xffff << 0)
  238. #define OSD_BASEPX_BPX (0x3ff << 0)
  239. #define OSD_BASEPY_BPY (0x1ff << 0)
  240. #define OSD_VIDWIN0XP_V0X (0x7ff << 0)
  241. #define OSD_VIDWIN0YP_V0Y (0x7ff << 0)
  242. #define OSD_VIDWIN0XL_V0W (0x7ff << 0)
  243. #define OSD_VIDWIN0YL_V0H (0x7ff << 0)
  244. #define OSD_VIDWIN1XP_V1X (0x7ff << 0)
  245. #define OSD_VIDWIN1YP_V1Y (0x7ff << 0)
  246. #define OSD_VIDWIN1XL_V1W (0x7ff << 0)
  247. #define OSD_VIDWIN1YL_V1H (0x7ff << 0)
  248. #define OSD_OSDWIN0XP_W0X (0x7ff << 0)
  249. #define OSD_OSDWIN0YP_W0Y (0x7ff << 0)
  250. #define OSD_OSDWIN0XL_W0W (0x7ff << 0)
  251. #define OSD_OSDWIN0YL_W0H (0x7ff << 0)
  252. #define OSD_OSDWIN1XP_W1X (0x7ff << 0)
  253. #define OSD_OSDWIN1YP_W1Y (0x7ff << 0)
  254. #define OSD_OSDWIN1XL_W1W (0x7ff << 0)
  255. #define OSD_OSDWIN1YL_W1H (0x7ff << 0)
  256. #define OSD_CURXP_RCSX (0x7ff << 0)
  257. #define OSD_CURYP_RCSY (0x7ff << 0)
  258. #define OSD_CURXL_RCSW (0x7ff << 0)
  259. #define OSD_CURYL_RCSH (0x7ff << 0)
  260. #define OSD_EXTMODE_EXPMDSEL (1 << 15)
  261. #define OSD_EXTMODE_SCRNHEXP_SHIFT 13
  262. #define OSD_EXTMODE_SCRNHEXP (3 << 13)
  263. #define OSD_EXTMODE_SCRNVEXP (1 << 12)
  264. #define OSD_EXTMODE_OSD1BLDCHR (1 << 11)
  265. #define OSD_EXTMODE_OSD0BLDCHR (1 << 10)
  266. #define OSD_EXTMODE_ATNOSD1EN (1 << 9)
  267. #define OSD_EXTMODE_ATNOSD0EN (1 << 8)
  268. #define OSD_EXTMODE_OSDHRSZ15 (1 << 7)
  269. #define OSD_EXTMODE_VIDHRSZ15 (1 << 6)
  270. #define OSD_EXTMODE_ZMFILV1HEN (1 << 5)
  271. #define OSD_EXTMODE_ZMFILV1VEN (1 << 4)
  272. #define OSD_EXTMODE_ZMFILV0HEN (1 << 3)
  273. #define OSD_EXTMODE_ZMFILV0VEN (1 << 2)
  274. #define OSD_EXTMODE_EXPFILHEN (1 << 1)
  275. #define OSD_EXTMODE_EXPFILVEN (1 << 0)
  276. #define OSD_MISCCTL_BLDSEL (1 << 15)
  277. #define OSD_MISCCTL_S420D (1 << 14)
  278. #define OSD_MISCCTL_BMAPT (1 << 13)
  279. #define OSD_MISCCTL_DM365M (1 << 12)
  280. #define OSD_MISCCTL_RGBEN (1 << 7)
  281. #define OSD_MISCCTL_RGBWIN (1 << 6)
  282. #define OSD_MISCCTL_DMANG (1 << 6)
  283. #define OSD_MISCCTL_TMON (1 << 5)
  284. #define OSD_MISCCTL_RSEL (1 << 4)
  285. #define OSD_MISCCTL_CPBSY (1 << 3)
  286. #define OSD_MISCCTL_PPSW (1 << 2)
  287. #define OSD_MISCCTL_PPRV (1 << 1)
  288. #define OSD_CLUTRAMYCB_Y_SHIFT 8
  289. #define OSD_CLUTRAMYCB_Y (0xff << 8)
  290. #define OSD_CLUTRAMYCB_CB_SHIFT 0
  291. #define OSD_CLUTRAMYCB_CB (0xff << 0)
  292. #define OSD_CLUTRAMCR_CR_SHIFT 8
  293. #define OSD_CLUTRAMCR_CR (0xff << 8)
  294. #define OSD_CLUTRAMCR_CADDR_SHIFT 0
  295. #define OSD_CLUTRAMCR_CADDR (0xff << 0)
  296. #define OSD_TRANSPVAL_RGBTRANS (0xffff << 0)
  297. #define OSD_TRANSPVALL_RGBL (0xffff << 0)
  298. #define OSD_TRANSPVALU_Y_SHIFT 8
  299. #define OSD_TRANSPVALU_Y (0xff << 8)
  300. #define OSD_TRANSPVALU_RGBU_SHIFT 0
  301. #define OSD_TRANSPVALU_RGBU (0xff << 0)
  302. #define OSD_TRANSPBMPIDX_BMP1_SHIFT 8
  303. #define OSD_TRANSPBMPIDX_BMP1 (0xff << 8)
  304. #define OSD_TRANSPBMPIDX_BMP0_SHIFT 0
  305. #define OSD_TRANSPBMPIDX_BMP0 0xff
  306. #endif /* _DAVINCI_VPBE_H_ */