powerdomains54xx_data.c 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. /*
  2. * OMAP54XX Power domains framework
  3. *
  4. * Copyright (C) 2013 Texas Instruments, Inc.
  5. *
  6. * Abhijit Pagare (abhijitpagare@ti.com)
  7. * Benoit Cousson (b-cousson@ti.com)
  8. * Paul Walmsley (paul@pwsan.com)
  9. *
  10. * This file is automatically generated from the OMAP hardware databases.
  11. * We respectfully ask that any modifications to this file be coordinated
  12. * with the public linux-omap@vger.kernel.org mailing list and the
  13. * authors above to ensure that the autogeneration scripts are kept
  14. * up-to-date with the file contents.
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License version 2 as
  18. * published by the Free Software Foundation.
  19. */
  20. #include <linux/kernel.h>
  21. #include <linux/init.h>
  22. #include "powerdomain.h"
  23. #include "prcm-common.h"
  24. #include "prcm44xx.h"
  25. #include "prm-regbits-54xx.h"
  26. #include "prm54xx.h"
  27. #include "prcm_mpu54xx.h"
  28. /* core_54xx_pwrdm: CORE power domain */
  29. static struct powerdomain core_54xx_pwrdm = {
  30. .name = "core_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_OFF_RET,
  36. .banks = 5,
  37. .pwrsts_mem_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 */
  43. },
  44. .pwrsts_mem_on = {
  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 */
  50. },
  51. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  52. };
  53. /* abe_54xx_pwrdm: Audio back end power domain */
  54. static struct powerdomain abe_54xx_pwrdm = {
  55. .name = "abe_pwrdm",
  56. .voltdm = { .name = "core" },
  57. .prcm_offs = OMAP54XX_PRM_ABE_INST,
  58. .prcm_partition = OMAP54XX_PRM_PARTITION,
  59. .pwrsts = PWRSTS_OFF_RET_ON,
  60. .pwrsts_logic_ret = PWRSTS_OFF,
  61. .banks = 2,
  62. .pwrsts_mem_ret = {
  63. [0] = PWRSTS_OFF_RET, /* aessmem */
  64. [1] = PWRSTS_OFF_RET, /* periphmem */
  65. },
  66. .pwrsts_mem_on = {
  67. [0] = PWRSTS_OFF_RET, /* aessmem */
  68. [1] = PWRSTS_OFF_RET, /* periphmem */
  69. },
  70. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  71. };
  72. /* coreaon_54xx_pwrdm: Always ON logic that sits in VDD_CORE voltage domain */
  73. static struct powerdomain coreaon_54xx_pwrdm = {
  74. .name = "coreaon_pwrdm",
  75. .voltdm = { .name = "core" },
  76. .prcm_offs = OMAP54XX_PRM_COREAON_INST,
  77. .prcm_partition = OMAP54XX_PRM_PARTITION,
  78. .pwrsts = PWRSTS_ON,
  79. };
  80. /* dss_54xx_pwrdm: Display subsystem power domain */
  81. static struct powerdomain dss_54xx_pwrdm = {
  82. .name = "dss_pwrdm",
  83. .voltdm = { .name = "core" },
  84. .prcm_offs = OMAP54XX_PRM_DSS_INST,
  85. .prcm_partition = OMAP54XX_PRM_PARTITION,
  86. .pwrsts = PWRSTS_OFF_RET_ON,
  87. .pwrsts_logic_ret = PWRSTS_OFF,
  88. .banks = 1,
  89. .pwrsts_mem_ret = {
  90. [0] = PWRSTS_OFF_RET, /* dss_mem */
  91. },
  92. .pwrsts_mem_on = {
  93. [0] = PWRSTS_OFF_RET, /* dss_mem */
  94. },
  95. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  96. };
  97. /* cpu0_54xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  98. static struct powerdomain cpu0_54xx_pwrdm = {
  99. .name = "cpu0_pwrdm",
  100. .voltdm = { .name = "mpu" },
  101. .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C0_INST,
  102. .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
  103. .pwrsts = PWRSTS_OFF_RET_ON,
  104. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  105. .banks = 1,
  106. .pwrsts_mem_ret = {
  107. [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
  108. },
  109. .pwrsts_mem_on = {
  110. [0] = PWRSTS_ON, /* cpu0_l1 */
  111. },
  112. };
  113. /* cpu1_54xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  114. static struct powerdomain cpu1_54xx_pwrdm = {
  115. .name = "cpu1_pwrdm",
  116. .voltdm = { .name = "mpu" },
  117. .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C1_INST,
  118. .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
  119. .pwrsts = PWRSTS_OFF_RET_ON,
  120. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  121. .banks = 1,
  122. .pwrsts_mem_ret = {
  123. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  124. },
  125. .pwrsts_mem_on = {
  126. [0] = PWRSTS_ON, /* cpu1_l1 */
  127. },
  128. };
  129. /* emu_54xx_pwrdm: Emulation power domain */
  130. static struct powerdomain emu_54xx_pwrdm = {
  131. .name = "emu_pwrdm",
  132. .voltdm = { .name = "wkup" },
  133. .prcm_offs = OMAP54XX_PRM_EMU_INST,
  134. .prcm_partition = OMAP54XX_PRM_PARTITION,
  135. .pwrsts = PWRSTS_OFF_ON,
  136. .banks = 1,
  137. .pwrsts_mem_ret = {
  138. [0] = PWRSTS_OFF_RET, /* emu_bank */
  139. },
  140. .pwrsts_mem_on = {
  141. [0] = PWRSTS_OFF_RET, /* emu_bank */
  142. },
  143. };
  144. /* mpu_54xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  145. static struct powerdomain mpu_54xx_pwrdm = {
  146. .name = "mpu_pwrdm",
  147. .voltdm = { .name = "mpu" },
  148. .prcm_offs = OMAP54XX_PRM_MPU_INST,
  149. .prcm_partition = OMAP54XX_PRM_PARTITION,
  150. .pwrsts = PWRSTS_RET_ON,
  151. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  152. .banks = 2,
  153. .pwrsts_mem_ret = {
  154. [0] = PWRSTS_OFF_RET, /* mpu_l2 */
  155. [1] = PWRSTS_RET, /* mpu_ram */
  156. },
  157. .pwrsts_mem_on = {
  158. [0] = PWRSTS_OFF_RET, /* mpu_l2 */
  159. [1] = PWRSTS_OFF_RET, /* mpu_ram */
  160. },
  161. };
  162. /* custefuse_54xx_pwrdm: Customer efuse controller power domain */
  163. static struct powerdomain custefuse_54xx_pwrdm = {
  164. .name = "custefuse_pwrdm",
  165. .voltdm = { .name = "core" },
  166. .prcm_offs = OMAP54XX_PRM_CUSTEFUSE_INST,
  167. .prcm_partition = OMAP54XX_PRM_PARTITION,
  168. .pwrsts = PWRSTS_OFF_ON,
  169. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  170. };
  171. /* dsp_54xx_pwrdm: Tesla processor power domain */
  172. static struct powerdomain dsp_54xx_pwrdm = {
  173. .name = "dsp_pwrdm",
  174. .voltdm = { .name = "mm" },
  175. .prcm_offs = OMAP54XX_PRM_DSP_INST,
  176. .prcm_partition = OMAP54XX_PRM_PARTITION,
  177. .pwrsts = PWRSTS_OFF_RET_ON,
  178. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  179. .banks = 3,
  180. .pwrsts_mem_ret = {
  181. [0] = PWRSTS_OFF_RET, /* dsp_edma */
  182. [1] = PWRSTS_OFF_RET, /* dsp_l1 */
  183. [2] = PWRSTS_OFF_RET, /* dsp_l2 */
  184. },
  185. .pwrsts_mem_on = {
  186. [0] = PWRSTS_OFF_RET, /* dsp_edma */
  187. [1] = PWRSTS_OFF_RET, /* dsp_l1 */
  188. [2] = PWRSTS_OFF_RET, /* dsp_l2 */
  189. },
  190. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  191. };
  192. /* cam_54xx_pwrdm: Camera subsystem power domain */
  193. static struct powerdomain cam_54xx_pwrdm = {
  194. .name = "cam_pwrdm",
  195. .voltdm = { .name = "core" },
  196. .prcm_offs = OMAP54XX_PRM_CAM_INST,
  197. .prcm_partition = OMAP54XX_PRM_PARTITION,
  198. .pwrsts = PWRSTS_OFF_ON,
  199. .banks = 1,
  200. .pwrsts_mem_ret = {
  201. [0] = PWRSTS_OFF_RET, /* cam_mem */
  202. },
  203. .pwrsts_mem_on = {
  204. [0] = PWRSTS_OFF_RET, /* cam_mem */
  205. },
  206. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  207. };
  208. /* l3init_54xx_pwrdm: L3 initators pheripherals power domain */
  209. static struct powerdomain l3init_54xx_pwrdm = {
  210. .name = "l3init_pwrdm",
  211. .voltdm = { .name = "core" },
  212. .prcm_offs = OMAP54XX_PRM_L3INIT_INST,
  213. .prcm_partition = OMAP54XX_PRM_PARTITION,
  214. .pwrsts = PWRSTS_RET_ON,
  215. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  216. .banks = 2,
  217. .pwrsts_mem_ret = {
  218. [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
  219. [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
  220. },
  221. .pwrsts_mem_on = {
  222. [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
  223. [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
  224. },
  225. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  226. };
  227. /* gpu_54xx_pwrdm: 3D accelerator power domain */
  228. static struct powerdomain gpu_54xx_pwrdm = {
  229. .name = "gpu_pwrdm",
  230. .voltdm = { .name = "mm" },
  231. .prcm_offs = OMAP54XX_PRM_GPU_INST,
  232. .prcm_partition = OMAP54XX_PRM_PARTITION,
  233. .pwrsts = PWRSTS_OFF_ON,
  234. .banks = 1,
  235. .pwrsts_mem_ret = {
  236. [0] = PWRSTS_OFF_RET, /* gpu_mem */
  237. },
  238. .pwrsts_mem_on = {
  239. [0] = PWRSTS_OFF_RET, /* gpu_mem */
  240. },
  241. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  242. };
  243. /* wkupaon_54xx_pwrdm: Wake-up power domain */
  244. static struct powerdomain wkupaon_54xx_pwrdm = {
  245. .name = "wkupaon_pwrdm",
  246. .voltdm = { .name = "wkup" },
  247. .prcm_offs = OMAP54XX_PRM_WKUPAON_INST,
  248. .prcm_partition = OMAP54XX_PRM_PARTITION,
  249. .pwrsts = PWRSTS_ON,
  250. .banks = 1,
  251. .pwrsts_mem_ret = {
  252. },
  253. .pwrsts_mem_on = {
  254. [0] = PWRSTS_ON, /* wkup_bank */
  255. },
  256. };
  257. /* iva_54xx_pwrdm: IVA-HD power domain */
  258. static struct powerdomain iva_54xx_pwrdm = {
  259. .name = "iva_pwrdm",
  260. .voltdm = { .name = "mm" },
  261. .prcm_offs = OMAP54XX_PRM_IVA_INST,
  262. .prcm_partition = OMAP54XX_PRM_PARTITION,
  263. .pwrsts = PWRSTS_OFF_RET_ON,
  264. .pwrsts_logic_ret = PWRSTS_OFF,
  265. .banks = 4,
  266. .pwrsts_mem_ret = {
  267. [0] = PWRSTS_OFF_RET, /* hwa_mem */
  268. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  269. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  270. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  271. },
  272. .pwrsts_mem_on = {
  273. [0] = PWRSTS_OFF_RET, /* hwa_mem */
  274. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  275. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  276. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  277. },
  278. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  279. };
  280. /*
  281. * The following power domains are not under SW control
  282. *
  283. * mpuaon
  284. * mmaon
  285. */
  286. /* As powerdomains are added or removed above, this list must also be changed */
  287. static struct powerdomain *powerdomains_omap54xx[] __initdata = {
  288. &core_54xx_pwrdm,
  289. &abe_54xx_pwrdm,
  290. &coreaon_54xx_pwrdm,
  291. &dss_54xx_pwrdm,
  292. &cpu0_54xx_pwrdm,
  293. &cpu1_54xx_pwrdm,
  294. &emu_54xx_pwrdm,
  295. &mpu_54xx_pwrdm,
  296. &custefuse_54xx_pwrdm,
  297. &dsp_54xx_pwrdm,
  298. &cam_54xx_pwrdm,
  299. &l3init_54xx_pwrdm,
  300. &gpu_54xx_pwrdm,
  301. &wkupaon_54xx_pwrdm,
  302. &iva_54xx_pwrdm,
  303. NULL
  304. };
  305. void __init omap54xx_powerdomains_init(void)
  306. {
  307. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  308. pwrdm_register_pwrdms(powerdomains_omap54xx);
  309. pwrdm_complete_init();
  310. }