xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-mx7ulp/pcc.h (revision 02ccab1908c405fe1449457d4a0d343784a30acb)
1*d0f8516dSPeng Fan /*
2*d0f8516dSPeng Fan  * Copyright (C) 2016 Freescale Semiconductor, Inc.
3*d0f8516dSPeng Fan  *
4*d0f8516dSPeng Fan  * SPDX-License-Identifier:	GPL-2.0+
5*d0f8516dSPeng Fan  */
6*d0f8516dSPeng Fan 
7*d0f8516dSPeng Fan #ifndef _ASM_ARCH_PCC_H
8*d0f8516dSPeng Fan #define _ASM_ARCH_PCC_H
9*d0f8516dSPeng Fan 
10*d0f8516dSPeng Fan #include <common.h>
11*d0f8516dSPeng Fan #include <asm/arch/scg.h>
12*d0f8516dSPeng Fan 
13*d0f8516dSPeng Fan /* PCC2 */
14*d0f8516dSPeng Fan 
15*d0f8516dSPeng Fan enum pcc2_entry {
16*d0f8516dSPeng Fan 	/* On-Platform (32 entries) */
17*d0f8516dSPeng Fan 	RSVD0_PCC2_SLOT			= 0,
18*d0f8516dSPeng Fan 	RSVD1_PCC2_SLOT			= 1,
19*d0f8516dSPeng Fan 	CA7_GIC_PCC2_SLOT		= 2,
20*d0f8516dSPeng Fan 	RSVD3_PCC2_SLOT			= 3,
21*d0f8516dSPeng Fan 	RSVD4_PCC2_SLOT			= 4,
22*d0f8516dSPeng Fan 	RSVD5_PCC2_SLOT			= 5,
23*d0f8516dSPeng Fan 	RSVD6_PCC2_SLOT			= 6,
24*d0f8516dSPeng Fan 	RSVD7_PCC2_SLOT			= 7,
25*d0f8516dSPeng Fan 	DMA1_PCC2_SLOT			= 8,
26*d0f8516dSPeng Fan 	RSVD9_PCC2_SLOT			= 9,
27*d0f8516dSPeng Fan 	RSVD10_PCC2_SLOT		= 10,
28*d0f8516dSPeng Fan 	RSVD11_PCC2_SLOT		= 11,
29*d0f8516dSPeng Fan 	RSVD12_PCC2_SLOT		= 12,
30*d0f8516dSPeng Fan 	RSVD13_PCC2_SLOT		= 13,
31*d0f8516dSPeng Fan 	RSVD14_PCC2_SLOT		= 14,
32*d0f8516dSPeng Fan 	RGPIO1_PCC2_SLOT		= 15,
33*d0f8516dSPeng Fan 	FLEXBUS0_PCC2_SLOT		= 16,
34*d0f8516dSPeng Fan 	RSVD17_PCC2_SLOT		= 17,
35*d0f8516dSPeng Fan 	RSVD18_PCC2_SLOT		= 18,
36*d0f8516dSPeng Fan 	RSVD19_PCC2_SLOT		= 19,
37*d0f8516dSPeng Fan 	RSVD20_PCC2_SLOT		= 20,
38*d0f8516dSPeng Fan 	RSVD21_PCC2_SLOT		= 21,
39*d0f8516dSPeng Fan 	RSVD22_PCC2_SLOT		= 22,
40*d0f8516dSPeng Fan 	RSVD23_PCC2_SLOT		= 23,
41*d0f8516dSPeng Fan 	RSVD24_PCC2_SLOT		= 24,
42*d0f8516dSPeng Fan 	RSVD25_PCC2_SLOT		= 25,
43*d0f8516dSPeng Fan 	RSVD26_PCC2_SLOT		= 26,
44*d0f8516dSPeng Fan 	SEMA42_1_PCC2_SLOT		= 27,
45*d0f8516dSPeng Fan 	RSVD28_PCC2_SLOT		= 28,
46*d0f8516dSPeng Fan 	RSVD29_PCC2_SLOT		= 29,
47*d0f8516dSPeng Fan 	RSVD30_PCC2_SLOT		= 30,
48*d0f8516dSPeng Fan 	RSVD31_PCC2_SLOT		= 31,
49*d0f8516dSPeng Fan 
50*d0f8516dSPeng Fan 	/* Off-Platform (96 entries) */
51*d0f8516dSPeng Fan 	RSVD32_PCC2_SLOT		= 32,
52*d0f8516dSPeng Fan 	DMA1_CH_MUX0_PCC2_SLOT		= 33,
53*d0f8516dSPeng Fan 	MU_B_PCC2_SLOT			= 34,
54*d0f8516dSPeng Fan 	SNVS_PCC2_SLOT			= 35,
55*d0f8516dSPeng Fan 	CAAM_PCC2_SLOT			= 36,
56*d0f8516dSPeng Fan 	LPTPM4_PCC2_SLOT		= 37,
57*d0f8516dSPeng Fan 	LPTPM5_PCC2_SLOT		= 38,
58*d0f8516dSPeng Fan 	LPIT1_PCC2_SLOT			= 39,
59*d0f8516dSPeng Fan 	RSVD40_PCC2_SLOT		= 40,
60*d0f8516dSPeng Fan 	LPSPI2_PCC2_SLOT		= 41,
61*d0f8516dSPeng Fan 	LPSPI3_PCC2_SLOT		= 42,
62*d0f8516dSPeng Fan 	LPI2C4_PCC2_SLOT		= 43,
63*d0f8516dSPeng Fan 	LPI2C5_PCC2_SLOT		= 44,
64*d0f8516dSPeng Fan 	LPUART4_PCC2_SLOT		= 45,
65*d0f8516dSPeng Fan 	LPUART5_PCC2_SLOT		= 46,
66*d0f8516dSPeng Fan 	RSVD47_PCC2_SLOT		= 47,
67*d0f8516dSPeng Fan 	RSVD48_PCC2_SLOT		= 48,
68*d0f8516dSPeng Fan 	FLEXIO1_PCC2_SLOT		= 49,
69*d0f8516dSPeng Fan 	RSVD50_PCC2_SLOT		= 50,
70*d0f8516dSPeng Fan 	USBOTG0_PCC2_SLOT		= 51,
71*d0f8516dSPeng Fan 	USBOTG1_PCC2_SLOT		= 52,
72*d0f8516dSPeng Fan 	USBPHY_PCC2_SLOT		= 53,
73*d0f8516dSPeng Fan 	USB_PL301_PCC2_SLOT		= 54,
74*d0f8516dSPeng Fan 	USDHC0_PCC2_SLOT		= 55,
75*d0f8516dSPeng Fan 	USDHC1_PCC2_SLOT		= 56,
76*d0f8516dSPeng Fan 	RSVD57_PCC2_SLOT		= 57,
77*d0f8516dSPeng Fan 	TRGMUX1_PCC2_SLOT		= 58,
78*d0f8516dSPeng Fan 	RSVD59_PCC2_SLOT		= 59,
79*d0f8516dSPeng Fan 	RSVD60_PCC2_SLOT		= 60,
80*d0f8516dSPeng Fan 	WDG1_PCC2_SLOT			= 61,
81*d0f8516dSPeng Fan 	SCG1_PCC2_SLOT			= 62,
82*d0f8516dSPeng Fan 	PCC2_PCC2_SLOT			= 63,
83*d0f8516dSPeng Fan 	PMC1_PCC2_SLOT			= 64,
84*d0f8516dSPeng Fan 	SMC1_PCC2_SLOT			= 65,
85*d0f8516dSPeng Fan 	RCM1_PCC2_SLOT			= 66,
86*d0f8516dSPeng Fan 	WDG2_PCC2_SLOT			= 67,
87*d0f8516dSPeng Fan 	RSVD68_PCC2_SLOT		= 68,
88*d0f8516dSPeng Fan 	TEST_SPACE1_PCC2_SLOT		= 69,
89*d0f8516dSPeng Fan 	TEST_SPACE2_PCC2_SLOT		= 70,
90*d0f8516dSPeng Fan 	TEST_SPACE3_PCC2_SLOT		= 71,
91*d0f8516dSPeng Fan 	RSVD72_PCC2_SLOT		= 72,
92*d0f8516dSPeng Fan 	RSVD73_PCC2_SLOT		= 73,
93*d0f8516dSPeng Fan 	RSVD74_PCC2_SLOT		= 74,
94*d0f8516dSPeng Fan 	RSVD75_PCC2_SLOT		= 75,
95*d0f8516dSPeng Fan 	RSVD76_PCC2_SLOT		= 76,
96*d0f8516dSPeng Fan 	RSVD77_PCC2_SLOT		= 77,
97*d0f8516dSPeng Fan 	RSVD78_PCC2_SLOT		= 78,
98*d0f8516dSPeng Fan 	RSVD79_PCC2_SLOT		= 79,
99*d0f8516dSPeng Fan 	RSVD80_PCC2_SLOT		= 80,
100*d0f8516dSPeng Fan 	RSVD81_PCC2_SLOT		= 81,
101*d0f8516dSPeng Fan 	RSVD82_PCC2_SLOT		= 82,
102*d0f8516dSPeng Fan 	RSVD83_PCC2_SLOT		= 83,
103*d0f8516dSPeng Fan 	RSVD84_PCC2_SLOT		= 84,
104*d0f8516dSPeng Fan 	RSVD85_PCC2_SLOT		= 85,
105*d0f8516dSPeng Fan 	RSVD86_PCC2_SLOT		= 86,
106*d0f8516dSPeng Fan 	RSVD87_PCC2_SLOT		= 87,
107*d0f8516dSPeng Fan 	RSVD88_PCC2_SLOT		= 88,
108*d0f8516dSPeng Fan 	RSVD89_PCC2_SLOT		= 89,
109*d0f8516dSPeng Fan 	RSVD90_PCC2_SLOT		= 90,
110*d0f8516dSPeng Fan 	RSVD91_PCC2_SLOT		= 91,
111*d0f8516dSPeng Fan 	RSVD92_PCC2_SLOT		= 92,
112*d0f8516dSPeng Fan 	RSVD93_PCC2_SLOT		= 93,
113*d0f8516dSPeng Fan 	RSVD94_PCC2_SLOT		= 94,
114*d0f8516dSPeng Fan 	RSVD95_PCC2_SLOT		= 95,
115*d0f8516dSPeng Fan 	RSVD96_PCC2_SLOT		= 96,
116*d0f8516dSPeng Fan 	RSVD97_PCC2_SLOT		= 97,
117*d0f8516dSPeng Fan 	RSVD98_PCC2_SLOT		= 98,
118*d0f8516dSPeng Fan 	RSVD99_PCC2_SLOT		= 99,
119*d0f8516dSPeng Fan 	RSVD100_PCC2_SLOT		= 100,
120*d0f8516dSPeng Fan 	RSVD101_PCC2_SLOT		= 101,
121*d0f8516dSPeng Fan 	RSVD102_PCC2_SLOT		= 102,
122*d0f8516dSPeng Fan 	RSVD103_PCC2_SLOT		= 103,
123*d0f8516dSPeng Fan 	RSVD104_PCC2_SLOT		= 104,
124*d0f8516dSPeng Fan 	RSVD105_PCC2_SLOT		= 105,
125*d0f8516dSPeng Fan 	RSVD106_PCC2_SLOT		= 106,
126*d0f8516dSPeng Fan 	RSVD107_PCC2_SLOT		= 107,
127*d0f8516dSPeng Fan 	RSVD108_PCC2_SLOT		= 108,
128*d0f8516dSPeng Fan 	RSVD109_PCC2_SLOT		= 109,
129*d0f8516dSPeng Fan 	RSVD110_PCC2_SLOT		= 110,
130*d0f8516dSPeng Fan 	RSVD111_PCC2_SLOT		= 111,
131*d0f8516dSPeng Fan 	RSVD112_PCC2_SLOT		= 112,
132*d0f8516dSPeng Fan 	RSVD113_PCC2_SLOT		= 113,
133*d0f8516dSPeng Fan 	RSVD114_PCC2_SLOT		= 114,
134*d0f8516dSPeng Fan 	RSVD115_PCC2_SLOT		= 115,
135*d0f8516dSPeng Fan 	RSVD116_PCC2_SLOT		= 116,
136*d0f8516dSPeng Fan 	RSVD117_PCC2_SLOT		= 117,
137*d0f8516dSPeng Fan 	RSVD118_PCC2_SLOT		= 118,
138*d0f8516dSPeng Fan 	RSVD119_PCC2_SLOT		= 119,
139*d0f8516dSPeng Fan 	RSVD120_PCC2_SLOT		= 120,
140*d0f8516dSPeng Fan 	RSVD121_PCC2_SLOT		= 121,
141*d0f8516dSPeng Fan 	RSVD122_PCC2_SLOT		= 122,
142*d0f8516dSPeng Fan 	RSVD123_PCC2_SLOT		= 123,
143*d0f8516dSPeng Fan 	RSVD124_PCC2_SLOT		= 124,
144*d0f8516dSPeng Fan 	RSVD125_PCC2_SLOT		= 125,
145*d0f8516dSPeng Fan 	RSVD126_PCC2_SLOT		= 126,
146*d0f8516dSPeng Fan 	RSVD127_PCC2_SLOT		= 127,
147*d0f8516dSPeng Fan };
148*d0f8516dSPeng Fan 
149*d0f8516dSPeng Fan enum pcc3_entry {
150*d0f8516dSPeng Fan 	/* On-Platform (32 entries) */
151*d0f8516dSPeng Fan 	RSVD0_PCC3_SLOT			= 0,
152*d0f8516dSPeng Fan 	RSVD1_PCC3_SLOT			= 1,
153*d0f8516dSPeng Fan 	RSVD2_PCC3_SLOT			= 2,
154*d0f8516dSPeng Fan 	RSVD3_PCC3_SLOT			= 3,
155*d0f8516dSPeng Fan 	RSVD4_PCC3_SLOT			= 4,
156*d0f8516dSPeng Fan 	RSVD5_PCC3_SLOT			= 5,
157*d0f8516dSPeng Fan 	RSVD6_PCC3_SLOT			= 6,
158*d0f8516dSPeng Fan 	RSVD7_PCC3_SLOT			= 7,
159*d0f8516dSPeng Fan 	RSVD8_PCC3_SLOT			= 8,
160*d0f8516dSPeng Fan 	RSVD9_PCC3_SLOT			= 9,
161*d0f8516dSPeng Fan 	RSVD10_PCC3_SLOT		= 10,
162*d0f8516dSPeng Fan 	RSVD11_PCC3_SLOT		= 11,
163*d0f8516dSPeng Fan 	RSVD12_PCC3_SLOT		= 12,
164*d0f8516dSPeng Fan 	RSVD13_PCC3_SLOT		= 13,
165*d0f8516dSPeng Fan 	RSVD14_PCC3_SLOT		= 14,
166*d0f8516dSPeng Fan 	RSVD15_PCC3_SLOT		= 15,
167*d0f8516dSPeng Fan 	ROMCP1_PCC3_SLOT		= 16,
168*d0f8516dSPeng Fan 	RSVD17_PCC3_SLOT		= 17,
169*d0f8516dSPeng Fan 	RSVD18_PCC3_SLOT		= 18,
170*d0f8516dSPeng Fan 	RSVD19_PCC3_SLOT		= 19,
171*d0f8516dSPeng Fan 	RSVD20_PCC3_SLOT		= 20,
172*d0f8516dSPeng Fan 	RSVD21_PCC3_SLOT		= 21,
173*d0f8516dSPeng Fan 	RSVD22_PCC3_SLOT		= 22,
174*d0f8516dSPeng Fan 	RSVD23_PCC3_SLOT		= 23,
175*d0f8516dSPeng Fan 	RSVD24_PCC3_SLOT		= 24,
176*d0f8516dSPeng Fan 	RSVD25_PCC3_SLOT		= 25,
177*d0f8516dSPeng Fan 	RSVD26_PCC3_SLOT		= 26,
178*d0f8516dSPeng Fan 	RSVD27_PCC3_SLOT		= 27,
179*d0f8516dSPeng Fan 	RSVD28_PCC3_SLOT		= 28,
180*d0f8516dSPeng Fan 	RSVD29_PCC3_SLOT		= 29,
181*d0f8516dSPeng Fan 	RSVD30_PCC3_SLOT		= 30,
182*d0f8516dSPeng Fan 	RSVD31_PCC3_SLOT		= 31,
183*d0f8516dSPeng Fan 
184*d0f8516dSPeng Fan 	/* Off-Platform (96 entries) */
185*d0f8516dSPeng Fan 	RSVD32_PCC3_SLOT		= 32,
186*d0f8516dSPeng Fan 	LPTPM6_PCC3_SLOT		= 33,
187*d0f8516dSPeng Fan 	LPTPM7_PCC3_SLOT		= 34,
188*d0f8516dSPeng Fan 	RSVD35_PCC3_SLOT		= 35,
189*d0f8516dSPeng Fan 	LPI2C6_PCC3_SLOT		= 36,
190*d0f8516dSPeng Fan 	LPI2C7_PCC3_SLOT		= 37,
191*d0f8516dSPeng Fan 	LPUART6_PCC3_SLOT		= 38,
192*d0f8516dSPeng Fan 	LPUART7_PCC3_SLOT		= 39,
193*d0f8516dSPeng Fan 	VIU0_PCC3_SLOT			= 40,
194*d0f8516dSPeng Fan 	DSI0_PCC3_SLOT			= 41,
195*d0f8516dSPeng Fan 	LCDIF0_PCC3_SLOT		= 42,
196*d0f8516dSPeng Fan 	MMDC0_PCC3_SLOT			= 43,
197*d0f8516dSPeng Fan 	IOMUXC1_PCC3_SLOT		= 44,
198*d0f8516dSPeng Fan 	IOMUXC_DDR_PCC3_SLOT		= 45,
199*d0f8516dSPeng Fan 	PORTC_PCC3_SLOT			= 46,
200*d0f8516dSPeng Fan 	PORTD_PCC3_SLOT			= 47,
201*d0f8516dSPeng Fan 	PORTE_PCC3_SLOT			= 48,
202*d0f8516dSPeng Fan 	PORTF_PCC3_SLOT			= 49,
203*d0f8516dSPeng Fan 	RSVD50_PCC3_SLOT		= 50,
204*d0f8516dSPeng Fan 	PCC3_PCC3_SLOT			= 51,
205*d0f8516dSPeng Fan 	RSVD52_PCC3_SLOT		= 52,
206*d0f8516dSPeng Fan 	WKPU_PCC3_SLOT			= 53,
207*d0f8516dSPeng Fan 	RSVD54_PCC3_SLOT		= 54,
208*d0f8516dSPeng Fan 	RSVD55_PCC3_SLOT		= 55,
209*d0f8516dSPeng Fan 	RSVD56_PCC3_SLOT		= 56,
210*d0f8516dSPeng Fan 	RSVD57_PCC3_SLOT		= 57,
211*d0f8516dSPeng Fan 	RSVD58_PCC3_SLOT		= 58,
212*d0f8516dSPeng Fan 	RSVD59_PCC3_SLOT		= 59,
213*d0f8516dSPeng Fan 	RSVD60_PCC3_SLOT		= 60,
214*d0f8516dSPeng Fan 	RSVD61_PCC3_SLOT		= 61,
215*d0f8516dSPeng Fan 	RSVD62_PCC3_SLOT		= 62,
216*d0f8516dSPeng Fan 	RSVD63_PCC3_SLOT		= 63,
217*d0f8516dSPeng Fan 	RSVD64_PCC3_SLOT		= 64,
218*d0f8516dSPeng Fan 	RSVD65_PCC3_SLOT		= 65,
219*d0f8516dSPeng Fan 	RSVD66_PCC3_SLOT		= 66,
220*d0f8516dSPeng Fan 	RSVD67_PCC3_SLOT		= 67,
221*d0f8516dSPeng Fan 	RSVD68_PCC3_SLOT		= 68,
222*d0f8516dSPeng Fan 	RSVD69_PCC3_SLOT		= 69,
223*d0f8516dSPeng Fan 	RSVD70_PCC3_SLOT		= 70,
224*d0f8516dSPeng Fan 	RSVD71_PCC3_SLOT		= 71,
225*d0f8516dSPeng Fan 	RSVD72_PCC3_SLOT		= 72,
226*d0f8516dSPeng Fan 	RSVD73_PCC3_SLOT		= 73,
227*d0f8516dSPeng Fan 	RSVD74_PCC3_SLOT		= 74,
228*d0f8516dSPeng Fan 	RSVD75_PCC3_SLOT		= 75,
229*d0f8516dSPeng Fan 	RSVD76_PCC3_SLOT		= 76,
230*d0f8516dSPeng Fan 	RSVD77_PCC3_SLOT		= 77,
231*d0f8516dSPeng Fan 	RSVD78_PCC3_SLOT		= 78,
232*d0f8516dSPeng Fan 	RSVD79_PCC3_SLOT		= 79,
233*d0f8516dSPeng Fan 	RSVD80_PCC3_SLOT		= 80,
234*d0f8516dSPeng Fan 	GPU3D_PCC3_SLOT			= 81,
235*d0f8516dSPeng Fan 	GPU2D_PCC3_SLOT			= 82,
236*d0f8516dSPeng Fan 	RSVD83_PCC3_SLOT		= 83,
237*d0f8516dSPeng Fan 	RSVD84_PCC3_SLOT		= 84,
238*d0f8516dSPeng Fan 	RSVD85_PCC3_SLOT		= 85,
239*d0f8516dSPeng Fan 	RSVD86_PCC3_SLOT		= 86,
240*d0f8516dSPeng Fan 	RSVD87_PCC3_SLOT		= 87,
241*d0f8516dSPeng Fan 	RSVD88_PCC3_SLOT		= 88,
242*d0f8516dSPeng Fan 	RSVD89_PCC3_SLOT		= 89,
243*d0f8516dSPeng Fan 	RSVD90_PCC3_SLOT		= 90,
244*d0f8516dSPeng Fan 	RSVD91_PCC3_SLOT		= 91,
245*d0f8516dSPeng Fan 	RSVD92_PCC3_SLOT		= 92,
246*d0f8516dSPeng Fan 	RSVD93_PCC3_SLOT		= 93,
247*d0f8516dSPeng Fan 	RSVD94_PCC3_SLOT		= 94,
248*d0f8516dSPeng Fan 	RSVD95_PCC3_SLOT		= 95,
249*d0f8516dSPeng Fan 	RSVD96_PCC3_SLOT		= 96,
250*d0f8516dSPeng Fan 	RSVD97_PCC3_SLOT		= 97,
251*d0f8516dSPeng Fan 	RSVD98_PCC3_SLOT		= 98,
252*d0f8516dSPeng Fan 	RSVD99_PCC3_SLOT		= 99,
253*d0f8516dSPeng Fan 	RSVD100_PCC3_SLOT		= 100,
254*d0f8516dSPeng Fan 	RSVD101_PCC3_SLOT		= 101,
255*d0f8516dSPeng Fan 	RSVD102_PCC3_SLOT		= 102,
256*d0f8516dSPeng Fan 	RSVD103_PCC3_SLOT		= 103,
257*d0f8516dSPeng Fan 	RSVD104_PCC3_SLOT		= 104,
258*d0f8516dSPeng Fan 	RSVD105_PCC3_SLOT		= 105,
259*d0f8516dSPeng Fan 	RSVD106_PCC3_SLOT		= 106,
260*d0f8516dSPeng Fan 	RSVD107_PCC3_SLOT		= 107,
261*d0f8516dSPeng Fan 	RSVD108_PCC3_SLOT		= 108,
262*d0f8516dSPeng Fan 	RSVD109_PCC3_SLOT		= 109,
263*d0f8516dSPeng Fan 	RSVD110_PCC3_SLOT		= 110,
264*d0f8516dSPeng Fan 	RSVD111_PCC3_SLOT		= 111,
265*d0f8516dSPeng Fan 	RSVD112_PCC3_SLOT		= 112,
266*d0f8516dSPeng Fan 	RSVD113_PCC3_SLOT		= 113,
267*d0f8516dSPeng Fan 	RSVD114_PCC3_SLOT		= 114,
268*d0f8516dSPeng Fan 	RSVD115_PCC3_SLOT		= 115,
269*d0f8516dSPeng Fan 	RSVD116_PCC3_SLOT		= 116,
270*d0f8516dSPeng Fan 	RSVD117_PCC3_SLOT		= 117,
271*d0f8516dSPeng Fan 	RSVD118_PCC3_SLOT		= 118,
272*d0f8516dSPeng Fan 	RSVD119_PCC3_SLOT		= 119,
273*d0f8516dSPeng Fan 	RSVD120_PCC3_SLOT		= 120,
274*d0f8516dSPeng Fan 	RSVD121_PCC3_SLOT		= 121,
275*d0f8516dSPeng Fan 	RSVD122_PCC3_SLOT		= 122,
276*d0f8516dSPeng Fan 	RSVD123_PCC3_SLOT		= 123,
277*d0f8516dSPeng Fan 	RSVD124_PCC3_SLOT		= 124,
278*d0f8516dSPeng Fan 	RSVD125_PCC3_SLOT		= 125,
279*d0f8516dSPeng Fan 	RSVD126_PCC3_SLOT		= 126,
280*d0f8516dSPeng Fan 	RSVD127_PCC3_SLOT		= 127,
281*d0f8516dSPeng Fan };
282*d0f8516dSPeng Fan 
283*d0f8516dSPeng Fan 
284*d0f8516dSPeng Fan /* PCC registers */
285*d0f8516dSPeng Fan #define PCC_PR_OFFSET	31
286*d0f8516dSPeng Fan #define PCC_PR_MASK		(0x1 << PCC_PR_OFFSET)
287*d0f8516dSPeng Fan #define PCC_CGC_OFFSET	30
288*d0f8516dSPeng Fan #define PCC_CGC_MASK	(0x1 << PCC_CGC_OFFSET)
289*d0f8516dSPeng Fan #define PCC_INUSE_OFFSET	29
290*d0f8516dSPeng Fan #define PCC_INUSE_MASK		(0x1 << PCC_INUSE_OFFSET)
291*d0f8516dSPeng Fan #define PCC_PCS_OFFSET	24
292*d0f8516dSPeng Fan #define PCC_PCS_MASK	(0x7 << PCC_PCS_OFFSET)
293*d0f8516dSPeng Fan #define PCC_FRAC_OFFSET	4
294*d0f8516dSPeng Fan #define PCC_FRAC_MASK	(0x1 << PCC_FRAC_OFFSET)
295*d0f8516dSPeng Fan #define PCC_PCD_OFFSET	0
296*d0f8516dSPeng Fan #define PCC_PCD_MASK	(0xf << PCC_PCD_OFFSET)
297*d0f8516dSPeng Fan 
298*d0f8516dSPeng Fan 
299*d0f8516dSPeng Fan enum pcc_clksrc_type {
300*d0f8516dSPeng Fan 	CLKSRC_PER_PLAT = 0,
301*d0f8516dSPeng Fan 	CLKSRC_PER_BUS = 1,
302*d0f8516dSPeng Fan 	CLKSRC_NO_PCS = 2,
303*d0f8516dSPeng Fan };
304*d0f8516dSPeng Fan 
305*d0f8516dSPeng Fan enum pcc_div_type {
306*d0f8516dSPeng Fan 	PCC_HAS_DIV,
307*d0f8516dSPeng Fan 	PCC_NO_DIV,
308*d0f8516dSPeng Fan };
309*d0f8516dSPeng Fan 
310*d0f8516dSPeng Fan /* All peripheral clocks on A7 PCCs */
311*d0f8516dSPeng Fan enum pcc_clk {
312*d0f8516dSPeng Fan 	/*PCC2 clocks*/
313*d0f8516dSPeng Fan 	PER_CLK_DMA1 = 0,
314*d0f8516dSPeng Fan 	PER_CLK_RGPIO2P1,
315*d0f8516dSPeng Fan 	PER_CLK_FLEXBUS,
316*d0f8516dSPeng Fan 	PER_CLK_SEMA42_1,
317*d0f8516dSPeng Fan 	PER_CLK_DMA_MUX1,
318*d0f8516dSPeng Fan 	PER_CLK_SNVS,
319*d0f8516dSPeng Fan 	PER_CLK_CAAM,
320*d0f8516dSPeng Fan 	PER_CLK_LPTPM4,
321*d0f8516dSPeng Fan 	PER_CLK_LPTPM5,
322*d0f8516dSPeng Fan 	PER_CLK_LPIT1,
323*d0f8516dSPeng Fan 	PER_CLK_LPSPI2,
324*d0f8516dSPeng Fan 	PER_CLK_LPSPI3,
325*d0f8516dSPeng Fan 	PER_CLK_LPI2C4,
326*d0f8516dSPeng Fan 	PER_CLK_LPI2C5,
327*d0f8516dSPeng Fan 	PER_CLK_LPUART4,
328*d0f8516dSPeng Fan 	PER_CLK_LPUART5,
329*d0f8516dSPeng Fan 	PER_CLK_FLEXIO1,
330*d0f8516dSPeng Fan 	PER_CLK_USB0,
331*d0f8516dSPeng Fan 	PER_CLK_USB1,
332*d0f8516dSPeng Fan 	PER_CLK_USB_PHY,
333*d0f8516dSPeng Fan 	PER_CLK_USB_PL301,
334*d0f8516dSPeng Fan 	PER_CLK_USDHC0,
335*d0f8516dSPeng Fan 	PER_CLK_USDHC1,
336*d0f8516dSPeng Fan 	PER_CLK_WDG1,
337*d0f8516dSPeng Fan 	PER_CLK_WDG2,
338*d0f8516dSPeng Fan 
339*d0f8516dSPeng Fan 	/*PCC3 clocks*/
340*d0f8516dSPeng Fan 	PER_CLK_LPTPM6,
341*d0f8516dSPeng Fan 	PER_CLK_LPTPM7,
342*d0f8516dSPeng Fan 	PER_CLK_LPI2C6,
343*d0f8516dSPeng Fan 	PER_CLK_LPI2C7,
344*d0f8516dSPeng Fan 	PER_CLK_LPUART6,
345*d0f8516dSPeng Fan 	PER_CLK_LPUART7,
346*d0f8516dSPeng Fan 	PER_CLK_VIU,
347*d0f8516dSPeng Fan 	PER_CLK_DSI,
348*d0f8516dSPeng Fan 	PER_CLK_LCDIF,
349*d0f8516dSPeng Fan 	PER_CLK_MMDC,
350*d0f8516dSPeng Fan 	PER_CLK_PCTLC,
351*d0f8516dSPeng Fan 	PER_CLK_PCTLD,
352*d0f8516dSPeng Fan 	PER_CLK_PCTLE,
353*d0f8516dSPeng Fan 	PER_CLK_PCTLF,
354*d0f8516dSPeng Fan 	PER_CLK_GPU3D,
355*d0f8516dSPeng Fan 	PER_CLK_GPU2D,
356*d0f8516dSPeng Fan };
357*d0f8516dSPeng Fan 
358*d0f8516dSPeng Fan 
359*d0f8516dSPeng Fan /* This structure keeps info for each pcc slot */
360*d0f8516dSPeng Fan struct pcc_entry {
361*d0f8516dSPeng Fan 	u32 pcc_base;
362*d0f8516dSPeng Fan 	u32 pcc_slot;
363*d0f8516dSPeng Fan 	enum pcc_clksrc_type clksrc;
364*d0f8516dSPeng Fan 	enum pcc_div_type div;
365*d0f8516dSPeng Fan };
366*d0f8516dSPeng Fan 
367*d0f8516dSPeng Fan int pcc_clock_enable(enum pcc_clk clk, bool enable);
368*d0f8516dSPeng Fan int pcc_clock_sel(enum pcc_clk clk, enum scg_clk src);
369*d0f8516dSPeng Fan int pcc_clock_div_config(enum pcc_clk clk, bool frac, u8 div);
370*d0f8516dSPeng Fan bool pcc_clock_is_enable(enum pcc_clk clk);
371*d0f8516dSPeng Fan int pcc_clock_get_clksrc(enum pcc_clk clk, enum scg_clk *src);
372*d0f8516dSPeng Fan u32 pcc_clock_get_rate(enum pcc_clk clk);
373*d0f8516dSPeng Fan #endif
374