dispcc-sc8280xp.c 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022, Linaro Ltd.
  5. */
  6. #include <linux/clk-provider.h>
  7. #include <linux/mod_devicetable.h>
  8. #include <linux/module.h>
  9. #include <linux/platform_device.h>
  10. #include <linux/pm_clock.h>
  11. #include <linux/pm_runtime.h>
  12. #include <linux/regmap.h>
  13. #include <dt-bindings/clock/qcom,dispcc-sc8280xp.h>
  14. #include "clk-alpha-pll.h"
  15. #include "clk-branch.h"
  16. #include "clk-rcg.h"
  17. #include "clk-regmap-divider.h"
  18. #include "common.h"
  19. #include "gdsc.h"
  20. #include "reset.h"
  21. /* Need to match the order of clocks in DT binding */
  22. enum {
  23. DT_IFACE,
  24. DT_BI_TCXO,
  25. DT_SLEEP_CLK,
  26. DT_DP0_PHY_PLL_LINK_CLK,
  27. DT_DP0_PHY_PLL_VCO_DIV_CLK,
  28. DT_DP1_PHY_PLL_LINK_CLK,
  29. DT_DP1_PHY_PLL_VCO_DIV_CLK,
  30. DT_DP2_PHY_PLL_LINK_CLK,
  31. DT_DP2_PHY_PLL_VCO_DIV_CLK,
  32. DT_DP3_PHY_PLL_LINK_CLK,
  33. DT_DP3_PHY_PLL_VCO_DIV_CLK,
  34. DT_DSI0_PHY_PLL_OUT_BYTECLK,
  35. DT_DSI0_PHY_PLL_OUT_DSICLK,
  36. DT_DSI1_PHY_PLL_OUT_BYTECLK,
  37. DT_DSI1_PHY_PLL_OUT_DSICLK,
  38. };
  39. enum {
  40. P_BI_TCXO,
  41. P_DP0_PHY_PLL_LINK_CLK,
  42. P_DP0_PHY_PLL_VCO_DIV_CLK,
  43. P_DP1_PHY_PLL_LINK_CLK,
  44. P_DP1_PHY_PLL_VCO_DIV_CLK,
  45. P_DP2_PHY_PLL_LINK_CLK,
  46. P_DP2_PHY_PLL_VCO_DIV_CLK,
  47. P_DP3_PHY_PLL_LINK_CLK,
  48. P_DP3_PHY_PLL_VCO_DIV_CLK,
  49. P_DSI0_PHY_PLL_OUT_BYTECLK,
  50. P_DSI0_PHY_PLL_OUT_DSICLK,
  51. P_DSI1_PHY_PLL_OUT_BYTECLK,
  52. P_DSI1_PHY_PLL_OUT_DSICLK,
  53. P_DISPn_CC_PLL0_OUT_MAIN,
  54. P_DISPn_CC_PLL1_OUT_EVEN,
  55. P_DISPn_CC_PLL1_OUT_MAIN,
  56. P_DISPn_CC_PLL2_OUT_MAIN,
  57. P_SLEEP_CLK,
  58. };
  59. static const struct clk_parent_data parent_data_tcxo = { .index = DT_BI_TCXO };
  60. static const struct pll_vco lucid_5lpe_vco[] = {
  61. { 249600000, 1800000000, 0 },
  62. };
  63. static const struct alpha_pll_config disp_cc_pll0_config = {
  64. .l = 0x4e,
  65. .alpha = 0x2000,
  66. .config_ctl_val = 0x20485699,
  67. .config_ctl_hi_val = 0x00002261,
  68. .config_ctl_hi1_val = 0x2a9a699c,
  69. .test_ctl_val = 0x00000000,
  70. .test_ctl_hi_val = 0x00000000,
  71. .test_ctl_hi1_val = 0x01800000,
  72. .user_ctl_val = 0x00000000,
  73. .user_ctl_hi_val = 0x00000805,
  74. .user_ctl_hi1_val = 0x00000000,
  75. };
  76. static struct clk_alpha_pll disp0_cc_pll0 = {
  77. .offset = 0x0,
  78. .vco_table = lucid_5lpe_vco,
  79. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  80. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  81. .clkr = {
  82. .hw.init = &(const struct clk_init_data) {
  83. .name = "disp0_cc_pll0",
  84. .parent_data = &parent_data_tcxo,
  85. .num_parents = 1,
  86. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  87. },
  88. },
  89. };
  90. static struct clk_alpha_pll disp1_cc_pll0 = {
  91. .offset = 0x0,
  92. .vco_table = lucid_5lpe_vco,
  93. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  94. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  95. .clkr = {
  96. .hw.init = &(const struct clk_init_data) {
  97. .name = "disp1_cc_pll0",
  98. .parent_data = &parent_data_tcxo,
  99. .num_parents = 1,
  100. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  101. },
  102. },
  103. };
  104. static const struct alpha_pll_config disp_cc_pll1_config = {
  105. .l = 0x1f,
  106. .alpha = 0x4000,
  107. .config_ctl_val = 0x20485699,
  108. .config_ctl_hi_val = 0x00002261,
  109. .config_ctl_hi1_val = 0x2a9a699c,
  110. .test_ctl_val = 0x00000000,
  111. .test_ctl_hi_val = 0x00000000,
  112. .test_ctl_hi1_val = 0x01800000,
  113. .user_ctl_val = 0x00000100,
  114. .user_ctl_hi_val = 0x00000805,
  115. .user_ctl_hi1_val = 0x00000000,
  116. };
  117. static struct clk_alpha_pll disp0_cc_pll1 = {
  118. .offset = 0x1000,
  119. .vco_table = lucid_5lpe_vco,
  120. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  121. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  122. .clkr = {
  123. .hw.init = &(const struct clk_init_data) {
  124. .name = "disp0_cc_pll1",
  125. .parent_data = &parent_data_tcxo,
  126. .num_parents = 1,
  127. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  128. },
  129. },
  130. };
  131. static struct clk_alpha_pll disp1_cc_pll1 = {
  132. .offset = 0x1000,
  133. .vco_table = lucid_5lpe_vco,
  134. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  135. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  136. .clkr = {
  137. .hw.init = &(const struct clk_init_data) {
  138. .name = "disp1_cc_pll1",
  139. .parent_data = &parent_data_tcxo,
  140. .num_parents = 1,
  141. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  142. },
  143. },
  144. };
  145. static const struct clk_div_table post_div_table_disp_cc_pll1_out_even[] = {
  146. { 0x1, 2 },
  147. { }
  148. };
  149. static struct clk_alpha_pll_postdiv disp0_cc_pll1_out_even = {
  150. .offset = 0x1000,
  151. .post_div_shift = 8,
  152. .post_div_table = post_div_table_disp_cc_pll1_out_even,
  153. .num_post_div = ARRAY_SIZE(post_div_table_disp_cc_pll1_out_even),
  154. .width = 4,
  155. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  156. .clkr.hw.init = &(const struct clk_init_data) {
  157. .name = "disp0_cc_pll1_out_even",
  158. .parent_hws = (const struct clk_hw*[]){
  159. &disp0_cc_pll1.clkr.hw,
  160. },
  161. .num_parents = 1,
  162. .ops = &clk_alpha_pll_postdiv_lucid_5lpe_ops,
  163. },
  164. };
  165. static struct clk_alpha_pll_postdiv disp1_cc_pll1_out_even = {
  166. .offset = 0x1000,
  167. .post_div_shift = 8,
  168. .post_div_table = post_div_table_disp_cc_pll1_out_even,
  169. .num_post_div = ARRAY_SIZE(post_div_table_disp_cc_pll1_out_even),
  170. .width = 4,
  171. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  172. .clkr.hw.init = &(const struct clk_init_data) {
  173. .name = "disp1_cc_pll1_out_even",
  174. .parent_hws = (const struct clk_hw*[]){
  175. &disp1_cc_pll1.clkr.hw,
  176. },
  177. .num_parents = 1,
  178. .ops = &clk_alpha_pll_postdiv_lucid_5lpe_ops,
  179. },
  180. };
  181. static const struct alpha_pll_config disp_cc_pll2_config = {
  182. .l = 0x46,
  183. .alpha = 0x5000,
  184. .config_ctl_val = 0x20485699,
  185. .config_ctl_hi_val = 0x00002261,
  186. .config_ctl_hi1_val = 0x2a9a699c,
  187. .test_ctl_val = 0x00000000,
  188. .test_ctl_hi_val = 0x00000000,
  189. .test_ctl_hi1_val = 0x01800000,
  190. .user_ctl_val = 0x00000000,
  191. .user_ctl_hi_val = 0x00000805,
  192. .user_ctl_hi1_val = 0x00000000,
  193. };
  194. static struct clk_alpha_pll disp0_cc_pll2 = {
  195. .offset = 0x9000,
  196. .vco_table = lucid_5lpe_vco,
  197. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  198. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  199. .clkr = {
  200. .hw.init = &(const struct clk_init_data) {
  201. .name = "disp0_cc_pll2",
  202. .parent_data = &parent_data_tcxo,
  203. .num_parents = 1,
  204. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  205. },
  206. },
  207. };
  208. static struct clk_alpha_pll disp1_cc_pll2 = {
  209. .offset = 0x9000,
  210. .vco_table = lucid_5lpe_vco,
  211. .num_vco = ARRAY_SIZE(lucid_5lpe_vco),
  212. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID],
  213. .clkr = {
  214. .hw.init = &(const struct clk_init_data) {
  215. .name = "disp1_cc_pll2",
  216. .parent_data = &parent_data_tcxo,
  217. .num_parents = 1,
  218. .ops = &clk_alpha_pll_lucid_5lpe_ops,
  219. },
  220. },
  221. };
  222. static const struct parent_map disp_cc_parent_map_0[] = {
  223. { P_BI_TCXO, 0 },
  224. { P_DP0_PHY_PLL_LINK_CLK, 1 },
  225. { P_DP1_PHY_PLL_LINK_CLK, 2 },
  226. { P_DP2_PHY_PLL_LINK_CLK, 3 },
  227. { P_DP3_PHY_PLL_LINK_CLK, 4 },
  228. { P_DISPn_CC_PLL2_OUT_MAIN, 5 },
  229. };
  230. static const struct clk_parent_data disp0_cc_parent_data_0[] = {
  231. { .index = DT_BI_TCXO },
  232. { .index = DT_DP0_PHY_PLL_LINK_CLK },
  233. { .index = DT_DP1_PHY_PLL_LINK_CLK },
  234. { .index = DT_DP2_PHY_PLL_LINK_CLK },
  235. { .index = DT_DP3_PHY_PLL_LINK_CLK },
  236. { .hw = &disp0_cc_pll2.clkr.hw },
  237. };
  238. static const struct clk_parent_data disp1_cc_parent_data_0[] = {
  239. { .index = DT_BI_TCXO },
  240. { .index = DT_DP0_PHY_PLL_LINK_CLK },
  241. { .index = DT_DP1_PHY_PLL_LINK_CLK },
  242. { .index = DT_DP2_PHY_PLL_LINK_CLK },
  243. { .index = DT_DP3_PHY_PLL_LINK_CLK },
  244. { .hw = &disp1_cc_pll2.clkr.hw },
  245. };
  246. static const struct parent_map disp_cc_parent_map_1[] = {
  247. { P_BI_TCXO, 0 },
  248. { P_DP0_PHY_PLL_LINK_CLK, 1 },
  249. { P_DP0_PHY_PLL_VCO_DIV_CLK, 2 },
  250. { P_DP3_PHY_PLL_VCO_DIV_CLK, 3 },
  251. { P_DP1_PHY_PLL_VCO_DIV_CLK, 4 },
  252. { P_DISPn_CC_PLL2_OUT_MAIN, 5 },
  253. { P_DP2_PHY_PLL_VCO_DIV_CLK, 6 },
  254. };
  255. static const struct clk_parent_data disp0_cc_parent_data_1[] = {
  256. { .index = DT_BI_TCXO },
  257. { .index = DT_DP0_PHY_PLL_LINK_CLK },
  258. { .index = DT_DP0_PHY_PLL_VCO_DIV_CLK },
  259. { .index = DT_DP3_PHY_PLL_VCO_DIV_CLK },
  260. { .index = DT_DP1_PHY_PLL_VCO_DIV_CLK },
  261. { .hw = &disp0_cc_pll2.clkr.hw },
  262. { .index = DT_DP2_PHY_PLL_VCO_DIV_CLK },
  263. };
  264. static const struct clk_parent_data disp1_cc_parent_data_1[] = {
  265. { .index = DT_BI_TCXO },
  266. { .index = DT_DP0_PHY_PLL_LINK_CLK },
  267. { .index = DT_DP0_PHY_PLL_VCO_DIV_CLK },
  268. { .index = DT_DP3_PHY_PLL_VCO_DIV_CLK },
  269. { .index = DT_DP1_PHY_PLL_VCO_DIV_CLK },
  270. { .hw = &disp1_cc_pll2.clkr.hw },
  271. { .index = DT_DP2_PHY_PLL_VCO_DIV_CLK },
  272. };
  273. static const struct parent_map disp_cc_parent_map_2[] = {
  274. { P_BI_TCXO, 0 },
  275. };
  276. static const struct clk_parent_data disp_cc_parent_data_2[] = {
  277. { .index = DT_BI_TCXO },
  278. };
  279. static const struct parent_map disp_cc_parent_map_3[] = {
  280. { P_BI_TCXO, 0 },
  281. { P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
  282. { P_DSI0_PHY_PLL_OUT_BYTECLK, 2 },
  283. { P_DSI1_PHY_PLL_OUT_DSICLK, 3 },
  284. { P_DSI1_PHY_PLL_OUT_BYTECLK, 4 },
  285. };
  286. static const struct clk_parent_data disp_cc_parent_data_3[] = {
  287. { .index = DT_BI_TCXO },
  288. { .index = DT_DSI0_PHY_PLL_OUT_DSICLK },
  289. { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK },
  290. { .index = DT_DSI1_PHY_PLL_OUT_DSICLK },
  291. { .index = DT_DSI1_PHY_PLL_OUT_BYTECLK },
  292. };
  293. static const struct parent_map disp_cc_parent_map_4[] = {
  294. { P_BI_TCXO, 0 },
  295. { P_DSI0_PHY_PLL_OUT_BYTECLK, 2 },
  296. { P_DSI1_PHY_PLL_OUT_BYTECLK, 4 },
  297. };
  298. static const struct clk_parent_data disp_cc_parent_data_4[] = {
  299. { .index = DT_BI_TCXO },
  300. { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK },
  301. { .index = DT_DSI1_PHY_PLL_OUT_BYTECLK },
  302. };
  303. static const struct parent_map disp_cc_parent_map_5[] = {
  304. { P_BI_TCXO, 0 },
  305. { P_DISPn_CC_PLL0_OUT_MAIN, 1 },
  306. { P_DISPn_CC_PLL1_OUT_MAIN, 4 },
  307. { P_DISPn_CC_PLL2_OUT_MAIN, 5 },
  308. { P_DISPn_CC_PLL1_OUT_EVEN, 6 },
  309. };
  310. static const struct clk_parent_data disp0_cc_parent_data_5[] = {
  311. { .index = DT_BI_TCXO },
  312. { .hw = &disp0_cc_pll0.clkr.hw },
  313. { .hw = &disp0_cc_pll1.clkr.hw },
  314. { .hw = &disp0_cc_pll2.clkr.hw },
  315. { .hw = &disp0_cc_pll1_out_even.clkr.hw },
  316. };
  317. static const struct clk_parent_data disp1_cc_parent_data_5[] = {
  318. { .index = DT_BI_TCXO },
  319. { .hw = &disp1_cc_pll0.clkr.hw },
  320. { .hw = &disp1_cc_pll1.clkr.hw },
  321. { .hw = &disp1_cc_pll2.clkr.hw },
  322. { .hw = &disp1_cc_pll1_out_even.clkr.hw },
  323. };
  324. static const struct parent_map disp_cc_parent_map_6[] = {
  325. { P_BI_TCXO, 0 },
  326. { P_DISPn_CC_PLL1_OUT_MAIN, 4 },
  327. { P_DISPn_CC_PLL1_OUT_EVEN, 6 },
  328. };
  329. static const struct clk_parent_data disp0_cc_parent_data_6[] = {
  330. { .index = DT_BI_TCXO },
  331. { .hw = &disp0_cc_pll1.clkr.hw },
  332. { .hw = &disp0_cc_pll1_out_even.clkr.hw },
  333. };
  334. static const struct clk_parent_data disp1_cc_parent_data_6[] = {
  335. { .index = DT_BI_TCXO },
  336. { .hw = &disp1_cc_pll1.clkr.hw },
  337. { .hw = &disp1_cc_pll1_out_even.clkr.hw },
  338. };
  339. static const struct parent_map disp_cc_parent_map_7[] = {
  340. { P_SLEEP_CLK, 0 },
  341. };
  342. static const struct clk_parent_data disp_cc_parent_data_7[] = {
  343. { .index = DT_SLEEP_CLK },
  344. };
  345. static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
  346. F(19200000, P_BI_TCXO, 1, 0, 0),
  347. F(37500000, P_DISPn_CC_PLL1_OUT_EVEN, 8, 0, 0),
  348. F(75000000, P_DISPn_CC_PLL1_OUT_MAIN, 8, 0, 0),
  349. { }
  350. };
  351. static struct clk_rcg2 disp0_cc_mdss_ahb_clk_src = {
  352. .cmd_rcgr = 0x2364,
  353. .mnd_width = 0,
  354. .hid_width = 5,
  355. .parent_map = disp_cc_parent_map_6,
  356. .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src,
  357. .clkr.hw.init = &(const struct clk_init_data) {
  358. .name = "disp0_cc_mdss_ahb_clk_src",
  359. .parent_data = disp0_cc_parent_data_6,
  360. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_6),
  361. .ops = &clk_rcg2_shared_ops,
  362. },
  363. };
  364. static struct clk_rcg2 disp1_cc_mdss_ahb_clk_src = {
  365. .cmd_rcgr = 0x2364,
  366. .mnd_width = 0,
  367. .hid_width = 5,
  368. .parent_map = disp_cc_parent_map_6,
  369. .freq_tbl = ftbl_disp_cc_mdss_ahb_clk_src,
  370. .clkr.hw.init = &(const struct clk_init_data) {
  371. .name = "disp1_cc_mdss_ahb_clk_src",
  372. .parent_data = disp1_cc_parent_data_6,
  373. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_6),
  374. .ops = &clk_rcg2_shared_ops,
  375. },
  376. };
  377. static const struct freq_tbl ftbl_disp_cc_mdss_byte0_clk_src[] = {
  378. F(19200000, P_BI_TCXO, 1, 0, 0),
  379. { }
  380. };
  381. static struct clk_rcg2 disp0_cc_mdss_byte0_clk_src = {
  382. .cmd_rcgr = 0x213c,
  383. .mnd_width = 0,
  384. .hid_width = 5,
  385. .parent_map = disp_cc_parent_map_3,
  386. .clkr.hw.init = &(const struct clk_init_data) {
  387. .name = "disp0_cc_mdss_byte0_clk_src",
  388. .parent_data = disp_cc_parent_data_3,
  389. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  390. .flags = CLK_SET_RATE_PARENT,
  391. .ops = &clk_byte2_ops,
  392. },
  393. };
  394. static struct clk_rcg2 disp1_cc_mdss_byte0_clk_src = {
  395. .cmd_rcgr = 0x213c,
  396. .mnd_width = 0,
  397. .hid_width = 5,
  398. .parent_map = disp_cc_parent_map_3,
  399. .clkr.hw.init = &(const struct clk_init_data) {
  400. .name = "disp1_cc_mdss_byte0_clk_src",
  401. .parent_data = disp_cc_parent_data_3,
  402. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  403. .flags = CLK_SET_RATE_PARENT,
  404. .ops = &clk_byte2_ops,
  405. },
  406. };
  407. static struct clk_rcg2 disp0_cc_mdss_byte1_clk_src = {
  408. .cmd_rcgr = 0x2158,
  409. .mnd_width = 0,
  410. .hid_width = 5,
  411. .parent_map = disp_cc_parent_map_3,
  412. .clkr.hw.init = &(const struct clk_init_data) {
  413. .name = "disp0_cc_mdss_byte1_clk_src",
  414. .parent_data = disp_cc_parent_data_3,
  415. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  416. .flags = CLK_SET_RATE_PARENT,
  417. .ops = &clk_byte2_ops,
  418. },
  419. };
  420. static struct clk_rcg2 disp1_cc_mdss_byte1_clk_src = {
  421. .cmd_rcgr = 0x2158,
  422. .mnd_width = 0,
  423. .hid_width = 5,
  424. .parent_map = disp_cc_parent_map_3,
  425. .clkr.hw.init = &(const struct clk_init_data) {
  426. .name = "disp1_cc_mdss_byte1_clk_src",
  427. .parent_data = disp_cc_parent_data_3,
  428. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  429. .flags = CLK_SET_RATE_PARENT,
  430. .ops = &clk_byte2_ops,
  431. },
  432. };
  433. static struct clk_rcg2 disp0_cc_mdss_dptx0_aux_clk_src = {
  434. .cmd_rcgr = 0x2238,
  435. .mnd_width = 0,
  436. .hid_width = 5,
  437. .parent_map = disp_cc_parent_map_2,
  438. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  439. .clkr.hw.init = &(const struct clk_init_data) {
  440. .name = "disp0_cc_mdss_dptx0_aux_clk_src",
  441. .parent_data = disp_cc_parent_data_2,
  442. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  443. .ops = &clk_rcg2_ops,
  444. },
  445. };
  446. static struct clk_rcg2 disp1_cc_mdss_dptx0_aux_clk_src = {
  447. .cmd_rcgr = 0x2238,
  448. .mnd_width = 0,
  449. .hid_width = 5,
  450. .parent_map = disp_cc_parent_map_2,
  451. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  452. .clkr.hw.init = &(const struct clk_init_data) {
  453. .name = "disp1_cc_mdss_dptx0_aux_clk_src",
  454. .parent_data = disp_cc_parent_data_2,
  455. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  456. .ops = &clk_rcg2_ops,
  457. },
  458. };
  459. static struct clk_rcg2 disp0_cc_mdss_dptx0_link_clk_src = {
  460. .cmd_rcgr = 0x21a4,
  461. .mnd_width = 0,
  462. .hid_width = 5,
  463. .parent_map = disp_cc_parent_map_0,
  464. .clkr.hw.init = &(const struct clk_init_data) {
  465. .name = "disp0_cc_mdss_dptx0_link_clk_src",
  466. .parent_data = disp0_cc_parent_data_0,
  467. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_0),
  468. .flags = CLK_SET_RATE_PARENT,
  469. .ops = &clk_byte2_ops,
  470. },
  471. };
  472. static struct clk_rcg2 disp1_cc_mdss_dptx0_link_clk_src = {
  473. .cmd_rcgr = 0x21a4,
  474. .mnd_width = 0,
  475. .hid_width = 5,
  476. .parent_map = disp_cc_parent_map_0,
  477. .clkr.hw.init = &(const struct clk_init_data) {
  478. .name = "disp1_cc_mdss_dptx0_link_clk_src",
  479. .parent_data = disp1_cc_parent_data_0,
  480. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_0),
  481. .flags = CLK_SET_RATE_PARENT,
  482. .ops = &clk_byte2_ops,
  483. },
  484. };
  485. static struct clk_rcg2 disp0_cc_mdss_dptx0_pixel0_clk_src = {
  486. .cmd_rcgr = 0x21d8,
  487. .mnd_width = 16,
  488. .hid_width = 5,
  489. .parent_map = disp_cc_parent_map_1,
  490. .clkr.hw.init = &(const struct clk_init_data) {
  491. .name = "disp0_cc_mdss_dptx0_pixel0_clk_src",
  492. .parent_data = disp0_cc_parent_data_1,
  493. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  494. .flags = CLK_SET_RATE_PARENT,
  495. .ops = &clk_dp_ops,
  496. },
  497. };
  498. static struct clk_rcg2 disp1_cc_mdss_dptx0_pixel0_clk_src = {
  499. .cmd_rcgr = 0x21d8,
  500. .mnd_width = 16,
  501. .hid_width = 5,
  502. .parent_map = disp_cc_parent_map_1,
  503. .clkr.hw.init = &(const struct clk_init_data) {
  504. .name = "disp1_cc_mdss_dptx0_pixel0_clk_src",
  505. .parent_data = disp1_cc_parent_data_1,
  506. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  507. .flags = CLK_SET_RATE_PARENT,
  508. .ops = &clk_dp_ops,
  509. },
  510. };
  511. static struct clk_rcg2 disp0_cc_mdss_dptx0_pixel1_clk_src = {
  512. .cmd_rcgr = 0x21f0,
  513. .mnd_width = 16,
  514. .hid_width = 5,
  515. .parent_map = disp_cc_parent_map_1,
  516. .clkr.hw.init = &(const struct clk_init_data) {
  517. .name = "disp0_cc_mdss_dptx0_pixel1_clk_src",
  518. .parent_data = disp0_cc_parent_data_1,
  519. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  520. .flags = CLK_SET_RATE_PARENT,
  521. .ops = &clk_dp_ops,
  522. },
  523. };
  524. static struct clk_rcg2 disp1_cc_mdss_dptx0_pixel1_clk_src = {
  525. .cmd_rcgr = 0x21f0,
  526. .mnd_width = 16,
  527. .hid_width = 5,
  528. .parent_map = disp_cc_parent_map_1,
  529. .clkr.hw.init = &(const struct clk_init_data) {
  530. .name = "disp1_cc_mdss_dptx0_pixel1_clk_src",
  531. .parent_data = disp1_cc_parent_data_1,
  532. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  533. .flags = CLK_SET_RATE_PARENT,
  534. .ops = &clk_dp_ops,
  535. },
  536. };
  537. static struct clk_rcg2 disp0_cc_mdss_dptx1_aux_clk_src = {
  538. .cmd_rcgr = 0x22d0,
  539. .mnd_width = 0,
  540. .hid_width = 5,
  541. .parent_map = disp_cc_parent_map_2,
  542. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  543. .clkr.hw.init = &(const struct clk_init_data) {
  544. .name = "disp0_cc_mdss_dptx1_aux_clk_src",
  545. .parent_data = disp_cc_parent_data_2,
  546. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  547. .ops = &clk_rcg2_ops,
  548. },
  549. };
  550. static struct clk_rcg2 disp1_cc_mdss_dptx1_aux_clk_src = {
  551. .cmd_rcgr = 0x22d0,
  552. .mnd_width = 0,
  553. .hid_width = 5,
  554. .parent_map = disp_cc_parent_map_2,
  555. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  556. .clkr.hw.init = &(const struct clk_init_data) {
  557. .name = "disp1_cc_mdss_dptx1_aux_clk_src",
  558. .parent_data = disp_cc_parent_data_2,
  559. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  560. .ops = &clk_rcg2_ops,
  561. },
  562. };
  563. static struct clk_rcg2 disp0_cc_mdss_dptx1_link_clk_src = {
  564. .cmd_rcgr = 0x2268,
  565. .mnd_width = 0,
  566. .hid_width = 5,
  567. .parent_map = disp_cc_parent_map_0,
  568. .clkr.hw.init = &(const struct clk_init_data) {
  569. .name = "disp0_cc_mdss_dptx1_link_clk_src",
  570. .parent_data = disp0_cc_parent_data_0,
  571. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_0),
  572. .flags = CLK_SET_RATE_PARENT,
  573. .ops = &clk_byte2_ops,
  574. },
  575. };
  576. static struct clk_rcg2 disp1_cc_mdss_dptx1_link_clk_src = {
  577. .cmd_rcgr = 0x2268,
  578. .mnd_width = 0,
  579. .hid_width = 5,
  580. .parent_map = disp_cc_parent_map_0,
  581. .clkr.hw.init = &(const struct clk_init_data) {
  582. .name = "disp1_cc_mdss_dptx1_link_clk_src",
  583. .parent_data = disp1_cc_parent_data_0,
  584. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_0),
  585. .flags = CLK_SET_RATE_PARENT,
  586. .ops = &clk_byte2_ops,
  587. },
  588. };
  589. static struct clk_rcg2 disp0_cc_mdss_dptx1_pixel0_clk_src = {
  590. .cmd_rcgr = 0x2250,
  591. .mnd_width = 16,
  592. .hid_width = 5,
  593. .parent_map = disp_cc_parent_map_1,
  594. .clkr.hw.init = &(const struct clk_init_data) {
  595. .name = "disp0_cc_mdss_dptx1_pixel0_clk_src",
  596. .parent_data = disp0_cc_parent_data_1,
  597. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  598. .flags = CLK_SET_RATE_PARENT,
  599. .ops = &clk_dp_ops,
  600. },
  601. };
  602. static struct clk_rcg2 disp1_cc_mdss_dptx1_pixel0_clk_src = {
  603. .cmd_rcgr = 0x2250,
  604. .mnd_width = 16,
  605. .hid_width = 5,
  606. .parent_map = disp_cc_parent_map_1,
  607. .clkr.hw.init = &(const struct clk_init_data) {
  608. .name = "disp1_cc_mdss_dptx1_pixel0_clk_src",
  609. .parent_data = disp1_cc_parent_data_1,
  610. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  611. .flags = CLK_SET_RATE_PARENT,
  612. .ops = &clk_dp_ops,
  613. },
  614. };
  615. static struct clk_rcg2 disp0_cc_mdss_dptx1_pixel1_clk_src = {
  616. .cmd_rcgr = 0x2370,
  617. .mnd_width = 16,
  618. .hid_width = 5,
  619. .parent_map = disp_cc_parent_map_1,
  620. .clkr.hw.init = &(const struct clk_init_data) {
  621. .name = "disp0_cc_mdss_dptx1_pixel1_clk_src",
  622. .parent_data = disp0_cc_parent_data_1,
  623. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  624. .flags = CLK_SET_RATE_PARENT,
  625. .ops = &clk_dp_ops,
  626. },
  627. };
  628. static struct clk_rcg2 disp1_cc_mdss_dptx1_pixel1_clk_src = {
  629. .cmd_rcgr = 0x2370,
  630. .mnd_width = 16,
  631. .hid_width = 5,
  632. .parent_map = disp_cc_parent_map_1,
  633. .clkr.hw.init = &(const struct clk_init_data) {
  634. .name = "disp1_cc_mdss_dptx1_pixel1_clk_src",
  635. .parent_data = disp1_cc_parent_data_1,
  636. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  637. .flags = CLK_SET_RATE_PARENT,
  638. .ops = &clk_dp_ops,
  639. },
  640. };
  641. static struct clk_rcg2 disp0_cc_mdss_dptx2_aux_clk_src = {
  642. .cmd_rcgr = 0x22e8,
  643. .mnd_width = 0,
  644. .hid_width = 5,
  645. .parent_map = disp_cc_parent_map_2,
  646. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  647. .clkr.hw.init = &(const struct clk_init_data) {
  648. .name = "disp0_cc_mdss_dptx2_aux_clk_src",
  649. .parent_data = disp_cc_parent_data_2,
  650. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  651. .ops = &clk_rcg2_ops,
  652. },
  653. };
  654. static struct clk_rcg2 disp1_cc_mdss_dptx2_aux_clk_src = {
  655. .cmd_rcgr = 0x22e8,
  656. .mnd_width = 0,
  657. .hid_width = 5,
  658. .parent_map = disp_cc_parent_map_2,
  659. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  660. .clkr.hw.init = &(const struct clk_init_data) {
  661. .name = "disp1_cc_mdss_dptx2_aux_clk_src",
  662. .parent_data = disp_cc_parent_data_2,
  663. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  664. .ops = &clk_rcg2_ops,
  665. },
  666. };
  667. static struct clk_rcg2 disp0_cc_mdss_dptx2_link_clk_src = {
  668. .cmd_rcgr = 0x2284,
  669. .mnd_width = 0,
  670. .hid_width = 5,
  671. .parent_map = disp_cc_parent_map_0,
  672. .clkr.hw.init = &(const struct clk_init_data) {
  673. .name = "disp0_cc_mdss_dptx2_link_clk_src",
  674. .parent_data = disp0_cc_parent_data_0,
  675. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_0),
  676. .flags = CLK_SET_RATE_PARENT,
  677. .ops = &clk_byte2_ops,
  678. },
  679. };
  680. static struct clk_rcg2 disp1_cc_mdss_dptx2_link_clk_src = {
  681. .cmd_rcgr = 0x2284,
  682. .mnd_width = 0,
  683. .hid_width = 5,
  684. .parent_map = disp_cc_parent_map_0,
  685. .clkr.hw.init = &(const struct clk_init_data) {
  686. .name = "disp1_cc_mdss_dptx2_link_clk_src",
  687. .parent_data = disp1_cc_parent_data_0,
  688. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_0),
  689. .flags = CLK_SET_RATE_PARENT,
  690. .ops = &clk_byte2_ops,
  691. },
  692. };
  693. static struct clk_rcg2 disp0_cc_mdss_dptx2_pixel0_clk_src = {
  694. .cmd_rcgr = 0x2208,
  695. .mnd_width = 16,
  696. .hid_width = 5,
  697. .parent_map = disp_cc_parent_map_1,
  698. .clkr.hw.init = &(const struct clk_init_data) {
  699. .name = "disp0_cc_mdss_dptx2_pixel0_clk_src",
  700. .parent_data = disp0_cc_parent_data_1,
  701. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  702. .flags = CLK_SET_RATE_PARENT,
  703. .ops = &clk_dp_ops,
  704. },
  705. };
  706. static struct clk_rcg2 disp1_cc_mdss_dptx2_pixel0_clk_src = {
  707. .cmd_rcgr = 0x2208,
  708. .mnd_width = 16,
  709. .hid_width = 5,
  710. .parent_map = disp_cc_parent_map_1,
  711. .clkr.hw.init = &(const struct clk_init_data) {
  712. .name = "disp1_cc_mdss_dptx2_pixel0_clk_src",
  713. .parent_data = disp1_cc_parent_data_1,
  714. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  715. .flags = CLK_SET_RATE_PARENT,
  716. .ops = &clk_dp_ops,
  717. },
  718. };
  719. static struct clk_rcg2 disp0_cc_mdss_dptx2_pixel1_clk_src = {
  720. .cmd_rcgr = 0x2220,
  721. .mnd_width = 16,
  722. .hid_width = 5,
  723. .parent_map = disp_cc_parent_map_1,
  724. .clkr.hw.init = &(const struct clk_init_data) {
  725. .name = "disp0_cc_mdss_dptx2_pixel1_clk_src",
  726. .parent_data = disp0_cc_parent_data_1,
  727. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  728. .flags = CLK_SET_RATE_PARENT,
  729. .ops = &clk_dp_ops,
  730. },
  731. };
  732. static struct clk_rcg2 disp1_cc_mdss_dptx2_pixel1_clk_src = {
  733. .cmd_rcgr = 0x2220,
  734. .mnd_width = 16,
  735. .hid_width = 5,
  736. .parent_map = disp_cc_parent_map_1,
  737. .clkr.hw.init = &(const struct clk_init_data) {
  738. .name = "disp1_cc_mdss_dptx2_pixel1_clk_src",
  739. .parent_data = disp1_cc_parent_data_1,
  740. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  741. .flags = CLK_SET_RATE_PARENT,
  742. .ops = &clk_dp_ops,
  743. },
  744. };
  745. static struct clk_rcg2 disp0_cc_mdss_dptx3_aux_clk_src = {
  746. .cmd_rcgr = 0x234c,
  747. .mnd_width = 0,
  748. .hid_width = 5,
  749. .parent_map = disp_cc_parent_map_2,
  750. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  751. .clkr.hw.init = &(const struct clk_init_data) {
  752. .name = "disp0_cc_mdss_dptx3_aux_clk_src",
  753. .parent_data = disp_cc_parent_data_2,
  754. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  755. .ops = &clk_rcg2_ops,
  756. },
  757. };
  758. static struct clk_rcg2 disp1_cc_mdss_dptx3_aux_clk_src = {
  759. .cmd_rcgr = 0x234c,
  760. .mnd_width = 0,
  761. .hid_width = 5,
  762. .parent_map = disp_cc_parent_map_2,
  763. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  764. .clkr.hw.init = &(const struct clk_init_data) {
  765. .name = "disp1_cc_mdss_dptx3_aux_clk_src",
  766. .parent_data = disp_cc_parent_data_2,
  767. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  768. .ops = &clk_rcg2_ops,
  769. },
  770. };
  771. static struct clk_rcg2 disp0_cc_mdss_dptx3_link_clk_src = {
  772. .cmd_rcgr = 0x2318,
  773. .mnd_width = 0,
  774. .hid_width = 5,
  775. .parent_map = disp_cc_parent_map_0,
  776. .clkr.hw.init = &(const struct clk_init_data) {
  777. .name = "disp0_cc_mdss_dptx3_link_clk_src",
  778. .parent_data = disp0_cc_parent_data_0,
  779. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_0),
  780. .flags = CLK_SET_RATE_PARENT,
  781. .ops = &clk_byte2_ops,
  782. },
  783. };
  784. static struct clk_rcg2 disp1_cc_mdss_dptx3_link_clk_src = {
  785. .cmd_rcgr = 0x2318,
  786. .mnd_width = 0,
  787. .hid_width = 5,
  788. .parent_map = disp_cc_parent_map_0,
  789. .clkr.hw.init = &(const struct clk_init_data) {
  790. .name = "disp1_cc_mdss_dptx3_link_clk_src",
  791. .parent_data = disp1_cc_parent_data_0,
  792. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_0),
  793. .flags = CLK_SET_RATE_PARENT,
  794. .ops = &clk_byte2_ops,
  795. },
  796. };
  797. static struct clk_rcg2 disp0_cc_mdss_dptx3_pixel0_clk_src = {
  798. .cmd_rcgr = 0x2300,
  799. .mnd_width = 16,
  800. .hid_width = 5,
  801. .parent_map = disp_cc_parent_map_1,
  802. .clkr.hw.init = &(const struct clk_init_data) {
  803. .name = "disp0_cc_mdss_dptx3_pixel0_clk_src",
  804. .parent_data = disp0_cc_parent_data_1,
  805. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_1),
  806. .flags = CLK_SET_RATE_PARENT,
  807. .ops = &clk_dp_ops,
  808. },
  809. };
  810. static struct clk_rcg2 disp1_cc_mdss_dptx3_pixel0_clk_src = {
  811. .cmd_rcgr = 0x2300,
  812. .mnd_width = 16,
  813. .hid_width = 5,
  814. .parent_map = disp_cc_parent_map_1,
  815. .clkr.hw.init = &(const struct clk_init_data) {
  816. .name = "disp1_cc_mdss_dptx3_pixel0_clk_src",
  817. .parent_data = disp1_cc_parent_data_1,
  818. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_1),
  819. .flags = CLK_SET_RATE_PARENT,
  820. .ops = &clk_dp_ops,
  821. },
  822. };
  823. static struct clk_rcg2 disp0_cc_mdss_esc0_clk_src = {
  824. .cmd_rcgr = 0x2174,
  825. .mnd_width = 0,
  826. .hid_width = 5,
  827. .parent_map = disp_cc_parent_map_4,
  828. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  829. .clkr.hw.init = &(const struct clk_init_data) {
  830. .name = "disp0_cc_mdss_esc0_clk_src",
  831. .parent_data = disp_cc_parent_data_4,
  832. .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
  833. .ops = &clk_rcg2_ops,
  834. },
  835. };
  836. static struct clk_rcg2 disp1_cc_mdss_esc0_clk_src = {
  837. .cmd_rcgr = 0x2174,
  838. .mnd_width = 0,
  839. .hid_width = 5,
  840. .parent_map = disp_cc_parent_map_4,
  841. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  842. .clkr.hw.init = &(const struct clk_init_data) {
  843. .name = "disp1_cc_mdss_esc0_clk_src",
  844. .parent_data = disp_cc_parent_data_4,
  845. .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
  846. .ops = &clk_rcg2_ops,
  847. },
  848. };
  849. static struct clk_rcg2 disp0_cc_mdss_esc1_clk_src = {
  850. .cmd_rcgr = 0x218c,
  851. .mnd_width = 0,
  852. .hid_width = 5,
  853. .parent_map = disp_cc_parent_map_4,
  854. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  855. .clkr.hw.init = &(const struct clk_init_data) {
  856. .name = "disp0_cc_mdss_esc1_clk_src",
  857. .parent_data = disp_cc_parent_data_4,
  858. .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
  859. .ops = &clk_rcg2_ops,
  860. },
  861. };
  862. static struct clk_rcg2 disp1_cc_mdss_esc1_clk_src = {
  863. .cmd_rcgr = 0x218c,
  864. .mnd_width = 0,
  865. .hid_width = 5,
  866. .parent_map = disp_cc_parent_map_4,
  867. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  868. .clkr.hw.init = &(const struct clk_init_data) {
  869. .name = "disp1_cc_mdss_esc1_clk_src",
  870. .parent_data = disp_cc_parent_data_4,
  871. .num_parents = ARRAY_SIZE(disp_cc_parent_data_4),
  872. .ops = &clk_rcg2_ops,
  873. },
  874. };
  875. static const struct freq_tbl ftbl_disp_cc_mdss_mdp_clk_src[] = {
  876. F(19200000, P_BI_TCXO, 1, 0, 0),
  877. F(85714286, P_DISPn_CC_PLL1_OUT_MAIN, 7, 0, 0),
  878. F(100000000, P_DISPn_CC_PLL1_OUT_MAIN, 6, 0, 0),
  879. F(150000000, P_DISPn_CC_PLL1_OUT_MAIN, 4, 0, 0),
  880. F(200000000, P_DISPn_CC_PLL1_OUT_MAIN, 3, 0, 0),
  881. F(300000000, P_DISPn_CC_PLL1_OUT_MAIN, 2, 0, 0),
  882. F(375000000, P_DISPn_CC_PLL0_OUT_MAIN, 4, 0, 0),
  883. F(500000000, P_DISPn_CC_PLL0_OUT_MAIN, 3, 0, 0),
  884. F(600000000, P_DISPn_CC_PLL1_OUT_MAIN, 1, 0, 0),
  885. { }
  886. };
  887. static struct clk_rcg2 disp0_cc_mdss_mdp_clk_src = {
  888. .cmd_rcgr = 0x20f4,
  889. .mnd_width = 0,
  890. .hid_width = 5,
  891. .parent_map = disp_cc_parent_map_5,
  892. .freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
  893. .clkr.hw.init = &(const struct clk_init_data) {
  894. .name = "disp0_cc_mdss_mdp_clk_src",
  895. .parent_data = disp0_cc_parent_data_5,
  896. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_5),
  897. .ops = &clk_rcg2_shared_ops,
  898. },
  899. };
  900. static struct clk_rcg2 disp1_cc_mdss_mdp_clk_src = {
  901. .cmd_rcgr = 0x20f4,
  902. .mnd_width = 0,
  903. .hid_width = 5,
  904. .parent_map = disp_cc_parent_map_5,
  905. .freq_tbl = ftbl_disp_cc_mdss_mdp_clk_src,
  906. .clkr.hw.init = &(const struct clk_init_data) {
  907. .name = "disp1_cc_mdss_mdp_clk_src",
  908. .parent_data = disp1_cc_parent_data_5,
  909. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_5),
  910. .ops = &clk_rcg2_shared_ops,
  911. },
  912. };
  913. static struct clk_rcg2 disp0_cc_mdss_pclk0_clk_src = {
  914. .cmd_rcgr = 0x20c4,
  915. .mnd_width = 8,
  916. .hid_width = 5,
  917. .parent_map = disp_cc_parent_map_3,
  918. .clkr.hw.init = &(const struct clk_init_data) {
  919. .name = "disp0_cc_mdss_pclk0_clk_src",
  920. .parent_data = disp_cc_parent_data_3,
  921. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  922. .flags = CLK_SET_RATE_PARENT,
  923. .ops = &clk_pixel_ops,
  924. },
  925. };
  926. static struct clk_rcg2 disp1_cc_mdss_pclk0_clk_src = {
  927. .cmd_rcgr = 0x20c4,
  928. .mnd_width = 8,
  929. .hid_width = 5,
  930. .parent_map = disp_cc_parent_map_3,
  931. .clkr.hw.init = &(const struct clk_init_data) {
  932. .name = "disp1_cc_mdss_pclk0_clk_src",
  933. .parent_data = disp_cc_parent_data_3,
  934. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  935. .flags = CLK_SET_RATE_PARENT,
  936. .ops = &clk_pixel_ops,
  937. },
  938. };
  939. static struct clk_rcg2 disp0_cc_mdss_pclk1_clk_src = {
  940. .cmd_rcgr = 0x20dc,
  941. .mnd_width = 8,
  942. .hid_width = 5,
  943. .parent_map = disp_cc_parent_map_3,
  944. .clkr.hw.init = &(const struct clk_init_data) {
  945. .name = "disp0_cc_mdss_pclk1_clk_src",
  946. .parent_data = disp_cc_parent_data_3,
  947. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  948. .flags = CLK_SET_RATE_PARENT,
  949. .ops = &clk_pixel_ops,
  950. },
  951. };
  952. static struct clk_rcg2 disp1_cc_mdss_pclk1_clk_src = {
  953. .cmd_rcgr = 0x20dc,
  954. .mnd_width = 8,
  955. .hid_width = 5,
  956. .parent_map = disp_cc_parent_map_3,
  957. .clkr.hw.init = &(const struct clk_init_data) {
  958. .name = "disp1_cc_mdss_pclk1_clk_src",
  959. .parent_data = disp_cc_parent_data_3,
  960. .num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
  961. .flags = CLK_SET_RATE_PARENT,
  962. .ops = &clk_pixel_ops,
  963. },
  964. };
  965. static const struct freq_tbl ftbl_disp_cc_mdss_rot_clk_src[] = {
  966. F(19200000, P_BI_TCXO, 1, 0, 0),
  967. F(200000000, P_DISPn_CC_PLL1_OUT_MAIN, 3, 0, 0),
  968. F(300000000, P_DISPn_CC_PLL1_OUT_MAIN, 2, 0, 0),
  969. F(375000000, P_DISPn_CC_PLL0_OUT_MAIN, 4, 0, 0),
  970. F(500000000, P_DISPn_CC_PLL0_OUT_MAIN, 3, 0, 0),
  971. F(600000000, P_DISPn_CC_PLL1_OUT_MAIN, 1, 0, 0),
  972. { }
  973. };
  974. static struct clk_rcg2 disp0_cc_mdss_rot_clk_src = {
  975. .cmd_rcgr = 0x210c,
  976. .mnd_width = 0,
  977. .hid_width = 5,
  978. .parent_map = disp_cc_parent_map_5,
  979. .freq_tbl = ftbl_disp_cc_mdss_rot_clk_src,
  980. .clkr.hw.init = &(const struct clk_init_data) {
  981. .name = "disp0_cc_mdss_rot_clk_src",
  982. .parent_data = disp0_cc_parent_data_5,
  983. .num_parents = ARRAY_SIZE(disp0_cc_parent_data_5),
  984. .ops = &clk_rcg2_shared_ops,
  985. },
  986. };
  987. static struct clk_rcg2 disp1_cc_mdss_rot_clk_src = {
  988. .cmd_rcgr = 0x210c,
  989. .mnd_width = 0,
  990. .hid_width = 5,
  991. .parent_map = disp_cc_parent_map_5,
  992. .freq_tbl = ftbl_disp_cc_mdss_rot_clk_src,
  993. .clkr.hw.init = &(const struct clk_init_data) {
  994. .name = "disp1_cc_mdss_rot_clk_src",
  995. .parent_data = disp1_cc_parent_data_5,
  996. .num_parents = ARRAY_SIZE(disp1_cc_parent_data_5),
  997. .ops = &clk_rcg2_shared_ops,
  998. },
  999. };
  1000. static struct clk_rcg2 disp0_cc_mdss_vsync_clk_src = {
  1001. .cmd_rcgr = 0x2124,
  1002. .mnd_width = 0,
  1003. .hid_width = 5,
  1004. .parent_map = disp_cc_parent_map_2,
  1005. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  1006. .clkr.hw.init = &(const struct clk_init_data) {
  1007. .name = "disp0_cc_mdss_vsync_clk_src",
  1008. .parent_data = disp_cc_parent_data_2,
  1009. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  1010. .ops = &clk_rcg2_ops,
  1011. },
  1012. };
  1013. static struct clk_rcg2 disp1_cc_mdss_vsync_clk_src = {
  1014. .cmd_rcgr = 0x2124,
  1015. .mnd_width = 0,
  1016. .hid_width = 5,
  1017. .parent_map = disp_cc_parent_map_2,
  1018. .freq_tbl = ftbl_disp_cc_mdss_byte0_clk_src,
  1019. .clkr.hw.init = &(const struct clk_init_data) {
  1020. .name = "disp1_cc_mdss_vsync_clk_src",
  1021. .parent_data = disp_cc_parent_data_2,
  1022. .num_parents = ARRAY_SIZE(disp_cc_parent_data_2),
  1023. .ops = &clk_rcg2_ops,
  1024. },
  1025. };
  1026. static const struct freq_tbl ftbl_disp_cc_sleep_clk_src[] = {
  1027. F(32000, P_SLEEP_CLK, 1, 0, 0),
  1028. { }
  1029. };
  1030. static struct clk_rcg2 disp0_cc_sleep_clk_src = {
  1031. .cmd_rcgr = 0x6060,
  1032. .mnd_width = 0,
  1033. .hid_width = 5,
  1034. .parent_map = disp_cc_parent_map_7,
  1035. .freq_tbl = ftbl_disp_cc_sleep_clk_src,
  1036. .clkr.hw.init = &(const struct clk_init_data) {
  1037. .name = "disp0_cc_sleep_clk_src",
  1038. .parent_data = disp_cc_parent_data_7,
  1039. .num_parents = ARRAY_SIZE(disp_cc_parent_data_7),
  1040. .ops = &clk_rcg2_ops,
  1041. },
  1042. };
  1043. static struct clk_rcg2 disp1_cc_sleep_clk_src = {
  1044. .cmd_rcgr = 0x6060,
  1045. .mnd_width = 0,
  1046. .hid_width = 5,
  1047. .parent_map = disp_cc_parent_map_7,
  1048. .freq_tbl = ftbl_disp_cc_sleep_clk_src,
  1049. .clkr.hw.init = &(const struct clk_init_data) {
  1050. .name = "disp1_cc_sleep_clk_src",
  1051. .parent_data = disp_cc_parent_data_7,
  1052. .num_parents = ARRAY_SIZE(disp_cc_parent_data_7),
  1053. .ops = &clk_rcg2_ops,
  1054. },
  1055. };
  1056. static struct clk_regmap_div disp0_cc_mdss_byte0_div_clk_src = {
  1057. .reg = 0x2154,
  1058. .shift = 0,
  1059. .width = 4,
  1060. .clkr.hw.init = &(const struct clk_init_data) {
  1061. .name = "disp0_cc_mdss_byte0_div_clk_src",
  1062. .parent_hws = (const struct clk_hw*[]){
  1063. &disp0_cc_mdss_byte0_clk_src.clkr.hw,
  1064. },
  1065. .num_parents = 1,
  1066. .flags = CLK_SET_RATE_PARENT,
  1067. .ops = &clk_regmap_div_ops,
  1068. },
  1069. };
  1070. static struct clk_regmap_div disp1_cc_mdss_byte0_div_clk_src = {
  1071. .reg = 0x2154,
  1072. .shift = 0,
  1073. .width = 4,
  1074. .clkr.hw.init = &(const struct clk_init_data) {
  1075. .name = "disp1_cc_mdss_byte0_div_clk_src",
  1076. .parent_hws = (const struct clk_hw*[]){
  1077. &disp1_cc_mdss_byte0_clk_src.clkr.hw,
  1078. },
  1079. .num_parents = 1,
  1080. .flags = CLK_SET_RATE_PARENT,
  1081. .ops = &clk_regmap_div_ops,
  1082. },
  1083. };
  1084. static struct clk_regmap_div disp0_cc_mdss_byte1_div_clk_src = {
  1085. .reg = 0x2170,
  1086. .shift = 0,
  1087. .width = 4,
  1088. .clkr.hw.init = &(const struct clk_init_data) {
  1089. .name = "disp0_cc_mdss_byte1_div_clk_src",
  1090. .parent_hws = (const struct clk_hw*[]){
  1091. &disp0_cc_mdss_byte1_clk_src.clkr.hw,
  1092. },
  1093. .num_parents = 1,
  1094. .flags = CLK_SET_RATE_PARENT,
  1095. .ops = &clk_regmap_div_ops,
  1096. },
  1097. };
  1098. static struct clk_regmap_div disp1_cc_mdss_byte1_div_clk_src = {
  1099. .reg = 0x2170,
  1100. .shift = 0,
  1101. .width = 4,
  1102. .clkr.hw.init = &(const struct clk_init_data) {
  1103. .name = "disp1_cc_mdss_byte1_div_clk_src",
  1104. .parent_hws = (const struct clk_hw*[]){
  1105. &disp1_cc_mdss_byte1_clk_src.clkr.hw,
  1106. },
  1107. .num_parents = 1,
  1108. .flags = CLK_SET_RATE_PARENT,
  1109. .ops = &clk_regmap_div_ops,
  1110. },
  1111. };
  1112. static struct clk_regmap_div disp0_cc_mdss_dptx0_link_div_clk_src = {
  1113. .reg = 0x21bc,
  1114. .shift = 0,
  1115. .width = 4,
  1116. .clkr.hw.init = &(const struct clk_init_data) {
  1117. .name = "disp0_cc_mdss_dptx0_link_div_clk_src",
  1118. .parent_hws = (const struct clk_hw*[]){
  1119. &disp0_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1120. },
  1121. .num_parents = 1,
  1122. .flags = CLK_SET_RATE_PARENT,
  1123. .ops = &clk_regmap_div_ro_ops,
  1124. },
  1125. };
  1126. static struct clk_regmap_div disp1_cc_mdss_dptx0_link_div_clk_src = {
  1127. .reg = 0x21bc,
  1128. .shift = 0,
  1129. .width = 4,
  1130. .clkr.hw.init = &(const struct clk_init_data) {
  1131. .name = "disp1_cc_mdss_dptx0_link_div_clk_src",
  1132. .parent_hws = (const struct clk_hw*[]){
  1133. &disp1_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1134. },
  1135. .num_parents = 1,
  1136. .flags = CLK_SET_RATE_PARENT,
  1137. .ops = &clk_regmap_div_ro_ops,
  1138. },
  1139. };
  1140. static struct clk_regmap_div disp0_cc_mdss_dptx1_link_div_clk_src = {
  1141. .reg = 0x2280,
  1142. .shift = 0,
  1143. .width = 4,
  1144. .clkr.hw.init = &(const struct clk_init_data) {
  1145. .name = "disp0_cc_mdss_dptx1_link_div_clk_src",
  1146. .parent_hws = (const struct clk_hw*[]){
  1147. &disp0_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1148. },
  1149. .num_parents = 1,
  1150. .flags = CLK_SET_RATE_PARENT,
  1151. .ops = &clk_regmap_div_ro_ops,
  1152. },
  1153. };
  1154. static struct clk_regmap_div disp1_cc_mdss_dptx1_link_div_clk_src = {
  1155. .reg = 0x2280,
  1156. .shift = 0,
  1157. .width = 4,
  1158. .clkr.hw.init = &(const struct clk_init_data) {
  1159. .name = "disp1_cc_mdss_dptx1_link_div_clk_src",
  1160. .parent_hws = (const struct clk_hw*[]){
  1161. &disp1_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1162. },
  1163. .num_parents = 1,
  1164. .flags = CLK_SET_RATE_PARENT,
  1165. .ops = &clk_regmap_div_ro_ops,
  1166. },
  1167. };
  1168. static struct clk_regmap_div disp0_cc_mdss_dptx2_link_div_clk_src = {
  1169. .reg = 0x229c,
  1170. .shift = 0,
  1171. .width = 4,
  1172. .clkr.hw.init = &(const struct clk_init_data) {
  1173. .name = "disp0_cc_mdss_dptx2_link_div_clk_src",
  1174. .parent_hws = (const struct clk_hw*[]){
  1175. &disp0_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1176. },
  1177. .num_parents = 1,
  1178. .flags = CLK_SET_RATE_PARENT,
  1179. .ops = &clk_regmap_div_ro_ops,
  1180. },
  1181. };
  1182. static struct clk_regmap_div disp1_cc_mdss_dptx2_link_div_clk_src = {
  1183. .reg = 0x229c,
  1184. .shift = 0,
  1185. .width = 4,
  1186. .clkr.hw.init = &(const struct clk_init_data) {
  1187. .name = "disp1_cc_mdss_dptx2_link_div_clk_src",
  1188. .parent_hws = (const struct clk_hw*[]){
  1189. &disp1_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1190. },
  1191. .num_parents = 1,
  1192. .flags = CLK_SET_RATE_PARENT,
  1193. .ops = &clk_regmap_div_ro_ops,
  1194. },
  1195. };
  1196. static struct clk_regmap_div disp0_cc_mdss_dptx3_link_div_clk_src = {
  1197. .reg = 0x2330,
  1198. .shift = 0,
  1199. .width = 4,
  1200. .clkr.hw.init = &(const struct clk_init_data) {
  1201. .name = "disp0_cc_mdss_dptx3_link_div_clk_src",
  1202. .parent_hws = (const struct clk_hw*[]){
  1203. &disp0_cc_mdss_dptx3_link_clk_src.clkr.hw,
  1204. },
  1205. .num_parents = 1,
  1206. .flags = CLK_SET_RATE_PARENT,
  1207. .ops = &clk_regmap_div_ro_ops,
  1208. },
  1209. };
  1210. static struct clk_regmap_div disp1_cc_mdss_dptx3_link_div_clk_src = {
  1211. .reg = 0x2330,
  1212. .shift = 0,
  1213. .width = 4,
  1214. .clkr.hw.init = &(const struct clk_init_data) {
  1215. .name = "disp1_cc_mdss_dptx3_link_div_clk_src",
  1216. .parent_hws = (const struct clk_hw*[]){
  1217. &disp1_cc_mdss_dptx3_link_clk_src.clkr.hw,
  1218. },
  1219. .num_parents = 1,
  1220. .flags = CLK_SET_RATE_PARENT,
  1221. .ops = &clk_regmap_div_ro_ops,
  1222. },
  1223. };
  1224. static struct clk_branch disp0_cc_mdss_ahb1_clk = {
  1225. .halt_reg = 0x20c0,
  1226. .halt_check = BRANCH_HALT,
  1227. .clkr = {
  1228. .enable_reg = 0x20c0,
  1229. .enable_mask = BIT(0),
  1230. .hw.init = &(const struct clk_init_data) {
  1231. .name = "disp0_cc_mdss_ahb1_clk",
  1232. .parent_hws = (const struct clk_hw*[]){
  1233. &disp0_cc_mdss_ahb_clk_src.clkr.hw,
  1234. },
  1235. .num_parents = 1,
  1236. .flags = CLK_SET_RATE_PARENT,
  1237. .ops = &clk_branch2_ops,
  1238. },
  1239. },
  1240. };
  1241. static struct clk_branch disp1_cc_mdss_ahb1_clk = {
  1242. .halt_reg = 0x20c0,
  1243. .halt_check = BRANCH_HALT,
  1244. .clkr = {
  1245. .enable_reg = 0x20c0,
  1246. .enable_mask = BIT(0),
  1247. .hw.init = &(const struct clk_init_data) {
  1248. .name = "disp1_cc_mdss_ahb1_clk",
  1249. .parent_hws = (const struct clk_hw*[]){
  1250. &disp1_cc_mdss_ahb_clk_src.clkr.hw,
  1251. },
  1252. .num_parents = 1,
  1253. .flags = CLK_SET_RATE_PARENT,
  1254. .ops = &clk_branch2_ops,
  1255. },
  1256. },
  1257. };
  1258. static struct clk_branch disp0_cc_mdss_ahb_clk = {
  1259. .halt_reg = 0x20bc,
  1260. .halt_check = BRANCH_HALT,
  1261. .clkr = {
  1262. .enable_reg = 0x20bc,
  1263. .enable_mask = BIT(0),
  1264. .hw.init = &(const struct clk_init_data) {
  1265. .name = "disp0_cc_mdss_ahb_clk",
  1266. .parent_hws = (const struct clk_hw*[]){
  1267. &disp0_cc_mdss_ahb_clk_src.clkr.hw,
  1268. },
  1269. .num_parents = 1,
  1270. .flags = CLK_SET_RATE_PARENT,
  1271. .ops = &clk_branch2_ops,
  1272. },
  1273. },
  1274. };
  1275. static struct clk_branch disp1_cc_mdss_ahb_clk = {
  1276. .halt_reg = 0x20bc,
  1277. .halt_check = BRANCH_HALT,
  1278. .clkr = {
  1279. .enable_reg = 0x20bc,
  1280. .enable_mask = BIT(0),
  1281. .hw.init = &(const struct clk_init_data) {
  1282. .name = "disp1_cc_mdss_ahb_clk",
  1283. .parent_hws = (const struct clk_hw*[]){
  1284. &disp1_cc_mdss_ahb_clk_src.clkr.hw,
  1285. },
  1286. .num_parents = 1,
  1287. .flags = CLK_SET_RATE_PARENT,
  1288. .ops = &clk_branch2_ops,
  1289. },
  1290. },
  1291. };
  1292. static struct clk_branch disp0_cc_mdss_byte0_clk = {
  1293. .halt_reg = 0x2044,
  1294. .halt_check = BRANCH_HALT,
  1295. .clkr = {
  1296. .enable_reg = 0x2044,
  1297. .enable_mask = BIT(0),
  1298. .hw.init = &(const struct clk_init_data) {
  1299. .name = "disp0_cc_mdss_byte0_clk",
  1300. .parent_hws = (const struct clk_hw*[]){
  1301. &disp0_cc_mdss_byte0_clk_src.clkr.hw,
  1302. },
  1303. .num_parents = 1,
  1304. .flags = CLK_SET_RATE_PARENT,
  1305. .ops = &clk_branch2_ops,
  1306. },
  1307. },
  1308. };
  1309. static struct clk_branch disp1_cc_mdss_byte0_clk = {
  1310. .halt_reg = 0x2044,
  1311. .halt_check = BRANCH_HALT,
  1312. .clkr = {
  1313. .enable_reg = 0x2044,
  1314. .enable_mask = BIT(0),
  1315. .hw.init = &(const struct clk_init_data) {
  1316. .name = "disp1_cc_mdss_byte0_clk",
  1317. .parent_hws = (const struct clk_hw*[]){
  1318. &disp1_cc_mdss_byte0_clk_src.clkr.hw,
  1319. },
  1320. .num_parents = 1,
  1321. .flags = CLK_SET_RATE_PARENT,
  1322. .ops = &clk_branch2_ops,
  1323. },
  1324. },
  1325. };
  1326. static struct clk_branch disp0_cc_mdss_byte0_intf_clk = {
  1327. .halt_reg = 0x2048,
  1328. .halt_check = BRANCH_HALT,
  1329. .clkr = {
  1330. .enable_reg = 0x2048,
  1331. .enable_mask = BIT(0),
  1332. .hw.init = &(const struct clk_init_data) {
  1333. .name = "disp0_cc_mdss_byte0_intf_clk",
  1334. .parent_hws = (const struct clk_hw*[]){
  1335. &disp0_cc_mdss_byte0_div_clk_src.clkr.hw,
  1336. },
  1337. .num_parents = 1,
  1338. .flags = CLK_SET_RATE_PARENT,
  1339. .ops = &clk_branch2_ops,
  1340. },
  1341. },
  1342. };
  1343. static struct clk_branch disp1_cc_mdss_byte0_intf_clk = {
  1344. .halt_reg = 0x2048,
  1345. .halt_check = BRANCH_HALT,
  1346. .clkr = {
  1347. .enable_reg = 0x2048,
  1348. .enable_mask = BIT(0),
  1349. .hw.init = &(const struct clk_init_data) {
  1350. .name = "disp1_cc_mdss_byte0_intf_clk",
  1351. .parent_hws = (const struct clk_hw*[]){
  1352. &disp1_cc_mdss_byte0_div_clk_src.clkr.hw,
  1353. },
  1354. .num_parents = 1,
  1355. .flags = CLK_SET_RATE_PARENT,
  1356. .ops = &clk_branch2_ops,
  1357. },
  1358. },
  1359. };
  1360. static struct clk_branch disp0_cc_mdss_byte1_clk = {
  1361. .halt_reg = 0x204c,
  1362. .halt_check = BRANCH_HALT,
  1363. .clkr = {
  1364. .enable_reg = 0x204c,
  1365. .enable_mask = BIT(0),
  1366. .hw.init = &(const struct clk_init_data) {
  1367. .name = "disp0_cc_mdss_byte1_clk",
  1368. .parent_hws = (const struct clk_hw*[]){
  1369. &disp0_cc_mdss_byte1_clk_src.clkr.hw,
  1370. },
  1371. .num_parents = 1,
  1372. .flags = CLK_SET_RATE_PARENT,
  1373. .ops = &clk_branch2_ops,
  1374. },
  1375. },
  1376. };
  1377. static struct clk_branch disp1_cc_mdss_byte1_clk = {
  1378. .halt_reg = 0x204c,
  1379. .halt_check = BRANCH_HALT,
  1380. .clkr = {
  1381. .enable_reg = 0x204c,
  1382. .enable_mask = BIT(0),
  1383. .hw.init = &(const struct clk_init_data) {
  1384. .name = "disp1_cc_mdss_byte1_clk",
  1385. .parent_hws = (const struct clk_hw*[]){
  1386. &disp1_cc_mdss_byte1_clk_src.clkr.hw,
  1387. },
  1388. .num_parents = 1,
  1389. .flags = CLK_SET_RATE_PARENT,
  1390. .ops = &clk_branch2_ops,
  1391. },
  1392. },
  1393. };
  1394. static struct clk_branch disp0_cc_mdss_byte1_intf_clk = {
  1395. .halt_reg = 0x2050,
  1396. .halt_check = BRANCH_HALT,
  1397. .clkr = {
  1398. .enable_reg = 0x2050,
  1399. .enable_mask = BIT(0),
  1400. .hw.init = &(const struct clk_init_data) {
  1401. .name = "disp0_cc_mdss_byte1_intf_clk",
  1402. .parent_hws = (const struct clk_hw*[]){
  1403. &disp0_cc_mdss_byte1_div_clk_src.clkr.hw,
  1404. },
  1405. .num_parents = 1,
  1406. .flags = CLK_SET_RATE_PARENT,
  1407. .ops = &clk_branch2_ops,
  1408. },
  1409. },
  1410. };
  1411. static struct clk_branch disp1_cc_mdss_byte1_intf_clk = {
  1412. .halt_reg = 0x2050,
  1413. .halt_check = BRANCH_HALT,
  1414. .clkr = {
  1415. .enable_reg = 0x2050,
  1416. .enable_mask = BIT(0),
  1417. .hw.init = &(const struct clk_init_data) {
  1418. .name = "disp1_cc_mdss_byte1_intf_clk",
  1419. .parent_hws = (const struct clk_hw*[]){
  1420. &disp1_cc_mdss_byte1_div_clk_src.clkr.hw,
  1421. },
  1422. .num_parents = 1,
  1423. .flags = CLK_SET_RATE_PARENT,
  1424. .ops = &clk_branch2_ops,
  1425. },
  1426. },
  1427. };
  1428. static struct clk_branch disp0_cc_mdss_dptx0_aux_clk = {
  1429. .halt_reg = 0x206c,
  1430. .halt_check = BRANCH_HALT,
  1431. .clkr = {
  1432. .enable_reg = 0x206c,
  1433. .enable_mask = BIT(0),
  1434. .hw.init = &(const struct clk_init_data) {
  1435. .name = "disp0_cc_mdss_dptx0_aux_clk",
  1436. .parent_hws = (const struct clk_hw*[]){
  1437. &disp0_cc_mdss_dptx0_aux_clk_src.clkr.hw,
  1438. },
  1439. .num_parents = 1,
  1440. .flags = CLK_SET_RATE_PARENT,
  1441. .ops = &clk_branch2_ops,
  1442. },
  1443. },
  1444. };
  1445. static struct clk_branch disp1_cc_mdss_dptx0_aux_clk = {
  1446. .halt_reg = 0x206c,
  1447. .halt_check = BRANCH_HALT,
  1448. .clkr = {
  1449. .enable_reg = 0x206c,
  1450. .enable_mask = BIT(0),
  1451. .hw.init = &(const struct clk_init_data) {
  1452. .name = "disp1_cc_mdss_dptx0_aux_clk",
  1453. .parent_hws = (const struct clk_hw*[]){
  1454. &disp1_cc_mdss_dptx0_aux_clk_src.clkr.hw,
  1455. },
  1456. .num_parents = 1,
  1457. .flags = CLK_SET_RATE_PARENT,
  1458. .ops = &clk_branch2_ops,
  1459. },
  1460. },
  1461. };
  1462. static struct clk_branch disp0_cc_mdss_dptx0_link_clk = {
  1463. .halt_reg = 0x205c,
  1464. .halt_check = BRANCH_HALT,
  1465. .clkr = {
  1466. .enable_reg = 0x205c,
  1467. .enable_mask = BIT(0),
  1468. .hw.init = &(const struct clk_init_data) {
  1469. .name = "disp0_cc_mdss_dptx0_link_clk",
  1470. .parent_hws = (const struct clk_hw*[]){
  1471. &disp0_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1472. },
  1473. .num_parents = 1,
  1474. .flags = CLK_SET_RATE_PARENT,
  1475. .ops = &clk_branch2_ops,
  1476. },
  1477. },
  1478. };
  1479. static struct clk_branch disp1_cc_mdss_dptx0_link_clk = {
  1480. .halt_reg = 0x205c,
  1481. .halt_check = BRANCH_HALT,
  1482. .clkr = {
  1483. .enable_reg = 0x205c,
  1484. .enable_mask = BIT(0),
  1485. .hw.init = &(const struct clk_init_data) {
  1486. .name = "disp1_cc_mdss_dptx0_link_clk",
  1487. .parent_hws = (const struct clk_hw*[]){
  1488. &disp1_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1489. },
  1490. .num_parents = 1,
  1491. .flags = CLK_SET_RATE_PARENT,
  1492. .ops = &clk_branch2_ops,
  1493. },
  1494. },
  1495. };
  1496. static struct clk_branch disp0_cc_mdss_dptx0_link_intf_clk = {
  1497. .halt_reg = 0x2060,
  1498. .halt_check = BRANCH_HALT,
  1499. .clkr = {
  1500. .enable_reg = 0x2060,
  1501. .enable_mask = BIT(0),
  1502. .hw.init = &(const struct clk_init_data) {
  1503. .name = "disp0_cc_mdss_dptx0_link_intf_clk",
  1504. .parent_hws = (const struct clk_hw*[]){
  1505. &disp0_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1506. },
  1507. .num_parents = 1,
  1508. .flags = CLK_SET_RATE_PARENT,
  1509. .ops = &clk_branch2_ops,
  1510. },
  1511. },
  1512. };
  1513. static struct clk_branch disp1_cc_mdss_dptx0_link_intf_clk = {
  1514. .halt_reg = 0x2060,
  1515. .halt_check = BRANCH_HALT,
  1516. .clkr = {
  1517. .enable_reg = 0x2060,
  1518. .enable_mask = BIT(0),
  1519. .hw.init = &(const struct clk_init_data) {
  1520. .name = "disp1_cc_mdss_dptx0_link_intf_clk",
  1521. .parent_hws = (const struct clk_hw*[]){
  1522. &disp1_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1523. },
  1524. .num_parents = 1,
  1525. .flags = CLK_SET_RATE_PARENT,
  1526. .ops = &clk_branch2_ops,
  1527. },
  1528. },
  1529. };
  1530. static struct clk_branch disp0_cc_mdss_dptx0_pixel0_clk = {
  1531. .halt_reg = 0x2070,
  1532. .halt_check = BRANCH_HALT,
  1533. .clkr = {
  1534. .enable_reg = 0x2070,
  1535. .enable_mask = BIT(0),
  1536. .hw.init = &(const struct clk_init_data) {
  1537. .name = "disp0_cc_mdss_dptx0_pixel0_clk",
  1538. .parent_hws = (const struct clk_hw*[]){
  1539. &disp0_cc_mdss_dptx0_pixel0_clk_src.clkr.hw,
  1540. },
  1541. .num_parents = 1,
  1542. .flags = CLK_SET_RATE_PARENT,
  1543. .ops = &clk_branch2_ops,
  1544. },
  1545. },
  1546. };
  1547. static struct clk_branch disp1_cc_mdss_dptx0_pixel0_clk = {
  1548. .halt_reg = 0x2070,
  1549. .halt_check = BRANCH_HALT,
  1550. .clkr = {
  1551. .enable_reg = 0x2070,
  1552. .enable_mask = BIT(0),
  1553. .hw.init = &(const struct clk_init_data) {
  1554. .name = "disp1_cc_mdss_dptx0_pixel0_clk",
  1555. .parent_hws = (const struct clk_hw*[]){
  1556. &disp1_cc_mdss_dptx0_pixel0_clk_src.clkr.hw,
  1557. },
  1558. .num_parents = 1,
  1559. .flags = CLK_SET_RATE_PARENT,
  1560. .ops = &clk_branch2_ops,
  1561. },
  1562. },
  1563. };
  1564. static struct clk_branch disp0_cc_mdss_dptx0_pixel1_clk = {
  1565. .halt_reg = 0x2074,
  1566. .halt_check = BRANCH_HALT,
  1567. .clkr = {
  1568. .enable_reg = 0x2074,
  1569. .enable_mask = BIT(0),
  1570. .hw.init = &(const struct clk_init_data) {
  1571. .name = "disp0_cc_mdss_dptx0_pixel1_clk",
  1572. .parent_hws = (const struct clk_hw*[]){
  1573. &disp0_cc_mdss_dptx0_pixel1_clk_src.clkr.hw,
  1574. },
  1575. .num_parents = 1,
  1576. .flags = CLK_SET_RATE_PARENT,
  1577. .ops = &clk_branch2_ops,
  1578. },
  1579. },
  1580. };
  1581. static struct clk_branch disp1_cc_mdss_dptx0_pixel1_clk = {
  1582. .halt_reg = 0x2074,
  1583. .halt_check = BRANCH_HALT,
  1584. .clkr = {
  1585. .enable_reg = 0x2074,
  1586. .enable_mask = BIT(0),
  1587. .hw.init = &(const struct clk_init_data) {
  1588. .name = "disp1_cc_mdss_dptx0_pixel1_clk",
  1589. .parent_hws = (const struct clk_hw*[]){
  1590. &disp1_cc_mdss_dptx0_pixel1_clk_src.clkr.hw,
  1591. },
  1592. .num_parents = 1,
  1593. .flags = CLK_SET_RATE_PARENT,
  1594. .ops = &clk_branch2_ops,
  1595. },
  1596. },
  1597. };
  1598. static struct clk_branch disp0_cc_mdss_dptx0_usb_router_link_intf_clk = {
  1599. .halt_reg = 0x2064,
  1600. .halt_check = BRANCH_HALT,
  1601. .clkr = {
  1602. .enable_reg = 0x2064,
  1603. .enable_mask = BIT(0),
  1604. .hw.init = &(const struct clk_init_data) {
  1605. .name = "disp0_cc_mdss_dptx0_usb_router_link_intf_clk",
  1606. .parent_hws = (const struct clk_hw*[]){
  1607. &disp0_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1608. },
  1609. .num_parents = 1,
  1610. .flags = CLK_SET_RATE_PARENT,
  1611. .ops = &clk_branch2_ops,
  1612. },
  1613. },
  1614. };
  1615. static struct clk_branch disp1_cc_mdss_dptx0_usb_router_link_intf_clk = {
  1616. .halt_reg = 0x2064,
  1617. .halt_check = BRANCH_HALT,
  1618. .clkr = {
  1619. .enable_reg = 0x2064,
  1620. .enable_mask = BIT(0),
  1621. .hw.init = &(const struct clk_init_data) {
  1622. .name = "disp1_cc_mdss_dptx0_usb_router_link_intf_clk",
  1623. .parent_hws = (const struct clk_hw*[]){
  1624. &disp1_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1625. },
  1626. .num_parents = 1,
  1627. .flags = CLK_SET_RATE_PARENT,
  1628. .ops = &clk_branch2_ops,
  1629. },
  1630. },
  1631. };
  1632. static struct clk_branch disp0_cc_mdss_dptx1_aux_clk = {
  1633. .halt_reg = 0x20a0,
  1634. .halt_check = BRANCH_HALT,
  1635. .clkr = {
  1636. .enable_reg = 0x20a0,
  1637. .enable_mask = BIT(0),
  1638. .hw.init = &(const struct clk_init_data) {
  1639. .name = "disp0_cc_mdss_dptx1_aux_clk",
  1640. .parent_hws = (const struct clk_hw*[]){
  1641. &disp0_cc_mdss_dptx1_aux_clk_src.clkr.hw,
  1642. },
  1643. .num_parents = 1,
  1644. .flags = CLK_SET_RATE_PARENT,
  1645. .ops = &clk_branch2_ops,
  1646. },
  1647. },
  1648. };
  1649. static struct clk_branch disp1_cc_mdss_dptx1_aux_clk = {
  1650. .halt_reg = 0x20a0,
  1651. .halt_check = BRANCH_HALT,
  1652. .clkr = {
  1653. .enable_reg = 0x20a0,
  1654. .enable_mask = BIT(0),
  1655. .hw.init = &(const struct clk_init_data) {
  1656. .name = "disp1_cc_mdss_dptx1_aux_clk",
  1657. .parent_hws = (const struct clk_hw*[]){
  1658. &disp1_cc_mdss_dptx1_aux_clk_src.clkr.hw,
  1659. },
  1660. .num_parents = 1,
  1661. .flags = CLK_SET_RATE_PARENT,
  1662. .ops = &clk_branch2_ops,
  1663. },
  1664. },
  1665. };
  1666. static struct clk_branch disp0_cc_mdss_dptx1_link_clk = {
  1667. .halt_reg = 0x2084,
  1668. .halt_check = BRANCH_HALT,
  1669. .clkr = {
  1670. .enable_reg = 0x2084,
  1671. .enable_mask = BIT(0),
  1672. .hw.init = &(const struct clk_init_data) {
  1673. .name = "disp0_cc_mdss_dptx1_link_clk",
  1674. .parent_hws = (const struct clk_hw*[]){
  1675. &disp0_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1676. },
  1677. .num_parents = 1,
  1678. .flags = CLK_SET_RATE_PARENT,
  1679. .ops = &clk_branch2_ops,
  1680. },
  1681. },
  1682. };
  1683. static struct clk_branch disp1_cc_mdss_dptx1_link_clk = {
  1684. .halt_reg = 0x2084,
  1685. .halt_check = BRANCH_HALT,
  1686. .clkr = {
  1687. .enable_reg = 0x2084,
  1688. .enable_mask = BIT(0),
  1689. .hw.init = &(const struct clk_init_data) {
  1690. .name = "disp1_cc_mdss_dptx1_link_clk",
  1691. .parent_hws = (const struct clk_hw*[]){
  1692. &disp1_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1693. },
  1694. .num_parents = 1,
  1695. .flags = CLK_SET_RATE_PARENT,
  1696. .ops = &clk_branch2_ops,
  1697. },
  1698. },
  1699. };
  1700. static struct clk_branch disp0_cc_mdss_dptx1_link_intf_clk = {
  1701. .halt_reg = 0x2088,
  1702. .halt_check = BRANCH_HALT,
  1703. .clkr = {
  1704. .enable_reg = 0x2088,
  1705. .enable_mask = BIT(0),
  1706. .hw.init = &(const struct clk_init_data) {
  1707. .name = "disp0_cc_mdss_dptx1_link_intf_clk",
  1708. .parent_hws = (const struct clk_hw*[]){
  1709. &disp0_cc_mdss_dptx1_link_div_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 disp1_cc_mdss_dptx1_link_intf_clk = {
  1718. .halt_reg = 0x2088,
  1719. .halt_check = BRANCH_HALT,
  1720. .clkr = {
  1721. .enable_reg = 0x2088,
  1722. .enable_mask = BIT(0),
  1723. .hw.init = &(const struct clk_init_data) {
  1724. .name = "disp1_cc_mdss_dptx1_link_intf_clk",
  1725. .parent_hws = (const struct clk_hw*[]){
  1726. &disp1_cc_mdss_dptx1_link_div_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 disp0_cc_mdss_dptx1_pixel0_clk = {
  1735. .halt_reg = 0x2078,
  1736. .halt_check = BRANCH_HALT,
  1737. .clkr = {
  1738. .enable_reg = 0x2078,
  1739. .enable_mask = BIT(0),
  1740. .hw.init = &(const struct clk_init_data) {
  1741. .name = "disp0_cc_mdss_dptx1_pixel0_clk",
  1742. .parent_hws = (const struct clk_hw*[]){
  1743. &disp0_cc_mdss_dptx1_pixel0_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 disp1_cc_mdss_dptx1_pixel0_clk = {
  1752. .halt_reg = 0x2078,
  1753. .halt_check = BRANCH_HALT,
  1754. .clkr = {
  1755. .enable_reg = 0x2078,
  1756. .enable_mask = BIT(0),
  1757. .hw.init = &(const struct clk_init_data) {
  1758. .name = "disp1_cc_mdss_dptx1_pixel0_clk",
  1759. .parent_hws = (const struct clk_hw*[]){
  1760. &disp1_cc_mdss_dptx1_pixel0_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 disp0_cc_mdss_dptx1_pixel1_clk = {
  1769. .halt_reg = 0x236c,
  1770. .halt_check = BRANCH_HALT,
  1771. .clkr = {
  1772. .enable_reg = 0x236c,
  1773. .enable_mask = BIT(0),
  1774. .hw.init = &(const struct clk_init_data) {
  1775. .name = "disp0_cc_mdss_dptx1_pixel1_clk",
  1776. .parent_hws = (const struct clk_hw*[]){
  1777. &disp0_cc_mdss_dptx1_pixel1_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 disp1_cc_mdss_dptx1_pixel1_clk = {
  1786. .halt_reg = 0x236c,
  1787. .halt_check = BRANCH_HALT,
  1788. .clkr = {
  1789. .enable_reg = 0x236c,
  1790. .enable_mask = BIT(0),
  1791. .hw.init = &(const struct clk_init_data) {
  1792. .name = "disp1_cc_mdss_dptx1_pixel1_clk",
  1793. .parent_hws = (const struct clk_hw*[]){
  1794. &disp1_cc_mdss_dptx1_pixel1_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 disp0_cc_mdss_dptx1_usb_router_link_intf_clk = {
  1803. .halt_reg = 0x208c,
  1804. .halt_check = BRANCH_HALT,
  1805. .clkr = {
  1806. .enable_reg = 0x208c,
  1807. .enable_mask = BIT(0),
  1808. .hw.init = &(const struct clk_init_data) {
  1809. .name = "disp0_cc_mdss_dptx1_usb_router_link_intf_clk",
  1810. .parent_hws = (const struct clk_hw*[]){
  1811. &disp0_cc_mdss_dptx1_link_div_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_branch disp1_cc_mdss_dptx1_usb_router_link_intf_clk = {
  1820. .halt_reg = 0x208c,
  1821. .halt_check = BRANCH_HALT,
  1822. .clkr = {
  1823. .enable_reg = 0x208c,
  1824. .enable_mask = BIT(0),
  1825. .hw.init = &(const struct clk_init_data) {
  1826. .name = "disp1_cc_mdss_dptx1_usb_router_link_intf_clk",
  1827. .parent_hws = (const struct clk_hw*[]){
  1828. &disp1_cc_mdss_dptx1_link_div_clk_src.clkr.hw,
  1829. },
  1830. .num_parents = 1,
  1831. .flags = CLK_SET_RATE_PARENT,
  1832. .ops = &clk_branch2_ops,
  1833. },
  1834. },
  1835. };
  1836. static struct clk_branch disp0_cc_mdss_dptx2_aux_clk = {
  1837. .halt_reg = 0x20a4,
  1838. .halt_check = BRANCH_HALT,
  1839. .clkr = {
  1840. .enable_reg = 0x20a4,
  1841. .enable_mask = BIT(0),
  1842. .hw.init = &(const struct clk_init_data) {
  1843. .name = "disp0_cc_mdss_dptx2_aux_clk",
  1844. .parent_hws = (const struct clk_hw*[]){
  1845. &disp0_cc_mdss_dptx2_aux_clk_src.clkr.hw,
  1846. },
  1847. .num_parents = 1,
  1848. .flags = CLK_SET_RATE_PARENT,
  1849. .ops = &clk_branch2_ops,
  1850. },
  1851. },
  1852. };
  1853. static struct clk_branch disp1_cc_mdss_dptx2_aux_clk = {
  1854. .halt_reg = 0x20a4,
  1855. .halt_check = BRANCH_HALT,
  1856. .clkr = {
  1857. .enable_reg = 0x20a4,
  1858. .enable_mask = BIT(0),
  1859. .hw.init = &(const struct clk_init_data) {
  1860. .name = "disp1_cc_mdss_dptx2_aux_clk",
  1861. .parent_hws = (const struct clk_hw*[]){
  1862. &disp1_cc_mdss_dptx2_aux_clk_src.clkr.hw,
  1863. },
  1864. .num_parents = 1,
  1865. .flags = CLK_SET_RATE_PARENT,
  1866. .ops = &clk_branch2_ops,
  1867. },
  1868. },
  1869. };
  1870. static struct clk_branch disp0_cc_mdss_dptx2_link_clk = {
  1871. .halt_reg = 0x2090,
  1872. .halt_check = BRANCH_HALT,
  1873. .clkr = {
  1874. .enable_reg = 0x2090,
  1875. .enable_mask = BIT(0),
  1876. .hw.init = &(const struct clk_init_data) {
  1877. .name = "disp0_cc_mdss_dptx2_link_clk",
  1878. .parent_hws = (const struct clk_hw*[]){
  1879. &disp0_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1880. },
  1881. .num_parents = 1,
  1882. .flags = CLK_SET_RATE_PARENT,
  1883. .ops = &clk_branch2_ops,
  1884. },
  1885. },
  1886. };
  1887. static struct clk_branch disp1_cc_mdss_dptx2_link_clk = {
  1888. .halt_reg = 0x2090,
  1889. .halt_check = BRANCH_HALT,
  1890. .clkr = {
  1891. .enable_reg = 0x2090,
  1892. .enable_mask = BIT(0),
  1893. .hw.init = &(const struct clk_init_data) {
  1894. .name = "disp1_cc_mdss_dptx2_link_clk",
  1895. .parent_hws = (const struct clk_hw*[]){
  1896. &disp1_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1897. },
  1898. .num_parents = 1,
  1899. .flags = CLK_SET_RATE_PARENT,
  1900. .ops = &clk_branch2_ops,
  1901. },
  1902. },
  1903. };
  1904. static struct clk_branch disp0_cc_mdss_dptx2_link_intf_clk = {
  1905. .halt_reg = 0x2094,
  1906. .halt_check = BRANCH_HALT,
  1907. .clkr = {
  1908. .enable_reg = 0x2094,
  1909. .enable_mask = BIT(0),
  1910. .hw.init = &(const struct clk_init_data) {
  1911. .name = "disp0_cc_mdss_dptx2_link_intf_clk",
  1912. .parent_hws = (const struct clk_hw*[]){
  1913. &disp0_cc_mdss_dptx2_link_div_clk_src.clkr.hw,
  1914. },
  1915. .num_parents = 1,
  1916. .flags = CLK_SET_RATE_PARENT,
  1917. .ops = &clk_branch2_ops,
  1918. },
  1919. },
  1920. };
  1921. static struct clk_branch disp1_cc_mdss_dptx2_link_intf_clk = {
  1922. .halt_reg = 0x2094,
  1923. .halt_check = BRANCH_HALT,
  1924. .clkr = {
  1925. .enable_reg = 0x2094,
  1926. .enable_mask = BIT(0),
  1927. .hw.init = &(const struct clk_init_data) {
  1928. .name = "disp1_cc_mdss_dptx2_link_intf_clk",
  1929. .parent_hws = (const struct clk_hw*[]){
  1930. &disp1_cc_mdss_dptx2_link_div_clk_src.clkr.hw,
  1931. },
  1932. .num_parents = 1,
  1933. .flags = CLK_SET_RATE_PARENT,
  1934. .ops = &clk_branch2_ops,
  1935. },
  1936. },
  1937. };
  1938. static struct clk_branch disp0_cc_mdss_dptx2_pixel0_clk = {
  1939. .halt_reg = 0x207c,
  1940. .halt_check = BRANCH_HALT,
  1941. .clkr = {
  1942. .enable_reg = 0x207c,
  1943. .enable_mask = BIT(0),
  1944. .hw.init = &(const struct clk_init_data) {
  1945. .name = "disp0_cc_mdss_dptx2_pixel0_clk",
  1946. .parent_hws = (const struct clk_hw*[]){
  1947. &disp0_cc_mdss_dptx2_pixel0_clk_src.clkr.hw,
  1948. },
  1949. .num_parents = 1,
  1950. .flags = CLK_SET_RATE_PARENT,
  1951. .ops = &clk_branch2_ops,
  1952. },
  1953. },
  1954. };
  1955. static struct clk_branch disp1_cc_mdss_dptx2_pixel0_clk = {
  1956. .halt_reg = 0x207c,
  1957. .halt_check = BRANCH_HALT,
  1958. .clkr = {
  1959. .enable_reg = 0x207c,
  1960. .enable_mask = BIT(0),
  1961. .hw.init = &(const struct clk_init_data) {
  1962. .name = "disp1_cc_mdss_dptx2_pixel0_clk",
  1963. .parent_hws = (const struct clk_hw*[]){
  1964. &disp1_cc_mdss_dptx2_pixel0_clk_src.clkr.hw,
  1965. },
  1966. .num_parents = 1,
  1967. .flags = CLK_SET_RATE_PARENT,
  1968. .ops = &clk_branch2_ops,
  1969. },
  1970. },
  1971. };
  1972. static struct clk_branch disp0_cc_mdss_dptx2_pixel1_clk = {
  1973. .halt_reg = 0x2080,
  1974. .halt_check = BRANCH_HALT,
  1975. .clkr = {
  1976. .enable_reg = 0x2080,
  1977. .enable_mask = BIT(0),
  1978. .hw.init = &(const struct clk_init_data) {
  1979. .name = "disp0_cc_mdss_dptx2_pixel1_clk",
  1980. .parent_hws = (const struct clk_hw*[]){
  1981. &disp0_cc_mdss_dptx2_pixel1_clk_src.clkr.hw,
  1982. },
  1983. .num_parents = 1,
  1984. .flags = CLK_SET_RATE_PARENT,
  1985. .ops = &clk_branch2_ops,
  1986. },
  1987. },
  1988. };
  1989. static struct clk_branch disp1_cc_mdss_dptx2_pixel1_clk = {
  1990. .halt_reg = 0x2080,
  1991. .halt_check = BRANCH_HALT,
  1992. .clkr = {
  1993. .enable_reg = 0x2080,
  1994. .enable_mask = BIT(0),
  1995. .hw.init = &(const struct clk_init_data) {
  1996. .name = "disp1_cc_mdss_dptx2_pixel1_clk",
  1997. .parent_hws = (const struct clk_hw*[]){
  1998. &disp1_cc_mdss_dptx2_pixel1_clk_src.clkr.hw,
  1999. },
  2000. .num_parents = 1,
  2001. .flags = CLK_SET_RATE_PARENT,
  2002. .ops = &clk_branch2_ops,
  2003. },
  2004. },
  2005. };
  2006. static struct clk_branch disp0_cc_mdss_dptx3_aux_clk = {
  2007. .halt_reg = 0x20b8,
  2008. .halt_check = BRANCH_HALT,
  2009. .clkr = {
  2010. .enable_reg = 0x20b8,
  2011. .enable_mask = BIT(0),
  2012. .hw.init = &(const struct clk_init_data) {
  2013. .name = "disp0_cc_mdss_dptx3_aux_clk",
  2014. .parent_hws = (const struct clk_hw*[]){
  2015. &disp0_cc_mdss_dptx3_aux_clk_src.clkr.hw,
  2016. },
  2017. .num_parents = 1,
  2018. .flags = CLK_SET_RATE_PARENT,
  2019. .ops = &clk_branch2_ops,
  2020. },
  2021. },
  2022. };
  2023. static struct clk_branch disp1_cc_mdss_dptx3_aux_clk = {
  2024. .halt_reg = 0x20b8,
  2025. .halt_check = BRANCH_HALT,
  2026. .clkr = {
  2027. .enable_reg = 0x20b8,
  2028. .enable_mask = BIT(0),
  2029. .hw.init = &(const struct clk_init_data) {
  2030. .name = "disp1_cc_mdss_dptx3_aux_clk",
  2031. .parent_hws = (const struct clk_hw*[]){
  2032. &disp1_cc_mdss_dptx3_aux_clk_src.clkr.hw,
  2033. },
  2034. .num_parents = 1,
  2035. .flags = CLK_SET_RATE_PARENT,
  2036. .ops = &clk_branch2_ops,
  2037. },
  2038. },
  2039. };
  2040. static struct clk_branch disp0_cc_mdss_dptx3_link_clk = {
  2041. .halt_reg = 0x20ac,
  2042. .halt_check = BRANCH_HALT,
  2043. .clkr = {
  2044. .enable_reg = 0x20ac,
  2045. .enable_mask = BIT(0),
  2046. .hw.init = &(const struct clk_init_data) {
  2047. .name = "disp0_cc_mdss_dptx3_link_clk",
  2048. .parent_hws = (const struct clk_hw*[]){
  2049. &disp0_cc_mdss_dptx3_link_clk_src.clkr.hw,
  2050. },
  2051. .num_parents = 1,
  2052. .flags = CLK_SET_RATE_PARENT,
  2053. .ops = &clk_branch2_ops,
  2054. },
  2055. },
  2056. };
  2057. static struct clk_branch disp1_cc_mdss_dptx3_link_clk = {
  2058. .halt_reg = 0x20ac,
  2059. .halt_check = BRANCH_HALT,
  2060. .clkr = {
  2061. .enable_reg = 0x20ac,
  2062. .enable_mask = BIT(0),
  2063. .hw.init = &(const struct clk_init_data) {
  2064. .name = "disp1_cc_mdss_dptx3_link_clk",
  2065. .parent_hws = (const struct clk_hw*[]){
  2066. &disp1_cc_mdss_dptx3_link_clk_src.clkr.hw,
  2067. },
  2068. .num_parents = 1,
  2069. .flags = CLK_SET_RATE_PARENT,
  2070. .ops = &clk_branch2_ops,
  2071. },
  2072. },
  2073. };
  2074. static struct clk_branch disp0_cc_mdss_dptx3_link_intf_clk = {
  2075. .halt_reg = 0x20b0,
  2076. .halt_check = BRANCH_HALT,
  2077. .clkr = {
  2078. .enable_reg = 0x20b0,
  2079. .enable_mask = BIT(0),
  2080. .hw.init = &(const struct clk_init_data) {
  2081. .name = "disp0_cc_mdss_dptx3_link_intf_clk",
  2082. .parent_hws = (const struct clk_hw*[]){
  2083. &disp0_cc_mdss_dptx3_link_div_clk_src.clkr.hw,
  2084. },
  2085. .num_parents = 1,
  2086. .flags = CLK_SET_RATE_PARENT,
  2087. .ops = &clk_branch2_ops,
  2088. },
  2089. },
  2090. };
  2091. static struct clk_branch disp1_cc_mdss_dptx3_link_intf_clk = {
  2092. .halt_reg = 0x20b0,
  2093. .halt_check = BRANCH_HALT,
  2094. .clkr = {
  2095. .enable_reg = 0x20b0,
  2096. .enable_mask = BIT(0),
  2097. .hw.init = &(const struct clk_init_data) {
  2098. .name = "disp1_cc_mdss_dptx3_link_intf_clk",
  2099. .parent_hws = (const struct clk_hw*[]){
  2100. &disp1_cc_mdss_dptx3_link_div_clk_src.clkr.hw,
  2101. },
  2102. .num_parents = 1,
  2103. .flags = CLK_SET_RATE_PARENT,
  2104. .ops = &clk_branch2_ops,
  2105. },
  2106. },
  2107. };
  2108. static struct clk_branch disp0_cc_mdss_dptx3_pixel0_clk = {
  2109. .halt_reg = 0x20a8,
  2110. .halt_check = BRANCH_HALT,
  2111. .clkr = {
  2112. .enable_reg = 0x20a8,
  2113. .enable_mask = BIT(0),
  2114. .hw.init = &(const struct clk_init_data) {
  2115. .name = "disp0_cc_mdss_dptx3_pixel0_clk",
  2116. .parent_hws = (const struct clk_hw*[]){
  2117. &disp0_cc_mdss_dptx3_pixel0_clk_src.clkr.hw,
  2118. },
  2119. .num_parents = 1,
  2120. .flags = CLK_SET_RATE_PARENT,
  2121. .ops = &clk_branch2_ops,
  2122. },
  2123. },
  2124. };
  2125. static struct clk_branch disp1_cc_mdss_dptx3_pixel0_clk = {
  2126. .halt_reg = 0x20a8,
  2127. .halt_check = BRANCH_HALT,
  2128. .clkr = {
  2129. .enable_reg = 0x20a8,
  2130. .enable_mask = BIT(0),
  2131. .hw.init = &(const struct clk_init_data) {
  2132. .name = "disp1_cc_mdss_dptx3_pixel0_clk",
  2133. .parent_hws = (const struct clk_hw*[]){
  2134. &disp1_cc_mdss_dptx3_pixel0_clk_src.clkr.hw,
  2135. },
  2136. .num_parents = 1,
  2137. .flags = CLK_SET_RATE_PARENT,
  2138. .ops = &clk_branch2_ops,
  2139. },
  2140. },
  2141. };
  2142. static struct clk_branch disp0_cc_mdss_esc0_clk = {
  2143. .halt_reg = 0x2054,
  2144. .halt_check = BRANCH_HALT,
  2145. .clkr = {
  2146. .enable_reg = 0x2054,
  2147. .enable_mask = BIT(0),
  2148. .hw.init = &(const struct clk_init_data) {
  2149. .name = "disp0_cc_mdss_esc0_clk",
  2150. .parent_hws = (const struct clk_hw*[]){
  2151. &disp0_cc_mdss_esc0_clk_src.clkr.hw,
  2152. },
  2153. .num_parents = 1,
  2154. .flags = CLK_SET_RATE_PARENT,
  2155. .ops = &clk_branch2_ops,
  2156. },
  2157. },
  2158. };
  2159. static struct clk_branch disp1_cc_mdss_esc0_clk = {
  2160. .halt_reg = 0x2054,
  2161. .halt_check = BRANCH_HALT,
  2162. .clkr = {
  2163. .enable_reg = 0x2054,
  2164. .enable_mask = BIT(0),
  2165. .hw.init = &(const struct clk_init_data) {
  2166. .name = "disp1_cc_mdss_esc0_clk",
  2167. .parent_hws = (const struct clk_hw*[]){
  2168. &disp1_cc_mdss_esc0_clk_src.clkr.hw,
  2169. },
  2170. .num_parents = 1,
  2171. .flags = CLK_SET_RATE_PARENT,
  2172. .ops = &clk_branch2_ops,
  2173. },
  2174. },
  2175. };
  2176. static struct clk_branch disp0_cc_mdss_esc1_clk = {
  2177. .halt_reg = 0x2058,
  2178. .halt_check = BRANCH_HALT,
  2179. .clkr = {
  2180. .enable_reg = 0x2058,
  2181. .enable_mask = BIT(0),
  2182. .hw.init = &(const struct clk_init_data) {
  2183. .name = "disp0_cc_mdss_esc1_clk",
  2184. .parent_hws = (const struct clk_hw*[]){
  2185. &disp0_cc_mdss_esc1_clk_src.clkr.hw,
  2186. },
  2187. .num_parents = 1,
  2188. .flags = CLK_SET_RATE_PARENT,
  2189. .ops = &clk_branch2_ops,
  2190. },
  2191. },
  2192. };
  2193. static struct clk_branch disp1_cc_mdss_esc1_clk = {
  2194. .halt_reg = 0x2058,
  2195. .halt_check = BRANCH_HALT,
  2196. .clkr = {
  2197. .enable_reg = 0x2058,
  2198. .enable_mask = BIT(0),
  2199. .hw.init = &(const struct clk_init_data) {
  2200. .name = "disp1_cc_mdss_esc1_clk",
  2201. .parent_hws = (const struct clk_hw*[]){
  2202. &disp1_cc_mdss_esc1_clk_src.clkr.hw,
  2203. },
  2204. .num_parents = 1,
  2205. .flags = CLK_SET_RATE_PARENT,
  2206. .ops = &clk_branch2_ops,
  2207. },
  2208. },
  2209. };
  2210. static struct clk_branch disp0_cc_mdss_mdp1_clk = {
  2211. .halt_reg = 0x2014,
  2212. .halt_check = BRANCH_HALT,
  2213. .clkr = {
  2214. .enable_reg = 0x2014,
  2215. .enable_mask = BIT(0),
  2216. .hw.init = &(const struct clk_init_data) {
  2217. .name = "disp0_cc_mdss_mdp1_clk",
  2218. .parent_hws = (const struct clk_hw*[]){
  2219. &disp0_cc_mdss_mdp_clk_src.clkr.hw,
  2220. },
  2221. .num_parents = 1,
  2222. .flags = CLK_SET_RATE_PARENT,
  2223. .ops = &clk_branch2_ops,
  2224. },
  2225. },
  2226. };
  2227. static struct clk_branch disp1_cc_mdss_mdp1_clk = {
  2228. .halt_reg = 0x2014,
  2229. .halt_check = BRANCH_HALT,
  2230. .clkr = {
  2231. .enable_reg = 0x2014,
  2232. .enable_mask = BIT(0),
  2233. .hw.init = &(const struct clk_init_data) {
  2234. .name = "disp1_cc_mdss_mdp1_clk",
  2235. .parent_hws = (const struct clk_hw*[]){
  2236. &disp1_cc_mdss_mdp_clk_src.clkr.hw,
  2237. },
  2238. .num_parents = 1,
  2239. .flags = CLK_SET_RATE_PARENT,
  2240. .ops = &clk_branch2_ops,
  2241. },
  2242. },
  2243. };
  2244. static struct clk_branch disp0_cc_mdss_mdp_clk = {
  2245. .halt_reg = 0x200c,
  2246. .halt_check = BRANCH_HALT,
  2247. .clkr = {
  2248. .enable_reg = 0x200c,
  2249. .enable_mask = BIT(0),
  2250. .hw.init = &(const struct clk_init_data) {
  2251. .name = "disp0_cc_mdss_mdp_clk",
  2252. .parent_hws = (const struct clk_hw*[]){
  2253. &disp0_cc_mdss_mdp_clk_src.clkr.hw,
  2254. },
  2255. .num_parents = 1,
  2256. .flags = CLK_SET_RATE_PARENT,
  2257. .ops = &clk_branch2_ops,
  2258. },
  2259. },
  2260. };
  2261. static struct clk_branch disp1_cc_mdss_mdp_clk = {
  2262. .halt_reg = 0x200c,
  2263. .halt_check = BRANCH_HALT,
  2264. .clkr = {
  2265. .enable_reg = 0x200c,
  2266. .enable_mask = BIT(0),
  2267. .hw.init = &(const struct clk_init_data) {
  2268. .name = "disp1_cc_mdss_mdp_clk",
  2269. .parent_hws = (const struct clk_hw*[]){
  2270. &disp1_cc_mdss_mdp_clk_src.clkr.hw,
  2271. },
  2272. .num_parents = 1,
  2273. .flags = CLK_SET_RATE_PARENT,
  2274. .ops = &clk_branch2_ops,
  2275. },
  2276. },
  2277. };
  2278. static struct clk_branch disp0_cc_mdss_mdp_lut1_clk = {
  2279. .halt_reg = 0x2034,
  2280. .halt_check = BRANCH_HALT,
  2281. .clkr = {
  2282. .enable_reg = 0x2034,
  2283. .enable_mask = BIT(0),
  2284. .hw.init = &(const struct clk_init_data) {
  2285. .name = "disp0_cc_mdss_mdp_lut1_clk",
  2286. .parent_hws = (const struct clk_hw*[]){
  2287. &disp0_cc_mdss_mdp_clk_src.clkr.hw,
  2288. },
  2289. .num_parents = 1,
  2290. .flags = CLK_SET_RATE_PARENT,
  2291. .ops = &clk_branch2_ops,
  2292. },
  2293. },
  2294. };
  2295. static struct clk_branch disp1_cc_mdss_mdp_lut1_clk = {
  2296. .halt_reg = 0x2034,
  2297. .halt_check = BRANCH_HALT,
  2298. .clkr = {
  2299. .enable_reg = 0x2034,
  2300. .enable_mask = BIT(0),
  2301. .hw.init = &(const struct clk_init_data) {
  2302. .name = "disp1_cc_mdss_mdp_lut1_clk",
  2303. .parent_hws = (const struct clk_hw*[]){
  2304. &disp1_cc_mdss_mdp_clk_src.clkr.hw,
  2305. },
  2306. .num_parents = 1,
  2307. .flags = CLK_SET_RATE_PARENT,
  2308. .ops = &clk_branch2_ops,
  2309. },
  2310. },
  2311. };
  2312. static struct clk_branch disp0_cc_mdss_mdp_lut_clk = {
  2313. .halt_reg = 0x202c,
  2314. .halt_check = BRANCH_HALT_VOTED,
  2315. .clkr = {
  2316. .enable_reg = 0x202c,
  2317. .enable_mask = BIT(0),
  2318. .hw.init = &(const struct clk_init_data) {
  2319. .name = "disp0_cc_mdss_mdp_lut_clk",
  2320. .parent_hws = (const struct clk_hw*[]){
  2321. &disp0_cc_mdss_mdp_clk_src.clkr.hw,
  2322. },
  2323. .num_parents = 1,
  2324. .flags = CLK_SET_RATE_PARENT,
  2325. .ops = &clk_branch2_ops,
  2326. },
  2327. },
  2328. };
  2329. static struct clk_branch disp1_cc_mdss_mdp_lut_clk = {
  2330. .halt_reg = 0x202c,
  2331. .halt_check = BRANCH_HALT_VOTED,
  2332. .clkr = {
  2333. .enable_reg = 0x202c,
  2334. .enable_mask = BIT(0),
  2335. .hw.init = &(const struct clk_init_data) {
  2336. .name = "disp1_cc_mdss_mdp_lut_clk",
  2337. .parent_hws = (const struct clk_hw*[]){
  2338. &disp1_cc_mdss_mdp_clk_src.clkr.hw,
  2339. },
  2340. .num_parents = 1,
  2341. .flags = CLK_SET_RATE_PARENT,
  2342. .ops = &clk_branch2_ops,
  2343. },
  2344. },
  2345. };
  2346. static struct clk_branch disp0_cc_mdss_non_gdsc_ahb_clk = {
  2347. .halt_reg = 0x4004,
  2348. .halt_check = BRANCH_HALT_VOTED,
  2349. .clkr = {
  2350. .enable_reg = 0x4004,
  2351. .enable_mask = BIT(0),
  2352. .hw.init = &(const struct clk_init_data) {
  2353. .name = "disp0_cc_mdss_non_gdsc_ahb_clk",
  2354. .parent_hws = (const struct clk_hw*[]){
  2355. &disp0_cc_mdss_ahb_clk_src.clkr.hw,
  2356. },
  2357. .num_parents = 1,
  2358. .flags = CLK_SET_RATE_PARENT,
  2359. .ops = &clk_branch2_ops,
  2360. },
  2361. },
  2362. };
  2363. static struct clk_branch disp1_cc_mdss_non_gdsc_ahb_clk = {
  2364. .halt_reg = 0x4004,
  2365. .halt_check = BRANCH_HALT_VOTED,
  2366. .clkr = {
  2367. .enable_reg = 0x4004,
  2368. .enable_mask = BIT(0),
  2369. .hw.init = &(const struct clk_init_data) {
  2370. .name = "disp1_cc_mdss_non_gdsc_ahb_clk",
  2371. .parent_hws = (const struct clk_hw*[]){
  2372. &disp1_cc_mdss_ahb_clk_src.clkr.hw,
  2373. },
  2374. .num_parents = 1,
  2375. .flags = CLK_SET_RATE_PARENT,
  2376. .ops = &clk_branch2_ops,
  2377. },
  2378. },
  2379. };
  2380. static struct clk_branch disp0_cc_mdss_pclk0_clk = {
  2381. .halt_reg = 0x2004,
  2382. .halt_check = BRANCH_HALT,
  2383. .clkr = {
  2384. .enable_reg = 0x2004,
  2385. .enable_mask = BIT(0),
  2386. .hw.init = &(const struct clk_init_data) {
  2387. .name = "disp0_cc_mdss_pclk0_clk",
  2388. .parent_hws = (const struct clk_hw*[]){
  2389. &disp0_cc_mdss_pclk0_clk_src.clkr.hw,
  2390. },
  2391. .num_parents = 1,
  2392. .flags = CLK_SET_RATE_PARENT,
  2393. .ops = &clk_branch2_ops,
  2394. },
  2395. },
  2396. };
  2397. static struct clk_branch disp1_cc_mdss_pclk0_clk = {
  2398. .halt_reg = 0x2004,
  2399. .halt_check = BRANCH_HALT,
  2400. .clkr = {
  2401. .enable_reg = 0x2004,
  2402. .enable_mask = BIT(0),
  2403. .hw.init = &(const struct clk_init_data) {
  2404. .name = "disp1_cc_mdss_pclk0_clk",
  2405. .parent_hws = (const struct clk_hw*[]){
  2406. &disp1_cc_mdss_pclk0_clk_src.clkr.hw,
  2407. },
  2408. .num_parents = 1,
  2409. .flags = CLK_SET_RATE_PARENT,
  2410. .ops = &clk_branch2_ops,
  2411. },
  2412. },
  2413. };
  2414. static struct clk_branch disp0_cc_mdss_pclk1_clk = {
  2415. .halt_reg = 0x2008,
  2416. .halt_check = BRANCH_HALT,
  2417. .clkr = {
  2418. .enable_reg = 0x2008,
  2419. .enable_mask = BIT(0),
  2420. .hw.init = &(const struct clk_init_data) {
  2421. .name = "disp0_cc_mdss_pclk1_clk",
  2422. .parent_hws = (const struct clk_hw*[]){
  2423. &disp0_cc_mdss_pclk1_clk_src.clkr.hw,
  2424. },
  2425. .num_parents = 1,
  2426. .flags = CLK_SET_RATE_PARENT,
  2427. .ops = &clk_branch2_ops,
  2428. },
  2429. },
  2430. };
  2431. static struct clk_branch disp1_cc_mdss_pclk1_clk = {
  2432. .halt_reg = 0x2008,
  2433. .halt_check = BRANCH_HALT,
  2434. .clkr = {
  2435. .enable_reg = 0x2008,
  2436. .enable_mask = BIT(0),
  2437. .hw.init = &(const struct clk_init_data) {
  2438. .name = "disp1_cc_mdss_pclk1_clk",
  2439. .parent_hws = (const struct clk_hw*[]){
  2440. &disp1_cc_mdss_pclk1_clk_src.clkr.hw,
  2441. },
  2442. .num_parents = 1,
  2443. .flags = CLK_SET_RATE_PARENT,
  2444. .ops = &clk_branch2_ops,
  2445. },
  2446. },
  2447. };
  2448. static struct clk_branch disp0_cc_mdss_rot1_clk = {
  2449. .halt_reg = 0x2024,
  2450. .halt_check = BRANCH_HALT,
  2451. .clkr = {
  2452. .enable_reg = 0x2024,
  2453. .enable_mask = BIT(0),
  2454. .hw.init = &(const struct clk_init_data) {
  2455. .name = "disp0_cc_mdss_rot1_clk",
  2456. .parent_hws = (const struct clk_hw*[]){
  2457. &disp0_cc_mdss_rot_clk_src.clkr.hw,
  2458. },
  2459. .num_parents = 1,
  2460. .flags = CLK_SET_RATE_PARENT,
  2461. .ops = &clk_branch2_ops,
  2462. },
  2463. },
  2464. };
  2465. static struct clk_branch disp1_cc_mdss_rot1_clk = {
  2466. .halt_reg = 0x2024,
  2467. .halt_check = BRANCH_HALT,
  2468. .clkr = {
  2469. .enable_reg = 0x2024,
  2470. .enable_mask = BIT(0),
  2471. .hw.init = &(const struct clk_init_data) {
  2472. .name = "disp1_cc_mdss_rot1_clk",
  2473. .parent_hws = (const struct clk_hw*[]){
  2474. &disp1_cc_mdss_rot_clk_src.clkr.hw,
  2475. },
  2476. .num_parents = 1,
  2477. .flags = CLK_SET_RATE_PARENT,
  2478. .ops = &clk_branch2_ops,
  2479. },
  2480. },
  2481. };
  2482. static struct clk_branch disp0_cc_mdss_rot_clk = {
  2483. .halt_reg = 0x201c,
  2484. .halt_check = BRANCH_HALT,
  2485. .clkr = {
  2486. .enable_reg = 0x201c,
  2487. .enable_mask = BIT(0),
  2488. .hw.init = &(const struct clk_init_data) {
  2489. .name = "disp0_cc_mdss_rot_clk",
  2490. .parent_hws = (const struct clk_hw*[]){
  2491. &disp0_cc_mdss_rot_clk_src.clkr.hw,
  2492. },
  2493. .num_parents = 1,
  2494. .flags = CLK_SET_RATE_PARENT,
  2495. .ops = &clk_branch2_ops,
  2496. },
  2497. },
  2498. };
  2499. static struct clk_branch disp1_cc_mdss_rot_clk = {
  2500. .halt_reg = 0x201c,
  2501. .halt_check = BRANCH_HALT,
  2502. .clkr = {
  2503. .enable_reg = 0x201c,
  2504. .enable_mask = BIT(0),
  2505. .hw.init = &(const struct clk_init_data) {
  2506. .name = "disp1_cc_mdss_rot_clk",
  2507. .parent_hws = (const struct clk_hw*[]){
  2508. &disp1_cc_mdss_rot_clk_src.clkr.hw,
  2509. },
  2510. .num_parents = 1,
  2511. .flags = CLK_SET_RATE_PARENT,
  2512. .ops = &clk_branch2_ops,
  2513. },
  2514. },
  2515. };
  2516. static struct clk_branch disp0_cc_mdss_rscc_ahb_clk = {
  2517. .halt_reg = 0x400c,
  2518. .halt_check = BRANCH_HALT,
  2519. .clkr = {
  2520. .enable_reg = 0x400c,
  2521. .enable_mask = BIT(0),
  2522. .hw.init = &(const struct clk_init_data) {
  2523. .name = "disp0_cc_mdss_rscc_ahb_clk",
  2524. .parent_hws = (const struct clk_hw*[]){
  2525. &disp0_cc_mdss_ahb_clk_src.clkr.hw,
  2526. },
  2527. .num_parents = 1,
  2528. .flags = CLK_SET_RATE_PARENT,
  2529. .ops = &clk_branch2_ops,
  2530. },
  2531. },
  2532. };
  2533. static struct clk_branch disp1_cc_mdss_rscc_ahb_clk = {
  2534. .halt_reg = 0x400c,
  2535. .halt_check = BRANCH_HALT,
  2536. .clkr = {
  2537. .enable_reg = 0x400c,
  2538. .enable_mask = BIT(0),
  2539. .hw.init = &(const struct clk_init_data) {
  2540. .name = "disp1_cc_mdss_rscc_ahb_clk",
  2541. .parent_hws = (const struct clk_hw*[]){
  2542. &disp1_cc_mdss_ahb_clk_src.clkr.hw,
  2543. },
  2544. .num_parents = 1,
  2545. .flags = CLK_SET_RATE_PARENT,
  2546. .ops = &clk_branch2_ops,
  2547. },
  2548. },
  2549. };
  2550. static struct clk_branch disp0_cc_mdss_rscc_vsync_clk = {
  2551. .halt_reg = 0x4008,
  2552. .halt_check = BRANCH_HALT,
  2553. .clkr = {
  2554. .enable_reg = 0x4008,
  2555. .enable_mask = BIT(0),
  2556. .hw.init = &(const struct clk_init_data) {
  2557. .name = "disp0_cc_mdss_rscc_vsync_clk",
  2558. .parent_hws = (const struct clk_hw*[]){
  2559. &disp0_cc_mdss_vsync_clk_src.clkr.hw,
  2560. },
  2561. .num_parents = 1,
  2562. .flags = CLK_SET_RATE_PARENT,
  2563. .ops = &clk_branch2_ops,
  2564. },
  2565. },
  2566. };
  2567. static struct clk_branch disp1_cc_mdss_rscc_vsync_clk = {
  2568. .halt_reg = 0x4008,
  2569. .halt_check = BRANCH_HALT,
  2570. .clkr = {
  2571. .enable_reg = 0x4008,
  2572. .enable_mask = BIT(0),
  2573. .hw.init = &(const struct clk_init_data) {
  2574. .name = "disp1_cc_mdss_rscc_vsync_clk",
  2575. .parent_hws = (const struct clk_hw*[]){
  2576. &disp1_cc_mdss_vsync_clk_src.clkr.hw,
  2577. },
  2578. .num_parents = 1,
  2579. .flags = CLK_SET_RATE_PARENT,
  2580. .ops = &clk_branch2_ops,
  2581. },
  2582. },
  2583. };
  2584. static struct clk_branch disp0_cc_mdss_vsync1_clk = {
  2585. .halt_reg = 0x2040,
  2586. .halt_check = BRANCH_HALT,
  2587. .clkr = {
  2588. .enable_reg = 0x2040,
  2589. .enable_mask = BIT(0),
  2590. .hw.init = &(const struct clk_init_data) {
  2591. .name = "disp0_cc_mdss_vsync1_clk",
  2592. .parent_hws = (const struct clk_hw*[]){
  2593. &disp0_cc_mdss_vsync_clk_src.clkr.hw,
  2594. },
  2595. .num_parents = 1,
  2596. .flags = CLK_SET_RATE_PARENT,
  2597. .ops = &clk_branch2_ops,
  2598. },
  2599. },
  2600. };
  2601. static struct clk_branch disp1_cc_mdss_vsync1_clk = {
  2602. .halt_reg = 0x2040,
  2603. .halt_check = BRANCH_HALT,
  2604. .clkr = {
  2605. .enable_reg = 0x2040,
  2606. .enable_mask = BIT(0),
  2607. .hw.init = &(const struct clk_init_data) {
  2608. .name = "disp1_cc_mdss_vsync1_clk",
  2609. .parent_hws = (const struct clk_hw*[]){
  2610. &disp1_cc_mdss_vsync_clk_src.clkr.hw,
  2611. },
  2612. .num_parents = 1,
  2613. .flags = CLK_SET_RATE_PARENT,
  2614. .ops = &clk_branch2_ops,
  2615. },
  2616. },
  2617. };
  2618. static struct clk_branch disp0_cc_mdss_vsync_clk = {
  2619. .halt_reg = 0x203c,
  2620. .halt_check = BRANCH_HALT,
  2621. .clkr = {
  2622. .enable_reg = 0x203c,
  2623. .enable_mask = BIT(0),
  2624. .hw.init = &(const struct clk_init_data) {
  2625. .name = "disp0_cc_mdss_vsync_clk",
  2626. .parent_hws = (const struct clk_hw*[]){
  2627. &disp0_cc_mdss_vsync_clk_src.clkr.hw,
  2628. },
  2629. .num_parents = 1,
  2630. .flags = CLK_SET_RATE_PARENT,
  2631. .ops = &clk_branch2_ops,
  2632. },
  2633. },
  2634. };
  2635. static struct clk_branch disp1_cc_mdss_vsync_clk = {
  2636. .halt_reg = 0x203c,
  2637. .halt_check = BRANCH_HALT,
  2638. .clkr = {
  2639. .enable_reg = 0x203c,
  2640. .enable_mask = BIT(0),
  2641. .hw.init = &(const struct clk_init_data) {
  2642. .name = "disp1_cc_mdss_vsync_clk",
  2643. .parent_hws = (const struct clk_hw*[]){
  2644. &disp1_cc_mdss_vsync_clk_src.clkr.hw,
  2645. },
  2646. .num_parents = 1,
  2647. .flags = CLK_SET_RATE_PARENT,
  2648. .ops = &clk_branch2_ops,
  2649. },
  2650. },
  2651. };
  2652. static struct clk_branch disp0_cc_sleep_clk = {
  2653. .halt_reg = 0x6078,
  2654. .halt_check = BRANCH_HALT,
  2655. .clkr = {
  2656. .enable_reg = 0x6078,
  2657. .enable_mask = BIT(0),
  2658. .hw.init = &(const struct clk_init_data) {
  2659. .name = "disp0_cc_sleep_clk",
  2660. .parent_hws = (const struct clk_hw*[]){
  2661. &disp0_cc_sleep_clk_src.clkr.hw,
  2662. },
  2663. .num_parents = 1,
  2664. .flags = CLK_SET_RATE_PARENT,
  2665. .ops = &clk_branch2_ops,
  2666. },
  2667. },
  2668. };
  2669. static struct clk_branch disp1_cc_sleep_clk = {
  2670. .halt_reg = 0x6078,
  2671. .halt_check = BRANCH_HALT,
  2672. .clkr = {
  2673. .enable_reg = 0x6078,
  2674. .enable_mask = BIT(0),
  2675. .hw.init = &(const struct clk_init_data) {
  2676. .name = "disp1_cc_sleep_clk",
  2677. .parent_hws = (const struct clk_hw*[]){
  2678. &disp1_cc_sleep_clk_src.clkr.hw,
  2679. },
  2680. .num_parents = 1,
  2681. .flags = CLK_SET_RATE_PARENT,
  2682. .ops = &clk_branch2_ops,
  2683. },
  2684. },
  2685. };
  2686. static struct clk_regmap *disp0_cc_sc8280xp_clocks[] = {
  2687. [DISP_CC_MDSS_AHB1_CLK] = &disp0_cc_mdss_ahb1_clk.clkr,
  2688. [DISP_CC_MDSS_AHB_CLK] = &disp0_cc_mdss_ahb_clk.clkr,
  2689. [DISP_CC_MDSS_AHB_CLK_SRC] = &disp0_cc_mdss_ahb_clk_src.clkr,
  2690. [DISP_CC_MDSS_BYTE0_CLK] = &disp0_cc_mdss_byte0_clk.clkr,
  2691. [DISP_CC_MDSS_BYTE0_CLK_SRC] = &disp0_cc_mdss_byte0_clk_src.clkr,
  2692. [DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &disp0_cc_mdss_byte0_div_clk_src.clkr,
  2693. [DISP_CC_MDSS_BYTE0_INTF_CLK] = &disp0_cc_mdss_byte0_intf_clk.clkr,
  2694. [DISP_CC_MDSS_BYTE1_CLK] = &disp0_cc_mdss_byte1_clk.clkr,
  2695. [DISP_CC_MDSS_BYTE1_CLK_SRC] = &disp0_cc_mdss_byte1_clk_src.clkr,
  2696. [DISP_CC_MDSS_BYTE1_DIV_CLK_SRC] = &disp0_cc_mdss_byte1_div_clk_src.clkr,
  2697. [DISP_CC_MDSS_BYTE1_INTF_CLK] = &disp0_cc_mdss_byte1_intf_clk.clkr,
  2698. [DISP_CC_MDSS_DPTX0_AUX_CLK] = &disp0_cc_mdss_dptx0_aux_clk.clkr,
  2699. [DISP_CC_MDSS_DPTX0_AUX_CLK_SRC] = &disp0_cc_mdss_dptx0_aux_clk_src.clkr,
  2700. [DISP_CC_MDSS_DPTX0_LINK_CLK] = &disp0_cc_mdss_dptx0_link_clk.clkr,
  2701. [DISP_CC_MDSS_DPTX0_LINK_CLK_SRC] = &disp0_cc_mdss_dptx0_link_clk_src.clkr,
  2702. [DISP_CC_MDSS_DPTX0_LINK_DIV_CLK_SRC] = &disp0_cc_mdss_dptx0_link_div_clk_src.clkr,
  2703. [DISP_CC_MDSS_DPTX0_LINK_INTF_CLK] = &disp0_cc_mdss_dptx0_link_intf_clk.clkr,
  2704. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK] = &disp0_cc_mdss_dptx0_pixel0_clk.clkr,
  2705. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC] = &disp0_cc_mdss_dptx0_pixel0_clk_src.clkr,
  2706. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK] = &disp0_cc_mdss_dptx0_pixel1_clk.clkr,
  2707. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK_SRC] = &disp0_cc_mdss_dptx0_pixel1_clk_src.clkr,
  2708. [DISP_CC_MDSS_DPTX0_USB_ROUTER_LINK_INTF_CLK] = &disp0_cc_mdss_dptx0_usb_router_link_intf_clk.clkr,
  2709. [DISP_CC_MDSS_DPTX1_AUX_CLK] = &disp0_cc_mdss_dptx1_aux_clk.clkr,
  2710. [DISP_CC_MDSS_DPTX1_AUX_CLK_SRC] = &disp0_cc_mdss_dptx1_aux_clk_src.clkr,
  2711. [DISP_CC_MDSS_DPTX1_LINK_CLK] = &disp0_cc_mdss_dptx1_link_clk.clkr,
  2712. [DISP_CC_MDSS_DPTX1_LINK_CLK_SRC] = &disp0_cc_mdss_dptx1_link_clk_src.clkr,
  2713. [DISP_CC_MDSS_DPTX1_LINK_DIV_CLK_SRC] = &disp0_cc_mdss_dptx1_link_div_clk_src.clkr,
  2714. [DISP_CC_MDSS_DPTX1_LINK_INTF_CLK] = &disp0_cc_mdss_dptx1_link_intf_clk.clkr,
  2715. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK] = &disp0_cc_mdss_dptx1_pixel0_clk.clkr,
  2716. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK_SRC] = &disp0_cc_mdss_dptx1_pixel0_clk_src.clkr,
  2717. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK] = &disp0_cc_mdss_dptx1_pixel1_clk.clkr,
  2718. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK_SRC] = &disp0_cc_mdss_dptx1_pixel1_clk_src.clkr,
  2719. [DISP_CC_MDSS_DPTX1_USB_ROUTER_LINK_INTF_CLK] = &disp0_cc_mdss_dptx1_usb_router_link_intf_clk.clkr,
  2720. [DISP_CC_MDSS_DPTX2_AUX_CLK] = &disp0_cc_mdss_dptx2_aux_clk.clkr,
  2721. [DISP_CC_MDSS_DPTX2_AUX_CLK_SRC] = &disp0_cc_mdss_dptx2_aux_clk_src.clkr,
  2722. [DISP_CC_MDSS_DPTX2_LINK_CLK] = &disp0_cc_mdss_dptx2_link_clk.clkr,
  2723. [DISP_CC_MDSS_DPTX2_LINK_CLK_SRC] = &disp0_cc_mdss_dptx2_link_clk_src.clkr,
  2724. [DISP_CC_MDSS_DPTX2_LINK_DIV_CLK_SRC] = &disp0_cc_mdss_dptx2_link_div_clk_src.clkr,
  2725. [DISP_CC_MDSS_DPTX2_LINK_INTF_CLK] = &disp0_cc_mdss_dptx2_link_intf_clk.clkr,
  2726. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK] = &disp0_cc_mdss_dptx2_pixel0_clk.clkr,
  2727. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK_SRC] = &disp0_cc_mdss_dptx2_pixel0_clk_src.clkr,
  2728. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK] = &disp0_cc_mdss_dptx2_pixel1_clk.clkr,
  2729. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK_SRC] = &disp0_cc_mdss_dptx2_pixel1_clk_src.clkr,
  2730. [DISP_CC_MDSS_DPTX3_AUX_CLK] = &disp0_cc_mdss_dptx3_aux_clk.clkr,
  2731. [DISP_CC_MDSS_DPTX3_AUX_CLK_SRC] = &disp0_cc_mdss_dptx3_aux_clk_src.clkr,
  2732. [DISP_CC_MDSS_DPTX3_LINK_CLK] = &disp0_cc_mdss_dptx3_link_clk.clkr,
  2733. [DISP_CC_MDSS_DPTX3_LINK_CLK_SRC] = &disp0_cc_mdss_dptx3_link_clk_src.clkr,
  2734. [DISP_CC_MDSS_DPTX3_LINK_DIV_CLK_SRC] = &disp0_cc_mdss_dptx3_link_div_clk_src.clkr,
  2735. [DISP_CC_MDSS_DPTX3_LINK_INTF_CLK] = &disp0_cc_mdss_dptx3_link_intf_clk.clkr,
  2736. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK] = &disp0_cc_mdss_dptx3_pixel0_clk.clkr,
  2737. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK_SRC] = &disp0_cc_mdss_dptx3_pixel0_clk_src.clkr,
  2738. [DISP_CC_MDSS_ESC0_CLK] = &disp0_cc_mdss_esc0_clk.clkr,
  2739. [DISP_CC_MDSS_ESC0_CLK_SRC] = &disp0_cc_mdss_esc0_clk_src.clkr,
  2740. [DISP_CC_MDSS_ESC1_CLK] = &disp0_cc_mdss_esc1_clk.clkr,
  2741. [DISP_CC_MDSS_ESC1_CLK_SRC] = &disp0_cc_mdss_esc1_clk_src.clkr,
  2742. [DISP_CC_MDSS_MDP1_CLK] = &disp0_cc_mdss_mdp1_clk.clkr,
  2743. [DISP_CC_MDSS_MDP_CLK] = &disp0_cc_mdss_mdp_clk.clkr,
  2744. [DISP_CC_MDSS_MDP_CLK_SRC] = &disp0_cc_mdss_mdp_clk_src.clkr,
  2745. [DISP_CC_MDSS_MDP_LUT1_CLK] = &disp0_cc_mdss_mdp_lut1_clk.clkr,
  2746. [DISP_CC_MDSS_MDP_LUT_CLK] = &disp0_cc_mdss_mdp_lut_clk.clkr,
  2747. [DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &disp0_cc_mdss_non_gdsc_ahb_clk.clkr,
  2748. [DISP_CC_MDSS_PCLK0_CLK] = &disp0_cc_mdss_pclk0_clk.clkr,
  2749. [DISP_CC_MDSS_PCLK0_CLK_SRC] = &disp0_cc_mdss_pclk0_clk_src.clkr,
  2750. [DISP_CC_MDSS_PCLK1_CLK] = &disp0_cc_mdss_pclk1_clk.clkr,
  2751. [DISP_CC_MDSS_PCLK1_CLK_SRC] = &disp0_cc_mdss_pclk1_clk_src.clkr,
  2752. [DISP_CC_MDSS_ROT1_CLK] = &disp0_cc_mdss_rot1_clk.clkr,
  2753. [DISP_CC_MDSS_ROT_CLK] = &disp0_cc_mdss_rot_clk.clkr,
  2754. [DISP_CC_MDSS_ROT_CLK_SRC] = &disp0_cc_mdss_rot_clk_src.clkr,
  2755. [DISP_CC_MDSS_RSCC_AHB_CLK] = &disp0_cc_mdss_rscc_ahb_clk.clkr,
  2756. [DISP_CC_MDSS_RSCC_VSYNC_CLK] = &disp0_cc_mdss_rscc_vsync_clk.clkr,
  2757. [DISP_CC_MDSS_VSYNC1_CLK] = &disp0_cc_mdss_vsync1_clk.clkr,
  2758. [DISP_CC_MDSS_VSYNC_CLK] = &disp0_cc_mdss_vsync_clk.clkr,
  2759. [DISP_CC_MDSS_VSYNC_CLK_SRC] = &disp0_cc_mdss_vsync_clk_src.clkr,
  2760. [DISP_CC_PLL0] = &disp0_cc_pll0.clkr,
  2761. [DISP_CC_PLL1] = &disp0_cc_pll1.clkr,
  2762. [DISP_CC_PLL1_OUT_EVEN] = &disp0_cc_pll1_out_even.clkr,
  2763. [DISP_CC_PLL2] = &disp0_cc_pll2.clkr,
  2764. [DISP_CC_SLEEP_CLK] = &disp0_cc_sleep_clk.clkr,
  2765. [DISP_CC_SLEEP_CLK_SRC] = &disp0_cc_sleep_clk_src.clkr,
  2766. };
  2767. static struct clk_regmap *disp1_cc_sc8280xp_clocks[] = {
  2768. [DISP_CC_MDSS_AHB1_CLK] = &disp1_cc_mdss_ahb1_clk.clkr,
  2769. [DISP_CC_MDSS_AHB_CLK] = &disp1_cc_mdss_ahb_clk.clkr,
  2770. [DISP_CC_MDSS_AHB_CLK_SRC] = &disp1_cc_mdss_ahb_clk_src.clkr,
  2771. [DISP_CC_MDSS_BYTE0_CLK] = &disp1_cc_mdss_byte0_clk.clkr,
  2772. [DISP_CC_MDSS_BYTE0_CLK_SRC] = &disp1_cc_mdss_byte0_clk_src.clkr,
  2773. [DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &disp1_cc_mdss_byte0_div_clk_src.clkr,
  2774. [DISP_CC_MDSS_BYTE0_INTF_CLK] = &disp1_cc_mdss_byte0_intf_clk.clkr,
  2775. [DISP_CC_MDSS_BYTE1_CLK] = &disp1_cc_mdss_byte1_clk.clkr,
  2776. [DISP_CC_MDSS_BYTE1_CLK_SRC] = &disp1_cc_mdss_byte1_clk_src.clkr,
  2777. [DISP_CC_MDSS_BYTE1_DIV_CLK_SRC] = &disp1_cc_mdss_byte1_div_clk_src.clkr,
  2778. [DISP_CC_MDSS_BYTE1_INTF_CLK] = &disp1_cc_mdss_byte1_intf_clk.clkr,
  2779. [DISP_CC_MDSS_DPTX0_AUX_CLK] = &disp1_cc_mdss_dptx0_aux_clk.clkr,
  2780. [DISP_CC_MDSS_DPTX0_AUX_CLK_SRC] = &disp1_cc_mdss_dptx0_aux_clk_src.clkr,
  2781. [DISP_CC_MDSS_DPTX0_LINK_CLK] = &disp1_cc_mdss_dptx0_link_clk.clkr,
  2782. [DISP_CC_MDSS_DPTX0_LINK_CLK_SRC] = &disp1_cc_mdss_dptx0_link_clk_src.clkr,
  2783. [DISP_CC_MDSS_DPTX0_LINK_DIV_CLK_SRC] = &disp1_cc_mdss_dptx0_link_div_clk_src.clkr,
  2784. [DISP_CC_MDSS_DPTX0_LINK_INTF_CLK] = &disp1_cc_mdss_dptx0_link_intf_clk.clkr,
  2785. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK] = &disp1_cc_mdss_dptx0_pixel0_clk.clkr,
  2786. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC] = &disp1_cc_mdss_dptx0_pixel0_clk_src.clkr,
  2787. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK] = &disp1_cc_mdss_dptx0_pixel1_clk.clkr,
  2788. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK_SRC] = &disp1_cc_mdss_dptx0_pixel1_clk_src.clkr,
  2789. [DISP_CC_MDSS_DPTX0_USB_ROUTER_LINK_INTF_CLK] = &disp1_cc_mdss_dptx0_usb_router_link_intf_clk.clkr,
  2790. [DISP_CC_MDSS_DPTX1_AUX_CLK] = &disp1_cc_mdss_dptx1_aux_clk.clkr,
  2791. [DISP_CC_MDSS_DPTX1_AUX_CLK_SRC] = &disp1_cc_mdss_dptx1_aux_clk_src.clkr,
  2792. [DISP_CC_MDSS_DPTX1_LINK_CLK] = &disp1_cc_mdss_dptx1_link_clk.clkr,
  2793. [DISP_CC_MDSS_DPTX1_LINK_CLK_SRC] = &disp1_cc_mdss_dptx1_link_clk_src.clkr,
  2794. [DISP_CC_MDSS_DPTX1_LINK_DIV_CLK_SRC] = &disp1_cc_mdss_dptx1_link_div_clk_src.clkr,
  2795. [DISP_CC_MDSS_DPTX1_LINK_INTF_CLK] = &disp1_cc_mdss_dptx1_link_intf_clk.clkr,
  2796. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK] = &disp1_cc_mdss_dptx1_pixel0_clk.clkr,
  2797. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK_SRC] = &disp1_cc_mdss_dptx1_pixel0_clk_src.clkr,
  2798. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK] = &disp1_cc_mdss_dptx1_pixel1_clk.clkr,
  2799. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK_SRC] = &disp1_cc_mdss_dptx1_pixel1_clk_src.clkr,
  2800. [DISP_CC_MDSS_DPTX1_USB_ROUTER_LINK_INTF_CLK] = &disp1_cc_mdss_dptx1_usb_router_link_intf_clk.clkr,
  2801. [DISP_CC_MDSS_DPTX2_AUX_CLK] = &disp1_cc_mdss_dptx2_aux_clk.clkr,
  2802. [DISP_CC_MDSS_DPTX2_AUX_CLK_SRC] = &disp1_cc_mdss_dptx2_aux_clk_src.clkr,
  2803. [DISP_CC_MDSS_DPTX2_LINK_CLK] = &disp1_cc_mdss_dptx2_link_clk.clkr,
  2804. [DISP_CC_MDSS_DPTX2_LINK_CLK_SRC] = &disp1_cc_mdss_dptx2_link_clk_src.clkr,
  2805. [DISP_CC_MDSS_DPTX2_LINK_DIV_CLK_SRC] = &disp1_cc_mdss_dptx2_link_div_clk_src.clkr,
  2806. [DISP_CC_MDSS_DPTX2_LINK_INTF_CLK] = &disp1_cc_mdss_dptx2_link_intf_clk.clkr,
  2807. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK] = &disp1_cc_mdss_dptx2_pixel0_clk.clkr,
  2808. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK_SRC] = &disp1_cc_mdss_dptx2_pixel0_clk_src.clkr,
  2809. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK] = &disp1_cc_mdss_dptx2_pixel1_clk.clkr,
  2810. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK_SRC] = &disp1_cc_mdss_dptx2_pixel1_clk_src.clkr,
  2811. [DISP_CC_MDSS_DPTX3_AUX_CLK] = &disp1_cc_mdss_dptx3_aux_clk.clkr,
  2812. [DISP_CC_MDSS_DPTX3_AUX_CLK_SRC] = &disp1_cc_mdss_dptx3_aux_clk_src.clkr,
  2813. [DISP_CC_MDSS_DPTX3_LINK_CLK] = &disp1_cc_mdss_dptx3_link_clk.clkr,
  2814. [DISP_CC_MDSS_DPTX3_LINK_CLK_SRC] = &disp1_cc_mdss_dptx3_link_clk_src.clkr,
  2815. [DISP_CC_MDSS_DPTX3_LINK_DIV_CLK_SRC] = &disp1_cc_mdss_dptx3_link_div_clk_src.clkr,
  2816. [DISP_CC_MDSS_DPTX3_LINK_INTF_CLK] = &disp1_cc_mdss_dptx3_link_intf_clk.clkr,
  2817. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK] = &disp1_cc_mdss_dptx3_pixel0_clk.clkr,
  2818. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK_SRC] = &disp1_cc_mdss_dptx3_pixel0_clk_src.clkr,
  2819. [DISP_CC_MDSS_ESC0_CLK] = &disp1_cc_mdss_esc0_clk.clkr,
  2820. [DISP_CC_MDSS_ESC0_CLK_SRC] = &disp1_cc_mdss_esc0_clk_src.clkr,
  2821. [DISP_CC_MDSS_ESC1_CLK] = &disp1_cc_mdss_esc1_clk.clkr,
  2822. [DISP_CC_MDSS_ESC1_CLK_SRC] = &disp1_cc_mdss_esc1_clk_src.clkr,
  2823. [DISP_CC_MDSS_MDP1_CLK] = &disp1_cc_mdss_mdp1_clk.clkr,
  2824. [DISP_CC_MDSS_MDP_CLK] = &disp1_cc_mdss_mdp_clk.clkr,
  2825. [DISP_CC_MDSS_MDP_CLK_SRC] = &disp1_cc_mdss_mdp_clk_src.clkr,
  2826. [DISP_CC_MDSS_MDP_LUT1_CLK] = &disp1_cc_mdss_mdp_lut1_clk.clkr,
  2827. [DISP_CC_MDSS_MDP_LUT_CLK] = &disp1_cc_mdss_mdp_lut_clk.clkr,
  2828. [DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &disp1_cc_mdss_non_gdsc_ahb_clk.clkr,
  2829. [DISP_CC_MDSS_PCLK0_CLK] = &disp1_cc_mdss_pclk0_clk.clkr,
  2830. [DISP_CC_MDSS_PCLK0_CLK_SRC] = &disp1_cc_mdss_pclk0_clk_src.clkr,
  2831. [DISP_CC_MDSS_PCLK1_CLK] = &disp1_cc_mdss_pclk1_clk.clkr,
  2832. [DISP_CC_MDSS_PCLK1_CLK_SRC] = &disp1_cc_mdss_pclk1_clk_src.clkr,
  2833. [DISP_CC_MDSS_ROT1_CLK] = &disp1_cc_mdss_rot1_clk.clkr,
  2834. [DISP_CC_MDSS_ROT_CLK] = &disp1_cc_mdss_rot_clk.clkr,
  2835. [DISP_CC_MDSS_ROT_CLK_SRC] = &disp1_cc_mdss_rot_clk_src.clkr,
  2836. [DISP_CC_MDSS_RSCC_AHB_CLK] = &disp1_cc_mdss_rscc_ahb_clk.clkr,
  2837. [DISP_CC_MDSS_RSCC_VSYNC_CLK] = &disp1_cc_mdss_rscc_vsync_clk.clkr,
  2838. [DISP_CC_MDSS_VSYNC1_CLK] = &disp1_cc_mdss_vsync1_clk.clkr,
  2839. [DISP_CC_MDSS_VSYNC_CLK] = &disp1_cc_mdss_vsync_clk.clkr,
  2840. [DISP_CC_MDSS_VSYNC_CLK_SRC] = &disp1_cc_mdss_vsync_clk_src.clkr,
  2841. [DISP_CC_PLL0] = &disp1_cc_pll0.clkr,
  2842. [DISP_CC_PLL1] = &disp1_cc_pll1.clkr,
  2843. [DISP_CC_PLL1_OUT_EVEN] = &disp1_cc_pll1_out_even.clkr,
  2844. [DISP_CC_PLL2] = &disp1_cc_pll2.clkr,
  2845. [DISP_CC_SLEEP_CLK] = &disp1_cc_sleep_clk.clkr,
  2846. [DISP_CC_SLEEP_CLK_SRC] = &disp1_cc_sleep_clk_src.clkr,
  2847. };
  2848. static const struct qcom_reset_map disp_cc_sc8280xp_resets[] = {
  2849. [DISP_CC_MDSS_CORE_BCR] = { 0x2000 },
  2850. [DISP_CC_MDSS_RSCC_BCR] = { 0x4000 },
  2851. };
  2852. static struct gdsc disp0_mdss_gdsc = {
  2853. .gdscr = 0x3000,
  2854. .en_rest_wait_val = 0x2,
  2855. .en_few_wait_val = 0x2,
  2856. .clk_dis_wait_val = 0xf,
  2857. .pd = {
  2858. .name = "disp0_mdss_gdsc",
  2859. },
  2860. .pwrsts = PWRSTS_OFF_ON,
  2861. .flags = HW_CTRL | RETAIN_FF_ENABLE,
  2862. };
  2863. static struct gdsc disp1_mdss_gdsc = {
  2864. .gdscr = 0x3000,
  2865. .en_rest_wait_val = 0x2,
  2866. .en_few_wait_val = 0x2,
  2867. .clk_dis_wait_val = 0xf,
  2868. .pd = {
  2869. .name = "disp1_mdss_gdsc",
  2870. },
  2871. .pwrsts = PWRSTS_OFF_ON,
  2872. .flags = HW_CTRL | RETAIN_FF_ENABLE,
  2873. };
  2874. static struct gdsc disp0_mdss_int2_gdsc = {
  2875. .gdscr = 0xa000,
  2876. .en_rest_wait_val = 0x2,
  2877. .en_few_wait_val = 0x2,
  2878. .clk_dis_wait_val = 0xf,
  2879. .pd = {
  2880. .name = "disp0_mdss_int2_gdsc",
  2881. },
  2882. .pwrsts = PWRSTS_OFF_ON,
  2883. .flags = HW_CTRL | RETAIN_FF_ENABLE,
  2884. };
  2885. static struct gdsc disp1_mdss_int2_gdsc = {
  2886. .gdscr = 0xa000,
  2887. .en_rest_wait_val = 0x2,
  2888. .en_few_wait_val = 0x2,
  2889. .clk_dis_wait_val = 0xf,
  2890. .pd = {
  2891. .name = "disp1_mdss_int2_gdsc",
  2892. },
  2893. .pwrsts = PWRSTS_OFF_ON,
  2894. .flags = HW_CTRL | RETAIN_FF_ENABLE,
  2895. };
  2896. static struct gdsc *disp0_cc_sc8280xp_gdscs[] = {
  2897. [MDSS_GDSC] = &disp0_mdss_gdsc,
  2898. [MDSS_INT2_GDSC] = &disp0_mdss_int2_gdsc,
  2899. };
  2900. static struct gdsc *disp1_cc_sc8280xp_gdscs[] = {
  2901. [MDSS_GDSC] = &disp1_mdss_gdsc,
  2902. [MDSS_INT2_GDSC] = &disp1_mdss_int2_gdsc,
  2903. };
  2904. static const struct regmap_config disp_cc_sc8280xp_regmap_config = {
  2905. .reg_bits = 32,
  2906. .reg_stride = 4,
  2907. .val_bits = 32,
  2908. .max_register = 0x10000,
  2909. .fast_io = true,
  2910. };
  2911. static const struct qcom_cc_desc disp0_cc_sc8280xp_desc = {
  2912. .config = &disp_cc_sc8280xp_regmap_config,
  2913. .clks = disp0_cc_sc8280xp_clocks,
  2914. .num_clks = ARRAY_SIZE(disp0_cc_sc8280xp_clocks),
  2915. .resets = disp_cc_sc8280xp_resets,
  2916. .num_resets = ARRAY_SIZE(disp_cc_sc8280xp_resets),
  2917. .gdscs = disp0_cc_sc8280xp_gdscs,
  2918. .num_gdscs = ARRAY_SIZE(disp0_cc_sc8280xp_gdscs),
  2919. };
  2920. static const struct qcom_cc_desc disp1_cc_sc8280xp_desc = {
  2921. .config = &disp_cc_sc8280xp_regmap_config,
  2922. .clks = disp1_cc_sc8280xp_clocks,
  2923. .num_clks = ARRAY_SIZE(disp1_cc_sc8280xp_clocks),
  2924. .resets = disp_cc_sc8280xp_resets,
  2925. .num_resets = ARRAY_SIZE(disp_cc_sc8280xp_resets),
  2926. .gdscs = disp1_cc_sc8280xp_gdscs,
  2927. .num_gdscs = ARRAY_SIZE(disp1_cc_sc8280xp_gdscs),
  2928. };
  2929. #define clkr_to_alpha_clk_pll(_clkr) container_of(_clkr, struct clk_alpha_pll, clkr)
  2930. static int disp_cc_sc8280xp_probe(struct platform_device *pdev)
  2931. {
  2932. const struct qcom_cc_desc *desc;
  2933. struct regmap *regmap;
  2934. int ret;
  2935. desc = device_get_match_data(&pdev->dev);
  2936. ret = devm_pm_runtime_enable(&pdev->dev);
  2937. if (ret)
  2938. return ret;
  2939. ret = devm_pm_clk_create(&pdev->dev);
  2940. if (ret)
  2941. return ret;
  2942. ret = pm_clk_add(&pdev->dev, NULL);
  2943. if (ret < 0) {
  2944. dev_err(&pdev->dev, "failed to acquire ahb clock\n");
  2945. return ret;
  2946. }
  2947. ret = pm_runtime_resume_and_get(&pdev->dev);
  2948. if (ret)
  2949. return ret;
  2950. regmap = qcom_cc_map(pdev, desc);
  2951. if (IS_ERR(regmap)) {
  2952. ret = PTR_ERR(regmap);
  2953. goto out_pm_runtime_put;
  2954. }
  2955. clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL0]), regmap, &disp_cc_pll0_config);
  2956. clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL1]), regmap, &disp_cc_pll1_config);
  2957. clk_lucid_pll_configure(clkr_to_alpha_clk_pll(desc->clks[DISP_CC_PLL2]), regmap, &disp_cc_pll2_config);
  2958. ret = qcom_cc_really_probe(&pdev->dev, desc, regmap);
  2959. if (ret) {
  2960. dev_err(&pdev->dev, "Failed to register display clock controller\n");
  2961. goto out_pm_runtime_put;
  2962. }
  2963. /* Keep some clocks always-on */
  2964. qcom_branch_set_clk_en(regmap, 0x605c); /* DISP_CC_XO_CLK */
  2965. out_pm_runtime_put:
  2966. pm_runtime_put_sync(&pdev->dev);
  2967. return ret;
  2968. }
  2969. static const struct of_device_id disp_cc_sc8280xp_match_table[] = {
  2970. { .compatible = "qcom,sc8280xp-dispcc0", .data = &disp0_cc_sc8280xp_desc },
  2971. { .compatible = "qcom,sc8280xp-dispcc1", .data = &disp1_cc_sc8280xp_desc },
  2972. { }
  2973. };
  2974. MODULE_DEVICE_TABLE(of, disp_cc_sc8280xp_match_table);
  2975. static struct platform_driver disp_cc_sc8280xp_driver = {
  2976. .probe = disp_cc_sc8280xp_probe,
  2977. .driver = {
  2978. .name = "disp_cc-sc8280xp",
  2979. .of_match_table = disp_cc_sc8280xp_match_table,
  2980. },
  2981. };
  2982. module_platform_driver(disp_cc_sc8280xp_driver);
  2983. MODULE_DESCRIPTION("Qualcomm SC8280XP dispcc driver");
  2984. MODULE_LICENSE("GPL");