ecpricc-qdu1000.c 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #include <linux/clk-provider.h>
  6. #include <linux/mod_devicetable.h>
  7. #include <linux/module.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/regmap.h>
  10. #include <dt-bindings/clock/qcom,qdu1000-ecpricc.h>
  11. #include "clk-alpha-pll.h"
  12. #include "clk-branch.h"
  13. #include "clk-rcg.h"
  14. #include "clk-regmap.h"
  15. #include "clk-regmap-divider.h"
  16. #include "clk-regmap-mux.h"
  17. #include "common.h"
  18. #include "reset.h"
  19. enum {
  20. DT_BI_TCXO,
  21. DT_GCC_ECPRI_CC_GPLL0_OUT_MAIN,
  22. DT_GCC_ECPRI_CC_GPLL1_OUT_EVEN,
  23. DT_GCC_ECPRI_CC_GPLL2_OUT_MAIN,
  24. DT_GCC_ECPRI_CC_GPLL3_OUT_MAIN,
  25. DT_GCC_ECPRI_CC_GPLL4_OUT_MAIN,
  26. DT_GCC_ECPRI_CC_GPLL5_OUT_EVEN,
  27. };
  28. enum {
  29. P_BI_TCXO,
  30. P_ECPRI_CC_PLL0_OUT_MAIN,
  31. P_ECPRI_CC_PLL1_OUT_MAIN,
  32. P_GCC_ECPRI_CC_GPLL0_OUT_MAIN,
  33. P_GCC_ECPRI_CC_GPLL1_OUT_EVEN,
  34. P_GCC_ECPRI_CC_GPLL2_OUT_MAIN,
  35. P_GCC_ECPRI_CC_GPLL3_OUT_MAIN,
  36. P_GCC_ECPRI_CC_GPLL4_OUT_MAIN,
  37. P_GCC_ECPRI_CC_GPLL5_OUT_EVEN,
  38. };
  39. static const struct pll_vco lucid_evo_vco[] = {
  40. { 249600000, 2020000000, 0 },
  41. };
  42. /* 700 MHz configuration */
  43. static const struct alpha_pll_config ecpri_cc_pll0_config = {
  44. .l = 0x24,
  45. .alpha = 0x7555,
  46. .config_ctl_val = 0x20485699,
  47. .config_ctl_hi_val = 0x00182261,
  48. .config_ctl_hi1_val = 0x32aa299c,
  49. .user_ctl_val = 0x00000000,
  50. .user_ctl_hi_val = 0x00000805,
  51. };
  52. static struct clk_alpha_pll ecpri_cc_pll0 = {
  53. .offset = 0x0,
  54. .vco_table = lucid_evo_vco,
  55. .num_vco = ARRAY_SIZE(lucid_evo_vco),
  56. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
  57. .clkr = {
  58. .enable_reg = 0x0,
  59. .enable_mask = BIT(0),
  60. .hw.init = &(const struct clk_init_data) {
  61. .name = "ecpri_cc_pll0",
  62. .parent_data = &(const struct clk_parent_data) {
  63. .index = DT_BI_TCXO,
  64. },
  65. .num_parents = 1,
  66. .ops = &clk_alpha_pll_fixed_lucid_evo_ops,
  67. },
  68. },
  69. };
  70. /* 806 MHz configuration */
  71. static const struct alpha_pll_config ecpri_cc_pll1_config = {
  72. .l = 0x29,
  73. .alpha = 0xfaaa,
  74. .config_ctl_val = 0x20485699,
  75. .config_ctl_hi_val = 0x00182261,
  76. .config_ctl_hi1_val = 0x32aa299c,
  77. .user_ctl_val = 0x00000000,
  78. .user_ctl_hi_val = 0x00000805,
  79. };
  80. static struct clk_alpha_pll ecpri_cc_pll1 = {
  81. .offset = 0x1000,
  82. .vco_table = lucid_evo_vco,
  83. .num_vco = ARRAY_SIZE(lucid_evo_vco),
  84. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
  85. .clkr = {
  86. .enable_reg = 0x0,
  87. .enable_mask = BIT(1),
  88. .hw.init = &(const struct clk_init_data) {
  89. .name = "ecpri_cc_pll1",
  90. .parent_data = &(const struct clk_parent_data) {
  91. .index = DT_BI_TCXO,
  92. },
  93. .num_parents = 1,
  94. .ops = &clk_alpha_pll_fixed_lucid_evo_ops,
  95. },
  96. },
  97. };
  98. static const struct parent_map ecpri_cc_parent_map_0[] = {
  99. { P_BI_TCXO, 0 },
  100. { P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 1 },
  101. { P_GCC_ECPRI_CC_GPLL2_OUT_MAIN, 2 },
  102. { P_GCC_ECPRI_CC_GPLL5_OUT_EVEN, 3 },
  103. { P_ECPRI_CC_PLL1_OUT_MAIN, 4 },
  104. { P_GCC_ECPRI_CC_GPLL4_OUT_MAIN, 5 },
  105. { P_ECPRI_CC_PLL0_OUT_MAIN, 6 },
  106. };
  107. static const struct clk_parent_data ecpri_cc_parent_data_0[] = {
  108. { .index = DT_BI_TCXO },
  109. { .index = DT_GCC_ECPRI_CC_GPLL0_OUT_MAIN },
  110. { .index = DT_GCC_ECPRI_CC_GPLL2_OUT_MAIN },
  111. { .index = DT_GCC_ECPRI_CC_GPLL5_OUT_EVEN },
  112. { .hw = &ecpri_cc_pll1.clkr.hw },
  113. { .index = DT_GCC_ECPRI_CC_GPLL4_OUT_MAIN },
  114. { .hw = &ecpri_cc_pll0.clkr.hw },
  115. };
  116. static const struct parent_map ecpri_cc_parent_map_1[] = {
  117. { P_BI_TCXO, 0 },
  118. { P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 1 },
  119. { P_GCC_ECPRI_CC_GPLL1_OUT_EVEN, 2 },
  120. { P_GCC_ECPRI_CC_GPLL3_OUT_MAIN, 3 },
  121. { P_ECPRI_CC_PLL1_OUT_MAIN, 4 },
  122. { P_GCC_ECPRI_CC_GPLL4_OUT_MAIN, 5 },
  123. { P_ECPRI_CC_PLL0_OUT_MAIN, 6 },
  124. };
  125. static const struct clk_parent_data ecpri_cc_parent_data_1[] = {
  126. { .index = DT_BI_TCXO },
  127. { .index = DT_GCC_ECPRI_CC_GPLL0_OUT_MAIN },
  128. { .index = DT_GCC_ECPRI_CC_GPLL1_OUT_EVEN },
  129. { .index = DT_GCC_ECPRI_CC_GPLL3_OUT_MAIN },
  130. { .hw = &ecpri_cc_pll1.clkr.hw },
  131. { .index = DT_GCC_ECPRI_CC_GPLL4_OUT_MAIN },
  132. { .hw = &ecpri_cc_pll0.clkr.hw },
  133. };
  134. static const struct parent_map ecpri_cc_parent_map_2[] = {
  135. { P_BI_TCXO, 0 },
  136. { P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 1 },
  137. { P_GCC_ECPRI_CC_GPLL5_OUT_EVEN, 3 },
  138. { P_ECPRI_CC_PLL1_OUT_MAIN, 4 },
  139. { P_GCC_ECPRI_CC_GPLL4_OUT_MAIN, 5 },
  140. { P_ECPRI_CC_PLL0_OUT_MAIN, 6 },
  141. };
  142. static const struct clk_parent_data ecpri_cc_parent_data_2[] = {
  143. { .index = DT_BI_TCXO },
  144. { .index = DT_GCC_ECPRI_CC_GPLL0_OUT_MAIN },
  145. { .index = DT_GCC_ECPRI_CC_GPLL5_OUT_EVEN },
  146. { .hw = &ecpri_cc_pll1.clkr.hw },
  147. { .index = DT_GCC_ECPRI_CC_GPLL4_OUT_MAIN },
  148. { .hw = &ecpri_cc_pll0.clkr.hw },
  149. };
  150. static const struct freq_tbl ftbl_ecpri_cc_ecpri_clk_src[] = {
  151. F(466500000, P_GCC_ECPRI_CC_GPLL5_OUT_EVEN, 1, 0, 0),
  152. { }
  153. };
  154. static struct clk_rcg2 ecpri_cc_ecpri_clk_src = {
  155. .cmd_rcgr = 0x9034,
  156. .mnd_width = 0,
  157. .hid_width = 5,
  158. .parent_map = ecpri_cc_parent_map_2,
  159. .freq_tbl = ftbl_ecpri_cc_ecpri_clk_src,
  160. .clkr.hw.init = &(const struct clk_init_data) {
  161. .name = "ecpri_cc_ecpri_clk_src",
  162. .parent_data = ecpri_cc_parent_data_2,
  163. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_2),
  164. .ops = &clk_rcg2_shared_ops,
  165. },
  166. };
  167. static const struct freq_tbl ftbl_ecpri_cc_ecpri_dma_clk_src[] = {
  168. F(466500000, P_GCC_ECPRI_CC_GPLL5_OUT_EVEN, 1, 0, 0),
  169. F(500000000, P_GCC_ECPRI_CC_GPLL2_OUT_MAIN, 1, 0, 0),
  170. { }
  171. };
  172. static struct clk_rcg2 ecpri_cc_ecpri_dma_clk_src = {
  173. .cmd_rcgr = 0x9080,
  174. .mnd_width = 0,
  175. .hid_width = 5,
  176. .parent_map = ecpri_cc_parent_map_0,
  177. .freq_tbl = ftbl_ecpri_cc_ecpri_dma_clk_src,
  178. .clkr.hw.init = &(const struct clk_init_data) {
  179. .name = "ecpri_cc_ecpri_dma_clk_src",
  180. .parent_data = ecpri_cc_parent_data_0,
  181. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  182. .ops = &clk_rcg2_shared_ops,
  183. },
  184. };
  185. static const struct freq_tbl ftbl_ecpri_cc_ecpri_fast_clk_src[] = {
  186. F(500000000, P_GCC_ECPRI_CC_GPLL2_OUT_MAIN, 1, 0, 0),
  187. F(600000000, P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 1, 0, 0),
  188. { }
  189. };
  190. static struct clk_rcg2 ecpri_cc_ecpri_fast_clk_src = {
  191. .cmd_rcgr = 0x904c,
  192. .mnd_width = 0,
  193. .hid_width = 5,
  194. .parent_map = ecpri_cc_parent_map_0,
  195. .freq_tbl = ftbl_ecpri_cc_ecpri_fast_clk_src,
  196. .clkr.hw.init = &(const struct clk_init_data) {
  197. .name = "ecpri_cc_ecpri_fast_clk_src",
  198. .parent_data = ecpri_cc_parent_data_0,
  199. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  200. .ops = &clk_rcg2_shared_ops,
  201. },
  202. };
  203. static const struct freq_tbl ftbl_ecpri_cc_ecpri_oran_clk_src[] = {
  204. F(500000000, P_GCC_ECPRI_CC_GPLL2_OUT_MAIN, 1, 0, 0),
  205. { }
  206. };
  207. static struct clk_rcg2 ecpri_cc_ecpri_oran_clk_src = {
  208. .cmd_rcgr = 0x9064,
  209. .mnd_width = 0,
  210. .hid_width = 5,
  211. .parent_map = ecpri_cc_parent_map_0,
  212. .freq_tbl = ftbl_ecpri_cc_ecpri_oran_clk_src,
  213. .clkr.hw.init = &(const struct clk_init_data) {
  214. .name = "ecpri_cc_ecpri_oran_clk_src",
  215. .parent_data = ecpri_cc_parent_data_0,
  216. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  217. .ops = &clk_rcg2_shared_ops,
  218. },
  219. };
  220. static const struct freq_tbl ftbl_ecpri_cc_eth_100g_c2c0_hm_ff_clk_src[] = {
  221. F(201500000, P_ECPRI_CC_PLL1_OUT_MAIN, 4, 0, 0),
  222. F(403000000, P_ECPRI_CC_PLL1_OUT_MAIN, 2, 0, 0),
  223. F(466500000, P_GCC_ECPRI_CC_GPLL5_OUT_EVEN, 1, 0, 0),
  224. { }
  225. };
  226. static struct clk_rcg2 ecpri_cc_eth_100g_c2c0_hm_ff_clk_src = {
  227. .cmd_rcgr = 0x81b0,
  228. .mnd_width = 0,
  229. .hid_width = 5,
  230. .parent_map = ecpri_cc_parent_map_0,
  231. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c0_hm_ff_clk_src,
  232. .clkr.hw.init = &(const struct clk_init_data) {
  233. .name = "ecpri_cc_eth_100g_c2c0_hm_ff_clk_src",
  234. .parent_data = ecpri_cc_parent_data_0,
  235. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  236. .ops = &clk_rcg2_shared_ops,
  237. },
  238. };
  239. static const struct freq_tbl ftbl_ecpri_cc_eth_100g_c2c_hm_macsec_clk_src[] = {
  240. F(100000000, P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 6, 0, 0),
  241. F(200000000, P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 3, 0, 0),
  242. { }
  243. };
  244. static struct clk_rcg2 ecpri_cc_eth_100g_c2c_hm_macsec_clk_src = {
  245. .cmd_rcgr = 0x8150,
  246. .mnd_width = 0,
  247. .hid_width = 5,
  248. .parent_map = ecpri_cc_parent_map_0,
  249. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c_hm_macsec_clk_src,
  250. .clkr.hw.init = &(const struct clk_init_data) {
  251. .name = "ecpri_cc_eth_100g_c2c_hm_macsec_clk_src",
  252. .parent_data = ecpri_cc_parent_data_0,
  253. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  254. .ops = &clk_rcg2_shared_ops,
  255. },
  256. };
  257. static struct clk_rcg2 ecpri_cc_eth_100g_dbg_c2c_hm_ff_clk_src = {
  258. .cmd_rcgr = 0x81c8,
  259. .mnd_width = 0,
  260. .hid_width = 5,
  261. .parent_map = ecpri_cc_parent_map_0,
  262. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c0_hm_ff_clk_src,
  263. .clkr.hw.init = &(const struct clk_init_data) {
  264. .name = "ecpri_cc_eth_100g_dbg_c2c_hm_ff_clk_src",
  265. .parent_data = ecpri_cc_parent_data_0,
  266. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  267. .ops = &clk_rcg2_shared_ops,
  268. },
  269. };
  270. static struct clk_rcg2 ecpri_cc_eth_100g_fh0_hm_ff_clk_src = {
  271. .cmd_rcgr = 0x8168,
  272. .mnd_width = 0,
  273. .hid_width = 5,
  274. .parent_map = ecpri_cc_parent_map_0,
  275. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c0_hm_ff_clk_src,
  276. .clkr.hw.init = &(const struct clk_init_data) {
  277. .name = "ecpri_cc_eth_100g_fh0_hm_ff_clk_src",
  278. .parent_data = ecpri_cc_parent_data_0,
  279. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  280. .ops = &clk_rcg2_shared_ops,
  281. },
  282. };
  283. static struct clk_rcg2 ecpri_cc_eth_100g_fh0_macsec_clk_src = {
  284. .cmd_rcgr = 0x8108,
  285. .mnd_width = 0,
  286. .hid_width = 5,
  287. .parent_map = ecpri_cc_parent_map_0,
  288. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c_hm_macsec_clk_src,
  289. .clkr.hw.init = &(const struct clk_init_data) {
  290. .name = "ecpri_cc_eth_100g_fh0_macsec_clk_src",
  291. .parent_data = ecpri_cc_parent_data_0,
  292. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  293. .ops = &clk_rcg2_shared_ops,
  294. },
  295. };
  296. static struct clk_rcg2 ecpri_cc_eth_100g_fh1_hm_ff_clk_src = {
  297. .cmd_rcgr = 0x8180,
  298. .mnd_width = 0,
  299. .hid_width = 5,
  300. .parent_map = ecpri_cc_parent_map_0,
  301. .freq_tbl = ftbl_ecpri_cc_ecpri_clk_src,
  302. .clkr.hw.init = &(const struct clk_init_data) {
  303. .name = "ecpri_cc_eth_100g_fh1_hm_ff_clk_src",
  304. .parent_data = ecpri_cc_parent_data_0,
  305. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  306. .ops = &clk_rcg2_shared_ops,
  307. },
  308. };
  309. static const struct freq_tbl ftbl_ecpri_cc_eth_100g_fh1_macsec_clk_src[] = {
  310. F(200000000, P_GCC_ECPRI_CC_GPLL0_OUT_MAIN, 3, 0, 0),
  311. { }
  312. };
  313. static struct clk_rcg2 ecpri_cc_eth_100g_fh1_macsec_clk_src = {
  314. .cmd_rcgr = 0x8120,
  315. .mnd_width = 0,
  316. .hid_width = 5,
  317. .parent_map = ecpri_cc_parent_map_0,
  318. .freq_tbl = ftbl_ecpri_cc_eth_100g_fh1_macsec_clk_src,
  319. .clkr.hw.init = &(const struct clk_init_data) {
  320. .name = "ecpri_cc_eth_100g_fh1_macsec_clk_src",
  321. .parent_data = ecpri_cc_parent_data_0,
  322. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  323. .ops = &clk_rcg2_shared_ops,
  324. },
  325. };
  326. static struct clk_rcg2 ecpri_cc_eth_100g_fh2_hm_ff_clk_src = {
  327. .cmd_rcgr = 0x8198,
  328. .mnd_width = 0,
  329. .hid_width = 5,
  330. .parent_map = ecpri_cc_parent_map_0,
  331. .freq_tbl = ftbl_ecpri_cc_eth_100g_c2c0_hm_ff_clk_src,
  332. .clkr.hw.init = &(const struct clk_init_data) {
  333. .name = "ecpri_cc_eth_100g_fh2_hm_ff_clk_src",
  334. .parent_data = ecpri_cc_parent_data_0,
  335. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  336. .ops = &clk_rcg2_shared_ops,
  337. },
  338. };
  339. static struct clk_rcg2 ecpri_cc_eth_100g_fh2_macsec_clk_src = {
  340. .cmd_rcgr = 0x8138,
  341. .mnd_width = 0,
  342. .hid_width = 5,
  343. .parent_map = ecpri_cc_parent_map_0,
  344. .freq_tbl = ftbl_ecpri_cc_eth_100g_fh1_macsec_clk_src,
  345. .clkr.hw.init = &(const struct clk_init_data) {
  346. .name = "ecpri_cc_eth_100g_fh2_macsec_clk_src",
  347. .parent_data = ecpri_cc_parent_data_0,
  348. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_0),
  349. .ops = &clk_rcg2_shared_ops,
  350. },
  351. };
  352. static const struct freq_tbl ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src[] = {
  353. F(533000000, P_GCC_ECPRI_CC_GPLL1_OUT_EVEN, 1, 0, 0),
  354. F(700000000, P_GCC_ECPRI_CC_GPLL3_OUT_MAIN, 1, 0, 0),
  355. F(806000000, P_GCC_ECPRI_CC_GPLL4_OUT_MAIN, 1, 0, 0),
  356. { }
  357. };
  358. static struct clk_rcg2 ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src = {
  359. .cmd_rcgr = 0x8228,
  360. .mnd_width = 0,
  361. .hid_width = 5,
  362. .parent_map = ecpri_cc_parent_map_1,
  363. .freq_tbl = ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src,
  364. .clkr.hw.init = &(const struct clk_init_data) {
  365. .name = "ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src",
  366. .parent_data = ecpri_cc_parent_data_1,
  367. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_1),
  368. .ops = &clk_rcg2_shared_ops,
  369. },
  370. };
  371. static struct clk_rcg2 ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk_src = {
  372. .cmd_rcgr = 0x8240,
  373. .mnd_width = 0,
  374. .hid_width = 5,
  375. .parent_map = ecpri_cc_parent_map_1,
  376. .freq_tbl = ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src,
  377. .clkr.hw.init = &(const struct clk_init_data) {
  378. .name = "ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk_src",
  379. .parent_data = ecpri_cc_parent_data_1,
  380. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_1),
  381. .ops = &clk_rcg2_shared_ops,
  382. },
  383. };
  384. static struct clk_rcg2 ecpri_cc_eth_100g_mac_fh0_hm_ref_clk_src = {
  385. .cmd_rcgr = 0x81e0,
  386. .mnd_width = 0,
  387. .hid_width = 5,
  388. .parent_map = ecpri_cc_parent_map_1,
  389. .freq_tbl = ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src,
  390. .clkr.hw.init = &(const struct clk_init_data) {
  391. .name = "ecpri_cc_eth_100g_mac_fh0_hm_ref_clk_src",
  392. .parent_data = ecpri_cc_parent_data_1,
  393. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_1),
  394. .ops = &clk_rcg2_shared_ops,
  395. },
  396. };
  397. static struct clk_rcg2 ecpri_cc_eth_100g_mac_fh1_hm_ref_clk_src = {
  398. .cmd_rcgr = 0x81f8,
  399. .mnd_width = 0,
  400. .hid_width = 5,
  401. .parent_map = ecpri_cc_parent_map_1,
  402. .freq_tbl = ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src,
  403. .clkr.hw.init = &(const struct clk_init_data) {
  404. .name = "ecpri_cc_eth_100g_mac_fh1_hm_ref_clk_src",
  405. .parent_data = ecpri_cc_parent_data_1,
  406. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_1),
  407. .ops = &clk_rcg2_shared_ops,
  408. },
  409. };
  410. static struct clk_rcg2 ecpri_cc_eth_100g_mac_fh2_hm_ref_clk_src = {
  411. .cmd_rcgr = 0x8210,
  412. .mnd_width = 0,
  413. .hid_width = 5,
  414. .parent_map = ecpri_cc_parent_map_1,
  415. .freq_tbl = ftbl_ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src,
  416. .clkr.hw.init = &(const struct clk_init_data) {
  417. .name = "ecpri_cc_eth_100g_mac_fh2_hm_ref_clk_src",
  418. .parent_data = ecpri_cc_parent_data_1,
  419. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_1),
  420. .ops = &clk_rcg2_shared_ops,
  421. },
  422. };
  423. static const struct freq_tbl ftbl_ecpri_cc_mss_emac_clk_src[] = {
  424. F(403000000, P_GCC_ECPRI_CC_GPLL4_OUT_MAIN, 2, 0, 0),
  425. { }
  426. };
  427. static struct clk_rcg2 ecpri_cc_mss_emac_clk_src = {
  428. .cmd_rcgr = 0xe00c,
  429. .mnd_width = 0,
  430. .hid_width = 5,
  431. .parent_map = ecpri_cc_parent_map_2,
  432. .freq_tbl = ftbl_ecpri_cc_mss_emac_clk_src,
  433. .clkr.hw.init = &(const struct clk_init_data) {
  434. .name = "ecpri_cc_mss_emac_clk_src",
  435. .parent_data = ecpri_cc_parent_data_2,
  436. .num_parents = ARRAY_SIZE(ecpri_cc_parent_data_2),
  437. .ops = &clk_rcg2_shared_ops,
  438. },
  439. };
  440. static struct clk_regmap_div ecpri_cc_ecpri_fast_div2_clk_src = {
  441. .reg = 0x907c,
  442. .shift = 0,
  443. .width = 4,
  444. .clkr.hw.init = &(const struct clk_init_data) {
  445. .name = "ecpri_cc_ecpri_fast_div2_clk_src",
  446. .parent_hws = (const struct clk_hw*[]) {
  447. &ecpri_cc_ecpri_fast_clk_src.clkr.hw,
  448. },
  449. .num_parents = 1,
  450. .flags = CLK_SET_RATE_PARENT,
  451. .ops = &clk_regmap_div_ro_ops,
  452. },
  453. };
  454. static struct clk_regmap_div ecpri_cc_eth_100g_c2c_hm_ff_0_div_clk_src = {
  455. .reg = 0x8290,
  456. .shift = 0,
  457. .width = 4,
  458. .clkr.hw.init = &(const struct clk_init_data) {
  459. .name = "ecpri_cc_eth_100g_c2c_hm_ff_0_div_clk_src",
  460. .parent_hws = (const struct clk_hw*[]) {
  461. &ecpri_cc_eth_100g_c2c0_hm_ff_clk_src.clkr.hw,
  462. },
  463. .num_parents = 1,
  464. .flags = CLK_SET_RATE_PARENT,
  465. .ops = &clk_regmap_div_ro_ops,
  466. },
  467. };
  468. static struct clk_regmap_div ecpri_cc_eth_100g_c2c_hm_ff_1_div_clk_src = {
  469. .reg = 0x8294,
  470. .shift = 0,
  471. .width = 4,
  472. .clkr.hw.init = &(const struct clk_init_data) {
  473. .name = "ecpri_cc_eth_100g_c2c_hm_ff_1_div_clk_src",
  474. .parent_hws = (const struct clk_hw*[]) {
  475. &ecpri_cc_eth_100g_c2c0_hm_ff_clk_src.clkr.hw,
  476. },
  477. .num_parents = 1,
  478. .flags = CLK_SET_RATE_PARENT,
  479. .ops = &clk_regmap_div_ro_ops,
  480. },
  481. };
  482. static struct clk_regmap_div ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_div_clk_src = {
  483. .reg = 0x8298,
  484. .shift = 0,
  485. .width = 4,
  486. .clkr.hw.init = &(const struct clk_init_data) {
  487. .name = "ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_div_clk_src",
  488. .parent_hws = (const struct clk_hw*[]) {
  489. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_clk_src.clkr.hw,
  490. },
  491. .num_parents = 1,
  492. .flags = CLK_SET_RATE_PARENT,
  493. .ops = &clk_regmap_div_ro_ops,
  494. },
  495. };
  496. static struct clk_regmap_div ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_div_clk_src = {
  497. .reg = 0x829c,
  498. .shift = 0,
  499. .width = 4,
  500. .clkr.hw.init = &(const struct clk_init_data) {
  501. .name = "ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_div_clk_src",
  502. .parent_hws = (const struct clk_hw*[]) {
  503. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_clk_src.clkr.hw,
  504. },
  505. .num_parents = 1,
  506. .flags = CLK_SET_RATE_PARENT,
  507. .ops = &clk_regmap_div_ro_ops,
  508. },
  509. };
  510. static struct clk_regmap_div ecpri_cc_eth_100g_fh_0_hm_ff_0_div_clk_src = {
  511. .reg = 0x8260,
  512. .shift = 0,
  513. .width = 4,
  514. .clkr.hw.init = &(const struct clk_init_data) {
  515. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_0_div_clk_src",
  516. .parent_hws = (const struct clk_hw*[]) {
  517. &ecpri_cc_eth_100g_fh0_hm_ff_clk_src.clkr.hw,
  518. },
  519. .num_parents = 1,
  520. .flags = CLK_SET_RATE_PARENT,
  521. .ops = &clk_regmap_div_ro_ops,
  522. },
  523. };
  524. static struct clk_regmap_div ecpri_cc_eth_100g_fh_0_hm_ff_1_div_clk_src = {
  525. .reg = 0x8264,
  526. .shift = 0,
  527. .width = 4,
  528. .clkr.hw.init = &(const struct clk_init_data) {
  529. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_1_div_clk_src",
  530. .parent_hws = (const struct clk_hw*[]) {
  531. &ecpri_cc_eth_100g_fh0_hm_ff_clk_src.clkr.hw,
  532. },
  533. .num_parents = 1,
  534. .flags = CLK_SET_RATE_PARENT,
  535. .ops = &clk_regmap_div_ro_ops,
  536. },
  537. };
  538. static struct clk_regmap_div ecpri_cc_eth_100g_fh_0_hm_ff_2_div_clk_src = {
  539. .reg = 0x8268,
  540. .shift = 0,
  541. .width = 4,
  542. .clkr.hw.init = &(const struct clk_init_data) {
  543. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_2_div_clk_src",
  544. .parent_hws = (const struct clk_hw*[]) {
  545. &ecpri_cc_eth_100g_fh0_hm_ff_clk_src.clkr.hw,
  546. },
  547. .num_parents = 1,
  548. .flags = CLK_SET_RATE_PARENT,
  549. .ops = &clk_regmap_div_ro_ops,
  550. },
  551. };
  552. static struct clk_regmap_div ecpri_cc_eth_100g_fh_0_hm_ff_3_div_clk_src = {
  553. .reg = 0x826c,
  554. .shift = 0,
  555. .width = 4,
  556. .clkr.hw.init = &(const struct clk_init_data) {
  557. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_3_div_clk_src",
  558. .parent_hws = (const struct clk_hw*[]) {
  559. &ecpri_cc_eth_100g_fh0_hm_ff_clk_src.clkr.hw,
  560. },
  561. .num_parents = 1,
  562. .flags = CLK_SET_RATE_PARENT,
  563. .ops = &clk_regmap_div_ro_ops,
  564. },
  565. };
  566. static struct clk_regmap_div ecpri_cc_eth_100g_fh_1_hm_ff_0_div_clk_src = {
  567. .reg = 0x8270,
  568. .shift = 0,
  569. .width = 4,
  570. .clkr.hw.init = &(const struct clk_init_data) {
  571. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_0_div_clk_src",
  572. .parent_hws = (const struct clk_hw*[]) {
  573. &ecpri_cc_eth_100g_fh1_hm_ff_clk_src.clkr.hw,
  574. },
  575. .num_parents = 1,
  576. .flags = CLK_SET_RATE_PARENT,
  577. .ops = &clk_regmap_div_ro_ops,
  578. },
  579. };
  580. static struct clk_regmap_div ecpri_cc_eth_100g_fh_1_hm_ff_1_div_clk_src = {
  581. .reg = 0x8274,
  582. .shift = 0,
  583. .width = 4,
  584. .clkr.hw.init = &(const struct clk_init_data) {
  585. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_1_div_clk_src",
  586. .parent_hws = (const struct clk_hw*[]) {
  587. &ecpri_cc_eth_100g_fh1_hm_ff_clk_src.clkr.hw,
  588. },
  589. .num_parents = 1,
  590. .flags = CLK_SET_RATE_PARENT,
  591. .ops = &clk_regmap_div_ro_ops,
  592. },
  593. };
  594. static struct clk_regmap_div ecpri_cc_eth_100g_fh_1_hm_ff_2_div_clk_src = {
  595. .reg = 0x8278,
  596. .shift = 0,
  597. .width = 4,
  598. .clkr.hw.init = &(const struct clk_init_data) {
  599. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_2_div_clk_src",
  600. .parent_hws = (const struct clk_hw*[]) {
  601. &ecpri_cc_eth_100g_fh1_hm_ff_clk_src.clkr.hw,
  602. },
  603. .num_parents = 1,
  604. .flags = CLK_SET_RATE_PARENT,
  605. .ops = &clk_regmap_div_ro_ops,
  606. },
  607. };
  608. static struct clk_regmap_div ecpri_cc_eth_100g_fh_1_hm_ff_3_div_clk_src = {
  609. .reg = 0x827c,
  610. .shift = 0,
  611. .width = 4,
  612. .clkr.hw.init = &(const struct clk_init_data) {
  613. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_3_div_clk_src",
  614. .parent_hws = (const struct clk_hw*[]) {
  615. &ecpri_cc_eth_100g_fh1_hm_ff_clk_src.clkr.hw,
  616. },
  617. .num_parents = 1,
  618. .flags = CLK_SET_RATE_PARENT,
  619. .ops = &clk_regmap_div_ro_ops,
  620. },
  621. };
  622. static struct clk_regmap_div ecpri_cc_eth_100g_fh_2_hm_ff_0_div_clk_src = {
  623. .reg = 0x8280,
  624. .shift = 0,
  625. .width = 4,
  626. .clkr.hw.init = &(const struct clk_init_data) {
  627. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_0_div_clk_src",
  628. .parent_hws = (const struct clk_hw*[]) {
  629. &ecpri_cc_eth_100g_fh2_hm_ff_clk_src.clkr.hw,
  630. },
  631. .num_parents = 1,
  632. .flags = CLK_SET_RATE_PARENT,
  633. .ops = &clk_regmap_div_ro_ops,
  634. },
  635. };
  636. static struct clk_regmap_div ecpri_cc_eth_100g_fh_2_hm_ff_1_div_clk_src = {
  637. .reg = 0x8284,
  638. .shift = 0,
  639. .width = 4,
  640. .clkr.hw.init = &(const struct clk_init_data) {
  641. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_1_div_clk_src",
  642. .parent_hws = (const struct clk_hw*[]) {
  643. &ecpri_cc_eth_100g_fh2_hm_ff_clk_src.clkr.hw,
  644. },
  645. .num_parents = 1,
  646. .flags = CLK_SET_RATE_PARENT,
  647. .ops = &clk_regmap_div_ro_ops,
  648. },
  649. };
  650. static struct clk_regmap_div ecpri_cc_eth_100g_fh_2_hm_ff_2_div_clk_src = {
  651. .reg = 0x8288,
  652. .shift = 0,
  653. .width = 4,
  654. .clkr.hw.init = &(const struct clk_init_data) {
  655. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_2_div_clk_src",
  656. .parent_hws = (const struct clk_hw*[]) {
  657. &ecpri_cc_eth_100g_fh2_hm_ff_clk_src.clkr.hw,
  658. },
  659. .num_parents = 1,
  660. .flags = CLK_SET_RATE_PARENT,
  661. .ops = &clk_regmap_div_ro_ops,
  662. },
  663. };
  664. static struct clk_regmap_div ecpri_cc_eth_100g_fh_2_hm_ff_3_div_clk_src = {
  665. .reg = 0x828c,
  666. .shift = 0,
  667. .width = 4,
  668. .clkr.hw.init = &(const struct clk_init_data) {
  669. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_3_div_clk_src",
  670. .parent_hws = (const struct clk_hw*[]) {
  671. &ecpri_cc_eth_100g_fh2_hm_ff_clk_src.clkr.hw,
  672. },
  673. .num_parents = 1,
  674. .flags = CLK_SET_RATE_PARENT,
  675. .ops = &clk_regmap_div_ro_ops,
  676. },
  677. };
  678. static struct clk_branch ecpri_cc_ecpri_cg_clk = {
  679. .halt_reg = 0x900c,
  680. .halt_check = BRANCH_HALT,
  681. .clkr = {
  682. .enable_reg = 0x900c,
  683. .enable_mask = BIT(0),
  684. .hw.init = &(const struct clk_init_data) {
  685. .name = "ecpri_cc_ecpri_cg_clk",
  686. .parent_hws = (const struct clk_hw*[]) {
  687. &ecpri_cc_ecpri_clk_src.clkr.hw,
  688. },
  689. .num_parents = 1,
  690. .flags = CLK_SET_RATE_PARENT,
  691. .ops = &clk_branch2_ops,
  692. },
  693. },
  694. };
  695. static struct clk_branch ecpri_cc_ecpri_dma_clk = {
  696. .halt_reg = 0x902c,
  697. .halt_check = BRANCH_HALT,
  698. .clkr = {
  699. .enable_reg = 0x902c,
  700. .enable_mask = BIT(0),
  701. .hw.init = &(const struct clk_init_data) {
  702. .name = "ecpri_cc_ecpri_dma_clk",
  703. .parent_hws = (const struct clk_hw*[]) {
  704. &ecpri_cc_ecpri_dma_clk_src.clkr.hw,
  705. },
  706. .num_parents = 1,
  707. .flags = CLK_SET_RATE_PARENT,
  708. .ops = &clk_branch2_ops,
  709. },
  710. },
  711. };
  712. static struct clk_branch ecpri_cc_ecpri_dma_noc_clk = {
  713. .halt_reg = 0xf004,
  714. .halt_check = BRANCH_HALT,
  715. .clkr = {
  716. .enable_reg = 0xf004,
  717. .enable_mask = BIT(0),
  718. .hw.init = &(const struct clk_init_data) {
  719. .name = "ecpri_cc_ecpri_dma_noc_clk",
  720. .parent_hws = (const struct clk_hw*[]) {
  721. &ecpri_cc_ecpri_dma_clk_src.clkr.hw,
  722. },
  723. .num_parents = 1,
  724. .flags = CLK_SET_RATE_PARENT,
  725. .ops = &clk_branch2_ops,
  726. },
  727. },
  728. };
  729. static struct clk_branch ecpri_cc_ecpri_fast_clk = {
  730. .halt_reg = 0x9014,
  731. .halt_check = BRANCH_HALT,
  732. .clkr = {
  733. .enable_reg = 0x9014,
  734. .enable_mask = BIT(0),
  735. .hw.init = &(const struct clk_init_data) {
  736. .name = "ecpri_cc_ecpri_fast_clk",
  737. .parent_hws = (const struct clk_hw*[]) {
  738. &ecpri_cc_ecpri_fast_clk_src.clkr.hw,
  739. },
  740. .num_parents = 1,
  741. .flags = CLK_SET_RATE_PARENT,
  742. .ops = &clk_branch2_ops,
  743. },
  744. },
  745. };
  746. static struct clk_branch ecpri_cc_ecpri_fast_div2_clk = {
  747. .halt_reg = 0x901c,
  748. .halt_check = BRANCH_HALT,
  749. .clkr = {
  750. .enable_reg = 0x901c,
  751. .enable_mask = BIT(0),
  752. .hw.init = &(const struct clk_init_data) {
  753. .name = "ecpri_cc_ecpri_fast_div2_clk",
  754. .parent_hws = (const struct clk_hw*[]) {
  755. &ecpri_cc_ecpri_fast_div2_clk_src.clkr.hw,
  756. },
  757. .num_parents = 1,
  758. .flags = CLK_SET_RATE_PARENT,
  759. .ops = &clk_branch2_ops,
  760. },
  761. },
  762. };
  763. static struct clk_branch ecpri_cc_ecpri_fast_div2_noc_clk = {
  764. .halt_reg = 0xf008,
  765. .halt_check = BRANCH_HALT,
  766. .clkr = {
  767. .enable_reg = 0xf008,
  768. .enable_mask = BIT(0),
  769. .hw.init = &(const struct clk_init_data) {
  770. .name = "ecpri_cc_ecpri_fast_div2_noc_clk",
  771. .parent_hws = (const struct clk_hw*[]) {
  772. &ecpri_cc_ecpri_fast_div2_clk_src.clkr.hw,
  773. },
  774. .num_parents = 1,
  775. .flags = CLK_SET_RATE_PARENT,
  776. .ops = &clk_branch2_ops,
  777. },
  778. },
  779. };
  780. static struct clk_branch ecpri_cc_ecpri_fr_clk = {
  781. .halt_reg = 0x9004,
  782. .halt_check = BRANCH_HALT,
  783. .clkr = {
  784. .enable_reg = 0x9004,
  785. .enable_mask = BIT(0),
  786. .hw.init = &(const struct clk_init_data) {
  787. .name = "ecpri_cc_ecpri_fr_clk",
  788. .parent_hws = (const struct clk_hw*[]) {
  789. &ecpri_cc_ecpri_clk_src.clkr.hw,
  790. },
  791. .num_parents = 1,
  792. .flags = CLK_SET_RATE_PARENT,
  793. .ops = &clk_branch2_ops,
  794. },
  795. },
  796. };
  797. static struct clk_branch ecpri_cc_ecpri_oran_div2_clk = {
  798. .halt_reg = 0x9024,
  799. .halt_check = BRANCH_HALT,
  800. .clkr = {
  801. .enable_reg = 0x9024,
  802. .enable_mask = BIT(0),
  803. .hw.init = &(const struct clk_init_data) {
  804. .name = "ecpri_cc_ecpri_oran_div2_clk",
  805. .parent_hws = (const struct clk_hw*[]) {
  806. &ecpri_cc_ecpri_oran_clk_src.clkr.hw,
  807. },
  808. .num_parents = 1,
  809. .flags = CLK_SET_RATE_PARENT,
  810. .ops = &clk_branch2_ops,
  811. },
  812. },
  813. };
  814. static struct clk_branch ecpri_cc_eth_100g_c2c0_udp_fifo_clk = {
  815. .halt_reg = 0x80cc,
  816. .halt_check = BRANCH_HALT,
  817. .clkr = {
  818. .enable_reg = 0x80cc,
  819. .enable_mask = BIT(0),
  820. .hw.init = &(const struct clk_init_data) {
  821. .name = "ecpri_cc_eth_100g_c2c0_udp_fifo_clk",
  822. .parent_hws = (const struct clk_hw*[]) {
  823. &ecpri_cc_ecpri_clk_src.clkr.hw,
  824. },
  825. .num_parents = 1,
  826. .flags = CLK_SET_RATE_PARENT,
  827. .ops = &clk_branch2_ops,
  828. },
  829. },
  830. };
  831. static struct clk_branch ecpri_cc_eth_100g_c2c1_udp_fifo_clk = {
  832. .halt_reg = 0x80d0,
  833. .halt_check = BRANCH_HALT,
  834. .clkr = {
  835. .enable_reg = 0x80d0,
  836. .enable_mask = BIT(0),
  837. .hw.init = &(const struct clk_init_data) {
  838. .name = "ecpri_cc_eth_100g_c2c1_udp_fifo_clk",
  839. .parent_hws = (const struct clk_hw*[]) {
  840. &ecpri_cc_ecpri_clk_src.clkr.hw,
  841. },
  842. .num_parents = 1,
  843. .flags = CLK_SET_RATE_PARENT,
  844. .ops = &clk_branch2_ops,
  845. },
  846. },
  847. };
  848. static struct clk_mem_branch ecpri_cc_eth_100g_c2c_0_hm_ff_0_clk = {
  849. .mem_enable_reg = 0x8410,
  850. .mem_ack_reg = 0x8424,
  851. .mem_enable_ack_mask = BIT(0),
  852. .branch = {
  853. .halt_reg = 0x80b4,
  854. .halt_check = BRANCH_HALT,
  855. .clkr = {
  856. .enable_reg = 0x80b4,
  857. .enable_mask = BIT(0),
  858. .hw.init = &(const struct clk_init_data) {
  859. .name = "ecpri_cc_eth_100g_c2c_0_hm_ff_0_clk",
  860. .parent_hws = (const struct clk_hw*[]) {
  861. &ecpri_cc_eth_100g_c2c_hm_ff_0_div_clk_src.clkr.hw,
  862. },
  863. .num_parents = 1,
  864. .flags = CLK_SET_RATE_PARENT,
  865. .ops = &clk_branch2_mem_ops,
  866. },
  867. },
  868. },
  869. };
  870. static struct clk_mem_branch ecpri_cc_eth_100g_c2c_0_hm_ff_1_clk = {
  871. .mem_enable_reg = 0x8410,
  872. .mem_ack_reg = 0x8424,
  873. .mem_enable_ack_mask = BIT(1),
  874. .branch = {
  875. .halt_reg = 0x80bc,
  876. .halt_check = BRANCH_HALT,
  877. .clkr = {
  878. .enable_reg = 0x80bc,
  879. .enable_mask = BIT(0),
  880. .hw.init = &(const struct clk_init_data) {
  881. .name = "ecpri_cc_eth_100g_c2c_0_hm_ff_1_clk",
  882. .parent_hws = (const struct clk_hw*[]) {
  883. &ecpri_cc_eth_100g_c2c_hm_ff_1_div_clk_src.clkr.hw,
  884. },
  885. .num_parents = 1,
  886. .flags = CLK_SET_RATE_PARENT,
  887. .ops = &clk_branch2_mem_ops,
  888. },
  889. },
  890. },
  891. };
  892. static struct clk_mem_branch ecpri_cc_eth_100g_c2c_hm_macsec_clk = {
  893. .mem_enable_reg = 0x8410,
  894. .mem_ack_reg = 0x8424,
  895. .mem_enable_ack_mask = BIT(4),
  896. .branch = {
  897. .halt_reg = 0x80ac,
  898. .halt_check = BRANCH_HALT,
  899. .clkr = {
  900. .enable_reg = 0x80ac,
  901. .enable_mask = BIT(0),
  902. .hw.init = &(const struct clk_init_data) {
  903. .name = "ecpri_cc_eth_100g_c2c_hm_macsec_clk",
  904. .parent_hws = (const struct clk_hw*[]) {
  905. &ecpri_cc_eth_100g_c2c_hm_macsec_clk_src.clkr.hw,
  906. },
  907. .num_parents = 1,
  908. .flags = CLK_SET_RATE_PARENT,
  909. .ops = &clk_branch2_mem_ops,
  910. },
  911. },
  912. },
  913. };
  914. static struct clk_mem_branch ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_clk = {
  915. .mem_enable_reg = 0x8414,
  916. .mem_ack_reg = 0x8428,
  917. .mem_enable_ack_mask = BIT(0),
  918. .branch = {
  919. .halt_reg = 0x80d8,
  920. .halt_check = BRANCH_HALT,
  921. .clkr = {
  922. .enable_reg = 0x80d8,
  923. .enable_mask = BIT(0),
  924. .hw.init = &(const struct clk_init_data) {
  925. .name = "ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_clk",
  926. .parent_hws = (const struct clk_hw*[]) {
  927. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_div_clk_src.clkr.hw,
  928. },
  929. .num_parents = 1,
  930. .flags = CLK_SET_RATE_PARENT,
  931. .ops = &clk_branch2_mem_ops,
  932. },
  933. },
  934. },
  935. };
  936. static struct clk_mem_branch ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_clk = {
  937. .mem_enable_reg = 0x8414,
  938. .mem_ack_reg = 0x8428,
  939. .mem_enable_ack_mask = BIT(1),
  940. .branch = {
  941. .halt_reg = 0x80e0,
  942. .halt_check = BRANCH_HALT,
  943. .clkr = {
  944. .enable_reg = 0x80e0,
  945. .enable_mask = BIT(0),
  946. .hw.init = &(const struct clk_init_data) {
  947. .name = "ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_clk",
  948. .parent_hws = (const struct clk_hw*[]) {
  949. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_div_clk_src.clkr.hw,
  950. },
  951. .num_parents = 1,
  952. .flags = CLK_SET_RATE_PARENT,
  953. .ops = &clk_branch2_mem_ops,
  954. },
  955. },
  956. },
  957. };
  958. static struct clk_branch ecpri_cc_eth_100g_dbg_c2c_udp_fifo_clk = {
  959. .halt_reg = 0x80f0,
  960. .halt_check = BRANCH_HALT,
  961. .clkr = {
  962. .enable_reg = 0x80f0,
  963. .enable_mask = BIT(0),
  964. .hw.init = &(const struct clk_init_data) {
  965. .name = "ecpri_cc_eth_100g_dbg_c2c_udp_fifo_clk",
  966. .parent_hws = (const struct clk_hw*[]) {
  967. &ecpri_cc_ecpri_clk_src.clkr.hw,
  968. },
  969. .num_parents = 1,
  970. .flags = CLK_SET_RATE_PARENT,
  971. .ops = &clk_branch2_ops,
  972. },
  973. },
  974. };
  975. static struct clk_mem_branch ecpri_cc_eth_100g_fh_0_hm_ff_0_clk = {
  976. .mem_enable_reg = 0x8404,
  977. .mem_ack_reg = 0x8418,
  978. .mem_enable_ack_mask = BIT(0),
  979. .branch = {
  980. .halt_reg = 0x800c,
  981. .halt_check = BRANCH_HALT,
  982. .clkr = {
  983. .enable_reg = 0x800c,
  984. .enable_mask = BIT(0),
  985. .hw.init = &(const struct clk_init_data) {
  986. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_0_clk",
  987. .parent_hws = (const struct clk_hw*[]) {
  988. &ecpri_cc_eth_100g_fh_0_hm_ff_0_div_clk_src.clkr.hw,
  989. },
  990. .num_parents = 1,
  991. .flags = CLK_SET_RATE_PARENT,
  992. .ops = &clk_branch2_mem_ops,
  993. },
  994. },
  995. },
  996. };
  997. static struct clk_mem_branch ecpri_cc_eth_100g_fh_0_hm_ff_1_clk = {
  998. .mem_enable_reg = 0x8404,
  999. .mem_ack_reg = 0x8418,
  1000. .mem_enable_ack_mask = BIT(1),
  1001. .branch = {
  1002. .halt_reg = 0x8014,
  1003. .halt_check = BRANCH_HALT,
  1004. .clkr = {
  1005. .enable_reg = 0x8014,
  1006. .enable_mask = BIT(0),
  1007. .hw.init = &(const struct clk_init_data) {
  1008. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_1_clk",
  1009. .parent_hws = (const struct clk_hw*[]) {
  1010. &ecpri_cc_eth_100g_fh_0_hm_ff_1_div_clk_src.clkr.hw,
  1011. },
  1012. .num_parents = 1,
  1013. .flags = CLK_SET_RATE_PARENT,
  1014. .ops = &clk_branch2_mem_ops,
  1015. },
  1016. },
  1017. },
  1018. };
  1019. static struct clk_mem_branch ecpri_cc_eth_100g_fh_0_hm_ff_2_clk = {
  1020. .mem_enable_reg = 0x8404,
  1021. .mem_ack_reg = 0x8418,
  1022. .mem_enable_ack_mask = BIT(2),
  1023. .branch = {
  1024. .halt_reg = 0x801c,
  1025. .halt_check = BRANCH_HALT,
  1026. .clkr = {
  1027. .enable_reg = 0x801c,
  1028. .enable_mask = BIT(0),
  1029. .hw.init = &(const struct clk_init_data) {
  1030. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_2_clk",
  1031. .parent_hws = (const struct clk_hw*[]) {
  1032. &ecpri_cc_eth_100g_fh_0_hm_ff_2_div_clk_src.clkr.hw,
  1033. },
  1034. .num_parents = 1,
  1035. .flags = CLK_SET_RATE_PARENT,
  1036. .ops = &clk_branch2_mem_ops,
  1037. },
  1038. },
  1039. },
  1040. };
  1041. static struct clk_mem_branch ecpri_cc_eth_100g_fh_0_hm_ff_3_clk = {
  1042. .mem_enable_reg = 0x8404,
  1043. .mem_ack_reg = 0x8418,
  1044. .mem_enable_ack_mask = BIT(3),
  1045. .branch = {
  1046. .halt_reg = 0x8024,
  1047. .halt_check = BRANCH_HALT,
  1048. .clkr = {
  1049. .enable_reg = 0x8024,
  1050. .enable_mask = BIT(0),
  1051. .hw.init = &(const struct clk_init_data) {
  1052. .name = "ecpri_cc_eth_100g_fh_0_hm_ff_3_clk",
  1053. .parent_hws = (const struct clk_hw*[]) {
  1054. &ecpri_cc_eth_100g_fh_0_hm_ff_3_div_clk_src.clkr.hw,
  1055. },
  1056. .num_parents = 1,
  1057. .flags = CLK_SET_RATE_PARENT,
  1058. .ops = &clk_branch2_mem_ops,
  1059. },
  1060. },
  1061. },
  1062. };
  1063. static struct clk_branch ecpri_cc_eth_100g_fh_0_udp_fifo_clk = {
  1064. .halt_reg = 0x8034,
  1065. .halt_check = BRANCH_HALT,
  1066. .clkr = {
  1067. .enable_reg = 0x8034,
  1068. .enable_mask = BIT(0),
  1069. .hw.init = &(const struct clk_init_data) {
  1070. .name = "ecpri_cc_eth_100g_fh_0_udp_fifo_clk",
  1071. .parent_hws = (const struct clk_hw*[]) {
  1072. &ecpri_cc_ecpri_clk_src.clkr.hw,
  1073. },
  1074. .num_parents = 1,
  1075. .flags = CLK_SET_RATE_PARENT,
  1076. .ops = &clk_branch2_ops,
  1077. },
  1078. },
  1079. };
  1080. static struct clk_mem_branch ecpri_cc_eth_100g_fh_1_hm_ff_0_clk = {
  1081. .mem_enable_reg = 0x8408,
  1082. .mem_ack_reg = 0x841c,
  1083. .mem_enable_ack_mask = BIT(0),
  1084. .branch = {
  1085. .halt_reg = 0x8044,
  1086. .halt_check = BRANCH_HALT,
  1087. .clkr = {
  1088. .enable_reg = 0x8044,
  1089. .enable_mask = BIT(0),
  1090. .hw.init = &(const struct clk_init_data) {
  1091. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_0_clk",
  1092. .parent_hws = (const struct clk_hw*[]) {
  1093. &ecpri_cc_eth_100g_fh_1_hm_ff_0_div_clk_src.clkr.hw,
  1094. },
  1095. .num_parents = 1,
  1096. .flags = CLK_SET_RATE_PARENT,
  1097. .ops = &clk_branch2_mem_ops,
  1098. },
  1099. },
  1100. },
  1101. };
  1102. static struct clk_mem_branch ecpri_cc_eth_100g_fh_1_hm_ff_1_clk = {
  1103. .mem_enable_reg = 0x8408,
  1104. .mem_ack_reg = 0x841c,
  1105. .mem_enable_ack_mask = BIT(1),
  1106. .branch = {
  1107. .halt_reg = 0x804c,
  1108. .halt_check = BRANCH_HALT,
  1109. .clkr = {
  1110. .enable_reg = 0x804c,
  1111. .enable_mask = BIT(0),
  1112. .hw.init = &(const struct clk_init_data) {
  1113. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_1_clk",
  1114. .parent_hws = (const struct clk_hw*[]) {
  1115. &ecpri_cc_eth_100g_fh_1_hm_ff_1_div_clk_src.clkr.hw,
  1116. },
  1117. .num_parents = 1,
  1118. .flags = CLK_SET_RATE_PARENT,
  1119. .ops = &clk_branch2_mem_ops,
  1120. },
  1121. },
  1122. },
  1123. };
  1124. static struct clk_mem_branch ecpri_cc_eth_100g_fh_1_hm_ff_2_clk = {
  1125. .mem_enable_reg = 0x8408,
  1126. .mem_ack_reg = 0x841c,
  1127. .mem_enable_ack_mask = BIT(2),
  1128. .branch = {
  1129. .halt_reg = 0x8054,
  1130. .halt_check = BRANCH_HALT,
  1131. .clkr = {
  1132. .enable_reg = 0x8054,
  1133. .enable_mask = BIT(0),
  1134. .hw.init = &(const struct clk_init_data) {
  1135. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_2_clk",
  1136. .parent_hws = (const struct clk_hw*[]) {
  1137. &ecpri_cc_eth_100g_fh_1_hm_ff_2_div_clk_src.clkr.hw,
  1138. },
  1139. .num_parents = 1,
  1140. .flags = CLK_SET_RATE_PARENT,
  1141. .ops = &clk_branch2_mem_ops,
  1142. },
  1143. },
  1144. },
  1145. };
  1146. static struct clk_mem_branch ecpri_cc_eth_100g_fh_1_hm_ff_3_clk = {
  1147. .mem_enable_reg = 0x8408,
  1148. .mem_ack_reg = 0x841c,
  1149. .mem_enable_ack_mask = BIT(3),
  1150. .branch = {
  1151. .halt_reg = 0x805c,
  1152. .halt_check = BRANCH_HALT,
  1153. .clkr = {
  1154. .enable_reg = 0x805c,
  1155. .enable_mask = BIT(0),
  1156. .hw.init = &(const struct clk_init_data) {
  1157. .name = "ecpri_cc_eth_100g_fh_1_hm_ff_3_clk",
  1158. .parent_hws = (const struct clk_hw*[]) {
  1159. &ecpri_cc_eth_100g_fh_1_hm_ff_3_div_clk_src.clkr.hw,
  1160. },
  1161. .num_parents = 1,
  1162. .flags = CLK_SET_RATE_PARENT,
  1163. .ops = &clk_branch2_mem_ops,
  1164. },
  1165. },
  1166. },
  1167. };
  1168. static struct clk_branch ecpri_cc_eth_100g_fh_1_udp_fifo_clk = {
  1169. .halt_reg = 0x806c,
  1170. .halt_check = BRANCH_HALT,
  1171. .clkr = {
  1172. .enable_reg = 0x806c,
  1173. .enable_mask = BIT(0),
  1174. .hw.init = &(const struct clk_init_data) {
  1175. .name = "ecpri_cc_eth_100g_fh_1_udp_fifo_clk",
  1176. .parent_hws = (const struct clk_hw*[]) {
  1177. &ecpri_cc_ecpri_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_mem_branch ecpri_cc_eth_100g_fh_2_hm_ff_0_clk = {
  1186. .mem_enable_reg = 0x840c,
  1187. .mem_ack_reg = 0x8420,
  1188. .mem_enable_ack_mask = BIT(0),
  1189. .branch = {
  1190. .halt_reg = 0x807c,
  1191. .halt_check = BRANCH_HALT,
  1192. .clkr = {
  1193. .enable_reg = 0x807c,
  1194. .enable_mask = BIT(0),
  1195. .hw.init = &(const struct clk_init_data) {
  1196. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_0_clk",
  1197. .parent_hws = (const struct clk_hw*[]) {
  1198. &ecpri_cc_eth_100g_fh_2_hm_ff_0_div_clk_src.clkr.hw,
  1199. },
  1200. .num_parents = 1,
  1201. .flags = CLK_SET_RATE_PARENT,
  1202. .ops = &clk_branch2_mem_ops,
  1203. },
  1204. },
  1205. },
  1206. };
  1207. static struct clk_mem_branch ecpri_cc_eth_100g_fh_2_hm_ff_1_clk = {
  1208. .mem_enable_reg = 0x840c,
  1209. .mem_ack_reg = 0x8420,
  1210. .mem_enable_ack_mask = BIT(1),
  1211. .branch = {
  1212. .halt_reg = 0x8084,
  1213. .halt_check = BRANCH_HALT,
  1214. .clkr = {
  1215. .enable_reg = 0x8084,
  1216. .enable_mask = BIT(0),
  1217. .hw.init = &(const struct clk_init_data) {
  1218. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_1_clk",
  1219. .parent_hws = (const struct clk_hw*[]) {
  1220. &ecpri_cc_eth_100g_fh_2_hm_ff_1_div_clk_src.clkr.hw,
  1221. },
  1222. .num_parents = 1,
  1223. .flags = CLK_SET_RATE_PARENT,
  1224. .ops = &clk_branch2_mem_ops,
  1225. },
  1226. },
  1227. },
  1228. };
  1229. static struct clk_mem_branch ecpri_cc_eth_100g_fh_2_hm_ff_2_clk = {
  1230. .mem_enable_reg = 0x840c,
  1231. .mem_ack_reg = 0x8420,
  1232. .mem_enable_ack_mask = BIT(2),
  1233. .branch = {
  1234. .halt_reg = 0x808c,
  1235. .halt_check = BRANCH_HALT,
  1236. .clkr = {
  1237. .enable_reg = 0x808c,
  1238. .enable_mask = BIT(0),
  1239. .hw.init = &(const struct clk_init_data) {
  1240. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_2_clk",
  1241. .parent_hws = (const struct clk_hw*[]) {
  1242. &ecpri_cc_eth_100g_fh_2_hm_ff_2_div_clk_src.clkr.hw,
  1243. },
  1244. .num_parents = 1,
  1245. .flags = CLK_SET_RATE_PARENT,
  1246. .ops = &clk_branch2_mem_ops,
  1247. },
  1248. },
  1249. },
  1250. };
  1251. static struct clk_mem_branch ecpri_cc_eth_100g_fh_2_hm_ff_3_clk = {
  1252. .mem_enable_reg = 0x840c,
  1253. .mem_ack_reg = 0x8420,
  1254. .mem_enable_ack_mask = BIT(3),
  1255. .branch = {
  1256. .halt_reg = 0x8094,
  1257. .halt_check = BRANCH_HALT,
  1258. .clkr = {
  1259. .enable_reg = 0x8094,
  1260. .enable_mask = BIT(0),
  1261. .hw.init = &(const struct clk_init_data) {
  1262. .name = "ecpri_cc_eth_100g_fh_2_hm_ff_3_clk",
  1263. .parent_hws = (const struct clk_hw*[]) {
  1264. &ecpri_cc_eth_100g_fh_2_hm_ff_3_div_clk_src.clkr.hw,
  1265. },
  1266. .num_parents = 1,
  1267. .flags = CLK_SET_RATE_PARENT,
  1268. .ops = &clk_branch2_mem_ops,
  1269. },
  1270. },
  1271. },
  1272. };
  1273. static struct clk_branch ecpri_cc_eth_100g_fh_2_udp_fifo_clk = {
  1274. .halt_reg = 0x80a4,
  1275. .halt_check = BRANCH_HALT,
  1276. .clkr = {
  1277. .enable_reg = 0x80a4,
  1278. .enable_mask = BIT(0),
  1279. .hw.init = &(const struct clk_init_data) {
  1280. .name = "ecpri_cc_eth_100g_fh_2_udp_fifo_clk",
  1281. .parent_hws = (const struct clk_hw*[]) {
  1282. &ecpri_cc_ecpri_clk_src.clkr.hw,
  1283. },
  1284. .num_parents = 1,
  1285. .flags = CLK_SET_RATE_PARENT,
  1286. .ops = &clk_branch2_ops,
  1287. },
  1288. },
  1289. };
  1290. static struct clk_mem_branch ecpri_cc_eth_100g_fh_macsec_0_clk = {
  1291. .mem_enable_reg = 0x8404,
  1292. .mem_ack_reg = 0x8418,
  1293. .mem_enable_ack_mask = BIT(4),
  1294. .branch = {
  1295. .halt_reg = 0x8004,
  1296. .halt_check = BRANCH_HALT,
  1297. .clkr = {
  1298. .enable_reg = 0x8004,
  1299. .enable_mask = BIT(0),
  1300. .hw.init = &(const struct clk_init_data) {
  1301. .name = "ecpri_cc_eth_100g_fh_macsec_0_clk",
  1302. .parent_hws = (const struct clk_hw*[]) {
  1303. &ecpri_cc_eth_100g_fh0_macsec_clk_src.clkr.hw,
  1304. },
  1305. .num_parents = 1,
  1306. .flags = CLK_SET_RATE_PARENT,
  1307. .ops = &clk_branch2_mem_ops,
  1308. },
  1309. },
  1310. },
  1311. };
  1312. static struct clk_mem_branch ecpri_cc_eth_100g_fh_macsec_1_clk = {
  1313. .mem_enable_reg = 0x8408,
  1314. .mem_ack_reg = 0x841c,
  1315. .mem_enable_ack_mask = BIT(4),
  1316. .branch = {
  1317. .halt_reg = 0x803c,
  1318. .halt_check = BRANCH_HALT,
  1319. .clkr = {
  1320. .enable_reg = 0x803c,
  1321. .enable_mask = BIT(0),
  1322. .hw.init = &(const struct clk_init_data) {
  1323. .name = "ecpri_cc_eth_100g_fh_macsec_1_clk",
  1324. .parent_hws = (const struct clk_hw*[]) {
  1325. &ecpri_cc_eth_100g_fh1_macsec_clk_src.clkr.hw,
  1326. },
  1327. .num_parents = 1,
  1328. .flags = CLK_SET_RATE_PARENT,
  1329. .ops = &clk_branch2_mem_ops,
  1330. },
  1331. },
  1332. },
  1333. };
  1334. static struct clk_mem_branch ecpri_cc_eth_100g_fh_macsec_2_clk = {
  1335. .mem_enable_reg = 0x840c,
  1336. .mem_ack_reg = 0x8420,
  1337. .mem_enable_ack_mask = BIT(4),
  1338. .branch = {
  1339. .halt_reg = 0x8074,
  1340. .halt_check = BRANCH_HALT,
  1341. .clkr = {
  1342. .enable_reg = 0x8074,
  1343. .enable_mask = BIT(0),
  1344. .hw.init = &(const struct clk_init_data) {
  1345. .name = "ecpri_cc_eth_100g_fh_macsec_2_clk",
  1346. .parent_hws = (const struct clk_hw*[]) {
  1347. &ecpri_cc_eth_100g_fh2_macsec_clk_src.clkr.hw,
  1348. },
  1349. .num_parents = 1,
  1350. .flags = CLK_SET_RATE_PARENT,
  1351. .ops = &clk_branch2_mem_ops,
  1352. },
  1353. },
  1354. },
  1355. };
  1356. static struct clk_mem_branch ecpri_cc_eth_100g_mac_c2c_hm_ref_clk = {
  1357. .mem_enable_reg = 0x8410,
  1358. .mem_ack_reg = 0x8424,
  1359. .mem_enable_ack_mask = BIT(5),
  1360. .branch = {
  1361. .halt_reg = 0x80c4,
  1362. .halt_check = BRANCH_HALT,
  1363. .clkr = {
  1364. .enable_reg = 0x80c4,
  1365. .enable_mask = BIT(0),
  1366. .hw.init = &(const struct clk_init_data) {
  1367. .name = "ecpri_cc_eth_100g_mac_c2c_hm_ref_clk",
  1368. .parent_hws = (const struct clk_hw*[]) {
  1369. &ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src.clkr.hw,
  1370. },
  1371. .num_parents = 1,
  1372. .flags = CLK_SET_RATE_PARENT,
  1373. .ops = &clk_branch2_mem_ops,
  1374. },
  1375. },
  1376. },
  1377. };
  1378. static struct clk_mem_branch ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk = {
  1379. .mem_enable_reg = 0x8414,
  1380. .mem_ack_reg = 0x8428,
  1381. .mem_enable_ack_mask = BIT(5),
  1382. .branch = {
  1383. .halt_reg = 0x80e8,
  1384. .halt_check = BRANCH_HALT,
  1385. .clkr = {
  1386. .enable_reg = 0x80e8,
  1387. .enable_mask = BIT(0),
  1388. .hw.init = &(const struct clk_init_data) {
  1389. .name = "ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk",
  1390. .parent_hws = (const struct clk_hw*[]) {
  1391. &ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk_src.clkr.hw,
  1392. },
  1393. .num_parents = 1,
  1394. .flags = CLK_SET_RATE_PARENT,
  1395. .ops = &clk_branch2_mem_ops,
  1396. },
  1397. },
  1398. },
  1399. };
  1400. static struct clk_mem_branch ecpri_cc_eth_100g_mac_fh0_hm_ref_clk = {
  1401. .mem_enable_reg = 0x8404,
  1402. .mem_ack_reg = 0x8418,
  1403. .mem_enable_ack_mask = BIT(5),
  1404. .branch = {
  1405. .halt_reg = 0x802c,
  1406. .halt_check = BRANCH_HALT,
  1407. .clkr = {
  1408. .enable_reg = 0x802c,
  1409. .enable_mask = BIT(0),
  1410. .hw.init = &(const struct clk_init_data) {
  1411. .name = "ecpri_cc_eth_100g_mac_fh0_hm_ref_clk",
  1412. .parent_hws = (const struct clk_hw*[]) {
  1413. &ecpri_cc_eth_100g_mac_fh0_hm_ref_clk_src.clkr.hw,
  1414. },
  1415. .num_parents = 1,
  1416. .flags = CLK_SET_RATE_PARENT,
  1417. .ops = &clk_branch2_mem_ops,
  1418. },
  1419. },
  1420. },
  1421. };
  1422. static struct clk_mem_branch ecpri_cc_eth_100g_mac_fh1_hm_ref_clk = {
  1423. .mem_enable_reg = 0x8408,
  1424. .mem_ack_reg = 0x841c,
  1425. .mem_enable_ack_mask = BIT(5),
  1426. .branch = {
  1427. .halt_reg = 0x8064,
  1428. .halt_check = BRANCH_HALT,
  1429. .clkr = {
  1430. .enable_reg = 0x8064,
  1431. .enable_mask = BIT(0),
  1432. .hw.init = &(const struct clk_init_data) {
  1433. .name = "ecpri_cc_eth_100g_mac_fh1_hm_ref_clk",
  1434. .parent_hws = (const struct clk_hw*[]) {
  1435. &ecpri_cc_eth_100g_mac_fh1_hm_ref_clk_src.clkr.hw,
  1436. },
  1437. .num_parents = 1,
  1438. .flags = CLK_SET_RATE_PARENT,
  1439. .ops = &clk_branch2_mem_ops,
  1440. },
  1441. },
  1442. },
  1443. };
  1444. static struct clk_mem_branch ecpri_cc_eth_100g_mac_fh2_hm_ref_clk = {
  1445. .mem_enable_reg = 0x840c,
  1446. .mem_ack_reg = 0x8420,
  1447. .mem_enable_ack_mask = BIT(5),
  1448. .branch = {
  1449. .halt_reg = 0x809c,
  1450. .halt_check = BRANCH_HALT,
  1451. .clkr = {
  1452. .enable_reg = 0x809c,
  1453. .enable_mask = BIT(0),
  1454. .hw.init = &(const struct clk_init_data) {
  1455. .name = "ecpri_cc_eth_100g_mac_fh2_hm_ref_clk",
  1456. .parent_hws = (const struct clk_hw*[]) {
  1457. &ecpri_cc_eth_100g_mac_fh2_hm_ref_clk_src.clkr.hw,
  1458. },
  1459. .num_parents = 1,
  1460. .flags = CLK_SET_RATE_PARENT,
  1461. .ops = &clk_branch2_mem_ops,
  1462. },
  1463. },
  1464. },
  1465. };
  1466. static struct clk_branch ecpri_cc_eth_dbg_nfapi_axi_clk = {
  1467. .halt_reg = 0x80f4,
  1468. .halt_check = BRANCH_HALT,
  1469. .clkr = {
  1470. .enable_reg = 0x80f4,
  1471. .enable_mask = BIT(0),
  1472. .hw.init = &(const struct clk_init_data) {
  1473. .name = "ecpri_cc_eth_dbg_nfapi_axi_clk",
  1474. .parent_hws = (const struct clk_hw*[]) {
  1475. &ecpri_cc_ecpri_dma_clk_src.clkr.hw,
  1476. },
  1477. .num_parents = 1,
  1478. .flags = CLK_SET_RATE_PARENT,
  1479. .ops = &clk_branch2_ops,
  1480. },
  1481. },
  1482. };
  1483. static struct clk_branch ecpri_cc_eth_dbg_noc_axi_clk = {
  1484. .halt_reg = 0x80fc,
  1485. .halt_check = BRANCH_HALT,
  1486. .clkr = {
  1487. .enable_reg = 0x80fc,
  1488. .enable_mask = BIT(0),
  1489. .hw.init = &(const struct clk_init_data) {
  1490. .name = "ecpri_cc_eth_dbg_noc_axi_clk",
  1491. .parent_hws = (const struct clk_hw*[]) {
  1492. &ecpri_cc_mss_emac_clk_src.clkr.hw,
  1493. },
  1494. .num_parents = 1,
  1495. .flags = CLK_SET_RATE_PARENT,
  1496. .ops = &clk_branch2_ops,
  1497. },
  1498. },
  1499. };
  1500. static struct clk_mem_branch ecpri_cc_eth_phy_0_ock_sram_clk = {
  1501. .mem_enable_reg = 0x8404,
  1502. .mem_ack_reg = 0x8418,
  1503. .mem_enable_ack_mask = BIT(6),
  1504. .branch = {
  1505. .halt_reg = 0xd140,
  1506. .halt_check = BRANCH_HALT,
  1507. .clkr = {
  1508. .enable_reg = 0xd140,
  1509. .enable_mask = BIT(0),
  1510. .hw.init = &(const struct clk_init_data) {
  1511. .name = "ecpri_cc_eth_phy_0_ock_sram_clk",
  1512. .ops = &clk_branch2_mem_ops,
  1513. },
  1514. },
  1515. },
  1516. };
  1517. static struct clk_mem_branch ecpri_cc_eth_phy_1_ock_sram_clk = {
  1518. .mem_enable_reg = 0x8408,
  1519. .mem_ack_reg = 0x841C,
  1520. .mem_enable_ack_mask = BIT(6),
  1521. .branch = {
  1522. .halt_reg = 0xd148,
  1523. .halt_check = BRANCH_HALT,
  1524. .clkr = {
  1525. .enable_reg = 0xd148,
  1526. .enable_mask = BIT(0),
  1527. .hw.init = &(const struct clk_init_data) {
  1528. .name = "ecpri_cc_eth_phy_1_ock_sram_clk",
  1529. .ops = &clk_branch2_mem_ops,
  1530. },
  1531. },
  1532. },
  1533. };
  1534. static struct clk_mem_branch ecpri_cc_eth_phy_2_ock_sram_clk = {
  1535. .mem_enable_reg = 0x840c,
  1536. .mem_ack_reg = 0x8420,
  1537. .mem_enable_ack_mask = BIT(6),
  1538. .branch = {
  1539. .halt_reg = 0xd150,
  1540. .halt_check = BRANCH_HALT,
  1541. .clkr = {
  1542. .enable_reg = 0xd150,
  1543. .enable_mask = BIT(0),
  1544. .hw.init = &(const struct clk_init_data) {
  1545. .name = "ecpri_cc_eth_phy_2_ock_sram_clk",
  1546. .ops = &clk_branch2_mem_ops,
  1547. },
  1548. },
  1549. },
  1550. };
  1551. static struct clk_mem_branch ecpri_cc_eth_phy_3_ock_sram_clk = {
  1552. .mem_enable_reg = 0x8410,
  1553. .mem_ack_reg = 0x8424,
  1554. .mem_enable_ack_mask = BIT(6),
  1555. .branch = {
  1556. .halt_reg = 0xd158,
  1557. .halt_check = BRANCH_HALT,
  1558. .clkr = {
  1559. .enable_reg = 0xd158,
  1560. .enable_mask = BIT(0),
  1561. .hw.init = &(const struct clk_init_data) {
  1562. .name = "ecpri_cc_eth_phy_3_ock_sram_clk",
  1563. .ops = &clk_branch2_mem_ops,
  1564. },
  1565. },
  1566. },
  1567. };
  1568. static struct clk_mem_branch ecpri_cc_eth_phy_4_ock_sram_clk = {
  1569. .mem_enable_reg = 0x8414,
  1570. .mem_ack_reg = 0x8428,
  1571. .mem_enable_ack_mask = BIT(6),
  1572. .branch = {
  1573. .halt_reg = 0xd160,
  1574. .halt_check = BRANCH_HALT,
  1575. .clkr = {
  1576. .enable_reg = 0xd160,
  1577. .enable_mask = BIT(0),
  1578. .hw.init = &(const struct clk_init_data) {
  1579. .name = "ecpri_cc_eth_phy_4_ock_sram_clk",
  1580. .ops = &clk_branch2_mem_ops,
  1581. },
  1582. },
  1583. },
  1584. };
  1585. static struct clk_branch ecpri_cc_mss_emac_clk = {
  1586. .halt_reg = 0xe008,
  1587. .halt_check = BRANCH_HALT,
  1588. .clkr = {
  1589. .enable_reg = 0xe008,
  1590. .enable_mask = BIT(0),
  1591. .hw.init = &(const struct clk_init_data) {
  1592. .name = "ecpri_cc_mss_emac_clk",
  1593. .parent_hws = (const struct clk_hw*[]) {
  1594. &ecpri_cc_mss_emac_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 ecpri_cc_mss_oran_clk = {
  1603. .halt_reg = 0xe004,
  1604. .halt_check = BRANCH_HALT,
  1605. .clkr = {
  1606. .enable_reg = 0xe004,
  1607. .enable_mask = BIT(0),
  1608. .hw.init = &(const struct clk_init_data) {
  1609. .name = "ecpri_cc_mss_oran_clk",
  1610. .parent_hws = (const struct clk_hw*[]) {
  1611. &ecpri_cc_ecpri_oran_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 ecpri_cc_phy0_lane0_rx_clk = {
  1620. .halt_reg = 0xd000,
  1621. .halt_check = BRANCH_HALT,
  1622. .clkr = {
  1623. .enable_reg = 0xd000,
  1624. .enable_mask = BIT(0),
  1625. .hw.init = &(const struct clk_init_data) {
  1626. .name = "ecpri_cc_phy0_lane0_rx_clk",
  1627. .ops = &clk_branch2_ops,
  1628. },
  1629. },
  1630. };
  1631. static struct clk_branch ecpri_cc_phy0_lane0_tx_clk = {
  1632. .halt_reg = 0xd050,
  1633. .halt_check = BRANCH_HALT,
  1634. .clkr = {
  1635. .enable_reg = 0xd050,
  1636. .enable_mask = BIT(0),
  1637. .hw.init = &(const struct clk_init_data) {
  1638. .name = "ecpri_cc_phy0_lane0_tx_clk",
  1639. .ops = &clk_branch2_ops,
  1640. },
  1641. },
  1642. };
  1643. static struct clk_branch ecpri_cc_phy0_lane1_rx_clk = {
  1644. .halt_reg = 0xd004,
  1645. .halt_check = BRANCH_HALT,
  1646. .clkr = {
  1647. .enable_reg = 0xd004,
  1648. .enable_mask = BIT(0),
  1649. .hw.init = &(const struct clk_init_data) {
  1650. .name = "ecpri_cc_phy0_lane1_rx_clk",
  1651. .ops = &clk_branch2_ops,
  1652. },
  1653. },
  1654. };
  1655. static struct clk_branch ecpri_cc_phy0_lane1_tx_clk = {
  1656. .halt_reg = 0xd054,
  1657. .halt_check = BRANCH_HALT,
  1658. .clkr = {
  1659. .enable_reg = 0xd054,
  1660. .enable_mask = BIT(0),
  1661. .hw.init = &(const struct clk_init_data) {
  1662. .name = "ecpri_cc_phy0_lane1_tx_clk",
  1663. .ops = &clk_branch2_ops,
  1664. },
  1665. },
  1666. };
  1667. static struct clk_branch ecpri_cc_phy0_lane2_rx_clk = {
  1668. .halt_reg = 0xd008,
  1669. .halt_check = BRANCH_HALT,
  1670. .clkr = {
  1671. .enable_reg = 0xd008,
  1672. .enable_mask = BIT(0),
  1673. .hw.init = &(const struct clk_init_data) {
  1674. .name = "ecpri_cc_phy0_lane2_rx_clk",
  1675. .ops = &clk_branch2_ops,
  1676. },
  1677. },
  1678. };
  1679. static struct clk_branch ecpri_cc_phy0_lane2_tx_clk = {
  1680. .halt_reg = 0xd058,
  1681. .halt_check = BRANCH_HALT,
  1682. .clkr = {
  1683. .enable_reg = 0xd058,
  1684. .enable_mask = BIT(0),
  1685. .hw.init = &(const struct clk_init_data) {
  1686. .name = "ecpri_cc_phy0_lane2_tx_clk",
  1687. .ops = &clk_branch2_ops,
  1688. },
  1689. },
  1690. };
  1691. static struct clk_branch ecpri_cc_phy0_lane3_rx_clk = {
  1692. .halt_reg = 0xd00c,
  1693. .halt_check = BRANCH_HALT,
  1694. .clkr = {
  1695. .enable_reg = 0xd00c,
  1696. .enable_mask = BIT(0),
  1697. .hw.init = &(const struct clk_init_data) {
  1698. .name = "ecpri_cc_phy0_lane3_rx_clk",
  1699. .ops = &clk_branch2_ops,
  1700. },
  1701. },
  1702. };
  1703. static struct clk_branch ecpri_cc_phy0_lane3_tx_clk = {
  1704. .halt_reg = 0xd05c,
  1705. .halt_check = BRANCH_HALT,
  1706. .clkr = {
  1707. .enable_reg = 0xd05c,
  1708. .enable_mask = BIT(0),
  1709. .hw.init = &(const struct clk_init_data) {
  1710. .name = "ecpri_cc_phy0_lane3_tx_clk",
  1711. .ops = &clk_branch2_ops,
  1712. },
  1713. },
  1714. };
  1715. static struct clk_branch ecpri_cc_phy1_lane0_rx_clk = {
  1716. .halt_reg = 0xd010,
  1717. .halt_check = BRANCH_HALT,
  1718. .clkr = {
  1719. .enable_reg = 0xd010,
  1720. .enable_mask = BIT(0),
  1721. .hw.init = &(const struct clk_init_data) {
  1722. .name = "ecpri_cc_phy1_lane0_rx_clk",
  1723. .ops = &clk_branch2_ops,
  1724. },
  1725. },
  1726. };
  1727. static struct clk_branch ecpri_cc_phy1_lane0_tx_clk = {
  1728. .halt_reg = 0xd060,
  1729. .halt_check = BRANCH_HALT,
  1730. .clkr = {
  1731. .enable_reg = 0xd060,
  1732. .enable_mask = BIT(0),
  1733. .hw.init = &(const struct clk_init_data) {
  1734. .name = "ecpri_cc_phy1_lane0_tx_clk",
  1735. .ops = &clk_branch2_ops,
  1736. },
  1737. },
  1738. };
  1739. static struct clk_branch ecpri_cc_phy1_lane1_rx_clk = {
  1740. .halt_reg = 0xd014,
  1741. .halt_check = BRANCH_HALT,
  1742. .clkr = {
  1743. .enable_reg = 0xd014,
  1744. .enable_mask = BIT(0),
  1745. .hw.init = &(const struct clk_init_data) {
  1746. .name = "ecpri_cc_phy1_lane1_rx_clk",
  1747. .ops = &clk_branch2_ops,
  1748. },
  1749. },
  1750. };
  1751. static struct clk_branch ecpri_cc_phy1_lane1_tx_clk = {
  1752. .halt_reg = 0xd064,
  1753. .halt_check = BRANCH_HALT,
  1754. .clkr = {
  1755. .enable_reg = 0xd064,
  1756. .enable_mask = BIT(0),
  1757. .hw.init = &(const struct clk_init_data) {
  1758. .name = "ecpri_cc_phy1_lane1_tx_clk",
  1759. .ops = &clk_branch2_ops,
  1760. },
  1761. },
  1762. };
  1763. static struct clk_branch ecpri_cc_phy1_lane2_rx_clk = {
  1764. .halt_reg = 0xd018,
  1765. .halt_check = BRANCH_HALT,
  1766. .clkr = {
  1767. .enable_reg = 0xd018,
  1768. .enable_mask = BIT(0),
  1769. .hw.init = &(const struct clk_init_data) {
  1770. .name = "ecpri_cc_phy1_lane2_rx_clk",
  1771. .ops = &clk_branch2_ops,
  1772. },
  1773. },
  1774. };
  1775. static struct clk_branch ecpri_cc_phy1_lane2_tx_clk = {
  1776. .halt_reg = 0xd068,
  1777. .halt_check = BRANCH_HALT,
  1778. .clkr = {
  1779. .enable_reg = 0xd068,
  1780. .enable_mask = BIT(0),
  1781. .hw.init = &(const struct clk_init_data) {
  1782. .name = "ecpri_cc_phy1_lane2_tx_clk",
  1783. .ops = &clk_branch2_ops,
  1784. },
  1785. },
  1786. };
  1787. static struct clk_branch ecpri_cc_phy1_lane3_rx_clk = {
  1788. .halt_reg = 0xd01c,
  1789. .halt_check = BRANCH_HALT,
  1790. .clkr = {
  1791. .enable_reg = 0xd01c,
  1792. .enable_mask = BIT(0),
  1793. .hw.init = &(const struct clk_init_data) {
  1794. .name = "ecpri_cc_phy1_lane3_rx_clk",
  1795. .ops = &clk_branch2_ops,
  1796. },
  1797. },
  1798. };
  1799. static struct clk_branch ecpri_cc_phy1_lane3_tx_clk = {
  1800. .halt_reg = 0xd06c,
  1801. .halt_check = BRANCH_HALT,
  1802. .clkr = {
  1803. .enable_reg = 0xd06c,
  1804. .enable_mask = BIT(0),
  1805. .hw.init = &(const struct clk_init_data) {
  1806. .name = "ecpri_cc_phy1_lane3_tx_clk",
  1807. .ops = &clk_branch2_ops,
  1808. },
  1809. },
  1810. };
  1811. static struct clk_branch ecpri_cc_phy2_lane0_rx_clk = {
  1812. .halt_reg = 0xd020,
  1813. .halt_check = BRANCH_HALT,
  1814. .clkr = {
  1815. .enable_reg = 0xd020,
  1816. .enable_mask = BIT(0),
  1817. .hw.init = &(const struct clk_init_data) {
  1818. .name = "ecpri_cc_phy2_lane0_rx_clk",
  1819. .ops = &clk_branch2_ops,
  1820. },
  1821. },
  1822. };
  1823. static struct clk_branch ecpri_cc_phy2_lane0_tx_clk = {
  1824. .halt_reg = 0xd070,
  1825. .halt_check = BRANCH_HALT,
  1826. .clkr = {
  1827. .enable_reg = 0xd070,
  1828. .enable_mask = BIT(0),
  1829. .hw.init = &(const struct clk_init_data) {
  1830. .name = "ecpri_cc_phy2_lane0_tx_clk",
  1831. .ops = &clk_branch2_ops,
  1832. },
  1833. },
  1834. };
  1835. static struct clk_branch ecpri_cc_phy2_lane1_rx_clk = {
  1836. .halt_reg = 0xd024,
  1837. .halt_check = BRANCH_HALT,
  1838. .clkr = {
  1839. .enable_reg = 0xd024,
  1840. .enable_mask = BIT(0),
  1841. .hw.init = &(const struct clk_init_data) {
  1842. .name = "ecpri_cc_phy2_lane1_rx_clk",
  1843. .ops = &clk_branch2_ops,
  1844. },
  1845. },
  1846. };
  1847. static struct clk_branch ecpri_cc_phy2_lane1_tx_clk = {
  1848. .halt_reg = 0xd074,
  1849. .halt_check = BRANCH_HALT,
  1850. .clkr = {
  1851. .enable_reg = 0xd074,
  1852. .enable_mask = BIT(0),
  1853. .hw.init = &(const struct clk_init_data) {
  1854. .name = "ecpri_cc_phy2_lane1_tx_clk",
  1855. .ops = &clk_branch2_ops,
  1856. },
  1857. },
  1858. };
  1859. static struct clk_branch ecpri_cc_phy2_lane2_rx_clk = {
  1860. .halt_reg = 0xd028,
  1861. .halt_check = BRANCH_HALT,
  1862. .clkr = {
  1863. .enable_reg = 0xd028,
  1864. .enable_mask = BIT(0),
  1865. .hw.init = &(const struct clk_init_data) {
  1866. .name = "ecpri_cc_phy2_lane2_rx_clk",
  1867. .ops = &clk_branch2_ops,
  1868. },
  1869. },
  1870. };
  1871. static struct clk_branch ecpri_cc_phy2_lane2_tx_clk = {
  1872. .halt_reg = 0xd078,
  1873. .halt_check = BRANCH_HALT,
  1874. .clkr = {
  1875. .enable_reg = 0xd078,
  1876. .enable_mask = BIT(0),
  1877. .hw.init = &(const struct clk_init_data) {
  1878. .name = "ecpri_cc_phy2_lane2_tx_clk",
  1879. .ops = &clk_branch2_ops,
  1880. },
  1881. },
  1882. };
  1883. static struct clk_branch ecpri_cc_phy2_lane3_rx_clk = {
  1884. .halt_reg = 0xd02c,
  1885. .halt_check = BRANCH_HALT,
  1886. .clkr = {
  1887. .enable_reg = 0xd02c,
  1888. .enable_mask = BIT(0),
  1889. .hw.init = &(const struct clk_init_data) {
  1890. .name = "ecpri_cc_phy2_lane3_rx_clk",
  1891. .ops = &clk_branch2_ops,
  1892. },
  1893. },
  1894. };
  1895. static struct clk_branch ecpri_cc_phy2_lane3_tx_clk = {
  1896. .halt_reg = 0xd07c,
  1897. .halt_check = BRANCH_HALT,
  1898. .clkr = {
  1899. .enable_reg = 0xd07c,
  1900. .enable_mask = BIT(0),
  1901. .hw.init = &(const struct clk_init_data) {
  1902. .name = "ecpri_cc_phy2_lane3_tx_clk",
  1903. .ops = &clk_branch2_ops,
  1904. },
  1905. },
  1906. };
  1907. static struct clk_branch ecpri_cc_phy3_lane0_rx_clk = {
  1908. .halt_reg = 0xd030,
  1909. .halt_check = BRANCH_HALT,
  1910. .clkr = {
  1911. .enable_reg = 0xd030,
  1912. .enable_mask = BIT(0),
  1913. .hw.init = &(const struct clk_init_data) {
  1914. .name = "ecpri_cc_phy3_lane0_rx_clk",
  1915. .ops = &clk_branch2_ops,
  1916. },
  1917. },
  1918. };
  1919. static struct clk_branch ecpri_cc_phy3_lane0_tx_clk = {
  1920. .halt_reg = 0xd080,
  1921. .halt_check = BRANCH_HALT,
  1922. .clkr = {
  1923. .enable_reg = 0xd080,
  1924. .enable_mask = BIT(0),
  1925. .hw.init = &(const struct clk_init_data) {
  1926. .name = "ecpri_cc_phy3_lane0_tx_clk",
  1927. .ops = &clk_branch2_ops,
  1928. },
  1929. },
  1930. };
  1931. static struct clk_branch ecpri_cc_phy3_lane1_rx_clk = {
  1932. .halt_reg = 0xd034,
  1933. .halt_check = BRANCH_HALT,
  1934. .clkr = {
  1935. .enable_reg = 0xd034,
  1936. .enable_mask = BIT(0),
  1937. .hw.init = &(const struct clk_init_data) {
  1938. .name = "ecpri_cc_phy3_lane1_rx_clk",
  1939. .ops = &clk_branch2_ops,
  1940. },
  1941. },
  1942. };
  1943. static struct clk_branch ecpri_cc_phy3_lane1_tx_clk = {
  1944. .halt_reg = 0xd084,
  1945. .halt_check = BRANCH_HALT,
  1946. .clkr = {
  1947. .enable_reg = 0xd084,
  1948. .enable_mask = BIT(0),
  1949. .hw.init = &(const struct clk_init_data) {
  1950. .name = "ecpri_cc_phy3_lane1_tx_clk",
  1951. .ops = &clk_branch2_ops,
  1952. },
  1953. },
  1954. };
  1955. static struct clk_branch ecpri_cc_phy3_lane2_rx_clk = {
  1956. .halt_reg = 0xd038,
  1957. .halt_check = BRANCH_HALT,
  1958. .clkr = {
  1959. .enable_reg = 0xd038,
  1960. .enable_mask = BIT(0),
  1961. .hw.init = &(const struct clk_init_data) {
  1962. .name = "ecpri_cc_phy3_lane2_rx_clk",
  1963. .ops = &clk_branch2_ops,
  1964. },
  1965. },
  1966. };
  1967. static struct clk_branch ecpri_cc_phy3_lane2_tx_clk = {
  1968. .halt_reg = 0xd088,
  1969. .halt_check = BRANCH_HALT,
  1970. .clkr = {
  1971. .enable_reg = 0xd088,
  1972. .enable_mask = BIT(0),
  1973. .hw.init = &(const struct clk_init_data) {
  1974. .name = "ecpri_cc_phy3_lane2_tx_clk",
  1975. .ops = &clk_branch2_ops,
  1976. },
  1977. },
  1978. };
  1979. static struct clk_branch ecpri_cc_phy3_lane3_rx_clk = {
  1980. .halt_reg = 0xd03c,
  1981. .halt_check = BRANCH_HALT,
  1982. .clkr = {
  1983. .enable_reg = 0xd03c,
  1984. .enable_mask = BIT(0),
  1985. .hw.init = &(const struct clk_init_data) {
  1986. .name = "ecpri_cc_phy3_lane3_rx_clk",
  1987. .ops = &clk_branch2_ops,
  1988. },
  1989. },
  1990. };
  1991. static struct clk_branch ecpri_cc_phy3_lane3_tx_clk = {
  1992. .halt_reg = 0xd08c,
  1993. .halt_check = BRANCH_HALT,
  1994. .clkr = {
  1995. .enable_reg = 0xd08c,
  1996. .enable_mask = BIT(0),
  1997. .hw.init = &(const struct clk_init_data) {
  1998. .name = "ecpri_cc_phy3_lane3_tx_clk",
  1999. .ops = &clk_branch2_ops,
  2000. },
  2001. },
  2002. };
  2003. static struct clk_branch ecpri_cc_phy4_lane0_rx_clk = {
  2004. .halt_reg = 0xd040,
  2005. .halt_check = BRANCH_HALT,
  2006. .clkr = {
  2007. .enable_reg = 0xd040,
  2008. .enable_mask = BIT(0),
  2009. .hw.init = &(const struct clk_init_data) {
  2010. .name = "ecpri_cc_phy4_lane0_rx_clk",
  2011. .ops = &clk_branch2_ops,
  2012. },
  2013. },
  2014. };
  2015. static struct clk_branch ecpri_cc_phy4_lane0_tx_clk = {
  2016. .halt_reg = 0xd090,
  2017. .halt_check = BRANCH_HALT,
  2018. .clkr = {
  2019. .enable_reg = 0xd090,
  2020. .enable_mask = BIT(0),
  2021. .hw.init = &(const struct clk_init_data) {
  2022. .name = "ecpri_cc_phy4_lane0_tx_clk",
  2023. .ops = &clk_branch2_ops,
  2024. },
  2025. },
  2026. };
  2027. static struct clk_branch ecpri_cc_phy4_lane1_rx_clk = {
  2028. .halt_reg = 0xd044,
  2029. .halt_check = BRANCH_HALT,
  2030. .clkr = {
  2031. .enable_reg = 0xd044,
  2032. .enable_mask = BIT(0),
  2033. .hw.init = &(const struct clk_init_data) {
  2034. .name = "ecpri_cc_phy4_lane1_rx_clk",
  2035. .ops = &clk_branch2_ops,
  2036. },
  2037. },
  2038. };
  2039. static struct clk_branch ecpri_cc_phy4_lane1_tx_clk = {
  2040. .halt_reg = 0xd094,
  2041. .halt_check = BRANCH_HALT,
  2042. .clkr = {
  2043. .enable_reg = 0xd094,
  2044. .enable_mask = BIT(0),
  2045. .hw.init = &(const struct clk_init_data) {
  2046. .name = "ecpri_cc_phy4_lane1_tx_clk",
  2047. .ops = &clk_branch2_ops,
  2048. },
  2049. },
  2050. };
  2051. static struct clk_branch ecpri_cc_phy4_lane2_rx_clk = {
  2052. .halt_reg = 0xd048,
  2053. .halt_check = BRANCH_HALT,
  2054. .clkr = {
  2055. .enable_reg = 0xd048,
  2056. .enable_mask = BIT(0),
  2057. .hw.init = &(const struct clk_init_data) {
  2058. .name = "ecpri_cc_phy4_lane2_rx_clk",
  2059. .ops = &clk_branch2_ops,
  2060. },
  2061. },
  2062. };
  2063. static struct clk_branch ecpri_cc_phy4_lane2_tx_clk = {
  2064. .halt_reg = 0xd098,
  2065. .halt_check = BRANCH_HALT,
  2066. .clkr = {
  2067. .enable_reg = 0xd098,
  2068. .enable_mask = BIT(0),
  2069. .hw.init = &(const struct clk_init_data) {
  2070. .name = "ecpri_cc_phy4_lane2_tx_clk",
  2071. .ops = &clk_branch2_ops,
  2072. },
  2073. },
  2074. };
  2075. static struct clk_branch ecpri_cc_phy4_lane3_rx_clk = {
  2076. .halt_reg = 0xd04c,
  2077. .halt_check = BRANCH_HALT,
  2078. .clkr = {
  2079. .enable_reg = 0xd04c,
  2080. .enable_mask = BIT(0),
  2081. .hw.init = &(const struct clk_init_data) {
  2082. .name = "ecpri_cc_phy4_lane3_rx_clk",
  2083. .ops = &clk_branch2_ops,
  2084. },
  2085. },
  2086. };
  2087. static struct clk_branch ecpri_cc_phy4_lane3_tx_clk = {
  2088. .halt_reg = 0xd09c,
  2089. .halt_check = BRANCH_HALT,
  2090. .clkr = {
  2091. .enable_reg = 0xd09c,
  2092. .enable_mask = BIT(0),
  2093. .hw.init = &(const struct clk_init_data) {
  2094. .name = "ecpri_cc_phy4_lane3_tx_clk",
  2095. .ops = &clk_branch2_ops,
  2096. },
  2097. },
  2098. };
  2099. static struct clk_regmap *ecpri_cc_qdu1000_clocks[] = {
  2100. [ECPRI_CC_ECPRI_CG_CLK] = &ecpri_cc_ecpri_cg_clk.clkr,
  2101. [ECPRI_CC_ECPRI_CLK_SRC] = &ecpri_cc_ecpri_clk_src.clkr,
  2102. [ECPRI_CC_ECPRI_DMA_CLK] = &ecpri_cc_ecpri_dma_clk.clkr,
  2103. [ECPRI_CC_ECPRI_DMA_CLK_SRC] = &ecpri_cc_ecpri_dma_clk_src.clkr,
  2104. [ECPRI_CC_ECPRI_DMA_NOC_CLK] = &ecpri_cc_ecpri_dma_noc_clk.clkr,
  2105. [ECPRI_CC_ECPRI_FAST_CLK] = &ecpri_cc_ecpri_fast_clk.clkr,
  2106. [ECPRI_CC_ECPRI_FAST_CLK_SRC] = &ecpri_cc_ecpri_fast_clk_src.clkr,
  2107. [ECPRI_CC_ECPRI_FAST_DIV2_CLK] = &ecpri_cc_ecpri_fast_div2_clk.clkr,
  2108. [ECPRI_CC_ECPRI_FAST_DIV2_CLK_SRC] = &ecpri_cc_ecpri_fast_div2_clk_src.clkr,
  2109. [ECPRI_CC_ECPRI_FAST_DIV2_NOC_CLK] = &ecpri_cc_ecpri_fast_div2_noc_clk.clkr,
  2110. [ECPRI_CC_ECPRI_FR_CLK] = &ecpri_cc_ecpri_fr_clk.clkr,
  2111. [ECPRI_CC_ECPRI_ORAN_CLK_SRC] = &ecpri_cc_ecpri_oran_clk_src.clkr,
  2112. [ECPRI_CC_ECPRI_ORAN_DIV2_CLK] = &ecpri_cc_ecpri_oran_div2_clk.clkr,
  2113. [ECPRI_CC_ETH_100G_C2C0_HM_FF_CLK_SRC] = &ecpri_cc_eth_100g_c2c0_hm_ff_clk_src.clkr,
  2114. [ECPRI_CC_ETH_100G_C2C0_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_c2c0_udp_fifo_clk.clkr,
  2115. [ECPRI_CC_ETH_100G_C2C1_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_c2c1_udp_fifo_clk.clkr,
  2116. [ECPRI_CC_ETH_100G_C2C_0_HM_FF_0_CLK] = &ecpri_cc_eth_100g_c2c_0_hm_ff_0_clk.branch.clkr,
  2117. [ECPRI_CC_ETH_100G_C2C_0_HM_FF_1_CLK] = &ecpri_cc_eth_100g_c2c_0_hm_ff_1_clk.branch.clkr,
  2118. [ECPRI_CC_ETH_100G_C2C_HM_FF_0_DIV_CLK_SRC] =
  2119. &ecpri_cc_eth_100g_c2c_hm_ff_0_div_clk_src.clkr,
  2120. [ECPRI_CC_ETH_100G_C2C_HM_FF_1_DIV_CLK_SRC] =
  2121. &ecpri_cc_eth_100g_c2c_hm_ff_1_div_clk_src.clkr,
  2122. [ECPRI_CC_ETH_100G_C2C_HM_MACSEC_CLK] = &ecpri_cc_eth_100g_c2c_hm_macsec_clk.branch.clkr,
  2123. [ECPRI_CC_ETH_100G_C2C_HM_MACSEC_CLK_SRC] = &ecpri_cc_eth_100g_c2c_hm_macsec_clk_src.clkr,
  2124. [ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_0_CLK] =
  2125. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_clk.branch.clkr,
  2126. [ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_0_DIV_CLK_SRC] =
  2127. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_0_div_clk_src.clkr,
  2128. [ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_1_CLK] =
  2129. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_clk.branch.clkr,
  2130. [ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_1_DIV_CLK_SRC] =
  2131. &ecpri_cc_eth_100g_dbg_c2c_hm_ff_1_div_clk_src.clkr,
  2132. [ECPRI_CC_ETH_100G_DBG_C2C_HM_FF_CLK_SRC] = &ecpri_cc_eth_100g_dbg_c2c_hm_ff_clk_src.clkr,
  2133. [ECPRI_CC_ETH_100G_DBG_C2C_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_dbg_c2c_udp_fifo_clk.clkr,
  2134. [ECPRI_CC_ETH_100G_FH0_HM_FF_CLK_SRC] = &ecpri_cc_eth_100g_fh0_hm_ff_clk_src.clkr,
  2135. [ECPRI_CC_ETH_100G_FH0_MACSEC_CLK_SRC] = &ecpri_cc_eth_100g_fh0_macsec_clk_src.clkr,
  2136. [ECPRI_CC_ETH_100G_FH1_HM_FF_CLK_SRC] = &ecpri_cc_eth_100g_fh1_hm_ff_clk_src.clkr,
  2137. [ECPRI_CC_ETH_100G_FH1_MACSEC_CLK_SRC] = &ecpri_cc_eth_100g_fh1_macsec_clk_src.clkr,
  2138. [ECPRI_CC_ETH_100G_FH2_HM_FF_CLK_SRC] = &ecpri_cc_eth_100g_fh2_hm_ff_clk_src.clkr,
  2139. [ECPRI_CC_ETH_100G_FH2_MACSEC_CLK_SRC] = &ecpri_cc_eth_100g_fh2_macsec_clk_src.clkr,
  2140. [ECPRI_CC_ETH_100G_FH_0_HM_FF_0_CLK] = &ecpri_cc_eth_100g_fh_0_hm_ff_0_clk.branch.clkr,
  2141. [ECPRI_CC_ETH_100G_FH_0_HM_FF_0_DIV_CLK_SRC] =
  2142. &ecpri_cc_eth_100g_fh_0_hm_ff_0_div_clk_src.clkr,
  2143. [ECPRI_CC_ETH_100G_FH_0_HM_FF_1_CLK] = &ecpri_cc_eth_100g_fh_0_hm_ff_1_clk.branch.clkr,
  2144. [ECPRI_CC_ETH_100G_FH_0_HM_FF_1_DIV_CLK_SRC] =
  2145. &ecpri_cc_eth_100g_fh_0_hm_ff_1_div_clk_src.clkr,
  2146. [ECPRI_CC_ETH_100G_FH_0_HM_FF_2_CLK] = &ecpri_cc_eth_100g_fh_0_hm_ff_2_clk.branch.clkr,
  2147. [ECPRI_CC_ETH_100G_FH_0_HM_FF_2_DIV_CLK_SRC] =
  2148. &ecpri_cc_eth_100g_fh_0_hm_ff_2_div_clk_src.clkr,
  2149. [ECPRI_CC_ETH_100G_FH_0_HM_FF_3_CLK] = &ecpri_cc_eth_100g_fh_0_hm_ff_3_clk.branch.clkr,
  2150. [ECPRI_CC_ETH_100G_FH_0_HM_FF_3_DIV_CLK_SRC] =
  2151. &ecpri_cc_eth_100g_fh_0_hm_ff_3_div_clk_src.clkr,
  2152. [ECPRI_CC_ETH_100G_FH_0_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_fh_0_udp_fifo_clk.clkr,
  2153. [ECPRI_CC_ETH_100G_FH_1_HM_FF_0_CLK] = &ecpri_cc_eth_100g_fh_1_hm_ff_0_clk.branch.clkr,
  2154. [ECPRI_CC_ETH_100G_FH_1_HM_FF_0_DIV_CLK_SRC] =
  2155. &ecpri_cc_eth_100g_fh_1_hm_ff_0_div_clk_src.clkr,
  2156. [ECPRI_CC_ETH_100G_FH_1_HM_FF_1_CLK] = &ecpri_cc_eth_100g_fh_1_hm_ff_1_clk.branch.clkr,
  2157. [ECPRI_CC_ETH_100G_FH_1_HM_FF_1_DIV_CLK_SRC] =
  2158. &ecpri_cc_eth_100g_fh_1_hm_ff_1_div_clk_src.clkr,
  2159. [ECPRI_CC_ETH_100G_FH_1_HM_FF_2_CLK] = &ecpri_cc_eth_100g_fh_1_hm_ff_2_clk.branch.clkr,
  2160. [ECPRI_CC_ETH_100G_FH_1_HM_FF_2_DIV_CLK_SRC] =
  2161. &ecpri_cc_eth_100g_fh_1_hm_ff_2_div_clk_src.clkr,
  2162. [ECPRI_CC_ETH_100G_FH_1_HM_FF_3_CLK] = &ecpri_cc_eth_100g_fh_1_hm_ff_3_clk.branch.clkr,
  2163. [ECPRI_CC_ETH_100G_FH_1_HM_FF_3_DIV_CLK_SRC] =
  2164. &ecpri_cc_eth_100g_fh_1_hm_ff_3_div_clk_src.clkr,
  2165. [ECPRI_CC_ETH_100G_FH_1_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_fh_1_udp_fifo_clk.clkr,
  2166. [ECPRI_CC_ETH_100G_FH_2_HM_FF_0_CLK] = &ecpri_cc_eth_100g_fh_2_hm_ff_0_clk.branch.clkr,
  2167. [ECPRI_CC_ETH_100G_FH_2_HM_FF_0_DIV_CLK_SRC] =
  2168. &ecpri_cc_eth_100g_fh_2_hm_ff_0_div_clk_src.clkr,
  2169. [ECPRI_CC_ETH_100G_FH_2_HM_FF_1_CLK] = &ecpri_cc_eth_100g_fh_2_hm_ff_1_clk.branch.clkr,
  2170. [ECPRI_CC_ETH_100G_FH_2_HM_FF_1_DIV_CLK_SRC] =
  2171. &ecpri_cc_eth_100g_fh_2_hm_ff_1_div_clk_src.clkr,
  2172. [ECPRI_CC_ETH_100G_FH_2_HM_FF_2_CLK] = &ecpri_cc_eth_100g_fh_2_hm_ff_2_clk.branch.clkr,
  2173. [ECPRI_CC_ETH_100G_FH_2_HM_FF_2_DIV_CLK_SRC] =
  2174. &ecpri_cc_eth_100g_fh_2_hm_ff_2_div_clk_src.clkr,
  2175. [ECPRI_CC_ETH_100G_FH_2_HM_FF_3_CLK] = &ecpri_cc_eth_100g_fh_2_hm_ff_3_clk.branch.clkr,
  2176. [ECPRI_CC_ETH_100G_FH_2_HM_FF_3_DIV_CLK_SRC] =
  2177. &ecpri_cc_eth_100g_fh_2_hm_ff_3_div_clk_src.clkr,
  2178. [ECPRI_CC_ETH_100G_FH_2_UDP_FIFO_CLK] = &ecpri_cc_eth_100g_fh_2_udp_fifo_clk.clkr,
  2179. [ECPRI_CC_ETH_100G_FH_MACSEC_0_CLK] = &ecpri_cc_eth_100g_fh_macsec_0_clk.branch.clkr,
  2180. [ECPRI_CC_ETH_100G_FH_MACSEC_1_CLK] = &ecpri_cc_eth_100g_fh_macsec_1_clk.branch.clkr,
  2181. [ECPRI_CC_ETH_100G_FH_MACSEC_2_CLK] = &ecpri_cc_eth_100g_fh_macsec_2_clk.branch.clkr,
  2182. [ECPRI_CC_ETH_100G_MAC_C2C_HM_REF_CLK] = &ecpri_cc_eth_100g_mac_c2c_hm_ref_clk.branch.clkr,
  2183. [ECPRI_CC_ETH_100G_MAC_C2C_HM_REF_CLK_SRC] = &ecpri_cc_eth_100g_mac_c2c_hm_ref_clk_src.clkr,
  2184. [ECPRI_CC_ETH_100G_MAC_DBG_C2C_HM_REF_CLK] =
  2185. &ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk.branch.clkr,
  2186. [ECPRI_CC_ETH_100G_MAC_DBG_C2C_HM_REF_CLK_SRC] =
  2187. &ecpri_cc_eth_100g_mac_dbg_c2c_hm_ref_clk_src.clkr,
  2188. [ECPRI_CC_ETH_100G_MAC_FH0_HM_REF_CLK] = &ecpri_cc_eth_100g_mac_fh0_hm_ref_clk.branch.clkr,
  2189. [ECPRI_CC_ETH_100G_MAC_FH0_HM_REF_CLK_SRC] = &ecpri_cc_eth_100g_mac_fh0_hm_ref_clk_src.clkr,
  2190. [ECPRI_CC_ETH_100G_MAC_FH1_HM_REF_CLK] = &ecpri_cc_eth_100g_mac_fh1_hm_ref_clk.branch.clkr,
  2191. [ECPRI_CC_ETH_100G_MAC_FH1_HM_REF_CLK_SRC] = &ecpri_cc_eth_100g_mac_fh1_hm_ref_clk_src.clkr,
  2192. [ECPRI_CC_ETH_100G_MAC_FH2_HM_REF_CLK] = &ecpri_cc_eth_100g_mac_fh2_hm_ref_clk.branch.clkr,
  2193. [ECPRI_CC_ETH_100G_MAC_FH2_HM_REF_CLK_SRC] = &ecpri_cc_eth_100g_mac_fh2_hm_ref_clk_src.clkr,
  2194. [ECPRI_CC_ETH_DBG_NFAPI_AXI_CLK] = &ecpri_cc_eth_dbg_nfapi_axi_clk.clkr,
  2195. [ECPRI_CC_ETH_DBG_NOC_AXI_CLK] = &ecpri_cc_eth_dbg_noc_axi_clk.clkr,
  2196. [ECPRI_CC_ETH_PHY_0_OCK_SRAM_CLK] = &ecpri_cc_eth_phy_0_ock_sram_clk.branch.clkr,
  2197. [ECPRI_CC_ETH_PHY_1_OCK_SRAM_CLK] = &ecpri_cc_eth_phy_1_ock_sram_clk.branch.clkr,
  2198. [ECPRI_CC_ETH_PHY_2_OCK_SRAM_CLK] = &ecpri_cc_eth_phy_2_ock_sram_clk.branch.clkr,
  2199. [ECPRI_CC_ETH_PHY_3_OCK_SRAM_CLK] = &ecpri_cc_eth_phy_3_ock_sram_clk.branch.clkr,
  2200. [ECPRI_CC_ETH_PHY_4_OCK_SRAM_CLK] = &ecpri_cc_eth_phy_4_ock_sram_clk.branch.clkr,
  2201. [ECPRI_CC_MSS_EMAC_CLK] = &ecpri_cc_mss_emac_clk.clkr,
  2202. [ECPRI_CC_MSS_EMAC_CLK_SRC] = &ecpri_cc_mss_emac_clk_src.clkr,
  2203. [ECPRI_CC_MSS_ORAN_CLK] = &ecpri_cc_mss_oran_clk.clkr,
  2204. [ECPRI_CC_PHY0_LANE0_RX_CLK] = &ecpri_cc_phy0_lane0_rx_clk.clkr,
  2205. [ECPRI_CC_PHY0_LANE0_TX_CLK] = &ecpri_cc_phy0_lane0_tx_clk.clkr,
  2206. [ECPRI_CC_PHY0_LANE1_RX_CLK] = &ecpri_cc_phy0_lane1_rx_clk.clkr,
  2207. [ECPRI_CC_PHY0_LANE1_TX_CLK] = &ecpri_cc_phy0_lane1_tx_clk.clkr,
  2208. [ECPRI_CC_PHY0_LANE2_RX_CLK] = &ecpri_cc_phy0_lane2_rx_clk.clkr,
  2209. [ECPRI_CC_PHY0_LANE2_TX_CLK] = &ecpri_cc_phy0_lane2_tx_clk.clkr,
  2210. [ECPRI_CC_PHY0_LANE3_RX_CLK] = &ecpri_cc_phy0_lane3_rx_clk.clkr,
  2211. [ECPRI_CC_PHY0_LANE3_TX_CLK] = &ecpri_cc_phy0_lane3_tx_clk.clkr,
  2212. [ECPRI_CC_PHY1_LANE0_RX_CLK] = &ecpri_cc_phy1_lane0_rx_clk.clkr,
  2213. [ECPRI_CC_PHY1_LANE0_TX_CLK] = &ecpri_cc_phy1_lane0_tx_clk.clkr,
  2214. [ECPRI_CC_PHY1_LANE1_RX_CLK] = &ecpri_cc_phy1_lane1_rx_clk.clkr,
  2215. [ECPRI_CC_PHY1_LANE1_TX_CLK] = &ecpri_cc_phy1_lane1_tx_clk.clkr,
  2216. [ECPRI_CC_PHY1_LANE2_RX_CLK] = &ecpri_cc_phy1_lane2_rx_clk.clkr,
  2217. [ECPRI_CC_PHY1_LANE2_TX_CLK] = &ecpri_cc_phy1_lane2_tx_clk.clkr,
  2218. [ECPRI_CC_PHY1_LANE3_RX_CLK] = &ecpri_cc_phy1_lane3_rx_clk.clkr,
  2219. [ECPRI_CC_PHY1_LANE3_TX_CLK] = &ecpri_cc_phy1_lane3_tx_clk.clkr,
  2220. [ECPRI_CC_PHY2_LANE0_RX_CLK] = &ecpri_cc_phy2_lane0_rx_clk.clkr,
  2221. [ECPRI_CC_PHY2_LANE0_TX_CLK] = &ecpri_cc_phy2_lane0_tx_clk.clkr,
  2222. [ECPRI_CC_PHY2_LANE1_RX_CLK] = &ecpri_cc_phy2_lane1_rx_clk.clkr,
  2223. [ECPRI_CC_PHY2_LANE1_TX_CLK] = &ecpri_cc_phy2_lane1_tx_clk.clkr,
  2224. [ECPRI_CC_PHY2_LANE2_RX_CLK] = &ecpri_cc_phy2_lane2_rx_clk.clkr,
  2225. [ECPRI_CC_PHY2_LANE2_TX_CLK] = &ecpri_cc_phy2_lane2_tx_clk.clkr,
  2226. [ECPRI_CC_PHY2_LANE3_RX_CLK] = &ecpri_cc_phy2_lane3_rx_clk.clkr,
  2227. [ECPRI_CC_PHY2_LANE3_TX_CLK] = &ecpri_cc_phy2_lane3_tx_clk.clkr,
  2228. [ECPRI_CC_PHY3_LANE0_RX_CLK] = &ecpri_cc_phy3_lane0_rx_clk.clkr,
  2229. [ECPRI_CC_PHY3_LANE0_TX_CLK] = &ecpri_cc_phy3_lane0_tx_clk.clkr,
  2230. [ECPRI_CC_PHY3_LANE1_RX_CLK] = &ecpri_cc_phy3_lane1_rx_clk.clkr,
  2231. [ECPRI_CC_PHY3_LANE1_TX_CLK] = &ecpri_cc_phy3_lane1_tx_clk.clkr,
  2232. [ECPRI_CC_PHY3_LANE2_RX_CLK] = &ecpri_cc_phy3_lane2_rx_clk.clkr,
  2233. [ECPRI_CC_PHY3_LANE2_TX_CLK] = &ecpri_cc_phy3_lane2_tx_clk.clkr,
  2234. [ECPRI_CC_PHY3_LANE3_RX_CLK] = &ecpri_cc_phy3_lane3_rx_clk.clkr,
  2235. [ECPRI_CC_PHY3_LANE3_TX_CLK] = &ecpri_cc_phy3_lane3_tx_clk.clkr,
  2236. [ECPRI_CC_PHY4_LANE0_RX_CLK] = &ecpri_cc_phy4_lane0_rx_clk.clkr,
  2237. [ECPRI_CC_PHY4_LANE0_TX_CLK] = &ecpri_cc_phy4_lane0_tx_clk.clkr,
  2238. [ECPRI_CC_PHY4_LANE1_RX_CLK] = &ecpri_cc_phy4_lane1_rx_clk.clkr,
  2239. [ECPRI_CC_PHY4_LANE1_TX_CLK] = &ecpri_cc_phy4_lane1_tx_clk.clkr,
  2240. [ECPRI_CC_PHY4_LANE2_RX_CLK] = &ecpri_cc_phy4_lane2_rx_clk.clkr,
  2241. [ECPRI_CC_PHY4_LANE2_TX_CLK] = &ecpri_cc_phy4_lane2_tx_clk.clkr,
  2242. [ECPRI_CC_PHY4_LANE3_RX_CLK] = &ecpri_cc_phy4_lane3_rx_clk.clkr,
  2243. [ECPRI_CC_PHY4_LANE3_TX_CLK] = &ecpri_cc_phy4_lane3_tx_clk.clkr,
  2244. [ECPRI_CC_PLL0] = &ecpri_cc_pll0.clkr,
  2245. [ECPRI_CC_PLL1] = &ecpri_cc_pll1.clkr,
  2246. };
  2247. static const struct qcom_reset_map ecpri_cc_qdu1000_resets[] = {
  2248. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ECPRI_SS_BCR] = { 0x9000 },
  2249. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_C2C_BCR] = { 0x80a8 },
  2250. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH0_BCR] = { 0x8000 },
  2251. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH1_BCR] = { 0x8038 },
  2252. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_FH2_BCR] = { 0x8070 },
  2253. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_ETH_WRAPPER_TOP_BCR] = { 0x8104 },
  2254. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_MODEM_BCR] = { 0xe000 },
  2255. [ECPRI_CC_CLK_CTL_TOP_ECPRI_CC_NOC_BCR] = { 0xf000 },
  2256. };
  2257. static const struct regmap_config ecpri_cc_qdu1000_regmap_config = {
  2258. .reg_bits = 32,
  2259. .reg_stride = 4,
  2260. .val_bits = 32,
  2261. .max_register = 0x31bf0,
  2262. .fast_io = true,
  2263. };
  2264. static const struct qcom_cc_desc ecpri_cc_qdu1000_desc = {
  2265. .config = &ecpri_cc_qdu1000_regmap_config,
  2266. .clks = ecpri_cc_qdu1000_clocks,
  2267. .num_clks = ARRAY_SIZE(ecpri_cc_qdu1000_clocks),
  2268. .resets = ecpri_cc_qdu1000_resets,
  2269. .num_resets = ARRAY_SIZE(ecpri_cc_qdu1000_resets),
  2270. };
  2271. static const struct of_device_id ecpri_cc_qdu1000_match_table[] = {
  2272. { .compatible = "qcom,qdu1000-ecpricc" },
  2273. { }
  2274. };
  2275. MODULE_DEVICE_TABLE(of, ecpri_cc_qdu1000_match_table);
  2276. static int ecpri_cc_qdu1000_probe(struct platform_device *pdev)
  2277. {
  2278. struct regmap *regmap;
  2279. regmap = qcom_cc_map(pdev, &ecpri_cc_qdu1000_desc);
  2280. if (IS_ERR(regmap))
  2281. return PTR_ERR(regmap);
  2282. clk_lucid_evo_pll_configure(&ecpri_cc_pll0, regmap, &ecpri_cc_pll0_config);
  2283. clk_lucid_evo_pll_configure(&ecpri_cc_pll1, regmap, &ecpri_cc_pll1_config);
  2284. return qcom_cc_really_probe(&pdev->dev, &ecpri_cc_qdu1000_desc, regmap);
  2285. }
  2286. static struct platform_driver ecpri_cc_qdu1000_driver = {
  2287. .probe = ecpri_cc_qdu1000_probe,
  2288. .driver = {
  2289. .name = "ecpri_cc-qdu1000",
  2290. .of_match_table = ecpri_cc_qdu1000_match_table,
  2291. },
  2292. };
  2293. module_platform_driver(ecpri_cc_qdu1000_driver);
  2294. MODULE_DESCRIPTION("QTI ECPRICC QDU1000 Driver");
  2295. MODULE_LICENSE("GPL");