stm32mp15_rcc.h 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328
  1. /*
  2. * Copyright (c) 2015-2022, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP1_RCC_H
  7. #define STM32MP1_RCC_H
  8. #include <lib/utils_def.h>
  9. #define RCC_TZCR U(0x00)
  10. #define RCC_OCENSETR U(0x0C)
  11. #define RCC_OCENCLRR U(0x10)
  12. #define RCC_HSICFGR U(0x18)
  13. #define RCC_CSICFGR U(0x1C)
  14. #define RCC_MPCKSELR U(0x20)
  15. #define RCC_ASSCKSELR U(0x24)
  16. #define RCC_RCK12SELR U(0x28)
  17. #define RCC_MPCKDIVR U(0x2C)
  18. #define RCC_AXIDIVR U(0x30)
  19. #define RCC_APB4DIVR U(0x3C)
  20. #define RCC_APB5DIVR U(0x40)
  21. #define RCC_RTCDIVR U(0x44)
  22. #define RCC_MSSCKSELR U(0x48)
  23. #define RCC_PLL1CR U(0x80)
  24. #define RCC_PLL1CFGR1 U(0x84)
  25. #define RCC_PLL1CFGR2 U(0x88)
  26. #define RCC_PLL1FRACR U(0x8C)
  27. #define RCC_PLL1CSGR U(0x90)
  28. #define RCC_PLL2CR U(0x94)
  29. #define RCC_PLL2CFGR1 U(0x98)
  30. #define RCC_PLL2CFGR2 U(0x9C)
  31. #define RCC_PLL2FRACR U(0xA0)
  32. #define RCC_PLL2CSGR U(0xA4)
  33. #define RCC_I2C46CKSELR U(0xC0)
  34. #define RCC_SPI6CKSELR U(0xC4)
  35. #define RCC_UART1CKSELR U(0xC8)
  36. #define RCC_RNG1CKSELR U(0xCC)
  37. #define RCC_CPERCKSELR U(0xD0)
  38. #define RCC_STGENCKSELR U(0xD4)
  39. #define RCC_DDRITFCR U(0xD8)
  40. #define RCC_MP_BOOTCR U(0x100)
  41. #define RCC_MP_SREQSETR U(0x104)
  42. #define RCC_MP_SREQCLRR U(0x108)
  43. #define RCC_MP_GCR U(0x10C)
  44. #define RCC_MP_APRSTCR U(0x110)
  45. #define RCC_MP_APRSTSR U(0x114)
  46. #define RCC_BDCR U(0x140)
  47. #define RCC_RDLSICR U(0x144)
  48. #define RCC_APB4RSTSETR U(0x180)
  49. #define RCC_APB4RSTCLRR U(0x184)
  50. #define RCC_APB5RSTSETR U(0x188)
  51. #define RCC_APB5RSTCLRR U(0x18C)
  52. #define RCC_AHB5RSTSETR U(0x190)
  53. #define RCC_AHB5RSTCLRR U(0x194)
  54. #define RCC_AHB6RSTSETR U(0x198)
  55. #define RCC_AHB6RSTCLRR U(0x19C)
  56. #define RCC_TZAHB6RSTSETR U(0x1A0)
  57. #define RCC_TZAHB6RSTCLRR U(0x1A4)
  58. #define RCC_MP_APB4ENSETR U(0x200)
  59. #define RCC_MP_APB4ENCLRR U(0x204)
  60. #define RCC_MP_APB5ENSETR U(0x208)
  61. #define RCC_MP_APB5ENCLRR U(0x20C)
  62. #define RCC_MP_AHB5ENSETR U(0x210)
  63. #define RCC_MP_AHB5ENCLRR U(0x214)
  64. #define RCC_MP_AHB6ENSETR U(0x218)
  65. #define RCC_MP_AHB6ENCLRR U(0x21C)
  66. #define RCC_MP_TZAHB6ENSETR U(0x220)
  67. #define RCC_MP_TZAHB6ENCLRR U(0x224)
  68. #define RCC_MC_APB4ENSETR U(0x280)
  69. #define RCC_MC_APB4ENCLRR U(0x284)
  70. #define RCC_MC_APB5ENSETR U(0x288)
  71. #define RCC_MC_APB5ENCLRR U(0x28C)
  72. #define RCC_MC_AHB5ENSETR U(0x290)
  73. #define RCC_MC_AHB5ENCLRR U(0x294)
  74. #define RCC_MC_AHB6ENSETR U(0x298)
  75. #define RCC_MC_AHB6ENCLRR U(0x29C)
  76. #define RCC_MP_APB4LPENSETR U(0x300)
  77. #define RCC_MP_APB4LPENCLRR U(0x304)
  78. #define RCC_MP_APB5LPENSETR U(0x308)
  79. #define RCC_MP_APB5LPENCLRR U(0x30C)
  80. #define RCC_MP_AHB5LPENSETR U(0x310)
  81. #define RCC_MP_AHB5LPENCLRR U(0x314)
  82. #define RCC_MP_AHB6LPENSETR U(0x318)
  83. #define RCC_MP_AHB6LPENCLRR U(0x31C)
  84. #define RCC_MP_TZAHB6LPENSETR U(0x320)
  85. #define RCC_MP_TZAHB6LPENCLRR U(0x324)
  86. #define RCC_MC_APB4LPENSETR U(0x380)
  87. #define RCC_MC_APB4LPENCLRR U(0x384)
  88. #define RCC_MC_APB5LPENSETR U(0x388)
  89. #define RCC_MC_APB5LPENCLRR U(0x38C)
  90. #define RCC_MC_AHB5LPENSETR U(0x390)
  91. #define RCC_MC_AHB5LPENCLRR U(0x394)
  92. #define RCC_MC_AHB6LPENSETR U(0x398)
  93. #define RCC_MC_AHB6LPENCLRR U(0x39C)
  94. #define RCC_BR_RSTSCLRR U(0x400)
  95. #define RCC_MP_GRSTCSETR U(0x404)
  96. #define RCC_MP_RSTSCLRR U(0x408)
  97. #define RCC_MP_IWDGFZSETR U(0x40C)
  98. #define RCC_MP_IWDGFZCLRR U(0x410)
  99. #define RCC_MP_CIER U(0x414)
  100. #define RCC_MP_CIFR U(0x418)
  101. #define RCC_PWRLPDLYCR U(0x41C)
  102. #define RCC_MP_RSTSSETR U(0x420)
  103. #define RCC_MCO1CFGR U(0x800)
  104. #define RCC_MCO2CFGR U(0x804)
  105. #define RCC_OCRDYR U(0x808)
  106. #define RCC_DBGCFGR U(0x80C)
  107. #define RCC_RCK3SELR U(0x820)
  108. #define RCC_RCK4SELR U(0x824)
  109. #define RCC_TIMG1PRER U(0x828)
  110. #define RCC_TIMG2PRER U(0x82C)
  111. #define RCC_MCUDIVR U(0x830)
  112. #define RCC_APB1DIVR U(0x834)
  113. #define RCC_APB2DIVR U(0x838)
  114. #define RCC_APB3DIVR U(0x83C)
  115. #define RCC_PLL3CR U(0x880)
  116. #define RCC_PLL3CFGR1 U(0x884)
  117. #define RCC_PLL3CFGR2 U(0x888)
  118. #define RCC_PLL3FRACR U(0x88C)
  119. #define RCC_PLL3CSGR U(0x890)
  120. #define RCC_PLL4CR U(0x894)
  121. #define RCC_PLL4CFGR1 U(0x898)
  122. #define RCC_PLL4CFGR2 U(0x89C)
  123. #define RCC_PLL4FRACR U(0x8A0)
  124. #define RCC_PLL4CSGR U(0x8A4)
  125. #define RCC_I2C12CKSELR U(0x8C0)
  126. #define RCC_I2C35CKSELR U(0x8C4)
  127. #define RCC_SAI1CKSELR U(0x8C8)
  128. #define RCC_SAI2CKSELR U(0x8CC)
  129. #define RCC_SAI3CKSELR U(0x8D0)
  130. #define RCC_SAI4CKSELR U(0x8D4)
  131. #define RCC_SPI2S1CKSELR U(0x8D8)
  132. #define RCC_SPI2S23CKSELR U(0x8DC)
  133. #define RCC_SPI45CKSELR U(0x8E0)
  134. #define RCC_UART6CKSELR U(0x8E4)
  135. #define RCC_UART24CKSELR U(0x8E8)
  136. #define RCC_UART35CKSELR U(0x8EC)
  137. #define RCC_UART78CKSELR U(0x8F0)
  138. #define RCC_SDMMC12CKSELR U(0x8F4)
  139. #define RCC_SDMMC3CKSELR U(0x8F8)
  140. #define RCC_ETHCKSELR U(0x8FC)
  141. #define RCC_QSPICKSELR U(0x900)
  142. #define RCC_FMCCKSELR U(0x904)
  143. #define RCC_FDCANCKSELR U(0x90C)
  144. #define RCC_SPDIFCKSELR U(0x914)
  145. #define RCC_CECCKSELR U(0x918)
  146. #define RCC_USBCKSELR U(0x91C)
  147. #define RCC_RNG2CKSELR U(0x920)
  148. #define RCC_DSICKSELR U(0x924)
  149. #define RCC_ADCCKSELR U(0x928)
  150. #define RCC_LPTIM45CKSELR U(0x92C)
  151. #define RCC_LPTIM23CKSELR U(0x930)
  152. #define RCC_LPTIM1CKSELR U(0x934)
  153. #define RCC_APB1RSTSETR U(0x980)
  154. #define RCC_APB1RSTCLRR U(0x984)
  155. #define RCC_APB2RSTSETR U(0x988)
  156. #define RCC_APB2RSTCLRR U(0x98C)
  157. #define RCC_APB3RSTSETR U(0x990)
  158. #define RCC_APB3RSTCLRR U(0x994)
  159. #define RCC_AHB2RSTSETR U(0x998)
  160. #define RCC_AHB2RSTCLRR U(0x99C)
  161. #define RCC_AHB3RSTSETR U(0x9A0)
  162. #define RCC_AHB3RSTCLRR U(0x9A4)
  163. #define RCC_AHB4RSTSETR U(0x9A8)
  164. #define RCC_AHB4RSTCLRR U(0x9AC)
  165. #define RCC_MP_APB1ENSETR U(0xA00)
  166. #define RCC_MP_APB1ENCLRR U(0xA04)
  167. #define RCC_MP_APB2ENSETR U(0xA08)
  168. #define RCC_MP_APB2ENCLRR U(0xA0C)
  169. #define RCC_MP_APB3ENSETR U(0xA10)
  170. #define RCC_MP_APB3ENCLRR U(0xA14)
  171. #define RCC_MP_AHB2ENSETR U(0xA18)
  172. #define RCC_MP_AHB2ENCLRR U(0xA1C)
  173. #define RCC_MP_AHB3ENSETR U(0xA20)
  174. #define RCC_MP_AHB3ENCLRR U(0xA24)
  175. #define RCC_MP_AHB4ENSETR U(0xA28)
  176. #define RCC_MP_AHB4ENCLRR U(0xA2C)
  177. #define RCC_MP_MLAHBENSETR U(0xA38)
  178. #define RCC_MP_MLAHBENCLRR U(0xA3C)
  179. #define RCC_MC_APB1ENSETR U(0xA80)
  180. #define RCC_MC_APB1ENCLRR U(0xA84)
  181. #define RCC_MC_APB2ENSETR U(0xA88)
  182. #define RCC_MC_APB2ENCLRR U(0xA8C)
  183. #define RCC_MC_APB3ENSETR U(0xA90)
  184. #define RCC_MC_APB3ENCLRR U(0xA94)
  185. #define RCC_MC_AHB2ENSETR U(0xA98)
  186. #define RCC_MC_AHB2ENCLRR U(0xA9C)
  187. #define RCC_MC_AHB3ENSETR U(0xAA0)
  188. #define RCC_MC_AHB3ENCLRR U(0xAA4)
  189. #define RCC_MC_AHB4ENSETR U(0xAA8)
  190. #define RCC_MC_AHB4ENCLRR U(0xAAC)
  191. #define RCC_MC_AXIMENSETR U(0xAB0)
  192. #define RCC_MC_AXIMENCLRR U(0xAB4)
  193. #define RCC_MC_MLAHBENSETR U(0xAB8)
  194. #define RCC_MC_MLAHBENCLRR U(0xABC)
  195. #define RCC_MP_APB1LPENSETR U(0xB00)
  196. #define RCC_MP_APB1LPENCLRR U(0xB04)
  197. #define RCC_MP_APB2LPENSETR U(0xB08)
  198. #define RCC_MP_APB2LPENCLRR U(0xB0C)
  199. #define RCC_MP_APB3LPENSETR U(0xB10)
  200. #define RCC_MP_APB3LPENCLRR U(0xB14)
  201. #define RCC_MP_AHB2LPENSETR U(0xB18)
  202. #define RCC_MP_AHB2LPENCLRR U(0xB1C)
  203. #define RCC_MP_AHB3LPENSETR U(0xB20)
  204. #define RCC_MP_AHB3LPENCLRR U(0xB24)
  205. #define RCC_MP_AHB4LPENSETR U(0xB28)
  206. #define RCC_MP_AHB4LPENCLRR U(0xB2C)
  207. #define RCC_MP_AXIMLPENSETR U(0xB30)
  208. #define RCC_MP_AXIMLPENCLRR U(0xB34)
  209. #define RCC_MP_MLAHBLPENSETR U(0xB38)
  210. #define RCC_MP_MLAHBLPENCLRR U(0xB3C)
  211. #define RCC_MC_APB1LPENSETR U(0xB80)
  212. #define RCC_MC_APB1LPENCLRR U(0xB84)
  213. #define RCC_MC_APB2LPENSETR U(0xB88)
  214. #define RCC_MC_APB2LPENCLRR U(0xB8C)
  215. #define RCC_MC_APB3LPENSETR U(0xB90)
  216. #define RCC_MC_APB3LPENCLRR U(0xB94)
  217. #define RCC_MC_AHB2LPENSETR U(0xB98)
  218. #define RCC_MC_AHB2LPENCLRR U(0xB9C)
  219. #define RCC_MC_AHB3LPENSETR U(0xBA0)
  220. #define RCC_MC_AHB3LPENCLRR U(0xBA4)
  221. #define RCC_MC_AHB4LPENSETR U(0xBA8)
  222. #define RCC_MC_AHB4LPENCLRR U(0xBAC)
  223. #define RCC_MC_AXIMLPENSETR U(0xBB0)
  224. #define RCC_MC_AXIMLPENCLRR U(0xBB4)
  225. #define RCC_MC_MLAHBLPENSETR U(0xBB8)
  226. #define RCC_MC_MLAHBLPENCLRR U(0xBBC)
  227. #define RCC_MC_RSTSCLRR U(0xC00)
  228. #define RCC_MC_CIER U(0xC14)
  229. #define RCC_MC_CIFR U(0xC18)
  230. #define RCC_VERR U(0xFF4)
  231. #define RCC_IDR U(0xFF8)
  232. #define RCC_SIDR U(0xFFC)
  233. /* RCC_TZCR register fields */
  234. #define RCC_TZCR_TZEN BIT(0)
  235. #define RCC_TZCR_MCKPROT BIT(1)
  236. /* RCC_OCENSETR register fields */
  237. #define RCC_OCENSETR_HSION BIT(0)
  238. #define RCC_OCENSETR_HSIKERON BIT(1)
  239. #define RCC_OCENSETR_CSION BIT(4)
  240. #define RCC_OCENSETR_CSIKERON BIT(5)
  241. #define RCC_OCENSETR_DIGBYP BIT(7)
  242. #define RCC_OCENSETR_HSEON BIT(8)
  243. #define RCC_OCENSETR_HSEKERON BIT(9)
  244. #define RCC_OCENSETR_HSEBYP BIT(10)
  245. #define RCC_OCENSETR_HSECSSON BIT(11)
  246. /* RCC_OCENCLRR register fields */
  247. #define RCC_OCENCLRR_HSION BIT(0)
  248. #define RCC_OCENCLRR_HSIKERON BIT(1)
  249. #define RCC_OCENCLRR_CSION BIT(4)
  250. #define RCC_OCENCLRR_CSIKERON BIT(5)
  251. #define RCC_OCENCLRR_DIGBYP BIT(7)
  252. #define RCC_OCENCLRR_HSEON BIT(8)
  253. #define RCC_OCENCLRR_HSEKERON BIT(9)
  254. #define RCC_OCENCLRR_HSEBYP BIT(10)
  255. /* RCC_HSICFGR register fields */
  256. #define RCC_HSICFGR_HSIDIV_MASK GENMASK(1, 0)
  257. #define RCC_HSICFGR_HSIDIV_SHIFT 0
  258. #define RCC_HSICFGR_HSITRIM_MASK GENMASK(14, 8)
  259. #define RCC_HSICFGR_HSITRIM_SHIFT 8
  260. #define RCC_HSICFGR_HSICAL_MASK GENMASK(24, 16)
  261. #define RCC_HSICFGR_HSICAL_SHIFT 16
  262. #define RCC_HSICFGR_HSICAL_TEMP_MASK GENMASK(27, 25)
  263. /* RCC_CSICFGR register fields */
  264. #define RCC_CSICFGR_CSITRIM_MASK GENMASK(12, 8)
  265. #define RCC_CSICFGR_CSITRIM_SHIFT 8
  266. #define RCC_CSICFGR_CSICAL_MASK GENMASK(23, 16)
  267. #define RCC_CSICFGR_CSICAL_SHIFT 16
  268. /* RCC_MPCKSELR register fields */
  269. #define RCC_MPCKSELR_HSI 0x00000000
  270. #define RCC_MPCKSELR_HSE 0x00000001
  271. #define RCC_MPCKSELR_PLL 0x00000002
  272. #define RCC_MPCKSELR_PLL_MPUDIV 0x00000003
  273. #define RCC_MPCKSELR_MPUSRC_MASK GENMASK(1, 0)
  274. #define RCC_MPCKSELR_MPUSRC_SHIFT 0
  275. #define RCC_MPCKSELR_MPUSRCRDY BIT(31)
  276. /* RCC_ASSCKSELR register fields */
  277. #define RCC_ASSCKSELR_HSI 0x00000000
  278. #define RCC_ASSCKSELR_HSE 0x00000001
  279. #define RCC_ASSCKSELR_PLL 0x00000002
  280. #define RCC_ASSCKSELR_AXISSRC_MASK GENMASK(2, 0)
  281. #define RCC_ASSCKSELR_AXISSRC_SHIFT 0
  282. #define RCC_ASSCKSELR_AXISSRCRDY BIT(31)
  283. /* RCC_RCK12SELR register fields */
  284. #define RCC_RCK12SELR_PLL12SRC_MASK GENMASK(1, 0)
  285. #define RCC_RCK12SELR_PLL12SRC_SHIFT 0
  286. #define RCC_RCK12SELR_PLL12SRCRDY BIT(31)
  287. /* RCC_MPCKDIVR register fields */
  288. #define RCC_MPCKDIVR_MPUDIV_MASK GENMASK(2, 0)
  289. #define RCC_MPCKDIVR_MPUDIV_SHIFT 0
  290. #define RCC_MPCKDIVR_MPUDIVRDY BIT(31)
  291. /* RCC_AXIDIVR register fields */
  292. #define RCC_AXIDIVR_AXIDIV_MASK GENMASK(2, 0)
  293. #define RCC_AXIDIVR_AXIDIV_SHIFT 0
  294. #define RCC_AXIDIVR_AXIDIVRDY BIT(31)
  295. /* RCC_APB4DIVR register fields */
  296. #define RCC_APB4DIVR_APB4DIV_MASK GENMASK(2, 0)
  297. #define RCC_APB4DIVR_APB4DIV_SHIFT 0
  298. #define RCC_APB4DIVR_APB4DIVRDY BIT(31)
  299. /* RCC_APB5DIVR register fields */
  300. #define RCC_APB5DIVR_APB5DIV_MASK GENMASK(2, 0)
  301. #define RCC_APB5DIVR_APB5DIV_SHIFT 0
  302. #define RCC_APB5DIVR_APB5DIVRDY BIT(31)
  303. /* RCC_RTCDIVR register fields */
  304. #define RCC_RTCDIVR_RTCDIV_MASK GENMASK(5, 0)
  305. #define RCC_RTCDIVR_RTCDIV_SHIFT 0
  306. /* RCC_MSSCKSELR register fields */
  307. #define RCC_MSSCKSELR_HSI 0x00000000
  308. #define RCC_MSSCKSELR_HSE 0x00000001
  309. #define RCC_MSSCKSELR_CSI 0x00000002
  310. #define RCC_MSSCKSELR_PLL 0x00000003
  311. #define RCC_MSSCKSELR_MCUSSRC_MASK GENMASK(1, 0)
  312. #define RCC_MSSCKSELR_MCUSSRC_SHIFT 0
  313. #define RCC_MSSCKSELR_MCUSSRCRDY BIT(31)
  314. /* RCC_PLL1CR register fields */
  315. #define RCC_PLL1CR_PLLON BIT(0)
  316. #define RCC_PLL1CR_PLL1RDY BIT(1)
  317. #define RCC_PLL1CR_SSCG_CTRL BIT(2)
  318. #define RCC_PLL1CR_DIVPEN BIT(4)
  319. #define RCC_PLL1CR_DIVQEN BIT(5)
  320. #define RCC_PLL1CR_DIVREN BIT(6)
  321. /* RCC_PLL1CFGR1 register fields */
  322. #define RCC_PLL1CFGR1_DIVN_MASK GENMASK(8, 0)
  323. #define RCC_PLL1CFGR1_DIVN_SHIFT 0
  324. #define RCC_PLL1CFGR1_DIVM1_MASK GENMASK(21, 16)
  325. #define RCC_PLL1CFGR1_DIVM1_SHIFT 16
  326. /* RCC_PLL1CFGR2 register fields */
  327. #define RCC_PLL1CFGR2_DIVP_MASK GENMASK(6, 0)
  328. #define RCC_PLL1CFGR2_DIVP_SHIFT 0
  329. #define RCC_PLL1CFGR2_DIVQ_MASK GENMASK(14, 8)
  330. #define RCC_PLL1CFGR2_DIVQ_SHIFT 8
  331. #define RCC_PLL1CFGR2_DIVR_MASK GENMASK(22, 16)
  332. #define RCC_PLL1CFGR2_DIVR_SHIFT 16
  333. /* RCC_PLL1FRACR register fields */
  334. #define RCC_PLL1FRACR_FRACV_MASK GENMASK(15, 3)
  335. #define RCC_PLL1FRACR_FRACV_SHIFT 3
  336. #define RCC_PLL1FRACR_FRACLE BIT(16)
  337. /* RCC_PLL1CSGR register fields */
  338. #define RCC_PLL1CSGR_MOD_PER_MASK GENMASK(12, 0)
  339. #define RCC_PLL1CSGR_MOD_PER_SHIFT 0
  340. #define RCC_PLL1CSGR_TPDFN_DIS BIT(13)
  341. #define RCC_PLL1CSGR_RPDFN_DIS BIT(14)
  342. #define RCC_PLL1CSGR_SSCG_MODE BIT(15)
  343. #define RCC_PLL1CSGR_INC_STEP_MASK GENMASK(30, 16)
  344. #define RCC_PLL1CSGR_INC_STEP_SHIFT 16
  345. /* RCC_PLL2CR register fields */
  346. #define RCC_PLL2CR_PLLON BIT(0)
  347. #define RCC_PLL2CR_PLL2RDY BIT(1)
  348. #define RCC_PLL2CR_SSCG_CTRL BIT(2)
  349. #define RCC_PLL2CR_DIVPEN BIT(4)
  350. #define RCC_PLL2CR_DIVQEN BIT(5)
  351. #define RCC_PLL2CR_DIVREN BIT(6)
  352. /* RCC_PLL2CFGR1 register fields */
  353. #define RCC_PLL2CFGR1_DIVN_MASK GENMASK(8, 0)
  354. #define RCC_PLL2CFGR1_DIVN_SHIFT 0
  355. #define RCC_PLL2CFGR1_DIVM2_MASK GENMASK(21, 16)
  356. #define RCC_PLL2CFGR1_DIVM2_SHIFT 16
  357. /* RCC_PLL2CFGR2 register fields */
  358. #define RCC_PLL2CFGR2_DIVP_MASK GENMASK(6, 0)
  359. #define RCC_PLL2CFGR2_DIVP_SHIFT 0
  360. #define RCC_PLL2CFGR2_DIVQ_MASK GENMASK(14, 8)
  361. #define RCC_PLL2CFGR2_DIVQ_SHIFT 8
  362. #define RCC_PLL2CFGR2_DIVR_MASK GENMASK(22, 16)
  363. #define RCC_PLL2CFGR2_DIVR_SHIFT 16
  364. /* RCC_PLL2FRACR register fields */
  365. #define RCC_PLL2FRACR_FRACV_MASK GENMASK(15, 3)
  366. #define RCC_PLL2FRACR_FRACV_SHIFT 3
  367. #define RCC_PLL2FRACR_FRACLE BIT(16)
  368. /* RCC_PLL2CSGR register fields */
  369. #define RCC_PLL2CSGR_MOD_PER_MASK GENMASK(12, 0)
  370. #define RCC_PLL2CSGR_MOD_PER_SHIFT 0
  371. #define RCC_PLL2CSGR_TPDFN_DIS BIT(13)
  372. #define RCC_PLL2CSGR_RPDFN_DIS BIT(14)
  373. #define RCC_PLL2CSGR_SSCG_MODE BIT(15)
  374. #define RCC_PLL2CSGR_INC_STEP_MASK GENMASK(30, 16)
  375. #define RCC_PLL2CSGR_INC_STEP_SHIFT 16
  376. /* RCC_I2C46CKSELR register fields */
  377. #define RCC_I2C46CKSELR_I2C46SRC_MASK GENMASK(2, 0)
  378. #define RCC_I2C46CKSELR_I2C46SRC_SHIFT 0
  379. /* RCC_SPI6CKSELR register fields */
  380. #define RCC_SPI6CKSELR_SPI6SRC_MASK GENMASK(2, 0)
  381. #define RCC_SPI6CKSELR_SPI6SRC_SHIFT 0
  382. /* RCC_UART1CKSELR register fields */
  383. #define RCC_UART1CKSELR_UART1SRC_MASK GENMASK(2, 0)
  384. #define RCC_UART1CKSELR_UART1SRC_SHIFT 0
  385. /* RCC_RNG1CKSELR register fields */
  386. #define RCC_RNG1CKSELR_RNG1SRC_MASK GENMASK(1, 0)
  387. #define RCC_RNG1CKSELR_RNG1SRC_SHIFT 0
  388. /* RCC_CPERCKSELR register fields */
  389. #define RCC_CPERCKSELR_HSI 0x00000000
  390. #define RCC_CPERCKSELR_CSI 0x00000001
  391. #define RCC_CPERCKSELR_HSE 0x00000002
  392. #define RCC_CPERCKSELR_CKPERSRC_MASK GENMASK(1, 0)
  393. #define RCC_CPERCKSELR_CKPERSRC_SHIFT 0
  394. /* RCC_STGENCKSELR register fields */
  395. #define RCC_STGENCKSELR_STGENSRC_MASK GENMASK(1, 0)
  396. #define RCC_STGENCKSELR_STGENSRC_SHIFT 0
  397. /* RCC_DDRITFCR register fields */
  398. #define RCC_DDRITFCR_DDRC1EN BIT(0)
  399. #define RCC_DDRITFCR_DDRC1LPEN BIT(1)
  400. #define RCC_DDRITFCR_DDRC2EN BIT(2)
  401. #define RCC_DDRITFCR_DDRC2LPEN BIT(3)
  402. #define RCC_DDRITFCR_DDRPHYCEN BIT(4)
  403. #define RCC_DDRITFCR_DDRPHYCLPEN BIT(5)
  404. #define RCC_DDRITFCR_DDRCAPBEN BIT(6)
  405. #define RCC_DDRITFCR_DDRCAPBLPEN BIT(7)
  406. #define RCC_DDRITFCR_AXIDCGEN BIT(8)
  407. #define RCC_DDRITFCR_DDRPHYCAPBEN BIT(9)
  408. #define RCC_DDRITFCR_DDRPHYCAPBLPEN BIT(10)
  409. #define RCC_DDRITFCR_KERDCG_DLY_MASK GENMASK(13, 11)
  410. #define RCC_DDRITFCR_KERDCG_DLY_SHIFT 11
  411. #define RCC_DDRITFCR_DDRCAPBRST BIT(14)
  412. #define RCC_DDRITFCR_DDRCAXIRST BIT(15)
  413. #define RCC_DDRITFCR_DDRCORERST BIT(16)
  414. #define RCC_DDRITFCR_DPHYAPBRST BIT(17)
  415. #define RCC_DDRITFCR_DPHYRST BIT(18)
  416. #define RCC_DDRITFCR_DPHYCTLRST BIT(19)
  417. #define RCC_DDRITFCR_DDRCKMOD_MASK GENMASK(22, 20)
  418. #define RCC_DDRITFCR_DDRCKMOD_SHIFT 20
  419. #define RCC_DDRITFCR_DDRCKMOD_SSR 0
  420. #define RCC_DDRITFCR_DDRCKMOD_ASR1 BIT(20)
  421. #define RCC_DDRITFCR_DDRCKMOD_HSR1 BIT(21)
  422. #define RCC_DDRITFCR_GSKPMOD BIT(23)
  423. #define RCC_DDRITFCR_GSKPCTRL BIT(24)
  424. #define RCC_DDRITFCR_DFILP_WIDTH_MASK GENMASK(27, 25)
  425. #define RCC_DDRITFCR_DFILP_WIDTH_SHIFT 25
  426. #define RCC_DDRITFCR_GSKP_DUR_MASK GENMASK(31, 28)
  427. #define RCC_DDRITFCR_GSKP_DUR_SHIFT 28
  428. /* RCC_MP_BOOTCR register fields */
  429. #define RCC_MP_BOOTCR_MCU_BEN BIT(0)
  430. #define RCC_MP_BOOTCR_MPU_BEN BIT(1)
  431. /* RCC_MP_SREQSETR register fields */
  432. #define RCC_MP_SREQSETR_STPREQ_P0 BIT(0)
  433. #define RCC_MP_SREQSETR_STPREQ_P1 BIT(1)
  434. /* RCC_MP_SREQCLRR register fields */
  435. #define RCC_MP_SREQCLRR_STPREQ_P0 BIT(0)
  436. #define RCC_MP_SREQCLRR_STPREQ_P1 BIT(1)
  437. /* RCC_MP_GCR register fields */
  438. #define RCC_MP_GCR_BOOT_MCU BIT(0)
  439. /* RCC_MP_APRSTCR register fields */
  440. #define RCC_MP_APRSTCR_RDCTLEN BIT(0)
  441. #define RCC_MP_APRSTCR_RSTTO_MASK GENMASK(14, 8)
  442. #define RCC_MP_APRSTCR_RSTTO_SHIFT 8
  443. /* RCC_MP_APRSTSR register fields */
  444. #define RCC_MP_APRSTSR_RSTTOV_MASK GENMASK(14, 8)
  445. #define RCC_MP_APRSTSR_RSTTOV_SHIFT 8
  446. /* RCC_BDCR register fields */
  447. #define RCC_BDCR_LSEON BIT(0)
  448. #define RCC_BDCR_LSEBYP BIT(1)
  449. #define RCC_BDCR_LSERDY BIT(2)
  450. #define RCC_BDCR_DIGBYP BIT(3)
  451. #define RCC_BDCR_LSEDRV_MASK GENMASK(5, 4)
  452. #define RCC_BDCR_LSEDRV_SHIFT 4
  453. #define RCC_BDCR_LSECSSON BIT(8)
  454. #define RCC_BDCR_LSECSSD BIT(9)
  455. #define RCC_BDCR_RTCSRC_MASK GENMASK(17, 16)
  456. #define RCC_BDCR_RTCSRC_SHIFT 16
  457. #define RCC_BDCR_RTCCKEN BIT(20)
  458. #define RCC_BDCR_VSWRST BIT(31)
  459. /* RCC_RDLSICR register fields */
  460. #define RCC_RDLSICR_LSION BIT(0)
  461. #define RCC_RDLSICR_LSIRDY BIT(1)
  462. #define RCC_RDLSICR_MRD_MASK GENMASK(20, 16)
  463. #define RCC_RDLSICR_MRD_SHIFT 16
  464. #define RCC_RDLSICR_EADLY_MASK GENMASK(26, 24)
  465. #define RCC_RDLSICR_EADLY_SHIFT 24
  466. #define RCC_RDLSICR_SPARE_MASK GENMASK(31, 27)
  467. #define RCC_RDLSICR_SPARE_SHIFT 27
  468. /* RCC_APB4RSTSETR register fields */
  469. #define RCC_APB4RSTSETR_LTDCRST BIT(0)
  470. #define RCC_APB4RSTSETR_DSIRST BIT(4)
  471. #define RCC_APB4RSTSETR_DDRPERFMRST BIT(8)
  472. #define RCC_APB4RSTSETR_USBPHYRST BIT(16)
  473. /* RCC_APB4RSTCLRR register fields */
  474. #define RCC_APB4RSTCLRR_LTDCRST BIT(0)
  475. #define RCC_APB4RSTCLRR_DSIRST BIT(4)
  476. #define RCC_APB4RSTCLRR_DDRPERFMRST BIT(8)
  477. #define RCC_APB4RSTCLRR_USBPHYRST BIT(16)
  478. /* RCC_APB5RSTSETR register fields */
  479. #define RCC_APB5RSTSETR_SPI6RST BIT(0)
  480. #define RCC_APB5RSTSETR_I2C4RST BIT(2)
  481. #define RCC_APB5RSTSETR_I2C6RST BIT(3)
  482. #define RCC_APB5RSTSETR_USART1RST BIT(4)
  483. #define RCC_APB5RSTSETR_STGENRST BIT(20)
  484. /* RCC_APB5RSTCLRR register fields */
  485. #define RCC_APB5RSTCLRR_SPI6RST BIT(0)
  486. #define RCC_APB5RSTCLRR_I2C4RST BIT(2)
  487. #define RCC_APB5RSTCLRR_I2C6RST BIT(3)
  488. #define RCC_APB5RSTCLRR_USART1RST BIT(4)
  489. #define RCC_APB5RSTCLRR_STGENRST BIT(20)
  490. /* RCC_AHB5RSTSETR register fields */
  491. #define RCC_AHB5RSTSETR_GPIOZRST BIT(0)
  492. #define RCC_AHB5RSTSETR_CRYP1RST BIT(4)
  493. #define RCC_AHB5RSTSETR_HASH1RST BIT(5)
  494. #define RCC_AHB5RSTSETR_RNG1RST BIT(6)
  495. #define RCC_AHB5RSTSETR_AXIMCRST BIT(16)
  496. /* RCC_AHB5RSTCLRR register fields */
  497. #define RCC_AHB5RSTCLRR_GPIOZRST BIT(0)
  498. #define RCC_AHB5RSTCLRR_CRYP1RST BIT(4)
  499. #define RCC_AHB5RSTCLRR_HASH1RST BIT(5)
  500. #define RCC_AHB5RSTCLRR_RNG1RST BIT(6)
  501. #define RCC_AHB5RSTCLRR_AXIMCRST BIT(16)
  502. /* RCC_AHB6RSTSETR register fields */
  503. #define RCC_AHB6RSTSETR_GPURST BIT(5)
  504. #define RCC_AHB6RSTSETR_ETHMACRST BIT(10)
  505. #define RCC_AHB6RSTSETR_FMCRST BIT(12)
  506. #define RCC_AHB6RSTSETR_QSPIRST BIT(14)
  507. #define RCC_AHB6RSTSETR_SDMMC1RST BIT(16)
  508. #define RCC_AHB6RSTSETR_SDMMC2RST BIT(17)
  509. #define RCC_AHB6RSTSETR_CRC1RST BIT(20)
  510. #define RCC_AHB6RSTSETR_USBHRST BIT(24)
  511. /* RCC_AHB6RSTCLRR register fields */
  512. #define RCC_AHB6RSTCLRR_ETHMACRST BIT(10)
  513. #define RCC_AHB6RSTCLRR_FMCRST BIT(12)
  514. #define RCC_AHB6RSTCLRR_QSPIRST BIT(14)
  515. #define RCC_AHB6RSTCLRR_SDMMC1RST BIT(16)
  516. #define RCC_AHB6RSTCLRR_SDMMC2RST BIT(17)
  517. #define RCC_AHB6RSTCLRR_CRC1RST BIT(20)
  518. #define RCC_AHB6RSTCLRR_USBHRST BIT(24)
  519. /* RCC_TZAHB6RSTSETR register fields */
  520. #define RCC_TZAHB6RSTSETR_MDMARST BIT(0)
  521. /* RCC_TZAHB6RSTCLRR register fields */
  522. #define RCC_TZAHB6RSTCLRR_MDMARST BIT(0)
  523. /* RCC_MP_APB4ENSETR register fields */
  524. #define RCC_MP_APB4ENSETR_LTDCEN BIT(0)
  525. #define RCC_MP_APB4ENSETR_DSIEN BIT(4)
  526. #define RCC_MP_APB4ENSETR_DDRPERFMEN BIT(8)
  527. #define RCC_MP_APB4ENSETR_IWDG2APBEN BIT(15)
  528. #define RCC_MP_APB4ENSETR_USBPHYEN BIT(16)
  529. #define RCC_MP_APB4ENSETR_STGENROEN BIT(20)
  530. /* RCC_MP_APB4ENCLRR register fields */
  531. #define RCC_MP_APB4ENCLRR_LTDCEN BIT(0)
  532. #define RCC_MP_APB4ENCLRR_DSIEN BIT(4)
  533. #define RCC_MP_APB4ENCLRR_DDRPERFMEN BIT(8)
  534. #define RCC_MP_APB4ENCLRR_IWDG2APBEN BIT(15)
  535. #define RCC_MP_APB4ENCLRR_USBPHYEN BIT(16)
  536. #define RCC_MP_APB4ENCLRR_STGENROEN BIT(20)
  537. /* RCC_MP_APB5ENSETR register fields */
  538. #define RCC_MP_APB5ENSETR_SPI6EN BIT(0)
  539. #define RCC_MP_APB5ENSETR_I2C4EN BIT(2)
  540. #define RCC_MP_APB5ENSETR_I2C6EN BIT(3)
  541. #define RCC_MP_APB5ENSETR_USART1EN BIT(4)
  542. #define RCC_MP_APB5ENSETR_RTCAPBEN BIT(8)
  543. #define RCC_MP_APB5ENSETR_TZC1EN BIT(11)
  544. #define RCC_MP_APB5ENSETR_TZC2EN BIT(12)
  545. #define RCC_MP_APB5ENSETR_TZPCEN BIT(13)
  546. #define RCC_MP_APB5ENSETR_IWDG1APBEN BIT(15)
  547. #define RCC_MP_APB5ENSETR_BSECEN BIT(16)
  548. #define RCC_MP_APB5ENSETR_STGENEN BIT(20)
  549. /* RCC_MP_APB5ENCLRR register fields */
  550. #define RCC_MP_APB5ENCLRR_SPI6EN BIT(0)
  551. #define RCC_MP_APB5ENCLRR_I2C4EN BIT(2)
  552. #define RCC_MP_APB5ENCLRR_I2C6EN BIT(3)
  553. #define RCC_MP_APB5ENCLRR_USART1EN BIT(4)
  554. #define RCC_MP_APB5ENCLRR_RTCAPBEN BIT(8)
  555. #define RCC_MP_APB5ENCLRR_TZC1EN BIT(11)
  556. #define RCC_MP_APB5ENCLRR_TZC2EN BIT(12)
  557. #define RCC_MP_APB5ENCLRR_TZPCEN BIT(13)
  558. #define RCC_MP_APB5ENCLRR_IWDG1APBEN BIT(15)
  559. #define RCC_MP_APB5ENCLRR_BSECEN BIT(16)
  560. #define RCC_MP_APB5ENCLRR_STGENEN BIT(20)
  561. /* RCC_MP_AHB5ENSETR register fields */
  562. #define RCC_MP_AHB5ENSETR_GPIOZEN BIT(0)
  563. #define RCC_MP_AHB5ENSETR_CRYP1EN BIT(4)
  564. #define RCC_MP_AHB5ENSETR_HASH1EN BIT(5)
  565. #define RCC_MP_AHB5ENSETR_RNG1EN BIT(6)
  566. #define RCC_MP_AHB5ENSETR_BKPSRAMEN BIT(8)
  567. #define RCC_MP_AHB5ENSETR_AXIMCEN BIT(16)
  568. /* RCC_MP_AHB5ENCLRR register fields */
  569. #define RCC_MP_AHB5ENCLRR_GPIOZEN BIT(0)
  570. #define RCC_MP_AHB5ENCLRR_CRYP1EN BIT(4)
  571. #define RCC_MP_AHB5ENCLRR_HASH1EN BIT(5)
  572. #define RCC_MP_AHB5ENCLRR_RNG1EN BIT(6)
  573. #define RCC_MP_AHB5ENCLRR_BKPSRAMEN BIT(8)
  574. #define RCC_MP_AHB5ENCLRR_AXIMCEN BIT(16)
  575. /* RCC_MP_AHB6ENSETR register fields */
  576. #define RCC_MP_AHB6ENSETR_MDMAEN BIT(0)
  577. #define RCC_MP_AHB6ENSETR_GPUEN BIT(5)
  578. #define RCC_MP_AHB6ENSETR_ETHCKEN BIT(7)
  579. #define RCC_MP_AHB6ENSETR_ETHTXEN BIT(8)
  580. #define RCC_MP_AHB6ENSETR_ETHRXEN BIT(9)
  581. #define RCC_MP_AHB6ENSETR_ETHMACEN BIT(10)
  582. #define RCC_MP_AHB6ENSETR_FMCEN BIT(12)
  583. #define RCC_MP_AHB6ENSETR_QSPIEN BIT(14)
  584. #define RCC_MP_AHB6ENSETR_SDMMC1EN BIT(16)
  585. #define RCC_MP_AHB6ENSETR_SDMMC2EN BIT(17)
  586. #define RCC_MP_AHB6ENSETR_CRC1EN BIT(20)
  587. #define RCC_MP_AHB6ENSETR_USBHEN BIT(24)
  588. /* RCC_MP_AHB6ENCLRR register fields */
  589. #define RCC_MP_AHB6ENCLRR_MDMAEN BIT(0)
  590. #define RCC_MP_AHB6ENCLRR_GPUEN BIT(5)
  591. #define RCC_MP_AHB6ENCLRR_ETHCKEN BIT(7)
  592. #define RCC_MP_AHB6ENCLRR_ETHTXEN BIT(8)
  593. #define RCC_MP_AHB6ENCLRR_ETHRXEN BIT(9)
  594. #define RCC_MP_AHB6ENCLRR_ETHMACEN BIT(10)
  595. #define RCC_MP_AHB6ENCLRR_FMCEN BIT(12)
  596. #define RCC_MP_AHB6ENCLRR_QSPIEN BIT(14)
  597. #define RCC_MP_AHB6ENCLRR_SDMMC1EN BIT(16)
  598. #define RCC_MP_AHB6ENCLRR_SDMMC2EN BIT(17)
  599. #define RCC_MP_AHB6ENCLRR_CRC1EN BIT(20)
  600. #define RCC_MP_AHB6ENCLRR_USBHEN BIT(24)
  601. /* RCC_MP_TZAHB6ENSETR register fields */
  602. #define RCC_MP_TZAHB6ENSETR_MDMAEN BIT(0)
  603. /* RCC_MP_TZAHB6ENCLRR register fields */
  604. #define RCC_MP_TZAHB6ENCLRR_MDMAEN BIT(0)
  605. /* RCC_MC_APB4ENSETR register fields */
  606. #define RCC_MC_APB4ENSETR_LTDCEN BIT(0)
  607. #define RCC_MC_APB4ENSETR_DSIEN BIT(4)
  608. #define RCC_MC_APB4ENSETR_DDRPERFMEN BIT(8)
  609. #define RCC_MC_APB4ENSETR_USBPHYEN BIT(16)
  610. #define RCC_MC_APB4ENSETR_STGENROEN BIT(20)
  611. /* RCC_MC_APB4ENCLRR register fields */
  612. #define RCC_MC_APB4ENCLRR_LTDCEN BIT(0)
  613. #define RCC_MC_APB4ENCLRR_DSIEN BIT(4)
  614. #define RCC_MC_APB4ENCLRR_DDRPERFMEN BIT(8)
  615. #define RCC_MC_APB4ENCLRR_USBPHYEN BIT(16)
  616. #define RCC_MC_APB4ENCLRR_STGENROEN BIT(20)
  617. /* RCC_MC_APB5ENSETR register fields */
  618. #define RCC_MC_APB5ENSETR_SPI6EN BIT(0)
  619. #define RCC_MC_APB5ENSETR_I2C4EN BIT(2)
  620. #define RCC_MC_APB5ENSETR_I2C6EN BIT(3)
  621. #define RCC_MC_APB5ENSETR_USART1EN BIT(4)
  622. #define RCC_MC_APB5ENSETR_RTCAPBEN BIT(8)
  623. #define RCC_MC_APB5ENSETR_TZC1EN BIT(11)
  624. #define RCC_MC_APB5ENSETR_TZC2EN BIT(12)
  625. #define RCC_MC_APB5ENSETR_TZPCEN BIT(13)
  626. #define RCC_MC_APB5ENSETR_BSECEN BIT(16)
  627. #define RCC_MC_APB5ENSETR_STGENEN BIT(20)
  628. /* RCC_MC_APB5ENCLRR register fields */
  629. #define RCC_MC_APB5ENCLRR_SPI6EN BIT(0)
  630. #define RCC_MC_APB5ENCLRR_I2C4EN BIT(2)
  631. #define RCC_MC_APB5ENCLRR_I2C6EN BIT(3)
  632. #define RCC_MC_APB5ENCLRR_USART1EN BIT(4)
  633. #define RCC_MC_APB5ENCLRR_RTCAPBEN BIT(8)
  634. #define RCC_MC_APB5ENCLRR_TZC1EN BIT(11)
  635. #define RCC_MC_APB5ENCLRR_TZC2EN BIT(12)
  636. #define RCC_MC_APB5ENCLRR_TZPCEN BIT(13)
  637. #define RCC_MC_APB5ENCLRR_BSECEN BIT(16)
  638. #define RCC_MC_APB5ENCLRR_STGENEN BIT(20)
  639. /* RCC_MC_AHB5ENSETR register fields */
  640. #define RCC_MC_AHB5ENSETR_GPIOZEN BIT(0)
  641. #define RCC_MC_AHB5ENSETR_CRYP1EN BIT(4)
  642. #define RCC_MC_AHB5ENSETR_HASH1EN BIT(5)
  643. #define RCC_MC_AHB5ENSETR_RNG1EN BIT(6)
  644. #define RCC_MC_AHB5ENSETR_BKPSRAMEN BIT(8)
  645. /* RCC_MC_AHB5ENCLRR register fields */
  646. #define RCC_MC_AHB5ENCLRR_GPIOZEN BIT(0)
  647. #define RCC_MC_AHB5ENCLRR_CRYP1EN BIT(4)
  648. #define RCC_MC_AHB5ENCLRR_HASH1EN BIT(5)
  649. #define RCC_MC_AHB5ENCLRR_RNG1EN BIT(6)
  650. #define RCC_MC_AHB5ENCLRR_BKPSRAMEN BIT(8)
  651. /* RCC_MC_AHB6ENSETR register fields */
  652. #define RCC_MC_AHB6ENSETR_MDMAEN BIT(0)
  653. #define RCC_MC_AHB6ENSETR_GPUEN BIT(5)
  654. #define RCC_MC_AHB6ENSETR_ETHCKEN BIT(7)
  655. #define RCC_MC_AHB6ENSETR_ETHTXEN BIT(8)
  656. #define RCC_MC_AHB6ENSETR_ETHRXEN BIT(9)
  657. #define RCC_MC_AHB6ENSETR_ETHMACEN BIT(10)
  658. #define RCC_MC_AHB6ENSETR_FMCEN BIT(12)
  659. #define RCC_MC_AHB6ENSETR_QSPIEN BIT(14)
  660. #define RCC_MC_AHB6ENSETR_SDMMC1EN BIT(16)
  661. #define RCC_MC_AHB6ENSETR_SDMMC2EN BIT(17)
  662. #define RCC_MC_AHB6ENSETR_CRC1EN BIT(20)
  663. #define RCC_MC_AHB6ENSETR_USBHEN BIT(24)
  664. /* RCC_MC_AHB6ENCLRR register fields */
  665. #define RCC_MC_AHB6ENCLRR_MDMAEN BIT(0)
  666. #define RCC_MC_AHB6ENCLRR_GPUEN BIT(5)
  667. #define RCC_MC_AHB6ENCLRR_ETHCKEN BIT(7)
  668. #define RCC_MC_AHB6ENCLRR_ETHTXEN BIT(8)
  669. #define RCC_MC_AHB6ENCLRR_ETHRXEN BIT(9)
  670. #define RCC_MC_AHB6ENCLRR_ETHMACEN BIT(10)
  671. #define RCC_MC_AHB6ENCLRR_FMCEN BIT(12)
  672. #define RCC_MC_AHB6ENCLRR_QSPIEN BIT(14)
  673. #define RCC_MC_AHB6ENCLRR_SDMMC1EN BIT(16)
  674. #define RCC_MC_AHB6ENCLRR_SDMMC2EN BIT(17)
  675. #define RCC_MC_AHB6ENCLRR_CRC1EN BIT(20)
  676. #define RCC_MC_AHB6ENCLRR_USBHEN BIT(24)
  677. /* RCC_MP_APB4LPENSETR register fields */
  678. #define RCC_MP_APB4LPENSETR_LTDCLPEN BIT(0)
  679. #define RCC_MP_APB4LPENSETR_DSILPEN BIT(4)
  680. #define RCC_MP_APB4LPENSETR_DDRPERFMLPEN BIT(8)
  681. #define RCC_MP_APB4LPENSETR_IWDG2APBLPEN BIT(15)
  682. #define RCC_MP_APB4LPENSETR_USBPHYLPEN BIT(16)
  683. #define RCC_MP_APB4LPENSETR_STGENROLPEN BIT(20)
  684. #define RCC_MP_APB4LPENSETR_STGENROSTPEN BIT(21)
  685. /* RCC_MP_APB4LPENCLRR register fields */
  686. #define RCC_MP_APB4LPENCLRR_LTDCLPEN BIT(0)
  687. #define RCC_MP_APB4LPENCLRR_DSILPEN BIT(4)
  688. #define RCC_MP_APB4LPENCLRR_DDRPERFMLPEN BIT(8)
  689. #define RCC_MP_APB4LPENCLRR_IWDG2APBLPEN BIT(15)
  690. #define RCC_MP_APB4LPENCLRR_USBPHYLPEN BIT(16)
  691. #define RCC_MP_APB4LPENCLRR_STGENROLPEN BIT(20)
  692. #define RCC_MP_APB4LPENCLRR_STGENROSTPEN BIT(21)
  693. /* RCC_MP_APB5LPENSETR register fields */
  694. #define RCC_MP_APB5LPENSETR_SPI6LPEN BIT(0)
  695. #define RCC_MP_APB5LPENSETR_I2C4LPEN BIT(2)
  696. #define RCC_MP_APB5LPENSETR_I2C6LPEN BIT(3)
  697. #define RCC_MP_APB5LPENSETR_USART1LPEN BIT(4)
  698. #define RCC_MP_APB5LPENSETR_RTCAPBLPEN BIT(8)
  699. #define RCC_MP_APB5LPENSETR_TZC1LPEN BIT(11)
  700. #define RCC_MP_APB5LPENSETR_TZC2LPEN BIT(12)
  701. #define RCC_MP_APB5LPENSETR_TZPCLPEN BIT(13)
  702. #define RCC_MP_APB5LPENSETR_IWDG1APBLPEN BIT(15)
  703. #define RCC_MP_APB5LPENSETR_BSECLPEN BIT(16)
  704. #define RCC_MP_APB5LPENSETR_STGENLPEN BIT(20)
  705. #define RCC_MP_APB5LPENSETR_STGENSTPEN BIT(21)
  706. /* RCC_MP_APB5LPENCLRR register fields */
  707. #define RCC_MP_APB5LPENCLRR_SPI6LPEN BIT(0)
  708. #define RCC_MP_APB5LPENCLRR_I2C4LPEN BIT(2)
  709. #define RCC_MP_APB5LPENCLRR_I2C6LPEN BIT(3)
  710. #define RCC_MP_APB5LPENCLRR_USART1LPEN BIT(4)
  711. #define RCC_MP_APB5LPENCLRR_RTCAPBLPEN BIT(8)
  712. #define RCC_MP_APB5LPENCLRR_TZC1LPEN BIT(11)
  713. #define RCC_MP_APB5LPENCLRR_TZC2LPEN BIT(12)
  714. #define RCC_MP_APB5LPENCLRR_TZPCLPEN BIT(13)
  715. #define RCC_MP_APB5LPENCLRR_IWDG1APBLPEN BIT(15)
  716. #define RCC_MP_APB5LPENCLRR_BSECLPEN BIT(16)
  717. #define RCC_MP_APB5LPENCLRR_STGENLPEN BIT(20)
  718. #define RCC_MP_APB5LPENCLRR_STGENSTPEN BIT(21)
  719. /* RCC_MP_AHB5LPENSETR register fields */
  720. #define RCC_MP_AHB5LPENSETR_GPIOZLPEN BIT(0)
  721. #define RCC_MP_AHB5LPENSETR_CRYP1LPEN BIT(4)
  722. #define RCC_MP_AHB5LPENSETR_HASH1LPEN BIT(5)
  723. #define RCC_MP_AHB5LPENSETR_RNG1LPEN BIT(6)
  724. #define RCC_MP_AHB5LPENSETR_BKPSRAMLPEN BIT(8)
  725. /* RCC_MP_AHB5LPENCLRR register fields */
  726. #define RCC_MP_AHB5LPENCLRR_GPIOZLPEN BIT(0)
  727. #define RCC_MP_AHB5LPENCLRR_CRYP1LPEN BIT(4)
  728. #define RCC_MP_AHB5LPENCLRR_HASH1LPEN BIT(5)
  729. #define RCC_MP_AHB5LPENCLRR_RNG1LPEN BIT(6)
  730. #define RCC_MP_AHB5LPENCLRR_BKPSRAMLPEN BIT(8)
  731. /* RCC_MP_AHB6LPENSETR register fields */
  732. #define RCC_MP_AHB6LPENSETR_MDMALPEN BIT(0)
  733. #define RCC_MP_AHB6LPENSETR_GPULPEN BIT(5)
  734. #define RCC_MP_AHB6LPENSETR_ETHCKLPEN BIT(7)
  735. #define RCC_MP_AHB6LPENSETR_ETHTXLPEN BIT(8)
  736. #define RCC_MP_AHB6LPENSETR_ETHRXLPEN BIT(9)
  737. #define RCC_MP_AHB6LPENSETR_ETHMACLPEN BIT(10)
  738. #define RCC_MP_AHB6LPENSETR_ETHSTPEN BIT(11)
  739. #define RCC_MP_AHB6LPENSETR_FMCLPEN BIT(12)
  740. #define RCC_MP_AHB6LPENSETR_QSPILPEN BIT(14)
  741. #define RCC_MP_AHB6LPENSETR_SDMMC1LPEN BIT(16)
  742. #define RCC_MP_AHB6LPENSETR_SDMMC2LPEN BIT(17)
  743. #define RCC_MP_AHB6LPENSETR_CRC1LPEN BIT(20)
  744. #define RCC_MP_AHB6LPENSETR_USBHLPEN BIT(24)
  745. /* RCC_MP_AHB6LPENCLRR register fields */
  746. #define RCC_MP_AHB6LPENCLRR_MDMALPEN BIT(0)
  747. #define RCC_MP_AHB6LPENCLRR_GPULPEN BIT(5)
  748. #define RCC_MP_AHB6LPENCLRR_ETHCKLPEN BIT(7)
  749. #define RCC_MP_AHB6LPENCLRR_ETHTXLPEN BIT(8)
  750. #define RCC_MP_AHB6LPENCLRR_ETHRXLPEN BIT(9)
  751. #define RCC_MP_AHB6LPENCLRR_ETHMACLPEN BIT(10)
  752. #define RCC_MP_AHB6LPENCLRR_ETHSTPEN BIT(11)
  753. #define RCC_MP_AHB6LPENCLRR_FMCLPEN BIT(12)
  754. #define RCC_MP_AHB6LPENCLRR_QSPILPEN BIT(14)
  755. #define RCC_MP_AHB6LPENCLRR_SDMMC1LPEN BIT(16)
  756. #define RCC_MP_AHB6LPENCLRR_SDMMC2LPEN BIT(17)
  757. #define RCC_MP_AHB6LPENCLRR_CRC1LPEN BIT(20)
  758. #define RCC_MP_AHB6LPENCLRR_USBHLPEN BIT(24)
  759. /* RCC_MP_TZAHB6LPENSETR register fields */
  760. #define RCC_MP_TZAHB6LPENSETR_MDMALPEN BIT(0)
  761. /* RCC_MP_TZAHB6LPENCLRR register fields */
  762. #define RCC_MP_TZAHB6LPENCLRR_MDMALPEN BIT(0)
  763. /* RCC_MC_APB4LPENSETR register fields */
  764. #define RCC_MC_APB4LPENSETR_LTDCLPEN BIT(0)
  765. #define RCC_MC_APB4LPENSETR_DSILPEN BIT(4)
  766. #define RCC_MC_APB4LPENSETR_DDRPERFMLPEN BIT(8)
  767. #define RCC_MC_APB4LPENSETR_USBPHYLPEN BIT(16)
  768. #define RCC_MC_APB4LPENSETR_STGENROLPEN BIT(20)
  769. #define RCC_MC_APB4LPENSETR_STGENROSTPEN BIT(21)
  770. /* RCC_MC_APB4LPENCLRR register fields */
  771. #define RCC_MC_APB4LPENCLRR_LTDCLPEN BIT(0)
  772. #define RCC_MC_APB4LPENCLRR_DSILPEN BIT(4)
  773. #define RCC_MC_APB4LPENCLRR_DDRPERFMLPEN BIT(8)
  774. #define RCC_MC_APB4LPENCLRR_USBPHYLPEN BIT(16)
  775. #define RCC_MC_APB4LPENCLRR_STGENROLPEN BIT(20)
  776. #define RCC_MC_APB4LPENCLRR_STGENROSTPEN BIT(21)
  777. /* RCC_MC_APB5LPENSETR register fields */
  778. #define RCC_MC_APB5LPENSETR_SPI6LPEN BIT(0)
  779. #define RCC_MC_APB5LPENSETR_I2C4LPEN BIT(2)
  780. #define RCC_MC_APB5LPENSETR_I2C6LPEN BIT(3)
  781. #define RCC_MC_APB5LPENSETR_USART1LPEN BIT(4)
  782. #define RCC_MC_APB5LPENSETR_RTCAPBLPEN BIT(8)
  783. #define RCC_MC_APB5LPENSETR_TZC1LPEN BIT(11)
  784. #define RCC_MC_APB5LPENSETR_TZC2LPEN BIT(12)
  785. #define RCC_MC_APB5LPENSETR_TZPCLPEN BIT(13)
  786. #define RCC_MC_APB5LPENSETR_BSECLPEN BIT(16)
  787. #define RCC_MC_APB5LPENSETR_STGENLPEN BIT(20)
  788. #define RCC_MC_APB5LPENSETR_STGENSTPEN BIT(21)
  789. /* RCC_MC_APB5LPENCLRR register fields */
  790. #define RCC_MC_APB5LPENCLRR_SPI6LPEN BIT(0)
  791. #define RCC_MC_APB5LPENCLRR_I2C4LPEN BIT(2)
  792. #define RCC_MC_APB5LPENCLRR_I2C6LPEN BIT(3)
  793. #define RCC_MC_APB5LPENCLRR_USART1LPEN BIT(4)
  794. #define RCC_MC_APB5LPENCLRR_RTCAPBLPEN BIT(8)
  795. #define RCC_MC_APB5LPENCLRR_TZC1LPEN BIT(11)
  796. #define RCC_MC_APB5LPENCLRR_TZC2LPEN BIT(12)
  797. #define RCC_MC_APB5LPENCLRR_TZPCLPEN BIT(13)
  798. #define RCC_MC_APB5LPENCLRR_BSECLPEN BIT(16)
  799. #define RCC_MC_APB5LPENCLRR_STGENLPEN BIT(20)
  800. #define RCC_MC_APB5LPENCLRR_STGENSTPEN BIT(21)
  801. /* RCC_MC_AHB5LPENSETR register fields */
  802. #define RCC_MC_AHB5LPENSETR_GPIOZLPEN BIT(0)
  803. #define RCC_MC_AHB5LPENSETR_CRYP1LPEN BIT(4)
  804. #define RCC_MC_AHB5LPENSETR_HASH1LPEN BIT(5)
  805. #define RCC_MC_AHB5LPENSETR_RNG1LPEN BIT(6)
  806. #define RCC_MC_AHB5LPENSETR_BKPSRAMLPEN BIT(8)
  807. /* RCC_MC_AHB5LPENCLRR register fields */
  808. #define RCC_MC_AHB5LPENCLRR_GPIOZLPEN BIT(0)
  809. #define RCC_MC_AHB5LPENCLRR_CRYP1LPEN BIT(4)
  810. #define RCC_MC_AHB5LPENCLRR_HASH1LPEN BIT(5)
  811. #define RCC_MC_AHB5LPENCLRR_RNG1LPEN BIT(6)
  812. #define RCC_MC_AHB5LPENCLRR_BKPSRAMLPEN BIT(8)
  813. /* RCC_MC_AHB6LPENSETR register fields */
  814. #define RCC_MC_AHB6LPENSETR_MDMALPEN BIT(0)
  815. #define RCC_MC_AHB6LPENSETR_GPULPEN BIT(5)
  816. #define RCC_MC_AHB6LPENSETR_ETHCKLPEN BIT(7)
  817. #define RCC_MC_AHB6LPENSETR_ETHTXLPEN BIT(8)
  818. #define RCC_MC_AHB6LPENSETR_ETHRXLPEN BIT(9)
  819. #define RCC_MC_AHB6LPENSETR_ETHMACLPEN BIT(10)
  820. #define RCC_MC_AHB6LPENSETR_ETHSTPEN BIT(11)
  821. #define RCC_MC_AHB6LPENSETR_FMCLPEN BIT(12)
  822. #define RCC_MC_AHB6LPENSETR_QSPILPEN BIT(14)
  823. #define RCC_MC_AHB6LPENSETR_SDMMC1LPEN BIT(16)
  824. #define RCC_MC_AHB6LPENSETR_SDMMC2LPEN BIT(17)
  825. #define RCC_MC_AHB6LPENSETR_CRC1LPEN BIT(20)
  826. #define RCC_MC_AHB6LPENSETR_USBHLPEN BIT(24)
  827. /* RCC_MC_AHB6LPENCLRR register fields */
  828. #define RCC_MC_AHB6LPENCLRR_MDMALPEN BIT(0)
  829. #define RCC_MC_AHB6LPENCLRR_GPULPEN BIT(5)
  830. #define RCC_MC_AHB6LPENCLRR_ETHCKLPEN BIT(7)
  831. #define RCC_MC_AHB6LPENCLRR_ETHTXLPEN BIT(8)
  832. #define RCC_MC_AHB6LPENCLRR_ETHRXLPEN BIT(9)
  833. #define RCC_MC_AHB6LPENCLRR_ETHMACLPEN BIT(10)
  834. #define RCC_MC_AHB6LPENCLRR_ETHSTPEN BIT(11)
  835. #define RCC_MC_AHB6LPENCLRR_FMCLPEN BIT(12)
  836. #define RCC_MC_AHB6LPENCLRR_QSPILPEN BIT(14)
  837. #define RCC_MC_AHB6LPENCLRR_SDMMC1LPEN BIT(16)
  838. #define RCC_MC_AHB6LPENCLRR_SDMMC2LPEN BIT(17)
  839. #define RCC_MC_AHB6LPENCLRR_CRC1LPEN BIT(20)
  840. #define RCC_MC_AHB6LPENCLRR_USBHLPEN BIT(24)
  841. /* RCC_BR_RSTSCLRR register fields */
  842. #define RCC_BR_RSTSCLRR_PORRSTF BIT(0)
  843. #define RCC_BR_RSTSCLRR_BORRSTF BIT(1)
  844. #define RCC_BR_RSTSCLRR_PADRSTF BIT(2)
  845. #define RCC_BR_RSTSCLRR_HCSSRSTF BIT(3)
  846. #define RCC_BR_RSTSCLRR_VCORERSTF BIT(4)
  847. #define RCC_BR_RSTSCLRR_MPSYSRSTF BIT(6)
  848. #define RCC_BR_RSTSCLRR_MCSYSRSTF BIT(7)
  849. #define RCC_BR_RSTSCLRR_IWDG1RSTF BIT(8)
  850. #define RCC_BR_RSTSCLRR_IWDG2RSTF BIT(9)
  851. #define RCC_BR_RSTSCLRR_MPUP0RSTF BIT(13)
  852. #define RCC_BR_RSTSCLRR_MPUP1RSTF BIT(14)
  853. /* RCC_MP_GRSTCSETR register fields */
  854. #define RCC_MP_GRSTCSETR_MPSYSRST BIT(0)
  855. #define RCC_MP_GRSTCSETR_MCURST BIT(1)
  856. #define RCC_MP_GRSTCSETR_MPUP0RST BIT(4)
  857. #define RCC_MP_GRSTCSETR_MPUP1RST BIT(5)
  858. /* RCC_MP_RSTSCLRR register fields */
  859. #define RCC_MP_RSTSCLRR_PORRSTF BIT(0)
  860. #define RCC_MP_RSTSCLRR_BORRSTF BIT(1)
  861. #define RCC_MP_RSTSCLRR_PADRSTF BIT(2)
  862. #define RCC_MP_RSTSCLRR_HCSSRSTF BIT(3)
  863. #define RCC_MP_RSTSCLRR_VCORERSTF BIT(4)
  864. #define RCC_MP_RSTSCLRR_MPSYSRSTF BIT(6)
  865. #define RCC_MP_RSTSCLRR_MCSYSRSTF BIT(7)
  866. #define RCC_MP_RSTSCLRR_IWDG1RSTF BIT(8)
  867. #define RCC_MP_RSTSCLRR_IWDG2RSTF BIT(9)
  868. #define RCC_MP_RSTSCLRR_STDBYRSTF BIT(11)
  869. #define RCC_MP_RSTSCLRR_CSTDBYRSTF BIT(12)
  870. #define RCC_MP_RSTSCLRR_MPUP0RSTF BIT(13)
  871. #define RCC_MP_RSTSCLRR_MPUP1RSTF BIT(14)
  872. #define RCC_MP_RSTSCLRR_SPARE BIT(15)
  873. /* RCC_MP_IWDGFZSETR register fields */
  874. #define RCC_MP_IWDGFZSETR_FZ_IWDG1 BIT(0)
  875. #define RCC_MP_IWDGFZSETR_FZ_IWDG2 BIT(1)
  876. /* RCC_MP_IWDGFZCLRR register fields */
  877. #define RCC_MP_IWDGFZCLRR_FZ_IWDG1 BIT(0)
  878. #define RCC_MP_IWDGFZCLRR_FZ_IWDG2 BIT(1)
  879. /* RCC_MP_CIER register fields */
  880. #define RCC_MP_CIER_LSIRDYIE BIT(0)
  881. #define RCC_MP_CIER_LSERDYIE BIT(1)
  882. #define RCC_MP_CIER_HSIRDYIE BIT(2)
  883. #define RCC_MP_CIER_HSERDYIE BIT(3)
  884. #define RCC_MP_CIER_CSIRDYIE BIT(4)
  885. #define RCC_MP_CIER_PLL1DYIE BIT(8)
  886. #define RCC_MP_CIER_PLL2DYIE BIT(9)
  887. #define RCC_MP_CIER_PLL3DYIE BIT(10)
  888. #define RCC_MP_CIER_PLL4DYIE BIT(11)
  889. #define RCC_MP_CIER_LSECSSIE BIT(16)
  890. #define RCC_MP_CIER_WKUPIE BIT(20)
  891. /* RCC_MP_CIFR register fields */
  892. #define RCC_MP_CIFR_MASK U(0x110F1F)
  893. #define RCC_MP_CIFR_LSIRDYF BIT(0)
  894. #define RCC_MP_CIFR_LSERDYF BIT(1)
  895. #define RCC_MP_CIFR_HSIRDYF BIT(2)
  896. #define RCC_MP_CIFR_HSERDYF BIT(3)
  897. #define RCC_MP_CIFR_CSIRDYF BIT(4)
  898. #define RCC_MP_CIFR_PLL1DYF BIT(8)
  899. #define RCC_MP_CIFR_PLL2DYF BIT(9)
  900. #define RCC_MP_CIFR_PLL3DYF BIT(10)
  901. #define RCC_MP_CIFR_PLL4DYF BIT(11)
  902. #define RCC_MP_CIFR_LSECSSF BIT(16)
  903. #define RCC_MP_CIFR_WKUPF BIT(20)
  904. /* RCC_PWRLPDLYCR register fields */
  905. #define RCC_PWRLPDLYCR_PWRLP_DLY_MASK GENMASK(21, 0)
  906. #define RCC_PWRLPDLYCR_PWRLP_DLY_SHIFT 0
  907. #define RCC_PWRLPDLYCR_MCTMPSKP BIT(24)
  908. /* RCC_MP_RSTSSETR register fields */
  909. #define RCC_MP_RSTSSETR_PORRSTF BIT(0)
  910. #define RCC_MP_RSTSSETR_BORRSTF BIT(1)
  911. #define RCC_MP_RSTSSETR_PADRSTF BIT(2)
  912. #define RCC_MP_RSTSSETR_HCSSRSTF BIT(3)
  913. #define RCC_MP_RSTSSETR_VCORERSTF BIT(4)
  914. #define RCC_MP_RSTSSETR_MPSYSRSTF BIT(6)
  915. #define RCC_MP_RSTSSETR_MCSYSRSTF BIT(7)
  916. #define RCC_MP_RSTSSETR_IWDG1RSTF BIT(8)
  917. #define RCC_MP_RSTSSETR_IWDG2RSTF BIT(9)
  918. #define RCC_MP_RSTSSETR_STDBYRSTF BIT(11)
  919. #define RCC_MP_RSTSSETR_CSTDBYRSTF BIT(12)
  920. #define RCC_MP_RSTSSETR_MPUP0RSTF BIT(13)
  921. #define RCC_MP_RSTSSETR_MPUP1RSTF BIT(14)
  922. #define RCC_MP_RSTSSETR_SPARE BIT(15)
  923. /* RCC_MCO1CFGR register fields */
  924. #define RCC_MCO1CFGR_MCO1SEL_MASK GENMASK(2, 0)
  925. #define RCC_MCO1CFGR_MCO1SEL_SHIFT 0
  926. #define RCC_MCO1CFGR_MCO1DIV_MASK GENMASK(7, 4)
  927. #define RCC_MCO1CFGR_MCO1DIV_SHIFT 4
  928. #define RCC_MCO1CFGR_MCO1ON BIT(12)
  929. /* RCC_MCO2CFGR register fields */
  930. #define RCC_MCO2CFGR_MCO2SEL_MASK GENMASK(2, 0)
  931. #define RCC_MCO2CFGR_MCO2SEL_SHIFT 0
  932. #define RCC_MCO2CFGR_MCO2DIV_MASK GENMASK(7, 4)
  933. #define RCC_MCO2CFGR_MCO2DIV_SHIFT 4
  934. #define RCC_MCO2CFGR_MCO2ON BIT(12)
  935. /* RCC_OCRDYR register fields */
  936. #define RCC_OCRDYR_HSIRDY BIT(0)
  937. #define RCC_OCRDYR_HSIDIVRDY BIT(2)
  938. #define RCC_OCRDYR_CSIRDY BIT(4)
  939. #define RCC_OCRDYR_HSERDY BIT(8)
  940. #define RCC_OCRDYR_MPUCKRDY BIT(23)
  941. #define RCC_OCRDYR_AXICKRDY BIT(24)
  942. #define RCC_OCRDYR_CKREST BIT(25)
  943. /* RCC_DBGCFGR register fields */
  944. #define RCC_DBGCFGR_TRACEDIV_MASK GENMASK(2, 0)
  945. #define RCC_DBGCFGR_TRACEDIV_SHIFT 0
  946. #define RCC_DBGCFGR_DBGCKEN BIT(8)
  947. #define RCC_DBGCFGR_TRACECKEN BIT(9)
  948. #define RCC_DBGCFGR_DBGRST BIT(12)
  949. /* RCC_RCK3SELR register fields */
  950. #define RCC_RCK3SELR_PLL3SRC_MASK GENMASK(1, 0)
  951. #define RCC_RCK3SELR_PLL3SRC_SHIFT 0
  952. #define RCC_RCK3SELR_PLL3SRCRDY BIT(31)
  953. /* RCC_RCK4SELR register fields */
  954. #define RCC_RCK4SELR_PLL4SRC_MASK GENMASK(1, 0)
  955. #define RCC_RCK4SELR_PLL4SRC_SHIFT 0
  956. #define RCC_RCK4SELR_PLL4SRCRDY BIT(31)
  957. /* RCC_TIMG1PRER register fields */
  958. #define RCC_TIMG1PRER_TIMG1PRE BIT(0)
  959. #define RCC_TIMG1PRER_TIMG1PRERDY BIT(31)
  960. /* RCC_TIMG2PRER register fields */
  961. #define RCC_TIMG2PRER_TIMG2PRE BIT(0)
  962. #define RCC_TIMG2PRER_TIMG2PRERDY BIT(31)
  963. /* RCC_MCUDIVR register fields */
  964. #define RCC_MCUDIVR_MCUDIV_MASK GENMASK(3, 0)
  965. #define RCC_MCUDIVR_MCUDIV_SHIFT 0
  966. #define RCC_MCUDIVR_MCUDIVRDY BIT(31)
  967. /* RCC_APB1DIVR register fields */
  968. #define RCC_APB1DIVR_APB1DIV_MASK GENMASK(2, 0)
  969. #define RCC_APB1DIVR_APB1DIV_SHIFT 0
  970. #define RCC_APB1DIVR_APB1DIVRDY BIT(31)
  971. /* RCC_APB2DIVR register fields */
  972. #define RCC_APB2DIVR_APB2DIV_MASK GENMASK(2, 0)
  973. #define RCC_APB2DIVR_APB2DIV_SHIFT 0
  974. #define RCC_APB2DIVR_APB2DIVRDY BIT(31)
  975. /* RCC_APB3DIVR register fields */
  976. #define RCC_APB3DIVR_APB3DIV_MASK GENMASK(2, 0)
  977. #define RCC_APB3DIVR_APB3DIV_SHIFT 0
  978. #define RCC_APB3DIVR_APB3DIVRDY BIT(31)
  979. /* RCC_PLL3CR register fields */
  980. #define RCC_PLL3CR_PLLON BIT(0)
  981. #define RCC_PLL3CR_PLL3RDY BIT(1)
  982. #define RCC_PLL3CR_SSCG_CTRL BIT(2)
  983. #define RCC_PLL3CR_DIVPEN BIT(4)
  984. #define RCC_PLL3CR_DIVQEN BIT(5)
  985. #define RCC_PLL3CR_DIVREN BIT(6)
  986. /* RCC_PLL3CFGR1 register fields */
  987. #define RCC_PLL3CFGR1_DIVN_MASK GENMASK(8, 0)
  988. #define RCC_PLL3CFGR1_DIVN_SHIFT 0
  989. #define RCC_PLL3CFGR1_DIVM3_MASK GENMASK(21, 16)
  990. #define RCC_PLL3CFGR1_DIVM3_SHIFT 16
  991. #define RCC_PLL3CFGR1_IFRGE_MASK GENMASK(25, 24)
  992. #define RCC_PLL3CFGR1_IFRGE_SHIFT 24
  993. /* RCC_PLL3CFGR2 register fields */
  994. #define RCC_PLL3CFGR2_DIVP_MASK GENMASK(6, 0)
  995. #define RCC_PLL3CFGR2_DIVP_SHIFT 0
  996. #define RCC_PLL3CFGR2_DIVQ_MASK GENMASK(14, 8)
  997. #define RCC_PLL3CFGR2_DIVQ_SHIFT 8
  998. #define RCC_PLL3CFGR2_DIVR_MASK GENMASK(22, 16)
  999. #define RCC_PLL3CFGR2_DIVR_SHIFT 16
  1000. /* RCC_PLL3FRACR register fields */
  1001. #define RCC_PLL3FRACR_FRACV_MASK GENMASK(15, 3)
  1002. #define RCC_PLL3FRACR_FRACV_SHIFT 3
  1003. #define RCC_PLL3FRACR_FRACLE BIT(16)
  1004. /* RCC_PLL3CSGR register fields */
  1005. #define RCC_PLL3CSGR_MOD_PER_MASK GENMASK(12, 0)
  1006. #define RCC_PLL3CSGR_MOD_PER_SHIFT 0
  1007. #define RCC_PLL3CSGR_TPDFN_DIS BIT(13)
  1008. #define RCC_PLL3CSGR_RPDFN_DIS BIT(14)
  1009. #define RCC_PLL3CSGR_SSCG_MODE BIT(15)
  1010. #define RCC_PLL3CSGR_INC_STEP_MASK GENMASK(30, 16)
  1011. #define RCC_PLL3CSGR_INC_STEP_SHIFT 16
  1012. /* RCC_PLL4CR register fields */
  1013. #define RCC_PLL4CR_PLLON BIT(0)
  1014. #define RCC_PLL4CR_PLL4RDY BIT(1)
  1015. #define RCC_PLL4CR_SSCG_CTRL BIT(2)
  1016. #define RCC_PLL4CR_DIVPEN BIT(4)
  1017. #define RCC_PLL4CR_DIVQEN BIT(5)
  1018. #define RCC_PLL4CR_DIVREN BIT(6)
  1019. /* RCC_PLL4CFGR1 register fields */
  1020. #define RCC_PLL4CFGR1_DIVN_MASK GENMASK(8, 0)
  1021. #define RCC_PLL4CFGR1_DIVN_SHIFT 0
  1022. #define RCC_PLL4CFGR1_DIVM4_MASK GENMASK(21, 16)
  1023. #define RCC_PLL4CFGR1_DIVM4_SHIFT 16
  1024. #define RCC_PLL4CFGR1_IFRGE_MASK GENMASK(25, 24)
  1025. #define RCC_PLL4CFGR1_IFRGE_SHIFT 24
  1026. /* RCC_PLL4CFGR2 register fields */
  1027. #define RCC_PLL4CFGR2_DIVP_MASK GENMASK(6, 0)
  1028. #define RCC_PLL4CFGR2_DIVP_SHIFT 0
  1029. #define RCC_PLL4CFGR2_DIVQ_MASK GENMASK(14, 8)
  1030. #define RCC_PLL4CFGR2_DIVQ_SHIFT 8
  1031. #define RCC_PLL4CFGR2_DIVR_MASK GENMASK(22, 16)
  1032. #define RCC_PLL4CFGR2_DIVR_SHIFT 16
  1033. /* RCC_PLL4FRACR register fields */
  1034. #define RCC_PLL4FRACR_FRACV_MASK GENMASK(15, 3)
  1035. #define RCC_PLL4FRACR_FRACV_SHIFT 3
  1036. #define RCC_PLL4FRACR_FRACLE BIT(16)
  1037. /* RCC_PLL4CSGR register fields */
  1038. #define RCC_PLL4CSGR_MOD_PER_MASK GENMASK(12, 0)
  1039. #define RCC_PLL4CSGR_MOD_PER_SHIFT 0
  1040. #define RCC_PLL4CSGR_TPDFN_DIS BIT(13)
  1041. #define RCC_PLL4CSGR_RPDFN_DIS BIT(14)
  1042. #define RCC_PLL4CSGR_SSCG_MODE BIT(15)
  1043. #define RCC_PLL4CSGR_INC_STEP_MASK GENMASK(30, 16)
  1044. #define RCC_PLL4CSGR_INC_STEP_SHIFT 16
  1045. /* RCC_I2C12CKSELR register fields */
  1046. #define RCC_I2C12CKSELR_I2C12SRC_MASK GENMASK(2, 0)
  1047. #define RCC_I2C12CKSELR_I2C12SRC_SHIFT 0
  1048. /* RCC_I2C35CKSELR register fields */
  1049. #define RCC_I2C35CKSELR_I2C35SRC_MASK GENMASK(2, 0)
  1050. #define RCC_I2C35CKSELR_I2C35SRC_SHIFT 0
  1051. /* RCC_SAI1CKSELR register fields */
  1052. #define RCC_SAI1CKSELR_SAI1SRC_MASK GENMASK(2, 0)
  1053. #define RCC_SAI1CKSELR_SAI1SRC_SHIFT 0
  1054. /* RCC_SAI2CKSELR register fields */
  1055. #define RCC_SAI2CKSELR_SAI2SRC_MASK GENMASK(2, 0)
  1056. #define RCC_SAI2CKSELR_SAI2SRC_SHIFT 0
  1057. /* RCC_SAI3CKSELR register fields */
  1058. #define RCC_SAI3CKSELR_SAI3SRC_MASK GENMASK(2, 0)
  1059. #define RCC_SAI3CKSELR_SAI3SRC_SHIFT 0
  1060. /* RCC_SAI4CKSELR register fields */
  1061. #define RCC_SAI4CKSELR_SAI4SRC_MASK GENMASK(2, 0)
  1062. #define RCC_SAI4CKSELR_SAI4SRC_SHIFT 0
  1063. /* RCC_SPI2S1CKSELR register fields */
  1064. #define RCC_SPI2S1CKSELR_SPI1SRC_MASK GENMASK(2, 0)
  1065. #define RCC_SPI2S1CKSELR_SPI1SRC_SHIFT 0
  1066. /* RCC_SPI2S23CKSELR register fields */
  1067. #define RCC_SPI2S23CKSELR_SPI23SRC_MASK GENMASK(2, 0)
  1068. #define RCC_SPI2S23CKSELR_SPI23SRC_SHIFT 0
  1069. /* RCC_SPI45CKSELR register fields */
  1070. #define RCC_SPI45CKSELR_SPI45SRC_MASK GENMASK(2, 0)
  1071. #define RCC_SPI45CKSELR_SPI45SRC_SHIFT 0
  1072. /* RCC_UART6CKSELR register fields */
  1073. #define RCC_UART6CKSELR_UART6SRC_MASK GENMASK(2, 0)
  1074. #define RCC_UART6CKSELR_UART6SRC_SHIFT 0
  1075. /* RCC_UART24CKSELR register fields */
  1076. #define RCC_UART24CKSELR_HSI 0x00000002
  1077. #define RCC_UART24CKSELR_UART24SRC_MASK GENMASK(2, 0)
  1078. #define RCC_UART24CKSELR_UART24SRC_SHIFT 0
  1079. /* RCC_UART35CKSELR register fields */
  1080. #define RCC_UART35CKSELR_UART35SRC_MASK GENMASK(2, 0)
  1081. #define RCC_UART35CKSELR_UART35SRC_SHIFT 0
  1082. /* RCC_UART78CKSELR register fields */
  1083. #define RCC_UART78CKSELR_UART78SRC_MASK GENMASK(2, 0)
  1084. #define RCC_UART78CKSELR_UART78SRC_SHIFT 0
  1085. /* RCC_SDMMC12CKSELR register fields */
  1086. #define RCC_SDMMC12CKSELR_SDMMC12SRC_MASK GENMASK(2, 0)
  1087. #define RCC_SDMMC12CKSELR_SDMMC12SRC_SHIFT 0
  1088. /* RCC_SDMMC3CKSELR register fields */
  1089. #define RCC_SDMMC3CKSELR_SDMMC3SRC_MASK GENMASK(2, 0)
  1090. #define RCC_SDMMC3CKSELR_SDMMC3SRC_SHIFT 0
  1091. /* RCC_ETHCKSELR register fields */
  1092. #define RCC_ETHCKSELR_ETHSRC_MASK GENMASK(1, 0)
  1093. #define RCC_ETHCKSELR_ETHSRC_SHIFT 0
  1094. #define RCC_ETHCKSELR_ETHPTPDIV_MASK GENMASK(7, 4)
  1095. #define RCC_ETHCKSELR_ETHPTPDIV_SHIFT 4
  1096. /* RCC_QSPICKSELR register fields */
  1097. #define RCC_QSPICKSELR_QSPISRC_MASK GENMASK(1, 0)
  1098. #define RCC_QSPICKSELR_QSPISRC_SHIFT 0
  1099. /* RCC_FMCCKSELR register fields */
  1100. #define RCC_FMCCKSELR_FMCSRC_MASK GENMASK(1, 0)
  1101. #define RCC_FMCCKSELR_FMCSRC_SHIFT 0
  1102. /* RCC_FDCANCKSELR register fields */
  1103. #define RCC_FDCANCKSELR_FDCANSRC_MASK GENMASK(1, 0)
  1104. #define RCC_FDCANCKSELR_FDCANSRC_SHIFT 0
  1105. /* RCC_SPDIFCKSELR register fields */
  1106. #define RCC_SPDIFCKSELR_SPDIFSRC_MASK GENMASK(1, 0)
  1107. #define RCC_SPDIFCKSELR_SPDIFSRC_SHIFT 0
  1108. /* RCC_CECCKSELR register fields */
  1109. #define RCC_CECCKSELR_CECSRC_MASK GENMASK(1, 0)
  1110. #define RCC_CECCKSELR_CECSRC_SHIFT 0
  1111. /* RCC_USBCKSELR register fields */
  1112. #define RCC_USBCKSELR_USBPHYSRC_MASK GENMASK(1, 0)
  1113. #define RCC_USBCKSELR_USBPHYSRC_SHIFT 0
  1114. #define RCC_USBCKSELR_USBOSRC BIT(4)
  1115. #define RCC_USBCKSELR_USBOSRC_MASK BIT(4)
  1116. #define RCC_USBCKSELR_USBOSRC_SHIFT 4
  1117. /* RCC_RNG2CKSELR register fields */
  1118. #define RCC_RNG2CKSELR_RNG2SRC_MASK GENMASK(1, 0)
  1119. #define RCC_RNG2CKSELR_RNG2SRC_SHIFT 0
  1120. /* RCC_DSICKSELR register fields */
  1121. #define RCC_DSICKSELR_DSISRC BIT(0)
  1122. /* RCC_ADCCKSELR register fields */
  1123. #define RCC_ADCCKSELR_ADCSRC_MASK GENMASK(1, 0)
  1124. #define RCC_ADCCKSELR_ADCSRC_SHIFT 0
  1125. /* RCC_LPTIM45CKSELR register fields */
  1126. #define RCC_LPTIM45CKSELR_LPTIM45SRC_MASK GENMASK(2, 0)
  1127. #define RCC_LPTIM45CKSELR_LPTIM45SRC_SHIFT 0
  1128. /* RCC_LPTIM23CKSELR register fields */
  1129. #define RCC_LPTIM23CKSELR_LPTIM23SRC_MASK GENMASK(2, 0)
  1130. #define RCC_LPTIM23CKSELR_LPTIM23SRC_SHIFT 0
  1131. /* RCC_LPTIM1CKSELR register fields */
  1132. #define RCC_LPTIM1CKSELR_LPTIM1SRC_MASK GENMASK(2, 0)
  1133. #define RCC_LPTIM1CKSELR_LPTIM1SRC_SHIFT 0
  1134. /* RCC_APB1RSTSETR register fields */
  1135. #define RCC_APB1RSTSETR_TIM2RST BIT(0)
  1136. #define RCC_APB1RSTSETR_TIM3RST BIT(1)
  1137. #define RCC_APB1RSTSETR_TIM4RST BIT(2)
  1138. #define RCC_APB1RSTSETR_TIM5RST BIT(3)
  1139. #define RCC_APB1RSTSETR_TIM6RST BIT(4)
  1140. #define RCC_APB1RSTSETR_TIM7RST BIT(5)
  1141. #define RCC_APB1RSTSETR_TIM12RST BIT(6)
  1142. #define RCC_APB1RSTSETR_TIM13RST BIT(7)
  1143. #define RCC_APB1RSTSETR_TIM14RST BIT(8)
  1144. #define RCC_APB1RSTSETR_LPTIM1RST BIT(9)
  1145. #define RCC_APB1RSTSETR_SPI2RST BIT(11)
  1146. #define RCC_APB1RSTSETR_SPI3RST BIT(12)
  1147. #define RCC_APB1RSTSETR_USART2RST BIT(14)
  1148. #define RCC_APB1RSTSETR_USART3RST BIT(15)
  1149. #define RCC_APB1RSTSETR_UART4RST BIT(16)
  1150. #define RCC_APB1RSTSETR_UART5RST BIT(17)
  1151. #define RCC_APB1RSTSETR_UART7RST BIT(18)
  1152. #define RCC_APB1RSTSETR_UART8RST BIT(19)
  1153. #define RCC_APB1RSTSETR_I2C1RST BIT(21)
  1154. #define RCC_APB1RSTSETR_I2C2RST BIT(22)
  1155. #define RCC_APB1RSTSETR_I2C3RST BIT(23)
  1156. #define RCC_APB1RSTSETR_I2C5RST BIT(24)
  1157. #define RCC_APB1RSTSETR_SPDIFRST BIT(26)
  1158. #define RCC_APB1RSTSETR_CECRST BIT(27)
  1159. #define RCC_APB1RSTSETR_DAC12RST BIT(29)
  1160. #define RCC_APB1RSTSETR_MDIOSRST BIT(31)
  1161. /* RCC_APB1RSTCLRR register fields */
  1162. #define RCC_APB1RSTCLRR_TIM2RST BIT(0)
  1163. #define RCC_APB1RSTCLRR_TIM3RST BIT(1)
  1164. #define RCC_APB1RSTCLRR_TIM4RST BIT(2)
  1165. #define RCC_APB1RSTCLRR_TIM5RST BIT(3)
  1166. #define RCC_APB1RSTCLRR_TIM6RST BIT(4)
  1167. #define RCC_APB1RSTCLRR_TIM7RST BIT(5)
  1168. #define RCC_APB1RSTCLRR_TIM12RST BIT(6)
  1169. #define RCC_APB1RSTCLRR_TIM13RST BIT(7)
  1170. #define RCC_APB1RSTCLRR_TIM14RST BIT(8)
  1171. #define RCC_APB1RSTCLRR_LPTIM1RST BIT(9)
  1172. #define RCC_APB1RSTCLRR_SPI2RST BIT(11)
  1173. #define RCC_APB1RSTCLRR_SPI3RST BIT(12)
  1174. #define RCC_APB1RSTCLRR_USART2RST BIT(14)
  1175. #define RCC_APB1RSTCLRR_USART3RST BIT(15)
  1176. #define RCC_APB1RSTCLRR_UART4RST BIT(16)
  1177. #define RCC_APB1RSTCLRR_UART5RST BIT(17)
  1178. #define RCC_APB1RSTCLRR_UART7RST BIT(18)
  1179. #define RCC_APB1RSTCLRR_UART8RST BIT(19)
  1180. #define RCC_APB1RSTCLRR_I2C1RST BIT(21)
  1181. #define RCC_APB1RSTCLRR_I2C2RST BIT(22)
  1182. #define RCC_APB1RSTCLRR_I2C3RST BIT(23)
  1183. #define RCC_APB1RSTCLRR_I2C5RST BIT(24)
  1184. #define RCC_APB1RSTCLRR_SPDIFRST BIT(26)
  1185. #define RCC_APB1RSTCLRR_CECRST BIT(27)
  1186. #define RCC_APB1RSTCLRR_DAC12RST BIT(29)
  1187. #define RCC_APB1RSTCLRR_MDIOSRST BIT(31)
  1188. /* RCC_APB2RSTSETR register fields */
  1189. #define RCC_APB2RSTSETR_TIM1RST BIT(0)
  1190. #define RCC_APB2RSTSETR_TIM8RST BIT(1)
  1191. #define RCC_APB2RSTSETR_TIM15RST BIT(2)
  1192. #define RCC_APB2RSTSETR_TIM16RST BIT(3)
  1193. #define RCC_APB2RSTSETR_TIM17RST BIT(4)
  1194. #define RCC_APB2RSTSETR_SPI1RST BIT(8)
  1195. #define RCC_APB2RSTSETR_SPI4RST BIT(9)
  1196. #define RCC_APB2RSTSETR_SPI5RST BIT(10)
  1197. #define RCC_APB2RSTSETR_USART6RST BIT(13)
  1198. #define RCC_APB2RSTSETR_SAI1RST BIT(16)
  1199. #define RCC_APB2RSTSETR_SAI2RST BIT(17)
  1200. #define RCC_APB2RSTSETR_SAI3RST BIT(18)
  1201. #define RCC_APB2RSTSETR_DFSDMRST BIT(20)
  1202. #define RCC_APB2RSTSETR_FDCANRST BIT(24)
  1203. /* RCC_APB2RSTCLRR register fields */
  1204. #define RCC_APB2RSTCLRR_TIM1RST BIT(0)
  1205. #define RCC_APB2RSTCLRR_TIM8RST BIT(1)
  1206. #define RCC_APB2RSTCLRR_TIM15RST BIT(2)
  1207. #define RCC_APB2RSTCLRR_TIM16RST BIT(3)
  1208. #define RCC_APB2RSTCLRR_TIM17RST BIT(4)
  1209. #define RCC_APB2RSTCLRR_SPI1RST BIT(8)
  1210. #define RCC_APB2RSTCLRR_SPI4RST BIT(9)
  1211. #define RCC_APB2RSTCLRR_SPI5RST BIT(10)
  1212. #define RCC_APB2RSTCLRR_USART6RST BIT(13)
  1213. #define RCC_APB2RSTCLRR_SAI1RST BIT(16)
  1214. #define RCC_APB2RSTCLRR_SAI2RST BIT(17)
  1215. #define RCC_APB2RSTCLRR_SAI3RST BIT(18)
  1216. #define RCC_APB2RSTCLRR_DFSDMRST BIT(20)
  1217. #define RCC_APB2RSTCLRR_FDCANRST BIT(24)
  1218. /* RCC_APB3RSTSETR register fields */
  1219. #define RCC_APB3RSTSETR_LPTIM2RST BIT(0)
  1220. #define RCC_APB3RSTSETR_LPTIM3RST BIT(1)
  1221. #define RCC_APB3RSTSETR_LPTIM4RST BIT(2)
  1222. #define RCC_APB3RSTSETR_LPTIM5RST BIT(3)
  1223. #define RCC_APB3RSTSETR_SAI4RST BIT(8)
  1224. #define RCC_APB3RSTSETR_SYSCFGRST BIT(11)
  1225. #define RCC_APB3RSTSETR_VREFRST BIT(13)
  1226. #define RCC_APB3RSTSETR_TMPSENSRST BIT(16)
  1227. #define RCC_APB3RSTSETR_PMBCTRLRST BIT(17)
  1228. /* RCC_APB3RSTCLRR register fields */
  1229. #define RCC_APB3RSTCLRR_LPTIM2RST BIT(0)
  1230. #define RCC_APB3RSTCLRR_LPTIM3RST BIT(1)
  1231. #define RCC_APB3RSTCLRR_LPTIM4RST BIT(2)
  1232. #define RCC_APB3RSTCLRR_LPTIM5RST BIT(3)
  1233. #define RCC_APB3RSTCLRR_SAI4RST BIT(8)
  1234. #define RCC_APB3RSTCLRR_SYSCFGRST BIT(11)
  1235. #define RCC_APB3RSTCLRR_VREFRST BIT(13)
  1236. #define RCC_APB3RSTCLRR_TMPSENSRST BIT(16)
  1237. #define RCC_APB3RSTCLRR_PMBCTRLRST BIT(17)
  1238. /* RCC_AHB2RSTSETR register fields */
  1239. #define RCC_AHB2RSTSETR_DMA1RST BIT(0)
  1240. #define RCC_AHB2RSTSETR_DMA2RST BIT(1)
  1241. #define RCC_AHB2RSTSETR_DMAMUXRST BIT(2)
  1242. #define RCC_AHB2RSTSETR_ADC12RST BIT(5)
  1243. #define RCC_AHB2RSTSETR_USBORST BIT(8)
  1244. #define RCC_AHB2RSTSETR_SDMMC3RST BIT(16)
  1245. /* RCC_AHB2RSTCLRR register fields */
  1246. #define RCC_AHB2RSTCLRR_DMA1RST BIT(0)
  1247. #define RCC_AHB2RSTCLRR_DMA2RST BIT(1)
  1248. #define RCC_AHB2RSTCLRR_DMAMUXRST BIT(2)
  1249. #define RCC_AHB2RSTCLRR_ADC12RST BIT(5)
  1250. #define RCC_AHB2RSTCLRR_USBORST BIT(8)
  1251. #define RCC_AHB2RSTCLRR_SDMMC3RST BIT(16)
  1252. /* RCC_AHB3RSTSETR register fields */
  1253. #define RCC_AHB3RSTSETR_DCMIRST BIT(0)
  1254. #define RCC_AHB3RSTSETR_CRYP2RST BIT(4)
  1255. #define RCC_AHB3RSTSETR_HASH2RST BIT(5)
  1256. #define RCC_AHB3RSTSETR_RNG2RST BIT(6)
  1257. #define RCC_AHB3RSTSETR_CRC2RST BIT(7)
  1258. #define RCC_AHB3RSTSETR_HSEMRST BIT(11)
  1259. #define RCC_AHB3RSTSETR_IPCCRST BIT(12)
  1260. /* RCC_AHB3RSTCLRR register fields */
  1261. #define RCC_AHB3RSTCLRR_DCMIRST BIT(0)
  1262. #define RCC_AHB3RSTCLRR_CRYP2RST BIT(4)
  1263. #define RCC_AHB3RSTCLRR_HASH2RST BIT(5)
  1264. #define RCC_AHB3RSTCLRR_RNG2RST BIT(6)
  1265. #define RCC_AHB3RSTCLRR_CRC2RST BIT(7)
  1266. #define RCC_AHB3RSTCLRR_HSEMRST BIT(11)
  1267. #define RCC_AHB3RSTCLRR_IPCCRST BIT(12)
  1268. /* RCC_AHB4RSTSETR register fields */
  1269. #define RCC_AHB4RSTSETR_GPIOARST BIT(0)
  1270. #define RCC_AHB4RSTSETR_GPIOBRST BIT(1)
  1271. #define RCC_AHB4RSTSETR_GPIOCRST BIT(2)
  1272. #define RCC_AHB4RSTSETR_GPIODRST BIT(3)
  1273. #define RCC_AHB4RSTSETR_GPIOERST BIT(4)
  1274. #define RCC_AHB4RSTSETR_GPIOFRST BIT(5)
  1275. #define RCC_AHB4RSTSETR_GPIOGRST BIT(6)
  1276. #define RCC_AHB4RSTSETR_GPIOHRST BIT(7)
  1277. #define RCC_AHB4RSTSETR_GPIOIRST BIT(8)
  1278. #define RCC_AHB4RSTSETR_GPIOJRST BIT(9)
  1279. #define RCC_AHB4RSTSETR_GPIOKRST BIT(10)
  1280. /* RCC_AHB4RSTCLRR register fields */
  1281. #define RCC_AHB4RSTCLRR_GPIOARST BIT(0)
  1282. #define RCC_AHB4RSTCLRR_GPIOBRST BIT(1)
  1283. #define RCC_AHB4RSTCLRR_GPIOCRST BIT(2)
  1284. #define RCC_AHB4RSTCLRR_GPIODRST BIT(3)
  1285. #define RCC_AHB4RSTCLRR_GPIOERST BIT(4)
  1286. #define RCC_AHB4RSTCLRR_GPIOFRST BIT(5)
  1287. #define RCC_AHB4RSTCLRR_GPIOGRST BIT(6)
  1288. #define RCC_AHB4RSTCLRR_GPIOHRST BIT(7)
  1289. #define RCC_AHB4RSTCLRR_GPIOIRST BIT(8)
  1290. #define RCC_AHB4RSTCLRR_GPIOJRST BIT(9)
  1291. #define RCC_AHB4RSTCLRR_GPIOKRST BIT(10)
  1292. /* RCC_MP_APB1ENSETR register fields */
  1293. #define RCC_MP_APB1ENSETR_TIM2EN BIT(0)
  1294. #define RCC_MP_APB1ENSETR_TIM3EN BIT(1)
  1295. #define RCC_MP_APB1ENSETR_TIM4EN BIT(2)
  1296. #define RCC_MP_APB1ENSETR_TIM5EN BIT(3)
  1297. #define RCC_MP_APB1ENSETR_TIM6EN BIT(4)
  1298. #define RCC_MP_APB1ENSETR_TIM7EN BIT(5)
  1299. #define RCC_MP_APB1ENSETR_TIM12EN BIT(6)
  1300. #define RCC_MP_APB1ENSETR_TIM13EN BIT(7)
  1301. #define RCC_MP_APB1ENSETR_TIM14EN BIT(8)
  1302. #define RCC_MP_APB1ENSETR_LPTIM1EN BIT(9)
  1303. #define RCC_MP_APB1ENSETR_SPI2EN BIT(11)
  1304. #define RCC_MP_APB1ENSETR_SPI3EN BIT(12)
  1305. #define RCC_MP_APB1ENSETR_USART2EN BIT(14)
  1306. #define RCC_MP_APB1ENSETR_USART3EN BIT(15)
  1307. #define RCC_MP_APB1ENSETR_UART4EN BIT(16)
  1308. #define RCC_MP_APB1ENSETR_UART5EN BIT(17)
  1309. #define RCC_MP_APB1ENSETR_UART7EN BIT(18)
  1310. #define RCC_MP_APB1ENSETR_UART8EN BIT(19)
  1311. #define RCC_MP_APB1ENSETR_I2C1EN BIT(21)
  1312. #define RCC_MP_APB1ENSETR_I2C2EN BIT(22)
  1313. #define RCC_MP_APB1ENSETR_I2C3EN BIT(23)
  1314. #define RCC_MP_APB1ENSETR_I2C5EN BIT(24)
  1315. #define RCC_MP_APB1ENSETR_SPDIFEN BIT(26)
  1316. #define RCC_MP_APB1ENSETR_CECEN BIT(27)
  1317. #define RCC_MP_APB1ENSETR_DAC12EN BIT(29)
  1318. #define RCC_MP_APB1ENSETR_MDIOSEN BIT(31)
  1319. /* RCC_MP_APB1ENCLRR register fields */
  1320. #define RCC_MP_APB1ENCLRR_TIM2EN BIT(0)
  1321. #define RCC_MP_APB1ENCLRR_TIM3EN BIT(1)
  1322. #define RCC_MP_APB1ENCLRR_TIM4EN BIT(2)
  1323. #define RCC_MP_APB1ENCLRR_TIM5EN BIT(3)
  1324. #define RCC_MP_APB1ENCLRR_TIM6EN BIT(4)
  1325. #define RCC_MP_APB1ENCLRR_TIM7EN BIT(5)
  1326. #define RCC_MP_APB1ENCLRR_TIM12EN BIT(6)
  1327. #define RCC_MP_APB1ENCLRR_TIM13EN BIT(7)
  1328. #define RCC_MP_APB1ENCLRR_TIM14EN BIT(8)
  1329. #define RCC_MP_APB1ENCLRR_LPTIM1EN BIT(9)
  1330. #define RCC_MP_APB1ENCLRR_SPI2EN BIT(11)
  1331. #define RCC_MP_APB1ENCLRR_SPI3EN BIT(12)
  1332. #define RCC_MP_APB1ENCLRR_USART2EN BIT(14)
  1333. #define RCC_MP_APB1ENCLRR_USART3EN BIT(15)
  1334. #define RCC_MP_APB1ENCLRR_UART4EN BIT(16)
  1335. #define RCC_MP_APB1ENCLRR_UART5EN BIT(17)
  1336. #define RCC_MP_APB1ENCLRR_UART7EN BIT(18)
  1337. #define RCC_MP_APB1ENCLRR_UART8EN BIT(19)
  1338. #define RCC_MP_APB1ENCLRR_I2C1EN BIT(21)
  1339. #define RCC_MP_APB1ENCLRR_I2C2EN BIT(22)
  1340. #define RCC_MP_APB1ENCLRR_I2C3EN BIT(23)
  1341. #define RCC_MP_APB1ENCLRR_I2C5EN BIT(24)
  1342. #define RCC_MP_APB1ENCLRR_SPDIFEN BIT(26)
  1343. #define RCC_MP_APB1ENCLRR_CECEN BIT(27)
  1344. #define RCC_MP_APB1ENCLRR_DAC12EN BIT(29)
  1345. #define RCC_MP_APB1ENCLRR_MDIOSEN BIT(31)
  1346. /* RCC_MP_APB2ENSETR register fields */
  1347. #define RCC_MP_APB2ENSETR_TIM1EN BIT(0)
  1348. #define RCC_MP_APB2ENSETR_TIM8EN BIT(1)
  1349. #define RCC_MP_APB2ENSETR_TIM15EN BIT(2)
  1350. #define RCC_MP_APB2ENSETR_TIM16EN BIT(3)
  1351. #define RCC_MP_APB2ENSETR_TIM17EN BIT(4)
  1352. #define RCC_MP_APB2ENSETR_SPI1EN BIT(8)
  1353. #define RCC_MP_APB2ENSETR_SPI4EN BIT(9)
  1354. #define RCC_MP_APB2ENSETR_SPI5EN BIT(10)
  1355. #define RCC_MP_APB2ENSETR_USART6EN BIT(13)
  1356. #define RCC_MP_APB2ENSETR_SAI1EN BIT(16)
  1357. #define RCC_MP_APB2ENSETR_SAI2EN BIT(17)
  1358. #define RCC_MP_APB2ENSETR_SAI3EN BIT(18)
  1359. #define RCC_MP_APB2ENSETR_DFSDMEN BIT(20)
  1360. #define RCC_MP_APB2ENSETR_ADFSDMEN BIT(21)
  1361. #define RCC_MP_APB2ENSETR_FDCANEN BIT(24)
  1362. /* RCC_MP_APB2ENCLRR register fields */
  1363. #define RCC_MP_APB2ENCLRR_TIM1EN BIT(0)
  1364. #define RCC_MP_APB2ENCLRR_TIM8EN BIT(1)
  1365. #define RCC_MP_APB2ENCLRR_TIM15EN BIT(2)
  1366. #define RCC_MP_APB2ENCLRR_TIM16EN BIT(3)
  1367. #define RCC_MP_APB2ENCLRR_TIM17EN BIT(4)
  1368. #define RCC_MP_APB2ENCLRR_SPI1EN BIT(8)
  1369. #define RCC_MP_APB2ENCLRR_SPI4EN BIT(9)
  1370. #define RCC_MP_APB2ENCLRR_SPI5EN BIT(10)
  1371. #define RCC_MP_APB2ENCLRR_USART6EN BIT(13)
  1372. #define RCC_MP_APB2ENCLRR_SAI1EN BIT(16)
  1373. #define RCC_MP_APB2ENCLRR_SAI2EN BIT(17)
  1374. #define RCC_MP_APB2ENCLRR_SAI3EN BIT(18)
  1375. #define RCC_MP_APB2ENCLRR_DFSDMEN BIT(20)
  1376. #define RCC_MP_APB2ENCLRR_ADFSDMEN BIT(21)
  1377. #define RCC_MP_APB2ENCLRR_FDCANEN BIT(24)
  1378. /* RCC_MP_APB3ENSETR register fields */
  1379. #define RCC_MP_APB3ENSETR_LPTIM2EN BIT(0)
  1380. #define RCC_MP_APB3ENSETR_LPTIM3EN BIT(1)
  1381. #define RCC_MP_APB3ENSETR_LPTIM4EN BIT(2)
  1382. #define RCC_MP_APB3ENSETR_LPTIM5EN BIT(3)
  1383. #define RCC_MP_APB3ENSETR_SAI4EN BIT(8)
  1384. #define RCC_MP_APB3ENSETR_SYSCFGEN BIT(11)
  1385. #define RCC_MP_APB3ENSETR_VREFEN BIT(13)
  1386. #define RCC_MP_APB3ENSETR_TMPSENSEN BIT(16)
  1387. #define RCC_MP_APB3ENSETR_PMBCTRLEN BIT(17)
  1388. #define RCC_MP_APB3ENSETR_HDPEN BIT(20)
  1389. /* RCC_MP_APB3ENCLRR register fields */
  1390. #define RCC_MP_APB3ENCLRR_LPTIM2EN BIT(0)
  1391. #define RCC_MP_APB3ENCLRR_LPTIM3EN BIT(1)
  1392. #define RCC_MP_APB3ENCLRR_LPTIM4EN BIT(2)
  1393. #define RCC_MP_APB3ENCLRR_LPTIM5EN BIT(3)
  1394. #define RCC_MP_APB3ENCLRR_SAI4EN BIT(8)
  1395. #define RCC_MP_APB3ENCLRR_SYSCFGEN BIT(11)
  1396. #define RCC_MP_APB3ENCLRR_VREFEN BIT(13)
  1397. #define RCC_MP_APB3ENCLRR_TMPSENSEN BIT(16)
  1398. #define RCC_MP_APB3ENCLRR_PMBCTRLEN BIT(17)
  1399. #define RCC_MP_APB3ENCLRR_HDPEN BIT(20)
  1400. /* RCC_MP_AHB2ENSETR register fields */
  1401. #define RCC_MP_AHB2ENSETR_DMA1EN BIT(0)
  1402. #define RCC_MP_AHB2ENSETR_DMA2EN BIT(1)
  1403. #define RCC_MP_AHB2ENSETR_DMAMUXEN BIT(2)
  1404. #define RCC_MP_AHB2ENSETR_ADC12EN BIT(5)
  1405. #define RCC_MP_AHB2ENSETR_USBOEN BIT(8)
  1406. #define RCC_MP_AHB2ENSETR_SDMMC3EN BIT(16)
  1407. /* RCC_MP_AHB2ENCLRR register fields */
  1408. #define RCC_MP_AHB2ENCLRR_DMA1EN BIT(0)
  1409. #define RCC_MP_AHB2ENCLRR_DMA2EN BIT(1)
  1410. #define RCC_MP_AHB2ENCLRR_DMAMUXEN BIT(2)
  1411. #define RCC_MP_AHB2ENCLRR_ADC12EN BIT(5)
  1412. #define RCC_MP_AHB2ENCLRR_USBOEN BIT(8)
  1413. #define RCC_MP_AHB2ENCLRR_SDMMC3EN BIT(16)
  1414. /* RCC_MP_AHB3ENSETR register fields */
  1415. #define RCC_MP_AHB3ENSETR_DCMIEN BIT(0)
  1416. #define RCC_MP_AHB3ENSETR_CRYP2EN BIT(4)
  1417. #define RCC_MP_AHB3ENSETR_HASH2EN BIT(5)
  1418. #define RCC_MP_AHB3ENSETR_RNG2EN BIT(6)
  1419. #define RCC_MP_AHB3ENSETR_CRC2EN BIT(7)
  1420. #define RCC_MP_AHB3ENSETR_HSEMEN BIT(11)
  1421. #define RCC_MP_AHB3ENSETR_IPCCEN BIT(12)
  1422. /* RCC_MP_AHB3ENCLRR register fields */
  1423. #define RCC_MP_AHB3ENCLRR_DCMIEN BIT(0)
  1424. #define RCC_MP_AHB3ENCLRR_CRYP2EN BIT(4)
  1425. #define RCC_MP_AHB3ENCLRR_HASH2EN BIT(5)
  1426. #define RCC_MP_AHB3ENCLRR_RNG2EN BIT(6)
  1427. #define RCC_MP_AHB3ENCLRR_CRC2EN BIT(7)
  1428. #define RCC_MP_AHB3ENCLRR_HSEMEN BIT(11)
  1429. #define RCC_MP_AHB3ENCLRR_IPCCEN BIT(12)
  1430. /* RCC_MP_AHB4ENSETR register fields */
  1431. #define RCC_MP_AHB4ENSETR_GPIOAEN BIT(0)
  1432. #define RCC_MP_AHB4ENSETR_GPIOBEN BIT(1)
  1433. #define RCC_MP_AHB4ENSETR_GPIOCEN BIT(2)
  1434. #define RCC_MP_AHB4ENSETR_GPIODEN BIT(3)
  1435. #define RCC_MP_AHB4ENSETR_GPIOEEN BIT(4)
  1436. #define RCC_MP_AHB4ENSETR_GPIOFEN BIT(5)
  1437. #define RCC_MP_AHB4ENSETR_GPIOGEN BIT(6)
  1438. #define RCC_MP_AHB4ENSETR_GPIOHEN BIT(7)
  1439. #define RCC_MP_AHB4ENSETR_GPIOIEN BIT(8)
  1440. #define RCC_MP_AHB4ENSETR_GPIOJEN BIT(9)
  1441. #define RCC_MP_AHB4ENSETR_GPIOKEN BIT(10)
  1442. /* RCC_MP_AHB4ENCLRR register fields */
  1443. #define RCC_MP_AHB4ENCLRR_GPIOAEN BIT(0)
  1444. #define RCC_MP_AHB4ENCLRR_GPIOBEN BIT(1)
  1445. #define RCC_MP_AHB4ENCLRR_GPIOCEN BIT(2)
  1446. #define RCC_MP_AHB4ENCLRR_GPIODEN BIT(3)
  1447. #define RCC_MP_AHB4ENCLRR_GPIOEEN BIT(4)
  1448. #define RCC_MP_AHB4ENCLRR_GPIOFEN BIT(5)
  1449. #define RCC_MP_AHB4ENCLRR_GPIOGEN BIT(6)
  1450. #define RCC_MP_AHB4ENCLRR_GPIOHEN BIT(7)
  1451. #define RCC_MP_AHB4ENCLRR_GPIOIEN BIT(8)
  1452. #define RCC_MP_AHB4ENCLRR_GPIOJEN BIT(9)
  1453. #define RCC_MP_AHB4ENCLRR_GPIOKEN BIT(10)
  1454. /* RCC_MP_MLAHBENSETR register fields */
  1455. #define RCC_MP_MLAHBENSETR_RETRAMEN BIT(4)
  1456. /* RCC_MP_MLAHBENCLRR register fields */
  1457. #define RCC_MP_MLAHBENCLRR_RETRAMEN BIT(4)
  1458. /* RCC_MC_APB1ENSETR register fields */
  1459. #define RCC_MC_APB1ENSETR_TIM2EN BIT(0)
  1460. #define RCC_MC_APB1ENSETR_TIM3EN BIT(1)
  1461. #define RCC_MC_APB1ENSETR_TIM4EN BIT(2)
  1462. #define RCC_MC_APB1ENSETR_TIM5EN BIT(3)
  1463. #define RCC_MC_APB1ENSETR_TIM6EN BIT(4)
  1464. #define RCC_MC_APB1ENSETR_TIM7EN BIT(5)
  1465. #define RCC_MC_APB1ENSETR_TIM12EN BIT(6)
  1466. #define RCC_MC_APB1ENSETR_TIM13EN BIT(7)
  1467. #define RCC_MC_APB1ENSETR_TIM14EN BIT(8)
  1468. #define RCC_MC_APB1ENSETR_LPTIM1EN BIT(9)
  1469. #define RCC_MC_APB1ENSETR_SPI2EN BIT(11)
  1470. #define RCC_MC_APB1ENSETR_SPI3EN BIT(12)
  1471. #define RCC_MC_APB1ENSETR_USART2EN BIT(14)
  1472. #define RCC_MC_APB1ENSETR_USART3EN BIT(15)
  1473. #define RCC_MC_APB1ENSETR_UART4EN BIT(16)
  1474. #define RCC_MC_APB1ENSETR_UART5EN BIT(17)
  1475. #define RCC_MC_APB1ENSETR_UART7EN BIT(18)
  1476. #define RCC_MC_APB1ENSETR_UART8EN BIT(19)
  1477. #define RCC_MC_APB1ENSETR_I2C1EN BIT(21)
  1478. #define RCC_MC_APB1ENSETR_I2C2EN BIT(22)
  1479. #define RCC_MC_APB1ENSETR_I2C3EN BIT(23)
  1480. #define RCC_MC_APB1ENSETR_I2C5EN BIT(24)
  1481. #define RCC_MC_APB1ENSETR_SPDIFEN BIT(26)
  1482. #define RCC_MC_APB1ENSETR_CECEN BIT(27)
  1483. #define RCC_MC_APB1ENSETR_WWDG1EN BIT(28)
  1484. #define RCC_MC_APB1ENSETR_DAC12EN BIT(29)
  1485. #define RCC_MC_APB1ENSETR_MDIOSEN BIT(31)
  1486. /* RCC_MC_APB1ENCLRR register fields */
  1487. #define RCC_MC_APB1ENCLRR_TIM2EN BIT(0)
  1488. #define RCC_MC_APB1ENCLRR_TIM3EN BIT(1)
  1489. #define RCC_MC_APB1ENCLRR_TIM4EN BIT(2)
  1490. #define RCC_MC_APB1ENCLRR_TIM5EN BIT(3)
  1491. #define RCC_MC_APB1ENCLRR_TIM6EN BIT(4)
  1492. #define RCC_MC_APB1ENCLRR_TIM7EN BIT(5)
  1493. #define RCC_MC_APB1ENCLRR_TIM12EN BIT(6)
  1494. #define RCC_MC_APB1ENCLRR_TIM13EN BIT(7)
  1495. #define RCC_MC_APB1ENCLRR_TIM14EN BIT(8)
  1496. #define RCC_MC_APB1ENCLRR_LPTIM1EN BIT(9)
  1497. #define RCC_MC_APB1ENCLRR_SPI2EN BIT(11)
  1498. #define RCC_MC_APB1ENCLRR_SPI3EN BIT(12)
  1499. #define RCC_MC_APB1ENCLRR_USART2EN BIT(14)
  1500. #define RCC_MC_APB1ENCLRR_USART3EN BIT(15)
  1501. #define RCC_MC_APB1ENCLRR_UART4EN BIT(16)
  1502. #define RCC_MC_APB1ENCLRR_UART5EN BIT(17)
  1503. #define RCC_MC_APB1ENCLRR_UART7EN BIT(18)
  1504. #define RCC_MC_APB1ENCLRR_UART8EN BIT(19)
  1505. #define RCC_MC_APB1ENCLRR_I2C1EN BIT(21)
  1506. #define RCC_MC_APB1ENCLRR_I2C2EN BIT(22)
  1507. #define RCC_MC_APB1ENCLRR_I2C3EN BIT(23)
  1508. #define RCC_MC_APB1ENCLRR_I2C5EN BIT(24)
  1509. #define RCC_MC_APB1ENCLRR_SPDIFEN BIT(26)
  1510. #define RCC_MC_APB1ENCLRR_CECEN BIT(27)
  1511. #define RCC_MC_APB1ENCLRR_DAC12EN BIT(29)
  1512. #define RCC_MC_APB1ENCLRR_MDIOSEN BIT(31)
  1513. /* RCC_MC_APB2ENSETR register fields */
  1514. #define RCC_MC_APB2ENSETR_TIM1EN BIT(0)
  1515. #define RCC_MC_APB2ENSETR_TIM8EN BIT(1)
  1516. #define RCC_MC_APB2ENSETR_TIM15EN BIT(2)
  1517. #define RCC_MC_APB2ENSETR_TIM16EN BIT(3)
  1518. #define RCC_MC_APB2ENSETR_TIM17EN BIT(4)
  1519. #define RCC_MC_APB2ENSETR_SPI1EN BIT(8)
  1520. #define RCC_MC_APB2ENSETR_SPI4EN BIT(9)
  1521. #define RCC_MC_APB2ENSETR_SPI5EN BIT(10)
  1522. #define RCC_MC_APB2ENSETR_USART6EN BIT(13)
  1523. #define RCC_MC_APB2ENSETR_SAI1EN BIT(16)
  1524. #define RCC_MC_APB2ENSETR_SAI2EN BIT(17)
  1525. #define RCC_MC_APB2ENSETR_SAI3EN BIT(18)
  1526. #define RCC_MC_APB2ENSETR_DFSDMEN BIT(20)
  1527. #define RCC_MC_APB2ENSETR_ADFSDMEN BIT(21)
  1528. #define RCC_MC_APB2ENSETR_FDCANEN BIT(24)
  1529. /* RCC_MC_APB2ENCLRR register fields */
  1530. #define RCC_MC_APB2ENCLRR_TIM1EN BIT(0)
  1531. #define RCC_MC_APB2ENCLRR_TIM8EN BIT(1)
  1532. #define RCC_MC_APB2ENCLRR_TIM15EN BIT(2)
  1533. #define RCC_MC_APB2ENCLRR_TIM16EN BIT(3)
  1534. #define RCC_MC_APB2ENCLRR_TIM17EN BIT(4)
  1535. #define RCC_MC_APB2ENCLRR_SPI1EN BIT(8)
  1536. #define RCC_MC_APB2ENCLRR_SPI4EN BIT(9)
  1537. #define RCC_MC_APB2ENCLRR_SPI5EN BIT(10)
  1538. #define RCC_MC_APB2ENCLRR_USART6EN BIT(13)
  1539. #define RCC_MC_APB2ENCLRR_SAI1EN BIT(16)
  1540. #define RCC_MC_APB2ENCLRR_SAI2EN BIT(17)
  1541. #define RCC_MC_APB2ENCLRR_SAI3EN BIT(18)
  1542. #define RCC_MC_APB2ENCLRR_DFSDMEN BIT(20)
  1543. #define RCC_MC_APB2ENCLRR_ADFSDMEN BIT(21)
  1544. #define RCC_MC_APB2ENCLRR_FDCANEN BIT(24)
  1545. /* RCC_MC_APB3ENSETR register fields */
  1546. #define RCC_MC_APB3ENSETR_LPTIM2EN BIT(0)
  1547. #define RCC_MC_APB3ENSETR_LPTIM3EN BIT(1)
  1548. #define RCC_MC_APB3ENSETR_LPTIM4EN BIT(2)
  1549. #define RCC_MC_APB3ENSETR_LPTIM5EN BIT(3)
  1550. #define RCC_MC_APB3ENSETR_SAI4EN BIT(8)
  1551. #define RCC_MC_APB3ENSETR_SYSCFGEN BIT(11)
  1552. #define RCC_MC_APB3ENSETR_VREFEN BIT(13)
  1553. #define RCC_MC_APB3ENSETR_TMPSENSEN BIT(16)
  1554. #define RCC_MC_APB3ENSETR_PMBCTRLEN BIT(17)
  1555. #define RCC_MC_APB3ENSETR_HDPEN BIT(20)
  1556. /* RCC_MC_APB3ENCLRR register fields */
  1557. #define RCC_MC_APB3ENCLRR_LPTIM2EN BIT(0)
  1558. #define RCC_MC_APB3ENCLRR_LPTIM3EN BIT(1)
  1559. #define RCC_MC_APB3ENCLRR_LPTIM4EN BIT(2)
  1560. #define RCC_MC_APB3ENCLRR_LPTIM5EN BIT(3)
  1561. #define RCC_MC_APB3ENCLRR_SAI4EN BIT(8)
  1562. #define RCC_MC_APB3ENCLRR_SYSCFGEN BIT(11)
  1563. #define RCC_MC_APB3ENCLRR_VREFEN BIT(13)
  1564. #define RCC_MC_APB3ENCLRR_TMPSENSEN BIT(16)
  1565. #define RCC_MC_APB3ENCLRR_PMBCTRLEN BIT(17)
  1566. #define RCC_MC_APB3ENCLRR_HDPEN BIT(20)
  1567. /* RCC_MC_AHB2ENSETR register fields */
  1568. #define RCC_MC_AHB2ENSETR_DMA1EN BIT(0)
  1569. #define RCC_MC_AHB2ENSETR_DMA2EN BIT(1)
  1570. #define RCC_MC_AHB2ENSETR_DMAMUXEN BIT(2)
  1571. #define RCC_MC_AHB2ENSETR_ADC12EN BIT(5)
  1572. #define RCC_MC_AHB2ENSETR_USBOEN BIT(8)
  1573. #define RCC_MC_AHB2ENSETR_SDMMC3EN BIT(16)
  1574. /* RCC_MC_AHB2ENCLRR register fields */
  1575. #define RCC_MC_AHB2ENCLRR_DMA1EN BIT(0)
  1576. #define RCC_MC_AHB2ENCLRR_DMA2EN BIT(1)
  1577. #define RCC_MC_AHB2ENCLRR_DMAMUXEN BIT(2)
  1578. #define RCC_MC_AHB2ENCLRR_ADC12EN BIT(5)
  1579. #define RCC_MC_AHB2ENCLRR_USBOEN BIT(8)
  1580. #define RCC_MC_AHB2ENCLRR_SDMMC3EN BIT(16)
  1581. /* RCC_MC_AHB3ENSETR register fields */
  1582. #define RCC_MC_AHB3ENSETR_DCMIEN BIT(0)
  1583. #define RCC_MC_AHB3ENSETR_CRYP2EN BIT(4)
  1584. #define RCC_MC_AHB3ENSETR_HASH2EN BIT(5)
  1585. #define RCC_MC_AHB3ENSETR_RNG2EN BIT(6)
  1586. #define RCC_MC_AHB3ENSETR_CRC2EN BIT(7)
  1587. #define RCC_MC_AHB3ENSETR_HSEMEN BIT(11)
  1588. #define RCC_MC_AHB3ENSETR_IPCCEN BIT(12)
  1589. /* RCC_MC_AHB3ENCLRR register fields */
  1590. #define RCC_MC_AHB3ENCLRR_DCMIEN BIT(0)
  1591. #define RCC_MC_AHB3ENCLRR_CRYP2EN BIT(4)
  1592. #define RCC_MC_AHB3ENCLRR_HASH2EN BIT(5)
  1593. #define RCC_MC_AHB3ENCLRR_RNG2EN BIT(6)
  1594. #define RCC_MC_AHB3ENCLRR_CRC2EN BIT(7)
  1595. #define RCC_MC_AHB3ENCLRR_HSEMEN BIT(11)
  1596. #define RCC_MC_AHB3ENCLRR_IPCCEN BIT(12)
  1597. /* RCC_MC_AHB4ENSETR register fields */
  1598. #define RCC_MC_AHB4ENSETR_GPIOAEN BIT(0)
  1599. #define RCC_MC_AHB4ENSETR_GPIOBEN BIT(1)
  1600. #define RCC_MC_AHB4ENSETR_GPIOCEN BIT(2)
  1601. #define RCC_MC_AHB4ENSETR_GPIODEN BIT(3)
  1602. #define RCC_MC_AHB4ENSETR_GPIOEEN BIT(4)
  1603. #define RCC_MC_AHB4ENSETR_GPIOFEN BIT(5)
  1604. #define RCC_MC_AHB4ENSETR_GPIOGEN BIT(6)
  1605. #define RCC_MC_AHB4ENSETR_GPIOHEN BIT(7)
  1606. #define RCC_MC_AHB4ENSETR_GPIOIEN BIT(8)
  1607. #define RCC_MC_AHB4ENSETR_GPIOJEN BIT(9)
  1608. #define RCC_MC_AHB4ENSETR_GPIOKEN BIT(10)
  1609. /* RCC_MC_AHB4ENCLRR register fields */
  1610. #define RCC_MC_AHB4ENCLRR_GPIOAEN BIT(0)
  1611. #define RCC_MC_AHB4ENCLRR_GPIOBEN BIT(1)
  1612. #define RCC_MC_AHB4ENCLRR_GPIOCEN BIT(2)
  1613. #define RCC_MC_AHB4ENCLRR_GPIODEN BIT(3)
  1614. #define RCC_MC_AHB4ENCLRR_GPIOEEN BIT(4)
  1615. #define RCC_MC_AHB4ENCLRR_GPIOFEN BIT(5)
  1616. #define RCC_MC_AHB4ENCLRR_GPIOGEN BIT(6)
  1617. #define RCC_MC_AHB4ENCLRR_GPIOHEN BIT(7)
  1618. #define RCC_MC_AHB4ENCLRR_GPIOIEN BIT(8)
  1619. #define RCC_MC_AHB4ENCLRR_GPIOJEN BIT(9)
  1620. #define RCC_MC_AHB4ENCLRR_GPIOKEN BIT(10)
  1621. /* RCC_MC_AXIMENSETR register fields */
  1622. #define RCC_MC_AXIMENSETR_SYSRAMEN BIT(0)
  1623. /* RCC_MC_AXIMENCLRR register fields */
  1624. #define RCC_MC_AXIMENCLRR_SYSRAMEN BIT(0)
  1625. /* RCC_MC_MLAHBENSETR register fields */
  1626. #define RCC_MC_MLAHBENSETR_RETRAMEN BIT(4)
  1627. /* RCC_MC_MLAHBENCLRR register fields */
  1628. #define RCC_MC_MLAHBENCLRR_RETRAMEN BIT(4)
  1629. /* RCC_MP_APB1LPENSETR register fields */
  1630. #define RCC_MP_APB1LPENSETR_TIM2LPEN BIT(0)
  1631. #define RCC_MP_APB1LPENSETR_TIM3LPEN BIT(1)
  1632. #define RCC_MP_APB1LPENSETR_TIM4LPEN BIT(2)
  1633. #define RCC_MP_APB1LPENSETR_TIM5LPEN BIT(3)
  1634. #define RCC_MP_APB1LPENSETR_TIM6LPEN BIT(4)
  1635. #define RCC_MP_APB1LPENSETR_TIM7LPEN BIT(5)
  1636. #define RCC_MP_APB1LPENSETR_TIM12LPEN BIT(6)
  1637. #define RCC_MP_APB1LPENSETR_TIM13LPEN BIT(7)
  1638. #define RCC_MP_APB1LPENSETR_TIM14LPEN BIT(8)
  1639. #define RCC_MP_APB1LPENSETR_LPTIM1LPEN BIT(9)
  1640. #define RCC_MP_APB1LPENSETR_SPI2LPEN BIT(11)
  1641. #define RCC_MP_APB1LPENSETR_SPI3LPEN BIT(12)
  1642. #define RCC_MP_APB1LPENSETR_USART2LPEN BIT(14)
  1643. #define RCC_MP_APB1LPENSETR_USART3LPEN BIT(15)
  1644. #define RCC_MP_APB1LPENSETR_UART4LPEN BIT(16)
  1645. #define RCC_MP_APB1LPENSETR_UART5LPEN BIT(17)
  1646. #define RCC_MP_APB1LPENSETR_UART7LPEN BIT(18)
  1647. #define RCC_MP_APB1LPENSETR_UART8LPEN BIT(19)
  1648. #define RCC_MP_APB1LPENSETR_I2C1LPEN BIT(21)
  1649. #define RCC_MP_APB1LPENSETR_I2C2LPEN BIT(22)
  1650. #define RCC_MP_APB1LPENSETR_I2C3LPEN BIT(23)
  1651. #define RCC_MP_APB1LPENSETR_I2C5LPEN BIT(24)
  1652. #define RCC_MP_APB1LPENSETR_SPDIFLPEN BIT(26)
  1653. #define RCC_MP_APB1LPENSETR_CECLPEN BIT(27)
  1654. #define RCC_MP_APB1LPENSETR_DAC12LPEN BIT(29)
  1655. #define RCC_MP_APB1LPENSETR_MDIOSLPEN BIT(31)
  1656. /* RCC_MP_APB1LPENCLRR register fields */
  1657. #define RCC_MP_APB1LPENCLRR_TIM2LPEN BIT(0)
  1658. #define RCC_MP_APB1LPENCLRR_TIM3LPEN BIT(1)
  1659. #define RCC_MP_APB1LPENCLRR_TIM4LPEN BIT(2)
  1660. #define RCC_MP_APB1LPENCLRR_TIM5LPEN BIT(3)
  1661. #define RCC_MP_APB1LPENCLRR_TIM6LPEN BIT(4)
  1662. #define RCC_MP_APB1LPENCLRR_TIM7LPEN BIT(5)
  1663. #define RCC_MP_APB1LPENCLRR_TIM12LPEN BIT(6)
  1664. #define RCC_MP_APB1LPENCLRR_TIM13LPEN BIT(7)
  1665. #define RCC_MP_APB1LPENCLRR_TIM14LPEN BIT(8)
  1666. #define RCC_MP_APB1LPENCLRR_LPTIM1LPEN BIT(9)
  1667. #define RCC_MP_APB1LPENCLRR_SPI2LPEN BIT(11)
  1668. #define RCC_MP_APB1LPENCLRR_SPI3LPEN BIT(12)
  1669. #define RCC_MP_APB1LPENCLRR_USART2LPEN BIT(14)
  1670. #define RCC_MP_APB1LPENCLRR_USART3LPEN BIT(15)
  1671. #define RCC_MP_APB1LPENCLRR_UART4LPEN BIT(16)
  1672. #define RCC_MP_APB1LPENCLRR_UART5LPEN BIT(17)
  1673. #define RCC_MP_APB1LPENCLRR_UART7LPEN BIT(18)
  1674. #define RCC_MP_APB1LPENCLRR_UART8LPEN BIT(19)
  1675. #define RCC_MP_APB1LPENCLRR_I2C1LPEN BIT(21)
  1676. #define RCC_MP_APB1LPENCLRR_I2C2LPEN BIT(22)
  1677. #define RCC_MP_APB1LPENCLRR_I2C3LPEN BIT(23)
  1678. #define RCC_MP_APB1LPENCLRR_I2C5LPEN BIT(24)
  1679. #define RCC_MP_APB1LPENCLRR_SPDIFLPEN BIT(26)
  1680. #define RCC_MP_APB1LPENCLRR_CECLPEN BIT(27)
  1681. #define RCC_MP_APB1LPENCLRR_DAC12LPEN BIT(29)
  1682. #define RCC_MP_APB1LPENCLRR_MDIOSLPEN BIT(31)
  1683. /* RCC_MP_APB2LPENSETR register fields */
  1684. #define RCC_MP_APB2LPENSETR_TIM1LPEN BIT(0)
  1685. #define RCC_MP_APB2LPENSETR_TIM8LPEN BIT(1)
  1686. #define RCC_MP_APB2LPENSETR_TIM15LPEN BIT(2)
  1687. #define RCC_MP_APB2LPENSETR_TIM16LPEN BIT(3)
  1688. #define RCC_MP_APB2LPENSETR_TIM17LPEN BIT(4)
  1689. #define RCC_MP_APB2LPENSETR_SPI1LPEN BIT(8)
  1690. #define RCC_MP_APB2LPENSETR_SPI4LPEN BIT(9)
  1691. #define RCC_MP_APB2LPENSETR_SPI5LPEN BIT(10)
  1692. #define RCC_MP_APB2LPENSETR_USART6LPEN BIT(13)
  1693. #define RCC_MP_APB2LPENSETR_SAI1LPEN BIT(16)
  1694. #define RCC_MP_APB2LPENSETR_SAI2LPEN BIT(17)
  1695. #define RCC_MP_APB2LPENSETR_SAI3LPEN BIT(18)
  1696. #define RCC_MP_APB2LPENSETR_DFSDMLPEN BIT(20)
  1697. #define RCC_MP_APB2LPENSETR_ADFSDMLPEN BIT(21)
  1698. #define RCC_MP_APB2LPENSETR_FDCANLPEN BIT(24)
  1699. /* RCC_MP_APB2LPENCLRR register fields */
  1700. #define RCC_MP_APB2LPENCLRR_TIM1LPEN BIT(0)
  1701. #define RCC_MP_APB2LPENCLRR_TIM8LPEN BIT(1)
  1702. #define RCC_MP_APB2LPENCLRR_TIM15LPEN BIT(2)
  1703. #define RCC_MP_APB2LPENCLRR_TIM16LPEN BIT(3)
  1704. #define RCC_MP_APB2LPENCLRR_TIM17LPEN BIT(4)
  1705. #define RCC_MP_APB2LPENCLRR_SPI1LPEN BIT(8)
  1706. #define RCC_MP_APB2LPENCLRR_SPI4LPEN BIT(9)
  1707. #define RCC_MP_APB2LPENCLRR_SPI5LPEN BIT(10)
  1708. #define RCC_MP_APB2LPENCLRR_USART6LPEN BIT(13)
  1709. #define RCC_MP_APB2LPENCLRR_SAI1LPEN BIT(16)
  1710. #define RCC_MP_APB2LPENCLRR_SAI2LPEN BIT(17)
  1711. #define RCC_MP_APB2LPENCLRR_SAI3LPEN BIT(18)
  1712. #define RCC_MP_APB2LPENCLRR_DFSDMLPEN BIT(20)
  1713. #define RCC_MP_APB2LPENCLRR_ADFSDMLPEN BIT(21)
  1714. #define RCC_MP_APB2LPENCLRR_FDCANLPEN BIT(24)
  1715. /* RCC_MP_APB3LPENSETR register fields */
  1716. #define RCC_MP_APB3LPENSETR_LPTIM2LPEN BIT(0)
  1717. #define RCC_MP_APB3LPENSETR_LPTIM3LPEN BIT(1)
  1718. #define RCC_MP_APB3LPENSETR_LPTIM4LPEN BIT(2)
  1719. #define RCC_MP_APB3LPENSETR_LPTIM5LPEN BIT(3)
  1720. #define RCC_MP_APB3LPENSETR_SAI4LPEN BIT(8)
  1721. #define RCC_MP_APB3LPENSETR_SYSCFGLPEN BIT(11)
  1722. #define RCC_MP_APB3LPENSETR_VREFLPEN BIT(13)
  1723. #define RCC_MP_APB3LPENSETR_TMPSENSLPEN BIT(16)
  1724. #define RCC_MP_APB3LPENSETR_PMBCTRLLPEN BIT(17)
  1725. /* RCC_MP_APB3LPENCLRR register fields */
  1726. #define RCC_MP_APB3LPENCLRR_LPTIM2LPEN BIT(0)
  1727. #define RCC_MP_APB3LPENCLRR_LPTIM3LPEN BIT(1)
  1728. #define RCC_MP_APB3LPENCLRR_LPTIM4LPEN BIT(2)
  1729. #define RCC_MP_APB3LPENCLRR_LPTIM5LPEN BIT(3)
  1730. #define RCC_MP_APB3LPENCLRR_SAI4LPEN BIT(8)
  1731. #define RCC_MP_APB3LPENCLRR_SYSCFGLPEN BIT(11)
  1732. #define RCC_MP_APB3LPENCLRR_VREFLPEN BIT(13)
  1733. #define RCC_MP_APB3LPENCLRR_TMPSENSLPEN BIT(16)
  1734. #define RCC_MP_APB3LPENCLRR_PMBCTRLLPEN BIT(17)
  1735. /* RCC_MP_AHB2LPENSETR register fields */
  1736. #define RCC_MP_AHB2LPENSETR_DMA1LPEN BIT(0)
  1737. #define RCC_MP_AHB2LPENSETR_DMA2LPEN BIT(1)
  1738. #define RCC_MP_AHB2LPENSETR_DMAMUXLPEN BIT(2)
  1739. #define RCC_MP_AHB2LPENSETR_ADC12LPEN BIT(5)
  1740. #define RCC_MP_AHB2LPENSETR_USBOLPEN BIT(8)
  1741. #define RCC_MP_AHB2LPENSETR_SDMMC3LPEN BIT(16)
  1742. /* RCC_MP_AHB2LPENCLRR register fields */
  1743. #define RCC_MP_AHB2LPENCLRR_DMA1LPEN BIT(0)
  1744. #define RCC_MP_AHB2LPENCLRR_DMA2LPEN BIT(1)
  1745. #define RCC_MP_AHB2LPENCLRR_DMAMUXLPEN BIT(2)
  1746. #define RCC_MP_AHB2LPENCLRR_ADC12LPEN BIT(5)
  1747. #define RCC_MP_AHB2LPENCLRR_USBOLPEN BIT(8)
  1748. #define RCC_MP_AHB2LPENCLRR_SDMMC3LPEN BIT(16)
  1749. /* RCC_MP_AHB3LPENSETR register fields */
  1750. #define RCC_MP_AHB3LPENSETR_DCMILPEN BIT(0)
  1751. #define RCC_MP_AHB3LPENSETR_CRYP2LPEN BIT(4)
  1752. #define RCC_MP_AHB3LPENSETR_HASH2LPEN BIT(5)
  1753. #define RCC_MP_AHB3LPENSETR_RNG2LPEN BIT(6)
  1754. #define RCC_MP_AHB3LPENSETR_CRC2LPEN BIT(7)
  1755. #define RCC_MP_AHB3LPENSETR_HSEMLPEN BIT(11)
  1756. #define RCC_MP_AHB3LPENSETR_IPCCLPEN BIT(12)
  1757. /* RCC_MP_AHB3LPENCLRR register fields */
  1758. #define RCC_MP_AHB3LPENCLRR_DCMILPEN BIT(0)
  1759. #define RCC_MP_AHB3LPENCLRR_CRYP2LPEN BIT(4)
  1760. #define RCC_MP_AHB3LPENCLRR_HASH2LPEN BIT(5)
  1761. #define RCC_MP_AHB3LPENCLRR_RNG2LPEN BIT(6)
  1762. #define RCC_MP_AHB3LPENCLRR_CRC2LPEN BIT(7)
  1763. #define RCC_MP_AHB3LPENCLRR_HSEMLPEN BIT(11)
  1764. #define RCC_MP_AHB3LPENCLRR_IPCCLPEN BIT(12)
  1765. /* RCC_MP_AHB4LPENSETR register fields */
  1766. #define RCC_MP_AHB4LPENSETR_GPIOALPEN BIT(0)
  1767. #define RCC_MP_AHB4LPENSETR_GPIOBLPEN BIT(1)
  1768. #define RCC_MP_AHB4LPENSETR_GPIOCLPEN BIT(2)
  1769. #define RCC_MP_AHB4LPENSETR_GPIODLPEN BIT(3)
  1770. #define RCC_MP_AHB4LPENSETR_GPIOELPEN BIT(4)
  1771. #define RCC_MP_AHB4LPENSETR_GPIOFLPEN BIT(5)
  1772. #define RCC_MP_AHB4LPENSETR_GPIOGLPEN BIT(6)
  1773. #define RCC_MP_AHB4LPENSETR_GPIOHLPEN BIT(7)
  1774. #define RCC_MP_AHB4LPENSETR_GPIOILPEN BIT(8)
  1775. #define RCC_MP_AHB4LPENSETR_GPIOJLPEN BIT(9)
  1776. #define RCC_MP_AHB4LPENSETR_GPIOKLPEN BIT(10)
  1777. /* RCC_MP_AHB4LPENCLRR register fields */
  1778. #define RCC_MP_AHB4LPENCLRR_GPIOALPEN BIT(0)
  1779. #define RCC_MP_AHB4LPENCLRR_GPIOBLPEN BIT(1)
  1780. #define RCC_MP_AHB4LPENCLRR_GPIOCLPEN BIT(2)
  1781. #define RCC_MP_AHB4LPENCLRR_GPIODLPEN BIT(3)
  1782. #define RCC_MP_AHB4LPENCLRR_GPIOELPEN BIT(4)
  1783. #define RCC_MP_AHB4LPENCLRR_GPIOFLPEN BIT(5)
  1784. #define RCC_MP_AHB4LPENCLRR_GPIOGLPEN BIT(6)
  1785. #define RCC_MP_AHB4LPENCLRR_GPIOHLPEN BIT(7)
  1786. #define RCC_MP_AHB4LPENCLRR_GPIOILPEN BIT(8)
  1787. #define RCC_MP_AHB4LPENCLRR_GPIOJLPEN BIT(9)
  1788. #define RCC_MP_AHB4LPENCLRR_GPIOKLPEN BIT(10)
  1789. /* RCC_MP_AXIMLPENSETR register fields */
  1790. #define RCC_MP_AXIMLPENSETR_SYSRAMLPEN BIT(0)
  1791. /* RCC_MP_AXIMLPENCLRR register fields */
  1792. #define RCC_MP_AXIMLPENCLRR_SYSRAMLPEN BIT(0)
  1793. /* RCC_MP_MLAHBLPENSETR register fields */
  1794. #define RCC_MP_MLAHBLPENSETR_SRAM1LPEN BIT(0)
  1795. #define RCC_MP_MLAHBLPENSETR_SRAM2LPEN BIT(1)
  1796. #define RCC_MP_MLAHBLPENSETR_SRAM34LPEN BIT(2)
  1797. #define RCC_MP_MLAHBLPENSETR_RETRAMLPEN BIT(4)
  1798. /* RCC_MP_MLAHBLPENCLRR register fields */
  1799. #define RCC_MP_MLAHBLPENCLRR_SRAM1LPEN BIT(0)
  1800. #define RCC_MP_MLAHBLPENCLRR_SRAM2LPEN BIT(1)
  1801. #define RCC_MP_MLAHBLPENCLRR_SRAM34LPEN BIT(2)
  1802. #define RCC_MP_MLAHBLPENCLRR_RETRAMLPEN BIT(4)
  1803. /* RCC_MC_APB1LPENSETR register fields */
  1804. #define RCC_MC_APB1LPENSETR_TIM2LPEN BIT(0)
  1805. #define RCC_MC_APB1LPENSETR_TIM3LPEN BIT(1)
  1806. #define RCC_MC_APB1LPENSETR_TIM4LPEN BIT(2)
  1807. #define RCC_MC_APB1LPENSETR_TIM5LPEN BIT(3)
  1808. #define RCC_MC_APB1LPENSETR_TIM6LPEN BIT(4)
  1809. #define RCC_MC_APB1LPENSETR_TIM7LPEN BIT(5)
  1810. #define RCC_MC_APB1LPENSETR_TIM12LPEN BIT(6)
  1811. #define RCC_MC_APB1LPENSETR_TIM13LPEN BIT(7)
  1812. #define RCC_MC_APB1LPENSETR_TIM14LPEN BIT(8)
  1813. #define RCC_MC_APB1LPENSETR_LPTIM1LPEN BIT(9)
  1814. #define RCC_MC_APB1LPENSETR_SPI2LPEN BIT(11)
  1815. #define RCC_MC_APB1LPENSETR_SPI3LPEN BIT(12)
  1816. #define RCC_MC_APB1LPENSETR_USART2LPEN BIT(14)
  1817. #define RCC_MC_APB1LPENSETR_USART3LPEN BIT(15)
  1818. #define RCC_MC_APB1LPENSETR_UART4LPEN BIT(16)
  1819. #define RCC_MC_APB1LPENSETR_UART5LPEN BIT(17)
  1820. #define RCC_MC_APB1LPENSETR_UART7LPEN BIT(18)
  1821. #define RCC_MC_APB1LPENSETR_UART8LPEN BIT(19)
  1822. #define RCC_MC_APB1LPENSETR_I2C1LPEN BIT(21)
  1823. #define RCC_MC_APB1LPENSETR_I2C2LPEN BIT(22)
  1824. #define RCC_MC_APB1LPENSETR_I2C3LPEN BIT(23)
  1825. #define RCC_MC_APB1LPENSETR_I2C5LPEN BIT(24)
  1826. #define RCC_MC_APB1LPENSETR_SPDIFLPEN BIT(26)
  1827. #define RCC_MC_APB1LPENSETR_CECLPEN BIT(27)
  1828. #define RCC_MC_APB1LPENSETR_WWDG1LPEN BIT(28)
  1829. #define RCC_MC_APB1LPENSETR_DAC12LPEN BIT(29)
  1830. #define RCC_MC_APB1LPENSETR_MDIOSLPEN BIT(31)
  1831. /* RCC_MC_APB1LPENCLRR register fields */
  1832. #define RCC_MC_APB1LPENCLRR_TIM2LPEN BIT(0)
  1833. #define RCC_MC_APB1LPENCLRR_TIM3LPEN BIT(1)
  1834. #define RCC_MC_APB1LPENCLRR_TIM4LPEN BIT(2)
  1835. #define RCC_MC_APB1LPENCLRR_TIM5LPEN BIT(3)
  1836. #define RCC_MC_APB1LPENCLRR_TIM6LPEN BIT(4)
  1837. #define RCC_MC_APB1LPENCLRR_TIM7LPEN BIT(5)
  1838. #define RCC_MC_APB1LPENCLRR_TIM12LPEN BIT(6)
  1839. #define RCC_MC_APB1LPENCLRR_TIM13LPEN BIT(7)
  1840. #define RCC_MC_APB1LPENCLRR_TIM14LPEN BIT(8)
  1841. #define RCC_MC_APB1LPENCLRR_LPTIM1LPEN BIT(9)
  1842. #define RCC_MC_APB1LPENCLRR_SPI2LPEN BIT(11)
  1843. #define RCC_MC_APB1LPENCLRR_SPI3LPEN BIT(12)
  1844. #define RCC_MC_APB1LPENCLRR_USART2LPEN BIT(14)
  1845. #define RCC_MC_APB1LPENCLRR_USART3LPEN BIT(15)
  1846. #define RCC_MC_APB1LPENCLRR_UART4LPEN BIT(16)
  1847. #define RCC_MC_APB1LPENCLRR_UART5LPEN BIT(17)
  1848. #define RCC_MC_APB1LPENCLRR_UART7LPEN BIT(18)
  1849. #define RCC_MC_APB1LPENCLRR_UART8LPEN BIT(19)
  1850. #define RCC_MC_APB1LPENCLRR_I2C1LPEN BIT(21)
  1851. #define RCC_MC_APB1LPENCLRR_I2C2LPEN BIT(22)
  1852. #define RCC_MC_APB1LPENCLRR_I2C3LPEN BIT(23)
  1853. #define RCC_MC_APB1LPENCLRR_I2C5LPEN BIT(24)
  1854. #define RCC_MC_APB1LPENCLRR_SPDIFLPEN BIT(26)
  1855. #define RCC_MC_APB1LPENCLRR_CECLPEN BIT(27)
  1856. #define RCC_MC_APB1LPENCLRR_WWDG1LPEN BIT(28)
  1857. #define RCC_MC_APB1LPENCLRR_DAC12LPEN BIT(29)
  1858. #define RCC_MC_APB1LPENCLRR_MDIOSLPEN BIT(31)
  1859. /* RCC_MC_APB2LPENSETR register fields */
  1860. #define RCC_MC_APB2LPENSETR_TIM1LPEN BIT(0)
  1861. #define RCC_MC_APB2LPENSETR_TIM8LPEN BIT(1)
  1862. #define RCC_MC_APB2LPENSETR_TIM15LPEN BIT(2)
  1863. #define RCC_MC_APB2LPENSETR_TIM16LPEN BIT(3)
  1864. #define RCC_MC_APB2LPENSETR_TIM17LPEN BIT(4)
  1865. #define RCC_MC_APB2LPENSETR_SPI1LPEN BIT(8)
  1866. #define RCC_MC_APB2LPENSETR_SPI4LPEN BIT(9)
  1867. #define RCC_MC_APB2LPENSETR_SPI5LPEN BIT(10)
  1868. #define RCC_MC_APB2LPENSETR_USART6LPEN BIT(13)
  1869. #define RCC_MC_APB2LPENSETR_SAI1LPEN BIT(16)
  1870. #define RCC_MC_APB2LPENSETR_SAI2LPEN BIT(17)
  1871. #define RCC_MC_APB2LPENSETR_SAI3LPEN BIT(18)
  1872. #define RCC_MC_APB2LPENSETR_DFSDMLPEN BIT(20)
  1873. #define RCC_MC_APB2LPENSETR_ADFSDMLPEN BIT(21)
  1874. #define RCC_MC_APB2LPENSETR_FDCANLPEN BIT(24)
  1875. /* RCC_MC_APB2LPENCLRR register fields */
  1876. #define RCC_MC_APB2LPENCLRR_TIM1LPEN BIT(0)
  1877. #define RCC_MC_APB2LPENCLRR_TIM8LPEN BIT(1)
  1878. #define RCC_MC_APB2LPENCLRR_TIM15LPEN BIT(2)
  1879. #define RCC_MC_APB2LPENCLRR_TIM16LPEN BIT(3)
  1880. #define RCC_MC_APB2LPENCLRR_TIM17LPEN BIT(4)
  1881. #define RCC_MC_APB2LPENCLRR_SPI1LPEN BIT(8)
  1882. #define RCC_MC_APB2LPENCLRR_SPI4LPEN BIT(9)
  1883. #define RCC_MC_APB2LPENCLRR_SPI5LPEN BIT(10)
  1884. #define RCC_MC_APB2LPENCLRR_USART6LPEN BIT(13)
  1885. #define RCC_MC_APB2LPENCLRR_SAI1LPEN BIT(16)
  1886. #define RCC_MC_APB2LPENCLRR_SAI2LPEN BIT(17)
  1887. #define RCC_MC_APB2LPENCLRR_SAI3LPEN BIT(18)
  1888. #define RCC_MC_APB2LPENCLRR_DFSDMLPEN BIT(20)
  1889. #define RCC_MC_APB2LPENCLRR_ADFSDMLPEN BIT(21)
  1890. #define RCC_MC_APB2LPENCLRR_FDCANLPEN BIT(24)
  1891. /* RCC_MC_APB3LPENSETR register fields */
  1892. #define RCC_MC_APB3LPENSETR_LPTIM2LPEN BIT(0)
  1893. #define RCC_MC_APB3LPENSETR_LPTIM3LPEN BIT(1)
  1894. #define RCC_MC_APB3LPENSETR_LPTIM4LPEN BIT(2)
  1895. #define RCC_MC_APB3LPENSETR_LPTIM5LPEN BIT(3)
  1896. #define RCC_MC_APB3LPENSETR_SAI4LPEN BIT(8)
  1897. #define RCC_MC_APB3LPENSETR_SYSCFGLPEN BIT(11)
  1898. #define RCC_MC_APB3LPENSETR_VREFLPEN BIT(13)
  1899. #define RCC_MC_APB3LPENSETR_TMPSENSLPEN BIT(16)
  1900. #define RCC_MC_APB3LPENSETR_PMBCTRLLPEN BIT(17)
  1901. /* RCC_MC_APB3LPENCLRR register fields */
  1902. #define RCC_MC_APB3LPENCLRR_LPTIM2LPEN BIT(0)
  1903. #define RCC_MC_APB3LPENCLRR_LPTIM3LPEN BIT(1)
  1904. #define RCC_MC_APB3LPENCLRR_LPTIM4LPEN BIT(2)
  1905. #define RCC_MC_APB3LPENCLRR_LPTIM5LPEN BIT(3)
  1906. #define RCC_MC_APB3LPENCLRR_SAI4LPEN BIT(8)
  1907. #define RCC_MC_APB3LPENCLRR_SYSCFGLPEN BIT(11)
  1908. #define RCC_MC_APB3LPENCLRR_VREFLPEN BIT(13)
  1909. #define RCC_MC_APB3LPENCLRR_TMPSENSLPEN BIT(16)
  1910. #define RCC_MC_APB3LPENCLRR_PMBCTRLLPEN BIT(17)
  1911. /* RCC_MC_AHB2LPENSETR register fields */
  1912. #define RCC_MC_AHB2LPENSETR_DMA1LPEN BIT(0)
  1913. #define RCC_MC_AHB2LPENSETR_DMA2LPEN BIT(1)
  1914. #define RCC_MC_AHB2LPENSETR_DMAMUXLPEN BIT(2)
  1915. #define RCC_MC_AHB2LPENSETR_ADC12LPEN BIT(5)
  1916. #define RCC_MC_AHB2LPENSETR_USBOLPEN BIT(8)
  1917. #define RCC_MC_AHB2LPENSETR_SDMMC3LPEN BIT(16)
  1918. /* RCC_MC_AHB2LPENCLRR register fields */
  1919. #define RCC_MC_AHB2LPENCLRR_DMA1LPEN BIT(0)
  1920. #define RCC_MC_AHB2LPENCLRR_DMA2LPEN BIT(1)
  1921. #define RCC_MC_AHB2LPENCLRR_DMAMUXLPEN BIT(2)
  1922. #define RCC_MC_AHB2LPENCLRR_ADC12LPEN BIT(5)
  1923. #define RCC_MC_AHB2LPENCLRR_USBOLPEN BIT(8)
  1924. #define RCC_MC_AHB2LPENCLRR_SDMMC3LPEN BIT(16)
  1925. /* RCC_MC_AHB3LPENSETR register fields */
  1926. #define RCC_MC_AHB3LPENSETR_DCMILPEN BIT(0)
  1927. #define RCC_MC_AHB3LPENSETR_CRYP2LPEN BIT(4)
  1928. #define RCC_MC_AHB3LPENSETR_HASH2LPEN BIT(5)
  1929. #define RCC_MC_AHB3LPENSETR_RNG2LPEN BIT(6)
  1930. #define RCC_MC_AHB3LPENSETR_CRC2LPEN BIT(7)
  1931. #define RCC_MC_AHB3LPENSETR_HSEMLPEN BIT(11)
  1932. #define RCC_MC_AHB3LPENSETR_IPCCLPEN BIT(12)
  1933. /* RCC_MC_AHB3LPENCLRR register fields */
  1934. #define RCC_MC_AHB3LPENCLRR_DCMILPEN BIT(0)
  1935. #define RCC_MC_AHB3LPENCLRR_CRYP2LPEN BIT(4)
  1936. #define RCC_MC_AHB3LPENCLRR_HASH2LPEN BIT(5)
  1937. #define RCC_MC_AHB3LPENCLRR_RNG2LPEN BIT(6)
  1938. #define RCC_MC_AHB3LPENCLRR_CRC2LPEN BIT(7)
  1939. #define RCC_MC_AHB3LPENCLRR_HSEMLPEN BIT(11)
  1940. #define RCC_MC_AHB3LPENCLRR_IPCCLPEN BIT(12)
  1941. /* RCC_MC_AHB4LPENSETR register fields */
  1942. #define RCC_MC_AHB4LPENSETR_GPIOALPEN BIT(0)
  1943. #define RCC_MC_AHB4LPENSETR_GPIOBLPEN BIT(1)
  1944. #define RCC_MC_AHB4LPENSETR_GPIOCLPEN BIT(2)
  1945. #define RCC_MC_AHB4LPENSETR_GPIODLPEN BIT(3)
  1946. #define RCC_MC_AHB4LPENSETR_GPIOELPEN BIT(4)
  1947. #define RCC_MC_AHB4LPENSETR_GPIOFLPEN BIT(5)
  1948. #define RCC_MC_AHB4LPENSETR_GPIOGLPEN BIT(6)
  1949. #define RCC_MC_AHB4LPENSETR_GPIOHLPEN BIT(7)
  1950. #define RCC_MC_AHB4LPENSETR_GPIOILPEN BIT(8)
  1951. #define RCC_MC_AHB4LPENSETR_GPIOJLPEN BIT(9)
  1952. #define RCC_MC_AHB4LPENSETR_GPIOKLPEN BIT(10)
  1953. /* RCC_MC_AHB4LPENCLRR register fields */
  1954. #define RCC_MC_AHB4LPENCLRR_GPIOALPEN BIT(0)
  1955. #define RCC_MC_AHB4LPENCLRR_GPIOBLPEN BIT(1)
  1956. #define RCC_MC_AHB4LPENCLRR_GPIOCLPEN BIT(2)
  1957. #define RCC_MC_AHB4LPENCLRR_GPIODLPEN BIT(3)
  1958. #define RCC_MC_AHB4LPENCLRR_GPIOELPEN BIT(4)
  1959. #define RCC_MC_AHB4LPENCLRR_GPIOFLPEN BIT(5)
  1960. #define RCC_MC_AHB4LPENCLRR_GPIOGLPEN BIT(6)
  1961. #define RCC_MC_AHB4LPENCLRR_GPIOHLPEN BIT(7)
  1962. #define RCC_MC_AHB4LPENCLRR_GPIOILPEN BIT(8)
  1963. #define RCC_MC_AHB4LPENCLRR_GPIOJLPEN BIT(9)
  1964. #define RCC_MC_AHB4LPENCLRR_GPIOKLPEN BIT(10)
  1965. /* RCC_MC_AXIMLPENSETR register fields */
  1966. #define RCC_MC_AXIMLPENSETR_SYSRAMLPEN BIT(0)
  1967. /* RCC_MC_AXIMLPENCLRR register fields */
  1968. #define RCC_MC_AXIMLPENCLRR_SYSRAMLPEN BIT(0)
  1969. /* RCC_MC_MLAHBLPENSETR register fields */
  1970. #define RCC_MC_MLAHBLPENSETR_SRAM1LPEN BIT(0)
  1971. #define RCC_MC_MLAHBLPENSETR_SRAM2LPEN BIT(1)
  1972. #define RCC_MC_MLAHBLPENSETR_SRAM34LPEN BIT(2)
  1973. #define RCC_MC_MLAHBLPENSETR_RETRAMLPEN BIT(4)
  1974. /* RCC_MC_MLAHBLPENCLRR register fields */
  1975. #define RCC_MC_MLAHBLPENCLRR_SRAM1LPEN BIT(0)
  1976. #define RCC_MC_MLAHBLPENCLRR_SRAM2LPEN BIT(1)
  1977. #define RCC_MC_MLAHBLPENCLRR_SRAM34LPEN BIT(2)
  1978. #define RCC_MC_MLAHBLPENCLRR_RETRAMLPEN BIT(4)
  1979. /* RCC_MC_RSTSCLRR register fields */
  1980. #define RCC_MC_RSTSCLRR_PORRSTF BIT(0)
  1981. #define RCC_MC_RSTSCLRR_BORRSTF BIT(1)
  1982. #define RCC_MC_RSTSCLRR_PADRSTF BIT(2)
  1983. #define RCC_MC_RSTSCLRR_HCSSRSTF BIT(3)
  1984. #define RCC_MC_RSTSCLRR_VCORERSTF BIT(4)
  1985. #define RCC_MC_RSTSCLRR_MCURSTF BIT(5)
  1986. #define RCC_MC_RSTSCLRR_MPSYSRSTF BIT(6)
  1987. #define RCC_MC_RSTSCLRR_MCSYSRSTF BIT(7)
  1988. #define RCC_MC_RSTSCLRR_IWDG1RSTF BIT(8)
  1989. #define RCC_MC_RSTSCLRR_IWDG2RSTF BIT(9)
  1990. #define RCC_MC_RSTSCLRR_WWDG1RSTF BIT(10)
  1991. /* RCC_MC_CIER register fields */
  1992. #define RCC_MC_CIER_LSIRDYIE BIT(0)
  1993. #define RCC_MC_CIER_LSERDYIE BIT(1)
  1994. #define RCC_MC_CIER_HSIRDYIE BIT(2)
  1995. #define RCC_MC_CIER_HSERDYIE BIT(3)
  1996. #define RCC_MC_CIER_CSIRDYIE BIT(4)
  1997. #define RCC_MC_CIER_PLL1DYIE BIT(8)
  1998. #define RCC_MC_CIER_PLL2DYIE BIT(9)
  1999. #define RCC_MC_CIER_PLL3DYIE BIT(10)
  2000. #define RCC_MC_CIER_PLL4DYIE BIT(11)
  2001. #define RCC_MC_CIER_LSECSSIE BIT(16)
  2002. #define RCC_MC_CIER_WKUPIE BIT(20)
  2003. /* RCC_MC_CIFR register fields */
  2004. #define RCC_MC_CIFR_LSIRDYF BIT(0)
  2005. #define RCC_MC_CIFR_LSERDYF BIT(1)
  2006. #define RCC_MC_CIFR_HSIRDYF BIT(2)
  2007. #define RCC_MC_CIFR_HSERDYF BIT(3)
  2008. #define RCC_MC_CIFR_CSIRDYF BIT(4)
  2009. #define RCC_MC_CIFR_PLL1DYF BIT(8)
  2010. #define RCC_MC_CIFR_PLL2DYF BIT(9)
  2011. #define RCC_MC_CIFR_PLL3DYF BIT(10)
  2012. #define RCC_MC_CIFR_PLL4DYF BIT(11)
  2013. #define RCC_MC_CIFR_LSECSSF BIT(16)
  2014. #define RCC_MC_CIFR_WKUPF BIT(20)
  2015. /* RCC_VERR register fields */
  2016. #define RCC_VERR_MINREV_MASK GENMASK(3, 0)
  2017. #define RCC_VERR_MINREV_SHIFT 0
  2018. #define RCC_VERR_MAJREV_MASK GENMASK(7, 4)
  2019. #define RCC_VERR_MAJREV_SHIFT 4
  2020. /* Used for RCC_OCENSETR and RCC_OCENCLRR registers */
  2021. #define RCC_OCENR_HSION BIT(0)
  2022. #define RCC_OCENR_HSIKERON BIT(1)
  2023. #define RCC_OCENR_CSION BIT(4)
  2024. #define RCC_OCENR_CSIKERON BIT(5)
  2025. #define RCC_OCENR_DIGBYP BIT(7)
  2026. #define RCC_OCENR_HSEON BIT(8)
  2027. #define RCC_OCENR_HSEKERON BIT(9)
  2028. #define RCC_OCENR_HSEBYP BIT(10)
  2029. #define RCC_OCENR_HSECSSON BIT(11)
  2030. /* Offset between RCC_MP_xxxENSETR and RCC_MP_xxxENCLRR registers */
  2031. #define RCC_MP_ENCLRR_OFFSET U(4)
  2032. /* Offset between RCC_xxxRSTSETR and RCC_xxxRSTCLRR registers */
  2033. #define RCC_RSTCLRR_OFFSET U(4)
  2034. /* Used for most of DIVR register: max div for RTC */
  2035. #define RCC_DIVR_DIV_MASK GENMASK(5, 0)
  2036. #define RCC_DIVR_DIVRDY BIT(31)
  2037. /* Masks for specific DIVR registers */
  2038. #define RCC_APBXDIV_MASK GENMASK(2, 0)
  2039. #define RCC_MPUDIV_MASK GENMASK(2, 0)
  2040. #define RCC_AXIDIV_MASK GENMASK(2, 0)
  2041. #define RCC_MCUDIV_MASK GENMASK(3, 0)
  2042. /* Used for most of RCC_<x>SELR registers */
  2043. #define RCC_SELR_SRC_MASK GENMASK(2, 0)
  2044. #define RCC_SELR_REFCLK_SRC_MASK GENMASK(1, 0)
  2045. #define RCC_SELR_SRCRDY BIT(31)
  2046. /* Used for all RCC_PLL<n>CR registers */
  2047. #define RCC_PLLNCR_PLLON BIT(0)
  2048. #define RCC_PLLNCR_PLLRDY BIT(1)
  2049. #define RCC_PLLNCR_SSCG_CTRL BIT(2)
  2050. #define RCC_PLLNCR_DIVPEN BIT(4)
  2051. #define RCC_PLLNCR_DIVQEN BIT(5)
  2052. #define RCC_PLLNCR_DIVREN BIT(6)
  2053. #define RCC_PLLNCR_DIVEN_SHIFT 4
  2054. /* Used for all RCC_PLL<n>CFGR1 registers */
  2055. #define RCC_PLLNCFGR1_DIVM_MASK GENMASK(21, 16)
  2056. #define RCC_PLLNCFGR1_DIVM_SHIFT 16
  2057. #define RCC_PLLNCFGR1_DIVN_MASK GENMASK(8, 0)
  2058. #define RCC_PLLNCFGR1_DIVN_SHIFT 0
  2059. /* Only for PLL3 and PLL4 */
  2060. #define RCC_PLLNCFGR1_IFRGE_MASK GENMASK(25, 24)
  2061. #define RCC_PLLNCFGR1_IFRGE_SHIFT 24
  2062. /* Used for all RCC_PLL<n>CFGR2 registers */
  2063. #define RCC_PLLNCFGR2_DIVX_MASK GENMASK(6, 0)
  2064. #define RCC_PLLNCFGR2_DIVP_MASK GENMASK(6, 0)
  2065. #define RCC_PLLNCFGR2_DIVP_SHIFT 0
  2066. #define RCC_PLLNCFGR2_DIVQ_MASK GENMASK(14, 8)
  2067. #define RCC_PLLNCFGR2_DIVQ_SHIFT 8
  2068. #define RCC_PLLNCFGR2_DIVR_MASK GENMASK(22, 16)
  2069. #define RCC_PLLNCFGR2_DIVR_SHIFT 16
  2070. /* Used for all RCC_PLL<n>FRACR registers */
  2071. #define RCC_PLLNFRACR_FRACV_SHIFT 3
  2072. #define RCC_PLLNFRACR_FRACV_MASK GENMASK(15, 3)
  2073. #define RCC_PLLNFRACR_FRACLE BIT(16)
  2074. /* Used for all RCC_PLL<n>CSGR registers */
  2075. #define RCC_PLLNCSGR_INC_STEP_SHIFT 16
  2076. #define RCC_PLLNCSGR_INC_STEP_MASK GENMASK(30, 16)
  2077. #define RCC_PLLNCSGR_MOD_PER_SHIFT 0
  2078. #define RCC_PLLNCSGR_MOD_PER_MASK GENMASK(12, 0)
  2079. #define RCC_PLLNCSGR_SSCG_MODE_SHIFT 15
  2080. #define RCC_PLLNCSGR_SSCG_MODE_MASK BIT(15)
  2081. /* Used for TIMER Prescaler */
  2082. #define RCC_TIMGXPRER_TIMGXPRE BIT(0)
  2083. /* Used for RCC_MCO related operations */
  2084. #define RCC_MCOCFG_MCOON BIT(12)
  2085. #define RCC_MCOCFG_MCODIV_MASK GENMASK(7, 4)
  2086. #define RCC_MCOCFG_MCODIV_SHIFT 4
  2087. #define RCC_MCOCFG_MCOSRC_MASK GENMASK(2, 0)
  2088. #endif /* STM32MP1_RCC_H */