Home | History | Annotate | Line # | Download | only in clock
      1      1.1  jmcneill /*	$NetBSD: rk3128-cru.h,v 1.1.1.2 2020/01/03 14:33:04 skrll Exp $	*/
      2      1.1  jmcneill 
      3  1.1.1.2     skrll /* SPDX-License-Identifier: GPL-2.0-or-later */
      4      1.1  jmcneill /*
      5      1.1  jmcneill  * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
      6      1.1  jmcneill  * Author: Elaine <zhangqing (at) rock-chips.com>
      7      1.1  jmcneill  */
      8      1.1  jmcneill 
      9      1.1  jmcneill #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3128_H
     10      1.1  jmcneill #define _DT_BINDINGS_CLK_ROCKCHIP_RK3128_H
     11      1.1  jmcneill 
     12      1.1  jmcneill /* core clocks */
     13      1.1  jmcneill #define PLL_APLL		1
     14      1.1  jmcneill #define PLL_DPLL		2
     15      1.1  jmcneill #define PLL_CPLL		3
     16      1.1  jmcneill #define PLL_GPLL		4
     17      1.1  jmcneill #define ARMCLK			5
     18      1.1  jmcneill #define PLL_GPLL_DIV2		6
     19      1.1  jmcneill #define PLL_GPLL_DIV3		7
     20      1.1  jmcneill 
     21      1.1  jmcneill /* sclk gates (special clocks) */
     22      1.1  jmcneill #define SCLK_SPI0		65
     23      1.1  jmcneill #define SCLK_NANDC		67
     24      1.1  jmcneill #define SCLK_SDMMC		68
     25      1.1  jmcneill #define SCLK_SDIO		69
     26      1.1  jmcneill #define SCLK_EMMC		71
     27      1.1  jmcneill #define SCLK_UART0		77
     28      1.1  jmcneill #define SCLK_UART1		78
     29      1.1  jmcneill #define SCLK_UART2		79
     30      1.1  jmcneill #define SCLK_I2S0		80
     31      1.1  jmcneill #define SCLK_I2S1		81
     32      1.1  jmcneill #define SCLK_SPDIF		83
     33      1.1  jmcneill #define SCLK_TIMER0		85
     34      1.1  jmcneill #define SCLK_TIMER1		86
     35      1.1  jmcneill #define SCLK_TIMER2		87
     36      1.1  jmcneill #define SCLK_TIMER3		88
     37      1.1  jmcneill #define SCLK_TIMER4		89
     38      1.1  jmcneill #define SCLK_TIMER5		90
     39      1.1  jmcneill #define SCLK_SARADC		91
     40      1.1  jmcneill #define SCLK_I2S_OUT		113
     41      1.1  jmcneill #define SCLK_SDMMC_DRV		114
     42      1.1  jmcneill #define SCLK_SDIO_DRV		115
     43      1.1  jmcneill #define SCLK_EMMC_DRV		117
     44      1.1  jmcneill #define SCLK_SDMMC_SAMPLE	118
     45      1.1  jmcneill #define SCLK_SDIO_SAMPLE	119
     46      1.1  jmcneill #define SCLK_EMMC_SAMPLE	121
     47      1.1  jmcneill #define SCLK_VOP		122
     48      1.1  jmcneill #define SCLK_MAC_SRC		124
     49      1.1  jmcneill #define SCLK_MAC		126
     50      1.1  jmcneill #define SCLK_MAC_REFOUT		127
     51      1.1  jmcneill #define SCLK_MAC_REF		128
     52      1.1  jmcneill #define SCLK_MAC_RX		129
     53      1.1  jmcneill #define SCLK_MAC_TX		130
     54      1.1  jmcneill #define SCLK_HEVC_CORE		134
     55      1.1  jmcneill #define SCLK_RGA		135
     56      1.1  jmcneill #define SCLK_CRYPTO		138
     57      1.1  jmcneill #define SCLK_TSP		139
     58      1.1  jmcneill #define SCLK_OTGPHY0		142
     59      1.1  jmcneill #define SCLK_OTGPHY1		143
     60      1.1  jmcneill #define SCLK_DDRC		144
     61      1.1  jmcneill #define SCLK_PVTM_FUNC		145
     62      1.1  jmcneill #define SCLK_PVTM_CORE		146
     63      1.1  jmcneill #define SCLK_PVTM_GPU		147
     64      1.1  jmcneill #define SCLK_MIPI_24M		148
     65      1.1  jmcneill #define SCLK_PVTM		149
     66      1.1  jmcneill #define SCLK_CIF_SRC		150
     67      1.1  jmcneill #define SCLK_CIF_OUT_SRC	151
     68      1.1  jmcneill #define SCLK_CIF_OUT		152
     69      1.1  jmcneill #define SCLK_SFC		153
     70      1.1  jmcneill #define SCLK_USB480M		154
     71      1.1  jmcneill 
     72      1.1  jmcneill /* dclk gates */
     73      1.1  jmcneill #define DCLK_VOP		190
     74      1.1  jmcneill #define DCLK_EBC		191
     75      1.1  jmcneill 
     76      1.1  jmcneill /* aclk gates */
     77      1.1  jmcneill #define ACLK_VIO0		192
     78      1.1  jmcneill #define ACLK_VIO1		193
     79      1.1  jmcneill #define ACLK_DMAC		194
     80      1.1  jmcneill #define ACLK_CPU		195
     81      1.1  jmcneill #define ACLK_VEPU		196
     82      1.1  jmcneill #define ACLK_VDPU		197
     83      1.1  jmcneill #define ACLK_CIF		198
     84      1.1  jmcneill #define ACLK_IEP		199
     85      1.1  jmcneill #define ACLK_LCDC0		204
     86      1.1  jmcneill #define ACLK_RGA		205
     87      1.1  jmcneill #define ACLK_PERI		210
     88      1.1  jmcneill #define ACLK_VOP		211
     89      1.1  jmcneill #define ACLK_GMAC		212
     90      1.1  jmcneill #define ACLK_GPU		213
     91      1.1  jmcneill 
     92      1.1  jmcneill /* pclk gates */
     93      1.1  jmcneill #define PCLK_SARADC		318
     94      1.1  jmcneill #define PCLK_WDT		319
     95      1.1  jmcneill #define PCLK_GPIO0		320
     96      1.1  jmcneill #define PCLK_GPIO1		321
     97      1.1  jmcneill #define PCLK_GPIO2		322
     98      1.1  jmcneill #define PCLK_GPIO3		323
     99      1.1  jmcneill #define PCLK_VIO_H2P		324
    100      1.1  jmcneill #define PCLK_MIPI		325
    101      1.1  jmcneill #define PCLK_EFUSE		326
    102      1.1  jmcneill #define PCLK_HDMI		327
    103      1.1  jmcneill #define PCLK_ACODEC		328
    104      1.1  jmcneill #define PCLK_GRF		329
    105      1.1  jmcneill #define PCLK_I2C0		332
    106      1.1  jmcneill #define PCLK_I2C1		333
    107      1.1  jmcneill #define PCLK_I2C2		334
    108      1.1  jmcneill #define PCLK_I2C3		335
    109      1.1  jmcneill #define PCLK_SPI0		338
    110      1.1  jmcneill #define PCLK_UART0		341
    111      1.1  jmcneill #define PCLK_UART1		342
    112      1.1  jmcneill #define PCLK_UART2		343
    113      1.1  jmcneill #define PCLK_TSADC		344
    114      1.1  jmcneill #define PCLK_PWM		350
    115      1.1  jmcneill #define PCLK_TIMER		353
    116      1.1  jmcneill #define PCLK_CPU		354
    117      1.1  jmcneill #define PCLK_PERI		363
    118      1.1  jmcneill #define PCLK_GMAC		367
    119      1.1  jmcneill #define PCLK_PMU_PRE		368
    120      1.1  jmcneill #define PCLK_SIM_CARD		369
    121      1.1  jmcneill 
    122      1.1  jmcneill /* hclk gates */
    123      1.1  jmcneill #define HCLK_SPDIF		440
    124      1.1  jmcneill #define HCLK_GPS		441
    125      1.1  jmcneill #define HCLK_USBHOST		442
    126      1.1  jmcneill #define HCLK_I2S_8CH		443
    127      1.1  jmcneill #define HCLK_I2S_2CH		444
    128      1.1  jmcneill #define HCLK_VOP		452
    129      1.1  jmcneill #define HCLK_NANDC		453
    130      1.1  jmcneill #define HCLK_SDMMC		456
    131      1.1  jmcneill #define HCLK_SDIO		457
    132      1.1  jmcneill #define HCLK_EMMC		459
    133      1.1  jmcneill #define HCLK_CPU		460
    134      1.1  jmcneill #define HCLK_VEPU		461
    135      1.1  jmcneill #define HCLK_VDPU		462
    136      1.1  jmcneill #define HCLK_LCDC0		463
    137      1.1  jmcneill #define HCLK_EBC		465
    138      1.1  jmcneill #define HCLK_VIO		466
    139      1.1  jmcneill #define HCLK_RGA		467
    140      1.1  jmcneill #define HCLK_IEP		468
    141      1.1  jmcneill #define HCLK_VIO_H2P		469
    142      1.1  jmcneill #define HCLK_CIF		470
    143      1.1  jmcneill #define HCLK_HOST2		473
    144      1.1  jmcneill #define HCLK_OTG		474
    145      1.1  jmcneill #define HCLK_TSP		475
    146      1.1  jmcneill #define HCLK_CRYPTO		476
    147      1.1  jmcneill #define HCLK_PERI		478
    148      1.1  jmcneill 
    149      1.1  jmcneill #define CLK_NR_CLKS		(HCLK_PERI + 1)
    150      1.1  jmcneill 
    151      1.1  jmcneill /* soft-reset indices */
    152      1.1  jmcneill #define SRST_CORE0_PO		0
    153      1.1  jmcneill #define SRST_CORE1_PO		1
    154      1.1  jmcneill #define SRST_CORE2_PO		2
    155      1.1  jmcneill #define SRST_CORE3_PO		3
    156      1.1  jmcneill #define SRST_CORE0		4
    157      1.1  jmcneill #define SRST_CORE1		5
    158      1.1  jmcneill #define SRST_CORE2		6
    159      1.1  jmcneill #define SRST_CORE3		7
    160      1.1  jmcneill #define SRST_CORE0_DBG		8
    161      1.1  jmcneill #define SRST_CORE1_DBG		9
    162      1.1  jmcneill #define SRST_CORE2_DBG		10
    163      1.1  jmcneill #define SRST_CORE3_DBG		11
    164      1.1  jmcneill #define SRST_TOPDBG		12
    165      1.1  jmcneill #define SRST_ACLK_CORE		13
    166      1.1  jmcneill #define SRST_STRC_SYS_A		14
    167      1.1  jmcneill #define SRST_L2C		15
    168      1.1  jmcneill 
    169      1.1  jmcneill #define SRST_CPUSYS_H		18
    170      1.1  jmcneill #define SRST_AHB2APBSYS_H	19
    171      1.1  jmcneill #define SRST_SPDIF		20
    172      1.1  jmcneill #define SRST_INTMEM		21
    173      1.1  jmcneill #define SRST_ROM		22
    174      1.1  jmcneill #define SRST_PERI_NIU		23
    175      1.1  jmcneill #define SRST_I2S_2CH		24
    176      1.1  jmcneill #define SRST_I2S_8CH		25
    177      1.1  jmcneill #define SRST_GPU_PVTM		26
    178      1.1  jmcneill #define SRST_FUNC_PVTM		27
    179      1.1  jmcneill #define SRST_CORE_PVTM		29
    180      1.1  jmcneill #define SRST_EFUSE_P		30
    181      1.1  jmcneill #define SRST_ACODEC_P		31
    182      1.1  jmcneill 
    183      1.1  jmcneill #define SRST_GPIO0		32
    184      1.1  jmcneill #define SRST_GPIO1		33
    185      1.1  jmcneill #define SRST_GPIO2		34
    186      1.1  jmcneill #define SRST_GPIO3		35
    187      1.1  jmcneill #define SRST_MIPIPHY_P		36
    188      1.1  jmcneill #define SRST_UART0		39
    189      1.1  jmcneill #define SRST_UART1		40
    190      1.1  jmcneill #define SRST_UART2		41
    191      1.1  jmcneill #define SRST_I2C0		43
    192      1.1  jmcneill #define SRST_I2C1		44
    193      1.1  jmcneill #define SRST_I2C2		45
    194      1.1  jmcneill #define SRST_I2C3		46
    195      1.1  jmcneill #define SRST_SFC		47
    196      1.1  jmcneill 
    197      1.1  jmcneill #define SRST_PWM		48
    198      1.1  jmcneill #define SRST_DAP_PO		50
    199      1.1  jmcneill #define SRST_DAP		51
    200      1.1  jmcneill #define SRST_DAP_SYS		52
    201      1.1  jmcneill #define SRST_CRYPTO		53
    202      1.1  jmcneill #define SRST_GRF		55
    203      1.1  jmcneill #define SRST_GMAC		56
    204      1.1  jmcneill #define SRST_PERIPH_SYS_A	57
    205      1.1  jmcneill #define SRST_PERIPH_SYS_H	58
    206      1.1  jmcneill #define SRST_PERIPH_SYS_P       59
    207      1.1  jmcneill #define SRST_SMART_CARD		60
    208      1.1  jmcneill #define SRST_CPU_PERI		61
    209      1.1  jmcneill #define SRST_EMEM_PERI		62
    210      1.1  jmcneill #define SRST_USB_PERI		63
    211      1.1  jmcneill 
    212      1.1  jmcneill #define SRST_DMA		64
    213      1.1  jmcneill #define SRST_GPS		67
    214      1.1  jmcneill #define SRST_NANDC		68
    215      1.1  jmcneill #define SRST_USBOTG0		69
    216      1.1  jmcneill #define SRST_OTGC0		71
    217      1.1  jmcneill #define SRST_USBOTG1		72
    218      1.1  jmcneill #define SRST_OTGC1		74
    219      1.1  jmcneill #define SRST_DDRMSCH		79
    220      1.1  jmcneill 
    221      1.1  jmcneill #define SRST_SDMMC		81
    222      1.1  jmcneill #define SRST_SDIO		82
    223      1.1  jmcneill #define SRST_EMMC		83
    224      1.1  jmcneill #define SRST_SPI		84
    225      1.1  jmcneill #define SRST_WDT		86
    226      1.1  jmcneill #define SRST_SARADC		87
    227      1.1  jmcneill #define SRST_DDRPHY		88
    228      1.1  jmcneill #define SRST_DDRPHY_P		89
    229      1.1  jmcneill #define SRST_DDRCTRL		90
    230      1.1  jmcneill #define SRST_DDRCTRL_P		91
    231      1.1  jmcneill #define SRST_TSP		92
    232      1.1  jmcneill #define SRST_TSP_CLKIN		93
    233      1.1  jmcneill #define SRST_HOST0_ECHI		94
    234      1.1  jmcneill 
    235      1.1  jmcneill #define SRST_HDMI_P		96
    236      1.1  jmcneill #define SRST_VIO_ARBI_H		97
    237      1.1  jmcneill #define SRST_VIO0_A		98
    238      1.1  jmcneill #define SRST_VIO_BUS_H		99
    239      1.1  jmcneill #define SRST_VOP_A		100
    240      1.1  jmcneill #define SRST_VOP_H		101
    241      1.1  jmcneill #define SRST_VOP_D		102
    242      1.1  jmcneill #define SRST_UTMI0		103
    243      1.1  jmcneill #define SRST_UTMI1		104
    244      1.1  jmcneill #define SRST_USBPOR		105
    245      1.1  jmcneill #define SRST_IEP_A		106
    246      1.1  jmcneill #define SRST_IEP_H		107
    247      1.1  jmcneill #define SRST_RGA_A		108
    248      1.1  jmcneill #define SRST_RGA_H		109
    249      1.1  jmcneill #define SRST_CIF0		110
    250      1.1  jmcneill #define SRST_PMU		111
    251      1.1  jmcneill 
    252      1.1  jmcneill #define SRST_VCODEC_A		112
    253      1.1  jmcneill #define SRST_VCODEC_H		113
    254      1.1  jmcneill #define SRST_VIO1_A		114
    255      1.1  jmcneill #define SRST_HEVC_CORE		115
    256      1.1  jmcneill #define SRST_VCODEC_NIU_A	116
    257      1.1  jmcneill #define SRST_PMU_NIU_P		117
    258      1.1  jmcneill #define SRST_LCDC0_S		119
    259      1.1  jmcneill #define SRST_GPU		120
    260      1.1  jmcneill #define SRST_GPU_NIU_A		122
    261      1.1  jmcneill #define SRST_EBC_A		123
    262      1.1  jmcneill #define SRST_EBC_H		124
    263      1.1  jmcneill 
    264      1.1  jmcneill #define SRST_CORE_DBG		128
    265      1.1  jmcneill #define SRST_DBG_P		129
    266      1.1  jmcneill #define SRST_TIMER0		130
    267      1.1  jmcneill #define SRST_TIMER1		131
    268      1.1  jmcneill #define SRST_TIMER2		132
    269      1.1  jmcneill #define SRST_TIMER3		133
    270      1.1  jmcneill #define SRST_TIMER4		134
    271      1.1  jmcneill #define SRST_TIMER5		135
    272      1.1  jmcneill #define SRST_VIO_H2P		136
    273      1.1  jmcneill #define SRST_VIO_MIPI_DSI	137
    274      1.1  jmcneill 
    275      1.1  jmcneill #endif
    276