gcc-ipq5424.c 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
  4. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  5. */
  6. #include <linux/clk-provider.h>
  7. #include <linux/interconnect-provider.h>
  8. #include <linux/kernel.h>
  9. #include <linux/module.h>
  10. #include <linux/of.h>
  11. #include <linux/platform_device.h>
  12. #include <linux/regmap.h>
  13. #include <dt-bindings/clock/qcom,ipq5424-gcc.h>
  14. #include <dt-bindings/interconnect/qcom,ipq5424.h>
  15. #include <dt-bindings/reset/qcom,ipq5424-gcc.h>
  16. #include "clk-alpha-pll.h"
  17. #include "clk-branch.h"
  18. #include "clk-rcg.h"
  19. #include "clk-regmap.h"
  20. #include "clk-regmap-divider.h"
  21. #include "clk-regmap-mux.h"
  22. #include "clk-regmap-phy-mux.h"
  23. #include "common.h"
  24. #include "reset.h"
  25. enum {
  26. DT_XO,
  27. DT_SLEEP_CLK,
  28. DT_PCIE30_PHY0_PIPE_CLK,
  29. DT_PCIE30_PHY1_PIPE_CLK,
  30. DT_PCIE30_PHY2_PIPE_CLK,
  31. DT_PCIE30_PHY3_PIPE_CLK,
  32. DT_USB_PCIE_WRAPPER_PIPE_CLK,
  33. };
  34. enum {
  35. P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC,
  36. P_GPLL0_OUT_AUX,
  37. P_GPLL0_OUT_MAIN,
  38. P_GPLL2_OUT_AUX,
  39. P_GPLL2_OUT_MAIN,
  40. P_GPLL4_OUT_AUX,
  41. P_GPLL4_OUT_MAIN,
  42. P_SLEEP_CLK,
  43. P_XO,
  44. P_USB3PHY_0_PIPE,
  45. };
  46. static const struct clk_parent_data gcc_parent_data_xo = { .index = DT_XO };
  47. static struct clk_alpha_pll gpll0 = {
  48. .offset = 0x20000,
  49. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
  50. .clkr = {
  51. .enable_reg = 0xb000,
  52. .enable_mask = BIT(0),
  53. .hw.init = &(const struct clk_init_data) {
  54. .name = "gpll0",
  55. .parent_data = &gcc_parent_data_xo,
  56. .num_parents = 1,
  57. .ops = &clk_alpha_pll_ops,
  58. },
  59. },
  60. };
  61. static struct clk_fixed_factor gpll0_div2 = {
  62. .mult = 1,
  63. .div = 2,
  64. .hw.init = &(const struct clk_init_data) {
  65. .name = "gpll0_div2",
  66. .parent_hws = (const struct clk_hw *[]) {
  67. &gpll0.clkr.hw
  68. },
  69. .num_parents = 1,
  70. .ops = &clk_fixed_factor_ops,
  71. },
  72. };
  73. static struct clk_alpha_pll_postdiv gpll0_out_aux = {
  74. .offset = 0x20000,
  75. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
  76. .width = 4,
  77. .clkr.hw.init = &(const struct clk_init_data) {
  78. .name = "gpll0_out_aux",
  79. .parent_hws = (const struct clk_hw *[]) {
  80. &gpll0.clkr.hw
  81. },
  82. .num_parents = 1,
  83. .ops = &clk_alpha_pll_postdiv_ro_ops,
  84. },
  85. };
  86. static struct clk_alpha_pll gpll2 = {
  87. .offset = 0x21000,
  88. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_NSS_HUAYRA],
  89. .clkr = {
  90. .enable_reg = 0xb000,
  91. .enable_mask = BIT(1),
  92. .hw.init = &(const struct clk_init_data) {
  93. .name = "gpll2",
  94. .parent_data = &gcc_parent_data_xo,
  95. .num_parents = 1,
  96. .ops = &clk_alpha_pll_ops,
  97. },
  98. },
  99. };
  100. static const struct clk_div_table post_div_table_gpll2_out_main[] = {
  101. { 0x1, 2 },
  102. { }
  103. };
  104. static struct clk_alpha_pll_postdiv gpll2_out_main = {
  105. .offset = 0x21000,
  106. .post_div_table = post_div_table_gpll2_out_main,
  107. .num_post_div = ARRAY_SIZE(post_div_table_gpll2_out_main),
  108. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_NSS_HUAYRA],
  109. .clkr.hw.init = &(const struct clk_init_data) {
  110. .name = "gpll2_out_main",
  111. .parent_hws = (const struct clk_hw*[]) {
  112. &gpll2.clkr.hw,
  113. },
  114. .num_parents = 1,
  115. .ops = &clk_alpha_pll_postdiv_ro_ops,
  116. },
  117. };
  118. static struct clk_alpha_pll gpll4 = {
  119. .offset = 0x22000,
  120. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
  121. .clkr = {
  122. .enable_reg = 0xb000,
  123. .enable_mask = BIT(2),
  124. .hw.init = &(const struct clk_init_data) {
  125. .name = "gpll4",
  126. .parent_data = &gcc_parent_data_xo,
  127. .num_parents = 1,
  128. .ops = &clk_alpha_pll_ops,
  129. /*
  130. * There are no consumers for this GPLL in kernel yet,
  131. * (will be added soon), so the clock framework
  132. * disables this source. But some of the clocks
  133. * initialized by boot loaders uses this source. So we
  134. * need to keep this clock ON. Add the
  135. * CLK_IGNORE_UNUSED flag so the clock will not be
  136. * disabled. Once the consumer in kernel is added, we
  137. * can get rid of this flag.
  138. */
  139. .flags = CLK_IGNORE_UNUSED,
  140. },
  141. },
  142. };
  143. static const struct parent_map gcc_parent_map_xo[] = {
  144. { P_XO, 0 },
  145. };
  146. static const struct parent_map gcc_parent_map_0[] = {
  147. { P_XO, 0 },
  148. { P_GPLL0_OUT_MAIN, 1 },
  149. { P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
  150. };
  151. static const struct clk_parent_data gcc_parent_data_0[] = {
  152. { .index = DT_XO },
  153. { .hw = &gpll0.clkr.hw },
  154. { .hw = &gpll0_div2.hw },
  155. };
  156. static const struct parent_map gcc_parent_map_1[] = {
  157. { P_XO, 0 },
  158. { P_GPLL0_OUT_MAIN, 1 },
  159. };
  160. static const struct clk_parent_data gcc_parent_data_1[] = {
  161. { .index = DT_XO },
  162. { .hw = &gpll0.clkr.hw },
  163. };
  164. static const struct parent_map gcc_parent_map_2[] = {
  165. { P_XO, 0 },
  166. { P_GPLL0_OUT_MAIN, 1 },
  167. { P_GPLL4_OUT_MAIN, 2 },
  168. };
  169. static const struct clk_parent_data gcc_parent_data_2[] = {
  170. { .index = DT_XO },
  171. { .hw = &gpll0.clkr.hw },
  172. { .hw = &gpll4.clkr.hw },
  173. };
  174. static const struct parent_map gcc_parent_map_3[] = {
  175. { P_XO, 0 },
  176. { P_GPLL4_OUT_MAIN, 1 },
  177. { P_GPLL0_OUT_AUX, 2 },
  178. { P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
  179. };
  180. static const struct clk_parent_data gcc_parent_data_3[] = {
  181. { .index = DT_XO },
  182. { .hw = &gpll4.clkr.hw },
  183. { .hw = &gpll0.clkr.hw },
  184. { .hw = &gpll0_div2.hw },
  185. };
  186. static const struct parent_map gcc_parent_map_4[] = {
  187. { P_XO, 0 },
  188. };
  189. static const struct clk_parent_data gcc_parent_data_4[] = {
  190. { .index = DT_XO },
  191. };
  192. static const struct parent_map gcc_parent_map_5[] = {
  193. { P_XO, 0 },
  194. { P_GPLL4_OUT_AUX, 1 },
  195. { P_GPLL0_OUT_MAIN, 3 },
  196. { P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
  197. };
  198. static const struct clk_parent_data gcc_parent_data_5[] = {
  199. { .index = DT_XO },
  200. { .hw = &gpll4.clkr.hw },
  201. { .hw = &gpll0.clkr.hw },
  202. { .hw = &gpll0_div2.hw },
  203. };
  204. static const struct parent_map gcc_parent_map_6[] = {
  205. { P_SLEEP_CLK, 6 },
  206. };
  207. static const struct clk_parent_data gcc_parent_data_6[] = {
  208. { .index = DT_SLEEP_CLK },
  209. };
  210. static const struct parent_map gcc_parent_map_7[] = {
  211. { P_XO, 0 },
  212. { P_GPLL0_OUT_MAIN, 1 },
  213. { P_GPLL0_OUT_AUX, 2 },
  214. { P_SLEEP_CLK, 6 },
  215. };
  216. static const struct clk_parent_data gcc_parent_data_7[] = {
  217. { .index = DT_XO },
  218. { .hw = &gpll0.clkr.hw },
  219. { .hw = &gpll0.clkr.hw },
  220. { .index = DT_SLEEP_CLK },
  221. };
  222. static const struct parent_map gcc_parent_map_8[] = {
  223. { P_XO, 0 },
  224. { P_GPLL0_OUT_MAIN, 1 },
  225. { P_GPLL2_OUT_MAIN, 2 },
  226. { P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
  227. };
  228. static const struct clk_parent_data gcc_parent_data_8[] = {
  229. { .index = DT_XO },
  230. { .hw = &gpll0.clkr.hw },
  231. { .hw = &gpll2_out_main.clkr.hw },
  232. { .hw = &gpll0_div2.hw },
  233. };
  234. static const struct parent_map gcc_parent_map_9[] = {
  235. { P_XO, 0 },
  236. { P_GPLL0_OUT_MAIN, 1 },
  237. { P_GPLL4_OUT_MAIN, 2 },
  238. { P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 4 },
  239. };
  240. static const struct clk_parent_data gcc_parent_data_9[] = {
  241. { .index = DT_XO },
  242. { .hw = &gpll0.clkr.hw },
  243. { .hw = &gpll4.clkr.hw },
  244. { .hw = &gpll0_div2.hw },
  245. };
  246. static const struct parent_map gcc_parent_map_10[] = {
  247. { P_XO, 0 },
  248. { P_GPLL0_OUT_AUX, 2 },
  249. { P_SLEEP_CLK, 6 },
  250. };
  251. static const struct clk_parent_data gcc_parent_data_10[] = {
  252. { .index = DT_XO },
  253. { .hw = &gpll0.clkr.hw },
  254. { .index = DT_SLEEP_CLK },
  255. };
  256. static const struct parent_map gcc_parent_map_11[] = {
  257. { P_XO, 0 },
  258. { P_GPLL0_OUT_MAIN, 1 },
  259. { P_GPLL2_OUT_AUX, 2 },
  260. };
  261. static const struct clk_parent_data gcc_parent_data_11[] = {
  262. { .index = DT_XO },
  263. { .hw = &gpll0.clkr.hw },
  264. { .hw = &gpll2.clkr.hw },
  265. };
  266. static const struct freq_tbl ftbl_gcc_adss_pwm_clk_src[] = {
  267. F(24000000, P_XO, 1, 0, 0),
  268. F(100000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
  269. { }
  270. };
  271. static struct clk_rcg2 gcc_adss_pwm_clk_src = {
  272. .cmd_rcgr = 0x1c004,
  273. .mnd_width = 0,
  274. .hid_width = 5,
  275. .parent_map = gcc_parent_map_1,
  276. .freq_tbl = ftbl_gcc_adss_pwm_clk_src,
  277. .clkr.hw.init = &(const struct clk_init_data) {
  278. .name = "gcc_adss_pwm_clk_src",
  279. .parent_data = gcc_parent_data_1,
  280. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  281. .ops = &clk_rcg2_ops,
  282. },
  283. };
  284. static const struct freq_tbl ftbl_gcc_nss_ts_clk_src[] = {
  285. F(24000000, P_XO, 1, 0, 0),
  286. { }
  287. };
  288. static struct clk_rcg2 gcc_xo_clk_src = {
  289. .cmd_rcgr = 0x34004,
  290. .mnd_width = 0,
  291. .hid_width = 5,
  292. .parent_map = gcc_parent_map_xo,
  293. .freq_tbl = ftbl_gcc_nss_ts_clk_src,
  294. .clkr.hw.init = &(const struct clk_init_data) {
  295. .name = "gcc_xo_clk_src",
  296. .parent_data = &gcc_parent_data_xo,
  297. .num_parents = 1,
  298. .ops = &clk_rcg2_ops,
  299. },
  300. };
  301. static struct clk_branch gcc_xo_clk = {
  302. .halt_reg = 0x34018,
  303. .halt_check = BRANCH_HALT,
  304. .clkr = {
  305. .enable_reg = 0x34018,
  306. .enable_mask = BIT(0),
  307. .hw.init = &(const struct clk_init_data) {
  308. .name = "gcc_xo_clk",
  309. .parent_hws = (const struct clk_hw*[]) {
  310. &gcc_xo_clk_src.clkr.hw,
  311. },
  312. .num_parents = 1,
  313. .flags = CLK_SET_RATE_PARENT,
  314. .ops = &clk_branch2_ops,
  315. },
  316. },
  317. };
  318. static struct clk_fixed_factor gcc_xo_div4_clk_src = {
  319. .mult = 1,
  320. .div = 4,
  321. .hw.init = &(const struct clk_init_data) {
  322. .name = "gcc_xo_div4_clk_src",
  323. .parent_hws = (const struct clk_hw *[]) {
  324. &gcc_xo_clk_src.clkr.hw
  325. },
  326. .num_parents = 1,
  327. .flags = CLK_SET_RATE_PARENT,
  328. .ops = &clk_fixed_factor_ops,
  329. },
  330. };
  331. static struct clk_rcg2 gcc_nss_ts_clk_src = {
  332. .cmd_rcgr = 0x17088,
  333. .mnd_width = 0,
  334. .hid_width = 5,
  335. .parent_map = gcc_parent_map_4,
  336. .freq_tbl = ftbl_gcc_nss_ts_clk_src,
  337. .clkr.hw.init = &(const struct clk_init_data) {
  338. .name = "gcc_nss_ts_clk_src",
  339. .parent_data = gcc_parent_data_4,
  340. .num_parents = ARRAY_SIZE(gcc_parent_data_4),
  341. .ops = &clk_rcg2_ops,
  342. },
  343. };
  344. static const struct freq_tbl ftbl_gcc_pcie0_axi_m_clk_src[] = {
  345. F(240000000, P_GPLL4_OUT_MAIN, 5, 0, 0),
  346. { }
  347. };
  348. static struct clk_rcg2 gcc_pcie0_axi_m_clk_src = {
  349. .cmd_rcgr = 0x28018,
  350. .mnd_width = 0,
  351. .hid_width = 5,
  352. .parent_map = gcc_parent_map_2,
  353. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  354. .clkr.hw.init = &(const struct clk_init_data) {
  355. .name = "gcc_pcie0_axi_m_clk_src",
  356. .parent_data = gcc_parent_data_2,
  357. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  358. .ops = &clk_rcg2_ops,
  359. },
  360. };
  361. static struct clk_rcg2 gcc_pcie0_axi_s_clk_src = {
  362. .cmd_rcgr = 0x28020,
  363. .mnd_width = 0,
  364. .hid_width = 5,
  365. .parent_map = gcc_parent_map_2,
  366. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  367. .clkr.hw.init = &(const struct clk_init_data) {
  368. .name = "gcc_pcie0_axi_s_clk_src",
  369. .parent_data = gcc_parent_data_2,
  370. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  371. .ops = &clk_rcg2_ops,
  372. },
  373. };
  374. static struct clk_rcg2 gcc_pcie1_axi_m_clk_src = {
  375. .cmd_rcgr = 0x29018,
  376. .mnd_width = 0,
  377. .hid_width = 5,
  378. .parent_map = gcc_parent_map_2,
  379. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  380. .clkr.hw.init = &(const struct clk_init_data) {
  381. .name = "gcc_pcie1_axi_m_clk_src",
  382. .parent_data = gcc_parent_data_2,
  383. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  384. .ops = &clk_rcg2_ops,
  385. },
  386. };
  387. static struct clk_rcg2 gcc_pcie1_axi_s_clk_src = {
  388. .cmd_rcgr = 0x29020,
  389. .mnd_width = 0,
  390. .hid_width = 5,
  391. .parent_map = gcc_parent_map_2,
  392. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  393. .clkr.hw.init = &(const struct clk_init_data) {
  394. .name = "gcc_pcie1_axi_s_clk_src",
  395. .parent_data = gcc_parent_data_2,
  396. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  397. .ops = &clk_rcg2_ops,
  398. },
  399. };
  400. static const struct freq_tbl ftbl_gcc_pcie2_axi_m_clk_src[] = {
  401. F(266666667, P_GPLL4_OUT_MAIN, 4.5, 0, 0),
  402. { }
  403. };
  404. static struct clk_rcg2 gcc_pcie2_axi_m_clk_src = {
  405. .cmd_rcgr = 0x2a018,
  406. .mnd_width = 0,
  407. .hid_width = 5,
  408. .parent_map = gcc_parent_map_2,
  409. .freq_tbl = ftbl_gcc_pcie2_axi_m_clk_src,
  410. .clkr.hw.init = &(const struct clk_init_data) {
  411. .name = "gcc_pcie2_axi_m_clk_src",
  412. .parent_data = gcc_parent_data_2,
  413. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  414. .ops = &clk_rcg2_ops,
  415. },
  416. };
  417. static struct clk_rcg2 gcc_pcie2_axi_s_clk_src = {
  418. .cmd_rcgr = 0x2a020,
  419. .mnd_width = 0,
  420. .hid_width = 5,
  421. .parent_map = gcc_parent_map_2,
  422. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  423. .clkr.hw.init = &(const struct clk_init_data) {
  424. .name = "gcc_pcie2_axi_s_clk_src",
  425. .parent_data = gcc_parent_data_2,
  426. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  427. .ops = &clk_rcg2_ops,
  428. },
  429. };
  430. static struct clk_rcg2 gcc_pcie3_axi_m_clk_src = {
  431. .cmd_rcgr = 0x2b018,
  432. .mnd_width = 0,
  433. .hid_width = 5,
  434. .parent_map = gcc_parent_map_2,
  435. .freq_tbl = ftbl_gcc_pcie2_axi_m_clk_src,
  436. .clkr.hw.init = &(const struct clk_init_data) {
  437. .name = "gcc_pcie3_axi_m_clk_src",
  438. .parent_data = gcc_parent_data_2,
  439. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  440. .ops = &clk_rcg2_ops,
  441. },
  442. };
  443. static struct clk_rcg2 gcc_pcie3_axi_s_clk_src = {
  444. .cmd_rcgr = 0x2b020,
  445. .mnd_width = 0,
  446. .hid_width = 5,
  447. .parent_map = gcc_parent_map_2,
  448. .freq_tbl = ftbl_gcc_pcie0_axi_m_clk_src,
  449. .clkr.hw.init = &(const struct clk_init_data) {
  450. .name = "gcc_pcie3_axi_s_clk_src",
  451. .parent_data = gcc_parent_data_2,
  452. .num_parents = ARRAY_SIZE(gcc_parent_data_2),
  453. .ops = &clk_rcg2_ops,
  454. },
  455. };
  456. static const struct freq_tbl ftbl_gcc_pcie_aux_clk_src[] = {
  457. F(20000000, P_GPLL0_OUT_MAIN, 10, 1, 4),
  458. { }
  459. };
  460. static struct clk_rcg2 gcc_pcie_aux_clk_src = {
  461. .cmd_rcgr = 0x28004,
  462. .mnd_width = 16,
  463. .hid_width = 5,
  464. .parent_map = gcc_parent_map_7,
  465. .freq_tbl = ftbl_gcc_pcie_aux_clk_src,
  466. .clkr.hw.init = &(const struct clk_init_data) {
  467. .name = "gcc_pcie_aux_clk_src",
  468. .parent_data = gcc_parent_data_7,
  469. .num_parents = ARRAY_SIZE(gcc_parent_data_7),
  470. .ops = &clk_rcg2_ops,
  471. },
  472. };
  473. static const struct freq_tbl ftbl_gcc_qupv3_i2c0_clk_src[] = {
  474. F(4800000, P_XO, 5, 0, 0),
  475. F(9600000, P_XO, 2.5, 0, 0),
  476. F(24000000, P_XO, 1, 0, 0),
  477. F(50000000, P_GPLL0_OUT_MAIN, 16, 0, 0),
  478. F(64000000, P_GPLL0_OUT_MAIN, 12.5, 0, 0),
  479. { }
  480. };
  481. static struct clk_rcg2 gcc_qupv3_i2c0_clk_src = {
  482. .cmd_rcgr = 0x2018,
  483. .mnd_width = 0,
  484. .hid_width = 5,
  485. .parent_map = gcc_parent_map_0,
  486. .freq_tbl = ftbl_gcc_qupv3_i2c0_clk_src,
  487. .clkr.hw.init = &(const struct clk_init_data) {
  488. .name = "gcc_qupv3_i2c0_clk_src",
  489. .parent_data = gcc_parent_data_0,
  490. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  491. .ops = &clk_rcg2_ops,
  492. },
  493. };
  494. static struct clk_rcg2 gcc_qupv3_i2c1_clk_src = {
  495. .cmd_rcgr = 0x3018,
  496. .mnd_width = 0,
  497. .hid_width = 5,
  498. .parent_map = gcc_parent_map_0,
  499. .freq_tbl = ftbl_gcc_qupv3_i2c0_clk_src,
  500. .clkr.hw.init = &(const struct clk_init_data) {
  501. .name = "gcc_qupv3_i2c1_clk_src",
  502. .parent_data = gcc_parent_data_0,
  503. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  504. .ops = &clk_rcg2_ops,
  505. },
  506. };
  507. static const struct freq_tbl ftbl_gcc_qupv3_spi0_clk_src[] = {
  508. F(960000, P_XO, 10, 2, 5),
  509. F(4800000, P_XO, 5, 0, 0),
  510. F(9600000, P_XO, 2, 4, 5),
  511. F(16000000, P_GPLL0_OUT_MAIN, 10, 1, 5),
  512. F(24000000, P_XO, 1, 0, 0),
  513. F(25000000, P_GPLL0_OUT_MAIN, 16, 1, 2),
  514. F(32000000, P_GPLL0_OUT_MAIN, 10, 2, 5),
  515. F(50000000, P_GPLL0_OUT_MAIN, 16, 0, 0),
  516. { }
  517. };
  518. static struct clk_rcg2 gcc_qupv3_spi0_clk_src = {
  519. .cmd_rcgr = 0x4004,
  520. .mnd_width = 8,
  521. .hid_width = 5,
  522. .parent_map = gcc_parent_map_0,
  523. .freq_tbl = ftbl_gcc_qupv3_spi0_clk_src,
  524. .clkr.hw.init = &(const struct clk_init_data) {
  525. .name = "gcc_qupv3_spi0_clk_src",
  526. .parent_data = gcc_parent_data_0,
  527. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  528. .ops = &clk_rcg2_ops,
  529. },
  530. };
  531. static struct clk_rcg2 gcc_qupv3_spi1_clk_src = {
  532. .cmd_rcgr = 0x5004,
  533. .mnd_width = 8,
  534. .hid_width = 5,
  535. .parent_map = gcc_parent_map_0,
  536. .freq_tbl = ftbl_gcc_qupv3_spi0_clk_src,
  537. .clkr.hw.init = &(const struct clk_init_data) {
  538. .name = "gcc_qupv3_spi1_clk_src",
  539. .parent_data = gcc_parent_data_0,
  540. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  541. .ops = &clk_rcg2_ops,
  542. },
  543. };
  544. static const struct freq_tbl ftbl_gcc_qupv3_uart0_clk_src[] = {
  545. F(3686400, P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 1, 144, 15625),
  546. F(7372800, P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 1, 288, 15625),
  547. F(14745600, P_GCC_GPLL0_OUT_MAIN_DIV_CLK_SRC, 1, 576, 15625),
  548. F(24000000, P_XO, 1, 0, 0),
  549. F(25000000, P_GPLL0_OUT_MAIN, 16, 1, 2),
  550. F(32000000, P_GPLL0_OUT_MAIN, 1, 1, 25),
  551. F(40000000, P_GPLL0_OUT_MAIN, 1, 1, 20),
  552. F(46400000, P_GPLL0_OUT_MAIN, 1, 29, 500),
  553. F(48000000, P_GPLL0_OUT_MAIN, 1, 3, 50),
  554. F(51200000, P_GPLL0_OUT_MAIN, 1, 8, 125),
  555. F(56000000, P_GPLL0_OUT_MAIN, 1, 7, 100),
  556. F(58982400, P_GPLL0_OUT_MAIN, 1, 1152, 15625),
  557. F(60000000, P_GPLL0_OUT_MAIN, 1, 3, 40),
  558. F(64000000, P_GPLL0_OUT_MAIN, 12.5, 0, 0),
  559. { }
  560. };
  561. static struct clk_rcg2 gcc_qupv3_uart0_clk_src = {
  562. .cmd_rcgr = 0x202c,
  563. .mnd_width = 16,
  564. .hid_width = 5,
  565. .parent_map = gcc_parent_map_0,
  566. .freq_tbl = ftbl_gcc_qupv3_uart0_clk_src,
  567. .clkr.hw.init = &(const struct clk_init_data) {
  568. .name = "gcc_qupv3_uart0_clk_src",
  569. .parent_data = gcc_parent_data_0,
  570. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  571. .ops = &clk_rcg2_ops,
  572. },
  573. };
  574. static struct clk_rcg2 gcc_qupv3_uart1_clk_src = {
  575. .cmd_rcgr = 0x302c,
  576. .mnd_width = 16,
  577. .hid_width = 5,
  578. .parent_map = gcc_parent_map_0,
  579. .freq_tbl = ftbl_gcc_qupv3_uart0_clk_src,
  580. .clkr.hw.init = &(const struct clk_init_data) {
  581. .name = "gcc_qupv3_uart1_clk_src",
  582. .parent_data = gcc_parent_data_0,
  583. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  584. .ops = &clk_rcg2_ops,
  585. },
  586. };
  587. static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_src[] = {
  588. F(144000, P_XO, 16, 12, 125),
  589. F(400000, P_XO, 12, 1, 5),
  590. F(24000000, P_GPLL2_OUT_MAIN, 12, 1, 2),
  591. F(48000000, P_GPLL2_OUT_MAIN, 12, 0, 0),
  592. F(96000000, P_GPLL2_OUT_MAIN, 6, 0, 0),
  593. F(177777778, P_GPLL0_OUT_MAIN, 4.5, 0, 0),
  594. F(192000000, P_GPLL2_OUT_MAIN, 3, 0, 0),
  595. F(200000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
  596. { }
  597. };
  598. static struct clk_rcg2 gcc_sdcc1_apps_clk_src = {
  599. .cmd_rcgr = 0x33004,
  600. .mnd_width = 8,
  601. .hid_width = 5,
  602. .parent_map = gcc_parent_map_8,
  603. .freq_tbl = ftbl_gcc_sdcc1_apps_clk_src,
  604. .clkr.hw.init = &(const struct clk_init_data) {
  605. .name = "gcc_sdcc1_apps_clk_src",
  606. .parent_data = gcc_parent_data_8,
  607. .num_parents = ARRAY_SIZE(gcc_parent_data_8),
  608. .ops = &clk_rcg2_floor_ops,
  609. },
  610. };
  611. static const struct freq_tbl ftbl_gcc_sdcc1_ice_core_clk_src[] = {
  612. F(300000000, P_GPLL4_OUT_MAIN, 4, 0, 0),
  613. { }
  614. };
  615. static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = {
  616. .cmd_rcgr = 0x33018,
  617. .mnd_width = 8,
  618. .hid_width = 5,
  619. .parent_map = gcc_parent_map_9,
  620. .freq_tbl = ftbl_gcc_sdcc1_ice_core_clk_src,
  621. .clkr.hw.init = &(const struct clk_init_data) {
  622. .name = "gcc_sdcc1_ice_core_clk_src",
  623. .parent_data = gcc_parent_data_9,
  624. .num_parents = ARRAY_SIZE(gcc_parent_data_9),
  625. .ops = &clk_rcg2_ops,
  626. },
  627. };
  628. static struct clk_rcg2 gcc_uniphy_sys_clk_src = {
  629. .cmd_rcgr = 0x17090,
  630. .mnd_width = 0,
  631. .hid_width = 5,
  632. .parent_map = gcc_parent_map_4,
  633. .freq_tbl = ftbl_gcc_nss_ts_clk_src,
  634. .clkr.hw.init = &(const struct clk_init_data) {
  635. .name = "gcc_uniphy_sys_clk_src",
  636. .parent_data = &gcc_parent_data_xo,
  637. .num_parents = 1,
  638. .ops = &clk_rcg2_ops,
  639. },
  640. };
  641. static struct clk_rcg2 gcc_usb0_aux_clk_src = {
  642. .cmd_rcgr = 0x2c018,
  643. .mnd_width = 16,
  644. .hid_width = 5,
  645. .parent_map = gcc_parent_map_10,
  646. .freq_tbl = ftbl_gcc_nss_ts_clk_src,
  647. .clkr.hw.init = &(const struct clk_init_data) {
  648. .name = "gcc_usb0_aux_clk_src",
  649. .parent_data = gcc_parent_data_10,
  650. .num_parents = ARRAY_SIZE(gcc_parent_data_10),
  651. .ops = &clk_rcg2_ops,
  652. },
  653. };
  654. static const struct freq_tbl ftbl_gcc_usb0_master_clk_src[] = {
  655. F(200000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
  656. { }
  657. };
  658. static struct clk_rcg2 gcc_usb0_master_clk_src = {
  659. .cmd_rcgr = 0x2c004,
  660. .mnd_width = 8,
  661. .hid_width = 5,
  662. .parent_map = gcc_parent_map_0,
  663. .freq_tbl = ftbl_gcc_usb0_master_clk_src,
  664. .clkr.hw.init = &(const struct clk_init_data) {
  665. .name = "gcc_usb0_master_clk_src",
  666. .parent_data = gcc_parent_data_0,
  667. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  668. .ops = &clk_rcg2_ops,
  669. },
  670. };
  671. static const struct freq_tbl ftbl_gcc_usb0_mock_utmi_clk_src[] = {
  672. F(24000000, P_XO, 1, 0, 0),
  673. F(60000000, P_GPLL4_OUT_AUX, 10, 1, 2),
  674. { }
  675. };
  676. static struct clk_rcg2 gcc_usb0_mock_utmi_clk_src = {
  677. .cmd_rcgr = 0x2c02c,
  678. .mnd_width = 8,
  679. .hid_width = 5,
  680. .parent_map = gcc_parent_map_5,
  681. .freq_tbl = ftbl_gcc_usb0_mock_utmi_clk_src,
  682. .clkr.hw.init = &(const struct clk_init_data) {
  683. .name = "gcc_usb0_mock_utmi_clk_src",
  684. .parent_data = gcc_parent_data_5,
  685. .num_parents = ARRAY_SIZE(gcc_parent_data_5),
  686. .ops = &clk_rcg2_ops,
  687. },
  688. };
  689. static struct clk_rcg2 gcc_usb1_mock_utmi_clk_src = {
  690. .cmd_rcgr = 0x3c004,
  691. .mnd_width = 8,
  692. .hid_width = 5,
  693. .parent_map = gcc_parent_map_5,
  694. .freq_tbl = ftbl_gcc_usb0_mock_utmi_clk_src,
  695. .clkr.hw.init = &(const struct clk_init_data) {
  696. .name = "gcc_usb1_mock_utmi_clk_src",
  697. .parent_data = gcc_parent_data_5,
  698. .num_parents = ARRAY_SIZE(gcc_parent_data_5),
  699. .ops = &clk_rcg2_ops,
  700. },
  701. };
  702. static const struct freq_tbl ftbl_gcc_wcss_ahb_clk_src[] = {
  703. F(24000000, P_XO, 1, 0, 0),
  704. F(133333333, P_GPLL0_OUT_MAIN, 6, 0, 0),
  705. { }
  706. };
  707. static struct clk_rcg2 gcc_wcss_ahb_clk_src = {
  708. .cmd_rcgr = 0x25030,
  709. .freq_tbl = ftbl_gcc_wcss_ahb_clk_src,
  710. .hid_width = 5,
  711. .parent_map = gcc_parent_map_1,
  712. .clkr.hw.init = &(const struct clk_init_data) {
  713. .name = "gcc_wcss_ahb_clk_src",
  714. .parent_data = gcc_parent_data_1,
  715. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  716. .ops = &clk_rcg2_ops,
  717. },
  718. };
  719. static const struct freq_tbl ftbl_gcc_qdss_at_clk_src[] = {
  720. F(240000000, P_GPLL4_OUT_MAIN, 5, 0, 0),
  721. { }
  722. };
  723. static struct clk_rcg2 gcc_qdss_at_clk_src = {
  724. .cmd_rcgr = 0x2d004,
  725. .freq_tbl = ftbl_gcc_qdss_at_clk_src,
  726. .hid_width = 5,
  727. .parent_map = gcc_parent_map_3,
  728. .clkr.hw.init = &(const struct clk_init_data) {
  729. .name = "gcc_qdss_at_clk_src",
  730. .parent_data = gcc_parent_data_3,
  731. .num_parents = ARRAY_SIZE(gcc_parent_data_3),
  732. .ops = &clk_rcg2_ops,
  733. },
  734. };
  735. static const struct freq_tbl ftbl_gcc_qdss_tsctr_clk_src[] = {
  736. F(600000000, P_GPLL4_OUT_MAIN, 2, 0, 0),
  737. { }
  738. };
  739. static struct clk_rcg2 gcc_qdss_tsctr_clk_src = {
  740. .cmd_rcgr = 0x2d01c,
  741. .freq_tbl = ftbl_gcc_qdss_tsctr_clk_src,
  742. .hid_width = 5,
  743. .parent_map = gcc_parent_map_3,
  744. .clkr.hw.init = &(const struct clk_init_data) {
  745. .name = "gcc_qdss_tsctr_clk_src",
  746. .parent_data = gcc_parent_data_3,
  747. .num_parents = ARRAY_SIZE(gcc_parent_data_3),
  748. .ops = &clk_rcg2_ops,
  749. },
  750. };
  751. static struct clk_fixed_factor gcc_qdss_tsctr_div2_clk_src = {
  752. .mult = 1,
  753. .div = 2,
  754. .hw.init = &(const struct clk_init_data) {
  755. .name = "gcc_qdss_tsctr_div2_clk_src",
  756. .parent_hws = (const struct clk_hw *[]) {
  757. &gcc_qdss_tsctr_clk_src.clkr.hw
  758. },
  759. .num_parents = 1,
  760. .flags = CLK_SET_RATE_PARENT,
  761. .ops = &clk_fixed_factor_ops,
  762. },
  763. };
  764. static struct clk_fixed_factor gcc_qdss_dap_sync_clk_src = {
  765. .mult = 1,
  766. .div = 4,
  767. .hw.init = &(const struct clk_init_data) {
  768. .name = "gcc_qdss_dap_sync_clk_src",
  769. .parent_hws = (const struct clk_hw *[]) {
  770. &gcc_qdss_tsctr_clk_src.clkr.hw
  771. },
  772. .num_parents = 1,
  773. .ops = &clk_fixed_factor_ops,
  774. },
  775. };
  776. static const struct freq_tbl ftbl_gcc_system_noc_bfdcd_clk_src[] = {
  777. F(24000000, P_XO, 1, 0, 0),
  778. F(133333333, P_GPLL0_OUT_MAIN, 6, 0, 0),
  779. F(200000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
  780. F(266666667, P_GPLL4_OUT_MAIN, 4.5, 0, 0),
  781. { }
  782. };
  783. static struct clk_rcg2 gcc_system_noc_bfdcd_clk_src = {
  784. .cmd_rcgr = 0x2e004,
  785. .freq_tbl = ftbl_gcc_system_noc_bfdcd_clk_src,
  786. .hid_width = 5,
  787. .parent_map = gcc_parent_map_9,
  788. .clkr.hw.init = &(const struct clk_init_data) {
  789. .name = "gcc_system_noc_bfdcd_clk_src",
  790. .parent_data = gcc_parent_data_9,
  791. .num_parents = ARRAY_SIZE(gcc_parent_data_9),
  792. .ops = &clk_rcg2_ops,
  793. },
  794. };
  795. static const struct freq_tbl ftbl_gcc_pcnoc_bfdcd_clk_src[] = {
  796. F(24000000, P_XO, 1, 0, 0),
  797. F(50000000, P_GPLL0_OUT_MAIN, 16, 0, 0),
  798. F(100000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
  799. { }
  800. };
  801. static struct clk_rcg2 gcc_pcnoc_bfdcd_clk_src = {
  802. .cmd_rcgr = 0x31004,
  803. .mnd_width = 0,
  804. .hid_width = 5,
  805. .parent_map = gcc_parent_map_0,
  806. .freq_tbl = ftbl_gcc_pcnoc_bfdcd_clk_src,
  807. .clkr.hw.init = &(const struct clk_init_data) {
  808. .name = "gcc_pcnoc_bfdcd_clk_src",
  809. .parent_data = gcc_parent_data_0,
  810. .num_parents = ARRAY_SIZE(gcc_parent_data_0),
  811. .ops = &clk_rcg2_ops,
  812. },
  813. };
  814. static const struct freq_tbl ftbl_gcc_lpass_sway_clk_src[] = {
  815. F(133333333, P_GPLL0_OUT_MAIN, 6, 0, 0),
  816. { }
  817. };
  818. static struct clk_rcg2 gcc_lpass_sway_clk_src = {
  819. .cmd_rcgr = 0x27004,
  820. .mnd_width = 0,
  821. .hid_width = 5,
  822. .parent_map = gcc_parent_map_1,
  823. .freq_tbl = ftbl_gcc_lpass_sway_clk_src,
  824. .clkr.hw.init = &(const struct clk_init_data) {
  825. .name = "gcc_lpass_sway_clk_src",
  826. .parent_data = gcc_parent_data_1,
  827. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  828. .ops = &clk_rcg2_ops,
  829. },
  830. };
  831. static struct clk_rcg2 gcc_lpass_axim_clk_src = {
  832. .cmd_rcgr = 0x2700c,
  833. .mnd_width = 0,
  834. .hid_width = 5,
  835. .parent_map = gcc_parent_map_1,
  836. .freq_tbl = ftbl_gcc_lpass_sway_clk_src,
  837. .clkr.hw.init = &(const struct clk_init_data) {
  838. .name = "gcc_lpass_axim_clk_src",
  839. .parent_data = gcc_parent_data_1,
  840. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  841. .ops = &clk_rcg2_ops,
  842. },
  843. };
  844. static struct clk_fixed_factor gcc_eud_at_div_clk_src = {
  845. .mult = 1,
  846. .div = 6,
  847. .hw.init = &(const struct clk_init_data) {
  848. .name = "gcc_eud_at_div_clk_src",
  849. .parent_hws = (const struct clk_hw *[]) {
  850. &gcc_qdss_at_clk_src.clkr.hw },
  851. .num_parents = 1,
  852. .flags = CLK_SET_RATE_PARENT,
  853. .ops = &clk_fixed_factor_ops,
  854. },
  855. };
  856. static const struct freq_tbl ftbl_gcc_sleep_clk_src[] = {
  857. F(32000, P_SLEEP_CLK, 1, 0, 0),
  858. { }
  859. };
  860. static struct clk_rcg2 gcc_sleep_clk_src = {
  861. .cmd_rcgr = 0x3400c,
  862. .mnd_width = 0,
  863. .hid_width = 5,
  864. .parent_map = gcc_parent_map_6,
  865. .freq_tbl = ftbl_gcc_sleep_clk_src,
  866. .clkr.hw.init = &(const struct clk_init_data) {
  867. .name = "gcc_sleep_clk_src",
  868. .parent_data = gcc_parent_data_6,
  869. .num_parents = ARRAY_SIZE(gcc_parent_data_6),
  870. .ops = &clk_rcg2_ops,
  871. },
  872. };
  873. static const struct freq_tbl ftbl_gcc_qpic_io_macro_clk_src[] = {
  874. F(24000000, P_XO, 1, 0, 0),
  875. F(100000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
  876. F(200000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
  877. F(320000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0),
  878. F(400000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
  879. { }
  880. };
  881. static struct clk_rcg2 gcc_qpic_io_macro_clk_src = {
  882. .cmd_rcgr = 0x32004,
  883. .mnd_width = 0,
  884. .hid_width = 5,
  885. .parent_map = gcc_parent_map_11,
  886. .freq_tbl = ftbl_gcc_qpic_io_macro_clk_src,
  887. .clkr.hw.init = &(const struct clk_init_data) {
  888. .name = "gcc_qpic_io_macro_clk_src",
  889. .parent_data = gcc_parent_data_11,
  890. .num_parents = ARRAY_SIZE(gcc_parent_data_11),
  891. .ops = &clk_rcg2_ops,
  892. },
  893. };
  894. static struct clk_rcg2 gcc_qpic_clk_src = {
  895. .cmd_rcgr = 0x32020,
  896. .mnd_width = 0,
  897. .hid_width = 5,
  898. .parent_map = gcc_parent_map_11,
  899. .freq_tbl = ftbl_gcc_qpic_io_macro_clk_src,
  900. .clkr.hw.init = &(const struct clk_init_data) {
  901. .name = "gcc_qpic_clk_src",
  902. .parent_data = gcc_parent_data_11,
  903. .num_parents = ARRAY_SIZE(gcc_parent_data_11),
  904. .ops = &clk_rcg2_ops,
  905. },
  906. };
  907. static struct clk_rcg2 gcc_pcie0_rchng_clk_src = {
  908. .cmd_rcgr = 0x28028,
  909. .mnd_width = 0,
  910. .hid_width = 5,
  911. .parent_map = gcc_parent_map_1,
  912. .freq_tbl = ftbl_gcc_adss_pwm_clk_src,
  913. .clkr.hw.init = &(const struct clk_init_data) {
  914. .name = "gcc_pcie0_rchng_clk_src",
  915. .parent_data = gcc_parent_data_1,
  916. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  917. .ops = &clk_rcg2_ops,
  918. },
  919. };
  920. static struct clk_rcg2 gcc_pcie1_rchng_clk_src = {
  921. .cmd_rcgr = 0x29028,
  922. .mnd_width = 0,
  923. .hid_width = 5,
  924. .parent_map = gcc_parent_map_1,
  925. .freq_tbl = ftbl_gcc_adss_pwm_clk_src,
  926. .clkr.hw.init = &(const struct clk_init_data) {
  927. .name = "gcc_pcie1_rchng_clk_src",
  928. .parent_data = gcc_parent_data_1,
  929. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  930. .ops = &clk_rcg2_ops,
  931. },
  932. };
  933. static struct clk_rcg2 gcc_pcie2_rchng_clk_src = {
  934. .cmd_rcgr = 0x2a028,
  935. .mnd_width = 0,
  936. .hid_width = 5,
  937. .parent_map = gcc_parent_map_1,
  938. .freq_tbl = ftbl_gcc_adss_pwm_clk_src,
  939. .clkr.hw.init = &(const struct clk_init_data) {
  940. .name = "gcc_pcie2_rchng_clk_src",
  941. .parent_data = gcc_parent_data_1,
  942. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  943. .ops = &clk_rcg2_ops,
  944. },
  945. };
  946. static struct clk_rcg2 gcc_pcie3_rchng_clk_src = {
  947. .cmd_rcgr = 0x2b028,
  948. .mnd_width = 0,
  949. .hid_width = 5,
  950. .parent_map = gcc_parent_map_1,
  951. .freq_tbl = ftbl_gcc_adss_pwm_clk_src,
  952. .clkr.hw.init = &(const struct clk_init_data) {
  953. .name = "gcc_pcie3_rchng_clk_src",
  954. .parent_data = gcc_parent_data_1,
  955. .num_parents = ARRAY_SIZE(gcc_parent_data_1),
  956. .ops = &clk_rcg2_ops,
  957. },
  958. };
  959. static struct clk_regmap_div gcc_qupv3_i2c0_div_clk_src = {
  960. .reg = 0x2020,
  961. .shift = 0,
  962. .width = 2,
  963. .clkr.hw.init = &(const struct clk_init_data) {
  964. .name = "gcc_qupv3_i2c0_div_clk_src",
  965. .parent_hws = (const struct clk_hw*[]) {
  966. &gcc_qupv3_i2c0_clk_src.clkr.hw,
  967. },
  968. .num_parents = 1,
  969. .flags = CLK_SET_RATE_PARENT,
  970. .ops = &clk_regmap_div_ro_ops,
  971. },
  972. };
  973. static struct clk_regmap_div gcc_qupv3_i2c1_div_clk_src = {
  974. .reg = 0x3020,
  975. .shift = 0,
  976. .width = 2,
  977. .clkr.hw.init = &(const struct clk_init_data) {
  978. .name = "gcc_qupv3_i2c1_div_clk_src",
  979. .parent_hws = (const struct clk_hw*[]) {
  980. &gcc_qupv3_i2c1_clk_src.clkr.hw,
  981. },
  982. .num_parents = 1,
  983. .flags = CLK_SET_RATE_PARENT,
  984. .ops = &clk_regmap_div_ro_ops,
  985. },
  986. };
  987. static struct clk_regmap_div gcc_usb0_mock_utmi_div_clk_src = {
  988. .reg = 0x2c040,
  989. .shift = 0,
  990. .width = 2,
  991. .clkr.hw.init = &(const struct clk_init_data) {
  992. .name = "gcc_usb0_mock_utmi_div_clk_src",
  993. .parent_hws = (const struct clk_hw*[]) {
  994. &gcc_usb0_mock_utmi_clk_src.clkr.hw,
  995. },
  996. .num_parents = 1,
  997. .flags = CLK_SET_RATE_PARENT,
  998. .ops = &clk_regmap_div_ro_ops,
  999. },
  1000. };
  1001. static struct clk_regmap_div gcc_usb1_mock_utmi_div_clk_src = {
  1002. .reg = 0x3c018,
  1003. .shift = 0,
  1004. .width = 2,
  1005. .clkr.hw.init = &(const struct clk_init_data) {
  1006. .name = "gcc_usb1_mock_utmi_div_clk_src",
  1007. .parent_hws = (const struct clk_hw*[]) {
  1008. &gcc_usb1_mock_utmi_clk_src.clkr.hw,
  1009. },
  1010. .num_parents = 1,
  1011. .flags = CLK_SET_RATE_PARENT,
  1012. .ops = &clk_regmap_div_ro_ops,
  1013. },
  1014. };
  1015. static struct clk_branch gcc_adss_pwm_clk = {
  1016. .halt_reg = 0x1c00c,
  1017. .halt_check = BRANCH_HALT,
  1018. .clkr = {
  1019. .enable_reg = 0x1c00c,
  1020. .enable_mask = BIT(0),
  1021. .hw.init = &(const struct clk_init_data) {
  1022. .name = "gcc_adss_pwm_clk",
  1023. .parent_hws = (const struct clk_hw*[]) {
  1024. &gcc_adss_pwm_clk_src.clkr.hw,
  1025. },
  1026. .num_parents = 1,
  1027. .flags = CLK_SET_RATE_PARENT,
  1028. .ops = &clk_branch2_ops,
  1029. },
  1030. },
  1031. };
  1032. static struct clk_branch gcc_cnoc_pcie0_1lane_s_clk = {
  1033. .halt_reg = 0x31088,
  1034. .halt_check = BRANCH_HALT,
  1035. .clkr = {
  1036. .enable_reg = 0x31088,
  1037. .enable_mask = BIT(0),
  1038. .hw.init = &(const struct clk_init_data) {
  1039. .name = "gcc_cnoc_pcie0_1lane_s_clk",
  1040. .parent_hws = (const struct clk_hw*[]) {
  1041. &gcc_pcie0_axi_s_clk_src.clkr.hw,
  1042. },
  1043. .num_parents = 1,
  1044. .flags = CLK_SET_RATE_PARENT,
  1045. .ops = &clk_branch2_ops,
  1046. },
  1047. },
  1048. };
  1049. static struct clk_branch gcc_cnoc_pcie1_1lane_s_clk = {
  1050. .halt_reg = 0x3108c,
  1051. .halt_check = BRANCH_HALT,
  1052. .clkr = {
  1053. .enable_reg = 0x3108c,
  1054. .enable_mask = BIT(0),
  1055. .hw.init = &(const struct clk_init_data) {
  1056. .name = "gcc_cnoc_pcie1_1lane_s_clk",
  1057. .parent_hws = (const struct clk_hw*[]) {
  1058. &gcc_pcie1_axi_s_clk_src.clkr.hw,
  1059. },
  1060. .num_parents = 1,
  1061. .flags = CLK_SET_RATE_PARENT,
  1062. .ops = &clk_branch2_ops,
  1063. },
  1064. },
  1065. };
  1066. static struct clk_branch gcc_cnoc_pcie2_2lane_s_clk = {
  1067. .halt_reg = 0x31090,
  1068. .halt_check = BRANCH_HALT,
  1069. .clkr = {
  1070. .enable_reg = 0x31090,
  1071. .enable_mask = BIT(0),
  1072. .hw.init = &(const struct clk_init_data) {
  1073. .name = "gcc_cnoc_pcie2_2lane_s_clk",
  1074. .parent_hws = (const struct clk_hw*[]) {
  1075. &gcc_pcie2_axi_s_clk_src.clkr.hw,
  1076. },
  1077. .num_parents = 1,
  1078. .flags = CLK_SET_RATE_PARENT,
  1079. .ops = &clk_branch2_ops,
  1080. },
  1081. },
  1082. };
  1083. static struct clk_branch gcc_cnoc_pcie3_2lane_s_clk = {
  1084. .halt_reg = 0x31094,
  1085. .halt_check = BRANCH_HALT,
  1086. .clkr = {
  1087. .enable_reg = 0x31094,
  1088. .enable_mask = BIT(0),
  1089. .hw.init = &(const struct clk_init_data) {
  1090. .name = "gcc_cnoc_pcie3_2lane_s_clk",
  1091. .parent_hws = (const struct clk_hw*[]) {
  1092. &gcc_pcie3_axi_s_clk_src.clkr.hw,
  1093. },
  1094. .num_parents = 1,
  1095. .flags = CLK_SET_RATE_PARENT,
  1096. .ops = &clk_branch2_ops,
  1097. },
  1098. },
  1099. };
  1100. static struct clk_branch gcc_cnoc_usb_clk = {
  1101. .halt_reg = 0x310a8,
  1102. .halt_check = BRANCH_HALT_VOTED,
  1103. .clkr = {
  1104. .enable_reg = 0x310a8,
  1105. .enable_mask = BIT(0),
  1106. .hw.init = &(const struct clk_init_data) {
  1107. .name = "gcc_cnoc_usb_clk",
  1108. .parent_hws = (const struct clk_hw*[]) {
  1109. &gcc_usb0_master_clk_src.clkr.hw,
  1110. },
  1111. .num_parents = 1,
  1112. .flags = CLK_SET_RATE_PARENT,
  1113. .ops = &clk_branch2_ops,
  1114. },
  1115. },
  1116. };
  1117. static struct clk_branch gcc_mdio_ahb_clk = {
  1118. .halt_reg = 0x17040,
  1119. .halt_check = BRANCH_HALT,
  1120. .clkr = {
  1121. .enable_reg = 0x17040,
  1122. .enable_mask = BIT(0),
  1123. .hw.init = &(const struct clk_init_data) {
  1124. .name = "gcc_mdio_ahb_clk",
  1125. .parent_hws = (const struct clk_hw*[]) {
  1126. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1127. },
  1128. .num_parents = 1,
  1129. .flags = CLK_SET_RATE_PARENT,
  1130. .ops = &clk_branch2_ops,
  1131. },
  1132. },
  1133. };
  1134. static struct clk_branch gcc_nss_ts_clk = {
  1135. .halt_reg = 0x17018,
  1136. .halt_check = BRANCH_HALT_VOTED,
  1137. .clkr = {
  1138. .enable_reg = 0x17018,
  1139. .enable_mask = BIT(0),
  1140. .hw.init = &(const struct clk_init_data) {
  1141. .name = "gcc_nss_ts_clk",
  1142. .parent_hws = (const struct clk_hw*[]) {
  1143. &gcc_nss_ts_clk_src.clkr.hw,
  1144. },
  1145. .num_parents = 1,
  1146. .flags = CLK_SET_RATE_PARENT,
  1147. .ops = &clk_branch2_ops,
  1148. },
  1149. },
  1150. };
  1151. static struct clk_branch gcc_nsscc_clk = {
  1152. .halt_reg = 0x17034,
  1153. .halt_check = BRANCH_HALT,
  1154. .clkr = {
  1155. .enable_reg = 0x17034,
  1156. .enable_mask = BIT(0),
  1157. .hw.init = &(const struct clk_init_data) {
  1158. .name = "gcc_nsscc_clk",
  1159. .parent_hws = (const struct clk_hw*[]) {
  1160. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1161. },
  1162. .num_parents = 1,
  1163. .flags = CLK_SET_RATE_PARENT,
  1164. .ops = &clk_branch2_ops,
  1165. },
  1166. },
  1167. };
  1168. static struct clk_branch gcc_nsscfg_clk = {
  1169. .halt_reg = 0x1702c,
  1170. .halt_check = BRANCH_HALT,
  1171. .clkr = {
  1172. .enable_reg = 0x1702c,
  1173. .enable_mask = BIT(0),
  1174. .hw.init = &(const struct clk_init_data) {
  1175. .name = "gcc_nsscfg_clk",
  1176. .parent_hws = (const struct clk_hw*[]) {
  1177. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1178. },
  1179. .num_parents = 1,
  1180. .flags = CLK_SET_RATE_PARENT,
  1181. .ops = &clk_branch2_ops,
  1182. },
  1183. },
  1184. };
  1185. static struct clk_branch gcc_nssnoc_atb_clk = {
  1186. .halt_reg = 0x17014,
  1187. .halt_check = BRANCH_HALT,
  1188. .clkr = {
  1189. .enable_reg = 0x17014,
  1190. .enable_mask = BIT(0),
  1191. .hw.init = &(const struct clk_init_data) {
  1192. .name = "gcc_nssnoc_atb_clk",
  1193. .parent_hws = (const struct clk_hw*[]) {
  1194. &gcc_qdss_at_clk_src.clkr.hw,
  1195. },
  1196. .num_parents = 1,
  1197. .flags = CLK_SET_RATE_PARENT,
  1198. .ops = &clk_branch2_ops,
  1199. },
  1200. },
  1201. };
  1202. static struct clk_branch gcc_nssnoc_nsscc_clk = {
  1203. .halt_reg = 0x17030,
  1204. .halt_check = BRANCH_HALT,
  1205. .clkr = {
  1206. .enable_reg = 0x17030,
  1207. .enable_mask = BIT(0),
  1208. .hw.init = &(const struct clk_init_data) {
  1209. .name = "gcc_nssnoc_nsscc_clk",
  1210. .parent_hws = (const struct clk_hw*[]) {
  1211. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1212. },
  1213. .num_parents = 1,
  1214. .flags = CLK_SET_RATE_PARENT,
  1215. .ops = &clk_branch2_ops,
  1216. },
  1217. },
  1218. };
  1219. static struct clk_branch gcc_nssnoc_pcnoc_1_clk = {
  1220. .halt_reg = 0x17080,
  1221. .halt_check = BRANCH_HALT,
  1222. .clkr = {
  1223. .enable_reg = 0x17080,
  1224. .enable_mask = BIT(0),
  1225. .hw.init = &(const struct clk_init_data) {
  1226. .name = "gcc_nssnoc_pcnoc_1_clk",
  1227. .parent_hws = (const struct clk_hw*[]) {
  1228. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1229. },
  1230. .num_parents = 1,
  1231. .flags = CLK_SET_RATE_PARENT,
  1232. .ops = &clk_branch2_ops,
  1233. },
  1234. },
  1235. };
  1236. static struct clk_branch gcc_nssnoc_qosgen_ref_clk = {
  1237. .halt_reg = 0x1701c,
  1238. .halt_check = BRANCH_HALT,
  1239. .clkr = {
  1240. .enable_reg = 0x1701c,
  1241. .enable_mask = BIT(0),
  1242. .hw.init = &(const struct clk_init_data) {
  1243. .name = "gcc_nssnoc_qosgen_ref_clk",
  1244. .parent_hws = (const struct clk_hw *[]) {
  1245. &gcc_xo_div4_clk_src.hw
  1246. },
  1247. .num_parents = 1,
  1248. .flags = CLK_SET_RATE_PARENT,
  1249. .ops = &clk_branch2_ops,
  1250. },
  1251. },
  1252. };
  1253. static struct clk_branch gcc_nssnoc_snoc_1_clk = {
  1254. .halt_reg = 0x1707c,
  1255. .halt_check = BRANCH_HALT,
  1256. .clkr = {
  1257. .enable_reg = 0x1707c,
  1258. .enable_mask = BIT(0),
  1259. .hw.init = &(const struct clk_init_data) {
  1260. .name = "gcc_nssnoc_snoc_1_clk",
  1261. .parent_hws = (const struct clk_hw*[]) {
  1262. &gcc_system_noc_bfdcd_clk_src.clkr.hw
  1263. },
  1264. .num_parents = 1,
  1265. .flags = CLK_SET_RATE_PARENT,
  1266. .ops = &clk_branch2_ops,
  1267. },
  1268. },
  1269. };
  1270. static struct clk_branch gcc_nssnoc_snoc_clk = {
  1271. .halt_reg = 0x17028,
  1272. .halt_check = BRANCH_HALT,
  1273. .clkr = {
  1274. .enable_reg = 0x17028,
  1275. .enable_mask = BIT(0),
  1276. .hw.init = &(const struct clk_init_data) {
  1277. .name = "gcc_nssnoc_snoc_clk",
  1278. .parent_hws = (const struct clk_hw*[]) {
  1279. &gcc_system_noc_bfdcd_clk_src.clkr.hw
  1280. },
  1281. .num_parents = 1,
  1282. .flags = CLK_SET_RATE_PARENT,
  1283. .ops = &clk_branch2_ops,
  1284. },
  1285. },
  1286. };
  1287. static struct clk_branch gcc_nssnoc_timeout_ref_clk = {
  1288. .halt_reg = 0x17020,
  1289. .halt_check = BRANCH_HALT,
  1290. .clkr = {
  1291. .enable_reg = 0x17020,
  1292. .enable_mask = BIT(0),
  1293. .hw.init = &(const struct clk_init_data) {
  1294. .name = "gcc_nssnoc_timeout_ref_clk",
  1295. .parent_hws = (const struct clk_hw*[]) {
  1296. &gcc_xo_div4_clk_src.hw,
  1297. },
  1298. .num_parents = 1,
  1299. .flags = CLK_SET_RATE_PARENT,
  1300. .ops = &clk_branch2_ops,
  1301. },
  1302. },
  1303. };
  1304. static struct clk_branch gcc_nssnoc_xo_dcd_clk = {
  1305. .halt_reg = 0x17074,
  1306. .halt_check = BRANCH_HALT,
  1307. .clkr = {
  1308. .enable_reg = 0x17074,
  1309. .enable_mask = BIT(0),
  1310. .hw.init = &(const struct clk_init_data) {
  1311. .name = "gcc_nssnoc_xo_dcd_clk",
  1312. .parent_hws = (const struct clk_hw*[]) {
  1313. &gcc_xo_clk_src.clkr.hw,
  1314. },
  1315. .num_parents = 1,
  1316. .flags = CLK_SET_RATE_PARENT,
  1317. .ops = &clk_branch2_ops,
  1318. },
  1319. },
  1320. };
  1321. static struct clk_branch gcc_pcie0_ahb_clk = {
  1322. .halt_reg = 0x28030,
  1323. .halt_check = BRANCH_HALT,
  1324. .clkr = {
  1325. .enable_reg = 0x28030,
  1326. .enable_mask = BIT(0),
  1327. .hw.init = &(const struct clk_init_data) {
  1328. .name = "gcc_pcie0_ahb_clk",
  1329. .parent_hws = (const struct clk_hw*[]) {
  1330. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1331. },
  1332. .num_parents = 1,
  1333. .flags = CLK_SET_RATE_PARENT,
  1334. .ops = &clk_branch2_ops,
  1335. },
  1336. },
  1337. };
  1338. static struct clk_branch gcc_pcie0_aux_clk = {
  1339. .halt_reg = 0x28070,
  1340. .halt_check = BRANCH_HALT,
  1341. .clkr = {
  1342. .enable_reg = 0x28070,
  1343. .enable_mask = BIT(0),
  1344. .hw.init = &(const struct clk_init_data) {
  1345. .name = "gcc_pcie0_aux_clk",
  1346. .parent_hws = (const struct clk_hw*[]) {
  1347. &gcc_pcie_aux_clk_src.clkr.hw,
  1348. },
  1349. .num_parents = 1,
  1350. .flags = CLK_SET_RATE_PARENT,
  1351. .ops = &clk_branch2_ops,
  1352. },
  1353. },
  1354. };
  1355. static struct clk_branch gcc_pcie0_axi_m_clk = {
  1356. .halt_reg = 0x28038,
  1357. .halt_check = BRANCH_HALT,
  1358. .clkr = {
  1359. .enable_reg = 0x28038,
  1360. .enable_mask = BIT(0),
  1361. .hw.init = &(const struct clk_init_data) {
  1362. .name = "gcc_pcie0_axi_m_clk",
  1363. .parent_hws = (const struct clk_hw*[]) {
  1364. &gcc_pcie0_axi_m_clk_src.clkr.hw,
  1365. },
  1366. .num_parents = 1,
  1367. .flags = CLK_SET_RATE_PARENT,
  1368. .ops = &clk_branch2_ops,
  1369. },
  1370. },
  1371. };
  1372. static struct clk_branch gcc_anoc_pcie0_1lane_m_clk = {
  1373. .halt_reg = 0x2e07c,
  1374. .halt_check = BRANCH_HALT,
  1375. .clkr = {
  1376. .enable_reg = 0x2e07c,
  1377. .enable_mask = BIT(0),
  1378. .hw.init = &(const struct clk_init_data) {
  1379. .name = "gcc_anoc_pcie0_1lane_m_clk",
  1380. .parent_hws = (const struct clk_hw*[]) {
  1381. &gcc_pcie0_axi_m_clk_src.clkr.hw,
  1382. },
  1383. .num_parents = 1,
  1384. .flags = CLK_SET_RATE_PARENT,
  1385. .ops = &clk_branch2_ops,
  1386. },
  1387. },
  1388. };
  1389. static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
  1390. .halt_reg = 0x28048,
  1391. .halt_check = BRANCH_HALT,
  1392. .clkr = {
  1393. .enable_reg = 0x28048,
  1394. .enable_mask = BIT(0),
  1395. .hw.init = &(const struct clk_init_data) {
  1396. .name = "gcc_pcie0_axi_s_bridge_clk",
  1397. .parent_hws = (const struct clk_hw*[]) {
  1398. &gcc_pcie0_axi_s_clk_src.clkr.hw,
  1399. },
  1400. .num_parents = 1,
  1401. .flags = CLK_SET_RATE_PARENT,
  1402. .ops = &clk_branch2_ops,
  1403. },
  1404. },
  1405. };
  1406. static struct clk_branch gcc_pcie0_axi_s_clk = {
  1407. .halt_reg = 0x28040,
  1408. .halt_check = BRANCH_HALT,
  1409. .clkr = {
  1410. .enable_reg = 0x28040,
  1411. .enable_mask = BIT(0),
  1412. .hw.init = &(const struct clk_init_data) {
  1413. .name = "gcc_pcie0_axi_s_clk",
  1414. .parent_hws = (const struct clk_hw*[]) {
  1415. &gcc_pcie0_axi_s_clk_src.clkr.hw,
  1416. },
  1417. .num_parents = 1,
  1418. .flags = CLK_SET_RATE_PARENT,
  1419. .ops = &clk_branch2_ops,
  1420. },
  1421. },
  1422. };
  1423. static struct clk_regmap_phy_mux gcc_pcie0_pipe_clk_src = {
  1424. .reg = 0x28064,
  1425. .clkr = {
  1426. .hw.init = &(const struct clk_init_data) {
  1427. .name = "pcie0_pipe_clk_src",
  1428. .parent_data = &(const struct clk_parent_data) {
  1429. .index = DT_PCIE30_PHY0_PIPE_CLK,
  1430. },
  1431. .num_parents = 1,
  1432. .ops = &clk_regmap_phy_mux_ops,
  1433. },
  1434. },
  1435. };
  1436. static struct clk_branch gcc_pcie0_pipe_clk = {
  1437. .halt_reg = 0x28068,
  1438. .halt_check = BRANCH_HALT_DELAY,
  1439. .clkr = {
  1440. .enable_reg = 0x28068,
  1441. .enable_mask = BIT(0),
  1442. .hw.init = &(const struct clk_init_data) {
  1443. .name = "gcc_pcie0_pipe_clk",
  1444. .parent_hws = (const struct clk_hw *[]) {
  1445. &gcc_pcie0_pipe_clk_src.clkr.hw
  1446. },
  1447. .num_parents = 1,
  1448. .flags = CLK_SET_RATE_PARENT,
  1449. .ops = &clk_branch2_ops,
  1450. },
  1451. },
  1452. };
  1453. static struct clk_branch gcc_pcie1_ahb_clk = {
  1454. .halt_reg = 0x29030,
  1455. .halt_check = BRANCH_HALT,
  1456. .clkr = {
  1457. .enable_reg = 0x29030,
  1458. .enable_mask = BIT(0),
  1459. .hw.init = &(const struct clk_init_data) {
  1460. .name = "gcc_pcie1_ahb_clk",
  1461. .parent_hws = (const struct clk_hw*[]) {
  1462. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1463. },
  1464. .num_parents = 1,
  1465. .flags = CLK_SET_RATE_PARENT,
  1466. .ops = &clk_branch2_ops,
  1467. },
  1468. },
  1469. };
  1470. static struct clk_branch gcc_pcie1_aux_clk = {
  1471. .halt_reg = 0x29074,
  1472. .halt_check = BRANCH_HALT,
  1473. .clkr = {
  1474. .enable_reg = 0x29074,
  1475. .enable_mask = BIT(0),
  1476. .hw.init = &(const struct clk_init_data) {
  1477. .name = "gcc_pcie1_aux_clk",
  1478. .parent_hws = (const struct clk_hw*[]) {
  1479. &gcc_pcie_aux_clk_src.clkr.hw,
  1480. },
  1481. .num_parents = 1,
  1482. .flags = CLK_SET_RATE_PARENT,
  1483. .ops = &clk_branch2_ops,
  1484. },
  1485. },
  1486. };
  1487. static struct clk_branch gcc_pcie1_axi_m_clk = {
  1488. .halt_reg = 0x29038,
  1489. .halt_check = BRANCH_HALT,
  1490. .clkr = {
  1491. .enable_reg = 0x29038,
  1492. .enable_mask = BIT(0),
  1493. .hw.init = &(const struct clk_init_data) {
  1494. .name = "gcc_pcie1_axi_m_clk",
  1495. .parent_hws = (const struct clk_hw*[]) {
  1496. &gcc_pcie1_axi_m_clk_src.clkr.hw,
  1497. },
  1498. .num_parents = 1,
  1499. .flags = CLK_SET_RATE_PARENT,
  1500. .ops = &clk_branch2_ops,
  1501. },
  1502. },
  1503. };
  1504. static struct clk_branch gcc_anoc_pcie1_1lane_m_clk = {
  1505. .halt_reg = 0x2e084,
  1506. .halt_check = BRANCH_HALT,
  1507. .clkr = {
  1508. .enable_reg = 0x2e084,
  1509. .enable_mask = BIT(0),
  1510. .hw.init = &(const struct clk_init_data) {
  1511. .name = "gcc_anoc_pcie1_1lane_m_clk",
  1512. .parent_hws = (const struct clk_hw*[]) {
  1513. &gcc_pcie1_axi_m_clk_src.clkr.hw,
  1514. },
  1515. .num_parents = 1,
  1516. .flags = CLK_SET_RATE_PARENT,
  1517. .ops = &clk_branch2_ops,
  1518. },
  1519. },
  1520. };
  1521. static struct clk_branch gcc_pcie1_axi_s_bridge_clk = {
  1522. .halt_reg = 0x29048,
  1523. .halt_check = BRANCH_HALT,
  1524. .clkr = {
  1525. .enable_reg = 0x29048,
  1526. .enable_mask = BIT(0),
  1527. .hw.init = &(const struct clk_init_data) {
  1528. .name = "gcc_pcie1_axi_s_bridge_clk",
  1529. .parent_hws = (const struct clk_hw*[]) {
  1530. &gcc_pcie1_axi_s_clk_src.clkr.hw,
  1531. },
  1532. .num_parents = 1,
  1533. .flags = CLK_SET_RATE_PARENT,
  1534. .ops = &clk_branch2_ops,
  1535. },
  1536. },
  1537. };
  1538. static struct clk_branch gcc_pcie1_axi_s_clk = {
  1539. .halt_reg = 0x29040,
  1540. .halt_check = BRANCH_HALT,
  1541. .clkr = {
  1542. .enable_reg = 0x29040,
  1543. .enable_mask = BIT(0),
  1544. .hw.init = &(const struct clk_init_data) {
  1545. .name = "gcc_pcie1_axi_s_clk",
  1546. .parent_hws = (const struct clk_hw*[]) {
  1547. &gcc_pcie1_axi_s_clk_src.clkr.hw,
  1548. },
  1549. .num_parents = 1,
  1550. .flags = CLK_SET_RATE_PARENT,
  1551. .ops = &clk_branch2_ops,
  1552. },
  1553. },
  1554. };
  1555. static struct clk_regmap_phy_mux gcc_pcie1_pipe_clk_src = {
  1556. .reg = 0x29064,
  1557. .clkr = {
  1558. .hw.init = &(const struct clk_init_data) {
  1559. .name = "pcie1_pipe_clk_src",
  1560. .parent_data = &(const struct clk_parent_data) {
  1561. .index = DT_PCIE30_PHY1_PIPE_CLK,
  1562. },
  1563. .num_parents = 1,
  1564. .ops = &clk_regmap_phy_mux_ops,
  1565. },
  1566. },
  1567. };
  1568. static struct clk_branch gcc_pcie1_pipe_clk = {
  1569. .halt_reg = 0x29068,
  1570. .halt_check = BRANCH_HALT_DELAY,
  1571. .clkr = {
  1572. .enable_reg = 0x29068,
  1573. .enable_mask = BIT(0),
  1574. .hw.init = &(const struct clk_init_data) {
  1575. .name = "gcc_pcie1_pipe_clk",
  1576. .parent_hws = (const struct clk_hw *[]) {
  1577. &gcc_pcie1_pipe_clk_src.clkr.hw
  1578. },
  1579. .num_parents = 1,
  1580. .flags = CLK_SET_RATE_PARENT,
  1581. .ops = &clk_branch2_ops,
  1582. },
  1583. },
  1584. };
  1585. static struct clk_branch gcc_pcie2_ahb_clk = {
  1586. .halt_reg = 0x2a030,
  1587. .halt_check = BRANCH_HALT,
  1588. .clkr = {
  1589. .enable_reg = 0x2a030,
  1590. .enable_mask = BIT(0),
  1591. .hw.init = &(const struct clk_init_data) {
  1592. .name = "gcc_pcie2_ahb_clk",
  1593. .parent_hws = (const struct clk_hw*[]) {
  1594. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1595. },
  1596. .num_parents = 1,
  1597. .flags = CLK_SET_RATE_PARENT,
  1598. .ops = &clk_branch2_ops,
  1599. },
  1600. },
  1601. };
  1602. static struct clk_branch gcc_pcie2_aux_clk = {
  1603. .halt_reg = 0x2a078,
  1604. .halt_check = BRANCH_HALT,
  1605. .clkr = {
  1606. .enable_reg = 0x2a078,
  1607. .enable_mask = BIT(0),
  1608. .hw.init = &(const struct clk_init_data) {
  1609. .name = "gcc_pcie2_aux_clk",
  1610. .parent_hws = (const struct clk_hw*[]) {
  1611. &gcc_pcie_aux_clk_src.clkr.hw,
  1612. },
  1613. .num_parents = 1,
  1614. .flags = CLK_SET_RATE_PARENT,
  1615. .ops = &clk_branch2_ops,
  1616. },
  1617. },
  1618. };
  1619. static struct clk_branch gcc_pcie2_axi_m_clk = {
  1620. .halt_reg = 0x2a038,
  1621. .halt_check = BRANCH_HALT,
  1622. .clkr = {
  1623. .enable_reg = 0x2a038,
  1624. .enable_mask = BIT(0),
  1625. .hw.init = &(const struct clk_init_data) {
  1626. .name = "gcc_pcie2_axi_m_clk",
  1627. .parent_hws = (const struct clk_hw*[]) {
  1628. &gcc_pcie2_axi_m_clk_src.clkr.hw,
  1629. },
  1630. .num_parents = 1,
  1631. .flags = CLK_SET_RATE_PARENT,
  1632. .ops = &clk_branch2_ops,
  1633. },
  1634. },
  1635. };
  1636. static struct clk_branch gcc_anoc_pcie2_2lane_m_clk = {
  1637. .halt_reg = 0x2e080,
  1638. .halt_check = BRANCH_HALT,
  1639. .clkr = {
  1640. .enable_reg = 0x2e080,
  1641. .enable_mask = BIT(0),
  1642. .hw.init = &(const struct clk_init_data) {
  1643. .name = "gcc_anoc_pcie2_2lane_m_clk",
  1644. .parent_hws = (const struct clk_hw*[]) {
  1645. &gcc_pcie2_axi_m_clk_src.clkr.hw,
  1646. },
  1647. .num_parents = 1,
  1648. .flags = CLK_SET_RATE_PARENT,
  1649. .ops = &clk_branch2_ops,
  1650. },
  1651. },
  1652. };
  1653. static struct clk_branch gcc_pcie2_axi_s_bridge_clk = {
  1654. .halt_reg = 0x2a048,
  1655. .halt_check = BRANCH_HALT,
  1656. .clkr = {
  1657. .enable_reg = 0x2a048,
  1658. .enable_mask = BIT(0),
  1659. .hw.init = &(const struct clk_init_data) {
  1660. .name = "gcc_pcie2_axi_s_bridge_clk",
  1661. .parent_hws = (const struct clk_hw*[]) {
  1662. &gcc_pcie2_axi_s_clk_src.clkr.hw,
  1663. },
  1664. .num_parents = 1,
  1665. .flags = CLK_SET_RATE_PARENT,
  1666. .ops = &clk_branch2_ops,
  1667. },
  1668. },
  1669. };
  1670. static struct clk_branch gcc_pcie2_axi_s_clk = {
  1671. .halt_reg = 0x2a040,
  1672. .halt_check = BRANCH_HALT,
  1673. .clkr = {
  1674. .enable_reg = 0x2a040,
  1675. .enable_mask = BIT(0),
  1676. .hw.init = &(const struct clk_init_data) {
  1677. .name = "gcc_pcie2_axi_s_clk",
  1678. .parent_hws = (const struct clk_hw*[]) {
  1679. &gcc_pcie2_axi_s_clk_src.clkr.hw,
  1680. },
  1681. .num_parents = 1,
  1682. .flags = CLK_SET_RATE_PARENT,
  1683. .ops = &clk_branch2_ops,
  1684. },
  1685. },
  1686. };
  1687. static struct clk_regmap_phy_mux gcc_pcie2_pipe_clk_src = {
  1688. .reg = 0x2a064,
  1689. .clkr = {
  1690. .hw.init = &(const struct clk_init_data) {
  1691. .name = "pcie2_pipe_clk_src",
  1692. .parent_data = &(const struct clk_parent_data) {
  1693. .index = DT_PCIE30_PHY2_PIPE_CLK,
  1694. },
  1695. .num_parents = 1,
  1696. .ops = &clk_regmap_phy_mux_ops,
  1697. },
  1698. },
  1699. };
  1700. static struct clk_branch gcc_pcie2_pipe_clk = {
  1701. .halt_reg = 0x2a068,
  1702. .halt_check = BRANCH_HALT_DELAY,
  1703. .clkr = {
  1704. .enable_reg = 0x2a068,
  1705. .enable_mask = BIT(0),
  1706. .hw.init = &(const struct clk_init_data) {
  1707. .name = "gcc_pcie2_pipe_clk",
  1708. .parent_hws = (const struct clk_hw *[]) {
  1709. &gcc_pcie2_pipe_clk_src.clkr.hw
  1710. },
  1711. .num_parents = 1,
  1712. .flags = CLK_SET_RATE_PARENT,
  1713. .ops = &clk_branch2_ops,
  1714. },
  1715. },
  1716. };
  1717. static struct clk_branch gcc_pcie3_ahb_clk = {
  1718. .halt_reg = 0x2b030,
  1719. .halt_check = BRANCH_HALT,
  1720. .clkr = {
  1721. .enable_reg = 0x2b030,
  1722. .enable_mask = BIT(0),
  1723. .hw.init = &(const struct clk_init_data) {
  1724. .name = "gcc_pcie3_ahb_clk",
  1725. .parent_hws = (const struct clk_hw*[]) {
  1726. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1727. },
  1728. .num_parents = 1,
  1729. .flags = CLK_SET_RATE_PARENT,
  1730. .ops = &clk_branch2_ops,
  1731. },
  1732. },
  1733. };
  1734. static struct clk_branch gcc_pcie3_aux_clk = {
  1735. .halt_reg = 0x2b07c,
  1736. .halt_check = BRANCH_HALT,
  1737. .clkr = {
  1738. .enable_reg = 0x2b07c,
  1739. .enable_mask = BIT(0),
  1740. .hw.init = &(const struct clk_init_data) {
  1741. .name = "gcc_pcie3_aux_clk",
  1742. .parent_hws = (const struct clk_hw*[]) {
  1743. &gcc_pcie_aux_clk_src.clkr.hw,
  1744. },
  1745. .num_parents = 1,
  1746. .flags = CLK_SET_RATE_PARENT,
  1747. .ops = &clk_branch2_ops,
  1748. },
  1749. },
  1750. };
  1751. static struct clk_branch gcc_pcie3_axi_m_clk = {
  1752. .halt_reg = 0x2b038,
  1753. .halt_check = BRANCH_HALT,
  1754. .clkr = {
  1755. .enable_reg = 0x2b038,
  1756. .enable_mask = BIT(0),
  1757. .hw.init = &(const struct clk_init_data) {
  1758. .name = "gcc_pcie3_axi_m_clk",
  1759. .parent_hws = (const struct clk_hw*[]) {
  1760. &gcc_pcie3_axi_m_clk_src.clkr.hw,
  1761. },
  1762. .num_parents = 1,
  1763. .flags = CLK_SET_RATE_PARENT,
  1764. .ops = &clk_branch2_ops,
  1765. },
  1766. },
  1767. };
  1768. static struct clk_branch gcc_anoc_pcie3_2lane_m_clk = {
  1769. .halt_reg = 0x2e090,
  1770. .halt_check = BRANCH_HALT,
  1771. .clkr = {
  1772. .enable_reg = 0x2e090,
  1773. .enable_mask = BIT(0),
  1774. .hw.init = &(const struct clk_init_data) {
  1775. .name = "gcc_anoc_pcie3_2lane_m_clk",
  1776. .parent_hws = (const struct clk_hw*[]) {
  1777. &gcc_pcie3_axi_m_clk_src.clkr.hw,
  1778. },
  1779. .num_parents = 1,
  1780. .flags = CLK_SET_RATE_PARENT,
  1781. .ops = &clk_branch2_ops,
  1782. },
  1783. },
  1784. };
  1785. static struct clk_branch gcc_pcie3_axi_s_bridge_clk = {
  1786. .halt_reg = 0x2b048,
  1787. .halt_check = BRANCH_HALT,
  1788. .clkr = {
  1789. .enable_reg = 0x2b048,
  1790. .enable_mask = BIT(0),
  1791. .hw.init = &(const struct clk_init_data) {
  1792. .name = "gcc_pcie3_axi_s_bridge_clk",
  1793. .parent_hws = (const struct clk_hw*[]) {
  1794. &gcc_pcie3_axi_s_clk_src.clkr.hw,
  1795. },
  1796. .num_parents = 1,
  1797. .flags = CLK_SET_RATE_PARENT,
  1798. .ops = &clk_branch2_ops,
  1799. },
  1800. },
  1801. };
  1802. static struct clk_branch gcc_pcie3_axi_s_clk = {
  1803. .halt_reg = 0x2b040,
  1804. .halt_check = BRANCH_HALT,
  1805. .clkr = {
  1806. .enable_reg = 0x2b040,
  1807. .enable_mask = BIT(0),
  1808. .hw.init = &(const struct clk_init_data) {
  1809. .name = "gcc_pcie3_axi_s_clk",
  1810. .parent_hws = (const struct clk_hw*[]) {
  1811. &gcc_pcie3_axi_s_clk_src.clkr.hw,
  1812. },
  1813. .num_parents = 1,
  1814. .flags = CLK_SET_RATE_PARENT,
  1815. .ops = &clk_branch2_ops,
  1816. },
  1817. },
  1818. };
  1819. static struct clk_regmap_phy_mux gcc_pcie3_pipe_clk_src = {
  1820. .reg = 0x2b064,
  1821. .clkr = {
  1822. .hw.init = &(const struct clk_init_data) {
  1823. .name = "pcie3_pipe_clk_src",
  1824. .parent_data = &(const struct clk_parent_data) {
  1825. .index = DT_PCIE30_PHY3_PIPE_CLK,
  1826. },
  1827. .num_parents = 1,
  1828. .ops = &clk_regmap_phy_mux_ops,
  1829. },
  1830. },
  1831. };
  1832. static struct clk_branch gcc_pcie3_pipe_clk = {
  1833. .halt_reg = 0x2b068,
  1834. .halt_check = BRANCH_HALT_DELAY,
  1835. .clkr = {
  1836. .enable_reg = 0x2b068,
  1837. .enable_mask = BIT(0),
  1838. .hw.init = &(const struct clk_init_data) {
  1839. .name = "gcc_pcie3_pipe_clk",
  1840. .parent_hws = (const struct clk_hw *[]) {
  1841. &gcc_pcie3_pipe_clk_src.clkr.hw
  1842. },
  1843. .num_parents = 1,
  1844. .flags = CLK_SET_RATE_PARENT,
  1845. .ops = &clk_branch2_ops,
  1846. },
  1847. },
  1848. };
  1849. static struct clk_branch gcc_prng_ahb_clk = {
  1850. .halt_reg = 0x13024,
  1851. .halt_check = BRANCH_HALT_VOTED,
  1852. .clkr = {
  1853. .enable_reg = 0xb004,
  1854. .enable_mask = BIT(10),
  1855. .hw.init = &(const struct clk_init_data) {
  1856. .name = "gcc_prng_ahb_clk",
  1857. .parent_hws = (const struct clk_hw*[]) {
  1858. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1859. },
  1860. .num_parents = 1,
  1861. .flags = CLK_SET_RATE_PARENT,
  1862. .ops = &clk_branch2_ops,
  1863. },
  1864. },
  1865. };
  1866. static struct clk_branch gcc_qupv3_ahb_mst_clk = {
  1867. .halt_reg = 0x1014,
  1868. .halt_check = BRANCH_HALT_VOTED,
  1869. .clkr = {
  1870. .enable_reg = 0xb004,
  1871. .enable_mask = BIT(14),
  1872. .hw.init = &(const struct clk_init_data) {
  1873. .name = "gcc_qupv3_ahb_mst_clk",
  1874. .parent_hws = (const struct clk_hw*[]) {
  1875. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1876. },
  1877. .num_parents = 1,
  1878. .flags = CLK_SET_RATE_PARENT,
  1879. .ops = &clk_branch2_ops,
  1880. },
  1881. },
  1882. };
  1883. static struct clk_branch gcc_qupv3_ahb_slv_clk = {
  1884. .halt_reg = 0x102c,
  1885. .halt_check = BRANCH_HALT_VOTED,
  1886. .clkr = {
  1887. .enable_reg = 0xb004,
  1888. .enable_mask = BIT(4),
  1889. .hw.init = &(const struct clk_init_data) {
  1890. .name = "gcc_qupv3_ahb_slv_clk",
  1891. .parent_hws = (const struct clk_hw*[]) {
  1892. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  1893. },
  1894. .num_parents = 1,
  1895. .flags = CLK_SET_RATE_PARENT,
  1896. .ops = &clk_branch2_ops,
  1897. },
  1898. },
  1899. };
  1900. static struct clk_branch gcc_qupv3_i2c0_clk = {
  1901. .halt_reg = 0x2024,
  1902. .halt_check = BRANCH_HALT,
  1903. .clkr = {
  1904. .enable_reg = 0x2024,
  1905. .enable_mask = BIT(0),
  1906. .hw.init = &(const struct clk_init_data) {
  1907. .name = "gcc_qupv3_i2c0_clk",
  1908. .parent_hws = (const struct clk_hw*[]) {
  1909. &gcc_qupv3_i2c0_div_clk_src.clkr.hw,
  1910. },
  1911. .num_parents = 1,
  1912. .flags = CLK_SET_RATE_PARENT,
  1913. .ops = &clk_branch2_ops,
  1914. },
  1915. },
  1916. };
  1917. static struct clk_branch gcc_qupv3_i2c1_clk = {
  1918. .halt_reg = 0x3024,
  1919. .halt_check = BRANCH_HALT,
  1920. .clkr = {
  1921. .enable_reg = 0x3024,
  1922. .enable_mask = BIT(0),
  1923. .hw.init = &(const struct clk_init_data) {
  1924. .name = "gcc_qupv3_i2c1_clk",
  1925. .parent_hws = (const struct clk_hw*[]) {
  1926. &gcc_qupv3_i2c1_div_clk_src.clkr.hw,
  1927. },
  1928. .num_parents = 1,
  1929. .flags = CLK_SET_RATE_PARENT,
  1930. .ops = &clk_branch2_ops,
  1931. },
  1932. },
  1933. };
  1934. static struct clk_branch gcc_qupv3_spi0_clk = {
  1935. .halt_reg = 0x4020,
  1936. .halt_check = BRANCH_HALT,
  1937. .clkr = {
  1938. .enable_reg = 0x4020,
  1939. .enable_mask = BIT(0),
  1940. .hw.init = &(const struct clk_init_data) {
  1941. .name = "gcc_qupv3_spi0_clk",
  1942. .parent_hws = (const struct clk_hw*[]) {
  1943. &gcc_qupv3_spi0_clk_src.clkr.hw,
  1944. },
  1945. .num_parents = 1,
  1946. .flags = CLK_SET_RATE_PARENT,
  1947. .ops = &clk_branch2_ops,
  1948. },
  1949. },
  1950. };
  1951. static struct clk_branch gcc_qupv3_spi1_clk = {
  1952. .halt_reg = 0x5020,
  1953. .halt_check = BRANCH_HALT,
  1954. .clkr = {
  1955. .enable_reg = 0x5020,
  1956. .enable_mask = BIT(0),
  1957. .hw.init = &(const struct clk_init_data) {
  1958. .name = "gcc_qupv3_spi1_clk",
  1959. .parent_hws = (const struct clk_hw*[]) {
  1960. &gcc_qupv3_spi1_clk_src.clkr.hw,
  1961. },
  1962. .num_parents = 1,
  1963. .flags = CLK_SET_RATE_PARENT,
  1964. .ops = &clk_branch2_ops,
  1965. },
  1966. },
  1967. };
  1968. static struct clk_branch gcc_qupv3_uart0_clk = {
  1969. .halt_reg = 0x2040,
  1970. .halt_check = BRANCH_HALT,
  1971. .clkr = {
  1972. .enable_reg = 0x2040,
  1973. .enable_mask = BIT(0),
  1974. .hw.init = &(const struct clk_init_data) {
  1975. .name = "gcc_qupv3_uart0_clk",
  1976. .parent_hws = (const struct clk_hw*[]) {
  1977. &gcc_qupv3_uart0_clk_src.clkr.hw,
  1978. },
  1979. .num_parents = 1,
  1980. .flags = CLK_SET_RATE_PARENT,
  1981. .ops = &clk_branch2_ops,
  1982. },
  1983. },
  1984. };
  1985. static struct clk_branch gcc_qupv3_uart1_clk = {
  1986. .halt_reg = 0x3040,
  1987. .halt_check = BRANCH_HALT,
  1988. .clkr = {
  1989. .enable_reg = 0x3040,
  1990. .enable_mask = BIT(0),
  1991. .hw.init = &(const struct clk_init_data) {
  1992. .name = "gcc_qupv3_uart1_clk",
  1993. .parent_hws = (const struct clk_hw*[]) {
  1994. &gcc_qupv3_uart1_clk_src.clkr.hw,
  1995. },
  1996. .num_parents = 1,
  1997. .flags = CLK_SET_RATE_PARENT,
  1998. .ops = &clk_branch2_ops,
  1999. },
  2000. },
  2001. };
  2002. static struct clk_branch gcc_sdcc1_ahb_clk = {
  2003. .halt_reg = 0x3303c,
  2004. .halt_check = BRANCH_HALT,
  2005. .clkr = {
  2006. .enable_reg = 0x3303c,
  2007. .enable_mask = BIT(0),
  2008. .hw.init = &(const struct clk_init_data) {
  2009. .name = "gcc_sdcc1_ahb_clk",
  2010. .parent_hws = (const struct clk_hw*[]) {
  2011. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2012. },
  2013. .num_parents = 1,
  2014. .flags = CLK_SET_RATE_PARENT,
  2015. .ops = &clk_branch2_ops,
  2016. },
  2017. },
  2018. };
  2019. static struct clk_branch gcc_sdcc1_apps_clk = {
  2020. .halt_reg = 0x3302c,
  2021. .halt_check = BRANCH_HALT,
  2022. .clkr = {
  2023. .enable_reg = 0x3302c,
  2024. .enable_mask = BIT(0),
  2025. .hw.init = &(const struct clk_init_data) {
  2026. .name = "gcc_sdcc1_apps_clk",
  2027. .parent_hws = (const struct clk_hw*[]) {
  2028. &gcc_sdcc1_apps_clk_src.clkr.hw,
  2029. },
  2030. .num_parents = 1,
  2031. .flags = CLK_SET_RATE_PARENT,
  2032. .ops = &clk_branch2_ops,
  2033. },
  2034. },
  2035. };
  2036. static struct clk_branch gcc_sdcc1_ice_core_clk = {
  2037. .halt_reg = 0x33034,
  2038. .halt_check = BRANCH_HALT,
  2039. .clkr = {
  2040. .enable_reg = 0x33034,
  2041. .enable_mask = BIT(0),
  2042. .hw.init = &(const struct clk_init_data) {
  2043. .name = "gcc_sdcc1_ice_core_clk",
  2044. .parent_hws = (const struct clk_hw*[]) {
  2045. &gcc_sdcc1_ice_core_clk_src.clkr.hw,
  2046. },
  2047. .num_parents = 1,
  2048. .flags = CLK_SET_RATE_PARENT,
  2049. .ops = &clk_branch2_ops,
  2050. },
  2051. },
  2052. };
  2053. static struct clk_branch gcc_uniphy0_ahb_clk = {
  2054. .halt_reg = 0x1704c,
  2055. .halt_check = BRANCH_HALT,
  2056. .clkr = {
  2057. .enable_reg = 0x1704c,
  2058. .enable_mask = BIT(0),
  2059. .hw.init = &(const struct clk_init_data) {
  2060. .name = "gcc_uniphy0_ahb_clk",
  2061. .parent_hws = (const struct clk_hw*[]) {
  2062. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2063. },
  2064. .num_parents = 1,
  2065. .flags = CLK_SET_RATE_PARENT,
  2066. .ops = &clk_branch2_ops,
  2067. },
  2068. },
  2069. };
  2070. static struct clk_branch gcc_uniphy0_sys_clk = {
  2071. .halt_reg = 0x17048,
  2072. .halt_check = BRANCH_HALT_VOTED,
  2073. .clkr = {
  2074. .enable_reg = 0x17048,
  2075. .enable_mask = BIT(0),
  2076. .hw.init = &(const struct clk_init_data) {
  2077. .name = "gcc_uniphy0_sys_clk",
  2078. .parent_hws = (const struct clk_hw*[]) {
  2079. &gcc_uniphy_sys_clk_src.clkr.hw,
  2080. },
  2081. .num_parents = 1,
  2082. .flags = CLK_SET_RATE_PARENT,
  2083. .ops = &clk_branch2_ops,
  2084. },
  2085. },
  2086. };
  2087. static struct clk_branch gcc_uniphy1_ahb_clk = {
  2088. .halt_reg = 0x1705c,
  2089. .halt_check = BRANCH_HALT,
  2090. .clkr = {
  2091. .enable_reg = 0x1705c,
  2092. .enable_mask = BIT(0),
  2093. .hw.init = &(const struct clk_init_data) {
  2094. .name = "gcc_uniphy1_ahb_clk",
  2095. .parent_hws = (const struct clk_hw*[]) {
  2096. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2097. },
  2098. .num_parents = 1,
  2099. .flags = CLK_SET_RATE_PARENT,
  2100. .ops = &clk_branch2_ops,
  2101. },
  2102. },
  2103. };
  2104. static struct clk_branch gcc_uniphy1_sys_clk = {
  2105. .halt_reg = 0x17058,
  2106. .halt_check = BRANCH_HALT_VOTED,
  2107. .clkr = {
  2108. .enable_reg = 0x17058,
  2109. .enable_mask = BIT(0),
  2110. .hw.init = &(const struct clk_init_data) {
  2111. .name = "gcc_uniphy1_sys_clk",
  2112. .parent_hws = (const struct clk_hw*[]) {
  2113. &gcc_uniphy_sys_clk_src.clkr.hw,
  2114. },
  2115. .num_parents = 1,
  2116. .flags = CLK_SET_RATE_PARENT,
  2117. .ops = &clk_branch2_ops,
  2118. },
  2119. },
  2120. };
  2121. static struct clk_branch gcc_uniphy2_ahb_clk = {
  2122. .halt_reg = 0x1706c,
  2123. .halt_check = BRANCH_HALT,
  2124. .clkr = {
  2125. .enable_reg = 0x1706c,
  2126. .enable_mask = BIT(0),
  2127. .hw.init = &(const struct clk_init_data) {
  2128. .name = "gcc_uniphy2_ahb_clk",
  2129. .parent_hws = (const struct clk_hw*[]) {
  2130. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2131. },
  2132. .num_parents = 1,
  2133. .flags = CLK_SET_RATE_PARENT,
  2134. .ops = &clk_branch2_ops,
  2135. },
  2136. },
  2137. };
  2138. static struct clk_branch gcc_uniphy2_sys_clk = {
  2139. .halt_reg = 0x17068,
  2140. .halt_check = BRANCH_HALT_VOTED,
  2141. .clkr = {
  2142. .enable_reg = 0x17068,
  2143. .enable_mask = BIT(0),
  2144. .hw.init = &(const struct clk_init_data) {
  2145. .name = "gcc_uniphy2_sys_clk",
  2146. .parent_hws = (const struct clk_hw*[]) {
  2147. &gcc_uniphy_sys_clk_src.clkr.hw,
  2148. },
  2149. .num_parents = 1,
  2150. .flags = CLK_SET_RATE_PARENT,
  2151. .ops = &clk_branch2_ops,
  2152. },
  2153. },
  2154. };
  2155. static struct clk_branch gcc_usb0_aux_clk = {
  2156. .halt_reg = 0x2c04c,
  2157. .halt_check = BRANCH_HALT_VOTED,
  2158. .clkr = {
  2159. .enable_reg = 0x2c04c,
  2160. .enable_mask = BIT(0),
  2161. .hw.init = &(const struct clk_init_data) {
  2162. .name = "gcc_usb0_aux_clk",
  2163. .parent_hws = (const struct clk_hw*[]) {
  2164. &gcc_usb0_aux_clk_src.clkr.hw,
  2165. },
  2166. .num_parents = 1,
  2167. .flags = CLK_SET_RATE_PARENT,
  2168. .ops = &clk_branch2_ops,
  2169. },
  2170. },
  2171. };
  2172. static struct clk_branch gcc_usb0_master_clk = {
  2173. .halt_reg = 0x2c044,
  2174. .halt_check = BRANCH_HALT_VOTED,
  2175. .clkr = {
  2176. .enable_reg = 0x2c044,
  2177. .enable_mask = BIT(0),
  2178. .hw.init = &(const struct clk_init_data) {
  2179. .name = "gcc_usb0_master_clk",
  2180. .parent_hws = (const struct clk_hw*[]) {
  2181. &gcc_usb0_master_clk_src.clkr.hw,
  2182. },
  2183. .num_parents = 1,
  2184. .flags = CLK_SET_RATE_PARENT,
  2185. .ops = &clk_branch2_ops,
  2186. },
  2187. },
  2188. };
  2189. static struct clk_branch gcc_usb0_mock_utmi_clk = {
  2190. .halt_reg = 0x2c050,
  2191. .halt_check = BRANCH_HALT_VOTED,
  2192. .clkr = {
  2193. .enable_reg = 0x2c050,
  2194. .enable_mask = BIT(0),
  2195. .hw.init = &(const struct clk_init_data) {
  2196. .name = "gcc_usb0_mock_utmi_clk",
  2197. .parent_hws = (const struct clk_hw*[]) {
  2198. &gcc_usb0_mock_utmi_div_clk_src.clkr.hw,
  2199. },
  2200. .num_parents = 1,
  2201. .flags = CLK_SET_RATE_PARENT,
  2202. .ops = &clk_branch2_ops,
  2203. },
  2204. },
  2205. };
  2206. static struct clk_branch gcc_usb1_mock_utmi_clk = {
  2207. .halt_reg = 0x3c024,
  2208. .halt_check = BRANCH_HALT_VOTED,
  2209. .clkr = {
  2210. .enable_reg = 0x3c024,
  2211. .enable_mask = BIT(0),
  2212. .hw.init = &(const struct clk_init_data) {
  2213. .name = "gcc_usb1_mock_utmi_clk",
  2214. .parent_hws = (const struct clk_hw*[]) {
  2215. &gcc_usb1_mock_utmi_div_clk_src.clkr.hw,
  2216. },
  2217. .num_parents = 1,
  2218. .flags = CLK_SET_RATE_PARENT,
  2219. .ops = &clk_branch2_ops,
  2220. },
  2221. },
  2222. };
  2223. static struct clk_branch gcc_usb0_phy_cfg_ahb_clk = {
  2224. .halt_reg = 0x2c05c,
  2225. .halt_check = BRANCH_HALT_VOTED,
  2226. .clkr = {
  2227. .enable_reg = 0x2c05c,
  2228. .enable_mask = BIT(0),
  2229. .hw.init = &(const struct clk_init_data) {
  2230. .name = "gcc_usb0_phy_cfg_ahb_clk",
  2231. .parent_hws = (const struct clk_hw*[]) {
  2232. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2233. },
  2234. .num_parents = 1,
  2235. .flags = CLK_SET_RATE_PARENT,
  2236. .ops = &clk_branch2_ops,
  2237. },
  2238. },
  2239. };
  2240. static struct clk_branch gcc_usb1_phy_cfg_ahb_clk = {
  2241. .halt_reg = 0x3c01c,
  2242. .halt_check = BRANCH_HALT_VOTED,
  2243. .clkr = {
  2244. .enable_reg = 0x3c01c,
  2245. .enable_mask = BIT(0),
  2246. .hw.init = &(const struct clk_init_data) {
  2247. .name = "gcc_usb1_phy_cfg_ahb_clk",
  2248. .parent_hws = (const struct clk_hw*[]) {
  2249. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2250. },
  2251. .num_parents = 1,
  2252. .flags = CLK_SET_RATE_PARENT,
  2253. .ops = &clk_branch2_ops,
  2254. },
  2255. },
  2256. };
  2257. static struct clk_branch gcc_usb1_master_clk = {
  2258. .halt_reg = 0x3c028,
  2259. .halt_check = BRANCH_HALT_VOTED,
  2260. .clkr = {
  2261. .enable_reg = 0x3c028,
  2262. .enable_mask = BIT(0),
  2263. .hw.init = &(const struct clk_init_data) {
  2264. .name = "gcc_usb1_master_clk",
  2265. .parent_hws = (const struct clk_hw*[]) {
  2266. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2267. },
  2268. .num_parents = 1,
  2269. .flags = CLK_SET_RATE_PARENT,
  2270. .ops = &clk_branch2_ops,
  2271. },
  2272. },
  2273. };
  2274. static struct clk_regmap_phy_mux gcc_usb0_pipe_clk_src = {
  2275. .reg = 0x2c074,
  2276. .clkr = {
  2277. .hw.init = &(const struct clk_init_data) {
  2278. .name = "gcc_usb0_pipe_clk_src",
  2279. .parent_data = &(const struct clk_parent_data) {
  2280. .index = DT_USB_PCIE_WRAPPER_PIPE_CLK,
  2281. },
  2282. .num_parents = 1,
  2283. .ops = &clk_regmap_phy_mux_ops,
  2284. },
  2285. },
  2286. };
  2287. static struct clk_branch gcc_usb0_pipe_clk = {
  2288. .halt_reg = 0x2c054,
  2289. .halt_check = BRANCH_HALT_DELAY,
  2290. .clkr = {
  2291. .enable_reg = 0x2c054,
  2292. .enable_mask = BIT(0),
  2293. .hw.init = &(const struct clk_init_data) {
  2294. .name = "gcc_usb0_pipe_clk",
  2295. .parent_hws = (const struct clk_hw *[]) {
  2296. &gcc_usb0_pipe_clk_src.clkr.hw
  2297. },
  2298. .num_parents = 1,
  2299. .flags = CLK_SET_RATE_PARENT,
  2300. .ops = &clk_branch2_ops,
  2301. },
  2302. },
  2303. };
  2304. static struct clk_branch gcc_usb0_sleep_clk = {
  2305. .halt_reg = 0x2c058,
  2306. .halt_check = BRANCH_HALT_VOTED,
  2307. .clkr = {
  2308. .enable_reg = 0x2c058,
  2309. .enable_mask = BIT(0),
  2310. .hw.init = &(const struct clk_init_data) {
  2311. .name = "gcc_usb0_sleep_clk",
  2312. .parent_hws = (const struct clk_hw*[]) {
  2313. &gcc_sleep_clk_src.clkr.hw,
  2314. },
  2315. .num_parents = 1,
  2316. .flags = CLK_SET_RATE_PARENT,
  2317. .ops = &clk_branch2_ops,
  2318. },
  2319. },
  2320. };
  2321. static struct clk_branch gcc_usb1_sleep_clk = {
  2322. .halt_reg = 0x3c020,
  2323. .halt_check = BRANCH_HALT_VOTED,
  2324. .clkr = {
  2325. .enable_reg = 0x3c020,
  2326. .enable_mask = BIT(0),
  2327. .hw.init = &(const struct clk_init_data) {
  2328. .name = "gcc_usb1_sleep_clk",
  2329. .parent_hws = (const struct clk_hw*[]) {
  2330. &gcc_sleep_clk_src.clkr.hw,
  2331. },
  2332. .num_parents = 1,
  2333. .flags = CLK_SET_RATE_PARENT,
  2334. .ops = &clk_branch2_ops,
  2335. },
  2336. },
  2337. };
  2338. static struct clk_branch gcc_cmn_12gpll_ahb_clk = {
  2339. .halt_reg = 0x3a004,
  2340. .halt_check = BRANCH_HALT,
  2341. .clkr = {
  2342. .enable_reg = 0x3a004,
  2343. .enable_mask = BIT(0),
  2344. .hw.init = &(const struct clk_init_data) {
  2345. .name = "gcc_cmn_12gpll_ahb_clk",
  2346. .parent_hws = (const struct clk_hw*[]) {
  2347. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2348. },
  2349. .num_parents = 1,
  2350. .flags = CLK_SET_RATE_PARENT,
  2351. .ops = &clk_branch2_ops,
  2352. },
  2353. },
  2354. };
  2355. static struct clk_branch gcc_cmn_12gpll_sys_clk = {
  2356. .halt_reg = 0x3a008,
  2357. .halt_check = BRANCH_HALT,
  2358. .clkr = {
  2359. .enable_reg = 0x3a008,
  2360. .enable_mask = BIT(0),
  2361. .hw.init = &(const struct clk_init_data) {
  2362. .name = "gcc_cmn_12gpll_sys_clk",
  2363. .parent_hws = (const struct clk_hw*[]) {
  2364. &gcc_uniphy_sys_clk_src.clkr.hw,
  2365. },
  2366. .num_parents = 1,
  2367. .flags = CLK_SET_RATE_PARENT,
  2368. .ops = &clk_branch2_ops,
  2369. },
  2370. },
  2371. };
  2372. static struct clk_branch gcc_lpass_sway_clk = {
  2373. .halt_reg = 0x27014,
  2374. .halt_check = BRANCH_HALT,
  2375. .clkr = {
  2376. .enable_reg = 0x27014,
  2377. .enable_mask = BIT(0),
  2378. .hw.init = &(const struct clk_init_data) {
  2379. .name = "gcc_lpass_sway_clk",
  2380. .parent_hws = (const struct clk_hw*[]) {
  2381. &gcc_lpass_sway_clk_src.clkr.hw,
  2382. },
  2383. .num_parents = 1,
  2384. .flags = CLK_SET_RATE_PARENT,
  2385. .ops = &clk_branch2_ops,
  2386. },
  2387. },
  2388. };
  2389. static struct clk_branch gcc_cnoc_lpass_cfg_clk = {
  2390. .halt_reg = 0x2e028,
  2391. .halt_check = BRANCH_HALT,
  2392. .clkr = {
  2393. .enable_reg = 0x2e028,
  2394. .enable_mask = BIT(0),
  2395. .hw.init = &(const struct clk_init_data) {
  2396. .name = "gcc_cnoc_lpass_cfg_clk",
  2397. .parent_hws = (const struct clk_hw*[]) {
  2398. &gcc_lpass_sway_clk_src.clkr.hw,
  2399. },
  2400. .num_parents = 1,
  2401. .flags = CLK_SET_RATE_PARENT,
  2402. .ops = &clk_branch2_ops,
  2403. },
  2404. },
  2405. };
  2406. static struct clk_branch gcc_lpass_core_axim_clk = {
  2407. .halt_reg = 0x27018,
  2408. .halt_check = BRANCH_HALT_VOTED,
  2409. .clkr = {
  2410. .enable_reg = 0x27018,
  2411. .enable_mask = BIT(0),
  2412. .hw.init = &(const struct clk_init_data) {
  2413. .name = "gcc_lpass_core_axim_clk",
  2414. .parent_hws = (const struct clk_hw*[]) {
  2415. &gcc_lpass_axim_clk_src.clkr.hw,
  2416. },
  2417. .num_parents = 1,
  2418. .flags = CLK_SET_RATE_PARENT,
  2419. .ops = &clk_branch2_ops,
  2420. },
  2421. },
  2422. };
  2423. static struct clk_branch gcc_snoc_lpass_clk = {
  2424. .halt_reg = 0x31020,
  2425. .halt_check = BRANCH_HALT_VOTED,
  2426. .clkr = {
  2427. .enable_reg = 0x31020,
  2428. .enable_mask = BIT(0),
  2429. .hw.init = &(const struct clk_init_data) {
  2430. .name = "gcc_snoc_lpass_clk",
  2431. .parent_hws = (const struct clk_hw*[]) {
  2432. &gcc_lpass_axim_clk_src.clkr.hw,
  2433. },
  2434. .num_parents = 1,
  2435. .flags = CLK_SET_RATE_PARENT,
  2436. .ops = &clk_branch2_ops,
  2437. },
  2438. },
  2439. };
  2440. static struct clk_branch gcc_usb0_eud_at_clk = {
  2441. .halt_reg = 0x30004,
  2442. .halt_check = BRANCH_HALT_VOTED,
  2443. .clkr = {
  2444. .enable_reg = 0x30004,
  2445. .enable_mask = BIT(0),
  2446. .hw.init = &(const struct clk_init_data) {
  2447. .name = "gcc_usb0_eud_at_clk",
  2448. .parent_hws = (const struct clk_hw*[]) {
  2449. &gcc_eud_at_div_clk_src.hw,
  2450. },
  2451. .num_parents = 1,
  2452. .flags = CLK_SET_RATE_PARENT,
  2453. .ops = &clk_branch2_ops,
  2454. },
  2455. },
  2456. };
  2457. static struct clk_branch gcc_qpic_ahb_clk = {
  2458. .halt_reg = 0x32010,
  2459. .halt_check = BRANCH_HALT,
  2460. .clkr = {
  2461. .enable_reg = 0x32010,
  2462. .enable_mask = BIT(0),
  2463. .hw.init = &(const struct clk_init_data) {
  2464. .name = "gcc_qpic_ahb_clk",
  2465. .parent_hws = (const struct clk_hw*[]) {
  2466. &gcc_pcnoc_bfdcd_clk_src.clkr.hw,
  2467. },
  2468. .num_parents = 1,
  2469. .flags = CLK_SET_RATE_PARENT,
  2470. .ops = &clk_branch2_ops,
  2471. },
  2472. },
  2473. };
  2474. static struct clk_branch gcc_qpic_clk = {
  2475. .halt_reg = 0x32028,
  2476. .halt_check = BRANCH_HALT,
  2477. .clkr = {
  2478. .enable_reg = 0x32028,
  2479. .enable_mask = BIT(0),
  2480. .hw.init = &(const struct clk_init_data) {
  2481. .name = "gcc_qpic_clk",
  2482. .parent_hws = (const struct clk_hw*[]) {
  2483. &gcc_qpic_clk_src.clkr.hw,
  2484. },
  2485. .num_parents = 1,
  2486. .flags = CLK_SET_RATE_PARENT,
  2487. .ops = &clk_branch2_ops,
  2488. },
  2489. },
  2490. };
  2491. static struct clk_branch gcc_qpic_io_macro_clk = {
  2492. .halt_reg = 0x3200c,
  2493. .halt_check = BRANCH_HALT,
  2494. .clkr = {
  2495. .enable_reg = 0x3200c,
  2496. .enable_mask = BIT(0),
  2497. .hw.init = &(const struct clk_init_data) {
  2498. .name = "gcc_qpic_io_macro_clk",
  2499. .parent_hws = (const struct clk_hw*[]) {
  2500. &gcc_qpic_io_macro_clk_src.clkr.hw,
  2501. },
  2502. .num_parents = 1,
  2503. .flags = CLK_SET_RATE_PARENT,
  2504. .ops = &clk_branch2_ops,
  2505. },
  2506. },
  2507. };
  2508. static struct clk_branch gcc_qdss_dap_clk = {
  2509. .halt_reg = 0x2d058,
  2510. .clkr = {
  2511. .enable_reg = 0x2d058,
  2512. .enable_mask = BIT(0),
  2513. .hw.init = &(const struct clk_init_data) {
  2514. .name = "gcc_qdss_dap_clk",
  2515. .parent_hws = (const struct clk_hw *[]) {
  2516. &gcc_qdss_dap_sync_clk_src.hw
  2517. },
  2518. .num_parents = 1,
  2519. .flags = CLK_SET_RATE_PARENT,
  2520. .ops = &clk_branch2_ops,
  2521. },
  2522. },
  2523. };
  2524. static struct clk_branch gcc_qdss_at_clk = {
  2525. .halt_reg = 0x2d034,
  2526. .clkr = {
  2527. .enable_reg = 0x2d034,
  2528. .enable_mask = BIT(0),
  2529. .hw.init = &(const struct clk_init_data) {
  2530. .name = "gcc_qdss_at_clk",
  2531. .parent_hws = (const struct clk_hw *[]) {
  2532. &gcc_qdss_at_clk_src.clkr.hw
  2533. },
  2534. .num_parents = 1,
  2535. .flags = CLK_SET_RATE_PARENT,
  2536. .ops = &clk_branch2_ops,
  2537. },
  2538. },
  2539. };
  2540. static struct clk_branch gcc_pcie0_rchng_clk = {
  2541. .halt_reg = 0x28028,
  2542. .clkr = {
  2543. .enable_reg = 0x28028,
  2544. .enable_mask = BIT(1),
  2545. .hw.init = &(const struct clk_init_data) {
  2546. .name = "gcc_pcie0_rchng_clk",
  2547. .parent_hws = (const struct clk_hw *[]) {
  2548. &gcc_pcie0_rchng_clk_src.clkr.hw
  2549. },
  2550. .num_parents = 1,
  2551. .flags = CLK_SET_RATE_PARENT,
  2552. .ops = &clk_branch2_ops,
  2553. },
  2554. },
  2555. };
  2556. static struct clk_branch gcc_pcie1_rchng_clk = {
  2557. .halt_reg = 0x29028,
  2558. .clkr = {
  2559. .enable_reg = 0x29028,
  2560. .enable_mask = BIT(1),
  2561. .hw.init = &(const struct clk_init_data) {
  2562. .name = "gcc_pcie1_rchng_clk",
  2563. .parent_hws = (const struct clk_hw *[]) {
  2564. &gcc_pcie1_rchng_clk_src.clkr.hw
  2565. },
  2566. .num_parents = 1,
  2567. .flags = CLK_SET_RATE_PARENT,
  2568. .ops = &clk_branch2_ops,
  2569. },
  2570. },
  2571. };
  2572. static struct clk_branch gcc_pcie2_rchng_clk = {
  2573. .halt_reg = 0x2a028,
  2574. .clkr = {
  2575. .enable_reg = 0x2a028,
  2576. .enable_mask = BIT(1),
  2577. .hw.init = &(const struct clk_init_data) {
  2578. .name = "gcc_pcie2_rchng_clk",
  2579. .parent_hws = (const struct clk_hw *[]) {
  2580. &gcc_pcie2_rchng_clk_src.clkr.hw
  2581. },
  2582. .num_parents = 1,
  2583. .flags = CLK_SET_RATE_PARENT,
  2584. .ops = &clk_branch2_ops,
  2585. },
  2586. },
  2587. };
  2588. static struct clk_branch gcc_pcie3_rchng_clk = {
  2589. .halt_reg = 0x2b028,
  2590. .clkr = {
  2591. .enable_reg = 0x2b028,
  2592. .enable_mask = BIT(1),
  2593. .hw.init = &(const struct clk_init_data) {
  2594. .name = "gcc_pcie3_rchng_clk",
  2595. .parent_hws = (const struct clk_hw *[]) {
  2596. &gcc_pcie3_rchng_clk_src.clkr.hw
  2597. },
  2598. .num_parents = 1,
  2599. .flags = CLK_SET_RATE_PARENT,
  2600. .ops = &clk_branch2_ops,
  2601. },
  2602. },
  2603. };
  2604. static struct clk_regmap *gcc_ipq5424_clocks[] = {
  2605. [GCC_ADSS_PWM_CLK] = &gcc_adss_pwm_clk.clkr,
  2606. [GCC_ADSS_PWM_CLK_SRC] = &gcc_adss_pwm_clk_src.clkr,
  2607. [GCC_CNOC_PCIE0_1LANE_S_CLK] = &gcc_cnoc_pcie0_1lane_s_clk.clkr,
  2608. [GCC_CNOC_PCIE1_1LANE_S_CLK] = &gcc_cnoc_pcie1_1lane_s_clk.clkr,
  2609. [GCC_CNOC_PCIE2_2LANE_S_CLK] = &gcc_cnoc_pcie2_2lane_s_clk.clkr,
  2610. [GCC_CNOC_PCIE3_2LANE_S_CLK] = &gcc_cnoc_pcie3_2lane_s_clk.clkr,
  2611. [GCC_CNOC_USB_CLK] = &gcc_cnoc_usb_clk.clkr,
  2612. [GCC_MDIO_AHB_CLK] = &gcc_mdio_ahb_clk.clkr,
  2613. [GCC_NSS_TS_CLK] = &gcc_nss_ts_clk.clkr,
  2614. [GCC_NSS_TS_CLK_SRC] = &gcc_nss_ts_clk_src.clkr,
  2615. [GCC_NSSCC_CLK] = &gcc_nsscc_clk.clkr,
  2616. [GCC_NSSCFG_CLK] = &gcc_nsscfg_clk.clkr,
  2617. [GCC_NSSNOC_ATB_CLK] = &gcc_nssnoc_atb_clk.clkr,
  2618. [GCC_NSSNOC_NSSCC_CLK] = &gcc_nssnoc_nsscc_clk.clkr,
  2619. [GCC_NSSNOC_PCNOC_1_CLK] = &gcc_nssnoc_pcnoc_1_clk.clkr,
  2620. [GCC_NSSNOC_QOSGEN_REF_CLK] = &gcc_nssnoc_qosgen_ref_clk.clkr,
  2621. [GCC_NSSNOC_SNOC_1_CLK] = &gcc_nssnoc_snoc_1_clk.clkr,
  2622. [GCC_NSSNOC_SNOC_CLK] = &gcc_nssnoc_snoc_clk.clkr,
  2623. [GCC_NSSNOC_TIMEOUT_REF_CLK] = &gcc_nssnoc_timeout_ref_clk.clkr,
  2624. [GCC_NSSNOC_XO_DCD_CLK] = &gcc_nssnoc_xo_dcd_clk.clkr,
  2625. [GCC_PCIE0_AHB_CLK] = &gcc_pcie0_ahb_clk.clkr,
  2626. [GCC_PCIE0_AUX_CLK] = &gcc_pcie0_aux_clk.clkr,
  2627. [GCC_PCIE0_AXI_M_CLK] = &gcc_pcie0_axi_m_clk.clkr,
  2628. [GCC_PCIE0_AXI_M_CLK_SRC] = &gcc_pcie0_axi_m_clk_src.clkr,
  2629. [GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
  2630. [GCC_PCIE0_AXI_S_CLK] = &gcc_pcie0_axi_s_clk.clkr,
  2631. [GCC_PCIE0_AXI_S_CLK_SRC] = &gcc_pcie0_axi_s_clk_src.clkr,
  2632. [GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
  2633. [GCC_ANOC_PCIE0_1LANE_M_CLK] = &gcc_anoc_pcie0_1lane_m_clk.clkr,
  2634. [GCC_PCIE0_PIPE_CLK_SRC] = &gcc_pcie0_pipe_clk_src.clkr,
  2635. [GCC_PCIE0_RCHNG_CLK_SRC] = &gcc_pcie0_rchng_clk_src.clkr,
  2636. [GCC_PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
  2637. [GCC_PCIE1_AHB_CLK] = &gcc_pcie1_ahb_clk.clkr,
  2638. [GCC_PCIE1_AUX_CLK] = &gcc_pcie1_aux_clk.clkr,
  2639. [GCC_PCIE1_AXI_M_CLK] = &gcc_pcie1_axi_m_clk.clkr,
  2640. [GCC_PCIE1_AXI_M_CLK_SRC] = &gcc_pcie1_axi_m_clk_src.clkr,
  2641. [GCC_PCIE1_AXI_S_BRIDGE_CLK] = &gcc_pcie1_axi_s_bridge_clk.clkr,
  2642. [GCC_PCIE1_AXI_S_CLK] = &gcc_pcie1_axi_s_clk.clkr,
  2643. [GCC_PCIE1_AXI_S_CLK_SRC] = &gcc_pcie1_axi_s_clk_src.clkr,
  2644. [GCC_PCIE1_PIPE_CLK] = &gcc_pcie1_pipe_clk.clkr,
  2645. [GCC_ANOC_PCIE1_1LANE_M_CLK] = &gcc_anoc_pcie1_1lane_m_clk.clkr,
  2646. [GCC_PCIE1_PIPE_CLK_SRC] = &gcc_pcie1_pipe_clk_src.clkr,
  2647. [GCC_PCIE1_RCHNG_CLK_SRC] = &gcc_pcie1_rchng_clk_src.clkr,
  2648. [GCC_PCIE1_RCHNG_CLK] = &gcc_pcie1_rchng_clk.clkr,
  2649. [GCC_PCIE2_AHB_CLK] = &gcc_pcie2_ahb_clk.clkr,
  2650. [GCC_PCIE2_AUX_CLK] = &gcc_pcie2_aux_clk.clkr,
  2651. [GCC_PCIE2_AXI_M_CLK] = &gcc_pcie2_axi_m_clk.clkr,
  2652. [GCC_PCIE2_AXI_M_CLK_SRC] = &gcc_pcie2_axi_m_clk_src.clkr,
  2653. [GCC_PCIE2_AXI_S_BRIDGE_CLK] = &gcc_pcie2_axi_s_bridge_clk.clkr,
  2654. [GCC_PCIE2_AXI_S_CLK] = &gcc_pcie2_axi_s_clk.clkr,
  2655. [GCC_PCIE2_AXI_S_CLK_SRC] = &gcc_pcie2_axi_s_clk_src.clkr,
  2656. [GCC_PCIE2_PIPE_CLK] = &gcc_pcie2_pipe_clk.clkr,
  2657. [GCC_ANOC_PCIE2_2LANE_M_CLK] = &gcc_anoc_pcie2_2lane_m_clk.clkr,
  2658. [GCC_PCIE2_PIPE_CLK_SRC] = &gcc_pcie2_pipe_clk_src.clkr,
  2659. [GCC_PCIE2_RCHNG_CLK_SRC] = &gcc_pcie2_rchng_clk_src.clkr,
  2660. [GCC_PCIE2_RCHNG_CLK] = &gcc_pcie2_rchng_clk.clkr,
  2661. [GCC_PCIE3_AHB_CLK] = &gcc_pcie3_ahb_clk.clkr,
  2662. [GCC_PCIE3_AUX_CLK] = &gcc_pcie3_aux_clk.clkr,
  2663. [GCC_PCIE3_AXI_M_CLK] = &gcc_pcie3_axi_m_clk.clkr,
  2664. [GCC_PCIE3_AXI_M_CLK_SRC] = &gcc_pcie3_axi_m_clk_src.clkr,
  2665. [GCC_PCIE3_AXI_S_BRIDGE_CLK] = &gcc_pcie3_axi_s_bridge_clk.clkr,
  2666. [GCC_PCIE3_AXI_S_CLK] = &gcc_pcie3_axi_s_clk.clkr,
  2667. [GCC_PCIE3_AXI_S_CLK_SRC] = &gcc_pcie3_axi_s_clk_src.clkr,
  2668. [GCC_PCIE3_PIPE_CLK] = &gcc_pcie3_pipe_clk.clkr,
  2669. [GCC_ANOC_PCIE3_2LANE_M_CLK] = &gcc_anoc_pcie3_2lane_m_clk.clkr,
  2670. [GCC_PCIE3_PIPE_CLK_SRC] = &gcc_pcie3_pipe_clk_src.clkr,
  2671. [GCC_PCIE3_RCHNG_CLK_SRC] = &gcc_pcie3_rchng_clk_src.clkr,
  2672. [GCC_PCIE3_RCHNG_CLK] = &gcc_pcie3_rchng_clk.clkr,
  2673. [GCC_PCIE_AUX_CLK_SRC] = &gcc_pcie_aux_clk_src.clkr,
  2674. [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
  2675. [GCC_QUPV3_AHB_MST_CLK] = &gcc_qupv3_ahb_mst_clk.clkr,
  2676. [GCC_QUPV3_AHB_SLV_CLK] = &gcc_qupv3_ahb_slv_clk.clkr,
  2677. [GCC_QUPV3_I2C0_CLK] = &gcc_qupv3_i2c0_clk.clkr,
  2678. [GCC_QUPV3_I2C0_CLK_SRC] = &gcc_qupv3_i2c0_clk_src.clkr,
  2679. [GCC_QUPV3_I2C0_DIV_CLK_SRC] = &gcc_qupv3_i2c0_div_clk_src.clkr,
  2680. [GCC_QUPV3_I2C1_CLK] = &gcc_qupv3_i2c1_clk.clkr,
  2681. [GCC_QUPV3_I2C1_CLK_SRC] = &gcc_qupv3_i2c1_clk_src.clkr,
  2682. [GCC_QUPV3_I2C1_DIV_CLK_SRC] = &gcc_qupv3_i2c1_div_clk_src.clkr,
  2683. [GCC_QUPV3_SPI0_CLK] = &gcc_qupv3_spi0_clk.clkr,
  2684. [GCC_QUPV3_SPI0_CLK_SRC] = &gcc_qupv3_spi0_clk_src.clkr,
  2685. [GCC_QUPV3_SPI1_CLK] = &gcc_qupv3_spi1_clk.clkr,
  2686. [GCC_QUPV3_SPI1_CLK_SRC] = &gcc_qupv3_spi1_clk_src.clkr,
  2687. [GCC_QUPV3_UART0_CLK] = &gcc_qupv3_uart0_clk.clkr,
  2688. [GCC_QUPV3_UART0_CLK_SRC] = &gcc_qupv3_uart0_clk_src.clkr,
  2689. [GCC_QUPV3_UART1_CLK] = &gcc_qupv3_uart1_clk.clkr,
  2690. [GCC_QUPV3_UART1_CLK_SRC] = &gcc_qupv3_uart1_clk_src.clkr,
  2691. [GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
  2692. [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
  2693. [GCC_SDCC1_APPS_CLK_SRC] = &gcc_sdcc1_apps_clk_src.clkr,
  2694. [GCC_SDCC1_ICE_CORE_CLK] = &gcc_sdcc1_ice_core_clk.clkr,
  2695. [GCC_SDCC1_ICE_CORE_CLK_SRC] = &gcc_sdcc1_ice_core_clk_src.clkr,
  2696. [GCC_UNIPHY0_AHB_CLK] = &gcc_uniphy0_ahb_clk.clkr,
  2697. [GCC_UNIPHY0_SYS_CLK] = &gcc_uniphy0_sys_clk.clkr,
  2698. [GCC_UNIPHY1_AHB_CLK] = &gcc_uniphy1_ahb_clk.clkr,
  2699. [GCC_UNIPHY1_SYS_CLK] = &gcc_uniphy1_sys_clk.clkr,
  2700. [GCC_UNIPHY2_AHB_CLK] = &gcc_uniphy2_ahb_clk.clkr,
  2701. [GCC_UNIPHY2_SYS_CLK] = &gcc_uniphy2_sys_clk.clkr,
  2702. [GCC_UNIPHY_SYS_CLK_SRC] = &gcc_uniphy_sys_clk_src.clkr,
  2703. [GCC_USB0_AUX_CLK] = &gcc_usb0_aux_clk.clkr,
  2704. [GCC_USB0_AUX_CLK_SRC] = &gcc_usb0_aux_clk_src.clkr,
  2705. [GCC_USB0_MASTER_CLK] = &gcc_usb0_master_clk.clkr,
  2706. [GCC_USB0_MASTER_CLK_SRC] = &gcc_usb0_master_clk_src.clkr,
  2707. [GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr,
  2708. [GCC_USB0_MOCK_UTMI_CLK_SRC] = &gcc_usb0_mock_utmi_clk_src.clkr,
  2709. [GCC_USB0_MOCK_UTMI_DIV_CLK_SRC] = &gcc_usb0_mock_utmi_div_clk_src.clkr,
  2710. [GCC_USB0_EUD_AT_CLK] = &gcc_usb0_eud_at_clk.clkr,
  2711. [GCC_USB0_PIPE_CLK_SRC] = &gcc_usb0_pipe_clk_src.clkr,
  2712. [GCC_USB1_MOCK_UTMI_CLK] = &gcc_usb1_mock_utmi_clk.clkr,
  2713. [GCC_USB1_MOCK_UTMI_CLK_SRC] = &gcc_usb1_mock_utmi_clk_src.clkr,
  2714. [GCC_USB1_MOCK_UTMI_DIV_CLK_SRC] = &gcc_usb1_mock_utmi_div_clk_src.clkr,
  2715. [GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr,
  2716. [GCC_USB1_PHY_CFG_AHB_CLK] = &gcc_usb1_phy_cfg_ahb_clk.clkr,
  2717. [GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr,
  2718. [GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr,
  2719. [GCC_USB1_SLEEP_CLK] = &gcc_usb1_sleep_clk.clkr,
  2720. [GCC_USB1_MASTER_CLK] = &gcc_usb1_master_clk.clkr,
  2721. [GCC_WCSS_AHB_CLK_SRC] = &gcc_wcss_ahb_clk_src.clkr,
  2722. [GCC_CMN_12GPLL_AHB_CLK] = &gcc_cmn_12gpll_ahb_clk.clkr,
  2723. [GCC_CMN_12GPLL_SYS_CLK] = &gcc_cmn_12gpll_sys_clk.clkr,
  2724. [GCC_LPASS_SWAY_CLK] = &gcc_lpass_sway_clk.clkr,
  2725. [GCC_CNOC_LPASS_CFG_CLK] = &gcc_cnoc_lpass_cfg_clk.clkr,
  2726. [GCC_LPASS_CORE_AXIM_CLK] = &gcc_lpass_core_axim_clk.clkr,
  2727. [GCC_SNOC_LPASS_CLK] = &gcc_snoc_lpass_clk.clkr,
  2728. [GCC_QDSS_AT_CLK_SRC] = &gcc_qdss_at_clk_src.clkr,
  2729. [GCC_QDSS_TSCTR_CLK_SRC] = &gcc_qdss_tsctr_clk_src.clkr,
  2730. [GCC_SYSTEM_NOC_BFDCD_CLK_SRC] = &gcc_system_noc_bfdcd_clk_src.clkr,
  2731. [GCC_PCNOC_BFDCD_CLK_SRC] = &gcc_pcnoc_bfdcd_clk_src.clkr,
  2732. [GCC_LPASS_SWAY_CLK_SRC] = &gcc_lpass_sway_clk_src.clkr,
  2733. [GCC_LPASS_AXIM_CLK_SRC] = &gcc_lpass_axim_clk_src.clkr,
  2734. [GCC_SLEEP_CLK_SRC] = &gcc_sleep_clk_src.clkr,
  2735. [GCC_QPIC_IO_MACRO_CLK] = &gcc_qpic_io_macro_clk.clkr,
  2736. [GCC_QPIC_IO_MACRO_CLK_SRC] = &gcc_qpic_io_macro_clk_src.clkr,
  2737. [GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,
  2738. [GCC_QPIC_CLK_SRC] = &gcc_qpic_clk_src.clkr,
  2739. [GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
  2740. [GCC_XO_CLK_SRC] = &gcc_xo_clk_src.clkr,
  2741. [GCC_XO_CLK] = &gcc_xo_clk.clkr,
  2742. [GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
  2743. [GCC_QDSS_AT_CLK] = &gcc_qdss_at_clk.clkr,
  2744. [GPLL0] = &gpll0.clkr,
  2745. [GPLL2] = &gpll2.clkr,
  2746. [GPLL2_OUT_MAIN] = &gpll2_out_main.clkr,
  2747. [GPLL4] = &gpll4.clkr,
  2748. [GPLL0_OUT_AUX] = &gpll0_out_aux.clkr,
  2749. };
  2750. static const struct qcom_reset_map gcc_ipq5424_resets[] = {
  2751. [GCC_QUPV3_BCR] = { 0x01000, 0 },
  2752. [GCC_QUPV3_I2C0_BCR] = { 0x02000, 0 },
  2753. [GCC_QUPV3_UART0_BCR] = { 0x02020, 0 },
  2754. [GCC_QUPV3_I2C1_BCR] = { 0x03000, 0 },
  2755. [GCC_QUPV3_UART1_BCR] = { 0x03028, 0 },
  2756. [GCC_QUPV3_SPI0_BCR] = { 0x04000, 0 },
  2757. [GCC_QUPV3_SPI1_BCR] = { 0x05000, 0 },
  2758. [GCC_IMEM_BCR] = { 0x0e000, 0 },
  2759. [GCC_TME_BCR] = { 0x100000, 0 },
  2760. [GCC_DDRSS_BCR] = { 0x11000, 0 },
  2761. [GCC_PRNG_BCR] = { 0x13020, 0 },
  2762. [GCC_BOOT_ROM_BCR] = { 0x13028, 0 },
  2763. [GCC_NSS_BCR] = { 0x17000, 0 },
  2764. [GCC_MDIO_BCR] = { 0x1703c, 0 },
  2765. [GCC_UNIPHY0_BCR] = { 0x17044, 0 },
  2766. [GCC_UNIPHY1_BCR] = { 0x17054, 0 },
  2767. [GCC_UNIPHY2_BCR] = { 0x17064, 0 },
  2768. [GCC_WCSS_BCR] = { 0x18004, 0 },
  2769. [GCC_SEC_CTRL_BCR] = { 0x1a000, 0 },
  2770. [GCC_TME_SEC_BUS_BCR] = { 0xa1030, 0 },
  2771. [GCC_ADSS_BCR] = { 0x1c000, 0 },
  2772. [GCC_LPASS_BCR] = { 0x27000, 0 },
  2773. [GCC_PCIE0_BCR] = { 0x28000, 0 },
  2774. [GCC_PCIE0_LINK_DOWN_BCR] = { 0x28054, 0 },
  2775. [GCC_PCIE0PHY_PHY_BCR] = { 0x2805c, 0 },
  2776. [GCC_PCIE0_PHY_BCR] = { 0x28060, 0 },
  2777. [GCC_PCIE1_BCR] = { 0x29000, 0 },
  2778. [GCC_PCIE1_LINK_DOWN_BCR] = { 0x29054, 0 },
  2779. [GCC_PCIE1PHY_PHY_BCR] = { 0x2905c, 0 },
  2780. [GCC_PCIE1_PHY_BCR] = { 0x29060, 0 },
  2781. [GCC_PCIE2_BCR] = { 0x2a000, 0 },
  2782. [GCC_PCIE2_LINK_DOWN_BCR] = { 0x2a054, 0 },
  2783. [GCC_PCIE2PHY_PHY_BCR] = { 0x2a05c, 0 },
  2784. [GCC_PCIE2_PHY_BCR] = { 0x2a060, 0 },
  2785. [GCC_PCIE3_BCR] = { 0x2b000, 0 },
  2786. [GCC_PCIE3_LINK_DOWN_BCR] = { 0x2b054, 0 },
  2787. [GCC_PCIE3PHY_PHY_BCR] = { 0x2b05c, 0 },
  2788. [GCC_PCIE3_PHY_BCR] = { 0x2b060, 0 },
  2789. [GCC_USB_BCR] = { 0x2c000, 0 },
  2790. [GCC_QUSB2_0_PHY_BCR] = { 0x2c068, 0 },
  2791. [GCC_USB0_PHY_BCR] = { 0x2c06c, 0 },
  2792. [GCC_USB3PHY_0_PHY_BCR] = { 0x2c070, 0 },
  2793. [GCC_QDSS_BCR] = { 0x2d000, 0 },
  2794. [GCC_SNOC_BCR] = { 0x2e000, 0 },
  2795. [GCC_ANOC_BCR] = { 0x2e074, 0 },
  2796. [GCC_PCNOC_BCR] = { 0x31000, 0 },
  2797. [GCC_PCNOC_BUS_TIMEOUT0_BCR] = { 0x31030, 0 },
  2798. [GCC_PCNOC_BUS_TIMEOUT1_BCR] = { 0x31038, 0 },
  2799. [GCC_PCNOC_BUS_TIMEOUT2_BCR] = { 0x31040, 0 },
  2800. [GCC_PCNOC_BUS_TIMEOUT3_BCR] = { 0x31048, 0 },
  2801. [GCC_PCNOC_BUS_TIMEOUT4_BCR] = { 0x31050, 0 },
  2802. [GCC_PCNOC_BUS_TIMEOUT5_BCR] = { 0x31058, 0 },
  2803. [GCC_PCNOC_BUS_TIMEOUT6_BCR] = { 0x31060, 0 },
  2804. [GCC_PCNOC_BUS_TIMEOUT7_BCR] = { 0x31068, 0 },
  2805. [GCC_PCNOC_BUS_TIMEOUT8_BCR] = { 0x31070, 0 },
  2806. [GCC_PCNOC_BUS_TIMEOUT9_BCR] = { 0x31078, 0 },
  2807. [GCC_QPIC_BCR] = { 0x32000, 0 },
  2808. [GCC_SDCC_BCR] = { 0x33000, 0 },
  2809. [GCC_DCC_BCR] = { 0x35000, 0 },
  2810. [GCC_SPDM_BCR] = { 0x36000, 0 },
  2811. [GCC_MPM_BCR] = { 0x37000, 0 },
  2812. [GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR] = { 0x38000, 0 },
  2813. [GCC_RBCPR_BCR] = { 0x39000, 0 },
  2814. [GCC_CMN_BLK_BCR] = { 0x3a000, 0 },
  2815. [GCC_TCSR_BCR] = { 0x3d000, 0 },
  2816. [GCC_TLMM_BCR] = { 0x3e000, 0 },
  2817. [GCC_QUPV3_AHB_MST_ARES] = { 0x01014, 2 },
  2818. [GCC_QUPV3_CORE_ARES] = { 0x01018, 2 },
  2819. [GCC_QUPV3_2X_CORE_ARES] = { 0x01020, 2 },
  2820. [GCC_QUPV3_SLEEP_ARES] = { 0x01028, 2 },
  2821. [GCC_QUPV3_AHB_SLV_ARES] = { 0x0102c, 2 },
  2822. [GCC_QUPV3_I2C0_ARES] = { 0x02024, 2 },
  2823. [GCC_QUPV3_UART0_ARES] = { 0x02040, 2 },
  2824. [GCC_QUPV3_I2C1_ARES] = { 0x03024, 2 },
  2825. [GCC_QUPV3_UART1_ARES] = { 0x03040, 2 },
  2826. [GCC_QUPV3_SPI0_ARES] = { 0x04020, 2 },
  2827. [GCC_QUPV3_SPI1_ARES] = { 0x05020, 2 },
  2828. [GCC_DEBUG_ARES] = { 0x06068, 2 },
  2829. [GCC_GP1_ARES] = { 0x08018, 2 },
  2830. [GCC_GP2_ARES] = { 0x09018, 2 },
  2831. [GCC_GP3_ARES] = { 0x0a018, 2 },
  2832. [GCC_IMEM_AXI_ARES] = { 0x0e004, 2 },
  2833. [GCC_IMEM_CFG_AHB_ARES] = { 0x0e00c, 2 },
  2834. [GCC_TME_ARES] = { 0x100b4, 2 },
  2835. [GCC_TME_TS_ARES] = { 0x100c0, 2 },
  2836. [GCC_TME_SLOW_ARES] = { 0x100d0, 2 },
  2837. [GCC_TME_RTC_TOGGLE_ARES] = { 0x100d8, 2 },
  2838. [GCC_TIC_ARES] = { 0x12004, 2 },
  2839. [GCC_PRNG_AHB_ARES] = { 0x13024, 2 },
  2840. [GCC_BOOT_ROM_AHB_ARES] = { 0x1302c, 2 },
  2841. [GCC_NSSNOC_ATB_ARES] = { 0x17014, 2 },
  2842. [GCC_NSS_TS_ARES] = { 0x17018, 2 },
  2843. [GCC_NSSNOC_QOSGEN_REF_ARES] = { 0x1701c, 2 },
  2844. [GCC_NSSNOC_TIMEOUT_REF_ARES] = { 0x17020, 2 },
  2845. [GCC_NSSNOC_MEMNOC_ARES] = { 0x17024, 2 },
  2846. [GCC_NSSNOC_SNOC_ARES] = { 0x17028, 2 },
  2847. [GCC_NSSCFG_ARES] = { 0x1702c, 2 },
  2848. [GCC_NSSNOC_NSSCC_ARES] = { 0x17030, 2 },
  2849. [GCC_NSSCC_ARES] = { 0x17034, 2 },
  2850. [GCC_MDIO_AHB_ARES] = { 0x17040, 2 },
  2851. [GCC_UNIPHY0_SYS_ARES] = { 0x17048, 2 },
  2852. [GCC_UNIPHY0_AHB_ARES] = { 0x1704c, 2 },
  2853. [GCC_UNIPHY1_SYS_ARES] = { 0x17058, 2 },
  2854. [GCC_UNIPHY1_AHB_ARES] = { 0x1705c, 2 },
  2855. [GCC_UNIPHY2_SYS_ARES] = { 0x17068, 2 },
  2856. [GCC_UNIPHY2_AHB_ARES] = { 0x1706c, 2 },
  2857. [GCC_NSSNOC_XO_DCD_ARES] = { 0x17074, 2 },
  2858. [GCC_NSSNOC_SNOC_1_ARES] = { 0x1707c, 2 },
  2859. [GCC_NSSNOC_PCNOC_1_ARES] = { 0x17080, 2 },
  2860. [GCC_NSSNOC_MEMNOC_1_ARES] = { 0x17084, 2 },
  2861. [GCC_DDRSS_ATB_ARES] = { 0x19004, 2 },
  2862. [GCC_DDRSS_AHB_ARES] = { 0x19008, 2 },
  2863. [GCC_GEMNOC_AHB_ARES] = { 0x1900c, 2 },
  2864. [GCC_GEMNOC_Q6_AXI_ARES] = { 0x19010, 2 },
  2865. [GCC_GEMNOC_NSSNOC_ARES] = { 0x19014, 2 },
  2866. [GCC_GEMNOC_SNOC_ARES] = { 0x19018, 2 },
  2867. [GCC_GEMNOC_APSS_ARES] = { 0x1901c, 2 },
  2868. [GCC_GEMNOC_QOSGEN_EXTREF_ARES] = { 0x19024, 2 },
  2869. [GCC_GEMNOC_TS_ARES] = { 0x19028, 2 },
  2870. [GCC_DDRSS_SMS_SLOW_ARES] = { 0x1902c, 2 },
  2871. [GCC_GEMNOC_CNOC_ARES] = { 0x19038, 2 },
  2872. [GCC_GEMNOC_XO_DBG_ARES] = { 0x19040, 2 },
  2873. [GCC_GEMNOC_ANOC_ARES] = { 0x19048, 2 },
  2874. [GCC_DDRSS_LLCC_ATB_ARES] = { 0x1904c, 2 },
  2875. [GCC_LLCC_TPDM_CFG_ARES] = { 0x19050, 2 },
  2876. [GCC_TME_BUS_ARES] = { 0x1a014, 2 },
  2877. [GCC_SEC_CTRL_ACC_ARES] = { 0x1a018, 2 },
  2878. [GCC_SEC_CTRL_ARES] = { 0x1a020, 2 },
  2879. [GCC_SEC_CTRL_SENSE_ARES] = { 0x1a028, 2 },
  2880. [GCC_SEC_CTRL_AHB_ARES] = { 0x1a038, 2 },
  2881. [GCC_SEC_CTRL_BOOT_ROM_PATCH_ARES] = { 0x1a03c, 2 },
  2882. [GCC_ADSS_PWM_ARES] = { 0x1c00c, 2 },
  2883. [GCC_TME_ATB_ARES] = { 0x1e030, 2 },
  2884. [GCC_TME_DBGAPB_ARES] = { 0x1e034, 2 },
  2885. [GCC_TME_DEBUG_ARES] = { 0x1e038, 2 },
  2886. [GCC_TME_AT_ARES] = { 0x1e03C, 2 },
  2887. [GCC_TME_APB_ARES] = { 0x1e040, 2 },
  2888. [GCC_TME_DMI_DBG_HS_ARES] = { 0x1e044, 2 },
  2889. [GCC_APSS_AHB_ARES] = { 0x24014, 2 },
  2890. [GCC_APSS_AXI_ARES] = { 0x24018, 2 },
  2891. [GCC_CPUSS_TRIG_ARES] = { 0x2401c, 2 },
  2892. [GCC_APSS_DBG_ARES] = { 0x2402c, 2 },
  2893. [GCC_APSS_TS_ARES] = { 0x24030, 2 },
  2894. [GCC_APSS_ATB_ARES] = { 0x24034, 2 },
  2895. [GCC_Q6_AXIM_ARES] = { 0x2500c, 2 },
  2896. [GCC_Q6_AXIS_ARES] = { 0x25010, 2 },
  2897. [GCC_Q6_AHB_ARES] = { 0x25014, 2 },
  2898. [GCC_Q6_AHB_S_ARES] = { 0x25018, 2 },
  2899. [GCC_Q6SS_ATBM_ARES] = { 0x2501c, 2 },
  2900. [GCC_Q6_TSCTR_1TO2_ARES] = { 0x25020, 2 },
  2901. [GCC_Q6SS_PCLKDBG_ARES] = { 0x25024, 2 },
  2902. [GCC_Q6SS_TRIG_ARES] = { 0x25028, 2 },
  2903. [GCC_Q6SS_BOOT_CBCR_ARES] = { 0x2502c, 2 },
  2904. [GCC_WCSS_DBG_IFC_APB_ARES] = { 0x25038, 2 },
  2905. [GCC_WCSS_DBG_IFC_ATB_ARES] = { 0x2503c, 2 },
  2906. [GCC_WCSS_DBG_IFC_NTS_ARES] = { 0x25040, 2 },
  2907. [GCC_WCSS_DBG_IFC_DAPBUS_ARES] = { 0x25044, 2 },
  2908. [GCC_WCSS_DBG_IFC_APB_BDG_ARES] = { 0x25048, 2 },
  2909. [GCC_WCSS_DBG_IFC_NTS_BDG_ARES] = { 0x25050, 2 },
  2910. [GCC_WCSS_DBG_IFC_DAPBUS_BDG_ARES] = { 0x25054, 2 },
  2911. [GCC_WCSS_ECAHB_ARES] = { 0x25058, 2 },
  2912. [GCC_WCSS_ACMT_ARES] = { 0x2505c, 2 },
  2913. [GCC_WCSS_AHB_S_ARES] = { 0x25060, 2 },
  2914. [GCC_WCSS_AXI_M_ARES] = { 0x25064, 2 },
  2915. [GCC_PCNOC_WAPSS_ARES] = { 0x25080, 2 },
  2916. [GCC_SNOC_WAPSS_ARES] = { 0x25090, 2 },
  2917. [GCC_LPASS_SWAY_ARES] = { 0x27014, 2 },
  2918. [GCC_LPASS_CORE_AXIM_ARES] = { 0x27018, 2 },
  2919. [GCC_PCIE0_AHB_ARES] = { 0x28030, 2 },
  2920. [GCC_PCIE0_AXI_M_ARES] = { 0x28038, 2 },
  2921. [GCC_PCIE0_AXI_S_ARES] = { 0x28040, 2 },
  2922. [GCC_PCIE0_AXI_S_BRIDGE_ARES] = { 0x28048, 2},
  2923. [GCC_PCIE0_PIPE_ARES] = { 0x28068, 2},
  2924. [GCC_PCIE0_AUX_ARES] = { 0x28070, 2 },
  2925. [GCC_PCIE1_AHB_ARES] = { 0x29030, 2 },
  2926. [GCC_PCIE1_AXI_M_ARES] = { 0x29038, 2 },
  2927. [GCC_PCIE1_AXI_S_ARES] = { 0x29040, 2 },
  2928. [GCC_PCIE1_AXI_S_BRIDGE_ARES] = { 0x29048, 2 },
  2929. [GCC_PCIE1_PIPE_ARES] = { 0x29068, 2 },
  2930. [GCC_PCIE1_AUX_ARES] = { 0x29074, 2 },
  2931. [GCC_PCIE2_AHB_ARES] = { 0x2a030, 2 },
  2932. [GCC_PCIE2_AXI_M_ARES] = { 0x2a038, 2 },
  2933. [GCC_PCIE2_AXI_S_ARES] = { 0x2a040, 2 },
  2934. [GCC_PCIE2_AXI_S_BRIDGE_ARES] = { 0x2a048, 2 },
  2935. [GCC_PCIE2_PIPE_ARES] = { 0x2a068, 2 },
  2936. [GCC_PCIE2_AUX_ARES] = { 0x2a078, 2 },
  2937. [GCC_PCIE3_AHB_ARES] = { 0x2b030, 2 },
  2938. [GCC_PCIE3_AXI_M_ARES] = { 0x2b038, 2 },
  2939. [GCC_PCIE3_AXI_S_ARES] = { 0x2b040, 2 },
  2940. [GCC_PCIE3_AXI_S_BRIDGE_ARES] = { 0x2b048, 2 },
  2941. [GCC_PCIE3_PIPE_ARES] = { 0x2b068, 2 },
  2942. [GCC_PCIE3_AUX_ARES] = { 0x2b07C, 2 },
  2943. [GCC_USB0_MASTER_ARES] = { 0x2c044, 2 },
  2944. [GCC_USB0_AUX_ARES] = { 0x2c04c, 2 },
  2945. [GCC_USB0_MOCK_UTMI_ARES] = { 0x2c050, 2 },
  2946. [GCC_USB0_PIPE_ARES] = { 0x2c054, 2 },
  2947. [GCC_USB0_SLEEP_ARES] = { 0x2c058, 2 },
  2948. [GCC_USB0_PHY_CFG_AHB_ARES] = { 0x2c05c, 2 },
  2949. [GCC_QDSS_AT_ARES] = { 0x2d034, 2 },
  2950. [GCC_QDSS_STM_ARES] = { 0x2d03C, 2 },
  2951. [GCC_QDSS_TRACECLKIN_ARES] = { 0x2d040, 2 },
  2952. [GCC_QDSS_TSCTR_DIV2_ARES] = { 0x2d044, 2 },
  2953. [GCC_QDSS_TSCTR_DIV3_ARES] = { 0x2d048, 2 },
  2954. [GCC_QDSS_TSCTR_DIV4_ARES] = { 0x2d04c, 2 },
  2955. [GCC_QDSS_TSCTR_DIV8_ARES] = { 0x2d050, 2 },
  2956. [GCC_QDSS_TSCTR_DIV16_ARES] = { 0x2d054, 2 },
  2957. [GCC_QDSS_DAP_ARES] = { 0x2d058, 2 },
  2958. [GCC_QDSS_APB2JTAG_ARES] = { 0x2d05c, 2 },
  2959. [GCC_QDSS_ETR_USB_ARES] = { 0x2d060, 2 },
  2960. [GCC_QDSS_DAP_AHB_ARES] = { 0x2d064, 2 },
  2961. [GCC_QDSS_CFG_AHB_ARES] = { 0x2d068, 2 },
  2962. [GCC_QDSS_EUD_AT_ARES] = { 0x2d06c, 2 },
  2963. [GCC_QDSS_TS_ARES] = { 0x2d078, 2 },
  2964. [GCC_QDSS_USB_ARES] = { 0x2d07c, 2 },
  2965. [GCC_SYS_NOC_AXI_ARES] = { 0x2e01c, 2 },
  2966. [GCC_SNOC_QOSGEN_EXTREF_ARES] = { 0x2e020, 2 },
  2967. [GCC_CNOC_LPASS_CFG_ARES] = { 0x2e028, 2 },
  2968. [GCC_SYS_NOC_AT_ARES] = { 0x2e038, 2 },
  2969. [GCC_SNOC_PCNOC_AHB_ARES] = { 0x2e03c, 2 },
  2970. [GCC_SNOC_TME_ARES] = { 0x2e05c, 2 },
  2971. [GCC_SNOC_XO_DCD_ARES] = { 0x2e060, 2 },
  2972. [GCC_SNOC_TS_ARES] = { 0x2e068, 2 },
  2973. [GCC_ANOC0_AXI_ARES] = { 0x2e078, 2 },
  2974. [GCC_ANOC_PCIE0_1LANE_M_ARES] = { 0x2e07c, 2 },
  2975. [GCC_ANOC_PCIE2_2LANE_M_ARES] = { 0x2e080, 2 },
  2976. [GCC_ANOC_PCIE1_1LANE_M_ARES] = { 0x2e084, 2 },
  2977. [GCC_ANOC_PCIE3_2LANE_M_ARES] = { 0x2e090, 2 },
  2978. [GCC_ANOC_PCNOC_AHB_ARES] = { 0x2e094, 2 },
  2979. [GCC_ANOC_QOSGEN_EXTREF_ARES] = { 0x2e098, 2 },
  2980. [GCC_ANOC_XO_DCD_ARES] = { 0x2e09C, 2 },
  2981. [GCC_SNOC_XO_DBG_ARES] = { 0x2e0a0, 2 },
  2982. [GCC_AGGRNOC_ATB_ARES] = { 0x2e0ac, 2 },
  2983. [GCC_AGGRNOC_TS_ARES] = { 0x2e0b0, 2 },
  2984. [GCC_USB0_EUD_AT_ARES] = { 0x30004, 2 },
  2985. [GCC_PCNOC_TIC_ARES] = { 0x31014, 2 },
  2986. [GCC_PCNOC_AHB_ARES] = { 0x31018, 2 },
  2987. [GCC_PCNOC_XO_DBG_ARES] = { 0x3101c, 2 },
  2988. [GCC_SNOC_LPASS_ARES] = { 0x31020, 2 },
  2989. [GCC_PCNOC_AT_ARES] = { 0x31024, 2 },
  2990. [GCC_PCNOC_XO_DCD_ARES] = { 0x31028, 2 },
  2991. [GCC_PCNOC_TS_ARES] = { 0x3102c, 2 },
  2992. [GCC_PCNOC_BUS_TIMEOUT0_AHB_ARES] = { 0x31034, 2 },
  2993. [GCC_PCNOC_BUS_TIMEOUT1_AHB_ARES] = { 0x3103c, 2 },
  2994. [GCC_PCNOC_BUS_TIMEOUT2_AHB_ARES] = { 0x31044, 2 },
  2995. [GCC_PCNOC_BUS_TIMEOUT3_AHB_ARES] = { 0x3104c, 2 },
  2996. [GCC_PCNOC_BUS_TIMEOUT4_AHB_ARES] = { 0x31054, 2 },
  2997. [GCC_PCNOC_BUS_TIMEOUT5_AHB_ARES] = { 0x3105c, 2 },
  2998. [GCC_PCNOC_BUS_TIMEOUT6_AHB_ARES] = { 0x31064, 2 },
  2999. [GCC_PCNOC_BUS_TIMEOUT7_AHB_ARES] = { 0x3106c, 2 },
  3000. [GCC_Q6_AXIM_RESET] = { 0x2506c, 0 },
  3001. [GCC_Q6_AXIS_RESET] = { 0x2506c, 1 },
  3002. [GCC_Q6_AHB_S_RESET] = { 0x2506c, 2 },
  3003. [GCC_Q6_AHB_RESET] = { 0x2506c, 3 },
  3004. [GCC_Q6SS_DBG_RESET] = { 0x2506c, 4 },
  3005. [GCC_WCSS_ECAHB_RESET] = { 0x25070, 0 },
  3006. [GCC_WCSS_DBG_BDG_RESET] = { 0x25070, 1 },
  3007. [GCC_WCSS_DBG_RESET] = { 0x25070, 2 },
  3008. [GCC_WCSS_AXI_M_RESET] = { 0x25070, 3 },
  3009. [GCC_WCSS_AHB_S_RESET] = { 0x25070, 4 },
  3010. [GCC_WCSS_ACMT_RESET] = { 0x25070, 5 },
  3011. [GCC_WCSSAON_RESET] = { 0x25074, 0 },
  3012. [GCC_PCIE0_PIPE_RESET] = { 0x28058, 0 },
  3013. [GCC_PCIE0_CORE_STICKY_RESET] = { 0x28058, 1 },
  3014. [GCC_PCIE0_AXI_S_STICKY_RESET] = { 0x28058, 2 },
  3015. [GCC_PCIE0_AXI_S_RESET] = { 0x28058, 3 },
  3016. [GCC_PCIE0_AXI_M_STICKY_RESET] = { 0x28058, 4 },
  3017. [GCC_PCIE0_AXI_M_RESET] = { 0x28058, 5 },
  3018. [GCC_PCIE0_AUX_RESET] = { 0x28058, 6 },
  3019. [GCC_PCIE0_AHB_RESET] = { 0x28058, 7 },
  3020. [GCC_PCIE1_PIPE_RESET] = { 0x29058, 0 },
  3021. [GCC_PCIE1_CORE_STICKY_RESET] = { 0x29058, 1 },
  3022. [GCC_PCIE1_AXI_S_STICKY_RESET] = { 0x29058, 2 },
  3023. [GCC_PCIE1_AXI_S_RESET] = { 0x29058, 3 },
  3024. [GCC_PCIE1_AXI_M_STICKY_RESET] = { 0x29058, 4 },
  3025. [GCC_PCIE1_AXI_M_RESET] = { 0x29058, 5 },
  3026. [GCC_PCIE1_AUX_RESET] = { 0x29058, 6 },
  3027. [GCC_PCIE1_AHB_RESET] = { 0x29058, 7 },
  3028. [GCC_PCIE2_PIPE_RESET] = { 0x2a058, 0 },
  3029. [GCC_PCIE2_CORE_STICKY_RESET] = { 0x2a058, 1 },
  3030. [GCC_PCIE2_AXI_S_STICKY_RESET] = { 0x2a058, 2 },
  3031. [GCC_PCIE2_AXI_S_RESET] = { 0x2a058, 3 },
  3032. [GCC_PCIE2_AXI_M_STICKY_RESET] = { 0x2a058, 4 },
  3033. [GCC_PCIE2_AXI_M_RESET] = { 0x2a058, 5 },
  3034. [GCC_PCIE2_AUX_RESET] = { 0x2a058, 6 },
  3035. [GCC_PCIE2_AHB_RESET] = { 0x2a058, 7 },
  3036. [GCC_PCIE3_PIPE_RESET] = { 0x2b058, 0 },
  3037. [GCC_PCIE3_CORE_STICKY_RESET] = { 0x2b058, 1 },
  3038. [GCC_PCIE3_AXI_S_STICKY_RESET] = { 0x2b058, 2 },
  3039. [GCC_PCIE3_AXI_S_RESET] = { 0x2b058, 3 },
  3040. [GCC_PCIE3_AXI_M_STICKY_RESET] = { 0x2b058, 4 },
  3041. [GCC_PCIE3_AXI_M_RESET] = { 0x2b058, 5 },
  3042. [GCC_PCIE3_AUX_RESET] = { 0x2b058, 6 },
  3043. [GCC_PCIE3_AHB_RESET] = { 0x2b058, 7 },
  3044. [GCC_NSS_PARTIAL_RESET] = { 0x17078, 0 },
  3045. [GCC_UNIPHY0_XPCS_ARES] = { 0x17050, 2 },
  3046. [GCC_UNIPHY1_XPCS_ARES] = { 0x17060, 2 },
  3047. [GCC_UNIPHY2_XPCS_ARES] = { 0x17070, 2 },
  3048. [GCC_USB1_BCR] = { 0x3C000, 0 },
  3049. [GCC_QUSB2_1_PHY_BCR] = { 0x3C030, 0 },
  3050. };
  3051. #define IPQ_APPS_ID 5424 /* some unique value */
  3052. static const struct qcom_icc_hws_data icc_ipq5424_hws[] = {
  3053. { MASTER_ANOC_PCIE0, SLAVE_ANOC_PCIE0, GCC_ANOC_PCIE0_1LANE_M_CLK },
  3054. { MASTER_CNOC_PCIE0, SLAVE_CNOC_PCIE0, GCC_CNOC_PCIE0_1LANE_S_CLK },
  3055. { MASTER_ANOC_PCIE1, SLAVE_ANOC_PCIE1, GCC_ANOC_PCIE1_1LANE_M_CLK },
  3056. { MASTER_CNOC_PCIE1, SLAVE_CNOC_PCIE1, GCC_CNOC_PCIE1_1LANE_S_CLK },
  3057. { MASTER_ANOC_PCIE2, SLAVE_ANOC_PCIE2, GCC_ANOC_PCIE2_2LANE_M_CLK },
  3058. { MASTER_CNOC_PCIE2, SLAVE_CNOC_PCIE2, GCC_CNOC_PCIE2_2LANE_S_CLK },
  3059. { MASTER_ANOC_PCIE3, SLAVE_ANOC_PCIE3, GCC_ANOC_PCIE3_2LANE_M_CLK },
  3060. { MASTER_CNOC_PCIE3, SLAVE_CNOC_PCIE3, GCC_CNOC_PCIE3_2LANE_S_CLK },
  3061. { MASTER_CNOC_USB, SLAVE_CNOC_USB, GCC_CNOC_USB_CLK },
  3062. { MASTER_NSSNOC_NSSCC, SLAVE_NSSNOC_NSSCC, GCC_NSSNOC_NSSCC_CLK },
  3063. { MASTER_NSSNOC_SNOC_0, SLAVE_NSSNOC_SNOC_0, GCC_NSSNOC_SNOC_CLK },
  3064. { MASTER_NSSNOC_SNOC_1, SLAVE_NSSNOC_SNOC_1, GCC_NSSNOC_SNOC_1_CLK },
  3065. { MASTER_NSSNOC_PCNOC_1, SLAVE_NSSNOC_PCNOC_1, GCC_NSSNOC_PCNOC_1_CLK },
  3066. { MASTER_NSSNOC_QOSGEN_REF, SLAVE_NSSNOC_QOSGEN_REF, GCC_NSSNOC_QOSGEN_REF_CLK },
  3067. { MASTER_NSSNOC_TIMEOUT_REF, SLAVE_NSSNOC_TIMEOUT_REF, GCC_NSSNOC_TIMEOUT_REF_CLK },
  3068. { MASTER_NSSNOC_XO_DCD, SLAVE_NSSNOC_XO_DCD, GCC_NSSNOC_XO_DCD_CLK },
  3069. { MASTER_NSSNOC_ATB, SLAVE_NSSNOC_ATB, GCC_NSSNOC_ATB_CLK },
  3070. { MASTER_CNOC_LPASS_CFG, SLAVE_CNOC_LPASS_CFG, GCC_CNOC_LPASS_CFG_CLK },
  3071. { MASTER_SNOC_LPASS, SLAVE_SNOC_LPASS, GCC_SNOC_LPASS_CLK },
  3072. };
  3073. static const struct of_device_id gcc_ipq5424_match_table[] = {
  3074. { .compatible = "qcom,ipq5424-gcc" },
  3075. { }
  3076. };
  3077. MODULE_DEVICE_TABLE(of, gcc_ipq5424_match_table);
  3078. static const struct regmap_config gcc_ipq5424_regmap_config = {
  3079. .reg_bits = 32,
  3080. .reg_stride = 4,
  3081. .val_bits = 32,
  3082. .max_register = 0x3f024,
  3083. .fast_io = true,
  3084. };
  3085. static struct clk_hw *gcc_ipq5424_hws[] = {
  3086. &gpll0_div2.hw,
  3087. &gcc_xo_div4_clk_src.hw,
  3088. &gcc_qdss_tsctr_div2_clk_src.hw,
  3089. &gcc_qdss_dap_sync_clk_src.hw,
  3090. &gcc_eud_at_div_clk_src.hw,
  3091. };
  3092. static const struct qcom_cc_desc gcc_ipq5424_desc = {
  3093. .config = &gcc_ipq5424_regmap_config,
  3094. .clks = gcc_ipq5424_clocks,
  3095. .num_clks = ARRAY_SIZE(gcc_ipq5424_clocks),
  3096. .resets = gcc_ipq5424_resets,
  3097. .num_resets = ARRAY_SIZE(gcc_ipq5424_resets),
  3098. .clk_hws = gcc_ipq5424_hws,
  3099. .num_clk_hws = ARRAY_SIZE(gcc_ipq5424_hws),
  3100. .icc_hws = icc_ipq5424_hws,
  3101. .num_icc_hws = ARRAY_SIZE(icc_ipq5424_hws),
  3102. .icc_first_node_id = IPQ_APPS_ID,
  3103. };
  3104. static int gcc_ipq5424_probe(struct platform_device *pdev)
  3105. {
  3106. return qcom_cc_probe(pdev, &gcc_ipq5424_desc);
  3107. }
  3108. static struct platform_driver gcc_ipq5424_driver = {
  3109. .probe = gcc_ipq5424_probe,
  3110. .driver = {
  3111. .name = "qcom,gcc-ipq5424",
  3112. .of_match_table = gcc_ipq5424_match_table,
  3113. .sync_state = icc_sync_state,
  3114. },
  3115. };
  3116. static int __init gcc_ipq5424_init(void)
  3117. {
  3118. return platform_driver_register(&gcc_ipq5424_driver);
  3119. }
  3120. core_initcall(gcc_ipq5424_init);
  3121. static void __exit gcc_ipq5424_exit(void)
  3122. {
  3123. platform_driver_unregister(&gcc_ipq5424_driver);
  3124. }
  3125. module_exit(gcc_ipq5424_exit);
  3126. MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ5424 Driver");
  3127. MODULE_LICENSE("GPL");