stm32mp2_pwr.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. /*
  2. * Copyright (c) 2018-2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP2_PWR_H
  7. #define STM32MP2_PWR_H
  8. #include <lib/utils_def.h>
  9. #define PWR_CR1 U(0x00)
  10. #define PWR_CR2 U(0x04)
  11. #define PWR_CR3 U(0x08)
  12. #define PWR_CR4 U(0x0C)
  13. #define PWR_CR5 U(0x10)
  14. #define PWR_CR6 U(0x14)
  15. #define PWR_CR7 U(0x18)
  16. #define PWR_CR8 U(0x1C)
  17. #define PWR_CR9 U(0x20)
  18. #define PWR_CR10 U(0x24)
  19. #define PWR_CR11 U(0x28)
  20. #define PWR_CR12 U(0x2C)
  21. #define PWR_UCPDR U(0x30)
  22. #define PWR_BDCR1 U(0x38)
  23. #define PWR_BDCR2 U(0x3C)
  24. #define PWR_CPU1CR U(0x40)
  25. #define PWR_CPU2CR U(0x44)
  26. #define PWR_CPU3CR U(0x48)
  27. #define PWR_D1CR U(0x4C)
  28. #define PWR_D2CR U(0x50)
  29. #define PWR_D3CR U(0x54)
  30. #define PWR_WKUPCR1 U(0x60)
  31. #define PWR_WKUPCR2 U(0x64)
  32. #define PWR_WKUPCR3 U(0x68)
  33. #define PWR_WKUPCR4 U(0x6C)
  34. #define PWR_WKUPCR5 U(0x70)
  35. #define PWR_WKUPCR6 U(0x74)
  36. #define PWR_D3WKUPENR U(0x98)
  37. #define PWR_RSECCFGR U(0x100)
  38. #define PWR_RPRIVCFGR U(0x104)
  39. #define PWR_R0CIDCFGR U(0x108)
  40. #define PWR_R1CIDCFGR U(0x10C)
  41. #define PWR_R2CIDCFGR U(0x110)
  42. #define PWR_R3CIDCFGR U(0x114)
  43. #define PWR_R4CIDCFGR U(0x118)
  44. #define PWR_R5CIDCFGR U(0x11C)
  45. #define PWR_R6CIDCFGR U(0x120)
  46. #define PWR_WIOSECCFGR U(0x180)
  47. #define PWR_WIOPRIVCFGR U(0x184)
  48. #define PWR_WIO1CIDCFGR U(0x188)
  49. #define PWR_WIO1SEMCR U(0x18C)
  50. #define PWR_WIO2CIDCFGR U(0x190)
  51. #define PWR_WIO2SEMCR U(0x194)
  52. #define PWR_WIO3CIDCFGR U(0x198)
  53. #define PWR_WIO3SEMCR U(0x19C)
  54. #define PWR_WIO4CIDCFGR U(0x1A0)
  55. #define PWR_WIO4SEMCR U(0x1A4)
  56. #define PWR_WIO5CIDCFGR U(0x1A8)
  57. #define PWR_WIO5SEMCR U(0x1AC)
  58. #define PWR_WIO6CIDCFGR U(0x1B0)
  59. #define PWR_WIO6SEMCR U(0x1B4)
  60. #define PWR_CPU1D1SR U(0x200)
  61. #define PWR_CPU2D2SR U(0x204)
  62. #define PWR_CPU3D3SR U(0x208)
  63. #define PWR_DBGR U(0x308)
  64. #define PWR_VERR U(0x3F4)
  65. #define PWR_IPIDR U(0x3F8)
  66. #define PWR_SIDR U(0x3FC)
  67. /* PWR_CR1 register fields */
  68. #define PWR_CR1_VDDIO3VMEN BIT_32(0)
  69. #define PWR_CR1_VDDIO4VMEN BIT_32(1)
  70. #define PWR_CR1_USB33VMEN BIT_32(2)
  71. #define PWR_CR1_UCPDVMEN BIT_32(3)
  72. #define PWR_CR1_AVMEN BIT_32(4)
  73. #define PWR_CR1_VDDIO3SV BIT_32(8)
  74. #define PWR_CR1_VDDIO4SV BIT_32(9)
  75. #define PWR_CR1_USB33SV BIT_32(10)
  76. #define PWR_CR1_UCPDSV BIT_32(11)
  77. #define PWR_CR1_ASV BIT_32(12)
  78. #define PWR_CR1_VDDIO3RDY BIT_32(16)
  79. #define PWR_CR1_VDDIO4RDY BIT_32(17)
  80. #define PWR_CR1_USB33RDY BIT_32(18)
  81. #define PWR_CR1_UCPDRDY BIT_32(19)
  82. #define PWR_CR1_ARDY BIT_32(20)
  83. #define PWR_CR1_VDDIOVRSEL BIT_32(24)
  84. #define PWR_CR1_VDDIO3VRSEL BIT_32(25)
  85. #define PWR_CR1_VDDIO4VRSEL BIT_32(26)
  86. #define PWR_CR1_GPVMO BIT_32(31)
  87. /* PWR_CR2 register fields */
  88. #define PWR_CR2_MONEN BIT_32(0)
  89. #define PWR_CR2_VBATL BIT_32(8)
  90. #define PWR_CR2_VBATH BIT_32(9)
  91. #define PWR_CR2_TEMPL BIT_32(10)
  92. #define PWR_CR2_TEMPH BIT_32(11)
  93. /* PWR_CR3 register fields */
  94. #define PWR_CR3_PVDEN BIT_32(0)
  95. #define PWR_CR3_PVDO BIT_32(8)
  96. /* PWR_CR5 register fields */
  97. #define PWR_CR5_VCOREMONEN BIT_32(0)
  98. #define PWR_CR5_VCOREL BIT_32(8)
  99. #define PWR_CR5_VCOREH BIT_32(9)
  100. /* PWR_CR6 register fields */
  101. #define PWR_CR6_VCPUMONEN BIT_32(0)
  102. #define PWR_CR6_VCPULLS BIT_32(4)
  103. #define PWR_CR6_VCPUL BIT_32(8)
  104. #define PWR_CR6_VCPUH BIT_32(9)
  105. /* PWR_CR7 register fields */
  106. #define PWR_CR7_VDDIO2VMEN BIT_32(0)
  107. #define PWR_CR7_VDDIO2SV BIT_32(8)
  108. #define PWR_CR7_VDDIO2RDY BIT_32(16)
  109. #define PWR_CR7_VDDIO2VRSEL BIT_32(24)
  110. #define PWR_CR7_VDDIO2VRSTBY BIT_32(25)
  111. /* PWR_CR8 register fields */
  112. #define PWR_CR8_VDDIO1VMEN BIT_32(0)
  113. #define PWR_CR8_VDDIO1SV BIT_32(8)
  114. #define PWR_CR8_VDDIO1RDY BIT_32(16)
  115. #define PWR_CR8_VDDIO1VRSEL BIT_32(24)
  116. #define PWR_CR8_VDDIO1VRSTBY BIT_32(25)
  117. /* PWR_CR9 register fields */
  118. #define PWR_CR9_BKPRBSEN BIT_32(0)
  119. #define PWR_CR9_LPR1BSEN BIT_32(4)
  120. /* PWR_CR10 register fields */
  121. #define PWR_CR10_RETRBSEN_MASK GENMASK_32(1, 0)
  122. #define PWR_CR10_RETRBSEN_SHIFT U(0)
  123. /* PWR_CR11 register fields */
  124. #define PWR_CR11_DDRRETDIS BIT_32(0)
  125. /* PWR_CR12 register fields */
  126. #define PWR_CR12_GPUVMEN BIT_32(0)
  127. #define PWR_CR12_GPULVTEN BIT_32(1)
  128. #define PWR_CR12_GPUSV BIT_32(8)
  129. #define PWR_CR12_VDDGPURDY BIT_32(16)
  130. /* PWR_UCPDR register fields */
  131. #define PWR_UCPDR_UCPD_DBDIS BIT_32(0)
  132. #define PWR_UCPDR_UCPD_STBY BIT_32(1)
  133. /* PWR_BDCR1 register fields */
  134. #define PWR_BDCR1_DBD3P BIT_32(0)
  135. /* PWR_BDCR2 register fields */
  136. #define PWR_BDCR2_DBP BIT_32(0)
  137. /* PWR_CPU1CR register fields */
  138. #define PWR_CPU1CR_PDDS_D2 BIT_32(0)
  139. #define PWR_CPU1CR_PDDS_D1 BIT_32(1)
  140. #define PWR_CPU1CR_VBF BIT_32(4)
  141. #define PWR_CPU1CR_STOPF BIT_32(5)
  142. #define PWR_CPU1CR_SBF BIT_32(6)
  143. #define PWR_CPU1CR_SBF_D1 BIT_32(7)
  144. #define PWR_CPU1CR_SBF_D3 BIT_32(8)
  145. #define PWR_CPU1CR_CSSF BIT_32(9)
  146. #define PWR_CPU1CR_STANDBYWFIL2 BIT_32(15)
  147. #define PWR_CPU1CR_LPDS_D1 BIT_32(16)
  148. #define PWR_CPU1CR_LVDS_D1 BIT_32(17)
  149. /* PWR_CPU2CR register fields */
  150. #define PWR_CPU2CR_PDDS_D2 BIT_32(0)
  151. #define PWR_CPU2CR_VBF BIT_32(4)
  152. #define PWR_CPU2CR_STOPF BIT_32(5)
  153. #define PWR_CPU2CR_SBF BIT_32(6)
  154. #define PWR_CPU2CR_SBF_D2 BIT_32(7)
  155. #define PWR_CPU2CR_SBF_D3 BIT_32(8)
  156. #define PWR_CPU2CR_CSSF BIT_32(9)
  157. #define PWR_CPU2CR_DEEPSLEEP BIT_32(15)
  158. #define PWR_CPU2CR_LPDS_D2 BIT_32(16)
  159. #define PWR_CPU2CR_LVDS_D2 BIT_32(17)
  160. /* PWR_CPU3CR register fields */
  161. #define PWR_CPU3CR_VBF BIT_32(4)
  162. #define PWR_CPU3CR_SBF_D3 BIT_32(8)
  163. #define PWR_CPU3CR_CSSF BIT_32(9)
  164. #define PWR_CPU3CR_DEEPSLEEP BIT_32(15)
  165. /* PWR_D1CR register fields */
  166. #define PWR_D1CR_LPCFG_D1 BIT_32(0)
  167. #define PWR_D1CR_POPL_D1_MASK GENMASK_32(12, 8)
  168. #define PWR_D1CR_POPL_D1_SHIFT U(8)
  169. /* PWR_D2CR register fields */
  170. #define PWR_D2CR_LPCFG_D2 BIT_32(0)
  171. #define PWR_D2CR_POPL_D2_MASK GENMASK_32(12, 8)
  172. #define PWR_D2CR_POPL_D2_SHIFT U(8)
  173. #define PWR_D2CR_LPLVDLY_D2_MASK GENMASK_32(18, 16)
  174. #define PWR_D2CR_LPLVDLY_D2_SHIFT U(16)
  175. #define PWR_D2CR_PODH_D2_MASK GENMASK_32(27, 24)
  176. #define PWR_D2CR_PODH_D2_SHIFT U(24)
  177. /* PWR_D3CR register fields */
  178. #define PWR_D3CR_PDDS_D3 BIT_32(0)
  179. #define PWR_D3CR_D3RDY BIT_32(31)
  180. /* PWR_WKUPCR1 register fields */
  181. #define PWR_WKUPCR1_WKUPC BIT_32(0)
  182. #define PWR_WKUPCR1_WKUPP BIT_32(8)
  183. #define PWR_WKUPCR1_WKUPPUPD_MASK GENMASK_32(13, 12)
  184. #define PWR_WKUPCR1_WKUPPUPD_SHIFT U(12)
  185. #define PWR_WKUPCR1_WKUPENCPU1 BIT_32(16)
  186. #define PWR_WKUPCR1_WKUPENCPU2 BIT_32(17)
  187. #define PWR_WKUPCR1_WKUPF BIT_32(31)
  188. /* PWR_WKUPCR2 register fields */
  189. #define PWR_WKUPCR2_WKUPC BIT_32(0)
  190. #define PWR_WKUPCR2_WKUPP BIT_32(8)
  191. #define PWR_WKUPCR2_WKUPPUPD_MASK GENMASK_32(13, 12)
  192. #define PWR_WKUPCR2_WKUPPUPD_SHIFT U(12)
  193. #define PWR_WKUPCR2_WKUPENCPU1 BIT_32(16)
  194. #define PWR_WKUPCR2_WKUPENCPU2 BIT_32(17)
  195. #define PWR_WKUPCR2_WKUPF BIT_32(31)
  196. /* PWR_WKUPCR3 register fields */
  197. #define PWR_WKUPCR3_WKUPC BIT_32(0)
  198. #define PWR_WKUPCR3_WKUPP BIT_32(8)
  199. #define PWR_WKUPCR3_WKUPPUPD_MASK GENMASK_32(13, 12)
  200. #define PWR_WKUPCR3_WKUPPUPD_SHIFT U(12)
  201. #define PWR_WKUPCR3_WKUPENCPU1 BIT_32(16)
  202. #define PWR_WKUPCR3_WKUPENCPU2 BIT_32(17)
  203. #define PWR_WKUPCR3_WKUPF BIT_32(31)
  204. /* PWR_WKUPCR4 register fields */
  205. #define PWR_WKUPCR4_WKUPC BIT_32(0)
  206. #define PWR_WKUPCR4_WKUPP BIT_32(8)
  207. #define PWR_WKUPCR4_WKUPPUPD_MASK GENMASK_32(13, 12)
  208. #define PWR_WKUPCR4_WKUPPUPD_SHIFT U(12)
  209. #define PWR_WKUPCR4_WKUPENCPU1 BIT_32(16)
  210. #define PWR_WKUPCR4_WKUPENCPU2 BIT_32(17)
  211. #define PWR_WKUPCR4_WKUPF BIT_32(31)
  212. /* PWR_WKUPCR5 register fields */
  213. #define PWR_WKUPCR5_WKUPC BIT_32(0)
  214. #define PWR_WKUPCR5_WKUPP BIT_32(8)
  215. #define PWR_WKUPCR5_WKUPPUPD_MASK GENMASK_32(13, 12)
  216. #define PWR_WKUPCR5_WKUPPUPD_SHIFT U(12)
  217. #define PWR_WKUPCR5_WKUPENCPU1 BIT_32(16)
  218. #define PWR_WKUPCR5_WKUPENCPU2 BIT_32(17)
  219. #define PWR_WKUPCR5_WKUPF BIT_32(31)
  220. /* PWR_WKUPCR6 register fields */
  221. #define PWR_WKUPCR6_WKUPC BIT_32(0)
  222. #define PWR_WKUPCR6_WKUPP BIT_32(8)
  223. #define PWR_WKUPCR6_WKUPPUPD_MASK GENMASK_32(13, 12)
  224. #define PWR_WKUPCR6_WKUPPUPD_SHIFT U(12)
  225. #define PWR_WKUPCR6_WKUPENCPU1 BIT_32(16)
  226. #define PWR_WKUPCR6_WKUPENCPU2 BIT_32(17)
  227. #define PWR_WKUPCR6_WKUPF BIT_32(31)
  228. /* PWR_D3WKUPENR register fields */
  229. #define PWR_D3WKUPENR_TAMP_WKUPEN_D3 BIT_32(0)
  230. /* PWR_RSECCFGR register fields */
  231. #define PWR_RSECCFGR_RSEC0 BIT_32(0)
  232. #define PWR_RSECCFGR_RSEC1 BIT_32(1)
  233. #define PWR_RSECCFGR_RSEC2 BIT_32(2)
  234. #define PWR_RSECCFGR_RSEC3 BIT_32(3)
  235. #define PWR_RSECCFGR_RSEC4 BIT_32(4)
  236. #define PWR_RSECCFGR_RSEC5 BIT_32(5)
  237. #define PWR_RSECCFGR_RSEC6 BIT_32(6)
  238. /* PWR_RPRIVCFGR register fields */
  239. #define PWR_RPRIVCFGR_RPRIV0 BIT_32(0)
  240. #define PWR_RPRIVCFGR_RPRIV1 BIT_32(1)
  241. #define PWR_RPRIVCFGR_RPRIV2 BIT_32(2)
  242. #define PWR_RPRIVCFGR_RPRIV3 BIT_32(3)
  243. #define PWR_RPRIVCFGR_RPRIV4 BIT_32(4)
  244. #define PWR_RPRIVCFGR_RPRIV5 BIT_32(5)
  245. #define PWR_RPRIVCFGR_RPRIV6 BIT_32(6)
  246. /* PWR_R0CIDCFGR register fields */
  247. #define PWR_R0CIDCFGR_CFEN BIT_32(0)
  248. #define PWR_R0CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  249. #define PWR_R0CIDCFGR_SCID_SHIFT U(4)
  250. /* PWR_R1CIDCFGR register fields */
  251. #define PWR_R1CIDCFGR_CFEN BIT_32(0)
  252. #define PWR_R1CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  253. #define PWR_R1CIDCFGR_SCID_SHIFT U(4)
  254. /* PWR_R2CIDCFGR register fields */
  255. #define PWR_R2CIDCFGR_CFEN BIT_32(0)
  256. #define PWR_R2CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  257. #define PWR_R2CIDCFGR_SCID_SHIFT U(4)
  258. /* PWR_R3CIDCFGR register fields */
  259. #define PWR_R3CIDCFGR_CFEN BIT_32(0)
  260. #define PWR_R3CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  261. #define PWR_R3CIDCFGR_SCID_SHIFT U(4)
  262. /* PWR_R4CIDCFGR register fields */
  263. #define PWR_R4CIDCFGR_CFEN BIT_32(0)
  264. #define PWR_R4CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  265. #define PWR_R4CIDCFGR_SCID_SHIFT U(4)
  266. /* PWR_R5CIDCFGR register fields */
  267. #define PWR_R5CIDCFGR_CFEN BIT_32(0)
  268. #define PWR_R5CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  269. #define PWR_R5CIDCFGR_SCID_SHIFT U(4)
  270. /* PWR_R6CIDCFGR register fields */
  271. #define PWR_R6CIDCFGR_CFEN BIT_32(0)
  272. #define PWR_R6CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  273. #define PWR_R6CIDCFGR_SCID_SHIFT U(4)
  274. /* PWR_WIOSECCFGR register fields */
  275. #define PWR_WIOSECCFGR_WIOSEC1 BIT_32(0)
  276. #define PWR_WIOSECCFGR_WIOSEC2 BIT_32(1)
  277. #define PWR_WIOSECCFGR_WIOSEC3 BIT_32(2)
  278. #define PWR_WIOSECCFGR_WIOSEC4 BIT_32(3)
  279. #define PWR_WIOSECCFGR_WIOSEC5 BIT_32(4)
  280. #define PWR_WIOSECCFGR_WIOSEC6 BIT_32(5)
  281. /* PWR_WIOPRIVCFGR register fields */
  282. #define PWR_WIOPRIVCFGR_WIOPRIV1 BIT_32(0)
  283. #define PWR_WIOPRIVCFGR_WIOPRIV2 BIT_32(1)
  284. #define PWR_WIOPRIVCFGR_WIOPRIV3 BIT_32(2)
  285. #define PWR_WIOPRIVCFGR_WIOPRIV4 BIT_32(3)
  286. #define PWR_WIOPRIVCFGR_WIOPRIV5 BIT_32(4)
  287. #define PWR_WIOPRIVCFGR_WIOPRIV6 BIT_32(5)
  288. /* PWR_WIO1CIDCFGR register fields */
  289. #define PWR_WIO1CIDCFGR_CFEN BIT_32(0)
  290. #define PWR_WIO1CIDCFGR_SEM_EN BIT_32(1)
  291. #define PWR_WIO1CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  292. #define PWR_WIO1CIDCFGR_SCID_SHIFT U(4)
  293. #define PWR_WIO1CIDCFGR_SEMWLC0 BIT_32(16)
  294. #define PWR_WIO1CIDCFGR_SEMWLC1 BIT_32(17)
  295. #define PWR_WIO1CIDCFGR_SEMWLC2 BIT_32(18)
  296. #define PWR_WIO1CIDCFGR_SEMWLC3 BIT_32(19)
  297. #define PWR_WIO1CIDCFGR_SEMWLC4 BIT_32(20)
  298. #define PWR_WIO1CIDCFGR_SEMWLC5 BIT_32(21)
  299. #define PWR_WIO1CIDCFGR_SEMWLC6 BIT_32(22)
  300. #define PWR_WIO1CIDCFGR_SEMWLC7 BIT_32(23)
  301. /* PWR_WIO1SEMCR register fields */
  302. #define PWR_WIO1SEMCR_SEM_MUTEX BIT_32(0)
  303. #define PWR_WIO1SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  304. #define PWR_WIO1SEMCR_SEMCID_SHIFT U(4)
  305. /* PWR_WIO2CIDCFGR register fields */
  306. #define PWR_WIO2CIDCFGR_CFEN BIT_32(0)
  307. #define PWR_WIO2CIDCFGR_SEM_EN BIT_32(1)
  308. #define PWR_WIO2CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  309. #define PWR_WIO2CIDCFGR_SCID_SHIFT U(4)
  310. #define PWR_WIO2CIDCFGR_SEMWLC0 BIT_32(16)
  311. #define PWR_WIO2CIDCFGR_SEMWLC1 BIT_32(17)
  312. #define PWR_WIO2CIDCFGR_SEMWLC2 BIT_32(18)
  313. #define PWR_WIO2CIDCFGR_SEMWLC3 BIT_32(19)
  314. #define PWR_WIO2CIDCFGR_SEMWLC4 BIT_32(20)
  315. #define PWR_WIO2CIDCFGR_SEMWLC5 BIT_32(21)
  316. #define PWR_WIO2CIDCFGR_SEMWLC6 BIT_32(22)
  317. #define PWR_WIO2CIDCFGR_SEMWLC7 BIT_32(23)
  318. /* PWR_WIO2SEMCR register fields */
  319. #define PWR_WIO2SEMCR_SEM_MUTEX BIT_32(0)
  320. #define PWR_WIO2SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  321. #define PWR_WIO2SEMCR_SEMCID_SHIFT U(4)
  322. /* PWR_WIO3CIDCFGR register fields */
  323. #define PWR_WIO3CIDCFGR_CFEN BIT_32(0)
  324. #define PWR_WIO3CIDCFGR_SEM_EN BIT_32(1)
  325. #define PWR_WIO3CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  326. #define PWR_WIO3CIDCFGR_SCID_SHIFT U(4)
  327. #define PWR_WIO3CIDCFGR_SEMWLC0 BIT_32(16)
  328. #define PWR_WIO3CIDCFGR_SEMWLC1 BIT_32(17)
  329. #define PWR_WIO3CIDCFGR_SEMWLC2 BIT_32(18)
  330. #define PWR_WIO3CIDCFGR_SEMWLC3 BIT_32(19)
  331. #define PWR_WIO3CIDCFGR_SEMWLC4 BIT_32(20)
  332. #define PWR_WIO3CIDCFGR_SEMWLC5 BIT_32(21)
  333. #define PWR_WIO3CIDCFGR_SEMWLC6 BIT_32(22)
  334. #define PWR_WIO3CIDCFGR_SEMWLC7 BIT_32(23)
  335. /* PWR_WIO3SEMCR register fields */
  336. #define PWR_WIO3SEMCR_SEM_MUTEX BIT_32(0)
  337. #define PWR_WIO3SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  338. #define PWR_WIO3SEMCR_SEMCID_SHIFT U(4)
  339. /* PWR_WIO4CIDCFGR register fields */
  340. #define PWR_WIO4CIDCFGR_CFEN BIT_32(0)
  341. #define PWR_WIO4CIDCFGR_SEM_EN BIT_32(1)
  342. #define PWR_WIO4CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  343. #define PWR_WIO4CIDCFGR_SCID_SHIFT U(4)
  344. #define PWR_WIO4CIDCFGR_SEMWLC0 BIT_32(16)
  345. #define PWR_WIO4CIDCFGR_SEMWLC1 BIT_32(17)
  346. #define PWR_WIO4CIDCFGR_SEMWLC2 BIT_32(18)
  347. #define PWR_WIO4CIDCFGR_SEMWLC3 BIT_32(19)
  348. #define PWR_WIO4CIDCFGR_SEMWLC4 BIT_32(20)
  349. #define PWR_WIO4CIDCFGR_SEMWLC5 BIT_32(21)
  350. #define PWR_WIO4CIDCFGR_SEMWLC6 BIT_32(22)
  351. #define PWR_WIO4CIDCFGR_SEMWLC7 BIT_32(23)
  352. /* PWR_WIO4SEMCR register fields */
  353. #define PWR_WIO4SEMCR_SEM_MUTEX BIT_32(0)
  354. #define PWR_WIO4SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  355. #define PWR_WIO4SEMCR_SEMCID_SHIFT U(4)
  356. /* PWR_WIO5CIDCFGR register fields */
  357. #define PWR_WIO5CIDCFGR_CFEN BIT_32(0)
  358. #define PWR_WIO5CIDCFGR_SEM_EN BIT_32(1)
  359. #define PWR_WIO5CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  360. #define PWR_WIO5CIDCFGR_SCID_SHIFT U(4)
  361. #define PWR_WIO5CIDCFGR_SEMWLC0 BIT_32(16)
  362. #define PWR_WIO5CIDCFGR_SEMWLC1 BIT_32(17)
  363. #define PWR_WIO5CIDCFGR_SEMWLC2 BIT_32(18)
  364. #define PWR_WIO5CIDCFGR_SEMWLC3 BIT_32(19)
  365. #define PWR_WIO5CIDCFGR_SEMWLC4 BIT_32(20)
  366. #define PWR_WIO5CIDCFGR_SEMWLC5 BIT_32(21)
  367. #define PWR_WIO5CIDCFGR_SEMWLC6 BIT_32(22)
  368. #define PWR_WIO5CIDCFGR_SEMWLC7 BIT_32(23)
  369. /* PWR_WIO5SEMCR register fields */
  370. #define PWR_WIO5SEMCR_SEM_MUTEX BIT_32(0)
  371. #define PWR_WIO5SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  372. #define PWR_WIO5SEMCR_SEMCID_SHIFT U(4)
  373. /* PWR_WIO6CIDCFGR register fields */
  374. #define PWR_WIO6CIDCFGR_CFEN BIT_32(0)
  375. #define PWR_WIO6CIDCFGR_SEM_EN BIT_32(1)
  376. #define PWR_WIO6CIDCFGR_SCID_MASK GENMASK_32(6, 4)
  377. #define PWR_WIO6CIDCFGR_SCID_SHIFT U(4)
  378. #define PWR_WIO6CIDCFGR_SEMWLC0 BIT_32(16)
  379. #define PWR_WIO6CIDCFGR_SEMWLC1 BIT_32(17)
  380. #define PWR_WIO6CIDCFGR_SEMWLC2 BIT_32(18)
  381. #define PWR_WIO6CIDCFGR_SEMWLC3 BIT_32(19)
  382. #define PWR_WIO6CIDCFGR_SEMWLC4 BIT_32(20)
  383. #define PWR_WIO6CIDCFGR_SEMWLC5 BIT_32(21)
  384. #define PWR_WIO6CIDCFGR_SEMWLC6 BIT_32(22)
  385. #define PWR_WIO6CIDCFGR_SEMWLC7 BIT_32(23)
  386. /* PWR_WIO6SEMCR register fields */
  387. #define PWR_WIO6SEMCR_SEM_MUTEX BIT_32(0)
  388. #define PWR_WIO6SEMCR_SEMCID_MASK GENMASK_32(6, 4)
  389. #define PWR_WIO6SEMCR_SEMCID_SHIFT U(4)
  390. /* PWR_CPU1D1SR register fields */
  391. #define PWR_CPU1D1SR_HOLD_BOOT BIT_32(0)
  392. #define PWR_CPU1D1SR_CSTATE_MASK GENMASK_32(3, 2)
  393. #define PWR_CPU1D1SR_CSTATE_SHIFT U(2)
  394. #define PWR_CPU1D1SR_DSTATE_MASK GENMASK_32(10, 8)
  395. #define PWR_CPU1D1SR_DSTATE_SHIFT U(8)
  396. /* PWR_CPU2D2SR register fields */
  397. #define PWR_CPU2D2SR_HOLD_BOOT BIT_32(0)
  398. #define PWR_CPU2D2SR_WFBEN BIT_32(1)
  399. #define PWR_CPU2D2SR_CSTATE_MASK GENMASK_32(3, 2)
  400. #define PWR_CPU2D2SR_CSTATE_SHIFT U(2)
  401. #define PWR_CPU2D2SR_DSTATE_MASK GENMASK_32(10, 8)
  402. #define PWR_CPU2D2SR_DSTATE_SHIFT U(8)
  403. /* PWR_CPU3D3SR register fields */
  404. #define PWR_CPU3D3SR_CSTATE_MASK GENMASK_32(3, 2)
  405. #define PWR_CPU3D3SR_CSTATE_SHIFT U(2)
  406. #define PWR_CPU3D3SR_DSTATE_MASK GENMASK_32(10, 8)
  407. #define PWR_CPU3D3SR_DSTATE_SHIFT U(8)
  408. /* PWR_DBGR register fields */
  409. #define PWR_DBGR_FD3S BIT_32(0)
  410. #define PWR_DBGR_VDDIOKRETRAM BIT_32(16)
  411. #define PWR_DBGR_VDDIOKBKPRAM BIT_32(17)
  412. #define PWR_DBGR_VDDIOKD3 BIT_32(18)
  413. #define PWR_DBGR_VDDIOKLPSRAM1 BIT_32(19)
  414. /* PWR_VERR register fields */
  415. #define PWR_VERR_MINREV_MASK GENMASK_32(3, 0)
  416. #define PWR_VERR_MINREV_SHIFT U(0)
  417. #define PWR_VERR_MAJREV_MASK GENMASK_32(7, 4)
  418. #define PWR_VERR_MAJREV_SHIFT U(4)
  419. #endif /* STM32MP2_PWR_H */