rk3288-cru.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. /*
  2. * Copyright (c) 2014 MundoReader S.L.
  3. * Author: Heiko Stuebner <heiko@sntech.de>
  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_RK3288_H
  16. #define _DT_BINDINGS_CLK_ROCKCHIP_RK3288_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 PLL_NPLL 5
  23. #define ARMCLK 6
  24. /* sclk gates (special clocks) */
  25. #define SCLK_GPU 64
  26. #define SCLK_SPI0 65
  27. #define SCLK_SPI1 66
  28. #define SCLK_SPI2 67
  29. #define SCLK_SDMMC 68
  30. #define SCLK_SDIO0 69
  31. #define SCLK_SDIO1 70
  32. #define SCLK_EMMC 71
  33. #define SCLK_TSADC 72
  34. #define SCLK_SARADC 73
  35. #define SCLK_PS2C 74
  36. #define SCLK_NANDC0 75
  37. #define SCLK_NANDC1 76
  38. #define SCLK_UART0 77
  39. #define SCLK_UART1 78
  40. #define SCLK_UART2 79
  41. #define SCLK_UART3 80
  42. #define SCLK_UART4 81
  43. #define SCLK_I2S0 82
  44. #define SCLK_SPDIF 83
  45. #define SCLK_SPDIF8CH 84
  46. #define SCLK_TIMER0 85
  47. #define SCLK_TIMER1 86
  48. #define SCLK_TIMER2 87
  49. #define SCLK_TIMER3 88
  50. #define SCLK_TIMER4 89
  51. #define SCLK_TIMER5 90
  52. #define SCLK_TIMER6 91
  53. #define SCLK_HSADC 92
  54. #define SCLK_OTGPHY0 93
  55. #define SCLK_OTGPHY1 94
  56. #define SCLK_OTGPHY2 95
  57. #define SCLK_OTG_ADP 96
  58. #define SCLK_HSICPHY480M 97
  59. #define SCLK_HSICPHY12M 98
  60. #define SCLK_MACREF 99
  61. #define SCLK_LCDC_PWM0 100
  62. #define SCLK_LCDC_PWM1 101
  63. #define SCLK_MAC_RX 102
  64. #define SCLK_MAC_TX 103
  65. #define SCLK_EDP_24M 104
  66. #define SCLK_EDP 105
  67. #define SCLK_RGA 106
  68. #define SCLK_ISP 107
  69. #define SCLK_ISP_JPE 108
  70. #define SCLK_HDMI_HDCP 109
  71. #define SCLK_HDMI_CEC 110
  72. #define SCLK_HEVC_CABAC 111
  73. #define SCLK_HEVC_CORE 112
  74. #define SCLK_I2S0_OUT 113
  75. #define SCLK_SDMMC_DRV 114
  76. #define SCLK_SDIO0_DRV 115
  77. #define SCLK_SDIO1_DRV 116
  78. #define SCLK_EMMC_DRV 117
  79. #define SCLK_SDMMC_SAMPLE 118
  80. #define SCLK_SDIO0_SAMPLE 119
  81. #define SCLK_SDIO1_SAMPLE 120
  82. #define SCLK_EMMC_SAMPLE 121
  83. #define SCLK_USBPHY480M_SRC 122
  84. #define SCLK_PVTM_CORE 123
  85. #define SCLK_PVTM_GPU 124
  86. #define SCLK_CRYPTO 125
  87. #define SCLK_MIPIDSI_24M 126
  88. #define SCLK_MAC 151
  89. #define SCLK_MACREF_OUT 152
  90. #define DCLK_VOP0 190
  91. #define DCLK_VOP1 191
  92. /* aclk gates */
  93. #define ACLK_GPU 192
  94. #define ACLK_DMAC1 193
  95. #define ACLK_DMAC2 194
  96. #define ACLK_MMU 195
  97. #define ACLK_GMAC 196
  98. #define ACLK_VOP0 197
  99. #define ACLK_VOP1 198
  100. #define ACLK_CRYPTO 199
  101. #define ACLK_RGA 200
  102. #define ACLK_RGA_NIU 201
  103. #define ACLK_IEP 202
  104. #define ACLK_VIO0_NIU 203
  105. #define ACLK_VIP 204
  106. #define ACLK_ISP 205
  107. #define ACLK_VIO1_NIU 206
  108. #define ACLK_HEVC 207
  109. #define ACLK_VCODEC 208
  110. #define ACLK_CPU 209
  111. #define ACLK_PERI 210
  112. /* pclk gates */
  113. #define PCLK_GPIO0 320
  114. #define PCLK_GPIO1 321
  115. #define PCLK_GPIO2 322
  116. #define PCLK_GPIO3 323
  117. #define PCLK_GPIO4 324
  118. #define PCLK_GPIO5 325
  119. #define PCLK_GPIO6 326
  120. #define PCLK_GPIO7 327
  121. #define PCLK_GPIO8 328
  122. #define PCLK_GRF 329
  123. #define PCLK_SGRF 330
  124. #define PCLK_PMU 331
  125. #define PCLK_I2C0 332
  126. #define PCLK_I2C1 333
  127. #define PCLK_I2C2 334
  128. #define PCLK_I2C3 335
  129. #define PCLK_I2C4 336
  130. #define PCLK_I2C5 337
  131. #define PCLK_SPI0 338
  132. #define PCLK_SPI1 339
  133. #define PCLK_SPI2 340
  134. #define PCLK_UART0 341
  135. #define PCLK_UART1 342
  136. #define PCLK_UART2 343
  137. #define PCLK_UART3 344
  138. #define PCLK_UART4 345
  139. #define PCLK_TSADC 346
  140. #define PCLK_SARADC 347
  141. #define PCLK_SIM 348
  142. #define PCLK_GMAC 349
  143. #define PCLK_PWM 350
  144. #define PCLK_RKPWM 351
  145. #define PCLK_PS2C 352
  146. #define PCLK_TIMER 353
  147. #define PCLK_TZPC 354
  148. #define PCLK_EDP_CTRL 355
  149. #define PCLK_MIPI_DSI0 356
  150. #define PCLK_MIPI_DSI1 357
  151. #define PCLK_MIPI_CSI 358
  152. #define PCLK_LVDS_PHY 359
  153. #define PCLK_HDMI_CTRL 360
  154. #define PCLK_VIO2_H2P 361
  155. #define PCLK_CPU 362
  156. #define PCLK_PERI 363
  157. #define PCLK_DDRUPCTL0 364
  158. #define PCLK_PUBL0 365
  159. #define PCLK_DDRUPCTL1 366
  160. #define PCLK_PUBL1 367
  161. #define PCLK_WDT 368
  162. #define PCLK_EFUSE256 369
  163. #define PCLK_EFUSE1024 370
  164. /* hclk gates */
  165. #define HCLK_GPS 448
  166. #define HCLK_OTG0 449
  167. #define HCLK_USBHOST0 450
  168. #define HCLK_USBHOST1 451
  169. #define HCLK_HSIC 452
  170. #define HCLK_NANDC0 453
  171. #define HCLK_NANDC1 454
  172. #define HCLK_TSP 455
  173. #define HCLK_SDMMC 456
  174. #define HCLK_SDIO0 457
  175. #define HCLK_SDIO1 458
  176. #define HCLK_EMMC 459
  177. #define HCLK_HSADC 460
  178. #define HCLK_CRYPTO 461
  179. #define HCLK_I2S0 462
  180. #define HCLK_SPDIF 463
  181. #define HCLK_SPDIF8CH 464
  182. #define HCLK_VOP0 465
  183. #define HCLK_VOP1 466
  184. #define HCLK_ROM 467
  185. #define HCLK_IEP 468
  186. #define HCLK_ISP 469
  187. #define HCLK_RGA 470
  188. #define HCLK_VIO_AHB_ARBI 471
  189. #define HCLK_VIO_NIU 472
  190. #define HCLK_VIP 473
  191. #define HCLK_VIO2_H2P 474
  192. #define HCLK_HEVC 475
  193. #define HCLK_VCODEC 476
  194. #define HCLK_CPU 477
  195. #define HCLK_PERI 478
  196. #define CLK_NR_CLKS (HCLK_PERI + 1)
  197. /* soft-reset indices */
  198. #define SRST_CORE0 0
  199. #define SRST_CORE1 1
  200. #define SRST_CORE2 2
  201. #define SRST_CORE3 3
  202. #define SRST_CORE0_PO 4
  203. #define SRST_CORE1_PO 5
  204. #define SRST_CORE2_PO 6
  205. #define SRST_CORE3_PO 7
  206. #define SRST_PDCORE_STRSYS 8
  207. #define SRST_PDBUS_STRSYS 9
  208. #define SRST_L2C 10
  209. #define SRST_TOPDBG 11
  210. #define SRST_CORE0_DBG 12
  211. #define SRST_CORE1_DBG 13
  212. #define SRST_CORE2_DBG 14
  213. #define SRST_CORE3_DBG 15
  214. #define SRST_PDBUG_AHB_ARBITOR 16
  215. #define SRST_EFUSE256 17
  216. #define SRST_DMAC1 18
  217. #define SRST_INTMEM 19
  218. #define SRST_ROM 20
  219. #define SRST_SPDIF8CH 21
  220. #define SRST_TIMER 22
  221. #define SRST_I2S0 23
  222. #define SRST_SPDIF 24
  223. #define SRST_TIMER0 25
  224. #define SRST_TIMER1 26
  225. #define SRST_TIMER2 27
  226. #define SRST_TIMER3 28
  227. #define SRST_TIMER4 29
  228. #define SRST_TIMER5 30
  229. #define SRST_EFUSE 31
  230. #define SRST_GPIO0 32
  231. #define SRST_GPIO1 33
  232. #define SRST_GPIO2 34
  233. #define SRST_GPIO3 35
  234. #define SRST_GPIO4 36
  235. #define SRST_GPIO5 37
  236. #define SRST_GPIO6 38
  237. #define SRST_GPIO7 39
  238. #define SRST_GPIO8 40
  239. #define SRST_I2C0 42
  240. #define SRST_I2C1 43
  241. #define SRST_I2C2 44
  242. #define SRST_I2C3 45
  243. #define SRST_I2C4 46
  244. #define SRST_I2C5 47
  245. #define SRST_DWPWM 48
  246. #define SRST_MMC_PERI 49
  247. #define SRST_PERIPH_MMU 50
  248. #define SRST_DAP 51
  249. #define SRST_DAP_SYS 52
  250. #define SRST_TPIU 53
  251. #define SRST_PMU_APB 54
  252. #define SRST_GRF 55
  253. #define SRST_PMU 56
  254. #define SRST_PERIPH_AXI 57
  255. #define SRST_PERIPH_AHB 58
  256. #define SRST_PERIPH_APB 59
  257. #define SRST_PERIPH_NIU 60
  258. #define SRST_PDPERI_AHB_ARBI 61
  259. #define SRST_EMEM 62
  260. #define SRST_USB_PERI 63
  261. #define SRST_DMAC2 64
  262. #define SRST_MAC 66
  263. #define SRST_GPS 67
  264. #define SRST_RKPWM 69
  265. #define SRST_CCP 71
  266. #define SRST_USBHOST0 72
  267. #define SRST_HSIC 73
  268. #define SRST_HSIC_AUX 74
  269. #define SRST_HSIC_PHY 75
  270. #define SRST_HSADC 76
  271. #define SRST_NANDC0 77
  272. #define SRST_NANDC1 78
  273. #define SRST_TZPC 80
  274. #define SRST_SPI0 83
  275. #define SRST_SPI1 84
  276. #define SRST_SPI2 85
  277. #define SRST_SARADC 87
  278. #define SRST_PDALIVE_NIU 88
  279. #define SRST_PDPMU_INTMEM 89
  280. #define SRST_PDPMU_NIU 90
  281. #define SRST_SGRF 91
  282. #define SRST_VIO_ARBI 96
  283. #define SRST_RGA_NIU 97
  284. #define SRST_VIO0_NIU_AXI 98
  285. #define SRST_VIO_NIU_AHB 99
  286. #define SRST_LCDC0_AXI 100
  287. #define SRST_LCDC0_AHB 101
  288. #define SRST_LCDC0_DCLK 102
  289. #define SRST_VIO1_NIU_AXI 103
  290. #define SRST_VIP 104
  291. #define SRST_RGA_CORE 105
  292. #define SRST_IEP_AXI 106
  293. #define SRST_IEP_AHB 107
  294. #define SRST_RGA_AXI 108
  295. #define SRST_RGA_AHB 109
  296. #define SRST_ISP 110
  297. #define SRST_EDP 111
  298. #define SRST_VCODEC_AXI 112
  299. #define SRST_VCODEC_AHB 113
  300. #define SRST_VIO_H2P 114
  301. #define SRST_MIPIDSI0 115
  302. #define SRST_MIPIDSI1 116
  303. #define SRST_MIPICSI 117
  304. #define SRST_LVDS_PHY 118
  305. #define SRST_LVDS_CON 119
  306. #define SRST_GPU 120
  307. #define SRST_HDMI 121
  308. #define SRST_CORE_PVTM 124
  309. #define SRST_GPU_PVTM 125
  310. #define SRST_MMC0 128
  311. #define SRST_SDIO0 129
  312. #define SRST_SDIO1 130
  313. #define SRST_EMMC 131
  314. #define SRST_USBOTG_AHB 132
  315. #define SRST_USBOTG_PHY 133
  316. #define SRST_USBOTG_CON 134
  317. #define SRST_USBHOST0_AHB 135
  318. #define SRST_USBHOST0_PHY 136
  319. #define SRST_USBHOST0_CON 137
  320. #define SRST_USBHOST1_AHB 138
  321. #define SRST_USBHOST1_PHY 139
  322. #define SRST_USBHOST1_CON 140
  323. #define SRST_USB_ADP 141
  324. #define SRST_ACC_EFUSE 142
  325. #define SRST_CORESIGHT 144
  326. #define SRST_PD_CORE_AHB_NOC 145
  327. #define SRST_PD_CORE_APB_NOC 146
  328. #define SRST_PD_CORE_MP_AXI 147
  329. #define SRST_GIC 148
  330. #define SRST_LCDC_PWM0 149
  331. #define SRST_LCDC_PWM1 150
  332. #define SRST_VIO0_H2P_BRG 151
  333. #define SRST_VIO1_H2P_BRG 152
  334. #define SRST_RGA_H2P_BRG 153
  335. #define SRST_HEVC 154
  336. #define SRST_TSADC 159
  337. #define SRST_DDRPHY0 160
  338. #define SRST_DDRPHY0_APB 161
  339. #define SRST_DDRCTRL0 162
  340. #define SRST_DDRCTRL0_APB 163
  341. #define SRST_DDRPHY0_CTRL 164
  342. #define SRST_DDRPHY1 165
  343. #define SRST_DDRPHY1_APB 166
  344. #define SRST_DDRCTRL1 167
  345. #define SRST_DDRCTRL1_APB 168
  346. #define SRST_DDRPHY1_CTRL 169
  347. #define SRST_DDRMSCH0 170
  348. #define SRST_DDRMSCH1 171
  349. #define SRST_CRYPTO 174
  350. #define SRST_C2C_HOST 175
  351. #define SRST_LCDC1_AXI 176
  352. #define SRST_LCDC1_AHB 177
  353. #define SRST_LCDC1_DCLK 178
  354. #define SRST_UART0 179
  355. #define SRST_UART1 180
  356. #define SRST_UART2 181
  357. #define SRST_UART3 182
  358. #define SRST_UART4 183
  359. #define SRST_SIMC 186
  360. #define SRST_PS2C 187
  361. #define SRST_TSP 188
  362. #define SRST_TSP_CLKIN0 189
  363. #define SRST_TSP_CLKIN1 190
  364. #define SRST_TSP_27M 191
  365. #endif