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