rk3128-cru.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
  3. * Author: Elaine <zhangqing@rock-chips.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3128_H
  16. #define _DT_BINDINGS_CLK_ROCKCHIP_RK3128_H
  17. /* core clocks */
  18. #define PLL_APLL 1
  19. #define PLL_DPLL 2
  20. #define PLL_CPLL 3
  21. #define PLL_GPLL 4
  22. #define ARMCLK 5
  23. #define PLL_GPLL_DIV2 6
  24. #define PLL_GPLL_DIV3 7
  25. /* sclk gates (special clocks) */
  26. #define SCLK_SPI0 65
  27. #define SCLK_NANDC 67
  28. #define SCLK_SDMMC 68
  29. #define SCLK_SDIO 69
  30. #define SCLK_EMMC 71
  31. #define SCLK_UART0 77
  32. #define SCLK_UART1 78
  33. #define SCLK_UART2 79
  34. #define SCLK_I2S0 80
  35. #define SCLK_I2S1 81
  36. #define SCLK_SPDIF 83
  37. #define SCLK_TIMER0 85
  38. #define SCLK_TIMER1 86
  39. #define SCLK_TIMER2 87
  40. #define SCLK_TIMER3 88
  41. #define SCLK_TIMER4 89
  42. #define SCLK_TIMER5 90
  43. #define SCLK_SARADC 91
  44. #define SCLK_I2S_OUT 113
  45. #define SCLK_SDMMC_DRV 114
  46. #define SCLK_SDIO_DRV 115
  47. #define SCLK_EMMC_DRV 117
  48. #define SCLK_SDMMC_SAMPLE 118
  49. #define SCLK_SDIO_SAMPLE 119
  50. #define SCLK_EMMC_SAMPLE 121
  51. #define SCLK_VOP 122
  52. #define SCLK_MAC_SRC 124
  53. #define SCLK_MAC 126
  54. #define SCLK_MAC_REFOUT 127
  55. #define SCLK_MAC_REF 128
  56. #define SCLK_MAC_RX 129
  57. #define SCLK_MAC_TX 130
  58. #define SCLK_HEVC_CORE 134
  59. #define SCLK_RGA 135
  60. #define SCLK_CRYPTO 138
  61. #define SCLK_TSP 139
  62. #define SCLK_OTGPHY0 142
  63. #define SCLK_OTGPHY1 143
  64. #define SCLK_DDRC 144
  65. #define SCLK_PVTM_FUNC 145
  66. #define SCLK_PVTM_CORE 146
  67. #define SCLK_PVTM_GPU 147
  68. #define SCLK_MIPI_24M 148
  69. #define SCLK_PVTM 149
  70. #define SCLK_CIF_SRC 150
  71. #define SCLK_CIF_OUT_SRC 151
  72. #define SCLK_CIF_OUT 152
  73. #define SCLK_SFC 153
  74. #define SCLK_USB480M 154
  75. /* dclk gates */
  76. #define DCLK_VOP 190
  77. #define DCLK_EBC 191
  78. /* aclk gates */
  79. #define ACLK_VIO0 192
  80. #define ACLK_VIO1 193
  81. #define ACLK_DMAC 194
  82. #define ACLK_CPU 195
  83. #define ACLK_VEPU 196
  84. #define ACLK_VDPU 197
  85. #define ACLK_CIF 198
  86. #define ACLK_IEP 199
  87. #define ACLK_LCDC0 204
  88. #define ACLK_RGA 205
  89. #define ACLK_PERI 210
  90. #define ACLK_VOP 211
  91. #define ACLK_GMAC 212
  92. #define ACLK_GPU 213
  93. /* pclk gates */
  94. #define PCLK_SARADC 318
  95. #define PCLK_WDT 319
  96. #define PCLK_GPIO0 320
  97. #define PCLK_GPIO1 321
  98. #define PCLK_GPIO2 322
  99. #define PCLK_GPIO3 323
  100. #define PCLK_VIO_H2P 324
  101. #define PCLK_MIPI 325
  102. #define PCLK_EFUSE 326
  103. #define PCLK_HDMI 327
  104. #define PCLK_ACODEC 328
  105. #define PCLK_GRF 329
  106. #define PCLK_I2C0 332
  107. #define PCLK_I2C1 333
  108. #define PCLK_I2C2 334
  109. #define PCLK_I2C3 335
  110. #define PCLK_SPI0 338
  111. #define PCLK_UART0 341
  112. #define PCLK_UART1 342
  113. #define PCLK_UART2 343
  114. #define PCLK_TSADC 344
  115. #define PCLK_PWM 350
  116. #define PCLK_TIMER 353
  117. #define PCLK_CPU 354
  118. #define PCLK_PERI 363
  119. #define PCLK_GMAC 367
  120. #define PCLK_PMU_PRE 368
  121. #define PCLK_SIM_CARD 369
  122. /* hclk gates */
  123. #define HCLK_SPDIF 440
  124. #define HCLK_GPS 441
  125. #define HCLK_USBHOST 442
  126. #define HCLK_I2S_8CH 443
  127. #define HCLK_I2S_2CH 444
  128. #define HCLK_VOP 452
  129. #define HCLK_NANDC 453
  130. #define HCLK_SDMMC 456
  131. #define HCLK_SDIO 457
  132. #define HCLK_EMMC 459
  133. #define HCLK_CPU 460
  134. #define HCLK_VEPU 461
  135. #define HCLK_VDPU 462
  136. #define HCLK_LCDC0 463
  137. #define HCLK_EBC 465
  138. #define HCLK_VIO 466
  139. #define HCLK_RGA 467
  140. #define HCLK_IEP 468
  141. #define HCLK_VIO_H2P 469
  142. #define HCLK_CIF 470
  143. #define HCLK_HOST2 473
  144. #define HCLK_OTG 474
  145. #define HCLK_TSP 475
  146. #define HCLK_CRYPTO 476
  147. #define HCLK_PERI 478
  148. #define CLK_NR_CLKS (HCLK_PERI + 1)
  149. /* soft-reset indices */
  150. #define SRST_CORE0_PO 0
  151. #define SRST_CORE1_PO 1
  152. #define SRST_CORE2_PO 2
  153. #define SRST_CORE3_PO 3
  154. #define SRST_CORE0 4
  155. #define SRST_CORE1 5
  156. #define SRST_CORE2 6
  157. #define SRST_CORE3 7
  158. #define SRST_CORE0_DBG 8
  159. #define SRST_CORE1_DBG 9
  160. #define SRST_CORE2_DBG 10
  161. #define SRST_CORE3_DBG 11
  162. #define SRST_TOPDBG 12
  163. #define SRST_ACLK_CORE 13
  164. #define SRST_STRC_SYS_A 14
  165. #define SRST_L2C 15
  166. #define SRST_CPUSYS_H 18
  167. #define SRST_AHB2APBSYS_H 19
  168. #define SRST_SPDIF 20
  169. #define SRST_INTMEM 21
  170. #define SRST_ROM 22
  171. #define SRST_PERI_NIU 23
  172. #define SRST_I2S_2CH 24
  173. #define SRST_I2S_8CH 25
  174. #define SRST_GPU_PVTM 26
  175. #define SRST_FUNC_PVTM 27
  176. #define SRST_CORE_PVTM 29
  177. #define SRST_EFUSE_P 30
  178. #define SRST_ACODEC_P 31
  179. #define SRST_GPIO0 32
  180. #define SRST_GPIO1 33
  181. #define SRST_GPIO2 34
  182. #define SRST_GPIO3 35
  183. #define SRST_MIPIPHY_P 36
  184. #define SRST_UART0 39
  185. #define SRST_UART1 40
  186. #define SRST_UART2 41
  187. #define SRST_I2C0 43
  188. #define SRST_I2C1 44
  189. #define SRST_I2C2 45
  190. #define SRST_I2C3 46
  191. #define SRST_SFC 47
  192. #define SRST_PWM 48
  193. #define SRST_DAP_PO 50
  194. #define SRST_DAP 51
  195. #define SRST_DAP_SYS 52
  196. #define SRST_CRYPTO 53
  197. #define SRST_GRF 55
  198. #define SRST_GMAC 56
  199. #define SRST_PERIPH_SYS_A 57
  200. #define SRST_PERIPH_SYS_H 58
  201. #define SRST_PERIPH_SYS_P 59
  202. #define SRST_SMART_CARD 60
  203. #define SRST_CPU_PERI 61
  204. #define SRST_EMEM_PERI 62
  205. #define SRST_USB_PERI 63
  206. #define SRST_DMA 64
  207. #define SRST_GPS 67
  208. #define SRST_NANDC 68
  209. #define SRST_USBOTG0 69
  210. #define SRST_OTGC0 71
  211. #define SRST_USBOTG1 72
  212. #define SRST_OTGC1 74
  213. #define SRST_DDRMSCH 79
  214. #define SRST_SDMMC 81
  215. #define SRST_SDIO 82
  216. #define SRST_EMMC 83
  217. #define SRST_SPI 84
  218. #define SRST_WDT 86
  219. #define SRST_SARADC 87
  220. #define SRST_DDRPHY 88
  221. #define SRST_DDRPHY_P 89
  222. #define SRST_DDRCTRL 90
  223. #define SRST_DDRCTRL_P 91
  224. #define SRST_TSP 92
  225. #define SRST_TSP_CLKIN 93
  226. #define SRST_HOST0_ECHI 94
  227. #define SRST_HDMI_P 96
  228. #define SRST_VIO_ARBI_H 97
  229. #define SRST_VIO0_A 98
  230. #define SRST_VIO_BUS_H 99
  231. #define SRST_VOP_A 100
  232. #define SRST_VOP_H 101
  233. #define SRST_VOP_D 102
  234. #define SRST_UTMI0 103
  235. #define SRST_UTMI1 104
  236. #define SRST_USBPOR 105
  237. #define SRST_IEP_A 106
  238. #define SRST_IEP_H 107
  239. #define SRST_RGA_A 108
  240. #define SRST_RGA_H 109
  241. #define SRST_CIF0 110
  242. #define SRST_PMU 111
  243. #define SRST_VCODEC_A 112
  244. #define SRST_VCODEC_H 113
  245. #define SRST_VIO1_A 114
  246. #define SRST_HEVC_CORE 115
  247. #define SRST_VCODEC_NIU_A 116
  248. #define SRST_PMU_NIU_P 117
  249. #define SRST_LCDC0_S 119
  250. #define SRST_GPU 120
  251. #define SRST_GPU_NIU_A 122
  252. #define SRST_EBC_A 123
  253. #define SRST_EBC_H 124
  254. #define SRST_CORE_DBG 128
  255. #define SRST_DBG_P 129
  256. #define SRST_TIMER0 130
  257. #define SRST_TIMER1 131
  258. #define SRST_TIMER2 132
  259. #define SRST_TIMER3 133
  260. #define SRST_TIMER4 134
  261. #define SRST_TIMER5 135
  262. #define SRST_VIO_H2P 136
  263. #define SRST_VIO_MIPI_DSI 137
  264. #endif