powerdomains44xx_data.c 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * OMAP4 Power domains framework
  4. *
  5. * Copyright (C) 2009-2011 Texas Instruments, Inc.
  6. * Copyright (C) 2009-2011 Nokia Corporation
  7. *
  8. * Abhijit Pagare ([email protected])
  9. * Benoit Cousson ([email protected])
  10. * Paul Walmsley ([email protected])
  11. *
  12. * This file is automatically generated from the OMAP hardware databases.
  13. * We respectfully ask that any modifications to this file be coordinated
  14. * with the public [email protected] mailing list and the
  15. * authors above to ensure that the autogeneration scripts are kept
  16. * up-to-date with the file contents.
  17. */
  18. #include <linux/kernel.h>
  19. #include <linux/init.h>
  20. #include "powerdomain.h"
  21. #include "prcm-common.h"
  22. #include "prcm44xx.h"
  23. #include "prm-regbits-44xx.h"
  24. #include "prm44xx.h"
  25. #include "prcm_mpu44xx.h"
  26. /* core_44xx_pwrdm: CORE power domain */
  27. static struct powerdomain core_44xx_pwrdm = {
  28. .name = "core_pwrdm",
  29. .voltdm = { .name = "core" },
  30. .prcm_offs = OMAP4430_PRM_CORE_INST,
  31. .prcm_partition = OMAP4430_PRM_PARTITION,
  32. .pwrsts = PWRSTS_RET_ON,
  33. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  34. .banks = 5,
  35. .pwrsts_mem_ret = {
  36. [0] = PWRSTS_OFF, /* core_nret_bank */
  37. [1] = PWRSTS_RET, /* core_ocmram */
  38. [2] = PWRSTS_RET, /* core_other_bank */
  39. [3] = PWRSTS_OFF_RET, /* ducati_l2ram */
  40. [4] = PWRSTS_OFF_RET, /* ducati_unicache */
  41. },
  42. .pwrsts_mem_on = {
  43. [0] = PWRSTS_ON, /* core_nret_bank */
  44. [1] = PWRSTS_ON, /* core_ocmram */
  45. [2] = PWRSTS_ON, /* core_other_bank */
  46. [3] = PWRSTS_ON, /* ducati_l2ram */
  47. [4] = PWRSTS_ON, /* ducati_unicache */
  48. },
  49. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  50. };
  51. /* gfx_44xx_pwrdm: 3D accelerator power domain */
  52. static struct powerdomain gfx_44xx_pwrdm = {
  53. .name = "gfx_pwrdm",
  54. .voltdm = { .name = "core" },
  55. .prcm_offs = OMAP4430_PRM_GFX_INST,
  56. .prcm_partition = OMAP4430_PRM_PARTITION,
  57. .pwrsts = PWRSTS_OFF_ON,
  58. .banks = 1,
  59. .pwrsts_mem_ret = {
  60. [0] = PWRSTS_OFF, /* gfx_mem */
  61. },
  62. .pwrsts_mem_on = {
  63. [0] = PWRSTS_ON, /* gfx_mem */
  64. },
  65. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  66. };
  67. /* abe_44xx_pwrdm: Audio back end power domain */
  68. static struct powerdomain abe_44xx_pwrdm = {
  69. .name = "abe_pwrdm",
  70. .voltdm = { .name = "iva" },
  71. .prcm_offs = OMAP4430_PRM_ABE_INST,
  72. .prcm_partition = OMAP4430_PRM_PARTITION,
  73. .pwrsts = PWRSTS_OFF_RET_ON,
  74. .pwrsts_logic_ret = PWRSTS_OFF,
  75. .banks = 2,
  76. .pwrsts_mem_ret = {
  77. [0] = PWRSTS_RET, /* aessmem */
  78. [1] = PWRSTS_OFF, /* periphmem */
  79. },
  80. .pwrsts_mem_on = {
  81. [0] = PWRSTS_ON, /* aessmem */
  82. [1] = PWRSTS_ON, /* periphmem */
  83. },
  84. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  85. };
  86. /* dss_44xx_pwrdm: Display subsystem power domain */
  87. static struct powerdomain dss_44xx_pwrdm = {
  88. .name = "dss_pwrdm",
  89. .voltdm = { .name = "core" },
  90. .prcm_offs = OMAP4430_PRM_DSS_INST,
  91. .prcm_partition = OMAP4430_PRM_PARTITION,
  92. .pwrsts = PWRSTS_OFF_RET_ON,
  93. .pwrsts_logic_ret = PWRSTS_OFF,
  94. .banks = 1,
  95. .pwrsts_mem_ret = {
  96. [0] = PWRSTS_OFF, /* dss_mem */
  97. },
  98. .pwrsts_mem_on = {
  99. [0] = PWRSTS_ON, /* dss_mem */
  100. },
  101. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  102. };
  103. /* tesla_44xx_pwrdm: Tesla processor power domain */
  104. static struct powerdomain tesla_44xx_pwrdm = {
  105. .name = "tesla_pwrdm",
  106. .voltdm = { .name = "iva" },
  107. .prcm_offs = OMAP4430_PRM_TESLA_INST,
  108. .prcm_partition = OMAP4430_PRM_PARTITION,
  109. .pwrsts = PWRSTS_OFF_RET_ON,
  110. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  111. .banks = 3,
  112. .pwrsts_mem_ret = {
  113. [0] = PWRSTS_RET, /* tesla_edma */
  114. [1] = PWRSTS_OFF_RET, /* tesla_l1 */
  115. [2] = PWRSTS_OFF_RET, /* tesla_l2 */
  116. },
  117. .pwrsts_mem_on = {
  118. [0] = PWRSTS_ON, /* tesla_edma */
  119. [1] = PWRSTS_ON, /* tesla_l1 */
  120. [2] = PWRSTS_ON, /* tesla_l2 */
  121. },
  122. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  123. };
  124. /* wkup_44xx_pwrdm: Wake-up power domain */
  125. static struct powerdomain wkup_44xx_pwrdm = {
  126. .name = "wkup_pwrdm",
  127. .voltdm = { .name = "wakeup" },
  128. .prcm_offs = OMAP4430_PRM_WKUP_INST,
  129. .prcm_partition = OMAP4430_PRM_PARTITION,
  130. .pwrsts = PWRSTS_ON,
  131. .banks = 1,
  132. .pwrsts_mem_ret = {
  133. [0] = PWRSTS_OFF, /* wkup_bank */
  134. },
  135. .pwrsts_mem_on = {
  136. [0] = PWRSTS_ON, /* wkup_bank */
  137. },
  138. };
  139. /* cpu0_44xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  140. static struct powerdomain cpu0_44xx_pwrdm = {
  141. .name = "cpu0_pwrdm",
  142. .voltdm = { .name = "mpu" },
  143. .prcm_offs = OMAP4430_PRCM_MPU_CPU0_INST,
  144. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  145. .pwrsts = PWRSTS_OFF_RET_ON,
  146. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  147. .banks = 1,
  148. .pwrsts_mem_ret = {
  149. [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
  150. },
  151. .pwrsts_mem_on = {
  152. [0] = PWRSTS_ON, /* cpu0_l1 */
  153. },
  154. };
  155. /* cpu1_44xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  156. static struct powerdomain cpu1_44xx_pwrdm = {
  157. .name = "cpu1_pwrdm",
  158. .voltdm = { .name = "mpu" },
  159. .prcm_offs = OMAP4430_PRCM_MPU_CPU1_INST,
  160. .prcm_partition = OMAP4430_PRCM_MPU_PARTITION,
  161. .pwrsts = PWRSTS_OFF_RET_ON,
  162. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  163. .banks = 1,
  164. .pwrsts_mem_ret = {
  165. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  166. },
  167. .pwrsts_mem_on = {
  168. [0] = PWRSTS_ON, /* cpu1_l1 */
  169. },
  170. };
  171. /* emu_44xx_pwrdm: Emulation power domain */
  172. static struct powerdomain emu_44xx_pwrdm = {
  173. .name = "emu_pwrdm",
  174. .voltdm = { .name = "wakeup" },
  175. .prcm_offs = OMAP4430_PRM_EMU_INST,
  176. .prcm_partition = OMAP4430_PRM_PARTITION,
  177. .pwrsts = PWRSTS_OFF_ON,
  178. .banks = 1,
  179. .pwrsts_mem_ret = {
  180. [0] = PWRSTS_OFF, /* emu_bank */
  181. },
  182. .pwrsts_mem_on = {
  183. [0] = PWRSTS_ON, /* emu_bank */
  184. },
  185. };
  186. /* mpu_44xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  187. static struct powerdomain mpu_44xx_pwrdm = {
  188. .name = "mpu_pwrdm",
  189. .voltdm = { .name = "mpu" },
  190. .prcm_offs = OMAP4430_PRM_MPU_INST,
  191. .prcm_partition = OMAP4430_PRM_PARTITION,
  192. .pwrsts = PWRSTS_RET_ON,
  193. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  194. .banks = 3,
  195. .pwrsts_mem_ret = {
  196. [0] = PWRSTS_OFF_RET, /* mpu_l1 */
  197. [1] = PWRSTS_OFF_RET, /* mpu_l2 */
  198. [2] = PWRSTS_RET, /* mpu_ram */
  199. },
  200. .pwrsts_mem_on = {
  201. [0] = PWRSTS_ON, /* mpu_l1 */
  202. [1] = PWRSTS_ON, /* mpu_l2 */
  203. [2] = PWRSTS_ON, /* mpu_ram */
  204. },
  205. };
  206. /* ivahd_44xx_pwrdm: IVA-HD power domain */
  207. static struct powerdomain ivahd_44xx_pwrdm = {
  208. .name = "ivahd_pwrdm",
  209. .voltdm = { .name = "iva" },
  210. .prcm_offs = OMAP4430_PRM_IVAHD_INST,
  211. .prcm_partition = OMAP4430_PRM_PARTITION,
  212. .pwrsts = PWRSTS_OFF_RET_ON,
  213. .pwrsts_logic_ret = PWRSTS_OFF,
  214. .banks = 4,
  215. .pwrsts_mem_ret = {
  216. [0] = PWRSTS_OFF, /* hwa_mem */
  217. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  218. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  219. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  220. },
  221. .pwrsts_mem_on = {
  222. [0] = PWRSTS_ON, /* hwa_mem */
  223. [1] = PWRSTS_ON, /* sl2_mem */
  224. [2] = PWRSTS_ON, /* tcm1_mem */
  225. [3] = PWRSTS_ON, /* tcm2_mem */
  226. },
  227. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  228. };
  229. /* cam_44xx_pwrdm: Camera subsystem power domain */
  230. static struct powerdomain cam_44xx_pwrdm = {
  231. .name = "cam_pwrdm",
  232. .voltdm = { .name = "core" },
  233. .prcm_offs = OMAP4430_PRM_CAM_INST,
  234. .prcm_partition = OMAP4430_PRM_PARTITION,
  235. .pwrsts = PWRSTS_OFF_ON,
  236. .banks = 1,
  237. .pwrsts_mem_ret = {
  238. [0] = PWRSTS_OFF, /* cam_mem */
  239. },
  240. .pwrsts_mem_on = {
  241. [0] = PWRSTS_ON, /* cam_mem */
  242. },
  243. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  244. };
  245. /* l3init_44xx_pwrdm: L3 initators pheripherals power domain */
  246. static struct powerdomain l3init_44xx_pwrdm = {
  247. .name = "l3init_pwrdm",
  248. .voltdm = { .name = "core" },
  249. .prcm_offs = OMAP4430_PRM_L3INIT_INST,
  250. .prcm_partition = OMAP4430_PRM_PARTITION,
  251. .pwrsts = PWRSTS_RET_ON,
  252. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  253. .banks = 1,
  254. .pwrsts_mem_ret = {
  255. [0] = PWRSTS_OFF, /* l3init_bank1 */
  256. },
  257. .pwrsts_mem_on = {
  258. [0] = PWRSTS_ON, /* l3init_bank1 */
  259. },
  260. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  261. };
  262. /* l4per_44xx_pwrdm: Target peripherals power domain */
  263. static struct powerdomain l4per_44xx_pwrdm = {
  264. .name = "l4per_pwrdm",
  265. .voltdm = { .name = "core" },
  266. .prcm_offs = OMAP4430_PRM_L4PER_INST,
  267. .prcm_partition = OMAP4430_PRM_PARTITION,
  268. .pwrsts = PWRSTS_RET_ON,
  269. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  270. .banks = 2,
  271. .pwrsts_mem_ret = {
  272. [0] = PWRSTS_OFF, /* nonretained_bank */
  273. [1] = PWRSTS_RET, /* retained_bank */
  274. },
  275. .pwrsts_mem_on = {
  276. [0] = PWRSTS_ON, /* nonretained_bank */
  277. [1] = PWRSTS_ON, /* retained_bank */
  278. },
  279. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  280. };
  281. /*
  282. * always_on_core_44xx_pwrdm: Always ON logic that sits in VDD_CORE voltage
  283. * domain
  284. */
  285. static struct powerdomain always_on_core_44xx_pwrdm = {
  286. .name = "always_on_core_pwrdm",
  287. .voltdm = { .name = "core" },
  288. .prcm_offs = OMAP4430_PRM_ALWAYS_ON_INST,
  289. .prcm_partition = OMAP4430_PRM_PARTITION,
  290. .pwrsts = PWRSTS_ON,
  291. };
  292. /* cefuse_44xx_pwrdm: Customer efuse controller power domain */
  293. static struct powerdomain cefuse_44xx_pwrdm = {
  294. .name = "cefuse_pwrdm",
  295. .voltdm = { .name = "core" },
  296. .prcm_offs = OMAP4430_PRM_CEFUSE_INST,
  297. .prcm_partition = OMAP4430_PRM_PARTITION,
  298. .pwrsts = PWRSTS_OFF_ON,
  299. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  300. };
  301. /*
  302. * The following power domains are not under SW control
  303. *
  304. * always_on_iva
  305. * always_on_mpu
  306. * stdefuse
  307. */
  308. /* As powerdomains are added or removed above, this list must also be changed */
  309. static struct powerdomain *powerdomains_omap44xx[] __initdata = {
  310. &core_44xx_pwrdm,
  311. &gfx_44xx_pwrdm,
  312. &abe_44xx_pwrdm,
  313. &dss_44xx_pwrdm,
  314. &tesla_44xx_pwrdm,
  315. &wkup_44xx_pwrdm,
  316. &cpu0_44xx_pwrdm,
  317. &cpu1_44xx_pwrdm,
  318. &emu_44xx_pwrdm,
  319. &mpu_44xx_pwrdm,
  320. &ivahd_44xx_pwrdm,
  321. &cam_44xx_pwrdm,
  322. &l3init_44xx_pwrdm,
  323. &l4per_44xx_pwrdm,
  324. &always_on_core_44xx_pwrdm,
  325. &cefuse_44xx_pwrdm,
  326. NULL
  327. };
  328. void __init omap44xx_powerdomains_init(void)
  329. {
  330. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  331. pwrdm_register_pwrdms(powerdomains_omap44xx);
  332. pwrdm_complete_init();
  333. }