regs-hdmi.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* linux/arch/arm/mach-exynos4/include/mach/regs-hdmi.h
  2. *
  3. * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com/
  5. *
  6. * HDMI register header file for Samsung TVOUT driver
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef SAMSUNG_REGS_HDMI_H
  13. #define SAMSUNG_REGS_HDMI_H
  14. /*
  15. * Register part
  16. */
  17. #define HDMI_CTRL_BASE(x) ((x) + 0x00000000)
  18. #define HDMI_CORE_BASE(x) ((x) + 0x00010000)
  19. #define HDMI_TG_BASE(x) ((x) + 0x00050000)
  20. /* Control registers */
  21. #define HDMI_INTC_CON HDMI_CTRL_BASE(0x0000)
  22. #define HDMI_INTC_FLAG HDMI_CTRL_BASE(0x0004)
  23. #define HDMI_HPD_STATUS HDMI_CTRL_BASE(0x000C)
  24. #define HDMI_PHY_RSTOUT HDMI_CTRL_BASE(0x0014)
  25. #define HDMI_PHY_VPLL HDMI_CTRL_BASE(0x0018)
  26. #define HDMI_PHY_CMU HDMI_CTRL_BASE(0x001C)
  27. #define HDMI_CORE_RSTOUT HDMI_CTRL_BASE(0x0020)
  28. /* Core registers */
  29. #define HDMI_CON_0 HDMI_CORE_BASE(0x0000)
  30. #define HDMI_CON_1 HDMI_CORE_BASE(0x0004)
  31. #define HDMI_CON_2 HDMI_CORE_BASE(0x0008)
  32. #define HDMI_SYS_STATUS HDMI_CORE_BASE(0x0010)
  33. #define HDMI_PHY_STATUS HDMI_CORE_BASE(0x0014)
  34. #define HDMI_STATUS_EN HDMI_CORE_BASE(0x0020)
  35. #define HDMI_HPD HDMI_CORE_BASE(0x0030)
  36. #define HDMI_MODE_SEL HDMI_CORE_BASE(0x0040)
  37. #define HDMI_BLUE_SCREEN_0 HDMI_CORE_BASE(0x0050)
  38. #define HDMI_BLUE_SCREEN_1 HDMI_CORE_BASE(0x0054)
  39. #define HDMI_BLUE_SCREEN_2 HDMI_CORE_BASE(0x0058)
  40. #define HDMI_H_BLANK_0 HDMI_CORE_BASE(0x00A0)
  41. #define HDMI_H_BLANK_1 HDMI_CORE_BASE(0x00A4)
  42. #define HDMI_V_BLANK_0 HDMI_CORE_BASE(0x00B0)
  43. #define HDMI_V_BLANK_1 HDMI_CORE_BASE(0x00B4)
  44. #define HDMI_V_BLANK_2 HDMI_CORE_BASE(0x00B8)
  45. #define HDMI_H_V_LINE_0 HDMI_CORE_BASE(0x00C0)
  46. #define HDMI_H_V_LINE_1 HDMI_CORE_BASE(0x00C4)
  47. #define HDMI_H_V_LINE_2 HDMI_CORE_BASE(0x00C8)
  48. #define HDMI_VSYNC_POL HDMI_CORE_BASE(0x00E4)
  49. #define HDMI_INT_PRO_MODE HDMI_CORE_BASE(0x00E8)
  50. #define HDMI_V_BLANK_F_0 HDMI_CORE_BASE(0x0110)
  51. #define HDMI_V_BLANK_F_1 HDMI_CORE_BASE(0x0114)
  52. #define HDMI_V_BLANK_F_2 HDMI_CORE_BASE(0x0118)
  53. #define HDMI_H_SYNC_GEN_0 HDMI_CORE_BASE(0x0120)
  54. #define HDMI_H_SYNC_GEN_1 HDMI_CORE_BASE(0x0124)
  55. #define HDMI_H_SYNC_GEN_2 HDMI_CORE_BASE(0x0128)
  56. #define HDMI_V_SYNC_GEN_1_0 HDMI_CORE_BASE(0x0130)
  57. #define HDMI_V_SYNC_GEN_1_1 HDMI_CORE_BASE(0x0134)
  58. #define HDMI_V_SYNC_GEN_1_2 HDMI_CORE_BASE(0x0138)
  59. #define HDMI_V_SYNC_GEN_2_0 HDMI_CORE_BASE(0x0140)
  60. #define HDMI_V_SYNC_GEN_2_1 HDMI_CORE_BASE(0x0144)
  61. #define HDMI_V_SYNC_GEN_2_2 HDMI_CORE_BASE(0x0148)
  62. #define HDMI_V_SYNC_GEN_3_0 HDMI_CORE_BASE(0x0150)
  63. #define HDMI_V_SYNC_GEN_3_1 HDMI_CORE_BASE(0x0154)
  64. #define HDMI_V_SYNC_GEN_3_2 HDMI_CORE_BASE(0x0158)
  65. #define HDMI_AVI_CON HDMI_CORE_BASE(0x0300)
  66. #define HDMI_AVI_BYTE(n) HDMI_CORE_BASE(0x0320 + 4 * (n))
  67. #define HDMI_DC_CONTROL HDMI_CORE_BASE(0x05C0)
  68. #define HDMI_VIDEO_PATTERN_GEN HDMI_CORE_BASE(0x05C4)
  69. #define HDMI_HPD_GEN HDMI_CORE_BASE(0x05C8)
  70. /* Timing generator registers */
  71. #define HDMI_TG_CMD HDMI_TG_BASE(0x0000)
  72. #define HDMI_TG_H_FSZ_L HDMI_TG_BASE(0x0018)
  73. #define HDMI_TG_H_FSZ_H HDMI_TG_BASE(0x001C)
  74. #define HDMI_TG_HACT_ST_L HDMI_TG_BASE(0x0020)
  75. #define HDMI_TG_HACT_ST_H HDMI_TG_BASE(0x0024)
  76. #define HDMI_TG_HACT_SZ_L HDMI_TG_BASE(0x0028)
  77. #define HDMI_TG_HACT_SZ_H HDMI_TG_BASE(0x002C)
  78. #define HDMI_TG_V_FSZ_L HDMI_TG_BASE(0x0030)
  79. #define HDMI_TG_V_FSZ_H HDMI_TG_BASE(0x0034)
  80. #define HDMI_TG_VSYNC_L HDMI_TG_BASE(0x0038)
  81. #define HDMI_TG_VSYNC_H HDMI_TG_BASE(0x003C)
  82. #define HDMI_TG_VSYNC2_L HDMI_TG_BASE(0x0040)
  83. #define HDMI_TG_VSYNC2_H HDMI_TG_BASE(0x0044)
  84. #define HDMI_TG_VACT_ST_L HDMI_TG_BASE(0x0048)
  85. #define HDMI_TG_VACT_ST_H HDMI_TG_BASE(0x004C)
  86. #define HDMI_TG_VACT_SZ_L HDMI_TG_BASE(0x0050)
  87. #define HDMI_TG_VACT_SZ_H HDMI_TG_BASE(0x0054)
  88. #define HDMI_TG_FIELD_CHG_L HDMI_TG_BASE(0x0058)
  89. #define HDMI_TG_FIELD_CHG_H HDMI_TG_BASE(0x005C)
  90. #define HDMI_TG_VACT_ST2_L HDMI_TG_BASE(0x0060)
  91. #define HDMI_TG_VACT_ST2_H HDMI_TG_BASE(0x0064)
  92. #define HDMI_TG_VSYNC_TOP_HDMI_L HDMI_TG_BASE(0x0078)
  93. #define HDMI_TG_VSYNC_TOP_HDMI_H HDMI_TG_BASE(0x007C)
  94. #define HDMI_TG_VSYNC_BOT_HDMI_L HDMI_TG_BASE(0x0080)
  95. #define HDMI_TG_VSYNC_BOT_HDMI_H HDMI_TG_BASE(0x0084)
  96. #define HDMI_TG_FIELD_TOP_HDMI_L HDMI_TG_BASE(0x0088)
  97. #define HDMI_TG_FIELD_TOP_HDMI_H HDMI_TG_BASE(0x008C)
  98. #define HDMI_TG_FIELD_BOT_HDMI_L HDMI_TG_BASE(0x0090)
  99. #define HDMI_TG_FIELD_BOT_HDMI_H HDMI_TG_BASE(0x0094)
  100. /*
  101. * Bit definition part
  102. */
  103. /* HDMI_INTC_CON */
  104. #define HDMI_INTC_EN_GLOBAL (1 << 6)
  105. #define HDMI_INTC_EN_HPD_PLUG (1 << 3)
  106. #define HDMI_INTC_EN_HPD_UNPLUG (1 << 2)
  107. /* HDMI_INTC_FLAG */
  108. #define HDMI_INTC_FLAG_HPD_PLUG (1 << 3)
  109. #define HDMI_INTC_FLAG_HPD_UNPLUG (1 << 2)
  110. /* HDMI_PHY_RSTOUT */
  111. #define HDMI_PHY_SW_RSTOUT (1 << 0)
  112. /* HDMI_CORE_RSTOUT */
  113. #define HDMI_CORE_SW_RSTOUT (1 << 0)
  114. /* HDMI_CON_0 */
  115. #define HDMI_BLUE_SCR_EN (1 << 5)
  116. #define HDMI_EN (1 << 0)
  117. /* HDMI_CON_2 */
  118. #define HDMI_DVI_PERAMBLE_EN (1 << 5)
  119. #define HDMI_DVI_BAND_EN (1 << 1)
  120. /* HDMI_PHY_STATUS */
  121. #define HDMI_PHY_STATUS_READY (1 << 0)
  122. /* HDMI_MODE_SEL */
  123. #define HDMI_MODE_HDMI_EN (1 << 1)
  124. #define HDMI_MODE_DVI_EN (1 << 0)
  125. #define HDMI_MODE_MASK (3 << 0)
  126. /* HDMI_TG_CMD */
  127. #define HDMI_TG_FIELD_EN (1 << 1)
  128. #define HDMI_TG_EN (1 << 0)
  129. #endif /* SAMSUNG_REGS_HDMI_H */