1 // SPDX-License-Identifier: GPL-2.0-only
3 * OMAP54XX Power domains framework
5 * Copyright (C) 2013 Texas Instruments, Inc.
7 * Abhijit Pagare (abhijitpagare@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 * Paul Walmsley (paul@pwsan.com)
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
18 #include <linux/kernel.h>
19 #include <linux/init.h>
21 #include "powerdomain.h"
23 #include "prcm-common.h"
26 #include "prcm_mpu54xx.h"
28 /* core_54xx_pwrdm: CORE power domain */
29 static struct powerdomain core_54xx_pwrdm
= {
31 .voltdm
= { .name
= "core" },
32 .prcm_offs
= OMAP54XX_PRM_CORE_INST
,
33 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
34 .pwrsts
= PWRSTS_RET_ON
,
35 .pwrsts_logic_ret
= PWRSTS_RET
,
38 [0] = PWRSTS_OFF_RET
, /* core_nret_bank */
39 [1] = PWRSTS_OFF_RET
, /* core_ocmram */
40 [2] = PWRSTS_OFF_RET
, /* core_other_bank */
41 [3] = PWRSTS_OFF_RET
, /* ipu_l2ram */
42 [4] = PWRSTS_OFF_RET
, /* ipu_unicache */
45 [0] = PWRSTS_OFF_RET
, /* core_nret_bank */
46 [1] = PWRSTS_OFF_RET
, /* core_ocmram */
47 [2] = PWRSTS_OFF_RET
, /* core_other_bank */
48 [3] = PWRSTS_OFF_RET
, /* ipu_l2ram */
49 [4] = PWRSTS_OFF_RET
, /* ipu_unicache */
51 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
54 /* abe_54xx_pwrdm: Audio back end power domain */
55 static struct powerdomain abe_54xx_pwrdm
= {
57 .voltdm
= { .name
= "core" },
58 .prcm_offs
= OMAP54XX_PRM_ABE_INST
,
59 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
60 .pwrsts
= PWRSTS_OFF_RET_ON
,
61 .pwrsts_logic_ret
= PWRSTS_OFF
,
64 [0] = PWRSTS_OFF_RET
, /* aessmem */
65 [1] = PWRSTS_OFF_RET
, /* periphmem */
68 [0] = PWRSTS_OFF_RET
, /* aessmem */
69 [1] = PWRSTS_OFF_RET
, /* periphmem */
71 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
74 /* coreaon_54xx_pwrdm: Always ON logic that sits in VDD_CORE voltage domain */
75 static struct powerdomain coreaon_54xx_pwrdm
= {
76 .name
= "coreaon_pwrdm",
77 .voltdm
= { .name
= "core" },
78 .prcm_offs
= OMAP54XX_PRM_COREAON_INST
,
79 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
83 /* dss_54xx_pwrdm: Display subsystem power domain */
84 static struct powerdomain dss_54xx_pwrdm
= {
86 .voltdm
= { .name
= "core" },
87 .prcm_offs
= OMAP54XX_PRM_DSS_INST
,
88 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
89 .pwrsts
= PWRSTS_OFF_RET_ON
,
90 .pwrsts_logic_ret
= PWRSTS_OFF
,
93 [0] = PWRSTS_OFF_RET
, /* dss_mem */
96 [0] = PWRSTS_OFF_RET
, /* dss_mem */
98 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
101 /* cpu0_54xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
102 static struct powerdomain cpu0_54xx_pwrdm
= {
103 .name
= "cpu0_pwrdm",
104 .voltdm
= { .name
= "mpu" },
105 .prcm_offs
= OMAP54XX_PRCM_MPU_PRM_C0_INST
,
106 .prcm_partition
= OMAP54XX_PRCM_MPU_PARTITION
,
107 .pwrsts
= PWRSTS_RET_ON
,
108 .pwrsts_logic_ret
= PWRSTS_RET
,
111 [0] = PWRSTS_OFF_RET
, /* cpu0_l1 */
114 [0] = PWRSTS_ON
, /* cpu0_l1 */
118 /* cpu1_54xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
119 static struct powerdomain cpu1_54xx_pwrdm
= {
120 .name
= "cpu1_pwrdm",
121 .voltdm
= { .name
= "mpu" },
122 .prcm_offs
= OMAP54XX_PRCM_MPU_PRM_C1_INST
,
123 .prcm_partition
= OMAP54XX_PRCM_MPU_PARTITION
,
124 .pwrsts
= PWRSTS_RET_ON
,
125 .pwrsts_logic_ret
= PWRSTS_RET
,
128 [0] = PWRSTS_OFF_RET
, /* cpu1_l1 */
131 [0] = PWRSTS_ON
, /* cpu1_l1 */
135 /* emu_54xx_pwrdm: Emulation power domain */
136 static struct powerdomain emu_54xx_pwrdm
= {
138 .voltdm
= { .name
= "wkup" },
139 .prcm_offs
= OMAP54XX_PRM_EMU_INST
,
140 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
141 .pwrsts
= PWRSTS_OFF_ON
,
144 [0] = PWRSTS_OFF_RET
, /* emu_bank */
147 [0] = PWRSTS_OFF_RET
, /* emu_bank */
151 /* mpu_54xx_pwrdm: Modena processor and the Neon coprocessor power domain */
152 static struct powerdomain mpu_54xx_pwrdm
= {
154 .voltdm
= { .name
= "mpu" },
155 .prcm_offs
= OMAP54XX_PRM_MPU_INST
,
156 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
157 .pwrsts
= PWRSTS_RET_ON
,
158 .pwrsts_logic_ret
= PWRSTS_RET
,
161 [0] = PWRSTS_OFF_RET
, /* mpu_l2 */
162 [1] = PWRSTS_RET
, /* mpu_ram */
165 [0] = PWRSTS_OFF_RET
, /* mpu_l2 */
166 [1] = PWRSTS_OFF_RET
, /* mpu_ram */
170 /* custefuse_54xx_pwrdm: Customer efuse controller power domain */
171 static struct powerdomain custefuse_54xx_pwrdm
= {
172 .name
= "custefuse_pwrdm",
173 .voltdm
= { .name
= "core" },
174 .prcm_offs
= OMAP54XX_PRM_CUSTEFUSE_INST
,
175 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
176 .pwrsts
= PWRSTS_OFF_ON
,
177 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
180 /* dsp_54xx_pwrdm: Tesla processor power domain */
181 static struct powerdomain dsp_54xx_pwrdm
= {
183 .voltdm
= { .name
= "mm" },
184 .prcm_offs
= OMAP54XX_PRM_DSP_INST
,
185 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
186 .pwrsts
= PWRSTS_OFF_RET_ON
,
187 .pwrsts_logic_ret
= PWRSTS_OFF_RET
,
190 [0] = PWRSTS_OFF_RET
, /* dsp_edma */
191 [1] = PWRSTS_OFF_RET
, /* dsp_l1 */
192 [2] = PWRSTS_OFF_RET
, /* dsp_l2 */
195 [0] = PWRSTS_OFF_RET
, /* dsp_edma */
196 [1] = PWRSTS_OFF_RET
, /* dsp_l1 */
197 [2] = PWRSTS_OFF_RET
, /* dsp_l2 */
199 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
202 /* cam_54xx_pwrdm: Camera subsystem power domain */
203 static struct powerdomain cam_54xx_pwrdm
= {
205 .voltdm
= { .name
= "core" },
206 .prcm_offs
= OMAP54XX_PRM_CAM_INST
,
207 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
208 .pwrsts
= PWRSTS_OFF_ON
,
211 [0] = PWRSTS_OFF_RET
, /* cam_mem */
214 [0] = PWRSTS_OFF_RET
, /* cam_mem */
216 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
219 /* l3init_54xx_pwrdm: L3 initators pheripherals power domain */
220 static struct powerdomain l3init_54xx_pwrdm
= {
221 .name
= "l3init_pwrdm",
222 .voltdm
= { .name
= "core" },
223 .prcm_offs
= OMAP54XX_PRM_L3INIT_INST
,
224 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
225 .pwrsts
= PWRSTS_RET_ON
,
226 .pwrsts_logic_ret
= PWRSTS_OFF_RET
,
229 [0] = PWRSTS_OFF_RET
, /* l3init_bank1 */
230 [1] = PWRSTS_OFF_RET
, /* l3init_bank2 */
233 [0] = PWRSTS_OFF_RET
, /* l3init_bank1 */
234 [1] = PWRSTS_OFF_RET
, /* l3init_bank2 */
236 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
239 /* gpu_54xx_pwrdm: 3D accelerator power domain */
240 static struct powerdomain gpu_54xx_pwrdm
= {
242 .voltdm
= { .name
= "mm" },
243 .prcm_offs
= OMAP54XX_PRM_GPU_INST
,
244 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
245 .pwrsts
= PWRSTS_OFF_ON
,
248 [0] = PWRSTS_OFF_RET
, /* gpu_mem */
251 [0] = PWRSTS_OFF_RET
, /* gpu_mem */
253 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
256 /* wkupaon_54xx_pwrdm: Wake-up power domain */
257 static struct powerdomain wkupaon_54xx_pwrdm
= {
258 .name
= "wkupaon_pwrdm",
259 .voltdm
= { .name
= "wkup" },
260 .prcm_offs
= OMAP54XX_PRM_WKUPAON_INST
,
261 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
267 [0] = PWRSTS_ON
, /* wkup_bank */
271 /* iva_54xx_pwrdm: IVA-HD power domain */
272 static struct powerdomain iva_54xx_pwrdm
= {
274 .voltdm
= { .name
= "mm" },
275 .prcm_offs
= OMAP54XX_PRM_IVA_INST
,
276 .prcm_partition
= OMAP54XX_PRM_PARTITION
,
277 .pwrsts
= PWRSTS_OFF_RET_ON
,
278 .pwrsts_logic_ret
= PWRSTS_OFF
,
281 [0] = PWRSTS_OFF_RET
, /* hwa_mem */
282 [1] = PWRSTS_OFF_RET
, /* sl2_mem */
283 [2] = PWRSTS_OFF_RET
, /* tcm1_mem */
284 [3] = PWRSTS_OFF_RET
, /* tcm2_mem */
287 [0] = PWRSTS_OFF_RET
, /* hwa_mem */
288 [1] = PWRSTS_OFF_RET
, /* sl2_mem */
289 [2] = PWRSTS_OFF_RET
, /* tcm1_mem */
290 [3] = PWRSTS_OFF_RET
, /* tcm2_mem */
292 .flags
= PWRDM_HAS_LOWPOWERSTATECHANGE
,
296 * The following power domains are not under SW control
302 /* As powerdomains are added or removed above, this list must also be changed */
303 static struct powerdomain
*powerdomains_omap54xx
[] __initdata
= {
312 &custefuse_54xx_pwrdm
,
322 void __init
omap54xx_powerdomains_init(void)
324 pwrdm_register_platform_funcs(&omap4_pwrdm_operations
);
325 pwrdm_register_pwrdms(powerdomains_omap54xx
);
326 pwrdm_complete_init();