1 1.1 jmcneill /* $NetBSD: px30-cru.h,v 1.1.1.2 2020/01/03 14:33:04 skrll Exp $ */ 2 1.1 jmcneill 3 1.1 jmcneill /* SPDX-License-Identifier: GPL-2.0 */ 4 1.1 jmcneill 5 1.1 jmcneill #ifndef _DT_BINDINGS_CLK_ROCKCHIP_PX30_H 6 1.1 jmcneill #define _DT_BINDINGS_CLK_ROCKCHIP_PX30_H 7 1.1 jmcneill 8 1.1 jmcneill /* core clocks */ 9 1.1 jmcneill #define PLL_APLL 1 10 1.1 jmcneill #define PLL_DPLL 2 11 1.1 jmcneill #define PLL_CPLL 3 12 1.1 jmcneill #define PLL_NPLL 4 13 1.1 jmcneill #define APLL_BOOST_H 5 14 1.1 jmcneill #define APLL_BOOST_L 6 15 1.1 jmcneill #define ARMCLK 7 16 1.1 jmcneill 17 1.1 jmcneill /* sclk gates (special clocks) */ 18 1.1 jmcneill #define USB480M 14 19 1.1 jmcneill #define SCLK_PDM 15 20 1.1 jmcneill #define SCLK_I2S0_TX 16 21 1.1 jmcneill #define SCLK_I2S0_TX_OUT 17 22 1.1 jmcneill #define SCLK_I2S0_RX 18 23 1.1 jmcneill #define SCLK_I2S0_RX_OUT 19 24 1.1 jmcneill #define SCLK_I2S1 20 25 1.1 jmcneill #define SCLK_I2S1_OUT 21 26 1.1 jmcneill #define SCLK_I2S2 22 27 1.1 jmcneill #define SCLK_I2S2_OUT 23 28 1.1 jmcneill #define SCLK_UART1 24 29 1.1 jmcneill #define SCLK_UART2 25 30 1.1 jmcneill #define SCLK_UART3 26 31 1.1 jmcneill #define SCLK_UART4 27 32 1.1 jmcneill #define SCLK_UART5 28 33 1.1 jmcneill #define SCLK_I2C0 29 34 1.1 jmcneill #define SCLK_I2C1 30 35 1.1 jmcneill #define SCLK_I2C2 31 36 1.1 jmcneill #define SCLK_I2C3 32 37 1.1 jmcneill #define SCLK_I2C4 33 38 1.1 jmcneill #define SCLK_PWM0 34 39 1.1 jmcneill #define SCLK_PWM1 35 40 1.1 jmcneill #define SCLK_SPI0 36 41 1.1 jmcneill #define SCLK_SPI1 37 42 1.1 jmcneill #define SCLK_TIMER0 38 43 1.1 jmcneill #define SCLK_TIMER1 39 44 1.1 jmcneill #define SCLK_TIMER2 40 45 1.1 jmcneill #define SCLK_TIMER3 41 46 1.1 jmcneill #define SCLK_TIMER4 42 47 1.1 jmcneill #define SCLK_TIMER5 43 48 1.1 jmcneill #define SCLK_TSADC 44 49 1.1 jmcneill #define SCLK_SARADC 45 50 1.1 jmcneill #define SCLK_OTP 46 51 1.1 jmcneill #define SCLK_OTP_USR 47 52 1.1 jmcneill #define SCLK_CRYPTO 48 53 1.1 jmcneill #define SCLK_CRYPTO_APK 49 54 1.1 jmcneill #define SCLK_DDRC 50 55 1.1 jmcneill #define SCLK_ISP 51 56 1.1 jmcneill #define SCLK_CIF_OUT 52 57 1.1 jmcneill #define SCLK_RGA_CORE 53 58 1.1 jmcneill #define SCLK_VOPB_PWM 54 59 1.1 jmcneill #define SCLK_NANDC 55 60 1.1 jmcneill #define SCLK_SDIO 56 61 1.1 jmcneill #define SCLK_EMMC 57 62 1.1 jmcneill #define SCLK_SFC 58 63 1.1 jmcneill #define SCLK_SDMMC 59 64 1.1 jmcneill #define SCLK_OTG_ADP 60 65 1.1 jmcneill #define SCLK_GMAC_SRC 61 66 1.1 jmcneill #define SCLK_GMAC 62 67 1.1 jmcneill #define SCLK_GMAC_RX_TX 63 68 1.1 jmcneill #define SCLK_MAC_REF 64 69 1.1 jmcneill #define SCLK_MAC_REFOUT 65 70 1.1 jmcneill #define SCLK_MAC_OUT 66 71 1.1 jmcneill #define SCLK_SDMMC_DRV 67 72 1.1 jmcneill #define SCLK_SDMMC_SAMPLE 68 73 1.1 jmcneill #define SCLK_SDIO_DRV 69 74 1.1 jmcneill #define SCLK_SDIO_SAMPLE 70 75 1.1 jmcneill #define SCLK_EMMC_DRV 71 76 1.1 jmcneill #define SCLK_EMMC_SAMPLE 72 77 1.1 jmcneill #define SCLK_GPU 73 78 1.1 jmcneill #define SCLK_PVTM 74 79 1.1 jmcneill #define SCLK_CORE_VPU 75 80 1.1 jmcneill #define SCLK_GMAC_RMII 76 81 1.1 jmcneill #define SCLK_UART2_SRC 77 82 1.1 jmcneill #define SCLK_NANDC_DIV 78 83 1.1 jmcneill #define SCLK_NANDC_DIV50 79 84 1.1 jmcneill #define SCLK_SDIO_DIV 80 85 1.1 jmcneill #define SCLK_SDIO_DIV50 81 86 1.1 jmcneill #define SCLK_EMMC_DIV 82 87 1.1 jmcneill #define SCLK_EMMC_DIV50 83 88 1.1 jmcneill #define SCLK_DDRCLK 84 89 1.1 jmcneill #define SCLK_UART1_SRC 85 90 1.1.1.2 skrll #define SCLK_SDMMC_DIV 86 91 1.1.1.2 skrll #define SCLK_SDMMC_DIV50 87 92 1.1 jmcneill 93 1.1 jmcneill /* dclk gates */ 94 1.1 jmcneill #define DCLK_VOPB 150 95 1.1 jmcneill #define DCLK_VOPL 151 96 1.1 jmcneill 97 1.1 jmcneill /* aclk gates */ 98 1.1 jmcneill #define ACLK_GPU 170 99 1.1 jmcneill #define ACLK_BUS_PRE 171 100 1.1 jmcneill #define ACLK_CRYPTO 172 101 1.1 jmcneill #define ACLK_VI_PRE 173 102 1.1 jmcneill #define ACLK_VO_PRE 174 103 1.1 jmcneill #define ACLK_VPU 175 104 1.1 jmcneill #define ACLK_PERI_PRE 176 105 1.1 jmcneill #define ACLK_GMAC 178 106 1.1 jmcneill #define ACLK_CIF 179 107 1.1 jmcneill #define ACLK_ISP 180 108 1.1 jmcneill #define ACLK_VOPB 181 109 1.1 jmcneill #define ACLK_VOPL 182 110 1.1 jmcneill #define ACLK_RGA 183 111 1.1 jmcneill #define ACLK_GIC 184 112 1.1 jmcneill #define ACLK_DCF 186 113 1.1 jmcneill #define ACLK_DMAC 187 114 1.1 jmcneill #define ACLK_BUS_SRC 188 115 1.1 jmcneill #define ACLK_PERI_SRC 189 116 1.1 jmcneill 117 1.1 jmcneill /* hclk gates */ 118 1.1 jmcneill #define HCLK_BUS_PRE 240 119 1.1 jmcneill #define HCLK_CRYPTO 241 120 1.1 jmcneill #define HCLK_VI_PRE 242 121 1.1 jmcneill #define HCLK_VO_PRE 243 122 1.1 jmcneill #define HCLK_VPU 244 123 1.1 jmcneill #define HCLK_PERI_PRE 245 124 1.1 jmcneill #define HCLK_MMC_NAND 246 125 1.1 jmcneill #define HCLK_SDMMC 247 126 1.1 jmcneill #define HCLK_USB 248 127 1.1 jmcneill #define HCLK_CIF 249 128 1.1 jmcneill #define HCLK_ISP 250 129 1.1 jmcneill #define HCLK_VOPB 251 130 1.1 jmcneill #define HCLK_VOPL 252 131 1.1 jmcneill #define HCLK_RGA 253 132 1.1 jmcneill #define HCLK_NANDC 254 133 1.1 jmcneill #define HCLK_SDIO 255 134 1.1 jmcneill #define HCLK_EMMC 256 135 1.1 jmcneill #define HCLK_SFC 257 136 1.1 jmcneill #define HCLK_OTG 258 137 1.1 jmcneill #define HCLK_HOST 259 138 1.1 jmcneill #define HCLK_HOST_ARB 260 139 1.1 jmcneill #define HCLK_PDM 261 140 1.1 jmcneill #define HCLK_I2S0 262 141 1.1 jmcneill #define HCLK_I2S1 263 142 1.1 jmcneill #define HCLK_I2S2 264 143 1.1 jmcneill 144 1.1 jmcneill /* pclk gates */ 145 1.1 jmcneill #define PCLK_BUS_PRE 320 146 1.1 jmcneill #define PCLK_DDR 321 147 1.1 jmcneill #define PCLK_VO_PRE 322 148 1.1 jmcneill #define PCLK_GMAC 323 149 1.1 jmcneill #define PCLK_MIPI_DSI 324 150 1.1 jmcneill #define PCLK_MIPIDSIPHY 325 151 1.1 jmcneill #define PCLK_MIPICSIPHY 326 152 1.1 jmcneill #define PCLK_USB_GRF 327 153 1.1 jmcneill #define PCLK_DCF 328 154 1.1 jmcneill #define PCLK_UART1 329 155 1.1 jmcneill #define PCLK_UART2 330 156 1.1 jmcneill #define PCLK_UART3 331 157 1.1 jmcneill #define PCLK_UART4 332 158 1.1 jmcneill #define PCLK_UART5 333 159 1.1 jmcneill #define PCLK_I2C0 334 160 1.1 jmcneill #define PCLK_I2C1 335 161 1.1 jmcneill #define PCLK_I2C2 336 162 1.1 jmcneill #define PCLK_I2C3 337 163 1.1 jmcneill #define PCLK_I2C4 338 164 1.1 jmcneill #define PCLK_PWM0 339 165 1.1 jmcneill #define PCLK_PWM1 340 166 1.1 jmcneill #define PCLK_SPI0 341 167 1.1 jmcneill #define PCLK_SPI1 342 168 1.1 jmcneill #define PCLK_SARADC 343 169 1.1 jmcneill #define PCLK_TSADC 344 170 1.1 jmcneill #define PCLK_TIMER 345 171 1.1 jmcneill #define PCLK_OTP_NS 346 172 1.1 jmcneill #define PCLK_WDT_NS 347 173 1.1 jmcneill #define PCLK_GPIO1 348 174 1.1 jmcneill #define PCLK_GPIO2 349 175 1.1 jmcneill #define PCLK_GPIO3 350 176 1.1 jmcneill #define PCLK_ISP 351 177 1.1 jmcneill #define PCLK_CIF 352 178 1.1 jmcneill #define PCLK_OTP_PHY 353 179 1.1 jmcneill 180 1.1 jmcneill #define CLK_NR_CLKS (PCLK_OTP_PHY + 1) 181 1.1 jmcneill 182 1.1 jmcneill /* pmu-clocks indices */ 183 1.1 jmcneill 184 1.1 jmcneill #define PLL_GPLL 1 185 1.1 jmcneill 186 1.1 jmcneill #define SCLK_RTC32K_PMU 4 187 1.1 jmcneill #define SCLK_WIFI_PMU 5 188 1.1 jmcneill #define SCLK_UART0_PMU 6 189 1.1 jmcneill #define SCLK_PVTM_PMU 7 190 1.1 jmcneill #define PCLK_PMU_PRE 8 191 1.1 jmcneill #define SCLK_REF24M_PMU 9 192 1.1 jmcneill #define SCLK_USBPHY_REF 10 193 1.1 jmcneill #define SCLK_MIPIDSIPHY_REF 11 194 1.1 jmcneill 195 1.1 jmcneill #define XIN24M_DIV 12 196 1.1 jmcneill 197 1.1 jmcneill #define PCLK_GPIO0_PMU 20 198 1.1 jmcneill #define PCLK_UART0_PMU 21 199 1.1 jmcneill 200 1.1 jmcneill #define CLKPMU_NR_CLKS (PCLK_UART0_PMU + 1) 201 1.1 jmcneill 202 1.1 jmcneill /* soft-reset indices */ 203 1.1 jmcneill #define SRST_CORE0_PO 0 204 1.1 jmcneill #define SRST_CORE1_PO 1 205 1.1 jmcneill #define SRST_CORE2_PO 2 206 1.1 jmcneill #define SRST_CORE3_PO 3 207 1.1 jmcneill #define SRST_CORE0 4 208 1.1 jmcneill #define SRST_CORE1 5 209 1.1 jmcneill #define SRST_CORE2 6 210 1.1 jmcneill #define SRST_CORE3 7 211 1.1 jmcneill #define SRST_CORE0_DBG 8 212 1.1 jmcneill #define SRST_CORE1_DBG 9 213 1.1 jmcneill #define SRST_CORE2_DBG 10 214 1.1 jmcneill #define SRST_CORE3_DBG 11 215 1.1 jmcneill #define SRST_TOPDBG 12 216 1.1 jmcneill #define SRST_CORE_NOC 13 217 1.1 jmcneill #define SRST_STRC_A 14 218 1.1 jmcneill #define SRST_L2C 15 219 1.1 jmcneill 220 1.1 jmcneill #define SRST_DAP 16 221 1.1 jmcneill #define SRST_CORE_PVTM 17 222 1.1 jmcneill #define SRST_GPU 18 223 1.1 jmcneill #define SRST_GPU_NIU 19 224 1.1 jmcneill #define SRST_UPCTL2 20 225 1.1 jmcneill #define SRST_UPCTL2_A 21 226 1.1 jmcneill #define SRST_UPCTL2_P 22 227 1.1 jmcneill #define SRST_MSCH 23 228 1.1 jmcneill #define SRST_MSCH_P 24 229 1.1 jmcneill #define SRST_DDRMON_P 25 230 1.1 jmcneill #define SRST_DDRSTDBY_P 26 231 1.1 jmcneill #define SRST_DDRSTDBY 27 232 1.1 jmcneill #define SRST_DDRGRF_p 28 233 1.1 jmcneill #define SRST_AXI_SPLIT_A 29 234 1.1 jmcneill #define SRST_AXI_CMD_A 30 235 1.1 jmcneill #define SRST_AXI_CMD_P 31 236 1.1 jmcneill 237 1.1 jmcneill #define SRST_DDRPHY 32 238 1.1 jmcneill #define SRST_DDRPHYDIV 33 239 1.1 jmcneill #define SRST_DDRPHY_P 34 240 1.1 jmcneill #define SRST_VPU_A 36 241 1.1 jmcneill #define SRST_VPU_NIU_A 37 242 1.1 jmcneill #define SRST_VPU_H 38 243 1.1 jmcneill #define SRST_VPU_NIU_H 39 244 1.1 jmcneill #define SRST_VI_NIU_A 40 245 1.1 jmcneill #define SRST_VI_NIU_H 41 246 1.1 jmcneill #define SRST_ISP_H 42 247 1.1 jmcneill #define SRST_ISP 43 248 1.1 jmcneill #define SRST_CIF_A 44 249 1.1 jmcneill #define SRST_CIF_H 45 250 1.1 jmcneill #define SRST_CIF_PCLKIN 46 251 1.1 jmcneill #define SRST_MIPICSIPHY_P 47 252 1.1 jmcneill 253 1.1 jmcneill #define SRST_VO_NIU_A 48 254 1.1 jmcneill #define SRST_VO_NIU_H 49 255 1.1 jmcneill #define SRST_VO_NIU_P 50 256 1.1 jmcneill #define SRST_VOPB_A 51 257 1.1 jmcneill #define SRST_VOPB_H 52 258 1.1 jmcneill #define SRST_VOPB 53 259 1.1 jmcneill #define SRST_PWM_VOPB 54 260 1.1 jmcneill #define SRST_VOPL_A 55 261 1.1 jmcneill #define SRST_VOPL_H 56 262 1.1 jmcneill #define SRST_VOPL 57 263 1.1 jmcneill #define SRST_RGA_A 58 264 1.1 jmcneill #define SRST_RGA_H 59 265 1.1 jmcneill #define SRST_RGA 60 266 1.1 jmcneill #define SRST_MIPIDSI_HOST_P 61 267 1.1 jmcneill #define SRST_MIPIDSIPHY_P 62 268 1.1 jmcneill #define SRST_VPU_CORE 63 269 1.1 jmcneill 270 1.1 jmcneill #define SRST_PERI_NIU_A 64 271 1.1 jmcneill #define SRST_USB_NIU_H 65 272 1.1 jmcneill #define SRST_USB2OTG_H 66 273 1.1 jmcneill #define SRST_USB2OTG 67 274 1.1 jmcneill #define SRST_USB2OTG_ADP 68 275 1.1 jmcneill #define SRST_USB2HOST_H 69 276 1.1 jmcneill #define SRST_USB2HOST_ARB_H 70 277 1.1 jmcneill #define SRST_USB2HOST_AUX_H 71 278 1.1 jmcneill #define SRST_USB2HOST_EHCI 72 279 1.1 jmcneill #define SRST_USB2HOST 73 280 1.1 jmcneill #define SRST_USBPHYPOR 74 281 1.1 jmcneill #define SRST_USBPHY_OTG_PORT 75 282 1.1 jmcneill #define SRST_USBPHY_HOST_PORT 76 283 1.1 jmcneill #define SRST_USBPHY_GRF 77 284 1.1 jmcneill #define SRST_CPU_BOOST_P 78 285 1.1 jmcneill #define SRST_CPU_BOOST 79 286 1.1 jmcneill 287 1.1 jmcneill #define SRST_MMC_NAND_NIU_H 80 288 1.1 jmcneill #define SRST_SDIO_H 81 289 1.1 jmcneill #define SRST_EMMC_H 82 290 1.1 jmcneill #define SRST_SFC_H 83 291 1.1 jmcneill #define SRST_SFC 84 292 1.1 jmcneill #define SRST_SDCARD_NIU_H 85 293 1.1 jmcneill #define SRST_SDMMC_H 86 294 1.1 jmcneill #define SRST_NANDC_H 89 295 1.1 jmcneill #define SRST_NANDC 90 296 1.1 jmcneill #define SRST_GMAC_NIU_A 92 297 1.1 jmcneill #define SRST_GMAC_NIU_P 93 298 1.1 jmcneill #define SRST_GMAC_A 94 299 1.1 jmcneill 300 1.1 jmcneill #define SRST_PMU_NIU_P 96 301 1.1 jmcneill #define SRST_PMU_SGRF_P 97 302 1.1 jmcneill #define SRST_PMU_GRF_P 98 303 1.1 jmcneill #define SRST_PMU 99 304 1.1 jmcneill #define SRST_PMU_MEM_P 100 305 1.1 jmcneill #define SRST_PMU_GPIO0_P 101 306 1.1 jmcneill #define SRST_PMU_UART0_P 102 307 1.1 jmcneill #define SRST_PMU_CRU_P 103 308 1.1 jmcneill #define SRST_PMU_PVTM 104 309 1.1 jmcneill #define SRST_PMU_UART 105 310 1.1 jmcneill #define SRST_PMU_NIU_H 106 311 1.1 jmcneill #define SRST_PMU_DDR_FAIL_SAVE 107 312 1.1 jmcneill #define SRST_PMU_CORE_PERF_A 108 313 1.1 jmcneill #define SRST_PMU_CORE_GRF_P 109 314 1.1 jmcneill #define SRST_PMU_GPU_PERF_A 110 315 1.1 jmcneill #define SRST_PMU_GPU_GRF_P 111 316 1.1 jmcneill 317 1.1 jmcneill #define SRST_CRYPTO_NIU_A 112 318 1.1 jmcneill #define SRST_CRYPTO_NIU_H 113 319 1.1 jmcneill #define SRST_CRYPTO_A 114 320 1.1 jmcneill #define SRST_CRYPTO_H 115 321 1.1 jmcneill #define SRST_CRYPTO 116 322 1.1 jmcneill #define SRST_CRYPTO_APK 117 323 1.1 jmcneill #define SRST_BUS_NIU_H 120 324 1.1 jmcneill #define SRST_USB_NIU_P 121 325 1.1 jmcneill #define SRST_BUS_TOP_NIU_P 122 326 1.1 jmcneill #define SRST_INTMEM_A 123 327 1.1 jmcneill #define SRST_GIC_A 124 328 1.1 jmcneill #define SRST_ROM_H 126 329 1.1 jmcneill #define SRST_DCF_A 127 330 1.1 jmcneill 331 1.1 jmcneill #define SRST_DCF_P 128 332 1.1 jmcneill #define SRST_PDM_H 129 333 1.1 jmcneill #define SRST_PDM 130 334 1.1 jmcneill #define SRST_I2S0_H 131 335 1.1 jmcneill #define SRST_I2S0_TX 132 336 1.1 jmcneill #define SRST_I2S1_H 133 337 1.1 jmcneill #define SRST_I2S1 134 338 1.1 jmcneill #define SRST_I2S2_H 135 339 1.1 jmcneill #define SRST_I2S2 136 340 1.1 jmcneill #define SRST_UART1_P 137 341 1.1 jmcneill #define SRST_UART1 138 342 1.1 jmcneill #define SRST_UART2_P 139 343 1.1 jmcneill #define SRST_UART2 140 344 1.1 jmcneill #define SRST_UART3_P 141 345 1.1 jmcneill #define SRST_UART3 142 346 1.1 jmcneill #define SRST_UART4_P 143 347 1.1 jmcneill 348 1.1 jmcneill #define SRST_UART4 144 349 1.1 jmcneill #define SRST_UART5_P 145 350 1.1 jmcneill #define SRST_UART5 146 351 1.1 jmcneill #define SRST_I2C0_P 147 352 1.1 jmcneill #define SRST_I2C0 148 353 1.1 jmcneill #define SRST_I2C1_P 149 354 1.1 jmcneill #define SRST_I2C1 150 355 1.1 jmcneill #define SRST_I2C2_P 151 356 1.1 jmcneill #define SRST_I2C2 152 357 1.1 jmcneill #define SRST_I2C3_P 153 358 1.1 jmcneill #define SRST_I2C3 154 359 1.1 jmcneill #define SRST_PWM0_P 157 360 1.1 jmcneill #define SRST_PWM0 158 361 1.1 jmcneill #define SRST_PWM1_P 159 362 1.1 jmcneill 363 1.1 jmcneill #define SRST_PWM1 160 364 1.1 jmcneill #define SRST_SPI0_P 161 365 1.1 jmcneill #define SRST_SPI0 162 366 1.1 jmcneill #define SRST_SPI1_P 163 367 1.1 jmcneill #define SRST_SPI1 164 368 1.1 jmcneill #define SRST_SARADC_P 165 369 1.1 jmcneill #define SRST_SARADC 166 370 1.1 jmcneill #define SRST_TSADC_P 167 371 1.1 jmcneill #define SRST_TSADC 168 372 1.1 jmcneill #define SRST_TIMER_P 169 373 1.1 jmcneill #define SRST_TIMER0 170 374 1.1 jmcneill #define SRST_TIMER1 171 375 1.1 jmcneill #define SRST_TIMER2 172 376 1.1 jmcneill #define SRST_TIMER3 173 377 1.1 jmcneill #define SRST_TIMER4 174 378 1.1 jmcneill #define SRST_TIMER5 175 379 1.1 jmcneill 380 1.1 jmcneill #define SRST_OTP_NS_P 176 381 1.1 jmcneill #define SRST_OTP_NS_SBPI 177 382 1.1 jmcneill #define SRST_OTP_NS_USR 178 383 1.1 jmcneill #define SRST_OTP_PHY_P 179 384 1.1 jmcneill #define SRST_OTP_PHY 180 385 1.1 jmcneill #define SRST_WDT_NS_P 181 386 1.1 jmcneill #define SRST_GPIO1_P 182 387 1.1 jmcneill #define SRST_GPIO2_P 183 388 1.1 jmcneill #define SRST_GPIO3_P 184 389 1.1 jmcneill #define SRST_SGRF_P 185 390 1.1 jmcneill #define SRST_GRF_P 186 391 1.1 jmcneill #define SRST_I2S0_RX 191 392 1.1 jmcneill 393 1.1 jmcneill #endif 394