rk3228-cru.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. /*
  2. * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
  3. * Author: Jeffy Chen <jeffy.chen@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_RK3228_H
  16. #define _DT_BINDINGS_CLK_ROCKCHIP_RK3228_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. /* sclk gates (special clocks) */
  24. #define SCLK_SPI0 65
  25. #define SCLK_NANDC 67
  26. #define SCLK_SDMMC 68
  27. #define SCLK_SDIO 69
  28. #define SCLK_EMMC 71
  29. #define SCLK_TSADC 72
  30. #define SCLK_UART0 77
  31. #define SCLK_UART1 78
  32. #define SCLK_UART2 79
  33. #define SCLK_I2S0 80
  34. #define SCLK_I2S1 81
  35. #define SCLK_I2S2 82
  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_I2S_OUT 113
  44. #define SCLK_SDMMC_DRV 114
  45. #define SCLK_SDIO_DRV 115
  46. #define SCLK_EMMC_DRV 117
  47. #define SCLK_SDMMC_SAMPLE 118
  48. #define SCLK_SDIO_SAMPLE 119
  49. #define SCLK_SDIO_SRC 120
  50. #define SCLK_EMMC_SAMPLE 121
  51. #define SCLK_VOP 122
  52. #define SCLK_HDMI_HDCP 123
  53. #define SCLK_MAC_SRC 124
  54. #define SCLK_MAC_EXTCLK 125
  55. #define SCLK_MAC 126
  56. #define SCLK_MAC_REFOUT 127
  57. #define SCLK_MAC_REF 128
  58. #define SCLK_MAC_RX 129
  59. #define SCLK_MAC_TX 130
  60. #define SCLK_MAC_PHY 131
  61. #define SCLK_MAC_OUT 132
  62. #define SCLK_VDEC_CABAC 133
  63. #define SCLK_VDEC_CORE 134
  64. #define SCLK_RGA 135
  65. #define SCLK_HDCP 136
  66. #define SCLK_HDMI_CEC 137
  67. #define SCLK_CRYPTO 138
  68. #define SCLK_TSP 139
  69. #define SCLK_HSADC 140
  70. #define SCLK_WIFI 141
  71. #define SCLK_OTGPHY0 142
  72. #define SCLK_OTGPHY1 143
  73. /* dclk gates */
  74. #define DCLK_VOP 190
  75. #define DCLK_HDMI_PHY 191
  76. /* aclk gates */
  77. #define ACLK_DMAC 194
  78. #define ACLK_CPU 195
  79. #define ACLK_VPU_PRE 196
  80. #define ACLK_RKVDEC_PRE 197
  81. #define ACLK_RGA_PRE 198
  82. #define ACLK_IEP_PRE 199
  83. #define ACLK_HDCP_PRE 200
  84. #define ACLK_VOP_PRE 201
  85. #define ACLK_VPU 202
  86. #define ACLK_RKVDEC 203
  87. #define ACLK_IEP 204
  88. #define ACLK_RGA 205
  89. #define ACLK_HDCP 206
  90. #define ACLK_PERI 210
  91. #define ACLK_VOP 211
  92. #define ACLK_GMAC 212
  93. #define ACLK_GPU 213
  94. /* pclk gates */
  95. #define PCLK_GPIO0 320
  96. #define PCLK_GPIO1 321
  97. #define PCLK_GPIO2 322
  98. #define PCLK_GPIO3 323
  99. #define PCLK_VIO_H2P 324
  100. #define PCLK_HDCP 325
  101. #define PCLK_EFUSE_1024 326
  102. #define PCLK_EFUSE_256 327
  103. #define PCLK_GRF 329
  104. #define PCLK_I2C0 332
  105. #define PCLK_I2C1 333
  106. #define PCLK_I2C2 334
  107. #define PCLK_I2C3 335
  108. #define PCLK_SPI0 338
  109. #define PCLK_UART0 341
  110. #define PCLK_UART1 342
  111. #define PCLK_UART2 343
  112. #define PCLK_TSADC 344
  113. #define PCLK_PWM 350
  114. #define PCLK_TIMER 353
  115. #define PCLK_CPU 354
  116. #define PCLK_PERI 363
  117. #define PCLK_HDMI_CTRL 364
  118. #define PCLK_HDMI_PHY 365
  119. #define PCLK_GMAC 367
  120. /* hclk gates */
  121. #define HCLK_I2S0_8CH 442
  122. #define HCLK_I2S1_8CH 443
  123. #define HCLK_I2S2_2CH 444
  124. #define HCLK_SPDIF_8CH 445
  125. #define HCLK_VOP 452
  126. #define HCLK_NANDC 453
  127. #define HCLK_SDMMC 456
  128. #define HCLK_SDIO 457
  129. #define HCLK_EMMC 459
  130. #define HCLK_CPU 460
  131. #define HCLK_VPU_PRE 461
  132. #define HCLK_RKVDEC_PRE 462
  133. #define HCLK_VIO_PRE 463
  134. #define HCLK_VPU 464
  135. #define HCLK_RKVDEC 465
  136. #define HCLK_VIO 466
  137. #define HCLK_RGA 467
  138. #define HCLK_IEP 468
  139. #define HCLK_VIO_H2P 469
  140. #define HCLK_HDCP_MMU 470
  141. #define HCLK_HOST0 471
  142. #define HCLK_HOST1 472
  143. #define HCLK_HOST2 473
  144. #define HCLK_OTG 474
  145. #define HCLK_TSP 475
  146. #define HCLK_M_CRYPTO 476
  147. #define HCLK_S_CRYPTO 477
  148. #define HCLK_PERI 478
  149. #define CLK_NR_CLKS (HCLK_PERI + 1)
  150. /* soft-reset indices */
  151. #define SRST_CORE0_PO 0
  152. #define SRST_CORE1_PO 1
  153. #define SRST_CORE2_PO 2
  154. #define SRST_CORE3_PO 3
  155. #define SRST_CORE0 4
  156. #define SRST_CORE1 5
  157. #define SRST_CORE2 6
  158. #define SRST_CORE3 7
  159. #define SRST_CORE0_DBG 8
  160. #define SRST_CORE1_DBG 9
  161. #define SRST_CORE2_DBG 10
  162. #define SRST_CORE3_DBG 11
  163. #define SRST_TOPDBG 12
  164. #define SRST_ACLK_CORE 13
  165. #define SRST_NOC 14
  166. #define SRST_L2C 15
  167. #define SRST_CPUSYS_H 18
  168. #define SRST_BUSSYS_H 19
  169. #define SRST_SPDIF 20
  170. #define SRST_INTMEM 21
  171. #define SRST_ROM 22
  172. #define SRST_OTG_ADP 23
  173. #define SRST_I2S0 24
  174. #define SRST_I2S1 25
  175. #define SRST_I2S2 26
  176. #define SRST_ACODEC_P 27
  177. #define SRST_DFIMON 28
  178. #define SRST_MSCH 29
  179. #define SRST_EFUSE1024 30
  180. #define SRST_EFUSE256 31
  181. #define SRST_GPIO0 32
  182. #define SRST_GPIO1 33
  183. #define SRST_GPIO2 34
  184. #define SRST_GPIO3 35
  185. #define SRST_PERIPH_NOC_A 36
  186. #define SRST_PERIPH_NOC_BUS_H 37
  187. #define SRST_PERIPH_NOC_P 38
  188. #define SRST_UART0 39
  189. #define SRST_UART1 40
  190. #define SRST_UART2 41
  191. #define SRST_PHYNOC 42
  192. #define SRST_I2C0 43
  193. #define SRST_I2C1 44
  194. #define SRST_I2C2 45
  195. #define SRST_I2C3 46
  196. #define SRST_PWM 48
  197. #define SRST_A53_GIC 49
  198. #define SRST_DAP 51
  199. #define SRST_DAP_NOC 52
  200. #define SRST_CRYPTO 53
  201. #define SRST_SGRF 54
  202. #define SRST_GRF 55
  203. #define SRST_GMAC 56
  204. #define SRST_PERIPH_NOC_H 58
  205. #define SRST_MACPHY 63
  206. #define SRST_DMA 64
  207. #define SRST_NANDC 68
  208. #define SRST_USBOTG 69
  209. #define SRST_OTGC 70
  210. #define SRST_USBHOST0 71
  211. #define SRST_HOST_CTRL0 72
  212. #define SRST_USBHOST1 73
  213. #define SRST_HOST_CTRL1 74
  214. #define SRST_USBHOST2 75
  215. #define SRST_HOST_CTRL2 76
  216. #define SRST_USBPOR0 77
  217. #define SRST_USBPOR1 78
  218. #define SRST_DDRMSCH 79
  219. #define SRST_SMART_CARD 80
  220. #define SRST_SDMMC 81
  221. #define SRST_SDIO 82
  222. #define SRST_EMMC 83
  223. #define SRST_SPI 84
  224. #define SRST_TSP_H 85
  225. #define SRST_TSP 86
  226. #define SRST_TSADC 87
  227. #define SRST_DDRPHY 88
  228. #define SRST_DDRPHY_P 89
  229. #define SRST_DDRCTRL 90
  230. #define SRST_DDRCTRL_P 91
  231. #define SRST_HOST0_ECHI 92
  232. #define SRST_HOST1_ECHI 93
  233. #define SRST_HOST2_ECHI 94
  234. #define SRST_VOP_NOC_A 95
  235. #define SRST_HDMI_P 96
  236. #define SRST_VIO_ARBI_H 97
  237. #define SRST_IEP_NOC_A 98
  238. #define SRST_VIO_NOC_H 99
  239. #define SRST_VOP_A 100
  240. #define SRST_VOP_H 101
  241. #define SRST_VOP_D 102
  242. #define SRST_UTMI0 103
  243. #define SRST_UTMI1 104
  244. #define SRST_UTMI2 105
  245. #define SRST_UTMI3 106
  246. #define SRST_RGA 107
  247. #define SRST_RGA_NOC_A 108
  248. #define SRST_RGA_A 109
  249. #define SRST_RGA_H 110
  250. #define SRST_HDCP_A 111
  251. #define SRST_VPU_A 112
  252. #define SRST_VPU_H 113
  253. #define SRST_VPU_NOC_A 116
  254. #define SRST_VPU_NOC_H 117
  255. #define SRST_RKVDEC_A 118
  256. #define SRST_RKVDEC_NOC_A 119
  257. #define SRST_RKVDEC_H 120
  258. #define SRST_RKVDEC_NOC_H 121
  259. #define SRST_RKVDEC_CORE 122
  260. #define SRST_RKVDEC_CABAC 123
  261. #define SRST_IEP_A 124
  262. #define SRST_IEP_H 125
  263. #define SRST_GPU_A 126
  264. #define SRST_GPU_NOC_A 127
  265. #define SRST_CORE_DBG 128
  266. #define SRST_DBG_P 129
  267. #define SRST_TIMER0 130
  268. #define SRST_TIMER1 131
  269. #define SRST_TIMER2 132
  270. #define SRST_TIMER3 133
  271. #define SRST_TIMER4 134
  272. #define SRST_TIMER5 135
  273. #define SRST_VIO_H2P 136
  274. #define SRST_HDMIPHY 139
  275. #define SRST_VDAC 140
  276. #define SRST_TIMER_6CH_P 141
  277. #endif