blob: bd87112beea8e305609b5beb4048ed661a7258eb [file] [log] [blame]
Paul Walmsleyecb24aa2008-08-19 11:08:43 +03001/*
Paul Walmsley98fa3d82010-01-26 20:13:13 -07002 * OMAP3 powerdomain definitions
Paul Walmsleyecb24aa2008-08-19 11:08:43 +03003 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
Paul Walmsley98fa3d82010-01-26 20:13:13 -07005 * Copyright (C) 2007-2010 Nokia Corporation
Paul Walmsleyecb24aa2008-08-19 11:08:43 +03006 *
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
15#ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
16#define ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
17
18/*
19 * N.B. If powerdomains are added or removed from this file, update
20 * the array in mach-omap2/powerdomains.h.
21 */
22
Tony Lindgrence491cf2009-10-20 09:40:47 -070023#include <plat/powerdomain.h>
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030024
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"
30
31/*
32 * 34XX-specific powerdomains, dependencies
33 */
34
Paul Walmsley98fa3d82010-01-26 20:13:13 -070035#ifdef CONFIG_ARCH_OMAP3
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030036
37/*
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030038 * Powerdomains
39 */
40
41static struct powerdomain iva2_pwrdm = {
42 .name = "iva2_pwrdm",
43 .prcm_offs = OMAP3430_IVA2_MOD,
44 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030045 .pwrsts = PWRSTS_OFF_RET_ON,
46 .pwrsts_logic_ret = PWRSTS_OFF_RET,
47 .banks = 4,
48 .pwrsts_mem_ret = {
49 [0] = PWRSTS_OFF_RET,
50 [1] = PWRSTS_OFF_RET,
51 [2] = PWRSTS_OFF_RET,
52 [3] = PWRSTS_OFF_RET,
53 },
54 .pwrsts_mem_on = {
55 [0] = PWRDM_POWER_ON,
56 [1] = PWRDM_POWER_ON,
57 [2] = PWRSTS_OFF_ON,
58 [3] = PWRDM_POWER_ON,
59 },
60};
61
Paul Walmsley98fa3d82010-01-26 20:13:13 -070062static struct powerdomain mpu_3xxx_pwrdm = {
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030063 .name = "mpu_pwrdm",
64 .prcm_offs = MPU_MOD,
65 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030066 .pwrsts = PWRSTS_OFF_RET_ON,
67 .pwrsts_logic_ret = PWRSTS_OFF_RET,
Thara Gopinath3863c742009-12-08 16:33:15 -070068 .flags = PWRDM_HAS_MPU_QUIRK,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030069 .banks = 1,
70 .pwrsts_mem_ret = {
71 [0] = PWRSTS_OFF_RET,
72 },
73 .pwrsts_mem_on = {
74 [0] = PWRSTS_OFF_ON,
75 },
76};
77
Paul Walmsley98fa3d82010-01-26 20:13:13 -070078static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030079 .name = "core_pwrdm",
80 .prcm_offs = CORE_MOD,
Paul Walmsley7eb1afc2009-02-05 20:45:28 -070081 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
82 CHIP_IS_OMAP3430ES2 |
83 CHIP_IS_OMAP3430ES3_0),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030084 .pwrsts = PWRSTS_OFF_RET_ON,
Thara Gopinath4133a442010-02-24 12:05:50 -070085 .pwrsts_logic_ret = PWRSTS_OFF_RET,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030086 .banks = 2,
87 .pwrsts_mem_ret = {
88 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
89 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
90 },
91 .pwrsts_mem_on = {
92 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
93 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
94 },
95};
96
Paul Walmsley98fa3d82010-01-26 20:13:13 -070097static struct powerdomain core_3xxx_es3_1_pwrdm = {
Paul Walmsley7eb1afc2009-02-05 20:45:28 -070098 .name = "core_pwrdm",
99 .prcm_offs = CORE_MOD,
100 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES3_1),
101 .pwrsts = PWRSTS_OFF_RET_ON,
Thara Gopinath4133a442010-02-24 12:05:50 -0700102 .pwrsts_logic_ret = PWRSTS_OFF_RET,
Paul Walmsley7eb1afc2009-02-05 20:45:28 -0700103 .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
104 .banks = 2,
105 .pwrsts_mem_ret = {
106 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
107 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
108 },
109 .pwrsts_mem_on = {
110 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
111 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
112 },
113};
114
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300115static struct powerdomain dss_pwrdm = {
116 .name = "dss_pwrdm",
117 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
118 .prcm_offs = OMAP3430_DSS_MOD,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300119 .pwrsts = PWRSTS_OFF_RET_ON,
120 .pwrsts_logic_ret = PWRDM_POWER_RET,
121 .banks = 1,
122 .pwrsts_mem_ret = {
123 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
124 },
125 .pwrsts_mem_on = {
126 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
127 },
128};
129
Paul Walmsleybe48ea72009-01-27 19:44:28 -0700130/*
131 * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
132 * possible SGX powerstate, the SGX device itself does not support
133 * retention.
134 */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300135static struct powerdomain sgx_pwrdm = {
136 .name = "sgx_pwrdm",
137 .prcm_offs = OMAP3430ES2_SGX_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700138 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300139 /* XXX This is accurate for 3430 SGX, but what about GFX? */
Paul Walmsleybe48ea72009-01-27 19:44:28 -0700140 .pwrsts = PWRSTS_OFF_ON,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300141 .pwrsts_logic_ret = PWRDM_POWER_RET,
142 .banks = 1,
143 .pwrsts_mem_ret = {
144 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
145 },
146 .pwrsts_mem_on = {
147 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
148 },
149};
150
151static struct powerdomain cam_pwrdm = {
152 .name = "cam_pwrdm",
153 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
154 .prcm_offs = OMAP3430_CAM_MOD,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300155 .pwrsts = PWRSTS_OFF_RET_ON,
156 .pwrsts_logic_ret = PWRDM_POWER_RET,
157 .banks = 1,
158 .pwrsts_mem_ret = {
159 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
160 },
161 .pwrsts_mem_on = {
162 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
163 },
164};
165
166static struct powerdomain per_pwrdm = {
167 .name = "per_pwrdm",
168 .prcm_offs = OMAP3430_PER_MOD,
169 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300170 .pwrsts = PWRSTS_OFF_RET_ON,
171 .pwrsts_logic_ret = PWRSTS_OFF_RET,
172 .banks = 1,
173 .pwrsts_mem_ret = {
174 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
175 },
176 .pwrsts_mem_on = {
177 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
178 },
179};
180
181static struct powerdomain emu_pwrdm = {
182 .name = "emu_pwrdm",
183 .prcm_offs = OMAP3430_EMU_MOD,
184 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
185};
186
187static struct powerdomain neon_pwrdm = {
188 .name = "neon_pwrdm",
189 .prcm_offs = OMAP3430_NEON_MOD,
190 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300191 .pwrsts = PWRSTS_OFF_RET_ON,
192 .pwrsts_logic_ret = PWRDM_POWER_RET,
193};
194
195static struct powerdomain usbhost_pwrdm = {
196 .name = "usbhost_pwrdm",
197 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700198 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300199 .pwrsts = PWRSTS_OFF_RET_ON,
200 .pwrsts_logic_ret = PWRDM_POWER_RET,
Kalle Jokiniemi867d3202009-04-23 13:58:51 +0300201 /*
202 * REVISIT: Enabling usb host save and restore mechanism seems to
203 * leave the usb host domain permanently in ACTIVE mode after
204 * changing the usb host power domain state from OFF to active once.
205 * Disabling for now.
206 */
207 /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300208 .banks = 1,
209 .pwrsts_mem_ret = {
210 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
211 },
212 .pwrsts_mem_on = {
213 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
214 },
215};
216
Paul Walmsley46e0ccf2009-01-27 19:44:18 -0700217static struct powerdomain dpll1_pwrdm = {
218 .name = "dpll1_pwrdm",
219 .prcm_offs = MPU_MOD,
220 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
221};
222
223static struct powerdomain dpll2_pwrdm = {
224 .name = "dpll2_pwrdm",
225 .prcm_offs = OMAP3430_IVA2_MOD,
226 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
227};
228
229static struct powerdomain dpll3_pwrdm = {
230 .name = "dpll3_pwrdm",
231 .prcm_offs = PLL_MOD,
232 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
233};
234
235static struct powerdomain dpll4_pwrdm = {
236 .name = "dpll4_pwrdm",
237 .prcm_offs = PLL_MOD,
238 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
239};
240
241static struct powerdomain dpll5_pwrdm = {
242 .name = "dpll5_pwrdm",
243 .prcm_offs = PLL_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700244 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsley46e0ccf2009-01-27 19:44:18 -0700245};
246
247
Paul Walmsley98fa3d82010-01-26 20:13:13 -0700248#endif /* CONFIG_ARCH_OMAP3 */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300249
250
251#endif