rk3368-cru.h 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. /*
  2. * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3368_H
  15. #define _DT_BINDINGS_CLK_ROCKCHIP_RK3368_H
  16. /* core clocks */
  17. #define PLL_APLLB 1
  18. #define PLL_APLLL 2
  19. #define PLL_DPLL 3
  20. #define PLL_CPLL 4
  21. #define PLL_GPLL 5
  22. #define PLL_NPLL 6
  23. #define ARMCLKB 7
  24. #define ARMCLKL 8
  25. /* sclk gates (special clocks) */
  26. #define SCLK_GPU_CORE 64
  27. #define SCLK_SPI0 65
  28. #define SCLK_SPI1 66
  29. #define SCLK_SPI2 67
  30. #define SCLK_SDMMC 68
  31. #define SCLK_SDIO0 69
  32. #define SCLK_EMMC 71
  33. #define SCLK_TSADC 72
  34. #define SCLK_SARADC 73
  35. #define SCLK_NANDC0 75
  36. #define SCLK_UART0 77
  37. #define SCLK_UART1 78
  38. #define SCLK_UART2 79
  39. #define SCLK_UART3 80
  40. #define SCLK_UART4 81
  41. #define SCLK_I2S_8CH 82
  42. #define SCLK_SPDIF_8CH 83
  43. #define SCLK_I2S_2CH 84
  44. #define SCLK_TIMER00 85
  45. #define SCLK_TIMER01 86
  46. #define SCLK_TIMER02 87
  47. #define SCLK_TIMER03 88
  48. #define SCLK_TIMER04 89
  49. #define SCLK_TIMER05 90
  50. #define SCLK_OTGPHY0 93
  51. #define SCLK_OTG_ADP 96
  52. #define SCLK_HSICPHY480M 97
  53. #define SCLK_HSICPHY12M 98
  54. #define SCLK_MACREF 99
  55. #define SCLK_VOP0_PWM 100
  56. #define SCLK_MAC_RX 102
  57. #define SCLK_MAC_TX 103
  58. #define SCLK_EDP_24M 104
  59. #define SCLK_EDP 105
  60. #define SCLK_RGA 106
  61. #define SCLK_ISP 107
  62. #define SCLK_HDCP 108
  63. #define SCLK_HDMI_HDCP 109
  64. #define SCLK_HDMI_CEC 110
  65. #define SCLK_HEVC_CABAC 111
  66. #define SCLK_HEVC_CORE 112
  67. #define SCLK_I2S_8CH_OUT 113
  68. #define SCLK_SDMMC_DRV 114
  69. #define SCLK_SDIO0_DRV 115
  70. #define SCLK_EMMC_DRV 117
  71. #define SCLK_SDMMC_SAMPLE 118
  72. #define SCLK_SDIO0_SAMPLE 119
  73. #define SCLK_EMMC_SAMPLE 121
  74. #define SCLK_USBPHY480M 122
  75. #define SCLK_PVTM_CORE 123
  76. #define SCLK_PVTM_GPU 124
  77. #define SCLK_PVTM_PMU 125
  78. #define SCLK_SFC 126
  79. #define SCLK_MAC 127
  80. #define SCLK_MACREF_OUT 128
  81. #define SCLK_TIMER10 133
  82. #define SCLK_TIMER11 134
  83. #define SCLK_TIMER12 135
  84. #define SCLK_TIMER13 136
  85. #define SCLK_TIMER14 137
  86. #define SCLK_TIMER15 138
  87. #define DCLK_VOP 190
  88. #define MCLK_CRYPTO 191
  89. /* aclk gates */
  90. #define ACLK_GPU_MEM 192
  91. #define ACLK_GPU_CFG 193
  92. #define ACLK_DMAC_BUS 194
  93. #define ACLK_DMAC_PERI 195
  94. #define ACLK_PERI_MMU 196
  95. #define ACLK_GMAC 197
  96. #define ACLK_VOP 198
  97. #define ACLK_VOP_IEP 199
  98. #define ACLK_RGA 200
  99. #define ACLK_HDCP 201
  100. #define ACLK_IEP 202
  101. #define ACLK_VIO0_NOC 203
  102. #define ACLK_VIP 204
  103. #define ACLK_ISP 205
  104. #define ACLK_VIO1_NOC 206
  105. #define ACLK_VIDEO 208
  106. #define ACLK_BUS 209
  107. #define ACLK_PERI 210
  108. /* pclk gates */
  109. #define PCLK_GPIO0 320
  110. #define PCLK_GPIO1 321
  111. #define PCLK_GPIO2 322
  112. #define PCLK_GPIO3 323
  113. #define PCLK_PMUGRF 324
  114. #define PCLK_MAILBOX 325
  115. #define PCLK_GRF 329
  116. #define PCLK_SGRF 330
  117. #define PCLK_PMU 331
  118. #define PCLK_I2C0 332
  119. #define PCLK_I2C1 333
  120. #define PCLK_I2C2 334
  121. #define PCLK_I2C3 335
  122. #define PCLK_I2C4 336
  123. #define PCLK_I2C5 337
  124. #define PCLK_SPI0 338
  125. #define PCLK_SPI1 339
  126. #define PCLK_SPI2 340
  127. #define PCLK_UART0 341
  128. #define PCLK_UART1 342
  129. #define PCLK_UART2 343
  130. #define PCLK_UART3 344
  131. #define PCLK_UART4 345
  132. #define PCLK_TSADC 346
  133. #define PCLK_SARADC 347
  134. #define PCLK_SIM 348
  135. #define PCLK_GMAC 349
  136. #define PCLK_PWM0 350
  137. #define PCLK_PWM1 351
  138. #define PCLK_TIMER0 353
  139. #define PCLK_TIMER1 354
  140. #define PCLK_EDP_CTRL 355
  141. #define PCLK_MIPI_DSI0 356
  142. #define PCLK_MIPI_CSI 358
  143. #define PCLK_HDCP 359
  144. #define PCLK_HDMI_CTRL 360
  145. #define PCLK_VIO_H2P 361
  146. #define PCLK_BUS 362
  147. #define PCLK_PERI 363
  148. #define PCLK_DDRUPCTL 364
  149. #define PCLK_DDRPHY 365
  150. #define PCLK_ISP 366
  151. #define PCLK_VIP 367
  152. #define PCLK_WDT 368
  153. #define PCLK_EFUSE256 369
  154. /* hclk gates */
  155. #define HCLK_SFC 448
  156. #define HCLK_OTG0 449
  157. #define HCLK_HOST0 450
  158. #define HCLK_HOST1 451
  159. #define HCLK_HSIC 452
  160. #define HCLK_NANDC0 453
  161. #define HCLK_TSP 455
  162. #define HCLK_SDMMC 456
  163. #define HCLK_SDIO0 457
  164. #define HCLK_EMMC 459
  165. #define HCLK_HSADC 460
  166. #define HCLK_CRYPTO 461
  167. #define HCLK_I2S_2CH 462
  168. #define HCLK_I2S_8CH 463
  169. #define HCLK_SPDIF 464
  170. #define HCLK_VOP 465
  171. #define HCLK_ROM 467
  172. #define HCLK_IEP 468
  173. #define HCLK_ISP 469
  174. #define HCLK_RGA 470
  175. #define HCLK_VIO_AHB_ARBI 471
  176. #define HCLK_VIO_NOC 472
  177. #define HCLK_VIP 473
  178. #define HCLK_VIO_H2P 474
  179. #define HCLK_VIO_HDCPMMU 475
  180. #define HCLK_VIDEO 476
  181. #define HCLK_BUS 477
  182. #define HCLK_PERI 478
  183. #define CLK_NR_CLKS (HCLK_PERI + 1)
  184. /* soft-reset indices */
  185. #define SRST_CORE_B0 0
  186. #define SRST_CORE_B1 1
  187. #define SRST_CORE_B2 2
  188. #define SRST_CORE_B3 3
  189. #define SRST_CORE_B0_PO 4
  190. #define SRST_CORE_B1_PO 5
  191. #define SRST_CORE_B2_PO 6
  192. #define SRST_CORE_B3_PO 7
  193. #define SRST_L2_B 8
  194. #define SRST_ADB_B 9
  195. #define SRST_PD_CORE_B_NIU 10
  196. #define SRST_PDBUS_STRSYS 11
  197. #define SRST_SOCDBG_B 14
  198. #define SRST_CORE_B_DBG 15
  199. #define SRST_DMAC1 18
  200. #define SRST_INTMEM 19
  201. #define SRST_ROM 20
  202. #define SRST_SPDIF8CH 21
  203. #define SRST_I2S8CH 23
  204. #define SRST_MAILBOX 24
  205. #define SRST_I2S2CH 25
  206. #define SRST_EFUSE_256 26
  207. #define SRST_MCU_SYS 28
  208. #define SRST_MCU_PO 29
  209. #define SRST_MCU_NOC 30
  210. #define SRST_EFUSE 31
  211. #define SRST_GPIO0 32
  212. #define SRST_GPIO1 33
  213. #define SRST_GPIO2 34
  214. #define SRST_GPIO3 35
  215. #define SRST_GPIO4 36
  216. #define SRST_PMUGRF 41
  217. #define SRST_I2C0 42
  218. #define SRST_I2C1 43
  219. #define SRST_I2C2 44
  220. #define SRST_I2C3 45
  221. #define SRST_I2C4 46
  222. #define SRST_I2C5 47
  223. #define SRST_DWPWM 48
  224. #define SRST_MMC_PERI 49
  225. #define SRST_PERIPH_MMU 50
  226. #define SRST_GRF 55
  227. #define SRST_PMU 56
  228. #define SRST_PERIPH_AXI 57
  229. #define SRST_PERIPH_AHB 58
  230. #define SRST_PERIPH_APB 59
  231. #define SRST_PERIPH_NIU 60
  232. #define SRST_PDPERI_AHB_ARBI 61
  233. #define SRST_EMEM 62
  234. #define SRST_USB_PERI 63
  235. #define SRST_DMAC2 64
  236. #define SRST_MAC 66
  237. #define SRST_GPS 67
  238. #define SRST_RKPWM 69
  239. #define SRST_USBHOST0 72
  240. #define SRST_HSIC 73
  241. #define SRST_HSIC_AUX 74
  242. #define SRST_HSIC_PHY 75
  243. #define SRST_HSADC 76
  244. #define SRST_NANDC0 77
  245. #define SRST_SFC 79
  246. #define SRST_SPI0 83
  247. #define SRST_SPI1 84
  248. #define SRST_SPI2 85
  249. #define SRST_SARADC 87
  250. #define SRST_PDALIVE_NIU 88
  251. #define SRST_PDPMU_INTMEM 89
  252. #define SRST_PDPMU_NIU 90
  253. #define SRST_SGRF 91
  254. #define SRST_VIO_ARBI 96
  255. #define SRST_RGA_NIU 97
  256. #define SRST_VIO0_NIU_AXI 98
  257. #define SRST_VIO_NIU_AHB 99
  258. #define SRST_LCDC0_AXI 100
  259. #define SRST_LCDC0_AHB 101
  260. #define SRST_LCDC0_DCLK 102
  261. #define SRST_VIP 104
  262. #define SRST_RGA_CORE 105
  263. #define SRST_IEP_AXI 106
  264. #define SRST_IEP_AHB 107
  265. #define SRST_RGA_AXI 108
  266. #define SRST_RGA_AHB 109
  267. #define SRST_ISP 110
  268. #define SRST_EDP_24M 111
  269. #define SRST_VIDEO_AXI 112
  270. #define SRST_VIDEO_AHB 113
  271. #define SRST_MIPIDPHYTX 114
  272. #define SRST_MIPIDSI0 115
  273. #define SRST_MIPIDPHYRX 116
  274. #define SRST_MIPICSI 117
  275. #define SRST_GPU 120
  276. #define SRST_HDMI 121
  277. #define SRST_EDP 122
  278. #define SRST_PMU_PVTM 123
  279. #define SRST_CORE_PVTM 124
  280. #define SRST_GPU_PVTM 125
  281. #define SRST_GPU_SYS 126
  282. #define SRST_GPU_MEM_NIU 127
  283. #define SRST_MMC0 128
  284. #define SRST_SDIO0 129
  285. #define SRST_EMMC 131
  286. #define SRST_USBOTG_AHB 132
  287. #define SRST_USBOTG_PHY 133
  288. #define SRST_USBOTG_CON 134
  289. #define SRST_USBHOST0_AHB 135
  290. #define SRST_USBHOST0_PHY 136
  291. #define SRST_USBHOST0_CON 137
  292. #define SRST_USBOTG_UTMI 138
  293. #define SRST_USBHOST1_UTMI 139
  294. #define SRST_USB_ADP 141
  295. #define SRST_CORESIGHT 144
  296. #define SRST_PD_CORE_AHB_NOC 145
  297. #define SRST_PD_CORE_APB_NOC 146
  298. #define SRST_GIC 148
  299. #define SRST_LCDC_PWM0 149
  300. #define SRST_RGA_H2P_BRG 153
  301. #define SRST_VIDEO 154
  302. #define SRST_GPU_CFG_NIU 157
  303. #define SRST_TSADC 159
  304. #define SRST_DDRPHY0 160
  305. #define SRST_DDRPHY0_APB 161
  306. #define SRST_DDRCTRL0 162
  307. #define SRST_DDRCTRL0_APB 163
  308. #define SRST_VIDEO_NIU 165
  309. #define SRST_VIDEO_NIU_AHB 167
  310. #define SRST_DDRMSCH0 170
  311. #define SRST_PDBUS_AHB 173
  312. #define SRST_CRYPTO 174
  313. #define SRST_UART0 179
  314. #define SRST_UART1 180
  315. #define SRST_UART2 181
  316. #define SRST_UART3 182
  317. #define SRST_UART4 183
  318. #define SRST_SIMC 186
  319. #define SRST_TSP 188
  320. #define SRST_TSP_CLKIN0 189
  321. #define SRST_CORE_L0 192
  322. #define SRST_CORE_L1 193
  323. #define SRST_CORE_L2 194
  324. #define SRST_CORE_L3 195
  325. #define SRST_CORE_L0_PO 195
  326. #define SRST_CORE_L1_PO 197
  327. #define SRST_CORE_L2_PO 198
  328. #define SRST_CORE_L3_PO 199
  329. #define SRST_L2_L 200
  330. #define SRST_ADB_L 201
  331. #define SRST_PD_CORE_L_NIU 202
  332. #define SRST_CCI_SYS 203
  333. #define SRST_CCI_DDR 204
  334. #define SRST_CCI 205
  335. #define SRST_SOCDBG_L 206
  336. #define SRST_CORE_L_DBG 207
  337. #define SRST_CORE_B0_NC 208
  338. #define SRST_CORE_B0_PO_NC 209
  339. #define SRST_L2_B_NC 210
  340. #define SRST_ADB_B_NC 211
  341. #define SRST_PD_CORE_B_NIU_NC 212
  342. #define SRST_PDBUS_STRSYS_NC 213
  343. #define SRST_CORE_L0_NC 214
  344. #define SRST_CORE_L0_PO_NC 215
  345. #define SRST_L2_L_NC 216
  346. #define SRST_ADB_L_NC 217
  347. #define SRST_PD_CORE_L_NIU_NC 218
  348. #define SRST_CCI_SYS_NC 219
  349. #define SRST_CCI_DDR_NC 220
  350. #define SRST_CCI_NC 221
  351. #define SRST_TRACE_NC 222
  352. #define SRST_TIMER00 224
  353. #define SRST_TIMER01 225
  354. #define SRST_TIMER02 226
  355. #define SRST_TIMER03 227
  356. #define SRST_TIMER04 228
  357. #define SRST_TIMER05 229
  358. #define SRST_TIMER10 230
  359. #define SRST_TIMER11 231
  360. #define SRST_TIMER12 232
  361. #define SRST_TIMER13 233
  362. #define SRST_TIMER14 234
  363. #define SRST_TIMER15 235
  364. #define SRST_TIMER0_APB 236
  365. #define SRST_TIMER1_APB 237
  366. #endif