1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2b647442cSKever Yang /*
3b647442cSKever Yang  * (C) Copyright 2017 Rockchip Electronics Co., Ltd.
4b647442cSKever Yang  */
5b647442cSKever Yang 
6b647442cSKever Yang #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3228_H
7b647442cSKever Yang #define _DT_BINDINGS_CLK_ROCKCHIP_RK3228_H
8b647442cSKever Yang 
9b647442cSKever Yang /* core clocks */
10b647442cSKever Yang #define PLL_APLL		1
11b647442cSKever Yang #define PLL_DPLL		2
12b647442cSKever Yang #define PLL_CPLL		3
13b647442cSKever Yang #define PLL_GPLL		4
14b647442cSKever Yang #define ARMCLK			5
15b647442cSKever Yang 
16b647442cSKever Yang /* sclk gates (special clocks) */
17b647442cSKever Yang #define SCLK_SPI0		65
18b647442cSKever Yang #define SCLK_NANDC		67
19b647442cSKever Yang #define SCLK_SDMMC		68
20b647442cSKever Yang #define SCLK_SDIO		69
21b647442cSKever Yang #define SCLK_EMMC		71
22b647442cSKever Yang #define SCLK_TSADC		72
23b647442cSKever Yang #define SCLK_UART0		77
24b647442cSKever Yang #define SCLK_UART1		78
25b647442cSKever Yang #define SCLK_UART2		79
26b647442cSKever Yang #define SCLK_I2S0		80
27b647442cSKever Yang #define SCLK_I2S1		81
28b647442cSKever Yang #define SCLK_I2S2		82
29b647442cSKever Yang #define SCLK_SPDIF		83
30b647442cSKever Yang #define SCLK_TIMER0		85
31b647442cSKever Yang #define SCLK_TIMER1		86
32b647442cSKever Yang #define SCLK_TIMER2		87
33b647442cSKever Yang #define SCLK_TIMER3		88
34b647442cSKever Yang #define SCLK_TIMER4		89
35b647442cSKever Yang #define SCLK_TIMER5		90
36b647442cSKever Yang #define SCLK_I2S_OUT		113
37b647442cSKever Yang #define SCLK_SDMMC_DRV		114
38b647442cSKever Yang #define SCLK_SDIO_DRV		115
39b647442cSKever Yang #define SCLK_EMMC_DRV		117
40b647442cSKever Yang #define SCLK_SDMMC_SAMPLE	118
41b647442cSKever Yang #define SCLK_SDIO_SAMPLE	119
42b647442cSKever Yang #define SCLK_EMMC_SAMPLE	121
43b647442cSKever Yang #define SCLK_VOP		122
44b647442cSKever Yang #define SCLK_HDMI_HDCP		123
45b647442cSKever Yang #define SCLK_MAC_SRC		124
46b647442cSKever Yang #define SCLK_MAC_EXTCLK		125
47b647442cSKever Yang #define SCLK_MAC		126
48b647442cSKever Yang #define SCLK_MAC_REFOUT		127
49b647442cSKever Yang #define SCLK_MAC_REF		128
50b647442cSKever Yang #define SCLK_MAC_RX		129
51b647442cSKever Yang #define SCLK_MAC_TX		130
52b647442cSKever Yang #define SCLK_MAC_PHY		131
53b647442cSKever Yang #define SCLK_MAC_OUT		132
54b647442cSKever Yang 
55b647442cSKever Yang /* dclk gates */
56b647442cSKever Yang #define DCLK_VOP		190
57b647442cSKever Yang #define DCLK_HDMI_PHY		191
58b647442cSKever Yang 
59b647442cSKever Yang /* aclk gates */
60b647442cSKever Yang #define ACLK_DMAC		194
61b647442cSKever Yang #define ACLK_PERI		210
62b647442cSKever Yang #define ACLK_VOP		211
63b647442cSKever Yang #define ACLK_GMAC		212
64b647442cSKever Yang 
65b647442cSKever Yang /* pclk gates */
66b647442cSKever Yang #define PCLK_GPIO0		320
67b647442cSKever Yang #define PCLK_GPIO1		321
68b647442cSKever Yang #define PCLK_GPIO2		322
69b647442cSKever Yang #define PCLK_GPIO3		323
70b647442cSKever Yang #define PCLK_GRF		329
71b647442cSKever Yang #define PCLK_I2C0		332
72b647442cSKever Yang #define PCLK_I2C1		333
73b647442cSKever Yang #define PCLK_I2C2		334
74b647442cSKever Yang #define PCLK_I2C3		335
75b647442cSKever Yang #define PCLK_SPI0		338
76b647442cSKever Yang #define PCLK_UART0		341
77b647442cSKever Yang #define PCLK_UART1		342
78b647442cSKever Yang #define PCLK_UART2		343
79b647442cSKever Yang #define PCLK_TSADC		344
80b647442cSKever Yang #define PCLK_PWM		350
81b647442cSKever Yang #define PCLK_TIMER		353
82b647442cSKever Yang #define PCLK_PERI		363
83b647442cSKever Yang #define PCLK_HDMI_CTRL		364
84b647442cSKever Yang #define PCLK_HDMI_PHY		365
85b647442cSKever Yang #define PCLK_GMAC		367
86b647442cSKever Yang 
87b647442cSKever Yang /* hclk gates */
88b647442cSKever Yang #define HCLK_I2S0_8CH		442
89b647442cSKever Yang #define HCLK_I2S1_8CH		443
90b647442cSKever Yang #define HCLK_I2S2_2CH		444
91b647442cSKever Yang #define HCLK_SPDIF_8CH		445
92b647442cSKever Yang #define HCLK_VOP		452
93b647442cSKever Yang #define HCLK_NANDC		453
94b647442cSKever Yang #define HCLK_SDMMC		456
95b647442cSKever Yang #define HCLK_SDIO		457
96b647442cSKever Yang #define HCLK_EMMC		459
97b647442cSKever Yang #define HCLK_PERI		478
98b647442cSKever Yang 
99b647442cSKever Yang #define CLK_NR_CLKS		(HCLK_PERI + 1)
100b647442cSKever Yang 
101b647442cSKever Yang /* soft-reset indices */
102b647442cSKever Yang #define SRST_CORE0_PO		0
103b647442cSKever Yang #define SRST_CORE1_PO		1
104b647442cSKever Yang #define SRST_CORE2_PO		2
105b647442cSKever Yang #define SRST_CORE3_PO		3
106b647442cSKever Yang #define SRST_CORE0		4
107b647442cSKever Yang #define SRST_CORE1		5
108b647442cSKever Yang #define SRST_CORE2		6
109b647442cSKever Yang #define SRST_CORE3		7
110b647442cSKever Yang #define SRST_CORE0_DBG		8
111b647442cSKever Yang #define SRST_CORE1_DBG		9
112b647442cSKever Yang #define SRST_CORE2_DBG		10
113b647442cSKever Yang #define SRST_CORE3_DBG		11
114b647442cSKever Yang #define SRST_TOPDBG		12
115b647442cSKever Yang #define SRST_ACLK_CORE		13
116b647442cSKever Yang #define SRST_NOC		14
117b647442cSKever Yang #define SRST_L2C		15
118b647442cSKever Yang 
119b647442cSKever Yang #define SRST_CPUSYS_H		18
120b647442cSKever Yang #define SRST_BUSSYS_H		19
121b647442cSKever Yang #define SRST_SPDIF		20
122b647442cSKever Yang #define SRST_INTMEM		21
123b647442cSKever Yang #define SRST_ROM		22
124b647442cSKever Yang #define SRST_OTG_ADP		23
125b647442cSKever Yang #define SRST_I2S0		24
126b647442cSKever Yang #define SRST_I2S1		25
127b647442cSKever Yang #define SRST_I2S2		26
128b647442cSKever Yang #define SRST_ACODEC_P		27
129b647442cSKever Yang #define SRST_DFIMON		28
130b647442cSKever Yang #define SRST_MSCH		29
131b647442cSKever Yang #define SRST_EFUSE1024		30
132b647442cSKever Yang #define SRST_EFUSE256		31
133b647442cSKever Yang 
134b647442cSKever Yang #define SRST_GPIO0		32
135b647442cSKever Yang #define SRST_GPIO1		33
136b647442cSKever Yang #define SRST_GPIO2		34
137b647442cSKever Yang #define SRST_GPIO3		35
138b647442cSKever Yang #define SRST_PERIPH_NOC_A	36
139b647442cSKever Yang #define SRST_PERIPH_NOC_BUS_H	37
140b647442cSKever Yang #define SRST_PERIPH_NOC_P	38
141b647442cSKever Yang #define SRST_UART0		39
142b647442cSKever Yang #define SRST_UART1		40
143b647442cSKever Yang #define SRST_UART2		41
144b647442cSKever Yang #define SRST_PHYNOC		42
145b647442cSKever Yang #define SRST_I2C0		43
146b647442cSKever Yang #define SRST_I2C1		44
147b647442cSKever Yang #define SRST_I2C2		45
148b647442cSKever Yang #define SRST_I2C3		46
149b647442cSKever Yang 
150b647442cSKever Yang #define SRST_PWM		48
151b647442cSKever Yang #define SRST_A53_GIC		49
152b647442cSKever Yang #define SRST_DAP		51
153b647442cSKever Yang #define SRST_DAP_NOC		52
154b647442cSKever Yang #define SRST_CRYPTO		53
155b647442cSKever Yang #define SRST_SGRF		54
156b647442cSKever Yang #define SRST_GRF		55
157b647442cSKever Yang #define SRST_GMAC		56
158b647442cSKever Yang #define SRST_PERIPH_NOC_H	58
159b647442cSKever Yang #define SRST_MACPHY		63
160b647442cSKever Yang 
161b647442cSKever Yang #define SRST_DMA		64
162b647442cSKever Yang #define SRST_NANDC		68
163b647442cSKever Yang #define SRST_USBOTG		69
164b647442cSKever Yang #define SRST_OTGC		70
165b647442cSKever Yang #define SRST_USBHOST0		71
166b647442cSKever Yang #define SRST_HOST_CTRL0		72
167b647442cSKever Yang #define SRST_USBHOST1		73
168b647442cSKever Yang #define SRST_HOST_CTRL1		74
169b647442cSKever Yang #define SRST_USBHOST2		75
170b647442cSKever Yang #define SRST_HOST_CTRL2		76
171b647442cSKever Yang #define SRST_USBPOR0		77
172b647442cSKever Yang #define SRST_USBPOR1		78
173b647442cSKever Yang #define SRST_DDRMSCH		79
174b647442cSKever Yang 
175b647442cSKever Yang #define SRST_SMART_CARD		80
176b647442cSKever Yang #define SRST_SDMMC		81
177b647442cSKever Yang #define SRST_SDIO		82
178b647442cSKever Yang #define SRST_EMMC		83
179b647442cSKever Yang #define SRST_SPI		84
180b647442cSKever Yang #define SRST_TSP_H		85
181b647442cSKever Yang #define SRST_TSP		86
182b647442cSKever Yang #define SRST_TSADC		87
183b647442cSKever Yang #define SRST_DDRPHY		88
184b647442cSKever Yang #define SRST_DDRPHY_P		89
185b647442cSKever Yang #define SRST_DDRCTRL		90
186b647442cSKever Yang #define SRST_DDRCTRL_P		91
187b647442cSKever Yang #define SRST_HOST0_ECHI		92
188b647442cSKever Yang #define SRST_HOST1_ECHI		93
189b647442cSKever Yang #define SRST_HOST2_ECHI		94
190b647442cSKever Yang #define SRST_VOP_NOC_A		95
191b647442cSKever Yang 
192b647442cSKever Yang #define SRST_HDMI_P		96
193b647442cSKever Yang #define SRST_VIO_ARBI_H		97
194b647442cSKever Yang #define SRST_IEP_NOC_A		98
195b647442cSKever Yang #define SRST_VIO_NOC_H		99
196b647442cSKever Yang #define SRST_VOP_A		100
197b647442cSKever Yang #define SRST_VOP_H		101
198b647442cSKever Yang #define SRST_VOP_D		102
199b647442cSKever Yang #define SRST_UTMI0		103
200b647442cSKever Yang #define SRST_UTMI1		104
201b647442cSKever Yang #define SRST_UTMI2		105
202b647442cSKever Yang #define SRST_UTMI3		106
203b647442cSKever Yang #define SRST_RGA		107
204b647442cSKever Yang #define SRST_RGA_NOC_A		108
205b647442cSKever Yang #define SRST_RGA_A		109
206b647442cSKever Yang #define SRST_RGA_H		110
207b647442cSKever Yang #define SRST_HDCP_A		111
208b647442cSKever Yang 
209b647442cSKever Yang #define SRST_VPU_A		112
210b647442cSKever Yang #define SRST_VPU_H		113
211b647442cSKever Yang #define SRST_VPU_NOC_A		116
212b647442cSKever Yang #define SRST_VPU_NOC_H		117
213b647442cSKever Yang #define SRST_RKVDEC_A		118
214b647442cSKever Yang #define SRST_RKVDEC_NOC_A	119
215b647442cSKever Yang #define SRST_RKVDEC_H		120
216b647442cSKever Yang #define SRST_RKVDEC_NOC_H	121
217b647442cSKever Yang #define SRST_RKVDEC_CORE	122
218b647442cSKever Yang #define SRST_RKVDEC_CABAC	123
219b647442cSKever Yang #define SRST_IEP_A		124
220b647442cSKever Yang #define SRST_IEP_H		125
221b647442cSKever Yang #define SRST_GPU_A		126
222b647442cSKever Yang #define SRST_GPU_NOC_A		127
223b647442cSKever Yang 
224b647442cSKever Yang #define SRST_CORE_DBG		128
225b647442cSKever Yang #define SRST_DBG_P		129
226b647442cSKever Yang #define SRST_TIMER0		130
227b647442cSKever Yang #define SRST_TIMER1		131
228b647442cSKever Yang #define SRST_TIMER2		132
229b647442cSKever Yang #define SRST_TIMER3		133
230b647442cSKever Yang #define SRST_TIMER4		134
231b647442cSKever Yang #define SRST_TIMER5		135
232b647442cSKever Yang #define SRST_VIO_H2P		136
233b647442cSKever Yang #define SRST_HDMIPHY		139
234b647442cSKever Yang #define SRST_VDAC		140
235b647442cSKever Yang #define SRST_TIMER_6CH_P	141
236b647442cSKever Yang 
237b647442cSKever Yang #endif
238