1 1.1 jmcneill /* $NetBSD: rk3188-cru-common.h,v 1.1.1.4 2020/01/03 14:33:04 skrll Exp $ */ 2 1.1 jmcneill 3 1.1.1.4 skrll /* SPDX-License-Identifier: GPL-2.0-or-later */ 4 1.1 jmcneill /* 5 1.1 jmcneill * Copyright (c) 2014 MundoReader S.L. 6 1.1 jmcneill * Author: Heiko Stuebner <heiko (at) sntech.de> 7 1.1 jmcneill */ 8 1.1 jmcneill 9 1.1 jmcneill #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3188_COMMON_H 10 1.1 jmcneill #define _DT_BINDINGS_CLK_ROCKCHIP_RK3188_COMMON_H 11 1.1 jmcneill 12 1.1 jmcneill /* core clocks from */ 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 CORE_PERI 5 18 1.1 jmcneill #define CORE_L2C 6 19 1.1 jmcneill #define ARMCLK 7 20 1.1 jmcneill 21 1.1 jmcneill /* sclk gates (special clocks) */ 22 1.1 jmcneill #define SCLK_UART0 64 23 1.1 jmcneill #define SCLK_UART1 65 24 1.1 jmcneill #define SCLK_UART2 66 25 1.1 jmcneill #define SCLK_UART3 67 26 1.1 jmcneill #define SCLK_MAC 68 27 1.1 jmcneill #define SCLK_SPI0 69 28 1.1 jmcneill #define SCLK_SPI1 70 29 1.1 jmcneill #define SCLK_SARADC 71 30 1.1 jmcneill #define SCLK_SDMMC 72 31 1.1 jmcneill #define SCLK_SDIO 73 32 1.1 jmcneill #define SCLK_EMMC 74 33 1.1 jmcneill #define SCLK_I2S0 75 34 1.1 jmcneill #define SCLK_I2S1 76 35 1.1 jmcneill #define SCLK_I2S2 77 36 1.1 jmcneill #define SCLK_SPDIF 78 37 1.1 jmcneill #define SCLK_CIF0 79 38 1.1 jmcneill #define SCLK_CIF1 80 39 1.1 jmcneill #define SCLK_OTGPHY0 81 40 1.1 jmcneill #define SCLK_OTGPHY1 82 41 1.1 jmcneill #define SCLK_HSADC 83 42 1.1 jmcneill #define SCLK_TIMER0 84 43 1.1 jmcneill #define SCLK_TIMER1 85 44 1.1 jmcneill #define SCLK_TIMER2 86 45 1.1 jmcneill #define SCLK_TIMER3 87 46 1.1 jmcneill #define SCLK_TIMER4 88 47 1.1 jmcneill #define SCLK_TIMER5 89 48 1.1 jmcneill #define SCLK_TIMER6 90 49 1.1 jmcneill #define SCLK_JTAG 91 50 1.1 jmcneill #define SCLK_SMC 92 51 1.1 jmcneill #define SCLK_TSADC 93 52 1.1 jmcneill 53 1.1 jmcneill #define DCLK_LCDC0 190 54 1.1 jmcneill #define DCLK_LCDC1 191 55 1.1 jmcneill 56 1.1 jmcneill /* aclk gates */ 57 1.1 jmcneill #define ACLK_DMA1 192 58 1.1 jmcneill #define ACLK_DMA2 193 59 1.1 jmcneill #define ACLK_GPS 194 60 1.1 jmcneill #define ACLK_LCDC0 195 61 1.1 jmcneill #define ACLK_LCDC1 196 62 1.1 jmcneill #define ACLK_GPU 197 63 1.1 jmcneill #define ACLK_SMC 198 64 1.1.1.2 jmcneill #define ACLK_CIF1 199 65 1.1 jmcneill #define ACLK_IPP 200 66 1.1 jmcneill #define ACLK_RGA 201 67 1.1 jmcneill #define ACLK_CIF0 202 68 1.1 jmcneill #define ACLK_CPU 203 69 1.1 jmcneill #define ACLK_PERI 204 70 1.1.1.2 jmcneill #define ACLK_VEPU 205 71 1.1.1.2 jmcneill #define ACLK_VDPU 206 72 1.1 jmcneill 73 1.1 jmcneill /* pclk gates */ 74 1.1 jmcneill #define PCLK_GRF 320 75 1.1 jmcneill #define PCLK_PMU 321 76 1.1 jmcneill #define PCLK_TIMER0 322 77 1.1 jmcneill #define PCLK_TIMER1 323 78 1.1 jmcneill #define PCLK_TIMER2 324 79 1.1 jmcneill #define PCLK_TIMER3 325 80 1.1 jmcneill #define PCLK_PWM01 326 81 1.1 jmcneill #define PCLK_PWM23 327 82 1.1 jmcneill #define PCLK_SPI0 328 83 1.1 jmcneill #define PCLK_SPI1 329 84 1.1 jmcneill #define PCLK_SARADC 330 85 1.1 jmcneill #define PCLK_WDT 331 86 1.1 jmcneill #define PCLK_UART0 332 87 1.1 jmcneill #define PCLK_UART1 333 88 1.1 jmcneill #define PCLK_UART2 334 89 1.1 jmcneill #define PCLK_UART3 335 90 1.1 jmcneill #define PCLK_I2C0 336 91 1.1 jmcneill #define PCLK_I2C1 337 92 1.1 jmcneill #define PCLK_I2C2 338 93 1.1 jmcneill #define PCLK_I2C3 339 94 1.1 jmcneill #define PCLK_I2C4 340 95 1.1 jmcneill #define PCLK_GPIO0 341 96 1.1 jmcneill #define PCLK_GPIO1 342 97 1.1 jmcneill #define PCLK_GPIO2 343 98 1.1 jmcneill #define PCLK_GPIO3 344 99 1.1 jmcneill #define PCLK_GPIO4 345 100 1.1 jmcneill #define PCLK_GPIO6 346 101 1.1 jmcneill #define PCLK_EFUSE 347 102 1.1 jmcneill #define PCLK_TZPC 348 103 1.1 jmcneill #define PCLK_TSADC 349 104 1.1 jmcneill #define PCLK_CPU 350 105 1.1 jmcneill #define PCLK_PERI 351 106 1.1 jmcneill #define PCLK_DDRUPCTL 352 107 1.1 jmcneill #define PCLK_PUBL 353 108 1.1 jmcneill 109 1.1 jmcneill /* hclk gates */ 110 1.1 jmcneill #define HCLK_SDMMC 448 111 1.1 jmcneill #define HCLK_SDIO 449 112 1.1 jmcneill #define HCLK_EMMC 450 113 1.1 jmcneill #define HCLK_OTG0 451 114 1.1 jmcneill #define HCLK_EMAC 452 115 1.1 jmcneill #define HCLK_SPDIF 453 116 1.1 jmcneill #define HCLK_I2S0 454 117 1.1 jmcneill #define HCLK_I2S1 455 118 1.1 jmcneill #define HCLK_I2S2 456 119 1.1 jmcneill #define HCLK_OTG1 457 120 1.1 jmcneill #define HCLK_HSIC 458 121 1.1 jmcneill #define HCLK_HSADC 459 122 1.1 jmcneill #define HCLK_PIDF 460 123 1.1 jmcneill #define HCLK_LCDC0 461 124 1.1 jmcneill #define HCLK_LCDC1 462 125 1.1 jmcneill #define HCLK_ROM 463 126 1.1 jmcneill #define HCLK_CIF0 464 127 1.1 jmcneill #define HCLK_IPP 465 128 1.1 jmcneill #define HCLK_RGA 466 129 1.1 jmcneill #define HCLK_NANDC0 467 130 1.1 jmcneill #define HCLK_CPU 468 131 1.1 jmcneill #define HCLK_PERI 469 132 1.1.1.2 jmcneill #define HCLK_CIF1 470 133 1.1.1.2 jmcneill #define HCLK_VEPU 471 134 1.1.1.2 jmcneill #define HCLK_VDPU 472 135 1.1.1.3 jmcneill #define HCLK_HDMI 473 136 1.1 jmcneill 137 1.1.1.3 jmcneill #define CLK_NR_CLKS (HCLK_HDMI + 1) 138 1.1 jmcneill 139 1.1 jmcneill /* soft-reset indices */ 140 1.1 jmcneill #define SRST_MCORE 2 141 1.1 jmcneill #define SRST_CORE0 3 142 1.1 jmcneill #define SRST_CORE1 4 143 1.1 jmcneill #define SRST_MCORE_DBG 7 144 1.1 jmcneill #define SRST_CORE0_DBG 8 145 1.1 jmcneill #define SRST_CORE1_DBG 9 146 1.1 jmcneill #define SRST_CORE0_WDT 12 147 1.1 jmcneill #define SRST_CORE1_WDT 13 148 1.1 jmcneill #define SRST_STRC_SYS 14 149 1.1 jmcneill #define SRST_L2C 15 150 1.1 jmcneill 151 1.1 jmcneill #define SRST_CPU_AHB 17 152 1.1 jmcneill #define SRST_AHB2APB 19 153 1.1 jmcneill #define SRST_DMA1 20 154 1.1 jmcneill #define SRST_INTMEM 21 155 1.1 jmcneill #define SRST_ROM 22 156 1.1 jmcneill #define SRST_SPDIF 26 157 1.1 jmcneill #define SRST_TIMER0 27 158 1.1 jmcneill #define SRST_TIMER1 28 159 1.1 jmcneill #define SRST_EFUSE 30 160 1.1 jmcneill 161 1.1 jmcneill #define SRST_GPIO0 32 162 1.1 jmcneill #define SRST_GPIO1 33 163 1.1 jmcneill #define SRST_GPIO2 34 164 1.1 jmcneill #define SRST_GPIO3 35 165 1.1 jmcneill 166 1.1 jmcneill #define SRST_UART0 39 167 1.1 jmcneill #define SRST_UART1 40 168 1.1 jmcneill #define SRST_UART2 41 169 1.1 jmcneill #define SRST_UART3 42 170 1.1 jmcneill #define SRST_I2C0 43 171 1.1 jmcneill #define SRST_I2C1 44 172 1.1 jmcneill #define SRST_I2C2 45 173 1.1 jmcneill #define SRST_I2C3 46 174 1.1 jmcneill #define SRST_I2C4 47 175 1.1 jmcneill 176 1.1 jmcneill #define SRST_PWM0 48 177 1.1 jmcneill #define SRST_PWM1 49 178 1.1 jmcneill #define SRST_DAP_PO 50 179 1.1 jmcneill #define SRST_DAP 51 180 1.1 jmcneill #define SRST_DAP_SYS 52 181 1.1 jmcneill #define SRST_TPIU_ATB 53 182 1.1 jmcneill #define SRST_PMU_APB 54 183 1.1 jmcneill #define SRST_GRF 55 184 1.1 jmcneill #define SRST_PMU 56 185 1.1 jmcneill #define SRST_PERI_AXI 57 186 1.1 jmcneill #define SRST_PERI_AHB 58 187 1.1 jmcneill #define SRST_PERI_APB 59 188 1.1 jmcneill #define SRST_PERI_NIU 60 189 1.1 jmcneill #define SRST_CPU_PERI 61 190 1.1 jmcneill #define SRST_EMEM_PERI 62 191 1.1 jmcneill #define SRST_USB_PERI 63 192 1.1 jmcneill 193 1.1 jmcneill #define SRST_DMA2 64 194 1.1 jmcneill #define SRST_SMC 65 195 1.1 jmcneill #define SRST_MAC 66 196 1.1 jmcneill #define SRST_NANC0 68 197 1.1 jmcneill #define SRST_USBOTG0 69 198 1.1 jmcneill #define SRST_USBPHY0 70 199 1.1 jmcneill #define SRST_OTGC0 71 200 1.1 jmcneill #define SRST_USBOTG1 72 201 1.1 jmcneill #define SRST_USBPHY1 73 202 1.1 jmcneill #define SRST_OTGC1 74 203 1.1 jmcneill #define SRST_HSADC 76 204 1.1 jmcneill #define SRST_PIDFILTER 77 205 1.1 jmcneill #define SRST_DDR_MSCH 79 206 1.1 jmcneill 207 1.1 jmcneill #define SRST_TZPC 80 208 1.1 jmcneill #define SRST_SDMMC 81 209 1.1 jmcneill #define SRST_SDIO 82 210 1.1 jmcneill #define SRST_EMMC 83 211 1.1 jmcneill #define SRST_SPI0 84 212 1.1 jmcneill #define SRST_SPI1 85 213 1.1 jmcneill #define SRST_WDT 86 214 1.1 jmcneill #define SRST_SARADC 87 215 1.1 jmcneill #define SRST_DDRPHY 88 216 1.1 jmcneill #define SRST_DDRPHY_APB 89 217 1.1 jmcneill #define SRST_DDRCTL 90 218 1.1 jmcneill #define SRST_DDRCTL_APB 91 219 1.1 jmcneill #define SRST_DDRPUB 93 220 1.1 jmcneill 221 1.1 jmcneill #define SRST_VIO0_AXI 98 222 1.1 jmcneill #define SRST_VIO0_AHB 99 223 1.1 jmcneill #define SRST_LCDC0_AXI 100 224 1.1 jmcneill #define SRST_LCDC0_AHB 101 225 1.1 jmcneill #define SRST_LCDC0_DCLK 102 226 1.1 jmcneill #define SRST_LCDC1_AXI 103 227 1.1 jmcneill #define SRST_LCDC1_AHB 104 228 1.1 jmcneill #define SRST_LCDC1_DCLK 105 229 1.1 jmcneill #define SRST_IPP_AXI 106 230 1.1 jmcneill #define SRST_IPP_AHB 107 231 1.1 jmcneill #define SRST_RGA_AXI 108 232 1.1 jmcneill #define SRST_RGA_AHB 109 233 1.1 jmcneill #define SRST_CIF0 110 234 1.1 jmcneill 235 1.1 jmcneill #define SRST_VCODEC_AXI 112 236 1.1 jmcneill #define SRST_VCODEC_AHB 113 237 1.1 jmcneill #define SRST_VIO1_AXI 114 238 1.1 jmcneill #define SRST_VCODEC_CPU 115 239 1.1 jmcneill #define SRST_VCODEC_NIU 116 240 1.1 jmcneill #define SRST_GPU 120 241 1.1 jmcneill #define SRST_GPU_NIU 122 242 1.1 jmcneill #define SRST_TFUN_ATB 125 243 1.1 jmcneill #define SRST_TFUN_APB 126 244 1.1 jmcneill #define SRST_CTI4_APB 127 245 1.1 jmcneill 246 1.1 jmcneill #define SRST_TPIU_APB 128 247 1.1 jmcneill #define SRST_TRACE 129 248 1.1 jmcneill #define SRST_CORE_DBG 130 249 1.1 jmcneill #define SRST_DBG_APB 131 250 1.1 jmcneill #define SRST_CTI0 132 251 1.1 jmcneill #define SRST_CTI0_APB 133 252 1.1 jmcneill #define SRST_CTI1 134 253 1.1 jmcneill #define SRST_CTI1_APB 135 254 1.1 jmcneill #define SRST_PTM_CORE0 136 255 1.1 jmcneill #define SRST_PTM_CORE1 137 256 1.1 jmcneill #define SRST_PTM0 138 257 1.1 jmcneill #define SRST_PTM0_ATB 139 258 1.1 jmcneill #define SRST_PTM1 140 259 1.1 jmcneill #define SRST_PTM1_ATB 141 260 1.1 jmcneill #define SRST_CTM 142 261 1.1 jmcneill #define SRST_TS 143 262 1.1 jmcneill 263 1.1 jmcneill #endif 264