dsi_host_v2.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef DSI_HOST_V2_H
  14. #define DSI_HOST_V2_H
  15. #include <linux/bitops.h>
  16. #define DSI_INTR_ERROR_MASK BIT(25)
  17. #define DSI_INTR_ERROR BIT(24)
  18. #define DSI_INTR_BTA_DONE_MASK BIT(21)
  19. #define DSI_INTR_BTA_DONE BIT(20)
  20. #define DSI_INTR_VIDEO_DONE_MASK BIT(17)
  21. #define DSI_INTR_VIDEO_DONE BIT(16)
  22. #define DSI_INTR_CMD_MDP_DONE_MASK BIT(9)
  23. #define DSI_INTR_CMD_MDP_DONE BIT(8)
  24. #define DSI_INTR_CMD_DMA_DONE_MASK BIT(1)
  25. #define DSI_INTR_CMD_DMA_DONE BIT(0)
  26. #define DSI_INTR_ALL_MASK 0x2220202
  27. #define DSI_BTA_TERM BIT(1)
  28. #define DSI_CTRL 0x0000
  29. #define DSI_STATUS 0x0004
  30. #define DSI_FIFO_STATUS 0x0008
  31. #define DSI_VIDEO_MODE_CTRL 0x000C
  32. #define DSI_VIDEO_MODE_DATA_CTRL 0x001C
  33. #define DSI_VIDEO_MODE_ACTIVE_H 0x0020
  34. #define DSI_VIDEO_MODE_ACTIVE_V 0x0024
  35. #define DSI_VIDEO_MODE_TOTAL 0x0028
  36. #define DSI_VIDEO_MODE_HSYNC 0x002C
  37. #define DSI_VIDEO_MODE_VSYNC 0x0030
  38. #define DSI_VIDEO_MODE_VSYNC_VPOS 0x0034
  39. #define DSI_COMMAND_MODE_DMA_CTRL 0x0038
  40. #define DSI_COMMAND_MODE_MDP_CTRL 0x003C
  41. #define DSI_COMMAND_MODE_MDP_DCS_CMD_CTRL 0x0040
  42. #define DSI_DMA_CMD_OFFSET 0x0044
  43. #define DSI_DMA_CMD_LENGTH 0x0048
  44. #define DSI_DMA_FIFO_CTRL 0x004C
  45. #define DSI_COMMAND_MODE_MDP_STREAM0_CTRL 0x0054
  46. #define DSI_COMMAND_MODE_MDP_STREAM0_TOTAL 0x0058
  47. #define DSI_COMMAND_MODE_MDP_STREAM1_CTRL 0x005C
  48. #define DSI_COMMAND_MODE_MDP_STREAM1_TOTAL 0x0060
  49. #define DSI_ACK_ERR_STATUS 0x0064
  50. #define DSI_RDBK_DATA0 0x0068
  51. #define DSI_RDBK_DATA1 0x006C
  52. #define DSI_RDBK_DATA2 0x0070
  53. #define DSI_RDBK_DATA3 0x0074
  54. #define DSI_RDBK_DATATYPE0 0x0078
  55. #define DSI_RDBK_DATATYPE1 0x007C
  56. #define DSI_TRIG_CTRL 0x0080
  57. #define DSI_EXT_MUX 0x0084
  58. #define DSI_EXT_TE_PULSE_DETECT_CTRL 0x0088
  59. #define DSI_CMD_MODE_DMA_SW_TRIGGER 0x008C
  60. #define DSI_CMD_MODE_MDP_SW_TRIGGER 0x0090
  61. #define DSI_CMD_MODE_BTA_SW_TRIGGER 0x0094
  62. #define DSI_RESET_SW_TRIGGER 0x0098
  63. #define DSI_LANE_CTRL 0x00A8
  64. #define DSI_LANE_SWAP_CTRL 0x00AC
  65. #define DSI_DLN0_PHY_ERR 0x00B0
  66. #define DSI_TIMEOUT_STATUS 0x00BC
  67. #define DSI_CLKOUT_TIMING_CTRL 0x00C0
  68. #define DSI_EOT_PACKET 0x00C4
  69. #define DSI_EOT_PACKET_CTRL 0x00C8
  70. #define DSI_ERR_INT_MASK0 0x0108
  71. #define DSI_INT_CTRL 0x010c
  72. #define DSI_SOFT_RESET 0x0114
  73. #define DSI_CLK_CTRL 0x0118
  74. #define DSI_CLK_STATUS 0x011C
  75. #define DSI_PHY_SW_RESET 0x0128
  76. #define DSI_COMMAND_MODE_MDP_IDLE_CTRL 0x0190
  77. #define DSI_VERSION 0x01F0
  78. #define DSI_DSIPHY_PLL_CTRL_0 0x0200
  79. #define DSI_DSIPHY_PLL_CTRL_1 0x0204
  80. #define DSI_DSIPHY_PLL_CTRL_2 0x0208
  81. #define DSI_DSIPHY_PLL_CTRL_3 0x020C
  82. #define DSI_DSIPHY_PLL_CTRL_4 0x0210
  83. #define DSI_DSIPHY_PLL_CTRL_5 0x0214
  84. #define DSI_DSIPHY_PLL_CTRL_6 0x0218
  85. #define DSI_DSIPHY_PLL_CTRL_7 0x021C
  86. #define DSI_DSIPHY_PLL_CTRL_8 0x0220
  87. #define DSI_DSIPHY_PLL_CTRL_9 0x0224
  88. #define DSI_DSIPHY_PLL_CTRL_10 0x0228
  89. #define DSI_DSIPHY_PLL_CTRL_11 0x022C
  90. #define DSI_DSIPHY_PLL_CTRL_12 0x0230
  91. #define DSI_DSIPHY_PLL_CTRL_13 0x0234
  92. #define DSI_DSIPHY_PLL_CTRL_14 0x0238
  93. #define DSI_DSIPHY_PLL_CTRL_15 0x023C
  94. #define DSI_DSIPHY_PLL_CTRL_16 0x0240
  95. #define DSI_DSIPHY_PLL_CTRL_17 0x0244
  96. #define DSI_DSIPHY_PLL_CTRL_18 0x0248
  97. #define DSI_DSIPHY_PLL_CTRL_19 0x024C
  98. #define DSI_DSIPHY_ANA_CTRL0 0x0260
  99. #define DSI_DSIPHY_ANA_CTRL1 0x0264
  100. #define DSI_DSIPHY_ANA_CTRL2 0x0268
  101. #define DSI_DSIPHY_ANA_CTRL3 0x026C
  102. #define DSI_DSIPHY_ANA_CTRL4 0x0270
  103. #define DSI_DSIPHY_ANA_CTRL5 0x0274
  104. #define DSI_DSIPHY_ANA_CTRL6 0x0278
  105. #define DSI_DSIPHY_ANA_CTRL7 0x027C
  106. #define DSI_DSIPHY_PLL_RDY 0x0280
  107. #define DSI_DSIPHY_PLL_ANA_STATUS0 0x0294
  108. #define DSI_DSIPHY_PLL_ANA_STATUS1 0x0298
  109. #define DSI_DSIPHY_PLL_ANA_STATUS2 0x029C
  110. #define DSI_DSIPHY_LN0_CFG0 0x0300
  111. #define DSI_DSIPHY_LN0_CFG1 0x0304
  112. #define DSI_DSIPHY_LN0_CFG2 0x0308
  113. #define DSI_DSIPHY_LN1_CFG0 0x0340
  114. #define DSI_DSIPHY_LN1_CFG1 0x0344
  115. #define DSI_DSIPHY_LN1_CFG2 0x0348
  116. #define DSI_DSIPHY_LN2_CFG0 0x0380
  117. #define DSI_DSIPHY_LN2_CFG1 0x0384
  118. #define DSI_DSIPHY_LN2_CFG2 0x0388
  119. #define DSI_DSIPHY_LN3_CFG0 0x03C0
  120. #define DSI_DSIPHY_LN3_CFG1 0x03C4
  121. #define DSI_DSIPHY_LN3_CFG2 0x03C8
  122. #define DSI_DSIPHY_LNCK_CFG0 0x0400
  123. #define DSI_DSIPHY_LNCK_CFG1 0x0404
  124. #define DSI_DSIPHY_LNCK_CFG2 0x0408
  125. #define DSI_DSIPHY_TIMING_CTRL_0 0x0440
  126. #define DSI_DSIPHY_TIMING_CTRL_1 0x0444
  127. #define DSI_DSIPHY_TIMING_CTRL_2 0x0448
  128. #define DSI_DSIPHY_TIMING_CTRL_3 0x044C
  129. #define DSI_DSIPHY_TIMING_CTRL_4 0x0450
  130. #define DSI_DSIPHY_TIMING_CTRL_5 0x0454
  131. #define DSI_DSIPHY_TIMING_CTRL_6 0x0458
  132. #define DSI_DSIPHY_TIMING_CTRL_7 0x045C
  133. #define DSI_DSIPHY_TIMING_CTRL_8 0x0460
  134. #define DSI_DSIPHY_TIMING_CTRL_9 0x0464
  135. #define DSI_DSIPHY_TIMING_CTRL_10 0x0468
  136. #define DSI_DSIPHY_TIMING_CTRL_11 0x046C
  137. #define DSI_DSIPHY_CTRL_0 0x0470
  138. #define DSI_DSIPHY_CTRL_1 0x0474
  139. #define DSI_DSIPHY_CTRL_2 0x0478
  140. #define DSI_DSIPHY_CTRL_3 0x047C
  141. #define DSI_DSIPHY_STRENGTH_CTRL_0 0x0480
  142. #define DSI_DSIPHY_STRENGTH_CTRL_1 0x0484
  143. #define DSI_DSIPHY_STRENGTH_CTRL_2 0x0488
  144. #define DSI_DSIPHY_LDO_CNTRL 0x04B0
  145. #define DSI_DSIPHY_REGULATOR_CTRL_0 0x0500
  146. #define DSI_DSIPHY_REGULATOR_CTRL_1 0x0504
  147. #define DSI_DSIPHY_REGULATOR_CTRL_2 0x0508
  148. #define DSI_DSIPHY_REGULATOR_CTRL_3 0x050C
  149. #define DSI_DSIPHY_REGULATOR_CTRL_4 0x0510
  150. #define DSI_DSIPHY_REGULATOR_TEST 0x0514
  151. #define DSI_DSIPHY_REGULATOR_CAL_PWR_CFG 0x0518
  152. #define DSI_DSIPHY_CAL_HW_TRIGGER 0x0528
  153. #define DSI_DSIPHY_CAL_SW_CFG0 0x052C
  154. #define DSI_DSIPHY_CAL_SW_CFG1 0x0530
  155. #define DSI_DSIPHY_CAL_SW_CFG2 0x0534
  156. #define DSI_DSIPHY_CAL_HW_CFG0 0x0538
  157. #define DSI_DSIPHY_CAL_HW_CFG1 0x053C
  158. #define DSI_DSIPHY_CAL_HW_CFG2 0x0540
  159. #define DSI_DSIPHY_CAL_HW_CFG3 0x0544
  160. #define DSI_DSIPHY_CAL_HW_CFG4 0x0548
  161. #define DSI_DSIPHY_REGULATOR_CAL_STATUS0 0x0550
  162. #define DSI_DSIPHY_BIST_CTRL0 0x048C
  163. #define DSI_DSIPHY_BIST_CTRL1 0x0490
  164. #define DSI_DSIPHY_BIST_CTRL2 0x0494
  165. #define DSI_DSIPHY_BIST_CTRL3 0x0498
  166. #define DSI_DSIPHY_BIST_CTRL4 0x049C
  167. #define DSI_DSIPHY_BIST_CTRL5 0x04A0
  168. #define DSI_EN BIT(0)
  169. #define DSI_VIDEO_MODE_EN BIT(1)
  170. #define DSI_CMD_MODE_EN BIT(2)
  171. #endif /* DSI_HOST_V2_H */