camcc-x1e80100.c 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #include <linux/clk-provider.h>
  6. #include <linux/mod_devicetable.h>
  7. #include <linux/module.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/regmap.h>
  10. #include <dt-bindings/clock/qcom,x1e80100-camcc.h>
  11. #include "clk-alpha-pll.h"
  12. #include "clk-branch.h"
  13. #include "clk-rcg.h"
  14. #include "clk-regmap.h"
  15. #include "common.h"
  16. #include "gdsc.h"
  17. #include "reset.h"
  18. enum {
  19. DT_IFACE,
  20. DT_BI_TCXO,
  21. DT_BI_TCXO_AO,
  22. DT_SLEEP_CLK,
  23. };
  24. enum {
  25. P_BI_TCXO,
  26. P_BI_TCXO_AO,
  27. P_CAM_CC_PLL0_OUT_EVEN,
  28. P_CAM_CC_PLL0_OUT_MAIN,
  29. P_CAM_CC_PLL0_OUT_ODD,
  30. P_CAM_CC_PLL1_OUT_EVEN,
  31. P_CAM_CC_PLL2_OUT_EVEN,
  32. P_CAM_CC_PLL2_OUT_MAIN,
  33. P_CAM_CC_PLL3_OUT_EVEN,
  34. P_CAM_CC_PLL4_OUT_EVEN,
  35. P_CAM_CC_PLL6_OUT_EVEN,
  36. P_CAM_CC_PLL8_OUT_EVEN,
  37. P_SLEEP_CLK,
  38. };
  39. static const struct pll_vco lucid_ole_vco[] = {
  40. { 249600000, 2300000000, 0 },
  41. };
  42. static const struct pll_vco rivian_ole_vco[] = {
  43. { 777000000, 1285000000, 0 },
  44. };
  45. static const struct alpha_pll_config cam_cc_pll0_config = {
  46. .l = 0x3e,
  47. .alpha = 0x8000,
  48. .config_ctl_val = 0x20485699,
  49. .config_ctl_hi_val = 0x00182261,
  50. .config_ctl_hi1_val = 0x82aa299c,
  51. .test_ctl_val = 0x00000000,
  52. .test_ctl_hi_val = 0x00000003,
  53. .test_ctl_hi1_val = 0x00009000,
  54. .test_ctl_hi2_val = 0x00000034,
  55. .user_ctl_val = 0x00008400,
  56. .user_ctl_hi_val = 0x00000005,
  57. };
  58. static struct clk_alpha_pll cam_cc_pll0 = {
  59. .offset = 0x0,
  60. .config = &cam_cc_pll0_config,
  61. .vco_table = lucid_ole_vco,
  62. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  63. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  64. .clkr = {
  65. .hw.init = &(const struct clk_init_data) {
  66. .name = "cam_cc_pll0",
  67. .parent_data = &(const struct clk_parent_data) {
  68. .index = DT_BI_TCXO,
  69. },
  70. .num_parents = 1,
  71. .ops = &clk_alpha_pll_lucid_evo_ops,
  72. },
  73. },
  74. };
  75. static const struct clk_div_table post_div_table_cam_cc_pll0_out_even[] = {
  76. { 0x1, 2 },
  77. { }
  78. };
  79. static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even = {
  80. .offset = 0x0,
  81. .post_div_shift = 10,
  82. .post_div_table = post_div_table_cam_cc_pll0_out_even,
  83. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even),
  84. .width = 4,
  85. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  86. .clkr.hw.init = &(const struct clk_init_data) {
  87. .name = "cam_cc_pll0_out_even",
  88. .parent_hws = (const struct clk_hw*[]) {
  89. &cam_cc_pll0.clkr.hw,
  90. },
  91. .num_parents = 1,
  92. .flags = CLK_SET_RATE_PARENT,
  93. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  94. },
  95. };
  96. static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd[] = {
  97. { 0x2, 3 },
  98. { }
  99. };
  100. static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd = {
  101. .offset = 0x0,
  102. .post_div_shift = 14,
  103. .post_div_table = post_div_table_cam_cc_pll0_out_odd,
  104. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd),
  105. .width = 4,
  106. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  107. .clkr.hw.init = &(const struct clk_init_data) {
  108. .name = "cam_cc_pll0_out_odd",
  109. .parent_hws = (const struct clk_hw*[]) {
  110. &cam_cc_pll0.clkr.hw,
  111. },
  112. .num_parents = 1,
  113. .flags = CLK_SET_RATE_PARENT,
  114. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  115. },
  116. };
  117. static const struct alpha_pll_config cam_cc_pll1_config = {
  118. .l = 0x1f,
  119. .alpha = 0xaaaa,
  120. .config_ctl_val = 0x20485699,
  121. .config_ctl_hi_val = 0x00182261,
  122. .config_ctl_hi1_val = 0x82aa299c,
  123. .test_ctl_val = 0x00000000,
  124. .test_ctl_hi_val = 0x00000003,
  125. .test_ctl_hi1_val = 0x00009000,
  126. .test_ctl_hi2_val = 0x00000034,
  127. .user_ctl_val = 0x00000400,
  128. .user_ctl_hi_val = 0x00000005,
  129. };
  130. static struct clk_alpha_pll cam_cc_pll1 = {
  131. .offset = 0x1000,
  132. .config = &cam_cc_pll1_config,
  133. .vco_table = lucid_ole_vco,
  134. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  135. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  136. .clkr = {
  137. .hw.init = &(const struct clk_init_data) {
  138. .name = "cam_cc_pll1",
  139. .parent_data = &(const struct clk_parent_data) {
  140. .index = DT_BI_TCXO,
  141. },
  142. .num_parents = 1,
  143. .ops = &clk_alpha_pll_lucid_evo_ops,
  144. },
  145. },
  146. };
  147. static const struct clk_div_table post_div_table_cam_cc_pll1_out_even[] = {
  148. { 0x1, 2 },
  149. { }
  150. };
  151. static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even = {
  152. .offset = 0x1000,
  153. .post_div_shift = 10,
  154. .post_div_table = post_div_table_cam_cc_pll1_out_even,
  155. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even),
  156. .width = 4,
  157. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  158. .clkr.hw.init = &(const struct clk_init_data) {
  159. .name = "cam_cc_pll1_out_even",
  160. .parent_hws = (const struct clk_hw*[]) {
  161. &cam_cc_pll1.clkr.hw,
  162. },
  163. .num_parents = 1,
  164. .flags = CLK_SET_RATE_PARENT,
  165. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  166. },
  167. };
  168. static const struct alpha_pll_config cam_cc_pll2_config = {
  169. .l = 0x32,
  170. .alpha = 0x0,
  171. .config_ctl_val = 0x10000030,
  172. .config_ctl_hi_val = 0x80890263,
  173. .config_ctl_hi1_val = 0x00000217,
  174. .user_ctl_val = 0x00000001,
  175. .user_ctl_hi_val = 0x00000000,
  176. };
  177. static struct clk_alpha_pll cam_cc_pll2 = {
  178. .offset = 0x2000,
  179. .config = &cam_cc_pll2_config,
  180. .vco_table = rivian_ole_vco,
  181. .num_vco = ARRAY_SIZE(rivian_ole_vco),
  182. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO],
  183. .clkr = {
  184. .hw.init = &(const struct clk_init_data) {
  185. .name = "cam_cc_pll2",
  186. .parent_data = &(const struct clk_parent_data) {
  187. .index = DT_BI_TCXO,
  188. },
  189. .num_parents = 1,
  190. .ops = &clk_alpha_pll_rivian_evo_ops,
  191. },
  192. },
  193. };
  194. static const struct alpha_pll_config cam_cc_pll3_config = {
  195. .l = 0x24,
  196. .alpha = 0x0,
  197. .config_ctl_val = 0x20485699,
  198. .config_ctl_hi_val = 0x00182261,
  199. .config_ctl_hi1_val = 0x82aa299c,
  200. .test_ctl_val = 0x00000000,
  201. .test_ctl_hi_val = 0x00000003,
  202. .test_ctl_hi1_val = 0x00009000,
  203. .test_ctl_hi2_val = 0x00000034,
  204. .user_ctl_val = 0x00000400,
  205. .user_ctl_hi_val = 0x00000005,
  206. };
  207. static struct clk_alpha_pll cam_cc_pll3 = {
  208. .offset = 0x3000,
  209. .config = &cam_cc_pll3_config,
  210. .vco_table = lucid_ole_vco,
  211. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  212. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  213. .clkr = {
  214. .hw.init = &(const struct clk_init_data) {
  215. .name = "cam_cc_pll3",
  216. .parent_data = &(const struct clk_parent_data) {
  217. .index = DT_BI_TCXO,
  218. },
  219. .num_parents = 1,
  220. .ops = &clk_alpha_pll_lucid_evo_ops,
  221. },
  222. },
  223. };
  224. static const struct clk_div_table post_div_table_cam_cc_pll3_out_even[] = {
  225. { 0x1, 2 },
  226. { }
  227. };
  228. static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even = {
  229. .offset = 0x3000,
  230. .post_div_shift = 10,
  231. .post_div_table = post_div_table_cam_cc_pll3_out_even,
  232. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even),
  233. .width = 4,
  234. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  235. .clkr.hw.init = &(const struct clk_init_data) {
  236. .name = "cam_cc_pll3_out_even",
  237. .parent_hws = (const struct clk_hw*[]) {
  238. &cam_cc_pll3.clkr.hw,
  239. },
  240. .num_parents = 1,
  241. .flags = CLK_SET_RATE_PARENT,
  242. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  243. },
  244. };
  245. static const struct alpha_pll_config cam_cc_pll4_config = {
  246. .l = 0x24,
  247. .alpha = 0x0,
  248. .config_ctl_val = 0x20485699,
  249. .config_ctl_hi_val = 0x00182261,
  250. .config_ctl_hi1_val = 0x82aa299c,
  251. .test_ctl_val = 0x00000000,
  252. .test_ctl_hi_val = 0x00000003,
  253. .test_ctl_hi1_val = 0x00009000,
  254. .test_ctl_hi2_val = 0x00000034,
  255. .user_ctl_val = 0x00000400,
  256. .user_ctl_hi_val = 0x00000005,
  257. };
  258. static struct clk_alpha_pll cam_cc_pll4 = {
  259. .offset = 0x4000,
  260. .config = &cam_cc_pll4_config,
  261. .vco_table = lucid_ole_vco,
  262. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  263. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  264. .clkr = {
  265. .hw.init = &(const struct clk_init_data) {
  266. .name = "cam_cc_pll4",
  267. .parent_data = &(const struct clk_parent_data) {
  268. .index = DT_BI_TCXO,
  269. },
  270. .num_parents = 1,
  271. .ops = &clk_alpha_pll_lucid_evo_ops,
  272. },
  273. },
  274. };
  275. static const struct clk_div_table post_div_table_cam_cc_pll4_out_even[] = {
  276. { 0x1, 2 },
  277. { }
  278. };
  279. static struct clk_alpha_pll_postdiv cam_cc_pll4_out_even = {
  280. .offset = 0x4000,
  281. .post_div_shift = 10,
  282. .post_div_table = post_div_table_cam_cc_pll4_out_even,
  283. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll4_out_even),
  284. .width = 4,
  285. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  286. .clkr.hw.init = &(const struct clk_init_data) {
  287. .name = "cam_cc_pll4_out_even",
  288. .parent_hws = (const struct clk_hw*[]) {
  289. &cam_cc_pll4.clkr.hw,
  290. },
  291. .num_parents = 1,
  292. .flags = CLK_SET_RATE_PARENT,
  293. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  294. },
  295. };
  296. static const struct alpha_pll_config cam_cc_pll6_config = {
  297. .l = 0x24,
  298. .alpha = 0x0,
  299. .config_ctl_val = 0x20485699,
  300. .config_ctl_hi_val = 0x00182261,
  301. .config_ctl_hi1_val = 0x82aa299c,
  302. .test_ctl_val = 0x00000000,
  303. .test_ctl_hi_val = 0x00000003,
  304. .test_ctl_hi1_val = 0x00009000,
  305. .test_ctl_hi2_val = 0x00000034,
  306. .user_ctl_val = 0x00000400,
  307. .user_ctl_hi_val = 0x00000005,
  308. };
  309. static struct clk_alpha_pll cam_cc_pll6 = {
  310. .offset = 0x6000,
  311. .config = &cam_cc_pll6_config,
  312. .vco_table = lucid_ole_vco,
  313. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  314. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  315. .clkr = {
  316. .hw.init = &(const struct clk_init_data) {
  317. .name = "cam_cc_pll6",
  318. .parent_data = &(const struct clk_parent_data) {
  319. .index = DT_BI_TCXO,
  320. },
  321. .num_parents = 1,
  322. .ops = &clk_alpha_pll_lucid_evo_ops,
  323. },
  324. },
  325. };
  326. static const struct clk_div_table post_div_table_cam_cc_pll6_out_even[] = {
  327. { 0x1, 2 },
  328. { }
  329. };
  330. static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even = {
  331. .offset = 0x6000,
  332. .post_div_shift = 10,
  333. .post_div_table = post_div_table_cam_cc_pll6_out_even,
  334. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even),
  335. .width = 4,
  336. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  337. .clkr.hw.init = &(const struct clk_init_data) {
  338. .name = "cam_cc_pll6_out_even",
  339. .parent_hws = (const struct clk_hw*[]) {
  340. &cam_cc_pll6.clkr.hw,
  341. },
  342. .num_parents = 1,
  343. .flags = CLK_SET_RATE_PARENT,
  344. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  345. },
  346. };
  347. static const struct alpha_pll_config cam_cc_pll8_config = {
  348. .l = 0x32,
  349. .alpha = 0x0,
  350. .config_ctl_val = 0x20485699,
  351. .config_ctl_hi_val = 0x00182261,
  352. .config_ctl_hi1_val = 0x82aa299c,
  353. .test_ctl_val = 0x00000000,
  354. .test_ctl_hi_val = 0x00000003,
  355. .test_ctl_hi1_val = 0x00009000,
  356. .test_ctl_hi2_val = 0x00000034,
  357. .user_ctl_val = 0x00000400,
  358. .user_ctl_hi_val = 0x00000005,
  359. };
  360. static struct clk_alpha_pll cam_cc_pll8 = {
  361. .offset = 0x8000,
  362. .config = &cam_cc_pll8_config,
  363. .vco_table = lucid_ole_vco,
  364. .num_vco = ARRAY_SIZE(lucid_ole_vco),
  365. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  366. .clkr = {
  367. .hw.init = &(const struct clk_init_data) {
  368. .name = "cam_cc_pll8",
  369. .parent_data = &(const struct clk_parent_data) {
  370. .index = DT_BI_TCXO,
  371. },
  372. .num_parents = 1,
  373. .ops = &clk_alpha_pll_lucid_evo_ops,
  374. },
  375. },
  376. };
  377. static const struct clk_div_table post_div_table_cam_cc_pll8_out_even[] = {
  378. { 0x1, 2 },
  379. { }
  380. };
  381. static struct clk_alpha_pll_postdiv cam_cc_pll8_out_even = {
  382. .offset = 0x8000,
  383. .post_div_shift = 10,
  384. .post_div_table = post_div_table_cam_cc_pll8_out_even,
  385. .num_post_div = ARRAY_SIZE(post_div_table_cam_cc_pll8_out_even),
  386. .width = 4,
  387. .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
  388. .clkr.hw.init = &(const struct clk_init_data) {
  389. .name = "cam_cc_pll8_out_even",
  390. .parent_hws = (const struct clk_hw*[]) {
  391. &cam_cc_pll8.clkr.hw,
  392. },
  393. .num_parents = 1,
  394. .flags = CLK_SET_RATE_PARENT,
  395. .ops = &clk_alpha_pll_postdiv_lucid_ole_ops,
  396. },
  397. };
  398. static const struct parent_map cam_cc_parent_map_0[] = {
  399. { P_BI_TCXO, 0 },
  400. { P_CAM_CC_PLL0_OUT_MAIN, 1 },
  401. { P_CAM_CC_PLL0_OUT_EVEN, 2 },
  402. { P_CAM_CC_PLL0_OUT_ODD, 3 },
  403. { P_CAM_CC_PLL8_OUT_EVEN, 5 },
  404. };
  405. static const struct clk_parent_data cam_cc_parent_data_0[] = {
  406. { .index = DT_BI_TCXO },
  407. { .hw = &cam_cc_pll0.clkr.hw },
  408. { .hw = &cam_cc_pll0_out_even.clkr.hw },
  409. { .hw = &cam_cc_pll0_out_odd.clkr.hw },
  410. { .hw = &cam_cc_pll8_out_even.clkr.hw },
  411. };
  412. static const struct parent_map cam_cc_parent_map_1[] = {
  413. { P_BI_TCXO, 0 },
  414. { P_CAM_CC_PLL2_OUT_EVEN, 3 },
  415. { P_CAM_CC_PLL2_OUT_MAIN, 5 },
  416. };
  417. static const struct clk_parent_data cam_cc_parent_data_1[] = {
  418. { .index = DT_BI_TCXO },
  419. { .hw = &cam_cc_pll2.clkr.hw },
  420. { .hw = &cam_cc_pll2.clkr.hw },
  421. };
  422. static const struct parent_map cam_cc_parent_map_2[] = {
  423. { P_BI_TCXO, 0 },
  424. { P_CAM_CC_PLL3_OUT_EVEN, 6 },
  425. };
  426. static const struct clk_parent_data cam_cc_parent_data_2[] = {
  427. { .index = DT_BI_TCXO },
  428. { .hw = &cam_cc_pll3_out_even.clkr.hw },
  429. };
  430. static const struct parent_map cam_cc_parent_map_3[] = {
  431. { P_BI_TCXO, 0 },
  432. { P_CAM_CC_PLL4_OUT_EVEN, 6 },
  433. };
  434. static const struct clk_parent_data cam_cc_parent_data_3[] = {
  435. { .index = DT_BI_TCXO },
  436. { .hw = &cam_cc_pll4_out_even.clkr.hw },
  437. };
  438. static const struct parent_map cam_cc_parent_map_4[] = {
  439. { P_BI_TCXO, 0 },
  440. { P_CAM_CC_PLL1_OUT_EVEN, 4 },
  441. };
  442. static const struct clk_parent_data cam_cc_parent_data_4[] = {
  443. { .index = DT_BI_TCXO },
  444. { .hw = &cam_cc_pll1_out_even.clkr.hw },
  445. };
  446. static const struct parent_map cam_cc_parent_map_5[] = {
  447. { P_BI_TCXO, 0 },
  448. { P_CAM_CC_PLL6_OUT_EVEN, 6 },
  449. };
  450. static const struct clk_parent_data cam_cc_parent_data_5[] = {
  451. { .index = DT_BI_TCXO },
  452. { .hw = &cam_cc_pll6_out_even.clkr.hw },
  453. };
  454. static const struct parent_map cam_cc_parent_map_6[] = {
  455. { P_SLEEP_CLK, 0 },
  456. };
  457. static const struct clk_parent_data cam_cc_parent_data_6_ao[] = {
  458. { .index = DT_SLEEP_CLK },
  459. };
  460. static const struct parent_map cam_cc_parent_map_7[] = {
  461. { P_BI_TCXO, 0 },
  462. };
  463. static const struct clk_parent_data cam_cc_parent_data_7_ao[] = {
  464. { .index = DT_BI_TCXO_AO },
  465. };
  466. static const struct freq_tbl ftbl_cam_cc_bps_clk_src[] = {
  467. F(19200000, P_BI_TCXO, 1, 0, 0),
  468. F(160000000, P_CAM_CC_PLL0_OUT_ODD, 2.5, 0, 0),
  469. F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0),
  470. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  471. F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0),
  472. { }
  473. };
  474. static struct clk_rcg2 cam_cc_bps_clk_src = {
  475. .cmd_rcgr = 0x10278,
  476. .mnd_width = 0,
  477. .hid_width = 5,
  478. .parent_map = cam_cc_parent_map_0,
  479. .freq_tbl = ftbl_cam_cc_bps_clk_src,
  480. .clkr.hw.init = &(const struct clk_init_data) {
  481. .name = "cam_cc_bps_clk_src",
  482. .parent_data = cam_cc_parent_data_0,
  483. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  484. .flags = CLK_SET_RATE_PARENT,
  485. .ops = &clk_rcg2_shared_ops,
  486. },
  487. };
  488. static const struct freq_tbl ftbl_cam_cc_camnoc_axi_rt_clk_src[] = {
  489. F(240000000, P_CAM_CC_PLL0_OUT_EVEN, 2.5, 0, 0),
  490. F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0),
  491. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  492. { }
  493. };
  494. static struct clk_rcg2 cam_cc_camnoc_axi_rt_clk_src = {
  495. .cmd_rcgr = 0x138f8,
  496. .mnd_width = 0,
  497. .hid_width = 5,
  498. .parent_map = cam_cc_parent_map_0,
  499. .freq_tbl = ftbl_cam_cc_camnoc_axi_rt_clk_src,
  500. .clkr.hw.init = &(const struct clk_init_data) {
  501. .name = "cam_cc_camnoc_axi_rt_clk_src",
  502. .parent_data = cam_cc_parent_data_0,
  503. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  504. .flags = CLK_SET_RATE_PARENT,
  505. .ops = &clk_rcg2_shared_ops,
  506. },
  507. };
  508. static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src[] = {
  509. F(19200000, P_BI_TCXO, 1, 0, 0),
  510. F(30000000, P_CAM_CC_PLL8_OUT_EVEN, 16, 0, 0),
  511. F(37500000, P_CAM_CC_PLL0_OUT_EVEN, 16, 0, 0),
  512. { }
  513. };
  514. static struct clk_rcg2 cam_cc_cci_0_clk_src = {
  515. .cmd_rcgr = 0x1365c,
  516. .mnd_width = 8,
  517. .hid_width = 5,
  518. .parent_map = cam_cc_parent_map_0,
  519. .freq_tbl = ftbl_cam_cc_cci_0_clk_src,
  520. .clkr.hw.init = &(const struct clk_init_data) {
  521. .name = "cam_cc_cci_0_clk_src",
  522. .parent_data = cam_cc_parent_data_0,
  523. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  524. .flags = CLK_SET_RATE_PARENT,
  525. .ops = &clk_rcg2_ops,
  526. },
  527. };
  528. static struct clk_rcg2 cam_cc_cci_1_clk_src = {
  529. .cmd_rcgr = 0x1378c,
  530. .mnd_width = 8,
  531. .hid_width = 5,
  532. .parent_map = cam_cc_parent_map_0,
  533. .freq_tbl = ftbl_cam_cc_cci_0_clk_src,
  534. .clkr.hw.init = &(const struct clk_init_data) {
  535. .name = "cam_cc_cci_1_clk_src",
  536. .parent_data = cam_cc_parent_data_0,
  537. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  538. .flags = CLK_SET_RATE_PARENT,
  539. .ops = &clk_rcg2_ops,
  540. },
  541. };
  542. static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = {
  543. F(19200000, P_BI_TCXO, 1, 0, 0),
  544. F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
  545. F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
  546. F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
  547. { }
  548. };
  549. static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
  550. .cmd_rcgr = 0x11164,
  551. .mnd_width = 0,
  552. .hid_width = 5,
  553. .parent_map = cam_cc_parent_map_0,
  554. .freq_tbl = ftbl_cam_cc_cphy_rx_clk_src,
  555. .clkr.hw.init = &(const struct clk_init_data) {
  556. .name = "cam_cc_cphy_rx_clk_src",
  557. .parent_data = cam_cc_parent_data_0,
  558. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  559. .flags = CLK_SET_RATE_PARENT,
  560. .ops = &clk_rcg2_ops,
  561. },
  562. };
  563. static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src[] = {
  564. F(19200000, P_BI_TCXO, 1, 0, 0),
  565. F(266666667, P_CAM_CC_PLL0_OUT_ODD, 1.5, 0, 0),
  566. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  567. { }
  568. };
  569. static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = {
  570. .cmd_rcgr = 0x150e0,
  571. .mnd_width = 0,
  572. .hid_width = 5,
  573. .parent_map = cam_cc_parent_map_0,
  574. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  575. .clkr.hw.init = &(const struct clk_init_data) {
  576. .name = "cam_cc_csi0phytimer_clk_src",
  577. .parent_data = cam_cc_parent_data_0,
  578. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  579. .flags = CLK_SET_RATE_PARENT,
  580. .ops = &clk_rcg2_ops,
  581. },
  582. };
  583. static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = {
  584. .cmd_rcgr = 0x15104,
  585. .mnd_width = 0,
  586. .hid_width = 5,
  587. .parent_map = cam_cc_parent_map_0,
  588. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  589. .clkr.hw.init = &(const struct clk_init_data) {
  590. .name = "cam_cc_csi1phytimer_clk_src",
  591. .parent_data = cam_cc_parent_data_0,
  592. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  593. .flags = CLK_SET_RATE_PARENT,
  594. .ops = &clk_rcg2_ops,
  595. },
  596. };
  597. static struct clk_rcg2 cam_cc_csi2phytimer_clk_src = {
  598. .cmd_rcgr = 0x15124,
  599. .mnd_width = 0,
  600. .hid_width = 5,
  601. .parent_map = cam_cc_parent_map_0,
  602. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  603. .clkr.hw.init = &(const struct clk_init_data) {
  604. .name = "cam_cc_csi2phytimer_clk_src",
  605. .parent_data = cam_cc_parent_data_0,
  606. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  607. .flags = CLK_SET_RATE_PARENT,
  608. .ops = &clk_rcg2_ops,
  609. },
  610. };
  611. static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = {
  612. .cmd_rcgr = 0x15258,
  613. .mnd_width = 0,
  614. .hid_width = 5,
  615. .parent_map = cam_cc_parent_map_0,
  616. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  617. .clkr.hw.init = &(const struct clk_init_data) {
  618. .name = "cam_cc_csi3phytimer_clk_src",
  619. .parent_data = cam_cc_parent_data_0,
  620. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  621. .flags = CLK_SET_RATE_PARENT,
  622. .ops = &clk_rcg2_ops,
  623. },
  624. };
  625. static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = {
  626. .cmd_rcgr = 0x1538c,
  627. .mnd_width = 0,
  628. .hid_width = 5,
  629. .parent_map = cam_cc_parent_map_0,
  630. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  631. .clkr.hw.init = &(const struct clk_init_data) {
  632. .name = "cam_cc_csi4phytimer_clk_src",
  633. .parent_data = cam_cc_parent_data_0,
  634. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  635. .flags = CLK_SET_RATE_PARENT,
  636. .ops = &clk_rcg2_ops,
  637. },
  638. };
  639. static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = {
  640. .cmd_rcgr = 0x154c0,
  641. .mnd_width = 0,
  642. .hid_width = 5,
  643. .parent_map = cam_cc_parent_map_0,
  644. .freq_tbl = ftbl_cam_cc_csi0phytimer_clk_src,
  645. .clkr.hw.init = &(const struct clk_init_data) {
  646. .name = "cam_cc_csi5phytimer_clk_src",
  647. .parent_data = cam_cc_parent_data_0,
  648. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  649. .flags = CLK_SET_RATE_PARENT,
  650. .ops = &clk_rcg2_ops,
  651. },
  652. };
  653. static const struct freq_tbl ftbl_cam_cc_csid_clk_src[] = {
  654. F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
  655. F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
  656. F(480000000, P_CAM_CC_PLL0_OUT_MAIN, 2.5, 0, 0),
  657. { }
  658. };
  659. static struct clk_rcg2 cam_cc_csid_clk_src = {
  660. .cmd_rcgr = 0x138d4,
  661. .mnd_width = 0,
  662. .hid_width = 5,
  663. .parent_map = cam_cc_parent_map_0,
  664. .freq_tbl = ftbl_cam_cc_csid_clk_src,
  665. .clkr.hw.init = &(const struct clk_init_data) {
  666. .name = "cam_cc_csid_clk_src",
  667. .parent_data = cam_cc_parent_data_0,
  668. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  669. .flags = CLK_SET_RATE_PARENT,
  670. .ops = &clk_rcg2_shared_ops,
  671. },
  672. };
  673. static const struct freq_tbl ftbl_cam_cc_fast_ahb_clk_src[] = {
  674. F(19200000, P_BI_TCXO, 1, 0, 0),
  675. F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0),
  676. F(100000000, P_CAM_CC_PLL0_OUT_EVEN, 6, 0, 0),
  677. F(200000000, P_CAM_CC_PLL0_OUT_EVEN, 3, 0, 0),
  678. F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
  679. F(400000000, P_CAM_CC_PLL0_OUT_MAIN, 3, 0, 0),
  680. { }
  681. };
  682. static struct clk_rcg2 cam_cc_fast_ahb_clk_src = {
  683. .cmd_rcgr = 0x10018,
  684. .mnd_width = 0,
  685. .hid_width = 5,
  686. .parent_map = cam_cc_parent_map_0,
  687. .freq_tbl = ftbl_cam_cc_fast_ahb_clk_src,
  688. .clkr.hw.init = &(const struct clk_init_data) {
  689. .name = "cam_cc_fast_ahb_clk_src",
  690. .parent_data = cam_cc_parent_data_0,
  691. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  692. .flags = CLK_SET_RATE_PARENT,
  693. .ops = &clk_rcg2_shared_ops,
  694. },
  695. };
  696. static const struct freq_tbl ftbl_cam_cc_icp_clk_src[] = {
  697. F(19200000, P_BI_TCXO, 1, 0, 0),
  698. F(300000000, P_CAM_CC_PLL0_OUT_EVEN, 2, 0, 0),
  699. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  700. F(480000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0),
  701. F(600000000, P_CAM_CC_PLL0_OUT_MAIN, 2, 0, 0),
  702. { }
  703. };
  704. static struct clk_rcg2 cam_cc_icp_clk_src = {
  705. .cmd_rcgr = 0x13520,
  706. .mnd_width = 0,
  707. .hid_width = 5,
  708. .parent_map = cam_cc_parent_map_0,
  709. .freq_tbl = ftbl_cam_cc_icp_clk_src,
  710. .clkr.hw.init = &(const struct clk_init_data) {
  711. .name = "cam_cc_icp_clk_src",
  712. .parent_data = cam_cc_parent_data_0,
  713. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  714. .flags = CLK_SET_RATE_PARENT,
  715. .ops = &clk_rcg2_shared_ops,
  716. },
  717. };
  718. static const struct freq_tbl ftbl_cam_cc_ife_0_clk_src[] = {
  719. F(19200000, P_BI_TCXO, 1, 0, 0),
  720. F(345600000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0),
  721. F(432000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0),
  722. F(594000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0),
  723. F(675000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0),
  724. F(727000000, P_CAM_CC_PLL3_OUT_EVEN, 1, 0, 0),
  725. { }
  726. };
  727. static struct clk_rcg2 cam_cc_ife_0_clk_src = {
  728. .cmd_rcgr = 0x11018,
  729. .mnd_width = 0,
  730. .hid_width = 5,
  731. .parent_map = cam_cc_parent_map_2,
  732. .freq_tbl = ftbl_cam_cc_ife_0_clk_src,
  733. .clkr.hw.init = &(const struct clk_init_data) {
  734. .name = "cam_cc_ife_0_clk_src",
  735. .parent_data = cam_cc_parent_data_2,
  736. .num_parents = ARRAY_SIZE(cam_cc_parent_data_2),
  737. .flags = CLK_SET_RATE_PARENT,
  738. .ops = &clk_rcg2_shared_ops,
  739. },
  740. };
  741. static const struct freq_tbl ftbl_cam_cc_ife_1_clk_src[] = {
  742. F(19200000, P_BI_TCXO, 1, 0, 0),
  743. F(345600000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0),
  744. F(432000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0),
  745. F(594000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0),
  746. F(675000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0),
  747. F(727000000, P_CAM_CC_PLL4_OUT_EVEN, 1, 0, 0),
  748. { }
  749. };
  750. static struct clk_rcg2 cam_cc_ife_1_clk_src = {
  751. .cmd_rcgr = 0x12018,
  752. .mnd_width = 0,
  753. .hid_width = 5,
  754. .parent_map = cam_cc_parent_map_3,
  755. .freq_tbl = ftbl_cam_cc_ife_1_clk_src,
  756. .clkr.hw.init = &(const struct clk_init_data) {
  757. .name = "cam_cc_ife_1_clk_src",
  758. .parent_data = cam_cc_parent_data_3,
  759. .num_parents = ARRAY_SIZE(cam_cc_parent_data_3),
  760. .flags = CLK_SET_RATE_PARENT,
  761. .ops = &clk_rcg2_shared_ops,
  762. },
  763. };
  764. static const struct freq_tbl ftbl_cam_cc_ife_lite_clk_src[] = {
  765. F(266666667, P_CAM_CC_PLL0_OUT_ODD, 1.5, 0, 0),
  766. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  767. F(480000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0),
  768. { }
  769. };
  770. static struct clk_rcg2 cam_cc_ife_lite_clk_src = {
  771. .cmd_rcgr = 0x13000,
  772. .mnd_width = 0,
  773. .hid_width = 5,
  774. .parent_map = cam_cc_parent_map_0,
  775. .freq_tbl = ftbl_cam_cc_ife_lite_clk_src,
  776. .clkr.hw.init = &(const struct clk_init_data) {
  777. .name = "cam_cc_ife_lite_clk_src",
  778. .parent_data = cam_cc_parent_data_0,
  779. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  780. .flags = CLK_SET_RATE_PARENT,
  781. .ops = &clk_rcg2_shared_ops,
  782. },
  783. };
  784. static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = {
  785. .cmd_rcgr = 0x1313c,
  786. .mnd_width = 0,
  787. .hid_width = 5,
  788. .parent_map = cam_cc_parent_map_0,
  789. .freq_tbl = ftbl_cam_cc_ife_lite_clk_src,
  790. .clkr.hw.init = &(const struct clk_init_data) {
  791. .name = "cam_cc_ife_lite_csid_clk_src",
  792. .parent_data = cam_cc_parent_data_0,
  793. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  794. .flags = CLK_SET_RATE_PARENT,
  795. .ops = &clk_rcg2_shared_ops,
  796. },
  797. };
  798. static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src[] = {
  799. F(304000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0),
  800. F(364000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0),
  801. F(500000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0),
  802. F(600000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0),
  803. F(700000000, P_CAM_CC_PLL1_OUT_EVEN, 1, 0, 0),
  804. { }
  805. };
  806. static struct clk_rcg2 cam_cc_ipe_nps_clk_src = {
  807. .cmd_rcgr = 0x103cc,
  808. .mnd_width = 0,
  809. .hid_width = 5,
  810. .parent_map = cam_cc_parent_map_4,
  811. .freq_tbl = ftbl_cam_cc_ipe_nps_clk_src,
  812. .clkr.hw.init = &(const struct clk_init_data) {
  813. .name = "cam_cc_ipe_nps_clk_src",
  814. .parent_data = cam_cc_parent_data_4,
  815. .num_parents = ARRAY_SIZE(cam_cc_parent_data_4),
  816. .flags = CLK_SET_RATE_PARENT,
  817. .ops = &clk_rcg2_shared_ops,
  818. },
  819. };
  820. static const struct freq_tbl ftbl_cam_cc_jpeg_clk_src[] = {
  821. F(19200000, P_BI_TCXO, 1, 0, 0),
  822. F(160000000, P_CAM_CC_PLL0_OUT_ODD, 2.5, 0, 0),
  823. F(200000000, P_CAM_CC_PLL0_OUT_ODD, 2, 0, 0),
  824. F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
  825. F(480000000, P_CAM_CC_PLL8_OUT_EVEN, 1, 0, 0),
  826. F(600000000, P_CAM_CC_PLL0_OUT_EVEN, 1, 0, 0),
  827. { }
  828. };
  829. static struct clk_rcg2 cam_cc_jpeg_clk_src = {
  830. .cmd_rcgr = 0x133dc,
  831. .mnd_width = 0,
  832. .hid_width = 5,
  833. .parent_map = cam_cc_parent_map_0,
  834. .freq_tbl = ftbl_cam_cc_jpeg_clk_src,
  835. .clkr.hw.init = &(const struct clk_init_data) {
  836. .name = "cam_cc_jpeg_clk_src",
  837. .parent_data = cam_cc_parent_data_0,
  838. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  839. .flags = CLK_SET_RATE_PARENT,
  840. .ops = &clk_rcg2_shared_ops,
  841. },
  842. };
  843. static const struct freq_tbl ftbl_cam_cc_mclk0_clk_src[] = {
  844. F(19200000, P_BI_TCXO, 1, 0, 0),
  845. F(24000000, P_CAM_CC_PLL2_OUT_MAIN, 10, 1, 4),
  846. F(68571429, P_CAM_CC_PLL2_OUT_MAIN, 14, 0, 0),
  847. { }
  848. };
  849. static struct clk_rcg2 cam_cc_mclk0_clk_src = {
  850. .cmd_rcgr = 0x15000,
  851. .mnd_width = 8,
  852. .hid_width = 5,
  853. .parent_map = cam_cc_parent_map_1,
  854. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  855. .clkr.hw.init = &(const struct clk_init_data) {
  856. .name = "cam_cc_mclk0_clk_src",
  857. .parent_data = cam_cc_parent_data_1,
  858. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  859. .flags = CLK_SET_RATE_PARENT,
  860. .ops = &clk_rcg2_ops,
  861. },
  862. };
  863. static struct clk_rcg2 cam_cc_mclk1_clk_src = {
  864. .cmd_rcgr = 0x1501c,
  865. .mnd_width = 8,
  866. .hid_width = 5,
  867. .parent_map = cam_cc_parent_map_1,
  868. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  869. .clkr.hw.init = &(const struct clk_init_data) {
  870. .name = "cam_cc_mclk1_clk_src",
  871. .parent_data = cam_cc_parent_data_1,
  872. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  873. .flags = CLK_SET_RATE_PARENT,
  874. .ops = &clk_rcg2_ops,
  875. },
  876. };
  877. static struct clk_rcg2 cam_cc_mclk2_clk_src = {
  878. .cmd_rcgr = 0x15038,
  879. .mnd_width = 8,
  880. .hid_width = 5,
  881. .parent_map = cam_cc_parent_map_1,
  882. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  883. .clkr.hw.init = &(const struct clk_init_data) {
  884. .name = "cam_cc_mclk2_clk_src",
  885. .parent_data = cam_cc_parent_data_1,
  886. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  887. .flags = CLK_SET_RATE_PARENT,
  888. .ops = &clk_rcg2_ops,
  889. },
  890. };
  891. static struct clk_rcg2 cam_cc_mclk3_clk_src = {
  892. .cmd_rcgr = 0x15054,
  893. .mnd_width = 8,
  894. .hid_width = 5,
  895. .parent_map = cam_cc_parent_map_1,
  896. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  897. .clkr.hw.init = &(const struct clk_init_data) {
  898. .name = "cam_cc_mclk3_clk_src",
  899. .parent_data = cam_cc_parent_data_1,
  900. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  901. .flags = CLK_SET_RATE_PARENT,
  902. .ops = &clk_rcg2_ops,
  903. },
  904. };
  905. static struct clk_rcg2 cam_cc_mclk4_clk_src = {
  906. .cmd_rcgr = 0x15070,
  907. .mnd_width = 8,
  908. .hid_width = 5,
  909. .parent_map = cam_cc_parent_map_1,
  910. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  911. .clkr.hw.init = &(const struct clk_init_data) {
  912. .name = "cam_cc_mclk4_clk_src",
  913. .parent_data = cam_cc_parent_data_1,
  914. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  915. .flags = CLK_SET_RATE_PARENT,
  916. .ops = &clk_rcg2_ops,
  917. },
  918. };
  919. static struct clk_rcg2 cam_cc_mclk5_clk_src = {
  920. .cmd_rcgr = 0x1508c,
  921. .mnd_width = 8,
  922. .hid_width = 5,
  923. .parent_map = cam_cc_parent_map_1,
  924. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  925. .clkr.hw.init = &(const struct clk_init_data) {
  926. .name = "cam_cc_mclk5_clk_src",
  927. .parent_data = cam_cc_parent_data_1,
  928. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  929. .flags = CLK_SET_RATE_PARENT,
  930. .ops = &clk_rcg2_ops,
  931. },
  932. };
  933. static struct clk_rcg2 cam_cc_mclk6_clk_src = {
  934. .cmd_rcgr = 0x150a8,
  935. .mnd_width = 8,
  936. .hid_width = 5,
  937. .parent_map = cam_cc_parent_map_1,
  938. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  939. .clkr.hw.init = &(const struct clk_init_data) {
  940. .name = "cam_cc_mclk6_clk_src",
  941. .parent_data = cam_cc_parent_data_1,
  942. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  943. .flags = CLK_SET_RATE_PARENT,
  944. .ops = &clk_rcg2_ops,
  945. },
  946. };
  947. static struct clk_rcg2 cam_cc_mclk7_clk_src = {
  948. .cmd_rcgr = 0x150c4,
  949. .mnd_width = 8,
  950. .hid_width = 5,
  951. .parent_map = cam_cc_parent_map_1,
  952. .freq_tbl = ftbl_cam_cc_mclk0_clk_src,
  953. .clkr.hw.init = &(const struct clk_init_data) {
  954. .name = "cam_cc_mclk7_clk_src",
  955. .parent_data = cam_cc_parent_data_1,
  956. .num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
  957. .flags = CLK_SET_RATE_PARENT,
  958. .ops = &clk_rcg2_ops,
  959. },
  960. };
  961. static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = {
  962. F(345600000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
  963. F(432000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
  964. F(594000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
  965. F(675000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
  966. F(727000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
  967. { }
  968. };
  969. static struct clk_rcg2 cam_cc_sfe_0_clk_src = {
  970. .cmd_rcgr = 0x13294,
  971. .mnd_width = 0,
  972. .hid_width = 5,
  973. .parent_map = cam_cc_parent_map_5,
  974. .freq_tbl = ftbl_cam_cc_sfe_0_clk_src,
  975. .clkr.hw.init = &(const struct clk_init_data) {
  976. .name = "cam_cc_sfe_0_clk_src",
  977. .parent_data = cam_cc_parent_data_5,
  978. .num_parents = ARRAY_SIZE(cam_cc_parent_data_5),
  979. .flags = CLK_SET_RATE_PARENT,
  980. .ops = &clk_rcg2_shared_ops,
  981. },
  982. };
  983. static const struct freq_tbl ftbl_cam_cc_sleep_clk_src[] = {
  984. F(32000, P_SLEEP_CLK, 1, 0, 0),
  985. { }
  986. };
  987. static struct clk_rcg2 cam_cc_sleep_clk_src = {
  988. .cmd_rcgr = 0x13aa0,
  989. .mnd_width = 0,
  990. .hid_width = 5,
  991. .parent_map = cam_cc_parent_map_6,
  992. .freq_tbl = ftbl_cam_cc_sleep_clk_src,
  993. .clkr.hw.init = &(const struct clk_init_data) {
  994. .name = "cam_cc_sleep_clk_src",
  995. .parent_data = cam_cc_parent_data_6_ao,
  996. .num_parents = ARRAY_SIZE(cam_cc_parent_data_6_ao),
  997. .flags = CLK_SET_RATE_PARENT,
  998. .ops = &clk_rcg2_ops,
  999. },
  1000. };
  1001. static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src[] = {
  1002. F(19200000, P_BI_TCXO, 1, 0, 0),
  1003. F(64000000, P_CAM_CC_PLL8_OUT_EVEN, 7.5, 0, 0),
  1004. F(80000000, P_CAM_CC_PLL0_OUT_EVEN, 7.5, 0, 0),
  1005. { }
  1006. };
  1007. static struct clk_rcg2 cam_cc_slow_ahb_clk_src = {
  1008. .cmd_rcgr = 0x10148,
  1009. .mnd_width = 8,
  1010. .hid_width = 5,
  1011. .parent_map = cam_cc_parent_map_0,
  1012. .freq_tbl = ftbl_cam_cc_slow_ahb_clk_src,
  1013. .clkr.hw.init = &(const struct clk_init_data) {
  1014. .name = "cam_cc_slow_ahb_clk_src",
  1015. .parent_data = cam_cc_parent_data_0,
  1016. .num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
  1017. .flags = CLK_SET_RATE_PARENT,
  1018. .ops = &clk_rcg2_shared_ops,
  1019. },
  1020. };
  1021. static const struct freq_tbl ftbl_cam_cc_xo_clk_src[] = {
  1022. F(19200000, P_BI_TCXO, 1, 0, 0),
  1023. { }
  1024. };
  1025. static struct clk_rcg2 cam_cc_xo_clk_src = {
  1026. .cmd_rcgr = 0x13a84,
  1027. .mnd_width = 0,
  1028. .hid_width = 5,
  1029. .parent_map = cam_cc_parent_map_7,
  1030. .freq_tbl = ftbl_cam_cc_xo_clk_src,
  1031. .clkr.hw.init = &(const struct clk_init_data) {
  1032. .name = "cam_cc_xo_clk_src",
  1033. .parent_data = cam_cc_parent_data_7_ao,
  1034. .num_parents = ARRAY_SIZE(cam_cc_parent_data_7_ao),
  1035. .flags = CLK_SET_RATE_PARENT,
  1036. .ops = &clk_rcg2_ops,
  1037. },
  1038. };
  1039. static struct clk_branch cam_cc_bps_ahb_clk = {
  1040. .halt_reg = 0x10274,
  1041. .halt_check = BRANCH_HALT,
  1042. .clkr = {
  1043. .enable_reg = 0x10274,
  1044. .enable_mask = BIT(0),
  1045. .hw.init = &(const struct clk_init_data) {
  1046. .name = "cam_cc_bps_ahb_clk",
  1047. .parent_hws = (const struct clk_hw*[]) {
  1048. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1049. },
  1050. .num_parents = 1,
  1051. .flags = CLK_SET_RATE_PARENT,
  1052. .ops = &clk_branch2_ops,
  1053. },
  1054. },
  1055. };
  1056. static struct clk_branch cam_cc_bps_clk = {
  1057. .halt_reg = 0x103a4,
  1058. .halt_check = BRANCH_HALT,
  1059. .clkr = {
  1060. .enable_reg = 0x103a4,
  1061. .enable_mask = BIT(0),
  1062. .hw.init = &(const struct clk_init_data) {
  1063. .name = "cam_cc_bps_clk",
  1064. .parent_hws = (const struct clk_hw*[]) {
  1065. &cam_cc_bps_clk_src.clkr.hw,
  1066. },
  1067. .num_parents = 1,
  1068. .flags = CLK_SET_RATE_PARENT,
  1069. .ops = &clk_branch2_ops,
  1070. },
  1071. },
  1072. };
  1073. static struct clk_branch cam_cc_bps_fast_ahb_clk = {
  1074. .halt_reg = 0x10144,
  1075. .halt_check = BRANCH_HALT,
  1076. .clkr = {
  1077. .enable_reg = 0x10144,
  1078. .enable_mask = BIT(0),
  1079. .hw.init = &(const struct clk_init_data) {
  1080. .name = "cam_cc_bps_fast_ahb_clk",
  1081. .parent_hws = (const struct clk_hw*[]) {
  1082. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1083. },
  1084. .num_parents = 1,
  1085. .flags = CLK_SET_RATE_PARENT,
  1086. .ops = &clk_branch2_ops,
  1087. },
  1088. },
  1089. };
  1090. static struct clk_branch cam_cc_camnoc_axi_nrt_clk = {
  1091. .halt_reg = 0x13920,
  1092. .halt_check = BRANCH_HALT,
  1093. .clkr = {
  1094. .enable_reg = 0x13920,
  1095. .enable_mask = BIT(0),
  1096. .hw.init = &(const struct clk_init_data) {
  1097. .name = "cam_cc_camnoc_axi_nrt_clk",
  1098. .parent_hws = (const struct clk_hw*[]) {
  1099. &cam_cc_camnoc_axi_rt_clk_src.clkr.hw,
  1100. },
  1101. .num_parents = 1,
  1102. .flags = CLK_SET_RATE_PARENT,
  1103. .ops = &clk_branch2_ops,
  1104. },
  1105. },
  1106. };
  1107. static struct clk_branch cam_cc_camnoc_axi_rt_clk = {
  1108. .halt_reg = 0x13910,
  1109. .halt_check = BRANCH_HALT,
  1110. .clkr = {
  1111. .enable_reg = 0x13910,
  1112. .enable_mask = BIT(0),
  1113. .hw.init = &(const struct clk_init_data) {
  1114. .name = "cam_cc_camnoc_axi_rt_clk",
  1115. .parent_hws = (const struct clk_hw*[]) {
  1116. &cam_cc_camnoc_axi_rt_clk_src.clkr.hw,
  1117. },
  1118. .num_parents = 1,
  1119. .flags = CLK_SET_RATE_PARENT,
  1120. .ops = &clk_branch2_ops,
  1121. },
  1122. },
  1123. };
  1124. static struct clk_branch cam_cc_camnoc_dcd_xo_clk = {
  1125. .halt_reg = 0x1392c,
  1126. .halt_check = BRANCH_HALT,
  1127. .clkr = {
  1128. .enable_reg = 0x1392c,
  1129. .enable_mask = BIT(0),
  1130. .hw.init = &(const struct clk_init_data) {
  1131. .name = "cam_cc_camnoc_dcd_xo_clk",
  1132. .parent_hws = (const struct clk_hw*[]) {
  1133. &cam_cc_xo_clk_src.clkr.hw,
  1134. },
  1135. .num_parents = 1,
  1136. .flags = CLK_SET_RATE_PARENT,
  1137. .ops = &clk_branch2_ops,
  1138. },
  1139. },
  1140. };
  1141. static struct clk_branch cam_cc_camnoc_xo_clk = {
  1142. .halt_reg = 0x13930,
  1143. .halt_check = BRANCH_HALT,
  1144. .clkr = {
  1145. .enable_reg = 0x13930,
  1146. .enable_mask = BIT(0),
  1147. .hw.init = &(const struct clk_init_data) {
  1148. .name = "cam_cc_camnoc_xo_clk",
  1149. .parent_hws = (const struct clk_hw*[]) {
  1150. &cam_cc_xo_clk_src.clkr.hw,
  1151. },
  1152. .num_parents = 1,
  1153. .flags = CLK_SET_RATE_PARENT,
  1154. .ops = &clk_branch2_ops,
  1155. },
  1156. },
  1157. };
  1158. static struct clk_branch cam_cc_cci_0_clk = {
  1159. .halt_reg = 0x13788,
  1160. .halt_check = BRANCH_HALT,
  1161. .clkr = {
  1162. .enable_reg = 0x13788,
  1163. .enable_mask = BIT(0),
  1164. .hw.init = &(const struct clk_init_data) {
  1165. .name = "cam_cc_cci_0_clk",
  1166. .parent_hws = (const struct clk_hw*[]) {
  1167. &cam_cc_cci_0_clk_src.clkr.hw,
  1168. },
  1169. .num_parents = 1,
  1170. .flags = CLK_SET_RATE_PARENT,
  1171. .ops = &clk_branch2_ops,
  1172. },
  1173. },
  1174. };
  1175. static struct clk_branch cam_cc_cci_1_clk = {
  1176. .halt_reg = 0x138b8,
  1177. .halt_check = BRANCH_HALT,
  1178. .clkr = {
  1179. .enable_reg = 0x138b8,
  1180. .enable_mask = BIT(0),
  1181. .hw.init = &(const struct clk_init_data) {
  1182. .name = "cam_cc_cci_1_clk",
  1183. .parent_hws = (const struct clk_hw*[]) {
  1184. &cam_cc_cci_1_clk_src.clkr.hw,
  1185. },
  1186. .num_parents = 1,
  1187. .flags = CLK_SET_RATE_PARENT,
  1188. .ops = &clk_branch2_ops,
  1189. },
  1190. },
  1191. };
  1192. static struct clk_branch cam_cc_core_ahb_clk = {
  1193. .halt_reg = 0x13a80,
  1194. .halt_check = BRANCH_HALT_VOTED,
  1195. .clkr = {
  1196. .enable_reg = 0x13a80,
  1197. .enable_mask = BIT(0),
  1198. .hw.init = &(const struct clk_init_data) {
  1199. .name = "cam_cc_core_ahb_clk",
  1200. .parent_hws = (const struct clk_hw*[]) {
  1201. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1202. },
  1203. .num_parents = 1,
  1204. .flags = CLK_SET_RATE_PARENT,
  1205. .ops = &clk_branch2_ops,
  1206. },
  1207. },
  1208. };
  1209. static struct clk_branch cam_cc_cpas_ahb_clk = {
  1210. .halt_reg = 0x138bc,
  1211. .halt_check = BRANCH_HALT,
  1212. .clkr = {
  1213. .enable_reg = 0x138bc,
  1214. .enable_mask = BIT(0),
  1215. .hw.init = &(const struct clk_init_data) {
  1216. .name = "cam_cc_cpas_ahb_clk",
  1217. .parent_hws = (const struct clk_hw*[]) {
  1218. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1219. },
  1220. .num_parents = 1,
  1221. .flags = CLK_SET_RATE_PARENT,
  1222. .ops = &clk_branch2_ops,
  1223. },
  1224. },
  1225. };
  1226. static struct clk_branch cam_cc_cpas_bps_clk = {
  1227. .halt_reg = 0x103b0,
  1228. .halt_check = BRANCH_HALT,
  1229. .clkr = {
  1230. .enable_reg = 0x103b0,
  1231. .enable_mask = BIT(0),
  1232. .hw.init = &(const struct clk_init_data) {
  1233. .name = "cam_cc_cpas_bps_clk",
  1234. .parent_hws = (const struct clk_hw*[]) {
  1235. &cam_cc_bps_clk_src.clkr.hw,
  1236. },
  1237. .num_parents = 1,
  1238. .flags = CLK_SET_RATE_PARENT,
  1239. .ops = &clk_branch2_ops,
  1240. },
  1241. },
  1242. };
  1243. static struct clk_branch cam_cc_cpas_fast_ahb_clk = {
  1244. .halt_reg = 0x138c8,
  1245. .halt_check = BRANCH_HALT,
  1246. .clkr = {
  1247. .enable_reg = 0x138c8,
  1248. .enable_mask = BIT(0),
  1249. .hw.init = &(const struct clk_init_data) {
  1250. .name = "cam_cc_cpas_fast_ahb_clk",
  1251. .parent_hws = (const struct clk_hw*[]) {
  1252. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1253. },
  1254. .num_parents = 1,
  1255. .flags = CLK_SET_RATE_PARENT,
  1256. .ops = &clk_branch2_ops,
  1257. },
  1258. },
  1259. };
  1260. static struct clk_branch cam_cc_cpas_ife_0_clk = {
  1261. .halt_reg = 0x11150,
  1262. .halt_check = BRANCH_HALT,
  1263. .clkr = {
  1264. .enable_reg = 0x11150,
  1265. .enable_mask = BIT(0),
  1266. .hw.init = &(const struct clk_init_data) {
  1267. .name = "cam_cc_cpas_ife_0_clk",
  1268. .parent_hws = (const struct clk_hw*[]) {
  1269. &cam_cc_ife_0_clk_src.clkr.hw,
  1270. },
  1271. .num_parents = 1,
  1272. .flags = CLK_SET_RATE_PARENT,
  1273. .ops = &clk_branch2_ops,
  1274. },
  1275. },
  1276. };
  1277. static struct clk_branch cam_cc_cpas_ife_1_clk = {
  1278. .halt_reg = 0x1203c,
  1279. .halt_check = BRANCH_HALT,
  1280. .clkr = {
  1281. .enable_reg = 0x1203c,
  1282. .enable_mask = BIT(0),
  1283. .hw.init = &(const struct clk_init_data) {
  1284. .name = "cam_cc_cpas_ife_1_clk",
  1285. .parent_hws = (const struct clk_hw*[]) {
  1286. &cam_cc_ife_1_clk_src.clkr.hw,
  1287. },
  1288. .num_parents = 1,
  1289. .flags = CLK_SET_RATE_PARENT,
  1290. .ops = &clk_branch2_ops,
  1291. },
  1292. },
  1293. };
  1294. static struct clk_branch cam_cc_cpas_ife_lite_clk = {
  1295. .halt_reg = 0x13138,
  1296. .halt_check = BRANCH_HALT,
  1297. .clkr = {
  1298. .enable_reg = 0x13138,
  1299. .enable_mask = BIT(0),
  1300. .hw.init = &(const struct clk_init_data) {
  1301. .name = "cam_cc_cpas_ife_lite_clk",
  1302. .parent_hws = (const struct clk_hw*[]) {
  1303. &cam_cc_ife_lite_clk_src.clkr.hw,
  1304. },
  1305. .num_parents = 1,
  1306. .flags = CLK_SET_RATE_PARENT,
  1307. .ops = &clk_branch2_ops,
  1308. },
  1309. },
  1310. };
  1311. static struct clk_branch cam_cc_cpas_ipe_nps_clk = {
  1312. .halt_reg = 0x10504,
  1313. .halt_check = BRANCH_HALT,
  1314. .clkr = {
  1315. .enable_reg = 0x10504,
  1316. .enable_mask = BIT(0),
  1317. .hw.init = &(const struct clk_init_data) {
  1318. .name = "cam_cc_cpas_ipe_nps_clk",
  1319. .parent_hws = (const struct clk_hw*[]) {
  1320. &cam_cc_ipe_nps_clk_src.clkr.hw,
  1321. },
  1322. .num_parents = 1,
  1323. .flags = CLK_SET_RATE_PARENT,
  1324. .ops = &clk_branch2_ops,
  1325. },
  1326. },
  1327. };
  1328. static struct clk_branch cam_cc_cpas_sfe_0_clk = {
  1329. .halt_reg = 0x133cc,
  1330. .halt_check = BRANCH_HALT,
  1331. .clkr = {
  1332. .enable_reg = 0x133cc,
  1333. .enable_mask = BIT(0),
  1334. .hw.init = &(const struct clk_init_data) {
  1335. .name = "cam_cc_cpas_sfe_0_clk",
  1336. .parent_hws = (const struct clk_hw*[]) {
  1337. &cam_cc_sfe_0_clk_src.clkr.hw,
  1338. },
  1339. .num_parents = 1,
  1340. .flags = CLK_SET_RATE_PARENT,
  1341. .ops = &clk_branch2_ops,
  1342. },
  1343. },
  1344. };
  1345. static struct clk_branch cam_cc_csi0phytimer_clk = {
  1346. .halt_reg = 0x150f8,
  1347. .halt_check = BRANCH_HALT,
  1348. .clkr = {
  1349. .enable_reg = 0x150f8,
  1350. .enable_mask = BIT(0),
  1351. .hw.init = &(const struct clk_init_data) {
  1352. .name = "cam_cc_csi0phytimer_clk",
  1353. .parent_hws = (const struct clk_hw*[]) {
  1354. &cam_cc_csi0phytimer_clk_src.clkr.hw,
  1355. },
  1356. .num_parents = 1,
  1357. .flags = CLK_SET_RATE_PARENT,
  1358. .ops = &clk_branch2_ops,
  1359. },
  1360. },
  1361. };
  1362. static struct clk_branch cam_cc_csi1phytimer_clk = {
  1363. .halt_reg = 0x1511c,
  1364. .halt_check = BRANCH_HALT,
  1365. .clkr = {
  1366. .enable_reg = 0x1511c,
  1367. .enable_mask = BIT(0),
  1368. .hw.init = &(const struct clk_init_data) {
  1369. .name = "cam_cc_csi1phytimer_clk",
  1370. .parent_hws = (const struct clk_hw*[]) {
  1371. &cam_cc_csi1phytimer_clk_src.clkr.hw,
  1372. },
  1373. .num_parents = 1,
  1374. .flags = CLK_SET_RATE_PARENT,
  1375. .ops = &clk_branch2_ops,
  1376. },
  1377. },
  1378. };
  1379. static struct clk_branch cam_cc_csi2phytimer_clk = {
  1380. .halt_reg = 0x15250,
  1381. .halt_check = BRANCH_HALT,
  1382. .clkr = {
  1383. .enable_reg = 0x15250,
  1384. .enable_mask = BIT(0),
  1385. .hw.init = &(const struct clk_init_data) {
  1386. .name = "cam_cc_csi2phytimer_clk",
  1387. .parent_hws = (const struct clk_hw*[]) {
  1388. &cam_cc_csi2phytimer_clk_src.clkr.hw,
  1389. },
  1390. .num_parents = 1,
  1391. .flags = CLK_SET_RATE_PARENT,
  1392. .ops = &clk_branch2_ops,
  1393. },
  1394. },
  1395. };
  1396. static struct clk_branch cam_cc_csi3phytimer_clk = {
  1397. .halt_reg = 0x15384,
  1398. .halt_check = BRANCH_HALT,
  1399. .clkr = {
  1400. .enable_reg = 0x15384,
  1401. .enable_mask = BIT(0),
  1402. .hw.init = &(const struct clk_init_data) {
  1403. .name = "cam_cc_csi3phytimer_clk",
  1404. .parent_hws = (const struct clk_hw*[]) {
  1405. &cam_cc_csi3phytimer_clk_src.clkr.hw,
  1406. },
  1407. .num_parents = 1,
  1408. .flags = CLK_SET_RATE_PARENT,
  1409. .ops = &clk_branch2_ops,
  1410. },
  1411. },
  1412. };
  1413. static struct clk_branch cam_cc_csi4phytimer_clk = {
  1414. .halt_reg = 0x154b8,
  1415. .halt_check = BRANCH_HALT,
  1416. .clkr = {
  1417. .enable_reg = 0x154b8,
  1418. .enable_mask = BIT(0),
  1419. .hw.init = &(const struct clk_init_data) {
  1420. .name = "cam_cc_csi4phytimer_clk",
  1421. .parent_hws = (const struct clk_hw*[]) {
  1422. &cam_cc_csi4phytimer_clk_src.clkr.hw,
  1423. },
  1424. .num_parents = 1,
  1425. .flags = CLK_SET_RATE_PARENT,
  1426. .ops = &clk_branch2_ops,
  1427. },
  1428. },
  1429. };
  1430. static struct clk_branch cam_cc_csi5phytimer_clk = {
  1431. .halt_reg = 0x155ec,
  1432. .halt_check = BRANCH_HALT,
  1433. .clkr = {
  1434. .enable_reg = 0x155ec,
  1435. .enable_mask = BIT(0),
  1436. .hw.init = &(const struct clk_init_data) {
  1437. .name = "cam_cc_csi5phytimer_clk",
  1438. .parent_hws = (const struct clk_hw*[]) {
  1439. &cam_cc_csi5phytimer_clk_src.clkr.hw,
  1440. },
  1441. .num_parents = 1,
  1442. .flags = CLK_SET_RATE_PARENT,
  1443. .ops = &clk_branch2_ops,
  1444. },
  1445. },
  1446. };
  1447. static struct clk_branch cam_cc_csid_clk = {
  1448. .halt_reg = 0x138ec,
  1449. .halt_check = BRANCH_HALT,
  1450. .clkr = {
  1451. .enable_reg = 0x138ec,
  1452. .enable_mask = BIT(0),
  1453. .hw.init = &(const struct clk_init_data) {
  1454. .name = "cam_cc_csid_clk",
  1455. .parent_hws = (const struct clk_hw*[]) {
  1456. &cam_cc_csid_clk_src.clkr.hw,
  1457. },
  1458. .num_parents = 1,
  1459. .flags = CLK_SET_RATE_PARENT,
  1460. .ops = &clk_branch2_ops,
  1461. },
  1462. },
  1463. };
  1464. static struct clk_branch cam_cc_csid_csiphy_rx_clk = {
  1465. .halt_reg = 0x15100,
  1466. .halt_check = BRANCH_HALT,
  1467. .clkr = {
  1468. .enable_reg = 0x15100,
  1469. .enable_mask = BIT(0),
  1470. .hw.init = &(const struct clk_init_data) {
  1471. .name = "cam_cc_csid_csiphy_rx_clk",
  1472. .parent_hws = (const struct clk_hw*[]) {
  1473. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1474. },
  1475. .num_parents = 1,
  1476. .flags = CLK_SET_RATE_PARENT,
  1477. .ops = &clk_branch2_ops,
  1478. },
  1479. },
  1480. };
  1481. static struct clk_branch cam_cc_csiphy0_clk = {
  1482. .halt_reg = 0x150fc,
  1483. .halt_check = BRANCH_HALT,
  1484. .clkr = {
  1485. .enable_reg = 0x150fc,
  1486. .enable_mask = BIT(0),
  1487. .hw.init = &(const struct clk_init_data) {
  1488. .name = "cam_cc_csiphy0_clk",
  1489. .parent_hws = (const struct clk_hw*[]) {
  1490. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1491. },
  1492. .num_parents = 1,
  1493. .flags = CLK_SET_RATE_PARENT,
  1494. .ops = &clk_branch2_ops,
  1495. },
  1496. },
  1497. };
  1498. static struct clk_branch cam_cc_csiphy1_clk = {
  1499. .halt_reg = 0x15120,
  1500. .halt_check = BRANCH_HALT,
  1501. .clkr = {
  1502. .enable_reg = 0x15120,
  1503. .enable_mask = BIT(0),
  1504. .hw.init = &(const struct clk_init_data) {
  1505. .name = "cam_cc_csiphy1_clk",
  1506. .parent_hws = (const struct clk_hw*[]) {
  1507. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1508. },
  1509. .num_parents = 1,
  1510. .flags = CLK_SET_RATE_PARENT,
  1511. .ops = &clk_branch2_ops,
  1512. },
  1513. },
  1514. };
  1515. static struct clk_branch cam_cc_csiphy2_clk = {
  1516. .halt_reg = 0x15254,
  1517. .halt_check = BRANCH_HALT,
  1518. .clkr = {
  1519. .enable_reg = 0x15254,
  1520. .enable_mask = BIT(0),
  1521. .hw.init = &(const struct clk_init_data) {
  1522. .name = "cam_cc_csiphy2_clk",
  1523. .parent_hws = (const struct clk_hw*[]) {
  1524. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1525. },
  1526. .num_parents = 1,
  1527. .flags = CLK_SET_RATE_PARENT,
  1528. .ops = &clk_branch2_ops,
  1529. },
  1530. },
  1531. };
  1532. static struct clk_branch cam_cc_csiphy3_clk = {
  1533. .halt_reg = 0x15388,
  1534. .halt_check = BRANCH_HALT,
  1535. .clkr = {
  1536. .enable_reg = 0x15388,
  1537. .enable_mask = BIT(0),
  1538. .hw.init = &(const struct clk_init_data) {
  1539. .name = "cam_cc_csiphy3_clk",
  1540. .parent_hws = (const struct clk_hw*[]) {
  1541. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1542. },
  1543. .num_parents = 1,
  1544. .flags = CLK_SET_RATE_PARENT,
  1545. .ops = &clk_branch2_ops,
  1546. },
  1547. },
  1548. };
  1549. static struct clk_branch cam_cc_csiphy4_clk = {
  1550. .halt_reg = 0x154bc,
  1551. .halt_check = BRANCH_HALT,
  1552. .clkr = {
  1553. .enable_reg = 0x154bc,
  1554. .enable_mask = BIT(0),
  1555. .hw.init = &(const struct clk_init_data) {
  1556. .name = "cam_cc_csiphy4_clk",
  1557. .parent_hws = (const struct clk_hw*[]) {
  1558. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1559. },
  1560. .num_parents = 1,
  1561. .flags = CLK_SET_RATE_PARENT,
  1562. .ops = &clk_branch2_ops,
  1563. },
  1564. },
  1565. };
  1566. static struct clk_branch cam_cc_csiphy5_clk = {
  1567. .halt_reg = 0x155f0,
  1568. .halt_check = BRANCH_HALT,
  1569. .clkr = {
  1570. .enable_reg = 0x155f0,
  1571. .enable_mask = BIT(0),
  1572. .hw.init = &(const struct clk_init_data) {
  1573. .name = "cam_cc_csiphy5_clk",
  1574. .parent_hws = (const struct clk_hw*[]) {
  1575. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1576. },
  1577. .num_parents = 1,
  1578. .flags = CLK_SET_RATE_PARENT,
  1579. .ops = &clk_branch2_ops,
  1580. },
  1581. },
  1582. };
  1583. static struct clk_branch cam_cc_icp_ahb_clk = {
  1584. .halt_reg = 0x13658,
  1585. .halt_check = BRANCH_HALT,
  1586. .clkr = {
  1587. .enable_reg = 0x13658,
  1588. .enable_mask = BIT(0),
  1589. .hw.init = &(const struct clk_init_data) {
  1590. .name = "cam_cc_icp_ahb_clk",
  1591. .parent_hws = (const struct clk_hw*[]) {
  1592. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1593. },
  1594. .num_parents = 1,
  1595. .flags = CLK_SET_RATE_PARENT,
  1596. .ops = &clk_branch2_ops,
  1597. },
  1598. },
  1599. };
  1600. static struct clk_branch cam_cc_icp_clk = {
  1601. .halt_reg = 0x1364c,
  1602. .halt_check = BRANCH_HALT,
  1603. .clkr = {
  1604. .enable_reg = 0x1364c,
  1605. .enable_mask = BIT(0),
  1606. .hw.init = &(const struct clk_init_data) {
  1607. .name = "cam_cc_icp_clk",
  1608. .parent_hws = (const struct clk_hw*[]) {
  1609. &cam_cc_icp_clk_src.clkr.hw,
  1610. },
  1611. .num_parents = 1,
  1612. .flags = CLK_SET_RATE_PARENT,
  1613. .ops = &clk_branch2_ops,
  1614. },
  1615. },
  1616. };
  1617. static struct clk_branch cam_cc_ife_0_clk = {
  1618. .halt_reg = 0x11144,
  1619. .halt_check = BRANCH_HALT,
  1620. .clkr = {
  1621. .enable_reg = 0x11144,
  1622. .enable_mask = BIT(0),
  1623. .hw.init = &(const struct clk_init_data) {
  1624. .name = "cam_cc_ife_0_clk",
  1625. .parent_hws = (const struct clk_hw*[]) {
  1626. &cam_cc_ife_0_clk_src.clkr.hw,
  1627. },
  1628. .num_parents = 1,
  1629. .flags = CLK_SET_RATE_PARENT,
  1630. .ops = &clk_branch2_ops,
  1631. },
  1632. },
  1633. };
  1634. static struct clk_branch cam_cc_ife_0_dsp_clk = {
  1635. .halt_reg = 0x11154,
  1636. .halt_check = BRANCH_HALT,
  1637. .clkr = {
  1638. .enable_reg = 0x11154,
  1639. .enable_mask = BIT(0),
  1640. .hw.init = &(const struct clk_init_data) {
  1641. .name = "cam_cc_ife_0_dsp_clk",
  1642. .parent_hws = (const struct clk_hw*[]) {
  1643. &cam_cc_ife_0_clk_src.clkr.hw,
  1644. },
  1645. .num_parents = 1,
  1646. .flags = CLK_SET_RATE_PARENT,
  1647. .ops = &clk_branch2_ops,
  1648. },
  1649. },
  1650. };
  1651. static struct clk_branch cam_cc_ife_0_fast_ahb_clk = {
  1652. .halt_reg = 0x11160,
  1653. .halt_check = BRANCH_HALT,
  1654. .clkr = {
  1655. .enable_reg = 0x11160,
  1656. .enable_mask = BIT(0),
  1657. .hw.init = &(const struct clk_init_data) {
  1658. .name = "cam_cc_ife_0_fast_ahb_clk",
  1659. .parent_hws = (const struct clk_hw*[]) {
  1660. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1661. },
  1662. .num_parents = 1,
  1663. .flags = CLK_SET_RATE_PARENT,
  1664. .ops = &clk_branch2_ops,
  1665. },
  1666. },
  1667. };
  1668. static struct clk_branch cam_cc_ife_1_clk = {
  1669. .halt_reg = 0x12030,
  1670. .halt_check = BRANCH_HALT,
  1671. .clkr = {
  1672. .enable_reg = 0x12030,
  1673. .enable_mask = BIT(0),
  1674. .hw.init = &(const struct clk_init_data) {
  1675. .name = "cam_cc_ife_1_clk",
  1676. .parent_hws = (const struct clk_hw*[]) {
  1677. &cam_cc_ife_1_clk_src.clkr.hw,
  1678. },
  1679. .num_parents = 1,
  1680. .flags = CLK_SET_RATE_PARENT,
  1681. .ops = &clk_branch2_ops,
  1682. },
  1683. },
  1684. };
  1685. static struct clk_branch cam_cc_ife_1_dsp_clk = {
  1686. .halt_reg = 0x12040,
  1687. .halt_check = BRANCH_HALT,
  1688. .clkr = {
  1689. .enable_reg = 0x12040,
  1690. .enable_mask = BIT(0),
  1691. .hw.init = &(const struct clk_init_data) {
  1692. .name = "cam_cc_ife_1_dsp_clk",
  1693. .parent_hws = (const struct clk_hw*[]) {
  1694. &cam_cc_ife_1_clk_src.clkr.hw,
  1695. },
  1696. .num_parents = 1,
  1697. .flags = CLK_SET_RATE_PARENT,
  1698. .ops = &clk_branch2_ops,
  1699. },
  1700. },
  1701. };
  1702. static struct clk_branch cam_cc_ife_1_fast_ahb_clk = {
  1703. .halt_reg = 0x1204c,
  1704. .halt_check = BRANCH_HALT,
  1705. .clkr = {
  1706. .enable_reg = 0x1204c,
  1707. .enable_mask = BIT(0),
  1708. .hw.init = &(const struct clk_init_data) {
  1709. .name = "cam_cc_ife_1_fast_ahb_clk",
  1710. .parent_hws = (const struct clk_hw*[]) {
  1711. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1712. },
  1713. .num_parents = 1,
  1714. .flags = CLK_SET_RATE_PARENT,
  1715. .ops = &clk_branch2_ops,
  1716. },
  1717. },
  1718. };
  1719. static struct clk_branch cam_cc_ife_lite_ahb_clk = {
  1720. .halt_reg = 0x13278,
  1721. .halt_check = BRANCH_HALT,
  1722. .clkr = {
  1723. .enable_reg = 0x13278,
  1724. .enable_mask = BIT(0),
  1725. .hw.init = &(const struct clk_init_data) {
  1726. .name = "cam_cc_ife_lite_ahb_clk",
  1727. .parent_hws = (const struct clk_hw*[]) {
  1728. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1729. },
  1730. .num_parents = 1,
  1731. .flags = CLK_SET_RATE_PARENT,
  1732. .ops = &clk_branch2_ops,
  1733. },
  1734. },
  1735. };
  1736. static struct clk_branch cam_cc_ife_lite_clk = {
  1737. .halt_reg = 0x1312c,
  1738. .halt_check = BRANCH_HALT,
  1739. .clkr = {
  1740. .enable_reg = 0x1312c,
  1741. .enable_mask = BIT(0),
  1742. .hw.init = &(const struct clk_init_data) {
  1743. .name = "cam_cc_ife_lite_clk",
  1744. .parent_hws = (const struct clk_hw*[]) {
  1745. &cam_cc_ife_lite_clk_src.clkr.hw,
  1746. },
  1747. .num_parents = 1,
  1748. .flags = CLK_SET_RATE_PARENT,
  1749. .ops = &clk_branch2_ops,
  1750. },
  1751. },
  1752. };
  1753. static struct clk_branch cam_cc_ife_lite_cphy_rx_clk = {
  1754. .halt_reg = 0x13274,
  1755. .halt_check = BRANCH_HALT,
  1756. .clkr = {
  1757. .enable_reg = 0x13274,
  1758. .enable_mask = BIT(0),
  1759. .hw.init = &(const struct clk_init_data) {
  1760. .name = "cam_cc_ife_lite_cphy_rx_clk",
  1761. .parent_hws = (const struct clk_hw*[]) {
  1762. &cam_cc_cphy_rx_clk_src.clkr.hw,
  1763. },
  1764. .num_parents = 1,
  1765. .flags = CLK_SET_RATE_PARENT,
  1766. .ops = &clk_branch2_ops,
  1767. },
  1768. },
  1769. };
  1770. static struct clk_branch cam_cc_ife_lite_csid_clk = {
  1771. .halt_reg = 0x13268,
  1772. .halt_check = BRANCH_HALT,
  1773. .clkr = {
  1774. .enable_reg = 0x13268,
  1775. .enable_mask = BIT(0),
  1776. .hw.init = &(const struct clk_init_data) {
  1777. .name = "cam_cc_ife_lite_csid_clk",
  1778. .parent_hws = (const struct clk_hw*[]) {
  1779. &cam_cc_ife_lite_csid_clk_src.clkr.hw,
  1780. },
  1781. .num_parents = 1,
  1782. .flags = CLK_SET_RATE_PARENT,
  1783. .ops = &clk_branch2_ops,
  1784. },
  1785. },
  1786. };
  1787. static struct clk_branch cam_cc_ipe_nps_ahb_clk = {
  1788. .halt_reg = 0x1051c,
  1789. .halt_check = BRANCH_HALT,
  1790. .clkr = {
  1791. .enable_reg = 0x1051c,
  1792. .enable_mask = BIT(0),
  1793. .hw.init = &(const struct clk_init_data) {
  1794. .name = "cam_cc_ipe_nps_ahb_clk",
  1795. .parent_hws = (const struct clk_hw*[]) {
  1796. &cam_cc_slow_ahb_clk_src.clkr.hw,
  1797. },
  1798. .num_parents = 1,
  1799. .flags = CLK_SET_RATE_PARENT,
  1800. .ops = &clk_branch2_ops,
  1801. },
  1802. },
  1803. };
  1804. static struct clk_branch cam_cc_ipe_nps_clk = {
  1805. .halt_reg = 0x104f8,
  1806. .halt_check = BRANCH_HALT,
  1807. .clkr = {
  1808. .enable_reg = 0x104f8,
  1809. .enable_mask = BIT(0),
  1810. .hw.init = &(const struct clk_init_data) {
  1811. .name = "cam_cc_ipe_nps_clk",
  1812. .parent_hws = (const struct clk_hw*[]) {
  1813. &cam_cc_ipe_nps_clk_src.clkr.hw,
  1814. },
  1815. .num_parents = 1,
  1816. .flags = CLK_SET_RATE_PARENT,
  1817. .ops = &clk_branch2_ops,
  1818. },
  1819. },
  1820. };
  1821. static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk = {
  1822. .halt_reg = 0x10520,
  1823. .halt_check = BRANCH_HALT,
  1824. .clkr = {
  1825. .enable_reg = 0x10520,
  1826. .enable_mask = BIT(0),
  1827. .hw.init = &(const struct clk_init_data) {
  1828. .name = "cam_cc_ipe_nps_fast_ahb_clk",
  1829. .parent_hws = (const struct clk_hw*[]) {
  1830. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1831. },
  1832. .num_parents = 1,
  1833. .flags = CLK_SET_RATE_PARENT,
  1834. .ops = &clk_branch2_ops,
  1835. },
  1836. },
  1837. };
  1838. static struct clk_branch cam_cc_ipe_pps_clk = {
  1839. .halt_reg = 0x10508,
  1840. .halt_check = BRANCH_HALT,
  1841. .clkr = {
  1842. .enable_reg = 0x10508,
  1843. .enable_mask = BIT(0),
  1844. .hw.init = &(const struct clk_init_data) {
  1845. .name = "cam_cc_ipe_pps_clk",
  1846. .parent_hws = (const struct clk_hw*[]) {
  1847. &cam_cc_ipe_nps_clk_src.clkr.hw,
  1848. },
  1849. .num_parents = 1,
  1850. .flags = CLK_SET_RATE_PARENT,
  1851. .ops = &clk_branch2_ops,
  1852. },
  1853. },
  1854. };
  1855. static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk = {
  1856. .halt_reg = 0x10524,
  1857. .halt_check = BRANCH_HALT,
  1858. .clkr = {
  1859. .enable_reg = 0x10524,
  1860. .enable_mask = BIT(0),
  1861. .hw.init = &(const struct clk_init_data) {
  1862. .name = "cam_cc_ipe_pps_fast_ahb_clk",
  1863. .parent_hws = (const struct clk_hw*[]) {
  1864. &cam_cc_fast_ahb_clk_src.clkr.hw,
  1865. },
  1866. .num_parents = 1,
  1867. .flags = CLK_SET_RATE_PARENT,
  1868. .ops = &clk_branch2_ops,
  1869. },
  1870. },
  1871. };
  1872. static struct clk_branch cam_cc_jpeg_clk = {
  1873. .halt_reg = 0x13508,
  1874. .halt_check = BRANCH_HALT,
  1875. .clkr = {
  1876. .enable_reg = 0x13508,
  1877. .enable_mask = BIT(0),
  1878. .hw.init = &(const struct clk_init_data) {
  1879. .name = "cam_cc_jpeg_clk",
  1880. .parent_hws = (const struct clk_hw*[]) {
  1881. &cam_cc_jpeg_clk_src.clkr.hw,
  1882. },
  1883. .num_parents = 1,
  1884. .flags = CLK_SET_RATE_PARENT,
  1885. .ops = &clk_branch2_ops,
  1886. },
  1887. },
  1888. };
  1889. static struct clk_branch cam_cc_mclk0_clk = {
  1890. .halt_reg = 0x15018,
  1891. .halt_check = BRANCH_HALT,
  1892. .clkr = {
  1893. .enable_reg = 0x15018,
  1894. .enable_mask = BIT(0),
  1895. .hw.init = &(const struct clk_init_data) {
  1896. .name = "cam_cc_mclk0_clk",
  1897. .parent_hws = (const struct clk_hw*[]) {
  1898. &cam_cc_mclk0_clk_src.clkr.hw,
  1899. },
  1900. .num_parents = 1,
  1901. .flags = CLK_SET_RATE_PARENT,
  1902. .ops = &clk_branch2_ops,
  1903. },
  1904. },
  1905. };
  1906. static struct clk_branch cam_cc_mclk1_clk = {
  1907. .halt_reg = 0x15034,
  1908. .halt_check = BRANCH_HALT,
  1909. .clkr = {
  1910. .enable_reg = 0x15034,
  1911. .enable_mask = BIT(0),
  1912. .hw.init = &(const struct clk_init_data) {
  1913. .name = "cam_cc_mclk1_clk",
  1914. .parent_hws = (const struct clk_hw*[]) {
  1915. &cam_cc_mclk1_clk_src.clkr.hw,
  1916. },
  1917. .num_parents = 1,
  1918. .flags = CLK_SET_RATE_PARENT,
  1919. .ops = &clk_branch2_ops,
  1920. },
  1921. },
  1922. };
  1923. static struct clk_branch cam_cc_mclk2_clk = {
  1924. .halt_reg = 0x15050,
  1925. .halt_check = BRANCH_HALT,
  1926. .clkr = {
  1927. .enable_reg = 0x15050,
  1928. .enable_mask = BIT(0),
  1929. .hw.init = &(const struct clk_init_data) {
  1930. .name = "cam_cc_mclk2_clk",
  1931. .parent_hws = (const struct clk_hw*[]) {
  1932. &cam_cc_mclk2_clk_src.clkr.hw,
  1933. },
  1934. .num_parents = 1,
  1935. .flags = CLK_SET_RATE_PARENT,
  1936. .ops = &clk_branch2_ops,
  1937. },
  1938. },
  1939. };
  1940. static struct clk_branch cam_cc_mclk3_clk = {
  1941. .halt_reg = 0x1506c,
  1942. .halt_check = BRANCH_HALT,
  1943. .clkr = {
  1944. .enable_reg = 0x1506c,
  1945. .enable_mask = BIT(0),
  1946. .hw.init = &(const struct clk_init_data) {
  1947. .name = "cam_cc_mclk3_clk",
  1948. .parent_hws = (const struct clk_hw*[]) {
  1949. &cam_cc_mclk3_clk_src.clkr.hw,
  1950. },
  1951. .num_parents = 1,
  1952. .flags = CLK_SET_RATE_PARENT,
  1953. .ops = &clk_branch2_ops,
  1954. },
  1955. },
  1956. };
  1957. static struct clk_branch cam_cc_mclk4_clk = {
  1958. .halt_reg = 0x15088,
  1959. .halt_check = BRANCH_HALT,
  1960. .clkr = {
  1961. .enable_reg = 0x15088,
  1962. .enable_mask = BIT(0),
  1963. .hw.init = &(const struct clk_init_data) {
  1964. .name = "cam_cc_mclk4_clk",
  1965. .parent_hws = (const struct clk_hw*[]) {
  1966. &cam_cc_mclk4_clk_src.clkr.hw,
  1967. },
  1968. .num_parents = 1,
  1969. .flags = CLK_SET_RATE_PARENT,
  1970. .ops = &clk_branch2_ops,
  1971. },
  1972. },
  1973. };
  1974. static struct clk_branch cam_cc_mclk5_clk = {
  1975. .halt_reg = 0x150a4,
  1976. .halt_check = BRANCH_HALT,
  1977. .clkr = {
  1978. .enable_reg = 0x150a4,
  1979. .enable_mask = BIT(0),
  1980. .hw.init = &(const struct clk_init_data) {
  1981. .name = "cam_cc_mclk5_clk",
  1982. .parent_hws = (const struct clk_hw*[]) {
  1983. &cam_cc_mclk5_clk_src.clkr.hw,
  1984. },
  1985. .num_parents = 1,
  1986. .flags = CLK_SET_RATE_PARENT,
  1987. .ops = &clk_branch2_ops,
  1988. },
  1989. },
  1990. };
  1991. static struct clk_branch cam_cc_mclk6_clk = {
  1992. .halt_reg = 0x150c0,
  1993. .halt_check = BRANCH_HALT,
  1994. .clkr = {
  1995. .enable_reg = 0x150c0,
  1996. .enable_mask = BIT(0),
  1997. .hw.init = &(const struct clk_init_data) {
  1998. .name = "cam_cc_mclk6_clk",
  1999. .parent_hws = (const struct clk_hw*[]) {
  2000. &cam_cc_mclk6_clk_src.clkr.hw,
  2001. },
  2002. .num_parents = 1,
  2003. .flags = CLK_SET_RATE_PARENT,
  2004. .ops = &clk_branch2_ops,
  2005. },
  2006. },
  2007. };
  2008. static struct clk_branch cam_cc_mclk7_clk = {
  2009. .halt_reg = 0x150dc,
  2010. .halt_check = BRANCH_HALT,
  2011. .clkr = {
  2012. .enable_reg = 0x150dc,
  2013. .enable_mask = BIT(0),
  2014. .hw.init = &(const struct clk_init_data) {
  2015. .name = "cam_cc_mclk7_clk",
  2016. .parent_hws = (const struct clk_hw*[]) {
  2017. &cam_cc_mclk7_clk_src.clkr.hw,
  2018. },
  2019. .num_parents = 1,
  2020. .flags = CLK_SET_RATE_PARENT,
  2021. .ops = &clk_branch2_ops,
  2022. },
  2023. },
  2024. };
  2025. static struct clk_branch cam_cc_sfe_0_clk = {
  2026. .halt_reg = 0x133c0,
  2027. .halt_check = BRANCH_HALT,
  2028. .clkr = {
  2029. .enable_reg = 0x133c0,
  2030. .enable_mask = BIT(0),
  2031. .hw.init = &(const struct clk_init_data) {
  2032. .name = "cam_cc_sfe_0_clk",
  2033. .parent_hws = (const struct clk_hw*[]) {
  2034. &cam_cc_sfe_0_clk_src.clkr.hw,
  2035. },
  2036. .num_parents = 1,
  2037. .flags = CLK_SET_RATE_PARENT,
  2038. .ops = &clk_branch2_ops,
  2039. },
  2040. },
  2041. };
  2042. static struct clk_branch cam_cc_sfe_0_fast_ahb_clk = {
  2043. .halt_reg = 0x133d8,
  2044. .halt_check = BRANCH_HALT,
  2045. .clkr = {
  2046. .enable_reg = 0x133d8,
  2047. .enable_mask = BIT(0),
  2048. .hw.init = &(const struct clk_init_data) {
  2049. .name = "cam_cc_sfe_0_fast_ahb_clk",
  2050. .parent_hws = (const struct clk_hw*[]) {
  2051. &cam_cc_fast_ahb_clk_src.clkr.hw,
  2052. },
  2053. .num_parents = 1,
  2054. .flags = CLK_SET_RATE_PARENT,
  2055. .ops = &clk_branch2_ops,
  2056. },
  2057. },
  2058. };
  2059. static struct gdsc cam_cc_titan_top_gdsc;
  2060. static struct gdsc cam_cc_bps_gdsc = {
  2061. .gdscr = 0x10004,
  2062. .en_rest_wait_val = 0x2,
  2063. .en_few_wait_val = 0x2,
  2064. .clk_dis_wait_val = 0xf,
  2065. .pd = {
  2066. .name = "cam_cc_bps_gdsc",
  2067. },
  2068. .pwrsts = PWRSTS_OFF_ON,
  2069. .parent = &cam_cc_titan_top_gdsc.pd,
  2070. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2071. };
  2072. static struct gdsc cam_cc_ife_0_gdsc = {
  2073. .gdscr = 0x11004,
  2074. .en_rest_wait_val = 0x2,
  2075. .en_few_wait_val = 0x2,
  2076. .clk_dis_wait_val = 0xf,
  2077. .pd = {
  2078. .name = "cam_cc_ife_0_gdsc",
  2079. },
  2080. .pwrsts = PWRSTS_OFF_ON,
  2081. .parent = &cam_cc_titan_top_gdsc.pd,
  2082. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2083. };
  2084. static struct gdsc cam_cc_ife_1_gdsc = {
  2085. .gdscr = 0x12004,
  2086. .en_rest_wait_val = 0x2,
  2087. .en_few_wait_val = 0x2,
  2088. .clk_dis_wait_val = 0xf,
  2089. .pd = {
  2090. .name = "cam_cc_ife_1_gdsc",
  2091. },
  2092. .pwrsts = PWRSTS_OFF_ON,
  2093. .parent = &cam_cc_titan_top_gdsc.pd,
  2094. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2095. };
  2096. static struct gdsc cam_cc_ipe_0_gdsc = {
  2097. .gdscr = 0x103b8,
  2098. .en_rest_wait_val = 0x2,
  2099. .en_few_wait_val = 0x2,
  2100. .clk_dis_wait_val = 0xf,
  2101. .pd = {
  2102. .name = "cam_cc_ipe_0_gdsc",
  2103. },
  2104. .pwrsts = PWRSTS_OFF_ON,
  2105. .parent = &cam_cc_titan_top_gdsc.pd,
  2106. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2107. };
  2108. static struct gdsc cam_cc_sfe_0_gdsc = {
  2109. .gdscr = 0x13280,
  2110. .en_rest_wait_val = 0x2,
  2111. .en_few_wait_val = 0x2,
  2112. .clk_dis_wait_val = 0xf,
  2113. .pd = {
  2114. .name = "cam_cc_sfe_0_gdsc",
  2115. },
  2116. .pwrsts = PWRSTS_OFF_ON,
  2117. .parent = &cam_cc_titan_top_gdsc.pd,
  2118. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2119. };
  2120. static struct gdsc cam_cc_titan_top_gdsc = {
  2121. .gdscr = 0x13a6c,
  2122. .en_rest_wait_val = 0x2,
  2123. .en_few_wait_val = 0x2,
  2124. .clk_dis_wait_val = 0xf,
  2125. .pd = {
  2126. .name = "cam_cc_titan_top_gdsc",
  2127. },
  2128. .pwrsts = PWRSTS_OFF_ON,
  2129. .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
  2130. };
  2131. static struct clk_regmap *cam_cc_x1e80100_clocks[] = {
  2132. [CAM_CC_BPS_AHB_CLK] = &cam_cc_bps_ahb_clk.clkr,
  2133. [CAM_CC_BPS_CLK] = &cam_cc_bps_clk.clkr,
  2134. [CAM_CC_BPS_CLK_SRC] = &cam_cc_bps_clk_src.clkr,
  2135. [CAM_CC_BPS_FAST_AHB_CLK] = &cam_cc_bps_fast_ahb_clk.clkr,
  2136. [CAM_CC_CAMNOC_AXI_NRT_CLK] = &cam_cc_camnoc_axi_nrt_clk.clkr,
  2137. [CAM_CC_CAMNOC_AXI_RT_CLK] = &cam_cc_camnoc_axi_rt_clk.clkr,
  2138. [CAM_CC_CAMNOC_AXI_RT_CLK_SRC] = &cam_cc_camnoc_axi_rt_clk_src.clkr,
  2139. [CAM_CC_CAMNOC_DCD_XO_CLK] = &cam_cc_camnoc_dcd_xo_clk.clkr,
  2140. [CAM_CC_CAMNOC_XO_CLK] = &cam_cc_camnoc_xo_clk.clkr,
  2141. [CAM_CC_CCI_0_CLK] = &cam_cc_cci_0_clk.clkr,
  2142. [CAM_CC_CCI_0_CLK_SRC] = &cam_cc_cci_0_clk_src.clkr,
  2143. [CAM_CC_CCI_1_CLK] = &cam_cc_cci_1_clk.clkr,
  2144. [CAM_CC_CCI_1_CLK_SRC] = &cam_cc_cci_1_clk_src.clkr,
  2145. [CAM_CC_CORE_AHB_CLK] = &cam_cc_core_ahb_clk.clkr,
  2146. [CAM_CC_CPAS_AHB_CLK] = &cam_cc_cpas_ahb_clk.clkr,
  2147. [CAM_CC_CPAS_BPS_CLK] = &cam_cc_cpas_bps_clk.clkr,
  2148. [CAM_CC_CPAS_FAST_AHB_CLK] = &cam_cc_cpas_fast_ahb_clk.clkr,
  2149. [CAM_CC_CPAS_IFE_0_CLK] = &cam_cc_cpas_ife_0_clk.clkr,
  2150. [CAM_CC_CPAS_IFE_1_CLK] = &cam_cc_cpas_ife_1_clk.clkr,
  2151. [CAM_CC_CPAS_IFE_LITE_CLK] = &cam_cc_cpas_ife_lite_clk.clkr,
  2152. [CAM_CC_CPAS_IPE_NPS_CLK] = &cam_cc_cpas_ipe_nps_clk.clkr,
  2153. [CAM_CC_CPAS_SFE_0_CLK] = &cam_cc_cpas_sfe_0_clk.clkr,
  2154. [CAM_CC_CPHY_RX_CLK_SRC] = &cam_cc_cphy_rx_clk_src.clkr,
  2155. [CAM_CC_CSI0PHYTIMER_CLK] = &cam_cc_csi0phytimer_clk.clkr,
  2156. [CAM_CC_CSI0PHYTIMER_CLK_SRC] = &cam_cc_csi0phytimer_clk_src.clkr,
  2157. [CAM_CC_CSI1PHYTIMER_CLK] = &cam_cc_csi1phytimer_clk.clkr,
  2158. [CAM_CC_CSI1PHYTIMER_CLK_SRC] = &cam_cc_csi1phytimer_clk_src.clkr,
  2159. [CAM_CC_CSI2PHYTIMER_CLK] = &cam_cc_csi2phytimer_clk.clkr,
  2160. [CAM_CC_CSI2PHYTIMER_CLK_SRC] = &cam_cc_csi2phytimer_clk_src.clkr,
  2161. [CAM_CC_CSI3PHYTIMER_CLK] = &cam_cc_csi3phytimer_clk.clkr,
  2162. [CAM_CC_CSI3PHYTIMER_CLK_SRC] = &cam_cc_csi3phytimer_clk_src.clkr,
  2163. [CAM_CC_CSI4PHYTIMER_CLK] = &cam_cc_csi4phytimer_clk.clkr,
  2164. [CAM_CC_CSI4PHYTIMER_CLK_SRC] = &cam_cc_csi4phytimer_clk_src.clkr,
  2165. [CAM_CC_CSI5PHYTIMER_CLK] = &cam_cc_csi5phytimer_clk.clkr,
  2166. [CAM_CC_CSI5PHYTIMER_CLK_SRC] = &cam_cc_csi5phytimer_clk_src.clkr,
  2167. [CAM_CC_CSID_CLK] = &cam_cc_csid_clk.clkr,
  2168. [CAM_CC_CSID_CLK_SRC] = &cam_cc_csid_clk_src.clkr,
  2169. [CAM_CC_CSID_CSIPHY_RX_CLK] = &cam_cc_csid_csiphy_rx_clk.clkr,
  2170. [CAM_CC_CSIPHY0_CLK] = &cam_cc_csiphy0_clk.clkr,
  2171. [CAM_CC_CSIPHY1_CLK] = &cam_cc_csiphy1_clk.clkr,
  2172. [CAM_CC_CSIPHY2_CLK] = &cam_cc_csiphy2_clk.clkr,
  2173. [CAM_CC_CSIPHY3_CLK] = &cam_cc_csiphy3_clk.clkr,
  2174. [CAM_CC_CSIPHY4_CLK] = &cam_cc_csiphy4_clk.clkr,
  2175. [CAM_CC_CSIPHY5_CLK] = &cam_cc_csiphy5_clk.clkr,
  2176. [CAM_CC_FAST_AHB_CLK_SRC] = &cam_cc_fast_ahb_clk_src.clkr,
  2177. [CAM_CC_ICP_AHB_CLK] = &cam_cc_icp_ahb_clk.clkr,
  2178. [CAM_CC_ICP_CLK] = &cam_cc_icp_clk.clkr,
  2179. [CAM_CC_ICP_CLK_SRC] = &cam_cc_icp_clk_src.clkr,
  2180. [CAM_CC_IFE_0_CLK] = &cam_cc_ife_0_clk.clkr,
  2181. [CAM_CC_IFE_0_CLK_SRC] = &cam_cc_ife_0_clk_src.clkr,
  2182. [CAM_CC_IFE_0_DSP_CLK] = &cam_cc_ife_0_dsp_clk.clkr,
  2183. [CAM_CC_IFE_0_FAST_AHB_CLK] = &cam_cc_ife_0_fast_ahb_clk.clkr,
  2184. [CAM_CC_IFE_1_CLK] = &cam_cc_ife_1_clk.clkr,
  2185. [CAM_CC_IFE_1_CLK_SRC] = &cam_cc_ife_1_clk_src.clkr,
  2186. [CAM_CC_IFE_1_DSP_CLK] = &cam_cc_ife_1_dsp_clk.clkr,
  2187. [CAM_CC_IFE_1_FAST_AHB_CLK] = &cam_cc_ife_1_fast_ahb_clk.clkr,
  2188. [CAM_CC_IFE_LITE_AHB_CLK] = &cam_cc_ife_lite_ahb_clk.clkr,
  2189. [CAM_CC_IFE_LITE_CLK] = &cam_cc_ife_lite_clk.clkr,
  2190. [CAM_CC_IFE_LITE_CLK_SRC] = &cam_cc_ife_lite_clk_src.clkr,
  2191. [CAM_CC_IFE_LITE_CPHY_RX_CLK] = &cam_cc_ife_lite_cphy_rx_clk.clkr,
  2192. [CAM_CC_IFE_LITE_CSID_CLK] = &cam_cc_ife_lite_csid_clk.clkr,
  2193. [CAM_CC_IFE_LITE_CSID_CLK_SRC] = &cam_cc_ife_lite_csid_clk_src.clkr,
  2194. [CAM_CC_IPE_NPS_AHB_CLK] = &cam_cc_ipe_nps_ahb_clk.clkr,
  2195. [CAM_CC_IPE_NPS_CLK] = &cam_cc_ipe_nps_clk.clkr,
  2196. [CAM_CC_IPE_NPS_CLK_SRC] = &cam_cc_ipe_nps_clk_src.clkr,
  2197. [CAM_CC_IPE_NPS_FAST_AHB_CLK] = &cam_cc_ipe_nps_fast_ahb_clk.clkr,
  2198. [CAM_CC_IPE_PPS_CLK] = &cam_cc_ipe_pps_clk.clkr,
  2199. [CAM_CC_IPE_PPS_FAST_AHB_CLK] = &cam_cc_ipe_pps_fast_ahb_clk.clkr,
  2200. [CAM_CC_JPEG_CLK] = &cam_cc_jpeg_clk.clkr,
  2201. [CAM_CC_JPEG_CLK_SRC] = &cam_cc_jpeg_clk_src.clkr,
  2202. [CAM_CC_MCLK0_CLK] = &cam_cc_mclk0_clk.clkr,
  2203. [CAM_CC_MCLK0_CLK_SRC] = &cam_cc_mclk0_clk_src.clkr,
  2204. [CAM_CC_MCLK1_CLK] = &cam_cc_mclk1_clk.clkr,
  2205. [CAM_CC_MCLK1_CLK_SRC] = &cam_cc_mclk1_clk_src.clkr,
  2206. [CAM_CC_MCLK2_CLK] = &cam_cc_mclk2_clk.clkr,
  2207. [CAM_CC_MCLK2_CLK_SRC] = &cam_cc_mclk2_clk_src.clkr,
  2208. [CAM_CC_MCLK3_CLK] = &cam_cc_mclk3_clk.clkr,
  2209. [CAM_CC_MCLK3_CLK_SRC] = &cam_cc_mclk3_clk_src.clkr,
  2210. [CAM_CC_MCLK4_CLK] = &cam_cc_mclk4_clk.clkr,
  2211. [CAM_CC_MCLK4_CLK_SRC] = &cam_cc_mclk4_clk_src.clkr,
  2212. [CAM_CC_MCLK5_CLK] = &cam_cc_mclk5_clk.clkr,
  2213. [CAM_CC_MCLK5_CLK_SRC] = &cam_cc_mclk5_clk_src.clkr,
  2214. [CAM_CC_MCLK6_CLK] = &cam_cc_mclk6_clk.clkr,
  2215. [CAM_CC_MCLK6_CLK_SRC] = &cam_cc_mclk6_clk_src.clkr,
  2216. [CAM_CC_MCLK7_CLK] = &cam_cc_mclk7_clk.clkr,
  2217. [CAM_CC_MCLK7_CLK_SRC] = &cam_cc_mclk7_clk_src.clkr,
  2218. [CAM_CC_PLL0] = &cam_cc_pll0.clkr,
  2219. [CAM_CC_PLL0_OUT_EVEN] = &cam_cc_pll0_out_even.clkr,
  2220. [CAM_CC_PLL0_OUT_ODD] = &cam_cc_pll0_out_odd.clkr,
  2221. [CAM_CC_PLL1] = &cam_cc_pll1.clkr,
  2222. [CAM_CC_PLL1_OUT_EVEN] = &cam_cc_pll1_out_even.clkr,
  2223. [CAM_CC_PLL2] = &cam_cc_pll2.clkr,
  2224. [CAM_CC_PLL3] = &cam_cc_pll3.clkr,
  2225. [CAM_CC_PLL3_OUT_EVEN] = &cam_cc_pll3_out_even.clkr,
  2226. [CAM_CC_PLL4] = &cam_cc_pll4.clkr,
  2227. [CAM_CC_PLL4_OUT_EVEN] = &cam_cc_pll4_out_even.clkr,
  2228. [CAM_CC_PLL6] = &cam_cc_pll6.clkr,
  2229. [CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr,
  2230. [CAM_CC_PLL8] = &cam_cc_pll8.clkr,
  2231. [CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr,
  2232. [CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr,
  2233. [CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr,
  2234. [CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr,
  2235. [CAM_CC_SLEEP_CLK_SRC] = &cam_cc_sleep_clk_src.clkr,
  2236. [CAM_CC_SLOW_AHB_CLK_SRC] = &cam_cc_slow_ahb_clk_src.clkr,
  2237. [CAM_CC_XO_CLK_SRC] = &cam_cc_xo_clk_src.clkr,
  2238. };
  2239. static struct gdsc *cam_cc_x1e80100_gdscs[] = {
  2240. [CAM_CC_BPS_GDSC] = &cam_cc_bps_gdsc,
  2241. [CAM_CC_IFE_0_GDSC] = &cam_cc_ife_0_gdsc,
  2242. [CAM_CC_IFE_1_GDSC] = &cam_cc_ife_1_gdsc,
  2243. [CAM_CC_IPE_0_GDSC] = &cam_cc_ipe_0_gdsc,
  2244. [CAM_CC_SFE_0_GDSC] = &cam_cc_sfe_0_gdsc,
  2245. [CAM_CC_TITAN_TOP_GDSC] = &cam_cc_titan_top_gdsc,
  2246. };
  2247. static const struct qcom_reset_map cam_cc_x1e80100_resets[] = {
  2248. [CAM_CC_BPS_BCR] = { 0x10000 },
  2249. [CAM_CC_ICP_BCR] = { 0x1351c },
  2250. [CAM_CC_IFE_0_BCR] = { 0x11000 },
  2251. [CAM_CC_IFE_1_BCR] = { 0x12000 },
  2252. [CAM_CC_IPE_0_BCR] = { 0x103b4 },
  2253. [CAM_CC_SFE_0_BCR] = { 0x1327c },
  2254. };
  2255. static struct clk_alpha_pll *cam_cc_x1e80100_plls[] = {
  2256. &cam_cc_pll0,
  2257. &cam_cc_pll1,
  2258. &cam_cc_pll2,
  2259. &cam_cc_pll3,
  2260. &cam_cc_pll4,
  2261. &cam_cc_pll6,
  2262. &cam_cc_pll8,
  2263. };
  2264. static u32 cam_cc_x1e80100_critical_cbcrs[] = {
  2265. 0x13a9c, /* CAM_CC_GDSC_CLK */
  2266. 0x13ab8, /* CAM_CC_SLEEP_CLK */
  2267. };
  2268. static const struct regmap_config cam_cc_x1e80100_regmap_config = {
  2269. .reg_bits = 32,
  2270. .reg_stride = 4,
  2271. .val_bits = 32,
  2272. .max_register = 0x1603c,
  2273. .fast_io = true,
  2274. };
  2275. static struct qcom_cc_driver_data cam_cc_x1e80100_driver_data = {
  2276. .alpha_plls = cam_cc_x1e80100_plls,
  2277. .num_alpha_plls = ARRAY_SIZE(cam_cc_x1e80100_plls),
  2278. .clk_cbcrs = cam_cc_x1e80100_critical_cbcrs,
  2279. .num_clk_cbcrs = ARRAY_SIZE(cam_cc_x1e80100_critical_cbcrs),
  2280. };
  2281. static const struct qcom_cc_desc cam_cc_x1e80100_desc = {
  2282. .config = &cam_cc_x1e80100_regmap_config,
  2283. .clks = cam_cc_x1e80100_clocks,
  2284. .num_clks = ARRAY_SIZE(cam_cc_x1e80100_clocks),
  2285. .resets = cam_cc_x1e80100_resets,
  2286. .num_resets = ARRAY_SIZE(cam_cc_x1e80100_resets),
  2287. .gdscs = cam_cc_x1e80100_gdscs,
  2288. .num_gdscs = ARRAY_SIZE(cam_cc_x1e80100_gdscs),
  2289. .use_rpm = true,
  2290. .driver_data = &cam_cc_x1e80100_driver_data,
  2291. };
  2292. static const struct of_device_id cam_cc_x1e80100_match_table[] = {
  2293. { .compatible = "qcom,x1e80100-camcc" },
  2294. { }
  2295. };
  2296. MODULE_DEVICE_TABLE(of, cam_cc_x1e80100_match_table);
  2297. static int cam_cc_x1e80100_probe(struct platform_device *pdev)
  2298. {
  2299. return qcom_cc_probe(pdev, &cam_cc_x1e80100_desc);
  2300. }
  2301. static struct platform_driver cam_cc_x1e80100_driver = {
  2302. .probe = cam_cc_x1e80100_probe,
  2303. .driver = {
  2304. .name = "camcc-x1e80100",
  2305. .of_match_table = cam_cc_x1e80100_match_table,
  2306. },
  2307. };
  2308. module_platform_driver(cam_cc_x1e80100_driver);
  2309. MODULE_DESCRIPTION("QTI Camera Clock Controller X1E80100 Driver");
  2310. MODULE_LICENSE("GPL");