blob: ce5c15bc41b8466b0275ac7cd3d343ecb37841cb [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
Anand Gadiyar58dcfb32010-07-14 13:38:49 +000078/*
79 * The USBTLL Save-and-Restore mechanism is broken on
80 * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
81 * needs to be disabled on these chips.
82 * Refer: 3430 errata ID i459 and 3630 errata ID i579
Jean Pihet447b8da2010-11-17 17:52:11 +000083 *
84 * Note: setting the SAR flag could help for errata ID i478
85 * which applies to 3430 <= ES3.1, but since the SAR feature
86 * is broken, do not use it.
Anand Gadiyar58dcfb32010-07-14 13:38:49 +000087 */
Paul Walmsley98fa3d82010-01-26 20:13:13 -070088static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030089 .name = "core_pwrdm",
90 .prcm_offs = CORE_MOD,
Paul Walmsley7eb1afc2009-02-05 20:45:28 -070091 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
92 CHIP_IS_OMAP3430ES2 |
Anand Gadiyar58dcfb32010-07-14 13:38:49 +000093 CHIP_IS_OMAP3430ES3_0 |
94 CHIP_IS_OMAP3630ES1),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030095 .pwrsts = PWRSTS_OFF_RET_ON,
Thara Gopinath4133a442010-02-24 12:05:50 -070096 .pwrsts_logic_ret = PWRSTS_OFF_RET,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +030097 .banks = 2,
98 .pwrsts_mem_ret = {
99 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
100 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
101 },
102 .pwrsts_mem_on = {
103 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
104 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
105 },
106};
107
Paul Walmsley98fa3d82010-01-26 20:13:13 -0700108static struct powerdomain core_3xxx_es3_1_pwrdm = {
Paul Walmsley7eb1afc2009-02-05 20:45:28 -0700109 .name = "core_pwrdm",
110 .prcm_offs = CORE_MOD,
Anand Gadiyar58dcfb32010-07-14 13:38:49 +0000111 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
112 CHIP_GE_OMAP3630ES1_1),
Paul Walmsley7eb1afc2009-02-05 20:45:28 -0700113 .pwrsts = PWRSTS_OFF_RET_ON,
Thara Gopinath4133a442010-02-24 12:05:50 -0700114 .pwrsts_logic_ret = PWRSTS_OFF_RET,
Jean Pihet447b8da2010-11-17 17:52:11 +0000115 /*
116 * Setting the SAR flag for errata ID i478 which applies
117 * to 3430 <= ES3.1
118 */
Paul Walmsley7eb1afc2009-02-05 20:45:28 -0700119 .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
120 .banks = 2,
121 .pwrsts_mem_ret = {
122 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
123 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
124 },
125 .pwrsts_mem_on = {
126 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
127 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
128 },
129};
130
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300131static struct powerdomain dss_pwrdm = {
132 .name = "dss_pwrdm",
133 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
134 .prcm_offs = OMAP3430_DSS_MOD,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300135 .pwrsts = PWRSTS_OFF_RET_ON,
136 .pwrsts_logic_ret = PWRDM_POWER_RET,
137 .banks = 1,
138 .pwrsts_mem_ret = {
139 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
140 },
141 .pwrsts_mem_on = {
142 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
143 },
144};
145
Paul Walmsleybe48ea72009-01-27 19:44:28 -0700146/*
147 * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
148 * possible SGX powerstate, the SGX device itself does not support
149 * retention.
150 */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300151static struct powerdomain sgx_pwrdm = {
152 .name = "sgx_pwrdm",
153 .prcm_offs = OMAP3430ES2_SGX_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700154 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300155 /* XXX This is accurate for 3430 SGX, but what about GFX? */
Paul Walmsleybe48ea72009-01-27 19:44:28 -0700156 .pwrsts = PWRSTS_OFF_ON,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300157 .pwrsts_logic_ret = PWRDM_POWER_RET,
158 .banks = 1,
159 .pwrsts_mem_ret = {
160 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
161 },
162 .pwrsts_mem_on = {
163 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
164 },
165};
166
167static struct powerdomain cam_pwrdm = {
168 .name = "cam_pwrdm",
169 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
170 .prcm_offs = OMAP3430_CAM_MOD,
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300171 .pwrsts = PWRSTS_OFF_RET_ON,
172 .pwrsts_logic_ret = PWRDM_POWER_RET,
173 .banks = 1,
174 .pwrsts_mem_ret = {
175 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
176 },
177 .pwrsts_mem_on = {
178 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
179 },
180};
181
182static struct powerdomain per_pwrdm = {
183 .name = "per_pwrdm",
184 .prcm_offs = OMAP3430_PER_MOD,
185 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300186 .pwrsts = PWRSTS_OFF_RET_ON,
187 .pwrsts_logic_ret = PWRSTS_OFF_RET,
188 .banks = 1,
189 .pwrsts_mem_ret = {
190 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
191 },
192 .pwrsts_mem_on = {
193 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
194 },
195};
196
197static struct powerdomain emu_pwrdm = {
198 .name = "emu_pwrdm",
199 .prcm_offs = OMAP3430_EMU_MOD,
200 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
201};
202
203static struct powerdomain neon_pwrdm = {
204 .name = "neon_pwrdm",
205 .prcm_offs = OMAP3430_NEON_MOD,
206 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300207 .pwrsts = PWRSTS_OFF_RET_ON,
208 .pwrsts_logic_ret = PWRDM_POWER_RET,
209};
210
211static struct powerdomain usbhost_pwrdm = {
212 .name = "usbhost_pwrdm",
213 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700214 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300215 .pwrsts = PWRSTS_OFF_RET_ON,
216 .pwrsts_logic_ret = PWRDM_POWER_RET,
Kalle Jokiniemi867d3202009-04-23 13:58:51 +0300217 /*
218 * REVISIT: Enabling usb host save and restore mechanism seems to
219 * leave the usb host domain permanently in ACTIVE mode after
220 * changing the usb host power domain state from OFF to active once.
221 * Disabling for now.
222 */
223 /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300224 .banks = 1,
225 .pwrsts_mem_ret = {
226 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
227 },
228 .pwrsts_mem_on = {
229 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
230 },
231};
232
Paul Walmsley46e0ccf2009-01-27 19:44:18 -0700233static struct powerdomain dpll1_pwrdm = {
234 .name = "dpll1_pwrdm",
235 .prcm_offs = MPU_MOD,
236 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
237};
238
239static struct powerdomain dpll2_pwrdm = {
240 .name = "dpll2_pwrdm",
241 .prcm_offs = OMAP3430_IVA2_MOD,
242 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
243};
244
245static struct powerdomain dpll3_pwrdm = {
246 .name = "dpll3_pwrdm",
247 .prcm_offs = PLL_MOD,
248 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
249};
250
251static struct powerdomain dpll4_pwrdm = {
252 .name = "dpll4_pwrdm",
253 .prcm_offs = PLL_MOD,
254 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
255};
256
257static struct powerdomain dpll5_pwrdm = {
258 .name = "dpll5_pwrdm",
259 .prcm_offs = PLL_MOD,
Paul Walmsleyd41ad522009-02-05 20:45:25 -0700260 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
Paul Walmsley46e0ccf2009-01-27 19:44:18 -0700261};
262
263
Paul Walmsley98fa3d82010-01-26 20:13:13 -0700264#endif /* CONFIG_ARCH_OMAP3 */
Paul Walmsleyecb24aa2008-08-19 11:08:43 +0300265
266
267#endif