xref: /linux/arch/arm/mach-omap2/prm-regbits-24xx.h (revision 69d88a00a240fbed07fb6943c862ea3188e9097d)
1*69d88a00SPaul Walmsley #ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H
2*69d88a00SPaul Walmsley #define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H
3*69d88a00SPaul Walmsley 
4*69d88a00SPaul Walmsley /*
5*69d88a00SPaul Walmsley  * OMAP24XX Power/Reset Management register bits
6*69d88a00SPaul Walmsley  *
7*69d88a00SPaul Walmsley  * Copyright (C) 2007 Texas Instruments, Inc.
8*69d88a00SPaul Walmsley  * Copyright (C) 2007 Nokia Corporation
9*69d88a00SPaul Walmsley  *
10*69d88a00SPaul Walmsley  * Written by Paul Walmsley
11*69d88a00SPaul Walmsley  *
12*69d88a00SPaul Walmsley  * This program is free software; you can redistribute it and/or modify
13*69d88a00SPaul Walmsley  * it under the terms of the GNU General Public License version 2 as
14*69d88a00SPaul Walmsley  * published by the Free Software Foundation.
15*69d88a00SPaul Walmsley  */
16*69d88a00SPaul Walmsley 
17*69d88a00SPaul Walmsley #include "prm.h"
18*69d88a00SPaul Walmsley 
19*69d88a00SPaul Walmsley /* Bits shared between registers */
20*69d88a00SPaul Walmsley 
21*69d88a00SPaul Walmsley /* PRCM_IRQSTATUS_MPU, PM_IRQSTATUS_DSP, PRCM_IRQSTATUS_IVA shared bits */
22*69d88a00SPaul Walmsley #define OMAP24XX_VOLTTRANS_ST				(1 << 2)
23*69d88a00SPaul Walmsley #define OMAP24XX_WKUP2_ST				(1 << 1)
24*69d88a00SPaul Walmsley #define OMAP24XX_WKUP1_ST				(1 << 0)
25*69d88a00SPaul Walmsley 
26*69d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU, PM_IRQENABLE_DSP, PRCM_IRQENABLE_IVA shared bits */
27*69d88a00SPaul Walmsley #define OMAP24XX_VOLTTRANS_EN				(1 << 2)
28*69d88a00SPaul Walmsley #define OMAP24XX_WKUP2_EN				(1 << 1)
29*69d88a00SPaul Walmsley #define OMAP24XX_WKUP1_EN				(1 << 0)
30*69d88a00SPaul Walmsley 
31*69d88a00SPaul Walmsley /* PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_DSP, PM_WKDEP_MDM shared bits */
32*69d88a00SPaul Walmsley #define OMAP24XX_EN_MPU					(1 << 1)
33*69d88a00SPaul Walmsley #define OMAP24XX_EN_CORE				(1 << 0)
34*69d88a00SPaul Walmsley 
35*69d88a00SPaul Walmsley /*
36*69d88a00SPaul Walmsley  * PM_PWSTCTRL_MPU, PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM
37*69d88a00SPaul Walmsley  * shared bits
38*69d88a00SPaul Walmsley  */
39*69d88a00SPaul Walmsley #define OMAP24XX_MEMONSTATE_SHIFT			10
40*69d88a00SPaul Walmsley #define OMAP24XX_MEMONSTATE_MASK			(0x3 << 10)
41*69d88a00SPaul Walmsley #define OMAP24XX_MEMRETSTATE				(1 << 3)
42*69d88a00SPaul Walmsley 
43*69d88a00SPaul Walmsley /* PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM shared bits */
44*69d88a00SPaul Walmsley #define OMAP24XX_FORCESTATE				(1 << 18)
45*69d88a00SPaul Walmsley 
46*69d88a00SPaul Walmsley /*
47*69d88a00SPaul Walmsley  * PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP,
48*69d88a00SPaul Walmsley  * PM_PWSTST_MDM shared bits
49*69d88a00SPaul Walmsley  */
50*69d88a00SPaul Walmsley #define OMAP24XX_CLKACTIVITY				(1 << 19)
51*69d88a00SPaul Walmsley 
52*69d88a00SPaul Walmsley /* PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_DSP shared bits */
53*69d88a00SPaul Walmsley #define OMAP24XX_LASTSTATEENTERED_SHIFT			4
54*69d88a00SPaul Walmsley #define OMAP24XX_LASTSTATEENTERED_MASK			(0x3 << 4)
55*69d88a00SPaul Walmsley 
56*69d88a00SPaul Walmsley /* PM_PWSTST_MPU and PM_PWSTST_DSP shared bits */
57*69d88a00SPaul Walmsley #define OMAP2430_MEMSTATEST_SHIFT			10
58*69d88a00SPaul Walmsley #define OMAP2430_MEMSTATEST_MASK			(0x3 << 10)
59*69d88a00SPaul Walmsley 
60*69d88a00SPaul Walmsley /* PM_PWSTST_GFX, PM_PWSTST_DSP, PM_PWSTST_MDM shared bits */
61*69d88a00SPaul Walmsley #define OMAP24XX_POWERSTATEST_SHIFT			0
62*69d88a00SPaul Walmsley #define OMAP24XX_POWERSTATEST_MASK			(0x3 << 0)
63*69d88a00SPaul Walmsley 
64*69d88a00SPaul Walmsley 
65*69d88a00SPaul Walmsley /* Bits specific to each register */
66*69d88a00SPaul Walmsley 
67*69d88a00SPaul Walmsley /* PRCM_REVISION */
68*69d88a00SPaul Walmsley #define OMAP24XX_REV_SHIFT				0
69*69d88a00SPaul Walmsley #define OMAP24XX_REV_MASK				(0xff << 0)
70*69d88a00SPaul Walmsley 
71*69d88a00SPaul Walmsley /* PRCM_SYSCONFIG */
72*69d88a00SPaul Walmsley #define OMAP24XX_AUTOIDLE				(1 << 0)
73*69d88a00SPaul Walmsley 
74*69d88a00SPaul Walmsley /* PRCM_IRQSTATUS_MPU specific bits */
75*69d88a00SPaul Walmsley #define OMAP2430_DPLL_RECAL_ST				(1 << 6)
76*69d88a00SPaul Walmsley #define OMAP24XX_TRANSITION_ST				(1 << 5)
77*69d88a00SPaul Walmsley #define OMAP24XX_EVGENOFF_ST				(1 << 4)
78*69d88a00SPaul Walmsley #define OMAP24XX_EVGENON_ST				(1 << 3)
79*69d88a00SPaul Walmsley 
80*69d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU specific bits */
81*69d88a00SPaul Walmsley #define OMAP2430_DPLL_RECAL_EN				(1 << 6)
82*69d88a00SPaul Walmsley #define OMAP24XX_TRANSITION_EN				(1 << 5)
83*69d88a00SPaul Walmsley #define OMAP24XX_EVGENOFF_EN				(1 << 4)
84*69d88a00SPaul Walmsley #define OMAP24XX_EVGENON_EN				(1 << 3)
85*69d88a00SPaul Walmsley 
86*69d88a00SPaul Walmsley /* PRCM_VOLTCTRL */
87*69d88a00SPaul Walmsley #define OMAP24XX_AUTO_EXTVOLT				(1 << 15)
88*69d88a00SPaul Walmsley #define OMAP24XX_FORCE_EXTVOLT				(1 << 14)
89*69d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_SHIFT			12
90*69d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_MASK			(0x3 << 12)
91*69d88a00SPaul Walmsley #define OMAP24XX_MEMRETCTRL				(1 << 8)
92*69d88a00SPaul Walmsley #define OMAP24XX_SETRET_LEVEL_SHIFT			6
93*69d88a00SPaul Walmsley #define OMAP24XX_SETRET_LEVEL_MASK			(0x3 << 6)
94*69d88a00SPaul Walmsley #define OMAP24XX_VOLT_LEVEL_SHIFT			0
95*69d88a00SPaul Walmsley #define OMAP24XX_VOLT_LEVEL_MASK			(0x3 << 0)
96*69d88a00SPaul Walmsley 
97*69d88a00SPaul Walmsley /* PRCM_VOLTST */
98*69d88a00SPaul Walmsley #define OMAP24XX_ST_VOLTLEVEL_SHIFT			0
99*69d88a00SPaul Walmsley #define OMAP24XX_ST_VOLTLEVEL_MASK			(0x3 << 0)
100*69d88a00SPaul Walmsley 
101*69d88a00SPaul Walmsley /* PRCM_CLKSRC_CTRL specific bits */
102*69d88a00SPaul Walmsley 
103*69d88a00SPaul Walmsley /* PRCM_CLKOUT_CTRL */
104*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_EN_SHIFT			15
105*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_EN				(1 << 15)
106*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_DIV_SHIFT			11
107*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_DIV_MASK			(0x7 << 11)
108*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_SOURCE_SHIFT			8
109*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_SOURCE_MASK			(0x3 << 8)
110*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_EN_SHIFT			7
111*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_EN				(1 << 7)
112*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_DIV_SHIFT			3
113*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_DIV_MASK			(0x7 << 3)
114*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_SOURCE_SHIFT			0
115*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_SOURCE_MASK			(0x3 << 0)
116*69d88a00SPaul Walmsley 
117*69d88a00SPaul Walmsley /* PRCM_CLKEMUL_CTRL */
118*69d88a00SPaul Walmsley #define OMAP24XX_EMULATION_EN_SHIFT			0
119*69d88a00SPaul Walmsley #define OMAP24XX_EMULATION_EN				(1 << 0)
120*69d88a00SPaul Walmsley 
121*69d88a00SPaul Walmsley /* PRCM_CLKCFG_CTRL */
122*69d88a00SPaul Walmsley #define OMAP24XX_VALID_CONFIG				(1 << 0)
123*69d88a00SPaul Walmsley 
124*69d88a00SPaul Walmsley /* PRCM_CLKCFG_STATUS */
125*69d88a00SPaul Walmsley #define OMAP24XX_CONFIG_STATUS				(1 << 0)
126*69d88a00SPaul Walmsley 
127*69d88a00SPaul Walmsley /* PRCM_VOLTSETUP specific bits */
128*69d88a00SPaul Walmsley 
129*69d88a00SPaul Walmsley /* PRCM_CLKSSETUP specific bits */
130*69d88a00SPaul Walmsley 
131*69d88a00SPaul Walmsley /* PRCM_POLCTRL */
132*69d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_POL				(1 << 10)
133*69d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_POL				(1 << 9)
134*69d88a00SPaul Walmsley #define OMAP24XX_CLKREQ_POL				(1 << 8)
135*69d88a00SPaul Walmsley #define OMAP2430_USE_POWEROK				(1 << 2)
136*69d88a00SPaul Walmsley #define OMAP2430_POWEROK_POL				(1 << 1)
137*69d88a00SPaul Walmsley #define OMAP24XX_EXTVOL_POL				(1 << 0)
138*69d88a00SPaul Walmsley 
139*69d88a00SPaul Walmsley /* RM_RSTST_MPU specific bits */
140*69d88a00SPaul Walmsley /* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" instead */
141*69d88a00SPaul Walmsley 
142*69d88a00SPaul Walmsley /* PM_WKDEP_MPU specific bits */
143*69d88a00SPaul Walmsley #define OMAP2430_PM_WKDEP_MPU_EN_MDM			(1 << 5)
144*69d88a00SPaul Walmsley #define OMAP24XX_PM_WKDEP_MPU_EN_DSP			(1 << 2)
145*69d88a00SPaul Walmsley 
146*69d88a00SPaul Walmsley /* PM_EVGENCTRL_MPU specific bits */
147*69d88a00SPaul Walmsley 
148*69d88a00SPaul Walmsley /* PM_EVEGENONTIM_MPU specific bits */
149*69d88a00SPaul Walmsley 
150*69d88a00SPaul Walmsley /* PM_EVEGENOFFTIM_MPU specific bits */
151*69d88a00SPaul Walmsley 
152*69d88a00SPaul Walmsley /* PM_PWSTCTRL_MPU specific bits */
153*69d88a00SPaul Walmsley #define OMAP2430_FORCESTATE				(1 << 18)
154*69d88a00SPaul Walmsley 
155*69d88a00SPaul Walmsley /* PM_PWSTST_MPU specific bits */
156*69d88a00SPaul Walmsley /* INTRANSITION, CLKACTIVITY, POWERSTATE, MEMSTATEST are 2430 only */
157*69d88a00SPaul Walmsley 
158*69d88a00SPaul Walmsley /* PM_WKEN1_CORE specific bits */
159*69d88a00SPaul Walmsley 
160*69d88a00SPaul Walmsley /* PM_WKEN2_CORE specific bits */
161*69d88a00SPaul Walmsley 
162*69d88a00SPaul Walmsley /* PM_WKST1_CORE specific bits*/
163*69d88a00SPaul Walmsley 
164*69d88a00SPaul Walmsley /* PM_WKST2_CORE specific bits */
165*69d88a00SPaul Walmsley 
166*69d88a00SPaul Walmsley /* PM_WKDEP_CORE specific bits*/
167*69d88a00SPaul Walmsley #define OMAP2430_PM_WKDEP_CORE_EN_MDM			(1 << 5)
168*69d88a00SPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_GFX			(1 << 3)
169*69d88a00SPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_DSP			(1 << 2)
170*69d88a00SPaul Walmsley 
171*69d88a00SPaul Walmsley /* PM_PWSTCTRL_CORE specific bits */
172*69d88a00SPaul Walmsley #define OMAP24XX_MEMORYCHANGE				(1 << 20)
173*69d88a00SPaul Walmsley #define OMAP24XX_MEM3ONSTATE_SHIFT			14
174*69d88a00SPaul Walmsley #define OMAP24XX_MEM3ONSTATE_MASK			(0x3 << 14)
175*69d88a00SPaul Walmsley #define OMAP24XX_MEM2ONSTATE_SHIFT			12
176*69d88a00SPaul Walmsley #define OMAP24XX_MEM2ONSTATE_MASK			(0x3 << 12)
177*69d88a00SPaul Walmsley #define OMAP24XX_MEM1ONSTATE_SHIFT			10
178*69d88a00SPaul Walmsley #define OMAP24XX_MEM1ONSTATE_MASK			(0x3 << 10)
179*69d88a00SPaul Walmsley #define OMAP24XX_MEM3RETSTATE				(1 << 5)
180*69d88a00SPaul Walmsley #define OMAP24XX_MEM2RETSTATE				(1 << 4)
181*69d88a00SPaul Walmsley #define OMAP24XX_MEM1RETSTATE				(1 << 3)
182*69d88a00SPaul Walmsley 
183*69d88a00SPaul Walmsley /* PM_PWSTST_CORE specific bits */
184*69d88a00SPaul Walmsley #define OMAP24XX_MEM3STATEST_SHIFT			14
185*69d88a00SPaul Walmsley #define OMAP24XX_MEM3STATEST_MASK			(0x3 << 14)
186*69d88a00SPaul Walmsley #define OMAP24XX_MEM2STATEST_SHIFT			12
187*69d88a00SPaul Walmsley #define OMAP24XX_MEM2STATEST_MASK			(0x3 << 12)
188*69d88a00SPaul Walmsley #define OMAP24XX_MEM1STATEST_SHIFT			10
189*69d88a00SPaul Walmsley #define OMAP24XX_MEM1STATEST_MASK			(0x3 << 10)
190*69d88a00SPaul Walmsley 
191*69d88a00SPaul Walmsley /* RM_RSTCTRL_GFX */
192*69d88a00SPaul Walmsley #define OMAP24XX_GFX_RST				(1 << 0)
193*69d88a00SPaul Walmsley 
194*69d88a00SPaul Walmsley /* RM_RSTST_GFX specific bits */
195*69d88a00SPaul Walmsley #define OMAP24XX_GFX_SW_RST				(1 << 4)
196*69d88a00SPaul Walmsley 
197*69d88a00SPaul Walmsley /* PM_PWSTCTRL_GFX specific bits */
198*69d88a00SPaul Walmsley 
199*69d88a00SPaul Walmsley /* PM_WKDEP_GFX specific bits */
200*69d88a00SPaul Walmsley /* 2430 often calls EN_WAKEUP "EN_WKUP" */
201*69d88a00SPaul Walmsley 
202*69d88a00SPaul Walmsley /* RM_RSTCTRL_WKUP specific bits */
203*69d88a00SPaul Walmsley 
204*69d88a00SPaul Walmsley /* RM_RSTTIME_WKUP specific bits */
205*69d88a00SPaul Walmsley 
206*69d88a00SPaul Walmsley /* RM_RSTST_WKUP specific bits */
207*69d88a00SPaul Walmsley /* 2430 calls EXTWMPU_RST "EXTWARM_RST" and GLOBALWMPU_RST "GLOBALWARM_RST" */
208*69d88a00SPaul Walmsley #define OMAP24XX_EXTWMPU_RST				(1 << 6)
209*69d88a00SPaul Walmsley #define OMAP24XX_SECU_WD_RST				(1 << 5)
210*69d88a00SPaul Walmsley #define OMAP24XX_MPU_WD_RST				(1 << 4)
211*69d88a00SPaul Walmsley #define OMAP24XX_SECU_VIOL_RST				(1 << 3)
212*69d88a00SPaul Walmsley 
213*69d88a00SPaul Walmsley /* PM_WKEN_WKUP specific bits */
214*69d88a00SPaul Walmsley 
215*69d88a00SPaul Walmsley /* PM_WKST_WKUP specific bits */
216*69d88a00SPaul Walmsley 
217*69d88a00SPaul Walmsley /* RM_RSTCTRL_DSP */
218*69d88a00SPaul Walmsley #define OMAP2420_RST_IVA				(1 << 8)
219*69d88a00SPaul Walmsley #define OMAP24XX_RST2_DSP				(1 << 1)
220*69d88a00SPaul Walmsley #define OMAP24XX_RST1_DSP				(1 << 0)
221*69d88a00SPaul Walmsley 
222*69d88a00SPaul Walmsley /* RM_RSTST_DSP specific bits */
223*69d88a00SPaul Walmsley /* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" */
224*69d88a00SPaul Walmsley #define OMAP2420_IVA_SW_RST				(1 << 8)
225*69d88a00SPaul Walmsley #define OMAP24XX_DSP_SW_RST2				(1 << 5)
226*69d88a00SPaul Walmsley #define OMAP24XX_DSP_SW_RST1				(1 << 4)
227*69d88a00SPaul Walmsley 
228*69d88a00SPaul Walmsley /* PM_WKDEP_DSP specific bits */
229*69d88a00SPaul Walmsley 
230*69d88a00SPaul Walmsley /* PM_PWSTCTRL_DSP specific bits */
231*69d88a00SPaul Walmsley /* 2430 only: MEMONSTATE, MEMRETSTATE */
232*69d88a00SPaul Walmsley #define OMAP2420_MEMIONSTATE_SHIFT			12
233*69d88a00SPaul Walmsley #define OMAP2420_MEMIONSTATE_MASK			(0x3 << 12)
234*69d88a00SPaul Walmsley #define OMAP2420_MEMIRETSTATE				(1 << 4)
235*69d88a00SPaul Walmsley 
236*69d88a00SPaul Walmsley /* PM_PWSTST_DSP specific bits */
237*69d88a00SPaul Walmsley /* MEMSTATEST is 2430 only */
238*69d88a00SPaul Walmsley #define OMAP2420_MEMISTATEST_SHIFT			12
239*69d88a00SPaul Walmsley #define OMAP2420_MEMISTATEST_MASK			(0x3 << 12)
240*69d88a00SPaul Walmsley 
241*69d88a00SPaul Walmsley /* PRCM_IRQSTATUS_DSP specific bits */
242*69d88a00SPaul Walmsley 
243*69d88a00SPaul Walmsley /* PRCM_IRQENABLE_DSP specific bits */
244*69d88a00SPaul Walmsley 
245*69d88a00SPaul Walmsley /* RM_RSTCTRL_MDM */
246*69d88a00SPaul Walmsley /* 2430 only */
247*69d88a00SPaul Walmsley #define OMAP2430_PWRON1_MDM				(1 << 1)
248*69d88a00SPaul Walmsley #define OMAP2430_RST1_MDM				(1 << 0)
249*69d88a00SPaul Walmsley 
250*69d88a00SPaul Walmsley /* RM_RSTST_MDM specific bits */
251*69d88a00SPaul Walmsley /* 2430 only */
252*69d88a00SPaul Walmsley #define OMAP2430_MDM_SECU_VIOL				(1 << 6)
253*69d88a00SPaul Walmsley #define OMAP2430_MDM_SW_PWRON1				(1 << 5)
254*69d88a00SPaul Walmsley #define OMAP2430_MDM_SW_RST1				(1 << 4)
255*69d88a00SPaul Walmsley 
256*69d88a00SPaul Walmsley /* PM_WKEN_MDM */
257*69d88a00SPaul Walmsley /* 2430 only */
258*69d88a00SPaul Walmsley #define OMAP2430_PM_WKEN_MDM_EN_MDM			(1 << 0)
259*69d88a00SPaul Walmsley 
260*69d88a00SPaul Walmsley /* PM_WKST_MDM specific bits */
261*69d88a00SPaul Walmsley /* 2430 only */
262*69d88a00SPaul Walmsley 
263*69d88a00SPaul Walmsley /* PM_WKDEP_MDM specific bits */
264*69d88a00SPaul Walmsley /* 2430 only */
265*69d88a00SPaul Walmsley 
266*69d88a00SPaul Walmsley /* PM_PWSTCTRL_MDM specific bits */
267*69d88a00SPaul Walmsley /* 2430 only */
268*69d88a00SPaul Walmsley #define OMAP2430_KILLDOMAINWKUP				(1 << 19)
269*69d88a00SPaul Walmsley 
270*69d88a00SPaul Walmsley /* PM_PWSTST_MDM specific bits */
271*69d88a00SPaul Walmsley /* 2430 only */
272*69d88a00SPaul Walmsley 
273*69d88a00SPaul Walmsley /* PRCM_IRQSTATUS_IVA */
274*69d88a00SPaul Walmsley /* 2420 only */
275*69d88a00SPaul Walmsley 
276*69d88a00SPaul Walmsley /* PRCM_IRQENABLE_IVA */
277*69d88a00SPaul Walmsley /* 2420 only */
278*69d88a00SPaul Walmsley 
279*69d88a00SPaul Walmsley #endif
280