aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2008-03-18 08:53:17 -0400
committerTony Lindgren <tony@atomide.com>2008-04-14 13:29:37 -0400
commitc595713da76bc7cedddf5135072ea6037cc0befb (patch)
treee89b3705b71ceee747cf26c54ee8db36025de3cd /arch/arm/mach-omap2
parent69d88a00a240fbed07fb6943c862ea3188e9097d (diff)
ARM: OMAP2: Add register access for 34xx
This patch adds register access for 34xx power and clock management. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h669
-rw-r--r--arch/arm/mach-omap2/prm-regbits-34xx.h582
2 files changed, 1251 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
new file mode 100644
index 000000000000..317040887152
--- /dev/null
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -0,0 +1,669 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_34XX_H
2#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_34XX_H
3
4/*
5 * OMAP3430 Clock Management register bits
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "cm.h"
18
19/* Bits shared between registers */
20
21/* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
22#define OMAP3430ES2_EN_MMC3_MASK (1 << 30)
23#define OMAP3430ES2_EN_MMC3_SHIFT 30
24#define OMAP3430_EN_MSPRO (1 << 23)
25#define OMAP3430_EN_MSPRO_SHIFT 23
26#define OMAP3430_EN_HDQ (1 << 22)
27#define OMAP3430_EN_HDQ_SHIFT 22
28#define OMAP3430ES1_EN_FSHOSTUSB (1 << 5)
29#define OMAP3430ES1_EN_FSHOSTUSB_SHIFT 5
30#define OMAP3430ES1_EN_D2D (1 << 3)
31#define OMAP3430ES1_EN_D2D_SHIFT 3
32#define OMAP3430_EN_SSI (1 << 0)
33#define OMAP3430_EN_SSI_SHIFT 0
34
35/* CM_FCLKEN3_CORE and CM_ICLKEN3_CORE shared bits */
36#define OMAP3430ES2_EN_USBTLL_SHIFT 2
37#define OMAP3430ES2_EN_USBTLL_MASK (1 << 2)
38
39/* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
40#define OMAP3430_EN_WDT2 (1 << 5)
41#define OMAP3430_EN_WDT2_SHIFT 5
42
43/* CM_ICLKEN_CAM, CM_FCLKEN_CAM shared bits */
44#define OMAP3430_EN_CAM (1 << 0)
45#define OMAP3430_EN_CAM_SHIFT 0
46
47/* CM_FCLKEN_PER, CM_ICLKEN_PER shared bits */
48#define OMAP3430_EN_WDT3 (1 << 12)
49#define OMAP3430_EN_WDT3_SHIFT 12
50
51/* CM_CLKSEL2_EMU, CM_CLKSEL3_EMU shared bits */
52#define OMAP3430_OVERRIDE_ENABLE (1 << 19)
53
54
55/* Bits specific to each register */
56
57/* CM_FCLKEN_IVA2 */
58#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2 (1 << 0)
59
60/* CM_CLKEN_PLL_IVA2 */
61#define OMAP3430_IVA2_DPLL_RAMPTIME_SHIFT 8
62#define OMAP3430_IVA2_DPLL_RAMPTIME_MASK (0x3 << 8)
63#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT 4
64#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4)
65#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3
66#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_MASK (1 << 3)
67#define OMAP3430_EN_IVA2_DPLL_SHIFT 0
68#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0)
69
70/* CM_IDLEST_IVA2 */
71#define OMAP3430_ST_IVA2 (1 << 0)
72
73/* CM_IDLEST_PLL_IVA2 */
74#define OMAP3430_ST_IVA2_CLK (1 << 0)
75
76/* CM_AUTOIDLE_PLL_IVA2 */
77#define OMAP3430_AUTO_IVA2_DPLL_SHIFT 0
78#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0)
79
80/* CM_CLKSEL1_PLL_IVA2 */
81#define OMAP3430_IVA2_CLK_SRC_SHIFT 19
82#define OMAP3430_IVA2_CLK_SRC_MASK (0x3 << 19)
83#define OMAP3430_IVA2_DPLL_MULT_SHIFT 8
84#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8)
85#define OMAP3430_IVA2_DPLL_DIV_SHIFT 0
86#define OMAP3430_IVA2_DPLL_DIV_MASK (0x7f << 0)
87
88/* CM_CLKSEL2_PLL_IVA2 */
89#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT 0
90#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
91
92/* CM_CLKSTCTRL_IVA2 */
93#define OMAP3430_CLKTRCTRL_IVA2_SHIFT 0
94#define OMAP3430_CLKTRCTRL_IVA2_MASK (0x3 << 0)
95
96/* CM_CLKSTST_IVA2 */
97#define OMAP3430_CLKACTIVITY_IVA2 (1 << 0)
98
99/* CM_REVISION specific bits */
100
101/* CM_SYSCONFIG specific bits */
102
103/* CM_CLKEN_PLL_MPU */
104#define OMAP3430_MPU_DPLL_RAMPTIME_SHIFT 8
105#define OMAP3430_MPU_DPLL_RAMPTIME_MASK (0x3 << 8)
106#define OMAP3430_MPU_DPLL_FREQSEL_SHIFT 4
107#define OMAP3430_MPU_DPLL_FREQSEL_MASK (0xf << 4)
108#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT 3
109#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_MASK (1 << 3)
110#define OMAP3430_EN_MPU_DPLL_SHIFT 0
111#define OMAP3430_EN_MPU_DPLL_MASK (0x7 << 0)
112
113/* CM_IDLEST_MPU */
114#define OMAP3430_ST_MPU (1 << 0)
115
116/* CM_IDLEST_PLL_MPU */
117#define OMAP3430_ST_MPU_CLK (1 << 0)
118
119/* CM_AUTOIDLE_PLL_MPU */
120#define OMAP3430_AUTO_MPU_DPLL_SHIFT 0
121#define OMAP3430_AUTO_MPU_DPLL_MASK (0x7 << 0)
122
123/* CM_CLKSEL1_PLL_MPU */
124#define OMAP3430_MPU_CLK_SRC_SHIFT 19
125#define OMAP3430_MPU_CLK_SRC_MASK (0x3 << 19)
126#define OMAP3430_MPU_DPLL_MULT_SHIFT 8
127#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8)
128#define OMAP3430_MPU_DPLL_DIV_SHIFT 0
129#define OMAP3430_MPU_DPLL_DIV_MASK (0x7f << 0)
130
131/* CM_CLKSEL2_PLL_MPU */
132#define OMAP3430_MPU_DPLL_CLKOUT_DIV_SHIFT 0
133#define OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
134
135/* CM_CLKSTCTRL_MPU */
136#define OMAP3430_CLKTRCTRL_MPU_SHIFT 0
137#define OMAP3430_CLKTRCTRL_MPU_MASK (0x3 << 0)
138
139/* CM_CLKSTST_MPU */
140#define OMAP3430_CLKACTIVITY_MPU (1 << 0)
141
142/* CM_FCLKEN1_CORE specific bits */
143
144/* CM_ICLKEN1_CORE specific bits */
145#define OMAP3430_EN_ICR (1 << 29)
146#define OMAP3430_EN_ICR_SHIFT 29
147#define OMAP3430_EN_AES2 (1 << 28)
148#define OMAP3430_EN_AES2_SHIFT 28
149#define OMAP3430_EN_SHA12 (1 << 27)
150#define OMAP3430_EN_SHA12_SHIFT 27
151#define OMAP3430_EN_DES2 (1 << 26)
152#define OMAP3430_EN_DES2_SHIFT 26
153#define OMAP3430ES1_EN_FAC (1 << 8)
154#define OMAP3430ES1_EN_FAC_SHIFT 8
155#define OMAP3430_EN_MAILBOXES (1 << 7)
156#define OMAP3430_EN_MAILBOXES_SHIFT 7
157#define OMAP3430_EN_OMAPCTRL (1 << 6)
158#define OMAP3430_EN_OMAPCTRL_SHIFT 6
159#define OMAP3430_EN_SDRC (1 << 1)
160#define OMAP3430_EN_SDRC_SHIFT 1
161
162/* CM_ICLKEN2_CORE */
163#define OMAP3430_EN_PKA (1 << 4)
164#define OMAP3430_EN_PKA_SHIFT 4
165#define OMAP3430_EN_AES1 (1 << 3)
166#define OMAP3430_EN_AES1_SHIFT 3
167#define OMAP3430_EN_RNG (1 << 2)
168#define OMAP3430_EN_RNG_SHIFT 2
169#define OMAP3430_EN_SHA11 (1 << 1)
170#define OMAP3430_EN_SHA11_SHIFT 1
171#define OMAP3430_EN_DES1 (1 << 0)
172#define OMAP3430_EN_DES1_SHIFT 0
173
174/* CM_FCLKEN3_CORE specific bits */
175#define OMAP3430ES2_EN_TS_SHIFT 1
176#define OMAP3430ES2_EN_TS_MASK (1 << 1)
177#define OMAP3430ES2_EN_CPEFUSE_SHIFT 0
178#define OMAP3430ES2_EN_CPEFUSE_MASK (1 << 0)
179
180/* CM_IDLEST1_CORE specific bits */
181#define OMAP3430_ST_ICR (1 << 29)
182#define OMAP3430_ST_AES2 (1 << 28)
183#define OMAP3430_ST_SHA12 (1 << 27)
184#define OMAP3430_ST_DES2 (1 << 26)
185#define OMAP3430_ST_MSPRO (1 << 23)
186#define OMAP3430_ST_HDQ (1 << 22)
187#define OMAP3430ES1_ST_FAC (1 << 8)
188#define OMAP3430ES1_ST_MAILBOXES (1 << 7)
189#define OMAP3430_ST_OMAPCTRL (1 << 6)
190#define OMAP3430_ST_SDMA (1 << 2)
191#define OMAP3430_ST_SDRC (1 << 1)
192#define OMAP3430_ST_SSI (1 << 0)
193
194/* CM_IDLEST2_CORE */
195#define OMAP3430_ST_PKA (1 << 4)
196#define OMAP3430_ST_AES1 (1 << 3)
197#define OMAP3430_ST_RNG (1 << 2)
198#define OMAP3430_ST_SHA11 (1 << 1)
199#define OMAP3430_ST_DES1 (1 << 0)
200
201/* CM_IDLEST3_CORE */
202#define OMAP3430ES2_ST_USBTLL_SHIFT 2
203#define OMAP3430ES2_ST_USBTLL_MASK (1 << 2)
204
205/* CM_AUTOIDLE1_CORE */
206#define OMAP3430_AUTO_AES2 (1 << 28)
207#define OMAP3430_AUTO_AES2_SHIFT 28
208#define OMAP3430_AUTO_SHA12 (1 << 27)
209#define OMAP3430_AUTO_SHA12_SHIFT 27
210#define OMAP3430_AUTO_DES2 (1 << 26)
211#define OMAP3430_AUTO_DES2_SHIFT 26
212#define OMAP3430_AUTO_MMC2 (1 << 25)
213#define OMAP3430_AUTO_MMC2_SHIFT 25
214#define OMAP3430_AUTO_MMC1 (1 << 24)
215#define OMAP3430_AUTO_MMC1_SHIFT 24
216#define OMAP3430_AUTO_MSPRO (1 << 23)
217#define OMAP3430_AUTO_MSPRO_SHIFT 23
218#define OMAP3430_AUTO_HDQ (1 << 22)
219#define OMAP3430_AUTO_HDQ_SHIFT 22
220#define OMAP3430_AUTO_MCSPI4 (1 << 21)
221#define OMAP3430_AUTO_MCSPI4_SHIFT 21
222#define OMAP3430_AUTO_MCSPI3 (1 << 20)
223#define OMAP3430_AUTO_MCSPI3_SHIFT 20
224#define OMAP3430_AUTO_MCSPI2 (1 << 19)
225#define OMAP3430_AUTO_MCSPI2_SHIFT 19
226#define OMAP3430_AUTO_MCSPI1 (1 << 18)
227#define OMAP3430_AUTO_MCSPI1_SHIFT 18
228#define OMAP3430_AUTO_I2C3 (1 << 17)
229#define OMAP3430_AUTO_I2C3_SHIFT 17
230#define OMAP3430_AUTO_I2C2 (1 << 16)
231#define OMAP3430_AUTO_I2C2_SHIFT 16
232#define OMAP3430_AUTO_I2C1 (1 << 15)
233#define OMAP3430_AUTO_I2C1_SHIFT 15
234#define OMAP3430_AUTO_UART2 (1 << 14)
235#define OMAP3430_AUTO_UART2_SHIFT 14
236#define OMAP3430_AUTO_UART1 (1 << 13)
237#define OMAP3430_AUTO_UART1_SHIFT 13
238#define OMAP3430_AUTO_GPT11 (1 << 12)
239#define OMAP3430_AUTO_GPT11_SHIFT 12
240#define OMAP3430_AUTO_GPT10 (1 << 11)
241#define OMAP3430_AUTO_GPT10_SHIFT 11
242#define OMAP3430_AUTO_MCBSP5 (1 << 10)
243#define OMAP3430_AUTO_MCBSP5_SHIFT 10
244#define OMAP3430_AUTO_MCBSP1 (1 << 9)
245#define OMAP3430_AUTO_MCBSP1_SHIFT 9
246#define OMAP3430ES1_AUTO_FAC (1 << 8)
247#define OMAP3430ES1_AUTO_FAC_SHIFT 8
248#define OMAP3430_AUTO_MAILBOXES (1 << 7)
249#define OMAP3430_AUTO_MAILBOXES_SHIFT 7
250#define OMAP3430_AUTO_OMAPCTRL (1 << 6)
251#define OMAP3430_AUTO_OMAPCTRL_SHIFT 6
252#define OMAP3430ES1_AUTO_FSHOSTUSB (1 << 5)
253#define OMAP3430ES1_AUTO_FSHOSTUSB_SHIFT 5
254#define OMAP3430_AUTO_HSOTGUSB (1 << 4)
255#define OMAP3430_AUTO_HSOTGUSB_SHIFT 4
256#define OMAP3430ES1_AUTO_D2D (1 << 3)
257#define OMAP3430ES1_AUTO_D2D_SHIFT 3
258#define OMAP3430_AUTO_SSI (1 << 0)
259#define OMAP3430_AUTO_SSI_SHIFT 0
260
261/* CM_AUTOIDLE2_CORE */
262#define OMAP3430_AUTO_PKA (1 << 4)
263#define OMAP3430_AUTO_PKA_SHIFT 4
264#define OMAP3430_AUTO_AES1 (1 << 3)
265#define OMAP3430_AUTO_AES1_SHIFT 3
266#define OMAP3430_AUTO_RNG (1 << 2)
267#define OMAP3430_AUTO_RNG_SHIFT 2
268#define OMAP3430_AUTO_SHA11 (1 << 1)
269#define OMAP3430_AUTO_SHA11_SHIFT 1
270#define OMAP3430_AUTO_DES1 (1 << 0)
271#define OMAP3430_AUTO_DES1_SHIFT 0
272
273/* CM_AUTOIDLE3_CORE */
274#define OMAP3430ES2_AUTO_USBTLL_SHIFT 2
275#define OMAP3430ES2_AUTO_USBTLL_MASK (1 << 2)
276
277/* CM_CLKSEL_CORE */
278#define OMAP3430_CLKSEL_SSI_SHIFT 8
279#define OMAP3430_CLKSEL_SSI_MASK (0xf << 8)
280#define OMAP3430_CLKSEL_GPT11_MASK (1 << 7)
281#define OMAP3430_CLKSEL_GPT11_SHIFT 7
282#define OMAP3430_CLKSEL_GPT10_MASK (1 << 6)
283#define OMAP3430_CLKSEL_GPT10_SHIFT 6
284#define OMAP3430ES1_CLKSEL_FSHOSTUSB_SHIFT 4
285#define OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK (0x3 << 4)
286#define OMAP3430_CLKSEL_L4_SHIFT 2
287#define OMAP3430_CLKSEL_L4_MASK (0x3 << 2)
288#define OMAP3430_CLKSEL_L3_SHIFT 0
289#define OMAP3430_CLKSEL_L3_MASK (0x3 << 0)
290
291/* CM_CLKSTCTRL_CORE */
292#define OMAP3430ES1_CLKTRCTRL_D2D_SHIFT 4
293#define OMAP3430ES1_CLKTRCTRL_D2D_MASK (0x3 << 4)
294#define OMAP3430_CLKTRCTRL_L4_SHIFT 2
295#define OMAP3430_CLKTRCTRL_L4_MASK (0x3 << 2)
296#define OMAP3430_CLKTRCTRL_L3_SHIFT 0
297#define OMAP3430_CLKTRCTRL_L3_MASK (0x3 << 0)
298
299/* CM_CLKSTST_CORE */
300#define OMAP3430ES1_CLKACTIVITY_D2D (1 << 2)
301#define OMAP3430_CLKACTIVITY_L4 (1 << 1)
302#define OMAP3430_CLKACTIVITY_L3 (1 << 0)
303
304/* CM_FCLKEN_GFX */
305#define OMAP3430ES1_EN_3D (1 << 2)
306#define OMAP3430ES1_EN_3D_SHIFT 2
307#define OMAP3430ES1_EN_2D (1 << 1)
308#define OMAP3430ES1_EN_2D_SHIFT 1
309
310/* CM_ICLKEN_GFX specific bits */
311
312/* CM_IDLEST_GFX specific bits */
313
314/* CM_CLKSEL_GFX specific bits */
315
316/* CM_SLEEPDEP_GFX specific bits */
317
318/* CM_CLKSTCTRL_GFX */
319#define OMAP3430ES1_CLKTRCTRL_GFX_SHIFT 0
320#define OMAP3430ES1_CLKTRCTRL_GFX_MASK (0x3 << 0)
321
322/* CM_CLKSTST_GFX */
323#define OMAP3430ES1_CLKACTIVITY_GFX (1 << 0)
324
325/* CM_FCLKEN_SGX */
326#define OMAP3430ES2_EN_SGX_SHIFT 1
327#define OMAP3430ES2_EN_SGX_MASK (1 << 1)
328
329/* CM_CLKSEL_SGX */
330#define OMAP3430ES2_CLKSEL_SGX_SHIFT 0
331#define OMAP3430ES2_CLKSEL_SGX_MASK (0x7 << 0)
332
333/* CM_FCLKEN_WKUP specific bits */
334#define OMAP3430ES2_EN_USIMOCP_SHIFT 9
335
336/* CM_ICLKEN_WKUP specific bits */
337#define OMAP3430_EN_WDT1 (1 << 4)
338#define OMAP3430_EN_WDT1_SHIFT 4
339#define OMAP3430_EN_32KSYNC (1 << 2)
340#define OMAP3430_EN_32KSYNC_SHIFT 2
341
342/* CM_IDLEST_WKUP specific bits */
343#define OMAP3430_ST_WDT2 (1 << 5)
344#define OMAP3430_ST_WDT1 (1 << 4)
345#define OMAP3430_ST_32KSYNC (1 << 2)
346
347/* CM_AUTOIDLE_WKUP */
348#define OMAP3430_AUTO_WDT2 (1 << 5)
349#define OMAP3430_AUTO_WDT2_SHIFT 5
350#define OMAP3430_AUTO_WDT1 (1 << 4)
351#define OMAP3430_AUTO_WDT1_SHIFT 4
352#define OMAP3430_AUTO_GPIO1 (1 << 3)
353#define OMAP3430_AUTO_GPIO1_SHIFT 3
354#define OMAP3430_AUTO_32KSYNC (1 << 2)
355#define OMAP3430_AUTO_32KSYNC_SHIFT 2
356#define OMAP3430_AUTO_GPT12 (1 << 1)
357#define OMAP3430_AUTO_GPT12_SHIFT 1
358#define OMAP3430_AUTO_GPT1 (1 << 0)
359#define OMAP3430_AUTO_GPT1_SHIFT 0
360
361/* CM_CLKSEL_WKUP */
362#define OMAP3430ES2_CLKSEL_USIMOCP_MASK (0xf << 3)
363#define OMAP3430_CLKSEL_RM_SHIFT 1
364#define OMAP3430_CLKSEL_RM_MASK (0x3 << 1)
365#define OMAP3430_CLKSEL_GPT1_SHIFT 0
366#define OMAP3430_CLKSEL_GPT1_MASK (1 << 0)
367
368/* CM_CLKEN_PLL */
369#define OMAP3430_PWRDN_EMU_PERIPH_SHIFT 31
370#define OMAP3430_PWRDN_CAM_SHIFT 30
371#define OMAP3430_PWRDN_DSS1_SHIFT 29
372#define OMAP3430_PWRDN_TV_SHIFT 28
373#define OMAP3430_PWRDN_96M_SHIFT 27
374#define OMAP3430_PERIPH_DPLL_RAMPTIME_SHIFT 24
375#define OMAP3430_PERIPH_DPLL_RAMPTIME_MASK (0x3 << 24)
376#define OMAP3430_PERIPH_DPLL_FREQSEL_SHIFT 20
377#define OMAP3430_PERIPH_DPLL_FREQSEL_MASK (0xf << 20)
378#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT 19
379#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_MASK (1 << 19)
380#define OMAP3430_EN_PERIPH_DPLL_SHIFT 16
381#define OMAP3430_EN_PERIPH_DPLL_MASK (0x7 << 16)
382#define OMAP3430_PWRDN_EMU_CORE_SHIFT 12
383#define OMAP3430_CORE_DPLL_RAMPTIME_SHIFT 8
384#define OMAP3430_CORE_DPLL_RAMPTIME_MASK (0x3 << 8)
385#define OMAP3430_CORE_DPLL_FREQSEL_SHIFT 4
386#define OMAP3430_CORE_DPLL_FREQSEL_MASK (0xf << 4)
387#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT 3
388#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_MASK (1 << 3)
389#define OMAP3430_EN_CORE_DPLL_SHIFT 0
390#define OMAP3430_EN_CORE_DPLL_MASK (0x7 << 0)
391
392/* CM_CLKEN2_PLL */
393#define OMAP3430ES2_EN_PERIPH2_DPLL_LPMODE_SHIFT 10
394#define OMAP3430ES2_PERIPH2_DPLL_RAMPTIME_MASK (0x3 << 8)
395#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_SHIFT 4
396#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK (0xf << 4)
397#define OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT 3
398#define OMAP3430ES2_EN_PERIPH2_DPLL_SHIFT 0
399#define OMAP3430ES2_EN_PERIPH2_DPLL_MASK (0x7 << 0)
400
401/* CM_IDLEST_CKGEN */
402#define OMAP3430_ST_54M_CLK (1 << 5)
403#define OMAP3430_ST_12M_CLK (1 << 4)
404#define OMAP3430_ST_48M_CLK (1 << 3)
405#define OMAP3430_ST_96M_CLK (1 << 2)
406#define OMAP3430_ST_PERIPH_CLK (1 << 1)
407#define OMAP3430_ST_CORE_CLK (1 << 0)
408
409/* CM_IDLEST2_CKGEN */
410#define OMAP3430ES2_ST_120M_CLK_SHIFT 1
411#define OMAP3430ES2_ST_120M_CLK_MASK (1 << 1)
412#define OMAP3430ES2_ST_PERIPH2_CLK_SHIFT 0
413#define OMAP3430ES2_ST_PERIPH2_CLK_MASK (1 << 0)
414
415/* CM_AUTOIDLE_PLL */
416#define OMAP3430_AUTO_PERIPH_DPLL_SHIFT 3
417#define OMAP3430_AUTO_PERIPH_DPLL_MASK (0x7 << 3)
418#define OMAP3430_AUTO_CORE_DPLL_SHIFT 0
419#define OMAP3430_AUTO_CORE_DPLL_MASK (0x7 << 0)
420
421/* CM_CLKSEL1_PLL */
422/* Note that OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK was (0x3 << 27) on 3430ES1 */
423#define OMAP3430_CORE_DPLL_CLKOUT_DIV_SHIFT 27
424#define OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK (0x1f << 27)
425#define OMAP3430_CORE_DPLL_MULT_SHIFT 16
426#define OMAP3430_CORE_DPLL_MULT_MASK (0x7ff << 16)
427#define OMAP3430_CORE_DPLL_DIV_SHIFT 8
428#define OMAP3430_CORE_DPLL_DIV_MASK (0x7f << 8)
429#define OMAP3430_SOURCE_54M (1 << 5)
430#define OMAP3430_SOURCE_48M (1 << 3)
431
432/* CM_CLKSEL2_PLL */
433#define OMAP3430_PERIPH_DPLL_MULT_SHIFT 8
434#define OMAP3430_PERIPH_DPLL_MULT_MASK (0x7ff << 8)
435#define OMAP3430_PERIPH_DPLL_DIV_SHIFT 0
436#define OMAP3430_PERIPH_DPLL_DIV_MASK (0x7f << 0)
437
438/* CM_CLKSEL3_PLL */
439#define OMAP3430_DIV_96M_SHIFT 0
440#define OMAP3430_DIV_96M_MASK (0x1f << 0)
441
442/* CM_CLKSEL4_PLL */
443#define OMAP3430ES2_PERIPH2_DPLL_MULT_SHIFT 8
444#define OMAP3430ES2_PERIPH2_DPLL_MULT_MASK (0x7ff << 8)
445#define OMAP3430ES2_PERIPH2_DPLL_DIV_SHIFT 0
446#define OMAP3430ES2_PERIPH2_DPLL_DIV_MASK (0x7f << 0)
447
448/* CM_CLKSEL5_PLL */
449#define OMAP3430ES2_DIV_120M_SHIFT 0
450#define OMAP3430ES2_DIV_120M_MASK (0x1f << 0)
451
452/* CM_CLKOUT_CTRL */
453#define OMAP3430_CLKOUT2_EN_SHIFT 7
454#define OMAP3430_CLKOUT2_EN (1 << 7)
455#define OMAP3430_CLKOUT2_DIV_SHIFT 3
456#define OMAP3430_CLKOUT2_DIV_MASK (0x7 << 3)
457#define OMAP3430_CLKOUT2SOURCE_SHIFT 0
458#define OMAP3430_CLKOUT2SOURCE_MASK (0x3 << 0)
459
460/* CM_FCLKEN_DSS */
461#define OMAP3430_EN_TV (1 << 2)
462#define OMAP3430_EN_TV_SHIFT 2
463#define OMAP3430_EN_DSS2 (1 << 1)
464#define OMAP3430_EN_DSS2_SHIFT 1
465#define OMAP3430_EN_DSS1 (1 << 0)
466#define OMAP3430_EN_DSS1_SHIFT 0
467
468/* CM_ICLKEN_DSS */
469#define OMAP3430_CM_ICLKEN_DSS_EN_DSS (1 << 0)
470#define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0
471
472/* CM_IDLEST_DSS */
473#define OMAP3430_ST_DSS (1 << 0)
474
475/* CM_AUTOIDLE_DSS */
476#define OMAP3430_AUTO_DSS (1 << 0)
477#define OMAP3430_AUTO_DSS_SHIFT 0
478
479/* CM_CLKSEL_DSS */
480#define OMAP3430_CLKSEL_TV_SHIFT 8
481#define OMAP3430_CLKSEL_TV_MASK (0x1f << 8)
482#define OMAP3430_CLKSEL_DSS1_SHIFT 0
483#define OMAP3430_CLKSEL_DSS1_MASK (0x1f << 0)
484
485/* CM_SLEEPDEP_DSS specific bits */
486
487/* CM_CLKSTCTRL_DSS */
488#define OMAP3430_CLKTRCTRL_DSS_SHIFT 0
489#define OMAP3430_CLKTRCTRL_DSS_MASK (0x3 << 0)
490
491/* CM_CLKSTST_DSS */
492#define OMAP3430_CLKACTIVITY_DSS (1 << 0)
493
494/* CM_FCLKEN_CAM specific bits */
495
496/* CM_ICLKEN_CAM specific bits */
497
498/* CM_IDLEST_CAM */
499#define OMAP3430_ST_CAM (1 << 0)
500
501/* CM_AUTOIDLE_CAM */
502#define OMAP3430_AUTO_CAM (1 << 0)
503#define OMAP3430_AUTO_CAM_SHIFT 0
504
505/* CM_CLKSEL_CAM */
506#define OMAP3430_CLKSEL_CAM_SHIFT 0
507#define OMAP3430_CLKSEL_CAM_MASK (0x1f << 0)
508
509/* CM_SLEEPDEP_CAM specific bits */
510
511/* CM_CLKSTCTRL_CAM */
512#define OMAP3430_CLKTRCTRL_CAM_SHIFT 0
513#define OMAP3430_CLKTRCTRL_CAM_MASK (0x3 << 0)
514
515/* CM_CLKSTST_CAM */
516#define OMAP3430_CLKACTIVITY_CAM (1 << 0)
517
518/* CM_FCLKEN_PER specific bits */
519
520/* CM_ICLKEN_PER specific bits */
521
522/* CM_IDLEST_PER */
523#define OMAP3430_ST_WDT3 (1 << 12)
524#define OMAP3430_ST_MCBSP4 (1 << 2)
525#define OMAP3430_ST_MCBSP3 (1 << 1)
526#define OMAP3430_ST_MCBSP2 (1 << 0)
527
528/* CM_AUTOIDLE_PER */
529#define OMAP3430_AUTO_GPIO6 (1 << 17)
530#define OMAP3430_AUTO_GPIO6_SHIFT 17
531#define OMAP3430_AUTO_GPIO5 (1 << 16)
532#define OMAP3430_AUTO_GPIO5_SHIFT 16
533#define OMAP3430_AUTO_GPIO4 (1 << 15)
534#define OMAP3430_AUTO_GPIO4_SHIFT 15
535#define OMAP3430_AUTO_GPIO3 (1 << 14)
536#define OMAP3430_AUTO_GPIO3_SHIFT 14
537#define OMAP3430_AUTO_GPIO2 (1 << 13)
538#define OMAP3430_AUTO_GPIO2_SHIFT 13
539#define OMAP3430_AUTO_WDT3 (1 << 12)
540#define OMAP3430_AUTO_WDT3_SHIFT 12
541#define OMAP3430_AUTO_UART3 (1 << 11)
542#define OMAP3430_AUTO_UART3_SHIFT 11
543#define OMAP3430_AUTO_GPT9 (1 << 10)
544#define OMAP3430_AUTO_GPT9_SHIFT 10
545#define OMAP3430_AUTO_GPT8 (1 << 9)
546#define OMAP3430_AUTO_GPT8_SHIFT 9
547#define OMAP3430_AUTO_GPT7 (1 << 8)
548#define OMAP3430_AUTO_GPT7_SHIFT 8
549#define OMAP3430_AUTO_GPT6 (1 << 7)
550#define OMAP3430_AUTO_GPT6_SHIFT 7
551#define OMAP3430_AUTO_GPT5 (1 << 6)
552#define OMAP3430_AUTO_GPT5_SHIFT 6
553#define OMAP3430_AUTO_GPT4 (1 << 5)
554#define OMAP3430_AUTO_GPT4_SHIFT 5
555#define OMAP3430_AUTO_GPT3 (1 << 4)
556#define OMAP3430_AUTO_GPT3_SHIFT 4
557#define OMAP3430_AUTO_GPT2 (1 << 3)
558#define OMAP3430_AUTO_GPT2_SHIFT 3
559#define OMAP3430_AUTO_MCBSP4 (1 << 2)
560#define OMAP3430_AUTO_MCBSP4_SHIFT 2
561#define OMAP3430_AUTO_MCBSP3 (1 << 1)
562#define OMAP3430_AUTO_MCBSP3_SHIFT 1
563#define OMAP3430_AUTO_MCBSP2 (1 << 0)
564#define OMAP3430_AUTO_MCBSP2_SHIFT 0
565
566/* CM_CLKSEL_PER */
567#define OMAP3430_CLKSEL_GPT9_MASK (1 << 7)
568#define OMAP3430_CLKSEL_GPT9_SHIFT 7
569#define OMAP3430_CLKSEL_GPT8_MASK (1 << 6)
570#define OMAP3430_CLKSEL_GPT8_SHIFT 6
571#define OMAP3430_CLKSEL_GPT7_MASK (1 << 5)
572#define OMAP3430_CLKSEL_GPT7_SHIFT 5
573#define OMAP3430_CLKSEL_GPT6_MASK (1 << 4)
574#define OMAP3430_CLKSEL_GPT6_SHIFT 4
575#define OMAP3430_CLKSEL_GPT5_MASK (1 << 3)
576#define OMAP3430_CLKSEL_GPT5_SHIFT 3
577#define OMAP3430_CLKSEL_GPT4_MASK (1 << 2)
578#define OMAP3430_CLKSEL_GPT4_SHIFT 2
579#define OMAP3430_CLKSEL_GPT3_MASK (1 << 1)
580#define OMAP3430_CLKSEL_GPT3_SHIFT 1
581#define OMAP3430_CLKSEL_GPT2_MASK (1 << 0)
582#define OMAP3430_CLKSEL_GPT2_SHIFT 0
583
584/* CM_SLEEPDEP_PER specific bits */
585#define OMAP3430_CM_SLEEPDEP_PER_EN_IVA2 (1 << 2)
586
587/* CM_CLKSTCTRL_PER */
588#define OMAP3430_CLKTRCTRL_PER_SHIFT 0
589#define OMAP3430_CLKTRCTRL_PER_MASK (0x3 << 0)
590
591/* CM_CLKSTST_PER */
592#define OMAP3430_CLKACTIVITY_PER (1 << 0)
593
594/* CM_CLKSEL1_EMU */
595#define OMAP3430_DIV_DPLL4_SHIFT 24
596#define OMAP3430_DIV_DPLL4_MASK (0x1f << 24)
597#define OMAP3430_DIV_DPLL3_SHIFT 16
598#define OMAP3430_DIV_DPLL3_MASK (0x1f << 16)
599#define OMAP3430_CLKSEL_TRACECLK_SHIFT 11
600#define OMAP3430_CLKSEL_TRACECLK_MASK (0x7 << 11)
601#define OMAP3430_CLKSEL_PCLK_SHIFT 8
602#define OMAP3430_CLKSEL_PCLK_MASK (0x7 << 8)
603#define OMAP3430_CLKSEL_PCLKX2_SHIFT 6
604#define OMAP3430_CLKSEL_PCLKX2_MASK (0x3 << 6)
605#define OMAP3430_CLKSEL_ATCLK_SHIFT 4
606#define OMAP3430_CLKSEL_ATCLK_MASK (0x3 << 4)
607#define OMAP3430_TRACE_MUX_CTRL_SHIFT 2
608#define OMAP3430_TRACE_MUX_CTRL_MASK (0x3 << 2)
609#define OMAP3430_MUX_CTRL_SHIFT 0
610#define OMAP3430_MUX_CTRL_MASK (0x3 << 0)
611
612/* CM_CLKSTCTRL_EMU */
613#define OMAP3430_CLKTRCTRL_EMU_SHIFT 0
614#define OMAP3430_CLKTRCTRL_EMU_MASK (0x3 << 0)
615
616/* CM_CLKSTST_EMU */
617#define OMAP3430_CLKACTIVITY_EMU (1 << 0)
618
619/* CM_CLKSEL2_EMU specific bits */
620#define OMAP3430_CORE_DPLL_EMU_MULT_SHIFT 8
621#define OMAP3430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8)
622#define OMAP3430_CORE_DPLL_EMU_DIV_SHIFT 0
623#define OMAP3430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0)
624
625/* CM_CLKSEL3_EMU specific bits */
626#define OMAP3430_PERIPH_DPLL_EMU_MULT_SHIFT 8
627#define OMAP3430_PERIPH_DPLL_EMU_MULT_MASK (0x7ff << 8)
628#define OMAP3430_PERIPH_DPLL_EMU_DIV_SHIFT 0
629#define OMAP3430_PERIPH_DPLL_EMU_DIV_MASK (0x7f << 0)
630
631/* CM_POLCTRL */
632#define OMAP3430_CLKOUT2_POL (1 << 0)
633
634/* CM_IDLEST_NEON */
635#define OMAP3430_ST_NEON (1 << 0)
636
637/* CM_CLKSTCTRL_NEON */
638#define OMAP3430_CLKTRCTRL_NEON_SHIFT 0
639#define OMAP3430_CLKTRCTRL_NEON_MASK (0x3 << 0)
640
641/* CM_FCLKEN_USBHOST */
642#define OMAP3430ES2_EN_USBHOST2_SHIFT 1
643#define OMAP3430ES2_EN_USBHOST2_MASK (1 << 1)
644#define OMAP3430ES2_EN_USBHOST1_SHIFT 0
645#define OMAP3430ES2_EN_USBHOST1_MASK (1 << 0)
646
647/* CM_ICLKEN_USBHOST */
648#define OMAP3430ES2_EN_USBHOST_SHIFT 0
649#define OMAP3430ES2_EN_USBHOST_MASK (1 << 0)
650
651/* CM_IDLEST_USBHOST */
652
653/* CM_AUTOIDLE_USBHOST */
654#define OMAP3430ES2_AUTO_USBHOST_SHIFT 0
655#define OMAP3430ES2_AUTO_USBHOST_MASK (1 << 0)
656
657/* CM_SLEEPDEP_USBHOST */
658#define OMAP3430ES2_EN_MPU_SHIFT 1
659#define OMAP3430ES2_EN_MPU_MASK (1 << 1)
660#define OMAP3430ES2_EN_IVA2_SHIFT 2
661#define OMAP3430ES2_EN_IVA2_MASK (1 << 2)
662
663/* CM_CLKSTCTRL_USBHOST */
664#define OMAP3430ES2_CLKTRCTRL_USBHOST_SHIFT 0
665#define OMAP3430ES2_CLKTRCTRL_USBHOST_MASK (3 << 0)
666
667
668
669#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
new file mode 100644
index 000000000000..b4686bc345ca
--- /dev/null
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -0,0 +1,582 @@
1#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_34XX_H
2#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_34XX_H
3
4/*
5 * OMAP3430 Power/Reset Management register bits
6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include "prm.h"
18
19/* Shared register bits */
20
21/* PRM_VC_CMD_VAL_0, PRM_VC_CMD_VAL_1 shared bits */
22#define OMAP3430_ON_SHIFT 24
23#define OMAP3430_ON_MASK (0xff << 24)
24#define OMAP3430_ONLP_SHIFT 16
25#define OMAP3430_ONLP_MASK (0xff << 16)
26#define OMAP3430_RET_SHIFT 8
27#define OMAP3430_RET_MASK (0xff << 8)
28#define OMAP3430_OFF_SHIFT 0
29#define OMAP3430_OFF_MASK (0xff << 0)
30
31/* PRM_VP1_CONFIG, PRM_VP2_CONFIG shared bits */
32#define OMAP3430_ERROROFFSET_SHIFT 24
33#define OMAP3430_ERROROFFSET_MASK (0xff << 24)
34#define OMAP3430_ERRORGAIN_SHIFT 16
35#define OMAP3430_ERRORGAIN_MASK (0xff << 16)
36#define OMAP3430_INITVOLTAGE_SHIFT 8
37#define OMAP3430_INITVOLTAGE_MASK (0xff << 8)
38#define OMAP3430_TIMEOUTEN (1 << 3)
39#define OMAP3430_INITVDD (1 << 2)
40#define OMAP3430_FORCEUPDATE (1 << 1)
41#define OMAP3430_VPENABLE (1 << 0)
42
43/* PRM_VP1_VSTEPMIN, PRM_VP2_VSTEPMIN shared bits */
44#define OMAP3430_SMPSWAITTIMEMIN_SHIFT 8
45#define OMAP3430_SMPSWAITTIMEMIN_MASK (0xffff << 8)
46#define OMAP3430_VSTEPMIN_SHIFT 0
47#define OMAP3430_VSTEPMIN_MASK (0xff << 0)
48
49/* PRM_VP1_VSTEPMAX, PRM_VP2_VSTEPMAX shared bits */
50#define OMAP3430_SMPSWAITTIMEMAX_SHIFT 8
51#define OMAP3430_SMPSWAITTIMEMAX_MASK (0xffff << 8)
52#define OMAP3430_VSTEPMAX_SHIFT 0
53#define OMAP3430_VSTEPMAX_MASK (0xff << 0)
54
55/* PRM_VP1_VLIMITTO, PRM_VP2_VLIMITTO shared bits */
56#define OMAP3430_VDDMAX_SHIFT 24
57#define OMAP3430_VDDMAX_MASK (0xff << 24)
58#define OMAP3430_VDDMIN_SHIFT 16
59#define OMAP3430_VDDMIN_MASK (0xff << 16)
60#define OMAP3430_TIMEOUT_SHIFT 0
61#define OMAP3430_TIMEOUT_MASK (0xffff << 0)
62
63/* PRM_VP1_VOLTAGE, PRM_VP2_VOLTAGE shared bits */
64#define OMAP3430_VPVOLTAGE_SHIFT 0
65#define OMAP3430_VPVOLTAGE_MASK (0xff << 0)
66
67/* PRM_VP1_STATUS, PRM_VP2_STATUS shared bits */
68#define OMAP3430_VPINIDLE (1 << 0)
69
70/* PM_WKDEP_IVA2, PM_WKDEP_MPU shared bits */
71#define OMAP3430_EN_PER (1 << 7)
72
73/* PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE shared bits */
74#define OMAP3430_MEMORYCHANGE (1 << 3)
75
76/* PM_PWSTST_IVA2, PM_PWSTST_CORE shared bits */
77#define OMAP3430_LOGICSTATEST (1 << 2)
78
79/* PM_PREPWSTST_IVA2, PM_PREPWSTST_CORE shared bits */
80#define OMAP3430_LASTLOGICSTATEENTERED (1 << 2)
81
82/*
83 * PM_PREPWSTST_IVA2, PM_PREPWSTST_MPU, PM_PREPWSTST_CORE,
84 * PM_PREPWSTST_GFX, PM_PREPWSTST_DSS, PM_PREPWSTST_CAM,
85 * PM_PREPWSTST_PER, PM_PREPWSTST_NEON shared bits
86 */
87#define OMAP3430_LASTPOWERSTATEENTERED_SHIFT 0
88#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
89
90/* PRM_IRQSTATUS_IVA2, PRM_IRQSTATUS_MPU shared bits */
91#define OMAP3430_WKUP_ST (1 << 0)
92
93/* PRM_IRQENABLE_IVA2, PRM_IRQENABLE_MPU shared bits */
94#define OMAP3430_WKUP_EN (1 << 0)
95
96/* PM_MPUGRPSEL1_CORE, PM_IVA2GRPSEL1_CORE shared bits */
97#define OMAP3430_GRPSEL_MMC2 (1 << 25)
98#define OMAP3430_GRPSEL_MMC1 (1 << 24)
99#define OMAP3430_GRPSEL_MCSPI4 (1 << 21)
100#define OMAP3430_GRPSEL_MCSPI3 (1 << 20)
101#define OMAP3430_GRPSEL_MCSPI2 (1 << 19)
102#define OMAP3430_GRPSEL_MCSPI1 (1 << 18)
103#define OMAP3430_GRPSEL_I2C3 (1 << 17)
104#define OMAP3430_GRPSEL_I2C2 (1 << 16)
105#define OMAP3430_GRPSEL_I2C1 (1 << 15)
106#define OMAP3430_GRPSEL_UART2 (1 << 14)
107#define OMAP3430_GRPSEL_UART1 (1 << 13)
108#define OMAP3430_GRPSEL_GPT11 (1 << 12)
109#define OMAP3430_GRPSEL_GPT10 (1 << 11)
110#define OMAP3430_GRPSEL_MCBSP5 (1 << 10)
111#define OMAP3430_GRPSEL_MCBSP1 (1 << 9)
112#define OMAP3430_GRPSEL_HSOTGUSB (1 << 4)
113#define OMAP3430_GRPSEL_D2D (1 << 3)
114
115/*
116 * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM,
117 * PM_PWSTCTRL_PER shared bits
118 */
119#define OMAP3430_MEMONSTATE_SHIFT 16
120#define OMAP3430_MEMONSTATE_MASK (0x3 << 16)
121#define OMAP3430_MEMRETSTATE (1 << 8)
122
123/* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */
124#define OMAP3430_GRPSEL_GPIO6 (1 << 17)
125#define OMAP3430_GRPSEL_GPIO5 (1 << 16)
126#define OMAP3430_GRPSEL_GPIO4 (1 << 15)
127#define OMAP3430_GRPSEL_GPIO3 (1 << 14)
128#define OMAP3430_GRPSEL_GPIO2 (1 << 13)
129#define OMAP3430_GRPSEL_UART3 (1 << 11)
130#define OMAP3430_GRPSEL_GPT9 (1 << 10)
131#define OMAP3430_GRPSEL_GPT8 (1 << 9)
132#define OMAP3430_GRPSEL_GPT7 (1 << 8)
133#define OMAP3430_GRPSEL_GPT6 (1 << 7)
134#define OMAP3430_GRPSEL_GPT5 (1 << 6)
135#define OMAP3430_GRPSEL_GPT4 (1 << 5)
136#define OMAP3430_GRPSEL_GPT3 (1 << 4)
137#define OMAP3430_GRPSEL_GPT2 (1 << 3)
138#define OMAP3430_GRPSEL_MCBSP4 (1 << 2)
139#define OMAP3430_GRPSEL_MCBSP3 (1 << 1)
140#define OMAP3430_GRPSEL_MCBSP2 (1 << 0)
141
142/* PM_MPUGRPSEL_WKUP, PM_IVA2GRPSEL_WKUP shared bits */
143#define OMAP3430_GRPSEL_IO (1 << 8)
144#define OMAP3430_GRPSEL_SR2 (1 << 7)
145#define OMAP3430_GRPSEL_SR1 (1 << 6)
146#define OMAP3430_GRPSEL_GPIO1 (1 << 3)
147#define OMAP3430_GRPSEL_GPT12 (1 << 1)
148#define OMAP3430_GRPSEL_GPT1 (1 << 0)
149
150/* Bits specific to each register */
151
152/* RM_RSTCTRL_IVA2 */
153#define OMAP3430_RST3_IVA2 (1 << 2)
154#define OMAP3430_RST2_IVA2 (1 << 1)
155#define OMAP3430_RST1_IVA2 (1 << 0)
156
157/* RM_RSTST_IVA2 specific bits */
158#define OMAP3430_EMULATION_VSEQ_RST (1 << 13)
159#define OMAP3430_EMULATION_VHWA_RST (1 << 12)
160#define OMAP3430_EMULATION_IVA2_RST (1 << 11)
161#define OMAP3430_IVA2_SW_RST3 (1 << 10)
162#define OMAP3430_IVA2_SW_RST2 (1 << 9)
163#define OMAP3430_IVA2_SW_RST1 (1 << 8)
164
165/* PM_WKDEP_IVA2 specific bits */
166
167/* PM_PWSTCTRL_IVA2 specific bits */
168#define OMAP3430_L2FLATMEMONSTATE_SHIFT 22
169#define OMAP3430_L2FLATMEMONSTATE_MASK (0x3 << 22)
170#define OMAP3430_SHAREDL2CACHEFLATONSTATE_SHIFT 20
171#define OMAP3430_SHAREDL2CACHEFLATONSTATE_MASK (0x3 << 20)
172#define OMAP3430_L1FLATMEMONSTATE_SHIFT 18
173#define OMAP3430_L1FLATMEMONSTATE_MASK (0x3 << 18)
174#define OMAP3430_SHAREDL1CACHEFLATONSTATE_SHIFT 16
175#define OMAP3430_SHAREDL1CACHEFLATONSTATE_MASK (0x3 << 16)
176#define OMAP3430_L2FLATMEMRETSTATE (1 << 11)
177#define OMAP3430_SHAREDL2CACHEFLATRETSTATE (1 << 10)
178#define OMAP3430_L1FLATMEMRETSTATE (1 << 9)
179#define OMAP3430_SHAREDL1CACHEFLATRETSTATE (1 << 8)
180
181/* PM_PWSTST_IVA2 specific bits */
182#define OMAP3430_L2FLATMEMSTATEST_SHIFT 10
183#define OMAP3430_L2FLATMEMSTATEST_MASK (0x3 << 10)
184#define OMAP3430_SHAREDL2CACHEFLATSTATEST_SHIFT 8
185#define OMAP3430_SHAREDL2CACHEFLATSTATEST_MASK (0x3 << 8)
186#define OMAP3430_L1FLATMEMSTATEST_SHIFT 6
187#define OMAP3430_L1FLATMEMSTATEST_MASK (0x3 << 6)
188#define OMAP3430_SHAREDL1CACHEFLATSTATEST_SHIFT 4
189#define OMAP3430_SHAREDL1CACHEFLATSTATEST_MASK (0x3 << 4)
190
191/* PM_PREPWSTST_IVA2 specific bits */
192#define OMAP3430_LASTL2FLATMEMSTATEENTERED_SHIFT 10
193#define OMAP3430_LASTL2FLATMEMSTATEENTERED_MASK (0x3 << 10)
194#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_SHIFT 8
195#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_MASK (0x3 << 8)
196#define OMAP3430_LASTL1FLATMEMSTATEENTERED_SHIFT 6
197#define OMAP3430_LASTL1FLATMEMSTATEENTERED_MASK (0x3 << 6)
198#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_SHIFT 4
199#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_MASK (0x3 << 4)
200
201/* PRM_IRQSTATUS_IVA2 specific bits */
202#define OMAP3430_PRM_IRQSTATUS_IVA2_IVA2_DPLL_ST (1 << 2)
203#define OMAP3430_FORCEWKUP_ST (1 << 1)
204
205/* PRM_IRQENABLE_IVA2 specific bits */
206#define OMAP3430_PRM_IRQENABLE_IVA2_IVA2_DPLL_RECAL_EN (1 << 2)
207#define OMAP3430_FORCEWKUP_EN (1 << 1)
208
209/* PRM_REVISION specific bits */
210
211/* PRM_SYSCONFIG specific bits */
212
213/* PRM_IRQSTATUS_MPU specific bits */
214#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25
215#define OMAP3430ES2_SND_PERIPH_DPLL_ST (1 << 25)
216#define OMAP3430_VC_TIMEOUTERR_ST (1 << 24)
217#define OMAP3430_VC_RAERR_ST (1 << 23)
218#define OMAP3430_VC_SAERR_ST (1 << 22)
219#define OMAP3430_VP2_TRANXDONE_ST (1 << 21)
220#define OMAP3430_VP2_EQVALUE_ST (1 << 20)
221#define OMAP3430_VP2_NOSMPSACK_ST (1 << 19)
222#define OMAP3430_VP2_MAXVDD_ST (1 << 18)
223#define OMAP3430_VP2_MINVDD_ST (1 << 17)
224#define OMAP3430_VP2_OPPCHANGEDONE_ST (1 << 16)
225#define OMAP3430_VP1_TRANXDONE_ST (1 << 15)
226#define OMAP3430_VP1_EQVALUE_ST (1 << 14)
227#define OMAP3430_VP1_NOSMPSACK_ST (1 << 13)
228#define OMAP3430_VP1_MAXVDD_ST (1 << 12)
229#define OMAP3430_VP1_MINVDD_ST (1 << 11)
230#define OMAP3430_VP1_OPPCHANGEDONE_ST (1 << 10)
231#define OMAP3430_IO_ST (1 << 9)
232#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST (1 << 8)
233#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT 8
234#define OMAP3430_MPU_DPLL_ST (1 << 7)
235#define OMAP3430_MPU_DPLL_ST_SHIFT 7
236#define OMAP3430_PERIPH_DPLL_ST (1 << 6)
237#define OMAP3430_PERIPH_DPLL_ST_SHIFT 6
238#define OMAP3430_CORE_DPLL_ST (1 << 5)
239#define OMAP3430_CORE_DPLL_ST_SHIFT 5
240#define OMAP3430_TRANSITION_ST (1 << 4)
241#define OMAP3430_EVGENOFF_ST (1 << 3)
242#define OMAP3430_EVGENON_ST (1 << 2)
243#define OMAP3430_FS_USB_WKUP_ST (1 << 1)
244
245/* PRM_IRQENABLE_MPU specific bits */
246#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT 25
247#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN (1 << 25)
248#define OMAP3430_VC_TIMEOUTERR_EN (1 << 24)
249#define OMAP3430_VC_RAERR_EN (1 << 23)
250#define OMAP3430_VC_SAERR_EN (1 << 22)
251#define OMAP3430_VP2_TRANXDONE_EN (1 << 21)
252#define OMAP3430_VP2_EQVALUE_EN (1 << 20)
253#define OMAP3430_VP2_NOSMPSACK_EN (1 << 19)
254#define OMAP3430_VP2_MAXVDD_EN (1 << 18)
255#define OMAP3430_VP2_MINVDD_EN (1 << 17)
256#define OMAP3430_VP2_OPPCHANGEDONE_EN (1 << 16)
257#define OMAP3430_VP1_TRANXDONE_EN (1 << 15)
258#define OMAP3430_VP1_EQVALUE_EN (1 << 14)
259#define OMAP3430_VP1_NOSMPSACK_EN (1 << 13)
260#define OMAP3430_VP1_MAXVDD_EN (1 << 12)
261#define OMAP3430_VP1_MINVDD_EN (1 << 11)
262#define OMAP3430_VP1_OPPCHANGEDONE_EN (1 << 10)
263#define OMAP3430_IO_EN (1 << 9)
264#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN (1 << 8)
265#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT 8
266#define OMAP3430_MPU_DPLL_RECAL_EN (1 << 7)
267#define OMAP3430_MPU_DPLL_RECAL_EN_SHIFT 7
268#define OMAP3430_PERIPH_DPLL_RECAL_EN (1 << 6)
269#define OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT 6
270#define OMAP3430_CORE_DPLL_RECAL_EN (1 << 5)
271#define OMAP3430_CORE_DPLL_RECAL_EN_SHIFT 5
272#define OMAP3430_TRANSITION_EN (1 << 4)
273#define OMAP3430_EVGENOFF_EN (1 << 3)
274#define OMAP3430_EVGENON_EN (1 << 2)
275#define OMAP3430_FS_USB_WKUP_EN (1 << 1)
276
277/* RM_RSTST_MPU specific bits */
278#define OMAP3430_EMULATION_MPU_RST (1 << 11)
279
280/* PM_WKDEP_MPU specific bits */
281#define OMAP3430_PM_WKDEP_MPU_EN_DSS (1 << 5)
282#define OMAP3430_PM_WKDEP_MPU_EN_IVA2 (1 << 2)
283
284/* PM_EVGENCTRL_MPU */
285#define OMAP3430_OFFLOADMODE_SHIFT 3
286#define OMAP3430_OFFLOADMODE_MASK (0x3 << 3)
287#define OMAP3430_ONLOADMODE_SHIFT 1
288#define OMAP3430_ONLOADMODE_MASK (0x3 << 1)
289#define OMAP3430_ENABLE (1 << 0)
290
291/* PM_EVGENONTIM_MPU */
292#define OMAP3430_ONTIMEVAL_SHIFT 0
293#define OMAP3430_ONTIMEVAL_MASK (0xffffffff << 0)
294
295/* PM_EVGENOFFTIM_MPU */
296#define OMAP3430_OFFTIMEVAL_SHIFT 0
297#define OMAP3430_OFFTIMEVAL_MASK (0xffffffff << 0)
298
299/* PM_PWSTCTRL_MPU specific bits */
300#define OMAP3430_L2CACHEONSTATE_SHIFT 16
301#define OMAP3430_L2CACHEONSTATE_MASK (0x3 << 16)
302#define OMAP3430_L2CACHERETSTATE (1 << 8)
303#define OMAP3430_LOGICL1CACHERETSTATE (1 << 2)
304
305/* PM_PWSTST_MPU specific bits */
306#define OMAP3430_L2CACHESTATEST_SHIFT 6
307#define OMAP3430_L2CACHESTATEST_MASK (0x3 << 6)
308#define OMAP3430_LOGICL1CACHESTATEST (1 << 2)
309
310/* PM_PREPWSTST_MPU specific bits */
311#define OMAP3430_LASTL2CACHESTATEENTERED_SHIFT 6
312#define OMAP3430_LASTL2CACHESTATEENTERED_MASK (0x3 << 6)
313#define OMAP3430_LASTLOGICL1CACHESTATEENTERED (1 << 2)
314
315/* RM_RSTCTRL_CORE */
316#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON (1 << 1)
317#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST (1 << 0)
318
319/* RM_RSTST_CORE specific bits */
320#define OMAP3430_MODEM_SECURITY_VIOL_RST (1 << 10)
321#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RSTPWRON (1 << 9)
322#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RST (1 << 8)
323
324/* PM_WKEN1_CORE specific bits */
325
326/* PM_MPUGRPSEL1_CORE specific bits */
327#define OMAP3430_GRPSEL_FSHOSTUSB (1 << 5)
328
329/* PM_IVA2GRPSEL1_CORE specific bits */
330
331/* PM_WKST1_CORE specific bits */
332
333/* PM_PWSTCTRL_CORE specific bits */
334#define OMAP3430_MEM2ONSTATE_SHIFT 18
335#define OMAP3430_MEM2ONSTATE_MASK (0x3 << 18)
336#define OMAP3430_MEM1ONSTATE_SHIFT 16
337#define OMAP3430_MEM1ONSTATE_MASK (0x3 << 16)
338#define OMAP3430_MEM2RETSTATE (1 << 9)
339#define OMAP3430_MEM1RETSTATE (1 << 8)
340
341/* PM_PWSTST_CORE specific bits */
342#define OMAP3430_MEM2STATEST_SHIFT 6
343#define OMAP3430_MEM2STATEST_MASK (0x3 << 6)
344#define OMAP3430_MEM1STATEST_SHIFT 4
345#define OMAP3430_MEM1STATEST_MASK (0x3 << 4)
346
347/* PM_PREPWSTST_CORE specific bits */
348#define OMAP3430_LASTMEM2STATEENTERED_SHIFT 6
349#define OMAP3430_LASTMEM2STATEENTERED_MASK (0x3 << 6)
350#define OMAP3430_LASTMEM1STATEENTERED_SHIFT 4
351#define OMAP3430_LASTMEM1STATEENTERED_MASK (0x3 << 4)
352
353/* RM_RSTST_GFX specific bits */
354
355/* PM_WKDEP_GFX specific bits */
356#define OMAP3430_PM_WKDEP_GFX_EN_IVA2 (1 << 2)
357
358/* PM_PWSTCTRL_GFX specific bits */
359
360/* PM_PWSTST_GFX specific bits */
361
362/* PM_PREPWSTST_GFX specific bits */
363
364/* PM_WKEN_WKUP specific bits */
365#define OMAP3430_EN_IO (1 << 8)
366
367/* PM_MPUGRPSEL_WKUP specific bits */
368
369/* PM_IVA2GRPSEL_WKUP specific bits */
370
371/* PM_WKST_WKUP specific bits */
372#define OMAP3430_ST_IO (1 << 8)
373
374/* PRM_CLKSEL */
375#define OMAP3430_SYS_CLKIN_SEL_SHIFT 0
376#define OMAP3430_SYS_CLKIN_SEL_MASK (0x7 << 0)
377
378/* PRM_CLKOUT_CTRL */
379#define OMAP3430_CLKOUT_EN (1 << 7)
380#define OMAP3430_CLKOUT_EN_SHIFT 7
381
382/* RM_RSTST_DSS specific bits */
383
384/* PM_WKEN_DSS */
385#define OMAP3430_PM_WKEN_DSS_EN_DSS (1 << 0)
386
387/* PM_WKDEP_DSS specific bits */
388#define OMAP3430_PM_WKDEP_DSS_EN_IVA2 (1 << 2)
389
390/* PM_PWSTCTRL_DSS specific bits */
391
392/* PM_PWSTST_DSS specific bits */
393
394/* PM_PREPWSTST_DSS specific bits */
395
396/* RM_RSTST_CAM specific bits */
397
398/* PM_WKDEP_CAM specific bits */
399#define OMAP3430_PM_WKDEP_CAM_EN_IVA2 (1 << 2)
400
401/* PM_PWSTCTRL_CAM specific bits */
402
403/* PM_PWSTST_CAM specific bits */
404
405/* PM_PREPWSTST_CAM specific bits */
406
407/* PM_PWSTCTRL_USBHOST specific bits */
408#define OMAP3430ES2_SAVEANDRESTORE_SHIFT (1 << 4)
409
410/* RM_RSTST_PER specific bits */
411
412/* PM_WKEN_PER specific bits */
413
414/* PM_MPUGRPSEL_PER specific bits */
415
416/* PM_IVA2GRPSEL_PER specific bits */
417
418/* PM_WKST_PER specific bits */
419
420/* PM_WKDEP_PER specific bits */
421#define OMAP3430_PM_WKDEP_PER_EN_IVA2 (1 << 2)
422
423/* PM_PWSTCTRL_PER specific bits */
424
425/* PM_PWSTST_PER specific bits */
426
427/* PM_PREPWSTST_PER specific bits */
428
429/* RM_RSTST_EMU specific bits */
430
431/* PM_PWSTST_EMU specific bits */
432
433/* PRM_VC_SMPS_SA */
434#define OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT 16
435#define OMAP3430_PRM_VC_SMPS_SA_SA1_MASK (0x7f << 16)
436#define OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT 0
437#define OMAP3430_PRM_VC_SMPS_SA_SA0_MASK (0x7f << 0)
438
439/* PRM_VC_SMPS_VOL_RA */
440#define OMAP3430_VOLRA1_SHIFT 16
441#define OMAP3430_VOLRA1_MASK (0xff << 16)
442#define OMAP3430_VOLRA0_SHIFT 0
443#define OMAP3430_VOLRA0_MASK (0xff << 0)
444
445/* PRM_VC_SMPS_CMD_RA */
446#define OMAP3430_CMDRA1_SHIFT 16
447#define OMAP3430_CMDRA1_MASK (0xff << 16)
448#define OMAP3430_CMDRA0_SHIFT 0
449#define OMAP3430_CMDRA0_MASK (0xff << 0)
450
451/* PRM_VC_CMD_VAL_0 specific bits */
452
453/* PRM_VC_CMD_VAL_1 specific bits */
454
455/* PRM_VC_CH_CONF */
456#define OMAP3430_CMD1 (1 << 20)
457#define OMAP3430_RACEN1 (1 << 19)
458#define OMAP3430_RAC1 (1 << 18)
459#define OMAP3430_RAV1 (1 << 17)
460#define OMAP3430_PRM_VC_CH_CONF_SA1 (1 << 16)
461#define OMAP3430_CMD0 (1 << 4)
462#define OMAP3430_RACEN0 (1 << 3)
463#define OMAP3430_RAC0 (1 << 2)
464#define OMAP3430_RAV0 (1 << 1)
465#define OMAP3430_PRM_VC_CH_CONF_SA0 (1 << 0)
466
467/* PRM_VC_I2C_CFG */
468#define OMAP3430_HSMASTER (1 << 5)
469#define OMAP3430_SREN (1 << 4)
470#define OMAP3430_HSEN (1 << 3)
471#define OMAP3430_MCODE_SHIFT 0
472#define OMAP3430_MCODE_MASK (0x7 << 0)
473
474/* PRM_VC_BYPASS_VAL */
475#define OMAP3430_VALID (1 << 24)
476#define OMAP3430_DATA_SHIFT 16
477#define OMAP3430_DATA_MASK (0xff << 16)
478#define OMAP3430_REGADDR_SHIFT 8
479#define OMAP3430_REGADDR_MASK (0xff << 8)
480#define OMAP3430_SLAVEADDR_SHIFT 0
481#define OMAP3430_SLAVEADDR_MASK (0x7f << 0)
482
483/* PRM_RSTCTRL */
484#define OMAP3430_RST_DPLL3 (1 << 2)
485#define OMAP3430_RST_GS (1 << 1)
486
487/* PRM_RSTTIME */
488#define OMAP3430_RSTTIME2_SHIFT 8
489#define OMAP3430_RSTTIME2_MASK (0x1f << 8)
490#define OMAP3430_RSTTIME1_SHIFT 0
491#define OMAP3430_RSTTIME1_MASK (0xff << 0)
492
493/* PRM_RSTST */
494#define OMAP3430_ICECRUSHER_RST (1 << 10)
495#define OMAP3430_ICEPICK_RST (1 << 9)
496#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST (1 << 8)
497#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST (1 << 7)
498#define OMAP3430_EXTERNAL_WARM_RST (1 << 6)
499#define OMAP3430_SECURE_WD_RST (1 << 5)
500#define OMAP3430_MPU_WD_RST (1 << 4)
501#define OMAP3430_SECURITY_VIOL_RST (1 << 3)
502#define OMAP3430_GLOBAL_SW_RST (1 << 1)
503#define OMAP3430_GLOBAL_COLD_RST (1 << 0)
504
505/* PRM_VOLTCTRL */
506#define OMAP3430_SEL_VMODE (1 << 4)
507#define OMAP3430_SEL_OFF (1 << 3)
508#define OMAP3430_AUTO_OFF (1 << 2)
509#define OMAP3430_AUTO_RET (1 << 1)
510#define OMAP3430_AUTO_SLEEP (1 << 0)
511
512/* PRM_SRAM_PCHARGE */
513#define OMAP3430_PCHARGE_TIME_SHIFT 0
514#define OMAP3430_PCHARGE_TIME_MASK (0xff << 0)
515
516/* PRM_CLKSRC_CTRL */
517#define OMAP3430_SYSCLKDIV_SHIFT 6
518#define OMAP3430_SYSCLKDIV_MASK (0x3 << 6)
519#define OMAP3430_AUTOEXTCLKMODE_SHIFT 3
520#define OMAP3430_AUTOEXTCLKMODE_MASK (0x3 << 3)
521#define OMAP3430_SYSCLKSEL_SHIFT 0
522#define OMAP3430_SYSCLKSEL_MASK (0x3 << 0)
523
524/* PRM_VOLTSETUP1 */
525#define OMAP3430_SETUP_TIME2_SHIFT 16
526#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16)
527#define OMAP3430_SETUP_TIME1_SHIFT 0
528#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0)
529
530/* PRM_VOLTOFFSET */
531#define OMAP3430_OFFSET_TIME_SHIFT 0
532#define OMAP3430_OFFSET_TIME_MASK (0xffff << 0)
533
534/* PRM_CLKSETUP */
535#define OMAP3430_SETUP_TIME_SHIFT 0
536#define OMAP3430_SETUP_TIME_MASK (0xffff << 0)
537
538/* PRM_POLCTRL */
539#define OMAP3430_OFFMODE_POL (1 << 3)
540#define OMAP3430_CLKOUT_POL (1 << 2)
541#define OMAP3430_CLKREQ_POL (1 << 1)
542#define OMAP3430_EXTVOL_POL (1 << 0)
543
544/* PRM_VOLTSETUP2 */
545#define OMAP3430_OFFMODESETUPTIME_SHIFT 0
546#define OMAP3430_OFFMODESETUPTIME_MASK (0xffff << 0)
547
548/* PRM_VP1_CONFIG specific bits */
549
550/* PRM_VP1_VSTEPMIN specific bits */
551
552/* PRM_VP1_VSTEPMAX specific bits */
553
554/* PRM_VP1_VLIMITTO specific bits */
555
556/* PRM_VP1_VOLTAGE specific bits */
557
558/* PRM_VP1_STATUS specific bits */
559
560/* PRM_VP2_CONFIG specific bits */
561
562/* PRM_VP2_VSTEPMIN specific bits */
563
564/* PRM_VP2_VSTEPMAX specific bits */
565
566/* PRM_VP2_VLIMITTO specific bits */
567
568/* PRM_VP2_VOLTAGE specific bits */
569
570/* PRM_VP2_STATUS specific bits */
571
572/* RM_RSTST_NEON specific bits */
573
574/* PM_WKDEP_NEON specific bits */
575
576/* PM_PWSTCTRL_NEON specific bits */
577
578/* PM_PWSTST_NEON specific bits */
579
580/* PM_PREPWSTST_NEON specific bits */
581
582#endif