powerdomains34xx.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. * Note: setting the SAR flag could help for errata ID i478
  75. * which applies to 3430 <= ES3.1, but since the SAR feature
  76. * is broken, do not use it.
  77. */
  78. static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
  79. .name = "core_pwrdm",
  80. .prcm_offs = CORE_MOD,
  81. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
  82. CHIP_IS_OMAP3430ES2 |
  83. CHIP_IS_OMAP3430ES3_0 |
  84. CHIP_IS_OMAP3630ES1),
  85. .pwrsts = PWRSTS_OFF_RET_ON,
  86. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  87. .banks = 2,
  88. .pwrsts_mem_ret = {
  89. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  90. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  91. },
  92. .pwrsts_mem_on = {
  93. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  94. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  95. },
  96. };
  97. static struct powerdomain core_3xxx_es3_1_pwrdm = {
  98. .name = "core_pwrdm",
  99. .prcm_offs = CORE_MOD,
  100. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
  101. CHIP_GE_OMAP3630ES1_1),
  102. .pwrsts = PWRSTS_OFF_RET_ON,
  103. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  104. /*
  105. * Setting the SAR flag for errata ID i478 which applies
  106. * to 3430 <= ES3.1
  107. */
  108. .flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
  109. .banks = 2,
  110. .pwrsts_mem_ret = {
  111. [0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
  112. [1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
  113. },
  114. .pwrsts_mem_on = {
  115. [0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
  116. [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
  117. },
  118. };
  119. static struct powerdomain dss_pwrdm = {
  120. .name = "dss_pwrdm",
  121. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  122. .prcm_offs = OMAP3430_DSS_MOD,
  123. .pwrsts = PWRSTS_OFF_RET_ON,
  124. .pwrsts_logic_ret = PWRDM_POWER_RET,
  125. .banks = 1,
  126. .pwrsts_mem_ret = {
  127. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  128. },
  129. .pwrsts_mem_on = {
  130. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  131. },
  132. };
  133. /*
  134. * Although the 34XX TRM Rev K Table 4-371 notes that retention is a
  135. * possible SGX powerstate, the SGX device itself does not support
  136. * retention.
  137. */
  138. static struct powerdomain sgx_pwrdm = {
  139. .name = "sgx_pwrdm",
  140. .prcm_offs = OMAP3430ES2_SGX_MOD,
  141. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  142. /* XXX This is accurate for 3430 SGX, but what about GFX? */
  143. .pwrsts = PWRSTS_OFF_ON,
  144. .pwrsts_logic_ret = PWRDM_POWER_RET,
  145. .banks = 1,
  146. .pwrsts_mem_ret = {
  147. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  148. },
  149. .pwrsts_mem_on = {
  150. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  151. },
  152. };
  153. static struct powerdomain cam_pwrdm = {
  154. .name = "cam_pwrdm",
  155. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  156. .prcm_offs = OMAP3430_CAM_MOD,
  157. .pwrsts = PWRSTS_OFF_RET_ON,
  158. .pwrsts_logic_ret = PWRDM_POWER_RET,
  159. .banks = 1,
  160. .pwrsts_mem_ret = {
  161. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  162. },
  163. .pwrsts_mem_on = {
  164. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  165. },
  166. };
  167. static struct powerdomain per_pwrdm = {
  168. .name = "per_pwrdm",
  169. .prcm_offs = OMAP3430_PER_MOD,
  170. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  171. .pwrsts = PWRSTS_OFF_RET_ON,
  172. .pwrsts_logic_ret = PWRSTS_OFF_RET,
  173. .banks = 1,
  174. .pwrsts_mem_ret = {
  175. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  176. },
  177. .pwrsts_mem_on = {
  178. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  179. },
  180. };
  181. static struct powerdomain emu_pwrdm = {
  182. .name = "emu_pwrdm",
  183. .prcm_offs = OMAP3430_EMU_MOD,
  184. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  185. };
  186. static struct powerdomain neon_pwrdm = {
  187. .name = "neon_pwrdm",
  188. .prcm_offs = OMAP3430_NEON_MOD,
  189. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  190. .pwrsts = PWRSTS_OFF_RET_ON,
  191. .pwrsts_logic_ret = PWRDM_POWER_RET,
  192. };
  193. static struct powerdomain usbhost_pwrdm = {
  194. .name = "usbhost_pwrdm",
  195. .prcm_offs = OMAP3430ES2_USBHOST_MOD,
  196. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  197. .pwrsts = PWRSTS_OFF_RET_ON,
  198. .pwrsts_logic_ret = PWRDM_POWER_RET,
  199. /*
  200. * REVISIT: Enabling usb host save and restore mechanism seems to
  201. * leave the usb host domain permanently in ACTIVE mode after
  202. * changing the usb host power domain state from OFF to active once.
  203. * Disabling for now.
  204. */
  205. /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
  206. .banks = 1,
  207. .pwrsts_mem_ret = {
  208. [0] = PWRDM_POWER_RET, /* MEMRETSTATE */
  209. },
  210. .pwrsts_mem_on = {
  211. [0] = PWRDM_POWER_ON, /* MEMONSTATE */
  212. },
  213. };
  214. static struct powerdomain dpll1_pwrdm = {
  215. .name = "dpll1_pwrdm",
  216. .prcm_offs = MPU_MOD,
  217. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  218. };
  219. static struct powerdomain dpll2_pwrdm = {
  220. .name = "dpll2_pwrdm",
  221. .prcm_offs = OMAP3430_IVA2_MOD,
  222. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  223. };
  224. static struct powerdomain dpll3_pwrdm = {
  225. .name = "dpll3_pwrdm",
  226. .prcm_offs = PLL_MOD,
  227. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  228. };
  229. static struct powerdomain dpll4_pwrdm = {
  230. .name = "dpll4_pwrdm",
  231. .prcm_offs = PLL_MOD,
  232. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  233. };
  234. static struct powerdomain dpll5_pwrdm = {
  235. .name = "dpll5_pwrdm",
  236. .prcm_offs = PLL_MOD,
  237. .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
  238. };
  239. #endif /* CONFIG_ARCH_OMAP3 */
  240. #endif