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