regs-hdmi.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /*
  2. *
  3. * Cloned from drivers/media/video/s5p-tv/regs-hdmi.h
  4. *
  5. * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  6. * http://www.samsung.com/
  7. *
  8. * HDMI register header file for Samsung TVOUT driver
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef SAMSUNG_REGS_HDMI_H
  15. #define SAMSUNG_REGS_HDMI_H
  16. /*
  17. * Register part
  18. */
  19. /* HDMI Version 1.3 & Common */
  20. #define HDMI_CTRL_BASE(x) ((x) + 0x00000000)
  21. #define HDMI_CORE_BASE(x) ((x) + 0x00010000)
  22. #define HDMI_I2S_BASE(x) ((x) + 0x00040000)
  23. #define HDMI_TG_BASE(x) ((x) + 0x00050000)
  24. /* Control registers */
  25. #define HDMI_INTC_CON HDMI_CTRL_BASE(0x0000)
  26. #define HDMI_INTC_FLAG HDMI_CTRL_BASE(0x0004)
  27. #define HDMI_HPD_STATUS HDMI_CTRL_BASE(0x000C)
  28. #define HDMI_V13_PHY_RSTOUT HDMI_CTRL_BASE(0x0014)
  29. #define HDMI_V13_PHY_VPLL HDMI_CTRL_BASE(0x0018)
  30. #define HDMI_V13_PHY_CMU HDMI_CTRL_BASE(0x001C)
  31. #define HDMI_V13_CORE_RSTOUT HDMI_CTRL_BASE(0x0020)
  32. /* Core registers */
  33. #define HDMI_CON_0 HDMI_CORE_BASE(0x0000)
  34. #define HDMI_CON_1 HDMI_CORE_BASE(0x0004)
  35. #define HDMI_CON_2 HDMI_CORE_BASE(0x0008)
  36. #define HDMI_SYS_STATUS HDMI_CORE_BASE(0x0010)
  37. #define HDMI_V13_PHY_STATUS HDMI_CORE_BASE(0x0014)
  38. #define HDMI_STATUS_EN HDMI_CORE_BASE(0x0020)
  39. #define HDMI_HPD HDMI_CORE_BASE(0x0030)
  40. #define HDMI_MODE_SEL HDMI_CORE_BASE(0x0040)
  41. #define HDMI_ENC_EN HDMI_CORE_BASE(0x0044)
  42. #define HDMI_V13_BLUE_SCREEN_0 HDMI_CORE_BASE(0x0050)
  43. #define HDMI_V13_BLUE_SCREEN_1 HDMI_CORE_BASE(0x0054)
  44. #define HDMI_V13_BLUE_SCREEN_2 HDMI_CORE_BASE(0x0058)
  45. #define HDMI_H_BLANK_0 HDMI_CORE_BASE(0x00A0)
  46. #define HDMI_H_BLANK_1 HDMI_CORE_BASE(0x00A4)
  47. #define HDMI_V13_V_BLANK_0 HDMI_CORE_BASE(0x00B0)
  48. #define HDMI_V13_V_BLANK_1 HDMI_CORE_BASE(0x00B4)
  49. #define HDMI_V13_V_BLANK_2 HDMI_CORE_BASE(0x00B8)
  50. #define HDMI_V13_H_V_LINE_0 HDMI_CORE_BASE(0x00C0)
  51. #define HDMI_V13_H_V_LINE_1 HDMI_CORE_BASE(0x00C4)
  52. #define HDMI_V13_H_V_LINE_2 HDMI_CORE_BASE(0x00C8)
  53. #define HDMI_VSYNC_POL HDMI_CORE_BASE(0x00E4)
  54. #define HDMI_INT_PRO_MODE HDMI_CORE_BASE(0x00E8)
  55. #define HDMI_V13_V_BLANK_F_0 HDMI_CORE_BASE(0x0110)
  56. #define HDMI_V13_V_BLANK_F_1 HDMI_CORE_BASE(0x0114)
  57. #define HDMI_V13_V_BLANK_F_2 HDMI_CORE_BASE(0x0118)
  58. #define HDMI_V13_H_SYNC_GEN_0 HDMI_CORE_BASE(0x0120)
  59. #define HDMI_V13_H_SYNC_GEN_1 HDMI_CORE_BASE(0x0124)
  60. #define HDMI_V13_H_SYNC_GEN_2 HDMI_CORE_BASE(0x0128)
  61. #define HDMI_V13_V_SYNC_GEN_1_0 HDMI_CORE_BASE(0x0130)
  62. #define HDMI_V13_V_SYNC_GEN_1_1 HDMI_CORE_BASE(0x0134)
  63. #define HDMI_V13_V_SYNC_GEN_1_2 HDMI_CORE_BASE(0x0138)
  64. #define HDMI_V13_V_SYNC_GEN_2_0 HDMI_CORE_BASE(0x0140)
  65. #define HDMI_V13_V_SYNC_GEN_2_1 HDMI_CORE_BASE(0x0144)
  66. #define HDMI_V13_V_SYNC_GEN_2_2 HDMI_CORE_BASE(0x0148)
  67. #define HDMI_V13_V_SYNC_GEN_3_0 HDMI_CORE_BASE(0x0150)
  68. #define HDMI_V13_V_SYNC_GEN_3_1 HDMI_CORE_BASE(0x0154)
  69. #define HDMI_V13_V_SYNC_GEN_3_2 HDMI_CORE_BASE(0x0158)
  70. #define HDMI_V13_AVI_CON HDMI_CORE_BASE(0x0300)
  71. #define HDMI_V13_AVI_BYTE(n) HDMI_CORE_BASE(0x0320 + 4 * (n))
  72. #define HDMI_V13_DC_CONTROL HDMI_CORE_BASE(0x05C0)
  73. #define HDMI_V13_VIDEO_PATTERN_GEN HDMI_CORE_BASE(0x05C4)
  74. #define HDMI_V13_HPD_GEN HDMI_CORE_BASE(0x05C8)
  75. #define HDMI_V13_AUI_CON HDMI_CORE_BASE(0x0360)
  76. #define HDMI_V13_SPD_CON HDMI_CORE_BASE(0x0400)
  77. /* Timing generator registers */
  78. #define HDMI_TG_CMD HDMI_TG_BASE(0x0000)
  79. #define HDMI_TG_H_FSZ_L HDMI_TG_BASE(0x0018)
  80. #define HDMI_TG_H_FSZ_H HDMI_TG_BASE(0x001C)
  81. #define HDMI_TG_HACT_ST_L HDMI_TG_BASE(0x0020)
  82. #define HDMI_TG_HACT_ST_H HDMI_TG_BASE(0x0024)
  83. #define HDMI_TG_HACT_SZ_L HDMI_TG_BASE(0x0028)
  84. #define HDMI_TG_HACT_SZ_H HDMI_TG_BASE(0x002C)
  85. #define HDMI_TG_V_FSZ_L HDMI_TG_BASE(0x0030)
  86. #define HDMI_TG_V_FSZ_H HDMI_TG_BASE(0x0034)
  87. #define HDMI_TG_VSYNC_L HDMI_TG_BASE(0x0038)
  88. #define HDMI_TG_VSYNC_H HDMI_TG_BASE(0x003C)
  89. #define HDMI_TG_VSYNC2_L HDMI_TG_BASE(0x0040)
  90. #define HDMI_TG_VSYNC2_H HDMI_TG_BASE(0x0044)
  91. #define HDMI_TG_VACT_ST_L HDMI_TG_BASE(0x0048)
  92. #define HDMI_TG_VACT_ST_H HDMI_TG_BASE(0x004C)
  93. #define HDMI_TG_VACT_SZ_L HDMI_TG_BASE(0x0050)
  94. #define HDMI_TG_VACT_SZ_H HDMI_TG_BASE(0x0054)
  95. #define HDMI_TG_FIELD_CHG_L HDMI_TG_BASE(0x0058)
  96. #define HDMI_TG_FIELD_CHG_H HDMI_TG_BASE(0x005C)
  97. #define HDMI_TG_VACT_ST2_L HDMI_TG_BASE(0x0060)
  98. #define HDMI_TG_VACT_ST2_H HDMI_TG_BASE(0x0064)
  99. #define HDMI_TG_VSYNC_TOP_HDMI_L HDMI_TG_BASE(0x0078)
  100. #define HDMI_TG_VSYNC_TOP_HDMI_H HDMI_TG_BASE(0x007C)
  101. #define HDMI_TG_VSYNC_BOT_HDMI_L HDMI_TG_BASE(0x0080)
  102. #define HDMI_TG_VSYNC_BOT_HDMI_H HDMI_TG_BASE(0x0084)
  103. #define HDMI_TG_FIELD_TOP_HDMI_L HDMI_TG_BASE(0x0088)
  104. #define HDMI_TG_FIELD_TOP_HDMI_H HDMI_TG_BASE(0x008C)
  105. #define HDMI_TG_FIELD_BOT_HDMI_L HDMI_TG_BASE(0x0090)
  106. #define HDMI_TG_FIELD_BOT_HDMI_H HDMI_TG_BASE(0x0094)
  107. /*
  108. * Bit definition part
  109. */
  110. /* HDMI_INTC_CON */
  111. #define HDMI_INTC_EN_GLOBAL (1 << 6)
  112. #define HDMI_INTC_EN_HPD_PLUG (1 << 3)
  113. #define HDMI_INTC_EN_HPD_UNPLUG (1 << 2)
  114. /* HDMI_INTC_FLAG */
  115. #define HDMI_INTC_FLAG_HPD_PLUG (1 << 3)
  116. #define HDMI_INTC_FLAG_HPD_UNPLUG (1 << 2)
  117. /* HDMI_PHY_RSTOUT */
  118. #define HDMI_PHY_SW_RSTOUT (1 << 0)
  119. /* HDMI_CORE_RSTOUT */
  120. #define HDMI_CORE_SW_RSTOUT (1 << 0)
  121. /* HDMI_CON_0 */
  122. #define HDMI_BLUE_SCR_EN (1 << 5)
  123. #define HDMI_ASP_EN (1 << 2)
  124. #define HDMI_ASP_DIS (0 << 2)
  125. #define HDMI_ASP_MASK (1 << 2)
  126. #define HDMI_EN (1 << 0)
  127. /* HDMI_CON_2 */
  128. #define HDMI_VID_PREAMBLE_DIS (1 << 5)
  129. #define HDMI_GUARD_BAND_DIS (1 << 1)
  130. /* HDMI_PHY_STATUS */
  131. #define HDMI_PHY_STATUS_READY (1 << 0)
  132. /* HDMI_MODE_SEL */
  133. #define HDMI_MODE_HDMI_EN (1 << 1)
  134. #define HDMI_MODE_DVI_EN (1 << 0)
  135. #define HDMI_MODE_MASK (3 << 0)
  136. /* HDMI_TG_CMD */
  137. #define HDMI_TG_EN (1 << 0)
  138. #define HDMI_FIELD_EN (1 << 1)
  139. /* HDMI Version 1.4 */
  140. /* Control registers */
  141. /* #define HDMI_INTC_CON HDMI_CTRL_BASE(0x0000) */
  142. /* #define HDMI_INTC_FLAG HDMI_CTRL_BASE(0x0004) */
  143. #define HDMI_HDCP_KEY_LOAD HDMI_CTRL_BASE(0x0008)
  144. /* #define HDMI_HPD_STATUS HDMI_CTRL_BASE(0x000C) */
  145. #define HDMI_INTC_CON_1 HDMI_CTRL_BASE(0x0010)
  146. #define HDMI_INTC_FLAG_1 HDMI_CTRL_BASE(0x0014)
  147. #define HDMI_PHY_STATUS_0 HDMI_CTRL_BASE(0x0020)
  148. #define HDMI_PHY_STATUS_CMU HDMI_CTRL_BASE(0x0024)
  149. #define HDMI_PHY_STATUS_PLL HDMI_CTRL_BASE(0x0028)
  150. #define HDMI_PHY_CON_0 HDMI_CTRL_BASE(0x0030)
  151. #define HDMI_HPD_CTRL HDMI_CTRL_BASE(0x0040)
  152. #define HDMI_HPD_ST HDMI_CTRL_BASE(0x0044)
  153. #define HDMI_HPD_TH_X HDMI_CTRL_BASE(0x0050)
  154. #define HDMI_AUDIO_CLKSEL HDMI_CTRL_BASE(0x0070)
  155. #define HDMI_V14_PHY_RSTOUT HDMI_CTRL_BASE(0x0074)
  156. #define HDMI_PHY_VPLL HDMI_CTRL_BASE(0x0078)
  157. #define HDMI_PHY_CMU HDMI_CTRL_BASE(0x007C)
  158. #define HDMI_CORE_RSTOUT HDMI_CTRL_BASE(0x0080)
  159. /* PHY Control bit definition */
  160. /* HDMI_PHY_CON_0 */
  161. #define HDMI_PHY_POWER_OFF_EN (1 << 0)
  162. /* Video related registers */
  163. #define HDMI_YMAX HDMI_CORE_BASE(0x0060)
  164. #define HDMI_YMIN HDMI_CORE_BASE(0x0064)
  165. #define HDMI_CMAX HDMI_CORE_BASE(0x0068)
  166. #define HDMI_CMIN HDMI_CORE_BASE(0x006C)
  167. #define HDMI_V2_BLANK_0 HDMI_CORE_BASE(0x00B0)
  168. #define HDMI_V2_BLANK_1 HDMI_CORE_BASE(0x00B4)
  169. #define HDMI_V1_BLANK_0 HDMI_CORE_BASE(0x00B8)
  170. #define HDMI_V1_BLANK_1 HDMI_CORE_BASE(0x00BC)
  171. #define HDMI_V_LINE_0 HDMI_CORE_BASE(0x00C0)
  172. #define HDMI_V_LINE_1 HDMI_CORE_BASE(0x00C4)
  173. #define HDMI_H_LINE_0 HDMI_CORE_BASE(0x00C8)
  174. #define HDMI_H_LINE_1 HDMI_CORE_BASE(0x00CC)
  175. #define HDMI_HSYNC_POL HDMI_CORE_BASE(0x00E0)
  176. #define HDMI_V_BLANK_F0_0 HDMI_CORE_BASE(0x0110)
  177. #define HDMI_V_BLANK_F0_1 HDMI_CORE_BASE(0x0114)
  178. #define HDMI_V_BLANK_F1_0 HDMI_CORE_BASE(0x0118)
  179. #define HDMI_V_BLANK_F1_1 HDMI_CORE_BASE(0x011C)
  180. #define HDMI_H_SYNC_START_0 HDMI_CORE_BASE(0x0120)
  181. #define HDMI_H_SYNC_START_1 HDMI_CORE_BASE(0x0124)
  182. #define HDMI_H_SYNC_END_0 HDMI_CORE_BASE(0x0128)
  183. #define HDMI_H_SYNC_END_1 HDMI_CORE_BASE(0x012C)
  184. #define HDMI_V_SYNC_LINE_BEF_2_0 HDMI_CORE_BASE(0x0130)
  185. #define HDMI_V_SYNC_LINE_BEF_2_1 HDMI_CORE_BASE(0x0134)
  186. #define HDMI_V_SYNC_LINE_BEF_1_0 HDMI_CORE_BASE(0x0138)
  187. #define HDMI_V_SYNC_LINE_BEF_1_1 HDMI_CORE_BASE(0x013C)
  188. #define HDMI_V_SYNC_LINE_AFT_2_0 HDMI_CORE_BASE(0x0140)
  189. #define HDMI_V_SYNC_LINE_AFT_2_1 HDMI_CORE_BASE(0x0144)
  190. #define HDMI_V_SYNC_LINE_AFT_1_0 HDMI_CORE_BASE(0x0148)
  191. #define HDMI_V_SYNC_LINE_AFT_1_1 HDMI_CORE_BASE(0x014C)
  192. #define HDMI_V_SYNC_LINE_AFT_PXL_2_0 HDMI_CORE_BASE(0x0150)
  193. #define HDMI_V_SYNC_LINE_AFT_PXL_2_1 HDMI_CORE_BASE(0x0154)
  194. #define HDMI_V_SYNC_LINE_AFT_PXL_1_0 HDMI_CORE_BASE(0x0158)
  195. #define HDMI_V_SYNC_LINE_AFT_PXL_1_1 HDMI_CORE_BASE(0x015C)
  196. #define HDMI_V_BLANK_F2_0 HDMI_CORE_BASE(0x0160)
  197. #define HDMI_V_BLANK_F2_1 HDMI_CORE_BASE(0x0164)
  198. #define HDMI_V_BLANK_F3_0 HDMI_CORE_BASE(0x0168)
  199. #define HDMI_V_BLANK_F3_1 HDMI_CORE_BASE(0x016C)
  200. #define HDMI_V_BLANK_F4_0 HDMI_CORE_BASE(0x0170)
  201. #define HDMI_V_BLANK_F4_1 HDMI_CORE_BASE(0x0174)
  202. #define HDMI_V_BLANK_F5_0 HDMI_CORE_BASE(0x0178)
  203. #define HDMI_V_BLANK_F5_1 HDMI_CORE_BASE(0x017C)
  204. #define HDMI_V_SYNC_LINE_AFT_3_0 HDMI_CORE_BASE(0x0180)
  205. #define HDMI_V_SYNC_LINE_AFT_3_1 HDMI_CORE_BASE(0x0184)
  206. #define HDMI_V_SYNC_LINE_AFT_4_0 HDMI_CORE_BASE(0x0188)
  207. #define HDMI_V_SYNC_LINE_AFT_4_1 HDMI_CORE_BASE(0x018C)
  208. #define HDMI_V_SYNC_LINE_AFT_5_0 HDMI_CORE_BASE(0x0190)
  209. #define HDMI_V_SYNC_LINE_AFT_5_1 HDMI_CORE_BASE(0x0194)
  210. #define HDMI_V_SYNC_LINE_AFT_6_0 HDMI_CORE_BASE(0x0198)
  211. #define HDMI_V_SYNC_LINE_AFT_6_1 HDMI_CORE_BASE(0x019C)
  212. #define HDMI_V_SYNC_LINE_AFT_PXL_3_0 HDMI_CORE_BASE(0x01A0)
  213. #define HDMI_V_SYNC_LINE_AFT_PXL_3_1 HDMI_CORE_BASE(0x01A4)
  214. #define HDMI_V_SYNC_LINE_AFT_PXL_4_0 HDMI_CORE_BASE(0x01A8)
  215. #define HDMI_V_SYNC_LINE_AFT_PXL_4_1 HDMI_CORE_BASE(0x01AC)
  216. #define HDMI_V_SYNC_LINE_AFT_PXL_5_0 HDMI_CORE_BASE(0x01B0)
  217. #define HDMI_V_SYNC_LINE_AFT_PXL_5_1 HDMI_CORE_BASE(0x01B4)
  218. #define HDMI_V_SYNC_LINE_AFT_PXL_6_0 HDMI_CORE_BASE(0x01B8)
  219. #define HDMI_V_SYNC_LINE_AFT_PXL_6_1 HDMI_CORE_BASE(0x01BC)
  220. #define HDMI_VACT_SPACE_1_0 HDMI_CORE_BASE(0x01C0)
  221. #define HDMI_VACT_SPACE_1_1 HDMI_CORE_BASE(0x01C4)
  222. #define HDMI_VACT_SPACE_2_0 HDMI_CORE_BASE(0x01C8)
  223. #define HDMI_VACT_SPACE_2_1 HDMI_CORE_BASE(0x01CC)
  224. #define HDMI_VACT_SPACE_3_0 HDMI_CORE_BASE(0x01D0)
  225. #define HDMI_VACT_SPACE_3_1 HDMI_CORE_BASE(0x01D4)
  226. #define HDMI_VACT_SPACE_4_0 HDMI_CORE_BASE(0x01D8)
  227. #define HDMI_VACT_SPACE_4_1 HDMI_CORE_BASE(0x01DC)
  228. #define HDMI_VACT_SPACE_5_0 HDMI_CORE_BASE(0x01E0)
  229. #define HDMI_VACT_SPACE_5_1 HDMI_CORE_BASE(0x01E4)
  230. #define HDMI_VACT_SPACE_6_0 HDMI_CORE_BASE(0x01E8)
  231. #define HDMI_VACT_SPACE_6_1 HDMI_CORE_BASE(0x01EC)
  232. #define HDMI_GCP_CON HDMI_CORE_BASE(0x0200)
  233. #define HDMI_GCP_BYTE1 HDMI_CORE_BASE(0x0210)
  234. #define HDMI_GCP_BYTE2 HDMI_CORE_BASE(0x0214)
  235. #define HDMI_GCP_BYTE3 HDMI_CORE_BASE(0x0218)
  236. /* Audio related registers */
  237. #define HDMI_ASP_CON HDMI_CORE_BASE(0x0300)
  238. #define HDMI_ASP_SP_FLAT HDMI_CORE_BASE(0x0304)
  239. #define HDMI_ASP_CHCFG0 HDMI_CORE_BASE(0x0310)
  240. #define HDMI_ASP_CHCFG1 HDMI_CORE_BASE(0x0314)
  241. #define HDMI_ASP_CHCFG2 HDMI_CORE_BASE(0x0318)
  242. #define HDMI_ASP_CHCFG3 HDMI_CORE_BASE(0x031C)
  243. #define HDMI_V13_ACR_CON HDMI_CORE_BASE(0x0180)
  244. #define HDMI_V13_ACR_MCTS0 HDMI_CORE_BASE(0x0184)
  245. #define HDMI_V13_ACR_MCTS1 HDMI_CORE_BASE(0x0188)
  246. #define HDMI_V13_ACR_MCTS2 HDMI_CORE_BASE(0x018C)
  247. #define HDMI_V13_ACR_CTS0 HDMI_CORE_BASE(0x0190)
  248. #define HDMI_V13_ACR_CTS1 HDMI_CORE_BASE(0x0194)
  249. #define HDMI_V13_ACR_CTS2 HDMI_CORE_BASE(0x0198)
  250. #define HDMI_V13_ACR_N0 HDMI_CORE_BASE(0x01A0)
  251. #define HDMI_V13_ACR_N1 HDMI_CORE_BASE(0x01A4)
  252. #define HDMI_V13_ACR_N2 HDMI_CORE_BASE(0x01A8)
  253. #define HDMI_V14_ACR_CON HDMI_CORE_BASE(0x0400)
  254. #define HDMI_V14_ACR_MCTS0 HDMI_CORE_BASE(0x0410)
  255. #define HDMI_V14_ACR_MCTS1 HDMI_CORE_BASE(0x0414)
  256. #define HDMI_V14_ACR_MCTS2 HDMI_CORE_BASE(0x0418)
  257. #define HDMI_V14_ACR_CTS0 HDMI_CORE_BASE(0x0420)
  258. #define HDMI_V14_ACR_CTS1 HDMI_CORE_BASE(0x0424)
  259. #define HDMI_V14_ACR_CTS2 HDMI_CORE_BASE(0x0428)
  260. #define HDMI_V14_ACR_N0 HDMI_CORE_BASE(0x0430)
  261. #define HDMI_V14_ACR_N1 HDMI_CORE_BASE(0x0434)
  262. #define HDMI_V14_ACR_N2 HDMI_CORE_BASE(0x0438)
  263. /* Packet related registers */
  264. #define HDMI_ACP_CON HDMI_CORE_BASE(0x0500)
  265. #define HDMI_ACP_TYPE HDMI_CORE_BASE(0x0514)
  266. #define HDMI_ACP_DATA(n) HDMI_CORE_BASE(0x0520 + 4 * (n))
  267. #define HDMI_ISRC_CON HDMI_CORE_BASE(0x0600)
  268. #define HDMI_ISRC1_HEADER1 HDMI_CORE_BASE(0x0614)
  269. #define HDMI_ISRC1_DATA(n) HDMI_CORE_BASE(0x0620 + 4 * (n))
  270. #define HDMI_ISRC2_DATA(n) HDMI_CORE_BASE(0x06A0 + 4 * (n))
  271. #define HDMI_AVI_CON HDMI_CORE_BASE(0x0700)
  272. #define HDMI_AVI_HEADER0 HDMI_CORE_BASE(0x0710)
  273. #define HDMI_AVI_HEADER1 HDMI_CORE_BASE(0x0714)
  274. #define HDMI_AVI_HEADER2 HDMI_CORE_BASE(0x0718)
  275. #define HDMI_AVI_CHECK_SUM HDMI_CORE_BASE(0x071C)
  276. #define HDMI_AVI_BYTE(n) HDMI_CORE_BASE(0x0720 + 4 * (n-1))
  277. #define HDMI_AUI_CON HDMI_CORE_BASE(0x0800)
  278. #define HDMI_AUI_HEADER0 HDMI_CORE_BASE(0x0810)
  279. #define HDMI_AUI_HEADER1 HDMI_CORE_BASE(0x0814)
  280. #define HDMI_AUI_HEADER2 HDMI_CORE_BASE(0x0818)
  281. #define HDMI_AUI_CHECK_SUM HDMI_CORE_BASE(0x081C)
  282. #define HDMI_AUI_BYTE(n) HDMI_CORE_BASE(0x0820 + 4 * (n-1))
  283. #define HDMI_MPG_CON HDMI_CORE_BASE(0x0900)
  284. #define HDMI_MPG_CHECK_SUM HDMI_CORE_BASE(0x091C)
  285. #define HDMI_MPG_DATA(n) HDMI_CORE_BASE(0x0920 + 4 * (n))
  286. #define HDMI_SPD_CON HDMI_CORE_BASE(0x0A00)
  287. #define HDMI_SPD_HEADER0 HDMI_CORE_BASE(0x0A10)
  288. #define HDMI_SPD_HEADER1 HDMI_CORE_BASE(0x0A14)
  289. #define HDMI_SPD_HEADER2 HDMI_CORE_BASE(0x0A18)
  290. #define HDMI_SPD_DATA(n) HDMI_CORE_BASE(0x0A20 + 4 * (n))
  291. #define HDMI_GAMUT_CON HDMI_CORE_BASE(0x0B00)
  292. #define HDMI_GAMUT_HEADER0 HDMI_CORE_BASE(0x0B10)
  293. #define HDMI_GAMUT_HEADER1 HDMI_CORE_BASE(0x0B14)
  294. #define HDMI_GAMUT_HEADER2 HDMI_CORE_BASE(0x0B18)
  295. #define HDMI_GAMUT_METADATA(n) HDMI_CORE_BASE(0x0B20 + 4 * (n))
  296. #define HDMI_VSI_CON HDMI_CORE_BASE(0x0C00)
  297. #define HDMI_VSI_HEADER0 HDMI_CORE_BASE(0x0C10)
  298. #define HDMI_VSI_HEADER1 HDMI_CORE_BASE(0x0C14)
  299. #define HDMI_VSI_HEADER2 HDMI_CORE_BASE(0x0C18)
  300. #define HDMI_VSI_DATA(n) HDMI_CORE_BASE(0x0C20 + 4 * (n))
  301. #define HDMI_DC_CONTROL HDMI_CORE_BASE(0x0D00)
  302. #define HDMI_VIDEO_PATTERN_GEN HDMI_CORE_BASE(0x0D04)
  303. #define HDMI_AN_SEED_SEL HDMI_CORE_BASE(0x0E48)
  304. #define HDMI_AN_SEED_0 HDMI_CORE_BASE(0x0E58)
  305. #define HDMI_AN_SEED_1 HDMI_CORE_BASE(0x0E5C)
  306. #define HDMI_AN_SEED_2 HDMI_CORE_BASE(0x0E60)
  307. #define HDMI_AN_SEED_3 HDMI_CORE_BASE(0x0E64)
  308. /* AVI bit definition */
  309. #define HDMI_AVI_CON_DO_NOT_TRANSMIT (0 << 1)
  310. #define HDMI_AVI_CON_EVERY_VSYNC (1 << 1)
  311. #define AVI_ACTIVE_FORMAT_VALID (1 << 4)
  312. #define AVI_UNDERSCANNED_DISPLAY_VALID (1 << 1)
  313. /* AUI bit definition */
  314. #define HDMI_AUI_CON_NO_TRAN (0 << 0)
  315. /* VSI bit definition */
  316. #define HDMI_VSI_CON_DO_NOT_TRANSMIT (0 << 0)
  317. /* HDCP related registers */
  318. #define HDMI_HDCP_SHA1(n) HDMI_CORE_BASE(0x7000 + 4 * (n))
  319. #define HDMI_HDCP_KSV_LIST(n) HDMI_CORE_BASE(0x7050 + 4 * (n))
  320. #define HDMI_HDCP_KSV_LIST_CON HDMI_CORE_BASE(0x7064)
  321. #define HDMI_HDCP_SHA_RESULT HDMI_CORE_BASE(0x7070)
  322. #define HDMI_HDCP_CTRL1 HDMI_CORE_BASE(0x7080)
  323. #define HDMI_HDCP_CTRL2 HDMI_CORE_BASE(0x7084)
  324. #define HDMI_HDCP_CHECK_RESULT HDMI_CORE_BASE(0x7090)
  325. #define HDMI_HDCP_BKSV(n) HDMI_CORE_BASE(0x70A0 + 4 * (n))
  326. #define HDMI_HDCP_AKSV(n) HDMI_CORE_BASE(0x70C0 + 4 * (n))
  327. #define HDMI_HDCP_AN(n) HDMI_CORE_BASE(0x70E0 + 4 * (n))
  328. #define HDMI_HDCP_BCAPS HDMI_CORE_BASE(0x7100)
  329. #define HDMI_HDCP_BSTATUS_0 HDMI_CORE_BASE(0x7110)
  330. #define HDMI_HDCP_BSTATUS_1 HDMI_CORE_BASE(0x7114)
  331. #define HDMI_HDCP_RI_0 HDMI_CORE_BASE(0x7140)
  332. #define HDMI_HDCP_RI_1 HDMI_CORE_BASE(0x7144)
  333. #define HDMI_HDCP_I2C_INT HDMI_CORE_BASE(0x7180)
  334. #define HDMI_HDCP_AN_INT HDMI_CORE_BASE(0x7190)
  335. #define HDMI_HDCP_WDT_INT HDMI_CORE_BASE(0x71A0)
  336. #define HDMI_HDCP_RI_INT HDMI_CORE_BASE(0x71B0)
  337. #define HDMI_HDCP_RI_COMPARE_0 HDMI_CORE_BASE(0x71D0)
  338. #define HDMI_HDCP_RI_COMPARE_1 HDMI_CORE_BASE(0x71D4)
  339. #define HDMI_HDCP_FRAME_COUNT HDMI_CORE_BASE(0x71E0)
  340. #define HDMI_RGB_ROUND_EN HDMI_CORE_BASE(0xD500)
  341. #define HDMI_VACT_SPACE_R_0 HDMI_CORE_BASE(0xD504)
  342. #define HDMI_VACT_SPACE_R_1 HDMI_CORE_BASE(0xD508)
  343. #define HDMI_VACT_SPACE_G_0 HDMI_CORE_BASE(0xD50C)
  344. #define HDMI_VACT_SPACE_G_1 HDMI_CORE_BASE(0xD510)
  345. #define HDMI_VACT_SPACE_B_0 HDMI_CORE_BASE(0xD514)
  346. #define HDMI_VACT_SPACE_B_1 HDMI_CORE_BASE(0xD518)
  347. #define HDMI_BLUE_SCREEN_B_0 HDMI_CORE_BASE(0xD520)
  348. #define HDMI_BLUE_SCREEN_B_1 HDMI_CORE_BASE(0xD524)
  349. #define HDMI_BLUE_SCREEN_G_0 HDMI_CORE_BASE(0xD528)
  350. #define HDMI_BLUE_SCREEN_G_1 HDMI_CORE_BASE(0xD52C)
  351. #define HDMI_BLUE_SCREEN_R_0 HDMI_CORE_BASE(0xD530)
  352. #define HDMI_BLUE_SCREEN_R_1 HDMI_CORE_BASE(0xD534)
  353. /* HDMI I2S register */
  354. #define HDMI_I2S_CLK_CON HDMI_I2S_BASE(0x000)
  355. #define HDMI_I2S_CON_1 HDMI_I2S_BASE(0x004)
  356. #define HDMI_I2S_CON_2 HDMI_I2S_BASE(0x008)
  357. #define HDMI_I2S_PIN_SEL_0 HDMI_I2S_BASE(0x00c)
  358. #define HDMI_I2S_PIN_SEL_1 HDMI_I2S_BASE(0x010)
  359. #define HDMI_I2S_PIN_SEL_2 HDMI_I2S_BASE(0x014)
  360. #define HDMI_I2S_PIN_SEL_3 HDMI_I2S_BASE(0x018)
  361. #define HDMI_I2S_DSD_CON HDMI_I2S_BASE(0x01c)
  362. #define HDMI_I2S_MUX_CON HDMI_I2S_BASE(0x020)
  363. #define HDMI_I2S_CH_ST_CON HDMI_I2S_BASE(0x024)
  364. #define HDMI_I2S_CH_ST_0 HDMI_I2S_BASE(0x028)
  365. #define HDMI_I2S_CH_ST_1 HDMI_I2S_BASE(0x02c)
  366. #define HDMI_I2S_CH_ST_2 HDMI_I2S_BASE(0x030)
  367. #define HDMI_I2S_CH_ST_3 HDMI_I2S_BASE(0x034)
  368. #define HDMI_I2S_CH_ST_4 HDMI_I2S_BASE(0x038)
  369. #define HDMI_I2S_CH_ST_SH_0 HDMI_I2S_BASE(0x03c)
  370. #define HDMI_I2S_CH_ST_SH_1 HDMI_I2S_BASE(0x040)
  371. #define HDMI_I2S_CH_ST_SH_2 HDMI_I2S_BASE(0x044)
  372. #define HDMI_I2S_CH_ST_SH_3 HDMI_I2S_BASE(0x048)
  373. #define HDMI_I2S_CH_ST_SH_4 HDMI_I2S_BASE(0x04c)
  374. #define HDMI_I2S_MUX_CH HDMI_I2S_BASE(0x054)
  375. #define HDMI_I2S_MUX_CUV HDMI_I2S_BASE(0x058)
  376. /* I2S bit definition */
  377. /* I2S_CLK_CON */
  378. #define HDMI_I2S_CLK_DIS (0)
  379. #define HDMI_I2S_CLK_EN (1)
  380. /* I2S_CON_1 */
  381. #define HDMI_I2S_SCLK_FALLING_EDGE (0 << 1)
  382. #define HDMI_I2S_SCLK_RISING_EDGE (1 << 1)
  383. #define HDMI_I2S_L_CH_LOW_POL (0)
  384. #define HDMI_I2S_L_CH_HIGH_POL (1)
  385. /* I2S_CON_2 */
  386. #define HDMI_I2S_MSB_FIRST_MODE (0 << 6)
  387. #define HDMI_I2S_LSB_FIRST_MODE (1 << 6)
  388. #define HDMI_I2S_BIT_CH_32FS (0 << 4)
  389. #define HDMI_I2S_BIT_CH_48FS (1 << 4)
  390. #define HDMI_I2S_BIT_CH_RESERVED (2 << 4)
  391. #define HDMI_I2S_SDATA_16BIT (1 << 2)
  392. #define HDMI_I2S_SDATA_20BIT (2 << 2)
  393. #define HDMI_I2S_SDATA_24BIT (3 << 2)
  394. #define HDMI_I2S_BASIC_FORMAT (0)
  395. #define HDMI_I2S_L_JUST_FORMAT (2)
  396. #define HDMI_I2S_R_JUST_FORMAT (3)
  397. #define HDMI_I2S_CON_2_CLR (~(0xFF))
  398. #define HDMI_I2S_SET_BIT_CH(x) (((x) & 0x7) << 4)
  399. #define HDMI_I2S_SET_SDATA_BIT(x) (((x) & 0x7) << 2)
  400. /* I2S_PIN_SEL_0 */
  401. #define HDMI_I2S_SEL_SCLK(x) (((x) & 0x7) << 4)
  402. #define HDMI_I2S_SEL_LRCK(x) ((x) & 0x7)
  403. /* I2S_PIN_SEL_1 */
  404. #define HDMI_I2S_SEL_SDATA1(x) (((x) & 0x7) << 4)
  405. #define HDMI_I2S_SEL_SDATA2(x) ((x) & 0x7)
  406. /* I2S_PIN_SEL_2 */
  407. #define HDMI_I2S_SEL_SDATA3(x) (((x) & 0x7) << 4)
  408. #define HDMI_I2S_SEL_SDATA2(x) ((x) & 0x7)
  409. /* I2S_PIN_SEL_3 */
  410. #define HDMI_I2S_SEL_DSD(x) ((x) & 0x7)
  411. /* I2S_DSD_CON */
  412. #define HDMI_I2S_DSD_CLK_RI_EDGE (1 << 1)
  413. #define HDMI_I2S_DSD_CLK_FA_EDGE (0 << 1)
  414. #define HDMI_I2S_DSD_ENABLE (1)
  415. #define HDMI_I2S_DSD_DISABLE (0)
  416. /* I2S_MUX_CON */
  417. #define HDMI_I2S_NOISE_FILTER_ZERO (0 << 5)
  418. #define HDMI_I2S_NOISE_FILTER_2_STAGE (1 << 5)
  419. #define HDMI_I2S_NOISE_FILTER_3_STAGE (2 << 5)
  420. #define HDMI_I2S_NOISE_FILTER_4_STAGE (3 << 5)
  421. #define HDMI_I2S_NOISE_FILTER_5_STAGE (4 << 5)
  422. #define HDMI_I2S_IN_DISABLE (1 << 4)
  423. #define HDMI_I2S_IN_ENABLE (0 << 4)
  424. #define HDMI_I2S_AUD_SPDIF (0 << 2)
  425. #define HDMI_I2S_AUD_I2S (1 << 2)
  426. #define HDMI_I2S_AUD_DSD (2 << 2)
  427. #define HDMI_I2S_CUV_SPDIF_ENABLE (0 << 1)
  428. #define HDMI_I2S_CUV_I2S_ENABLE (1 << 1)
  429. #define HDMI_I2S_MUX_DISABLE (0)
  430. #define HDMI_I2S_MUX_ENABLE (1)
  431. #define HDMI_I2S_MUX_CON_CLR (~(0xFF))
  432. /* I2S_CH_ST_CON */
  433. #define HDMI_I2S_CH_STATUS_RELOAD (1)
  434. #define HDMI_I2S_CH_ST_CON_CLR (~(1))
  435. /* I2S_CH_ST_0 / I2S_CH_ST_SH_0 */
  436. #define HDMI_I2S_CH_STATUS_MODE_0 (0 << 6)
  437. #define HDMI_I2S_2AUD_CH_WITHOUT_PREEMPH (0 << 3)
  438. #define HDMI_I2S_2AUD_CH_WITH_PREEMPH (1 << 3)
  439. #define HDMI_I2S_DEFAULT_EMPHASIS (0 << 3)
  440. #define HDMI_I2S_COPYRIGHT (0 << 2)
  441. #define HDMI_I2S_NO_COPYRIGHT (1 << 2)
  442. #define HDMI_I2S_LINEAR_PCM (0 << 1)
  443. #define HDMI_I2S_NO_LINEAR_PCM (1 << 1)
  444. #define HDMI_I2S_CONSUMER_FORMAT (0)
  445. #define HDMI_I2S_PROF_FORMAT (1)
  446. #define HDMI_I2S_CH_ST_0_CLR (~(0xFF))
  447. /* I2S_CH_ST_1 / I2S_CH_ST_SH_1 */
  448. #define HDMI_I2S_CD_PLAYER (0x00)
  449. #define HDMI_I2S_DAT_PLAYER (0x03)
  450. #define HDMI_I2S_DCC_PLAYER (0x43)
  451. #define HDMI_I2S_MINI_DISC_PLAYER (0x49)
  452. /* I2S_CH_ST_2 / I2S_CH_ST_SH_2 */
  453. #define HDMI_I2S_CHANNEL_NUM_MASK (0xF << 4)
  454. #define HDMI_I2S_SOURCE_NUM_MASK (0xF)
  455. #define HDMI_I2S_SET_CHANNEL_NUM(x) (((x) & (0xF)) << 4)
  456. #define HDMI_I2S_SET_SOURCE_NUM(x) ((x) & (0xF))
  457. /* I2S_CH_ST_3 / I2S_CH_ST_SH_3 */
  458. #define HDMI_I2S_CLK_ACCUR_LEVEL_1 (1 << 4)
  459. #define HDMI_I2S_CLK_ACCUR_LEVEL_2 (0 << 4)
  460. #define HDMI_I2S_CLK_ACCUR_LEVEL_3 (2 << 4)
  461. #define HDMI_I2S_SMP_FREQ_44_1 (0x0)
  462. #define HDMI_I2S_SMP_FREQ_48 (0x2)
  463. #define HDMI_I2S_SMP_FREQ_32 (0x3)
  464. #define HDMI_I2S_SMP_FREQ_96 (0xA)
  465. #define HDMI_I2S_SET_SMP_FREQ(x) ((x) & (0xF))
  466. /* I2S_CH_ST_4 / I2S_CH_ST_SH_4 */
  467. #define HDMI_I2S_ORG_SMP_FREQ_44_1 (0xF << 4)
  468. #define HDMI_I2S_ORG_SMP_FREQ_88_2 (0x7 << 4)
  469. #define HDMI_I2S_ORG_SMP_FREQ_22_05 (0xB << 4)
  470. #define HDMI_I2S_ORG_SMP_FREQ_176_4 (0x3 << 4)
  471. #define HDMI_I2S_WORD_LEN_NOT_DEFINE (0x0 << 1)
  472. #define HDMI_I2S_WORD_LEN_MAX24_20BITS (0x1 << 1)
  473. #define HDMI_I2S_WORD_LEN_MAX24_22BITS (0x2 << 1)
  474. #define HDMI_I2S_WORD_LEN_MAX24_23BITS (0x4 << 1)
  475. #define HDMI_I2S_WORD_LEN_MAX24_24BITS (0x5 << 1)
  476. #define HDMI_I2S_WORD_LEN_MAX24_21BITS (0x6 << 1)
  477. #define HDMI_I2S_WORD_LEN_MAX20_16BITS (0x1 << 1)
  478. #define HDMI_I2S_WORD_LEN_MAX20_18BITS (0x2 << 1)
  479. #define HDMI_I2S_WORD_LEN_MAX20_19BITS (0x4 << 1)
  480. #define HDMI_I2S_WORD_LEN_MAX20_20BITS (0x5 << 1)
  481. #define HDMI_I2S_WORD_LEN_MAX20_17BITS (0x6 << 1)
  482. #define HDMI_I2S_WORD_LEN_MAX_24BITS (1)
  483. #define HDMI_I2S_WORD_LEN_MAX_20BITS (0)
  484. /* I2S_MUX_CH */
  485. #define HDMI_I2S_CH3_R_EN (1 << 7)
  486. #define HDMI_I2S_CH3_L_EN (1 << 6)
  487. #define HDMI_I2S_CH3_EN (3 << 6)
  488. #define HDMI_I2S_CH2_R_EN (1 << 5)
  489. #define HDMI_I2S_CH2_L_EN (1 << 4)
  490. #define HDMI_I2S_CH2_EN (3 << 4)
  491. #define HDMI_I2S_CH1_R_EN (1 << 3)
  492. #define HDMI_I2S_CH1_L_EN (1 << 2)
  493. #define HDMI_I2S_CH1_EN (3 << 2)
  494. #define HDMI_I2S_CH0_R_EN (1 << 1)
  495. #define HDMI_I2S_CH0_L_EN (1)
  496. #define HDMI_I2S_CH0_EN (3)
  497. #define HDMI_I2S_CH_ALL_EN (0xFF)
  498. #define HDMI_I2S_MUX_CH_CLR (~HDMI_I2S_CH_ALL_EN)
  499. /* I2S_MUX_CUV */
  500. #define HDMI_I2S_CUV_R_EN (1 << 1)
  501. #define HDMI_I2S_CUV_L_EN (1)
  502. #define HDMI_I2S_CUV_RL_EN (0x03)
  503. /* I2S_CUV_L_R */
  504. #define HDMI_I2S_CUV_R_DATA_MASK (0x7 << 4)
  505. #define HDMI_I2S_CUV_L_DATA_MASK (0x7)
  506. /* Timing generator registers */
  507. /* TG configure/status registers */
  508. #define HDMI_TG_VACT_ST3_L HDMI_TG_BASE(0x0068)
  509. #define HDMI_TG_VACT_ST3_H HDMI_TG_BASE(0x006c)
  510. #define HDMI_TG_VACT_ST4_L HDMI_TG_BASE(0x0070)
  511. #define HDMI_TG_VACT_ST4_H HDMI_TG_BASE(0x0074)
  512. #define HDMI_TG_3D HDMI_TG_BASE(0x00F0)
  513. /* HDMI PHY Registers Offsets*/
  514. #define HDMIPHY_POWER (0x74 >> 2)
  515. #define HDMIPHY_MODE_SET_DONE (0x7c >> 2)
  516. /* HDMI PHY Values */
  517. #define HDMI_PHY_POWER_ON 0x80
  518. #define HDMI_PHY_POWER_OFF 0xff
  519. /* HDMI PHY Values */
  520. #define HDMI_PHY_DISABLE_MODE_SET 0x80
  521. #define HDMI_PHY_ENABLE_MODE_SET 0x00
  522. /* PMU Registers for PHY */
  523. #define PMU_HDMI_PHY_CONTROL 0x700
  524. #define PMU_HDMI_PHY_ENABLE_BIT BIT(0)
  525. #endif /* SAMSUNG_REGS_HDMI_H */