dispcc0-anorak.c 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #include <linux/clk.h>
  6. #include <linux/clk-provider.h>
  7. #include <linux/err.h>
  8. #include <linux/kernel.h>
  9. #include <linux/module.h>
  10. #include <linux/of_device.h>
  11. #include <linux/of.h>
  12. #include <linux/regmap.h>
  13. #include <linux/pm_runtime.h>
  14. #include <dt-bindings/clock/qcom,dispcc-anorak.h>
  15. #include "clk-alpha-pll.h"
  16. #include "clk-branch.h"
  17. #include "clk-pll.h"
  18. #include "clk-rcg.h"
  19. #include "clk-regmap.h"
  20. #include "clk-regmap-divider.h"
  21. #include "clk-regmap-mux.h"
  22. #include "common.h"
  23. #include "vdd-level.h"
  24. #define DISP_CC_MISC_CMD 0xF000
  25. static DEFINE_VDD_REGULATORS(vdd_mm, VDD_HIGH + 1, 1, vdd_corner);
  26. static DEFINE_VDD_REGULATORS(vdd_mxa, VDD_NOMINAL_L1 + 1, 1, vdd_corner);
  27. static struct clk_vdd_class *disp_cc_0_anorak_regulators[] = {
  28. &vdd_mm,
  29. &vdd_mxa,
  30. };
  31. enum {
  32. P_BI_TCXO,
  33. P_DP0_PHY_PLL_LINK_CLK,
  34. P_DP0_PHY_PLL_VCO_DIV_CLK,
  35. P_DP1_PHY_PLL_LINK_CLK,
  36. P_DP1_PHY_PLL_VCO_DIV_CLK,
  37. P_DP2_PHY_PLL_LINK_CLK,
  38. P_DP2_PHY_PLL_VCO_DIV_CLK,
  39. P_DP3_PHY_PLL_LINK_CLK,
  40. P_DP3_PHY_PLL_VCO_DIV_CLK,
  41. P_DSI0_PHY_PLL_OUT_BYTECLK,
  42. P_DSI0_PHY_PLL_OUT_DSICLK,
  43. P_DSI1_PHY_PLL_OUT_BYTECLK,
  44. P_DSI1_PHY_PLL_OUT_DSICLK,
  45. P_DSI_M_PHY_PLL_OUT_BYTECLK,
  46. P_DSI_M_PHY_PLL_OUT_DSICLK,
  47. P_MDSS_0_DISP_CC_PLL0_OUT_MAIN,
  48. P_MDSS_0_DISP_CC_PLL1_OUT_EVEN,
  49. P_MDSS_0_DISP_CC_PLL1_OUT_MAIN,
  50. P_SLEEP_CLK,
  51. };
  52. static const struct pll_vco lucid_evo_vco[] = {
  53. { 249600000, 2000000000, 0 },
  54. };
  55. /* 600MHz Configuration */
  56. static const struct alpha_pll_config mdss_0_disp_cc_pll0_config = {
  57. .l = 0x1F,
  58. .cal_l = 0x44,
  59. .alpha = 0x4000,
  60. .config_ctl_val = 0x20485699,
  61. .config_ctl_hi_val = 0x00182261,
  62. .config_ctl_hi1_val = 0x32AA299C,
  63. .user_ctl_val = 0x00000001,
  64. .user_ctl_hi_val = 0x00000805,
  65. };
  66. static struct clk_alpha_pll mdss_0_disp_cc_pll0 = {
  67. .offset = 0x0,
  68. .vco_table = lucid_evo_vco,
  69. .num_vco = ARRAY_SIZE(lucid_evo_vco),
  70. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
  71. .clkr = {
  72. .hw.init = &(const struct clk_init_data){
  73. .name = "mdss_0_disp_cc_pll0",
  74. .parent_data = &(const struct clk_parent_data){
  75. .fw_name = "bi_tcxo",
  76. },
  77. .num_parents = 1,
  78. .ops = &clk_alpha_pll_lucid_evo_ops,
  79. },
  80. .vdd_data = {
  81. .vdd_class = &vdd_mm,
  82. .num_rate_max = VDD_NUM,
  83. .rate_max = (unsigned long[VDD_NUM]) {
  84. [VDD_LOWER_D1] = 500000000,
  85. [VDD_LOWER] = 615000000,
  86. [VDD_LOW] = 1066000000,
  87. [VDD_LOW_L1] = 1500000000,
  88. [VDD_NOMINAL] = 1800000000,
  89. [VDD_HIGH] = 2000000000},
  90. },
  91. },
  92. };
  93. /* 600MHz Configuration */
  94. static const struct alpha_pll_config mdss_0_disp_cc_pll1_config = {
  95. .l = 0x1F,
  96. .cal_l = 0x44,
  97. .alpha = 0x4000,
  98. .config_ctl_val = 0x20485699,
  99. .config_ctl_hi_val = 0x00182261,
  100. .config_ctl_hi1_val = 0x32AA299C,
  101. .user_ctl_val = 0x00000000,
  102. .user_ctl_hi_val = 0x00000805,
  103. };
  104. static struct clk_alpha_pll mdss_0_disp_cc_pll1 = {
  105. .offset = 0x1000,
  106. .vco_table = lucid_evo_vco,
  107. .num_vco = ARRAY_SIZE(lucid_evo_vco),
  108. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_EVO],
  109. .clkr = {
  110. .hw.init = &(const struct clk_init_data){
  111. .name = "mdss_0_disp_cc_pll1",
  112. .parent_data = &(const struct clk_parent_data){
  113. .fw_name = "bi_tcxo",
  114. },
  115. .num_parents = 1,
  116. .ops = &clk_alpha_pll_lucid_evo_ops,
  117. },
  118. .vdd_data = {
  119. .vdd_class = &vdd_mm,
  120. .num_rate_max = VDD_NUM,
  121. .rate_max = (unsigned long[VDD_NUM]) {
  122. [VDD_LOWER_D1] = 500000000,
  123. [VDD_LOWER] = 615000000,
  124. [VDD_LOW] = 1066000000,
  125. [VDD_LOW_L1] = 1500000000,
  126. [VDD_NOMINAL] = 1800000000,
  127. [VDD_HIGH] = 2000000000},
  128. },
  129. },
  130. };
  131. static const struct parent_map disp_cc_0_parent_map_0[] = {
  132. { P_BI_TCXO, 0 },
  133. { P_DP0_PHY_PLL_LINK_CLK, 1 },
  134. { P_DP0_PHY_PLL_VCO_DIV_CLK, 2 },
  135. { P_DP3_PHY_PLL_VCO_DIV_CLK, 3 },
  136. { P_DP1_PHY_PLL_VCO_DIV_CLK, 4 },
  137. { P_DP2_PHY_PLL_VCO_DIV_CLK, 6 },
  138. };
  139. static const struct clk_parent_data disp_cc_0_parent_data_0[] = {
  140. { .fw_name = "bi_tcxo" },
  141. { .fw_name = "dp0_phy_pll_link_clk", .name = "dp0_phy_pll_link_clk" },
  142. { .fw_name = "dp0_phy_pll_vco_div_clk", .name = "dp0_phy_pll_vco_div_clk" },
  143. { .fw_name = "dp3_phy_pll_vco_div_clk", .name = "dp3_phy_pll_vco_div_clk" },
  144. { .fw_name = "dp1_phy_pll_vco_div_clk", .name = "dp1_phy_pll_vco_div_clk" },
  145. { .fw_name = "dp2_phy_pll_vco_div_clk", .name = "dp2_phy_pll_vco_div_clk" },
  146. };
  147. static const struct parent_map disp_cc_0_parent_map_1[] = {
  148. { P_BI_TCXO, 0 },
  149. };
  150. static const struct clk_parent_data disp_cc_0_parent_data_1[] = {
  151. { .fw_name = "bi_tcxo" },
  152. };
  153. static const struct clk_parent_data disp_cc_0_parent_data_1_ao[] = {
  154. { .fw_name = "bi_tcxo_ao" },
  155. };
  156. static const struct parent_map disp_cc_0_parent_map_2[] = {
  157. { P_BI_TCXO, 0 },
  158. { P_DSI0_PHY_PLL_OUT_DSICLK, 1 },
  159. { P_DSI0_PHY_PLL_OUT_BYTECLK, 2 },
  160. { P_DSI1_PHY_PLL_OUT_DSICLK, 3 },
  161. { P_DSI1_PHY_PLL_OUT_BYTECLK, 4 },
  162. { P_DSI_M_PHY_PLL_OUT_BYTECLK, 5 },
  163. { P_DSI_M_PHY_PLL_OUT_DSICLK, 6 },
  164. };
  165. static const struct clk_parent_data disp_cc_0_parent_data_2[] = {
  166. { .fw_name = "bi_tcxo" },
  167. { .fw_name = "dsi0_phy_pll_out_dsiclk", .name = "dsi0_phy_pll_out_dsiclk" },
  168. { .fw_name = "dsi0_phy_pll_out_byteclk", .name = "dsi0_phy_pll_out_byteclk" },
  169. { .fw_name = "dsi1_phy_pll_out_dsiclk", .name = "dsi1_phy_pll_out_dsiclk" },
  170. { .fw_name = "dsi1_phy_pll_out_byteclk", .name = "dsi1_phy_pll_out_byteclk" },
  171. { .fw_name = "dsi_m_phy_pll_out_byteclk", .name = "dsi_m_phy_pll_out_byteclk" },
  172. { .fw_name = "dsi_m_phy_pll_out_dsiclk", .name = "dsi_m_phy_pll_out_dsiclk" },
  173. };
  174. static const struct parent_map disp_cc_0_parent_map_3[] = {
  175. { P_BI_TCXO, 0 },
  176. { P_DP0_PHY_PLL_LINK_CLK, 1 },
  177. { P_DP1_PHY_PLL_LINK_CLK, 2 },
  178. { P_DP2_PHY_PLL_LINK_CLK, 3 },
  179. { P_DP3_PHY_PLL_LINK_CLK, 4 },
  180. };
  181. static const struct clk_parent_data disp_cc_0_parent_data_3[] = {
  182. { .fw_name = "bi_tcxo" },
  183. { .fw_name = "dp0_phy_pll_link_clk", .name = "dp0_phy_pll_link_clk" },
  184. { .fw_name = "dp1_phy_pll_link_clk", .name = "dp1_phy_pll_link_clk" },
  185. { .fw_name = "dp2_phy_pll_link_clk", .name = "dp2_phy_pll_link_clk" },
  186. { .fw_name = "dp3_phy_pll_link_clk", .name = "dp3_phy_pll_link_clk" },
  187. };
  188. static const struct parent_map disp_cc_0_parent_map_4[] = {
  189. { P_BI_TCXO, 0 },
  190. { P_DSI0_PHY_PLL_OUT_BYTECLK, 2 },
  191. { P_DSI1_PHY_PLL_OUT_BYTECLK, 4 },
  192. };
  193. static const struct clk_parent_data disp_cc_0_parent_data_4[] = {
  194. { .fw_name = "bi_tcxo" },
  195. { .fw_name = "dsi0_phy_pll_out_byteclk", .name = "dsi0_phy_pll_out_byteclk" },
  196. { .fw_name = "dsi1_phy_pll_out_byteclk", .name = "dsi1_phy_pll_out_byteclk" },
  197. };
  198. static const struct parent_map disp_cc_0_parent_map_5[] = {
  199. { P_BI_TCXO, 0 },
  200. { P_MDSS_0_DISP_CC_PLL1_OUT_MAIN, 4 },
  201. { P_MDSS_0_DISP_CC_PLL1_OUT_EVEN, 6 },
  202. };
  203. static const struct clk_parent_data disp_cc_0_parent_data_5[] = {
  204. { .fw_name = "bi_tcxo" },
  205. { .hw = &mdss_0_disp_cc_pll1.clkr.hw },
  206. { .hw = &mdss_0_disp_cc_pll1.clkr.hw },
  207. };
  208. static const struct parent_map disp_cc_0_parent_map_6[] = {
  209. { P_BI_TCXO, 0 },
  210. { P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 1 },
  211. { P_MDSS_0_DISP_CC_PLL1_OUT_MAIN, 4 },
  212. { P_MDSS_0_DISP_CC_PLL1_OUT_EVEN, 6 },
  213. };
  214. static const struct clk_parent_data disp_cc_0_parent_data_6[] = {
  215. { .fw_name = "bi_tcxo" },
  216. { .hw = &mdss_0_disp_cc_pll0.clkr.hw },
  217. { .hw = &mdss_0_disp_cc_pll1.clkr.hw },
  218. { .hw = &mdss_0_disp_cc_pll1.clkr.hw },
  219. };
  220. static const struct parent_map disp_cc_0_parent_map_7[] = {
  221. { P_SLEEP_CLK, 0 },
  222. };
  223. static const struct clk_parent_data disp_cc_0_parent_data_7[] = {
  224. { .fw_name = "sleep_clk" },
  225. };
  226. static const struct freq_tbl ftbl_mdss_0_disp_cc_mdss_ahb_clk_src[] = {
  227. F(19200000, P_BI_TCXO, 1, 0, 0),
  228. F(37500000, P_MDSS_0_DISP_CC_PLL1_OUT_MAIN, 16, 0, 0),
  229. F(75000000, P_MDSS_0_DISP_CC_PLL1_OUT_MAIN, 8, 0, 0),
  230. { }
  231. };
  232. static struct clk_rcg2 mdss_0_disp_cc_mdss_ahb_clk_src = {
  233. .cmd_rcgr = 0x82ec,
  234. .mnd_width = 0,
  235. .hid_width = 5,
  236. .parent_map = disp_cc_0_parent_map_5,
  237. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_ahb_clk_src,
  238. .enable_safe_config = true,
  239. .clkr.hw.init = &(const struct clk_init_data){
  240. .name = "mdss_0_disp_cc_mdss_ahb_clk_src",
  241. .parent_data = disp_cc_0_parent_data_5,
  242. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_5),
  243. .ops = &clk_rcg2_ops,
  244. },
  245. .clkr.vdd_data = {
  246. .vdd_class = &vdd_mm,
  247. .num_rate_max = VDD_NUM,
  248. .rate_max = (unsigned long[VDD_NUM]) {
  249. [VDD_LOWER] = 19200000,
  250. [VDD_LOW] = 37500000,
  251. [VDD_NOMINAL] = 75000000},
  252. },
  253. };
  254. static struct clk_rcg2 mdss_0_disp_cc_mdss_byte0_clk_src = {
  255. .cmd_rcgr = 0x810c,
  256. .mnd_width = 0,
  257. .hid_width = 5,
  258. .parent_map = disp_cc_0_parent_map_2,
  259. .clkr.hw.init = &(const struct clk_init_data){
  260. .name = "mdss_0_disp_cc_mdss_byte0_clk_src",
  261. .parent_data = disp_cc_0_parent_data_2,
  262. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_2),
  263. .flags = CLK_SET_RATE_PARENT,
  264. .ops = &clk_byte2_ops,
  265. },
  266. .clkr.vdd_data = {
  267. .vdd_class = &vdd_mm,
  268. .num_rate_max = VDD_NUM,
  269. .rate_max = (unsigned long[VDD_NUM]) {
  270. [VDD_LOWER] = 187500000,
  271. [VDD_LOW] = 300000000,
  272. [VDD_LOW_L1] = 358000000},
  273. },
  274. };
  275. static struct clk_rcg2 mdss_0_disp_cc_mdss_byte1_clk_src = {
  276. .cmd_rcgr = 0x8128,
  277. .mnd_width = 0,
  278. .hid_width = 5,
  279. .parent_map = disp_cc_0_parent_map_2,
  280. .clkr.hw.init = &(const struct clk_init_data){
  281. .name = "mdss_0_disp_cc_mdss_byte1_clk_src",
  282. .parent_data = disp_cc_0_parent_data_2,
  283. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_2),
  284. .flags = CLK_SET_RATE_PARENT,
  285. .ops = &clk_byte2_ops,
  286. },
  287. .clkr.vdd_data = {
  288. .vdd_class = &vdd_mm,
  289. .num_rate_max = VDD_NUM,
  290. .rate_max = (unsigned long[VDD_NUM]) {
  291. [VDD_LOWER] = 187500000,
  292. [VDD_LOW] = 300000000,
  293. [VDD_LOW_L1] = 358000000},
  294. },
  295. };
  296. static const struct freq_tbl ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src[] = {
  297. F(19200000, P_BI_TCXO, 1, 0, 0),
  298. { }
  299. };
  300. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx0_aux_clk_src = {
  301. .cmd_rcgr = 0x81c0,
  302. .mnd_width = 0,
  303. .hid_width = 5,
  304. .parent_map = disp_cc_0_parent_map_1,
  305. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  306. .clkr.hw.init = &(const struct clk_init_data){
  307. .name = "mdss_0_disp_cc_mdss_dptx0_aux_clk_src",
  308. .parent_data = disp_cc_0_parent_data_1,
  309. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1),
  310. .ops = &clk_rcg2_ops,
  311. },
  312. .clkr.vdd_data = {
  313. .vdd_class = &vdd_mm,
  314. .num_rate_max = VDD_NUM,
  315. .rate_max = (unsigned long[VDD_NUM]) {
  316. [VDD_LOWER] = 19200000},
  317. },
  318. };
  319. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx0_link_clk_src = {
  320. .cmd_rcgr = 0x8174,
  321. .mnd_width = 0,
  322. .hid_width = 5,
  323. .parent_map = disp_cc_0_parent_map_3,
  324. .clkr.hw.init = &(const struct clk_init_data){
  325. .name = "mdss_0_disp_cc_mdss_dptx0_link_clk_src",
  326. .parent_data = disp_cc_0_parent_data_3,
  327. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_3),
  328. .flags = CLK_SET_RATE_PARENT,
  329. .ops = &clk_byte2_ops,
  330. },
  331. .clkr.vdd_data = {
  332. .vdd_class = &vdd_mm,
  333. .num_rate_max = VDD_NUM,
  334. .rate_max = (unsigned long[VDD_NUM]) {
  335. [VDD_LOWER] = 270000000,
  336. [VDD_LOW_L1] = 540000000,
  337. [VDD_NOMINAL] = 810000000},
  338. },
  339. };
  340. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx0_pixel0_clk_src = {
  341. .cmd_rcgr = 0x8190,
  342. .mnd_width = 16,
  343. .hid_width = 5,
  344. .parent_map = disp_cc_0_parent_map_0,
  345. .clkr.hw.init = &(const struct clk_init_data){
  346. .name = "mdss_0_disp_cc_mdss_dptx0_pixel0_clk_src",
  347. .parent_data = disp_cc_0_parent_data_0,
  348. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  349. .flags = CLK_SET_RATE_PARENT,
  350. .ops = &clk_dp_ops,
  351. },
  352. .clkr.vdd_data = {
  353. .vdd_class = &vdd_mm,
  354. .num_rate_max = VDD_NUM,
  355. .rate_max = (unsigned long[VDD_NUM]) {
  356. [VDD_LOWER] = 337500000,
  357. [VDD_LOW_L1] = 405000000,
  358. [VDD_NOMINAL] = 675000000},
  359. },
  360. };
  361. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx0_pixel1_clk_src = {
  362. .cmd_rcgr = 0x81a8,
  363. .mnd_width = 16,
  364. .hid_width = 5,
  365. .parent_map = disp_cc_0_parent_map_0,
  366. .clkr.hw.init = &(const struct clk_init_data){
  367. .name = "mdss_0_disp_cc_mdss_dptx0_pixel1_clk_src",
  368. .parent_data = disp_cc_0_parent_data_0,
  369. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  370. .flags = CLK_SET_RATE_PARENT,
  371. .ops = &clk_dp_ops,
  372. },
  373. .clkr.vdd_data = {
  374. .vdd_class = &vdd_mm,
  375. .num_rate_max = VDD_NUM,
  376. .rate_max = (unsigned long[VDD_NUM]) {
  377. [VDD_LOWER] = 337500000,
  378. [VDD_LOW_L1] = 405000000,
  379. [VDD_NOMINAL] = 675000000},
  380. },
  381. };
  382. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx1_aux_clk_src = {
  383. .cmd_rcgr = 0x8224,
  384. .mnd_width = 0,
  385. .hid_width = 5,
  386. .parent_map = disp_cc_0_parent_map_1,
  387. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  388. .clkr.hw.init = &(const struct clk_init_data){
  389. .name = "mdss_0_disp_cc_mdss_dptx1_aux_clk_src",
  390. .parent_data = disp_cc_0_parent_data_1,
  391. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1),
  392. .ops = &clk_rcg2_ops,
  393. },
  394. .clkr.vdd_data = {
  395. .vdd_class = &vdd_mm,
  396. .num_rate_max = VDD_NUM,
  397. .rate_max = (unsigned long[VDD_NUM]) {
  398. [VDD_LOWER] = 19200000},
  399. },
  400. };
  401. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx1_link_clk_src = {
  402. .cmd_rcgr = 0x8208,
  403. .mnd_width = 0,
  404. .hid_width = 5,
  405. .parent_map = disp_cc_0_parent_map_3,
  406. .clkr.hw.init = &(const struct clk_init_data){
  407. .name = "mdss_0_disp_cc_mdss_dptx1_link_clk_src",
  408. .parent_data = disp_cc_0_parent_data_3,
  409. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_3),
  410. .flags = CLK_SET_RATE_PARENT,
  411. .ops = &clk_byte2_ops,
  412. },
  413. .clkr.vdd_data = {
  414. .vdd_class = &vdd_mm,
  415. .num_rate_max = VDD_NUM,
  416. .rate_max = (unsigned long[VDD_NUM]) {
  417. [VDD_LOWER] = 270000000,
  418. [VDD_LOW_L1] = 540000000,
  419. [VDD_NOMINAL] = 810000000},
  420. },
  421. };
  422. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx1_pixel0_clk_src = {
  423. .cmd_rcgr = 0x81d8,
  424. .mnd_width = 16,
  425. .hid_width = 5,
  426. .parent_map = disp_cc_0_parent_map_0,
  427. .clkr.hw.init = &(const struct clk_init_data){
  428. .name = "mdss_0_disp_cc_mdss_dptx1_pixel0_clk_src",
  429. .parent_data = disp_cc_0_parent_data_0,
  430. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  431. .flags = CLK_SET_RATE_PARENT,
  432. .ops = &clk_dp_ops,
  433. },
  434. .clkr.vdd_data = {
  435. .vdd_class = &vdd_mm,
  436. .num_rate_max = VDD_NUM,
  437. .rate_max = (unsigned long[VDD_NUM]) {
  438. [VDD_LOWER] = 337500000,
  439. [VDD_LOW_L1] = 405000000,
  440. [VDD_NOMINAL] = 675000000},
  441. },
  442. };
  443. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx1_pixel1_clk_src = {
  444. .cmd_rcgr = 0x81f0,
  445. .mnd_width = 16,
  446. .hid_width = 5,
  447. .parent_map = disp_cc_0_parent_map_0,
  448. .clkr.hw.init = &(const struct clk_init_data){
  449. .name = "mdss_0_disp_cc_mdss_dptx1_pixel1_clk_src",
  450. .parent_data = disp_cc_0_parent_data_0,
  451. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  452. .flags = CLK_SET_RATE_PARENT,
  453. .ops = &clk_dp_ops,
  454. },
  455. .clkr.vdd_data = {
  456. .vdd_class = &vdd_mm,
  457. .num_rate_max = VDD_NUM,
  458. .rate_max = (unsigned long[VDD_NUM]) {
  459. [VDD_LOWER] = 337500000,
  460. [VDD_LOW_L1] = 405000000,
  461. [VDD_NOMINAL] = 675000000},
  462. },
  463. };
  464. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx2_aux_clk_src = {
  465. .cmd_rcgr = 0x8288,
  466. .mnd_width = 0,
  467. .hid_width = 5,
  468. .parent_map = disp_cc_0_parent_map_1,
  469. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  470. .clkr.hw.init = &(const struct clk_init_data){
  471. .name = "mdss_0_disp_cc_mdss_dptx2_aux_clk_src",
  472. .parent_data = disp_cc_0_parent_data_1,
  473. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1),
  474. .ops = &clk_rcg2_ops,
  475. },
  476. .clkr.vdd_data = {
  477. .vdd_class = &vdd_mm,
  478. .num_rate_max = VDD_NUM,
  479. .rate_max = (unsigned long[VDD_NUM]) {
  480. [VDD_LOWER] = 19200000},
  481. },
  482. };
  483. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx2_link_clk_src = {
  484. .cmd_rcgr = 0x823c,
  485. .mnd_width = 0,
  486. .hid_width = 5,
  487. .parent_map = disp_cc_0_parent_map_3,
  488. .clkr.hw.init = &(const struct clk_init_data){
  489. .name = "mdss_0_disp_cc_mdss_dptx2_link_clk_src",
  490. .parent_data = disp_cc_0_parent_data_3,
  491. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_3),
  492. .flags = CLK_SET_RATE_PARENT,
  493. .ops = &clk_byte2_ops,
  494. },
  495. .clkr.vdd_data = {
  496. .vdd_class = &vdd_mm,
  497. .num_rate_max = VDD_NUM,
  498. .rate_max = (unsigned long[VDD_NUM]) {
  499. [VDD_LOWER] = 270000000,
  500. [VDD_LOW_L1] = 540000000,
  501. [VDD_NOMINAL] = 810000000},
  502. },
  503. };
  504. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx2_pixel0_clk_src = {
  505. .cmd_rcgr = 0x8258,
  506. .mnd_width = 16,
  507. .hid_width = 5,
  508. .parent_map = disp_cc_0_parent_map_0,
  509. .clkr.hw.init = &(const struct clk_init_data){
  510. .name = "mdss_0_disp_cc_mdss_dptx2_pixel0_clk_src",
  511. .parent_data = disp_cc_0_parent_data_0,
  512. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  513. .flags = CLK_SET_RATE_PARENT,
  514. .ops = &clk_dp_ops,
  515. },
  516. .clkr.vdd_data = {
  517. .vdd_class = &vdd_mm,
  518. .num_rate_max = VDD_NUM,
  519. .rate_max = (unsigned long[VDD_NUM]) {
  520. [VDD_LOWER] = 337500000,
  521. [VDD_LOW_L1] = 405000000,
  522. [VDD_NOMINAL] = 675000000},
  523. },
  524. };
  525. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx2_pixel1_clk_src = {
  526. .cmd_rcgr = 0x8270,
  527. .mnd_width = 16,
  528. .hid_width = 5,
  529. .parent_map = disp_cc_0_parent_map_0,
  530. .clkr.hw.init = &(const struct clk_init_data){
  531. .name = "mdss_0_disp_cc_mdss_dptx2_pixel1_clk_src",
  532. .parent_data = disp_cc_0_parent_data_0,
  533. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  534. .flags = CLK_SET_RATE_PARENT,
  535. .ops = &clk_dp_ops,
  536. },
  537. .clkr.vdd_data = {
  538. .vdd_class = &vdd_mm,
  539. .num_rate_max = VDD_NUM,
  540. .rate_max = (unsigned long[VDD_NUM]) {
  541. [VDD_LOWER] = 337500000,
  542. [VDD_LOW_L1] = 405000000,
  543. [VDD_NOMINAL] = 675000000},
  544. },
  545. };
  546. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx3_aux_clk_src = {
  547. .cmd_rcgr = 0x82d4,
  548. .mnd_width = 0,
  549. .hid_width = 5,
  550. .parent_map = disp_cc_0_parent_map_1,
  551. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  552. .clkr.hw.init = &(const struct clk_init_data){
  553. .name = "mdss_0_disp_cc_mdss_dptx3_aux_clk_src",
  554. .parent_data = disp_cc_0_parent_data_1,
  555. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1),
  556. .ops = &clk_rcg2_ops,
  557. },
  558. .clkr.vdd_data = {
  559. .vdd_class = &vdd_mm,
  560. .num_rate_max = VDD_NUM,
  561. .rate_max = (unsigned long[VDD_NUM]) {
  562. [VDD_LOWER] = 19200000},
  563. },
  564. };
  565. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx3_link_clk_src = {
  566. .cmd_rcgr = 0x82b8,
  567. .mnd_width = 0,
  568. .hid_width = 5,
  569. .parent_map = disp_cc_0_parent_map_3,
  570. .clkr.hw.init = &(const struct clk_init_data){
  571. .name = "mdss_0_disp_cc_mdss_dptx3_link_clk_src",
  572. .parent_data = disp_cc_0_parent_data_3,
  573. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_3),
  574. .flags = CLK_SET_RATE_PARENT,
  575. .ops = &clk_byte2_ops,
  576. },
  577. .clkr.vdd_data = {
  578. .vdd_class = &vdd_mm,
  579. .num_rate_max = VDD_NUM,
  580. .rate_max = (unsigned long[VDD_NUM]) {
  581. [VDD_LOWER] = 270000000,
  582. [VDD_LOW] = 594000000,
  583. [VDD_NOMINAL] = 810000000},
  584. },
  585. };
  586. static struct clk_rcg2 mdss_0_disp_cc_mdss_dptx3_pixel0_clk_src = {
  587. .cmd_rcgr = 0x82a0,
  588. .mnd_width = 16,
  589. .hid_width = 5,
  590. .parent_map = disp_cc_0_parent_map_0,
  591. .clkr.hw.init = &(const struct clk_init_data){
  592. .name = "mdss_0_disp_cc_mdss_dptx3_pixel0_clk_src",
  593. .parent_data = disp_cc_0_parent_data_0,
  594. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_0),
  595. .flags = CLK_SET_RATE_PARENT,
  596. .ops = &clk_dp_ops,
  597. },
  598. .clkr.vdd_data = {
  599. .vdd_class = &vdd_mm,
  600. .num_rate_max = VDD_NUM,
  601. .rate_max = (unsigned long[VDD_NUM]) {
  602. [VDD_LOWER] = 337500000,
  603. [VDD_LOW_L1] = 405000000,
  604. [VDD_NOMINAL] = 675000000},
  605. },
  606. };
  607. static struct clk_rcg2 mdss_0_disp_cc_mdss_esc0_clk_src = {
  608. .cmd_rcgr = 0x8144,
  609. .mnd_width = 0,
  610. .hid_width = 5,
  611. .parent_map = disp_cc_0_parent_map_4,
  612. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  613. .clkr.hw.init = &(const struct clk_init_data){
  614. .name = "mdss_0_disp_cc_mdss_esc0_clk_src",
  615. .parent_data = disp_cc_0_parent_data_4,
  616. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_4),
  617. .ops = &clk_rcg2_ops,
  618. },
  619. .clkr.vdd_data = {
  620. .vdd_class = &vdd_mm,
  621. .num_rate_max = VDD_NUM,
  622. .rate_max = (unsigned long[VDD_NUM]) {
  623. [VDD_LOWER] = 19200000},
  624. },
  625. };
  626. static struct clk_rcg2 mdss_0_disp_cc_mdss_esc1_clk_src = {
  627. .cmd_rcgr = 0x815c,
  628. .mnd_width = 0,
  629. .hid_width = 5,
  630. .parent_map = disp_cc_0_parent_map_4,
  631. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  632. .clkr.hw.init = &(const struct clk_init_data){
  633. .name = "mdss_0_disp_cc_mdss_esc1_clk_src",
  634. .parent_data = disp_cc_0_parent_data_4,
  635. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_4),
  636. .ops = &clk_rcg2_ops,
  637. },
  638. .clkr.vdd_data = {
  639. .vdd_class = &vdd_mm,
  640. .num_rate_max = VDD_NUM,
  641. .rate_max = (unsigned long[VDD_NUM]) {
  642. [VDD_LOWER] = 19200000},
  643. },
  644. };
  645. static const struct freq_tbl ftbl_mdss_0_disp_cc_mdss_mdp_clk_src[] = {
  646. F(200000000, P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
  647. F(325000000, P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
  648. F(375000000, P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
  649. F(500000000, P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
  650. F(550000000, P_MDSS_0_DISP_CC_PLL0_OUT_MAIN, 3, 0, 0),
  651. { }
  652. };
  653. static struct clk_rcg2 mdss_0_disp_cc_mdss_mdp_clk_src = {
  654. .cmd_rcgr = 0x80dc,
  655. .mnd_width = 0,
  656. .hid_width = 5,
  657. .parent_map = disp_cc_0_parent_map_6,
  658. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_mdp_clk_src,
  659. .enable_safe_config = true,
  660. .clkr.hw.init = &(const struct clk_init_data){
  661. .name = "mdss_0_disp_cc_mdss_mdp_clk_src",
  662. .parent_data = disp_cc_0_parent_data_6,
  663. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_6),
  664. .flags = CLK_SET_RATE_PARENT,
  665. .ops = &clk_rcg2_ops,
  666. },
  667. .clkr.vdd_data = {
  668. .vdd_classes = disp_cc_0_anorak_regulators,
  669. .num_vdd_classes = ARRAY_SIZE(disp_cc_0_anorak_regulators),
  670. .num_rate_max = VDD_NUM,
  671. .rate_max = (unsigned long[VDD_NUM]) {
  672. [VDD_LOWER] = 200000000,
  673. [VDD_LOW] = 325000000,
  674. [VDD_LOW_L1] = 375000000,
  675. [VDD_NOMINAL] = 500000000,
  676. [VDD_NOMINAL_L1] = 550000000},
  677. },
  678. };
  679. static struct clk_rcg2 mdss_0_disp_cc_mdss_pclk0_clk_src = {
  680. .cmd_rcgr = 0x80ac,
  681. .mnd_width = 8,
  682. .hid_width = 5,
  683. .parent_map = disp_cc_0_parent_map_2,
  684. .clkr.hw.init = &(const struct clk_init_data){
  685. .name = "mdss_0_disp_cc_mdss_pclk0_clk_src",
  686. .parent_data = disp_cc_0_parent_data_2,
  687. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_2),
  688. .flags = CLK_SET_RATE_PARENT,
  689. .ops = &clk_pixel_ops,
  690. },
  691. .clkr.vdd_data = {
  692. .vdd_class = &vdd_mm,
  693. .num_rate_max = VDD_NUM,
  694. .rate_max = (unsigned long[VDD_NUM]) {
  695. [VDD_LOWER] = 300000000,
  696. [VDD_LOW] = 480000000,
  697. [VDD_LOW_L1] = 625000000},
  698. },
  699. };
  700. static struct clk_rcg2 mdss_0_disp_cc_mdss_pclk1_clk_src = {
  701. .cmd_rcgr = 0x80c4,
  702. .mnd_width = 8,
  703. .hid_width = 5,
  704. .parent_map = disp_cc_0_parent_map_2,
  705. .clkr.hw.init = &(const struct clk_init_data){
  706. .name = "mdss_0_disp_cc_mdss_pclk1_clk_src",
  707. .parent_data = disp_cc_0_parent_data_2,
  708. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_2),
  709. .flags = CLK_SET_RATE_PARENT,
  710. .ops = &clk_pixel_ops,
  711. },
  712. .clkr.vdd_data = {
  713. .vdd_class = &vdd_mm,
  714. .num_rate_max = VDD_NUM,
  715. .rate_max = (unsigned long[VDD_NUM]) {
  716. [VDD_LOWER] = 300000000,
  717. [VDD_LOW] = 480000000,
  718. [VDD_LOW_L1] = 625000000},
  719. },
  720. };
  721. static struct clk_rcg2 mdss_0_disp_cc_mdss_vsync_clk_src = {
  722. .cmd_rcgr = 0x80f4,
  723. .mnd_width = 0,
  724. .hid_width = 5,
  725. .parent_map = disp_cc_0_parent_map_1,
  726. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  727. .clkr.hw.init = &(const struct clk_init_data){
  728. .name = "mdss_0_disp_cc_mdss_vsync_clk_src",
  729. .parent_data = disp_cc_0_parent_data_1,
  730. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1),
  731. .ops = &clk_rcg2_ops,
  732. },
  733. .clkr.vdd_data = {
  734. .vdd_class = &vdd_mm,
  735. .num_rate_max = VDD_NUM,
  736. .rate_max = (unsigned long[VDD_NUM]) {
  737. [VDD_LOWER] = 19200000},
  738. },
  739. };
  740. static const struct freq_tbl ftbl_mdss_0_disp_cc_sleep_clk_src[] = {
  741. F(32000, P_SLEEP_CLK, 1, 0, 0),
  742. { }
  743. };
  744. static struct clk_rcg2 mdss_0_disp_cc_sleep_clk_src = {
  745. .cmd_rcgr = 0xe05c,
  746. .mnd_width = 0,
  747. .hid_width = 5,
  748. .parent_map = disp_cc_0_parent_map_7,
  749. .freq_tbl = ftbl_mdss_0_disp_cc_sleep_clk_src,
  750. .clkr.hw.init = &(const struct clk_init_data){
  751. .name = "mdss_0_disp_cc_sleep_clk_src",
  752. .parent_data = disp_cc_0_parent_data_7,
  753. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_7),
  754. .ops = &clk_rcg2_ops,
  755. },
  756. .clkr.vdd_data = {
  757. .vdd_class = &vdd_mm,
  758. .num_rate_max = VDD_NUM,
  759. .rate_max = (unsigned long[VDD_NUM]) {
  760. [VDD_LOWER] = 32000},
  761. },
  762. };
  763. static struct clk_rcg2 mdss_0_disp_cc_xo_clk_src = {
  764. .cmd_rcgr = 0xe03c,
  765. .mnd_width = 0,
  766. .hid_width = 5,
  767. .parent_map = disp_cc_0_parent_map_1,
  768. .freq_tbl = ftbl_mdss_0_disp_cc_mdss_dptx0_aux_clk_src,
  769. .clkr.hw.init = &(const struct clk_init_data){
  770. .name = "mdss_0_disp_cc_xo_clk_src",
  771. .parent_data = disp_cc_0_parent_data_1_ao,
  772. .num_parents = ARRAY_SIZE(disp_cc_0_parent_data_1_ao),
  773. .ops = &clk_rcg2_ops,
  774. },
  775. };
  776. static struct clk_regmap_div mdss_0_disp_cc_mdss_byte0_div_clk_src = {
  777. .reg = 0x8124,
  778. .shift = 0,
  779. .width = 4,
  780. .clkr.hw.init = &(const struct clk_init_data) {
  781. .name = "mdss_0_disp_cc_mdss_byte0_div_clk_src",
  782. .parent_hws = (const struct clk_hw*[]){
  783. &mdss_0_disp_cc_mdss_byte0_clk_src.clkr.hw,
  784. },
  785. .num_parents = 1,
  786. .flags = CLK_SET_RATE_PARENT,
  787. .ops = &clk_regmap_div_ops,
  788. },
  789. };
  790. static struct clk_regmap_div mdss_0_disp_cc_mdss_byte1_div_clk_src = {
  791. .reg = 0x8140,
  792. .shift = 0,
  793. .width = 4,
  794. .clkr.hw.init = &(const struct clk_init_data) {
  795. .name = "mdss_0_disp_cc_mdss_byte1_div_clk_src",
  796. .parent_hws = (const struct clk_hw*[]){
  797. &mdss_0_disp_cc_mdss_byte1_clk_src.clkr.hw,
  798. },
  799. .num_parents = 1,
  800. .flags = CLK_SET_RATE_PARENT,
  801. .ops = &clk_regmap_div_ops,
  802. },
  803. };
  804. static struct clk_regmap_div mdss_0_disp_cc_mdss_dptx0_link_div_clk_src = {
  805. .reg = 0x818c,
  806. .shift = 0,
  807. .width = 4,
  808. .clkr.hw.init = &(const struct clk_init_data) {
  809. .name = "mdss_0_disp_cc_mdss_dptx0_link_div_clk_src",
  810. .parent_hws = (const struct clk_hw*[]){
  811. &mdss_0_disp_cc_mdss_dptx0_link_clk_src.clkr.hw,
  812. },
  813. .num_parents = 1,
  814. .flags = CLK_SET_RATE_PARENT,
  815. .ops = &clk_regmap_div_ro_ops,
  816. },
  817. };
  818. static struct clk_regmap_div mdss_0_disp_cc_mdss_dptx1_link_div_clk_src = {
  819. .reg = 0x8220,
  820. .shift = 0,
  821. .width = 4,
  822. .clkr.hw.init = &(const struct clk_init_data) {
  823. .name = "mdss_0_disp_cc_mdss_dptx1_link_div_clk_src",
  824. .parent_hws = (const struct clk_hw*[]){
  825. &mdss_0_disp_cc_mdss_dptx1_link_clk_src.clkr.hw,
  826. },
  827. .num_parents = 1,
  828. .flags = CLK_SET_RATE_PARENT,
  829. .ops = &clk_regmap_div_ro_ops,
  830. },
  831. };
  832. static struct clk_regmap_div mdss_0_disp_cc_mdss_dptx2_link_div_clk_src = {
  833. .reg = 0x8254,
  834. .shift = 0,
  835. .width = 4,
  836. .clkr.hw.init = &(const struct clk_init_data) {
  837. .name = "mdss_0_disp_cc_mdss_dptx2_link_div_clk_src",
  838. .parent_hws = (const struct clk_hw*[]){
  839. &mdss_0_disp_cc_mdss_dptx2_link_clk_src.clkr.hw,
  840. },
  841. .num_parents = 1,
  842. .flags = CLK_SET_RATE_PARENT,
  843. .ops = &clk_regmap_div_ro_ops,
  844. },
  845. };
  846. static struct clk_regmap_div mdss_0_disp_cc_mdss_dptx3_link_div_clk_src = {
  847. .reg = 0x82d0,
  848. .shift = 0,
  849. .width = 4,
  850. .clkr.hw.init = &(const struct clk_init_data) {
  851. .name = "mdss_0_disp_cc_mdss_dptx3_link_div_clk_src",
  852. .parent_hws = (const struct clk_hw*[]){
  853. &mdss_0_disp_cc_mdss_dptx3_link_clk_src.clkr.hw,
  854. },
  855. .num_parents = 1,
  856. .flags = CLK_SET_RATE_PARENT,
  857. .ops = &clk_regmap_div_ro_ops,
  858. },
  859. };
  860. static struct clk_branch mdss_0_disp_cc_mdss_accu_clk = {
  861. .halt_reg = 0xe058,
  862. .halt_check = BRANCH_HALT_VOTED,
  863. .clkr = {
  864. .enable_reg = 0xe058,
  865. .enable_mask = BIT(0),
  866. .hw.init = &(const struct clk_init_data){
  867. .name = "mdss_0_disp_cc_mdss_accu_clk",
  868. .parent_hws = (const struct clk_hw*[]){
  869. &mdss_0_disp_cc_xo_clk_src.clkr.hw,
  870. },
  871. .num_parents = 1,
  872. .flags = CLK_SET_RATE_PARENT,
  873. .ops = &clk_branch2_ops,
  874. },
  875. },
  876. };
  877. static struct clk_branch mdss_0_disp_cc_mdss_ahb1_clk = {
  878. .halt_reg = 0xa020,
  879. .halt_check = BRANCH_HALT,
  880. .clkr = {
  881. .enable_reg = 0xa020,
  882. .enable_mask = BIT(0),
  883. .hw.init = &(const struct clk_init_data){
  884. .name = "mdss_0_disp_cc_mdss_ahb1_clk",
  885. .parent_hws = (const struct clk_hw*[]){
  886. &mdss_0_disp_cc_mdss_ahb_clk_src.clkr.hw,
  887. },
  888. .num_parents = 1,
  889. .flags = CLK_DONT_HOLD_STATE | CLK_SET_RATE_PARENT,
  890. .ops = &clk_branch2_ops,
  891. },
  892. },
  893. };
  894. static struct clk_branch mdss_0_disp_cc_mdss_ahb_clk = {
  895. .halt_reg = 0x80a8,
  896. .halt_check = BRANCH_HALT,
  897. .clkr = {
  898. .enable_reg = 0x80a8,
  899. .enable_mask = BIT(0),
  900. .hw.init = &(const struct clk_init_data){
  901. .name = "mdss_0_disp_cc_mdss_ahb_clk",
  902. .parent_hws = (const struct clk_hw*[]){
  903. &mdss_0_disp_cc_mdss_ahb_clk_src.clkr.hw,
  904. },
  905. .num_parents = 1,
  906. .flags = CLK_DONT_HOLD_STATE | CLK_SET_RATE_PARENT,
  907. .ops = &clk_branch2_ops,
  908. },
  909. },
  910. };
  911. static struct clk_branch mdss_0_disp_cc_mdss_byte0_clk = {
  912. .halt_reg = 0x8028,
  913. .halt_check = BRANCH_HALT,
  914. .clkr = {
  915. .enable_reg = 0x8028,
  916. .enable_mask = BIT(0),
  917. .hw.init = &(const struct clk_init_data){
  918. .name = "mdss_0_disp_cc_mdss_byte0_clk",
  919. .parent_hws = (const struct clk_hw*[]){
  920. &mdss_0_disp_cc_mdss_byte0_clk_src.clkr.hw,
  921. },
  922. .num_parents = 1,
  923. .flags = CLK_SET_RATE_PARENT,
  924. .ops = &clk_branch2_ops,
  925. },
  926. },
  927. };
  928. static struct clk_branch mdss_0_disp_cc_mdss_byte0_intf_clk = {
  929. .halt_reg = 0x802c,
  930. .halt_check = BRANCH_HALT,
  931. .clkr = {
  932. .enable_reg = 0x802c,
  933. .enable_mask = BIT(0),
  934. .hw.init = &(const struct clk_init_data){
  935. .name = "mdss_0_disp_cc_mdss_byte0_intf_clk",
  936. .parent_hws = (const struct clk_hw*[]){
  937. &mdss_0_disp_cc_mdss_byte0_div_clk_src.clkr.hw,
  938. },
  939. .num_parents = 1,
  940. .flags = CLK_SET_RATE_PARENT,
  941. .ops = &clk_branch2_ops,
  942. },
  943. },
  944. };
  945. static struct clk_branch mdss_0_disp_cc_mdss_byte1_clk = {
  946. .halt_reg = 0x8030,
  947. .halt_check = BRANCH_HALT,
  948. .clkr = {
  949. .enable_reg = 0x8030,
  950. .enable_mask = BIT(0),
  951. .hw.init = &(const struct clk_init_data){
  952. .name = "mdss_0_disp_cc_mdss_byte1_clk",
  953. .parent_hws = (const struct clk_hw*[]){
  954. &mdss_0_disp_cc_mdss_byte1_clk_src.clkr.hw,
  955. },
  956. .num_parents = 1,
  957. .flags = CLK_SET_RATE_PARENT,
  958. .ops = &clk_branch2_ops,
  959. },
  960. },
  961. };
  962. static struct clk_branch mdss_0_disp_cc_mdss_byte1_intf_clk = {
  963. .halt_reg = 0x8034,
  964. .halt_check = BRANCH_HALT,
  965. .clkr = {
  966. .enable_reg = 0x8034,
  967. .enable_mask = BIT(0),
  968. .hw.init = &(const struct clk_init_data){
  969. .name = "mdss_0_disp_cc_mdss_byte1_intf_clk",
  970. .parent_hws = (const struct clk_hw*[]){
  971. &mdss_0_disp_cc_mdss_byte1_div_clk_src.clkr.hw,
  972. },
  973. .num_parents = 1,
  974. .flags = CLK_SET_RATE_PARENT,
  975. .ops = &clk_branch2_ops,
  976. },
  977. },
  978. };
  979. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_aux_clk = {
  980. .halt_reg = 0x8058,
  981. .halt_check = BRANCH_HALT,
  982. .clkr = {
  983. .enable_reg = 0x8058,
  984. .enable_mask = BIT(0),
  985. .hw.init = &(const struct clk_init_data){
  986. .name = "mdss_0_disp_cc_mdss_dptx0_aux_clk",
  987. .parent_hws = (const struct clk_hw*[]){
  988. &mdss_0_disp_cc_mdss_dptx0_aux_clk_src.clkr.hw,
  989. },
  990. .num_parents = 1,
  991. .flags = CLK_SET_RATE_PARENT,
  992. .ops = &clk_branch2_ops,
  993. },
  994. },
  995. };
  996. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_crypto_clk = {
  997. .halt_reg = 0x804c,
  998. .halt_check = BRANCH_HALT,
  999. .clkr = {
  1000. .enable_reg = 0x804c,
  1001. .enable_mask = BIT(0),
  1002. .hw.init = &(const struct clk_init_data){
  1003. .name = "mdss_0_disp_cc_mdss_dptx0_crypto_clk",
  1004. .parent_hws = (const struct clk_hw*[]){
  1005. &mdss_0_disp_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1006. },
  1007. .num_parents = 1,
  1008. .flags = CLK_SET_RATE_PARENT,
  1009. .ops = &clk_branch2_ops,
  1010. },
  1011. },
  1012. };
  1013. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_link_clk = {
  1014. .halt_reg = 0x8040,
  1015. .halt_check = BRANCH_HALT,
  1016. .clkr = {
  1017. .enable_reg = 0x8040,
  1018. .enable_mask = BIT(0),
  1019. .hw.init = &(const struct clk_init_data){
  1020. .name = "mdss_0_disp_cc_mdss_dptx0_link_clk",
  1021. .parent_hws = (const struct clk_hw*[]){
  1022. &mdss_0_disp_cc_mdss_dptx0_link_clk_src.clkr.hw,
  1023. },
  1024. .num_parents = 1,
  1025. .flags = CLK_SET_RATE_PARENT,
  1026. .ops = &clk_branch2_ops,
  1027. },
  1028. },
  1029. };
  1030. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_link_intf_clk = {
  1031. .halt_reg = 0x8048,
  1032. .halt_check = BRANCH_HALT,
  1033. .clkr = {
  1034. .enable_reg = 0x8048,
  1035. .enable_mask = BIT(0),
  1036. .hw.init = &(const struct clk_init_data){
  1037. .name = "mdss_0_disp_cc_mdss_dptx0_link_intf_clk",
  1038. .parent_hws = (const struct clk_hw*[]){
  1039. &mdss_0_disp_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1040. },
  1041. .num_parents = 1,
  1042. .flags = CLK_SET_RATE_PARENT,
  1043. .ops = &clk_branch2_ops,
  1044. },
  1045. },
  1046. };
  1047. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_pixel0_clk = {
  1048. .halt_reg = 0x8050,
  1049. .halt_check = BRANCH_HALT,
  1050. .clkr = {
  1051. .enable_reg = 0x8050,
  1052. .enable_mask = BIT(0),
  1053. .hw.init = &(const struct clk_init_data){
  1054. .name = "mdss_0_disp_cc_mdss_dptx0_pixel0_clk",
  1055. .parent_hws = (const struct clk_hw*[]){
  1056. &mdss_0_disp_cc_mdss_dptx0_pixel0_clk_src.clkr.hw,
  1057. },
  1058. .num_parents = 1,
  1059. .flags = CLK_SET_RATE_PARENT,
  1060. .ops = &clk_branch2_ops,
  1061. },
  1062. },
  1063. };
  1064. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_pixel1_clk = {
  1065. .halt_reg = 0x8054,
  1066. .halt_check = BRANCH_HALT,
  1067. .clkr = {
  1068. .enable_reg = 0x8054,
  1069. .enable_mask = BIT(0),
  1070. .hw.init = &(const struct clk_init_data){
  1071. .name = "mdss_0_disp_cc_mdss_dptx0_pixel1_clk",
  1072. .parent_hws = (const struct clk_hw*[]){
  1073. &mdss_0_disp_cc_mdss_dptx0_pixel1_clk_src.clkr.hw,
  1074. },
  1075. .num_parents = 1,
  1076. .flags = CLK_SET_RATE_PARENT,
  1077. .ops = &clk_branch2_ops,
  1078. },
  1079. },
  1080. };
  1081. static struct clk_branch mdss_0_disp_cc_mdss_dptx0_usb_router_link_intf_clk = {
  1082. .halt_reg = 0x8044,
  1083. .halt_check = BRANCH_HALT,
  1084. .clkr = {
  1085. .enable_reg = 0x8044,
  1086. .enable_mask = BIT(0),
  1087. .hw.init = &(const struct clk_init_data){
  1088. .name = "mdss_0_disp_cc_mdss_dptx0_usb_router_link_intf_clk",
  1089. .parent_hws = (const struct clk_hw*[]){
  1090. &mdss_0_disp_cc_mdss_dptx0_link_div_clk_src.clkr.hw,
  1091. },
  1092. .num_parents = 1,
  1093. .flags = CLK_SET_RATE_PARENT,
  1094. .ops = &clk_branch2_ops,
  1095. },
  1096. },
  1097. };
  1098. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_aux_clk = {
  1099. .halt_reg = 0x8074,
  1100. .halt_check = BRANCH_HALT,
  1101. .clkr = {
  1102. .enable_reg = 0x8074,
  1103. .enable_mask = BIT(0),
  1104. .hw.init = &(const struct clk_init_data){
  1105. .name = "mdss_0_disp_cc_mdss_dptx1_aux_clk",
  1106. .parent_hws = (const struct clk_hw*[]){
  1107. &mdss_0_disp_cc_mdss_dptx1_aux_clk_src.clkr.hw,
  1108. },
  1109. .num_parents = 1,
  1110. .flags = CLK_SET_RATE_PARENT,
  1111. .ops = &clk_branch2_ops,
  1112. },
  1113. },
  1114. };
  1115. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_crypto_clk = {
  1116. .halt_reg = 0x8070,
  1117. .halt_check = BRANCH_HALT,
  1118. .clkr = {
  1119. .enable_reg = 0x8070,
  1120. .enable_mask = BIT(0),
  1121. .hw.init = &(const struct clk_init_data){
  1122. .name = "mdss_0_disp_cc_mdss_dptx1_crypto_clk",
  1123. .parent_hws = (const struct clk_hw*[]){
  1124. &mdss_0_disp_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1125. },
  1126. .num_parents = 1,
  1127. .flags = CLK_SET_RATE_PARENT,
  1128. .ops = &clk_branch2_ops,
  1129. },
  1130. },
  1131. };
  1132. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_link_clk = {
  1133. .halt_reg = 0x8064,
  1134. .halt_check = BRANCH_HALT,
  1135. .clkr = {
  1136. .enable_reg = 0x8064,
  1137. .enable_mask = BIT(0),
  1138. .hw.init = &(const struct clk_init_data){
  1139. .name = "mdss_0_disp_cc_mdss_dptx1_link_clk",
  1140. .parent_hws = (const struct clk_hw*[]){
  1141. &mdss_0_disp_cc_mdss_dptx1_link_clk_src.clkr.hw,
  1142. },
  1143. .num_parents = 1,
  1144. .flags = CLK_SET_RATE_PARENT,
  1145. .ops = &clk_branch2_ops,
  1146. },
  1147. },
  1148. };
  1149. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_link_intf_clk = {
  1150. .halt_reg = 0x806c,
  1151. .halt_check = BRANCH_HALT,
  1152. .clkr = {
  1153. .enable_reg = 0x806c,
  1154. .enable_mask = BIT(0),
  1155. .hw.init = &(const struct clk_init_data){
  1156. .name = "mdss_0_disp_cc_mdss_dptx1_link_intf_clk",
  1157. .parent_hws = (const struct clk_hw*[]){
  1158. &mdss_0_disp_cc_mdss_dptx1_link_div_clk_src.clkr.hw,
  1159. },
  1160. .num_parents = 1,
  1161. .flags = CLK_SET_RATE_PARENT,
  1162. .ops = &clk_branch2_ops,
  1163. },
  1164. },
  1165. };
  1166. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_pixel0_clk = {
  1167. .halt_reg = 0x805c,
  1168. .halt_check = BRANCH_HALT,
  1169. .clkr = {
  1170. .enable_reg = 0x805c,
  1171. .enable_mask = BIT(0),
  1172. .hw.init = &(const struct clk_init_data){
  1173. .name = "mdss_0_disp_cc_mdss_dptx1_pixel0_clk",
  1174. .parent_hws = (const struct clk_hw*[]){
  1175. &mdss_0_disp_cc_mdss_dptx1_pixel0_clk_src.clkr.hw,
  1176. },
  1177. .num_parents = 1,
  1178. .flags = CLK_SET_RATE_PARENT,
  1179. .ops = &clk_branch2_ops,
  1180. },
  1181. },
  1182. };
  1183. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_pixel1_clk = {
  1184. .halt_reg = 0x8060,
  1185. .halt_check = BRANCH_HALT,
  1186. .clkr = {
  1187. .enable_reg = 0x8060,
  1188. .enable_mask = BIT(0),
  1189. .hw.init = &(const struct clk_init_data){
  1190. .name = "mdss_0_disp_cc_mdss_dptx1_pixel1_clk",
  1191. .parent_hws = (const struct clk_hw*[]){
  1192. &mdss_0_disp_cc_mdss_dptx1_pixel1_clk_src.clkr.hw,
  1193. },
  1194. .num_parents = 1,
  1195. .flags = CLK_SET_RATE_PARENT,
  1196. .ops = &clk_branch2_ops,
  1197. },
  1198. },
  1199. };
  1200. static struct clk_branch mdss_0_disp_cc_mdss_dptx1_usb_router_link_intf_clk = {
  1201. .halt_reg = 0x8068,
  1202. .halt_check = BRANCH_HALT,
  1203. .clkr = {
  1204. .enable_reg = 0x8068,
  1205. .enable_mask = BIT(0),
  1206. .hw.init = &(const struct clk_init_data){
  1207. .name = "mdss_0_disp_cc_mdss_dptx1_usb_router_link_intf_clk",
  1208. .parent_hws = (const struct clk_hw*[]){
  1209. &mdss_0_disp_cc_mdss_dptx1_link_div_clk_src.clkr.hw,
  1210. },
  1211. .num_parents = 1,
  1212. .flags = CLK_SET_RATE_PARENT,
  1213. .ops = &clk_branch2_ops,
  1214. },
  1215. },
  1216. };
  1217. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_aux_clk = {
  1218. .halt_reg = 0x8090,
  1219. .halt_check = BRANCH_HALT,
  1220. .clkr = {
  1221. .enable_reg = 0x8090,
  1222. .enable_mask = BIT(0),
  1223. .hw.init = &(const struct clk_init_data){
  1224. .name = "mdss_0_disp_cc_mdss_dptx2_aux_clk",
  1225. .parent_hws = (const struct clk_hw*[]){
  1226. &mdss_0_disp_cc_mdss_dptx2_aux_clk_src.clkr.hw,
  1227. },
  1228. .num_parents = 1,
  1229. .flags = CLK_SET_RATE_PARENT,
  1230. .ops = &clk_branch2_ops,
  1231. },
  1232. },
  1233. };
  1234. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_crypto_clk = {
  1235. .halt_reg = 0x808c,
  1236. .halt_check = BRANCH_HALT,
  1237. .clkr = {
  1238. .enable_reg = 0x808c,
  1239. .enable_mask = BIT(0),
  1240. .hw.init = &(const struct clk_init_data){
  1241. .name = "mdss_0_disp_cc_mdss_dptx2_crypto_clk",
  1242. .parent_hws = (const struct clk_hw*[]){
  1243. &mdss_0_disp_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1244. },
  1245. .num_parents = 1,
  1246. .flags = CLK_SET_RATE_PARENT,
  1247. .ops = &clk_branch2_ops,
  1248. },
  1249. },
  1250. };
  1251. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_link_clk = {
  1252. .halt_reg = 0x8080,
  1253. .halt_check = BRANCH_HALT,
  1254. .clkr = {
  1255. .enable_reg = 0x8080,
  1256. .enable_mask = BIT(0),
  1257. .hw.init = &(const struct clk_init_data){
  1258. .name = "mdss_0_disp_cc_mdss_dptx2_link_clk",
  1259. .parent_hws = (const struct clk_hw*[]){
  1260. &mdss_0_disp_cc_mdss_dptx2_link_clk_src.clkr.hw,
  1261. },
  1262. .num_parents = 1,
  1263. .flags = CLK_SET_RATE_PARENT,
  1264. .ops = &clk_branch2_ops,
  1265. },
  1266. },
  1267. };
  1268. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_link_intf_clk = {
  1269. .halt_reg = 0x8084,
  1270. .halt_check = BRANCH_HALT,
  1271. .clkr = {
  1272. .enable_reg = 0x8084,
  1273. .enable_mask = BIT(0),
  1274. .hw.init = &(const struct clk_init_data){
  1275. .name = "mdss_0_disp_cc_mdss_dptx2_link_intf_clk",
  1276. .parent_hws = (const struct clk_hw*[]){
  1277. &mdss_0_disp_cc_mdss_dptx2_link_div_clk_src.clkr.hw,
  1278. },
  1279. .num_parents = 1,
  1280. .flags = CLK_SET_RATE_PARENT,
  1281. .ops = &clk_branch2_ops,
  1282. },
  1283. },
  1284. };
  1285. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_pixel0_clk = {
  1286. .halt_reg = 0x8078,
  1287. .halt_check = BRANCH_HALT,
  1288. .clkr = {
  1289. .enable_reg = 0x8078,
  1290. .enable_mask = BIT(0),
  1291. .hw.init = &(const struct clk_init_data){
  1292. .name = "mdss_0_disp_cc_mdss_dptx2_pixel0_clk",
  1293. .parent_hws = (const struct clk_hw*[]){
  1294. &mdss_0_disp_cc_mdss_dptx2_pixel0_clk_src.clkr.hw,
  1295. },
  1296. .num_parents = 1,
  1297. .flags = CLK_SET_RATE_PARENT,
  1298. .ops = &clk_branch2_ops,
  1299. },
  1300. },
  1301. };
  1302. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_pixel1_clk = {
  1303. .halt_reg = 0x807c,
  1304. .halt_check = BRANCH_HALT,
  1305. .clkr = {
  1306. .enable_reg = 0x807c,
  1307. .enable_mask = BIT(0),
  1308. .hw.init = &(const struct clk_init_data){
  1309. .name = "mdss_0_disp_cc_mdss_dptx2_pixel1_clk",
  1310. .parent_hws = (const struct clk_hw*[]){
  1311. &mdss_0_disp_cc_mdss_dptx2_pixel1_clk_src.clkr.hw,
  1312. },
  1313. .num_parents = 1,
  1314. .flags = CLK_SET_RATE_PARENT,
  1315. .ops = &clk_branch2_ops,
  1316. },
  1317. },
  1318. };
  1319. static struct clk_branch mdss_0_disp_cc_mdss_dptx2_usb_router_link_intf_clk = {
  1320. .halt_reg = 0x8088,
  1321. .halt_check = BRANCH_HALT,
  1322. .clkr = {
  1323. .enable_reg = 0x8088,
  1324. .enable_mask = BIT(0),
  1325. .hw.init = &(const struct clk_init_data){
  1326. .name = "mdss_0_disp_cc_mdss_dptx2_usb_router_link_intf_clk",
  1327. .parent_hws = (const struct clk_hw*[]){
  1328. &mdss_0_disp_cc_mdss_dptx2_link_div_clk_src.clkr.hw,
  1329. },
  1330. .num_parents = 1,
  1331. .flags = CLK_SET_RATE_PARENT,
  1332. .ops = &clk_branch2_ops,
  1333. },
  1334. },
  1335. };
  1336. static struct clk_branch mdss_0_disp_cc_mdss_dptx3_aux_clk = {
  1337. .halt_reg = 0x80a0,
  1338. .halt_check = BRANCH_HALT,
  1339. .clkr = {
  1340. .enable_reg = 0x80a0,
  1341. .enable_mask = BIT(0),
  1342. .hw.init = &(const struct clk_init_data){
  1343. .name = "mdss_0_disp_cc_mdss_dptx3_aux_clk",
  1344. .parent_hws = (const struct clk_hw*[]){
  1345. &mdss_0_disp_cc_mdss_dptx3_aux_clk_src.clkr.hw,
  1346. },
  1347. .num_parents = 1,
  1348. .flags = CLK_SET_RATE_PARENT,
  1349. .ops = &clk_branch2_ops,
  1350. },
  1351. },
  1352. };
  1353. static struct clk_branch mdss_0_disp_cc_mdss_dptx3_crypto_clk = {
  1354. .halt_reg = 0x80a4,
  1355. .halt_check = BRANCH_HALT,
  1356. .clkr = {
  1357. .enable_reg = 0x80a4,
  1358. .enable_mask = BIT(0),
  1359. .hw.init = &(const struct clk_init_data){
  1360. .name = "mdss_0_disp_cc_mdss_dptx3_crypto_clk",
  1361. .parent_hws = (const struct clk_hw*[]){
  1362. &mdss_0_disp_cc_mdss_dptx3_link_clk_src.clkr.hw,
  1363. },
  1364. .num_parents = 1,
  1365. .flags = CLK_SET_RATE_PARENT,
  1366. .ops = &clk_branch2_ops,
  1367. },
  1368. },
  1369. };
  1370. static struct clk_branch mdss_0_disp_cc_mdss_dptx3_link_clk = {
  1371. .halt_reg = 0x8098,
  1372. .halt_check = BRANCH_HALT,
  1373. .clkr = {
  1374. .enable_reg = 0x8098,
  1375. .enable_mask = BIT(0),
  1376. .hw.init = &(const struct clk_init_data){
  1377. .name = "mdss_0_disp_cc_mdss_dptx3_link_clk",
  1378. .parent_hws = (const struct clk_hw*[]){
  1379. &mdss_0_disp_cc_mdss_dptx3_link_clk_src.clkr.hw,
  1380. },
  1381. .num_parents = 1,
  1382. .flags = CLK_SET_RATE_PARENT,
  1383. .ops = &clk_branch2_ops,
  1384. },
  1385. },
  1386. };
  1387. static struct clk_branch mdss_0_disp_cc_mdss_dptx3_link_intf_clk = {
  1388. .halt_reg = 0x809c,
  1389. .halt_check = BRANCH_HALT,
  1390. .clkr = {
  1391. .enable_reg = 0x809c,
  1392. .enable_mask = BIT(0),
  1393. .hw.init = &(const struct clk_init_data){
  1394. .name = "mdss_0_disp_cc_mdss_dptx3_link_intf_clk",
  1395. .parent_hws = (const struct clk_hw*[]){
  1396. &mdss_0_disp_cc_mdss_dptx3_link_div_clk_src.clkr.hw,
  1397. },
  1398. .num_parents = 1,
  1399. .flags = CLK_SET_RATE_PARENT,
  1400. .ops = &clk_branch2_ops,
  1401. },
  1402. },
  1403. };
  1404. static struct clk_branch mdss_0_disp_cc_mdss_dptx3_pixel0_clk = {
  1405. .halt_reg = 0x8094,
  1406. .halt_check = BRANCH_HALT,
  1407. .clkr = {
  1408. .enable_reg = 0x8094,
  1409. .enable_mask = BIT(0),
  1410. .hw.init = &(const struct clk_init_data){
  1411. .name = "mdss_0_disp_cc_mdss_dptx3_pixel0_clk",
  1412. .parent_hws = (const struct clk_hw*[]){
  1413. &mdss_0_disp_cc_mdss_dptx3_pixel0_clk_src.clkr.hw,
  1414. },
  1415. .num_parents = 1,
  1416. .flags = CLK_SET_RATE_PARENT,
  1417. .ops = &clk_branch2_ops,
  1418. },
  1419. },
  1420. };
  1421. static struct clk_branch mdss_0_disp_cc_mdss_esc0_clk = {
  1422. .halt_reg = 0x8038,
  1423. .halt_check = BRANCH_HALT,
  1424. .clkr = {
  1425. .enable_reg = 0x8038,
  1426. .enable_mask = BIT(0),
  1427. .hw.init = &(const struct clk_init_data){
  1428. .name = "mdss_0_disp_cc_mdss_esc0_clk",
  1429. .parent_hws = (const struct clk_hw*[]){
  1430. &mdss_0_disp_cc_mdss_esc0_clk_src.clkr.hw,
  1431. },
  1432. .num_parents = 1,
  1433. .flags = CLK_SET_RATE_PARENT,
  1434. .ops = &clk_branch2_ops,
  1435. },
  1436. },
  1437. };
  1438. static struct clk_branch mdss_0_disp_cc_mdss_esc1_clk = {
  1439. .halt_reg = 0x803c,
  1440. .halt_check = BRANCH_HALT,
  1441. .clkr = {
  1442. .enable_reg = 0x803c,
  1443. .enable_mask = BIT(0),
  1444. .hw.init = &(const struct clk_init_data){
  1445. .name = "mdss_0_disp_cc_mdss_esc1_clk",
  1446. .parent_hws = (const struct clk_hw*[]){
  1447. &mdss_0_disp_cc_mdss_esc1_clk_src.clkr.hw,
  1448. },
  1449. .num_parents = 1,
  1450. .flags = CLK_SET_RATE_PARENT,
  1451. .ops = &clk_branch2_ops,
  1452. },
  1453. },
  1454. };
  1455. static struct clk_branch mdss_0_disp_cc_mdss_mdp1_clk = {
  1456. .halt_reg = 0xa004,
  1457. .halt_check = BRANCH_HALT,
  1458. .clkr = {
  1459. .enable_reg = 0xa004,
  1460. .enable_mask = BIT(0),
  1461. .hw.init = &(const struct clk_init_data){
  1462. .name = "mdss_0_disp_cc_mdss_mdp1_clk",
  1463. .parent_hws = (const struct clk_hw*[]){
  1464. &mdss_0_disp_cc_mdss_mdp_clk_src.clkr.hw,
  1465. },
  1466. .num_parents = 1,
  1467. .flags = CLK_SET_RATE_PARENT,
  1468. .ops = &clk_branch2_ops,
  1469. },
  1470. },
  1471. };
  1472. static struct clk_branch mdss_0_disp_cc_mdss_mdp_clk = {
  1473. .halt_reg = 0x800c,
  1474. .halt_check = BRANCH_HALT,
  1475. .clkr = {
  1476. .enable_reg = 0x800c,
  1477. .enable_mask = BIT(0),
  1478. .hw.init = &(const struct clk_init_data){
  1479. .name = "mdss_0_disp_cc_mdss_mdp_clk",
  1480. .parent_hws = (const struct clk_hw*[]){
  1481. &mdss_0_disp_cc_mdss_mdp_clk_src.clkr.hw,
  1482. },
  1483. .num_parents = 1,
  1484. .flags = CLK_SET_RATE_PARENT,
  1485. .ops = &clk_branch2_ops,
  1486. },
  1487. },
  1488. };
  1489. static struct clk_branch mdss_0_disp_cc_mdss_mdp_lut1_clk = {
  1490. .halt_reg = 0xa010,
  1491. .halt_check = BRANCH_HALT,
  1492. .clkr = {
  1493. .enable_reg = 0xa010,
  1494. .enable_mask = BIT(0),
  1495. .hw.init = &(const struct clk_init_data){
  1496. .name = "mdss_0_disp_cc_mdss_mdp_lut1_clk",
  1497. .parent_hws = (const struct clk_hw*[]){
  1498. &mdss_0_disp_cc_mdss_mdp_clk_src.clkr.hw,
  1499. },
  1500. .num_parents = 1,
  1501. .flags = CLK_SET_RATE_PARENT,
  1502. .ops = &clk_branch2_ops,
  1503. },
  1504. },
  1505. };
  1506. static struct clk_branch mdss_0_disp_cc_mdss_mdp_lut_clk = {
  1507. .halt_reg = 0x8018,
  1508. .halt_check = BRANCH_HALT_VOTED,
  1509. .clkr = {
  1510. .enable_reg = 0x8018,
  1511. .enable_mask = BIT(0),
  1512. .hw.init = &(const struct clk_init_data){
  1513. .name = "mdss_0_disp_cc_mdss_mdp_lut_clk",
  1514. .parent_hws = (const struct clk_hw*[]){
  1515. &mdss_0_disp_cc_mdss_mdp_clk_src.clkr.hw,
  1516. },
  1517. .num_parents = 1,
  1518. .flags = CLK_SET_RATE_PARENT,
  1519. .ops = &clk_branch2_ops,
  1520. },
  1521. },
  1522. };
  1523. static struct clk_branch mdss_0_disp_cc_mdss_non_gdsc_ahb_clk = {
  1524. .halt_reg = 0xc004,
  1525. .halt_check = BRANCH_HALT_VOTED,
  1526. .clkr = {
  1527. .enable_reg = 0xc004,
  1528. .enable_mask = BIT(0),
  1529. .hw.init = &(const struct clk_init_data){
  1530. .name = "mdss_0_disp_cc_mdss_non_gdsc_ahb_clk",
  1531. .parent_hws = (const struct clk_hw*[]){
  1532. &mdss_0_disp_cc_mdss_ahb_clk_src.clkr.hw,
  1533. },
  1534. .num_parents = 1,
  1535. .flags = CLK_SET_RATE_PARENT,
  1536. .ops = &clk_branch2_ops,
  1537. },
  1538. },
  1539. };
  1540. static struct clk_branch mdss_0_disp_cc_mdss_pclk0_clk = {
  1541. .halt_reg = 0x8004,
  1542. .halt_check = BRANCH_HALT,
  1543. .clkr = {
  1544. .enable_reg = 0x8004,
  1545. .enable_mask = BIT(0),
  1546. .hw.init = &(const struct clk_init_data){
  1547. .name = "mdss_0_disp_cc_mdss_pclk0_clk",
  1548. .parent_hws = (const struct clk_hw*[]){
  1549. &mdss_0_disp_cc_mdss_pclk0_clk_src.clkr.hw,
  1550. },
  1551. .num_parents = 1,
  1552. .flags = CLK_SET_RATE_PARENT,
  1553. .ops = &clk_branch2_ops,
  1554. },
  1555. },
  1556. };
  1557. static struct clk_branch mdss_0_disp_cc_mdss_pclk1_clk = {
  1558. .halt_reg = 0x8008,
  1559. .halt_check = BRANCH_HALT,
  1560. .clkr = {
  1561. .enable_reg = 0x8008,
  1562. .enable_mask = BIT(0),
  1563. .hw.init = &(const struct clk_init_data){
  1564. .name = "mdss_0_disp_cc_mdss_pclk1_clk",
  1565. .parent_hws = (const struct clk_hw*[]){
  1566. &mdss_0_disp_cc_mdss_pclk1_clk_src.clkr.hw,
  1567. },
  1568. .num_parents = 1,
  1569. .flags = CLK_SET_RATE_PARENT,
  1570. .ops = &clk_branch2_ops,
  1571. },
  1572. },
  1573. };
  1574. static struct clk_branch mdss_0_disp_cc_mdss_rscc_ahb_clk = {
  1575. .halt_reg = 0xc00c,
  1576. .halt_check = BRANCH_HALT,
  1577. .clkr = {
  1578. .enable_reg = 0xc00c,
  1579. .enable_mask = BIT(0),
  1580. .hw.init = &(const struct clk_init_data){
  1581. .name = "mdss_0_disp_cc_mdss_rscc_ahb_clk",
  1582. .parent_hws = (const struct clk_hw*[]){
  1583. &mdss_0_disp_cc_mdss_ahb_clk_src.clkr.hw,
  1584. },
  1585. .num_parents = 1,
  1586. .flags = CLK_SET_RATE_PARENT,
  1587. .ops = &clk_branch2_aon_ops,
  1588. },
  1589. },
  1590. };
  1591. static struct clk_branch mdss_0_disp_cc_mdss_rscc_vsync_clk = {
  1592. .halt_reg = 0xc008,
  1593. .halt_check = BRANCH_HALT,
  1594. .clkr = {
  1595. .enable_reg = 0xc008,
  1596. .enable_mask = BIT(0),
  1597. .hw.init = &(const struct clk_init_data){
  1598. .name = "mdss_0_disp_cc_mdss_rscc_vsync_clk",
  1599. .parent_hws = (const struct clk_hw*[]){
  1600. &mdss_0_disp_cc_mdss_vsync_clk_src.clkr.hw,
  1601. },
  1602. .num_parents = 1,
  1603. .flags = CLK_SET_RATE_PARENT,
  1604. .ops = &clk_branch2_ops,
  1605. },
  1606. },
  1607. };
  1608. static struct clk_branch mdss_0_disp_cc_mdss_vsync1_clk = {
  1609. .halt_reg = 0xa01c,
  1610. .halt_check = BRANCH_HALT,
  1611. .clkr = {
  1612. .enable_reg = 0xa01c,
  1613. .enable_mask = BIT(0),
  1614. .hw.init = &(const struct clk_init_data){
  1615. .name = "mdss_0_disp_cc_mdss_vsync1_clk",
  1616. .parent_hws = (const struct clk_hw*[]){
  1617. &mdss_0_disp_cc_mdss_vsync_clk_src.clkr.hw,
  1618. },
  1619. .num_parents = 1,
  1620. .flags = CLK_SET_RATE_PARENT,
  1621. .ops = &clk_branch2_ops,
  1622. },
  1623. },
  1624. };
  1625. static struct clk_branch mdss_0_disp_cc_mdss_vsync_clk = {
  1626. .halt_reg = 0x8024,
  1627. .halt_check = BRANCH_HALT,
  1628. .clkr = {
  1629. .enable_reg = 0x8024,
  1630. .enable_mask = BIT(0),
  1631. .hw.init = &(const struct clk_init_data){
  1632. .name = "mdss_0_disp_cc_mdss_vsync_clk",
  1633. .parent_hws = (const struct clk_hw*[]){
  1634. &mdss_0_disp_cc_mdss_vsync_clk_src.clkr.hw,
  1635. },
  1636. .num_parents = 1,
  1637. .flags = CLK_SET_RATE_PARENT,
  1638. .ops = &clk_branch2_ops,
  1639. },
  1640. },
  1641. };
  1642. static struct clk_branch mdss_0_disp_cc_sleep_clk = {
  1643. .halt_reg = 0xe074,
  1644. .halt_check = BRANCH_HALT,
  1645. .clkr = {
  1646. .enable_reg = 0xe074,
  1647. .enable_mask = BIT(0),
  1648. .hw.init = &(const struct clk_init_data){
  1649. .name = "mdss_0_disp_cc_sleep_clk",
  1650. .parent_hws = (const struct clk_hw*[]){
  1651. &mdss_0_disp_cc_sleep_clk_src.clkr.hw,
  1652. },
  1653. .num_parents = 1,
  1654. .flags = CLK_SET_RATE_PARENT,
  1655. .ops = &clk_branch2_ops,
  1656. },
  1657. },
  1658. };
  1659. static struct clk_regmap *disp_cc_0_anorak_clocks[] = {
  1660. [DISP_CC_MDSS_ACCU_CLK] = &mdss_0_disp_cc_mdss_accu_clk.clkr,
  1661. [DISP_CC_MDSS_AHB1_CLK] = &mdss_0_disp_cc_mdss_ahb1_clk.clkr,
  1662. [DISP_CC_MDSS_AHB_CLK] = &mdss_0_disp_cc_mdss_ahb_clk.clkr,
  1663. [DISP_CC_MDSS_AHB_CLK_SRC] = &mdss_0_disp_cc_mdss_ahb_clk_src.clkr,
  1664. [DISP_CC_MDSS_BYTE0_CLK] = &mdss_0_disp_cc_mdss_byte0_clk.clkr,
  1665. [DISP_CC_MDSS_BYTE0_CLK_SRC] = &mdss_0_disp_cc_mdss_byte0_clk_src.clkr,
  1666. [DISP_CC_MDSS_BYTE0_DIV_CLK_SRC] = &mdss_0_disp_cc_mdss_byte0_div_clk_src.clkr,
  1667. [DISP_CC_MDSS_BYTE0_INTF_CLK] = &mdss_0_disp_cc_mdss_byte0_intf_clk.clkr,
  1668. [DISP_CC_MDSS_BYTE1_CLK] = &mdss_0_disp_cc_mdss_byte1_clk.clkr,
  1669. [DISP_CC_MDSS_BYTE1_CLK_SRC] = &mdss_0_disp_cc_mdss_byte1_clk_src.clkr,
  1670. [DISP_CC_MDSS_BYTE1_DIV_CLK_SRC] = &mdss_0_disp_cc_mdss_byte1_div_clk_src.clkr,
  1671. [DISP_CC_MDSS_BYTE1_INTF_CLK] = &mdss_0_disp_cc_mdss_byte1_intf_clk.clkr,
  1672. [DISP_CC_MDSS_DPTX0_AUX_CLK] = &mdss_0_disp_cc_mdss_dptx0_aux_clk.clkr,
  1673. [DISP_CC_MDSS_DPTX0_AUX_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx0_aux_clk_src.clkr,
  1674. [DISP_CC_MDSS_DPTX0_CRYPTO_CLK] = &mdss_0_disp_cc_mdss_dptx0_crypto_clk.clkr,
  1675. [DISP_CC_MDSS_DPTX0_LINK_CLK] = &mdss_0_disp_cc_mdss_dptx0_link_clk.clkr,
  1676. [DISP_CC_MDSS_DPTX0_LINK_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx0_link_clk_src.clkr,
  1677. [DISP_CC_MDSS_DPTX0_LINK_DIV_CLK_SRC] =
  1678. &mdss_0_disp_cc_mdss_dptx0_link_div_clk_src.clkr,
  1679. [DISP_CC_MDSS_DPTX0_LINK_INTF_CLK] = &mdss_0_disp_cc_mdss_dptx0_link_intf_clk.clkr,
  1680. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK] = &mdss_0_disp_cc_mdss_dptx0_pixel0_clk.clkr,
  1681. [DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx0_pixel0_clk_src.clkr,
  1682. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK] = &mdss_0_disp_cc_mdss_dptx0_pixel1_clk.clkr,
  1683. [DISP_CC_MDSS_DPTX0_PIXEL1_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx0_pixel1_clk_src.clkr,
  1684. [DISP_CC_MDSS_DPTX0_USB_ROUTER_LINK_INTF_CLK] =
  1685. &mdss_0_disp_cc_mdss_dptx0_usb_router_link_intf_clk.clkr,
  1686. [DISP_CC_MDSS_DPTX1_AUX_CLK] = &mdss_0_disp_cc_mdss_dptx1_aux_clk.clkr,
  1687. [DISP_CC_MDSS_DPTX1_AUX_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx1_aux_clk_src.clkr,
  1688. [DISP_CC_MDSS_DPTX1_CRYPTO_CLK] = &mdss_0_disp_cc_mdss_dptx1_crypto_clk.clkr,
  1689. [DISP_CC_MDSS_DPTX1_LINK_CLK] = &mdss_0_disp_cc_mdss_dptx1_link_clk.clkr,
  1690. [DISP_CC_MDSS_DPTX1_LINK_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx1_link_clk_src.clkr,
  1691. [DISP_CC_MDSS_DPTX1_LINK_DIV_CLK_SRC] =
  1692. &mdss_0_disp_cc_mdss_dptx1_link_div_clk_src.clkr,
  1693. [DISP_CC_MDSS_DPTX1_LINK_INTF_CLK] = &mdss_0_disp_cc_mdss_dptx1_link_intf_clk.clkr,
  1694. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK] = &mdss_0_disp_cc_mdss_dptx1_pixel0_clk.clkr,
  1695. [DISP_CC_MDSS_DPTX1_PIXEL0_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx1_pixel0_clk_src.clkr,
  1696. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK] = &mdss_0_disp_cc_mdss_dptx1_pixel1_clk.clkr,
  1697. [DISP_CC_MDSS_DPTX1_PIXEL1_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx1_pixel1_clk_src.clkr,
  1698. [DISP_CC_MDSS_DPTX1_USB_ROUTER_LINK_INTF_CLK] =
  1699. &mdss_0_disp_cc_mdss_dptx1_usb_router_link_intf_clk.clkr,
  1700. [DISP_CC_MDSS_DPTX2_AUX_CLK] = &mdss_0_disp_cc_mdss_dptx2_aux_clk.clkr,
  1701. [DISP_CC_MDSS_DPTX2_AUX_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx2_aux_clk_src.clkr,
  1702. [DISP_CC_MDSS_DPTX2_CRYPTO_CLK] = &mdss_0_disp_cc_mdss_dptx2_crypto_clk.clkr,
  1703. [DISP_CC_MDSS_DPTX2_LINK_CLK] = &mdss_0_disp_cc_mdss_dptx2_link_clk.clkr,
  1704. [DISP_CC_MDSS_DPTX2_LINK_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx2_link_clk_src.clkr,
  1705. [DISP_CC_MDSS_DPTX2_LINK_DIV_CLK_SRC] =
  1706. &mdss_0_disp_cc_mdss_dptx2_link_div_clk_src.clkr,
  1707. [DISP_CC_MDSS_DPTX2_LINK_INTF_CLK] = &mdss_0_disp_cc_mdss_dptx2_link_intf_clk.clkr,
  1708. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK] = &mdss_0_disp_cc_mdss_dptx2_pixel0_clk.clkr,
  1709. [DISP_CC_MDSS_DPTX2_PIXEL0_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx2_pixel0_clk_src.clkr,
  1710. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK] = &mdss_0_disp_cc_mdss_dptx2_pixel1_clk.clkr,
  1711. [DISP_CC_MDSS_DPTX2_PIXEL1_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx2_pixel1_clk_src.clkr,
  1712. [DISP_CC_MDSS_DPTX2_USB_ROUTER_LINK_INTF_CLK] =
  1713. &mdss_0_disp_cc_mdss_dptx2_usb_router_link_intf_clk.clkr,
  1714. [DISP_CC_MDSS_DPTX3_AUX_CLK] = &mdss_0_disp_cc_mdss_dptx3_aux_clk.clkr,
  1715. [DISP_CC_MDSS_DPTX3_AUX_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx3_aux_clk_src.clkr,
  1716. [DISP_CC_MDSS_DPTX3_CRYPTO_CLK] = &mdss_0_disp_cc_mdss_dptx3_crypto_clk.clkr,
  1717. [DISP_CC_MDSS_DPTX3_LINK_CLK] = &mdss_0_disp_cc_mdss_dptx3_link_clk.clkr,
  1718. [DISP_CC_MDSS_DPTX3_LINK_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx3_link_clk_src.clkr,
  1719. [DISP_CC_MDSS_DPTX3_LINK_DIV_CLK_SRC] =
  1720. &mdss_0_disp_cc_mdss_dptx3_link_div_clk_src.clkr,
  1721. [DISP_CC_MDSS_DPTX3_LINK_INTF_CLK] = &mdss_0_disp_cc_mdss_dptx3_link_intf_clk.clkr,
  1722. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK] = &mdss_0_disp_cc_mdss_dptx3_pixel0_clk.clkr,
  1723. [DISP_CC_MDSS_DPTX3_PIXEL0_CLK_SRC] = &mdss_0_disp_cc_mdss_dptx3_pixel0_clk_src.clkr,
  1724. [DISP_CC_MDSS_ESC0_CLK] = &mdss_0_disp_cc_mdss_esc0_clk.clkr,
  1725. [DISP_CC_MDSS_ESC0_CLK_SRC] = &mdss_0_disp_cc_mdss_esc0_clk_src.clkr,
  1726. [DISP_CC_MDSS_ESC1_CLK] = &mdss_0_disp_cc_mdss_esc1_clk.clkr,
  1727. [DISP_CC_MDSS_ESC1_CLK_SRC] = &mdss_0_disp_cc_mdss_esc1_clk_src.clkr,
  1728. [DISP_CC_MDSS_MDP1_CLK] = &mdss_0_disp_cc_mdss_mdp1_clk.clkr,
  1729. [DISP_CC_MDSS_MDP_CLK] = &mdss_0_disp_cc_mdss_mdp_clk.clkr,
  1730. [DISP_CC_MDSS_MDP_CLK_SRC] = &mdss_0_disp_cc_mdss_mdp_clk_src.clkr,
  1731. [DISP_CC_MDSS_MDP_LUT1_CLK] = &mdss_0_disp_cc_mdss_mdp_lut1_clk.clkr,
  1732. [DISP_CC_MDSS_MDP_LUT_CLK] = &mdss_0_disp_cc_mdss_mdp_lut_clk.clkr,
  1733. [DISP_CC_MDSS_NON_GDSC_AHB_CLK] = &mdss_0_disp_cc_mdss_non_gdsc_ahb_clk.clkr,
  1734. [DISP_CC_MDSS_PCLK0_CLK] = &mdss_0_disp_cc_mdss_pclk0_clk.clkr,
  1735. [DISP_CC_MDSS_PCLK0_CLK_SRC] = &mdss_0_disp_cc_mdss_pclk0_clk_src.clkr,
  1736. [DISP_CC_MDSS_PCLK1_CLK] = &mdss_0_disp_cc_mdss_pclk1_clk.clkr,
  1737. [DISP_CC_MDSS_PCLK1_CLK_SRC] = &mdss_0_disp_cc_mdss_pclk1_clk_src.clkr,
  1738. [DISP_CC_MDSS_RSCC_AHB_CLK] = &mdss_0_disp_cc_mdss_rscc_ahb_clk.clkr,
  1739. [DISP_CC_MDSS_RSCC_VSYNC_CLK] = &mdss_0_disp_cc_mdss_rscc_vsync_clk.clkr,
  1740. [DISP_CC_MDSS_VSYNC1_CLK] = &mdss_0_disp_cc_mdss_vsync1_clk.clkr,
  1741. [DISP_CC_MDSS_VSYNC_CLK] = &mdss_0_disp_cc_mdss_vsync_clk.clkr,
  1742. [DISP_CC_MDSS_VSYNC_CLK_SRC] = &mdss_0_disp_cc_mdss_vsync_clk_src.clkr,
  1743. [DISP_CC_PLL0] = &mdss_0_disp_cc_pll0.clkr,
  1744. [DISP_CC_PLL1] = &mdss_0_disp_cc_pll1.clkr,
  1745. [DISP_CC_SLEEP_CLK] = &mdss_0_disp_cc_sleep_clk.clkr,
  1746. [DISP_CC_SLEEP_CLK_SRC] = &mdss_0_disp_cc_sleep_clk_src.clkr,
  1747. [DISP_CC_XO_CLK_SRC] = &mdss_0_disp_cc_xo_clk_src.clkr,
  1748. };
  1749. static const struct regmap_config disp_cc_0_anorak_regmap_config = {
  1750. .reg_bits = 32,
  1751. .reg_stride = 4,
  1752. .val_bits = 32,
  1753. .max_register = 0x11008,
  1754. .fast_io = true,
  1755. };
  1756. static struct qcom_cc_desc disp_cc_0_anorak_desc = {
  1757. .config = &disp_cc_0_anorak_regmap_config,
  1758. .clks = disp_cc_0_anorak_clocks,
  1759. .num_clks = ARRAY_SIZE(disp_cc_0_anorak_clocks),
  1760. .clk_regulators = disp_cc_0_anorak_regulators,
  1761. .num_clk_regulators = ARRAY_SIZE(disp_cc_0_anorak_regulators),
  1762. };
  1763. static const struct of_device_id disp_cc_0_anorak_match_table[] = {
  1764. { .compatible = "qcom,anorak-dispcc0" },
  1765. { }
  1766. };
  1767. MODULE_DEVICE_TABLE(of, disp_cc_0_anorak_match_table);
  1768. static int disp_cc_0_anorak_probe(struct platform_device *pdev)
  1769. {
  1770. struct regmap *regmap;
  1771. int ret;
  1772. regmap = qcom_cc_map(pdev, &disp_cc_0_anorak_desc);
  1773. if (IS_ERR(regmap))
  1774. return PTR_ERR(regmap);
  1775. ret = qcom_cc_runtime_init(pdev, &disp_cc_0_anorak_desc);
  1776. if (ret)
  1777. return ret;
  1778. ret = pm_runtime_get_sync(&pdev->dev);
  1779. if (ret)
  1780. return ret;
  1781. clk_lucid_evo_pll_configure(&mdss_0_disp_cc_pll0, regmap, &mdss_0_disp_cc_pll0_config);
  1782. clk_lucid_evo_pll_configure(&mdss_0_disp_cc_pll1, regmap, &mdss_0_disp_cc_pll1_config);
  1783. /* Enable clock gating for MDP clocks */
  1784. regmap_update_bits(regmap, DISP_CC_MISC_CMD, 0x10, 0x10);
  1785. /*
  1786. * Keep clocks always enabled:
  1787. * mdss_0_disp_cc_xo_clk
  1788. */
  1789. regmap_update_bits(regmap, 0xe054, BIT(0), BIT(0));
  1790. ret = qcom_cc_really_probe(pdev, &disp_cc_0_anorak_desc, regmap);
  1791. if (ret) {
  1792. dev_err(&pdev->dev, "Failed to register DISP CC 0 clocks\n");
  1793. return ret;
  1794. }
  1795. pm_runtime_put_sync(&pdev->dev);
  1796. dev_info(&pdev->dev, "Registered DISP CC 0 clocks\n");
  1797. return ret;
  1798. }
  1799. static void disp_cc_0_anorak_sync_state(struct device *dev)
  1800. {
  1801. qcom_cc_sync_state(dev, &disp_cc_0_anorak_desc);
  1802. }
  1803. static const struct dev_pm_ops disp_cc_0_anorak_pm_ops = {
  1804. SET_RUNTIME_PM_OPS(qcom_cc_runtime_suspend, qcom_cc_runtime_resume, NULL)
  1805. SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
  1806. pm_runtime_force_resume)
  1807. };
  1808. static struct platform_driver disp_cc_0_anorak_driver = {
  1809. .probe = disp_cc_0_anorak_probe,
  1810. .driver = {
  1811. .name = "disp_cc_0-anorak",
  1812. .of_match_table = disp_cc_0_anorak_match_table,
  1813. .sync_state = disp_cc_0_anorak_sync_state,
  1814. .pm = &disp_cc_0_anorak_pm_ops,
  1815. },
  1816. };
  1817. static int __init disp_cc_0_anorak_init(void)
  1818. {
  1819. return platform_driver_register(&disp_cc_0_anorak_driver);
  1820. }
  1821. subsys_initcall(disp_cc_0_anorak_init);
  1822. static void __exit disp_cc_0_anorak_exit(void)
  1823. {
  1824. platform_driver_unregister(&disp_cc_0_anorak_driver);
  1825. }
  1826. module_exit(disp_cc_0_anorak_exit);
  1827. MODULE_DESCRIPTION("QTI DISP_CC_0 ANORAK Driver");
  1828. MODULE_LICENSE("GPL");