2 * OMAP3 powerdomain definitions
4 * Copyright (C) 2007-2008 Texas Instruments, Inc.
5 * Copyright (C) 2007-2010 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 <plat/powerdomain.h>
18 #include "powerdomains2xxx_3xxx_data.h"
19 #include "powerdomains.h"
21 #include "prcm-common.h"
23 #include "prm-regbits-34xx.h"
25 #include "cm-regbits-34xx.h"
28 * 34XX-specific powerdomains, dependencies
31 #ifdef CONFIG_ARCH_OMAP3
37 static struct powerdomain iva2_pwrdm = {
39 .prcm_offs = OMAP3430_IVA2_MOD,
40 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
41 .pwrsts = PWRSTS_OFF_RET_ON,
42 .pwrsts_logic_ret = PWRSTS_OFF_RET,
58 static struct powerdomain mpu_3xxx_pwrdm = {
61 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
62 .pwrsts = PWRSTS_OFF_RET_ON,
63 .pwrsts_logic_ret = PWRSTS_OFF_RET,
64 .flags = PWRDM_HAS_MPU_QUIRK,
75 * The USBTLL Save-and-Restore mechanism is broken on
76 * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
77 * needs to be disabled on these chips.
78 * Refer: 3430 errata ID i459 and 3630 errata ID i579
80 * Note: setting the SAR flag could help for errata ID i478
81 * which applies to 3430 <= ES3.1, but since the SAR feature
82 * is broken, do not use it.
84 static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
86 .prcm_offs = CORE_MOD,
87 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
89 CHIP_IS_OMAP3430ES3_0 |
91 .pwrsts = PWRSTS_OFF_RET_ON,
92 .pwrsts_logic_ret = PWRSTS_OFF_RET,
95 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
96 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
99 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
100 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
104 static struct powerdomain core_3xxx_es3_1_pwrdm = {
105 .name = "core_pwrdm",
106 .prcm_offs = CORE_MOD,
107 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
108 CHIP_GE_OMAP3630ES1_1),
109 .pwrsts = PWRSTS_OFF_RET_ON,
110 .pwrsts_logic_ret = PWRSTS_OFF_RET,
112 * Setting the SAR flag for errata ID i478 which applies
115 .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
118 [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
119 [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
122 [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
123 [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
127 static struct powerdomain dss_pwrdm = {
129 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
130 .prcm_offs = OMAP3430_DSS_MOD,
131 .pwrsts = PWRSTS_OFF_RET_ON,
132 .pwrsts_logic_ret = PWRDM_POWER_RET,
135 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
138 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
143 * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
144 * possible SGX powerstate, the SGX device itself does not support
147 static struct powerdomain sgx_pwrdm = {
149 .prcm_offs = OMAP3430ES2_SGX_MOD,
150 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
151 /* XXX This is accurate for 3430 SGX, but what about GFX? */
152 .pwrsts = PWRSTS_OFF_ON,
153 .pwrsts_logic_ret = PWRDM_POWER_RET,
156 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
159 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
163 static struct powerdomain cam_pwrdm = {
165 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
166 .prcm_offs = OMAP3430_CAM_MOD,
167 .pwrsts = PWRSTS_OFF_RET_ON,
168 .pwrsts_logic_ret = PWRDM_POWER_RET,
171 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
174 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
178 static struct powerdomain per_pwrdm = {
180 .prcm_offs = OMAP3430_PER_MOD,
181 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
182 .pwrsts = PWRSTS_OFF_RET_ON,
183 .pwrsts_logic_ret = PWRSTS_OFF_RET,
186 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
189 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
193 static struct powerdomain emu_pwrdm = {
195 .prcm_offs = OMAP3430_EMU_MOD,
196 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
199 static struct powerdomain neon_pwrdm = {
200 .name = "neon_pwrdm",
201 .prcm_offs = OMAP3430_NEON_MOD,
202 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
203 .pwrsts = PWRSTS_OFF_RET_ON,
204 .pwrsts_logic_ret = PWRDM_POWER_RET,
207 static struct powerdomain usbhost_pwrdm = {
208 .name = "usbhost_pwrdm",
209 .prcm_offs = OMAP3430ES2_USBHOST_MOD,
210 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
211 .pwrsts = PWRSTS_OFF_RET_ON,
212 .pwrsts_logic_ret = PWRDM_POWER_RET,
214 * REVISIT: Enabling usb host save and restore mechanism seems to
215 * leave the usb host domain permanently in ACTIVE mode after
216 * changing the usb host power domain state from OFF to active once.
219 /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
222 [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
225 [0] = PWRDM_POWER_ON, /* MEMONSTATE */
229 static struct powerdomain dpll1_pwrdm = {
230 .name = "dpll1_pwrdm",
231 .prcm_offs = MPU_MOD,
232 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
235 static struct powerdomain dpll2_pwrdm = {
236 .name = "dpll2_pwrdm",
237 .prcm_offs = OMAP3430_IVA2_MOD,
238 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
241 static struct powerdomain dpll3_pwrdm = {
242 .name = "dpll3_pwrdm",
243 .prcm_offs = PLL_MOD,
244 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
247 static struct powerdomain dpll4_pwrdm = {
248 .name = "dpll4_pwrdm",
249 .prcm_offs = PLL_MOD,
250 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
253 static struct powerdomain dpll5_pwrdm = {
254 .name = "dpll5_pwrdm",
255 .prcm_offs = PLL_MOD,
256 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
259 /* As powerdomains are added or removed above, this list must also be changed */
260 static struct powerdomain *powerdomains_omap3xxx[] __initdata = {
267 &core_3xxx_pre_es3_1_pwrdm,
268 &core_3xxx_es3_1_pwrdm,
285 void __init omap3xxx_powerdomains_init(void)
287 pwrdm_init(powerdomains_omap3xxx, &omap3_pwrdm_operations);