xref: /linux/arch/arm/mach-omap2/cm-regbits-24xx.h (revision f38ca10a79a0cd9902b8a470901951354802faa1)
169d88a00SPaul Walmsley #ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
269d88a00SPaul Walmsley #define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
369d88a00SPaul Walmsley 
469d88a00SPaul Walmsley /*
569d88a00SPaul Walmsley  * OMAP24XX Clock Management register bits
669d88a00SPaul Walmsley  *
769d88a00SPaul Walmsley  * Copyright (C) 2007 Texas Instruments, Inc.
869d88a00SPaul Walmsley  * Copyright (C) 2007 Nokia Corporation
969d88a00SPaul Walmsley  *
1069d88a00SPaul Walmsley  * Written by Paul Walmsley
1169d88a00SPaul Walmsley  *
1269d88a00SPaul Walmsley  * This program is free software; you can redistribute it and/or modify
1369d88a00SPaul Walmsley  * it under the terms of the GNU General Public License version 2 as
1469d88a00SPaul Walmsley  * published by the Free Software Foundation.
1569d88a00SPaul Walmsley  */
1669d88a00SPaul Walmsley 
1769d88a00SPaul Walmsley #include "cm.h"
1869d88a00SPaul Walmsley 
1969d88a00SPaul Walmsley /* Bits shared between registers */
2069d88a00SPaul Walmsley 
2169d88a00SPaul Walmsley /* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
2269d88a00SPaul Walmsley #define OMAP24XX_EN_CAM_SHIFT				31
23*f38ca10aSPaul Walmsley #define OMAP24XX_EN_CAM_MASK				(1 << 31)
2469d88a00SPaul Walmsley #define OMAP24XX_EN_WDT4_SHIFT				29
25*f38ca10aSPaul Walmsley #define OMAP24XX_EN_WDT4_MASK				(1 << 29)
2669d88a00SPaul Walmsley #define OMAP2420_EN_WDT3_SHIFT				28
27*f38ca10aSPaul Walmsley #define OMAP2420_EN_WDT3_MASK				(1 << 28)
2869d88a00SPaul Walmsley #define OMAP24XX_EN_MSPRO_SHIFT				27
29*f38ca10aSPaul Walmsley #define OMAP24XX_EN_MSPRO_MASK				(1 << 27)
3069d88a00SPaul Walmsley #define OMAP24XX_EN_FAC_SHIFT				25
31*f38ca10aSPaul Walmsley #define OMAP24XX_EN_FAC_MASK				(1 << 25)
3269d88a00SPaul Walmsley #define OMAP2420_EN_EAC_SHIFT				24
33*f38ca10aSPaul Walmsley #define OMAP2420_EN_EAC_MASK				(1 << 24)
3469d88a00SPaul Walmsley #define OMAP24XX_EN_HDQ_SHIFT				23
35*f38ca10aSPaul Walmsley #define OMAP24XX_EN_HDQ_MASK				(1 << 23)
3669d88a00SPaul Walmsley #define OMAP2420_EN_I2C2_SHIFT				20
37*f38ca10aSPaul Walmsley #define OMAP2420_EN_I2C2_MASK				(1 << 20)
3869d88a00SPaul Walmsley #define OMAP2420_EN_I2C1_SHIFT				19
39*f38ca10aSPaul Walmsley #define OMAP2420_EN_I2C1_MASK				(1 << 19)
4069d88a00SPaul Walmsley 
4169d88a00SPaul Walmsley /* CM_FCLKEN2_CORE and CM_ICLKEN2_CORE shared bits */
4269d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP5_SHIFT			5
43*f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP5_MASK				(1 << 5)
4469d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP4_SHIFT			4
45*f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP4_MASK				(1 << 4)
4669d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP3_SHIFT			3
47*f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP3_MASK				(1 << 3)
4869d88a00SPaul Walmsley #define OMAP24XX_EN_SSI_SHIFT				1
49*f38ca10aSPaul Walmsley #define OMAP24XX_EN_SSI_MASK				(1 << 1)
5069d88a00SPaul Walmsley 
5169d88a00SPaul Walmsley /* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
5269d88a00SPaul Walmsley #define OMAP24XX_EN_MPU_WDT_SHIFT			3
53*f38ca10aSPaul Walmsley #define OMAP24XX_EN_MPU_WDT_MASK			(1 << 3)
5469d88a00SPaul Walmsley 
5569d88a00SPaul Walmsley /* Bits specific to each register */
5669d88a00SPaul Walmsley 
5769d88a00SPaul Walmsley /* CM_IDLEST_MPU */
5869d88a00SPaul Walmsley /* 2430 only */
59*f38ca10aSPaul Walmsley #define OMAP2430_ST_MPU_MASK				(1 << 0)
6069d88a00SPaul Walmsley 
6169d88a00SPaul Walmsley /* CM_CLKSEL_MPU */
6269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_MPU_SHIFT			0
6369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_MPU_MASK			(0x1f << 0)
6469d88a00SPaul Walmsley 
6569d88a00SPaul Walmsley /* CM_CLKSTCTRL_MPU */
66801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_MPU_SHIFT			0
67801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_MPU_MASK			(1 << 0)
6869d88a00SPaul Walmsley 
6969d88a00SPaul Walmsley /* CM_FCLKEN1_CORE specific bits*/
7069d88a00SPaul Walmsley #define OMAP24XX_EN_TV_SHIFT				2
71*f38ca10aSPaul Walmsley #define OMAP24XX_EN_TV_MASK				(1 << 2)
7269d88a00SPaul Walmsley #define OMAP24XX_EN_DSS2_SHIFT				1
73*f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS2_MASK				(1 << 1)
7469d88a00SPaul Walmsley #define OMAP24XX_EN_DSS1_SHIFT				0
75*f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS1_MASK				(1 << 0)
7669d88a00SPaul Walmsley 
7769d88a00SPaul Walmsley /* CM_FCLKEN2_CORE specific bits */
7869d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS2_SHIFT			20
79*f38ca10aSPaul Walmsley #define OMAP2430_EN_I2CHS2_MASK				(1 << 20)
8069d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS1_SHIFT			19
81*f38ca10aSPaul Walmsley #define OMAP2430_EN_I2CHS1_MASK				(1 << 19)
8269d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB2_SHIFT			17
83*f38ca10aSPaul Walmsley #define OMAP2430_EN_MMCHSDB2_MASK			(1 << 17)
8469d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB1_SHIFT			16
85*f38ca10aSPaul Walmsley #define OMAP2430_EN_MMCHSDB1_MASK			(1 << 16)
8669d88a00SPaul Walmsley 
8769d88a00SPaul Walmsley /* CM_ICLKEN1_CORE specific bits */
8869d88a00SPaul Walmsley #define OMAP24XX_EN_MAILBOXES_SHIFT			30
89*f38ca10aSPaul Walmsley #define OMAP24XX_EN_MAILBOXES_MASK			(1 << 30)
9069d88a00SPaul Walmsley #define OMAP24XX_EN_DSS_SHIFT				0
91*f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS_MASK				(1 << 0)
9269d88a00SPaul Walmsley 
9369d88a00SPaul Walmsley /* CM_ICLKEN2_CORE specific bits */
9469d88a00SPaul Walmsley 
9569d88a00SPaul Walmsley /* CM_ICLKEN3_CORE */
9669d88a00SPaul Walmsley /* 2430 only */
9769d88a00SPaul Walmsley #define OMAP2430_EN_SDRC_SHIFT				2
98*f38ca10aSPaul Walmsley #define OMAP2430_EN_SDRC_MASK				(1 << 2)
9969d88a00SPaul Walmsley 
10069d88a00SPaul Walmsley /* CM_ICLKEN4_CORE */
10169d88a00SPaul Walmsley #define OMAP24XX_EN_PKA_SHIFT				4
102*f38ca10aSPaul Walmsley #define OMAP24XX_EN_PKA_MASK				(1 << 4)
10369d88a00SPaul Walmsley #define OMAP24XX_EN_AES_SHIFT				3
104*f38ca10aSPaul Walmsley #define OMAP24XX_EN_AES_MASK				(1 << 3)
10569d88a00SPaul Walmsley #define OMAP24XX_EN_RNG_SHIFT				2
106*f38ca10aSPaul Walmsley #define OMAP24XX_EN_RNG_MASK				(1 << 2)
10769d88a00SPaul Walmsley #define OMAP24XX_EN_SHA_SHIFT				1
108*f38ca10aSPaul Walmsley #define OMAP24XX_EN_SHA_MASK				(1 << 1)
10969d88a00SPaul Walmsley #define OMAP24XX_EN_DES_SHIFT				0
110*f38ca10aSPaul Walmsley #define OMAP24XX_EN_DES_MASK				(1 << 0)
11169d88a00SPaul Walmsley 
11269d88a00SPaul Walmsley /* CM_IDLEST1_CORE specific bits */
113da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_SHIFT			30
114da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_MASK			(1 << 30)
115da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_SHIFT				29
116da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_MASK				(1 << 29)
117da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_SHIFT				28
118da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_MASK				(1 << 28)
119da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_SHIFT				27
120da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_MASK				(1 << 27)
121da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_SHIFT				25
122da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_MASK				(1 << 25)
123da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_SHIFT				24
124da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_MASK				(1 << 24)
125da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_SHIFT				23
126da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_MASK				(1 << 23)
127da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_SHIFT				20
128da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_MASK				(1 << 20)
129da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_SHIFT				19
130da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_MASK				(1 << 19)
131da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_SHIFT			16
132da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_MASK				(1 << 16)
133da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_SHIFT			15
134da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_MASK				(1 << 15)
135da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_SHIFT				0
136da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_MASK				(1 << 0)
13769d88a00SPaul Walmsley 
13869d88a00SPaul Walmsley /* CM_IDLEST2_CORE */
139da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_SHIFT			5
140da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_MASK				(1 << 5)
141da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_SHIFT			4
142da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_MASK				(1 << 4)
143da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_SHIFT			3
144da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_MASK				(1 << 3)
145da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_SHIFT				1
146da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_MASK				(1 << 1)
14769d88a00SPaul Walmsley 
14869d88a00SPaul Walmsley /* CM_IDLEST3_CORE */
14969d88a00SPaul Walmsley /* 2430 only */
150da0747d4SPaul Walmsley #define OMAP2430_ST_SDRC_MASK				(1 << 2)
15169d88a00SPaul Walmsley 
15269d88a00SPaul Walmsley /* CM_IDLEST4_CORE */
153da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_SHIFT				4
154da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_MASK				(1 << 4)
155da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_SHIFT				3
156da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_MASK				(1 << 3)
157da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_SHIFT				2
158da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_MASK				(1 << 2)
159da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_SHIFT				1
160da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_MASK				(1 << 1)
161da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_SHIFT				0
162da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_MASK				(1 << 0)
16369d88a00SPaul Walmsley 
16469d88a00SPaul Walmsley /* CM_AUTOIDLE1_CORE */
165*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_CAM_MASK				(1 << 31)
166*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MAILBOXES_MASK			(1 << 30)
167*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_WDT4_MASK				(1 << 29)
168*f38ca10aSPaul Walmsley #define OMAP2420_AUTO_WDT3_MASK				(1 << 28)
169*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MSPRO_MASK			(1 << 27)
170*f38ca10aSPaul Walmsley #define OMAP2420_AUTO_MMC_MASK				(1 << 26)
171*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_FAC_MASK				(1 << 25)
172*f38ca10aSPaul Walmsley #define OMAP2420_AUTO_EAC_MASK				(1 << 24)
173*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_HDQ_MASK				(1 << 23)
174*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART2_MASK			(1 << 22)
175*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART1_MASK			(1 << 21)
176*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_I2C2_MASK				(1 << 20)
177*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_I2C1_MASK				(1 << 19)
178*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCSPI2_MASK			(1 << 18)
179*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCSPI1_MASK			(1 << 17)
180*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCBSP2_MASK			(1 << 16)
181*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCBSP1_MASK			(1 << 15)
182*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT12_MASK			(1 << 14)
183*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT11_MASK			(1 << 13)
184*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT10_MASK			(1 << 12)
185*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT9_MASK				(1 << 11)
186*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT8_MASK				(1 << 10)
187*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT7_MASK				(1 << 9)
188*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT6_MASK				(1 << 8)
189*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT5_MASK				(1 << 7)
190*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT4_MASK				(1 << 6)
191*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT3_MASK				(1 << 5)
192*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT2_MASK				(1 << 4)
193*f38ca10aSPaul Walmsley #define OMAP2420_AUTO_VLYNQ_MASK			(1 << 3)
194*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_DSS_MASK				(1 << 0)
19569d88a00SPaul Walmsley 
19669d88a00SPaul Walmsley /* CM_AUTOIDLE2_CORE */
197*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MDM_INTC_MASK			(1 << 11)
198*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_GPIO5_MASK			(1 << 10)
199*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCSPI3_MASK			(1 << 9)
200*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MMCHS2_MASK			(1 << 8)
201*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MMCHS1_MASK			(1 << 7)
202*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_USBHS_MASK			(1 << 6)
203*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP5_MASK			(1 << 5)
204*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP4_MASK			(1 << 4)
205*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP3_MASK			(1 << 3)
206*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART3_MASK			(1 << 2)
207*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SSI_MASK				(1 << 1)
208*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_USB_MASK				(1 << 0)
20969d88a00SPaul Walmsley 
21069d88a00SPaul Walmsley /* CM_AUTOIDLE3_CORE */
211*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SDRC_MASK				(1 << 2)
212*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPMC_MASK				(1 << 1)
213*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SDMA_MASK				(1 << 0)
21469d88a00SPaul Walmsley 
21569d88a00SPaul Walmsley /* CM_AUTOIDLE4_CORE */
216*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_PKA_MASK				(1 << 4)
217*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_AES_MASK				(1 << 3)
218*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_RNG_MASK				(1 << 2)
219*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SHA_MASK				(1 << 1)
220*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_DES_MASK				(1 << 0)
22169d88a00SPaul Walmsley 
22269d88a00SPaul Walmsley /* CM_CLKSEL1_CORE */
22369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_USB_SHIFT			25
22469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_USB_MASK			(0x7 << 25)
22569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_SSI_SHIFT			20
22669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_SSI_MASK			(0x1f << 20)
22769d88a00SPaul Walmsley #define OMAP2420_CLKSEL_VLYNQ_SHIFT			15
22869d88a00SPaul Walmsley #define OMAP2420_CLKSEL_VLYNQ_MASK			(0x1f << 15)
22969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS2_SHIFT			13
23069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS2_MASK			(0x1 << 13)
23169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS1_SHIFT			8
23269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS1_MASK			(0x1f << 8)
23369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L4_SHIFT			5
23469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L4_MASK				(0x3 << 5)
23569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L3_SHIFT			0
23669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L3_MASK				(0x1f << 0)
23769d88a00SPaul Walmsley 
23869d88a00SPaul Walmsley /* CM_CLKSEL2_CORE */
23969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT12_SHIFT			22
24069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT12_MASK			(0x3 << 22)
24169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT11_SHIFT			20
24269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT11_MASK			(0x3 << 20)
24369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT10_SHIFT			18
24469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT10_MASK			(0x3 << 18)
24569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT9_SHIFT			16
24669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT9_MASK			(0x3 << 16)
24769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT8_SHIFT			14
24869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT8_MASK			(0x3 << 14)
24969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT7_SHIFT			12
25069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT7_MASK			(0x3 << 12)
25169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT6_SHIFT			10
25269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT6_MASK			(0x3 << 10)
25369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT5_SHIFT			8
25469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT5_MASK			(0x3 << 8)
25569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT4_SHIFT			6
25669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT4_MASK			(0x3 << 6)
25769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT3_SHIFT			4
25869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT3_MASK			(0x3 << 4)
25969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT2_SHIFT			2
26069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT2_MASK			(0x3 << 2)
26169d88a00SPaul Walmsley 
26269d88a00SPaul Walmsley /* CM_CLKSTCTRL_CORE */
263801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSS_SHIFT			2
264801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSS_MASK			(1 << 2)
265801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L4_SHIFT			1
266801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L4_MASK			(1 << 1)
267801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L3_SHIFT			0
268801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L3_MASK			(1 << 0)
26969d88a00SPaul Walmsley 
27069d88a00SPaul Walmsley /* CM_FCLKEN_GFX */
27169d88a00SPaul Walmsley #define OMAP24XX_EN_3D_SHIFT				2
272*f38ca10aSPaul Walmsley #define OMAP24XX_EN_3D_MASK				(1 << 2)
27369d88a00SPaul Walmsley #define OMAP24XX_EN_2D_SHIFT				1
274*f38ca10aSPaul Walmsley #define OMAP24XX_EN_2D_MASK				(1 << 1)
27569d88a00SPaul Walmsley 
27669d88a00SPaul Walmsley /* CM_ICLKEN_GFX specific bits */
27769d88a00SPaul Walmsley 
27869d88a00SPaul Walmsley /* CM_IDLEST_GFX specific bits */
27969d88a00SPaul Walmsley 
28069d88a00SPaul Walmsley /* CM_CLKSEL_GFX specific bits */
28169d88a00SPaul Walmsley 
28269d88a00SPaul Walmsley /* CM_CLKSTCTRL_GFX */
283801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_GFX_SHIFT			0
284801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_GFX_MASK			(1 << 0)
28569d88a00SPaul Walmsley 
28669d88a00SPaul Walmsley /* CM_FCLKEN_WKUP specific bits */
28769d88a00SPaul Walmsley 
28869d88a00SPaul Walmsley /* CM_ICLKEN_WKUP specific bits */
28969d88a00SPaul Walmsley #define OMAP2430_EN_ICR_SHIFT				6
290*f38ca10aSPaul Walmsley #define OMAP2430_EN_ICR_MASK				(1 << 6)
29169d88a00SPaul Walmsley #define OMAP24XX_EN_OMAPCTRL_SHIFT			5
292*f38ca10aSPaul Walmsley #define OMAP24XX_EN_OMAPCTRL_MASK			(1 << 5)
29369d88a00SPaul Walmsley #define OMAP24XX_EN_WDT1_SHIFT				4
294*f38ca10aSPaul Walmsley #define OMAP24XX_EN_WDT1_MASK				(1 << 4)
29569d88a00SPaul Walmsley #define OMAP24XX_EN_32KSYNC_SHIFT			1
296*f38ca10aSPaul Walmsley #define OMAP24XX_EN_32KSYNC_MASK			(1 << 1)
29769d88a00SPaul Walmsley 
29869d88a00SPaul Walmsley /* CM_IDLEST_WKUP specific bits */
299da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_SHIFT				6
300da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_MASK				(1 << 6)
301da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_SHIFT			5
302da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_MASK			(1 << 5)
303da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_SHIFT				4
304da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_MASK				(1 << 4)
305da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_SHIFT			3
306da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_MASK			(1 << 3)
307da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_SHIFT			1
308da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_MASK			(1 << 1)
30969d88a00SPaul Walmsley 
31069d88a00SPaul Walmsley /* CM_AUTOIDLE_WKUP */
311*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_OMAPCTRL_MASK			(1 << 5)
312*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_WDT1_MASK				(1 << 4)
313*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MPU_WDT_MASK			(1 << 3)
314*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPIOS_MASK			(1 << 2)
315*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_32KSYNC_MASK			(1 << 1)
316*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT1_MASK				(1 << 0)
31769d88a00SPaul Walmsley 
31869d88a00SPaul Walmsley /* CM_CLKSEL_WKUP */
31969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT1_SHIFT			0
32069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT1_MASK			(0x3 << 0)
32169d88a00SPaul Walmsley 
32269d88a00SPaul Walmsley /* CM_CLKEN_PLL */
32369d88a00SPaul Walmsley #define OMAP24XX_EN_54M_PLL_SHIFT			6
32469d88a00SPaul Walmsley #define OMAP24XX_EN_54M_PLL_MASK			(0x3 << 6)
32569d88a00SPaul Walmsley #define OMAP24XX_EN_96M_PLL_SHIFT			2
32669d88a00SPaul Walmsley #define OMAP24XX_EN_96M_PLL_MASK			(0x3 << 2)
32769d88a00SPaul Walmsley #define OMAP24XX_EN_DPLL_SHIFT				0
32869d88a00SPaul Walmsley #define OMAP24XX_EN_DPLL_MASK				(0x3 << 0)
32969d88a00SPaul Walmsley 
33069d88a00SPaul Walmsley /* CM_IDLEST_CKGEN */
331*f38ca10aSPaul Walmsley #define OMAP24XX_ST_54M_APLL_MASK			(1 << 9)
332*f38ca10aSPaul Walmsley #define OMAP24XX_ST_96M_APLL_MASK			(1 << 8)
333*f38ca10aSPaul Walmsley #define OMAP24XX_ST_54M_CLK_MASK			(1 << 6)
334*f38ca10aSPaul Walmsley #define OMAP24XX_ST_12M_CLK_MASK			(1 << 5)
335*f38ca10aSPaul Walmsley #define OMAP24XX_ST_48M_CLK_MASK			(1 << 4)
336*f38ca10aSPaul Walmsley #define OMAP24XX_ST_96M_CLK_MASK			(1 << 2)
33769d88a00SPaul Walmsley #define OMAP24XX_ST_CORE_CLK_SHIFT			0
33869d88a00SPaul Walmsley #define OMAP24XX_ST_CORE_CLK_MASK			(0x3 << 0)
33969d88a00SPaul Walmsley 
34069d88a00SPaul Walmsley /* CM_AUTOIDLE_PLL */
34169d88a00SPaul Walmsley #define OMAP24XX_AUTO_54M_SHIFT				6
34269d88a00SPaul Walmsley #define OMAP24XX_AUTO_54M_MASK				(0x3 << 6)
34369d88a00SPaul Walmsley #define OMAP24XX_AUTO_96M_SHIFT				2
34469d88a00SPaul Walmsley #define OMAP24XX_AUTO_96M_MASK				(0x3 << 2)
34569d88a00SPaul Walmsley #define OMAP24XX_AUTO_DPLL_SHIFT			0
34669d88a00SPaul Walmsley #define OMAP24XX_AUTO_DPLL_MASK				(0x3 << 0)
34769d88a00SPaul Walmsley 
34869d88a00SPaul Walmsley /* CM_CLKSEL1_PLL */
34969d88a00SPaul Walmsley #define OMAP2430_MAXDPLLFASTLOCK_SHIFT			28
35069d88a00SPaul Walmsley #define OMAP2430_MAXDPLLFASTLOCK_MASK			(0x7 << 28)
35169d88a00SPaul Walmsley #define OMAP24XX_APLLS_CLKIN_SHIFT			23
35269d88a00SPaul Walmsley #define OMAP24XX_APLLS_CLKIN_MASK			(0x7 << 23)
35369d88a00SPaul Walmsley #define OMAP24XX_DPLL_MULT_SHIFT			12
35469d88a00SPaul Walmsley #define OMAP24XX_DPLL_MULT_MASK				(0x3ff << 12)
35569d88a00SPaul Walmsley #define OMAP24XX_DPLL_DIV_SHIFT				8
35669d88a00SPaul Walmsley #define OMAP24XX_DPLL_DIV_MASK				(0xf << 8)
35769d88a00SPaul Walmsley #define OMAP24XX_54M_SOURCE_SHIFT			5
358*f38ca10aSPaul Walmsley #define OMAP24XX_54M_SOURCE_MASK			(1 << 5)
35969d88a00SPaul Walmsley #define OMAP2430_96M_SOURCE_SHIFT			4
360*f38ca10aSPaul Walmsley #define OMAP2430_96M_SOURCE_MASK			(1 << 4)
36169d88a00SPaul Walmsley #define OMAP24XX_48M_SOURCE_SHIFT			3
362*f38ca10aSPaul Walmsley #define OMAP24XX_48M_SOURCE_MASK			(1 << 3)
36369d88a00SPaul Walmsley #define OMAP2430_ALTCLK_SOURCE_SHIFT			0
36469d88a00SPaul Walmsley #define OMAP2430_ALTCLK_SOURCE_MASK			(0x7 << 0)
36569d88a00SPaul Walmsley 
36669d88a00SPaul Walmsley /* CM_CLKSEL2_PLL */
36769d88a00SPaul Walmsley #define OMAP24XX_CORE_CLK_SRC_SHIFT			0
36869d88a00SPaul Walmsley #define OMAP24XX_CORE_CLK_SRC_MASK			(0x3 << 0)
36969d88a00SPaul Walmsley 
37069d88a00SPaul Walmsley /* CM_FCLKEN_DSP */
37169d88a00SPaul Walmsley #define OMAP2420_EN_IVA_COP_SHIFT			10
372*f38ca10aSPaul Walmsley #define OMAP2420_EN_IVA_COP_MASK			(1 << 10)
37369d88a00SPaul Walmsley #define OMAP2420_EN_IVA_MPU_SHIFT			8
374*f38ca10aSPaul Walmsley #define OMAP2420_EN_IVA_MPU_MASK			(1 << 8)
37569d88a00SPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT		0
376*f38ca10aSPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_MASK		(1 << 0)
37769d88a00SPaul Walmsley 
37869d88a00SPaul Walmsley /* CM_ICLKEN_DSP */
37969d88a00SPaul Walmsley #define OMAP2420_EN_DSP_IPI_SHIFT			1
380*f38ca10aSPaul Walmsley #define OMAP2420_EN_DSP_IPI_MASK			(1 << 1)
38169d88a00SPaul Walmsley 
38269d88a00SPaul Walmsley /* CM_IDLEST_DSP */
383*f38ca10aSPaul Walmsley #define OMAP2420_ST_IVA_MASK				(1 << 8)
384*f38ca10aSPaul Walmsley #define OMAP2420_ST_IPI_MASK				(1 << 1)
385*f38ca10aSPaul Walmsley #define OMAP24XX_ST_DSP_MASK				(1 << 0)
38669d88a00SPaul Walmsley 
38769d88a00SPaul Walmsley /* CM_AUTOIDLE_DSP */
388*f38ca10aSPaul Walmsley #define OMAP2420_AUTO_DSP_IPI_MASK			(1 << 1)
38969d88a00SPaul Walmsley 
39069d88a00SPaul Walmsley /* CM_CLKSEL_DSP */
391*f38ca10aSPaul Walmsley #define OMAP2420_SYNC_IVA_MASK				(1 << 13)
39269d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_SHIFT			8
39369d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_MASK			(0x1f << 8)
394*f38ca10aSPaul Walmsley #define OMAP24XX_SYNC_DSP_MASK				(1 << 7)
39569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_IF_SHIFT			5
39669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_IF_MASK			(0x3 << 5)
39769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_SHIFT			0
39869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_MASK			(0x1f << 0)
39969d88a00SPaul Walmsley 
40069d88a00SPaul Walmsley /* CM_CLKSTCTRL_DSP */
401801954d3SPaul Walmsley #define OMAP2420_AUTOSTATE_IVA_SHIFT			8
402801954d3SPaul Walmsley #define OMAP2420_AUTOSTATE_IVA_MASK			(1 << 8)
403801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSP_SHIFT			0
404801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSP_MASK			(1 << 0)
40569d88a00SPaul Walmsley 
40669d88a00SPaul Walmsley /* CM_FCLKEN_MDM */
40769d88a00SPaul Walmsley /* 2430 only */
40869d88a00SPaul Walmsley #define OMAP2430_EN_OSC_SHIFT				1
409*f38ca10aSPaul Walmsley #define OMAP2430_EN_OSC_MASK				(1 << 1)
41069d88a00SPaul Walmsley 
41169d88a00SPaul Walmsley /* CM_ICLKEN_MDM */
41269d88a00SPaul Walmsley /* 2430 only */
41369d88a00SPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT		0
414*f38ca10aSPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM_MASK		(1 << 0)
41569d88a00SPaul Walmsley 
41669d88a00SPaul Walmsley /* CM_IDLEST_MDM specific bits */
41769d88a00SPaul Walmsley /* 2430 only */
41869d88a00SPaul Walmsley 
41969d88a00SPaul Walmsley /* CM_AUTOIDLE_MDM */
42069d88a00SPaul Walmsley /* 2430 only */
421*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_OSC_MASK				(1 << 1)
422*f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MDM_MASK				(1 << 0)
42369d88a00SPaul Walmsley 
42469d88a00SPaul Walmsley /* CM_CLKSEL_MDM */
42569d88a00SPaul Walmsley /* 2430 only */
426*f38ca10aSPaul Walmsley #define OMAP2430_SYNC_MDM_MASK				(1 << 4)
42769d88a00SPaul Walmsley #define OMAP2430_CLKSEL_MDM_SHIFT			0
42869d88a00SPaul Walmsley #define OMAP2430_CLKSEL_MDM_MASK			(0xf << 0)
42969d88a00SPaul Walmsley 
43069d88a00SPaul Walmsley /* CM_CLKSTCTRL_MDM */
43169d88a00SPaul Walmsley /* 2430 only */
432801954d3SPaul Walmsley #define OMAP2430_AUTOSTATE_MDM_SHIFT			0
433801954d3SPaul Walmsley #define OMAP2430_AUTOSTATE_MDM_MASK			(1 << 0)
43469d88a00SPaul Walmsley 
43569d88a00SPaul Walmsley #endif
436