1 1.1 skrll /* $NetBSD: rk3308-cru.h,v 1.1.1.1 2020/01/03 14:33:05 skrll Exp $ */ 2 1.1 skrll 3 1.1 skrll /* SPDX-License-Identifier: GPL-2.0 */ 4 1.1 skrll /* 5 1.1 skrll * Copyright (c) 2019 Rockchip Electronics Co. Ltd. 6 1.1 skrll * Author: Finley Xiao <finley.xiao (at) rock-chips.com> 7 1.1 skrll */ 8 1.1 skrll 9 1.1 skrll #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3308_H 10 1.1 skrll #define _DT_BINDINGS_CLK_ROCKCHIP_RK3308_H 11 1.1 skrll 12 1.1 skrll /* core clocks */ 13 1.1 skrll #define PLL_APLL 1 14 1.1 skrll #define PLL_DPLL 2 15 1.1 skrll #define PLL_VPLL0 3 16 1.1 skrll #define PLL_VPLL1 4 17 1.1 skrll #define ARMCLK 5 18 1.1 skrll 19 1.1 skrll /* sclk (special clocks) */ 20 1.1 skrll #define USB480M 14 21 1.1 skrll #define SCLK_RTC32K 15 22 1.1 skrll #define SCLK_PVTM_CORE 16 23 1.1 skrll #define SCLK_UART0 17 24 1.1 skrll #define SCLK_UART1 18 25 1.1 skrll #define SCLK_UART2 19 26 1.1 skrll #define SCLK_UART3 20 27 1.1 skrll #define SCLK_UART4 21 28 1.1 skrll #define SCLK_I2C0 22 29 1.1 skrll #define SCLK_I2C1 23 30 1.1 skrll #define SCLK_I2C2 24 31 1.1 skrll #define SCLK_I2C3 25 32 1.1 skrll #define SCLK_PWM0 26 33 1.1 skrll #define SCLK_SPI0 27 34 1.1 skrll #define SCLK_SPI1 28 35 1.1 skrll #define SCLK_SPI2 29 36 1.1 skrll #define SCLK_TIMER0 30 37 1.1 skrll #define SCLK_TIMER1 31 38 1.1 skrll #define SCLK_TIMER2 32 39 1.1 skrll #define SCLK_TIMER3 33 40 1.1 skrll #define SCLK_TIMER4 34 41 1.1 skrll #define SCLK_TIMER5 35 42 1.1 skrll #define SCLK_TSADC 36 43 1.1 skrll #define SCLK_SARADC 37 44 1.1 skrll #define SCLK_OTP 38 45 1.1 skrll #define SCLK_OTP_USR 39 46 1.1 skrll #define SCLK_CPU_BOOST 40 47 1.1 skrll #define SCLK_CRYPTO 41 48 1.1 skrll #define SCLK_CRYPTO_APK 42 49 1.1 skrll #define SCLK_NANDC_DIV 43 50 1.1 skrll #define SCLK_NANDC_DIV50 44 51 1.1 skrll #define SCLK_NANDC 45 52 1.1 skrll #define SCLK_SDMMC_DIV 46 53 1.1 skrll #define SCLK_SDMMC_DIV50 47 54 1.1 skrll #define SCLK_SDMMC 48 55 1.1 skrll #define SCLK_SDMMC_DRV 49 56 1.1 skrll #define SCLK_SDMMC_SAMPLE 50 57 1.1 skrll #define SCLK_SDIO_DIV 51 58 1.1 skrll #define SCLK_SDIO_DIV50 52 59 1.1 skrll #define SCLK_SDIO 53 60 1.1 skrll #define SCLK_SDIO_DRV 54 61 1.1 skrll #define SCLK_SDIO_SAMPLE 55 62 1.1 skrll #define SCLK_EMMC_DIV 56 63 1.1 skrll #define SCLK_EMMC_DIV50 57 64 1.1 skrll #define SCLK_EMMC 58 65 1.1 skrll #define SCLK_EMMC_DRV 59 66 1.1 skrll #define SCLK_EMMC_SAMPLE 60 67 1.1 skrll #define SCLK_SFC 61 68 1.1 skrll #define SCLK_OTG_ADP 62 69 1.1 skrll #define SCLK_MAC_SRC 63 70 1.1 skrll #define SCLK_MAC 64 71 1.1 skrll #define SCLK_MAC_REF 65 72 1.1 skrll #define SCLK_MAC_RX_TX 66 73 1.1 skrll #define SCLK_MAC_RMII 67 74 1.1 skrll #define SCLK_DDR_MON_TIMER 68 75 1.1 skrll #define SCLK_DDR_MON 69 76 1.1 skrll #define SCLK_DDRCLK 70 77 1.1 skrll #define SCLK_PMU 71 78 1.1 skrll #define SCLK_USBPHY_REF 72 79 1.1 skrll #define SCLK_WIFI 73 80 1.1 skrll #define SCLK_PVTM_PMU 74 81 1.1 skrll #define SCLK_PDM 75 82 1.1 skrll #define SCLK_I2S0_8CH_TX 76 83 1.1 skrll #define SCLK_I2S0_8CH_TX_OUT 77 84 1.1 skrll #define SCLK_I2S0_8CH_RX 78 85 1.1 skrll #define SCLK_I2S0_8CH_RX_OUT 79 86 1.1 skrll #define SCLK_I2S1_8CH_TX 80 87 1.1 skrll #define SCLK_I2S1_8CH_TX_OUT 81 88 1.1 skrll #define SCLK_I2S1_8CH_RX 82 89 1.1 skrll #define SCLK_I2S1_8CH_RX_OUT 83 90 1.1 skrll #define SCLK_I2S2_8CH_TX 84 91 1.1 skrll #define SCLK_I2S2_8CH_TX_OUT 85 92 1.1 skrll #define SCLK_I2S2_8CH_RX 86 93 1.1 skrll #define SCLK_I2S2_8CH_RX_OUT 87 94 1.1 skrll #define SCLK_I2S3_8CH_TX 88 95 1.1 skrll #define SCLK_I2S3_8CH_TX_OUT 89 96 1.1 skrll #define SCLK_I2S3_8CH_RX 90 97 1.1 skrll #define SCLK_I2S3_8CH_RX_OUT 91 98 1.1 skrll #define SCLK_I2S0_2CH 92 99 1.1 skrll #define SCLK_I2S0_2CH_OUT 93 100 1.1 skrll #define SCLK_I2S1_2CH 94 101 1.1 skrll #define SCLK_I2S1_2CH_OUT 95 102 1.1 skrll #define SCLK_SPDIF_TX_DIV 96 103 1.1 skrll #define SCLK_SPDIF_TX_DIV50 97 104 1.1 skrll #define SCLK_SPDIF_TX 98 105 1.1 skrll #define SCLK_SPDIF_RX_DIV 99 106 1.1 skrll #define SCLK_SPDIF_RX_DIV50 100 107 1.1 skrll #define SCLK_SPDIF_RX 101 108 1.1 skrll #define SCLK_I2S0_8CH_TX_MUX 102 109 1.1 skrll #define SCLK_I2S0_8CH_RX_MUX 103 110 1.1 skrll #define SCLK_I2S1_8CH_TX_MUX 104 111 1.1 skrll #define SCLK_I2S1_8CH_RX_MUX 105 112 1.1 skrll #define SCLK_I2S2_8CH_TX_MUX 106 113 1.1 skrll #define SCLK_I2S2_8CH_RX_MUX 107 114 1.1 skrll #define SCLK_I2S3_8CH_TX_MUX 108 115 1.1 skrll #define SCLK_I2S3_8CH_RX_MUX 109 116 1.1 skrll #define SCLK_I2S0_8CH_TX_SRC 110 117 1.1 skrll #define SCLK_I2S0_8CH_RX_SRC 111 118 1.1 skrll #define SCLK_I2S1_8CH_TX_SRC 112 119 1.1 skrll #define SCLK_I2S1_8CH_RX_SRC 113 120 1.1 skrll #define SCLK_I2S2_8CH_TX_SRC 114 121 1.1 skrll #define SCLK_I2S2_8CH_RX_SRC 115 122 1.1 skrll #define SCLK_I2S3_8CH_TX_SRC 116 123 1.1 skrll #define SCLK_I2S3_8CH_RX_SRC 117 124 1.1 skrll #define SCLK_I2S0_2CH_SRC 118 125 1.1 skrll #define SCLK_I2S1_2CH_SRC 119 126 1.1 skrll #define SCLK_PWM1 120 127 1.1 skrll #define SCLK_PWM2 121 128 1.1 skrll #define SCLK_OWIRE 122 129 1.1 skrll 130 1.1 skrll /* dclk */ 131 1.1 skrll #define DCLK_VOP 125 132 1.1 skrll 133 1.1 skrll /* aclk */ 134 1.1 skrll #define ACLK_BUS_SRC 130 135 1.1 skrll #define ACLK_BUS 131 136 1.1 skrll #define ACLK_PERI_SRC 132 137 1.1 skrll #define ACLK_PERI 133 138 1.1 skrll #define ACLK_MAC 134 139 1.1 skrll #define ACLK_CRYPTO 135 140 1.1 skrll #define ACLK_VOP 136 141 1.1 skrll #define ACLK_GIC 137 142 1.1 skrll #define ACLK_DMAC0 138 143 1.1 skrll #define ACLK_DMAC1 139 144 1.1 skrll 145 1.1 skrll /* hclk */ 146 1.1 skrll #define HCLK_BUS 150 147 1.1 skrll #define HCLK_PERI 151 148 1.1 skrll #define HCLK_AUDIO 152 149 1.1 skrll #define HCLK_NANDC 153 150 1.1 skrll #define HCLK_SDMMC 154 151 1.1 skrll #define HCLK_SDIO 155 152 1.1 skrll #define HCLK_EMMC 156 153 1.1 skrll #define HCLK_SFC 157 154 1.1 skrll #define HCLK_OTG 158 155 1.1 skrll #define HCLK_HOST 159 156 1.1 skrll #define HCLK_HOST_ARB 160 157 1.1 skrll #define HCLK_PDM 161 158 1.1 skrll #define HCLK_SPDIFTX 162 159 1.1 skrll #define HCLK_SPDIFRX 163 160 1.1 skrll #define HCLK_I2S0_8CH 164 161 1.1 skrll #define HCLK_I2S1_8CH 165 162 1.1 skrll #define HCLK_I2S2_8CH 166 163 1.1 skrll #define HCLK_I2S3_8CH 167 164 1.1 skrll #define HCLK_I2S0_2CH 168 165 1.1 skrll #define HCLK_I2S1_2CH 169 166 1.1 skrll #define HCLK_VAD 170 167 1.1 skrll #define HCLK_CRYPTO 171 168 1.1 skrll #define HCLK_VOP 172 169 1.1 skrll 170 1.1 skrll /* pclk */ 171 1.1 skrll #define PCLK_BUS 190 172 1.1 skrll #define PCLK_DDR 191 173 1.1 skrll #define PCLK_PERI 192 174 1.1 skrll #define PCLK_PMU 193 175 1.1 skrll #define PCLK_AUDIO 194 176 1.1 skrll #define PCLK_MAC 195 177 1.1 skrll #define PCLK_ACODEC 196 178 1.1 skrll #define PCLK_UART0 197 179 1.1 skrll #define PCLK_UART1 198 180 1.1 skrll #define PCLK_UART2 199 181 1.1 skrll #define PCLK_UART3 200 182 1.1 skrll #define PCLK_UART4 201 183 1.1 skrll #define PCLK_I2C0 202 184 1.1 skrll #define PCLK_I2C1 203 185 1.1 skrll #define PCLK_I2C2 204 186 1.1 skrll #define PCLK_I2C3 205 187 1.1 skrll #define PCLK_PWM0 206 188 1.1 skrll #define PCLK_SPI0 207 189 1.1 skrll #define PCLK_SPI1 208 190 1.1 skrll #define PCLK_SPI2 209 191 1.1 skrll #define PCLK_SARADC 210 192 1.1 skrll #define PCLK_TSADC 211 193 1.1 skrll #define PCLK_TIMER 212 194 1.1 skrll #define PCLK_OTP_NS 213 195 1.1 skrll #define PCLK_WDT 214 196 1.1 skrll #define PCLK_GPIO0 215 197 1.1 skrll #define PCLK_GPIO1 216 198 1.1 skrll #define PCLK_GPIO2 217 199 1.1 skrll #define PCLK_GPIO3 218 200 1.1 skrll #define PCLK_GPIO4 219 201 1.1 skrll #define PCLK_SGRF 220 202 1.1 skrll #define PCLK_GRF 221 203 1.1 skrll #define PCLK_USBSD_DET 222 204 1.1 skrll #define PCLK_DDR_UPCTL 223 205 1.1 skrll #define PCLK_DDR_MON 224 206 1.1 skrll #define PCLK_DDRPHY 225 207 1.1 skrll #define PCLK_DDR_STDBY 226 208 1.1 skrll #define PCLK_USB_GRF 227 209 1.1 skrll #define PCLK_CRU 228 210 1.1 skrll #define PCLK_OTP_PHY 229 211 1.1 skrll #define PCLK_CPU_BOOST 230 212 1.1 skrll #define PCLK_PWM1 231 213 1.1 skrll #define PCLK_PWM2 232 214 1.1 skrll #define PCLK_CAN 233 215 1.1 skrll #define PCLK_OWIRE 234 216 1.1 skrll 217 1.1 skrll #define CLK_NR_CLKS (PCLK_OWIRE + 1) 218 1.1 skrll 219 1.1 skrll /* soft-reset indices */ 220 1.1 skrll 221 1.1 skrll /* cru_softrst_con0 */ 222 1.1 skrll #define SRST_CORE0_PO 0 223 1.1 skrll #define SRST_CORE1_PO 1 224 1.1 skrll #define SRST_CORE2_PO 2 225 1.1 skrll #define SRST_CORE3_PO 3 226 1.1 skrll #define SRST_CORE0 4 227 1.1 skrll #define SRST_CORE1 5 228 1.1 skrll #define SRST_CORE2 6 229 1.1 skrll #define SRST_CORE3 7 230 1.1 skrll #define SRST_CORE0_DBG 8 231 1.1 skrll #define SRST_CORE1_DBG 9 232 1.1 skrll #define SRST_CORE2_DBG 10 233 1.1 skrll #define SRST_CORE3_DBG 11 234 1.1 skrll #define SRST_TOPDBG 12 235 1.1 skrll #define SRST_CORE_NOC 13 236 1.1 skrll #define SRST_STRC_A 14 237 1.1 skrll #define SRST_L2C 15 238 1.1 skrll 239 1.1 skrll /* cru_softrst_con1 */ 240 1.1 skrll #define SRST_DAP 16 241 1.1 skrll #define SRST_CORE_PVTM 17 242 1.1 skrll #define SRST_CORE_PRF 18 243 1.1 skrll #define SRST_CORE_GRF 19 244 1.1 skrll #define SRST_DDRUPCTL 20 245 1.1 skrll #define SRST_DDRUPCTL_P 22 246 1.1 skrll #define SRST_MSCH 23 247 1.1 skrll #define SRST_DDRMON_P 25 248 1.1 skrll #define SRST_DDRSTDBY_P 26 249 1.1 skrll #define SRST_DDRSTDBY 27 250 1.1 skrll #define SRST_DDRPHY 28 251 1.1 skrll #define SRST_DDRPHY_DIV 29 252 1.1 skrll #define SRST_DDRPHY_P 30 253 1.1 skrll 254 1.1 skrll /* cru_softrst_con2 */ 255 1.1 skrll #define SRST_BUS_NIU_H 32 256 1.1 skrll #define SRST_USB_NIU_P 33 257 1.1 skrll #define SRST_CRYPTO_A 34 258 1.1 skrll #define SRST_CRYPTO_H 35 259 1.1 skrll #define SRST_CRYPTO 36 260 1.1 skrll #define SRST_CRYPTO_APK 37 261 1.1 skrll #define SRST_VOP_A 38 262 1.1 skrll #define SRST_VOP_H 39 263 1.1 skrll #define SRST_VOP_D 40 264 1.1 skrll #define SRST_INTMEM_A 41 265 1.1 skrll #define SRST_ROM_H 42 266 1.1 skrll #define SRST_GIC_A 43 267 1.1 skrll #define SRST_UART0_P 44 268 1.1 skrll #define SRST_UART0 45 269 1.1 skrll #define SRST_UART1_P 46 270 1.1 skrll #define SRST_UART1 47 271 1.1 skrll 272 1.1 skrll /* cru_softrst_con3 */ 273 1.1 skrll #define SRST_UART2_P 48 274 1.1 skrll #define SRST_UART2 49 275 1.1 skrll #define SRST_UART3_P 50 276 1.1 skrll #define SRST_UART3 51 277 1.1 skrll #define SRST_UART4_P 52 278 1.1 skrll #define SRST_UART4 53 279 1.1 skrll #define SRST_I2C0_P 54 280 1.1 skrll #define SRST_I2C0 55 281 1.1 skrll #define SRST_I2C1_P 56 282 1.1 skrll #define SRST_I2C1 57 283 1.1 skrll #define SRST_I2C2_P 58 284 1.1 skrll #define SRST_I2C2 59 285 1.1 skrll #define SRST_I2C3_P 60 286 1.1 skrll #define SRST_I2C3 61 287 1.1 skrll #define SRST_PWM0_P 62 288 1.1 skrll #define SRST_PWM0 63 289 1.1 skrll 290 1.1 skrll /* cru_softrst_con4 */ 291 1.1 skrll #define SRST_SPI0_P 64 292 1.1 skrll #define SRST_SPI0 65 293 1.1 skrll #define SRST_SPI1_P 66 294 1.1 skrll #define SRST_SPI1 67 295 1.1 skrll #define SRST_SPI2_P 68 296 1.1 skrll #define SRST_SPI2 69 297 1.1 skrll #define SRST_SARADC_P 70 298 1.1 skrll #define SRST_TSADC_P 71 299 1.1 skrll #define SRST_TSADC 72 300 1.1 skrll #define SRST_TIMER0_P 73 301 1.1 skrll #define SRST_TIMER0 74 302 1.1 skrll #define SRST_TIMER1 75 303 1.1 skrll #define SRST_TIMER2 76 304 1.1 skrll #define SRST_TIMER3 77 305 1.1 skrll #define SRST_TIMER4 78 306 1.1 skrll #define SRST_TIMER5 79 307 1.1 skrll 308 1.1 skrll /* cru_softrst_con5 */ 309 1.1 skrll #define SRST_OTP_NS_P 80 310 1.1 skrll #define SRST_OTP_NS_SBPI 81 311 1.1 skrll #define SRST_OTP_NS_USR 82 312 1.1 skrll #define SRST_OTP_PHY_P 83 313 1.1 skrll #define SRST_OTP_PHY 84 314 1.1 skrll #define SRST_GPIO0_P 86 315 1.1 skrll #define SRST_GPIO1_P 87 316 1.1 skrll #define SRST_GPIO2_P 88 317 1.1 skrll #define SRST_GPIO3_P 89 318 1.1 skrll #define SRST_GPIO4_P 90 319 1.1 skrll #define SRST_GRF_P 91 320 1.1 skrll #define SRST_USBSD_DET_P 92 321 1.1 skrll #define SRST_PMU 93 322 1.1 skrll #define SRST_PMU_PVTM 94 323 1.1 skrll #define SRST_USB_GRF_P 95 324 1.1 skrll 325 1.1 skrll /* cru_softrst_con6 */ 326 1.1 skrll #define SRST_CPU_BOOST 96 327 1.1 skrll #define SRST_CPU_BOOST_P 97 328 1.1 skrll #define SRST_PWM1_P 98 329 1.1 skrll #define SRST_PWM1 99 330 1.1 skrll #define SRST_PWM2_P 100 331 1.1 skrll #define SRST_PWM2 101 332 1.1 skrll #define SRST_PERI_NIU_A 104 333 1.1 skrll #define SRST_PERI_NIU_H 105 334 1.1 skrll #define SRST_PERI_NIU_p 106 335 1.1 skrll #define SRST_USB2OTG_H 107 336 1.1 skrll #define SRST_USB2OTG 108 337 1.1 skrll #define SRST_USB2OTG_ADP 109 338 1.1 skrll #define SRST_USB2HOST_H 110 339 1.1 skrll #define SRST_USB2HOST_ARB_H 111 340 1.1 skrll 341 1.1 skrll /* cru_softrst_con7 */ 342 1.1 skrll #define SRST_USB2HOST_AUX_H 112 343 1.1 skrll #define SRST_USB2HOST_EHCI 113 344 1.1 skrll #define SRST_USB2HOST 114 345 1.1 skrll #define SRST_USBPHYPOR 115 346 1.1 skrll #define SRST_UTMI0 116 347 1.1 skrll #define SRST_UTMI1 117 348 1.1 skrll #define SRST_SDIO_H 118 349 1.1 skrll #define SRST_EMMC_H 119 350 1.1 skrll #define SRST_SFC_H 120 351 1.1 skrll #define SRST_SFC 121 352 1.1 skrll #define SRST_SD_H 122 353 1.1 skrll #define SRST_NANDC_H 123 354 1.1 skrll #define SRST_NANDC_N 124 355 1.1 skrll #define SRST_MAC_A 125 356 1.1 skrll #define SRST_CAN_P 126 357 1.1 skrll #define SRST_OWIRE_P 127 358 1.1 skrll 359 1.1 skrll /* cru_softrst_con8 */ 360 1.1 skrll #define SRST_AUDIO_NIU_H 128 361 1.1 skrll #define SRST_AUDIO_NIU_P 129 362 1.1 skrll #define SRST_PDM_H 130 363 1.1 skrll #define SRST_PDM_M 131 364 1.1 skrll #define SRST_SPDIFTX_H 132 365 1.1 skrll #define SRST_SPDIFTX_M 133 366 1.1 skrll #define SRST_SPDIFRX_H 134 367 1.1 skrll #define SRST_SPDIFRX_M 135 368 1.1 skrll #define SRST_I2S0_8CH_H 136 369 1.1 skrll #define SRST_I2S0_8CH_TX_M 137 370 1.1 skrll #define SRST_I2S0_8CH_RX_M 138 371 1.1 skrll #define SRST_I2S1_8CH_H 139 372 1.1 skrll #define SRST_I2S1_8CH_TX_M 140 373 1.1 skrll #define SRST_I2S1_8CH_RX_M 141 374 1.1 skrll #define SRST_I2S2_8CH_H 142 375 1.1 skrll #define SRST_I2S2_8CH_TX_M 143 376 1.1 skrll 377 1.1 skrll /* cru_softrst_con9 */ 378 1.1 skrll #define SRST_I2S2_8CH_RX_M 144 379 1.1 skrll #define SRST_I2S3_8CH_H 145 380 1.1 skrll #define SRST_I2S3_8CH_TX_M 146 381 1.1 skrll #define SRST_I2S3_8CH_RX_M 147 382 1.1 skrll #define SRST_I2S0_2CH_H 148 383 1.1 skrll #define SRST_I2S0_2CH_M 149 384 1.1 skrll #define SRST_I2S1_2CH_H 150 385 1.1 skrll #define SRST_I2S1_2CH_M 151 386 1.1 skrll #define SRST_VAD_H 152 387 1.1 skrll #define SRST_ACODEC_P 153 388 1.1 skrll 389 1.1 skrll #endif 390