1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2fc0fada0Shuang lin /*
3fc0fada0Shuang lin  * Copyright (c) 2014 MundoReader S.L.
4fc0fada0Shuang lin  * Author: Heiko Stuebner <heiko@sntech.de>
5fc0fada0Shuang lin  */
6fc0fada0Shuang lin 
7fc0fada0Shuang lin #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3036_H
8fc0fada0Shuang lin #define _DT_BINDINGS_CLK_ROCKCHIP_RK3036_H
9fc0fada0Shuang lin 
10fc0fada0Shuang lin /* core clocks */
11fc0fada0Shuang lin #define PLL_APLL		1
12fc0fada0Shuang lin #define PLL_DPLL		2
13fc0fada0Shuang lin #define PLL_GPLL		3
14fc0fada0Shuang lin #define ARMCLK			4
15fc0fada0Shuang lin 
16fc0fada0Shuang lin /* sclk gates (special clocks) */
17fc0fada0Shuang lin #define SCLK_GPU		64
18fc0fada0Shuang lin #define SCLK_SPI		65
19fc0fada0Shuang lin #define SCLK_SDMMC		68
20fc0fada0Shuang lin #define SCLK_SDIO		69
21fc0fada0Shuang lin #define SCLK_EMMC		71
22fc0fada0Shuang lin #define SCLK_NANDC		76
23fc0fada0Shuang lin #define SCLK_UART0		77
24fc0fada0Shuang lin #define SCLK_UART1		78
25fc0fada0Shuang lin #define SCLK_UART2		79
26fc0fada0Shuang lin #define SCLK_I2S		82
27fc0fada0Shuang lin #define SCLK_SPDIF		83
28fc0fada0Shuang lin #define SCLK_TIMER0		85
29fc0fada0Shuang lin #define SCLK_TIMER1		86
30fc0fada0Shuang lin #define SCLK_TIMER2		87
31fc0fada0Shuang lin #define SCLK_TIMER3		88
32fc0fada0Shuang lin #define SCLK_OTGPHY0		93
33fc0fada0Shuang lin #define SCLK_LCDC		100
34fc0fada0Shuang lin #define SCLK_HDMI		109
35fc0fada0Shuang lin #define SCLK_HEVC		111
36fc0fada0Shuang lin #define SCLK_I2S_OUT		113
37fc0fada0Shuang lin #define SCLK_SDMMC_DRV		114
38fc0fada0Shuang lin #define SCLK_SDIO_DRV		115
39fc0fada0Shuang lin #define SCLK_EMMC_DRV		117
40fc0fada0Shuang lin #define SCLK_SDMMC_SAMPLE	118
41fc0fada0Shuang lin #define SCLK_SDIO_SAMPLE	119
42fc0fada0Shuang lin #define SCLK_EMMC_SAMPLE	121
43fc0fada0Shuang lin #define SCLK_PVTM_CORE          123
44fc0fada0Shuang lin #define SCLK_PVTM_GPU           124
45fc0fada0Shuang lin #define SCLK_PVTM_VIDEO         125
46fc0fada0Shuang lin #define SCLK_MAC		151
47fc0fada0Shuang lin #define SCLK_MACREF		152
48fc0fada0Shuang lin #define SCLK_SFC		160
49fc0fada0Shuang lin 
50fc0fada0Shuang lin #define DCLK_LCDC		190
51fc0fada0Shuang lin 
52fc0fada0Shuang lin /* aclk gates */
53fc0fada0Shuang lin #define ACLK_DMAC2		194
54fc0fada0Shuang lin #define ACLK_LCDC		197
55fc0fada0Shuang lin #define ACLK_VIO		203
56fc0fada0Shuang lin #define ACLK_VCODEC		208
57fc0fada0Shuang lin #define ACLK_CPU		209
58fc0fada0Shuang lin #define ACLK_PERI		210
59fc0fada0Shuang lin 
60fc0fada0Shuang lin /* pclk gates */
61fc0fada0Shuang lin #define PCLK_GPIO0		320
62fc0fada0Shuang lin #define PCLK_GPIO1		321
63fc0fada0Shuang lin #define PCLK_GPIO2		322
64fc0fada0Shuang lin #define PCLK_GRF		329
65fc0fada0Shuang lin #define PCLK_I2C0		332
66fc0fada0Shuang lin #define PCLK_I2C1		333
67fc0fada0Shuang lin #define PCLK_I2C2		334
68fc0fada0Shuang lin #define PCLK_SPI		338
69fc0fada0Shuang lin #define PCLK_UART0		341
70fc0fada0Shuang lin #define PCLK_UART1		342
71fc0fada0Shuang lin #define PCLK_UART2		343
72fc0fada0Shuang lin #define PCLK_PWM		350
73fc0fada0Shuang lin #define PCLK_TIMER		353
74fc0fada0Shuang lin #define PCLK_HDMI		360
75fc0fada0Shuang lin #define PCLK_CPU		362
76fc0fada0Shuang lin #define PCLK_PERI		363
77fc0fada0Shuang lin #define PCLK_DDRUPCTL		364
78fc0fada0Shuang lin #define PCLK_WDT		368
79fc0fada0Shuang lin 
80fc0fada0Shuang lin /* hclk gates */
81fc0fada0Shuang lin #define HCLK_OTG0		449
82fc0fada0Shuang lin #define HCLK_OTG1		450
83fc0fada0Shuang lin #define HCLK_NANDC		453
84fc0fada0Shuang lin #define HCLK_SDMMC		456
85fc0fada0Shuang lin #define HCLK_SDIO		457
86fc0fada0Shuang lin #define HCLK_EMMC		459
87fc0fada0Shuang lin #define HCLK_I2S		462
88fc0fada0Shuang lin #define HCLK_LCDC		465
89fc0fada0Shuang lin #define HCLK_ROM		467
90fc0fada0Shuang lin #define HCLK_VIO_BUS		472
91fc0fada0Shuang lin #define HCLK_VCODEC		476
92fc0fada0Shuang lin #define HCLK_CPU		477
93fc0fada0Shuang lin #define HCLK_PERI		478
94fc0fada0Shuang lin 
95fc0fada0Shuang lin #define CLK_NR_CLKS		(HCLK_PERI + 1)
96fc0fada0Shuang lin 
97fc0fada0Shuang lin /* soft-reset indices */
98fc0fada0Shuang lin #define SRST_CORE0		0
99fc0fada0Shuang lin #define SRST_CORE1		1
100fc0fada0Shuang lin #define SRST_CORE0_DBG		4
101fc0fada0Shuang lin #define SRST_CORE1_DBG		5
102fc0fada0Shuang lin #define SRST_CORE0_POR		8
103fc0fada0Shuang lin #define SRST_CORE1_POR		9
104fc0fada0Shuang lin #define SRST_L2C		12
105fc0fada0Shuang lin #define SRST_TOPDBG		13
106fc0fada0Shuang lin #define SRST_STRC_SYS_A		14
107fc0fada0Shuang lin #define SRST_PD_CORE_NIU	15
108fc0fada0Shuang lin 
109fc0fada0Shuang lin #define SRST_TIMER2		16
110fc0fada0Shuang lin #define SRST_CPUSYS_H		17
111fc0fada0Shuang lin #define SRST_AHB2APB_H		19
112fc0fada0Shuang lin #define SRST_TIMER3		20
113fc0fada0Shuang lin #define SRST_INTMEM		21
114fc0fada0Shuang lin #define SRST_ROM		22
115fc0fada0Shuang lin #define SRST_PERI_NIU		23
116fc0fada0Shuang lin #define SRST_I2S		24
117fc0fada0Shuang lin #define SRST_DDR_PLL		25
118fc0fada0Shuang lin #define SRST_GPU_DLL		26
119fc0fada0Shuang lin #define SRST_TIMER0		27
120fc0fada0Shuang lin #define SRST_TIMER1		28
121fc0fada0Shuang lin #define SRST_CORE_DLL		29
122fc0fada0Shuang lin #define SRST_EFUSE_P		30
123fc0fada0Shuang lin #define SRST_ACODEC_P		31
124fc0fada0Shuang lin 
125fc0fada0Shuang lin #define SRST_GPIO0		32
126fc0fada0Shuang lin #define SRST_GPIO1		33
127fc0fada0Shuang lin #define SRST_GPIO2		34
128fc0fada0Shuang lin #define SRST_UART0		39
129fc0fada0Shuang lin #define SRST_UART1		40
130fc0fada0Shuang lin #define SRST_UART2		41
131fc0fada0Shuang lin #define SRST_I2C0		43
132fc0fada0Shuang lin #define SRST_I2C1		44
133fc0fada0Shuang lin #define SRST_I2C2		45
134fc0fada0Shuang lin #define SRST_SFC		47
135fc0fada0Shuang lin 
136fc0fada0Shuang lin #define SRST_PWM0		48
137fc0fada0Shuang lin #define SRST_DAP		51
138fc0fada0Shuang lin #define SRST_DAP_SYS		52
139fc0fada0Shuang lin #define SRST_GRF		55
140fc0fada0Shuang lin #define SRST_PERIPHSYS_A	57
141fc0fada0Shuang lin #define SRST_PERIPHSYS_H	58
142fc0fada0Shuang lin #define SRST_PERIPHSYS_P	59
143fc0fada0Shuang lin #define SRST_CPU_PERI		61
144fc0fada0Shuang lin #define SRST_EMEM_PERI		62
145fc0fada0Shuang lin #define SRST_USB_PERI		63
146fc0fada0Shuang lin 
147fc0fada0Shuang lin #define SRST_DMA2		64
148fc0fada0Shuang lin #define SRST_MAC		66
149fc0fada0Shuang lin #define SRST_NANDC		68
150fc0fada0Shuang lin #define SRST_USBOTG0		69
151fc0fada0Shuang lin #define SRST_OTGC0		71
152fc0fada0Shuang lin #define SRST_USBOTG1		72
153fc0fada0Shuang lin #define SRST_OTGC1		74
154fc0fada0Shuang lin #define SRST_DDRMSCH		79
155fc0fada0Shuang lin 
156fc0fada0Shuang lin #define SRST_MMC0		81
157fc0fada0Shuang lin #define SRST_SDIO		82
158fc0fada0Shuang lin #define SRST_EMMC		83
159fc0fada0Shuang lin #define SRST_SPI0		84
160fc0fada0Shuang lin #define SRST_WDT		86
161fc0fada0Shuang lin #define SRST_DDRPHY		88
162fc0fada0Shuang lin #define SRST_DDRPHY_P		89
163fc0fada0Shuang lin #define SRST_DDRCTRL		90
164fc0fada0Shuang lin #define SRST_DDRCTRL_P		91
165fc0fada0Shuang lin 
166fc0fada0Shuang lin #define SRST_HDMI_P		96
167fc0fada0Shuang lin #define SRST_VIO_BUS_H		99
168fc0fada0Shuang lin #define SRST_UTMI0		103
169fc0fada0Shuang lin #define SRST_UTMI1		104
170fc0fada0Shuang lin #define SRST_USBPOR		105
171fc0fada0Shuang lin 
172fc0fada0Shuang lin #define SRST_VCODEC_A		112
173fc0fada0Shuang lin #define SRST_VCODEC_H		113
174fc0fada0Shuang lin #define SRST_VIO1_A		114
175fc0fada0Shuang lin #define SRST_HEVC		115
176fc0fada0Shuang lin #define SRST_VCODEC_NIU_A	116
177fc0fada0Shuang lin #define SRST_LCDC1_A		117
178fc0fada0Shuang lin #define SRST_LCDC1_H		118
179fc0fada0Shuang lin #define SRST_LCDC1_D		119
180fc0fada0Shuang lin #define SRST_GPU		120
181fc0fada0Shuang lin #define SRST_GPU_NIU_A		122
182fc0fada0Shuang lin 
183fc0fada0Shuang lin #define SRST_DBG_P		131
184fc0fada0Shuang lin 
185fc0fada0Shuang lin #endif
186