stm32mp13_rcc.h 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878
  1. /*
  2. * Copyright (c) 2022, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP13_RCC_H
  7. #define STM32MP13_RCC_H
  8. #include <lib/utils_def.h>
  9. #define RCC_SECCFGR U(0X0)
  10. #define RCC_MP_SREQSETR U(0X100)
  11. #define RCC_MP_SREQCLRR U(0X104)
  12. #define RCC_MP_APRSTCR U(0X108)
  13. #define RCC_MP_APRSTSR U(0X10C)
  14. #define RCC_PWRLPDLYCR U(0X110)
  15. #define RCC_MP_GRSTCSETR U(0X114)
  16. #define RCC_BR_RSTSCLRR U(0X118)
  17. #define RCC_MP_RSTSSETR U(0X11C)
  18. #define RCC_MP_RSTSCLRR U(0X120)
  19. #define RCC_MP_IWDGFZSETR U(0X124)
  20. #define RCC_MP_IWDGFZCLRR U(0X128)
  21. #define RCC_MP_CIER U(0X200)
  22. #define RCC_MP_CIFR U(0X204)
  23. #define RCC_BDCR U(0X400)
  24. #define RCC_RDLSICR U(0X404)
  25. #define RCC_OCENSETR U(0X420)
  26. #define RCC_OCENCLRR U(0X424)
  27. #define RCC_OCRDYR U(0X428)
  28. #define RCC_HSICFGR U(0X440)
  29. #define RCC_CSICFGR U(0X444)
  30. #define RCC_MCO1CFGR U(0X460)
  31. #define RCC_MCO2CFGR U(0X464)
  32. #define RCC_DBGCFGR U(0X468)
  33. #define RCC_RCK12SELR U(0X480)
  34. #define RCC_RCK3SELR U(0X484)
  35. #define RCC_RCK4SELR U(0X488)
  36. #define RCC_PLL1CR U(0X4A0)
  37. #define RCC_PLL1CFGR1 U(0X4A4)
  38. #define RCC_PLL1CFGR2 U(0X4A8)
  39. #define RCC_PLL1FRACR U(0X4AC)
  40. #define RCC_PLL1CSGR U(0X4B0)
  41. #define RCC_PLL2CR U(0X4D0)
  42. #define RCC_PLL2CFGR1 U(0X4D4)
  43. #define RCC_PLL2CFGR2 U(0X4D8)
  44. #define RCC_PLL2FRACR U(0X4DC)
  45. #define RCC_PLL2CSGR U(0X4E0)
  46. #define RCC_PLL3CR U(0X500)
  47. #define RCC_PLL3CFGR1 U(0X504)
  48. #define RCC_PLL3CFGR2 U(0X508)
  49. #define RCC_PLL3FRACR U(0X50C)
  50. #define RCC_PLL3CSGR U(0X510)
  51. #define RCC_PLL4CR U(0X520)
  52. #define RCC_PLL4CFGR1 U(0X524)
  53. #define RCC_PLL4CFGR2 U(0X528)
  54. #define RCC_PLL4FRACR U(0X52C)
  55. #define RCC_PLL4CSGR U(0X530)
  56. #define RCC_MPCKSELR U(0X540)
  57. #define RCC_ASSCKSELR U(0X544)
  58. #define RCC_MSSCKSELR U(0X548)
  59. #define RCC_CPERCKSELR U(0X54C)
  60. #define RCC_RTCDIVR U(0X560)
  61. #define RCC_MPCKDIVR U(0X564)
  62. #define RCC_AXIDIVR U(0X568)
  63. #define RCC_MLAHBDIVR U(0X56C)
  64. #define RCC_APB1DIVR U(0X570)
  65. #define RCC_APB2DIVR U(0X574)
  66. #define RCC_APB3DIVR U(0X578)
  67. #define RCC_APB4DIVR U(0X57C)
  68. #define RCC_APB5DIVR U(0X580)
  69. #define RCC_APB6DIVR U(0X584)
  70. #define RCC_TIMG1PRER U(0X5A0)
  71. #define RCC_TIMG2PRER U(0X5A4)
  72. #define RCC_TIMG3PRER U(0X5A8)
  73. #define RCC_DDRITFCR U(0X5C0)
  74. #define RCC_I2C12CKSELR U(0X600)
  75. #define RCC_I2C345CKSELR U(0X604)
  76. #define RCC_SPI2S1CKSELR U(0X608)
  77. #define RCC_SPI2S23CKSELR U(0X60C)
  78. #define RCC_SPI45CKSELR U(0X610)
  79. #define RCC_UART12CKSELR U(0X614)
  80. #define RCC_UART35CKSELR U(0X618)
  81. #define RCC_UART4CKSELR U(0X61C)
  82. #define RCC_UART6CKSELR U(0X620)
  83. #define RCC_UART78CKSELR U(0X624)
  84. #define RCC_LPTIM1CKSELR U(0X628)
  85. #define RCC_LPTIM23CKSELR U(0X62C)
  86. #define RCC_LPTIM45CKSELR U(0X630)
  87. #define RCC_SAI1CKSELR U(0X634)
  88. #define RCC_SAI2CKSELR U(0X638)
  89. #define RCC_FDCANCKSELR U(0X63C)
  90. #define RCC_SPDIFCKSELR U(0X640)
  91. #define RCC_ADC12CKSELR U(0X644)
  92. #define RCC_SDMMC12CKSELR U(0X648)
  93. #define RCC_ETH12CKSELR U(0X64C)
  94. #define RCC_USBCKSELR U(0X650)
  95. #define RCC_QSPICKSELR U(0X654)
  96. #define RCC_FMCCKSELR U(0X658)
  97. #define RCC_RNG1CKSELR U(0X65C)
  98. #define RCC_STGENCKSELR U(0X660)
  99. #define RCC_DCMIPPCKSELR U(0X664)
  100. #define RCC_SAESCKSELR U(0X668)
  101. #define RCC_APB1RSTSETR U(0X6A0)
  102. #define RCC_APB1RSTCLRR U(0X6A4)
  103. #define RCC_APB2RSTSETR U(0X6A8)
  104. #define RCC_APB2RSTCLRR U(0X6AC)
  105. #define RCC_APB3RSTSETR U(0X6B0)
  106. #define RCC_APB3RSTCLRR U(0X6B4)
  107. #define RCC_APB4RSTSETR U(0X6B8)
  108. #define RCC_APB4RSTCLRR U(0X6BC)
  109. #define RCC_APB5RSTSETR U(0X6C0)
  110. #define RCC_APB5RSTCLRR U(0X6C4)
  111. #define RCC_APB6RSTSETR U(0X6C8)
  112. #define RCC_APB6RSTCLRR U(0X6CC)
  113. #define RCC_AHB2RSTSETR U(0X6D0)
  114. #define RCC_AHB2RSTCLRR U(0X6D4)
  115. #define RCC_AHB4RSTSETR U(0X6E0)
  116. #define RCC_AHB4RSTCLRR U(0X6E4)
  117. #define RCC_AHB5RSTSETR U(0X6E8)
  118. #define RCC_AHB5RSTCLRR U(0X6EC)
  119. #define RCC_AHB6RSTSETR U(0X6F0)
  120. #define RCC_AHB6RSTCLRR U(0X6F4)
  121. #define RCC_MP_APB1ENSETR U(0X700)
  122. #define RCC_MP_APB1ENCLRR U(0X704)
  123. #define RCC_MP_APB2ENSETR U(0X708)
  124. #define RCC_MP_APB2ENCLRR U(0X70C)
  125. #define RCC_MP_APB3ENSETR U(0X710)
  126. #define RCC_MP_APB3ENCLRR U(0X714)
  127. #define RCC_MP_S_APB3ENSETR U(0X718)
  128. #define RCC_MP_S_APB3ENCLRR U(0X71C)
  129. #define RCC_MP_NS_APB3ENSETR U(0X720)
  130. #define RCC_MP_NS_APB3ENCLRR U(0X724)
  131. #define RCC_MP_APB4ENSETR U(0X728)
  132. #define RCC_MP_APB4ENCLRR U(0X72C)
  133. #define RCC_MP_S_APB4ENSETR U(0X730)
  134. #define RCC_MP_S_APB4ENCLRR U(0X734)
  135. #define RCC_MP_NS_APB4ENSETR U(0X738)
  136. #define RCC_MP_NS_APB4ENCLRR U(0X73C)
  137. #define RCC_MP_APB5ENSETR U(0X740)
  138. #define RCC_MP_APB5ENCLRR U(0X744)
  139. #define RCC_MP_APB6ENSETR U(0X748)
  140. #define RCC_MP_APB6ENCLRR U(0X74C)
  141. #define RCC_MP_AHB2ENSETR U(0X750)
  142. #define RCC_MP_AHB2ENCLRR U(0X754)
  143. #define RCC_MP_AHB4ENSETR U(0X760)
  144. #define RCC_MP_AHB4ENCLRR U(0X764)
  145. #define RCC_MP_S_AHB4ENSETR U(0X768)
  146. #define RCC_MP_S_AHB4ENCLRR U(0X76C)
  147. #define RCC_MP_NS_AHB4ENSETR U(0X770)
  148. #define RCC_MP_NS_AHB4ENCLRR U(0X774)
  149. #define RCC_MP_AHB5ENSETR U(0X778)
  150. #define RCC_MP_AHB5ENCLRR U(0X77C)
  151. #define RCC_MP_AHB6ENSETR U(0X780)
  152. #define RCC_MP_AHB6ENCLRR U(0X784)
  153. #define RCC_MP_S_AHB6ENSETR U(0X788)
  154. #define RCC_MP_S_AHB6ENCLRR U(0X78C)
  155. #define RCC_MP_NS_AHB6ENSETR U(0X790)
  156. #define RCC_MP_NS_AHB6ENCLRR U(0X794)
  157. #define RCC_MP_APB1LPENSETR U(0X800)
  158. #define RCC_MP_APB1LPENCLRR U(0X804)
  159. #define RCC_MP_APB2LPENSETR U(0X808)
  160. #define RCC_MP_APB2LPENCLRR U(0X80C)
  161. #define RCC_MP_APB3LPENSETR U(0X810)
  162. #define RCC_MP_APB3LPENCLRR U(0X814)
  163. #define RCC_MP_S_APB3LPENSETR U(0X818)
  164. #define RCC_MP_S_APB3LPENCLRR U(0X81C)
  165. #define RCC_MP_NS_APB3LPENSETR U(0X820)
  166. #define RCC_MP_NS_APB3LPENCLRR U(0X824)
  167. #define RCC_MP_APB4LPENSETR U(0X828)
  168. #define RCC_MP_APB4LPENCLRR U(0X82C)
  169. #define RCC_MP_S_APB4LPENSETR U(0X830)
  170. #define RCC_MP_S_APB4LPENCLRR U(0X834)
  171. #define RCC_MP_NS_APB4LPENSETR U(0X838)
  172. #define RCC_MP_NS_APB4LPENCLRR U(0X83C)
  173. #define RCC_MP_APB5LPENSETR U(0X840)
  174. #define RCC_MP_APB5LPENCLRR U(0X844)
  175. #define RCC_MP_APB6LPENSETR U(0X848)
  176. #define RCC_MP_APB6LPENCLRR U(0X84C)
  177. #define RCC_MP_AHB2LPENSETR U(0X850)
  178. #define RCC_MP_AHB2LPENCLRR U(0X854)
  179. #define RCC_MP_AHB4LPENSETR U(0X858)
  180. #define RCC_MP_AHB4LPENCLRR U(0X85C)
  181. #define RCC_MP_S_AHB4LPENSETR U(0X868)
  182. #define RCC_MP_S_AHB4LPENCLRR U(0X86C)
  183. #define RCC_MP_NS_AHB4LPENSETR U(0X870)
  184. #define RCC_MP_NS_AHB4LPENCLRR U(0X874)
  185. #define RCC_MP_AHB5LPENSETR U(0X878)
  186. #define RCC_MP_AHB5LPENCLRR U(0X87C)
  187. #define RCC_MP_AHB6LPENSETR U(0X880)
  188. #define RCC_MP_AHB6LPENCLRR U(0X884)
  189. #define RCC_MP_S_AHB6LPENSETR U(0X888)
  190. #define RCC_MP_S_AHB6LPENCLRR U(0X88C)
  191. #define RCC_MP_NS_AHB6LPENSETR U(0X890)
  192. #define RCC_MP_NS_AHB6LPENCLRR U(0X894)
  193. #define RCC_MP_S_AXIMLPENSETR U(0X898)
  194. #define RCC_MP_S_AXIMLPENCLRR U(0X89C)
  195. #define RCC_MP_NS_AXIMLPENSETR U(0X8A0)
  196. #define RCC_MP_NS_AXIMLPENCLRR U(0X8A4)
  197. #define RCC_MP_MLAHBLPENSETR U(0X8A8)
  198. #define RCC_MP_MLAHBLPENCLRR U(0X8AC)
  199. #define RCC_APB3SECSR U(0X8C0)
  200. #define RCC_APB4SECSR U(0X8C4)
  201. #define RCC_APB5SECSR U(0X8C8)
  202. #define RCC_APB6SECSR U(0X8CC)
  203. #define RCC_AHB2SECSR U(0X8D0)
  204. #define RCC_AHB4SECSR U(0X8D4)
  205. #define RCC_AHB5SECSR U(0X8D8)
  206. #define RCC_AHB6SECSR U(0X8DC)
  207. #define RCC_VERR U(0XFF4)
  208. #define RCC_IDR U(0XFF8)
  209. #define RCC_SIDR U(0XFFC)
  210. /* RCC_SECCFGR register fields */
  211. #define RCC_SECCFGR_HSISEC BIT(0)
  212. #define RCC_SECCFGR_CSISEC BIT(1)
  213. #define RCC_SECCFGR_HSESEC BIT(2)
  214. #define RCC_SECCFGR_LSISEC BIT(3)
  215. #define RCC_SECCFGR_LSESEC BIT(4)
  216. #define RCC_SECCFGR_PLL12SEC BIT(8)
  217. #define RCC_SECCFGR_PLL3SEC BIT(9)
  218. #define RCC_SECCFGR_PLL4SEC BIT(10)
  219. #define RCC_SECCFGR_MPUSEC BIT(11)
  220. #define RCC_SECCFGR_AXISEC BIT(12)
  221. #define RCC_SECCFGR_MLAHBSEC BIT(13)
  222. #define RCC_SECCFGR_APB3DIVSEC BIT(16)
  223. #define RCC_SECCFGR_APB4DIVSEC BIT(17)
  224. #define RCC_SECCFGR_APB5DIVSEC BIT(18)
  225. #define RCC_SECCFGR_APB6DIVSEC BIT(19)
  226. #define RCC_SECCFGR_TIMG3SEC BIT(20)
  227. #define RCC_SECCFGR_CPERSEC BIT(21)
  228. #define RCC_SECCFGR_MCO1SEC BIT(22)
  229. #define RCC_SECCFGR_MCO2SEC BIT(23)
  230. #define RCC_SECCFGR_STPSEC BIT(24)
  231. #define RCC_SECCFGR_RSTSEC BIT(25)
  232. #define RCC_SECCFGR_PWRSEC BIT(31)
  233. /* RCC_MP_SREQSETR register fields */
  234. #define RCC_MP_SREQSETR_STPREQ_P0 BIT(0)
  235. /* RCC_MP_SREQCLRR register fields */
  236. #define RCC_MP_SREQCLRR_STPREQ_P0 BIT(0)
  237. /* RCC_MP_APRSTCR register fields */
  238. #define RCC_MP_APRSTCR_RDCTLEN BIT(0)
  239. #define RCC_MP_APRSTCR_RSTTO_MASK GENMASK(14, 8)
  240. #define RCC_MP_APRSTCR_RSTTO_SHIFT 8
  241. /* RCC_MP_APRSTSR register fields */
  242. #define RCC_MP_APRSTSR_RSTTOV_MASK GENMASK(14, 8)
  243. #define RCC_MP_APRSTSR_RSTTOV_SHIFT 8
  244. /* RCC_PWRLPDLYCR register fields */
  245. #define RCC_PWRLPDLYCR_PWRLP_DLY_MASK GENMASK(21, 0)
  246. #define RCC_PWRLPDLYCR_PWRLP_DLY_SHIFT 0
  247. /* RCC_MP_GRSTCSETR register fields */
  248. #define RCC_MP_GRSTCSETR_MPSYSRST BIT(0)
  249. #define RCC_MP_GRSTCSETR_MPUP0RST BIT(4)
  250. /* RCC_BR_RSTSCLRR register fields */
  251. #define RCC_BR_RSTSCLRR_PORRSTF BIT(0)
  252. #define RCC_BR_RSTSCLRR_BORRSTF BIT(1)
  253. #define RCC_BR_RSTSCLRR_PADRSTF BIT(2)
  254. #define RCC_BR_RSTSCLRR_HCSSRSTF BIT(3)
  255. #define RCC_BR_RSTSCLRR_VCORERSTF BIT(4)
  256. #define RCC_BR_RSTSCLRR_VCPURSTF BIT(5)
  257. #define RCC_BR_RSTSCLRR_MPSYSRSTF BIT(6)
  258. #define RCC_BR_RSTSCLRR_IWDG1RSTF BIT(8)
  259. #define RCC_BR_RSTSCLRR_IWDG2RSTF BIT(9)
  260. #define RCC_BR_RSTSCLRR_MPUP0RSTF BIT(13)
  261. /* RCC_MP_RSTSSETR register fields */
  262. #define RCC_MP_RSTSSETR_PORRSTF BIT(0)
  263. #define RCC_MP_RSTSSETR_BORRSTF BIT(1)
  264. #define RCC_MP_RSTSSETR_PADRSTF BIT(2)
  265. #define RCC_MP_RSTSSETR_HCSSRSTF BIT(3)
  266. #define RCC_MP_RSTSSETR_VCORERSTF BIT(4)
  267. #define RCC_MP_RSTSSETR_VCPURSTF BIT(5)
  268. #define RCC_MP_RSTSSETR_MPSYSRSTF BIT(6)
  269. #define RCC_MP_RSTSSETR_IWDG1RSTF BIT(8)
  270. #define RCC_MP_RSTSSETR_IWDG2RSTF BIT(9)
  271. #define RCC_MP_RSTSSETR_STP2RSTF BIT(10)
  272. #define RCC_MP_RSTSSETR_STDBYRSTF BIT(11)
  273. #define RCC_MP_RSTSSETR_CSTDBYRSTF BIT(12)
  274. #define RCC_MP_RSTSSETR_MPUP0RSTF BIT(13)
  275. #define RCC_MP_RSTSSETR_SPARE BIT(15)
  276. /* RCC_MP_RSTSCLRR register fields */
  277. #define RCC_MP_RSTSCLRR_PORRSTF BIT(0)
  278. #define RCC_MP_RSTSCLRR_BORRSTF BIT(1)
  279. #define RCC_MP_RSTSCLRR_PADRSTF BIT(2)
  280. #define RCC_MP_RSTSCLRR_HCSSRSTF BIT(3)
  281. #define RCC_MP_RSTSCLRR_VCORERSTF BIT(4)
  282. #define RCC_MP_RSTSCLRR_VCPURSTF BIT(5)
  283. #define RCC_MP_RSTSCLRR_MPSYSRSTF BIT(6)
  284. #define RCC_MP_RSTSCLRR_IWDG1RSTF BIT(8)
  285. #define RCC_MP_RSTSCLRR_IWDG2RSTF BIT(9)
  286. #define RCC_MP_RSTSCLRR_STP2RSTF BIT(10)
  287. #define RCC_MP_RSTSCLRR_STDBYRSTF BIT(11)
  288. #define RCC_MP_RSTSCLRR_CSTDBYRSTF BIT(12)
  289. #define RCC_MP_RSTSCLRR_MPUP0RSTF BIT(13)
  290. #define RCC_MP_RSTSCLRR_SPARE BIT(15)
  291. /* RCC_MP_IWDGFZSETR register fields */
  292. #define RCC_MP_IWDGFZSETR_FZ_IWDG1 BIT(0)
  293. #define RCC_MP_IWDGFZSETR_FZ_IWDG2 BIT(1)
  294. /* RCC_MP_IWDGFZCLRR register fields */
  295. #define RCC_MP_IWDGFZCLRR_FZ_IWDG1 BIT(0)
  296. #define RCC_MP_IWDGFZCLRR_FZ_IWDG2 BIT(1)
  297. /* RCC_MP_CIER register fields */
  298. #define RCC_MP_CIER_LSIRDYIE BIT(0)
  299. #define RCC_MP_CIER_LSERDYIE BIT(1)
  300. #define RCC_MP_CIER_HSIRDYIE BIT(2)
  301. #define RCC_MP_CIER_HSERDYIE BIT(3)
  302. #define RCC_MP_CIER_CSIRDYIE BIT(4)
  303. #define RCC_MP_CIER_PLL1DYIE BIT(8)
  304. #define RCC_MP_CIER_PLL2DYIE BIT(9)
  305. #define RCC_MP_CIER_PLL3DYIE BIT(10)
  306. #define RCC_MP_CIER_PLL4DYIE BIT(11)
  307. #define RCC_MP_CIER_LSECSSIE BIT(16)
  308. #define RCC_MP_CIER_WKUPIE BIT(20)
  309. /* RCC_MP_CIFR register fields */
  310. #define RCC_MP_CIFR_LSIRDYF BIT(0)
  311. #define RCC_MP_CIFR_LSERDYF BIT(1)
  312. #define RCC_MP_CIFR_HSIRDYF BIT(2)
  313. #define RCC_MP_CIFR_HSERDYF BIT(3)
  314. #define RCC_MP_CIFR_CSIRDYF BIT(4)
  315. #define RCC_MP_CIFR_PLL1DYF BIT(8)
  316. #define RCC_MP_CIFR_PLL2DYF BIT(9)
  317. #define RCC_MP_CIFR_PLL3DYF BIT(10)
  318. #define RCC_MP_CIFR_PLL4DYF BIT(11)
  319. #define RCC_MP_CIFR_LSECSSF BIT(16)
  320. #define RCC_MP_CIFR_WKUPF BIT(20)
  321. /* RCC_BDCR register fields */
  322. #define RCC_BDCR_LSEON BIT(0)
  323. #define RCC_BDCR_LSEBYP BIT(1)
  324. #define RCC_BDCR_LSERDY BIT(2)
  325. #define RCC_BDCR_DIGBYP BIT(3)
  326. #define RCC_BDCR_LSEDRV_MASK GENMASK(5, 4)
  327. #define RCC_BDCR_LSEDRV_SHIFT 4
  328. #define RCC_BDCR_LSECSSON BIT(8)
  329. #define RCC_BDCR_LSECSSD BIT(9)
  330. #define RCC_BDCR_RTCSRC_MASK GENMASK(17, 16)
  331. #define RCC_BDCR_RTCSRC_SHIFT 16
  332. #define RCC_BDCR_RTCCKEN BIT(20)
  333. #define RCC_BDCR_VSWRST BIT(31)
  334. #define RCC_BDCR_LSEBYP_BIT 1
  335. #define RCC_BDCR_LSERDY_BIT 2
  336. #define RCC_BDCR_DIGBYP_BIT 3
  337. #define RCC_BDCR_LSECSSON_BIT 8
  338. #define RCC_BDCR_LSEDRV_WIDTH 2
  339. /* RCC_RDLSICR register fields */
  340. #define RCC_RDLSICR_LSION BIT(0)
  341. #define RCC_RDLSICR_LSIRDY BIT(1)
  342. #define RCC_RDLSICR_MRD_MASK GENMASK(20, 16)
  343. #define RCC_RDLSICR_MRD_SHIFT 16
  344. #define RCC_RDLSICR_EADLY_MASK GENMASK(26, 24)
  345. #define RCC_RDLSICR_EADLY_SHIFT 24
  346. #define RCC_RDLSICR_SPARE_MASK GENMASK(31, 27)
  347. #define RCC_RDLSICR_SPARE_SHIFT 27
  348. #define RCC_RDLSICR_LSIRDY_BIT 1
  349. /* RCC_OCENSETR register fields */
  350. #define RCC_OCENSETR_HSION BIT(0)
  351. #define RCC_OCENSETR_HSIKERON BIT(1)
  352. #define RCC_OCENSETR_CSION BIT(4)
  353. #define RCC_OCENSETR_CSIKERON BIT(5)
  354. #define RCC_OCENSETR_DIGBYP BIT(7)
  355. #define RCC_OCENSETR_HSEON BIT(8)
  356. #define RCC_OCENSETR_HSEKERON BIT(9)
  357. #define RCC_OCENSETR_HSEBYP BIT(10)
  358. #define RCC_OCENSETR_HSECSSON BIT(11)
  359. #define RCC_OCENR_DIGBYP_BIT 7
  360. #define RCC_OCENR_HSEBYP_BIT 10
  361. #define RCC_OCENR_HSECSSON_BIT 11
  362. /* RCC_OCENCLRR register fields */
  363. #define RCC_OCENCLRR_HSION BIT(0)
  364. #define RCC_OCENCLRR_HSIKERON BIT(1)
  365. #define RCC_OCENCLRR_CSION BIT(4)
  366. #define RCC_OCENCLRR_CSIKERON BIT(5)
  367. #define RCC_OCENCLRR_DIGBYP BIT(7)
  368. #define RCC_OCENCLRR_HSEON BIT(8)
  369. #define RCC_OCENCLRR_HSEKERON BIT(9)
  370. #define RCC_OCENCLRR_HSEBYP BIT(10)
  371. /* RCC_OCRDYR register fields */
  372. #define RCC_OCRDYR_HSIRDY BIT(0)
  373. #define RCC_OCRDYR_HSIDIVRDY BIT(2)
  374. #define RCC_OCRDYR_CSIRDY BIT(4)
  375. #define RCC_OCRDYR_HSERDY BIT(8)
  376. #define RCC_OCRDYR_MPUCKRDY BIT(23)
  377. #define RCC_OCRDYR_AXICKRDY BIT(24)
  378. #define RCC_OCRDYR_HSIRDY_BIT 0
  379. #define RCC_OCRDYR_HSIDIVRDY_BIT 2
  380. #define RCC_OCRDYR_CSIRDY_BIT 4
  381. #define RCC_OCRDYR_HSERDY_BIT 8
  382. /* RCC_HSICFGR register fields */
  383. #define RCC_HSICFGR_HSIDIV_MASK GENMASK(1, 0)
  384. #define RCC_HSICFGR_HSIDIV_SHIFT 0
  385. #define RCC_HSICFGR_HSITRIM_MASK GENMASK(14, 8)
  386. #define RCC_HSICFGR_HSITRIM_SHIFT 8
  387. #define RCC_HSICFGR_HSICAL_MASK GENMASK(27, 16)
  388. #define RCC_HSICFGR_HSICAL_SHIFT 16
  389. /* RCC_CSICFGR register fields */
  390. #define RCC_CSICFGR_CSITRIM_MASK GENMASK(12, 8)
  391. #define RCC_CSICFGR_CSITRIM_SHIFT 8
  392. #define RCC_CSICFGR_CSICAL_MASK GENMASK(23, 16)
  393. #define RCC_CSICFGR_CSICAL_SHIFT 16
  394. /* RCC_MCO1CFGR register fields */
  395. #define RCC_MCO1CFGR_MCO1SEL_MASK GENMASK(2, 0)
  396. #define RCC_MCO1CFGR_MCO1SEL_SHIFT 0
  397. #define RCC_MCO1CFGR_MCO1DIV_MASK GENMASK(7, 4)
  398. #define RCC_MCO1CFGR_MCO1DIV_SHIFT 4
  399. #define RCC_MCO1CFGR_MCO1ON BIT(12)
  400. /* RCC_MCO2CFGR register fields */
  401. #define RCC_MCO2CFGR_MCO2SEL_MASK GENMASK(2, 0)
  402. #define RCC_MCO2CFGR_MCO2SEL_SHIFT 0
  403. #define RCC_MCO2CFGR_MCO2DIV_MASK GENMASK(7, 4)
  404. #define RCC_MCO2CFGR_MCO2DIV_SHIFT 4
  405. #define RCC_MCO2CFGR_MCO2ON BIT(12)
  406. /* RCC_DBGCFGR register fields */
  407. #define RCC_DBGCFGR_TRACEDIV_MASK GENMASK(2, 0)
  408. #define RCC_DBGCFGR_TRACEDIV_SHIFT 0
  409. #define RCC_DBGCFGR_DBGCKEN BIT(8)
  410. #define RCC_DBGCFGR_TRACECKEN BIT(9)
  411. #define RCC_DBGCFGR_DBGRST BIT(12)
  412. /* RCC_RCK12SELR register fields */
  413. #define RCC_RCK12SELR_PLL12SRC_MASK GENMASK(1, 0)
  414. #define RCC_RCK12SELR_PLL12SRC_SHIFT 0
  415. #define RCC_RCK12SELR_PLL12SRCRDY BIT(31)
  416. /* RCC_RCK3SELR register fields */
  417. #define RCC_RCK3SELR_PLL3SRC_MASK GENMASK(1, 0)
  418. #define RCC_RCK3SELR_PLL3SRC_SHIFT 0
  419. #define RCC_RCK3SELR_PLL3SRCRDY BIT(31)
  420. /* RCC_RCK4SELR register fields */
  421. #define RCC_RCK4SELR_PLL4SRC_MASK GENMASK(1, 0)
  422. #define RCC_RCK4SELR_PLL4SRC_SHIFT 0
  423. #define RCC_RCK4SELR_PLL4SRCRDY BIT(31)
  424. /* RCC_PLL1CR register fields */
  425. #define RCC_PLL1CR_PLLON BIT(0)
  426. #define RCC_PLL1CR_PLL1RDY BIT(1)
  427. #define RCC_PLL1CR_SSCG_CTRL BIT(2)
  428. #define RCC_PLL1CR_DIVPEN BIT(4)
  429. #define RCC_PLL1CR_DIVQEN BIT(5)
  430. #define RCC_PLL1CR_DIVREN BIT(6)
  431. /* RCC_PLL1CFGR1 register fields */
  432. #define RCC_PLL1CFGR1_DIVN_MASK GENMASK(8, 0)
  433. #define RCC_PLL1CFGR1_DIVN_SHIFT 0
  434. #define RCC_PLL1CFGR1_DIVM1_MASK GENMASK(21, 16)
  435. #define RCC_PLL1CFGR1_DIVM1_SHIFT 16
  436. /* RCC_PLL1CFGR2 register fields */
  437. #define RCC_PLL1CFGR2_DIVP_MASK GENMASK(6, 0)
  438. #define RCC_PLL1CFGR2_DIVP_SHIFT 0
  439. #define RCC_PLL1CFGR2_DIVQ_MASK GENMASK(14, 8)
  440. #define RCC_PLL1CFGR2_DIVQ_SHIFT 8
  441. #define RCC_PLL1CFGR2_DIVR_MASK GENMASK(22, 16)
  442. #define RCC_PLL1CFGR2_DIVR_SHIFT 16
  443. /* RCC_PLL1FRACR register fields */
  444. #define RCC_PLL1FRACR_FRACV_MASK GENMASK(15, 3)
  445. #define RCC_PLL1FRACR_FRACV_SHIFT 3
  446. #define RCC_PLL1FRACR_FRACLE BIT(16)
  447. /* RCC_PLL1CSGR register fields */
  448. #define RCC_PLL1CSGR_MOD_PER_MASK GENMASK(12, 0)
  449. #define RCC_PLL1CSGR_MOD_PER_SHIFT 0
  450. #define RCC_PLL1CSGR_TPDFN_DIS BIT(13)
  451. #define RCC_PLL1CSGR_RPDFN_DIS BIT(14)
  452. #define RCC_PLL1CSGR_SSCG_MODE BIT(15)
  453. #define RCC_PLL1CSGR_INC_STEP_MASK GENMASK(30, 16)
  454. #define RCC_PLL1CSGR_INC_STEP_SHIFT 16
  455. /* RCC_PLL2CR register fields */
  456. #define RCC_PLL2CR_PLLON BIT(0)
  457. #define RCC_PLL2CR_PLL2RDY BIT(1)
  458. #define RCC_PLL2CR_SSCG_CTRL BIT(2)
  459. #define RCC_PLL2CR_DIVPEN BIT(4)
  460. #define RCC_PLL2CR_DIVQEN BIT(5)
  461. #define RCC_PLL2CR_DIVREN BIT(6)
  462. /* RCC_PLL2CFGR1 register fields */
  463. #define RCC_PLL2CFGR1_DIVN_MASK GENMASK(8, 0)
  464. #define RCC_PLL2CFGR1_DIVN_SHIFT 0
  465. #define RCC_PLL2CFGR1_DIVM2_MASK GENMASK(21, 16)
  466. #define RCC_PLL2CFGR1_DIVM2_SHIFT 16
  467. /* RCC_PLL2CFGR2 register fields */
  468. #define RCC_PLL2CFGR2_DIVP_MASK GENMASK(6, 0)
  469. #define RCC_PLL2CFGR2_DIVP_SHIFT 0
  470. #define RCC_PLL2CFGR2_DIVQ_MASK GENMASK(14, 8)
  471. #define RCC_PLL2CFGR2_DIVQ_SHIFT 8
  472. #define RCC_PLL2CFGR2_DIVR_MASK GENMASK(22, 16)
  473. #define RCC_PLL2CFGR2_DIVR_SHIFT 16
  474. /* RCC_PLL2FRACR register fields */
  475. #define RCC_PLL2FRACR_FRACV_MASK GENMASK(15, 3)
  476. #define RCC_PLL2FRACR_FRACV_SHIFT 3
  477. #define RCC_PLL2FRACR_FRACLE BIT(16)
  478. /* RCC_PLL2CSGR register fields */
  479. #define RCC_PLL2CSGR_MOD_PER_MASK GENMASK(12, 0)
  480. #define RCC_PLL2CSGR_MOD_PER_SHIFT 0
  481. #define RCC_PLL2CSGR_TPDFN_DIS BIT(13)
  482. #define RCC_PLL2CSGR_RPDFN_DIS BIT(14)
  483. #define RCC_PLL2CSGR_SSCG_MODE BIT(15)
  484. #define RCC_PLL2CSGR_INC_STEP_MASK GENMASK(30, 16)
  485. #define RCC_PLL2CSGR_INC_STEP_SHIFT 16
  486. /* RCC_PLL3CR register fields */
  487. #define RCC_PLL3CR_PLLON BIT(0)
  488. #define RCC_PLL3CR_PLL3RDY BIT(1)
  489. #define RCC_PLL3CR_SSCG_CTRL BIT(2)
  490. #define RCC_PLL3CR_DIVPEN BIT(4)
  491. #define RCC_PLL3CR_DIVQEN BIT(5)
  492. #define RCC_PLL3CR_DIVREN BIT(6)
  493. /* RCC_PLL3CFGR1 register fields */
  494. #define RCC_PLL3CFGR1_DIVN_MASK GENMASK(8, 0)
  495. #define RCC_PLL3CFGR1_DIVN_SHIFT 0
  496. #define RCC_PLL3CFGR1_DIVM3_MASK GENMASK(21, 16)
  497. #define RCC_PLL3CFGR1_DIVM3_SHIFT 16
  498. #define RCC_PLL3CFGR1_IFRGE_MASK GENMASK(25, 24)
  499. #define RCC_PLL3CFGR1_IFRGE_SHIFT 24
  500. /* RCC_PLL3CFGR2 register fields */
  501. #define RCC_PLL3CFGR2_DIVP_MASK GENMASK(6, 0)
  502. #define RCC_PLL3CFGR2_DIVP_SHIFT 0
  503. #define RCC_PLL3CFGR2_DIVQ_MASK GENMASK(14, 8)
  504. #define RCC_PLL3CFGR2_DIVQ_SHIFT 8
  505. #define RCC_PLL3CFGR2_DIVR_MASK GENMASK(22, 16)
  506. #define RCC_PLL3CFGR2_DIVR_SHIFT 16
  507. /* RCC_PLL3FRACR register fields */
  508. #define RCC_PLL3FRACR_FRACV_MASK GENMASK(15, 3)
  509. #define RCC_PLL3FRACR_FRACV_SHIFT 3
  510. #define RCC_PLL3FRACR_FRACLE BIT(16)
  511. /* RCC_PLL3CSGR register fields */
  512. #define RCC_PLL3CSGR_MOD_PER_MASK GENMASK(12, 0)
  513. #define RCC_PLL3CSGR_MOD_PER_SHIFT 0
  514. #define RCC_PLL3CSGR_TPDFN_DIS BIT(13)
  515. #define RCC_PLL3CSGR_RPDFN_DIS BIT(14)
  516. #define RCC_PLL3CSGR_SSCG_MODE BIT(15)
  517. #define RCC_PLL3CSGR_INC_STEP_MASK GENMASK(30, 16)
  518. #define RCC_PLL3CSGR_INC_STEP_SHIFT 16
  519. /* RCC_PLL4CR register fields */
  520. #define RCC_PLL4CR_PLLON BIT(0)
  521. #define RCC_PLL4CR_PLL4RDY BIT(1)
  522. #define RCC_PLL4CR_SSCG_CTRL BIT(2)
  523. #define RCC_PLL4CR_DIVPEN BIT(4)
  524. #define RCC_PLL4CR_DIVQEN BIT(5)
  525. #define RCC_PLL4CR_DIVREN BIT(6)
  526. /* RCC_PLL4CFGR1 register fields */
  527. #define RCC_PLL4CFGR1_DIVN_MASK GENMASK(8, 0)
  528. #define RCC_PLL4CFGR1_DIVN_SHIFT 0
  529. #define RCC_PLL4CFGR1_DIVM4_MASK GENMASK(21, 16)
  530. #define RCC_PLL4CFGR1_DIVM4_SHIFT 16
  531. #define RCC_PLL4CFGR1_IFRGE_MASK GENMASK(25, 24)
  532. #define RCC_PLL4CFGR1_IFRGE_SHIFT 24
  533. /* RCC_PLL4CFGR2 register fields */
  534. #define RCC_PLL4CFGR2_DIVP_MASK GENMASK(6, 0)
  535. #define RCC_PLL4CFGR2_DIVP_SHIFT 0
  536. #define RCC_PLL4CFGR2_DIVQ_MASK GENMASK(14, 8)
  537. #define RCC_PLL4CFGR2_DIVQ_SHIFT 8
  538. #define RCC_PLL4CFGR2_DIVR_MASK GENMASK(22, 16)
  539. #define RCC_PLL4CFGR2_DIVR_SHIFT 16
  540. /* RCC_PLL4FRACR register fields */
  541. #define RCC_PLL4FRACR_FRACV_MASK GENMASK(15, 3)
  542. #define RCC_PLL4FRACR_FRACV_SHIFT 3
  543. #define RCC_PLL4FRACR_FRACLE BIT(16)
  544. /* RCC_PLL4CSGR register fields */
  545. #define RCC_PLL4CSGR_MOD_PER_MASK GENMASK(12, 0)
  546. #define RCC_PLL4CSGR_MOD_PER_SHIFT 0
  547. #define RCC_PLL4CSGR_TPDFN_DIS BIT(13)
  548. #define RCC_PLL4CSGR_RPDFN_DIS BIT(14)
  549. #define RCC_PLL4CSGR_SSCG_MODE BIT(15)
  550. #define RCC_PLL4CSGR_INC_STEP_MASK GENMASK(30, 16)
  551. #define RCC_PLL4CSGR_INC_STEP_SHIFT 16
  552. /* RCC_MPCKSELR register fields */
  553. #define RCC_MPCKSELR_MPUSRC_MASK GENMASK(1, 0)
  554. #define RCC_MPCKSELR_MPUSRC_SHIFT 0
  555. #define RCC_MPCKSELR_MPUSRCRDY BIT(31)
  556. /* RCC_ASSCKSELR register fields */
  557. #define RCC_ASSCKSELR_AXISSRC_MASK GENMASK(2, 0)
  558. #define RCC_ASSCKSELR_AXISSRC_SHIFT 0
  559. #define RCC_ASSCKSELR_AXISSRCRDY BIT(31)
  560. /* RCC_MSSCKSELR register fields */
  561. #define RCC_MSSCKSELR_MLAHBSSRC_MASK GENMASK(1, 0)
  562. #define RCC_MSSCKSELR_MLAHBSSRC_SHIFT 0
  563. #define RCC_MSSCKSELR_MLAHBSSRCRDY BIT(31)
  564. /* RCC_CPERCKSELR register fields */
  565. #define RCC_CPERCKSELR_CKPERSRC_MASK GENMASK(1, 0)
  566. #define RCC_CPERCKSELR_CKPERSRC_SHIFT 0
  567. /* RCC_RTCDIVR register fields */
  568. #define RCC_RTCDIVR_RTCDIV_MASK GENMASK(5, 0)
  569. #define RCC_RTCDIVR_RTCDIV_SHIFT 0
  570. /* RCC_MPCKDIVR register fields */
  571. #define RCC_MPCKDIVR_MPUDIV_MASK GENMASK(3, 0)
  572. #define RCC_MPCKDIVR_MPUDIV_SHIFT 0
  573. #define RCC_MPCKDIVR_MPUDIVRDY BIT(31)
  574. /* RCC_AXIDIVR register fields */
  575. #define RCC_AXIDIVR_AXIDIV_MASK GENMASK(2, 0)
  576. #define RCC_AXIDIVR_AXIDIV_SHIFT 0
  577. #define RCC_AXIDIVR_AXIDIVRDY BIT(31)
  578. /* RCC_MLAHBDIVR register fields */
  579. #define RCC_MLAHBDIVR_MLAHBDIV_MASK GENMASK(3, 0)
  580. #define RCC_MLAHBDIVR_MLAHBDIV_SHIFT 0
  581. #define RCC_MLAHBDIVR_MLAHBDIVRDY BIT(31)
  582. /* RCC_APB1DIVR register fields */
  583. #define RCC_APB1DIVR_APB1DIV_MASK GENMASK(2, 0)
  584. #define RCC_APB1DIVR_APB1DIV_SHIFT 0
  585. #define RCC_APB1DIVR_APB1DIVRDY BIT(31)
  586. /* RCC_APB2DIVR register fields */
  587. #define RCC_APB2DIVR_APB2DIV_MASK GENMASK(2, 0)
  588. #define RCC_APB2DIVR_APB2DIV_SHIFT 0
  589. #define RCC_APB2DIVR_APB2DIVRDY BIT(31)
  590. /* RCC_APB3DIVR register fields */
  591. #define RCC_APB3DIVR_APB3DIV_MASK GENMASK(2, 0)
  592. #define RCC_APB3DIVR_APB3DIV_SHIFT 0
  593. #define RCC_APB3DIVR_APB3DIVRDY BIT(31)
  594. /* RCC_APB4DIVR register fields */
  595. #define RCC_APB4DIVR_APB4DIV_MASK GENMASK(2, 0)
  596. #define RCC_APB4DIVR_APB4DIV_SHIFT 0
  597. #define RCC_APB4DIVR_APB4DIVRDY BIT(31)
  598. /* RCC_APB5DIVR register fields */
  599. #define RCC_APB5DIVR_APB5DIV_MASK GENMASK(2, 0)
  600. #define RCC_APB5DIVR_APB5DIV_SHIFT 0
  601. #define RCC_APB5DIVR_APB5DIVRDY BIT(31)
  602. /* RCC_APB6DIVR register fields */
  603. #define RCC_APB6DIVR_APB6DIV_MASK GENMASK(2, 0)
  604. #define RCC_APB6DIVR_APB6DIV_SHIFT 0
  605. #define RCC_APB6DIVR_APB6DIVRDY BIT(31)
  606. /* RCC_TIMG1PRER register fields */
  607. #define RCC_TIMG1PRER_TIMG1PRE BIT(0)
  608. #define RCC_TIMG1PRER_TIMG1PRERDY BIT(31)
  609. /* RCC_TIMG2PRER register fields */
  610. #define RCC_TIMG2PRER_TIMG2PRE BIT(0)
  611. #define RCC_TIMG2PRER_TIMG2PRERDY BIT(31)
  612. /* RCC_TIMG3PRER register fields */
  613. #define RCC_TIMG3PRER_TIMG3PRE BIT(0)
  614. #define RCC_TIMG3PRER_TIMG3PRERDY BIT(31)
  615. /* RCC_DDRITFCR register fields */
  616. #define RCC_DDRITFCR_DDRC1EN BIT(0)
  617. #define RCC_DDRITFCR_DDRC1LPEN BIT(1)
  618. #define RCC_DDRITFCR_DDRPHYCEN BIT(4)
  619. #define RCC_DDRITFCR_DDRPHYCLPEN BIT(5)
  620. #define RCC_DDRITFCR_DDRCAPBEN BIT(6)
  621. #define RCC_DDRITFCR_DDRCAPBLPEN BIT(7)
  622. #define RCC_DDRITFCR_AXIDCGEN BIT(8)
  623. #define RCC_DDRITFCR_DDRPHYCAPBEN BIT(9)
  624. #define RCC_DDRITFCR_DDRPHYCAPBLPEN BIT(10)
  625. #define RCC_DDRITFCR_KERDCG_DLY_MASK GENMASK(13, 11)
  626. #define RCC_DDRITFCR_KERDCG_DLY_SHIFT 11
  627. #define RCC_DDRITFCR_DDRCAPBRST BIT(14)
  628. #define RCC_DDRITFCR_DDRCAXIRST BIT(15)
  629. #define RCC_DDRITFCR_DDRCORERST BIT(16)
  630. #define RCC_DDRITFCR_DPHYAPBRST BIT(17)
  631. #define RCC_DDRITFCR_DPHYRST BIT(18)
  632. #define RCC_DDRITFCR_DPHYCTLRST BIT(19)
  633. #define RCC_DDRITFCR_DDRCKMOD_MASK GENMASK(22, 20)
  634. #define RCC_DDRITFCR_DDRCKMOD_SHIFT 20
  635. #define RCC_DDRITFCR_GSKPMOD BIT(23)
  636. #define RCC_DDRITFCR_GSKPCTRL BIT(24)
  637. #define RCC_DDRITFCR_DFILP_WIDTH_MASK GENMASK(27, 25)
  638. #define RCC_DDRITFCR_DFILP_WIDTH_SHIFT 25
  639. #define RCC_DDRITFCR_GSKP_DUR_MASK GENMASK(31, 28)
  640. #define RCC_DDRITFCR_GSKP_DUR_SHIFT 28
  641. /* RCC_I2C12CKSELR register fields */
  642. #define RCC_I2C12CKSELR_I2C12SRC_MASK GENMASK(2, 0)
  643. #define RCC_I2C12CKSELR_I2C12SRC_SHIFT 0
  644. /* RCC_I2C345CKSELR register fields */
  645. #define RCC_I2C345CKSELR_I2C3SRC_MASK GENMASK(2, 0)
  646. #define RCC_I2C345CKSELR_I2C3SRC_SHIFT 0
  647. #define RCC_I2C345CKSELR_I2C4SRC_MASK GENMASK(5, 3)
  648. #define RCC_I2C345CKSELR_I2C4SRC_SHIFT 3
  649. #define RCC_I2C345CKSELR_I2C5SRC_MASK GENMASK(8, 6)
  650. #define RCC_I2C345CKSELR_I2C5SRC_SHIFT 6
  651. /* RCC_SPI2S1CKSELR register fields */
  652. #define RCC_SPI2S1CKSELR_SPI1SRC_MASK GENMASK(2, 0)
  653. #define RCC_SPI2S1CKSELR_SPI1SRC_SHIFT 0
  654. /* RCC_SPI2S23CKSELR register fields */
  655. #define RCC_SPI2S23CKSELR_SPI23SRC_MASK GENMASK(2, 0)
  656. #define RCC_SPI2S23CKSELR_SPI23SRC_SHIFT 0
  657. /* RCC_SPI45CKSELR register fields */
  658. #define RCC_SPI45CKSELR_SPI4SRC_MASK GENMASK(2, 0)
  659. #define RCC_SPI45CKSELR_SPI4SRC_SHIFT 0
  660. #define RCC_SPI45CKSELR_SPI5SRC_MASK GENMASK(5, 3)
  661. #define RCC_SPI45CKSELR_SPI5SRC_SHIFT 3
  662. /* RCC_UART12CKSELR register fields */
  663. #define RCC_UART12CKSELR_UART1SRC_MASK GENMASK(2, 0)
  664. #define RCC_UART12CKSELR_UART1SRC_SHIFT 0
  665. #define RCC_UART12CKSELR_UART2SRC_MASK GENMASK(5, 3)
  666. #define RCC_UART12CKSELR_UART2SRC_SHIFT 3
  667. /* RCC_UART35CKSELR register fields */
  668. #define RCC_UART35CKSELR_UART35SRC_MASK GENMASK(2, 0)
  669. #define RCC_UART35CKSELR_UART35SRC_SHIFT 0
  670. /* RCC_UART4CKSELR register fields */
  671. #define RCC_UART4CKSELR_UART4SRC_MASK GENMASK(2, 0)
  672. #define RCC_UART4CKSELR_UART4SRC_SHIFT 0
  673. /* RCC_UART6CKSELR register fields */
  674. #define RCC_UART6CKSELR_UART6SRC_MASK GENMASK(2, 0)
  675. #define RCC_UART6CKSELR_UART6SRC_SHIFT 0
  676. /* RCC_UART78CKSELR register fields */
  677. #define RCC_UART78CKSELR_UART78SRC_MASK GENMASK(2, 0)
  678. #define RCC_UART78CKSELR_UART78SRC_SHIFT 0
  679. /* RCC_LPTIM1CKSELR register fields */
  680. #define RCC_LPTIM1CKSELR_LPTIM1SRC_MASK GENMASK(2, 0)
  681. #define RCC_LPTIM1CKSELR_LPTIM1SRC_SHIFT 0
  682. /* RCC_LPTIM23CKSELR register fields */
  683. #define RCC_LPTIM23CKSELR_LPTIM2SRC_MASK GENMASK(2, 0)
  684. #define RCC_LPTIM23CKSELR_LPTIM2SRC_SHIFT 0
  685. #define RCC_LPTIM23CKSELR_LPTIM3SRC_MASK GENMASK(5, 3)
  686. #define RCC_LPTIM23CKSELR_LPTIM3SRC_SHIFT 3
  687. /* RCC_LPTIM45CKSELR register fields */
  688. #define RCC_LPTIM45CKSELR_LPTIM45SRC_MASK GENMASK(2, 0)
  689. #define RCC_LPTIM45CKSELR_LPTIM45SRC_SHIFT 0
  690. /* RCC_SAI1CKSELR register fields */
  691. #define RCC_SAI1CKSELR_SAI1SRC_MASK GENMASK(2, 0)
  692. #define RCC_SAI1CKSELR_SAI1SRC_SHIFT 0
  693. /* RCC_SAI2CKSELR register fields */
  694. #define RCC_SAI2CKSELR_SAI2SRC_MASK GENMASK(2, 0)
  695. #define RCC_SAI2CKSELR_SAI2SRC_SHIFT 0
  696. /* RCC_FDCANCKSELR register fields */
  697. #define RCC_FDCANCKSELR_FDCANSRC_MASK GENMASK(1, 0)
  698. #define RCC_FDCANCKSELR_FDCANSRC_SHIFT 0
  699. /* RCC_SPDIFCKSELR register fields */
  700. #define RCC_SPDIFCKSELR_SPDIFSRC_MASK GENMASK(1, 0)
  701. #define RCC_SPDIFCKSELR_SPDIFSRC_SHIFT 0
  702. /* RCC_ADC12CKSELR register fields */
  703. #define RCC_ADC12CKSELR_ADC1SRC_MASK GENMASK(1, 0)
  704. #define RCC_ADC12CKSELR_ADC1SRC_SHIFT 0
  705. #define RCC_ADC12CKSELR_ADC2SRC_MASK GENMASK(3, 2)
  706. #define RCC_ADC12CKSELR_ADC2SRC_SHIFT 2
  707. /* RCC_SDMMC12CKSELR register fields */
  708. #define RCC_SDMMC12CKSELR_SDMMC1SRC_MASK GENMASK(2, 0)
  709. #define RCC_SDMMC12CKSELR_SDMMC1SRC_SHIFT 0
  710. #define RCC_SDMMC12CKSELR_SDMMC2SRC_MASK GENMASK(5, 3)
  711. #define RCC_SDMMC12CKSELR_SDMMC2SRC_SHIFT 3
  712. /* RCC_ETH12CKSELR register fields */
  713. #define RCC_ETH12CKSELR_ETH1SRC_MASK GENMASK(1, 0)
  714. #define RCC_ETH12CKSELR_ETH1SRC_SHIFT 0
  715. #define RCC_ETH12CKSELR_ETH1PTPDIV_MASK GENMASK(7, 4)
  716. #define RCC_ETH12CKSELR_ETH1PTPDIV_SHIFT 4
  717. #define RCC_ETH12CKSELR_ETH2SRC_MASK GENMASK(9, 8)
  718. #define RCC_ETH12CKSELR_ETH2SRC_SHIFT 8
  719. #define RCC_ETH12CKSELR_ETH2PTPDIV_MASK GENMASK(15, 12)
  720. #define RCC_ETH12CKSELR_ETH2PTPDIV_SHIFT 12
  721. /* RCC_USBCKSELR register fields */
  722. #define RCC_USBCKSELR_USBPHYSRC_MASK GENMASK(1, 0)
  723. #define RCC_USBCKSELR_USBPHYSRC_SHIFT 0
  724. #define RCC_USBCKSELR_USBOSRC BIT(4)
  725. /* RCC_QSPICKSELR register fields */
  726. #define RCC_QSPICKSELR_QSPISRC_MASK GENMASK(1, 0)
  727. #define RCC_QSPICKSELR_QSPISRC_SHIFT 0
  728. /* RCC_FMCCKSELR register fields */
  729. #define RCC_FMCCKSELR_FMCSRC_MASK GENMASK(1, 0)
  730. #define RCC_FMCCKSELR_FMCSRC_SHIFT 0
  731. /* RCC_RNG1CKSELR register fields */
  732. #define RCC_RNG1CKSELR_RNG1SRC_MASK GENMASK(1, 0)
  733. #define RCC_RNG1CKSELR_RNG1SRC_SHIFT 0
  734. /* RCC_STGENCKSELR register fields */
  735. #define RCC_STGENCKSELR_STGENSRC_MASK GENMASK(1, 0)
  736. #define RCC_STGENCKSELR_STGENSRC_SHIFT 0
  737. /* RCC_DCMIPPCKSELR register fields */
  738. #define RCC_DCMIPPCKSELR_DCMIPPSRC_MASK GENMASK(1, 0)
  739. #define RCC_DCMIPPCKSELR_DCMIPPSRC_SHIFT 0
  740. /* RCC_SAESCKSELR register fields */
  741. #define RCC_SAESCKSELR_SAESSRC_MASK GENMASK(1, 0)
  742. #define RCC_SAESCKSELR_SAESSRC_SHIFT 0
  743. /* RCC_APB1RSTSETR register fields */
  744. #define RCC_APB1RSTSETR_TIM2RST BIT(0)
  745. #define RCC_APB1RSTSETR_TIM3RST BIT(1)
  746. #define RCC_APB1RSTSETR_TIM4RST BIT(2)
  747. #define RCC_APB1RSTSETR_TIM5RST BIT(3)
  748. #define RCC_APB1RSTSETR_TIM6RST BIT(4)
  749. #define RCC_APB1RSTSETR_TIM7RST BIT(5)
  750. #define RCC_APB1RSTSETR_LPTIM1RST BIT(9)
  751. #define RCC_APB1RSTSETR_SPI2RST BIT(11)
  752. #define RCC_APB1RSTSETR_SPI3RST BIT(12)
  753. #define RCC_APB1RSTSETR_USART3RST BIT(15)
  754. #define RCC_APB1RSTSETR_UART4RST BIT(16)
  755. #define RCC_APB1RSTSETR_UART5RST BIT(17)
  756. #define RCC_APB1RSTSETR_UART7RST BIT(18)
  757. #define RCC_APB1RSTSETR_UART8RST BIT(19)
  758. #define RCC_APB1RSTSETR_I2C1RST BIT(21)
  759. #define RCC_APB1RSTSETR_I2C2RST BIT(22)
  760. #define RCC_APB1RSTSETR_SPDIFRST BIT(26)
  761. /* RCC_APB1RSTCLRR register fields */
  762. #define RCC_APB1RSTCLRR_TIM2RST BIT(0)
  763. #define RCC_APB1RSTCLRR_TIM3RST BIT(1)
  764. #define RCC_APB1RSTCLRR_TIM4RST BIT(2)
  765. #define RCC_APB1RSTCLRR_TIM5RST BIT(3)
  766. #define RCC_APB1RSTCLRR_TIM6RST BIT(4)
  767. #define RCC_APB1RSTCLRR_TIM7RST BIT(5)
  768. #define RCC_APB1RSTCLRR_LPTIM1RST BIT(9)
  769. #define RCC_APB1RSTCLRR_SPI2RST BIT(11)
  770. #define RCC_APB1RSTCLRR_SPI3RST BIT(12)
  771. #define RCC_APB1RSTCLRR_USART3RST BIT(15)
  772. #define RCC_APB1RSTCLRR_UART4RST BIT(16)
  773. #define RCC_APB1RSTCLRR_UART5RST BIT(17)
  774. #define RCC_APB1RSTCLRR_UART7RST BIT(18)
  775. #define RCC_APB1RSTCLRR_UART8RST BIT(19)
  776. #define RCC_APB1RSTCLRR_I2C1RST BIT(21)
  777. #define RCC_APB1RSTCLRR_I2C2RST BIT(22)
  778. #define RCC_APB1RSTCLRR_SPDIFRST BIT(26)
  779. /* RCC_APB2RSTSETR register fields */
  780. #define RCC_APB2RSTSETR_TIM1RST BIT(0)
  781. #define RCC_APB2RSTSETR_TIM8RST BIT(1)
  782. #define RCC_APB2RSTSETR_SPI1RST BIT(8)
  783. #define RCC_APB2RSTSETR_USART6RST BIT(13)
  784. #define RCC_APB2RSTSETR_SAI1RST BIT(16)
  785. #define RCC_APB2RSTSETR_SAI2RST BIT(17)
  786. #define RCC_APB2RSTSETR_DFSDMRST BIT(20)
  787. #define RCC_APB2RSTSETR_FDCANRST BIT(24)
  788. /* RCC_APB2RSTCLRR register fields */
  789. #define RCC_APB2RSTCLRR_TIM1RST BIT(0)
  790. #define RCC_APB2RSTCLRR_TIM8RST BIT(1)
  791. #define RCC_APB2RSTCLRR_SPI1RST BIT(8)
  792. #define RCC_APB2RSTCLRR_USART6RST BIT(13)
  793. #define RCC_APB2RSTCLRR_SAI1RST BIT(16)
  794. #define RCC_APB2RSTCLRR_SAI2RST BIT(17)
  795. #define RCC_APB2RSTCLRR_DFSDMRST BIT(20)
  796. #define RCC_APB2RSTCLRR_FDCANRST BIT(24)
  797. /* RCC_APB3RSTSETR register fields */
  798. #define RCC_APB3RSTSETR_LPTIM2RST BIT(0)
  799. #define RCC_APB3RSTSETR_LPTIM3RST BIT(1)
  800. #define RCC_APB3RSTSETR_LPTIM4RST BIT(2)
  801. #define RCC_APB3RSTSETR_LPTIM5RST BIT(3)
  802. #define RCC_APB3RSTSETR_SYSCFGRST BIT(11)
  803. #define RCC_APB3RSTSETR_VREFRST BIT(13)
  804. #define RCC_APB3RSTSETR_DTSRST BIT(16)
  805. #define RCC_APB3RSTSETR_PMBCTRLRST BIT(17)
  806. /* RCC_APB3RSTCLRR register fields */
  807. #define RCC_APB3RSTCLRR_LPTIM2RST BIT(0)
  808. #define RCC_APB3RSTCLRR_LPTIM3RST BIT(1)
  809. #define RCC_APB3RSTCLRR_LPTIM4RST BIT(2)
  810. #define RCC_APB3RSTCLRR_LPTIM5RST BIT(3)
  811. #define RCC_APB3RSTCLRR_SYSCFGRST BIT(11)
  812. #define RCC_APB3RSTCLRR_VREFRST BIT(13)
  813. #define RCC_APB3RSTCLRR_DTSRST BIT(16)
  814. #define RCC_APB3RSTCLRR_PMBCTRLRST BIT(17)
  815. /* RCC_APB4RSTSETR register fields */
  816. #define RCC_APB4RSTSETR_LTDCRST BIT(0)
  817. #define RCC_APB4RSTSETR_DCMIPPRST BIT(1)
  818. #define RCC_APB4RSTSETR_DDRPERFMRST BIT(8)
  819. #define RCC_APB4RSTSETR_USBPHYRST BIT(16)
  820. /* RCC_APB4RSTCLRR register fields */
  821. #define RCC_APB4RSTCLRR_LTDCRST BIT(0)
  822. #define RCC_APB4RSTCLRR_DCMIPPRST BIT(1)
  823. #define RCC_APB4RSTCLRR_DDRPERFMRST BIT(8)
  824. #define RCC_APB4RSTCLRR_USBPHYRST BIT(16)
  825. /* RCC_APB5RSTSETR register fields */
  826. #define RCC_APB5RSTSETR_STGENRST BIT(20)
  827. /* RCC_APB5RSTCLRR register fields */
  828. #define RCC_APB5RSTCLRR_STGENRST BIT(20)
  829. /* RCC_APB6RSTSETR register fields */
  830. #define RCC_APB6RSTSETR_USART1RST BIT(0)
  831. #define RCC_APB6RSTSETR_USART2RST BIT(1)
  832. #define RCC_APB6RSTSETR_SPI4RST BIT(2)
  833. #define RCC_APB6RSTSETR_SPI5RST BIT(3)
  834. #define RCC_APB6RSTSETR_I2C3RST BIT(4)
  835. #define RCC_APB6RSTSETR_I2C4RST BIT(5)
  836. #define RCC_APB6RSTSETR_I2C5RST BIT(6)
  837. #define RCC_APB6RSTSETR_TIM12RST BIT(7)
  838. #define RCC_APB6RSTSETR_TIM13RST BIT(8)
  839. #define RCC_APB6RSTSETR_TIM14RST BIT(9)
  840. #define RCC_APB6RSTSETR_TIM15RST BIT(10)
  841. #define RCC_APB6RSTSETR_TIM16RST BIT(11)
  842. #define RCC_APB6RSTSETR_TIM17RST BIT(12)
  843. /* RCC_APB6RSTCLRR register fields */
  844. #define RCC_APB6RSTCLRR_USART1RST BIT(0)
  845. #define RCC_APB6RSTCLRR_USART2RST BIT(1)
  846. #define RCC_APB6RSTCLRR_SPI4RST BIT(2)
  847. #define RCC_APB6RSTCLRR_SPI5RST BIT(3)
  848. #define RCC_APB6RSTCLRR_I2C3RST BIT(4)
  849. #define RCC_APB6RSTCLRR_I2C4RST BIT(5)
  850. #define RCC_APB6RSTCLRR_I2C5RST BIT(6)
  851. #define RCC_APB6RSTCLRR_TIM12RST BIT(7)
  852. #define RCC_APB6RSTCLRR_TIM13RST BIT(8)
  853. #define RCC_APB6RSTCLRR_TIM14RST BIT(9)
  854. #define RCC_APB6RSTCLRR_TIM15RST BIT(10)
  855. #define RCC_APB6RSTCLRR_TIM16RST BIT(11)
  856. #define RCC_APB6RSTCLRR_TIM17RST BIT(12)
  857. /* RCC_AHB2RSTSETR register fields */
  858. #define RCC_AHB2RSTSETR_DMA1RST BIT(0)
  859. #define RCC_AHB2RSTSETR_DMA2RST BIT(1)
  860. #define RCC_AHB2RSTSETR_DMAMUX1RST BIT(2)
  861. #define RCC_AHB2RSTSETR_DMA3RST BIT(3)
  862. #define RCC_AHB2RSTSETR_DMAMUX2RST BIT(4)
  863. #define RCC_AHB2RSTSETR_ADC1RST BIT(5)
  864. #define RCC_AHB2RSTSETR_ADC2RST BIT(6)
  865. #define RCC_AHB2RSTSETR_USBORST BIT(8)
  866. /* RCC_AHB2RSTCLRR register fields */
  867. #define RCC_AHB2RSTCLRR_DMA1RST BIT(0)
  868. #define RCC_AHB2RSTCLRR_DMA2RST BIT(1)
  869. #define RCC_AHB2RSTCLRR_DMAMUX1RST BIT(2)
  870. #define RCC_AHB2RSTCLRR_DMA3RST BIT(3)
  871. #define RCC_AHB2RSTCLRR_DMAMUX2RST BIT(4)
  872. #define RCC_AHB2RSTCLRR_ADC1RST BIT(5)
  873. #define RCC_AHB2RSTCLRR_ADC2RST BIT(6)
  874. #define RCC_AHB2RSTCLRR_USBORST BIT(8)
  875. /* RCC_AHB4RSTSETR register fields */
  876. #define RCC_AHB4RSTSETR_GPIOARST BIT(0)
  877. #define RCC_AHB4RSTSETR_GPIOBRST BIT(1)
  878. #define RCC_AHB4RSTSETR_GPIOCRST BIT(2)
  879. #define RCC_AHB4RSTSETR_GPIODRST BIT(3)
  880. #define RCC_AHB4RSTSETR_GPIOERST BIT(4)
  881. #define RCC_AHB4RSTSETR_GPIOFRST BIT(5)
  882. #define RCC_AHB4RSTSETR_GPIOGRST BIT(6)
  883. #define RCC_AHB4RSTSETR_GPIOHRST BIT(7)
  884. #define RCC_AHB4RSTSETR_GPIOIRST BIT(8)
  885. #define RCC_AHB4RSTSETR_TSCRST BIT(15)
  886. /* RCC_AHB4RSTCLRR register fields */
  887. #define RCC_AHB4RSTCLRR_GPIOARST BIT(0)
  888. #define RCC_AHB4RSTCLRR_GPIOBRST BIT(1)
  889. #define RCC_AHB4RSTCLRR_GPIOCRST BIT(2)
  890. #define RCC_AHB4RSTCLRR_GPIODRST BIT(3)
  891. #define RCC_AHB4RSTCLRR_GPIOERST BIT(4)
  892. #define RCC_AHB4RSTCLRR_GPIOFRST BIT(5)
  893. #define RCC_AHB4RSTCLRR_GPIOGRST BIT(6)
  894. #define RCC_AHB4RSTCLRR_GPIOHRST BIT(7)
  895. #define RCC_AHB4RSTCLRR_GPIOIRST BIT(8)
  896. #define RCC_AHB4RSTCLRR_TSCRST BIT(15)
  897. /* RCC_AHB5RSTSETR register fields */
  898. #define RCC_AHB5RSTSETR_PKARST BIT(2)
  899. #define RCC_AHB5RSTSETR_SAESRST BIT(3)
  900. #define RCC_AHB5RSTSETR_CRYP1RST BIT(4)
  901. #define RCC_AHB5RSTSETR_HASH1RST BIT(5)
  902. #define RCC_AHB5RSTSETR_RNG1RST BIT(6)
  903. #define RCC_AHB5RSTSETR_AXIMCRST BIT(16)
  904. /* RCC_AHB5RSTCLRR register fields */
  905. #define RCC_AHB5RSTCLRR_PKARST BIT(2)
  906. #define RCC_AHB5RSTCLRR_SAESRST BIT(3)
  907. #define RCC_AHB5RSTCLRR_CRYP1RST BIT(4)
  908. #define RCC_AHB5RSTCLRR_HASH1RST BIT(5)
  909. #define RCC_AHB5RSTCLRR_RNG1RST BIT(6)
  910. #define RCC_AHB5RSTCLRR_AXIMCRST BIT(16)
  911. /* RCC_AHB6RSTSETR register fields */
  912. #define RCC_AHB6RSTSETR_MDMARST BIT(0)
  913. #define RCC_AHB6RSTSETR_MCERST BIT(1)
  914. #define RCC_AHB6RSTSETR_ETH1MACRST BIT(10)
  915. #define RCC_AHB6RSTSETR_FMCRST BIT(12)
  916. #define RCC_AHB6RSTSETR_QSPIRST BIT(14)
  917. #define RCC_AHB6RSTSETR_SDMMC1RST BIT(16)
  918. #define RCC_AHB6RSTSETR_SDMMC2RST BIT(17)
  919. #define RCC_AHB6RSTSETR_CRC1RST BIT(20)
  920. #define RCC_AHB6RSTSETR_USBHRST BIT(24)
  921. #define RCC_AHB6RSTSETR_ETH2MACRST BIT(30)
  922. /* RCC_AHB6RSTCLRR register fields */
  923. #define RCC_AHB6RSTCLRR_MDMARST BIT(0)
  924. #define RCC_AHB6RSTCLRR_MCERST BIT(1)
  925. #define RCC_AHB6RSTCLRR_ETH1MACRST BIT(10)
  926. #define RCC_AHB6RSTCLRR_FMCRST BIT(12)
  927. #define RCC_AHB6RSTCLRR_QSPIRST BIT(14)
  928. #define RCC_AHB6RSTCLRR_SDMMC1RST BIT(16)
  929. #define RCC_AHB6RSTCLRR_SDMMC2RST BIT(17)
  930. #define RCC_AHB6RSTCLRR_CRC1RST BIT(20)
  931. #define RCC_AHB6RSTCLRR_USBHRST BIT(24)
  932. #define RCC_AHB6RSTCLRR_ETH2MACRST BIT(30)
  933. /* RCC_MP_APB1ENSETR register fields */
  934. #define RCC_MP_APB1ENSETR_TIM2EN BIT(0)
  935. #define RCC_MP_APB1ENSETR_TIM3EN BIT(1)
  936. #define RCC_MP_APB1ENSETR_TIM4EN BIT(2)
  937. #define RCC_MP_APB1ENSETR_TIM5EN BIT(3)
  938. #define RCC_MP_APB1ENSETR_TIM6EN BIT(4)
  939. #define RCC_MP_APB1ENSETR_TIM7EN BIT(5)
  940. #define RCC_MP_APB1ENSETR_LPTIM1EN BIT(9)
  941. #define RCC_MP_APB1ENSETR_SPI2EN BIT(11)
  942. #define RCC_MP_APB1ENSETR_SPI3EN BIT(12)
  943. #define RCC_MP_APB1ENSETR_USART3EN BIT(15)
  944. #define RCC_MP_APB1ENSETR_UART4EN BIT(16)
  945. #define RCC_MP_APB1ENSETR_UART5EN BIT(17)
  946. #define RCC_MP_APB1ENSETR_UART7EN BIT(18)
  947. #define RCC_MP_APB1ENSETR_UART8EN BIT(19)
  948. #define RCC_MP_APB1ENSETR_I2C1EN BIT(21)
  949. #define RCC_MP_APB1ENSETR_I2C2EN BIT(22)
  950. #define RCC_MP_APB1ENSETR_SPDIFEN BIT(26)
  951. /* RCC_MP_APB1ENCLRR register fields */
  952. #define RCC_MP_APB1ENCLRR_TIM2EN BIT(0)
  953. #define RCC_MP_APB1ENCLRR_TIM3EN BIT(1)
  954. #define RCC_MP_APB1ENCLRR_TIM4EN BIT(2)
  955. #define RCC_MP_APB1ENCLRR_TIM5EN BIT(3)
  956. #define RCC_MP_APB1ENCLRR_TIM6EN BIT(4)
  957. #define RCC_MP_APB1ENCLRR_TIM7EN BIT(5)
  958. #define RCC_MP_APB1ENCLRR_LPTIM1EN BIT(9)
  959. #define RCC_MP_APB1ENCLRR_SPI2EN BIT(11)
  960. #define RCC_MP_APB1ENCLRR_SPI3EN BIT(12)
  961. #define RCC_MP_APB1ENCLRR_USART3EN BIT(15)
  962. #define RCC_MP_APB1ENCLRR_UART4EN BIT(16)
  963. #define RCC_MP_APB1ENCLRR_UART5EN BIT(17)
  964. #define RCC_MP_APB1ENCLRR_UART7EN BIT(18)
  965. #define RCC_MP_APB1ENCLRR_UART8EN BIT(19)
  966. #define RCC_MP_APB1ENCLRR_I2C1EN BIT(21)
  967. #define RCC_MP_APB1ENCLRR_I2C2EN BIT(22)
  968. #define RCC_MP_APB1ENCLRR_SPDIFEN BIT(26)
  969. /* RCC_MP_APB2ENSETR register fields */
  970. #define RCC_MP_APB2ENSETR_TIM1EN BIT(0)
  971. #define RCC_MP_APB2ENSETR_TIM8EN BIT(1)
  972. #define RCC_MP_APB2ENSETR_SPI1EN BIT(8)
  973. #define RCC_MP_APB2ENSETR_USART6EN BIT(13)
  974. #define RCC_MP_APB2ENSETR_SAI1EN BIT(16)
  975. #define RCC_MP_APB2ENSETR_SAI2EN BIT(17)
  976. #define RCC_MP_APB2ENSETR_DFSDMEN BIT(20)
  977. #define RCC_MP_APB2ENSETR_ADFSDMEN BIT(21)
  978. #define RCC_MP_APB2ENSETR_FDCANEN BIT(24)
  979. /* RCC_MP_APB2ENCLRR register fields */
  980. #define RCC_MP_APB2ENCLRR_TIM1EN BIT(0)
  981. #define RCC_MP_APB2ENCLRR_TIM8EN BIT(1)
  982. #define RCC_MP_APB2ENCLRR_SPI1EN BIT(8)
  983. #define RCC_MP_APB2ENCLRR_USART6EN BIT(13)
  984. #define RCC_MP_APB2ENCLRR_SAI1EN BIT(16)
  985. #define RCC_MP_APB2ENCLRR_SAI2EN BIT(17)
  986. #define RCC_MP_APB2ENCLRR_DFSDMEN BIT(20)
  987. #define RCC_MP_APB2ENCLRR_ADFSDMEN BIT(21)
  988. #define RCC_MP_APB2ENCLRR_FDCANEN BIT(24)
  989. /* RCC_MP_APB3ENSETR register fields */
  990. #define RCC_MP_APB3ENSETR_LPTIM2EN BIT(0)
  991. #define RCC_MP_APB3ENSETR_LPTIM3EN BIT(1)
  992. #define RCC_MP_APB3ENSETR_LPTIM4EN BIT(2)
  993. #define RCC_MP_APB3ENSETR_LPTIM5EN BIT(3)
  994. #define RCC_MP_APB3ENSETR_VREFEN BIT(13)
  995. #define RCC_MP_APB3ENSETR_DTSEN BIT(16)
  996. #define RCC_MP_APB3ENSETR_PMBCTRLEN BIT(17)
  997. #define RCC_MP_APB3ENSETR_HDPEN BIT(20)
  998. /* RCC_MP_APB3ENCLRR register fields */
  999. #define RCC_MP_APB3ENCLRR_LPTIM2EN BIT(0)
  1000. #define RCC_MP_APB3ENCLRR_LPTIM3EN BIT(1)
  1001. #define RCC_MP_APB3ENCLRR_LPTIM4EN BIT(2)
  1002. #define RCC_MP_APB3ENCLRR_LPTIM5EN BIT(3)
  1003. #define RCC_MP_APB3ENCLRR_VREFEN BIT(13)
  1004. #define RCC_MP_APB3ENCLRR_DTSEN BIT(16)
  1005. #define RCC_MP_APB3ENCLRR_PMBCTRLEN BIT(17)
  1006. #define RCC_MP_APB3ENCLRR_HDPEN BIT(20)
  1007. /* RCC_MP_S_APB3ENSETR register fields */
  1008. #define RCC_MP_S_APB3ENSETR_SYSCFGEN BIT(0)
  1009. /* RCC_MP_S_APB3ENCLRR register fields */
  1010. #define RCC_MP_S_APB3ENCLRR_SYSCFGEN BIT(0)
  1011. /* RCC_MP_NS_APB3ENSETR register fields */
  1012. #define RCC_MP_NS_APB3ENSETR_SYSCFGEN BIT(0)
  1013. /* RCC_MP_NS_APB3ENCLRR register fields */
  1014. #define RCC_MP_NS_APB3ENCLRR_SYSCFGEN BIT(0)
  1015. /* RCC_MP_APB4ENSETR register fields */
  1016. #define RCC_MP_APB4ENSETR_DCMIPPEN BIT(1)
  1017. #define RCC_MP_APB4ENSETR_DDRPERFMEN BIT(8)
  1018. #define RCC_MP_APB4ENSETR_IWDG2APBEN BIT(15)
  1019. #define RCC_MP_APB4ENSETR_USBPHYEN BIT(16)
  1020. #define RCC_MP_APB4ENSETR_STGENROEN BIT(20)
  1021. /* RCC_MP_APB4ENCLRR register fields */
  1022. #define RCC_MP_APB4ENCLRR_DCMIPPEN BIT(1)
  1023. #define RCC_MP_APB4ENCLRR_DDRPERFMEN BIT(8)
  1024. #define RCC_MP_APB4ENCLRR_IWDG2APBEN BIT(15)
  1025. #define RCC_MP_APB4ENCLRR_USBPHYEN BIT(16)
  1026. #define RCC_MP_APB4ENCLRR_STGENROEN BIT(20)
  1027. /* RCC_MP_S_APB4ENSETR register fields */
  1028. #define RCC_MP_S_APB4ENSETR_LTDCEN BIT(0)
  1029. /* RCC_MP_S_APB4ENCLRR register fields */
  1030. #define RCC_MP_S_APB4ENCLRR_LTDCEN BIT(0)
  1031. /* RCC_MP_NS_APB4ENSETR register fields */
  1032. #define RCC_MP_NS_APB4ENSETR_LTDCEN BIT(0)
  1033. /* RCC_MP_NS_APB4ENCLRR register fields */
  1034. #define RCC_MP_NS_APB4ENCLRR_LTDCEN BIT(0)
  1035. /* RCC_MP_APB5ENSETR register fields */
  1036. #define RCC_MP_APB5ENSETR_RTCAPBEN BIT(8)
  1037. #define RCC_MP_APB5ENSETR_TZCEN BIT(11)
  1038. #define RCC_MP_APB5ENSETR_ETZPCEN BIT(13)
  1039. #define RCC_MP_APB5ENSETR_IWDG1APBEN BIT(15)
  1040. #define RCC_MP_APB5ENSETR_BSECEN BIT(16)
  1041. #define RCC_MP_APB5ENSETR_STGENCEN BIT(20)
  1042. /* RCC_MP_APB5ENCLRR register fields */
  1043. #define RCC_MP_APB5ENCLRR_RTCAPBEN BIT(8)
  1044. #define RCC_MP_APB5ENCLRR_TZCEN BIT(11)
  1045. #define RCC_MP_APB5ENCLRR_ETZPCEN BIT(13)
  1046. #define RCC_MP_APB5ENCLRR_IWDG1APBEN BIT(15)
  1047. #define RCC_MP_APB5ENCLRR_BSECEN BIT(16)
  1048. #define RCC_MP_APB5ENCLRR_STGENCEN BIT(20)
  1049. /* RCC_MP_APB6ENSETR register fields */
  1050. #define RCC_MP_APB6ENSETR_USART1EN BIT(0)
  1051. #define RCC_MP_APB6ENSETR_USART2EN BIT(1)
  1052. #define RCC_MP_APB6ENSETR_SPI4EN BIT(2)
  1053. #define RCC_MP_APB6ENSETR_SPI5EN BIT(3)
  1054. #define RCC_MP_APB6ENSETR_I2C3EN BIT(4)
  1055. #define RCC_MP_APB6ENSETR_I2C4EN BIT(5)
  1056. #define RCC_MP_APB6ENSETR_I2C5EN BIT(6)
  1057. #define RCC_MP_APB6ENSETR_TIM12EN BIT(7)
  1058. #define RCC_MP_APB6ENSETR_TIM13EN BIT(8)
  1059. #define RCC_MP_APB6ENSETR_TIM14EN BIT(9)
  1060. #define RCC_MP_APB6ENSETR_TIM15EN BIT(10)
  1061. #define RCC_MP_APB6ENSETR_TIM16EN BIT(11)
  1062. #define RCC_MP_APB6ENSETR_TIM17EN BIT(12)
  1063. /* RCC_MP_APB6ENCLRR register fields */
  1064. #define RCC_MP_APB6ENCLRR_USART1EN BIT(0)
  1065. #define RCC_MP_APB6ENCLRR_USART2EN BIT(1)
  1066. #define RCC_MP_APB6ENCLRR_SPI4EN BIT(2)
  1067. #define RCC_MP_APB6ENCLRR_SPI5EN BIT(3)
  1068. #define RCC_MP_APB6ENCLRR_I2C3EN BIT(4)
  1069. #define RCC_MP_APB6ENCLRR_I2C4EN BIT(5)
  1070. #define RCC_MP_APB6ENCLRR_I2C5EN BIT(6)
  1071. #define RCC_MP_APB6ENCLRR_TIM12EN BIT(7)
  1072. #define RCC_MP_APB6ENCLRR_TIM13EN BIT(8)
  1073. #define RCC_MP_APB6ENCLRR_TIM14EN BIT(9)
  1074. #define RCC_MP_APB6ENCLRR_TIM15EN BIT(10)
  1075. #define RCC_MP_APB6ENCLRR_TIM16EN BIT(11)
  1076. #define RCC_MP_APB6ENCLRR_TIM17EN BIT(12)
  1077. /* RCC_MP_AHB2ENSETR register fields */
  1078. #define RCC_MP_AHB2ENSETR_DMA1EN BIT(0)
  1079. #define RCC_MP_AHB2ENSETR_DMA2EN BIT(1)
  1080. #define RCC_MP_AHB2ENSETR_DMAMUX1EN BIT(2)
  1081. #define RCC_MP_AHB2ENSETR_DMA3EN BIT(3)
  1082. #define RCC_MP_AHB2ENSETR_DMAMUX2EN BIT(4)
  1083. #define RCC_MP_AHB2ENSETR_ADC1EN BIT(5)
  1084. #define RCC_MP_AHB2ENSETR_ADC2EN BIT(6)
  1085. #define RCC_MP_AHB2ENSETR_USBOEN BIT(8)
  1086. /* RCC_MP_AHB2ENCLRR register fields */
  1087. #define RCC_MP_AHB2ENCLRR_DMA1EN BIT(0)
  1088. #define RCC_MP_AHB2ENCLRR_DMA2EN BIT(1)
  1089. #define RCC_MP_AHB2ENCLRR_DMAMUX1EN BIT(2)
  1090. #define RCC_MP_AHB2ENCLRR_DMA3EN BIT(3)
  1091. #define RCC_MP_AHB2ENCLRR_DMAMUX2EN BIT(4)
  1092. #define RCC_MP_AHB2ENCLRR_ADC1EN BIT(5)
  1093. #define RCC_MP_AHB2ENCLRR_ADC2EN BIT(6)
  1094. #define RCC_MP_AHB2ENCLRR_USBOEN BIT(8)
  1095. /* RCC_MP_AHB4ENSETR register fields */
  1096. #define RCC_MP_AHB4ENSETR_TSCEN BIT(15)
  1097. /* RCC_MP_AHB4ENCLRR register fields */
  1098. #define RCC_MP_AHB4ENCLRR_TSCEN BIT(15)
  1099. /* RCC_MP_S_AHB4ENSETR register fields */
  1100. #define RCC_MP_S_AHB4ENSETR_GPIOAEN BIT(0)
  1101. #define RCC_MP_S_AHB4ENSETR_GPIOBEN BIT(1)
  1102. #define RCC_MP_S_AHB4ENSETR_GPIOCEN BIT(2)
  1103. #define RCC_MP_S_AHB4ENSETR_GPIODEN BIT(3)
  1104. #define RCC_MP_S_AHB4ENSETR_GPIOEEN BIT(4)
  1105. #define RCC_MP_S_AHB4ENSETR_GPIOFEN BIT(5)
  1106. #define RCC_MP_S_AHB4ENSETR_GPIOGEN BIT(6)
  1107. #define RCC_MP_S_AHB4ENSETR_GPIOHEN BIT(7)
  1108. #define RCC_MP_S_AHB4ENSETR_GPIOIEN BIT(8)
  1109. /* RCC_MP_S_AHB4ENCLRR register fields */
  1110. #define RCC_MP_S_AHB4ENCLRR_GPIOAEN BIT(0)
  1111. #define RCC_MP_S_AHB4ENCLRR_GPIOBEN BIT(1)
  1112. #define RCC_MP_S_AHB4ENCLRR_GPIOCEN BIT(2)
  1113. #define RCC_MP_S_AHB4ENCLRR_GPIODEN BIT(3)
  1114. #define RCC_MP_S_AHB4ENCLRR_GPIOEEN BIT(4)
  1115. #define RCC_MP_S_AHB4ENCLRR_GPIOFEN BIT(5)
  1116. #define RCC_MP_S_AHB4ENCLRR_GPIOGEN BIT(6)
  1117. #define RCC_MP_S_AHB4ENCLRR_GPIOHEN BIT(7)
  1118. #define RCC_MP_S_AHB4ENCLRR_GPIOIEN BIT(8)
  1119. /* RCC_MP_NS_AHB4ENSETR register fields */
  1120. #define RCC_MP_NS_AHB4ENSETR_GPIOAEN BIT(0)
  1121. #define RCC_MP_NS_AHB4ENSETR_GPIOBEN BIT(1)
  1122. #define RCC_MP_NS_AHB4ENSETR_GPIOCEN BIT(2)
  1123. #define RCC_MP_NS_AHB4ENSETR_GPIODEN BIT(3)
  1124. #define RCC_MP_NS_AHB4ENSETR_GPIOEEN BIT(4)
  1125. #define RCC_MP_NS_AHB4ENSETR_GPIOFEN BIT(5)
  1126. #define RCC_MP_NS_AHB4ENSETR_GPIOGEN BIT(6)
  1127. #define RCC_MP_NS_AHB4ENSETR_GPIOHEN BIT(7)
  1128. #define RCC_MP_NS_AHB4ENSETR_GPIOIEN BIT(8)
  1129. /* RCC_MP_NS_AHB4ENCLRR register fields */
  1130. #define RCC_MP_NS_AHB4ENCLRR_GPIOAEN BIT(0)
  1131. #define RCC_MP_NS_AHB4ENCLRR_GPIOBEN BIT(1)
  1132. #define RCC_MP_NS_AHB4ENCLRR_GPIOCEN BIT(2)
  1133. #define RCC_MP_NS_AHB4ENCLRR_GPIODEN BIT(3)
  1134. #define RCC_MP_NS_AHB4ENCLRR_GPIOEEN BIT(4)
  1135. #define RCC_MP_NS_AHB4ENCLRR_GPIOFEN BIT(5)
  1136. #define RCC_MP_NS_AHB4ENCLRR_GPIOGEN BIT(6)
  1137. #define RCC_MP_NS_AHB4ENCLRR_GPIOHEN BIT(7)
  1138. #define RCC_MP_NS_AHB4ENCLRR_GPIOIEN BIT(8)
  1139. /* RCC_MP_AHB5ENSETR register fields */
  1140. #define RCC_MP_AHB5ENSETR_PKAEN BIT(2)
  1141. #define RCC_MP_AHB5ENSETR_SAESEN BIT(3)
  1142. #define RCC_MP_AHB5ENSETR_CRYP1EN BIT(4)
  1143. #define RCC_MP_AHB5ENSETR_HASH1EN BIT(5)
  1144. #define RCC_MP_AHB5ENSETR_RNG1EN BIT(6)
  1145. #define RCC_MP_AHB5ENSETR_BKPSRAMEN BIT(8)
  1146. #define RCC_MP_AHB5ENSETR_AXIMCEN BIT(16)
  1147. /* RCC_MP_AHB5ENCLRR register fields */
  1148. #define RCC_MP_AHB5ENCLRR_PKAEN BIT(2)
  1149. #define RCC_MP_AHB5ENCLRR_SAESEN BIT(3)
  1150. #define RCC_MP_AHB5ENCLRR_CRYP1EN BIT(4)
  1151. #define RCC_MP_AHB5ENCLRR_HASH1EN BIT(5)
  1152. #define RCC_MP_AHB5ENCLRR_RNG1EN BIT(6)
  1153. #define RCC_MP_AHB5ENCLRR_BKPSRAMEN BIT(8)
  1154. #define RCC_MP_AHB5ENCLRR_AXIMCEN BIT(16)
  1155. /* RCC_MP_AHB6ENSETR register fields */
  1156. #define RCC_MP_AHB6ENSETR_MCEEN BIT(1)
  1157. #define RCC_MP_AHB6ENSETR_ETH1CKEN BIT(7)
  1158. #define RCC_MP_AHB6ENSETR_ETH1TXEN BIT(8)
  1159. #define RCC_MP_AHB6ENSETR_ETH1RXEN BIT(9)
  1160. #define RCC_MP_AHB6ENSETR_ETH1MACEN BIT(10)
  1161. #define RCC_MP_AHB6ENSETR_FMCEN BIT(12)
  1162. #define RCC_MP_AHB6ENSETR_QSPIEN BIT(14)
  1163. #define RCC_MP_AHB6ENSETR_SDMMC1EN BIT(16)
  1164. #define RCC_MP_AHB6ENSETR_SDMMC2EN BIT(17)
  1165. #define RCC_MP_AHB6ENSETR_CRC1EN BIT(20)
  1166. #define RCC_MP_AHB6ENSETR_USBHEN BIT(24)
  1167. #define RCC_MP_AHB6ENSETR_ETH2CKEN BIT(27)
  1168. #define RCC_MP_AHB6ENSETR_ETH2TXEN BIT(28)
  1169. #define RCC_MP_AHB6ENSETR_ETH2RXEN BIT(29)
  1170. #define RCC_MP_AHB6ENSETR_ETH2MACEN BIT(30)
  1171. /* RCC_MP_AHB6ENCLRR register fields */
  1172. #define RCC_MP_AHB6ENCLRR_MCEEN BIT(1)
  1173. #define RCC_MP_AHB6ENCLRR_ETH1CKEN BIT(7)
  1174. #define RCC_MP_AHB6ENCLRR_ETH1TXEN BIT(8)
  1175. #define RCC_MP_AHB6ENCLRR_ETH1RXEN BIT(9)
  1176. #define RCC_MP_AHB6ENCLRR_ETH1MACEN BIT(10)
  1177. #define RCC_MP_AHB6ENCLRR_FMCEN BIT(12)
  1178. #define RCC_MP_AHB6ENCLRR_QSPIEN BIT(14)
  1179. #define RCC_MP_AHB6ENCLRR_SDMMC1EN BIT(16)
  1180. #define RCC_MP_AHB6ENCLRR_SDMMC2EN BIT(17)
  1181. #define RCC_MP_AHB6ENCLRR_CRC1EN BIT(20)
  1182. #define RCC_MP_AHB6ENCLRR_USBHEN BIT(24)
  1183. #define RCC_MP_AHB6ENCLRR_ETH2CKEN BIT(27)
  1184. #define RCC_MP_AHB6ENCLRR_ETH2TXEN BIT(28)
  1185. #define RCC_MP_AHB6ENCLRR_ETH2RXEN BIT(29)
  1186. #define RCC_MP_AHB6ENCLRR_ETH2MACEN BIT(30)
  1187. /* RCC_MP_S_AHB6ENSETR register fields */
  1188. #define RCC_MP_S_AHB6ENSETR_MDMAEN BIT(0)
  1189. /* RCC_MP_S_AHB6ENCLRR register fields */
  1190. #define RCC_MP_S_AHB6ENCLRR_MDMAEN BIT(0)
  1191. /* RCC_MP_NS_AHB6ENSETR register fields */
  1192. #define RCC_MP_NS_AHB6ENSETR_MDMAEN BIT(0)
  1193. /* RCC_MP_NS_AHB6ENCLRR register fields */
  1194. #define RCC_MP_NS_AHB6ENCLRR_MDMAEN BIT(0)
  1195. /* RCC_MP_APB1LPENSETR register fields */
  1196. #define RCC_MP_APB1LPENSETR_TIM2LPEN BIT(0)
  1197. #define RCC_MP_APB1LPENSETR_TIM3LPEN BIT(1)
  1198. #define RCC_MP_APB1LPENSETR_TIM4LPEN BIT(2)
  1199. #define RCC_MP_APB1LPENSETR_TIM5LPEN BIT(3)
  1200. #define RCC_MP_APB1LPENSETR_TIM6LPEN BIT(4)
  1201. #define RCC_MP_APB1LPENSETR_TIM7LPEN BIT(5)
  1202. #define RCC_MP_APB1LPENSETR_LPTIM1LPEN BIT(9)
  1203. #define RCC_MP_APB1LPENSETR_SPI2LPEN BIT(11)
  1204. #define RCC_MP_APB1LPENSETR_SPI3LPEN BIT(12)
  1205. #define RCC_MP_APB1LPENSETR_USART3LPEN BIT(15)
  1206. #define RCC_MP_APB1LPENSETR_UART4LPEN BIT(16)
  1207. #define RCC_MP_APB1LPENSETR_UART5LPEN BIT(17)
  1208. #define RCC_MP_APB1LPENSETR_UART7LPEN BIT(18)
  1209. #define RCC_MP_APB1LPENSETR_UART8LPEN BIT(19)
  1210. #define RCC_MP_APB1LPENSETR_I2C1LPEN BIT(21)
  1211. #define RCC_MP_APB1LPENSETR_I2C2LPEN BIT(22)
  1212. #define RCC_MP_APB1LPENSETR_SPDIFLPEN BIT(26)
  1213. /* RCC_MP_APB1LPENCLRR register fields */
  1214. #define RCC_MP_APB1LPENCLRR_TIM2LPEN BIT(0)
  1215. #define RCC_MP_APB1LPENCLRR_TIM3LPEN BIT(1)
  1216. #define RCC_MP_APB1LPENCLRR_TIM4LPEN BIT(2)
  1217. #define RCC_MP_APB1LPENCLRR_TIM5LPEN BIT(3)
  1218. #define RCC_MP_APB1LPENCLRR_TIM6LPEN BIT(4)
  1219. #define RCC_MP_APB1LPENCLRR_TIM7LPEN BIT(5)
  1220. #define RCC_MP_APB1LPENCLRR_LPTIM1LPEN BIT(9)
  1221. #define RCC_MP_APB1LPENCLRR_SPI2LPEN BIT(11)
  1222. #define RCC_MP_APB1LPENCLRR_SPI3LPEN BIT(12)
  1223. #define RCC_MP_APB1LPENCLRR_USART3LPEN BIT(15)
  1224. #define RCC_MP_APB1LPENCLRR_UART4LPEN BIT(16)
  1225. #define RCC_MP_APB1LPENCLRR_UART5LPEN BIT(17)
  1226. #define RCC_MP_APB1LPENCLRR_UART7LPEN BIT(18)
  1227. #define RCC_MP_APB1LPENCLRR_UART8LPEN BIT(19)
  1228. #define RCC_MP_APB1LPENCLRR_I2C1LPEN BIT(21)
  1229. #define RCC_MP_APB1LPENCLRR_I2C2LPEN BIT(22)
  1230. #define RCC_MP_APB1LPENCLRR_SPDIFLPEN BIT(26)
  1231. /* RCC_MP_APB2LPENSETR register fields */
  1232. #define RCC_MP_APB2LPENSETR_TIM1LPEN BIT(0)
  1233. #define RCC_MP_APB2LPENSETR_TIM8LPEN BIT(1)
  1234. #define RCC_MP_APB2LPENSETR_SPI1LPEN BIT(8)
  1235. #define RCC_MP_APB2LPENSETR_USART6LPEN BIT(13)
  1236. #define RCC_MP_APB2LPENSETR_SAI1LPEN BIT(16)
  1237. #define RCC_MP_APB2LPENSETR_SAI2LPEN BIT(17)
  1238. #define RCC_MP_APB2LPENSETR_DFSDMLPEN BIT(20)
  1239. #define RCC_MP_APB2LPENSETR_ADFSDMLPEN BIT(21)
  1240. #define RCC_MP_APB2LPENSETR_FDCANLPEN BIT(24)
  1241. /* RCC_MP_APB2LPENCLRR register fields */
  1242. #define RCC_MP_APB2LPENCLRR_TIM1LPEN BIT(0)
  1243. #define RCC_MP_APB2LPENCLRR_TIM8LPEN BIT(1)
  1244. #define RCC_MP_APB2LPENCLRR_SPI1LPEN BIT(8)
  1245. #define RCC_MP_APB2LPENCLRR_USART6LPEN BIT(13)
  1246. #define RCC_MP_APB2LPENCLRR_SAI1LPEN BIT(16)
  1247. #define RCC_MP_APB2LPENCLRR_SAI2LPEN BIT(17)
  1248. #define RCC_MP_APB2LPENCLRR_DFSDMLPEN BIT(20)
  1249. #define RCC_MP_APB2LPENCLRR_ADFSDMLPEN BIT(21)
  1250. #define RCC_MP_APB2LPENCLRR_FDCANLPEN BIT(24)
  1251. /* RCC_MP_APB3LPENSETR register fields */
  1252. #define RCC_MP_APB3LPENSETR_LPTIM2LPEN BIT(0)
  1253. #define RCC_MP_APB3LPENSETR_LPTIM3LPEN BIT(1)
  1254. #define RCC_MP_APB3LPENSETR_LPTIM4LPEN BIT(2)
  1255. #define RCC_MP_APB3LPENSETR_LPTIM5LPEN BIT(3)
  1256. #define RCC_MP_APB3LPENSETR_VREFLPEN BIT(13)
  1257. #define RCC_MP_APB3LPENSETR_DTSLPEN BIT(16)
  1258. #define RCC_MP_APB3LPENSETR_PMBCTRLLPEN BIT(17)
  1259. /* RCC_MP_APB3LPENCLRR register fields */
  1260. #define RCC_MP_APB3LPENCLRR_LPTIM2LPEN BIT(0)
  1261. #define RCC_MP_APB3LPENCLRR_LPTIM3LPEN BIT(1)
  1262. #define RCC_MP_APB3LPENCLRR_LPTIM4LPEN BIT(2)
  1263. #define RCC_MP_APB3LPENCLRR_LPTIM5LPEN BIT(3)
  1264. #define RCC_MP_APB3LPENCLRR_VREFLPEN BIT(13)
  1265. #define RCC_MP_APB3LPENCLRR_DTSLPEN BIT(16)
  1266. #define RCC_MP_APB3LPENCLRR_PMBCTRLLPEN BIT(17)
  1267. /* RCC_MP_S_APB3LPENSETR register fields */
  1268. #define RCC_MP_S_APB3LPENSETR_SYSCFGLPEN BIT(0)
  1269. /* RCC_MP_S_APB3LPENCLRR register fields */
  1270. #define RCC_MP_S_APB3LPENCLRR_SYSCFGLPEN BIT(0)
  1271. /* RCC_MP_NS_APB3LPENSETR register fields */
  1272. #define RCC_MP_NS_APB3LPENSETR_SYSCFGLPEN BIT(0)
  1273. /* RCC_MP_NS_APB3LPENCLRR register fields */
  1274. #define RCC_MP_NS_APB3LPENCLRR_SYSCFGLPEN BIT(0)
  1275. /* RCC_MP_APB4LPENSETR register fields */
  1276. #define RCC_MP_APB4LPENSETR_DCMIPPLPEN BIT(1)
  1277. #define RCC_MP_APB4LPENSETR_DDRPERFMLPEN BIT(8)
  1278. #define RCC_MP_APB4LPENSETR_IWDG2APBLPEN BIT(15)
  1279. #define RCC_MP_APB4LPENSETR_USBPHYLPEN BIT(16)
  1280. #define RCC_MP_APB4LPENSETR_STGENROLPEN BIT(20)
  1281. #define RCC_MP_APB4LPENSETR_STGENROSTPEN BIT(21)
  1282. /* RCC_MP_APB4LPENCLRR register fields */
  1283. #define RCC_MP_APB4LPENCLRR_DCMIPPLPEN BIT(1)
  1284. #define RCC_MP_APB4LPENCLRR_DDRPERFMLPEN BIT(8)
  1285. #define RCC_MP_APB4LPENCLRR_IWDG2APBLPEN BIT(15)
  1286. #define RCC_MP_APB4LPENCLRR_USBPHYLPEN BIT(16)
  1287. #define RCC_MP_APB4LPENCLRR_STGENROLPEN BIT(20)
  1288. #define RCC_MP_APB4LPENCLRR_STGENROSTPEN BIT(21)
  1289. /* RCC_MP_S_APB4LPENSETR register fields */
  1290. #define RCC_MP_S_APB4LPENSETR_LTDCLPEN BIT(0)
  1291. /* RCC_MP_S_APB4LPENCLRR register fields */
  1292. #define RCC_MP_S_APB4LPENCLRR_LTDCLPEN BIT(0)
  1293. /* RCC_MP_NS_APB4LPENSETR register fields */
  1294. #define RCC_MP_NS_APB4LPENSETR_LTDCLPEN BIT(0)
  1295. /* RCC_MP_NS_APB4LPENCLRR register fields */
  1296. #define RCC_MP_NS_APB4LPENCLRR_LTDCLPEN BIT(0)
  1297. /* RCC_MP_APB5LPENSETR register fields */
  1298. #define RCC_MP_APB5LPENSETR_RTCAPBLPEN BIT(8)
  1299. #define RCC_MP_APB5LPENSETR_TZCLPEN BIT(11)
  1300. #define RCC_MP_APB5LPENSETR_ETZPCLPEN BIT(13)
  1301. #define RCC_MP_APB5LPENSETR_IWDG1APBLPEN BIT(15)
  1302. #define RCC_MP_APB5LPENSETR_BSECLPEN BIT(16)
  1303. #define RCC_MP_APB5LPENSETR_STGENCLPEN BIT(20)
  1304. #define RCC_MP_APB5LPENSETR_STGENCSTPEN BIT(21)
  1305. /* RCC_MP_APB5LPENCLRR register fields */
  1306. #define RCC_MP_APB5LPENCLRR_RTCAPBLPEN BIT(8)
  1307. #define RCC_MP_APB5LPENCLRR_TZCLPEN BIT(11)
  1308. #define RCC_MP_APB5LPENCLRR_ETZPCLPEN BIT(13)
  1309. #define RCC_MP_APB5LPENCLRR_IWDG1APBLPEN BIT(15)
  1310. #define RCC_MP_APB5LPENCLRR_BSECLPEN BIT(16)
  1311. #define RCC_MP_APB5LPENCLRR_STGENCLPEN BIT(20)
  1312. #define RCC_MP_APB5LPENCLRR_STGENCSTPEN BIT(21)
  1313. /* RCC_MP_APB6LPENSETR register fields */
  1314. #define RCC_MP_APB6LPENSETR_USART1LPEN BIT(0)
  1315. #define RCC_MP_APB6LPENSETR_USART2LPEN BIT(1)
  1316. #define RCC_MP_APB6LPENSETR_SPI4LPEN BIT(2)
  1317. #define RCC_MP_APB6LPENSETR_SPI5LPEN BIT(3)
  1318. #define RCC_MP_APB6LPENSETR_I2C3LPEN BIT(4)
  1319. #define RCC_MP_APB6LPENSETR_I2C4LPEN BIT(5)
  1320. #define RCC_MP_APB6LPENSETR_I2C5LPEN BIT(6)
  1321. #define RCC_MP_APB6LPENSETR_TIM12LPEN BIT(7)
  1322. #define RCC_MP_APB6LPENSETR_TIM13LPEN BIT(8)
  1323. #define RCC_MP_APB6LPENSETR_TIM14LPEN BIT(9)
  1324. #define RCC_MP_APB6LPENSETR_TIM15LPEN BIT(10)
  1325. #define RCC_MP_APB6LPENSETR_TIM16LPEN BIT(11)
  1326. #define RCC_MP_APB6LPENSETR_TIM17LPEN BIT(12)
  1327. /* RCC_MP_APB6LPENCLRR register fields */
  1328. #define RCC_MP_APB6LPENCLRR_USART1LPEN BIT(0)
  1329. #define RCC_MP_APB6LPENCLRR_USART2LPEN BIT(1)
  1330. #define RCC_MP_APB6LPENCLRR_SPI4LPEN BIT(2)
  1331. #define RCC_MP_APB6LPENCLRR_SPI5LPEN BIT(3)
  1332. #define RCC_MP_APB6LPENCLRR_I2C3LPEN BIT(4)
  1333. #define RCC_MP_APB6LPENCLRR_I2C4LPEN BIT(5)
  1334. #define RCC_MP_APB6LPENCLRR_I2C5LPEN BIT(6)
  1335. #define RCC_MP_APB6LPENCLRR_TIM12LPEN BIT(7)
  1336. #define RCC_MP_APB6LPENCLRR_TIM13LPEN BIT(8)
  1337. #define RCC_MP_APB6LPENCLRR_TIM14LPEN BIT(9)
  1338. #define RCC_MP_APB6LPENCLRR_TIM15LPEN BIT(10)
  1339. #define RCC_MP_APB6LPENCLRR_TIM16LPEN BIT(11)
  1340. #define RCC_MP_APB6LPENCLRR_TIM17LPEN BIT(12)
  1341. /* RCC_MP_AHB2LPENSETR register fields */
  1342. #define RCC_MP_AHB2LPENSETR_DMA1LPEN BIT(0)
  1343. #define RCC_MP_AHB2LPENSETR_DMA2LPEN BIT(1)
  1344. #define RCC_MP_AHB2LPENSETR_DMAMUX1LPEN BIT(2)
  1345. #define RCC_MP_AHB2LPENSETR_DMA3LPEN BIT(3)
  1346. #define RCC_MP_AHB2LPENSETR_DMAMUX2LPEN BIT(4)
  1347. #define RCC_MP_AHB2LPENSETR_ADC1LPEN BIT(5)
  1348. #define RCC_MP_AHB2LPENSETR_ADC2LPEN BIT(6)
  1349. #define RCC_MP_AHB2LPENSETR_USBOLPEN BIT(8)
  1350. /* RCC_MP_AHB2LPENCLRR register fields */
  1351. #define RCC_MP_AHB2LPENCLRR_DMA1LPEN BIT(0)
  1352. #define RCC_MP_AHB2LPENCLRR_DMA2LPEN BIT(1)
  1353. #define RCC_MP_AHB2LPENCLRR_DMAMUX1LPEN BIT(2)
  1354. #define RCC_MP_AHB2LPENCLRR_DMA3LPEN BIT(3)
  1355. #define RCC_MP_AHB2LPENCLRR_DMAMUX2LPEN BIT(4)
  1356. #define RCC_MP_AHB2LPENCLRR_ADC1LPEN BIT(5)
  1357. #define RCC_MP_AHB2LPENCLRR_ADC2LPEN BIT(6)
  1358. #define RCC_MP_AHB2LPENCLRR_USBOLPEN BIT(8)
  1359. /* RCC_MP_AHB4LPENSETR register fields */
  1360. #define RCC_MP_AHB4LPENSETR_TSCLPEN BIT(15)
  1361. /* RCC_MP_AHB4LPENCLRR register fields */
  1362. #define RCC_MP_AHB4LPENCLRR_TSCLPEN BIT(15)
  1363. /* RCC_MP_S_AHB4LPENSETR register fields */
  1364. #define RCC_MP_S_AHB4LPENSETR_GPIOALPEN BIT(0)
  1365. #define RCC_MP_S_AHB4LPENSETR_GPIOBLPEN BIT(1)
  1366. #define RCC_MP_S_AHB4LPENSETR_GPIOCLPEN BIT(2)
  1367. #define RCC_MP_S_AHB4LPENSETR_GPIODLPEN BIT(3)
  1368. #define RCC_MP_S_AHB4LPENSETR_GPIOELPEN BIT(4)
  1369. #define RCC_MP_S_AHB4LPENSETR_GPIOFLPEN BIT(5)
  1370. #define RCC_MP_S_AHB4LPENSETR_GPIOGLPEN BIT(6)
  1371. #define RCC_MP_S_AHB4LPENSETR_GPIOHLPEN BIT(7)
  1372. #define RCC_MP_S_AHB4LPENSETR_GPIOILPEN BIT(8)
  1373. /* RCC_MP_S_AHB4LPENCLRR register fields */
  1374. #define RCC_MP_S_AHB4LPENCLRR_GPIOALPEN BIT(0)
  1375. #define RCC_MP_S_AHB4LPENCLRR_GPIOBLPEN BIT(1)
  1376. #define RCC_MP_S_AHB4LPENCLRR_GPIOCLPEN BIT(2)
  1377. #define RCC_MP_S_AHB4LPENCLRR_GPIODLPEN BIT(3)
  1378. #define RCC_MP_S_AHB4LPENCLRR_GPIOELPEN BIT(4)
  1379. #define RCC_MP_S_AHB4LPENCLRR_GPIOFLPEN BIT(5)
  1380. #define RCC_MP_S_AHB4LPENCLRR_GPIOGLPEN BIT(6)
  1381. #define RCC_MP_S_AHB4LPENCLRR_GPIOHLPEN BIT(7)
  1382. #define RCC_MP_S_AHB4LPENCLRR_GPIOILPEN BIT(8)
  1383. /* RCC_MP_NS_AHB4LPENSETR register fields */
  1384. #define RCC_MP_NS_AHB4LPENSETR_GPIOALPEN BIT(0)
  1385. #define RCC_MP_NS_AHB4LPENSETR_GPIOBLPEN BIT(1)
  1386. #define RCC_MP_NS_AHB4LPENSETR_GPIOCLPEN BIT(2)
  1387. #define RCC_MP_NS_AHB4LPENSETR_GPIODLPEN BIT(3)
  1388. #define RCC_MP_NS_AHB4LPENSETR_GPIOELPEN BIT(4)
  1389. #define RCC_MP_NS_AHB4LPENSETR_GPIOFLPEN BIT(5)
  1390. #define RCC_MP_NS_AHB4LPENSETR_GPIOGLPEN BIT(6)
  1391. #define RCC_MP_NS_AHB4LPENSETR_GPIOHLPEN BIT(7)
  1392. #define RCC_MP_NS_AHB4LPENSETR_GPIOILPEN BIT(8)
  1393. /* RCC_MP_NS_AHB4LPENCLRR register fields */
  1394. #define RCC_MP_NS_AHB4LPENCLRR_GPIOALPEN BIT(0)
  1395. #define RCC_MP_NS_AHB4LPENCLRR_GPIOBLPEN BIT(1)
  1396. #define RCC_MP_NS_AHB4LPENCLRR_GPIOCLPEN BIT(2)
  1397. #define RCC_MP_NS_AHB4LPENCLRR_GPIODLPEN BIT(3)
  1398. #define RCC_MP_NS_AHB4LPENCLRR_GPIOELPEN BIT(4)
  1399. #define RCC_MP_NS_AHB4LPENCLRR_GPIOFLPEN BIT(5)
  1400. #define RCC_MP_NS_AHB4LPENCLRR_GPIOGLPEN BIT(6)
  1401. #define RCC_MP_NS_AHB4LPENCLRR_GPIOHLPEN BIT(7)
  1402. #define RCC_MP_NS_AHB4LPENCLRR_GPIOILPEN BIT(8)
  1403. /* RCC_MP_AHB5LPENSETR register fields */
  1404. #define RCC_MP_AHB5LPENSETR_PKALPEN BIT(2)
  1405. #define RCC_MP_AHB5LPENSETR_SAESLPEN BIT(3)
  1406. #define RCC_MP_AHB5LPENSETR_CRYP1LPEN BIT(4)
  1407. #define RCC_MP_AHB5LPENSETR_HASH1LPEN BIT(5)
  1408. #define RCC_MP_AHB5LPENSETR_RNG1LPEN BIT(6)
  1409. #define RCC_MP_AHB5LPENSETR_BKPSRAMLPEN BIT(8)
  1410. /* RCC_MP_AHB5LPENCLRR register fields */
  1411. #define RCC_MP_AHB5LPENCLRR_PKALPEN BIT(2)
  1412. #define RCC_MP_AHB5LPENCLRR_SAESLPEN BIT(3)
  1413. #define RCC_MP_AHB5LPENCLRR_CRYP1LPEN BIT(4)
  1414. #define RCC_MP_AHB5LPENCLRR_HASH1LPEN BIT(5)
  1415. #define RCC_MP_AHB5LPENCLRR_RNG1LPEN BIT(6)
  1416. #define RCC_MP_AHB5LPENCLRR_BKPSRAMLPEN BIT(8)
  1417. /* RCC_MP_AHB6LPENSETR register fields */
  1418. #define RCC_MP_AHB6LPENSETR_MCELPEN BIT(1)
  1419. #define RCC_MP_AHB6LPENSETR_ETH1CKLPEN BIT(7)
  1420. #define RCC_MP_AHB6LPENSETR_ETH1TXLPEN BIT(8)
  1421. #define RCC_MP_AHB6LPENSETR_ETH1RXLPEN BIT(9)
  1422. #define RCC_MP_AHB6LPENSETR_ETH1MACLPEN BIT(10)
  1423. #define RCC_MP_AHB6LPENSETR_ETH1STPEN BIT(11)
  1424. #define RCC_MP_AHB6LPENSETR_FMCLPEN BIT(12)
  1425. #define RCC_MP_AHB6LPENSETR_QSPILPEN BIT(14)
  1426. #define RCC_MP_AHB6LPENSETR_SDMMC1LPEN BIT(16)
  1427. #define RCC_MP_AHB6LPENSETR_SDMMC2LPEN BIT(17)
  1428. #define RCC_MP_AHB6LPENSETR_CRC1LPEN BIT(20)
  1429. #define RCC_MP_AHB6LPENSETR_USBHLPEN BIT(24)
  1430. #define RCC_MP_AHB6LPENSETR_ETH2CKLPEN BIT(27)
  1431. #define RCC_MP_AHB6LPENSETR_ETH2TXLPEN BIT(28)
  1432. #define RCC_MP_AHB6LPENSETR_ETH2RXLPEN BIT(29)
  1433. #define RCC_MP_AHB6LPENSETR_ETH2MACLPEN BIT(30)
  1434. #define RCC_MP_AHB6LPENSETR_ETH2STPEN BIT(31)
  1435. /* RCC_MP_AHB6LPENCLRR register fields */
  1436. #define RCC_MP_AHB6LPENCLRR_MCELPEN BIT(1)
  1437. #define RCC_MP_AHB6LPENCLRR_ETH1CKLPEN BIT(7)
  1438. #define RCC_MP_AHB6LPENCLRR_ETH1TXLPEN BIT(8)
  1439. #define RCC_MP_AHB6LPENCLRR_ETH1RXLPEN BIT(9)
  1440. #define RCC_MP_AHB6LPENCLRR_ETH1MACLPEN BIT(10)
  1441. #define RCC_MP_AHB6LPENCLRR_ETH1STPEN BIT(11)
  1442. #define RCC_MP_AHB6LPENCLRR_FMCLPEN BIT(12)
  1443. #define RCC_MP_AHB6LPENCLRR_QSPILPEN BIT(14)
  1444. #define RCC_MP_AHB6LPENCLRR_SDMMC1LPEN BIT(16)
  1445. #define RCC_MP_AHB6LPENCLRR_SDMMC2LPEN BIT(17)
  1446. #define RCC_MP_AHB6LPENCLRR_CRC1LPEN BIT(20)
  1447. #define RCC_MP_AHB6LPENCLRR_USBHLPEN BIT(24)
  1448. #define RCC_MP_AHB6LPENCLRR_ETH2CKLPEN BIT(27)
  1449. #define RCC_MP_AHB6LPENCLRR_ETH2TXLPEN BIT(28)
  1450. #define RCC_MP_AHB6LPENCLRR_ETH2RXLPEN BIT(29)
  1451. #define RCC_MP_AHB6LPENCLRR_ETH2MACLPEN BIT(30)
  1452. #define RCC_MP_AHB6LPENCLRR_ETH2STPEN BIT(31)
  1453. /* RCC_MP_S_AHB6LPENSETR register fields */
  1454. #define RCC_MP_S_AHB6LPENSETR_MDMALPEN BIT(0)
  1455. /* RCC_MP_S_AHB6LPENCLRR register fields */
  1456. #define RCC_MP_S_AHB6LPENCLRR_MDMALPEN BIT(0)
  1457. /* RCC_MP_NS_AHB6LPENSETR register fields */
  1458. #define RCC_MP_NS_AHB6LPENSETR_MDMALPEN BIT(0)
  1459. /* RCC_MP_NS_AHB6LPENCLRR register fields */
  1460. #define RCC_MP_NS_AHB6LPENCLRR_MDMALPEN BIT(0)
  1461. /* RCC_MP_S_AXIMLPENSETR register fields */
  1462. #define RCC_MP_S_AXIMLPENSETR_SYSRAMLPEN BIT(0)
  1463. /* RCC_MP_S_AXIMLPENCLRR register fields */
  1464. #define RCC_MP_S_AXIMLPENCLRR_SYSRAMLPEN BIT(0)
  1465. /* RCC_MP_NS_AXIMLPENSETR register fields */
  1466. #define RCC_MP_NS_AXIMLPENSETR_SYSRAMLPEN BIT(0)
  1467. /* RCC_MP_NS_AXIMLPENCLRR register fields */
  1468. #define RCC_MP_NS_AXIMLPENCLRR_SYSRAMLPEN BIT(0)
  1469. /* RCC_MP_MLAHBLPENSETR register fields */
  1470. #define RCC_MP_MLAHBLPENSETR_SRAM1LPEN BIT(0)
  1471. #define RCC_MP_MLAHBLPENSETR_SRAM2LPEN BIT(1)
  1472. #define RCC_MP_MLAHBLPENSETR_SRAM3LPEN BIT(2)
  1473. /* RCC_MP_MLAHBLPENCLRR register fields */
  1474. #define RCC_MP_MLAHBLPENCLRR_SRAM1LPEN BIT(0)
  1475. #define RCC_MP_MLAHBLPENCLRR_SRAM2LPEN BIT(1)
  1476. #define RCC_MP_MLAHBLPENCLRR_SRAM3LPEN BIT(2)
  1477. /* RCC_APB3SECSR register fields */
  1478. #define RCC_APB3SECSR_LPTIM2SECF BIT(0)
  1479. #define RCC_APB3SECSR_LPTIM3SECF BIT(1)
  1480. #define RCC_APB3SECSR_VREFSECF BIT(13)
  1481. /* RCC_APB4SECSR register fields */
  1482. #define RCC_APB4SECSR_DCMIPPSECF BIT(1)
  1483. #define RCC_APB4SECSR_USBPHYSECF BIT(16)
  1484. /* RCC_APB5SECSR register fields */
  1485. #define RCC_APB5SECSR_RTCSECF BIT(8)
  1486. #define RCC_APB5SECSR_TZCSECF BIT(11)
  1487. #define RCC_APB5SECSR_ETZPCSECF BIT(13)
  1488. #define RCC_APB5SECSR_IWDG1SECF BIT(15)
  1489. #define RCC_APB5SECSR_BSECSECF BIT(16)
  1490. #define RCC_APB5SECSR_STGENCSECF_MASK GENMASK(21, 20)
  1491. #define RCC_APB5SECSR_STGENCSECF_SHIFT 20
  1492. /* RCC_APB6SECSR register fields */
  1493. #define RCC_APB6SECSR_USART1SECF BIT(0)
  1494. #define RCC_APB6SECSR_USART2SECF BIT(1)
  1495. #define RCC_APB6SECSR_SPI4SECF BIT(2)
  1496. #define RCC_APB6SECSR_SPI5SECF BIT(3)
  1497. #define RCC_APB6SECSR_I2C3SECF BIT(4)
  1498. #define RCC_APB6SECSR_I2C4SECF BIT(5)
  1499. #define RCC_APB6SECSR_I2C5SECF BIT(6)
  1500. #define RCC_APB6SECSR_TIM12SECF BIT(7)
  1501. #define RCC_APB6SECSR_TIM13SECF BIT(8)
  1502. #define RCC_APB6SECSR_TIM14SECF BIT(9)
  1503. #define RCC_APB6SECSR_TIM15SECF BIT(10)
  1504. #define RCC_APB6SECSR_TIM16SECF BIT(11)
  1505. #define RCC_APB6SECSR_TIM17SECF BIT(12)
  1506. /* RCC_AHB2SECSR register fields */
  1507. #define RCC_AHB2SECSR_DMA3SECF BIT(3)
  1508. #define RCC_AHB2SECSR_DMAMUX2SECF BIT(4)
  1509. #define RCC_AHB2SECSR_ADC1SECF BIT(5)
  1510. #define RCC_AHB2SECSR_ADC2SECF BIT(6)
  1511. #define RCC_AHB2SECSR_USBOSECF BIT(8)
  1512. /* RCC_AHB4SECSR register fields */
  1513. #define RCC_AHB4SECSR_TSCSECF BIT(15)
  1514. /* RCC_AHB5SECSR register fields */
  1515. #define RCC_AHB5SECSR_PKASECF BIT(2)
  1516. #define RCC_AHB5SECSR_SAESSECF BIT(3)
  1517. #define RCC_AHB5SECSR_CRYP1SECF BIT(4)
  1518. #define RCC_AHB5SECSR_HASH1SECF BIT(5)
  1519. #define RCC_AHB5SECSR_RNG1SECF BIT(6)
  1520. #define RCC_AHB5SECSR_BKPSRAMSECF BIT(8)
  1521. /* RCC_AHB6SECSR register fields */
  1522. #define RCC_AHB6SECSR_MCESECF BIT(1)
  1523. #define RCC_AHB6SECSR_ETH1SECF_MASK GENMASK(11, 7)
  1524. #define RCC_AHB6SECSR_ETH1SECF_SHIFT 7
  1525. #define RCC_AHB6SECSR_FMCSECF BIT(12)
  1526. #define RCC_AHB6SECSR_QSPISECF BIT(14)
  1527. #define RCC_AHB6SECSR_SDMMC1SECF BIT(16)
  1528. #define RCC_AHB6SECSR_SDMMC2SECF BIT(17)
  1529. #define RCC_AHB6SECSR_ETH2SECF_MASK GENMASK(31, 27)
  1530. #define RCC_AHB6SECSR_ETH2SECF_SHIFT 27
  1531. /* RCC_VERR register fields */
  1532. #define RCC_VERR_MINREV_MASK GENMASK(3, 0)
  1533. #define RCC_VERR_MINREV_SHIFT 0
  1534. #define RCC_VERR_MAJREV_MASK GENMASK(7, 4)
  1535. #define RCC_VERR_MAJREV_SHIFT 4
  1536. /* RCC_IDR register fields */
  1537. #define RCC_IDR_ID_MASK GENMASK(31, 0)
  1538. #define RCC_IDR_ID_SHIFT 0
  1539. /* RCC_SIDR register fields */
  1540. #define RCC_SIDR_SID_MASK GENMASK(31, 0)
  1541. #define RCC_SIDR_SID_SHIFT 0
  1542. /* Used for all RCC_PLL<n>CR registers */
  1543. #define RCC_PLLNCR_PLLON BIT(0)
  1544. #define RCC_PLLNCR_PLLRDY BIT(1)
  1545. #define RCC_PLLNCR_SSCG_CTRL BIT(2)
  1546. #define RCC_PLLNCR_DIVPEN BIT(4)
  1547. #define RCC_PLLNCR_DIVQEN BIT(5)
  1548. #define RCC_PLLNCR_DIVREN BIT(6)
  1549. #define RCC_PLLNCR_DIVEN_SHIFT 4
  1550. /* Used for all RCC_PLL<n>CFGR1 registers */
  1551. #define RCC_PLLNCFGR1_DIVM_SHIFT 16
  1552. #define RCC_PLLNCFGR1_DIVM_MASK GENMASK(21, 16)
  1553. #define RCC_PLLNCFGR1_DIVN_SHIFT 0
  1554. #define RCC_PLLNCFGR1_DIVN_MASK GENMASK(8, 0)
  1555. /* Only for PLL3 and PLL4 */
  1556. #define RCC_PLLNCFGR1_IFRGE_SHIFT 24
  1557. #define RCC_PLLNCFGR1_IFRGE_MASK GENMASK(25, 24)
  1558. /* Used for all RCC_PLL<n>CFGR2 registers */
  1559. #define RCC_PLLNCFGR2_DIVX_MASK GENMASK(6, 0)
  1560. #define RCC_PLLNCFGR2_DIVP_SHIFT 0
  1561. #define RCC_PLLNCFGR2_DIVP_MASK GENMASK(6, 0)
  1562. #define RCC_PLLNCFGR2_DIVQ_SHIFT 8
  1563. #define RCC_PLLNCFGR2_DIVQ_MASK GENMASK(14, 8)
  1564. #define RCC_PLLNCFGR2_DIVR_SHIFT 16
  1565. #define RCC_PLLNCFGR2_DIVR_MASK GENMASK(22, 16)
  1566. /* Used for all RCC_PLL<n>FRACR registers */
  1567. #define RCC_PLLNFRACR_FRACV_SHIFT 3
  1568. #define RCC_PLLNFRACR_FRACV_MASK GENMASK(15, 3)
  1569. #define RCC_PLLNFRACR_FRACLE BIT(16)
  1570. /* Used for all RCC_PLL<n>CSGR registers */
  1571. #define RCC_PLLNCSGR_INC_STEP_SHIFT 16
  1572. #define RCC_PLLNCSGR_INC_STEP_MASK GENMASK(30, 16)
  1573. #define RCC_PLLNCSGR_MOD_PER_SHIFT 0
  1574. #define RCC_PLLNCSGR_MOD_PER_MASK GENMASK(12, 0)
  1575. #define RCC_PLLNCSGR_SSCG_MODE_SHIFT 15
  1576. #define RCC_PLLNCSGR_SSCG_MODE_MASK BIT(15)
  1577. /* Used for most of RCC_<x>SELR registers */
  1578. #define RCC_SELR_SRC_MASK GENMASK(2, 0)
  1579. #define RCC_SELR_REFCLK_SRC_MASK GENMASK(1, 0)
  1580. #define RCC_SELR_SRCRDY BIT(31)
  1581. /* Values of RCC_MPCKSELR register */
  1582. #define RCC_MPCKSELR_HSI 0x00000000
  1583. #define RCC_MPCKSELR_HSE 0x00000001
  1584. #define RCC_MPCKSELR_PLL 0x00000002
  1585. #define RCC_MPCKSELR_PLL_MPUDIV 0x00000003
  1586. /* Values of RCC_ASSCKSELR register */
  1587. #define RCC_ASSCKSELR_HSI 0x00000000
  1588. #define RCC_ASSCKSELR_HSE 0x00000001
  1589. #define RCC_ASSCKSELR_PLL 0x00000002
  1590. /* Values of RCC_MSSCKSELR register */
  1591. #define RCC_MSSCKSELR_HSI 0x00000000
  1592. #define RCC_MSSCKSELR_HSE 0x00000001
  1593. #define RCC_MSSCKSELR_CSI 0x00000002
  1594. #define RCC_MSSCKSELR_PLL 0x00000003
  1595. /* Values of RCC_CPERCKSELR register */
  1596. #define RCC_CPERCKSELR_HSI 0x00000000
  1597. #define RCC_CPERCKSELR_CSI 0x00000001
  1598. #define RCC_CPERCKSELR_HSE 0x00000002
  1599. /* Used for most of DIVR register: max div for RTC */
  1600. #define RCC_DIVR_DIV_MASK GENMASK(5, 0)
  1601. #define RCC_DIVR_DIVRDY BIT(31)
  1602. /* Masks for specific DIVR registers */
  1603. #define RCC_APBXDIV_MASK GENMASK(2, 0)
  1604. #define RCC_MPUDIV_MASK GENMASK(2, 0)
  1605. #define RCC_AXIDIV_MASK GENMASK(2, 0)
  1606. #define RCC_MLAHBDIV_MASK GENMASK(3, 0)
  1607. /* Used for TIMER Prescaler */
  1608. #define RCC_TIMGXPRER_TIMGXPRE BIT(0)
  1609. /* Offset between RCC_MP_xxxENSETR and RCC_MP_xxxENCLRR registers */
  1610. #define RCC_MP_ENCLRR_OFFSET U(4)
  1611. /* Offset between RCC_xxxRSTSETR and RCC_xxxRSTCLRR registers */
  1612. #define RCC_RSTCLRR_OFFSET U(4)
  1613. /* RCC_OCENSETR register fields */
  1614. #define RCC_OCENR_HSION BIT(0)
  1615. #define RCC_OCENR_HSIKERON BIT(1)
  1616. #define RCC_OCENR_CSION BIT(4)
  1617. #define RCC_OCENR_CSIKERON BIT(5)
  1618. #define RCC_OCENR_DIGBYP BIT(7)
  1619. #define RCC_OCENR_HSEON BIT(8)
  1620. #define RCC_OCENR_HSEKERON BIT(9)
  1621. #define RCC_OCENR_HSEBYP BIT(10)
  1622. #define RCC_OCENR_HSECSSON BIT(11)
  1623. #define RCC_OCENR_DIGBYP_BIT 7
  1624. #define RCC_OCENR_HSEBYP_BIT 10
  1625. #define RCC_OCENR_HSECSSON_BIT 11
  1626. /* Used for RCC_MCO related operations */
  1627. #define RCC_MCOCFG_MCOON BIT(12)
  1628. #define RCC_MCOCFG_MCODIV_MASK GENMASK(7, 4)
  1629. #define RCC_MCOCFG_MCODIV_SHIFT 4
  1630. #define RCC_MCOCFG_MCOSRC_MASK GENMASK(2, 0)
  1631. #define RCC_UART4CKSELR_HSI 0x00000002
  1632. #define RCC_CPERCKSELR_PERSRC_MASK GENMASK(1, 0)
  1633. #define RCC_CPERCKSELR_PERSRC_SHIFT 0
  1634. #define RCC_USBCKSELR_USBOSRC_MASK BIT(4)
  1635. #define RCC_USBCKSELR_USBOSRC_SHIFT 4
  1636. #define RCC_DDRITFCR_DDRCKMOD_SSR 0
  1637. #define RCC_DDRITFCR_DDRCKMOD_ASR1 BIT(20)
  1638. #define RCC_DDRITFCR_DDRCKMOD_HSR1 BIT(21)
  1639. #define RCC_DDRITFCR_DDRC2EN BIT(0)
  1640. #define RCC_DDRITFCR_DDRC2LPEN BIT(1)
  1641. #define RCC_MP_CIFR_MASK U(0x110F1F)
  1642. #define RCC_OFFSET_MASK GENMASK(11, 0)
  1643. #endif /* STM32MP1_RCC_H */