powerdomains34xx.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. /*
  2. * OMAP3 powerdomain definitions
  3. *
  4. * Copyright (C) 2007-2008 Texas Instruments, Inc.
  5. * Copyright (C) 2007-2010 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. #ifndef ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
  15. #define ARCH_ARM_MACH_OMAP2_POWERDOMAINS34XX
  16. /*
  17. * N.B. If powerdomains are added or removed from this file, update
  18. * the array in mach-omap2/powerdomains.h.
  19. */
  20. #include <plat/powerdomain.h>
  21. #include "prcm-common.h"
  22. #include "prm.h"
  23. #include "prm-regbits-34xx.h"
  24. #include "cm.h"
  25. #include "cm-regbits-34xx.h"
  26. /*
  27. * 34XX-specific powerdomains, dependencies
  28. */
  29. #ifdef CONFIG_ARCH_OMAP3
  30. /*
  31. * Powerdomains
  32. */
  33. static struct powerdomain iva2_pwrdm = {
  34. .name = "iva2_pwrdm",
  35. .prcm_offs = OMAP3430_IVA2_MOD,
  36. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  37. .pwrsts = PWRSTS_OFF_RET_ON,
  38. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  39. .banks = 4,
  40. .pwrsts_mem_ret = {
  41. [0] = PWRSTS_OFF_RET,
  42. [1] = PWRSTS_OFF_RET,
  43. [2] = PWRSTS_OFF_RET,
  44. [3] = PWRSTS_OFF_RET,
  45. },
  46. .pwrsts_mem_on = {
  47. [0] = PWRDM_POWER_ON,
  48. [1] = PWRDM_POWER_ON,
  49. [2] = PWRSTS_OFF_ON,
  50. [3] = PWRDM_POWER_ON,
  51. },
  52. };
  53. static struct powerdomain mpu_3xxx_pwrdm = {
  54. .name = "mpu_pwrdm",
  55. .prcm_offs = MPU_MOD,
  56. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  57. .pwrsts = PWRSTS_OFF_RET_ON,
  58. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  59. .flags = PWRDM_HAS_MPU_QUIRK,
  60. .banks = 1,
  61. .pwrsts_mem_ret = {
  62. [0] = PWRSTS_OFF_RET,
  63. },
  64. .pwrsts_mem_on = {
  65. [0] = PWRSTS_OFF_ON,
  66. },
  67. };
  68. /*
  69. * The USBTLL Save-and-Restore mechanism is broken on
  70. * 3430s upto ES3.0 and 3630ES1.0. Hence this feature
  71. * needs to be disabled on these chips.
  72. * Refer: 3430 errata ID i459 and 3630 errata ID i579
  73. */
  74. static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
  75. .name = "core_pwrdm",
  76. .prcm_offs = CORE_MOD,
  77. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  78. CHIP_IS_OMAP3430ES2 |
  79. CHIP_IS_OMAP3430ES3_0 |
  80. CHIP_IS_OMAP3630ES1),
  81. .pwrsts = PWRSTS_OFF_RET_ON,
  82. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  83. .banks = 2,
  84. .pwrsts_mem_ret = {
  85. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  86. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  87. },
  88. .pwrsts_mem_on = {
  89. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  90. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  91. },
  92. };
  93. static struct powerdomain core_3xxx_es3_1_pwrdm = {
  94. .name = "core_pwrdm",
  95. .prcm_offs = CORE_MOD,
  96. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
  97. CHIP_GE_OMAP3630ES1_1),
  98. .pwrsts = PWRSTS_OFF_RET_ON,
  99. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  100. .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
  101. .banks = 2,
  102. .pwrsts_mem_ret = {
  103. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  104. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  105. },
  106. .pwrsts_mem_on = {
  107. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  108. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  109. },
  110. };
  111. static struct powerdomain dss_pwrdm = {
  112. .name = "dss_pwrdm",
  113. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  114. .prcm_offs = OMAP3430_DSS_MOD,
  115. .pwrsts = PWRSTS_OFF_RET_ON,
  116. .pwrsts_logic_ret = PWRDM_POWER_RET,
  117. .banks = 1,
  118. .pwrsts_mem_ret = {
  119. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  120. },
  121. .pwrsts_mem_on = {
  122. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  123. },
  124. };
  125. /*
  126. * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
  127. * possible SGX powerstate, the SGX device itself does not support
  128. * retention.
  129. */
  130. static struct powerdomain sgx_pwrdm = {
  131. .name = "sgx_pwrdm",
  132. .prcm_offs = OMAP3430ES2_SGX_MOD,
  133. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  134. /* XXX This is accurate for 3430 SGX, but what about GFX? */
  135. .pwrsts = PWRSTS_OFF_ON,
  136. .pwrsts_logic_ret = PWRDM_POWER_RET,
  137. .banks = 1,
  138. .pwrsts_mem_ret = {
  139. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  140. },
  141. .pwrsts_mem_on = {
  142. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  143. },
  144. };
  145. static struct powerdomain cam_pwrdm = {
  146. .name = "cam_pwrdm",
  147. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  148. .prcm_offs = OMAP3430_CAM_MOD,
  149. .pwrsts = PWRSTS_OFF_RET_ON,
  150. .pwrsts_logic_ret = PWRDM_POWER_RET,
  151. .banks = 1,
  152. .pwrsts_mem_ret = {
  153. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  154. },
  155. .pwrsts_mem_on = {
  156. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  157. },
  158. };
  159. static struct powerdomain per_pwrdm = {
  160. .name = "per_pwrdm",
  161. .prcm_offs = OMAP3430_PER_MOD,
  162. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  163. .pwrsts = PWRSTS_OFF_RET_ON,
  164. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  165. .banks = 1,
  166. .pwrsts_mem_ret = {
  167. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  168. },
  169. .pwrsts_mem_on = {
  170. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  171. },
  172. };
  173. static struct powerdomain emu_pwrdm = {
  174. .name = "emu_pwrdm",
  175. .prcm_offs = OMAP3430_EMU_MOD,
  176. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  177. };
  178. static struct powerdomain neon_pwrdm = {
  179. .name = "neon_pwrdm",
  180. .prcm_offs = OMAP3430_NEON_MOD,
  181. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  182. .pwrsts = PWRSTS_OFF_RET_ON,
  183. .pwrsts_logic_ret = PWRDM_POWER_RET,
  184. };
  185. static struct powerdomain usbhost_pwrdm = {
  186. .name = "usbhost_pwrdm",
  187. .prcm_offs = OMAP3430ES2_USBHOST_MOD,
  188. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  189. .pwrsts = PWRSTS_OFF_RET_ON,
  190. .pwrsts_logic_ret = PWRDM_POWER_RET,
  191. /*
  192. * REVISIT: Enabling usb host save and restore mechanism seems to
  193. * leave the usb host domain permanently in ACTIVE mode after
  194. * changing the usb host power domain state from OFF to active once.
  195. * Disabling for now.
  196. */
  197. /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
  198. .banks = 1,
  199. .pwrsts_mem_ret = {
  200. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  201. },
  202. .pwrsts_mem_on = {
  203. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  204. },
  205. };
  206. static struct powerdomain dpll1_pwrdm = {
  207. .name = "dpll1_pwrdm",
  208. .prcm_offs = MPU_MOD,
  209. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  210. };
  211. static struct powerdomain dpll2_pwrdm = {
  212. .name = "dpll2_pwrdm",
  213. .prcm_offs = OMAP3430_IVA2_MOD,
  214. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  215. };
  216. static struct powerdomain dpll3_pwrdm = {
  217. .name = "dpll3_pwrdm",
  218. .prcm_offs = PLL_MOD,
  219. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  220. };
  221. static struct powerdomain dpll4_pwrdm = {
  222. .name = "dpll4_pwrdm",
  223. .prcm_offs = PLL_MOD,
  224. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  225. };
  226. static struct powerdomain dpll5_pwrdm = {
  227. .name = "dpll5_pwrdm",
  228. .prcm_offs = PLL_MOD,
  229. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  230. };
  231. #endif /* CONFIG_ARCH_OMAP3 */
  232. #endif