1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
6 #include <linux/clk-provider.h>
7 #include <linux/mod_devicetable.h>
8 #include <linux/module.h>
9 #include <linux/platform_device.h>
10 #include <linux/regmap.h>
12 #include <dt-bindings/clock/qcom,sm8450-camcc.h>
14 #include "clk-alpha-pll.h"
15 #include "clk-branch.h"
18 #include "clk-regmap-divider.h"
19 #include "clk-regmap-mux.h"
20 #include "clk-regmap.h"
34 P_CAM_CC_PLL0_OUT_EVEN
,
35 P_CAM_CC_PLL0_OUT_MAIN
,
36 P_CAM_CC_PLL0_OUT_ODD
,
37 P_CAM_CC_PLL1_OUT_EVEN
,
38 P_CAM_CC_PLL2_OUT_EVEN
,
39 P_CAM_CC_PLL2_OUT_MAIN
,
40 P_CAM_CC_PLL3_OUT_EVEN
,
41 P_CAM_CC_PLL4_OUT_EVEN
,
42 P_CAM_CC_PLL5_OUT_EVEN
,
43 P_CAM_CC_PLL6_OUT_EVEN
,
44 P_CAM_CC_PLL7_OUT_EVEN
,
45 P_CAM_CC_PLL8_OUT_EVEN
,
49 static const struct pll_vco lucid_evo_vco
[] = {
50 { 249600000, 2000000000, 0 },
53 static const struct pll_vco rivian_evo_vco
[] = {
54 { 864000000, 1056000000, 0 },
57 static const struct pll_vco rivian_ole_vco
[] = {
58 { 864000000, 1075000000, 0 },
61 static const struct clk_parent_data pll_parent_data_tcxo
= { .index
= DT_BI_TCXO
};
63 static const struct alpha_pll_config cam_cc_pll0_config
= {
66 .config_ctl_val
= 0x20485699,
67 .config_ctl_hi_val
= 0x00182261,
68 .config_ctl_hi1_val
= 0x32aa299c,
69 .user_ctl_val
= 0x00008400,
70 .user_ctl_hi_val
= 0x00000805,
73 static const struct alpha_pll_config sm8475_cam_cc_pll0_config
= {
76 .config_ctl_val
= 0x20485699,
77 .config_ctl_hi_val
= 0x00182261,
78 .config_ctl_hi1_val
= 0x82aa299c,
79 .test_ctl_val
= 0x00000000,
80 .test_ctl_hi_val
= 0x00000003,
81 .test_ctl_hi1_val
= 0x00009000,
82 .test_ctl_hi2_val
= 0x00000034,
83 .user_ctl_val
= 0x00008400,
84 .user_ctl_hi_val
= 0x00000005,
87 static struct clk_alpha_pll cam_cc_pll0
= {
89 .vco_table
= lucid_evo_vco
,
90 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
91 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
93 .hw
.init
= &(const struct clk_init_data
) {
94 .name
= "cam_cc_pll0",
95 .parent_data
= &pll_parent_data_tcxo
,
97 .ops
= &clk_alpha_pll_lucid_evo_ops
,
102 static const struct clk_div_table post_div_table_cam_cc_pll0_out_even
[] = {
107 static struct clk_init_data sm8475_cam_cc_pll0_out_even_init
= {
108 .name
= "cam_cc_pll0_out_even",
109 .parent_hws
= (const struct clk_hw
*[]) {
110 &cam_cc_pll0
.clkr
.hw
,
113 .flags
= CLK_SET_RATE_PARENT
,
114 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
117 static struct clk_alpha_pll_postdiv cam_cc_pll0_out_even
= {
119 .post_div_shift
= 10,
120 .post_div_table
= post_div_table_cam_cc_pll0_out_even
,
121 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll0_out_even
),
123 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
124 .clkr
.hw
.init
= &(const struct clk_init_data
) {
125 .name
= "cam_cc_pll0_out_even",
126 .parent_hws
= (const struct clk_hw
*[]) {
127 &cam_cc_pll0
.clkr
.hw
,
130 .flags
= CLK_SET_RATE_PARENT
,
131 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
135 static const struct clk_div_table post_div_table_cam_cc_pll0_out_odd
[] = {
140 static struct clk_init_data sm8475_cam_cc_pll0_out_odd_init
= {
141 .name
= "cam_cc_pll0_out_odd",
142 .parent_hws
= (const struct clk_hw
*[]) {
143 &cam_cc_pll0
.clkr
.hw
,
146 .flags
= CLK_SET_RATE_PARENT
,
147 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
150 static struct clk_alpha_pll_postdiv cam_cc_pll0_out_odd
= {
152 .post_div_shift
= 14,
153 .post_div_table
= post_div_table_cam_cc_pll0_out_odd
,
154 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll0_out_odd
),
156 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
157 .clkr
.hw
.init
= &(const struct clk_init_data
) {
158 .name
= "cam_cc_pll0_out_odd",
159 .parent_hws
= (const struct clk_hw
*[]) {
160 &cam_cc_pll0
.clkr
.hw
,
163 .flags
= CLK_SET_RATE_PARENT
,
164 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
168 static const struct alpha_pll_config cam_cc_pll1_config
= {
171 .config_ctl_val
= 0x20485699,
172 .config_ctl_hi_val
= 0x00182261,
173 .config_ctl_hi1_val
= 0x32aa299c,
174 .user_ctl_val
= 0x00000400,
175 .user_ctl_hi_val
= 0x00000805,
178 static const struct alpha_pll_config sm8475_cam_cc_pll1_config
= {
181 .config_ctl_val
= 0x20485699,
182 .config_ctl_hi_val
= 0x00182261,
183 .config_ctl_hi1_val
= 0x82aa299c,
184 .test_ctl_val
= 0x00000000,
185 .test_ctl_hi_val
= 0x00000003,
186 .test_ctl_hi1_val
= 0x00009000,
187 .test_ctl_hi2_val
= 0x00000034,
188 .user_ctl_val
= 0x00000400,
189 .user_ctl_hi_val
= 0x00000005,
192 static struct clk_alpha_pll cam_cc_pll1
= {
194 .vco_table
= lucid_evo_vco
,
195 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
196 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
198 .hw
.init
= &(const struct clk_init_data
) {
199 .name
= "cam_cc_pll1",
200 .parent_data
= &pll_parent_data_tcxo
,
202 .ops
= &clk_alpha_pll_lucid_evo_ops
,
207 static const struct clk_div_table post_div_table_cam_cc_pll1_out_even
[] = {
212 static struct clk_init_data sm8475_cam_cc_pll1_out_even_init
= {
213 .name
= "cam_cc_pll1_out_even",
214 .parent_hws
= (const struct clk_hw
*[]) {
215 &cam_cc_pll1
.clkr
.hw
,
218 .flags
= CLK_SET_RATE_PARENT
,
219 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
222 static struct clk_alpha_pll_postdiv cam_cc_pll1_out_even
= {
224 .post_div_shift
= 10,
225 .post_div_table
= post_div_table_cam_cc_pll1_out_even
,
226 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll1_out_even
),
228 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
229 .clkr
.hw
.init
= &(const struct clk_init_data
) {
230 .name
= "cam_cc_pll1_out_even",
231 .parent_hws
= (const struct clk_hw
*[]) {
232 &cam_cc_pll1
.clkr
.hw
,
235 .flags
= CLK_SET_RATE_PARENT
,
236 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
240 static const struct alpha_pll_config cam_cc_pll2_config
= {
243 .config_ctl_val
= 0x90008820,
244 .config_ctl_hi_val
= 0x00890263,
245 .config_ctl_hi1_val
= 0x00000217,
248 static const struct alpha_pll_config sm8475_cam_cc_pll2_config
= {
251 .config_ctl_val
= 0x10000030,
252 .config_ctl_hi_val
= 0x80890263,
253 .config_ctl_hi1_val
= 0x00000217,
254 .user_ctl_val
= 0x00000001,
255 .user_ctl_hi_val
= 0x00000000,
258 static struct clk_alpha_pll cam_cc_pll2
= {
260 .vco_table
= rivian_evo_vco
,
261 .num_vco
= ARRAY_SIZE(rivian_evo_vco
),
262 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_RIVIAN_EVO
],
264 .hw
.init
= &(const struct clk_init_data
) {
265 .name
= "cam_cc_pll2",
266 .parent_data
= &pll_parent_data_tcxo
,
268 .ops
= &clk_alpha_pll_rivian_evo_ops
,
273 static const struct alpha_pll_config cam_cc_pll3_config
= {
276 .config_ctl_val
= 0x20485699,
277 .config_ctl_hi_val
= 0x00182261,
278 .config_ctl_hi1_val
= 0x32aa299c,
279 .user_ctl_val
= 0x00000400,
280 .user_ctl_hi_val
= 0x00000805,
283 static const struct alpha_pll_config sm8475_cam_cc_pll3_config
= {
286 .config_ctl_val
= 0x20485699,
287 .config_ctl_hi_val
= 0x00182261,
288 .config_ctl_hi1_val
= 0x82aa299c,
289 .test_ctl_val
= 0x00000000,
290 .test_ctl_hi_val
= 0x00000003,
291 .test_ctl_hi1_val
= 0x00009000,
292 .test_ctl_hi2_val
= 0x00000034,
293 .user_ctl_val
= 0x00000400,
294 .user_ctl_hi_val
= 0x00000005,
297 static struct clk_alpha_pll cam_cc_pll3
= {
299 .vco_table
= lucid_evo_vco
,
300 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
301 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
303 .hw
.init
= &(const struct clk_init_data
) {
304 .name
= "cam_cc_pll3",
305 .parent_data
= &pll_parent_data_tcxo
,
307 .ops
= &clk_alpha_pll_lucid_evo_ops
,
312 static const struct clk_div_table post_div_table_cam_cc_pll3_out_even
[] = {
317 static struct clk_init_data sm8475_cam_cc_pll3_out_even_init
= {
318 .name
= "cam_cc_pll3_out_even",
319 .parent_hws
= (const struct clk_hw
*[]) {
320 &cam_cc_pll3
.clkr
.hw
,
323 .flags
= CLK_SET_RATE_PARENT
,
324 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
327 static struct clk_alpha_pll_postdiv cam_cc_pll3_out_even
= {
329 .post_div_shift
= 10,
330 .post_div_table
= post_div_table_cam_cc_pll3_out_even
,
331 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll3_out_even
),
333 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
334 .clkr
.hw
.init
= &(const struct clk_init_data
) {
335 .name
= "cam_cc_pll3_out_even",
336 .parent_hws
= (const struct clk_hw
*[]) {
337 &cam_cc_pll3
.clkr
.hw
,
340 .flags
= CLK_SET_RATE_PARENT
,
341 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
345 static const struct alpha_pll_config cam_cc_pll4_config
= {
348 .config_ctl_val
= 0x20485699,
349 .config_ctl_hi_val
= 0x00182261,
350 .config_ctl_hi1_val
= 0x32aa299c,
351 .user_ctl_val
= 0x00000400,
352 .user_ctl_hi_val
= 0x00000805,
355 static const struct alpha_pll_config sm8475_cam_cc_pll4_config
= {
358 .config_ctl_val
= 0x20485699,
359 .config_ctl_hi_val
= 0x00182261,
360 .config_ctl_hi1_val
= 0x82aa299c,
361 .test_ctl_val
= 0x00000000,
362 .test_ctl_hi_val
= 0x00000003,
363 .test_ctl_hi1_val
= 0x00009000,
364 .test_ctl_hi2_val
= 0x00000034,
365 .user_ctl_val
= 0x00000400,
366 .user_ctl_hi_val
= 0x00000005,
369 static struct clk_alpha_pll cam_cc_pll4
= {
371 .vco_table
= lucid_evo_vco
,
372 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
373 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
375 .hw
.init
= &(const struct clk_init_data
) {
376 .name
= "cam_cc_pll4",
377 .parent_data
= &pll_parent_data_tcxo
,
379 .ops
= &clk_alpha_pll_lucid_evo_ops
,
384 static const struct clk_div_table post_div_table_cam_cc_pll4_out_even
[] = {
389 static struct clk_init_data sm8475_cam_cc_pll4_out_even_init
= {
390 .name
= "cam_cc_pll4_out_even",
391 .parent_hws
= (const struct clk_hw
*[]) {
392 &cam_cc_pll4
.clkr
.hw
,
395 .flags
= CLK_SET_RATE_PARENT
,
396 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
399 static struct clk_alpha_pll_postdiv cam_cc_pll4_out_even
= {
401 .post_div_shift
= 10,
402 .post_div_table
= post_div_table_cam_cc_pll4_out_even
,
403 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll4_out_even
),
405 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
406 .clkr
.hw
.init
= &(const struct clk_init_data
) {
407 .name
= "cam_cc_pll4_out_even",
408 .parent_hws
= (const struct clk_hw
*[]) {
409 &cam_cc_pll4
.clkr
.hw
,
412 .flags
= CLK_SET_RATE_PARENT
,
413 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
417 static const struct alpha_pll_config cam_cc_pll5_config
= {
420 .config_ctl_val
= 0x20485699,
421 .config_ctl_hi_val
= 0x00182261,
422 .config_ctl_hi1_val
= 0x32aa299c,
423 .user_ctl_val
= 0x00000400,
424 .user_ctl_hi_val
= 0x00000805,
427 static const struct alpha_pll_config sm8475_cam_cc_pll5_config
= {
430 .config_ctl_val
= 0x20485699,
431 .config_ctl_hi_val
= 0x00182261,
432 .config_ctl_hi1_val
= 0x82aa299c,
433 .test_ctl_val
= 0x00000000,
434 .test_ctl_hi_val
= 0x00000003,
435 .test_ctl_hi1_val
= 0x00009000,
436 .test_ctl_hi2_val
= 0x00000034,
437 .user_ctl_val
= 0x00000400,
438 .user_ctl_hi_val
= 0x00000005,
441 static struct clk_alpha_pll cam_cc_pll5
= {
443 .vco_table
= lucid_evo_vco
,
444 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
445 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
447 .hw
.init
= &(const struct clk_init_data
) {
448 .name
= "cam_cc_pll5",
449 .parent_data
= &pll_parent_data_tcxo
,
451 .ops
= &clk_alpha_pll_lucid_evo_ops
,
456 static const struct clk_div_table post_div_table_cam_cc_pll5_out_even
[] = {
461 static struct clk_init_data sm8475_cam_cc_pll5_out_even_init
= {
462 .name
= "cam_cc_pll5_out_even",
463 .parent_hws
= (const struct clk_hw
*[]) {
464 &cam_cc_pll5
.clkr
.hw
,
467 .flags
= CLK_SET_RATE_PARENT
,
468 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
471 static struct clk_alpha_pll_postdiv cam_cc_pll5_out_even
= {
473 .post_div_shift
= 10,
474 .post_div_table
= post_div_table_cam_cc_pll5_out_even
,
475 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll5_out_even
),
477 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
478 .clkr
.hw
.init
= &(const struct clk_init_data
) {
479 .name
= "cam_cc_pll5_out_even",
480 .parent_hws
= (const struct clk_hw
*[]) {
481 &cam_cc_pll5
.clkr
.hw
,
484 .flags
= CLK_SET_RATE_PARENT
,
485 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
489 static const struct alpha_pll_config cam_cc_pll6_config
= {
492 .config_ctl_val
= 0x20485699,
493 .config_ctl_hi_val
= 0x00182261,
494 .config_ctl_hi1_val
= 0x32aa299c,
495 .user_ctl_val
= 0x00000400,
496 .user_ctl_hi_val
= 0x00000805,
499 static const struct alpha_pll_config sm8475_cam_cc_pll6_config
= {
502 .config_ctl_val
= 0x20485699,
503 .config_ctl_hi_val
= 0x00182261,
504 .config_ctl_hi1_val
= 0x82aa299c,
505 .test_ctl_val
= 0x00000000,
506 .test_ctl_hi_val
= 0x00000003,
507 .test_ctl_hi1_val
= 0x00009000,
508 .test_ctl_hi2_val
= 0x00000034,
509 .user_ctl_val
= 0x00000400,
510 .user_ctl_hi_val
= 0x00000005,
513 static struct clk_alpha_pll cam_cc_pll6
= {
515 .vco_table
= lucid_evo_vco
,
516 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
517 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
519 .hw
.init
= &(const struct clk_init_data
) {
520 .name
= "cam_cc_pll6",
521 .parent_data
= &pll_parent_data_tcxo
,
523 .ops
= &clk_alpha_pll_lucid_evo_ops
,
528 static const struct clk_div_table post_div_table_cam_cc_pll6_out_even
[] = {
533 static struct clk_init_data sm8475_cam_cc_pll6_out_even_init
= {
534 .name
= "cam_cc_pll6_out_even",
535 .parent_hws
= (const struct clk_hw
*[]) {
536 &cam_cc_pll6
.clkr
.hw
,
539 .flags
= CLK_SET_RATE_PARENT
,
540 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
543 static struct clk_alpha_pll_postdiv cam_cc_pll6_out_even
= {
545 .post_div_shift
= 10,
546 .post_div_table
= post_div_table_cam_cc_pll6_out_even
,
547 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll6_out_even
),
549 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
550 .clkr
.hw
.init
= &(const struct clk_init_data
) {
551 .name
= "cam_cc_pll6_out_even",
552 .parent_hws
= (const struct clk_hw
*[]) {
553 &cam_cc_pll6
.clkr
.hw
,
556 .flags
= CLK_SET_RATE_PARENT
,
557 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
561 static const struct alpha_pll_config cam_cc_pll7_config
= {
564 .config_ctl_val
= 0x20485699,
565 .config_ctl_hi_val
= 0x00182261,
566 .config_ctl_hi1_val
= 0x32aa299c,
567 .user_ctl_val
= 0x00000400,
568 .user_ctl_hi_val
= 0x00000805,
571 static const struct alpha_pll_config sm8475_cam_cc_pll7_config
= {
574 .config_ctl_val
= 0x20485699,
575 .config_ctl_hi_val
= 0x00182261,
576 .config_ctl_hi1_val
= 0x82aa299c,
577 .test_ctl_val
= 0x00000000,
578 .test_ctl_hi_val
= 0x00000003,
579 .test_ctl_hi1_val
= 0x00009000,
580 .test_ctl_hi2_val
= 0x00000034,
581 .user_ctl_val
= 0x00000400,
582 .user_ctl_hi_val
= 0x00000005,
585 static struct clk_alpha_pll cam_cc_pll7
= {
587 .vco_table
= lucid_evo_vco
,
588 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
589 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
591 .hw
.init
= &(const struct clk_init_data
) {
592 .name
= "cam_cc_pll7",
593 .parent_data
= &pll_parent_data_tcxo
,
595 .ops
= &clk_alpha_pll_lucid_evo_ops
,
600 static const struct clk_div_table post_div_table_cam_cc_pll7_out_even
[] = {
605 static struct clk_init_data sm8475_cam_cc_pll7_out_even_init
= {
606 .name
= "cam_cc_pll7_out_even",
607 .parent_hws
= (const struct clk_hw
*[]) {
608 &cam_cc_pll7
.clkr
.hw
,
611 .flags
= CLK_SET_RATE_PARENT
,
612 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
615 static struct clk_alpha_pll_postdiv cam_cc_pll7_out_even
= {
617 .post_div_shift
= 10,
618 .post_div_table
= post_div_table_cam_cc_pll7_out_even
,
619 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll7_out_even
),
621 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
622 .clkr
.hw
.init
= &(const struct clk_init_data
) {
623 .name
= "cam_cc_pll7_out_even",
624 .parent_hws
= (const struct clk_hw
*[]) {
625 &cam_cc_pll7
.clkr
.hw
,
628 .flags
= CLK_SET_RATE_PARENT
,
629 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
633 static const struct alpha_pll_config cam_cc_pll8_config
= {
636 .config_ctl_val
= 0x20485699,
637 .config_ctl_hi_val
= 0x00182261,
638 .config_ctl_hi1_val
= 0x32aa299c,
639 .user_ctl_val
= 0x00000400,
640 .user_ctl_hi_val
= 0x00000805,
643 static const struct alpha_pll_config sm8475_cam_cc_pll8_config
= {
646 .config_ctl_val
= 0x20485699,
647 .config_ctl_hi_val
= 0x00182261,
648 .config_ctl_hi1_val
= 0x82aa299c,
649 .test_ctl_val
= 0x00000000,
650 .test_ctl_hi_val
= 0x00000003,
651 .test_ctl_hi1_val
= 0x00009000,
652 .test_ctl_hi2_val
= 0x00000034,
653 .user_ctl_val
= 0x00000400,
654 .user_ctl_hi_val
= 0x00000005,
657 static struct clk_alpha_pll cam_cc_pll8
= {
659 .vco_table
= lucid_evo_vco
,
660 .num_vco
= ARRAY_SIZE(lucid_evo_vco
),
661 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
663 .hw
.init
= &(const struct clk_init_data
) {
664 .name
= "cam_cc_pll8",
665 .parent_data
= &pll_parent_data_tcxo
,
667 .ops
= &clk_alpha_pll_lucid_evo_ops
,
672 static const struct clk_div_table post_div_table_cam_cc_pll8_out_even
[] = {
677 static struct clk_init_data sm8475_cam_cc_pll8_out_even_init
= {
678 .name
= "cam_cc_pll8_out_even",
679 .parent_hws
= (const struct clk_hw
*[]) {
680 &cam_cc_pll8
.clkr
.hw
,
683 .flags
= CLK_SET_RATE_PARENT
,
684 .ops
= &clk_alpha_pll_postdiv_lucid_ole_ops
,
687 static struct clk_alpha_pll_postdiv cam_cc_pll8_out_even
= {
689 .post_div_shift
= 10,
690 .post_div_table
= post_div_table_cam_cc_pll8_out_even
,
691 .num_post_div
= ARRAY_SIZE(post_div_table_cam_cc_pll8_out_even
),
693 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_EVO
],
694 .clkr
.hw
.init
= &(const struct clk_init_data
) {
695 .name
= "cam_cc_pll8_out_even",
696 .parent_hws
= (const struct clk_hw
*[]) {
697 &cam_cc_pll8
.clkr
.hw
,
700 .flags
= CLK_SET_RATE_PARENT
,
701 .ops
= &clk_alpha_pll_postdiv_lucid_evo_ops
,
705 static const struct parent_map cam_cc_parent_map_0
[] = {
707 { P_CAM_CC_PLL0_OUT_MAIN
, 1 },
708 { P_CAM_CC_PLL0_OUT_EVEN
, 2 },
709 { P_CAM_CC_PLL0_OUT_ODD
, 3 },
710 { P_CAM_CC_PLL8_OUT_EVEN
, 5 },
713 static const struct clk_parent_data cam_cc_parent_data_0
[] = {
714 { .index
= DT_BI_TCXO
},
715 { .hw
= &cam_cc_pll0
.clkr
.hw
},
716 { .hw
= &cam_cc_pll0_out_even
.clkr
.hw
},
717 { .hw
= &cam_cc_pll0_out_odd
.clkr
.hw
},
718 { .hw
= &cam_cc_pll8_out_even
.clkr
.hw
},
721 static const struct parent_map cam_cc_parent_map_1
[] = {
723 { P_CAM_CC_PLL2_OUT_EVEN
, 3 },
724 { P_CAM_CC_PLL2_OUT_MAIN
, 5 },
727 static const struct clk_parent_data cam_cc_parent_data_1
[] = {
728 { .index
= DT_BI_TCXO
},
729 { .hw
= &cam_cc_pll2
.clkr
.hw
},
730 { .hw
= &cam_cc_pll2
.clkr
.hw
},
733 static const struct parent_map cam_cc_parent_map_2
[] = {
735 { P_CAM_CC_PLL3_OUT_EVEN
, 6 },
738 static const struct clk_parent_data cam_cc_parent_data_2
[] = {
739 { .index
= DT_BI_TCXO
},
740 { .hw
= &cam_cc_pll3_out_even
.clkr
.hw
},
743 static const struct parent_map cam_cc_parent_map_3
[] = {
745 { P_CAM_CC_PLL4_OUT_EVEN
, 6 },
748 static const struct clk_parent_data cam_cc_parent_data_3
[] = {
749 { .index
= DT_BI_TCXO
},
750 { .hw
= &cam_cc_pll4_out_even
.clkr
.hw
},
753 static const struct parent_map cam_cc_parent_map_4
[] = {
755 { P_CAM_CC_PLL5_OUT_EVEN
, 6 },
758 static const struct clk_parent_data cam_cc_parent_data_4
[] = {
759 { .index
= DT_BI_TCXO
},
760 { .hw
= &cam_cc_pll5_out_even
.clkr
.hw
},
763 static const struct parent_map cam_cc_parent_map_5
[] = {
765 { P_CAM_CC_PLL1_OUT_EVEN
, 4 },
768 static const struct clk_parent_data cam_cc_parent_data_5
[] = {
769 { .index
= DT_BI_TCXO
},
770 { .hw
= &cam_cc_pll1_out_even
.clkr
.hw
},
773 static const struct parent_map cam_cc_parent_map_6
[] = {
775 { P_CAM_CC_PLL6_OUT_EVEN
, 6 },
778 static const struct clk_parent_data cam_cc_parent_data_6
[] = {
779 { .index
= DT_BI_TCXO
},
780 { .hw
= &cam_cc_pll6_out_even
.clkr
.hw
},
783 static const struct parent_map cam_cc_parent_map_7
[] = {
785 { P_CAM_CC_PLL7_OUT_EVEN
, 6 },
788 static const struct clk_parent_data cam_cc_parent_data_7
[] = {
789 { .index
= DT_BI_TCXO
},
790 { .hw
= &cam_cc_pll7_out_even
.clkr
.hw
},
793 static const struct parent_map cam_cc_parent_map_8
[] = {
797 static const struct clk_parent_data cam_cc_parent_data_8
[] = {
798 { .index
= DT_SLEEP_CLK
},
801 static const struct parent_map cam_cc_parent_map_9
[] = {
805 static const struct clk_parent_data cam_cc_parent_data_9_ao
[] = {
806 { .index
= DT_BI_TCXO_AO
, .name
= "bi_tcxo_ao" },
809 static const struct freq_tbl ftbl_cam_cc_bps_clk_src
[] = {
810 F(19200000, P_BI_TCXO
, 1, 0, 0),
811 F(200000000, P_CAM_CC_PLL0_OUT_ODD
, 2, 0, 0),
812 F(400000000, P_CAM_CC_PLL0_OUT_ODD
, 1, 0, 0),
813 F(480000000, P_CAM_CC_PLL8_OUT_EVEN
, 1, 0, 0),
814 F(600000000, P_CAM_CC_PLL0_OUT_EVEN
, 1, 0, 0),
818 static struct clk_rcg2 cam_cc_bps_clk_src
= {
822 .parent_map
= cam_cc_parent_map_0
,
823 .freq_tbl
= ftbl_cam_cc_bps_clk_src
,
824 .clkr
.hw
.init
= &(const struct clk_init_data
) {
825 .name
= "cam_cc_bps_clk_src",
826 .parent_data
= cam_cc_parent_data_0
,
827 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
828 .flags
= CLK_SET_RATE_PARENT
,
829 .ops
= &clk_rcg2_ops
,
833 static const struct freq_tbl ftbl_cam_cc_camnoc_axi_clk_src
[] = {
834 F(19200000, P_BI_TCXO
, 1, 0, 0),
835 F(300000000, P_CAM_CC_PLL0_OUT_EVEN
, 2, 0, 0),
836 F(400000000, P_CAM_CC_PLL0_OUT_ODD
, 1, 0, 0),
840 static struct clk_rcg2 cam_cc_camnoc_axi_clk_src
= {
844 .parent_map
= cam_cc_parent_map_0
,
845 .freq_tbl
= ftbl_cam_cc_camnoc_axi_clk_src
,
846 .clkr
.hw
.init
= &(const struct clk_init_data
) {
847 .name
= "cam_cc_camnoc_axi_clk_src",
848 .parent_data
= cam_cc_parent_data_0
,
849 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
850 .flags
= CLK_SET_RATE_PARENT
,
851 .ops
= &clk_rcg2_ops
,
855 static const struct freq_tbl ftbl_cam_cc_cci_0_clk_src
[] = {
856 F(19200000, P_BI_TCXO
, 1, 0, 0),
857 F(37500000, P_CAM_CC_PLL0_OUT_EVEN
, 16, 0, 0),
861 static struct clk_rcg2 cam_cc_cci_0_clk_src
= {
865 .parent_map
= cam_cc_parent_map_0
,
866 .freq_tbl
= ftbl_cam_cc_cci_0_clk_src
,
867 .clkr
.hw
.init
= &(const struct clk_init_data
) {
868 .name
= "cam_cc_cci_0_clk_src",
869 .parent_data
= cam_cc_parent_data_0
,
870 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
871 .flags
= CLK_SET_RATE_PARENT
,
872 .ops
= &clk_rcg2_ops
,
876 static struct clk_rcg2 cam_cc_cci_1_clk_src
= {
880 .parent_map
= cam_cc_parent_map_0
,
881 .freq_tbl
= ftbl_cam_cc_cci_0_clk_src
,
882 .clkr
.hw
.init
= &(const struct clk_init_data
) {
883 .name
= "cam_cc_cci_1_clk_src",
884 .parent_data
= cam_cc_parent_data_0
,
885 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
886 .flags
= CLK_SET_RATE_PARENT
,
887 .ops
= &clk_rcg2_ops
,
891 static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src
[] = {
892 F(19200000, P_BI_TCXO
, 1, 0, 0),
893 F(400000000, P_CAM_CC_PLL0_OUT_MAIN
, 3, 0, 0),
894 F(480000000, P_CAM_CC_PLL0_OUT_MAIN
, 2.5, 0, 0),
898 static struct clk_rcg2 cam_cc_cphy_rx_clk_src
= {
902 .parent_map
= cam_cc_parent_map_0
,
903 .freq_tbl
= ftbl_cam_cc_cphy_rx_clk_src
,
904 .clkr
.hw
.init
= &(const struct clk_init_data
) {
905 .name
= "cam_cc_cphy_rx_clk_src",
906 .parent_data
= cam_cc_parent_data_0
,
907 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
908 .flags
= CLK_SET_RATE_PARENT
,
909 .ops
= &clk_rcg2_ops
,
913 static const struct freq_tbl ftbl_cam_cc_csi0phytimer_clk_src
[] = {
914 F(19200000, P_BI_TCXO
, 1, 0, 0),
915 F(400000000, P_CAM_CC_PLL0_OUT_ODD
, 1, 0, 0),
919 static struct clk_rcg2 cam_cc_csi0phytimer_clk_src
= {
923 .parent_map
= cam_cc_parent_map_0
,
924 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
925 .clkr
.hw
.init
= &(const struct clk_init_data
) {
926 .name
= "cam_cc_csi0phytimer_clk_src",
927 .parent_data
= cam_cc_parent_data_0
,
928 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
929 .flags
= CLK_SET_RATE_PARENT
,
930 .ops
= &clk_rcg2_ops
,
934 static struct clk_rcg2 cam_cc_csi1phytimer_clk_src
= {
938 .parent_map
= cam_cc_parent_map_0
,
939 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
940 .clkr
.hw
.init
= &(const struct clk_init_data
) {
941 .name
= "cam_cc_csi1phytimer_clk_src",
942 .parent_data
= cam_cc_parent_data_0
,
943 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
944 .flags
= CLK_SET_RATE_PARENT
,
945 .ops
= &clk_rcg2_ops
,
949 static struct clk_rcg2 cam_cc_csi2phytimer_clk_src
= {
953 .parent_map
= cam_cc_parent_map_0
,
954 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
955 .clkr
.hw
.init
= &(const struct clk_init_data
) {
956 .name
= "cam_cc_csi2phytimer_clk_src",
957 .parent_data
= cam_cc_parent_data_0
,
958 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
959 .flags
= CLK_SET_RATE_PARENT
,
960 .ops
= &clk_rcg2_ops
,
964 static struct clk_rcg2 cam_cc_csi3phytimer_clk_src
= {
968 .parent_map
= cam_cc_parent_map_0
,
969 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
970 .clkr
.hw
.init
= &(const struct clk_init_data
) {
971 .name
= "cam_cc_csi3phytimer_clk_src",
972 .parent_data
= cam_cc_parent_data_0
,
973 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
974 .flags
= CLK_SET_RATE_PARENT
,
975 .ops
= &clk_rcg2_ops
,
979 static struct clk_rcg2 cam_cc_csi4phytimer_clk_src
= {
983 .parent_map
= cam_cc_parent_map_0
,
984 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
985 .clkr
.hw
.init
= &(const struct clk_init_data
) {
986 .name
= "cam_cc_csi4phytimer_clk_src",
987 .parent_data
= cam_cc_parent_data_0
,
988 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
989 .flags
= CLK_SET_RATE_PARENT
,
990 .ops
= &clk_rcg2_ops
,
994 static struct clk_rcg2 cam_cc_csi5phytimer_clk_src
= {
998 .parent_map
= cam_cc_parent_map_0
,
999 .freq_tbl
= ftbl_cam_cc_csi0phytimer_clk_src
,
1000 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1001 .name
= "cam_cc_csi5phytimer_clk_src",
1002 .parent_data
= cam_cc_parent_data_0
,
1003 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1004 .flags
= CLK_SET_RATE_PARENT
,
1005 .ops
= &clk_rcg2_ops
,
1009 static const struct freq_tbl ftbl_cam_cc_csid_clk_src
[] = {
1010 F(400000000, P_CAM_CC_PLL0_OUT_MAIN
, 3, 0, 0),
1011 F(480000000, P_CAM_CC_PLL0_OUT_MAIN
, 2.5, 0, 0),
1015 static struct clk_rcg2 cam_cc_csid_clk_src
= {
1016 .cmd_rcgr
= 0x13174,
1019 .parent_map
= cam_cc_parent_map_0
,
1020 .freq_tbl
= ftbl_cam_cc_csid_clk_src
,
1021 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1022 .name
= "cam_cc_csid_clk_src",
1023 .parent_data
= cam_cc_parent_data_0
,
1024 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1025 .flags
= CLK_SET_RATE_PARENT
,
1026 .ops
= &clk_rcg2_ops
,
1030 static const struct freq_tbl ftbl_cam_cc_fast_ahb_clk_src
[] = {
1031 F(19200000, P_BI_TCXO
, 1, 0, 0),
1032 F(100000000, P_CAM_CC_PLL0_OUT_EVEN
, 6, 0, 0),
1033 F(200000000, P_CAM_CC_PLL0_OUT_EVEN
, 3, 0, 0),
1034 F(300000000, P_CAM_CC_PLL0_OUT_MAIN
, 4, 0, 0),
1035 F(400000000, P_CAM_CC_PLL0_OUT_MAIN
, 3, 0, 0),
1039 static struct clk_rcg2 cam_cc_fast_ahb_clk_src
= {
1040 .cmd_rcgr
= 0x10018,
1043 .parent_map
= cam_cc_parent_map_0
,
1044 .freq_tbl
= ftbl_cam_cc_fast_ahb_clk_src
,
1045 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1046 .name
= "cam_cc_fast_ahb_clk_src",
1047 .parent_data
= cam_cc_parent_data_0
,
1048 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1049 .flags
= CLK_SET_RATE_PARENT
,
1050 .ops
= &clk_rcg2_ops
,
1054 static const struct freq_tbl ftbl_cam_cc_icp_clk_src
[] = {
1055 F(19200000, P_BI_TCXO
, 1, 0, 0),
1056 F(400000000, P_CAM_CC_PLL0_OUT_ODD
, 1, 0, 0),
1057 F(480000000, P_CAM_CC_PLL8_OUT_EVEN
, 1, 0, 0),
1058 F(600000000, P_CAM_CC_PLL0_OUT_MAIN
, 2, 0, 0),
1062 static struct clk_rcg2 cam_cc_icp_clk_src
= {
1063 .cmd_rcgr
= 0x13108,
1066 .parent_map
= cam_cc_parent_map_0
,
1067 .freq_tbl
= ftbl_cam_cc_icp_clk_src
,
1068 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1069 .name
= "cam_cc_icp_clk_src",
1070 .parent_data
= cam_cc_parent_data_0
,
1071 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1072 .flags
= CLK_SET_RATE_PARENT
,
1073 .ops
= &clk_rcg2_ops
,
1077 static const struct freq_tbl ftbl_cam_cc_ife_0_clk_src
[] = {
1078 F(19200000, P_BI_TCXO
, 1, 0, 0),
1079 F(432000000, P_CAM_CC_PLL3_OUT_EVEN
, 1, 0, 0),
1080 F(594000000, P_CAM_CC_PLL3_OUT_EVEN
, 1, 0, 0),
1081 F(675000000, P_CAM_CC_PLL3_OUT_EVEN
, 1, 0, 0),
1082 F(727000000, P_CAM_CC_PLL3_OUT_EVEN
, 1, 0, 0),
1086 static struct clk_rcg2 cam_cc_ife_0_clk_src
= {
1087 .cmd_rcgr
= 0x11018,
1090 .parent_map
= cam_cc_parent_map_2
,
1091 .freq_tbl
= ftbl_cam_cc_ife_0_clk_src
,
1092 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1093 .name
= "cam_cc_ife_0_clk_src",
1094 .parent_data
= cam_cc_parent_data_2
,
1095 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_2
),
1096 .flags
= CLK_SET_RATE_PARENT
,
1097 .ops
= &clk_rcg2_ops
,
1101 static const struct freq_tbl ftbl_cam_cc_ife_1_clk_src
[] = {
1102 F(19200000, P_BI_TCXO
, 1, 0, 0),
1103 F(432000000, P_CAM_CC_PLL4_OUT_EVEN
, 1, 0, 0),
1104 F(594000000, P_CAM_CC_PLL4_OUT_EVEN
, 1, 0, 0),
1105 F(675000000, P_CAM_CC_PLL4_OUT_EVEN
, 1, 0, 0),
1106 F(727000000, P_CAM_CC_PLL4_OUT_EVEN
, 1, 0, 0),
1110 static struct clk_rcg2 cam_cc_ife_1_clk_src
= {
1111 .cmd_rcgr
= 0x12018,
1114 .parent_map
= cam_cc_parent_map_3
,
1115 .freq_tbl
= ftbl_cam_cc_ife_1_clk_src
,
1116 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1117 .name
= "cam_cc_ife_1_clk_src",
1118 .parent_data
= cam_cc_parent_data_3
,
1119 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_3
),
1120 .flags
= CLK_SET_RATE_PARENT
,
1121 .ops
= &clk_rcg2_ops
,
1125 static const struct freq_tbl ftbl_cam_cc_ife_2_clk_src
[] = {
1126 F(432000000, P_CAM_CC_PLL5_OUT_EVEN
, 1, 0, 0),
1127 F(594000000, P_CAM_CC_PLL5_OUT_EVEN
, 1, 0, 0),
1128 F(675000000, P_CAM_CC_PLL5_OUT_EVEN
, 1, 0, 0),
1129 F(727000000, P_CAM_CC_PLL5_OUT_EVEN
, 1, 0, 0),
1133 static struct clk_rcg2 cam_cc_ife_2_clk_src
= {
1134 .cmd_rcgr
= 0x12064,
1137 .parent_map
= cam_cc_parent_map_4
,
1138 .freq_tbl
= ftbl_cam_cc_ife_2_clk_src
,
1139 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1140 .name
= "cam_cc_ife_2_clk_src",
1141 .parent_data
= cam_cc_parent_data_4
,
1142 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_4
),
1143 .flags
= CLK_SET_RATE_PARENT
,
1144 .ops
= &clk_rcg2_ops
,
1148 static const struct freq_tbl ftbl_cam_cc_ife_lite_clk_src
[] = {
1149 F(400000000, P_CAM_CC_PLL0_OUT_ODD
, 1, 0, 0),
1150 F(480000000, P_CAM_CC_PLL8_OUT_EVEN
, 1, 0, 0),
1154 static struct clk_rcg2 cam_cc_ife_lite_clk_src
= {
1155 .cmd_rcgr
= 0x13000,
1158 .parent_map
= cam_cc_parent_map_0
,
1159 .freq_tbl
= ftbl_cam_cc_ife_lite_clk_src
,
1160 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1161 .name
= "cam_cc_ife_lite_clk_src",
1162 .parent_data
= cam_cc_parent_data_0
,
1163 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1164 .flags
= CLK_SET_RATE_PARENT
,
1165 .ops
= &clk_rcg2_ops
,
1169 static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src
= {
1170 .cmd_rcgr
= 0x13024,
1173 .parent_map
= cam_cc_parent_map_0
,
1174 .freq_tbl
= ftbl_cam_cc_ife_lite_clk_src
,
1175 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1176 .name
= "cam_cc_ife_lite_csid_clk_src",
1177 .parent_data
= cam_cc_parent_data_0
,
1178 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1179 .flags
= CLK_SET_RATE_PARENT
,
1180 .ops
= &clk_rcg2_ops
,
1184 static const struct freq_tbl ftbl_cam_cc_ipe_nps_clk_src
[] = {
1185 F(364000000, P_CAM_CC_PLL1_OUT_EVEN
, 1, 0, 0),
1186 F(500000000, P_CAM_CC_PLL1_OUT_EVEN
, 1, 0, 0),
1187 F(600000000, P_CAM_CC_PLL1_OUT_EVEN
, 1, 0, 0),
1188 F(700000000, P_CAM_CC_PLL1_OUT_EVEN
, 1, 0, 0),
1192 static struct clk_rcg2 cam_cc_ipe_nps_clk_src
= {
1193 .cmd_rcgr
= 0x1008c,
1196 .parent_map
= cam_cc_parent_map_5
,
1197 .freq_tbl
= ftbl_cam_cc_ipe_nps_clk_src
,
1198 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1199 .name
= "cam_cc_ipe_nps_clk_src",
1200 .parent_data
= cam_cc_parent_data_5
,
1201 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_5
),
1202 .flags
= CLK_SET_RATE_PARENT
,
1203 .ops
= &clk_rcg2_ops
,
1207 static struct clk_rcg2 cam_cc_jpeg_clk_src
= {
1208 .cmd_rcgr
= 0x130dc,
1211 .parent_map
= cam_cc_parent_map_0
,
1212 .freq_tbl
= ftbl_cam_cc_bps_clk_src
,
1213 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1214 .name
= "cam_cc_jpeg_clk_src",
1215 .parent_data
= cam_cc_parent_data_0
,
1216 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1217 .flags
= CLK_SET_RATE_PARENT
,
1218 .ops
= &clk_rcg2_ops
,
1222 static const struct freq_tbl ftbl_cam_cc_mclk0_clk_src
[] = {
1223 F(19200000, P_BI_TCXO
, 1, 0, 0),
1224 F(24000000, P_CAM_CC_PLL2_OUT_MAIN
, 10, 1, 4),
1225 F(68571429, P_CAM_CC_PLL2_OUT_MAIN
, 14, 0, 0),
1229 static struct clk_rcg2 cam_cc_mclk0_clk_src
= {
1230 .cmd_rcgr
= 0x15000,
1233 .parent_map
= cam_cc_parent_map_1
,
1234 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1235 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1236 .name
= "cam_cc_mclk0_clk_src",
1237 .parent_data
= cam_cc_parent_data_1
,
1238 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1239 .flags
= CLK_SET_RATE_PARENT
,
1240 .ops
= &clk_rcg2_ops
,
1244 static struct clk_rcg2 cam_cc_mclk1_clk_src
= {
1245 .cmd_rcgr
= 0x1501c,
1248 .parent_map
= cam_cc_parent_map_1
,
1249 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1250 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1251 .name
= "cam_cc_mclk1_clk_src",
1252 .parent_data
= cam_cc_parent_data_1
,
1253 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1254 .flags
= CLK_SET_RATE_PARENT
,
1255 .ops
= &clk_rcg2_ops
,
1259 static struct clk_rcg2 cam_cc_mclk2_clk_src
= {
1260 .cmd_rcgr
= 0x15038,
1263 .parent_map
= cam_cc_parent_map_1
,
1264 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1265 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1266 .name
= "cam_cc_mclk2_clk_src",
1267 .parent_data
= cam_cc_parent_data_1
,
1268 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1269 .flags
= CLK_SET_RATE_PARENT
,
1270 .ops
= &clk_rcg2_ops
,
1274 static struct clk_rcg2 cam_cc_mclk3_clk_src
= {
1275 .cmd_rcgr
= 0x15054,
1278 .parent_map
= cam_cc_parent_map_1
,
1279 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1280 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1281 .name
= "cam_cc_mclk3_clk_src",
1282 .parent_data
= cam_cc_parent_data_1
,
1283 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1284 .flags
= CLK_SET_RATE_PARENT
,
1285 .ops
= &clk_rcg2_ops
,
1289 static struct clk_rcg2 cam_cc_mclk4_clk_src
= {
1290 .cmd_rcgr
= 0x15070,
1293 .parent_map
= cam_cc_parent_map_1
,
1294 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1295 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1296 .name
= "cam_cc_mclk4_clk_src",
1297 .parent_data
= cam_cc_parent_data_1
,
1298 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1299 .flags
= CLK_SET_RATE_PARENT
,
1300 .ops
= &clk_rcg2_ops
,
1304 static struct clk_rcg2 cam_cc_mclk5_clk_src
= {
1305 .cmd_rcgr
= 0x1508c,
1308 .parent_map
= cam_cc_parent_map_1
,
1309 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1310 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1311 .name
= "cam_cc_mclk5_clk_src",
1312 .parent_data
= cam_cc_parent_data_1
,
1313 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1314 .flags
= CLK_SET_RATE_PARENT
,
1315 .ops
= &clk_rcg2_ops
,
1319 static struct clk_rcg2 cam_cc_mclk6_clk_src
= {
1320 .cmd_rcgr
= 0x150a8,
1323 .parent_map
= cam_cc_parent_map_1
,
1324 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1325 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1326 .name
= "cam_cc_mclk6_clk_src",
1327 .parent_data
= cam_cc_parent_data_1
,
1328 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1329 .flags
= CLK_SET_RATE_PARENT
,
1330 .ops
= &clk_rcg2_ops
,
1334 static struct clk_rcg2 cam_cc_mclk7_clk_src
= {
1335 .cmd_rcgr
= 0x150c4,
1338 .parent_map
= cam_cc_parent_map_1
,
1339 .freq_tbl
= ftbl_cam_cc_mclk0_clk_src
,
1340 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1341 .name
= "cam_cc_mclk7_clk_src",
1342 .parent_data
= cam_cc_parent_data_1
,
1343 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_1
),
1344 .flags
= CLK_SET_RATE_PARENT
,
1345 .ops
= &clk_rcg2_ops
,
1349 static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src
[] = {
1350 F(19200000, P_BI_TCXO
, 1, 0, 0),
1351 F(75000000, P_CAM_CC_PLL0_OUT_EVEN
, 8, 0, 0),
1352 F(150000000, P_CAM_CC_PLL0_OUT_EVEN
, 4, 0, 0),
1353 F(300000000, P_CAM_CC_PLL0_OUT_MAIN
, 4, 0, 0),
1357 static struct clk_rcg2 cam_cc_qdss_debug_clk_src
= {
1358 .cmd_rcgr
= 0x131bc,
1361 .parent_map
= cam_cc_parent_map_0
,
1362 .freq_tbl
= ftbl_cam_cc_qdss_debug_clk_src
,
1363 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1364 .name
= "cam_cc_qdss_debug_clk_src",
1365 .parent_data
= cam_cc_parent_data_0
,
1366 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1367 .flags
= CLK_SET_RATE_PARENT
,
1368 .ops
= &clk_rcg2_ops
,
1372 static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src
[] = {
1373 F(432000000, P_CAM_CC_PLL6_OUT_EVEN
, 1, 0, 0),
1374 F(594000000, P_CAM_CC_PLL6_OUT_EVEN
, 1, 0, 0),
1375 F(675000000, P_CAM_CC_PLL6_OUT_EVEN
, 1, 0, 0),
1376 F(727000000, P_CAM_CC_PLL6_OUT_EVEN
, 1, 0, 0),
1380 static struct clk_rcg2 cam_cc_sfe_0_clk_src
= {
1381 .cmd_rcgr
= 0x13064,
1384 .parent_map
= cam_cc_parent_map_6
,
1385 .freq_tbl
= ftbl_cam_cc_sfe_0_clk_src
,
1386 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1387 .name
= "cam_cc_sfe_0_clk_src",
1388 .parent_data
= cam_cc_parent_data_6
,
1389 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_6
),
1390 .flags
= CLK_SET_RATE_PARENT
,
1391 .ops
= &clk_rcg2_ops
,
1395 static const struct freq_tbl ftbl_cam_cc_sfe_1_clk_src
[] = {
1396 F(432000000, P_CAM_CC_PLL7_OUT_EVEN
, 1, 0, 0),
1397 F(594000000, P_CAM_CC_PLL7_OUT_EVEN
, 1, 0, 0),
1398 F(675000000, P_CAM_CC_PLL7_OUT_EVEN
, 1, 0, 0),
1399 F(727000000, P_CAM_CC_PLL7_OUT_EVEN
, 1, 0, 0),
1403 static struct clk_rcg2 cam_cc_sfe_1_clk_src
= {
1404 .cmd_rcgr
= 0x130ac,
1407 .parent_map
= cam_cc_parent_map_7
,
1408 .freq_tbl
= ftbl_cam_cc_sfe_1_clk_src
,
1409 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1410 .name
= "cam_cc_sfe_1_clk_src",
1411 .parent_data
= cam_cc_parent_data_7
,
1412 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_7
),
1413 .flags
= CLK_SET_RATE_PARENT
,
1414 .ops
= &clk_rcg2_ops
,
1418 static const struct freq_tbl ftbl_cam_cc_sleep_clk_src
[] = {
1419 F(32000, P_SLEEP_CLK
, 1, 0, 0),
1423 static struct clk_rcg2 cam_cc_sleep_clk_src
= {
1424 .cmd_rcgr
= 0x13210,
1427 .parent_map
= cam_cc_parent_map_8
,
1428 .freq_tbl
= ftbl_cam_cc_sleep_clk_src
,
1429 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1430 .name
= "cam_cc_sleep_clk_src",
1431 .parent_data
= cam_cc_parent_data_8
,
1432 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_8
),
1433 .flags
= CLK_SET_RATE_PARENT
,
1434 .ops
= &clk_rcg2_ops
,
1438 static const struct freq_tbl ftbl_cam_cc_slow_ahb_clk_src
[] = {
1439 F(19200000, P_BI_TCXO
, 1, 0, 0),
1440 F(80000000, P_CAM_CC_PLL0_OUT_EVEN
, 7.5, 0, 0),
1444 static struct clk_rcg2 cam_cc_slow_ahb_clk_src
= {
1445 .cmd_rcgr
= 0x10034,
1448 .parent_map
= cam_cc_parent_map_0
,
1449 .freq_tbl
= ftbl_cam_cc_slow_ahb_clk_src
,
1450 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1451 .name
= "cam_cc_slow_ahb_clk_src",
1452 .parent_data
= cam_cc_parent_data_0
,
1453 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_0
),
1454 .flags
= CLK_SET_RATE_PARENT
,
1455 .ops
= &clk_rcg2_ops
,
1459 static const struct freq_tbl ftbl_cam_cc_xo_clk_src
[] = {
1460 F(19200000, P_BI_TCXO
, 1, 0, 0),
1464 static struct clk_rcg2 cam_cc_xo_clk_src
= {
1465 .cmd_rcgr
= 0x131f4,
1468 .parent_map
= cam_cc_parent_map_9
,
1469 .freq_tbl
= ftbl_cam_cc_xo_clk_src
,
1470 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1471 .name
= "cam_cc_xo_clk_src",
1472 .parent_data
= cam_cc_parent_data_9_ao
,
1473 .num_parents
= ARRAY_SIZE(cam_cc_parent_data_9_ao
),
1474 .flags
= CLK_SET_RATE_PARENT
,
1475 .ops
= &clk_rcg2_ops
,
1479 static struct clk_branch cam_cc_gdsc_clk
= {
1480 .halt_reg
= 0x1320c,
1481 .halt_check
= BRANCH_HALT
,
1483 .enable_reg
= 0x1320c,
1484 .enable_mask
= BIT(0),
1485 .hw
.init
= &(const struct clk_init_data
) {
1486 .name
= "cam_cc_gdsc_clk",
1487 .parent_hws
= (const struct clk_hw
*[]) {
1488 &cam_cc_xo_clk_src
.clkr
.hw
,
1491 .flags
= CLK_IS_CRITICAL
| CLK_SET_RATE_PARENT
,
1492 .ops
= &clk_branch2_ops
,
1497 static struct clk_branch cam_cc_bps_ahb_clk
= {
1498 .halt_reg
= 0x1004c,
1499 .halt_check
= BRANCH_HALT
,
1501 .enable_reg
= 0x1004c,
1502 .enable_mask
= BIT(0),
1503 .hw
.init
= &(const struct clk_init_data
) {
1504 .name
= "cam_cc_bps_ahb_clk",
1505 .parent_hws
= (const struct clk_hw
*[]) {
1506 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
1509 .flags
= CLK_SET_RATE_PARENT
,
1510 .ops
= &clk_branch2_ops
,
1515 static struct clk_branch cam_cc_bps_clk
= {
1516 .halt_reg
= 0x10068,
1517 .halt_check
= BRANCH_HALT
,
1519 .enable_reg
= 0x10068,
1520 .enable_mask
= BIT(0),
1521 .hw
.init
= &(const struct clk_init_data
) {
1522 .name
= "cam_cc_bps_clk",
1523 .parent_hws
= (const struct clk_hw
*[]) {
1524 &cam_cc_bps_clk_src
.clkr
.hw
,
1527 .flags
= CLK_SET_RATE_PARENT
,
1528 .ops
= &clk_branch2_ops
,
1533 static struct clk_branch cam_cc_bps_fast_ahb_clk
= {
1534 .halt_reg
= 0x10030,
1535 .halt_check
= BRANCH_HALT
,
1537 .enable_reg
= 0x10030,
1538 .enable_mask
= BIT(0),
1539 .hw
.init
= &(const struct clk_init_data
) {
1540 .name
= "cam_cc_bps_fast_ahb_clk",
1541 .parent_hws
= (const struct clk_hw
*[]) {
1542 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
1545 .flags
= CLK_SET_RATE_PARENT
,
1546 .ops
= &clk_branch2_ops
,
1551 static struct clk_branch cam_cc_camnoc_axi_clk
= {
1552 .halt_reg
= 0x131ac,
1553 .halt_check
= BRANCH_HALT
,
1555 .enable_reg
= 0x131ac,
1556 .enable_mask
= BIT(0),
1557 .hw
.init
= &(const struct clk_init_data
) {
1558 .name
= "cam_cc_camnoc_axi_clk",
1559 .parent_hws
= (const struct clk_hw
*[]) {
1560 &cam_cc_camnoc_axi_clk_src
.clkr
.hw
,
1563 .flags
= CLK_SET_RATE_PARENT
,
1564 .ops
= &clk_branch2_ops
,
1569 static struct clk_branch cam_cc_camnoc_dcd_xo_clk
= {
1570 .halt_reg
= 0x131b4,
1571 .halt_check
= BRANCH_HALT
,
1573 .enable_reg
= 0x131b4,
1574 .enable_mask
= BIT(0),
1575 .hw
.init
= &(const struct clk_init_data
) {
1576 .name
= "cam_cc_camnoc_dcd_xo_clk",
1577 .parent_hws
= (const struct clk_hw
*[]) {
1578 &cam_cc_xo_clk_src
.clkr
.hw
,
1581 .flags
= CLK_SET_RATE_PARENT
,
1582 .ops
= &clk_branch2_ops
,
1587 static struct clk_branch cam_cc_cci_0_clk
= {
1588 .halt_reg
= 0x13144,
1589 .halt_check
= BRANCH_HALT
,
1591 .enable_reg
= 0x13144,
1592 .enable_mask
= BIT(0),
1593 .hw
.init
= &(const struct clk_init_data
) {
1594 .name
= "cam_cc_cci_0_clk",
1595 .parent_hws
= (const struct clk_hw
*[]) {
1596 &cam_cc_cci_0_clk_src
.clkr
.hw
,
1599 .flags
= CLK_SET_RATE_PARENT
,
1600 .ops
= &clk_branch2_ops
,
1605 static struct clk_branch cam_cc_cci_1_clk
= {
1606 .halt_reg
= 0x13160,
1607 .halt_check
= BRANCH_HALT
,
1609 .enable_reg
= 0x13160,
1610 .enable_mask
= BIT(0),
1611 .hw
.init
= &(const struct clk_init_data
) {
1612 .name
= "cam_cc_cci_1_clk",
1613 .parent_hws
= (const struct clk_hw
*[]) {
1614 &cam_cc_cci_1_clk_src
.clkr
.hw
,
1617 .flags
= CLK_SET_RATE_PARENT
,
1618 .ops
= &clk_branch2_ops
,
1623 static struct clk_branch cam_cc_core_ahb_clk
= {
1624 .halt_reg
= 0x131f0,
1625 .halt_check
= BRANCH_HALT_DELAY
,
1627 .enable_reg
= 0x131f0,
1628 .enable_mask
= BIT(0),
1629 .hw
.init
= &(const struct clk_init_data
) {
1630 .name
= "cam_cc_core_ahb_clk",
1631 .parent_hws
= (const struct clk_hw
*[]) {
1632 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
1635 .flags
= CLK_SET_RATE_PARENT
,
1636 .ops
= &clk_branch2_ops
,
1641 static struct clk_branch cam_cc_cpas_ahb_clk
= {
1642 .halt_reg
= 0x13164,
1643 .halt_check
= BRANCH_HALT
,
1645 .enable_reg
= 0x13164,
1646 .enable_mask
= BIT(0),
1647 .hw
.init
= &(const struct clk_init_data
) {
1648 .name
= "cam_cc_cpas_ahb_clk",
1649 .parent_hws
= (const struct clk_hw
*[]) {
1650 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
1653 .flags
= CLK_SET_RATE_PARENT
,
1654 .ops
= &clk_branch2_ops
,
1659 static struct clk_branch cam_cc_cpas_bps_clk
= {
1660 .halt_reg
= 0x10070,
1661 .halt_check
= BRANCH_HALT
,
1663 .enable_reg
= 0x10070,
1664 .enable_mask
= BIT(0),
1665 .hw
.init
= &(const struct clk_init_data
) {
1666 .name
= "cam_cc_cpas_bps_clk",
1667 .parent_hws
= (const struct clk_hw
*[]) {
1668 &cam_cc_bps_clk_src
.clkr
.hw
,
1671 .flags
= CLK_SET_RATE_PARENT
,
1672 .ops
= &clk_branch2_ops
,
1677 static struct clk_branch cam_cc_cpas_fast_ahb_clk
= {
1678 .halt_reg
= 0x1316c,
1679 .halt_check
= BRANCH_HALT
,
1681 .enable_reg
= 0x1316c,
1682 .enable_mask
= BIT(0),
1683 .hw
.init
= &(const struct clk_init_data
) {
1684 .name
= "cam_cc_cpas_fast_ahb_clk",
1685 .parent_hws
= (const struct clk_hw
*[]) {
1686 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
1689 .flags
= CLK_SET_RATE_PARENT
,
1690 .ops
= &clk_branch2_ops
,
1695 static struct clk_branch cam_cc_cpas_ife_0_clk
= {
1696 .halt_reg
= 0x11038,
1697 .halt_check
= BRANCH_HALT
,
1699 .enable_reg
= 0x11038,
1700 .enable_mask
= BIT(0),
1701 .hw
.init
= &(const struct clk_init_data
) {
1702 .name
= "cam_cc_cpas_ife_0_clk",
1703 .parent_hws
= (const struct clk_hw
*[]) {
1704 &cam_cc_ife_0_clk_src
.clkr
.hw
,
1707 .flags
= CLK_SET_RATE_PARENT
,
1708 .ops
= &clk_branch2_ops
,
1713 static struct clk_branch cam_cc_cpas_ife_1_clk
= {
1714 .halt_reg
= 0x12038,
1715 .halt_check
= BRANCH_HALT
,
1717 .enable_reg
= 0x12038,
1718 .enable_mask
= BIT(0),
1719 .hw
.init
= &(const struct clk_init_data
) {
1720 .name
= "cam_cc_cpas_ife_1_clk",
1721 .parent_hws
= (const struct clk_hw
*[]) {
1722 &cam_cc_ife_1_clk_src
.clkr
.hw
,
1725 .flags
= CLK_SET_RATE_PARENT
,
1726 .ops
= &clk_branch2_ops
,
1731 static struct clk_branch cam_cc_cpas_ife_2_clk
= {
1732 .halt_reg
= 0x12084,
1733 .halt_check
= BRANCH_HALT
,
1735 .enable_reg
= 0x12084,
1736 .enable_mask
= BIT(0),
1737 .hw
.init
= &(const struct clk_init_data
) {
1738 .name
= "cam_cc_cpas_ife_2_clk",
1739 .parent_hws
= (const struct clk_hw
*[]) {
1740 &cam_cc_ife_2_clk_src
.clkr
.hw
,
1743 .flags
= CLK_SET_RATE_PARENT
,
1744 .ops
= &clk_branch2_ops
,
1749 static struct clk_branch cam_cc_cpas_ife_lite_clk
= {
1750 .halt_reg
= 0x13020,
1751 .halt_check
= BRANCH_HALT
,
1753 .enable_reg
= 0x13020,
1754 .enable_mask
= BIT(0),
1755 .hw
.init
= &(const struct clk_init_data
) {
1756 .name
= "cam_cc_cpas_ife_lite_clk",
1757 .parent_hws
= (const struct clk_hw
*[]) {
1758 &cam_cc_ife_lite_clk_src
.clkr
.hw
,
1761 .flags
= CLK_SET_RATE_PARENT
,
1762 .ops
= &clk_branch2_ops
,
1767 static struct clk_branch cam_cc_cpas_ipe_nps_clk
= {
1768 .halt_reg
= 0x100ac,
1769 .halt_check
= BRANCH_HALT
,
1771 .enable_reg
= 0x100ac,
1772 .enable_mask
= BIT(0),
1773 .hw
.init
= &(const struct clk_init_data
) {
1774 .name
= "cam_cc_cpas_ipe_nps_clk",
1775 .parent_hws
= (const struct clk_hw
*[]) {
1776 &cam_cc_ipe_nps_clk_src
.clkr
.hw
,
1779 .flags
= CLK_SET_RATE_PARENT
,
1780 .ops
= &clk_branch2_ops
,
1785 static struct clk_branch cam_cc_cpas_sbi_clk
= {
1786 .halt_reg
= 0x100ec,
1787 .halt_check
= BRANCH_HALT
,
1789 .enable_reg
= 0x100ec,
1790 .enable_mask
= BIT(0),
1791 .hw
.init
= &(const struct clk_init_data
) {
1792 .name
= "cam_cc_cpas_sbi_clk",
1793 .parent_hws
= (const struct clk_hw
*[]) {
1794 &cam_cc_ife_0_clk_src
.clkr
.hw
,
1797 .flags
= CLK_SET_RATE_PARENT
,
1798 .ops
= &clk_branch2_ops
,
1803 static struct clk_branch cam_cc_cpas_sfe_0_clk
= {
1804 .halt_reg
= 0x13084,
1805 .halt_check
= BRANCH_HALT
,
1807 .enable_reg
= 0x13084,
1808 .enable_mask
= BIT(0),
1809 .hw
.init
= &(const struct clk_init_data
) {
1810 .name
= "cam_cc_cpas_sfe_0_clk",
1811 .parent_hws
= (const struct clk_hw
*[]) {
1812 &cam_cc_sfe_0_clk_src
.clkr
.hw
,
1815 .flags
= CLK_SET_RATE_PARENT
,
1816 .ops
= &clk_branch2_ops
,
1821 static struct clk_branch cam_cc_cpas_sfe_1_clk
= {
1822 .halt_reg
= 0x130cc,
1823 .halt_check
= BRANCH_HALT
,
1825 .enable_reg
= 0x130cc,
1826 .enable_mask
= BIT(0),
1827 .hw
.init
= &(const struct clk_init_data
) {
1828 .name
= "cam_cc_cpas_sfe_1_clk",
1829 .parent_hws
= (const struct clk_hw
*[]) {
1830 &cam_cc_sfe_1_clk_src
.clkr
.hw
,
1833 .flags
= CLK_SET_RATE_PARENT
,
1834 .ops
= &clk_branch2_ops
,
1839 static struct clk_branch cam_cc_csi0phytimer_clk
= {
1840 .halt_reg
= 0x150f8,
1841 .halt_check
= BRANCH_HALT
,
1843 .enable_reg
= 0x150f8,
1844 .enable_mask
= BIT(0),
1845 .hw
.init
= &(const struct clk_init_data
) {
1846 .name
= "cam_cc_csi0phytimer_clk",
1847 .parent_hws
= (const struct clk_hw
*[]) {
1848 &cam_cc_csi0phytimer_clk_src
.clkr
.hw
,
1851 .flags
= CLK_SET_RATE_PARENT
,
1852 .ops
= &clk_branch2_ops
,
1857 static struct clk_branch cam_cc_csi1phytimer_clk
= {
1858 .halt_reg
= 0x1511c,
1859 .halt_check
= BRANCH_HALT
,
1861 .enable_reg
= 0x1511c,
1862 .enable_mask
= BIT(0),
1863 .hw
.init
= &(const struct clk_init_data
) {
1864 .name
= "cam_cc_csi1phytimer_clk",
1865 .parent_hws
= (const struct clk_hw
*[]) {
1866 &cam_cc_csi1phytimer_clk_src
.clkr
.hw
,
1869 .flags
= CLK_SET_RATE_PARENT
,
1870 .ops
= &clk_branch2_ops
,
1875 static struct clk_branch cam_cc_csi2phytimer_clk
= {
1876 .halt_reg
= 0x1513c,
1877 .halt_check
= BRANCH_HALT
,
1879 .enable_reg
= 0x1513c,
1880 .enable_mask
= BIT(0),
1881 .hw
.init
= &(const struct clk_init_data
) {
1882 .name
= "cam_cc_csi2phytimer_clk",
1883 .parent_hws
= (const struct clk_hw
*[]) {
1884 &cam_cc_csi2phytimer_clk_src
.clkr
.hw
,
1887 .flags
= CLK_SET_RATE_PARENT
,
1888 .ops
= &clk_branch2_ops
,
1893 static struct clk_branch cam_cc_csi3phytimer_clk
= {
1894 .halt_reg
= 0x15164,
1895 .halt_check
= BRANCH_HALT
,
1897 .enable_reg
= 0x15164,
1898 .enable_mask
= BIT(0),
1899 .hw
.init
= &(const struct clk_init_data
) {
1900 .name
= "cam_cc_csi3phytimer_clk",
1901 .parent_hws
= (const struct clk_hw
*[]) {
1902 &cam_cc_csi3phytimer_clk_src
.clkr
.hw
,
1905 .flags
= CLK_SET_RATE_PARENT
,
1906 .ops
= &clk_branch2_ops
,
1911 static struct clk_branch cam_cc_csi4phytimer_clk
= {
1912 .halt_reg
= 0x15184,
1913 .halt_check
= BRANCH_HALT
,
1915 .enable_reg
= 0x15184,
1916 .enable_mask
= BIT(0),
1917 .hw
.init
= &(const struct clk_init_data
) {
1918 .name
= "cam_cc_csi4phytimer_clk",
1919 .parent_hws
= (const struct clk_hw
*[]) {
1920 &cam_cc_csi4phytimer_clk_src
.clkr
.hw
,
1923 .flags
= CLK_SET_RATE_PARENT
,
1924 .ops
= &clk_branch2_ops
,
1929 static struct clk_branch cam_cc_csi5phytimer_clk
= {
1930 .halt_reg
= 0x151a4,
1931 .halt_check
= BRANCH_HALT
,
1933 .enable_reg
= 0x151a4,
1934 .enable_mask
= BIT(0),
1935 .hw
.init
= &(const struct clk_init_data
) {
1936 .name
= "cam_cc_csi5phytimer_clk",
1937 .parent_hws
= (const struct clk_hw
*[]) {
1938 &cam_cc_csi5phytimer_clk_src
.clkr
.hw
,
1941 .flags
= CLK_SET_RATE_PARENT
,
1942 .ops
= &clk_branch2_ops
,
1947 static struct clk_branch cam_cc_csid_clk
= {
1948 .halt_reg
= 0x1318c,
1949 .halt_check
= BRANCH_HALT
,
1951 .enable_reg
= 0x1318c,
1952 .enable_mask
= BIT(0),
1953 .hw
.init
= &(const struct clk_init_data
) {
1954 .name
= "cam_cc_csid_clk",
1955 .parent_hws
= (const struct clk_hw
*[]) {
1956 &cam_cc_csid_clk_src
.clkr
.hw
,
1959 .flags
= CLK_SET_RATE_PARENT
,
1960 .ops
= &clk_branch2_ops
,
1965 static struct clk_branch cam_cc_csid_csiphy_rx_clk
= {
1966 .halt_reg
= 0x15100,
1967 .halt_check
= BRANCH_HALT
,
1969 .enable_reg
= 0x15100,
1970 .enable_mask
= BIT(0),
1971 .hw
.init
= &(const struct clk_init_data
) {
1972 .name
= "cam_cc_csid_csiphy_rx_clk",
1973 .parent_hws
= (const struct clk_hw
*[]) {
1974 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
1977 .flags
= CLK_SET_RATE_PARENT
,
1978 .ops
= &clk_branch2_ops
,
1983 static struct clk_branch cam_cc_csiphy0_clk
= {
1984 .halt_reg
= 0x150fc,
1985 .halt_check
= BRANCH_HALT
,
1987 .enable_reg
= 0x150fc,
1988 .enable_mask
= BIT(0),
1989 .hw
.init
= &(const struct clk_init_data
) {
1990 .name
= "cam_cc_csiphy0_clk",
1991 .parent_hws
= (const struct clk_hw
*[]) {
1992 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
1995 .flags
= CLK_SET_RATE_PARENT
,
1996 .ops
= &clk_branch2_ops
,
2001 static struct clk_branch cam_cc_csiphy1_clk
= {
2002 .halt_reg
= 0x15120,
2003 .halt_check
= BRANCH_HALT
,
2005 .enable_reg
= 0x15120,
2006 .enable_mask
= BIT(0),
2007 .hw
.init
= &(const struct clk_init_data
) {
2008 .name
= "cam_cc_csiphy1_clk",
2009 .parent_hws
= (const struct clk_hw
*[]) {
2010 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2013 .flags
= CLK_SET_RATE_PARENT
,
2014 .ops
= &clk_branch2_ops
,
2019 static struct clk_branch cam_cc_csiphy2_clk
= {
2020 .halt_reg
= 0x15140,
2021 .halt_check
= BRANCH_HALT
,
2023 .enable_reg
= 0x15140,
2024 .enable_mask
= BIT(0),
2025 .hw
.init
= &(const struct clk_init_data
) {
2026 .name
= "cam_cc_csiphy2_clk",
2027 .parent_hws
= (const struct clk_hw
*[]) {
2028 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2031 .flags
= CLK_SET_RATE_PARENT
,
2032 .ops
= &clk_branch2_ops
,
2037 static struct clk_branch cam_cc_csiphy3_clk
= {
2038 .halt_reg
= 0x15168,
2039 .halt_check
= BRANCH_HALT
,
2041 .enable_reg
= 0x15168,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(const struct clk_init_data
) {
2044 .name
= "cam_cc_csiphy3_clk",
2045 .parent_hws
= (const struct clk_hw
*[]) {
2046 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2049 .flags
= CLK_SET_RATE_PARENT
,
2050 .ops
= &clk_branch2_ops
,
2055 static struct clk_branch cam_cc_csiphy4_clk
= {
2056 .halt_reg
= 0x15188,
2057 .halt_check
= BRANCH_HALT
,
2059 .enable_reg
= 0x15188,
2060 .enable_mask
= BIT(0),
2061 .hw
.init
= &(const struct clk_init_data
) {
2062 .name
= "cam_cc_csiphy4_clk",
2063 .parent_hws
= (const struct clk_hw
*[]) {
2064 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2067 .flags
= CLK_SET_RATE_PARENT
,
2068 .ops
= &clk_branch2_ops
,
2073 static struct clk_branch cam_cc_csiphy5_clk
= {
2074 .halt_reg
= 0x151a8,
2075 .halt_check
= BRANCH_HALT
,
2077 .enable_reg
= 0x151a8,
2078 .enable_mask
= BIT(0),
2079 .hw
.init
= &(const struct clk_init_data
) {
2080 .name
= "cam_cc_csiphy5_clk",
2081 .parent_hws
= (const struct clk_hw
*[]) {
2082 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2085 .flags
= CLK_SET_RATE_PARENT
,
2086 .ops
= &clk_branch2_ops
,
2091 static struct clk_branch cam_cc_icp_ahb_clk
= {
2092 .halt_reg
= 0x13128,
2093 .halt_check
= BRANCH_HALT
,
2095 .enable_reg
= 0x13128,
2096 .enable_mask
= BIT(0),
2097 .hw
.init
= &(const struct clk_init_data
) {
2098 .name
= "cam_cc_icp_ahb_clk",
2099 .parent_hws
= (const struct clk_hw
*[]) {
2100 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
2103 .flags
= CLK_SET_RATE_PARENT
,
2104 .ops
= &clk_branch2_ops
,
2109 static struct clk_branch cam_cc_icp_clk
= {
2110 .halt_reg
= 0x13120,
2111 .halt_check
= BRANCH_HALT
,
2113 .enable_reg
= 0x13120,
2114 .enable_mask
= BIT(0),
2115 .hw
.init
= &(const struct clk_init_data
) {
2116 .name
= "cam_cc_icp_clk",
2117 .parent_hws
= (const struct clk_hw
*[]) {
2118 &cam_cc_icp_clk_src
.clkr
.hw
,
2121 .flags
= CLK_SET_RATE_PARENT
,
2122 .ops
= &clk_branch2_ops
,
2127 static struct clk_branch cam_cc_ife_0_clk
= {
2128 .halt_reg
= 0x11030,
2129 .halt_check
= BRANCH_HALT
,
2131 .enable_reg
= 0x11030,
2132 .enable_mask
= BIT(0),
2133 .hw
.init
= &(const struct clk_init_data
) {
2134 .name
= "cam_cc_ife_0_clk",
2135 .parent_hws
= (const struct clk_hw
*[]) {
2136 &cam_cc_ife_0_clk_src
.clkr
.hw
,
2139 .flags
= CLK_SET_RATE_PARENT
,
2140 .ops
= &clk_branch2_ops
,
2145 static struct clk_branch cam_cc_ife_0_dsp_clk
= {
2146 .halt_reg
= 0x1103c,
2147 .halt_check
= BRANCH_HALT
,
2149 .enable_reg
= 0x1103c,
2150 .enable_mask
= BIT(0),
2151 .hw
.init
= &(const struct clk_init_data
) {
2152 .name
= "cam_cc_ife_0_dsp_clk",
2153 .parent_hws
= (const struct clk_hw
*[]) {
2154 &cam_cc_ife_0_clk_src
.clkr
.hw
,
2157 .flags
= CLK_SET_RATE_PARENT
,
2158 .ops
= &clk_branch2_ops
,
2163 static struct clk_branch cam_cc_ife_0_fast_ahb_clk
= {
2164 .halt_reg
= 0x11048,
2165 .halt_check
= BRANCH_HALT
,
2167 .enable_reg
= 0x11048,
2168 .enable_mask
= BIT(0),
2169 .hw
.init
= &(const struct clk_init_data
) {
2170 .name
= "cam_cc_ife_0_fast_ahb_clk",
2171 .parent_hws
= (const struct clk_hw
*[]) {
2172 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2175 .flags
= CLK_SET_RATE_PARENT
,
2176 .ops
= &clk_branch2_ops
,
2181 static struct clk_branch cam_cc_ife_1_clk
= {
2182 .halt_reg
= 0x12030,
2183 .halt_check
= BRANCH_HALT
,
2185 .enable_reg
= 0x12030,
2186 .enable_mask
= BIT(0),
2187 .hw
.init
= &(const struct clk_init_data
) {
2188 .name
= "cam_cc_ife_1_clk",
2189 .parent_hws
= (const struct clk_hw
*[]) {
2190 &cam_cc_ife_1_clk_src
.clkr
.hw
,
2193 .flags
= CLK_SET_RATE_PARENT
,
2194 .ops
= &clk_branch2_ops
,
2199 static struct clk_branch cam_cc_ife_1_dsp_clk
= {
2200 .halt_reg
= 0x1203c,
2201 .halt_check
= BRANCH_HALT
,
2203 .enable_reg
= 0x1203c,
2204 .enable_mask
= BIT(0),
2205 .hw
.init
= &(const struct clk_init_data
) {
2206 .name
= "cam_cc_ife_1_dsp_clk",
2207 .parent_hws
= (const struct clk_hw
*[]) {
2208 &cam_cc_ife_1_clk_src
.clkr
.hw
,
2211 .flags
= CLK_SET_RATE_PARENT
,
2212 .ops
= &clk_branch2_ops
,
2217 static struct clk_branch cam_cc_ife_1_fast_ahb_clk
= {
2218 .halt_reg
= 0x12048,
2219 .halt_check
= BRANCH_HALT
,
2221 .enable_reg
= 0x12048,
2222 .enable_mask
= BIT(0),
2223 .hw
.init
= &(const struct clk_init_data
) {
2224 .name
= "cam_cc_ife_1_fast_ahb_clk",
2225 .parent_hws
= (const struct clk_hw
*[]) {
2226 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2229 .flags
= CLK_SET_RATE_PARENT
,
2230 .ops
= &clk_branch2_ops
,
2235 static struct clk_branch cam_cc_ife_2_clk
= {
2236 .halt_reg
= 0x1207c,
2237 .halt_check
= BRANCH_HALT
,
2239 .enable_reg
= 0x1207c,
2240 .enable_mask
= BIT(0),
2241 .hw
.init
= &(const struct clk_init_data
) {
2242 .name
= "cam_cc_ife_2_clk",
2243 .parent_hws
= (const struct clk_hw
*[]) {
2244 &cam_cc_ife_2_clk_src
.clkr
.hw
,
2247 .flags
= CLK_SET_RATE_PARENT
,
2248 .ops
= &clk_branch2_ops
,
2253 static struct clk_branch cam_cc_ife_2_dsp_clk
= {
2254 .halt_reg
= 0x12088,
2255 .halt_check
= BRANCH_HALT
,
2257 .enable_reg
= 0x12088,
2258 .enable_mask
= BIT(0),
2259 .hw
.init
= &(const struct clk_init_data
) {
2260 .name
= "cam_cc_ife_2_dsp_clk",
2261 .parent_hws
= (const struct clk_hw
*[]) {
2262 &cam_cc_ife_2_clk_src
.clkr
.hw
,
2265 .flags
= CLK_SET_RATE_PARENT
,
2266 .ops
= &clk_branch2_ops
,
2271 static struct clk_branch cam_cc_ife_2_fast_ahb_clk
= {
2272 .halt_reg
= 0x12094,
2273 .halt_check
= BRANCH_HALT
,
2275 .enable_reg
= 0x12094,
2276 .enable_mask
= BIT(0),
2277 .hw
.init
= &(const struct clk_init_data
) {
2278 .name
= "cam_cc_ife_2_fast_ahb_clk",
2279 .parent_hws
= (const struct clk_hw
*[]) {
2280 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2283 .flags
= CLK_SET_RATE_PARENT
,
2284 .ops
= &clk_branch2_ops
,
2289 static struct clk_branch cam_cc_ife_lite_ahb_clk
= {
2290 .halt_reg
= 0x13048,
2291 .halt_check
= BRANCH_HALT
,
2293 .enable_reg
= 0x13048,
2294 .enable_mask
= BIT(0),
2295 .hw
.init
= &(const struct clk_init_data
) {
2296 .name
= "cam_cc_ife_lite_ahb_clk",
2297 .parent_hws
= (const struct clk_hw
*[]) {
2298 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
2301 .flags
= CLK_SET_RATE_PARENT
,
2302 .ops
= &clk_branch2_ops
,
2307 static struct clk_branch cam_cc_ife_lite_clk
= {
2308 .halt_reg
= 0x13018,
2309 .halt_check
= BRANCH_HALT
,
2311 .enable_reg
= 0x13018,
2312 .enable_mask
= BIT(0),
2313 .hw
.init
= &(const struct clk_init_data
) {
2314 .name
= "cam_cc_ife_lite_clk",
2315 .parent_hws
= (const struct clk_hw
*[]) {
2316 &cam_cc_ife_lite_clk_src
.clkr
.hw
,
2319 .flags
= CLK_SET_RATE_PARENT
,
2320 .ops
= &clk_branch2_ops
,
2325 static struct clk_branch cam_cc_ife_lite_cphy_rx_clk
= {
2326 .halt_reg
= 0x13044,
2327 .halt_check
= BRANCH_HALT
,
2329 .enable_reg
= 0x13044,
2330 .enable_mask
= BIT(0),
2331 .hw
.init
= &(const struct clk_init_data
) {
2332 .name
= "cam_cc_ife_lite_cphy_rx_clk",
2333 .parent_hws
= (const struct clk_hw
*[]) {
2334 &cam_cc_cphy_rx_clk_src
.clkr
.hw
,
2337 .flags
= CLK_SET_RATE_PARENT
,
2338 .ops
= &clk_branch2_ops
,
2343 static struct clk_branch cam_cc_ife_lite_csid_clk
= {
2344 .halt_reg
= 0x1303c,
2345 .halt_check
= BRANCH_HALT
,
2347 .enable_reg
= 0x1303c,
2348 .enable_mask
= BIT(0),
2349 .hw
.init
= &(const struct clk_init_data
) {
2350 .name
= "cam_cc_ife_lite_csid_clk",
2351 .parent_hws
= (const struct clk_hw
*[]) {
2352 &cam_cc_ife_lite_csid_clk_src
.clkr
.hw
,
2355 .flags
= CLK_SET_RATE_PARENT
,
2356 .ops
= &clk_branch2_ops
,
2361 static struct clk_branch cam_cc_ipe_nps_ahb_clk
= {
2362 .halt_reg
= 0x100c0,
2363 .halt_check
= BRANCH_HALT
,
2365 .enable_reg
= 0x100c0,
2366 .enable_mask
= BIT(0),
2367 .hw
.init
= &(const struct clk_init_data
) {
2368 .name
= "cam_cc_ipe_nps_ahb_clk",
2369 .parent_hws
= (const struct clk_hw
*[]) {
2370 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
2373 .flags
= CLK_SET_RATE_PARENT
,
2374 .ops
= &clk_branch2_ops
,
2379 static struct clk_branch cam_cc_ipe_nps_clk
= {
2380 .halt_reg
= 0x100a4,
2381 .halt_check
= BRANCH_HALT
,
2383 .enable_reg
= 0x100a4,
2384 .enable_mask
= BIT(0),
2385 .hw
.init
= &(const struct clk_init_data
) {
2386 .name
= "cam_cc_ipe_nps_clk",
2387 .parent_hws
= (const struct clk_hw
*[]) {
2388 &cam_cc_ipe_nps_clk_src
.clkr
.hw
,
2391 .flags
= CLK_SET_RATE_PARENT
,
2392 .ops
= &clk_branch2_ops
,
2397 static struct clk_branch cam_cc_ipe_nps_fast_ahb_clk
= {
2398 .halt_reg
= 0x100c4,
2399 .halt_check
= BRANCH_HALT
,
2401 .enable_reg
= 0x100c4,
2402 .enable_mask
= BIT(0),
2403 .hw
.init
= &(const struct clk_init_data
) {
2404 .name
= "cam_cc_ipe_nps_fast_ahb_clk",
2405 .parent_hws
= (const struct clk_hw
*[]) {
2406 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2409 .flags
= CLK_SET_RATE_PARENT
,
2410 .ops
= &clk_branch2_ops
,
2415 static struct clk_branch cam_cc_ipe_pps_clk
= {
2416 .halt_reg
= 0x100b0,
2417 .halt_check
= BRANCH_HALT
,
2419 .enable_reg
= 0x100b0,
2420 .enable_mask
= BIT(0),
2421 .hw
.init
= &(const struct clk_init_data
) {
2422 .name
= "cam_cc_ipe_pps_clk",
2423 .parent_hws
= (const struct clk_hw
*[]) {
2424 &cam_cc_ipe_nps_clk_src
.clkr
.hw
,
2427 .flags
= CLK_SET_RATE_PARENT
,
2428 .ops
= &clk_branch2_ops
,
2433 static struct clk_branch cam_cc_ipe_pps_fast_ahb_clk
= {
2434 .halt_reg
= 0x100c8,
2435 .halt_check
= BRANCH_HALT
,
2437 .enable_reg
= 0x100c8,
2438 .enable_mask
= BIT(0),
2439 .hw
.init
= &(const struct clk_init_data
) {
2440 .name
= "cam_cc_ipe_pps_fast_ahb_clk",
2441 .parent_hws
= (const struct clk_hw
*[]) {
2442 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2445 .flags
= CLK_SET_RATE_PARENT
,
2446 .ops
= &clk_branch2_ops
,
2451 static struct clk_branch cam_cc_jpeg_clk
= {
2452 .halt_reg
= 0x130f4,
2453 .halt_check
= BRANCH_HALT
,
2455 .enable_reg
= 0x130f4,
2456 .enable_mask
= BIT(0),
2457 .hw
.init
= &(const struct clk_init_data
) {
2458 .name
= "cam_cc_jpeg_clk",
2459 .parent_hws
= (const struct clk_hw
*[]) {
2460 &cam_cc_jpeg_clk_src
.clkr
.hw
,
2463 .flags
= CLK_SET_RATE_PARENT
,
2464 .ops
= &clk_branch2_ops
,
2469 static struct clk_branch cam_cc_mclk0_clk
= {
2470 .halt_reg
= 0x15018,
2471 .halt_check
= BRANCH_HALT
,
2473 .enable_reg
= 0x15018,
2474 .enable_mask
= BIT(0),
2475 .hw
.init
= &(const struct clk_init_data
) {
2476 .name
= "cam_cc_mclk0_clk",
2477 .parent_hws
= (const struct clk_hw
*[]) {
2478 &cam_cc_mclk0_clk_src
.clkr
.hw
,
2481 .flags
= CLK_SET_RATE_PARENT
,
2482 .ops
= &clk_branch2_ops
,
2487 static struct clk_branch cam_cc_mclk1_clk
= {
2488 .halt_reg
= 0x15034,
2489 .halt_check
= BRANCH_HALT
,
2491 .enable_reg
= 0x15034,
2492 .enable_mask
= BIT(0),
2493 .hw
.init
= &(const struct clk_init_data
) {
2494 .name
= "cam_cc_mclk1_clk",
2495 .parent_hws
= (const struct clk_hw
*[]) {
2496 &cam_cc_mclk1_clk_src
.clkr
.hw
,
2499 .flags
= CLK_SET_RATE_PARENT
,
2500 .ops
= &clk_branch2_ops
,
2505 static struct clk_branch cam_cc_mclk2_clk
= {
2506 .halt_reg
= 0x15050,
2507 .halt_check
= BRANCH_HALT
,
2509 .enable_reg
= 0x15050,
2510 .enable_mask
= BIT(0),
2511 .hw
.init
= &(const struct clk_init_data
) {
2512 .name
= "cam_cc_mclk2_clk",
2513 .parent_hws
= (const struct clk_hw
*[]) {
2514 &cam_cc_mclk2_clk_src
.clkr
.hw
,
2517 .flags
= CLK_SET_RATE_PARENT
,
2518 .ops
= &clk_branch2_ops
,
2523 static struct clk_branch cam_cc_mclk3_clk
= {
2524 .halt_reg
= 0x1506c,
2525 .halt_check
= BRANCH_HALT
,
2527 .enable_reg
= 0x1506c,
2528 .enable_mask
= BIT(0),
2529 .hw
.init
= &(const struct clk_init_data
) {
2530 .name
= "cam_cc_mclk3_clk",
2531 .parent_hws
= (const struct clk_hw
*[]) {
2532 &cam_cc_mclk3_clk_src
.clkr
.hw
,
2535 .flags
= CLK_SET_RATE_PARENT
,
2536 .ops
= &clk_branch2_ops
,
2541 static struct clk_branch cam_cc_mclk4_clk
= {
2542 .halt_reg
= 0x15088,
2543 .halt_check
= BRANCH_HALT
,
2545 .enable_reg
= 0x15088,
2546 .enable_mask
= BIT(0),
2547 .hw
.init
= &(const struct clk_init_data
) {
2548 .name
= "cam_cc_mclk4_clk",
2549 .parent_hws
= (const struct clk_hw
*[]) {
2550 &cam_cc_mclk4_clk_src
.clkr
.hw
,
2553 .flags
= CLK_SET_RATE_PARENT
,
2554 .ops
= &clk_branch2_ops
,
2559 static struct clk_branch cam_cc_mclk5_clk
= {
2560 .halt_reg
= 0x150a4,
2561 .halt_check
= BRANCH_HALT
,
2563 .enable_reg
= 0x150a4,
2564 .enable_mask
= BIT(0),
2565 .hw
.init
= &(const struct clk_init_data
) {
2566 .name
= "cam_cc_mclk5_clk",
2567 .parent_hws
= (const struct clk_hw
*[]) {
2568 &cam_cc_mclk5_clk_src
.clkr
.hw
,
2571 .flags
= CLK_SET_RATE_PARENT
,
2572 .ops
= &clk_branch2_ops
,
2577 static struct clk_branch cam_cc_mclk6_clk
= {
2578 .halt_reg
= 0x150c0,
2579 .halt_check
= BRANCH_HALT
,
2581 .enable_reg
= 0x150c0,
2582 .enable_mask
= BIT(0),
2583 .hw
.init
= &(const struct clk_init_data
) {
2584 .name
= "cam_cc_mclk6_clk",
2585 .parent_hws
= (const struct clk_hw
*[]) {
2586 &cam_cc_mclk6_clk_src
.clkr
.hw
,
2589 .flags
= CLK_SET_RATE_PARENT
,
2590 .ops
= &clk_branch2_ops
,
2595 static struct clk_branch cam_cc_mclk7_clk
= {
2596 .halt_reg
= 0x150dc,
2597 .halt_check
= BRANCH_HALT
,
2599 .enable_reg
= 0x150dc,
2600 .enable_mask
= BIT(0),
2601 .hw
.init
= &(const struct clk_init_data
) {
2602 .name
= "cam_cc_mclk7_clk",
2603 .parent_hws
= (const struct clk_hw
*[]) {
2604 &cam_cc_mclk7_clk_src
.clkr
.hw
,
2607 .flags
= CLK_SET_RATE_PARENT
,
2608 .ops
= &clk_branch2_ops
,
2613 static struct clk_branch cam_cc_qdss_debug_clk
= {
2614 .halt_reg
= 0x131d4,
2615 .halt_check
= BRANCH_HALT
,
2617 .enable_reg
= 0x131d4,
2618 .enable_mask
= BIT(0),
2619 .hw
.init
= &(const struct clk_init_data
) {
2620 .name
= "cam_cc_qdss_debug_clk",
2621 .parent_hws
= (const struct clk_hw
*[]) {
2622 &cam_cc_qdss_debug_clk_src
.clkr
.hw
,
2625 .flags
= CLK_SET_RATE_PARENT
,
2626 .ops
= &clk_branch2_ops
,
2631 static struct clk_branch cam_cc_qdss_debug_xo_clk
= {
2632 .halt_reg
= 0x131d8,
2633 .halt_check
= BRANCH_HALT
,
2635 .enable_reg
= 0x131d8,
2636 .enable_mask
= BIT(0),
2637 .hw
.init
= &(const struct clk_init_data
) {
2638 .name
= "cam_cc_qdss_debug_xo_clk",
2639 .parent_hws
= (const struct clk_hw
*[]) {
2640 &cam_cc_xo_clk_src
.clkr
.hw
,
2643 .flags
= CLK_SET_RATE_PARENT
,
2644 .ops
= &clk_branch2_ops
,
2649 static struct clk_branch cam_cc_sbi_ahb_clk
= {
2650 .halt_reg
= 0x100f0,
2651 .halt_check
= BRANCH_HALT
,
2653 .enable_reg
= 0x100f0,
2654 .enable_mask
= BIT(0),
2655 .hw
.init
= &(const struct clk_init_data
) {
2656 .name
= "cam_cc_sbi_ahb_clk",
2657 .parent_hws
= (const struct clk_hw
*[]) {
2658 &cam_cc_slow_ahb_clk_src
.clkr
.hw
,
2661 .flags
= CLK_SET_RATE_PARENT
,
2662 .ops
= &clk_branch2_ops
,
2667 static struct clk_branch cam_cc_sbi_clk
= {
2668 .halt_reg
= 0x100e4,
2669 .halt_check
= BRANCH_HALT
,
2671 .enable_reg
= 0x100e4,
2672 .enable_mask
= BIT(0),
2673 .hw
.init
= &(const struct clk_init_data
) {
2674 .name
= "cam_cc_sbi_clk",
2675 .parent_hws
= (const struct clk_hw
*[]) {
2676 &cam_cc_ife_0_clk_src
.clkr
.hw
,
2679 .flags
= CLK_SET_RATE_PARENT
,
2680 .ops
= &clk_branch2_ops
,
2685 static struct clk_branch cam_cc_sfe_0_clk
= {
2686 .halt_reg
= 0x1307c,
2687 .halt_check
= BRANCH_HALT
,
2689 .enable_reg
= 0x1307c,
2690 .enable_mask
= BIT(0),
2691 .hw
.init
= &(const struct clk_init_data
) {
2692 .name
= "cam_cc_sfe_0_clk",
2693 .parent_hws
= (const struct clk_hw
*[]) {
2694 &cam_cc_sfe_0_clk_src
.clkr
.hw
,
2697 .flags
= CLK_SET_RATE_PARENT
,
2698 .ops
= &clk_branch2_ops
,
2703 static struct clk_branch cam_cc_sfe_0_fast_ahb_clk
= {
2704 .halt_reg
= 0x13090,
2705 .halt_check
= BRANCH_HALT
,
2707 .enable_reg
= 0x13090,
2708 .enable_mask
= BIT(0),
2709 .hw
.init
= &(const struct clk_init_data
) {
2710 .name
= "cam_cc_sfe_0_fast_ahb_clk",
2711 .parent_hws
= (const struct clk_hw
*[]) {
2712 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2715 .flags
= CLK_SET_RATE_PARENT
,
2716 .ops
= &clk_branch2_ops
,
2721 static struct clk_branch cam_cc_sfe_1_clk
= {
2722 .halt_reg
= 0x130c4,
2723 .halt_check
= BRANCH_HALT
,
2725 .enable_reg
= 0x130c4,
2726 .enable_mask
= BIT(0),
2727 .hw
.init
= &(const struct clk_init_data
) {
2728 .name
= "cam_cc_sfe_1_clk",
2729 .parent_hws
= (const struct clk_hw
*[]) {
2730 &cam_cc_sfe_1_clk_src
.clkr
.hw
,
2733 .flags
= CLK_SET_RATE_PARENT
,
2734 .ops
= &clk_branch2_ops
,
2739 static struct clk_branch cam_cc_sfe_1_fast_ahb_clk
= {
2740 .halt_reg
= 0x130d8,
2741 .halt_check
= BRANCH_HALT
,
2743 .enable_reg
= 0x130d8,
2744 .enable_mask
= BIT(0),
2745 .hw
.init
= &(const struct clk_init_data
) {
2746 .name
= "cam_cc_sfe_1_fast_ahb_clk",
2747 .parent_hws
= (const struct clk_hw
*[]) {
2748 &cam_cc_fast_ahb_clk_src
.clkr
.hw
,
2751 .flags
= CLK_SET_RATE_PARENT
,
2752 .ops
= &clk_branch2_ops
,
2757 static struct clk_branch cam_cc_sleep_clk
= {
2758 .halt_reg
= 0x13228,
2759 .halt_check
= BRANCH_HALT
,
2761 .enable_reg
= 0x13228,
2762 .enable_mask
= BIT(0),
2763 .hw
.init
= &(const struct clk_init_data
) {
2764 .name
= "cam_cc_sleep_clk",
2765 .parent_hws
= (const struct clk_hw
*[]) {
2766 &cam_cc_sleep_clk_src
.clkr
.hw
,
2769 .flags
= CLK_SET_RATE_PARENT
,
2770 .ops
= &clk_branch2_ops
,
2775 static struct clk_regmap
*cam_cc_sm8450_clocks
[] = {
2776 [CAM_CC_BPS_AHB_CLK
] = &cam_cc_bps_ahb_clk
.clkr
,
2777 [CAM_CC_BPS_CLK
] = &cam_cc_bps_clk
.clkr
,
2778 [CAM_CC_BPS_CLK_SRC
] = &cam_cc_bps_clk_src
.clkr
,
2779 [CAM_CC_BPS_FAST_AHB_CLK
] = &cam_cc_bps_fast_ahb_clk
.clkr
,
2780 [CAM_CC_CAMNOC_AXI_CLK
] = &cam_cc_camnoc_axi_clk
.clkr
,
2781 [CAM_CC_CAMNOC_AXI_CLK_SRC
] = &cam_cc_camnoc_axi_clk_src
.clkr
,
2782 [CAM_CC_CAMNOC_DCD_XO_CLK
] = &cam_cc_camnoc_dcd_xo_clk
.clkr
,
2783 [CAM_CC_CCI_0_CLK
] = &cam_cc_cci_0_clk
.clkr
,
2784 [CAM_CC_CCI_0_CLK_SRC
] = &cam_cc_cci_0_clk_src
.clkr
,
2785 [CAM_CC_CCI_1_CLK
] = &cam_cc_cci_1_clk
.clkr
,
2786 [CAM_CC_CCI_1_CLK_SRC
] = &cam_cc_cci_1_clk_src
.clkr
,
2787 [CAM_CC_CORE_AHB_CLK
] = &cam_cc_core_ahb_clk
.clkr
,
2788 [CAM_CC_CPAS_AHB_CLK
] = &cam_cc_cpas_ahb_clk
.clkr
,
2789 [CAM_CC_CPAS_BPS_CLK
] = &cam_cc_cpas_bps_clk
.clkr
,
2790 [CAM_CC_CPAS_FAST_AHB_CLK
] = &cam_cc_cpas_fast_ahb_clk
.clkr
,
2791 [CAM_CC_CPAS_IFE_0_CLK
] = &cam_cc_cpas_ife_0_clk
.clkr
,
2792 [CAM_CC_CPAS_IFE_1_CLK
] = &cam_cc_cpas_ife_1_clk
.clkr
,
2793 [CAM_CC_CPAS_IFE_2_CLK
] = &cam_cc_cpas_ife_2_clk
.clkr
,
2794 [CAM_CC_CPAS_IFE_LITE_CLK
] = &cam_cc_cpas_ife_lite_clk
.clkr
,
2795 [CAM_CC_CPAS_IPE_NPS_CLK
] = &cam_cc_cpas_ipe_nps_clk
.clkr
,
2796 [CAM_CC_CPAS_SBI_CLK
] = &cam_cc_cpas_sbi_clk
.clkr
,
2797 [CAM_CC_CPAS_SFE_0_CLK
] = &cam_cc_cpas_sfe_0_clk
.clkr
,
2798 [CAM_CC_CPAS_SFE_1_CLK
] = &cam_cc_cpas_sfe_1_clk
.clkr
,
2799 [CAM_CC_CPHY_RX_CLK_SRC
] = &cam_cc_cphy_rx_clk_src
.clkr
,
2800 [CAM_CC_CSI0PHYTIMER_CLK
] = &cam_cc_csi0phytimer_clk
.clkr
,
2801 [CAM_CC_CSI0PHYTIMER_CLK_SRC
] = &cam_cc_csi0phytimer_clk_src
.clkr
,
2802 [CAM_CC_CSI1PHYTIMER_CLK
] = &cam_cc_csi1phytimer_clk
.clkr
,
2803 [CAM_CC_CSI1PHYTIMER_CLK_SRC
] = &cam_cc_csi1phytimer_clk_src
.clkr
,
2804 [CAM_CC_CSI2PHYTIMER_CLK
] = &cam_cc_csi2phytimer_clk
.clkr
,
2805 [CAM_CC_CSI2PHYTIMER_CLK_SRC
] = &cam_cc_csi2phytimer_clk_src
.clkr
,
2806 [CAM_CC_CSI3PHYTIMER_CLK
] = &cam_cc_csi3phytimer_clk
.clkr
,
2807 [CAM_CC_CSI3PHYTIMER_CLK_SRC
] = &cam_cc_csi3phytimer_clk_src
.clkr
,
2808 [CAM_CC_CSI4PHYTIMER_CLK
] = &cam_cc_csi4phytimer_clk
.clkr
,
2809 [CAM_CC_CSI4PHYTIMER_CLK_SRC
] = &cam_cc_csi4phytimer_clk_src
.clkr
,
2810 [CAM_CC_CSI5PHYTIMER_CLK
] = &cam_cc_csi5phytimer_clk
.clkr
,
2811 [CAM_CC_CSI5PHYTIMER_CLK_SRC
] = &cam_cc_csi5phytimer_clk_src
.clkr
,
2812 [CAM_CC_CSID_CLK
] = &cam_cc_csid_clk
.clkr
,
2813 [CAM_CC_CSID_CLK_SRC
] = &cam_cc_csid_clk_src
.clkr
,
2814 [CAM_CC_CSID_CSIPHY_RX_CLK
] = &cam_cc_csid_csiphy_rx_clk
.clkr
,
2815 [CAM_CC_CSIPHY0_CLK
] = &cam_cc_csiphy0_clk
.clkr
,
2816 [CAM_CC_CSIPHY1_CLK
] = &cam_cc_csiphy1_clk
.clkr
,
2817 [CAM_CC_CSIPHY2_CLK
] = &cam_cc_csiphy2_clk
.clkr
,
2818 [CAM_CC_CSIPHY3_CLK
] = &cam_cc_csiphy3_clk
.clkr
,
2819 [CAM_CC_CSIPHY4_CLK
] = &cam_cc_csiphy4_clk
.clkr
,
2820 [CAM_CC_CSIPHY5_CLK
] = &cam_cc_csiphy5_clk
.clkr
,
2821 [CAM_CC_FAST_AHB_CLK_SRC
] = &cam_cc_fast_ahb_clk_src
.clkr
,
2822 [CAM_CC_GDSC_CLK
] = &cam_cc_gdsc_clk
.clkr
,
2823 [CAM_CC_ICP_AHB_CLK
] = &cam_cc_icp_ahb_clk
.clkr
,
2824 [CAM_CC_ICP_CLK
] = &cam_cc_icp_clk
.clkr
,
2825 [CAM_CC_ICP_CLK_SRC
] = &cam_cc_icp_clk_src
.clkr
,
2826 [CAM_CC_IFE_0_CLK
] = &cam_cc_ife_0_clk
.clkr
,
2827 [CAM_CC_IFE_0_CLK_SRC
] = &cam_cc_ife_0_clk_src
.clkr
,
2828 [CAM_CC_IFE_0_DSP_CLK
] = &cam_cc_ife_0_dsp_clk
.clkr
,
2829 [CAM_CC_IFE_0_FAST_AHB_CLK
] = &cam_cc_ife_0_fast_ahb_clk
.clkr
,
2830 [CAM_CC_IFE_1_CLK
] = &cam_cc_ife_1_clk
.clkr
,
2831 [CAM_CC_IFE_1_CLK_SRC
] = &cam_cc_ife_1_clk_src
.clkr
,
2832 [CAM_CC_IFE_1_DSP_CLK
] = &cam_cc_ife_1_dsp_clk
.clkr
,
2833 [CAM_CC_IFE_1_FAST_AHB_CLK
] = &cam_cc_ife_1_fast_ahb_clk
.clkr
,
2834 [CAM_CC_IFE_2_CLK
] = &cam_cc_ife_2_clk
.clkr
,
2835 [CAM_CC_IFE_2_CLK_SRC
] = &cam_cc_ife_2_clk_src
.clkr
,
2836 [CAM_CC_IFE_2_DSP_CLK
] = &cam_cc_ife_2_dsp_clk
.clkr
,
2837 [CAM_CC_IFE_2_FAST_AHB_CLK
] = &cam_cc_ife_2_fast_ahb_clk
.clkr
,
2838 [CAM_CC_IFE_LITE_AHB_CLK
] = &cam_cc_ife_lite_ahb_clk
.clkr
,
2839 [CAM_CC_IFE_LITE_CLK
] = &cam_cc_ife_lite_clk
.clkr
,
2840 [CAM_CC_IFE_LITE_CLK_SRC
] = &cam_cc_ife_lite_clk_src
.clkr
,
2841 [CAM_CC_IFE_LITE_CPHY_RX_CLK
] = &cam_cc_ife_lite_cphy_rx_clk
.clkr
,
2842 [CAM_CC_IFE_LITE_CSID_CLK
] = &cam_cc_ife_lite_csid_clk
.clkr
,
2843 [CAM_CC_IFE_LITE_CSID_CLK_SRC
] = &cam_cc_ife_lite_csid_clk_src
.clkr
,
2844 [CAM_CC_IPE_NPS_AHB_CLK
] = &cam_cc_ipe_nps_ahb_clk
.clkr
,
2845 [CAM_CC_IPE_NPS_CLK
] = &cam_cc_ipe_nps_clk
.clkr
,
2846 [CAM_CC_IPE_NPS_CLK_SRC
] = &cam_cc_ipe_nps_clk_src
.clkr
,
2847 [CAM_CC_IPE_NPS_FAST_AHB_CLK
] = &cam_cc_ipe_nps_fast_ahb_clk
.clkr
,
2848 [CAM_CC_IPE_PPS_CLK
] = &cam_cc_ipe_pps_clk
.clkr
,
2849 [CAM_CC_IPE_PPS_FAST_AHB_CLK
] = &cam_cc_ipe_pps_fast_ahb_clk
.clkr
,
2850 [CAM_CC_JPEG_CLK
] = &cam_cc_jpeg_clk
.clkr
,
2851 [CAM_CC_JPEG_CLK_SRC
] = &cam_cc_jpeg_clk_src
.clkr
,
2852 [CAM_CC_MCLK0_CLK
] = &cam_cc_mclk0_clk
.clkr
,
2853 [CAM_CC_MCLK0_CLK_SRC
] = &cam_cc_mclk0_clk_src
.clkr
,
2854 [CAM_CC_MCLK1_CLK
] = &cam_cc_mclk1_clk
.clkr
,
2855 [CAM_CC_MCLK1_CLK_SRC
] = &cam_cc_mclk1_clk_src
.clkr
,
2856 [CAM_CC_MCLK2_CLK
] = &cam_cc_mclk2_clk
.clkr
,
2857 [CAM_CC_MCLK2_CLK_SRC
] = &cam_cc_mclk2_clk_src
.clkr
,
2858 [CAM_CC_MCLK3_CLK
] = &cam_cc_mclk3_clk
.clkr
,
2859 [CAM_CC_MCLK3_CLK_SRC
] = &cam_cc_mclk3_clk_src
.clkr
,
2860 [CAM_CC_MCLK4_CLK
] = &cam_cc_mclk4_clk
.clkr
,
2861 [CAM_CC_MCLK4_CLK_SRC
] = &cam_cc_mclk4_clk_src
.clkr
,
2862 [CAM_CC_MCLK5_CLK
] = &cam_cc_mclk5_clk
.clkr
,
2863 [CAM_CC_MCLK5_CLK_SRC
] = &cam_cc_mclk5_clk_src
.clkr
,
2864 [CAM_CC_MCLK6_CLK
] = &cam_cc_mclk6_clk
.clkr
,
2865 [CAM_CC_MCLK6_CLK_SRC
] = &cam_cc_mclk6_clk_src
.clkr
,
2866 [CAM_CC_MCLK7_CLK
] = &cam_cc_mclk7_clk
.clkr
,
2867 [CAM_CC_MCLK7_CLK_SRC
] = &cam_cc_mclk7_clk_src
.clkr
,
2868 [CAM_CC_PLL0
] = &cam_cc_pll0
.clkr
,
2869 [CAM_CC_PLL0_OUT_EVEN
] = &cam_cc_pll0_out_even
.clkr
,
2870 [CAM_CC_PLL0_OUT_ODD
] = &cam_cc_pll0_out_odd
.clkr
,
2871 [CAM_CC_PLL1
] = &cam_cc_pll1
.clkr
,
2872 [CAM_CC_PLL1_OUT_EVEN
] = &cam_cc_pll1_out_even
.clkr
,
2873 [CAM_CC_PLL2
] = &cam_cc_pll2
.clkr
,
2874 [CAM_CC_PLL3
] = &cam_cc_pll3
.clkr
,
2875 [CAM_CC_PLL3_OUT_EVEN
] = &cam_cc_pll3_out_even
.clkr
,
2876 [CAM_CC_PLL4
] = &cam_cc_pll4
.clkr
,
2877 [CAM_CC_PLL4_OUT_EVEN
] = &cam_cc_pll4_out_even
.clkr
,
2878 [CAM_CC_PLL5
] = &cam_cc_pll5
.clkr
,
2879 [CAM_CC_PLL5_OUT_EVEN
] = &cam_cc_pll5_out_even
.clkr
,
2880 [CAM_CC_PLL6
] = &cam_cc_pll6
.clkr
,
2881 [CAM_CC_PLL6_OUT_EVEN
] = &cam_cc_pll6_out_even
.clkr
,
2882 [CAM_CC_PLL7
] = &cam_cc_pll7
.clkr
,
2883 [CAM_CC_PLL7_OUT_EVEN
] = &cam_cc_pll7_out_even
.clkr
,
2884 [CAM_CC_PLL8
] = &cam_cc_pll8
.clkr
,
2885 [CAM_CC_PLL8_OUT_EVEN
] = &cam_cc_pll8_out_even
.clkr
,
2886 [CAM_CC_QDSS_DEBUG_CLK
] = &cam_cc_qdss_debug_clk
.clkr
,
2887 [CAM_CC_QDSS_DEBUG_CLK_SRC
] = &cam_cc_qdss_debug_clk_src
.clkr
,
2888 [CAM_CC_QDSS_DEBUG_XO_CLK
] = &cam_cc_qdss_debug_xo_clk
.clkr
,
2889 [CAM_CC_SBI_AHB_CLK
] = &cam_cc_sbi_ahb_clk
.clkr
,
2890 [CAM_CC_SBI_CLK
] = &cam_cc_sbi_clk
.clkr
,
2891 [CAM_CC_SFE_0_CLK
] = &cam_cc_sfe_0_clk
.clkr
,
2892 [CAM_CC_SFE_0_CLK_SRC
] = &cam_cc_sfe_0_clk_src
.clkr
,
2893 [CAM_CC_SFE_0_FAST_AHB_CLK
] = &cam_cc_sfe_0_fast_ahb_clk
.clkr
,
2894 [CAM_CC_SFE_1_CLK
] = &cam_cc_sfe_1_clk
.clkr
,
2895 [CAM_CC_SFE_1_CLK_SRC
] = &cam_cc_sfe_1_clk_src
.clkr
,
2896 [CAM_CC_SFE_1_FAST_AHB_CLK
] = &cam_cc_sfe_1_fast_ahb_clk
.clkr
,
2897 [CAM_CC_SLEEP_CLK
] = &cam_cc_sleep_clk
.clkr
,
2898 [CAM_CC_SLEEP_CLK_SRC
] = &cam_cc_sleep_clk_src
.clkr
,
2899 [CAM_CC_SLOW_AHB_CLK_SRC
] = &cam_cc_slow_ahb_clk_src
.clkr
,
2900 [CAM_CC_XO_CLK_SRC
] = &cam_cc_xo_clk_src
.clkr
,
2903 static const struct qcom_reset_map cam_cc_sm8450_resets
[] = {
2904 [CAM_CC_BPS_BCR
] = { 0x10000 },
2905 [CAM_CC_ICP_BCR
] = { 0x13104 },
2906 [CAM_CC_IFE_0_BCR
] = { 0x11000 },
2907 [CAM_CC_IFE_1_BCR
] = { 0x12000 },
2908 [CAM_CC_IFE_2_BCR
] = { 0x1204c },
2909 [CAM_CC_IPE_0_BCR
] = { 0x10074 },
2910 [CAM_CC_QDSS_DEBUG_BCR
] = { 0x131b8 },
2911 [CAM_CC_SBI_BCR
] = { 0x100cc },
2912 [CAM_CC_SFE_0_BCR
] = { 0x1304c },
2913 [CAM_CC_SFE_1_BCR
] = { 0x13094 },
2916 static const struct regmap_config cam_cc_sm8450_regmap_config
= {
2920 .max_register
= 0x1601c,
2924 static struct gdsc titan_top_gdsc
;
2926 static struct gdsc bps_gdsc
= {
2931 .flags
= HW_CTRL
| POLL_CFG_GDSCR
,
2932 .pwrsts
= PWRSTS_OFF_ON
,
2935 static struct gdsc ipe_0_gdsc
= {
2938 .name
= "ipe_0_gdsc",
2940 .flags
= HW_CTRL
| POLL_CFG_GDSCR
,
2941 .pwrsts
= PWRSTS_OFF_ON
,
2944 static struct gdsc sbi_gdsc
= {
2949 .flags
= POLL_CFG_GDSCR
,
2950 .pwrsts
= PWRSTS_OFF_ON
,
2953 static struct gdsc ife_0_gdsc
= {
2956 .name
= "ife_0_gdsc",
2958 .flags
= POLL_CFG_GDSCR
,
2959 .parent
= &titan_top_gdsc
.pd
,
2960 .pwrsts
= PWRSTS_OFF_ON
,
2963 static struct gdsc ife_1_gdsc
= {
2966 .name
= "ife_1_gdsc",
2968 .flags
= POLL_CFG_GDSCR
,
2969 .parent
= &titan_top_gdsc
.pd
,
2970 .pwrsts
= PWRSTS_OFF_ON
,
2973 static struct gdsc ife_2_gdsc
= {
2976 .name
= "ife_2_gdsc",
2978 .flags
= POLL_CFG_GDSCR
,
2979 .parent
= &titan_top_gdsc
.pd
,
2980 .pwrsts
= PWRSTS_OFF_ON
,
2983 static struct gdsc sfe_0_gdsc
= {
2986 .name
= "sfe_0_gdsc",
2988 .flags
= POLL_CFG_GDSCR
,
2989 .parent
= &titan_top_gdsc
.pd
,
2990 .pwrsts
= PWRSTS_OFF_ON
,
2993 static struct gdsc sfe_1_gdsc
= {
2996 .name
= "sfe_1_gdsc",
2998 .flags
= POLL_CFG_GDSCR
,
2999 .parent
= &titan_top_gdsc
.pd
,
3000 .pwrsts
= PWRSTS_OFF_ON
,
3003 static struct gdsc titan_top_gdsc
= {
3006 .name
= "titan_top_gdsc",
3008 .flags
= POLL_CFG_GDSCR
,
3009 .pwrsts
= PWRSTS_OFF_ON
,
3012 static struct gdsc
*cam_cc_sm8450_gdscs
[] = {
3013 [BPS_GDSC
] = &bps_gdsc
,
3014 [IPE_0_GDSC
] = &ipe_0_gdsc
,
3015 [SBI_GDSC
] = &sbi_gdsc
,
3016 [IFE_0_GDSC
] = &ife_0_gdsc
,
3017 [IFE_1_GDSC
] = &ife_1_gdsc
,
3018 [IFE_2_GDSC
] = &ife_2_gdsc
,
3019 [SFE_0_GDSC
] = &sfe_0_gdsc
,
3020 [SFE_1_GDSC
] = &sfe_1_gdsc
,
3021 [TITAN_TOP_GDSC
] = &titan_top_gdsc
,
3024 static const struct qcom_cc_desc cam_cc_sm8450_desc
= {
3025 .config
= &cam_cc_sm8450_regmap_config
,
3026 .clks
= cam_cc_sm8450_clocks
,
3027 .num_clks
= ARRAY_SIZE(cam_cc_sm8450_clocks
),
3028 .resets
= cam_cc_sm8450_resets
,
3029 .num_resets
= ARRAY_SIZE(cam_cc_sm8450_resets
),
3030 .gdscs
= cam_cc_sm8450_gdscs
,
3031 .num_gdscs
= ARRAY_SIZE(cam_cc_sm8450_gdscs
),
3034 static const struct of_device_id cam_cc_sm8450_match_table
[] = {
3035 { .compatible
= "qcom,sm8450-camcc" },
3036 { .compatible
= "qcom,sm8475-camcc" },
3039 MODULE_DEVICE_TABLE(of
, cam_cc_sm8450_match_table
);
3041 static int cam_cc_sm8450_probe(struct platform_device
*pdev
)
3043 struct regmap
*regmap
;
3045 regmap
= qcom_cc_map(pdev
, &cam_cc_sm8450_desc
);
3047 return PTR_ERR(regmap
);
3049 if (of_device_is_compatible(pdev
->dev
.of_node
, "qcom,sm8475-camcc")) {
3050 /* Update CAMCC PLL0 */
3051 cam_cc_pll0
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3052 cam_cc_pll0_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3053 cam_cc_pll0_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll0_out_even_init
;
3054 cam_cc_pll0_out_odd
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3055 cam_cc_pll0_out_odd
.clkr
.hw
.init
= &sm8475_cam_cc_pll0_out_odd_init
;
3057 /* Update CAMCC PLL1 */
3058 cam_cc_pll1
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3059 cam_cc_pll1_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3060 cam_cc_pll1_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll1_out_even_init
;
3062 /* Update CAMCC PLL2 */
3063 cam_cc_pll2
.vco_table
= rivian_ole_vco
;
3065 /* Update CAMCC PLL3 */
3066 cam_cc_pll3
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3067 cam_cc_pll3_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3068 cam_cc_pll3_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll3_out_even_init
;
3070 /* Update CAMCC PLL4 */
3071 cam_cc_pll4
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3072 cam_cc_pll4_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3073 cam_cc_pll4_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll4_out_even_init
;
3075 /* Update CAMCC PLL5 */
3076 cam_cc_pll5
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3077 cam_cc_pll5_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3078 cam_cc_pll5_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll5_out_even_init
;
3080 /* Update CAMCC PLL6 */
3081 cam_cc_pll6
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3082 cam_cc_pll6_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3083 cam_cc_pll6_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll6_out_even_init
;
3085 /* Update CAMCC PLL7 */
3086 cam_cc_pll7
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3087 cam_cc_pll7_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3088 cam_cc_pll7_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll7_out_even_init
;
3090 /* Update CAMCC PLL8 */
3091 cam_cc_pll8
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3092 cam_cc_pll8_out_even
.regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_LUCID_OLE
];
3093 cam_cc_pll8_out_even
.clkr
.hw
.init
= &sm8475_cam_cc_pll8_out_even_init
;
3095 clk_lucid_ole_pll_configure(&cam_cc_pll0
, regmap
, &sm8475_cam_cc_pll0_config
);
3096 clk_lucid_ole_pll_configure(&cam_cc_pll1
, regmap
, &sm8475_cam_cc_pll1_config
);
3097 clk_rivian_evo_pll_configure(&cam_cc_pll2
, regmap
, &sm8475_cam_cc_pll2_config
);
3098 clk_lucid_ole_pll_configure(&cam_cc_pll3
, regmap
, &sm8475_cam_cc_pll3_config
);
3099 clk_lucid_ole_pll_configure(&cam_cc_pll4
, regmap
, &sm8475_cam_cc_pll4_config
);
3100 clk_lucid_ole_pll_configure(&cam_cc_pll5
, regmap
, &sm8475_cam_cc_pll5_config
);
3101 clk_lucid_ole_pll_configure(&cam_cc_pll6
, regmap
, &sm8475_cam_cc_pll6_config
);
3102 clk_lucid_ole_pll_configure(&cam_cc_pll7
, regmap
, &sm8475_cam_cc_pll7_config
);
3103 clk_lucid_ole_pll_configure(&cam_cc_pll8
, regmap
, &sm8475_cam_cc_pll8_config
);
3105 clk_lucid_evo_pll_configure(&cam_cc_pll0
, regmap
, &cam_cc_pll0_config
);
3106 clk_lucid_evo_pll_configure(&cam_cc_pll1
, regmap
, &cam_cc_pll1_config
);
3107 clk_rivian_evo_pll_configure(&cam_cc_pll2
, regmap
, &cam_cc_pll2_config
);
3108 clk_lucid_evo_pll_configure(&cam_cc_pll3
, regmap
, &cam_cc_pll3_config
);
3109 clk_lucid_evo_pll_configure(&cam_cc_pll4
, regmap
, &cam_cc_pll4_config
);
3110 clk_lucid_evo_pll_configure(&cam_cc_pll5
, regmap
, &cam_cc_pll5_config
);
3111 clk_lucid_evo_pll_configure(&cam_cc_pll6
, regmap
, &cam_cc_pll6_config
);
3112 clk_lucid_evo_pll_configure(&cam_cc_pll7
, regmap
, &cam_cc_pll7_config
);
3113 clk_lucid_evo_pll_configure(&cam_cc_pll8
, regmap
, &cam_cc_pll8_config
);
3116 return qcom_cc_really_probe(&pdev
->dev
, &cam_cc_sm8450_desc
, regmap
);
3119 static struct platform_driver cam_cc_sm8450_driver
= {
3120 .probe
= cam_cc_sm8450_probe
,
3122 .name
= "camcc-sm8450",
3123 .of_match_table
= cam_cc_sm8450_match_table
,
3127 module_platform_driver(cam_cc_sm8450_driver
);
3129 MODULE_DESCRIPTION("QCOM CAMCC SM8450 / SM8475 Driver");
3130 MODULE_LICENSE("GPL");