blob: d646c9979c38a8f5e367cdf452b68b09f65f4849 [file] [log] [blame]
Paul Walmsley97171002008-08-19 11:08:40 +03001/*
2 * OMAP2/3 common powerdomain definitions
3 *
4 * Copyright (C) 2007-8 Texas Instruments, Inc.
5 * Copyright (C) 2007-8 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 * Debugging and integration fixes by Jouni Högander
9 *
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.
13 */
14
Abhijit Pagare38900c22010-01-26 20:12:52 -070015/*
16 * To Do List
17 * -> Move the Sleep/Wakeup dependencies from Power Domain framework to
18 * Clock Domain Framework
19 */
20
Paul Walmsley97171002008-08-19 11:08:40 +030021#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS
22#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS
23
24/*
25 * This file contains all of the powerdomains that have some element
26 * of software control for the OMAP24xx and OMAP34XX chips.
27 *
28 * A few notes:
29 *
30 * This is not an exhaustive listing of powerdomains on the chips; only
31 * powerdomains that can be controlled in software.
32 *
33 * A useful validation rule for struct powerdomain:
34 * Any powerdomain referenced by a wkdep_srcs or sleepdep_srcs array
35 * must have a dep_bit assigned. So wkdep_srcs/sleepdep_srcs are really
36 * just software-controllable dependencies. Non-software-controllable
37 * dependencies do exist, but they are not encoded below (yet).
38 *
39 * 24xx does not support programmable sleep dependencies (SLEEPDEP)
40 *
41 */
42
43/*
44 * The names for the DSP/IVA2 powerdomains are confusing.
45 *
46 * Most OMAP chips have an on-board DSP.
47 *
48 * On the 2420, this is a 'C55 DSP called, simply, the DSP. Its
49 * powerdomain is called the "DSP power domain." On the 2430, the
50 * on-board DSP is a 'C64 DSP, now called the IVA2 or IVA2.1. Its
51 * powerdomain is still called the "DSP power domain." On the 3430,
52 * the DSP is a 'C64 DSP like the 2430, also known as the IVA2; but
53 * its powerdomain is now called the "IVA2 power domain."
54 *
55 * The 2420 also has something called the IVA, which is a separate ARM
56 * core, and has nothing to do with the DSP/IVA2.
57 *
58 * Ideally the DSP/IVA2 could just be the same powerdomain, but the PRCM
59 * address offset is different between the C55 and C64 DSPs.
60 *
61 * The overly-specific dep_bit names are due to a bit name collision
62 * with CM_FCLKEN_{DSP,IVA2}. The DSP/IVA2 PM_WKDEP and CM_SLEEPDEP shift
63 * value are the same for all powerdomains: 2
64 */
65
66/*
67 * XXX should dep_bit be a mask, so we can test to see if it is 0 as a
68 * sanity check?
69 * XXX encode hardware fixed wakeup dependencies -- esp. for 3430 CORE
70 */
71
Tony Lindgrence491cf2009-10-20 09:40:47 -070072#include <plat/powerdomain.h>
Paul Walmsley97171002008-08-19 11:08:40 +030073
74#include "prcm-common.h"
75#include "prm.h"
76#include "cm.h"
77
78/* OMAP2/3-common powerdomains and wakeup dependencies */
79
Abhijit Pagare38900c22010-01-26 20:12:52 -070080#ifndef CONFIG_ARCH_OMAP4
Paul Walmsley97171002008-08-19 11:08:40 +030081/*
82 * 2420/2430 PM_WKDEP_GFX: CORE, MPU, WKUP
83 * 3430ES1 PM_WKDEP_GFX: adds IVA2, removes CORE
84 * 3430ES2 PM_WKDEP_SGX: adds IVA2, removes CORE
85 */
86static struct pwrdm_dep gfx_sgx_wkdeps[] = {
87 {
88 .pwrdm_name = "core_pwrdm",
89 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX)
90 },
91 {
92 .pwrdm_name = "iva2_pwrdm",
93 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
94 },
95 {
96 .pwrdm_name = "mpu_pwrdm",
97 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
98 CHIP_IS_OMAP3430)
99 },
100 {
101 .pwrdm_name = "wkup_pwrdm",
102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
103 CHIP_IS_OMAP3430)
104 },
105 { NULL },
106};
107
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300108/*
109 * 3430: CM_SLEEPDEP_CAM: MPU
110 * 3430ES1: CM_SLEEPDEP_GFX: MPU
111 * 3430ES2: CM_SLEEPDEP_SGX: MPU
112 */
113static struct pwrdm_dep cam_gfx_sleepdeps[] = {
114 {
115 .pwrdm_name = "mpu_pwrdm",
116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
117 },
118 { NULL },
119};
Abhijit Pagare38900c22010-01-26 20:12:52 -0700120#endif
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300121
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +0300122
123#include "powerdomains24xx.h"
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300124#include "powerdomains34xx.h"
Abhijit Pagare38900c22010-01-26 20:12:52 -0700125#include "powerdomains44xx.h"
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +0300126
127
Paul Walmsley97171002008-08-19 11:08:40 +0300128/*
129 * OMAP2/3 common powerdomains
130 */
131
Abhijit Pagare38900c22010-01-26 20:12:52 -0700132#if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX)
133
Paul Walmsley97171002008-08-19 11:08:40 +0300134/*
135 * The GFX powerdomain is not present on 3430ES2, but currently we do not
136 * have a macro to filter it out at compile-time.
137 */
Abhijit Pagare38900c22010-01-26 20:12:52 -0700138static struct powerdomain gfx_omap2_pwrdm = {
Paul Walmsley97171002008-08-19 11:08:40 +0300139 .name = "gfx_pwrdm",
140 .prcm_offs = GFX_MOD,
141 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX |
142 CHIP_IS_OMAP3430ES1),
143 .wkdep_srcs = gfx_sgx_wkdeps,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300144 .sleepdep_srcs = cam_gfx_sleepdeps,
Paul Walmsley97171002008-08-19 11:08:40 +0300145 .pwrsts = PWRSTS_OFF_RET_ON,
146 .pwrsts_logic_ret = PWRDM_POWER_RET,
147 .banks = 1,
148 .pwrsts_mem_ret = {
149 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
150 },
151 .pwrsts_mem_on = {
152 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
153 },
154};
155
Abhijit Pagare38900c22010-01-26 20:12:52 -0700156static struct powerdomain wkup_omap2_pwrdm = {
Paul Walmsley97171002008-08-19 11:08:40 +0300157 .name = "wkup_pwrdm",
158 .prcm_offs = WKUP_MOD,
159 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430),
160 .dep_bit = OMAP_EN_WKUP_SHIFT,
161};
162
Abhijit Pagare38900c22010-01-26 20:12:52 -0700163#endif
Paul Walmsley97171002008-08-19 11:08:40 +0300164
165
166/* As powerdomains are added or removed above, this list must also be changed */
167static struct powerdomain *powerdomains_omap[] __initdata = {
168
Abhijit Pagare38900c22010-01-26 20:12:52 -0700169#if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX)
170 &wkup_omap2_pwrdm,
171 &gfx_omap2_pwrdm,
172#endif
Paul Walmsley97171002008-08-19 11:08:40 +0300173
Paul Walmsleyfe6a58f2008-08-19 11:08:42 +0300174#ifdef CONFIG_ARCH_OMAP24XX
175 &dsp_pwrdm,
176 &mpu_24xx_pwrdm,
177 &core_24xx_pwrdm,
178#endif
179
180#ifdef CONFIG_ARCH_OMAP2430
181 &mdm_pwrdm,
182#endif
183
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300184#ifdef CONFIG_ARCH_OMAP34XX
185 &iva2_pwrdm,
186 &mpu_34xx_pwrdm,
187 &neon_pwrdm,
Paul Walmsley7eb1afc2009-02-05 20:45:28 -0700188 &core_34xx_pre_es3_1_pwrdm,
189 &core_34xx_es3_1_pwrdm,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300190 &cam_pwrdm,
191 &dss_pwrdm,
192 &per_pwrdm,
193 &emu_pwrdm,
194 &sgx_pwrdm,
195 &usbhost_pwrdm,
Paul Walmsley46e0ccf2009-01-27 19:44:18 -0700196 &dpll1_pwrdm,
197 &dpll2_pwrdm,
198 &dpll3_pwrdm,
199 &dpll4_pwrdm,
200 &dpll5_pwrdm,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300201#endif
202
Abhijit Pagare38900c22010-01-26 20:12:52 -0700203#ifdef CONFIG_ARCH_OMAP4
204 &core_44xx_pwrdm,
205 &gfx_44xx_pwrdm,
206 &abe_44xx_pwrdm,
207 &dss_44xx_pwrdm,
208 &tesla_44xx_pwrdm,
209 &wkup_44xx_pwrdm,
210 &cpu0_44xx_pwrdm,
211 &cpu1_44xx_pwrdm,
212 &emu_44xx_pwrdm,
213 &mpu_44xx_pwrdm,
214 &ivahd_44xx_pwrdm,
215 &cam_44xx_pwrdm,
216 &l3init_44xx_pwrdm,
217 &l4per_44xx_pwrdm,
218 &always_on_core_44xx_pwrdm,
219 &cefuse_44xx_pwrdm,
220#endif
Paul Walmsley97171002008-08-19 11:08:40 +0300221 NULL
222};
223
224
225#endif