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