hi6220_regs_acpu.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. /*
  2. * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef HI6220_REGS_ACPU_H
  7. #define HI6220_REGS_ACPU_H
  8. #define ACPU_CTRL_BASE 0xF6504000
  9. #define ACPU_SC_CPU_CTRL (ACPU_CTRL_BASE + 0x000)
  10. #define ACPU_SC_CPU_STAT (ACPU_CTRL_BASE + 0x008)
  11. #define ACPU_SC_CPU_STAT_SC_STANDBYWFIL2 (1 << 0)
  12. #define ACPU_SC_CPU_STAT_SC_STANDBYWFIL2_SHIFT (0)
  13. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI0 (1 << 1)
  14. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI0_SHIFT (1)
  15. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI1 (1 << 2)
  16. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI1_SHIFT (2)
  17. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI2 (1 << 3)
  18. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI2_SHIFT (3)
  19. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI3 (1 << 4)
  20. #define ACPU_SC_CPU_STAT_SC_STANDBYWFI3_SHIFT (4)
  21. #define ACPU_SC_CPU_STAT_A53_1_STANDBYWFIL2 (1 << 8)
  22. #define ACPU_SC_CPU_STAT_A53_1_STANDBYWFIL2_SHIFT (8)
  23. #define ACPU_SC_CPU_STAT_A53_1_STANDBYWFI (1 << 9)
  24. #define ACPU_SC_CPU_STAT_A53_1_STANDBYWFI_SHIFT (9)
  25. #define ACPU_SC_CPU_STAT_L2FLSHUDONE0 (1 << 16)
  26. #define ACPU_SC_CPU_STAT_L2FLSHUDONE0_SHIFT (16)
  27. #define ACPU_SC_CPU_STAT_L2FLSHUDONE1 (1 << 17)
  28. #define ACPU_SC_CPU_STAT_L2FLSHUDONE1_SHIFT (17)
  29. #define ACPU_SC_CPU_STAT_CCI400_ACTIVE (1 << 18)
  30. #define ACPU_SC_CPU_STAT_CCI400_ACTIVE_SHIFT (18)
  31. #define ACPU_SC_CPU_STAT_CLK_DIV_STATUS_VD (1 << 20)
  32. #define ACPU_SC_CPU_STAT_CLK_DIV_STATUS_VD_SHIFT (20)
  33. #define ACPU_SC_CLKEN (ACPU_CTRL_BASE + 0x00c)
  34. #define HPM_L2_1_CLKEN (1 << 9)
  35. #define G_CPU_1_CLKEN (1 << 8)
  36. #define HPM_L2_CLKEN (1 << 1)
  37. #define G_CPU_CLKEN (1 << 0)
  38. #define ACPU_SC_CLKDIS (ACPU_CTRL_BASE + 0x010)
  39. #define ACPU_SC_CLK_STAT (ACPU_CTRL_BASE + 0x014)
  40. #define ACPU_SC_RSTEN (ACPU_CTRL_BASE + 0x018)
  41. #define SRST_PRESET1_RSTEN (1 << 11)
  42. #define SRST_PRESET0_RSTEN (1 << 10)
  43. #define SRST_CLUSTER1_RSTEN (1 << 9)
  44. #define SRST_CLUSTER0_RSTEN (1 << 8)
  45. #define SRST_L2_HPM_1_RSTEN (1 << 5)
  46. #define SRST_AARM_L2_1_RSTEN (1 << 4)
  47. #define SRST_L2_HPM_0_RSTEN (1 << 3)
  48. #define SRST_AARM_L2_0_RSTEN (1 << 1)
  49. #define SRST_CLUSTER1 (SRST_PRESET1_RSTEN | \
  50. SRST_CLUSTER1_RSTEN | \
  51. SRST_L2_HPM_1_RSTEN | \
  52. SRST_AARM_L2_1_RSTEN)
  53. #define SRST_CLUSTER0 (SRST_PRESET0_RSTEN | \
  54. SRST_CLUSTER0_RSTEN | \
  55. SRST_L2_HPM_0_RSTEN | \
  56. SRST_AARM_L2_0_RSTEN)
  57. #define ACPU_SC_RSTDIS (ACPU_CTRL_BASE + 0x01c)
  58. #define ACPU_SC_RST_STAT (ACPU_CTRL_BASE + 0x020)
  59. #define ACPU_SC_PDBGUP_MBIST (ACPU_CTRL_BASE + 0x02c)
  60. #define PDBGUP_CLUSTER1_SHIFT 8
  61. #define ACPU_SC_VD_CTRL (ACPU_CTRL_BASE + 0x054)
  62. #define ACPU_SC_VD_MASK_PATTERN_CTRL (ACPU_CTRL_BASE + 0x058)
  63. #define ACPU_SC_VD_MASK_PATTERN_VAL (0xCCB << 12)
  64. #define ACPU_SC_VD_MASK_PATTERN_MASK ((0x1 << 13) - 1)
  65. #define ACPU_SC_VD_DLY_FIXED_CTRL (ACPU_CTRL_BASE + 0x05c)
  66. #define ACPU_SC_VD_DLY_TABLE0_CTRL (ACPU_CTRL_BASE + 0x060)
  67. #define ACPU_SC_VD_DLY_TABLE1_CTRL (ACPU_CTRL_BASE + 0x064)
  68. #define ACPU_SC_VD_DLY_TABLE2_CTRL (ACPU_CTRL_BASE + 0x068)
  69. #define ACPU_SC_VD_HPM_CTRL (ACPU_CTRL_BASE + 0x06c)
  70. #define ACPU_SC_A53_CLUSTER_MTCMOS_EN (ACPU_CTRL_BASE + 0x088)
  71. #define PW_MTCMOS_EN_A53_1_EN (1 << 1)
  72. #define PW_MTCMOS_EN_A53_0_EN (1 << 0)
  73. #define ACPU_SC_A53_CLUSTER_MTCMOS_STA (ACPU_CTRL_BASE + 0x090)
  74. #define ACPU_SC_A53_CLUSTER_ISO_EN (ACPU_CTRL_BASE + 0x098)
  75. #define PW_ISO_A53_1_EN (1 << 1)
  76. #define PW_ISO_A53_0_EN (1 << 0)
  77. #define ACPU_SC_A53_CLUSTER_ISO_DIS (ACPU_CTRL_BASE + 0x09c)
  78. #define ACPU_SC_A53_CLUSTER_ISO_STA (ACPU_CTRL_BASE + 0x0a0)
  79. #define ACPU_SC_A53_1_MTCMOS_TIMER (ACPU_CTRL_BASE + 0x0b4)
  80. #define ACPU_SC_A53_0_MTCMOS_TIMER (ACPU_CTRL_BASE + 0x0bc)
  81. #define ACPU_SC_A53_x_MTCMOS_TIMER(x) ((x) ? ACPU_SC_A53_1_MTCMOS_TIMER : ACPU_SC_A53_0_MTCMOS_TIMER)
  82. #define ACPU_SC_SNOOP_PWD (ACPU_CTRL_BASE + 0xe4)
  83. #define PD_DETECT_START1 (1 << 16)
  84. #define PD_DETECT_START0 (1 << 0)
  85. #define ACPU_SC_CPU0_CTRL (ACPU_CTRL_BASE + 0x100)
  86. #define CPU_CTRL_AARCH64_MODE (1 << 7)
  87. #define ACPU_SC_CPU0_STAT (ACPU_CTRL_BASE + 0x104)
  88. #define ACPU_SC_CPU0_CLKEN (ACPU_CTRL_BASE + 0x108)
  89. #define CPU_CLKEN_HPM (1 << 1)
  90. #define ACPU_SC_CPU0_CLK_STAT (ACPU_CTRL_BASE + 0x110)
  91. #define ACPU_SC_CPU0_RSTEN (ACPU_CTRL_BASE + 0x114)
  92. #define ACPU_SC_CPU0_RSTDIS (ACPU_CTRL_BASE + 0x118)
  93. #define ACPU_SC_CPU0_MTCMOS_EN (ACPU_CTRL_BASE + 0x120)
  94. #define CPU_MTCMOS_PW (1 << 0)
  95. #define ACPU_SC_CPU0_PW_ISOEN (ACPU_CTRL_BASE + 0x130)
  96. #define CPU_PW_ISO (1 << 0)
  97. #define ACPU_SC_CPU0_PW_ISODIS (ACPU_CTRL_BASE + 0x134)
  98. #define ACPU_SC_CPU0_PW_ISO_STAT (ACPU_CTRL_BASE + 0x138)
  99. #define ACPU_SC_CPU0_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x154)
  100. #define CPU_MTCMOS_TIMER_STA (1 << 0)
  101. #define ACPU_SC_CPU0_RVBARADDR (ACPU_CTRL_BASE + 0x158)
  102. #define ACPU_SC_CPU1_CTRL (ACPU_CTRL_BASE + 0x200)
  103. #define ACPU_SC_CPU1_STAT (ACPU_CTRL_BASE + 0x204)
  104. #define ACPU_SC_CPU1_CLKEN (ACPU_CTRL_BASE + 0x208)
  105. #define ACPU_SC_CPU1_CLK_STAT (ACPU_CTRL_BASE + 0x210)
  106. #define ACPU_SC_CPU1_RSTEN (ACPU_CTRL_BASE + 0x214)
  107. #define ACPU_SC_CPU1_RSTDIS (ACPU_CTRL_BASE + 0x218)
  108. #define ACPU_SC_CPU1_MTCMOS_EN (ACPU_CTRL_BASE + 0x220)
  109. #define ACPU_SC_CPU1_PW_ISODIS (ACPU_CTRL_BASE + 0x234)
  110. #define ACPU_SC_CPU1_PW_ISO_STAT (ACPU_CTRL_BASE + 0x238)
  111. #define ACPU_SC_CPU1_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x254)
  112. #define ACPU_SC_CPU1_RVBARADDR (ACPU_CTRL_BASE + 0x258)
  113. #define ACPU_SC_CPU2_CTRL (ACPU_CTRL_BASE + 0x300)
  114. #define ACPU_SC_CPU2_STAT (ACPU_CTRL_BASE + 0x304)
  115. #define ACPU_SC_CPU2_CLKEN (ACPU_CTRL_BASE + 0x308)
  116. #define ACPU_SC_CPU2_CLK_STAT (ACPU_CTRL_BASE + 0x310)
  117. #define ACPU_SC_CPU2_RSTEN (ACPU_CTRL_BASE + 0x314)
  118. #define ACPU_SC_CPU2_RSTDIS (ACPU_CTRL_BASE + 0x318)
  119. #define ACPU_SC_CPU2_MTCMOS_EN (ACPU_CTRL_BASE + 0x320)
  120. #define ACPU_SC_CPU2_PW_ISODIS (ACPU_CTRL_BASE + 0x334)
  121. #define ACPU_SC_CPU2_PW_ISO_STAT (ACPU_CTRL_BASE + 0x338)
  122. #define ACPU_SC_CPU2_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x354)
  123. #define ACPU_SC_CPU2_RVBARADDR (ACPU_CTRL_BASE + 0x358)
  124. #define ACPU_SC_CPU3_CTRL (ACPU_CTRL_BASE + 0x400)
  125. #define ACPU_SC_CPU3_STAT (ACPU_CTRL_BASE + 0x404)
  126. #define ACPU_SC_CPU3_CLKEN (ACPU_CTRL_BASE + 0x408)
  127. #define ACPU_SC_CPU3_CLK_STAT (ACPU_CTRL_BASE + 0x410)
  128. #define ACPU_SC_CPU3_RSTEN (ACPU_CTRL_BASE + 0x414)
  129. #define ACPU_SC_CPU3_RSTDIS (ACPU_CTRL_BASE + 0x418)
  130. #define ACPU_SC_CPU3_MTCMOS_EN (ACPU_CTRL_BASE + 0x420)
  131. #define ACPU_SC_CPU3_PW_ISODIS (ACPU_CTRL_BASE + 0x434)
  132. #define ACPU_SC_CPU3_PW_ISO_STAT (ACPU_CTRL_BASE + 0x438)
  133. #define ACPU_SC_CPU3_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x454)
  134. #define ACPU_SC_CPU3_RVBARADDR (ACPU_CTRL_BASE + 0x458)
  135. #define ACPU_SC_CPU4_CTRL (ACPU_CTRL_BASE + 0x500)
  136. #define ACPU_SC_CPU4_STAT (ACPU_CTRL_BASE + 0x504)
  137. #define ACPU_SC_CPU4_CLKEN (ACPU_CTRL_BASE + 0x508)
  138. #define ACPU_SC_CPU4_CLK_STAT (ACPU_CTRL_BASE + 0x510)
  139. #define ACPU_SC_CPU4_RSTEN (ACPU_CTRL_BASE + 0x514)
  140. #define ACPU_SC_CPU4_RSTDIS (ACPU_CTRL_BASE + 0x518)
  141. #define ACPU_SC_CPU4_MTCMOS_EN (ACPU_CTRL_BASE + 0x520)
  142. #define ACPU_SC_CPU4_PW_ISODIS (ACPU_CTRL_BASE + 0x534)
  143. #define ACPU_SC_CPU4_PW_ISO_STAT (ACPU_CTRL_BASE + 0x538)
  144. #define ACPU_SC_CPU4_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x554)
  145. #define ACPU_SC_CPU4_RVBARADDR (ACPU_CTRL_BASE + 0x558)
  146. #define ACPU_SC_CPU5_CTRL (ACPU_CTRL_BASE + 0x600)
  147. #define ACPU_SC_CPU5_STAT (ACPU_CTRL_BASE + 0x604)
  148. #define ACPU_SC_CPU5_CLKEN (ACPU_CTRL_BASE + 0x608)
  149. #define ACPU_SC_CPU5_CLK_STAT (ACPU_CTRL_BASE + 0x610)
  150. #define ACPU_SC_CPU5_RSTEN (ACPU_CTRL_BASE + 0x614)
  151. #define ACPU_SC_CPU5_RSTDIS (ACPU_CTRL_BASE + 0x618)
  152. #define ACPU_SC_CPU5_MTCMOS_EN (ACPU_CTRL_BASE + 0x620)
  153. #define ACPU_SC_CPU5_PW_ISODIS (ACPU_CTRL_BASE + 0x634)
  154. #define ACPU_SC_CPU5_PW_ISO_STAT (ACPU_CTRL_BASE + 0x638)
  155. #define ACPU_SC_CPU5_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x654)
  156. #define ACPU_SC_CPU5_RVBARADDR (ACPU_CTRL_BASE + 0x658)
  157. #define ACPU_SC_CPU6_CTRL (ACPU_CTRL_BASE + 0x700)
  158. #define ACPU_SC_CPU6_STAT (ACPU_CTRL_BASE + 0x704)
  159. #define ACPU_SC_CPU6_CLKEN (ACPU_CTRL_BASE + 0x708)
  160. #define ACPU_SC_CPU6_CLK_STAT (ACPU_CTRL_BASE + 0x710)
  161. #define ACPU_SC_CPU6_RSTEN (ACPU_CTRL_BASE + 0x714)
  162. #define ACPU_SC_CPU6_RSTDIS (ACPU_CTRL_BASE + 0x718)
  163. #define ACPU_SC_CPU6_MTCMOS_EN (ACPU_CTRL_BASE + 0x720)
  164. #define ACPU_SC_CPU6_PW_ISODIS (ACPU_CTRL_BASE + 0x734)
  165. #define ACPU_SC_CPU6_PW_ISO_STAT (ACPU_CTRL_BASE + 0x738)
  166. #define ACPU_SC_CPU6_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x754)
  167. #define ACPU_SC_CPU6_RVBARADDR (ACPU_CTRL_BASE + 0x758)
  168. #define ACPU_SC_CPU7_CTRL (ACPU_CTRL_BASE + 0x800)
  169. #define ACPU_SC_CPU7_STAT (ACPU_CTRL_BASE + 0x804)
  170. #define ACPU_SC_CPU7_CLKEN (ACPU_CTRL_BASE + 0x808)
  171. #define ACPU_SC_CPU7_CLK_STAT (ACPU_CTRL_BASE + 0x810)
  172. #define ACPU_SC_CPU7_RSTEN (ACPU_CTRL_BASE + 0x814)
  173. #define ACPU_SC_CPU7_RSTDIS (ACPU_CTRL_BASE + 0x818)
  174. #define ACPU_SC_CPU7_MTCMOS_EN (ACPU_CTRL_BASE + 0x820)
  175. #define ACPU_SC_CPU7_PW_ISODIS (ACPU_CTRL_BASE + 0x834)
  176. #define ACPU_SC_CPU7_PW_ISO_STAT (ACPU_CTRL_BASE + 0x838)
  177. #define ACPU_SC_CPU7_MTCMOS_TIMER_STAT (ACPU_CTRL_BASE + 0x854)
  178. #define ACPU_SC_CPU7_RVBARADDR (ACPU_CTRL_BASE + 0x858)
  179. #define ACPU_SC_CPUx_CTRL(x) ((x < 8) ? (ACPU_SC_CPU0_CTRL + 0x100 * x) : ACPU_SC_CPU0_CTRL)
  180. #define ACPU_SC_CPUx_STAT(x) ((x < 8) ? (ACPU_SC_CPU0_STAT + 0x100 * x) : ACPU_SC_CPU0_STAT)
  181. #define ACPU_SC_CPUx_CLKEN(x) ((x < 8) ? (ACPU_SC_CPU0_CLKEN + 0x100 * x) : ACPU_SC_CPU0_CLKEN)
  182. #define ACPU_SC_CPUx_CLK_STAT(x) ((x < 8) ? (ACPU_SC_CPU0_CLK_STAT + 0x100 * x) : ACPU_SC_CPU0_CLK_STAT)
  183. #define ACPU_SC_CPUx_RSTEN(x) ((x < 8) ? (ACPU_SC_CPU0_RSTEN + 0x100 * x) : ACPU_SC_CPU0_RSTEN)
  184. #define ACPU_SC_CPUx_RSTDIS(x) ((x < 8) ? (ACPU_SC_CPU0_RSTDIS + 0x100 * x) : ACPU_SC_CPU0_RSTDIS)
  185. #define ACPU_SC_CPUx_MTCMOS_EN(x) ((x < 8) ? (ACPU_SC_CPU0_MTCMOS_EN + 0x100 * x) : ACPU_SC_CPU0_MTCMOS_EN)
  186. #define ACPU_SC_CPUx_PW_ISODIS(x) ((x < 8) ? (ACPU_SC_CPU0_PW_ISODIS + 0x100 * x) : ACPU_SC_CPU0_PW_ISODIS)
  187. #define ACPU_SC_CPUx_PW_ISO_STAT(x) ((x < 8) ? (ACPU_SC_CPU0_PW_ISO_STAT + 0x100 * x) : ACPU_SC_CPU0_PW_ISO_STAT)
  188. #define ACPU_SC_CPUx_MTCMOS_TIMER_STAT(x) ((x < 8) ? (ACPU_SC_CPU0_MTCMOS_TIMER_STAT + 0x100 * x) : ACPU_SC_CPU0_MTCMOS_TIMER_STAT)
  189. #define ACPU_SC_CPUx_RVBARADDR(x) ((x < 8) ? (ACPU_SC_CPU0_RVBARADDR + 0x100 * x) : ACPU_SC_CPU0_RVBARADDR)
  190. #define ACPU_SC_CPU_STAT_CLKDIV_VD_MASK (3 << 20)
  191. #define ACPU_SC_VD_CTRL_TUNE_EN_DIF (1 << 0)
  192. #define ACPU_SC_VD_CTRL_TUNE_EN_DIF_SHIFT (0)
  193. #define ACPU_SC_VD_CTRL_TUNE (1 << 1)
  194. #define ACPU_SC_VD_CTRL_TUNE_SHIFT (1)
  195. #define ACPU_SC_VD_CTRL_CALIBRATE_EN_DIF (1 << 7)
  196. #define ACPU_SC_VD_CTRL_CALIBRATE_EN_DIF_SHIFT (7)
  197. #define ACPU_SC_VD_CTRL_CALIBRATE_EN_INI (1 << 8)
  198. #define ACPU_SC_VD_CTRL_CALIBRATE_EN_INI_SHIFT (8)
  199. #define ACPU_SC_VD_CTRL_CLK_DIS_CNT_CLR (1 << 9)
  200. #define ACPU_SC_VD_CTRL_CLK_DIS_CNT_CLR_SHIFT (9)
  201. #define ACPU_SC_VD_CTRL_CLK_DIS_CNT_EN (1 << 10)
  202. #define ACPU_SC_VD_CTRL_CLK_DIS_CNT_EN_SHIFT (10)
  203. #define ACPU_SC_VD_CTRL_TUNE_EN_INT (1 << 11)
  204. #define ACPU_SC_VD_CTRL_TUNE_EN_INT_SHIFT (11)
  205. #define ACPU_SC_VD_CTRL_SHIFT_TABLE0 (1 << 12)
  206. #define ACPU_SC_VD_CTRL_SHIFT_TABLE0_MASK (0xf << 12)
  207. #define ACPU_SC_VD_CTRL_SHIFT_TABLE0_SHIFT (12)
  208. #define ACPU_SC_VD_CTRL_SHIFT_TABLE1 (1 << 16)
  209. #define ACPU_SC_VD_CTRL_SHIFT_TABLE1_MASK (0xf << 16)
  210. #define ACPU_SC_VD_CTRL_SHIFT_TABLE1_SHIFT (16)
  211. #define ACPU_SC_VD_CTRL_SHIFT_TABLE2 (1 << 20)
  212. #define ACPU_SC_VD_CTRL_SHIFT_TABLE2_MASK (0xf << 20)
  213. #define ACPU_SC_VD_CTRL_SHIFT_TABLE2_SHIFT (20)
  214. #define ACPU_SC_VD_CTRL_SHIFT_TABLE3 (1 << 24)
  215. #define ACPU_SC_VD_CTRL_SHIFT_TABLE3_MASK (0xf << 24)
  216. #define ACPU_SC_VD_CTRL_SHIFT_TABLE3_SHIFT (24)
  217. #define ACPU_SC_VD_CTRL_FORCE_CLK_EN (1 << 28)
  218. #define ACPU_SC_VD_CTRL_FORCE_CLK_EN_SHIFT (28)
  219. #define ACPU_SC_VD_CTRL_DIV_EN_DIF (1 << 29)
  220. #define ACPU_SC_VD_CTRL_DIV_EN_DIF_SHIFT (29)
  221. #define ACPU_SC_VD_SHIFT_TABLE_TUNE_VAL \
  222. ((0x1 << ACPU_SC_VD_CTRL_SHIFT_TABLE0_SHIFT) | \
  223. (0x3 << ACPU_SC_VD_CTRL_SHIFT_TABLE1_SHIFT) | \
  224. (0x5 << ACPU_SC_VD_CTRL_SHIFT_TABLE2_SHIFT) | \
  225. (0x6 << ACPU_SC_VD_CTRL_SHIFT_TABLE3_SHIFT) | \
  226. (0x7 << ACPU_SC_VD_CTRL_TUNE_SHIFT))
  227. #define ACPU_SC_VD_SHIFT_TABLE_TUNE_MASK \
  228. ((0xF << ACPU_SC_VD_CTRL_SHIFT_TABLE0_SHIFT) | \
  229. (0xF << ACPU_SC_VD_CTRL_SHIFT_TABLE1_SHIFT) | \
  230. (0xF << ACPU_SC_VD_CTRL_SHIFT_TABLE2_SHIFT) | \
  231. (0xF << ACPU_SC_VD_CTRL_SHIFT_TABLE3_SHIFT) | \
  232. (0x3F << ACPU_SC_VD_CTRL_TUNE_SHIFT))
  233. #define ACPU_SC_VD_HPM_CTRL_OSC_DIV (1 << 0)
  234. #define ACPU_SC_VD_HPM_CTRL_OSC_DIV_SHIFT (0)
  235. #define ACPU_SC_VD_HPM_CTRL_OSC_DIV_MASK (0x000000FF)
  236. #define ACPU_SC_VD_HPM_CTRL_DLY_EXP (1 << 8)
  237. #define ACPU_SC_VD_HPM_CTRL_DLY_EXP_SHIFT (8)
  238. #define ACPU_SC_VD_HPM_CTRL_DLY_EXP_MASK (0x001FFF00)
  239. #define HPM_OSC_DIV_VAL \
  240. (0x56 << ACPU_SC_VD_HPM_CTRL_OSC_DIV_SHIFT)
  241. #define HPM_OSC_DIV_MASK \
  242. (ACPU_SC_VD_HPM_CTRL_OSC_DIV_MASK)
  243. #define HPM_DLY_EXP_VAL \
  244. (0xC7A << ACPU_SC_VD_HPM_CTRL_DLY_EXP_SHIFT)
  245. #define HPM_DLY_EXP_MASK \
  246. (ACPU_SC_VD_HPM_CTRL_DLY_EXP_MASK)
  247. #define ACPU_SC_VD_EN_ASIC_VAL \
  248. ((0x0 << ACPU_SC_VD_CTRL_FORCE_CLK_EN_SHIFT) | \
  249. (0x0 << ACPU_SC_VD_CTRL_CLK_DIS_CNT_EN_SHIFT) | \
  250. (0x0 << ACPU_SC_VD_CTRL_CALIBRATE_EN_INI_SHIFT) | \
  251. (0x0 << ACPU_SC_VD_CTRL_CALIBRATE_EN_DIF_SHIFT) | \
  252. (0X0 << ACPU_SC_VD_CTRL_DIV_EN_DIF_SHIFT) | \
  253. (0X0 << ACPU_SC_VD_CTRL_TUNE_EN_INT_SHIFT) | \
  254. (0x0 << ACPU_SC_VD_CTRL_TUNE_EN_DIF_SHIFT))
  255. #define ACPU_SC_VD_EN_SFT_VAL \
  256. ((0x0 << ACPU_SC_VD_CTRL_FORCE_CLK_EN_SHIFT) | \
  257. (0x0 << ACPU_SC_VD_CTRL_CLK_DIS_CNT_EN_SHIFT) | \
  258. (0x0 << ACPU_SC_VD_CTRL_CALIBRATE_EN_INI_SHIFT) | \
  259. (0x0 << ACPU_SC_VD_CTRL_CALIBRATE_EN_DIF_SHIFT) | \
  260. (0x0 << ACPU_SC_VD_CTRL_DIV_EN_DIF_SHIFT) | \
  261. (0x0 << ACPU_SC_VD_CTRL_TUNE_EN_INT_SHIFT) | \
  262. (0x0 << ACPU_SC_VD_CTRL_TUNE_EN_DIF_SHIFT))
  263. #define ACPU_SC_VD_EN_MASK \
  264. ((0x1 << ACPU_SC_VD_CTRL_FORCE_CLK_EN_SHIFT) | \
  265. (0x1 << ACPU_SC_VD_CTRL_CLK_DIS_CNT_EN_SHIFT) | \
  266. (0x1 << ACPU_SC_VD_CTRL_CALIBRATE_EN_INI_SHIFT) | \
  267. (0x1 << ACPU_SC_VD_CTRL_CALIBRATE_EN_DIF_SHIFT) | \
  268. (0x1 << ACPU_SC_VD_CTRL_DIV_EN_DIF_SHIFT) | \
  269. (0x1 << ACPU_SC_VD_CTRL_TUNE_EN_INT_SHIFT) | \
  270. (0x1 << ACPU_SC_VD_CTRL_TUNE_EN_DIF_SHIFT))
  271. #endif /* HI6220_REGS_ACPU_H */