xref: /netbsd-src/sys/arch/arm/sunxi/sun50i_h6_ccu.h (revision 86f4652d7fca5ce3e5325ba97ca23dd354b60849)
1*86f4652dSjmcneill /* $NetBSD: sun50i_h6_ccu.h,v 1.1 2018/05/01 19:53:14 jmcneill Exp $ */
2*86f4652dSjmcneill 
3*86f4652dSjmcneill /*-
4*86f4652dSjmcneill  * Copyright (c) 2018 Jared McNeill <jmcneill@invisible.ca>
5*86f4652dSjmcneill  * All rights reserved.
6*86f4652dSjmcneill  *
7*86f4652dSjmcneill  * Redistribution and use in source and binary forms, with or without
8*86f4652dSjmcneill  * modification, are permitted provided that the following conditions
9*86f4652dSjmcneill  * are met:
10*86f4652dSjmcneill  * 1. Redistributions of source code must retain the above copyright
11*86f4652dSjmcneill  *    notice, this list of conditions and the following disclaimer.
12*86f4652dSjmcneill  * 2. Redistributions in binary form must reproduce the above copyright
13*86f4652dSjmcneill  *    notice, this list of conditions and the following disclaimer in the
14*86f4652dSjmcneill  *    documentation and/or other materials provided with the distribution.
15*86f4652dSjmcneill  *
16*86f4652dSjmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17*86f4652dSjmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18*86f4652dSjmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19*86f4652dSjmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20*86f4652dSjmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21*86f4652dSjmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22*86f4652dSjmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23*86f4652dSjmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24*86f4652dSjmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*86f4652dSjmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*86f4652dSjmcneill  * SUCH DAMAGE.
27*86f4652dSjmcneill  */
28*86f4652dSjmcneill 
29*86f4652dSjmcneill #ifndef _SUN50I_H6_CCU_H
30*86f4652dSjmcneill #define _SUN50I_H6_CCU_H
31*86f4652dSjmcneill 
32*86f4652dSjmcneill #define	H6_RST_MBUS		0
33*86f4652dSjmcneill #define	H6_RST_BUS_DE		1
34*86f4652dSjmcneill #define	H6_RST_BUS_DEINTERLACE	2
35*86f4652dSjmcneill #define	H6_RST_BUS_GPU		3
36*86f4652dSjmcneill #define	H6_RST_BUS_CE		4
37*86f4652dSjmcneill #define	H6_RST_BUS_VE		5
38*86f4652dSjmcneill #define	H6_RST_BUS_EMCE		6
39*86f4652dSjmcneill #define	H6_RST_BUS_VP9		7
40*86f4652dSjmcneill #define	H6_RST_BUS_DMA		8
41*86f4652dSjmcneill #define	H6_RST_BUS_MSGBOX	9
42*86f4652dSjmcneill #define	H6_RST_BUS_SPINLOCK	10
43*86f4652dSjmcneill #define	H6_RST_BUS_HSTIMER	11
44*86f4652dSjmcneill #define	H6_RST_BUS_DBG		12
45*86f4652dSjmcneill #define	H6_RST_BUS_PSI		13
46*86f4652dSjmcneill #define	H6_RST_BUS_PWM		14
47*86f4652dSjmcneill #define	H6_RST_BUS_IOMMU	15
48*86f4652dSjmcneill #define	H6_RST_BUS_DRAM		16
49*86f4652dSjmcneill #define	H6_RST_BUS_NAND		17
50*86f4652dSjmcneill #define	H6_RST_BUS_MMC0		18
51*86f4652dSjmcneill #define	H6_RST_BUS_MMC1		19
52*86f4652dSjmcneill #define	H6_RST_BUS_MMC2		20
53*86f4652dSjmcneill #define	H6_RST_BUS_UART0	21
54*86f4652dSjmcneill #define	H6_RST_BUS_UART1	22
55*86f4652dSjmcneill #define	H6_RST_BUS_UART2	23
56*86f4652dSjmcneill #define	H6_RST_BUS_UART3	24
57*86f4652dSjmcneill #define	H6_RST_BUS_I2C0		25
58*86f4652dSjmcneill #define	H6_RST_BUS_I2C1		26
59*86f4652dSjmcneill #define	H6_RST_BUS_I2C2		27
60*86f4652dSjmcneill #define	H6_RST_BUS_I2C3		28
61*86f4652dSjmcneill #define	H6_RST_BUS_SCR0		29
62*86f4652dSjmcneill #define	H6_RST_BUS_SCR1		30
63*86f4652dSjmcneill #define	H6_RST_BUS_SPI0		31
64*86f4652dSjmcneill #define	H6_RST_BUS_SPI1		32
65*86f4652dSjmcneill #define	H6_RST_BUS_EMAC		33
66*86f4652dSjmcneill #define	H6_RST_BUS_TS		34
67*86f4652dSjmcneill #define	H6_RST_BUS_IR_TX	35
68*86f4652dSjmcneill #define	H6_RST_BUS_THS		36
69*86f4652dSjmcneill #define	H6_RST_BUS_I2S0		37
70*86f4652dSjmcneill #define	H6_RST_BUS_I2S1		38
71*86f4652dSjmcneill #define	H6_RST_BUS_I2S2		39
72*86f4652dSjmcneill #define	H6_RST_BUS_I2S3		40
73*86f4652dSjmcneill #define	H6_RST_BUS_SPDIF	41
74*86f4652dSjmcneill #define	H6_RST_BUS_DMIC		42
75*86f4652dSjmcneill #define	H6_RST_BUS_AUDIO_HUB	43
76*86f4652dSjmcneill #define	H6_RST_USB_PHY0		44
77*86f4652dSjmcneill #define	H6_RST_USB_PHY1		45
78*86f4652dSjmcneill #define	H6_RST_USB_PHY3		46
79*86f4652dSjmcneill #define	H6_RST_USB_HSIC		47
80*86f4652dSjmcneill #define	H6_RST_BUS_OHCI0	48
81*86f4652dSjmcneill #define	H6_RST_BUS_OHCI3	49
82*86f4652dSjmcneill #define	H6_RST_BUS_EHCI0	50
83*86f4652dSjmcneill #define	H6_RST_BUS_XHCI		51
84*86f4652dSjmcneill #define	H6_RST_BUS_EHCI3	52
85*86f4652dSjmcneill #define	H6_RST_BUS_OTG		53
86*86f4652dSjmcneill #define	H6_RST_BUS_PCIE		54
87*86f4652dSjmcneill #define	H6_RST_PCIE_POWERUP	55
88*86f4652dSjmcneill #define	H6_RST_BUS_HDMI		56
89*86f4652dSjmcneill #define	H6_RST_BUS_HDMI_SUB	57
90*86f4652dSjmcneill #define	H6_RST_BUS_TCON_TOP	58
91*86f4652dSjmcneill #define	H6_RST_BUS_TCON_LCD0	59
92*86f4652dSjmcneill #define	H6_RST_BUS_TCON_TV0	60
93*86f4652dSjmcneill #define	H6_RST_BUS_CSI		61
94*86f4652dSjmcneill #define	H6_RST_BUS_HDCP		62
95*86f4652dSjmcneill 
96*86f4652dSjmcneill #define	H6_CLK_OSC12M		0
97*86f4652dSjmcneill #define	H6_CLK_PLL_CPUX		1
98*86f4652dSjmcneill #define	H6_CLK_PLL_DDR0		2
99*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH0	3
100*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH0_2X	4
101*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH0_4X	5
102*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH1	6
103*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH1_2X	7
104*86f4652dSjmcneill #define	H6_CLK_PLL_PERIPH1_4X	8
105*86f4652dSjmcneill #define	H6_CLK_PLL_GPU		9
106*86f4652dSjmcneill #define	H6_CLK_PLL_VIDEO0	10
107*86f4652dSjmcneill #define	H6_CLK_PLL_VIDEO0_4X	11
108*86f4652dSjmcneill #define	H6_CLK_PLL_VIDEO1	12
109*86f4652dSjmcneill #define	H6_CLK_PLL_VIDEO1_4X	13
110*86f4652dSjmcneill #define	H6_CLK_PLL_VE		14
111*86f4652dSjmcneill #define	H6_CLK_PLL_DE		15
112*86f4652dSjmcneill #define	H6_CLK_PLL_HSIC		16
113*86f4652dSjmcneill #define	H6_CLK_PLL_AUDIO_BASE	17
114*86f4652dSjmcneill #define	H6_CLK_PLL_AUDIO	18
115*86f4652dSjmcneill #define	H6_CLK_PLL_AUDIO_2X	19
116*86f4652dSjmcneill #define	H6_CLK_PLL_AUDIO_4X	20
117*86f4652dSjmcneill #define	H6_CLK_CPUX		21
118*86f4652dSjmcneill #define	H6_CLK_AXI		22
119*86f4652dSjmcneill #define	H6_CLK_CPUX_APB		23
120*86f4652dSjmcneill #define	H6_CLK_PSI_AHB1_AHB2	24
121*86f4652dSjmcneill #define	H6_CLK_AHB3		25
122*86f4652dSjmcneill #define	H6_CLK_APB1		26
123*86f4652dSjmcneill #define	H6_CLK_APB2		27
124*86f4652dSjmcneill #define	H6_CLK_MBUS		28
125*86f4652dSjmcneill #define	H6_CLK_DE		29
126*86f4652dSjmcneill #define	H6_CLK_BUS_DE		30
127*86f4652dSjmcneill #define	H6_CLK_DEINTERLACE	31
128*86f4652dSjmcneill #define	H6_CLK_BUS_DEINTERLACE	32
129*86f4652dSjmcneill #define	H6_CLK_GPU		33
130*86f4652dSjmcneill #define	H6_CLK_BUS_GPU		34
131*86f4652dSjmcneill #define	H6_CLK_CE		35
132*86f4652dSjmcneill #define	H6_CLK_BUS_CE		36
133*86f4652dSjmcneill #define	H6_CLK_VE		37
134*86f4652dSjmcneill #define	H6_CLK_BUS_VE		38
135*86f4652dSjmcneill #define	H6_CLK_EMCE		39
136*86f4652dSjmcneill #define	H6_CLK_BUS_EMCE		40
137*86f4652dSjmcneill #define	H6_CLK_VP9		41
138*86f4652dSjmcneill #define	H6_CLK_BUS_VP9		42
139*86f4652dSjmcneill #define	H6_CLK_BUS_DMA		43
140*86f4652dSjmcneill #define	H6_CLK_BUS_MSGBOX	44
141*86f4652dSjmcneill #define	H6_CLK_BUS_SPINLOCK	45
142*86f4652dSjmcneill #define	H6_CLK_BUS_HSTIMER	46
143*86f4652dSjmcneill #define	H6_CLK_AVS		47
144*86f4652dSjmcneill #define	H6_CLK_BUS_DBG		48
145*86f4652dSjmcneill #define	H6_CLK_BUS_PSI		49
146*86f4652dSjmcneill #define	H6_CLK_BUS_PWM		50
147*86f4652dSjmcneill #define	H6_CLK_BUS_IOMMU	51
148*86f4652dSjmcneill #define	H6_CLK_DRAM		52
149*86f4652dSjmcneill #define	H6_CLK_MBUS_DMA		53
150*86f4652dSjmcneill #define	H6_CLK_MBUS_VE		54
151*86f4652dSjmcneill #define	H6_CLK_MBUS_CE		55
152*86f4652dSjmcneill #define	H6_CLK_MBUS_TS		56
153*86f4652dSjmcneill #define	H6_CLK_MBUS_NAND	57
154*86f4652dSjmcneill #define	H6_CLK_MBUS_CSI		58
155*86f4652dSjmcneill #define	H6_CLK_MBUS_DEINTERLACE	59
156*86f4652dSjmcneill #define	H6_CLK_BUS_DRAM		60
157*86f4652dSjmcneill #define	H6_CLK_NAND0		61
158*86f4652dSjmcneill #define	H6_CLK_NAND1		62
159*86f4652dSjmcneill #define	H6_CLK_BUS_NAND		63
160*86f4652dSjmcneill #define	H6_CLK_MMC0		64
161*86f4652dSjmcneill #define	H6_CLK_MMC1		65
162*86f4652dSjmcneill #define	H6_CLK_MMC2		66
163*86f4652dSjmcneill #define	H6_CLK_BUS_MMC0		67
164*86f4652dSjmcneill #define	H6_CLK_BUS_MMC1		68
165*86f4652dSjmcneill #define	H6_CLK_BUS_MMC2		69
166*86f4652dSjmcneill #define	H6_CLK_BUS_UART0	70
167*86f4652dSjmcneill #define	H6_CLK_BUS_UART1	71
168*86f4652dSjmcneill #define	H6_CLK_BUS_UART2	72
169*86f4652dSjmcneill #define	H6_CLK_BUS_UART3	73
170*86f4652dSjmcneill #define	H6_CLK_BUS_I2C0		74
171*86f4652dSjmcneill #define	H6_CLK_BUS_I2C1		75
172*86f4652dSjmcneill #define	H6_CLK_BUS_I2C2		76
173*86f4652dSjmcneill #define	H6_CLK_BUS_I2C3		77
174*86f4652dSjmcneill #define	H6_CLK_BUS_SCR0		78
175*86f4652dSjmcneill #define	H6_CLK_BUS_SCR1		79
176*86f4652dSjmcneill #define	H6_CLK_SPI0		80
177*86f4652dSjmcneill #define	H6_CLK_SPI1		81
178*86f4652dSjmcneill #define	H6_CLK_BUS_SPI0		82
179*86f4652dSjmcneill #define	H6_CLK_BUS_SPI1		83
180*86f4652dSjmcneill #define	H6_CLK_BUS_EMAC		84
181*86f4652dSjmcneill #define	H6_CLK_TS		85
182*86f4652dSjmcneill #define	H6_CLK_BUS_TS		86
183*86f4652dSjmcneill #define	H6_CLK_IR_TX		87
184*86f4652dSjmcneill #define	H6_CLK_BUS_IR_TX	88
185*86f4652dSjmcneill #define	H6_CLK_BUS_THS		89
186*86f4652dSjmcneill #define	H6_CLK_I2S3		90
187*86f4652dSjmcneill #define	H6_CLK_I2S0		91
188*86f4652dSjmcneill #define	H6_CLK_I2S1		92
189*86f4652dSjmcneill #define	H6_CLK_I2S2		93
190*86f4652dSjmcneill #define	H6_CLK_BUS_I2S0		94
191*86f4652dSjmcneill #define	H6_CLK_BUS_I2S1		95
192*86f4652dSjmcneill #define	H6_CLK_BUS_I2S2		96
193*86f4652dSjmcneill #define	H6_CLK_BUS_I2S3		97
194*86f4652dSjmcneill #define	H6_CLK_SPDIF		98
195*86f4652dSjmcneill #define	H6_CLK_BUS_SPDIF	99
196*86f4652dSjmcneill #define	H6_CLK_DMIC		100
197*86f4652dSjmcneill #define	H6_CLK_BUS_DMIC		101
198*86f4652dSjmcneill #define	H6_CLK_AUDIO_HUB	102
199*86f4652dSjmcneill #define	H6_CLK_BUS_AUDIO_HUB	103
200*86f4652dSjmcneill #define	H6_CLK_USB_OHCI0	104
201*86f4652dSjmcneill #define	H6_CLK_USB_PHY0		105
202*86f4652dSjmcneill #define	H6_CLK_USB_PHY1		106
203*86f4652dSjmcneill #define	H6_CLK_USB_OHCI3	107
204*86f4652dSjmcneill #define	H6_CLK_USB_PHY3		108
205*86f4652dSjmcneill #define	H6_CLK_USB_HSIC_12M	109
206*86f4652dSjmcneill #define	H6_CLK_USB_HSIC		110
207*86f4652dSjmcneill #define	H6_CLK_BUS_OHCI0	111
208*86f4652dSjmcneill #define	H6_CLK_BUS_OHCI3	112
209*86f4652dSjmcneill #define	H6_CLK_BUS_EHCI0	113
210*86f4652dSjmcneill #define	H6_CLK_BUS_XHCI		114
211*86f4652dSjmcneill #define	H6_CLK_BUS_EHCI3	115
212*86f4652dSjmcneill #define	H6_CLK_BUS_OTG		116
213*86f4652dSjmcneill #define	H6_CLK_PCIE_REF_100M	117
214*86f4652dSjmcneill #define	H6_CLK_PCIE_REF		118
215*86f4652dSjmcneill #define	H6_CLK_PCIE_REF_OUT	119
216*86f4652dSjmcneill #define	H6_CLK_PCIE_MAXI	120
217*86f4652dSjmcneill #define	H6_CLK_PCIE_AUX		121
218*86f4652dSjmcneill #define	H6_CLK_BUS_PCIE		122
219*86f4652dSjmcneill #define	H6_CLK_HDMI		123
220*86f4652dSjmcneill #define	H6_CLK_HDMI_SLOW	124
221*86f4652dSjmcneill #define	H6_CLK_HDMI_CEC		125
222*86f4652dSjmcneill #define	H6_CLK_BUS_HDMI		126
223*86f4652dSjmcneill #define	H6_CLK_BUS_TCON_TOP	127
224*86f4652dSjmcneill #define	H6_CLK_TCON_LCD0	128
225*86f4652dSjmcneill #define	H6_CLK_BUS_TCON_LCD0	129
226*86f4652dSjmcneill #define	H6_CLK_TCON_TV0		130
227*86f4652dSjmcneill #define	H6_CLK_BUS_TCON_TV0	131
228*86f4652dSjmcneill #define	H6_CLK_CSI_CCI		132
229*86f4652dSjmcneill #define	H6_CLK_CSI_TOP		133
230*86f4652dSjmcneill #define	H6_CLK_CSI_MCLK		134
231*86f4652dSjmcneill #define	H6_CLK_BUS_CSI		135
232*86f4652dSjmcneill #define	H6_CLK_HDCP		136
233*86f4652dSjmcneill #define	H6_CLK_BUS_HDCP		137
234*86f4652dSjmcneill 
235*86f4652dSjmcneill #endif /* !_SUN50I_H6_CCU_H */
236