Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 1 | /* |
| 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 Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 15 | /* |
| 16 | * To Do List |
| 17 | * -> Move the Sleep/Wakeup dependencies from Power Domain framework to |
| 18 | * Clock Domain Framework |
| 19 | */ |
| 20 | |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 21 | #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 Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 72 | #include <plat/powerdomain.h> |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 73 | |
| 74 | #include "prcm-common.h" |
| 75 | #include "prm.h" |
| 76 | #include "cm.h" |
| 77 | |
| 78 | /* OMAP2/3-common powerdomains and wakeup dependencies */ |
| 79 | |
Abhijit Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 80 | #ifndef CONFIG_ARCH_OMAP4 |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 81 | /* |
| 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 | */ |
| 86 | static 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 Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 108 | /* |
| 109 | * 3430: CM_SLEEPDEP_CAM: MPU |
| 110 | * 3430ES1: CM_SLEEPDEP_GFX: MPU |
| 111 | * 3430ES2: CM_SLEEPDEP_SGX: MPU |
| 112 | */ |
| 113 | static 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 Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 120 | #endif |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 121 | |
Paul Walmsley | fe6a58f | 2008-08-19 11:08:42 +0300 | [diff] [blame] | 122 | |
| 123 | #include "powerdomains24xx.h" |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 124 | #include "powerdomains34xx.h" |
Abhijit Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 125 | #include "powerdomains44xx.h" |
Paul Walmsley | fe6a58f | 2008-08-19 11:08:42 +0300 | [diff] [blame] | 126 | |
| 127 | |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 128 | /* |
| 129 | * OMAP2/3 common powerdomains |
| 130 | */ |
| 131 | |
Abhijit Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 132 | #if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX) |
| 133 | |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 134 | /* |
| 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 Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 138 | static struct powerdomain gfx_omap2_pwrdm = { |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 139 | .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 Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 144 | .sleepdep_srcs = cam_gfx_sleepdeps, |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 145 | .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 Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 156 | static struct powerdomain wkup_omap2_pwrdm = { |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 157 | .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 Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 163 | #endif |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 164 | |
| 165 | |
| 166 | /* As powerdomains are added or removed above, this list must also be changed */ |
| 167 | static struct powerdomain *powerdomains_omap[] __initdata = { |
| 168 | |
Abhijit Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 169 | #if defined(CONFIG_ARCH_OMAP24XX) | defined(CONFIG_ARCH_OMAP34XX) |
| 170 | &wkup_omap2_pwrdm, |
| 171 | &gfx_omap2_pwrdm, |
| 172 | #endif |
Paul Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 173 | |
Paul Walmsley | fe6a58f | 2008-08-19 11:08:42 +0300 | [diff] [blame] | 174 | #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 Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 184 | #ifdef CONFIG_ARCH_OMAP34XX |
| 185 | &iva2_pwrdm, |
| 186 | &mpu_34xx_pwrdm, |
| 187 | &neon_pwrdm, |
Paul Walmsley | 7eb1afc | 2009-02-05 20:45:28 -0700 | [diff] [blame] | 188 | &core_34xx_pre_es3_1_pwrdm, |
| 189 | &core_34xx_es3_1_pwrdm, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 190 | &cam_pwrdm, |
| 191 | &dss_pwrdm, |
| 192 | &per_pwrdm, |
| 193 | &emu_pwrdm, |
| 194 | &sgx_pwrdm, |
| 195 | &usbhost_pwrdm, |
Paul Walmsley | 46e0ccf | 2009-01-27 19:44:18 -0700 | [diff] [blame] | 196 | &dpll1_pwrdm, |
| 197 | &dpll2_pwrdm, |
| 198 | &dpll3_pwrdm, |
| 199 | &dpll4_pwrdm, |
| 200 | &dpll5_pwrdm, |
Paul Walmsley | ecb24aa | 2008-08-19 11:08:43 +0300 | [diff] [blame] | 201 | #endif |
| 202 | |
Abhijit Pagare | 38900c2 | 2010-01-26 20:12:52 -0700 | [diff] [blame^] | 203 | #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 Walmsley | 9717100 | 2008-08-19 11:08:40 +0300 | [diff] [blame] | 221 | NULL |
| 222 | }; |
| 223 | |
| 224 | |
| 225 | #endif |