xref: /linux/arch/arm/mach-omap2/cm-regbits-24xx.h (revision da0747d4faf55320f0f6cbcd8525e2a8e4619925)
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
2369d88a00SPaul Walmsley #define OMAP24XX_EN_CAM					(1 << 31)
2469d88a00SPaul Walmsley #define OMAP24XX_EN_WDT4_SHIFT				29
2569d88a00SPaul Walmsley #define OMAP24XX_EN_WDT4				(1 << 29)
2669d88a00SPaul Walmsley #define OMAP2420_EN_WDT3_SHIFT				28
2769d88a00SPaul Walmsley #define OMAP2420_EN_WDT3				(1 << 28)
2869d88a00SPaul Walmsley #define OMAP24XX_EN_MSPRO_SHIFT				27
2969d88a00SPaul Walmsley #define OMAP24XX_EN_MSPRO				(1 << 27)
3069d88a00SPaul Walmsley #define OMAP24XX_EN_FAC_SHIFT				25
3169d88a00SPaul Walmsley #define OMAP24XX_EN_FAC					(1 << 25)
3269d88a00SPaul Walmsley #define OMAP2420_EN_EAC_SHIFT				24
3369d88a00SPaul Walmsley #define OMAP2420_EN_EAC					(1 << 24)
3469d88a00SPaul Walmsley #define OMAP24XX_EN_HDQ_SHIFT				23
3569d88a00SPaul Walmsley #define OMAP24XX_EN_HDQ					(1 << 23)
3669d88a00SPaul Walmsley #define OMAP2420_EN_I2C2_SHIFT				20
3769d88a00SPaul Walmsley #define OMAP2420_EN_I2C2				(1 << 20)
3869d88a00SPaul Walmsley #define OMAP2420_EN_I2C1_SHIFT				19
3969d88a00SPaul Walmsley #define OMAP2420_EN_I2C1				(1 << 19)
4069d88a00SPaul Walmsley 
4169d88a00SPaul Walmsley /* CM_FCLKEN2_CORE and CM_ICLKEN2_CORE shared bits */
4269d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP5_SHIFT			5
4369d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP5				(1 << 5)
4469d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP4_SHIFT			4
4569d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP4				(1 << 4)
4669d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP3_SHIFT			3
4769d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP3				(1 << 3)
4869d88a00SPaul Walmsley #define OMAP24XX_EN_SSI_SHIFT				1
4969d88a00SPaul Walmsley #define OMAP24XX_EN_SSI					(1 << 1)
5069d88a00SPaul Walmsley 
5169d88a00SPaul Walmsley /* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
5269d88a00SPaul Walmsley #define OMAP24XX_EN_MPU_WDT_SHIFT			3
5369d88a00SPaul Walmsley #define OMAP24XX_EN_MPU_WDT				(1 << 3)
5469d88a00SPaul Walmsley 
5569d88a00SPaul Walmsley /* Bits specific to each register */
5669d88a00SPaul Walmsley 
5769d88a00SPaul Walmsley /* CM_IDLEST_MPU */
5869d88a00SPaul Walmsley /* 2430 only */
5969d88a00SPaul Walmsley #define OMAP2430_ST_MPU					(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
7169d88a00SPaul Walmsley #define OMAP24XX_EN_TV					(1 << 2)
7269d88a00SPaul Walmsley #define OMAP24XX_EN_DSS2_SHIFT				1
7369d88a00SPaul Walmsley #define OMAP24XX_EN_DSS2				(1 << 1)
7469d88a00SPaul Walmsley #define OMAP24XX_EN_DSS1_SHIFT				0
7569d88a00SPaul Walmsley #define OMAP24XX_EN_DSS1				(1 << 0)
7669d88a00SPaul Walmsley 
7769d88a00SPaul Walmsley /* CM_FCLKEN2_CORE specific bits */
7869d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS2_SHIFT			20
7969d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS2				(1 << 20)
8069d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS1_SHIFT			19
8169d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS1				(1 << 19)
8269d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB2_SHIFT			17
8369d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB2				(1 << 17)
8469d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB1_SHIFT			16
8569d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB1				(1 << 16)
8669d88a00SPaul Walmsley 
8769d88a00SPaul Walmsley /* CM_ICLKEN1_CORE specific bits */
8869d88a00SPaul Walmsley #define OMAP24XX_EN_MAILBOXES_SHIFT			30
8969d88a00SPaul Walmsley #define OMAP24XX_EN_MAILBOXES				(1 << 30)
9069d88a00SPaul Walmsley #define OMAP24XX_EN_DSS_SHIFT				0
9169d88a00SPaul Walmsley #define OMAP24XX_EN_DSS					(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
9869d88a00SPaul Walmsley #define OMAP2430_EN_SDRC				(1 << 2)
9969d88a00SPaul Walmsley 
10069d88a00SPaul Walmsley /* CM_ICLKEN4_CORE */
10169d88a00SPaul Walmsley #define OMAP24XX_EN_PKA_SHIFT				4
10269d88a00SPaul Walmsley #define OMAP24XX_EN_PKA					(1 << 4)
10369d88a00SPaul Walmsley #define OMAP24XX_EN_AES_SHIFT				3
10469d88a00SPaul Walmsley #define OMAP24XX_EN_AES					(1 << 3)
10569d88a00SPaul Walmsley #define OMAP24XX_EN_RNG_SHIFT				2
10669d88a00SPaul Walmsley #define OMAP24XX_EN_RNG					(1 << 2)
10769d88a00SPaul Walmsley #define OMAP24XX_EN_SHA_SHIFT				1
10869d88a00SPaul Walmsley #define OMAP24XX_EN_SHA					(1 << 1)
10969d88a00SPaul Walmsley #define OMAP24XX_EN_DES_SHIFT				0
11069d88a00SPaul Walmsley #define OMAP24XX_EN_DES					(1 << 0)
11169d88a00SPaul Walmsley 
11269d88a00SPaul Walmsley /* CM_IDLEST1_CORE specific bits */
113*da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_SHIFT			30
114*da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_MASK			(1 << 30)
115*da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_SHIFT				29
116*da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_MASK				(1 << 29)
117*da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_SHIFT				28
118*da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_MASK				(1 << 28)
119*da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_SHIFT				27
120*da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_MASK				(1 << 27)
121*da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_SHIFT				25
122*da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_MASK				(1 << 25)
123*da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_SHIFT				24
124*da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_MASK				(1 << 24)
125*da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_SHIFT				23
126*da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_MASK				(1 << 23)
127*da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_SHIFT				20
128*da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_MASK				(1 << 20)
129*da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_SHIFT				19
130*da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_MASK				(1 << 19)
131*da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_SHIFT			16
132*da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_MASK				(1 << 16)
133*da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_SHIFT			15
134*da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_MASK				(1 << 15)
135*da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_SHIFT				0
136*da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_MASK				(1 << 0)
13769d88a00SPaul Walmsley 
13869d88a00SPaul Walmsley /* CM_IDLEST2_CORE */
139*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_SHIFT			5
140*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_MASK				(1 << 5)
141*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_SHIFT				4
142*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_MASK				(1 << 4)
143*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_SHIFT				3
144*da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_MASK				(1 << 3)
145*da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_SHIFT				1
146*da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_MASK				(1 << 1)
14769d88a00SPaul Walmsley 
14869d88a00SPaul Walmsley /* CM_IDLEST3_CORE */
14969d88a00SPaul Walmsley /* 2430 only */
150*da0747d4SPaul Walmsley #define OMAP2430_ST_SDRC_MASK				(1 << 2)
15169d88a00SPaul Walmsley 
15269d88a00SPaul Walmsley /* CM_IDLEST4_CORE */
153*da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_SHIFT				4
154*da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_MASK				(1 << 4)
155*da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_SHIFT				3
156*da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_MASK				(1 << 3)
157*da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_SHIFT				2
158*da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_MASK				(1 << 2)
159*da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_SHIFT				1
160*da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_MASK				(1 << 1)
161*da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_SHIFT				0
162*da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_MASK				(1 << 0)
16369d88a00SPaul Walmsley 
16469d88a00SPaul Walmsley /* CM_AUTOIDLE1_CORE */
16569d88a00SPaul Walmsley #define OMAP24XX_AUTO_CAM				(1 << 31)
16669d88a00SPaul Walmsley #define OMAP24XX_AUTO_MAILBOXES				(1 << 30)
16769d88a00SPaul Walmsley #define OMAP24XX_AUTO_WDT4				(1 << 29)
16869d88a00SPaul Walmsley #define OMAP2420_AUTO_WDT3				(1 << 28)
16969d88a00SPaul Walmsley #define OMAP24XX_AUTO_MSPRO				(1 << 27)
17069d88a00SPaul Walmsley #define OMAP2420_AUTO_MMC				(1 << 26)
17169d88a00SPaul Walmsley #define OMAP24XX_AUTO_FAC				(1 << 25)
17269d88a00SPaul Walmsley #define OMAP2420_AUTO_EAC				(1 << 24)
17369d88a00SPaul Walmsley #define OMAP24XX_AUTO_HDQ				(1 << 23)
17469d88a00SPaul Walmsley #define OMAP24XX_AUTO_UART2				(1 << 22)
17569d88a00SPaul Walmsley #define OMAP24XX_AUTO_UART1				(1 << 21)
17669d88a00SPaul Walmsley #define OMAP24XX_AUTO_I2C2				(1 << 20)
17769d88a00SPaul Walmsley #define OMAP24XX_AUTO_I2C1				(1 << 19)
17869d88a00SPaul Walmsley #define OMAP24XX_AUTO_MCSPI2				(1 << 18)
17969d88a00SPaul Walmsley #define OMAP24XX_AUTO_MCSPI1				(1 << 17)
18069d88a00SPaul Walmsley #define OMAP24XX_AUTO_MCBSP2				(1 << 16)
18169d88a00SPaul Walmsley #define OMAP24XX_AUTO_MCBSP1				(1 << 15)
18269d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT12				(1 << 14)
18369d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT11				(1 << 13)
18469d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT10				(1 << 12)
18569d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT9				(1 << 11)
18669d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT8				(1 << 10)
18769d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT7				(1 << 9)
18869d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT6				(1 << 8)
18969d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT5				(1 << 7)
19069d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT4				(1 << 6)
19169d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT3				(1 << 5)
19269d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT2				(1 << 4)
19369d88a00SPaul Walmsley #define OMAP2420_AUTO_VLYNQ				(1 << 3)
19469d88a00SPaul Walmsley #define OMAP24XX_AUTO_DSS				(1 << 0)
19569d88a00SPaul Walmsley 
19669d88a00SPaul Walmsley /* CM_AUTOIDLE2_CORE */
19769d88a00SPaul Walmsley #define OMAP2430_AUTO_MDM_INTC				(1 << 11)
19869d88a00SPaul Walmsley #define OMAP2430_AUTO_GPIO5				(1 << 10)
19969d88a00SPaul Walmsley #define OMAP2430_AUTO_MCSPI3				(1 << 9)
20069d88a00SPaul Walmsley #define OMAP2430_AUTO_MMCHS2				(1 << 8)
20169d88a00SPaul Walmsley #define OMAP2430_AUTO_MMCHS1				(1 << 7)
20269d88a00SPaul Walmsley #define OMAP2430_AUTO_USBHS				(1 << 6)
20369d88a00SPaul Walmsley #define OMAP2430_AUTO_MCBSP5				(1 << 5)
20469d88a00SPaul Walmsley #define OMAP2430_AUTO_MCBSP4				(1 << 4)
20569d88a00SPaul Walmsley #define OMAP2430_AUTO_MCBSP3				(1 << 3)
20669d88a00SPaul Walmsley #define OMAP24XX_AUTO_UART3				(1 << 2)
20769d88a00SPaul Walmsley #define OMAP24XX_AUTO_SSI				(1 << 1)
20869d88a00SPaul Walmsley #define OMAP24XX_AUTO_USB				(1 << 0)
20969d88a00SPaul Walmsley 
21069d88a00SPaul Walmsley /* CM_AUTOIDLE3_CORE */
21169d88a00SPaul Walmsley #define OMAP24XX_AUTO_SDRC				(1 << 2)
21269d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPMC				(1 << 1)
21369d88a00SPaul Walmsley #define OMAP24XX_AUTO_SDMA				(1 << 0)
21469d88a00SPaul Walmsley 
21569d88a00SPaul Walmsley /* CM_AUTOIDLE4_CORE */
21669d88a00SPaul Walmsley #define OMAP24XX_AUTO_PKA				(1 << 4)
21769d88a00SPaul Walmsley #define OMAP24XX_AUTO_AES				(1 << 3)
21869d88a00SPaul Walmsley #define OMAP24XX_AUTO_RNG				(1 << 2)
21969d88a00SPaul Walmsley #define OMAP24XX_AUTO_SHA				(1 << 1)
22069d88a00SPaul Walmsley #define OMAP24XX_AUTO_DES				(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
27269d88a00SPaul Walmsley #define OMAP24XX_EN_3D					(1 << 2)
27369d88a00SPaul Walmsley #define OMAP24XX_EN_2D_SHIFT				1
27469d88a00SPaul Walmsley #define OMAP24XX_EN_2D					(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
29069d88a00SPaul Walmsley #define OMAP2430_EN_ICR					(1 << 6)
29169d88a00SPaul Walmsley #define OMAP24XX_EN_OMAPCTRL_SHIFT			5
29269d88a00SPaul Walmsley #define OMAP24XX_EN_OMAPCTRL				(1 << 5)
29369d88a00SPaul Walmsley #define OMAP24XX_EN_WDT1_SHIFT				4
29469d88a00SPaul Walmsley #define OMAP24XX_EN_WDT1				(1 << 4)
29569d88a00SPaul Walmsley #define OMAP24XX_EN_32KSYNC_SHIFT			1
29669d88a00SPaul Walmsley #define OMAP24XX_EN_32KSYNC				(1 << 1)
29769d88a00SPaul Walmsley 
29869d88a00SPaul Walmsley /* CM_IDLEST_WKUP specific bits */
299*da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_SHIFT				6
300*da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_MASK				(1 << 6)
301*da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_SHIFT			5
302*da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_MASK			(1 << 5)
303*da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_SHIFT				4
304*da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_MASK				(1 << 4)
305*da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_SHIFT			3
306*da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_MASK			(1 << 3)
307*da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_SHIFT			1
308*da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_MASK			(1 << 1)
30969d88a00SPaul Walmsley 
31069d88a00SPaul Walmsley /* CM_AUTOIDLE_WKUP */
31169d88a00SPaul Walmsley #define OMAP24XX_AUTO_OMAPCTRL				(1 << 5)
31269d88a00SPaul Walmsley #define OMAP24XX_AUTO_WDT1				(1 << 4)
31369d88a00SPaul Walmsley #define OMAP24XX_AUTO_MPU_WDT				(1 << 3)
31469d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPIOS				(1 << 2)
31569d88a00SPaul Walmsley #define OMAP24XX_AUTO_32KSYNC				(1 << 1)
31669d88a00SPaul Walmsley #define OMAP24XX_AUTO_GPT1				(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 */
33169d88a00SPaul Walmsley #define OMAP24XX_ST_54M_APLL				(1 << 9)
33269d88a00SPaul Walmsley #define OMAP24XX_ST_96M_APLL				(1 << 8)
33369d88a00SPaul Walmsley #define OMAP24XX_ST_54M_CLK				(1 << 6)
33469d88a00SPaul Walmsley #define OMAP24XX_ST_12M_CLK				(1 << 5)
33569d88a00SPaul Walmsley #define OMAP24XX_ST_48M_CLK				(1 << 4)
33669d88a00SPaul Walmsley #define OMAP24XX_ST_96M_CLK				(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
35869d88a00SPaul Walmsley #define OMAP24XX_54M_SOURCE				(1 << 5)
35969d88a00SPaul Walmsley #define OMAP2430_96M_SOURCE_SHIFT			4
36069d88a00SPaul Walmsley #define OMAP2430_96M_SOURCE				(1 << 4)
36169d88a00SPaul Walmsley #define OMAP24XX_48M_SOURCE_SHIFT			3
36269d88a00SPaul Walmsley #define OMAP24XX_48M_SOURCE				(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
37269d88a00SPaul Walmsley #define OMAP2420_EN_IVA_COP				(1 << 10)
37369d88a00SPaul Walmsley #define OMAP2420_EN_IVA_MPU_SHIFT			8
37469d88a00SPaul Walmsley #define OMAP2420_EN_IVA_MPU				(1 << 8)
37569d88a00SPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT		0
37669d88a00SPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP			(1 << 0)
37769d88a00SPaul Walmsley 
37869d88a00SPaul Walmsley /* CM_ICLKEN_DSP */
37969d88a00SPaul Walmsley #define OMAP2420_EN_DSP_IPI_SHIFT			1
38069d88a00SPaul Walmsley #define OMAP2420_EN_DSP_IPI				(1 << 1)
38169d88a00SPaul Walmsley 
38269d88a00SPaul Walmsley /* CM_IDLEST_DSP */
38369d88a00SPaul Walmsley #define OMAP2420_ST_IVA					(1 << 8)
38469d88a00SPaul Walmsley #define OMAP2420_ST_IPI					(1 << 1)
38569d88a00SPaul Walmsley #define OMAP24XX_ST_DSP					(1 << 0)
38669d88a00SPaul Walmsley 
38769d88a00SPaul Walmsley /* CM_AUTOIDLE_DSP */
38869d88a00SPaul Walmsley #define OMAP2420_AUTO_DSP_IPI				(1 << 1)
38969d88a00SPaul Walmsley 
39069d88a00SPaul Walmsley /* CM_CLKSEL_DSP */
39169d88a00SPaul Walmsley #define OMAP2420_SYNC_IVA				(1 << 13)
39269d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_SHIFT			8
39369d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_MASK			(0x1f << 8)
39469d88a00SPaul Walmsley #define OMAP24XX_SYNC_DSP				(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
40969d88a00SPaul Walmsley #define OMAP2430_EN_OSC					(1 << 1)
41069d88a00SPaul Walmsley 
41169d88a00SPaul Walmsley /* CM_ICLKEN_MDM */
41269d88a00SPaul Walmsley /* 2430 only */
41369d88a00SPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT		0
41469d88a00SPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM			(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 */
42169d88a00SPaul Walmsley #define OMAP2430_AUTO_OSC				(1 << 1)
42269d88a00SPaul Walmsley #define OMAP2430_AUTO_MDM				(1 << 0)
42369d88a00SPaul Walmsley 
42469d88a00SPaul Walmsley /* CM_CLKSEL_MDM */
42569d88a00SPaul Walmsley /* 2430 only */
42669d88a00SPaul Walmsley #define OMAP2430_SYNC_MDM				(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