hdmi_tx_reg.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. #ifndef _HDMI_TX_REG_H
  2. #define _HDMI_TRX_REG_H
  3. unsigned long hdmi_rd_reg(unsigned long addr);
  4. void hdmi_wr_only_reg(unsigned long addr, unsigned long data);
  5. void hdmi_wr_reg(unsigned long addr, unsigned long data);
  6. #ifdef AVOS
  7. #ifdef AML_A3
  8. #define APB_BASE 0xd0040000
  9. #endif
  10. #define PREG_EGPIO_I PREG_GPIOA_INLVL
  11. #define PREG_EGPIO_EN_N PREG_GPIOA_OE
  12. //#define PERIPHS_PIN_MUX_0 PREG_PIN_MUX_REG0
  13. void WRITE_APB_REG(unsigned long addr, unsigned long data);
  14. unsigned long READ_APB_REG(unsigned long addr);
  15. #endif
  16. #define HDMI_ADDR_PORT 0x2000
  17. #define HDMI_DATA_PORT 0x2004
  18. #define HDMI_CNTL_PORT 0x2008
  19. //inside chip
  20. // tx base addr : 0x00000 ~ 0x03fff
  21. // rx base addr : 0x04000 ~ 0x07fff
  22. // sim base addr : 0x08000 ~ 0x0bfff
  23. // cec0 base addr : 0x0c000 ~ 0x0c0ff
  24. //external module
  25. // tx base addr : 0x10000 ~ 0x13fff
  26. // rx base addr : 0x14000 ~ 0x17fff
  27. // sim base addr : 0x18000 ~ 0x1bfff
  28. // cec0 base addr : 0x1c000 ~ 0x1c0ff
  29. // cec1 base addr : 0x1c100 ~ 0x1c1ff
  30. #define TX_BASE_ADDR 0x00000 //inside chip
  31. #define CEC0_BASE_ADDR 0x0c000 //inside chip
  32. #define CEC1_BASE_ADDR 0x1c100 //outside chip
  33. #define OTHER_BASE_ADDR 0x08000 //inside chip
  34. //********** OTHER BASE related **********//
  35. #define HDMI_OTHER_CTRL0 0x0
  36. #define HDMI_OTHER_CTRL1 0x1
  37. #define HDMI_OTHER_STATUS0 0x2
  38. #define HDMI_OTHER_CTRL2 0x3
  39. #define HDMI_OTHER_INTR_MASKN 0x4
  40. #define HDMI_OTHER_INTR_STAT 0x5
  41. #define HDMI_OTHER_INTR_STAT_CLR 0x6
  42. //********** TX related **********//
  43. #define TX_HDCP_DKEY_OFFSET TX_BASE_ADDR+0x400
  44. #define TX_RX_EDID_OFFSET TX_BASE_ADDR+0x600
  45. #define TX_HDCP_SHADOW_OFFSET TX_BASE_ADDR+0x100
  46. #define TX_IEC60958_SUB1_OFFSET TX_BASE_ADDR+0x0B0
  47. #define TX_IEC60958_SUB2_OFFSET TX_BASE_ADDR+0x0C8
  48. #define TX_IEC60958_ST_SUB1_OFFSET TX_BASE_ADDR+0x1B0
  49. #define TX_IEC60958_ST_SUB2_OFFSET TX_BASE_ADDR+0x1C8
  50. // System config 0
  51. #define TX_SYS0_AFE_SIGNAL TX_BASE_ADDR+0x000
  52. #define TX_SYS0_AFE_LOOP TX_BASE_ADDR+0x001
  53. #define TX_SYS0_ACR_CTS_0 TX_BASE_ADDR+0x002
  54. #define TX_SYS0_ACR_CTS_1 TX_BASE_ADDR+0x003
  55. #define TX_SYS0_ACR_CTS_2 TX_BASE_ADDR+0x004
  56. #define TX_SYS0_BIST_CONTROL TX_BASE_ADDR+0x005
  57. #define TX_SYS0_BIST_DATA_0 TX_BASE_ADDR+0x006
  58. #define TX_SYS0_BIST_DATA_1 TX_BASE_ADDR+0x007
  59. #define TX_SYS0_BIST_DATA_2 TX_BASE_ADDR+0x008
  60. #define TX_SYS0_BIST_DATA_3 TX_BASE_ADDR+0x009
  61. #define TX_SYS0_BIST_DATA_4 TX_BASE_ADDR+0x00A
  62. #define TX_SYS0_BIST_DATA_5 TX_BASE_ADDR+0x00B
  63. #define TX_SYS0_BIST_DATA_6 TX_BASE_ADDR+0x00C
  64. #define TX_SYS0_BIST_DATA_7 TX_BASE_ADDR+0x00D
  65. #define TX_SYS0_BIST_DATA_8 TX_BASE_ADDR+0x00E
  66. #define TX_SYS0_BIST_DATA_9 TX_BASE_ADDR+0x00F
  67. // system config 1
  68. #define TX_SYS1_PRE_EMPHASIS TX_BASE_ADDR+0x010
  69. #define TX_SYS1_TERMINATION TX_BASE_ADDR+0x011
  70. #define TX_SYS1_AFE_SPARE0 TX_BASE_ADDR+0x012
  71. #define TX_SYS1_AFE_SPARE1 TX_BASE_ADDR+0x013
  72. #define TX_SYS1_BANDGAP TX_BASE_ADDR+0x014
  73. #define TX_SYS1_BIAS TX_BASE_ADDR+0x015
  74. #define TX_SYS1_AFE_RESET TX_BASE_ADDR+0x016
  75. #define TX_SYS1_AFE_TEST TX_BASE_ADDR+0x017
  76. #define TX_SYS1_PLL TX_BASE_ADDR+0x018
  77. #define TX_SYS1_TUNE TX_BASE_ADDR+0x019
  78. #define TX_SYS1_AFE_CONNECT TX_BASE_ADDR+0x01A
  79. #define TX_SYS1_ACR_N_0 TX_BASE_ADDR+0x01C
  80. #define TX_SYS1_ACR_N_1 TX_BASE_ADDR+0x01D
  81. #define TX_SYS1_ACR_N_2 TX_BASE_ADDR+0x01E
  82. #define TX_SYS1_PRBS_DATA TX_BASE_ADDR+0x01F
  83. // system config 4
  84. #define TX_SYS4_TX_CKI_DDR TX_BASE_ADDR+0x0A0
  85. #define TX_SYS4_TX_CKO_DDR TX_BASE_ADDR+0x0A1
  86. #define TX_SYS4_RX_CKI_DDR TX_BASE_ADDR+0x0A2
  87. #define TX_SYS4_RX_CKO_DDR TX_BASE_ADDR+0x0A3
  88. #define TX_SYS4_CONNECT_SEL_0 TX_BASE_ADDR+0x0A4
  89. #define TX_SYS4_CONNECT_SEL_1 TX_BASE_ADDR+0x0A5
  90. #define TX_SYS4_CONNECT_SEL_2 TX_BASE_ADDR+0x0A6
  91. #define TX_SYS4_CONNECT_SEL_3 TX_BASE_ADDR+0x0A7
  92. #define TX_SYS4_CK_INV_VIDEO TX_BASE_ADDR+0x0A8
  93. #define TX_SYS4_CK_INV_AUDIO TX_BASE_ADDR+0x0A9
  94. #define TX_SYS4_CK_INV_AFE TX_BASE_ADDR+0x0AA
  95. #define TX_SYS4_CK_INV_CH01 TX_BASE_ADDR+0x0AB
  96. #define TX_SYS4_CK_INV_CH2 TX_BASE_ADDR+0x0AC
  97. #define TX_SYS4_CK_CEC TX_BASE_ADDR+0x0AD
  98. #define TX_SYS4_CK_SOURCE_1 TX_BASE_ADDR+0x0AE
  99. #define TX_SYS4_CK_SOURCE_2 TX_BASE_ADDR+0x0AF
  100. // system config 5
  101. #define TX_SYS5_TX_SOFT_RESET_1 TX_BASE_ADDR+0x0E0
  102. #define TX_SYS5_TX_SOFT_RESET_2 TX_BASE_ADDR+0x0E1
  103. #define TX_SYS5_RX_SOFT_RESET_1 TX_BASE_ADDR+0x0E2
  104. #define TX_SYS5_RX_SOFT_RESET_2 TX_BASE_ADDR+0x0E3
  105. #define TX_SYS5_RX_SOFT_RESET_3 TX_BASE_ADDR+0x0E4
  106. #define TX_SYS5_SSTL_BIDIR_IN TX_BASE_ADDR+0x0E5
  107. #define TX_SYS5_SSTL_IN TX_BASE_ADDR+0x0E6
  108. #define TX_SYS5_SSTL_DIFF_IN TX_BASE_ADDR+0x0E7
  109. #define TX_SYS5_FIFO_CONFIG TX_BASE_ADDR+0x0E8
  110. #define TX_SYS5_FIFO_SAMP01_CFG TX_BASE_ADDR+0x0E9
  111. #define TX_SYS5_FIFO_SAMP23_CFG TX_BASE_ADDR+0x0EA
  112. #define TX_SYS5_CONNECT_FIFO_CFG TX_BASE_ADDR+0x0EB
  113. #define TX_SYS5_IO_CALIB_CONTROL TX_BASE_ADDR+0x0EC
  114. #define TX_SYS5_SSTL_BIDIR_OUT TX_BASE_ADDR+0x0ED
  115. #define TX_SYS5_SSTL_OUT TX_BASE_ADDR+0x0EE
  116. #define TX_SYS5_SSTL_DIFF_OUT TX_BASE_ADDR+0x0EF
  117. // HDCP CONFIG
  118. #define TX_HDCP_ECC_CONFIG TX_BASE_ADDR+0x024
  119. #define TX_HDCP_CRC_CONFIG TX_BASE_ADDR+0x025
  120. #define TX_HDCP_EDID_CONFIG TX_BASE_ADDR+0x026
  121. #define TX_HDCP_MEM_CONFIG TX_BASE_ADDR+0x027
  122. #define TX_HDCP_HPD_FILTER_L TX_BASE_ADDR+0x028
  123. #define TX_HDCP_HPD_FILTER_H TX_BASE_ADDR+0x029
  124. #define TX_HDCP_ENCRYPT_BYTE TX_BASE_ADDR+0x02A
  125. #define TX_HDCP_CONFIG0 TX_BASE_ADDR+0x02B
  126. #define TX_HDCP_CONFIG1 TX_BASE_ADDR+0x02C
  127. #define TX_HDCP_CONFIG2 TX_BASE_ADDR+0x02D
  128. #define TX_HDCP_CONFIG3 TX_BASE_ADDR+0x02E
  129. #define TX_HDCP_MODE TX_BASE_ADDR+0x02F
  130. // Video config, part 1
  131. #define TX_VIDEO_ACTIVE_PIXELS_0 TX_BASE_ADDR+0x030
  132. #define TX_VIDEO_ACTIVE_PIXELS_1 TX_BASE_ADDR+0x031
  133. #define TX_VIDEO_FRONT_PIXELS TX_BASE_ADDR+0x032
  134. #define TX_VIDEO_HSYNC_PIXELS TX_BASE_ADDR+0x033
  135. #define TX_VIDEO_BACK_PIXELS TX_BASE_ADDR+0x034
  136. #define TX_VIDEO_ACTIVE_LINES_0 TX_BASE_ADDR+0x035
  137. #define TX_VIDEO_ACTIVE_LINES_1 TX_BASE_ADDR+0x036
  138. #define TX_VIDEO_EOF_LINES TX_BASE_ADDR+0x037
  139. #define TX_VIDEO_VSYNC_LINES TX_BASE_ADDR+0x038
  140. #define TX_VIDEO_SOF_LINES TX_BASE_ADDR+0x039
  141. #define TX_VIDEO_DTV_TIMING TX_BASE_ADDR+0x03A
  142. #define TX_VIDEO_DTV_MODE TX_BASE_ADDR+0x03B
  143. #define TX_VIDEO_DTV_FORMAT0 TX_BASE_ADDR+0x03C
  144. #define TX_VIDEO_DTV_FORMAT1 TX_BASE_ADDR+0x03D
  145. #define TX_VIDEO_PIXEL_PACK TX_BASE_ADDR+0x03F
  146. // video config, part 2
  147. #define TX_VIDEO_CSC_COEFF_B0 TX_BASE_ADDR+0x040
  148. #define TX_VIDEO_CSC_COEFF_B1 TX_BASE_ADDR+0x041
  149. #define TX_VIDEO_CSC_COEFF_R0 TX_BASE_ADDR+0x042
  150. #define TX_VIDEO_CSC_COEFF_R1 TX_BASE_ADDR+0x043
  151. #define TX_VIDEO_CSC_COEFF_CB0 TX_BASE_ADDR+0x044
  152. #define TX_VIDEO_CSC_COEFF_CB1 TX_BASE_ADDR+0x045
  153. #define TX_VIDEO_CSC_COEFF_CR0 TX_BASE_ADDR+0x046
  154. #define TX_VIDEO_CSC_COEFF_CR1 TX_BASE_ADDR+0x047
  155. #define TX_VIDEO_DTV_OPTION_L TX_BASE_ADDR+0x048
  156. #define TX_VIDEO_DTV_OPTION_H TX_BASE_ADDR+0x049
  157. #define TX_VIDEO_DTV_FILTER TX_BASE_ADDR+0x04A
  158. #define TX_VIDEO_DTV_DITHER TX_BASE_ADDR+0x04B
  159. #define TX_VIDEO_DTV_DEDITHER TX_BASE_ADDR+0x04C
  160. #define TX_VIDEO_PROC_CONFIG0 TX_BASE_ADDR+0x04E
  161. #define TX_VIDEO_PROC_CONFIG1 TX_BASE_ADDR+0x04F
  162. // Audio config
  163. #define TX_AUDIO_FORMAT TX_BASE_ADDR+0x058
  164. #define TX_AUDIO_SPDIF TX_BASE_ADDR+0x059
  165. #define TX_AUDIO_I2S TX_BASE_ADDR+0x05A
  166. #define TX_AUDIO_FIFO TX_BASE_ADDR+0x05B
  167. #define TX_AUDIO_LIPSYNC TX_BASE_ADDR+0x05C
  168. #define TX_AUDIO_CONTROL TX_BASE_ADDR+0x05D
  169. #define TX_AUDIO_HEADER TX_BASE_ADDR+0x05E
  170. #define TX_AUDIO_SAMPLE TX_BASE_ADDR+0x05F
  171. #define TX_AUDIO_VALID TX_BASE_ADDR+0x060
  172. #define TX_AUDIO_USER TX_BASE_ADDR+0x061
  173. #define TX_AUDIO_PACK TX_BASE_ADDR+0x062
  174. // tmds config
  175. #define TX_TMDS_MODE TX_BASE_ADDR+0x068
  176. #define TX_TMDS_CONFIG0 TX_BASE_ADDR+0x06C
  177. #define TX_TMDS_CONFIG1 TX_BASE_ADDR+0x06D
  178. // packet config
  179. #define TX_PACKET_ALLOC_ACTIVE_1 TX_BASE_ADDR+0x078
  180. #define TX_PACKET_ALLOC_ACTIVE_2 TX_BASE_ADDR+0x079
  181. #define TX_PACKET_ALLOC_EOF_1 TX_BASE_ADDR+0x07A
  182. #define TX_PACKET_ALLOC_EOF_2 TX_BASE_ADDR+0x07B
  183. #define TX_PACKET_ALLOC_SOF_1 TX_BASE_ADDR+0x07C
  184. #define TX_PACKET_ALLOC_SOF_2 TX_BASE_ADDR+0x07D
  185. #define TX_PACKET_CONTROL_1 TX_BASE_ADDR+0x07E
  186. #define TX_PACKET_CONTROL_2 TX_BASE_ADDR+0x07F
  187. // core config
  188. #define TX_CORE_DATA_CAPTURE_1 TX_BASE_ADDR+0x0F0
  189. #define TX_CORE_DATA_CAPTURE_2 TX_BASE_ADDR+0x0F1
  190. #define TX_CORE_DATA_MONITOR_1 TX_BASE_ADDR+0x0F2
  191. #define TX_CORE_DATA_MONITOR_2 TX_BASE_ADDR+0x0F3
  192. #define TX_CORE_CALIB_MODE TX_BASE_ADDR+0x0F4
  193. #define TX_CORE_CALIB_SAMPLE_DELAY TX_BASE_ADDR+0x0F5
  194. #define TX_CORE_CALIB_VALUE_AUTO TX_BASE_ADDR+0x0F6
  195. #define TX_CORE_CALIB_VALUE TX_BASE_ADDR+0x0F7
  196. // HDCP shadow register
  197. #define TX_HDCP_SHW_BKSV_0 TX_BASE_ADDR+0x100
  198. #define TX_HDCP_SHW_BKSV_1 TX_BASE_ADDR+0x101
  199. #define TX_HDCP_SHW_BKSV_2 TX_BASE_ADDR+0x102
  200. #define TX_HDCP_SHW_BKSV_3 TX_BASE_ADDR+0x103
  201. #define TX_HDCP_SHW_BKSV_4 TX_BASE_ADDR+0x104
  202. #define TX_HDCP_SHW_RI1_0 TX_BASE_ADDR+0x108
  203. #define TX_HDCP_SHW_RI1_1 TX_BASE_ADDR+0x109
  204. #define TX_HDCP_SHW_PJ1 TX_BASE_ADDR+0x10A
  205. #define TX_HDCP_SHW_AKSV_0 TX_BASE_ADDR+0x110
  206. #define TX_HDCP_SHW_AKSV_1 TX_BASE_ADDR+0x111
  207. #define TX_HDCP_SHW_AKSV_2 TX_BASE_ADDR+0x112
  208. #define TX_HDCP_SHW_AKSV_3 TX_BASE_ADDR+0x113
  209. #define TX_HDCP_SHW_AKSV_4 TX_BASE_ADDR+0x114
  210. #define TX_HDCP_SHW_AINFO TX_BASE_ADDR+0x115
  211. #define TX_HDCP_SHW_AN_0 TX_BASE_ADDR+0x118
  212. #define TX_HDCP_SHW_AN_1 TX_BASE_ADDR+0x119
  213. #define TX_HDCP_SHW_AN_2 TX_BASE_ADDR+0x11A
  214. #define TX_HDCP_SHW_AN_3 TX_BASE_ADDR+0x11B
  215. #define TX_HDCP_SHW_AN_4 TX_BASE_ADDR+0x11C
  216. #define TX_HDCP_SHW_AN_5 TX_BASE_ADDR+0x11D
  217. #define TX_HDCP_SHW_AN_6 TX_BASE_ADDR+0x11E
  218. #define TX_HDCP_SHW_AN_7 TX_BASE_ADDR+0x11F
  219. #define TX_HDCP_SHW_V1_H0_0 TX_BASE_ADDR+0x120
  220. #define TX_HDCP_SHW_V1_H0_1 TX_BASE_ADDR+0x121
  221. #define TX_HDCP_SHW_V1_H0_2 TX_BASE_ADDR+0x122
  222. #define TX_HDCP_SHW_V1_H0_3 TX_BASE_ADDR+0x123
  223. #define TX_HDCP_SHW_V1_H1_0 TX_BASE_ADDR+0x124
  224. #define TX_HDCP_SHW_V1_H1_1 TX_BASE_ADDR+0x125
  225. #define TX_HDCP_SHW_V1_H1_2 TX_BASE_ADDR+0x126
  226. #define TX_HDCP_SHW_V1_H1_3 TX_BASE_ADDR+0x127
  227. #define TX_HDCP_SHW_V1_H2_0 TX_BASE_ADDR+0x128
  228. #define TX_HDCP_SHW_V1_H2_1 TX_BASE_ADDR+0x129
  229. #define TX_HDCP_SHW_V1_H2_2 TX_BASE_ADDR+0x12A
  230. #define TX_HDCP_SHW_V1_H2_3 TX_BASE_ADDR+0x12B
  231. #define TX_HDCP_SHW_V1_H3_0 TX_BASE_ADDR+0x12C
  232. #define TX_HDCP_SHW_V1_H3_1 TX_BASE_ADDR+0x12D
  233. #define TX_HDCP_SHW_V1_H3_2 TX_BASE_ADDR+0x12E
  234. #define TX_HDCP_SHW_V1_H3_3 TX_BASE_ADDR+0x12F
  235. #define TX_HDCP_SHW_V1_H4_0 TX_BASE_ADDR+0x130
  236. #define TX_HDCP_SHW_V1_H4_1 TX_BASE_ADDR+0x131
  237. #define TX_HDCP_SHW_V1_H4_2 TX_BASE_ADDR+0x132
  238. #define TX_HDCP_SHW_V1_H4_3 TX_BASE_ADDR+0x133
  239. #define TX_HDCP_SHW_BCAPS TX_BASE_ADDR+0x140
  240. #define TX_HDCP_SHW_BSTATUS_0 TX_BASE_ADDR+0x141
  241. #define TX_HDCP_SHW_BSTATUS_1 TX_BASE_ADDR+0x142
  242. #define TX_HDCP_SHW_KSV_FIFO TX_BASE_ADDR+0x143
  243. // system status 0
  244. #define TX_SYSST0_CONNECT_FIFO TX_BASE_ADDR+0x180
  245. #define TX_SYSST0_PLL_MONITOR TX_BASE_ADDR+0x181
  246. #define TX_SYSST0_AFE_FIFO TX_BASE_ADDR+0x182
  247. #define TX_SYSST0_ROM_STATUS TX_BASE_ADDR+0x18F
  248. // system status 1
  249. #define TX_SYSST1_CALIB_BIT_RESULT_0 TX_BASE_ADDR+0x1E0
  250. #define TX_SYSST1_CALIB_BIT_RESULT_1 TX_BASE_ADDR+0x1E1
  251. #define TX_SYSST1_CALIB_BIT_RESULT_2 TX_BASE_ADDR+0x1E2
  252. #define TX_SYSST1_CALIB_BIT_RESULT_3 TX_BASE_ADDR+0x1E3
  253. #define TX_SYSST1_CALIB_BIT_RESULT_4 TX_BASE_ADDR+0x1E4
  254. #define TX_SYSST1_CALIB_BIT_RESULT_5 TX_BASE_ADDR+0x1E5
  255. #define TX_SYSST1_CALIB_BIT_RESULT_6 TX_BASE_ADDR+0x1E6
  256. #define TX_SYSST1_CALIB_BIT_RESULT_7 TX_BASE_ADDR+0x1E7
  257. #define TX_SYSST1_CALIB_BUS_RESULT_0 TX_BASE_ADDR+0x1E8
  258. #define TX_SYSST1_CALIB_BUS_RESULT_1 TX_BASE_ADDR+0x1E9
  259. #define TX_SYSST1_CALIB_BUS_RESULT_2 TX_BASE_ADDR+0x1EA
  260. #define TX_SYSST1_CALIB_BUS_RESULT_3 TX_BASE_ADDR+0x1EB
  261. #define TX_SYSST1_CALIB_BUS_RESULT_4 TX_BASE_ADDR+0x1EC
  262. #define TX_SYSST1_CALIB_BUS_RESULT_5 TX_BASE_ADDR+0x1ED
  263. #define TX_SYSST1_CALIB_BUS_RESULT_6 TX_BASE_ADDR+0x1EE
  264. #define TX_SYSST1_CALIB_BUS_RESULT_7 TX_BASE_ADDR+0x1EF
  265. // hdcp status
  266. #define TX_HDCP_ST_AUTHENTICATION TX_BASE_ADDR+0x190
  267. #define TX_HDCP_ST_FRAME_COUNT TX_BASE_ADDR+0x191
  268. #define TX_HDCP_ST_STATUS_0 TX_BASE_ADDR+0x192
  269. #define TX_HDCP_ST_STATUS_1 TX_BASE_ADDR+0x193
  270. #define TX_HDCP_ST_STATUS_2 TX_BASE_ADDR+0x194
  271. #define TX_HDCP_ST_STATUS_3 TX_BASE_ADDR+0x195
  272. #define TX_HDCP_ST_EDID_STATUS TX_BASE_ADDR+0x196
  273. #define TX_HDCP_ST_MEM_STATUS TX_BASE_ADDR+0x197
  274. #define TX_HDCP_ST_ST_MODE TX_BASE_ADDR+0x19F
  275. // video status
  276. #define TX_VIDEO_ST_ACTIVE_PIXELS_1 TX_BASE_ADDR+0x1A0
  277. #define TX_VIDEO_ST_ACTIVE_PIXELS_2 TX_BASE_ADDR+0x1A1
  278. #define TX_VIDEO_ST_FRONT_PIXELS TX_BASE_ADDR+0x1A2
  279. #define TX_VIDEO_ST_HSYNC_PIXELS TX_BASE_ADDR+0x1A3
  280. #define TX_VIDEO_ST_BACK_PIXELS TX_BASE_ADDR+0x1A4
  281. #define TX_VIDEO_ST_ACTIVE_LINES_1 TX_BASE_ADDR+0x1A5
  282. #define TX_VIDEO_ST_ACTIVE_LINES_2 TX_BASE_ADDR+0x1A6
  283. #define TX_VIDEO_ST_EOF_LINES TX_BASE_ADDR+0x1A7
  284. #define TX_VIDEO_ST_VSYNC_LINES TX_BASE_ADDR+0x1A8
  285. #define TX_VIDEO_ST_SOF_LINES TX_BASE_ADDR+0x1A9
  286. #define TX_VIDEO_ST_DTV_TIMING TX_BASE_ADDR+0x1AA
  287. #define TX_VIDEO_ST_DTV_MODE TX_BASE_ADDR+0x1AB
  288. // audio status
  289. #define TX_VIDEO_ST_AUDIO_STATUS TX_BASE_ADDR+0x1AC
  290. #define TX_AFE_STATUS_0 TX_BASE_ADDR+0x1AE
  291. #define TX_AFE_STATUS_1 TX_BASE_ADDR+0x1AF
  292. // Packet status
  293. #define TX_PACKET_ST_REQUEST_STATUS_1 TX_BASE_ADDR+0x1F0
  294. #define TX_PACKET_ST_REQUEST_STATUS_2 TX_BASE_ADDR+0x1F1
  295. #define TX_PACKET_ST_REQUEST_MISSED_1 TX_BASE_ADDR+0x1F2
  296. #define TX_PACKET_ST_REQUEST_MISSED_2 TX_BASE_ADDR+0x1F3
  297. #define TX_PACKET_ST_ENCODE_STATUS_0 TX_BASE_ADDR+0x1F4
  298. #define TX_PACKET_ST_ENCODE_STATUS_1 TX_BASE_ADDR+0x1F5
  299. #define TX_PACKET_ST_ENCODE_STATUS_2 TX_BASE_ADDR+0x1F6
  300. #define TX_PACKET_ST_TIMER_STATUS TX_BASE_ADDR+0x1F7
  301. // tmds status
  302. #define TX_TMDS_ST_CLOCK_METER_1 TX_BASE_ADDR+0x1F8
  303. #define TX_TMDS_ST_CLOCK_METER_2 TX_BASE_ADDR+0x1F9
  304. #define TX_TMDS_ST_CLOCK_METER_3 TX_BASE_ADDR+0x1FA
  305. #define TX_TMDS_ST_TMDS_STATUS_1 TX_BASE_ADDR+0x1FC
  306. #define TX_TMDS_ST_TMDS_STATUS_2 TX_BASE_ADDR+0x1FD
  307. #define TX_TMDS_ST_TMDS_STATUS_3 TX_BASE_ADDR+0x1FE
  308. #define TX_TMDS_ST_TMDS_STATUS_4 TX_BASE_ADDR+0x1FF
  309. // Packet register
  310. #define TX_PKT_REG_SPD_INFO_BASE_ADDR TX_BASE_ADDR+0x200
  311. #define TX_PKT_REG_VEND_INFO_BASE_ADDR TX_BASE_ADDR+0x220
  312. #define TX_PKT_REG_MPEG_INFO_BASE_ADDR TX_BASE_ADDR+0x240
  313. #define TX_PKT_REG_AVI_INFO_BASE_ADDR TX_BASE_ADDR+0x260
  314. #define TX_PKT_REG_AUDIO_INFO_BASE_ADDR TX_BASE_ADDR+0x280
  315. #define TX_PKT_REG_ACP_INFO_BASE_ADDR TX_BASE_ADDR+0x2A0
  316. #define TX_PKT_REG_ISRC1_BASE_ADDR TX_BASE_ADDR+0x2C0
  317. #define TX_PKT_REG_ISRC2_BASE_ADDR TX_BASE_ADDR+0x2E0
  318. #define TX_PKT_REG_EXCEPT0_BASE_ADDR TX_BASE_ADDR+0x300
  319. #define TX_PKT_REG_EXCEPT1_BASE_ADDR TX_BASE_ADDR+0x320
  320. #define TX_PKT_REG_EXCEPT2_BASE_ADDR TX_BASE_ADDR+0x340
  321. #define TX_PKT_REG_EXCEPT3_BASE_ADDR TX_BASE_ADDR+0x360
  322. #define TX_PKT_REG_EXCEPT4_BASE_ADDR TX_BASE_ADDR+0x380
  323. #define TX_PKT_REG_GAMUT_P0_BASE_ADDR TX_BASE_ADDR+0x3A0
  324. #define TX_PKT_REG_GAMUT_P1_1_BASE_ADDR TX_BASE_ADDR+0x3C0
  325. #define TX_PKT_REG_GAMUT_P1_2_BASE_ADDR TX_BASE_ADDR+0x3E0
  326. //********** CEC related **********//
  327. //read/write
  328. #define CEC_TX_MSG_0_HEADER 0x00
  329. #define CEC_TX_MSG_1_OPCODE 0x01
  330. #define CEC_TX_MSG_2_OP1 0x02
  331. #define CEC_TX_MSG_3_OP2 0x03
  332. #define CEC_TX_MSG_4_OP3 0x04
  333. #define CEC_TX_MSG_5_OP4 0x05
  334. #define CEC_TX_MSG_6_OP5 0x06
  335. #define CEC_TX_MSG_7_OP6 0x07
  336. #define CEC_TX_MSG_8_OP7 0x08
  337. #define CEC_TX_MSG_9_OP8 0x09
  338. #define CEC_TX_MSG_A_OP9 0x0A
  339. #define CEC_TX_MSG_B_OP10 0x0B
  340. #define CEC_TX_MSG_C_OP11 0x0C
  341. #define CEC_TX_MSG_D_OP12 0x0D
  342. #define CEC_TX_MSG_E_OP13 0x0E
  343. #define CEC_TX_MSG_F_OP14 0x0F
  344. //read only
  345. #define CEC_TX_MSG_LENGTH 0x10
  346. #define CEC_TX_MSG_CMD 0x11
  347. #define CEC_TX_WRITE_BUF 0x12
  348. #define CEC_TX_CLEAR_BUF 0x13
  349. #define CEC_RX_MSG_CMD 0x14
  350. #define CEC_RX_CLEAR_BUF 0x15
  351. #define CEC_LOGICAL_ADDR0 0x16
  352. #define CEC_LOGICAL_ADDR1 0x17
  353. #define CEC_LOGICAL_ADDR2 0x18
  354. #define CEC_LOGICAL_ADDR3 0x19
  355. #define CEC_LOGICAL_ADDR4 0x1A
  356. #define CEC_CLOCK_DIV_H 0x1B
  357. #define CEC_CLOCK_DIV_L 0x1C
  358. //read/write
  359. #define CEC_RX_MSG_0_HEADER 0x80
  360. #define CEC_RX_MSG_1_OPCODE 0x81
  361. #define CEC_RX_MSG_2_OP1 0x82
  362. #define CEC_RX_MSG_3_OP2 0x83
  363. #define CEC_RX_MSG_4_OP3 0x84
  364. #define CEC_RX_MSG_5_OP4 0x85
  365. #define CEC_RX_MSG_6_OP5 0x86
  366. #define CEC_RX_MSG_7_OP6 0x87
  367. #define CEC_RX_MSG_8_OP7 0x88
  368. #define CEC_RX_MSG_9_OP8 0x89
  369. #define CEC_RX_MSG_A_OP9 0x8A
  370. #define CEC_RX_MSG_B_OP10 0x8B
  371. #define CEC_RX_MSG_C_OP11 0x8C
  372. #define CEC_RX_MSG_D_OP12 0x8D
  373. #define CEC_RX_MSG_E_OP13 0x8E
  374. #define CEC_RX_MSG_F_OP14 0x8F
  375. //read only
  376. #define CEC_RX_MSG_LENGTH 0x90
  377. #define CEC_RX_MSG_STATUS 0x91
  378. #define CEC_RX_NUM_MSG 0x92
  379. #define CEC_TX_MSG_STATUS 0x93
  380. #define CEC_TX_NUM_MSG 0x94
  381. // tx_msg_cmd definition
  382. #define TX_NO_OP 0 // No transaction
  383. #define TX_REQ_CURRENT 1 // Transmit earliest message in buffer
  384. #define TX_ABORT 2 // Abort transmitting earliest message
  385. #define TX_REQ_NEXT 3 // Overwrite earliest message in buffer and transmit next message
  386. // tx_msg_status definition
  387. #define TX_IDLE 0 // No transaction
  388. #define TX_BUSY 1 // Transmitter is busy
  389. #define TX_DONE 2 // Message has been successfully transmitted
  390. #define TX_ERROR 3 // Message has been transmitted with error
  391. #endif // _HDMI_RX_REG_H