rv1108-cru.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. /*
  2. * Copyright (c) 2016 Rockchip Electronics Co. Ltd.
  3. * Author: Shawn Lin <shawn.lin@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_RV1108_H
  16. #define _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
  17. /* pll id */
  18. #define PLL_APLL 0
  19. #define PLL_DPLL 1
  20. #define PLL_GPLL 2
  21. #define ARMCLK 3
  22. /* sclk gates (special clocks) */
  23. #define SCLK_SPI0 65
  24. #define SCLK_NANDC 67
  25. #define SCLK_SDMMC 68
  26. #define SCLK_SDIO 69
  27. #define SCLK_EMMC 71
  28. #define SCLK_UART0 72
  29. #define SCLK_UART1 73
  30. #define SCLK_UART2 74
  31. #define SCLK_I2S0 75
  32. #define SCLK_I2S1 76
  33. #define SCLK_I2S2 77
  34. #define SCLK_TIMER0 78
  35. #define SCLK_TIMER1 79
  36. #define SCLK_SFC 80
  37. #define SCLK_SDMMC_DRV 81
  38. #define SCLK_SDIO_DRV 82
  39. #define SCLK_EMMC_DRV 83
  40. #define SCLK_SDMMC_SAMPLE 84
  41. #define SCLK_SDIO_SAMPLE 85
  42. #define SCLK_EMMC_SAMPLE 86
  43. #define SCLK_VENC_CORE 87
  44. #define SCLK_HEVC_CORE 88
  45. #define SCLK_HEVC_CABAC 89
  46. #define SCLK_PWM0_PMU 90
  47. #define SCLK_I2C0_PMU 91
  48. #define SCLK_WIFI 92
  49. #define SCLK_CIFOUT 93
  50. #define SCLK_MIPI_CSI_OUT 94
  51. #define SCLK_CIF0 95
  52. #define SCLK_CIF1 96
  53. #define SCLK_CIF2 97
  54. #define SCLK_CIF3 98
  55. #define SCLK_DSP 99
  56. #define SCLK_DSP_IOP 100
  57. #define SCLK_DSP_EPP 101
  58. #define SCLK_DSP_EDP 102
  59. #define SCLK_DSP_EDAP 103
  60. #define SCLK_CVBS_HOST 104
  61. #define SCLK_HDMI_SFR 105
  62. #define SCLK_HDMI_CEC 106
  63. #define SCLK_CRYPTO 107
  64. #define SCLK_SPI 108
  65. #define SCLK_SARADC 109
  66. #define SCLK_TSADC 110
  67. #define SCLK_MAC_PRE 111
  68. #define SCLK_MAC 112
  69. #define SCLK_MAC_RX 113
  70. #define SCLK_MAC_REF 114
  71. #define SCLK_MAC_REFOUT 115
  72. #define SCLK_DSP_PFM 116
  73. #define SCLK_RGA 117
  74. #define SCLK_I2C1 118
  75. #define SCLK_I2C2 119
  76. #define SCLK_I2C3 120
  77. #define SCLK_PWM 121
  78. #define SCLK_ISP 122
  79. #define SCLK_USBPHY 123
  80. #define SCLK_I2S0_SRC 124
  81. #define SCLK_I2S1_SRC 125
  82. #define SCLK_I2S2_SRC 126
  83. #define SCLK_UART0_SRC 127
  84. #define SCLK_UART1_SRC 128
  85. #define SCLK_UART2_SRC 129
  86. #define DCLK_VOP_SRC 185
  87. #define DCLK_HDMIPHY 186
  88. #define DCLK_VOP 187
  89. /* aclk gates */
  90. #define ACLK_DMAC 192
  91. #define ACLK_PRE 193
  92. #define ACLK_CORE 194
  93. #define ACLK_ENMCORE 195
  94. #define ACLK_RKVENC 196
  95. #define ACLK_RKVDEC 197
  96. #define ACLK_VPU 198
  97. #define ACLK_CIF0 199
  98. #define ACLK_VIO0 200
  99. #define ACLK_VIO1 201
  100. #define ACLK_VOP 202
  101. #define ACLK_IEP 203
  102. #define ACLK_RGA 204
  103. #define ACLK_ISP 205
  104. #define ACLK_CIF1 206
  105. #define ACLK_CIF2 207
  106. #define ACLK_CIF3 208
  107. #define ACLK_PERI 209
  108. #define ACLK_GMAC 210
  109. /* pclk gates */
  110. #define PCLK_GPIO1 256
  111. #define PCLK_GPIO2 257
  112. #define PCLK_GPIO3 258
  113. #define PCLK_GRF 259
  114. #define PCLK_I2C1 260
  115. #define PCLK_I2C2 261
  116. #define PCLK_I2C3 262
  117. #define PCLK_SPI 263
  118. #define PCLK_SFC 264
  119. #define PCLK_UART0 265
  120. #define PCLK_UART1 266
  121. #define PCLK_UART2 267
  122. #define PCLK_TSADC 268
  123. #define PCLK_PWM 269
  124. #define PCLK_TIMER 270
  125. #define PCLK_PERI 271
  126. #define PCLK_GPIO0_PMU 272
  127. #define PCLK_I2C0_PMU 273
  128. #define PCLK_PWM0_PMU 274
  129. #define PCLK_ISP 275
  130. #define PCLK_VIO 276
  131. #define PCLK_MIPI_DSI 277
  132. #define PCLK_HDMI_CTRL 278
  133. #define PCLK_SARADC 279
  134. #define PCLK_DSP_CFG 280
  135. #define PCLK_BUS 281
  136. #define PCLK_EFUSE0 282
  137. #define PCLK_EFUSE1 283
  138. #define PCLK_WDT 284
  139. #define PCLK_GMAC 285
  140. /* hclk gates */
  141. #define HCLK_I2S0_8CH 320
  142. #define HCLK_I2S1_2CH 321
  143. #define HCLK_I2S2_2CH 322
  144. #define HCLK_NANDC 323
  145. #define HCLK_SDMMC 324
  146. #define HCLK_SDIO 325
  147. #define HCLK_EMMC 326
  148. #define HCLK_PERI 327
  149. #define HCLK_SFC 328
  150. #define HCLK_RKVENC 329
  151. #define HCLK_RKVDEC 330
  152. #define HCLK_CIF0 331
  153. #define HCLK_VIO 332
  154. #define HCLK_VOP 333
  155. #define HCLK_IEP 334
  156. #define HCLK_RGA 335
  157. #define HCLK_ISP 336
  158. #define HCLK_CRYPTO_MST 337
  159. #define HCLK_CRYPTO_SLV 338
  160. #define HCLK_HOST0 339
  161. #define HCLK_OTG 340
  162. #define HCLK_CIF1 341
  163. #define HCLK_CIF2 342
  164. #define HCLK_CIF3 343
  165. #define HCLK_BUS 344
  166. #define HCLK_VPU 345
  167. #define CLK_NR_CLKS (HCLK_VPU + 1)
  168. /* reset id */
  169. #define SRST_CORE_PO_AD 0
  170. #define SRST_CORE_AD 1
  171. #define SRST_L2_AD 2
  172. #define SRST_CPU_NIU_AD 3
  173. #define SRST_CORE_PO 4
  174. #define SRST_CORE 5
  175. #define SRST_L2 6
  176. #define SRST_CORE_DBG 8
  177. #define PRST_DBG 9
  178. #define RST_DAP 10
  179. #define PRST_DBG_NIU 11
  180. #define ARST_STRC_SYS_AD 15
  181. #define SRST_DDRPHY_CLKDIV 16
  182. #define SRST_DDRPHY 17
  183. #define PRST_DDRPHY 18
  184. #define PRST_HDMIPHY 19
  185. #define PRST_VDACPHY 20
  186. #define PRST_VADCPHY 21
  187. #define PRST_MIPI_CSI_PHY 22
  188. #define PRST_MIPI_DSI_PHY 23
  189. #define PRST_ACODEC 24
  190. #define ARST_BUS_NIU 25
  191. #define PRST_TOP_NIU 26
  192. #define ARST_INTMEM 27
  193. #define HRST_ROM 28
  194. #define ARST_DMAC 29
  195. #define SRST_MSCH_NIU 30
  196. #define PRST_MSCH_NIU 31
  197. #define PRST_DDRUPCTL 32
  198. #define NRST_DDRUPCTL 33
  199. #define PRST_DDRMON 34
  200. #define HRST_I2S0_8CH 35
  201. #define MRST_I2S0_8CH 36
  202. #define HRST_I2S1_2CH 37
  203. #define MRST_IS21_2CH 38
  204. #define HRST_I2S2_2CH 39
  205. #define MRST_I2S2_2CH 40
  206. #define HRST_CRYPTO 41
  207. #define SRST_CRYPTO 42
  208. #define PRST_SPI 43
  209. #define SRST_SPI 44
  210. #define PRST_UART0 45
  211. #define PRST_UART1 46
  212. #define PRST_UART2 47
  213. #define SRST_UART0 48
  214. #define SRST_UART1 49
  215. #define SRST_UART2 50
  216. #define PRST_I2C1 51
  217. #define PRST_I2C2 52
  218. #define PRST_I2C3 53
  219. #define SRST_I2C1 54
  220. #define SRST_I2C2 55
  221. #define SRST_I2C3 56
  222. #define PRST_PWM1 58
  223. #define SRST_PWM1 60
  224. #define PRST_WDT 61
  225. #define PRST_GPIO1 62
  226. #define PRST_GPIO2 63
  227. #define PRST_GPIO3 64
  228. #define PRST_GRF 65
  229. #define PRST_EFUSE 66
  230. #define PRST_EFUSE512 67
  231. #define PRST_TIMER0 68
  232. #define SRST_TIMER0 69
  233. #define SRST_TIMER1 70
  234. #define PRST_TSADC 71
  235. #define SRST_TSADC 72
  236. #define PRST_SARADC 73
  237. #define SRST_SARADC 74
  238. #define HRST_SYSBUS 75
  239. #define PRST_USBGRF 76
  240. #define ARST_PERIPH_NIU 80
  241. #define HRST_PERIPH_NIU 81
  242. #define PRST_PERIPH_NIU 82
  243. #define HRST_PERIPH 83
  244. #define HRST_SDMMC 84
  245. #define HRST_SDIO 85
  246. #define HRST_EMMC 86
  247. #define HRST_NANDC 87
  248. #define NRST_NANDC 88
  249. #define HRST_SFC 89
  250. #define SRST_SFC 90
  251. #define ARST_GMAC 91
  252. #define HRST_OTG 92
  253. #define SRST_OTG 93
  254. #define SRST_OTG_ADP 94
  255. #define HRST_HOST0 95
  256. #define HRST_HOST0_AUX 96
  257. #define HRST_HOST0_ARB 97
  258. #define SRST_HOST0_EHCIPHY 98
  259. #define SRST_HOST0_UTMI 99
  260. #define SRST_USBPOR 100
  261. #define SRST_UTMI0 101
  262. #define SRST_UTMI1 102
  263. #define ARST_VIO0_NIU 102
  264. #define ARST_VIO1_NIU 103
  265. #define HRST_VIO_NIU 104
  266. #define PRST_VIO_NIU 105
  267. #define ARST_VOP 106
  268. #define HRST_VOP 107
  269. #define DRST_VOP 108
  270. #define ARST_IEP 109
  271. #define HRST_IEP 110
  272. #define ARST_RGA 111
  273. #define HRST_RGA 112
  274. #define SRST_RGA 113
  275. #define PRST_CVBS 114
  276. #define PRST_HDMI 115
  277. #define SRST_HDMI 116
  278. #define PRST_MIPI_DSI 117
  279. #define ARST_ISP_NIU 118
  280. #define HRST_ISP_NIU 119
  281. #define HRST_ISP 120
  282. #define SRST_ISP 121
  283. #define ARST_VIP0 122
  284. #define HRST_VIP0 123
  285. #define PRST_VIP0 124
  286. #define ARST_VIP1 125
  287. #define HRST_VIP1 126
  288. #define PRST_VIP1 127
  289. #define ARST_VIP2 128
  290. #define HRST_VIP2 129
  291. #define PRST_VIP2 120
  292. #define ARST_VIP3 121
  293. #define HRST_VIP3 122
  294. #define PRST_VIP4 123
  295. #define PRST_CIF1TO4 124
  296. #define SRST_CVBS_CLK 125
  297. #define HRST_CVBS 126
  298. #define ARST_VPU_NIU 140
  299. #define HRST_VPU_NIU 141
  300. #define ARST_VPU 142
  301. #define HRST_VPU 143
  302. #define ARST_RKVDEC_NIU 144
  303. #define HRST_RKVDEC_NIU 145
  304. #define ARST_RKVDEC 146
  305. #define HRST_RKVDEC 147
  306. #define SRST_RKVDEC_CABAC 148
  307. #define SRST_RKVDEC_CORE 149
  308. #define ARST_RKVENC_NIU 150
  309. #define HRST_RKVENC_NIU 151
  310. #define ARST_RKVENC 152
  311. #define HRST_RKVENC 153
  312. #define SRST_RKVENC_CORE 154
  313. #define SRST_DSP_CORE 156
  314. #define SRST_DSP_SYS 157
  315. #define SRST_DSP_GLOBAL 158
  316. #define SRST_DSP_OECM 159
  317. #define PRST_DSP_IOP_NIU 160
  318. #define ARST_DSP_EPP_NIU 161
  319. #define ARST_DSP_EDP_NIU 162
  320. #define PRST_DSP_DBG_NIU 163
  321. #define PRST_DSP_CFG_NIU 164
  322. #define PRST_DSP_GRF 165
  323. #define PRST_DSP_MAILBOX 166
  324. #define PRST_DSP_INTC 167
  325. #define PRST_DSP_PFM_MON 169
  326. #define SRST_DSP_PFM_MON 170
  327. #define ARST_DSP_EDAP_NIU 171
  328. #define SRST_PMU 172
  329. #define SRST_PMU_I2C0 173
  330. #define PRST_PMU_I2C0 174
  331. #define PRST_PMU_GPIO0 175
  332. #define PRST_PMU_INTMEM 176
  333. #define PRST_PMU_PWM0 177
  334. #define SRST_PMU_PWM0 178
  335. #define PRST_PMU_GRF 179
  336. #define SRST_PMU_NIU 180
  337. #define SRST_PMU_PVTM 181
  338. #define ARST_DSP_EDP_PERF 184
  339. #define ARST_DSP_EPP_PERF 185
  340. #endif /* _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H */