exynos_mipi_dsi_regs.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /* linux/driver/video/exynos/exynos_mipi_dsi_regs.h
  2. *
  3. * Register definition file for Samsung MIPI-DSIM driver
  4. *
  5. * Copyright (c) 2012 Samsung Electronics Co., Ltd
  6. *
  7. * InKi Dae <inki.dae@samsung.com>
  8. * Donghwa Lee <dh09.lee@samsung.com>
  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 _EXYNOS_MIPI_DSI_REGS_H
  15. #define _EXYNOS_MIPI_DSI_REGS_H
  16. #define EXYNOS_DSIM_STATUS 0x0 /* Status register */
  17. #define EXYNOS_DSIM_SWRST 0x4 /* Software reset register */
  18. #define EXYNOS_DSIM_CLKCTRL 0x8 /* Clock control register */
  19. #define EXYNOS_DSIM_TIMEOUT 0xc /* Time out register */
  20. #define EXYNOS_DSIM_CONFIG 0x10 /* Configuration register */
  21. #define EXYNOS_DSIM_ESCMODE 0x14 /* Escape mode register */
  22. /* Main display image resolution register */
  23. #define EXYNOS_DSIM_MDRESOL 0x18
  24. #define EXYNOS_DSIM_MVPORCH 0x1c /* Main display Vporch register */
  25. #define EXYNOS_DSIM_MHPORCH 0x20 /* Main display Hporch register */
  26. #define EXYNOS_DSIM_MSYNC 0x24 /* Main display sync area register */
  27. /* Sub display image resolution register */
  28. #define EXYNOS_DSIM_SDRESOL 0x28
  29. #define EXYNOS_DSIM_INTSRC 0x2c /* Interrupt source register */
  30. #define EXYNOS_DSIM_INTMSK 0x30 /* Interrupt mask register */
  31. #define EXYNOS_DSIM_PKTHDR 0x34 /* Packet Header FIFO register */
  32. #define EXYNOS_DSIM_PAYLOAD 0x38 /* Payload FIFO register */
  33. #define EXYNOS_DSIM_RXFIFO 0x3c /* Read FIFO register */
  34. #define EXYNOS_DSIM_FIFOTHLD 0x40 /* FIFO threshold level register */
  35. #define EXYNOS_DSIM_FIFOCTRL 0x44 /* FIFO status and control register */
  36. /* FIFO memory AC characteristic register */
  37. #define EXYNOS_DSIM_PLLCTRL 0x4c /* PLL control register */
  38. #define EXYNOS_DSIM_PLLTMR 0x50 /* PLL timer register */
  39. #define EXYNOS_DSIM_PHYACCHR 0x54 /* D-PHY AC characteristic register */
  40. #define EXYNOS_DSIM_PHYACCHR1 0x58 /* D-PHY AC characteristic register1 */
  41. /* DSIM_STATUS */
  42. #define DSIM_STOP_STATE_DAT(x) (((x) & 0xf) << 0)
  43. #define DSIM_STOP_STATE_CLK (1 << 8)
  44. #define DSIM_TX_READY_HS_CLK (1 << 10)
  45. /* DSIM_SWRST */
  46. #define DSIM_FUNCRST (1 << 16)
  47. #define DSIM_SWRST (1 << 0)
  48. /* EXYNOS_DSIM_TIMEOUT */
  49. #define DSIM_LPDR_TOUT_SHIFT(x) ((x) << 0)
  50. #define DSIM_BTA_TOUT_SHIFT(x) ((x) << 16)
  51. /* EXYNOS_DSIM_CLKCTRL */
  52. #define DSIM_LANE_ESC_CLKEN(x) (((x) & 0x1f) << 19)
  53. #define DSIM_BYTE_CLKEN_SHIFT(x) ((x) << 24)
  54. #define DSIM_BYTE_CLK_SRC_SHIFT(x) ((x) << 25)
  55. #define DSIM_PLL_BYPASS_SHIFT(x) ((x) << 27)
  56. #define DSIM_ESC_CLKEN_SHIFT(x) ((x) << 28)
  57. #define DSIM_TX_REQUEST_HSCLK_SHIFT(x) ((x) << 31)
  58. /* EXYNOS_DSIM_CONFIG */
  59. #define DSIM_LANE_ENx(x) (((x) & 0x1f) << 0)
  60. #define DSIM_NUM_OF_DATALANE_SHIFT(x) ((x) << 5)
  61. #define DSIM_HSA_MODE_SHIFT(x) ((x) << 20)
  62. #define DSIM_HBP_MODE_SHIFT(x) ((x) << 21)
  63. #define DSIM_HFP_MODE_SHIFT(x) ((x) << 22)
  64. #define DSIM_HSE_MODE_SHIFT(x) ((x) << 23)
  65. #define DSIM_AUTO_MODE_SHIFT(x) ((x) << 24)
  66. #define DSIM_EOT_DISABLE(x) ((x) << 28)
  67. #define DSIM_AUTO_FLUSH(x) ((x) << 29)
  68. #define DSIM_NUM_OF_DATA_LANE(x) ((x) << DSIM_NUM_OF_DATALANE_SHIFT)
  69. /* EXYNOS_DSIM_ESCMODE */
  70. #define DSIM_TX_LPDT_LP (1 << 6)
  71. #define DSIM_CMD_LPDT_LP (1 << 7)
  72. #define DSIM_FORCE_STOP_STATE_SHIFT(x) ((x) << 20)
  73. #define DSIM_STOP_STATE_CNT_SHIFT(x) ((x) << 21)
  74. /* EXYNOS_DSIM_MDRESOL */
  75. #define DSIM_MAIN_STAND_BY (1 << 31)
  76. #define DSIM_MAIN_VRESOL(x) (((x) & 0x7ff) << 16)
  77. #define DSIM_MAIN_HRESOL(x) (((x) & 0X7ff) << 0)
  78. /* EXYNOS_DSIM_MVPORCH */
  79. #define DSIM_CMD_ALLOW_SHIFT(x) ((x) << 28)
  80. #define DSIM_STABLE_VFP_SHIFT(x) ((x) << 16)
  81. #define DSIM_MAIN_VBP_SHIFT(x) ((x) << 0)
  82. #define DSIM_CMD_ALLOW_MASK (0xf << 28)
  83. #define DSIM_STABLE_VFP_MASK (0x7ff << 16)
  84. #define DSIM_MAIN_VBP_MASK (0x7ff << 0)
  85. /* EXYNOS_DSIM_MHPORCH */
  86. #define DSIM_MAIN_HFP_SHIFT(x) ((x) << 16)
  87. #define DSIM_MAIN_HBP_SHIFT(x) ((x) << 0)
  88. #define DSIM_MAIN_HFP_MASK ((0xffff) << 16)
  89. #define DSIM_MAIN_HBP_MASK ((0xffff) << 0)
  90. /* EXYNOS_DSIM_MSYNC */
  91. #define DSIM_MAIN_VSA_SHIFT(x) ((x) << 22)
  92. #define DSIM_MAIN_HSA_SHIFT(x) ((x) << 0)
  93. #define DSIM_MAIN_VSA_MASK ((0x3ff) << 22)
  94. #define DSIM_MAIN_HSA_MASK ((0xffff) << 0)
  95. /* EXYNOS_DSIM_SDRESOL */
  96. #define DSIM_SUB_STANDY_SHIFT(x) ((x) << 31)
  97. #define DSIM_SUB_VRESOL_SHIFT(x) ((x) << 16)
  98. #define DSIM_SUB_HRESOL_SHIFT(x) ((x) << 0)
  99. #define DSIM_SUB_STANDY_MASK ((0x1) << 31)
  100. #define DSIM_SUB_VRESOL_MASK ((0x7ff) << 16)
  101. #define DSIM_SUB_HRESOL_MASK ((0x7ff) << 0)
  102. /* EXYNOS_DSIM_INTSRC */
  103. #define INTSRC_PLL_STABLE (1 << 31)
  104. #define INTSRC_SW_RST_RELEASE (1 << 30)
  105. #define INTSRC_SFR_FIFO_EMPTY (1 << 29)
  106. #define INTSRC_FRAME_DONE (1 << 24)
  107. #define INTSRC_RX_DATA_DONE (1 << 18)
  108. /* EXYNOS_DSIM_INTMSK */
  109. #define INTMSK_FIFO_EMPTY (1 << 29)
  110. #define INTMSK_BTA (1 << 25)
  111. #define INTMSK_FRAME_DONE (1 << 24)
  112. #define INTMSK_RX_TIMEOUT (1 << 21)
  113. #define INTMSK_BTA_TIMEOUT (1 << 20)
  114. #define INTMSK_RX_DONE (1 << 18)
  115. #define INTMSK_RX_TE (1 << 17)
  116. #define INTMSK_RX_ACK (1 << 16)
  117. #define INTMSK_RX_ECC_ERR (1 << 15)
  118. #define INTMSK_RX_CRC_ERR (1 << 14)
  119. /* EXYNOS_DSIM_FIFOCTRL */
  120. #define SFR_HEADER_EMPTY (1 << 22)
  121. /* EXYNOS_DSIM_PHYACCHR */
  122. #define DSIM_AFC_CTL(x) (((x) & 0x7) << 5)
  123. /* EXYNOS_DSIM_PLLCTRL */
  124. #define DSIM_PLL_EN_SHIFT(x) ((x) << 23)
  125. #define DSIM_FREQ_BAND_SHIFT(x) ((x) << 24)
  126. #endif /* _EXYNOS_MIPI_DSI_REGS_H */