xref: /freebsd-src/sys/contrib/device-tree/include/dt-bindings/clock/sun4i-a10-ccu.h (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot /*
2*c66ec88fSEmmanuel Vadot  * Copyright (C) 2017 Priit Laes <plaes@plaes.org>
3*c66ec88fSEmmanuel Vadot  *
4*c66ec88fSEmmanuel Vadot  * This file is dual-licensed: you can use it either under the terms
5*c66ec88fSEmmanuel Vadot  * of the GPL or the X11 license, at your option. Note that this dual
6*c66ec88fSEmmanuel Vadot  * licensing only applies to this file, and not this project as a
7*c66ec88fSEmmanuel Vadot  * whole.
8*c66ec88fSEmmanuel Vadot  *
9*c66ec88fSEmmanuel Vadot  *  a) This file is free software; you can redistribute it and/or
10*c66ec88fSEmmanuel Vadot  *     modify it under the terms of the GNU General Public License as
11*c66ec88fSEmmanuel Vadot  *     published by the Free Software Foundation; either version 2 of the
12*c66ec88fSEmmanuel Vadot  *     License, or (at your option) any later version.
13*c66ec88fSEmmanuel Vadot  *
14*c66ec88fSEmmanuel Vadot  *     This file is distributed in the hope that it will be useful,
15*c66ec88fSEmmanuel Vadot  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16*c66ec88fSEmmanuel Vadot  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*c66ec88fSEmmanuel Vadot  *     GNU General Public License for more details.
18*c66ec88fSEmmanuel Vadot  *
19*c66ec88fSEmmanuel Vadot  * Or, alternatively,
20*c66ec88fSEmmanuel Vadot  *
21*c66ec88fSEmmanuel Vadot  *  b) Permission is hereby granted, free of charge, to any person
22*c66ec88fSEmmanuel Vadot  *     obtaining a copy of this software and associated documentation
23*c66ec88fSEmmanuel Vadot  *     files (the "Software"), to deal in the Software without
24*c66ec88fSEmmanuel Vadot  *     restriction, including without limitation the rights to use,
25*c66ec88fSEmmanuel Vadot  *     copy, modify, merge, publish, distribute, sublicense, and/or
26*c66ec88fSEmmanuel Vadot  *     sell copies of the Software, and to permit persons to whom the
27*c66ec88fSEmmanuel Vadot  *     Software is furnished to do so, subject to the following
28*c66ec88fSEmmanuel Vadot  *     conditions:
29*c66ec88fSEmmanuel Vadot  *
30*c66ec88fSEmmanuel Vadot  *     The above copyright notice and this permission notice shall be
31*c66ec88fSEmmanuel Vadot  *     included in all copies or substantial portions of the Software.
32*c66ec88fSEmmanuel Vadot  *
33*c66ec88fSEmmanuel Vadot  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34*c66ec88fSEmmanuel Vadot  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35*c66ec88fSEmmanuel Vadot  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36*c66ec88fSEmmanuel Vadot  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37*c66ec88fSEmmanuel Vadot  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38*c66ec88fSEmmanuel Vadot  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39*c66ec88fSEmmanuel Vadot  *     OTHER DEALINGS IN THE SOFTWARE.
40*c66ec88fSEmmanuel Vadot  */
41*c66ec88fSEmmanuel Vadot 
42*c66ec88fSEmmanuel Vadot #ifndef _DT_BINDINGS_CLK_SUN4I_A10_H_
43*c66ec88fSEmmanuel Vadot #define _DT_BINDINGS_CLK_SUN4I_A10_H_
44*c66ec88fSEmmanuel Vadot 
45*c66ec88fSEmmanuel Vadot #define CLK_HOSC		1
46*c66ec88fSEmmanuel Vadot #define CLK_PLL_VIDEO0_2X	9
47*c66ec88fSEmmanuel Vadot #define CLK_PLL_VIDEO1_2X	18
48*c66ec88fSEmmanuel Vadot #define CLK_CPU			20
49*c66ec88fSEmmanuel Vadot 
50*c66ec88fSEmmanuel Vadot /* AHB Gates */
51*c66ec88fSEmmanuel Vadot #define CLK_AHB_OTG		26
52*c66ec88fSEmmanuel Vadot #define CLK_AHB_EHCI0		27
53*c66ec88fSEmmanuel Vadot #define CLK_AHB_OHCI0		28
54*c66ec88fSEmmanuel Vadot #define CLK_AHB_EHCI1		29
55*c66ec88fSEmmanuel Vadot #define CLK_AHB_OHCI1		30
56*c66ec88fSEmmanuel Vadot #define CLK_AHB_SS		31
57*c66ec88fSEmmanuel Vadot #define CLK_AHB_DMA		32
58*c66ec88fSEmmanuel Vadot #define CLK_AHB_BIST		33
59*c66ec88fSEmmanuel Vadot #define CLK_AHB_MMC0		34
60*c66ec88fSEmmanuel Vadot #define CLK_AHB_MMC1		35
61*c66ec88fSEmmanuel Vadot #define CLK_AHB_MMC2		36
62*c66ec88fSEmmanuel Vadot #define CLK_AHB_MMC3		37
63*c66ec88fSEmmanuel Vadot #define CLK_AHB_MS		38
64*c66ec88fSEmmanuel Vadot #define CLK_AHB_NAND		39
65*c66ec88fSEmmanuel Vadot #define CLK_AHB_SDRAM		40
66*c66ec88fSEmmanuel Vadot #define CLK_AHB_ACE		41
67*c66ec88fSEmmanuel Vadot #define CLK_AHB_EMAC		42
68*c66ec88fSEmmanuel Vadot #define CLK_AHB_TS		43
69*c66ec88fSEmmanuel Vadot #define CLK_AHB_SPI0		44
70*c66ec88fSEmmanuel Vadot #define CLK_AHB_SPI1		45
71*c66ec88fSEmmanuel Vadot #define CLK_AHB_SPI2		46
72*c66ec88fSEmmanuel Vadot #define CLK_AHB_SPI3		47
73*c66ec88fSEmmanuel Vadot #define CLK_AHB_PATA		48
74*c66ec88fSEmmanuel Vadot #define CLK_AHB_SATA		49
75*c66ec88fSEmmanuel Vadot #define CLK_AHB_GPS		50
76*c66ec88fSEmmanuel Vadot #define CLK_AHB_HSTIMER		51
77*c66ec88fSEmmanuel Vadot #define CLK_AHB_VE		52
78*c66ec88fSEmmanuel Vadot #define CLK_AHB_TVD		53
79*c66ec88fSEmmanuel Vadot #define CLK_AHB_TVE0		54
80*c66ec88fSEmmanuel Vadot #define CLK_AHB_TVE1		55
81*c66ec88fSEmmanuel Vadot #define CLK_AHB_LCD0		56
82*c66ec88fSEmmanuel Vadot #define CLK_AHB_LCD1		57
83*c66ec88fSEmmanuel Vadot #define CLK_AHB_CSI0		58
84*c66ec88fSEmmanuel Vadot #define CLK_AHB_CSI1		59
85*c66ec88fSEmmanuel Vadot #define CLK_AHB_HDMI0		60
86*c66ec88fSEmmanuel Vadot #define CLK_AHB_HDMI1		61
87*c66ec88fSEmmanuel Vadot #define CLK_AHB_DE_BE0		62
88*c66ec88fSEmmanuel Vadot #define CLK_AHB_DE_BE1		63
89*c66ec88fSEmmanuel Vadot #define CLK_AHB_DE_FE0		64
90*c66ec88fSEmmanuel Vadot #define CLK_AHB_DE_FE1		65
91*c66ec88fSEmmanuel Vadot #define CLK_AHB_GMAC		66
92*c66ec88fSEmmanuel Vadot #define CLK_AHB_MP		67
93*c66ec88fSEmmanuel Vadot #define CLK_AHB_GPU		68
94*c66ec88fSEmmanuel Vadot 
95*c66ec88fSEmmanuel Vadot /* APB0 Gates */
96*c66ec88fSEmmanuel Vadot #define CLK_APB0_CODEC		69
97*c66ec88fSEmmanuel Vadot #define CLK_APB0_SPDIF		70
98*c66ec88fSEmmanuel Vadot #define CLK_APB0_I2S0		71
99*c66ec88fSEmmanuel Vadot #define CLK_APB0_AC97		72
100*c66ec88fSEmmanuel Vadot #define CLK_APB0_I2S1		73
101*c66ec88fSEmmanuel Vadot #define CLK_APB0_PIO		74
102*c66ec88fSEmmanuel Vadot #define CLK_APB0_IR0		75
103*c66ec88fSEmmanuel Vadot #define CLK_APB0_IR1		76
104*c66ec88fSEmmanuel Vadot #define CLK_APB0_I2S2		77
105*c66ec88fSEmmanuel Vadot #define CLK_APB0_KEYPAD		78
106*c66ec88fSEmmanuel Vadot 
107*c66ec88fSEmmanuel Vadot /* APB1 Gates */
108*c66ec88fSEmmanuel Vadot #define CLK_APB1_I2C0		79
109*c66ec88fSEmmanuel Vadot #define CLK_APB1_I2C1		80
110*c66ec88fSEmmanuel Vadot #define CLK_APB1_I2C2		81
111*c66ec88fSEmmanuel Vadot #define CLK_APB1_I2C3		82
112*c66ec88fSEmmanuel Vadot #define CLK_APB1_CAN		83
113*c66ec88fSEmmanuel Vadot #define CLK_APB1_SCR		84
114*c66ec88fSEmmanuel Vadot #define CLK_APB1_PS20		85
115*c66ec88fSEmmanuel Vadot #define CLK_APB1_PS21		86
116*c66ec88fSEmmanuel Vadot #define CLK_APB1_I2C4		87
117*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART0		88
118*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART1		89
119*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART2		90
120*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART3		91
121*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART4		92
122*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART5		93
123*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART6		94
124*c66ec88fSEmmanuel Vadot #define CLK_APB1_UART7		95
125*c66ec88fSEmmanuel Vadot 
126*c66ec88fSEmmanuel Vadot /* IP clocks */
127*c66ec88fSEmmanuel Vadot #define CLK_NAND		96
128*c66ec88fSEmmanuel Vadot #define CLK_MS			97
129*c66ec88fSEmmanuel Vadot #define CLK_MMC0		98
130*c66ec88fSEmmanuel Vadot #define CLK_MMC0_OUTPUT		99
131*c66ec88fSEmmanuel Vadot #define CLK_MMC0_SAMPLE		100
132*c66ec88fSEmmanuel Vadot #define CLK_MMC1		101
133*c66ec88fSEmmanuel Vadot #define CLK_MMC1_OUTPUT		102
134*c66ec88fSEmmanuel Vadot #define CLK_MMC1_SAMPLE		103
135*c66ec88fSEmmanuel Vadot #define CLK_MMC2		104
136*c66ec88fSEmmanuel Vadot #define CLK_MMC2_OUTPUT		105
137*c66ec88fSEmmanuel Vadot #define CLK_MMC2_SAMPLE		106
138*c66ec88fSEmmanuel Vadot #define CLK_MMC3		107
139*c66ec88fSEmmanuel Vadot #define CLK_MMC3_OUTPUT		108
140*c66ec88fSEmmanuel Vadot #define CLK_MMC3_SAMPLE		109
141*c66ec88fSEmmanuel Vadot #define CLK_TS			110
142*c66ec88fSEmmanuel Vadot #define CLK_SS			111
143*c66ec88fSEmmanuel Vadot #define CLK_SPI0		112
144*c66ec88fSEmmanuel Vadot #define CLK_SPI1		113
145*c66ec88fSEmmanuel Vadot #define CLK_SPI2		114
146*c66ec88fSEmmanuel Vadot #define CLK_PATA		115
147*c66ec88fSEmmanuel Vadot #define CLK_IR0			116
148*c66ec88fSEmmanuel Vadot #define CLK_IR1			117
149*c66ec88fSEmmanuel Vadot #define CLK_I2S0		118
150*c66ec88fSEmmanuel Vadot #define CLK_AC97		119
151*c66ec88fSEmmanuel Vadot #define CLK_SPDIF		120
152*c66ec88fSEmmanuel Vadot #define CLK_KEYPAD		121
153*c66ec88fSEmmanuel Vadot #define CLK_SATA		122
154*c66ec88fSEmmanuel Vadot #define CLK_USB_OHCI0		123
155*c66ec88fSEmmanuel Vadot #define CLK_USB_OHCI1		124
156*c66ec88fSEmmanuel Vadot #define CLK_USB_PHY		125
157*c66ec88fSEmmanuel Vadot #define CLK_GPS			126
158*c66ec88fSEmmanuel Vadot #define CLK_SPI3		127
159*c66ec88fSEmmanuel Vadot #define CLK_I2S1		128
160*c66ec88fSEmmanuel Vadot #define CLK_I2S2		129
161*c66ec88fSEmmanuel Vadot 
162*c66ec88fSEmmanuel Vadot /* DRAM Gates */
163*c66ec88fSEmmanuel Vadot #define CLK_DRAM_VE		130
164*c66ec88fSEmmanuel Vadot #define CLK_DRAM_CSI0		131
165*c66ec88fSEmmanuel Vadot #define CLK_DRAM_CSI1		132
166*c66ec88fSEmmanuel Vadot #define CLK_DRAM_TS		133
167*c66ec88fSEmmanuel Vadot #define CLK_DRAM_TVD		134
168*c66ec88fSEmmanuel Vadot #define CLK_DRAM_TVE0		135
169*c66ec88fSEmmanuel Vadot #define CLK_DRAM_TVE1		136
170*c66ec88fSEmmanuel Vadot #define CLK_DRAM_OUT		137
171*c66ec88fSEmmanuel Vadot #define CLK_DRAM_DE_FE1		138
172*c66ec88fSEmmanuel Vadot #define CLK_DRAM_DE_FE0		139
173*c66ec88fSEmmanuel Vadot #define CLK_DRAM_DE_BE0		140
174*c66ec88fSEmmanuel Vadot #define CLK_DRAM_DE_BE1		141
175*c66ec88fSEmmanuel Vadot #define CLK_DRAM_MP		142
176*c66ec88fSEmmanuel Vadot #define CLK_DRAM_ACE		143
177*c66ec88fSEmmanuel Vadot 
178*c66ec88fSEmmanuel Vadot /* Display Engine Clocks */
179*c66ec88fSEmmanuel Vadot #define CLK_DE_BE0		144
180*c66ec88fSEmmanuel Vadot #define CLK_DE_BE1		145
181*c66ec88fSEmmanuel Vadot #define CLK_DE_FE0		146
182*c66ec88fSEmmanuel Vadot #define CLK_DE_FE1		147
183*c66ec88fSEmmanuel Vadot #define CLK_DE_MP		148
184*c66ec88fSEmmanuel Vadot #define CLK_TCON0_CH0		149
185*c66ec88fSEmmanuel Vadot #define CLK_TCON1_CH0		150
186*c66ec88fSEmmanuel Vadot #define CLK_CSI_SCLK		151
187*c66ec88fSEmmanuel Vadot #define CLK_TVD_SCLK2		152
188*c66ec88fSEmmanuel Vadot #define CLK_TVD			153
189*c66ec88fSEmmanuel Vadot #define CLK_TCON0_CH1_SCLK2	154
190*c66ec88fSEmmanuel Vadot #define CLK_TCON0_CH1		155
191*c66ec88fSEmmanuel Vadot #define CLK_TCON1_CH1_SCLK2	156
192*c66ec88fSEmmanuel Vadot #define CLK_TCON1_CH1		157
193*c66ec88fSEmmanuel Vadot #define CLK_CSI0		158
194*c66ec88fSEmmanuel Vadot #define CLK_CSI1		159
195*c66ec88fSEmmanuel Vadot #define CLK_CODEC		160
196*c66ec88fSEmmanuel Vadot #define CLK_VE			161
197*c66ec88fSEmmanuel Vadot #define CLK_AVS			162
198*c66ec88fSEmmanuel Vadot #define CLK_ACE			163
199*c66ec88fSEmmanuel Vadot #define CLK_HDMI		164
200*c66ec88fSEmmanuel Vadot #define CLK_GPU			165
201*c66ec88fSEmmanuel Vadot 
202*c66ec88fSEmmanuel Vadot #endif /* _DT_BINDINGS_CLK_SUN4I_A10_H_ */
203