[ARM] OMAP3: update ES level flags to discriminate between post-ES2 revisions
[linux-ginger.git] / arch / arm / mach-omap2 / powerdomains34xx.h
blob78acfce8bbdcaeaf0cad400376fac7a1b324cc09
1 /*
2 * OMAP34XX powerdomain definitions
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2008 Nokia Corporation
7 * Written by Paul Walmsley
8 * Debugging and integration fixes by Jouni Högander
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
16 #define ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
19 * N.B. If powerdomains are added or removed from this file, update
20 * the array in mach-omap2/powerdomains.h.
23 #include <mach/powerdomain.h>
25 #include "prcm-common.h"
26 #include "prm.h"
27 #include "prm-regbits-34xx.h"
28 #include "cm.h"
29 #include "cm-regbits-34xx.h"
32 * 34XX-specific powerdomains, dependencies
35 #ifdef CONFIG_ARCH_OMAP34XX
38 * 3430: PM_WKDEP_{PER,USBHOST}: CORE, IVA2, MPU, WKUP
39 * (USBHOST is ES2 only)
41 static struct pwrdm_dep per_usbhost_wkdeps[] = {
43 .pwrdm_name = "core_pwrdm",
44 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
47 .pwrdm_name = "iva2_pwrdm",
48 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
51 .pwrdm_name = "mpu_pwrdm",
52 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
55 .pwrdm_name = "wkup_pwrdm",
56 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
58 { NULL },
62 * 3430 PM_WKDEP_MPU: CORE, IVA2, DSS, PER
64 static struct pwrdm_dep mpu_34xx_wkdeps[] = {
66 .pwrdm_name = "core_pwrdm",
67 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
70 .pwrdm_name = "iva2_pwrdm",
71 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
74 .pwrdm_name = "dss_pwrdm",
75 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
78 .pwrdm_name = "per_pwrdm",
79 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
81 { NULL },
85 * 3430 PM_WKDEP_IVA2: CORE, MPU, WKUP, DSS, PER
87 static struct pwrdm_dep iva2_wkdeps[] = {
89 .pwrdm_name = "core_pwrdm",
90 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
93 .pwrdm_name = "mpu_pwrdm",
94 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
97 .pwrdm_name = "wkup_pwrdm",
98 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
101 .pwrdm_name = "dss_pwrdm",
102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
105 .pwrdm_name = "per_pwrdm",
106 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
108 { NULL },
112 /* 3430 PM_WKDEP_{CAM,DSS}: IVA2, MPU, WKUP */
113 static struct pwrdm_dep cam_dss_wkdeps[] = {
115 .pwrdm_name = "iva2_pwrdm",
116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
119 .pwrdm_name = "mpu_pwrdm",
120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
123 .pwrdm_name = "wkup_pwrdm",
124 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
126 { NULL },
129 /* 3430: PM_WKDEP_NEON: MPU */
130 static struct pwrdm_dep neon_wkdeps[] = {
132 .pwrdm_name = "mpu_pwrdm",
133 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
135 { NULL },
139 /* Sleep dependency source arrays for 34xx-specific pwrdms - 34XX only */
142 * 3430: CM_SLEEPDEP_{DSS,PER}: MPU, IVA
143 * 3430ES2: CM_SLEEPDEP_USBHOST: MPU, IVA
145 static struct pwrdm_dep dss_per_usbhost_sleepdeps[] = {
147 .pwrdm_name = "mpu_pwrdm",
148 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
151 .pwrdm_name = "iva2_pwrdm",
152 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
154 { NULL },
159 * Powerdomains
162 static struct powerdomain iva2_pwrdm = {
163 .name = "iva2_pwrdm",
164 .prcm_offs = OMAP3430_IVA2_MOD,
165 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
166 .dep_bit = OMAP3430_PM_WKDEP_MPU_EN_IVA2_SHIFT,
167 .wkdep_srcs = iva2_wkdeps,
168 .pwrsts = PWRSTS_OFF_RET_ON,
169 .pwrsts_logic_ret = PWRSTS_OFF_RET,
170 .banks = 4,
171 .pwrsts_mem_ret = {
172 [0] = PWRSTS_OFF_RET,
173 [1] = PWRSTS_OFF_RET,
174 [2] = PWRSTS_OFF_RET,
175 [3] = PWRSTS_OFF_RET,
177 .pwrsts_mem_on = {
178 [0] = PWRDM_POWER_ON,
179 [1] = PWRDM_POWER_ON,
180 [2] = PWRSTS_OFF_ON,
181 [3] = PWRDM_POWER_ON,
185 static struct powerdomain mpu_34xx_pwrdm = {
186 .name = "mpu_pwrdm",
187 .prcm_offs = MPU_MOD,
188 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
189 .dep_bit = OMAP3430_EN_MPU_SHIFT,
190 .wkdep_srcs = mpu_34xx_wkdeps,
191 .pwrsts = PWRSTS_OFF_RET_ON,
192 .pwrsts_logic_ret = PWRSTS_OFF_RET,
193 .banks = 1,
194 .pwrsts_mem_ret = {
195 [0] = PWRSTS_OFF_RET,
197 .pwrsts_mem_on = {
198 [0] = PWRSTS_OFF_ON,
202 /* No wkdeps or sleepdeps for 34xx core apparently */
203 static struct powerdomain core_34xx_pwrdm = {
204 .name = "core_pwrdm",
205 .prcm_offs = CORE_MOD,
206 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
207 .pwrsts = PWRSTS_OFF_RET_ON,
208 .dep_bit = OMAP3430_EN_CORE_SHIFT,
209 .banks = 2,
210 .pwrsts_mem_ret = {
211 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
212 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
214 .pwrsts_mem_on = {
215 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
216 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
220 /* Another case of bit name collisions between several registers: EN_DSS */
221 static struct powerdomain dss_pwrdm = {
222 .name = "dss_pwrdm",
223 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
224 .prcm_offs = OMAP3430_DSS_MOD,
225 .dep_bit = OMAP3430_PM_WKDEP_MPU_EN_DSS_SHIFT,
226 .wkdep_srcs = cam_dss_wkdeps,
227 .sleepdep_srcs = dss_per_usbhost_sleepdeps,
228 .pwrsts = PWRSTS_OFF_RET_ON,
229 .pwrsts_logic_ret = PWRDM_POWER_RET,
230 .banks = 1,
231 .pwrsts_mem_ret = {
232 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
234 .pwrsts_mem_on = {
235 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
240 * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
241 * possible SGX powerstate, the SGX device itself does not support
242 * retention.
244 static struct powerdomain sgx_pwrdm = {
245 .name = "sgx_pwrdm",
246 .prcm_offs = OMAP3430ES2_SGX_MOD,
247 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
248 .wkdep_srcs = gfx_sgx_wkdeps,
249 .sleepdep_srcs = cam_gfx_sleepdeps,
250 /* XXX This is accurate for 3430 SGX, but what about GFX? */
251 .pwrsts = PWRSTS_OFF_ON,
252 .pwrsts_logic_ret = PWRDM_POWER_RET,
253 .banks = 1,
254 .pwrsts_mem_ret = {
255 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
257 .pwrsts_mem_on = {
258 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
262 static struct powerdomain cam_pwrdm = {
263 .name = "cam_pwrdm",
264 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
265 .prcm_offs = OMAP3430_CAM_MOD,
266 .wkdep_srcs = cam_dss_wkdeps,
267 .sleepdep_srcs = cam_gfx_sleepdeps,
268 .pwrsts = PWRSTS_OFF_RET_ON,
269 .pwrsts_logic_ret = PWRDM_POWER_RET,
270 .banks = 1,
271 .pwrsts_mem_ret = {
272 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
274 .pwrsts_mem_on = {
275 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
279 static struct powerdomain per_pwrdm = {
280 .name = "per_pwrdm",
281 .prcm_offs = OMAP3430_PER_MOD,
282 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
283 .dep_bit = OMAP3430_EN_PER_SHIFT,
284 .wkdep_srcs = per_usbhost_wkdeps,
285 .sleepdep_srcs = dss_per_usbhost_sleepdeps,
286 .pwrsts = PWRSTS_OFF_RET_ON,
287 .pwrsts_logic_ret = PWRSTS_OFF_RET,
288 .banks = 1,
289 .pwrsts_mem_ret = {
290 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
292 .pwrsts_mem_on = {
293 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
297 static struct powerdomain emu_pwrdm = {
298 .name = "emu_pwrdm",
299 .prcm_offs = OMAP3430_EMU_MOD,
300 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
303 static struct powerdomain neon_pwrdm = {
304 .name = "neon_pwrdm",
305 .prcm_offs = OMAP3430_NEON_MOD,
306 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
307 .wkdep_srcs = neon_wkdeps,
308 .pwrsts = PWRSTS_OFF_RET_ON,
309 .pwrsts_logic_ret = PWRDM_POWER_RET,
312 static struct powerdomain usbhost_pwrdm = {
313 .name = "usbhost_pwrdm",
314 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
315 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
316 .wkdep_srcs = per_usbhost_wkdeps,
317 .sleepdep_srcs = dss_per_usbhost_sleepdeps,
318 .pwrsts = PWRSTS_OFF_RET_ON,
319 .pwrsts_logic_ret = PWRDM_POWER_RET,
320 .flags = PWRDM_HAS_HDWR_SAR, /* for USBHOST ctrlr only */
321 .banks = 1,
322 .pwrsts_mem_ret = {
323 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
325 .pwrsts_mem_on = {
326 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
330 static struct powerdomain dpll1_pwrdm = {
331 .name = "dpll1_pwrdm",
332 .prcm_offs = MPU_MOD,
333 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
336 static struct powerdomain dpll2_pwrdm = {
337 .name = "dpll2_pwrdm",
338 .prcm_offs = OMAP3430_IVA2_MOD,
339 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
342 static struct powerdomain dpll3_pwrdm = {
343 .name = "dpll3_pwrdm",
344 .prcm_offs = PLL_MOD,
345 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
348 static struct powerdomain dpll4_pwrdm = {
349 .name = "dpll4_pwrdm",
350 .prcm_offs = PLL_MOD,
351 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
354 static struct powerdomain dpll5_pwrdm = {
355 .name = "dpll5_pwrdm",
356 .prcm_offs = PLL_MOD,
357 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
361 #endif /* CONFIG_ARCH_OMAP34XX */
364 #endif