2 * OMAP3 powerdomain definitions
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
7 * Paul Walmsley, Jouni Högander
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
17 #include "powerdomain.h"
18 #include "powerdomains2xxx_3xxx_data.h"
20 #include "prcm-common.h"
21 #include "prm2xxx_3xxx.h"
22 #include "prm-regbits-34xx.h"
23 #include "cm2xxx_3xxx.h"
24 #include "cm-regbits-34xx.h"
27 * 34XX-specific powerdomains, dependencies
30 #ifdef CONFIG_ARCH_OMAP3
36 static struct powerdomain iva2_pwrdm = {
38 .prcm_offs = OMAP3430_IVA2_MOD,
39 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
40 .pwrsts = PWRSTS_OFF_RET_ON,
41 .pwrsts_logic_ret = PWRSTS_OFF_RET,
57 static struct powerdomain mpu_3xxx_pwrdm = {
60 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
61 .pwrsts = PWRSTS_OFF_RET_ON,
62 .pwrsts_logic_ret = PWRSTS_OFF_RET,
63 .flags = PWRDM_HAS_MPU_QUIRK,
74 * The USBTLL Save-and-Restore mechanism is broken on
75 * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
76 * needs to be disabled on these chips.
77 * Refer: 3430 errata ID i459 and 3630 errata ID i579
79 * Note: setting the SAR flag could help for errata ID i478
80 * which applies to 3430 <= ES3.1, but since the SAR feature
81 * is broken, do not use it.
83 static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
85 .prcm_offs = CORE_MOD,
86 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
88 CHIP_IS_OMAP3430ES3_0 |
90 .pwrsts = PWRSTS_OFF_RET_ON,
91 .pwrsts_logic_ret = PWRSTS_OFF_RET,
94 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
95 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
98 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
99 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
103 static struct powerdomain core_3xxx_es3_1_pwrdm = {
104 .name = "core_pwrdm",
105 .prcm_offs = CORE_MOD,
106 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
107 CHIP_GE_OMAP3630ES1_1),
108 .pwrsts = PWRSTS_OFF_RET_ON,
109 .pwrsts_logic_ret = PWRSTS_OFF_RET,
111 * Setting the SAR flag for errata ID i478 which applies
114 .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
117 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
118 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
121 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
122 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
126 static struct powerdomain dss_pwrdm = {
128 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
129 .prcm_offs = OMAP3430_DSS_MOD,
130 .pwrsts = PWRSTS_OFF_RET_ON,
131 .pwrsts_logic_ret = PWRSTS_RET,
134 [0] = PWRSTS_RET, /* MEMRETSTATE */
137 [0] = PWRSTS_ON, /* MEMONSTATE */
142 * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
143 * possible SGX powerstate, the SGX device itself does not support
146 static struct powerdomain sgx_pwrdm = {
148 .prcm_offs = OMAP3430ES2_SGX_MOD,
149 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
150 /* XXX This is accurate for 3430 SGX, but what about GFX? */
151 .pwrsts = PWRSTS_OFF_ON,
152 .pwrsts_logic_ret = PWRSTS_RET,
155 [0] = PWRSTS_RET, /* MEMRETSTATE */
158 [0] = PWRSTS_ON, /* MEMONSTATE */
162 static struct powerdomain cam_pwrdm = {
164 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
165 .prcm_offs = OMAP3430_CAM_MOD,
166 .pwrsts = PWRSTS_OFF_RET_ON,
167 .pwrsts_logic_ret = PWRSTS_RET,
170 [0] = PWRSTS_RET, /* MEMRETSTATE */
173 [0] = PWRSTS_ON, /* MEMONSTATE */
177 static struct powerdomain per_pwrdm = {
179 .prcm_offs = OMAP3430_PER_MOD,
180 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
181 .pwrsts = PWRSTS_OFF_RET_ON,
182 .pwrsts_logic_ret = PWRSTS_OFF_RET,
185 [0] = PWRSTS_RET, /* MEMRETSTATE */
188 [0] = PWRSTS_ON, /* MEMONSTATE */
192 static struct powerdomain emu_pwrdm = {
194 .prcm_offs = OMAP3430_EMU_MOD,
195 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
198 static struct powerdomain neon_pwrdm = {
199 .name = "neon_pwrdm",
200 .prcm_offs = OMAP3430_NEON_MOD,
201 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
202 .pwrsts = PWRSTS_OFF_RET_ON,
203 .pwrsts_logic_ret = PWRSTS_RET,
206 static struct powerdomain usbhost_pwrdm = {
207 .name = "usbhost_pwrdm",
208 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
209 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
210 .pwrsts = PWRSTS_OFF_RET_ON,
211 .pwrsts_logic_ret = PWRSTS_RET,
213 * REVISIT: Enabling usb host save and restore mechanism seems to
214 * leave the usb host domain permanently in ACTIVE mode after
215 * changing the usb host power domain state from OFF to active once.
218 /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
221 [0] = PWRSTS_RET, /* MEMRETSTATE */
224 [0] = PWRSTS_ON, /* MEMONSTATE */
228 static struct powerdomain dpll1_pwrdm = {
229 .name = "dpll1_pwrdm",
230 .prcm_offs = MPU_MOD,
231 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
234 static struct powerdomain dpll2_pwrdm = {
235 .name = "dpll2_pwrdm",
236 .prcm_offs = OMAP3430_IVA2_MOD,
237 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
240 static struct powerdomain dpll3_pwrdm = {
241 .name = "dpll3_pwrdm",
242 .prcm_offs = PLL_MOD,
243 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
246 static struct powerdomain dpll4_pwrdm = {
247 .name = "dpll4_pwrdm",
248 .prcm_offs = PLL_MOD,
249 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
252 static struct powerdomain dpll5_pwrdm = {
253 .name = "dpll5_pwrdm",
254 .prcm_offs = PLL_MOD,
255 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
258 /* As powerdomains are added or removed above, this list must also be changed */
259 static struct powerdomain *powerdomains_omap3xxx[] __initdata = {
266 &core_3xxx_pre_es3_1_pwrdm,
267 &core_3xxx_es3_1_pwrdm,
284 void __init omap3xxx_powerdomains_init(void)
286 pwrdm_init(powerdomains_omap3xxx, &omap3_pwrdm_operations);