dsi_ctrl_hw.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _DSI_CTRL_HW_H_
  6. #define _DSI_CTRL_HW_H_
  7. #include <linux/kernel.h>
  8. #include <linux/types.h>
  9. #include <linux/bitops.h>
  10. #include <linux/bitmap.h>
  11. #include "dsi_defs.h"
  12. #define DSI_CTRL_HW_DBG(c, fmt, ...) DRM_DEV_DEBUG(NULL, "[msm-dsi-debug]: DSI_%d: "\
  13. fmt, c ? c->index : -1, ##__VA_ARGS__)
  14. #define DSI_CTRL_HW_ERR(c, fmt, ...) DRM_DEV_ERROR(NULL, "[msm-dsi-error]: DSI_%d: "\
  15. fmt, c ? c->index : -1, ##__VA_ARGS__)
  16. #define DSI_CTRL_HW_INFO(c, fmt, ...) DRM_DEV_INFO(NULL, "[msm-dsi-info]: DSI_%d: "\
  17. fmt, c ? c->index : -1, ##__VA_ARGS__)
  18. /**
  19. * Modifier flag for command transmission. If this flag is set, command
  20. * information is programmed to hardware and transmission is not triggered.
  21. * Caller should call the trigger_command_dma() to start the transmission. This
  22. * flag is valed for kickoff_command() and kickoff_fifo_command() operations.
  23. */
  24. #define DSI_CTRL_HW_CMD_WAIT_FOR_TRIGGER 0x1
  25. /**
  26. * enum dsi_ctrl_version - version of the dsi host controller
  27. * @DSI_CTRL_VERSION_UNKNOWN: Unknown controller version
  28. * @DSI_CTRL_VERSION_1_4: DSI host v1.4 controller
  29. * @DSI_CTRL_VERSION_2_0: DSI host v2.0 controller
  30. * @DSI_CTRL_VERSION_2_2: DSI host v2.2 controller
  31. * @DSI_CTRL_VERSION_2_3: DSI host v2.3 controller
  32. * @DSI_CTRL_VERSION_2_4: DSI host v2.4 controller
  33. * @DSI_CTRL_VERSION_2_5: DSI host v2.5 controller
  34. * @DSI_CTRL_VERSION_MAX: max version
  35. */
  36. enum dsi_ctrl_version {
  37. DSI_CTRL_VERSION_UNKNOWN,
  38. DSI_CTRL_VERSION_1_4,
  39. DSI_CTRL_VERSION_2_0,
  40. DSI_CTRL_VERSION_2_2,
  41. DSI_CTRL_VERSION_2_3,
  42. DSI_CTRL_VERSION_2_4,
  43. DSI_CTRL_VERSION_2_5,
  44. DSI_CTRL_VERSION_MAX
  45. };
  46. /**
  47. * enum dsi_ctrl_hw_features - features supported by dsi host controller
  48. * @DSI_CTRL_VIDEO_TPG: Test pattern support for video mode.
  49. * @DSI_CTRL_CMD_TPG: Test pattern support for command mode.
  50. * @DSI_CTRL_VARIABLE_REFRESH_RATE: variable panel timing
  51. * @DSI_CTRL_DYNAMIC_REFRESH: variable pixel clock rate
  52. * @DSI_CTRL_NULL_PACKET_INSERTION: NULL packet insertion
  53. * @DSI_CTRL_DESKEW_CALIB: Deskew calibration support
  54. * @DSI_CTRL_DPHY: Controller support for DPHY
  55. * @DSI_CTRL_CPHY: Controller support for CPHY
  56. * @DSI_CTRL_MAX_FEATURES:
  57. */
  58. enum dsi_ctrl_hw_features {
  59. DSI_CTRL_VIDEO_TPG,
  60. DSI_CTRL_CMD_TPG,
  61. DSI_CTRL_VARIABLE_REFRESH_RATE,
  62. DSI_CTRL_DYNAMIC_REFRESH,
  63. DSI_CTRL_NULL_PACKET_INSERTION,
  64. DSI_CTRL_DESKEW_CALIB,
  65. DSI_CTRL_DPHY,
  66. DSI_CTRL_CPHY,
  67. DSI_CTRL_MAX_FEATURES
  68. };
  69. /**
  70. * enum dsi_test_pattern - test pattern type
  71. * @DSI_TEST_PATTERN_FIXED: Test pattern is fixed, based on init value.
  72. * @DSI_TEST_PATTERN_INC: Incremental test pattern, base on init value.
  73. * @DSI_TEST_PATTERN_POLY: Pattern generated from polynomial and init val.
  74. * @DSI_TEST_PATTERN_MAX:
  75. */
  76. enum dsi_test_pattern {
  77. DSI_TEST_PATTERN_FIXED = 0,
  78. DSI_TEST_PATTERN_INC,
  79. DSI_TEST_PATTERN_POLY,
  80. DSI_TEST_PATTERN_MAX
  81. };
  82. /**
  83. * enum dsi_status_int_index - index of interrupts generated by DSI controller
  84. * @DSI_SINT_CMD_MODE_DMA_DONE: Command mode DMA packets are sent out.
  85. * @DSI_SINT_CMD_STREAM0_FRAME_DONE: A frame of cmd mode stream0 is sent out.
  86. * @DSI_SINT_CMD_STREAM1_FRAME_DONE: A frame of cmd mode stream1 is sent out.
  87. * @DSI_SINT_CMD_STREAM2_FRAME_DONE: A frame of cmd mode stream2 is sent out.
  88. * @DSI_SINT_VIDEO_MODE_FRAME_DONE: A frame of video mode stream is sent out.
  89. * @DSI_SINT_BTA_DONE: A BTA is completed.
  90. * @DSI_SINT_CMD_FRAME_DONE: A frame of selected cmd mode stream is
  91. * sent out by MDP.
  92. * @DSI_SINT_DYN_REFRESH_DONE: The dynamic refresh operation completed.
  93. * @DSI_SINT_DESKEW_DONE: The deskew calibration operation done.
  94. * @DSI_SINT_DYN_BLANK_DMA_DONE: The dynamic blankin DMA operation has
  95. * completed.
  96. * @DSI_SINT_ERROR: DSI error has happened.
  97. */
  98. enum dsi_status_int_index {
  99. DSI_SINT_CMD_MODE_DMA_DONE = 0,
  100. DSI_SINT_CMD_STREAM0_FRAME_DONE = 1,
  101. DSI_SINT_CMD_STREAM1_FRAME_DONE = 2,
  102. DSI_SINT_CMD_STREAM2_FRAME_DONE = 3,
  103. DSI_SINT_VIDEO_MODE_FRAME_DONE = 4,
  104. DSI_SINT_BTA_DONE = 5,
  105. DSI_SINT_CMD_FRAME_DONE = 6,
  106. DSI_SINT_DYN_REFRESH_DONE = 7,
  107. DSI_SINT_DESKEW_DONE = 8,
  108. DSI_SINT_DYN_BLANK_DMA_DONE = 9,
  109. DSI_SINT_ERROR = 10,
  110. DSI_STATUS_INTERRUPT_COUNT
  111. };
  112. /**
  113. * enum dsi_status_int_type - status interrupts generated by DSI controller
  114. * @DSI_CMD_MODE_DMA_DONE: Command mode DMA packets are sent out.
  115. * @DSI_CMD_STREAM0_FRAME_DONE: A frame of command mode stream0 is sent out.
  116. * @DSI_CMD_STREAM1_FRAME_DONE: A frame of command mode stream1 is sent out.
  117. * @DSI_CMD_STREAM2_FRAME_DONE: A frame of command mode stream2 is sent out.
  118. * @DSI_VIDEO_MODE_FRAME_DONE: A frame of video mode stream is sent out.
  119. * @DSI_BTA_DONE: A BTA is completed.
  120. * @DSI_CMD_FRAME_DONE: A frame of selected command mode stream is
  121. * sent out by MDP.
  122. * @DSI_DYN_REFRESH_DONE: The dynamic refresh operation has completed.
  123. * @DSI_DESKEW_DONE: The deskew calibration operation has completed
  124. * @DSI_DYN_BLANK_DMA_DONE: The dynamic blankin DMA operation has
  125. * completed.
  126. * @DSI_ERROR: DSI error has happened.
  127. */
  128. enum dsi_status_int_type {
  129. DSI_CMD_MODE_DMA_DONE = BIT(DSI_SINT_CMD_MODE_DMA_DONE),
  130. DSI_CMD_STREAM0_FRAME_DONE = BIT(DSI_SINT_CMD_STREAM0_FRAME_DONE),
  131. DSI_CMD_STREAM1_FRAME_DONE = BIT(DSI_SINT_CMD_STREAM1_FRAME_DONE),
  132. DSI_CMD_STREAM2_FRAME_DONE = BIT(DSI_SINT_CMD_STREAM2_FRAME_DONE),
  133. DSI_VIDEO_MODE_FRAME_DONE = BIT(DSI_SINT_VIDEO_MODE_FRAME_DONE),
  134. DSI_BTA_DONE = BIT(DSI_SINT_BTA_DONE),
  135. DSI_CMD_FRAME_DONE = BIT(DSI_SINT_CMD_FRAME_DONE),
  136. DSI_DYN_REFRESH_DONE = BIT(DSI_SINT_DYN_REFRESH_DONE),
  137. DSI_DESKEW_DONE = BIT(DSI_SINT_DESKEW_DONE),
  138. DSI_DYN_BLANK_DMA_DONE = BIT(DSI_SINT_DYN_BLANK_DMA_DONE),
  139. DSI_ERROR = BIT(DSI_SINT_ERROR)
  140. };
  141. /**
  142. * enum dsi_error_int_index - index of error interrupts from DSI controller
  143. * @DSI_EINT_RDBK_SINGLE_ECC_ERR: Single bit ECC error in read packet.
  144. * @DSI_EINT_RDBK_MULTI_ECC_ERR: Multi bit ECC error in read packet.
  145. * @DSI_EINT_RDBK_CRC_ERR: CRC error in read packet.
  146. * @DSI_EINT_RDBK_INCOMPLETE_PKT: Incomplete read packet.
  147. * @DSI_EINT_PERIPH_ERROR_PKT: Error packet returned from peripheral,
  148. * @DSI_EINT_LP_RX_TIMEOUT: Low power reverse transmission timeout.
  149. * @DSI_EINT_HS_TX_TIMEOUT: High speed fwd transmission timeout.
  150. * @DSI_EINT_BTA_TIMEOUT: BTA timeout.
  151. * @DSI_EINT_PLL_UNLOCK: PLL has unlocked.
  152. * @DSI_EINT_DLN0_ESC_ENTRY_ERR: Incorrect LP Rx escape entry.
  153. * @DSI_EINT_DLN0_ESC_SYNC_ERR: LP Rx data is not byte aligned.
  154. * @DSI_EINT_DLN0_LP_CONTROL_ERR: Incorrect LP Rx state sequence.
  155. * @DSI_EINT_PANEL_SPECIFIC_ERR: DSI Protocol violation error.
  156. * @DSI_EINT_INTERLEAVE_OP_CONTENTION: Interleave operation contention.
  157. * @DSI_EINT_CMD_DMA_FIFO_UNDERFLOW: Command mode DMA FIFO underflow.
  158. * @DSI_EINT_CMD_MDP_FIFO_UNDERFLOW: Command MDP FIFO underflow (failed to
  159. * receive one complete line from MDP).
  160. * @DSI_EINT_DLN0_HS_FIFO_OVERFLOW: High speed FIFO data lane 0 overflows.
  161. * @DSI_EINT_DLN1_HS_FIFO_OVERFLOW: High speed FIFO data lane 1 overflows.
  162. * @DSI_EINT_DLN2_HS_FIFO_OVERFLOW: High speed FIFO data lane 2 overflows.
  163. * @DSI_EINT_DLN3_HS_FIFO_OVERFLOW: High speed FIFO data lane 3 overflows.
  164. * @DSI_EINT_DLN0_HS_FIFO_UNDERFLOW: High speed FIFO data lane 0 underflows.
  165. * @DSI_EINT_DLN1_HS_FIFO_UNDERFLOW: High speed FIFO data lane 1 underflows.
  166. * @DSI_EINT_DLN2_HS_FIFO_UNDERFLOW: High speed FIFO data lane 2 underflows.
  167. * @DSI_EINT_DLN3_HS_FIFO_UNDERFLOW: High speed FIFO data lane 3 undeflows.
  168. * @DSI_EINT_DLN0_LP0_CONTENTION: PHY level contention while lane 0 low.
  169. * @DSI_EINT_DLN1_LP0_CONTENTION: PHY level contention while lane 1 low.
  170. * @DSI_EINT_DLN2_LP0_CONTENTION: PHY level contention while lane 2 low.
  171. * @DSI_EINT_DLN3_LP0_CONTENTION: PHY level contention while lane 3 low.
  172. * @DSI_EINT_DLN0_LP1_CONTENTION: PHY level contention while lane 0 high.
  173. * @DSI_EINT_DLN1_LP1_CONTENTION: PHY level contention while lane 1 high.
  174. * @DSI_EINT_DLN2_LP1_CONTENTION: PHY level contention while lane 2 high.
  175. * @DSI_EINT_DLN3_LP1_CONTENTION: PHY level contention while lane 3 high.
  176. */
  177. enum dsi_error_int_index {
  178. DSI_EINT_RDBK_SINGLE_ECC_ERR = 0,
  179. DSI_EINT_RDBK_MULTI_ECC_ERR = 1,
  180. DSI_EINT_RDBK_CRC_ERR = 2,
  181. DSI_EINT_RDBK_INCOMPLETE_PKT = 3,
  182. DSI_EINT_PERIPH_ERROR_PKT = 4,
  183. DSI_EINT_LP_RX_TIMEOUT = 5,
  184. DSI_EINT_HS_TX_TIMEOUT = 6,
  185. DSI_EINT_BTA_TIMEOUT = 7,
  186. DSI_EINT_PLL_UNLOCK = 8,
  187. DSI_EINT_DLN0_ESC_ENTRY_ERR = 9,
  188. DSI_EINT_DLN0_ESC_SYNC_ERR = 10,
  189. DSI_EINT_DLN0_LP_CONTROL_ERR = 11,
  190. DSI_EINT_PANEL_SPECIFIC_ERR = 12,
  191. DSI_EINT_INTERLEAVE_OP_CONTENTION = 13,
  192. DSI_EINT_CMD_DMA_FIFO_UNDERFLOW = 14,
  193. DSI_EINT_CMD_MDP_FIFO_UNDERFLOW = 15,
  194. DSI_EINT_DLN0_HS_FIFO_OVERFLOW = 16,
  195. DSI_EINT_DLN1_HS_FIFO_OVERFLOW = 17,
  196. DSI_EINT_DLN2_HS_FIFO_OVERFLOW = 18,
  197. DSI_EINT_DLN3_HS_FIFO_OVERFLOW = 19,
  198. DSI_EINT_DLN0_HS_FIFO_UNDERFLOW = 20,
  199. DSI_EINT_DLN1_HS_FIFO_UNDERFLOW = 21,
  200. DSI_EINT_DLN2_HS_FIFO_UNDERFLOW = 22,
  201. DSI_EINT_DLN3_HS_FIFO_UNDERFLOW = 23,
  202. DSI_EINT_DLN0_LP0_CONTENTION = 24,
  203. DSI_EINT_DLN1_LP0_CONTENTION = 25,
  204. DSI_EINT_DLN2_LP0_CONTENTION = 26,
  205. DSI_EINT_DLN3_LP0_CONTENTION = 27,
  206. DSI_EINT_DLN0_LP1_CONTENTION = 28,
  207. DSI_EINT_DLN1_LP1_CONTENTION = 29,
  208. DSI_EINT_DLN2_LP1_CONTENTION = 30,
  209. DSI_EINT_DLN3_LP1_CONTENTION = 31,
  210. DSI_ERROR_INTERRUPT_COUNT
  211. };
  212. /**
  213. * enum dsi_error_int_type - error interrupts generated by DSI controller
  214. * @DSI_RDBK_SINGLE_ECC_ERR: Single bit ECC error in read packet.
  215. * @DSI_RDBK_MULTI_ECC_ERR: Multi bit ECC error in read packet.
  216. * @DSI_RDBK_CRC_ERR: CRC error in read packet.
  217. * @DSI_RDBK_INCOMPLETE_PKT: Incomplete read packet.
  218. * @DSI_PERIPH_ERROR_PKT: Error packet returned from peripheral,
  219. * @DSI_LP_RX_TIMEOUT: Low power reverse transmission timeout.
  220. * @DSI_HS_TX_TIMEOUT: High speed forward transmission timeout.
  221. * @DSI_BTA_TIMEOUT: BTA timeout.
  222. * @DSI_PLL_UNLOCK: PLL has unlocked.
  223. * @DSI_DLN0_ESC_ENTRY_ERR: Incorrect LP Rx escape entry.
  224. * @DSI_DLN0_ESC_SYNC_ERR: LP Rx data is not byte aligned.
  225. * @DSI_DLN0_LP_CONTROL_ERR: Incorrect LP Rx state sequence.
  226. * @DSI_PANEL_SPECIFIC_ERR: DSI Protocol violation.
  227. * @DSI_INTERLEAVE_OP_CONTENTION: Interleave operation contention.
  228. * @DSI_CMD_DMA_FIFO_UNDERFLOW: Command mode DMA FIFO underflow.
  229. * @DSI_CMD_MDP_FIFO_UNDERFLOW: Command MDP FIFO underflow (failed to
  230. * receive one complete line from MDP).
  231. * @DSI_DLN0_HS_FIFO_OVERFLOW: High speed FIFO for data lane 0 overflows.
  232. * @DSI_DLN1_HS_FIFO_OVERFLOW: High speed FIFO for data lane 1 overflows.
  233. * @DSI_DLN2_HS_FIFO_OVERFLOW: High speed FIFO for data lane 2 overflows.
  234. * @DSI_DLN3_HS_FIFO_OVERFLOW: High speed FIFO for data lane 3 overflows.
  235. * @DSI_DLN0_HS_FIFO_UNDERFLOW: High speed FIFO for data lane 0 underflows.
  236. * @DSI_DLN1_HS_FIFO_UNDERFLOW: High speed FIFO for data lane 1 underflows.
  237. * @DSI_DLN2_HS_FIFO_UNDERFLOW: High speed FIFO for data lane 2 underflows.
  238. * @DSI_DLN3_HS_FIFO_UNDERFLOW: High speed FIFO for data lane 3 undeflows.
  239. * @DSI_DLN0_LP0_CONTENTION: PHY level contention while lane 0 is low.
  240. * @DSI_DLN1_LP0_CONTENTION: PHY level contention while lane 1 is low.
  241. * @DSI_DLN2_LP0_CONTENTION: PHY level contention while lane 2 is low.
  242. * @DSI_DLN3_LP0_CONTENTION: PHY level contention while lane 3 is low.
  243. * @DSI_DLN0_LP1_CONTENTION: PHY level contention while lane 0 is high.
  244. * @DSI_DLN1_LP1_CONTENTION: PHY level contention while lane 1 is high.
  245. * @DSI_DLN2_LP1_CONTENTION: PHY level contention while lane 2 is high.
  246. * @DSI_DLN3_LP1_CONTENTION: PHY level contention while lane 3 is high.
  247. */
  248. enum dsi_error_int_type {
  249. DSI_RDBK_SINGLE_ECC_ERR = BIT(DSI_EINT_RDBK_SINGLE_ECC_ERR),
  250. DSI_RDBK_MULTI_ECC_ERR = BIT(DSI_EINT_RDBK_MULTI_ECC_ERR),
  251. DSI_RDBK_CRC_ERR = BIT(DSI_EINT_RDBK_CRC_ERR),
  252. DSI_RDBK_INCOMPLETE_PKT = BIT(DSI_EINT_RDBK_INCOMPLETE_PKT),
  253. DSI_PERIPH_ERROR_PKT = BIT(DSI_EINT_PERIPH_ERROR_PKT),
  254. DSI_LP_RX_TIMEOUT = BIT(DSI_EINT_LP_RX_TIMEOUT),
  255. DSI_HS_TX_TIMEOUT = BIT(DSI_EINT_HS_TX_TIMEOUT),
  256. DSI_BTA_TIMEOUT = BIT(DSI_EINT_BTA_TIMEOUT),
  257. DSI_PLL_UNLOCK = BIT(DSI_EINT_PLL_UNLOCK),
  258. DSI_DLN0_ESC_ENTRY_ERR = BIT(DSI_EINT_DLN0_ESC_ENTRY_ERR),
  259. DSI_DLN0_ESC_SYNC_ERR = BIT(DSI_EINT_DLN0_ESC_SYNC_ERR),
  260. DSI_DLN0_LP_CONTROL_ERR = BIT(DSI_EINT_DLN0_LP_CONTROL_ERR),
  261. DSI_PANEL_SPECIFIC_ERR = BIT(DSI_EINT_PANEL_SPECIFIC_ERR),
  262. DSI_INTERLEAVE_OP_CONTENTION = BIT(DSI_EINT_INTERLEAVE_OP_CONTENTION),
  263. DSI_CMD_DMA_FIFO_UNDERFLOW = BIT(DSI_EINT_CMD_DMA_FIFO_UNDERFLOW),
  264. DSI_CMD_MDP_FIFO_UNDERFLOW = BIT(DSI_EINT_CMD_MDP_FIFO_UNDERFLOW),
  265. DSI_DLN0_HS_FIFO_OVERFLOW = BIT(DSI_EINT_DLN0_HS_FIFO_OVERFLOW),
  266. DSI_DLN1_HS_FIFO_OVERFLOW = BIT(DSI_EINT_DLN1_HS_FIFO_OVERFLOW),
  267. DSI_DLN2_HS_FIFO_OVERFLOW = BIT(DSI_EINT_DLN2_HS_FIFO_OVERFLOW),
  268. DSI_DLN3_HS_FIFO_OVERFLOW = BIT(DSI_EINT_DLN3_HS_FIFO_OVERFLOW),
  269. DSI_DLN0_HS_FIFO_UNDERFLOW = BIT(DSI_EINT_DLN0_HS_FIFO_UNDERFLOW),
  270. DSI_DLN1_HS_FIFO_UNDERFLOW = BIT(DSI_EINT_DLN1_HS_FIFO_UNDERFLOW),
  271. DSI_DLN2_HS_FIFO_UNDERFLOW = BIT(DSI_EINT_DLN2_HS_FIFO_UNDERFLOW),
  272. DSI_DLN3_HS_FIFO_UNDERFLOW = BIT(DSI_EINT_DLN3_HS_FIFO_UNDERFLOW),
  273. DSI_DLN0_LP0_CONTENTION = BIT(DSI_EINT_DLN0_LP0_CONTENTION),
  274. DSI_DLN1_LP0_CONTENTION = BIT(DSI_EINT_DLN1_LP0_CONTENTION),
  275. DSI_DLN2_LP0_CONTENTION = BIT(DSI_EINT_DLN2_LP0_CONTENTION),
  276. DSI_DLN3_LP0_CONTENTION = BIT(DSI_EINT_DLN3_LP0_CONTENTION),
  277. DSI_DLN0_LP1_CONTENTION = BIT(DSI_EINT_DLN0_LP1_CONTENTION),
  278. DSI_DLN1_LP1_CONTENTION = BIT(DSI_EINT_DLN1_LP1_CONTENTION),
  279. DSI_DLN2_LP1_CONTENTION = BIT(DSI_EINT_DLN2_LP1_CONTENTION),
  280. DSI_DLN3_LP1_CONTENTION = BIT(DSI_EINT_DLN3_LP1_CONTENTION),
  281. };
  282. /**
  283. * struct dsi_ctrl_cmd_dma_info - command buffer information
  284. * @offset: IOMMU VA for command buffer address.
  285. * @length: Length of the command buffer.
  286. * @datatype: Datatype of cmd.
  287. * @en_broadcast: Enable broadcast mode if set to true.
  288. * @is_master: Is master in broadcast mode.
  289. * @use_lpm: Use low power mode for command transmission.
  290. */
  291. struct dsi_ctrl_cmd_dma_info {
  292. u32 offset;
  293. u32 length;
  294. u8 datatype;
  295. bool en_broadcast;
  296. bool is_master;
  297. bool use_lpm;
  298. };
  299. /**
  300. * struct dsi_ctrl_cmd_dma_fifo_info - command payload tp be sent using FIFO
  301. * @command: VA for command buffer.
  302. * @size: Size of the command buffer.
  303. * @en_broadcast: Enable broadcast mode if set to true.
  304. * @is_master: Is master in broadcast mode.
  305. * @use_lpm: Use low power mode for command transmission.
  306. */
  307. struct dsi_ctrl_cmd_dma_fifo_info {
  308. u32 *command;
  309. u32 size;
  310. bool en_broadcast;
  311. bool is_master;
  312. bool use_lpm;
  313. };
  314. struct dsi_ctrl_hw;
  315. struct ctrl_ulps_config_ops {
  316. /**
  317. * ulps_request() - request ulps entry for specified lanes
  318. * @ctrl: Pointer to the controller host hardware.
  319. * @lanes: ORed list of lanes (enum dsi_data_lanes) which need
  320. * to enter ULPS.
  321. *
  322. * Caller should check if lanes are in ULPS mode by calling
  323. * get_lanes_in_ulps() operation.
  324. */
  325. void (*ulps_request)(struct dsi_ctrl_hw *ctrl, u32 lanes);
  326. /**
  327. * ulps_exit() - exit ULPS on specified lanes
  328. * @ctrl: Pointer to the controller host hardware.
  329. * @lanes: ORed list of lanes (enum dsi_data_lanes) which need
  330. * to exit ULPS.
  331. *
  332. * Caller should check if lanes are in active mode by calling
  333. * get_lanes_in_ulps() operation.
  334. */
  335. void (*ulps_exit)(struct dsi_ctrl_hw *ctrl, u32 lanes);
  336. /**
  337. * get_lanes_in_ulps() - returns the list of lanes in ULPS mode
  338. * @ctrl: Pointer to the controller host hardware.
  339. *
  340. * Returns an ORed list of lanes (enum dsi_data_lanes) that are in ULPS
  341. * state. If 0 is returned, all the lanes are active.
  342. *
  343. * Return: List of lanes in ULPS state.
  344. */
  345. u32 (*get_lanes_in_ulps)(struct dsi_ctrl_hw *ctrl);
  346. };
  347. /**
  348. * struct dsi_ctrl_hw_ops - operations supported by dsi host hardware
  349. */
  350. struct dsi_ctrl_hw_ops {
  351. /**
  352. * host_setup() - Setup DSI host configuration
  353. * @ctrl: Pointer to controller host hardware.
  354. * @config: Configuration for DSI host controller
  355. */
  356. void (*host_setup)(struct dsi_ctrl_hw *ctrl,
  357. struct dsi_host_common_cfg *config);
  358. /**
  359. * video_engine_en() - enable DSI video engine
  360. * @ctrl: Pointer to controller host hardware.
  361. * @on: Enable/disabel video engine.
  362. */
  363. void (*video_engine_en)(struct dsi_ctrl_hw *ctrl, bool on);
  364. /**
  365. * setup_avr() - set the AVR_SUPPORT_ENABLE bit in DSI_VIDEO_MODE_CTRL
  366. * @ctrl: Pointer to controller host hardware.
  367. * @enable: Controls whether this bit is set or cleared
  368. */
  369. void (*setup_avr)(struct dsi_ctrl_hw *ctrl, bool enable);
  370. /**
  371. * video_engine_setup() - Setup dsi host controller for video mode
  372. * @ctrl: Pointer to controller host hardware.
  373. * @common_cfg: Common configuration parameters.
  374. * @cfg: Video mode configuration.
  375. *
  376. * Set up DSI video engine with a specific configuration. Controller and
  377. * video engine are not enabled as part of this function.
  378. */
  379. void (*video_engine_setup)(struct dsi_ctrl_hw *ctrl,
  380. struct dsi_host_common_cfg *common_cfg,
  381. struct dsi_video_engine_cfg *cfg);
  382. /**
  383. * set_video_timing() - set up the timing for video frame
  384. * @ctrl: Pointer to controller host hardware.
  385. * @mode: Video mode information.
  386. *
  387. * Set up the video timing parameters for the DSI video mode operation.
  388. */
  389. void (*set_video_timing)(struct dsi_ctrl_hw *ctrl,
  390. struct dsi_mode_info *mode);
  391. /**
  392. * cmd_engine_setup() - setup dsi host controller for command mode
  393. * @ctrl: Pointer to the controller host hardware.
  394. * @common_cfg: Common configuration parameters.
  395. * @cfg: Command mode configuration.
  396. *
  397. * Setup DSI CMD engine with a specific configuration. Controller and
  398. * command engine are not enabled as part of this function.
  399. */
  400. void (*cmd_engine_setup)(struct dsi_ctrl_hw *ctrl,
  401. struct dsi_host_common_cfg *common_cfg,
  402. struct dsi_cmd_engine_cfg *cfg);
  403. /**
  404. * setup_cmd_stream() - set up parameters for command pixel streams
  405. * @ctrl: Pointer to controller host hardware.
  406. * @mode: Pointer to mode information.
  407. * @cfg: DSI host configuration that is common to both
  408. * video and command modes.
  409. * @vc_id: stream_id.
  410. *
  411. * Setup parameters for command mode pixel stream size.
  412. */
  413. void (*setup_cmd_stream)(struct dsi_ctrl_hw *ctrl,
  414. struct dsi_mode_info *mode,
  415. struct dsi_host_common_cfg *cfg,
  416. u32 vc_id,
  417. struct dsi_rect *roi);
  418. /**
  419. * ctrl_en() - enable DSI controller engine
  420. * @ctrl: Pointer to the controller host hardware.
  421. * @on: turn on/off the DSI controller engine.
  422. */
  423. void (*ctrl_en)(struct dsi_ctrl_hw *ctrl, bool on);
  424. /**
  425. * cmd_engine_en() - enable DSI controller command engine
  426. * @ctrl: Pointer to the controller host hardware.
  427. * @on: Turn on/off the DSI command engine.
  428. */
  429. void (*cmd_engine_en)(struct dsi_ctrl_hw *ctrl, bool on);
  430. /**
  431. * phy_sw_reset() - perform a soft reset on the PHY.
  432. * @ctrl: Pointer to the controller host hardware.
  433. */
  434. void (*phy_sw_reset)(struct dsi_ctrl_hw *ctrl);
  435. /**
  436. * config_clk_gating() - enable/disable DSI PHY clk gating
  437. * @ctrl: Pointer to the controller host hardware.
  438. * @enable: enable/disable DSI PHY clock gating.
  439. * @clk_selection: clock to enable/disable clock gating.
  440. */
  441. void (*config_clk_gating)(struct dsi_ctrl_hw *ctrl, bool enable,
  442. enum dsi_clk_gate_type clk_selection);
  443. /**
  444. * soft_reset() - perform a soft reset on DSI controller
  445. * @ctrl: Pointer to the controller host hardware.
  446. *
  447. * The video, command and controller engines will be disabled before the
  448. * reset is triggered. After, the engines will be re-enabled to the same
  449. * state as before the reset.
  450. *
  451. * If the reset is done while MDP timing engine is turned on, the video
  452. * engine should be re-enabled only during the vertical blanking time.
  453. */
  454. void (*soft_reset)(struct dsi_ctrl_hw *ctrl);
  455. /**
  456. * setup_lane_map() - setup mapping between logical and physical lanes
  457. * @ctrl: Pointer to the controller host hardware.
  458. * @lane_map: Structure defining the mapping between DSI logical
  459. * lanes and physical lanes.
  460. */
  461. void (*setup_lane_map)(struct dsi_ctrl_hw *ctrl,
  462. struct dsi_lane_map *lane_map);
  463. /**
  464. * kickoff_command() - transmits commands stored in memory
  465. * @ctrl: Pointer to the controller host hardware.
  466. * @cmd: Command information.
  467. * @flags: Modifiers for command transmission.
  468. *
  469. * The controller hardware is programmed with address and size of the
  470. * command buffer. The transmission is kicked off if
  471. * DSI_CTRL_HW_CMD_WAIT_FOR_TRIGGER flag is not set. If this flag is
  472. * set, caller should make a separate call to trigger_command_dma() to
  473. * transmit the command.
  474. */
  475. void (*kickoff_command)(struct dsi_ctrl_hw *ctrl,
  476. struct dsi_ctrl_cmd_dma_info *cmd,
  477. u32 flags);
  478. /**
  479. * kickoff_command_non_embedded_mode() - cmd in non embedded mode
  480. * @ctrl: Pointer to the controller host hardware.
  481. * @cmd: Command information.
  482. * @flags: Modifiers for command transmission.
  483. *
  484. * If command length is greater than DMA FIFO size of 256 bytes we use
  485. * this non- embedded mode.
  486. * The controller hardware is programmed with address and size of the
  487. * command buffer. The transmission is kicked off if
  488. * DSI_CTRL_HW_CMD_WAIT_FOR_TRIGGER flag is not set. If this flag is
  489. * set, caller should make a separate call to trigger_command_dma() to
  490. * transmit the command.
  491. */
  492. void (*kickoff_command_non_embedded_mode)(struct dsi_ctrl_hw *ctrl,
  493. struct dsi_ctrl_cmd_dma_info *cmd,
  494. u32 flags);
  495. /**
  496. * kickoff_fifo_command() - transmits a command using FIFO in dsi
  497. * hardware.
  498. * @ctrl: Pointer to the controller host hardware.
  499. * @cmd: Command information.
  500. * @flags: Modifiers for command transmission.
  501. *
  502. * The controller hardware FIFO is programmed with command header and
  503. * payload. The transmission is kicked off if
  504. * DSI_CTRL_HW_CMD_WAIT_FOR_TRIGGER flag is not set. If this flag is
  505. * set, caller should make a separate call to trigger_command_dma() to
  506. * transmit the command.
  507. */
  508. void (*kickoff_fifo_command)(struct dsi_ctrl_hw *ctrl,
  509. struct dsi_ctrl_cmd_dma_fifo_info *cmd,
  510. u32 flags);
  511. void (*reset_cmd_fifo)(struct dsi_ctrl_hw *ctrl);
  512. /**
  513. * trigger_command_dma() - trigger transmission of command buffer.
  514. * @ctrl: Pointer to the controller host hardware.
  515. *
  516. * This trigger can be only used if there was a prior call to
  517. * kickoff_command() of kickoff_fifo_command() with
  518. * DSI_CTRL_HW_CMD_WAIT_FOR_TRIGGER flag.
  519. */
  520. void (*trigger_command_dma)(struct dsi_ctrl_hw *ctrl);
  521. /**
  522. * get_cmd_read_data() - get data read from the peripheral
  523. * @ctrl: Pointer to the controller host hardware.
  524. * @rd_buf: Buffer where data will be read into.
  525. * @read_offset: Offset from where to read.
  526. * @rx_byte: Number of bytes to be read.
  527. * @pkt_size: Size of response expected.
  528. * @hw_read_cnt: Actual number of bytes read by HW.
  529. */
  530. u32 (*get_cmd_read_data)(struct dsi_ctrl_hw *ctrl,
  531. u8 *rd_buf,
  532. u32 read_offset,
  533. u32 rx_byte,
  534. u32 pkt_size,
  535. u32 *hw_read_cnt);
  536. /**
  537. * wait_for_lane_idle() - wait for DSI lanes to go to idle state
  538. * @ctrl: Pointer to the controller host hardware.
  539. * @lanes: ORed list of lanes (enum dsi_data_lanes) which need
  540. * to be checked to be in idle state.
  541. */
  542. int (*wait_for_lane_idle)(struct dsi_ctrl_hw *ctrl, u32 lanes);
  543. struct ctrl_ulps_config_ops ulps_ops;
  544. /**
  545. * clamp_enable() - enable DSI clamps
  546. * @ctrl: Pointer to the controller host hardware.
  547. * @lanes: ORed list of lanes which need to have clamps released.
  548. * @enable_ulps: ulps state.
  549. */
  550. /**
  551. * clamp_enable() - enable DSI clamps to keep PHY driving a stable link
  552. * @ctrl: Pointer to the controller host hardware.
  553. * @lanes: ORed list of lanes which need to have clamps released.
  554. * @enable_ulps: TODO:??
  555. */
  556. void (*clamp_enable)(struct dsi_ctrl_hw *ctrl,
  557. u32 lanes,
  558. bool enable_ulps);
  559. /**
  560. * clamp_disable() - disable DSI clamps
  561. * @ctrl: Pointer to the controller host hardware.
  562. * @lanes: ORed list of lanes which need to have clamps released.
  563. * @disable_ulps: ulps state.
  564. */
  565. void (*clamp_disable)(struct dsi_ctrl_hw *ctrl,
  566. u32 lanes,
  567. bool disable_ulps);
  568. /**
  569. * phy_reset_config() - Disable/enable propagation of reset signal
  570. * from ahb domain to DSI PHY
  571. * @ctrl: Pointer to the controller host hardware.
  572. * @enable: True to mask the reset signal, false to unmask
  573. */
  574. void (*phy_reset_config)(struct dsi_ctrl_hw *ctrl,
  575. bool enable);
  576. /**
  577. * get_interrupt_status() - returns the interrupt status
  578. * @ctrl: Pointer to the controller host hardware.
  579. *
  580. * Returns the ORed list of interrupts(enum dsi_status_int_type) that
  581. * are active. This list does not include any error interrupts. Caller
  582. * should call get_error_status for error interrupts.
  583. *
  584. * Return: List of active interrupts.
  585. */
  586. u32 (*get_interrupt_status)(struct dsi_ctrl_hw *ctrl);
  587. /**
  588. * clear_interrupt_status() - clears the specified interrupts
  589. * @ctrl: Pointer to the controller host hardware.
  590. * @ints: List of interrupts to be cleared.
  591. */
  592. void (*clear_interrupt_status)(struct dsi_ctrl_hw *ctrl, u32 ints);
  593. /**
  594. * enable_status_interrupts() - enable the specified interrupts
  595. * @ctrl: Pointer to the controller host hardware.
  596. * @ints: List of interrupts to be enabled.
  597. *
  598. * Enables the specified interrupts. This list will override the
  599. * previous interrupts enabled through this function. Caller has to
  600. * maintain the state of the interrupts enabled. To disable all
  601. * interrupts, set ints to 0.
  602. */
  603. void (*enable_status_interrupts)(struct dsi_ctrl_hw *ctrl, u32 ints);
  604. /**
  605. * get_error_status() - returns the error status
  606. * @ctrl: Pointer to the controller host hardware.
  607. *
  608. * Returns the ORed list of errors(enum dsi_error_int_type) that are
  609. * active. This list does not include any status interrupts. Caller
  610. * should call get_interrupt_status for status interrupts.
  611. *
  612. * Return: List of active error interrupts.
  613. */
  614. u64 (*get_error_status)(struct dsi_ctrl_hw *ctrl);
  615. /**
  616. * clear_error_status() - clears the specified errors
  617. * @ctrl: Pointer to the controller host hardware.
  618. * @errors: List of errors to be cleared.
  619. */
  620. void (*clear_error_status)(struct dsi_ctrl_hw *ctrl, u64 errors);
  621. /**
  622. * enable_error_interrupts() - enable the specified interrupts
  623. * @ctrl: Pointer to the controller host hardware.
  624. * @errors: List of errors to be enabled.
  625. *
  626. * Enables the specified interrupts. This list will override the
  627. * previous interrupts enabled through this function. Caller has to
  628. * maintain the state of the interrupts enabled. To disable all
  629. * interrupts, set errors to 0.
  630. */
  631. void (*enable_error_interrupts)(struct dsi_ctrl_hw *ctrl, u64 errors);
  632. /**
  633. * video_test_pattern_setup() - setup test pattern engine for video mode
  634. * @ctrl: Pointer to the controller host hardware.
  635. * @type: Type of test pattern.
  636. * @init_val: Initial value to use for generating test pattern.
  637. */
  638. void (*video_test_pattern_setup)(struct dsi_ctrl_hw *ctrl,
  639. enum dsi_test_pattern type,
  640. u32 init_val);
  641. /**
  642. * cmd_test_pattern_setup() - setup test patttern engine for cmd mode
  643. * @ctrl: Pointer to the controller host hardware.
  644. * @type: Type of test pattern.
  645. * @init_val: Initial value to use for generating test pattern.
  646. * @stream_id: Stream Id on which packets are generated.
  647. */
  648. void (*cmd_test_pattern_setup)(struct dsi_ctrl_hw *ctrl,
  649. enum dsi_test_pattern type,
  650. u32 init_val,
  651. u32 stream_id);
  652. /**
  653. * test_pattern_enable() - enable test pattern engine
  654. * @ctrl: Pointer to the controller host hardware.
  655. * @enable: Enable/Disable test pattern engine.
  656. */
  657. void (*test_pattern_enable)(struct dsi_ctrl_hw *ctrl, bool enable);
  658. /**
  659. * clear_phy0_ln_err() - clear DSI PHY lane-0 errors
  660. * @ctrl: Pointer to the controller host hardware.
  661. */
  662. void (*clear_phy0_ln_err)(struct dsi_ctrl_hw *ctrl);
  663. /**
  664. * trigger_cmd_test_pattern() - trigger a command mode frame update with
  665. * test pattern
  666. * @ctrl: Pointer to the controller host hardware.
  667. * @stream_id: Stream on which frame update is sent.
  668. */
  669. void (*trigger_cmd_test_pattern)(struct dsi_ctrl_hw *ctrl,
  670. u32 stream_id);
  671. ssize_t (*reg_dump_to_buffer)(struct dsi_ctrl_hw *ctrl,
  672. char *buf,
  673. u32 size);
  674. /**
  675. * setup_misr() - Setup frame MISR
  676. * @ctrl: Pointer to the controller host hardware.
  677. * @panel_mode: CMD or VIDEO mode indicator
  678. * @enable: Enable/disable MISR.
  679. * @frame_count: Number of frames to accumulate MISR.
  680. */
  681. void (*setup_misr)(struct dsi_ctrl_hw *ctrl,
  682. enum dsi_op_mode panel_mode,
  683. bool enable, u32 frame_count);
  684. /**
  685. * collect_misr() - Read frame MISR
  686. * @ctrl: Pointer to the controller host hardware.
  687. * @panel_mode: CMD or VIDEO mode indicator
  688. */
  689. u32 (*collect_misr)(struct dsi_ctrl_hw *ctrl,
  690. enum dsi_op_mode panel_mode);
  691. /**
  692. * set_timing_db() - enable/disable Timing DB register
  693. * @ctrl: Pointer to controller host hardware.
  694. * @enable: Enable/Disable flag.
  695. *
  696. * Enable or Disabe the Timing DB register.
  697. */
  698. void (*set_timing_db)(struct dsi_ctrl_hw *ctrl,
  699. bool enable);
  700. /**
  701. * clear_rdbk_register() - Clear and reset read back register
  702. * @ctrl: Pointer to the controller host hardware.
  703. */
  704. void (*clear_rdbk_register)(struct dsi_ctrl_hw *ctrl);
  705. /** schedule_dma_cmd() - Schdeule DMA command transfer on a
  706. * particular blanking line.
  707. * @ctrl: Pointer to the controller host hardware.
  708. * @line_no: Blanking line number on whihch DMA command
  709. * needs to be sent.
  710. */
  711. void (*schedule_dma_cmd)(struct dsi_ctrl_hw *ctrl, int line_no);
  712. /**
  713. * ctrl_reset() - Reset DSI lanes to recover from DSI errors
  714. * @ctrl: Pointer to the controller host hardware.
  715. * @mask: Indicates the error type.
  716. */
  717. int (*ctrl_reset)(struct dsi_ctrl_hw *ctrl, int mask);
  718. /**
  719. * mask_error_int() - Mask/Unmask particular DSI error interrupts
  720. * @ctrl: Pointer to the controller host hardware.
  721. * @idx: Indicates the errors to be masked.
  722. * @en: Bool for mask or unmask of the error
  723. */
  724. void (*mask_error_intr)(struct dsi_ctrl_hw *ctrl, u32 idx, bool en);
  725. /**
  726. * error_intr_ctrl() - Mask/Unmask master DSI error interrupt
  727. * @ctrl: Pointer to the controller host hardware.
  728. * @en: Bool for mask or unmask of DSI error
  729. */
  730. void (*error_intr_ctrl)(struct dsi_ctrl_hw *ctrl, bool en);
  731. /**
  732. * get_error_mask() - get DSI error interrupt mask status
  733. * @ctrl: Pointer to the controller host hardware.
  734. */
  735. u32 (*get_error_mask)(struct dsi_ctrl_hw *ctrl);
  736. /**
  737. * get_hw_version() - get DSI controller hw version
  738. * @ctrl: Pointer to the controller host hardware.
  739. */
  740. u32 (*get_hw_version)(struct dsi_ctrl_hw *ctrl);
  741. /**
  742. * wait_for_cmd_mode_mdp_idle() - wait for command mode engine not to
  743. * be busy sending data from display engine
  744. * @ctrl: Pointer to the controller host hardware.
  745. */
  746. int (*wait_for_cmd_mode_mdp_idle)(struct dsi_ctrl_hw *ctrl);
  747. /**
  748. * hw.ops.set_continuous_clk() - Set continuous clock
  749. * @ctrl: Pointer to the controller host hardware.
  750. * @enable: Bool to control continuous clock request.
  751. */
  752. void (*set_continuous_clk)(struct dsi_ctrl_hw *ctrl, bool enable);
  753. /**
  754. * hw.ops.wait4dynamic_refresh_done() - Wait for dynamic refresh done
  755. * @ctrl: Pointer to the controller host hardware.
  756. */
  757. int (*wait4dynamic_refresh_done)(struct dsi_ctrl_hw *ctrl);
  758. /**
  759. * hw.ops.hs_req_sel() - enable continuous clk support through phy
  760. * @ctrl: Pointer to the controller host hardware.
  761. * @sel_phy: Bool to control whether to select phy or controller
  762. */
  763. void (*hs_req_sel)(struct dsi_ctrl_hw *ctrl, bool sel_phy);
  764. };
  765. /*
  766. * struct dsi_ctrl_hw - DSI controller hardware object specific to an instance
  767. * @base: VA for the DSI controller base address.
  768. * @length: Length of the DSI controller register map.
  769. * @mmss_misc_base: Base address of mmss_misc register map.
  770. * @mmss_misc_length: Length of mmss_misc register map.
  771. * @disp_cc_base: Base address of disp_cc register map.
  772. * @disp_cc_length: Length of disp_cc register map.
  773. * @index: Instance ID of the controller.
  774. * @feature_map: Features supported by the DSI controller.
  775. * @ops: Function pointers to the operations supported by the
  776. * controller.
  777. * @supported_interrupts: Number of supported interrupts.
  778. * @supported_errors: Number of supported errors.
  779. * @phy_isolation_enabled: A boolean property allows to isolate the phy from
  780. * dsi controller and run only dsi controller.
  781. * @null_insertion_enabled: A boolean property to allow dsi controller to
  782. * insert null packet.
  783. * @widebus_support: 48 bit wide data bus is supported.
  784. */
  785. struct dsi_ctrl_hw {
  786. void __iomem *base;
  787. u32 length;
  788. void __iomem *mmss_misc_base;
  789. u32 mmss_misc_length;
  790. void __iomem *disp_cc_base;
  791. u32 disp_cc_length;
  792. u32 index;
  793. /* features */
  794. DECLARE_BITMAP(feature_map, DSI_CTRL_MAX_FEATURES);
  795. struct dsi_ctrl_hw_ops ops;
  796. /* capabilities */
  797. u32 supported_interrupts;
  798. u64 supported_errors;
  799. bool phy_isolation_enabled;
  800. bool null_insertion_enabled;
  801. bool widebus_support;
  802. };
  803. #endif /* _DSI_CTRL_HW_H_ */