183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2bae2f282SAndy Yan /* 3bae2f282SAndy Yan * Copyright (c) 2017 Rockchip Electronics Co. Ltd. 4bae2f282SAndy Yan * Author: Shawn Lin <shawn.lin@rock-chips.com> 5bae2f282SAndy Yan */ 6bae2f282SAndy Yan 7bae2f282SAndy Yan #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H 8bae2f282SAndy Yan #define _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H 9bae2f282SAndy Yan 10bae2f282SAndy Yan /* pll id */ 11bae2f282SAndy Yan #define PLL_APLL 0 12bae2f282SAndy Yan #define PLL_DPLL 1 13bae2f282SAndy Yan #define PLL_GPLL 2 14bae2f282SAndy Yan #define ARMCLK 3 15bae2f282SAndy Yan 16bae2f282SAndy Yan /* sclk gates (special clocks) */ 17bae2f282SAndy Yan #define SCLK_SPI0 65 18bae2f282SAndy Yan #define SCLK_NANDC 67 19bae2f282SAndy Yan #define SCLK_SDMMC 68 20bae2f282SAndy Yan #define SCLK_SDIO 69 21bae2f282SAndy Yan #define SCLK_EMMC 71 22bae2f282SAndy Yan #define SCLK_UART0 72 23bae2f282SAndy Yan #define SCLK_UART1 73 24bae2f282SAndy Yan #define SCLK_UART2 74 25bae2f282SAndy Yan #define SCLK_I2S0 75 26bae2f282SAndy Yan #define SCLK_I2S1 76 27bae2f282SAndy Yan #define SCLK_I2S2 77 28bae2f282SAndy Yan #define SCLK_TIMER0 78 29bae2f282SAndy Yan #define SCLK_TIMER1 79 30bae2f282SAndy Yan #define SCLK_SFC 80 31bae2f282SAndy Yan #define SCLK_SDMMC_DRV 81 32bae2f282SAndy Yan #define SCLK_SDIO_DRV 82 33bae2f282SAndy Yan #define SCLK_EMMC_DRV 83 34bae2f282SAndy Yan #define SCLK_SDMMC_SAMPLE 84 35bae2f282SAndy Yan #define SCLK_SDIO_SAMPLE 85 36bae2f282SAndy Yan #define SCLK_EMMC_SAMPLE 86 37*5d2cb15cSOtavio Salvador #define SCLK_VENC_CORE 87 38*5d2cb15cSOtavio Salvador #define SCLK_HEVC_CORE 88 39*5d2cb15cSOtavio Salvador #define SCLK_HEVC_CABAC 89 40*5d2cb15cSOtavio Salvador #define SCLK_PWM0_PMU 90 41*5d2cb15cSOtavio Salvador #define SCLK_I2C0_PMU 91 42*5d2cb15cSOtavio Salvador #define SCLK_WIFI 92 43*5d2cb15cSOtavio Salvador #define SCLK_CIFOUT 93 44*5d2cb15cSOtavio Salvador #define SCLK_MIPI_CSI_OUT 94 45*5d2cb15cSOtavio Salvador #define SCLK_CIF0 95 46*5d2cb15cSOtavio Salvador #define SCLK_CIF1 96 47*5d2cb15cSOtavio Salvador #define SCLK_CIF2 97 48*5d2cb15cSOtavio Salvador #define SCLK_CIF3 98 49*5d2cb15cSOtavio Salvador #define SCLK_DSP 99 50*5d2cb15cSOtavio Salvador #define SCLK_DSP_IOP 100 51*5d2cb15cSOtavio Salvador #define SCLK_DSP_EPP 101 52*5d2cb15cSOtavio Salvador #define SCLK_DSP_EDP 102 53*5d2cb15cSOtavio Salvador #define SCLK_DSP_EDAP 103 54*5d2cb15cSOtavio Salvador #define SCLK_CVBS_HOST 104 55*5d2cb15cSOtavio Salvador #define SCLK_HDMI_SFR 105 56*5d2cb15cSOtavio Salvador #define SCLK_HDMI_CEC 106 57*5d2cb15cSOtavio Salvador #define SCLK_CRYPTO 107 58*5d2cb15cSOtavio Salvador #define SCLK_SPI 108 59*5d2cb15cSOtavio Salvador #define SCLK_SARADC 109 60*5d2cb15cSOtavio Salvador #define SCLK_TSADC 110 61*5d2cb15cSOtavio Salvador #define SCLK_MAC_PRE 111 62*5d2cb15cSOtavio Salvador #define SCLK_MAC 112 63*5d2cb15cSOtavio Salvador #define SCLK_MAC_RX 113 64*5d2cb15cSOtavio Salvador #define SCLK_MAC_REF 114 65*5d2cb15cSOtavio Salvador #define SCLK_MAC_REFOUT 115 66*5d2cb15cSOtavio Salvador #define SCLK_DSP_PFM 116 67*5d2cb15cSOtavio Salvador #define SCLK_RGA 117 68*5d2cb15cSOtavio Salvador #define SCLK_I2C1 118 69*5d2cb15cSOtavio Salvador #define SCLK_I2C2 119 70*5d2cb15cSOtavio Salvador #define SCLK_I2C3 120 71*5d2cb15cSOtavio Salvador #define SCLK_PWM 121 72*5d2cb15cSOtavio Salvador #define SCLK_ISP 122 73*5d2cb15cSOtavio Salvador #define SCLK_USBPHY 123 74*5d2cb15cSOtavio Salvador #define SCLK_I2S0_SRC 124 75*5d2cb15cSOtavio Salvador #define SCLK_I2S1_SRC 125 76*5d2cb15cSOtavio Salvador #define SCLK_I2S2_SRC 126 77*5d2cb15cSOtavio Salvador #define SCLK_UART0_SRC 127 78*5d2cb15cSOtavio Salvador #define SCLK_UART1_SRC 128 79*5d2cb15cSOtavio Salvador #define SCLK_UART2_SRC 129 80*5d2cb15cSOtavio Salvador #define SCLK_MAC_TX 130 81*5d2cb15cSOtavio Salvador #define SCLK_MACREF 131 82*5d2cb15cSOtavio Salvador #define SCLK_MACREF_OUT 132 83bae2f282SAndy Yan 84*5d2cb15cSOtavio Salvador #define DCLK_VOP_SRC 185 85*5d2cb15cSOtavio Salvador #define DCLK_HDMIPHY 186 86*5d2cb15cSOtavio Salvador #define DCLK_VOP 187 87bae2f282SAndy Yan 88bae2f282SAndy Yan /* aclk gates */ 89bae2f282SAndy Yan #define ACLK_DMAC 192 90bae2f282SAndy Yan #define ACLK_PRE 193 91bae2f282SAndy Yan #define ACLK_CORE 194 92bae2f282SAndy Yan #define ACLK_ENMCORE 195 93*5d2cb15cSOtavio Salvador #define ACLK_RKVENC 196 94*5d2cb15cSOtavio Salvador #define ACLK_RKVDEC 197 95*5d2cb15cSOtavio Salvador #define ACLK_VPU 198 96*5d2cb15cSOtavio Salvador #define ACLK_CIF0 199 97*5d2cb15cSOtavio Salvador #define ACLK_VIO0 200 98*5d2cb15cSOtavio Salvador #define ACLK_VIO1 201 99*5d2cb15cSOtavio Salvador #define ACLK_VOP 202 100*5d2cb15cSOtavio Salvador #define ACLK_IEP 203 101*5d2cb15cSOtavio Salvador #define ACLK_RGA 204 102*5d2cb15cSOtavio Salvador #define ACLK_ISP 205 103*5d2cb15cSOtavio Salvador #define ACLK_CIF1 206 104*5d2cb15cSOtavio Salvador #define ACLK_CIF2 207 105*5d2cb15cSOtavio Salvador #define ACLK_CIF3 208 106*5d2cb15cSOtavio Salvador #define ACLK_PERI 209 107*5d2cb15cSOtavio Salvador #define ACLK_GMAC 210 108bae2f282SAndy Yan 109bae2f282SAndy Yan /* pclk gates */ 110bae2f282SAndy Yan #define PCLK_GPIO1 256 111bae2f282SAndy Yan #define PCLK_GPIO2 257 112bae2f282SAndy Yan #define PCLK_GPIO3 258 113bae2f282SAndy Yan #define PCLK_GRF 259 114bae2f282SAndy Yan #define PCLK_I2C1 260 115bae2f282SAndy Yan #define PCLK_I2C2 261 116bae2f282SAndy Yan #define PCLK_I2C3 262 117bae2f282SAndy Yan #define PCLK_SPI 263 118bae2f282SAndy Yan #define PCLK_SFC 264 119bae2f282SAndy Yan #define PCLK_UART0 265 120bae2f282SAndy Yan #define PCLK_UART1 266 121bae2f282SAndy Yan #define PCLK_UART2 267 122bae2f282SAndy Yan #define PCLK_TSADC 268 123bae2f282SAndy Yan #define PCLK_PWM 269 124bae2f282SAndy Yan #define PCLK_TIMER 270 125bae2f282SAndy Yan #define PCLK_PERI 271 126*5d2cb15cSOtavio Salvador #define PCLK_GPIO0_PMU 272 127*5d2cb15cSOtavio Salvador #define PCLK_I2C0_PMU 273 128*5d2cb15cSOtavio Salvador #define PCLK_PWM0_PMU 274 129*5d2cb15cSOtavio Salvador #define PCLK_ISP 275 130*5d2cb15cSOtavio Salvador #define PCLK_VIO 276 131*5d2cb15cSOtavio Salvador #define PCLK_MIPI_DSI 277 132*5d2cb15cSOtavio Salvador #define PCLK_HDMI_CTRL 278 133*5d2cb15cSOtavio Salvador #define PCLK_SARADC 279 134*5d2cb15cSOtavio Salvador #define PCLK_DSP_CFG 280 135*5d2cb15cSOtavio Salvador #define PCLK_BUS 281 136*5d2cb15cSOtavio Salvador #define PCLK_EFUSE0 282 137*5d2cb15cSOtavio Salvador #define PCLK_EFUSE1 283 138*5d2cb15cSOtavio Salvador #define PCLK_WDT 284 139*5d2cb15cSOtavio Salvador #define PCLK_GMAC 285 140bae2f282SAndy Yan 141bae2f282SAndy Yan /* hclk gates */ 142bae2f282SAndy Yan #define HCLK_I2S0_8CH 320 143*5d2cb15cSOtavio Salvador #define HCLK_I2S1_2CH 321 144bae2f282SAndy Yan #define HCLK_I2S2_2CH 322 145bae2f282SAndy Yan #define HCLK_NANDC 323 146bae2f282SAndy Yan #define HCLK_SDMMC 324 147bae2f282SAndy Yan #define HCLK_SDIO 325 148bae2f282SAndy Yan #define HCLK_EMMC 326 149bae2f282SAndy Yan #define HCLK_PERI 327 150bae2f282SAndy Yan #define HCLK_SFC 328 151*5d2cb15cSOtavio Salvador #define HCLK_RKVENC 329 152*5d2cb15cSOtavio Salvador #define HCLK_RKVDEC 330 153*5d2cb15cSOtavio Salvador #define HCLK_CIF0 331 154*5d2cb15cSOtavio Salvador #define HCLK_VIO 332 155*5d2cb15cSOtavio Salvador #define HCLK_VOP 333 156*5d2cb15cSOtavio Salvador #define HCLK_IEP 334 157*5d2cb15cSOtavio Salvador #define HCLK_RGA 335 158*5d2cb15cSOtavio Salvador #define HCLK_ISP 336 159*5d2cb15cSOtavio Salvador #define HCLK_CRYPTO_MST 337 160*5d2cb15cSOtavio Salvador #define HCLK_CRYPTO_SLV 338 161*5d2cb15cSOtavio Salvador #define HCLK_HOST0 339 162*5d2cb15cSOtavio Salvador #define HCLK_OTG 340 163*5d2cb15cSOtavio Salvador #define HCLK_CIF1 341 164*5d2cb15cSOtavio Salvador #define HCLK_CIF2 342 165*5d2cb15cSOtavio Salvador #define HCLK_CIF3 343 166*5d2cb15cSOtavio Salvador #define HCLK_BUS 344 167*5d2cb15cSOtavio Salvador #define HCLK_VPU 345 168bae2f282SAndy Yan 169*5d2cb15cSOtavio Salvador #define CLK_NR_CLKS (HCLK_VPU + 1) 170bae2f282SAndy Yan 171bae2f282SAndy Yan /* reset id */ 172bae2f282SAndy Yan #define SRST_CORE_PO_AD 0 173bae2f282SAndy Yan #define SRST_CORE_AD 1 174bae2f282SAndy Yan #define SRST_L2_AD 2 175bae2f282SAndy Yan #define SRST_CPU_NIU_AD 3 176bae2f282SAndy Yan #define SRST_CORE_PO 4 177bae2f282SAndy Yan #define SRST_CORE 5 178bae2f282SAndy Yan #define SRST_L2 6 179bae2f282SAndy Yan #define SRST_CORE_DBG 8 180bae2f282SAndy Yan #define PRST_DBG 9 181bae2f282SAndy Yan #define RST_DAP 10 182bae2f282SAndy Yan #define PRST_DBG_NIU 11 183bae2f282SAndy Yan #define ARST_STRC_SYS_AD 15 184bae2f282SAndy Yan 185bae2f282SAndy Yan #define SRST_DDRPHY_CLKDIV 16 186bae2f282SAndy Yan #define SRST_DDRPHY 17 187bae2f282SAndy Yan #define PRST_DDRPHY 18 188bae2f282SAndy Yan #define PRST_HDMIPHY 19 189bae2f282SAndy Yan #define PRST_VDACPHY 20 190bae2f282SAndy Yan #define PRST_VADCPHY 21 191bae2f282SAndy Yan #define PRST_MIPI_CSI_PHY 22 192bae2f282SAndy Yan #define PRST_MIPI_DSI_PHY 23 193bae2f282SAndy Yan #define PRST_ACODEC 24 194bae2f282SAndy Yan #define ARST_BUS_NIU 25 195bae2f282SAndy Yan #define PRST_TOP_NIU 26 196bae2f282SAndy Yan #define ARST_INTMEM 27 197bae2f282SAndy Yan #define HRST_ROM 28 198bae2f282SAndy Yan #define ARST_DMAC 29 199bae2f282SAndy Yan #define SRST_MSCH_NIU 30 200bae2f282SAndy Yan #define PRST_MSCH_NIU 31 201bae2f282SAndy Yan 202bae2f282SAndy Yan #define PRST_DDRUPCTL 32 203bae2f282SAndy Yan #define NRST_DDRUPCTL 33 204bae2f282SAndy Yan #define PRST_DDRMON 34 205bae2f282SAndy Yan #define HRST_I2S0_8CH 35 206bae2f282SAndy Yan #define MRST_I2S0_8CH 36 207bae2f282SAndy Yan #define HRST_I2S1_2CH 37 208bae2f282SAndy Yan #define MRST_IS21_2CH 38 209bae2f282SAndy Yan #define HRST_I2S2_2CH 39 210bae2f282SAndy Yan #define MRST_I2S2_2CH 40 211bae2f282SAndy Yan #define HRST_CRYPTO 41 212bae2f282SAndy Yan #define SRST_CRYPTO 42 213bae2f282SAndy Yan #define PRST_SPI 43 214bae2f282SAndy Yan #define SRST_SPI 44 215bae2f282SAndy Yan #define PRST_UART0 45 216bae2f282SAndy Yan #define PRST_UART1 46 217bae2f282SAndy Yan #define PRST_UART2 47 218bae2f282SAndy Yan 219bae2f282SAndy Yan #define SRST_UART0 48 220bae2f282SAndy Yan #define SRST_UART1 49 221bae2f282SAndy Yan #define SRST_UART2 50 222bae2f282SAndy Yan #define PRST_I2C1 51 223bae2f282SAndy Yan #define PRST_I2C2 52 224bae2f282SAndy Yan #define PRST_I2C3 53 225bae2f282SAndy Yan #define SRST_I2C1 54 226bae2f282SAndy Yan #define SRST_I2C2 55 227bae2f282SAndy Yan #define SRST_I2C3 56 228bae2f282SAndy Yan #define PRST_PWM1 58 229bae2f282SAndy Yan #define SRST_PWM1 60 230bae2f282SAndy Yan #define PRST_WDT 61 231bae2f282SAndy Yan #define PRST_GPIO1 62 232bae2f282SAndy Yan #define PRST_GPIO2 63 233bae2f282SAndy Yan 234bae2f282SAndy Yan #define PRST_GPIO3 64 235bae2f282SAndy Yan #define PRST_GRF 65 236bae2f282SAndy Yan #define PRST_EFUSE 66 237bae2f282SAndy Yan #define PRST_EFUSE512 67 238bae2f282SAndy Yan #define PRST_TIMER0 68 239bae2f282SAndy Yan #define SRST_TIMER0 69 240bae2f282SAndy Yan #define SRST_TIMER1 70 241bae2f282SAndy Yan #define PRST_TSADC 71 242bae2f282SAndy Yan #define SRST_TSADC 72 243bae2f282SAndy Yan #define PRST_SARADC 73 244bae2f282SAndy Yan #define SRST_SARADC 74 245bae2f282SAndy Yan #define HRST_SYSBUS 75 246bae2f282SAndy Yan #define PRST_USBGRF 76 247bae2f282SAndy Yan 248bae2f282SAndy Yan #define ARST_PERIPH_NIU 80 249bae2f282SAndy Yan #define HRST_PERIPH_NIU 81 250bae2f282SAndy Yan #define PRST_PERIPH_NIU 82 251bae2f282SAndy Yan #define HRST_PERIPH 83 252bae2f282SAndy Yan #define HRST_SDMMC 84 253bae2f282SAndy Yan #define HRST_SDIO 85 254bae2f282SAndy Yan #define HRST_EMMC 86 255bae2f282SAndy Yan #define HRST_NANDC 87 256bae2f282SAndy Yan #define NRST_NANDC 88 257bae2f282SAndy Yan #define HRST_SFC 89 258bae2f282SAndy Yan #define SRST_SFC 90 259bae2f282SAndy Yan #define ARST_GMAC 91 260bae2f282SAndy Yan #define HRST_OTG 92 261bae2f282SAndy Yan #define SRST_OTG 93 262bae2f282SAndy Yan #define SRST_OTG_ADP 94 263bae2f282SAndy Yan #define HRST_HOST0 95 264bae2f282SAndy Yan 265bae2f282SAndy Yan #define HRST_HOST0_AUX 96 266bae2f282SAndy Yan #define HRST_HOST0_ARB 97 267bae2f282SAndy Yan #define SRST_HOST0_EHCIPHY 98 268bae2f282SAndy Yan #define SRST_HOST0_UTMI 99 269bae2f282SAndy Yan #define SRST_USBPOR 100 270bae2f282SAndy Yan #define SRST_UTMI0 101 271bae2f282SAndy Yan #define SRST_UTMI1 102 272bae2f282SAndy Yan 273bae2f282SAndy Yan #define ARST_VIO0_NIU 102 274bae2f282SAndy Yan #define ARST_VIO1_NIU 103 275bae2f282SAndy Yan #define HRST_VIO_NIU 104 276bae2f282SAndy Yan #define PRST_VIO_NIU 105 277bae2f282SAndy Yan #define ARST_VOP 106 278bae2f282SAndy Yan #define HRST_VOP 107 279bae2f282SAndy Yan #define DRST_VOP 108 280bae2f282SAndy Yan #define ARST_IEP 109 281bae2f282SAndy Yan #define HRST_IEP 110 282bae2f282SAndy Yan #define ARST_RGA 111 283bae2f282SAndy Yan #define HRST_RGA 112 284bae2f282SAndy Yan #define SRST_RGA 113 285bae2f282SAndy Yan #define PRST_CVBS 114 286bae2f282SAndy Yan #define PRST_HDMI 115 287bae2f282SAndy Yan #define SRST_HDMI 116 288bae2f282SAndy Yan #define PRST_MIPI_DSI 117 289bae2f282SAndy Yan 290bae2f282SAndy Yan #define ARST_ISP_NIU 118 291bae2f282SAndy Yan #define HRST_ISP_NIU 119 292bae2f282SAndy Yan #define HRST_ISP 120 293bae2f282SAndy Yan #define SRST_ISP 121 294bae2f282SAndy Yan #define ARST_VIP0 122 295bae2f282SAndy Yan #define HRST_VIP0 123 296bae2f282SAndy Yan #define PRST_VIP0 124 297bae2f282SAndy Yan #define ARST_VIP1 125 298bae2f282SAndy Yan #define HRST_VIP1 126 299bae2f282SAndy Yan #define PRST_VIP1 127 300bae2f282SAndy Yan #define ARST_VIP2 128 301bae2f282SAndy Yan #define HRST_VIP2 129 302bae2f282SAndy Yan #define PRST_VIP2 120 303bae2f282SAndy Yan #define ARST_VIP3 121 304bae2f282SAndy Yan #define HRST_VIP3 122 305bae2f282SAndy Yan #define PRST_VIP4 123 306bae2f282SAndy Yan 307bae2f282SAndy Yan #define PRST_CIF1TO4 124 308bae2f282SAndy Yan #define SRST_CVBS_CLK 125 309bae2f282SAndy Yan #define HRST_CVBS 126 310bae2f282SAndy Yan 311bae2f282SAndy Yan #define ARST_VPU_NIU 140 312bae2f282SAndy Yan #define HRST_VPU_NIU 141 313bae2f282SAndy Yan #define ARST_VPU 142 314bae2f282SAndy Yan #define HRST_VPU 143 315bae2f282SAndy Yan #define ARST_RKVDEC_NIU 144 316bae2f282SAndy Yan #define HRST_RKVDEC_NIU 145 317bae2f282SAndy Yan #define ARST_RKVDEC 146 318bae2f282SAndy Yan #define HRST_RKVDEC 147 319bae2f282SAndy Yan #define SRST_RKVDEC_CABAC 148 320bae2f282SAndy Yan #define SRST_RKVDEC_CORE 149 321bae2f282SAndy Yan #define ARST_RKVENC_NIU 150 322bae2f282SAndy Yan #define HRST_RKVENC_NIU 151 323bae2f282SAndy Yan #define ARST_RKVENC 152 324bae2f282SAndy Yan #define HRST_RKVENC 153 325bae2f282SAndy Yan #define SRST_RKVENC_CORE 154 326bae2f282SAndy Yan 327bae2f282SAndy Yan #define SRST_DSP_CORE 156 328bae2f282SAndy Yan #define SRST_DSP_SYS 157 329bae2f282SAndy Yan #define SRST_DSP_GLOBAL 158 330bae2f282SAndy Yan #define SRST_DSP_OECM 159 331bae2f282SAndy Yan #define PRST_DSP_IOP_NIU 160 332bae2f282SAndy Yan #define ARST_DSP_EPP_NIU 161 333bae2f282SAndy Yan #define ARST_DSP_EDP_NIU 162 334bae2f282SAndy Yan #define PRST_DSP_DBG_NIU 163 335bae2f282SAndy Yan #define PRST_DSP_CFG_NIU 164 336bae2f282SAndy Yan #define PRST_DSP_GRF 165 337bae2f282SAndy Yan #define PRST_DSP_MAILBOX 166 338bae2f282SAndy Yan #define PRST_DSP_INTC 167 339bae2f282SAndy Yan #define PRST_DSP_PFM_MON 169 340bae2f282SAndy Yan #define SRST_DSP_PFM_MON 170 341bae2f282SAndy Yan #define ARST_DSP_EDAP_NIU 171 342bae2f282SAndy Yan 343bae2f282SAndy Yan #define SRST_PMU 172 344bae2f282SAndy Yan #define SRST_PMU_I2C0 173 345bae2f282SAndy Yan #define PRST_PMU_I2C0 174 346bae2f282SAndy Yan #define PRST_PMU_GPIO0 175 347bae2f282SAndy Yan #define PRST_PMU_INTMEM 176 348bae2f282SAndy Yan #define PRST_PMU_PWM0 177 349bae2f282SAndy Yan #define SRST_PMU_PWM0 178 350bae2f282SAndy Yan #define PRST_PMU_GRF 179 351bae2f282SAndy Yan #define SRST_PMU_NIU 180 352bae2f282SAndy Yan #define SRST_PMU_PVTM 181 353bae2f282SAndy Yan #define ARST_DSP_EDP_PERF 184 354bae2f282SAndy Yan #define ARST_DSP_EPP_PERF 185 355bae2f282SAndy Yan 356bae2f282SAndy Yan #endif /* _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H */ 357