powerdomains54xx_data.c 9.1 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 "prm54xx.h"
  26. #include "prcm_mpu54xx.h"
  27. /* core_54xx_pwrdm: CORE power domain */
  28. static struct powerdomain core_54xx_pwrdm = {
  29. .name = "core_pwrdm",
  30. .voltdm = { .name = "core" },
  31. .prcm_offs = OMAP54XX_PRM_CORE_INST,
  32. .prcm_partition = OMAP54XX_PRM_PARTITION,
  33. .pwrsts = PWRSTS_RET_ON,
  34. .pwrsts_logic_ret = PWRSTS_RET,
  35. .banks = 5,
  36. .pwrsts_mem_ret = {
  37. [0] = PWRSTS_OFF_RET, /* core_nret_bank */
  38. [1] = PWRSTS_OFF_RET, /* core_ocmram */
  39. [2] = PWRSTS_OFF_RET, /* core_other_bank */
  40. [3] = PWRSTS_OFF_RET, /* ipu_l2ram */
  41. [4] = PWRSTS_OFF_RET, /* ipu_unicache */
  42. },
  43. .pwrsts_mem_on = {
  44. [0] = PWRSTS_OFF_RET, /* core_nret_bank */
  45. [1] = PWRSTS_OFF_RET, /* core_ocmram */
  46. [2] = PWRSTS_OFF_RET, /* core_other_bank */
  47. [3] = PWRSTS_OFF_RET, /* ipu_l2ram */
  48. [4] = PWRSTS_OFF_RET, /* ipu_unicache */
  49. },
  50. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  51. };
  52. /* abe_54xx_pwrdm: Audio back end power domain */
  53. static struct powerdomain abe_54xx_pwrdm = {
  54. .name = "abe_pwrdm",
  55. .voltdm = { .name = "core" },
  56. .prcm_offs = OMAP54XX_PRM_ABE_INST,
  57. .prcm_partition = OMAP54XX_PRM_PARTITION,
  58. .pwrsts = PWRSTS_OFF_RET_ON,
  59. .pwrsts_logic_ret = PWRSTS_OFF,
  60. .banks = 2,
  61. .pwrsts_mem_ret = {
  62. [0] = PWRSTS_OFF_RET, /* aessmem */
  63. [1] = PWRSTS_OFF_RET, /* periphmem */
  64. },
  65. .pwrsts_mem_on = {
  66. [0] = PWRSTS_OFF_RET, /* aessmem */
  67. [1] = PWRSTS_OFF_RET, /* periphmem */
  68. },
  69. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  70. };
  71. /* coreaon_54xx_pwrdm: Always ON logic that sits in VDD_CORE voltage domain */
  72. static struct powerdomain coreaon_54xx_pwrdm = {
  73. .name = "coreaon_pwrdm",
  74. .voltdm = { .name = "core" },
  75. .prcm_offs = OMAP54XX_PRM_COREAON_INST,
  76. .prcm_partition = OMAP54XX_PRM_PARTITION,
  77. .pwrsts = PWRSTS_ON,
  78. };
  79. /* dss_54xx_pwrdm: Display subsystem power domain */
  80. static struct powerdomain dss_54xx_pwrdm = {
  81. .name = "dss_pwrdm",
  82. .voltdm = { .name = "core" },
  83. .prcm_offs = OMAP54XX_PRM_DSS_INST,
  84. .prcm_partition = OMAP54XX_PRM_PARTITION,
  85. .pwrsts = PWRSTS_OFF_RET_ON,
  86. .pwrsts_logic_ret = PWRSTS_OFF,
  87. .banks = 1,
  88. .pwrsts_mem_ret = {
  89. [0] = PWRSTS_OFF_RET, /* dss_mem */
  90. },
  91. .pwrsts_mem_on = {
  92. [0] = PWRSTS_OFF_RET, /* dss_mem */
  93. },
  94. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  95. };
  96. /* cpu0_54xx_pwrdm: MPU0 processor and Neon coprocessor power domain */
  97. static struct powerdomain cpu0_54xx_pwrdm = {
  98. .name = "cpu0_pwrdm",
  99. .voltdm = { .name = "mpu" },
  100. .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C0_INST,
  101. .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
  102. .pwrsts = PWRSTS_RET_ON,
  103. .pwrsts_logic_ret = PWRSTS_RET,
  104. .banks = 1,
  105. .pwrsts_mem_ret = {
  106. [0] = PWRSTS_OFF_RET, /* cpu0_l1 */
  107. },
  108. .pwrsts_mem_on = {
  109. [0] = PWRSTS_ON, /* cpu0_l1 */
  110. },
  111. };
  112. /* cpu1_54xx_pwrdm: MPU1 processor and Neon coprocessor power domain */
  113. static struct powerdomain cpu1_54xx_pwrdm = {
  114. .name = "cpu1_pwrdm",
  115. .voltdm = { .name = "mpu" },
  116. .prcm_offs = OMAP54XX_PRCM_MPU_PRM_C1_INST,
  117. .prcm_partition = OMAP54XX_PRCM_MPU_PARTITION,
  118. .pwrsts = PWRSTS_RET_ON,
  119. .pwrsts_logic_ret = PWRSTS_RET,
  120. .banks = 1,
  121. .pwrsts_mem_ret = {
  122. [0] = PWRSTS_OFF_RET, /* cpu1_l1 */
  123. },
  124. .pwrsts_mem_on = {
  125. [0] = PWRSTS_ON, /* cpu1_l1 */
  126. },
  127. };
  128. /* emu_54xx_pwrdm: Emulation power domain */
  129. static struct powerdomain emu_54xx_pwrdm = {
  130. .name = "emu_pwrdm",
  131. .voltdm = { .name = "wkup" },
  132. .prcm_offs = OMAP54XX_PRM_EMU_INST,
  133. .prcm_partition = OMAP54XX_PRM_PARTITION,
  134. .pwrsts = PWRSTS_OFF_ON,
  135. .banks = 1,
  136. .pwrsts_mem_ret = {
  137. [0] = PWRSTS_OFF_RET, /* emu_bank */
  138. },
  139. .pwrsts_mem_on = {
  140. [0] = PWRSTS_OFF_RET, /* emu_bank */
  141. },
  142. };
  143. /* mpu_54xx_pwrdm: Modena processor and the Neon coprocessor power domain */
  144. static struct powerdomain mpu_54xx_pwrdm = {
  145. .name = "mpu_pwrdm",
  146. .voltdm = { .name = "mpu" },
  147. .prcm_offs = OMAP54XX_PRM_MPU_INST,
  148. .prcm_partition = OMAP54XX_PRM_PARTITION,
  149. .pwrsts = PWRSTS_RET_ON,
  150. .pwrsts_logic_ret = PWRSTS_RET,
  151. .banks = 2,
  152. .pwrsts_mem_ret = {
  153. [0] = PWRSTS_OFF_RET, /* mpu_l2 */
  154. [1] = PWRSTS_RET, /* mpu_ram */
  155. },
  156. .pwrsts_mem_on = {
  157. [0] = PWRSTS_OFF_RET, /* mpu_l2 */
  158. [1] = PWRSTS_OFF_RET, /* mpu_ram */
  159. },
  160. };
  161. /* custefuse_54xx_pwrdm: Customer efuse controller power domain */
  162. static struct powerdomain custefuse_54xx_pwrdm = {
  163. .name = "custefuse_pwrdm",
  164. .voltdm = { .name = "core" },
  165. .prcm_offs = OMAP54XX_PRM_CUSTEFUSE_INST,
  166. .prcm_partition = OMAP54XX_PRM_PARTITION,
  167. .pwrsts = PWRSTS_OFF_ON,
  168. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  169. };
  170. /* dsp_54xx_pwrdm: Tesla processor power domain */
  171. static struct powerdomain dsp_54xx_pwrdm = {
  172. .name = "dsp_pwrdm",
  173. .voltdm = { .name = "mm" },
  174. .prcm_offs = OMAP54XX_PRM_DSP_INST,
  175. .prcm_partition = OMAP54XX_PRM_PARTITION,
  176. .pwrsts = PWRSTS_OFF_RET_ON,
  177. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  178. .banks = 3,
  179. .pwrsts_mem_ret = {
  180. [0] = PWRSTS_OFF_RET, /* dsp_edma */
  181. [1] = PWRSTS_OFF_RET, /* dsp_l1 */
  182. [2] = PWRSTS_OFF_RET, /* dsp_l2 */
  183. },
  184. .pwrsts_mem_on = {
  185. [0] = PWRSTS_OFF_RET, /* dsp_edma */
  186. [1] = PWRSTS_OFF_RET, /* dsp_l1 */
  187. [2] = PWRSTS_OFF_RET, /* dsp_l2 */
  188. },
  189. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  190. };
  191. /* cam_54xx_pwrdm: Camera subsystem power domain */
  192. static struct powerdomain cam_54xx_pwrdm = {
  193. .name = "cam_pwrdm",
  194. .voltdm = { .name = "core" },
  195. .prcm_offs = OMAP54XX_PRM_CAM_INST,
  196. .prcm_partition = OMAP54XX_PRM_PARTITION,
  197. .pwrsts = PWRSTS_OFF_ON,
  198. .banks = 1,
  199. .pwrsts_mem_ret = {
  200. [0] = PWRSTS_OFF_RET, /* cam_mem */
  201. },
  202. .pwrsts_mem_on = {
  203. [0] = PWRSTS_OFF_RET, /* cam_mem */
  204. },
  205. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  206. };
  207. /* l3init_54xx_pwrdm: L3 initators pheripherals power domain */
  208. static struct powerdomain l3init_54xx_pwrdm = {
  209. .name = "l3init_pwrdm",
  210. .voltdm = { .name = "core" },
  211. .prcm_offs = OMAP54XX_PRM_L3INIT_INST,
  212. .prcm_partition = OMAP54XX_PRM_PARTITION,
  213. .pwrsts = PWRSTS_RET_ON,
  214. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  215. .banks = 2,
  216. .pwrsts_mem_ret = {
  217. [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
  218. [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
  219. },
  220. .pwrsts_mem_on = {
  221. [0] = PWRSTS_OFF_RET, /* l3init_bank1 */
  222. [1] = PWRSTS_OFF_RET, /* l3init_bank2 */
  223. },
  224. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  225. };
  226. /* gpu_54xx_pwrdm: 3D accelerator power domain */
  227. static struct powerdomain gpu_54xx_pwrdm = {
  228. .name = "gpu_pwrdm",
  229. .voltdm = { .name = "mm" },
  230. .prcm_offs = OMAP54XX_PRM_GPU_INST,
  231. .prcm_partition = OMAP54XX_PRM_PARTITION,
  232. .pwrsts = PWRSTS_OFF_ON,
  233. .banks = 1,
  234. .pwrsts_mem_ret = {
  235. [0] = PWRSTS_OFF_RET, /* gpu_mem */
  236. },
  237. .pwrsts_mem_on = {
  238. [0] = PWRSTS_OFF_RET, /* gpu_mem */
  239. },
  240. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  241. };
  242. /* wkupaon_54xx_pwrdm: Wake-up power domain */
  243. static struct powerdomain wkupaon_54xx_pwrdm = {
  244. .name = "wkupaon_pwrdm",
  245. .voltdm = { .name = "wkup" },
  246. .prcm_offs = OMAP54XX_PRM_WKUPAON_INST,
  247. .prcm_partition = OMAP54XX_PRM_PARTITION,
  248. .pwrsts = PWRSTS_ON,
  249. .banks = 1,
  250. .pwrsts_mem_ret = {
  251. },
  252. .pwrsts_mem_on = {
  253. [0] = PWRSTS_ON, /* wkup_bank */
  254. },
  255. };
  256. /* iva_54xx_pwrdm: IVA-HD power domain */
  257. static struct powerdomain iva_54xx_pwrdm = {
  258. .name = "iva_pwrdm",
  259. .voltdm = { .name = "mm" },
  260. .prcm_offs = OMAP54XX_PRM_IVA_INST,
  261. .prcm_partition = OMAP54XX_PRM_PARTITION,
  262. .pwrsts = PWRSTS_OFF_RET_ON,
  263. .pwrsts_logic_ret = PWRSTS_OFF,
  264. .banks = 4,
  265. .pwrsts_mem_ret = {
  266. [0] = PWRSTS_OFF_RET, /* hwa_mem */
  267. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  268. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  269. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  270. },
  271. .pwrsts_mem_on = {
  272. [0] = PWRSTS_OFF_RET, /* hwa_mem */
  273. [1] = PWRSTS_OFF_RET, /* sl2_mem */
  274. [2] = PWRSTS_OFF_RET, /* tcm1_mem */
  275. [3] = PWRSTS_OFF_RET, /* tcm2_mem */
  276. },
  277. .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
  278. };
  279. /*
  280. * The following power domains are not under SW control
  281. *
  282. * mpuaon
  283. * mmaon
  284. */
  285. /* As powerdomains are added or removed above, this list must also be changed */
  286. static struct powerdomain *powerdomains_omap54xx[] __initdata = {
  287. &core_54xx_pwrdm,
  288. &abe_54xx_pwrdm,
  289. &coreaon_54xx_pwrdm,
  290. &dss_54xx_pwrdm,
  291. &cpu0_54xx_pwrdm,
  292. &cpu1_54xx_pwrdm,
  293. &emu_54xx_pwrdm,
  294. &mpu_54xx_pwrdm,
  295. &custefuse_54xx_pwrdm,
  296. &dsp_54xx_pwrdm,
  297. &cam_54xx_pwrdm,
  298. &l3init_54xx_pwrdm,
  299. &gpu_54xx_pwrdm,
  300. &wkupaon_54xx_pwrdm,
  301. &iva_54xx_pwrdm,
  302. NULL
  303. };
  304. void __init omap54xx_powerdomains_init(void)
  305. {
  306. pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
  307. pwrdm_register_pwrdms(powerdomains_omap54xx);
  308. pwrdm_complete_init();
  309. }