1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
6 #include <linux/kernel.h>
7 #include <linux/bitops.h>
9 #include <linux/platform_device.h>
10 #include <linux/module.h>
12 #include <linux/clk-provider.h>
13 #include <linux/regmap.h>
14 #include <linux/reset-controller.h>
16 #include <dt-bindings/clock/qcom,mmcc-msm8998.h>
19 #include "clk-regmap.h"
20 #include "clk-regmap-divider.h"
21 #include "clk-alpha-pll.h"
23 #include "clk-branch.h"
48 static const struct clk_div_table post_div_table_fabia_even
[] = {
56 static struct clk_alpha_pll mmpll0
= {
58 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
61 .enable_mask
= BIT(0),
62 .hw
.init
= &(struct clk_init_data
){
64 .parent_data
= &(const struct clk_parent_data
){
68 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
73 static struct clk_alpha_pll_postdiv mmpll0_out_even
= {
76 .post_div_table
= post_div_table_fabia_even
,
77 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
79 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
80 .clkr
.hw
.init
= &(struct clk_init_data
){
81 .name
= "mmpll0_out_even",
82 .parent_hws
= (const struct clk_hw
*[]){ &mmpll0
.clkr
.hw
},
84 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
88 static struct clk_alpha_pll mmpll1
= {
90 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
93 .enable_mask
= BIT(1),
94 .hw
.init
= &(struct clk_init_data
){
96 .parent_data
= &(const struct clk_parent_data
){
100 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
105 static struct clk_alpha_pll_postdiv mmpll1_out_even
= {
108 .post_div_table
= post_div_table_fabia_even
,
109 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
111 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
112 .clkr
.hw
.init
= &(struct clk_init_data
){
113 .name
= "mmpll1_out_even",
114 .parent_hws
= (const struct clk_hw
*[]){ &mmpll1
.clkr
.hw
},
116 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
120 static struct clk_alpha_pll mmpll3
= {
122 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
123 .clkr
.hw
.init
= &(struct clk_init_data
){
125 .parent_data
= &(const struct clk_parent_data
){
129 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
133 static struct clk_alpha_pll_postdiv mmpll3_out_even
= {
136 .post_div_table
= post_div_table_fabia_even
,
137 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
139 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
140 .clkr
.hw
.init
= &(struct clk_init_data
){
141 .name
= "mmpll3_out_even",
142 .parent_hws
= (const struct clk_hw
*[]){ &mmpll3
.clkr
.hw
},
144 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
148 static struct clk_alpha_pll mmpll4
= {
150 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
151 .clkr
.hw
.init
= &(struct clk_init_data
){
153 .parent_data
= &(const struct clk_parent_data
){
157 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
161 static struct clk_alpha_pll_postdiv mmpll4_out_even
= {
164 .post_div_table
= post_div_table_fabia_even
,
165 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
167 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
168 .clkr
.hw
.init
= &(struct clk_init_data
){
169 .name
= "mmpll4_out_even",
170 .parent_hws
= (const struct clk_hw
*[]){ &mmpll4
.clkr
.hw
},
172 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
176 static struct clk_alpha_pll mmpll5
= {
178 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
179 .clkr
.hw
.init
= &(struct clk_init_data
){
181 .parent_data
= &(const struct clk_parent_data
){
185 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
189 static struct clk_alpha_pll_postdiv mmpll5_out_even
= {
192 .post_div_table
= post_div_table_fabia_even
,
193 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
195 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
196 .clkr
.hw
.init
= &(struct clk_init_data
){
197 .name
= "mmpll5_out_even",
198 .parent_hws
= (const struct clk_hw
*[]){ &mmpll5
.clkr
.hw
},
200 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
204 static struct clk_alpha_pll mmpll6
= {
206 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
207 .clkr
.hw
.init
= &(struct clk_init_data
){
209 .parent_data
= &(const struct clk_parent_data
){
213 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
217 static struct clk_alpha_pll_postdiv mmpll6_out_even
= {
220 .post_div_table
= post_div_table_fabia_even
,
221 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
223 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
224 .clkr
.hw
.init
= &(struct clk_init_data
){
225 .name
= "mmpll6_out_even",
226 .parent_hws
= (const struct clk_hw
*[]){ &mmpll6
.clkr
.hw
},
228 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
232 static struct clk_alpha_pll mmpll7
= {
234 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
235 .clkr
.hw
.init
= &(struct clk_init_data
){
237 .parent_data
= &(const struct clk_parent_data
){
241 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
245 static struct clk_alpha_pll_postdiv mmpll7_out_even
= {
248 .post_div_table
= post_div_table_fabia_even
,
249 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
251 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
252 .clkr
.hw
.init
= &(struct clk_init_data
){
253 .name
= "mmpll7_out_even",
254 .parent_hws
= (const struct clk_hw
*[]){ &mmpll7
.clkr
.hw
},
256 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
260 static struct clk_alpha_pll mmpll10
= {
262 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
263 .clkr
.hw
.init
= &(struct clk_init_data
){
265 .parent_data
= &(const struct clk_parent_data
){
269 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
273 static struct clk_alpha_pll_postdiv mmpll10_out_even
= {
276 .post_div_table
= post_div_table_fabia_even
,
277 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
279 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
280 .clkr
.hw
.init
= &(struct clk_init_data
){
281 .name
= "mmpll10_out_even",
282 .parent_hws
= (const struct clk_hw
*[]){ &mmpll10
.clkr
.hw
},
284 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
288 static const struct parent_map mmss_xo_hdmi_map
[] = {
293 static const struct clk_parent_data mmss_xo_hdmi
[] = {
295 { .fw_name
= "hdmipll" },
298 static const struct parent_map mmss_xo_dsi0pll_dsi1pll_map
[] = {
304 static const struct clk_parent_data mmss_xo_dsi0pll_dsi1pll
[] = {
306 { .fw_name
= "dsi0dsi" },
307 { .fw_name
= "dsi1dsi" },
310 static const struct parent_map mmss_xo_dsibyte_map
[] = {
312 { P_DSI0PLL_BYTE
, 1 },
313 { P_DSI1PLL_BYTE
, 2 },
316 static const struct clk_parent_data mmss_xo_dsibyte
[] = {
318 { .fw_name
= "dsi0byte" },
319 { .fw_name
= "dsi1byte" },
322 static const struct parent_map mmss_xo_dp_map
[] = {
328 static const struct clk_parent_data mmss_xo_dp
[] = {
330 { .fw_name
= "dplink" },
331 { .fw_name
= "dpvco" },
334 static const struct parent_map mmss_xo_gpll0_gpll0_div_map
[] = {
340 static const struct clk_parent_data mmss_xo_gpll0_gpll0_div
[] = {
342 { .fw_name
= "gpll0" },
343 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
346 static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map
[] = {
348 { P_MMPLL0_OUT_EVEN
, 1 },
353 static const struct clk_parent_data mmss_xo_mmpll0_gpll0_gpll0_div
[] = {
355 { .hw
= &mmpll0_out_even
.clkr
.hw
},
356 { .fw_name
= "gpll0" },
357 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
360 static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
[] = {
362 { P_MMPLL0_OUT_EVEN
, 1 },
363 { P_MMPLL1_OUT_EVEN
, 2 },
368 static const struct clk_parent_data mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
[] = {
370 { .hw
= &mmpll0_out_even
.clkr
.hw
},
371 { .hw
= &mmpll1_out_even
.clkr
.hw
},
372 { .fw_name
= "gpll0" },
373 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
376 static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map
[] = {
378 { P_MMPLL0_OUT_EVEN
, 1 },
379 { P_MMPLL5_OUT_EVEN
, 2 },
384 static const struct clk_parent_data mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
[] = {
386 { .hw
= &mmpll0_out_even
.clkr
.hw
},
387 { .hw
= &mmpll5_out_even
.clkr
.hw
},
388 { .fw_name
= "gpll0" },
389 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
392 static const struct parent_map mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map
[] = {
394 { P_MMPLL0_OUT_EVEN
, 1 },
395 { P_MMPLL3_OUT_EVEN
, 3 },
396 { P_MMPLL6_OUT_EVEN
, 4 },
401 static const struct clk_parent_data mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
[] = {
403 { .hw
= &mmpll0_out_even
.clkr
.hw
},
404 { .hw
= &mmpll3_out_even
.clkr
.hw
},
405 { .hw
= &mmpll6_out_even
.clkr
.hw
},
406 { .fw_name
= "gpll0" },
407 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
410 static const struct parent_map mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
[] = {
412 { P_MMPLL4_OUT_EVEN
, 1 },
413 { P_MMPLL7_OUT_EVEN
, 2 },
414 { P_MMPLL10_OUT_EVEN
, 3 },
419 static const struct clk_parent_data mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
[] = {
421 { .hw
= &mmpll4_out_even
.clkr
.hw
},
422 { .hw
= &mmpll7_out_even
.clkr
.hw
},
423 { .hw
= &mmpll10_out_even
.clkr
.hw
},
424 { .fw_name
= "gpll0" },
425 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
428 static const struct parent_map mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map
[] = {
430 { P_MMPLL0_OUT_EVEN
, 1 },
431 { P_MMPLL7_OUT_EVEN
, 2 },
432 { P_MMPLL10_OUT_EVEN
, 3 },
437 static const struct clk_parent_data mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div
[] = {
439 { .hw
= &mmpll0_out_even
.clkr
.hw
},
440 { .hw
= &mmpll7_out_even
.clkr
.hw
},
441 { .hw
= &mmpll10_out_even
.clkr
.hw
},
442 { .fw_name
= "gpll0" },
443 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
446 static const struct parent_map mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
[] = {
448 { P_MMPLL0_OUT_EVEN
, 1 },
449 { P_MMPLL4_OUT_EVEN
, 2 },
450 { P_MMPLL7_OUT_EVEN
, 3 },
451 { P_MMPLL10_OUT_EVEN
, 4 },
456 static const struct clk_parent_data mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
[] = {
458 { .hw
= &mmpll0_out_even
.clkr
.hw
},
459 { .hw
= &mmpll4_out_even
.clkr
.hw
},
460 { .hw
= &mmpll7_out_even
.clkr
.hw
},
461 { .hw
= &mmpll10_out_even
.clkr
.hw
},
462 { .fw_name
= "gpll0" },
463 { .fw_name
= "gpll0_div", .name
= "gcc_mmss_gpll0_div_clk" },
466 static struct clk_rcg2 byte0_clk_src
= {
469 .parent_map
= mmss_xo_dsibyte_map
,
470 .clkr
.hw
.init
= &(struct clk_init_data
){
471 .name
= "byte0_clk_src",
472 .parent_data
= mmss_xo_dsibyte
,
473 .num_parents
= ARRAY_SIZE(mmss_xo_dsibyte
),
474 .ops
= &clk_byte2_ops
,
475 .flags
= CLK_SET_RATE_PARENT
,
479 static struct clk_rcg2 byte1_clk_src
= {
482 .parent_map
= mmss_xo_dsibyte_map
,
483 .clkr
.hw
.init
= &(struct clk_init_data
){
484 .name
= "byte1_clk_src",
485 .parent_data
= mmss_xo_dsibyte
,
486 .num_parents
= ARRAY_SIZE(mmss_xo_dsibyte
),
487 .ops
= &clk_byte2_ops
,
488 .flags
= CLK_SET_RATE_PARENT
,
492 static const struct freq_tbl ftbl_cci_clk_src
[] = {
493 F(37500000, P_GPLL0
, 16, 0, 0),
494 F(50000000, P_GPLL0
, 12, 0, 0),
495 F(100000000, P_GPLL0
, 6, 0, 0),
499 static struct clk_rcg2 cci_clk_src
= {
502 .parent_map
= mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map
,
503 .freq_tbl
= ftbl_cci_clk_src
,
504 .clkr
.hw
.init
= &(struct clk_init_data
){
505 .name
= "cci_clk_src",
506 .parent_data
= mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div
,
507 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div
),
508 .ops
= &clk_rcg2_ops
,
512 static const struct freq_tbl ftbl_cpp_clk_src
[] = {
513 F(100000000, P_GPLL0
, 6, 0, 0),
514 F(200000000, P_GPLL0
, 3, 0, 0),
515 F(384000000, P_MMPLL4_OUT_EVEN
, 2, 0, 0),
516 F(404000000, P_MMPLL0_OUT_EVEN
, 2, 0, 0),
517 F(480000000, P_MMPLL7_OUT_EVEN
, 2, 0, 0),
518 F(576000000, P_MMPLL10_OUT_EVEN
, 1, 0, 0),
519 F(600000000, P_GPLL0
, 1, 0, 0),
523 static struct clk_rcg2 cpp_clk_src
= {
526 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
527 .freq_tbl
= ftbl_cpp_clk_src
,
528 .clkr
.hw
.init
= &(struct clk_init_data
){
529 .name
= "cpp_clk_src",
530 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
531 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
532 .ops
= &clk_rcg2_ops
,
536 static const struct freq_tbl ftbl_csi_clk_src
[] = {
537 F(164571429, P_MMPLL10_OUT_EVEN
, 3.5, 0, 0),
538 F(256000000, P_MMPLL4_OUT_EVEN
, 3, 0, 0),
539 F(274290000, P_MMPLL7_OUT_EVEN
, 3.5, 0, 0),
540 F(300000000, P_GPLL0
, 2, 0, 0),
541 F(384000000, P_MMPLL4_OUT_EVEN
, 2, 0, 0),
542 F(576000000, P_MMPLL10_OUT_EVEN
, 1, 0, 0),
546 static struct clk_rcg2 csi0_clk_src
= {
549 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
550 .freq_tbl
= ftbl_csi_clk_src
,
551 .clkr
.hw
.init
= &(struct clk_init_data
){
552 .name
= "csi0_clk_src",
553 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
554 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
555 .ops
= &clk_rcg2_ops
,
559 static struct clk_rcg2 csi1_clk_src
= {
562 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
563 .freq_tbl
= ftbl_csi_clk_src
,
564 .clkr
.hw
.init
= &(struct clk_init_data
){
565 .name
= "csi1_clk_src",
566 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
567 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
568 .ops
= &clk_rcg2_ops
,
572 static struct clk_rcg2 csi2_clk_src
= {
575 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
576 .freq_tbl
= ftbl_csi_clk_src
,
577 .clkr
.hw
.init
= &(struct clk_init_data
){
578 .name
= "csi2_clk_src",
579 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
580 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
581 .ops
= &clk_rcg2_ops
,
585 static struct clk_rcg2 csi3_clk_src
= {
588 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
589 .freq_tbl
= ftbl_csi_clk_src
,
590 .clkr
.hw
.init
= &(struct clk_init_data
){
591 .name
= "csi3_clk_src",
592 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
593 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
594 .ops
= &clk_rcg2_ops
,
598 static const struct freq_tbl ftbl_csiphy_clk_src
[] = {
599 F(164571429, P_MMPLL10_OUT_EVEN
, 3.5, 0, 0),
600 F(256000000, P_MMPLL4_OUT_EVEN
, 3, 0, 0),
601 F(274290000, P_MMPLL7_OUT_EVEN
, 3.5, 0, 0),
602 F(300000000, P_GPLL0
, 2, 0, 0),
603 F(384000000, P_MMPLL4_OUT_EVEN
, 2, 0, 0),
607 static struct clk_rcg2 csiphy_clk_src
= {
610 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
611 .freq_tbl
= ftbl_csiphy_clk_src
,
612 .clkr
.hw
.init
= &(struct clk_init_data
){
613 .name
= "csiphy_clk_src",
614 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
615 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
616 .ops
= &clk_rcg2_ops
,
620 static const struct freq_tbl ftbl_csiphytimer_clk_src
[] = {
621 F(200000000, P_GPLL0
, 3, 0, 0),
622 F(269333333, P_MMPLL0_OUT_EVEN
, 3, 0, 0),
626 static struct clk_rcg2 csi0phytimer_clk_src
= {
629 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
630 .freq_tbl
= ftbl_csiphytimer_clk_src
,
631 .clkr
.hw
.init
= &(struct clk_init_data
){
632 .name
= "csi0phytimer_clk_src",
633 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
634 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
635 .ops
= &clk_rcg2_ops
,
639 static struct clk_rcg2 csi1phytimer_clk_src
= {
642 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
643 .freq_tbl
= ftbl_csiphytimer_clk_src
,
644 .clkr
.hw
.init
= &(struct clk_init_data
){
645 .name
= "csi1phytimer_clk_src",
646 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
647 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
648 .ops
= &clk_rcg2_ops
,
652 static struct clk_rcg2 csi2phytimer_clk_src
= {
655 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
656 .freq_tbl
= ftbl_csiphytimer_clk_src
,
657 .clkr
.hw
.init
= &(struct clk_init_data
){
658 .name
= "csi2phytimer_clk_src",
659 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
660 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
661 .ops
= &clk_rcg2_ops
,
665 static const struct freq_tbl ftbl_dp_aux_clk_src
[] = {
666 F(19200000, P_XO
, 1, 0, 0),
670 static struct clk_rcg2 dp_aux_clk_src
= {
673 .parent_map
= mmss_xo_gpll0_gpll0_div_map
,
674 .freq_tbl
= ftbl_dp_aux_clk_src
,
675 .clkr
.hw
.init
= &(struct clk_init_data
){
676 .name
= "dp_aux_clk_src",
677 .parent_data
= mmss_xo_gpll0_gpll0_div
,
678 .num_parents
= ARRAY_SIZE(mmss_xo_gpll0_gpll0_div
),
679 .ops
= &clk_rcg2_ops
,
683 static const struct freq_tbl ftbl_dp_crypto_clk_src
[] = {
684 F(101250, P_DPLINK
, 1, 5, 16),
685 F(168750, P_DPLINK
, 1, 5, 16),
686 F(337500, P_DPLINK
, 1, 5, 16),
690 static struct clk_rcg2 dp_crypto_clk_src
= {
693 .parent_map
= mmss_xo_dp_map
,
694 .freq_tbl
= ftbl_dp_crypto_clk_src
,
695 .clkr
.hw
.init
= &(struct clk_init_data
){
696 .name
= "dp_crypto_clk_src",
697 .parent_data
= mmss_xo_dp
,
698 .num_parents
= ARRAY_SIZE(mmss_xo_dp
),
699 .ops
= &clk_rcg2_ops
,
703 static const struct freq_tbl ftbl_dp_link_clk_src
[] = {
704 F(162000, P_DPLINK
, 2, 0, 0),
705 F(270000, P_DPLINK
, 2, 0, 0),
706 F(540000, P_DPLINK
, 2, 0, 0),
710 static struct clk_rcg2 dp_link_clk_src
= {
713 .parent_map
= mmss_xo_dp_map
,
714 .freq_tbl
= ftbl_dp_link_clk_src
,
715 .clkr
.hw
.init
= &(struct clk_init_data
){
716 .name
= "dp_link_clk_src",
717 .parent_data
= mmss_xo_dp
,
718 .num_parents
= ARRAY_SIZE(mmss_xo_dp
),
719 .ops
= &clk_rcg2_ops
,
723 static const struct freq_tbl ftbl_dp_pixel_clk_src
[] = {
724 F(154000000, P_DPVCO
, 1, 0, 0),
725 F(337500000, P_DPVCO
, 2, 0, 0),
726 F(675000000, P_DPVCO
, 2, 0, 0),
730 static struct clk_rcg2 dp_pixel_clk_src
= {
733 .parent_map
= mmss_xo_dp_map
,
734 .freq_tbl
= ftbl_dp_pixel_clk_src
,
735 .clkr
.hw
.init
= &(struct clk_init_data
){
736 .name
= "dp_pixel_clk_src",
737 .parent_data
= mmss_xo_dp
,
738 .num_parents
= ARRAY_SIZE(mmss_xo_dp
),
739 .ops
= &clk_rcg2_ops
,
743 static const struct freq_tbl ftbl_esc_clk_src
[] = {
744 F(19200000, P_XO
, 1, 0, 0),
748 static struct clk_rcg2 esc0_clk_src
= {
751 .parent_map
= mmss_xo_dsibyte_map
,
752 .freq_tbl
= ftbl_esc_clk_src
,
753 .clkr
.hw
.init
= &(struct clk_init_data
){
754 .name
= "esc0_clk_src",
755 .parent_data
= mmss_xo_dsibyte
,
756 .num_parents
= ARRAY_SIZE(mmss_xo_dsibyte
),
757 .ops
= &clk_rcg2_ops
,
761 static struct clk_rcg2 esc1_clk_src
= {
764 .parent_map
= mmss_xo_dsibyte_map
,
765 .freq_tbl
= ftbl_esc_clk_src
,
766 .clkr
.hw
.init
= &(struct clk_init_data
){
767 .name
= "esc1_clk_src",
768 .parent_data
= mmss_xo_dsibyte
,
769 .num_parents
= ARRAY_SIZE(mmss_xo_dsibyte
),
770 .ops
= &clk_rcg2_ops
,
774 static const struct freq_tbl ftbl_extpclk_clk_src
[] = {
775 { .src
= P_HDMIPLL
},
779 static struct clk_rcg2 extpclk_clk_src
= {
782 .parent_map
= mmss_xo_hdmi_map
,
783 .freq_tbl
= ftbl_extpclk_clk_src
,
784 .clkr
.hw
.init
= &(struct clk_init_data
){
785 .name
= "extpclk_clk_src",
786 .parent_data
= mmss_xo_hdmi
,
787 .num_parents
= ARRAY_SIZE(mmss_xo_hdmi
),
788 .ops
= &clk_byte_ops
,
789 .flags
= CLK_SET_RATE_PARENT
,
793 static const struct freq_tbl ftbl_fd_core_clk_src
[] = {
794 F(100000000, P_GPLL0
, 6, 0, 0),
795 F(200000000, P_GPLL0
, 3, 0, 0),
796 F(404000000, P_MMPLL0_OUT_EVEN
, 2, 0, 0),
797 F(480000000, P_MMPLL7_OUT_EVEN
, 2, 0, 0),
798 F(576000000, P_MMPLL10_OUT_EVEN
, 1, 0, 0),
802 static struct clk_rcg2 fd_core_clk_src
= {
805 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
806 .freq_tbl
= ftbl_fd_core_clk_src
,
807 .clkr
.hw
.init
= &(struct clk_init_data
){
808 .name
= "fd_core_clk_src",
809 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
810 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
811 .ops
= &clk_rcg2_ops
,
815 static const struct freq_tbl ftbl_hdmi_clk_src
[] = {
816 F(19200000, P_XO
, 1, 0, 0),
820 static struct clk_rcg2 hdmi_clk_src
= {
823 .parent_map
= mmss_xo_gpll0_gpll0_div_map
,
824 .freq_tbl
= ftbl_hdmi_clk_src
,
825 .clkr
.hw
.init
= &(struct clk_init_data
){
826 .name
= "hdmi_clk_src",
827 .parent_data
= mmss_xo_gpll0_gpll0_div
,
828 .num_parents
= ARRAY_SIZE(mmss_xo_gpll0_gpll0_div
),
829 .ops
= &clk_rcg2_ops
,
833 static const struct freq_tbl ftbl_jpeg0_clk_src
[] = {
834 F(75000000, P_GPLL0
, 8, 0, 0),
835 F(150000000, P_GPLL0
, 4, 0, 0),
836 F(320000000, P_MMPLL7_OUT_EVEN
, 3, 0, 0),
837 F(480000000, P_MMPLL7_OUT_EVEN
, 2, 0, 0),
841 static struct clk_rcg2 jpeg0_clk_src
= {
844 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
845 .freq_tbl
= ftbl_jpeg0_clk_src
,
846 .clkr
.hw
.init
= &(struct clk_init_data
){
847 .name
= "jpeg0_clk_src",
848 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
849 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
850 .ops
= &clk_rcg2_ops
,
854 static const struct freq_tbl ftbl_maxi_clk_src
[] = {
855 F(19200000, P_XO
, 1, 0, 0),
856 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
857 F(171428571, P_GPLL0
, 3.5, 0, 0),
858 F(323200000, P_MMPLL0_OUT_EVEN
, 2.5, 0, 0),
859 F(406000000, P_MMPLL1_OUT_EVEN
, 2, 0, 0),
863 static struct clk_rcg2 maxi_clk_src
= {
866 .parent_map
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
,
867 .freq_tbl
= ftbl_maxi_clk_src
,
868 .clkr
.hw
.init
= &(struct clk_init_data
){
869 .name
= "maxi_clk_src",
870 .parent_data
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
,
871 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
),
872 .ops
= &clk_rcg2_ops
,
876 static const struct freq_tbl ftbl_mclk_clk_src
[] = {
877 F(4800000, P_XO
, 4, 0, 0),
878 F(6000000, P_GPLL0_DIV
, 10, 1, 5),
879 F(8000000, P_GPLL0_DIV
, 1, 2, 75),
880 F(9600000, P_XO
, 2, 0, 0),
881 F(16666667, P_GPLL0_DIV
, 2, 1, 9),
882 F(19200000, P_XO
, 1, 0, 0),
883 F(24000000, P_GPLL0_DIV
, 1, 2, 25),
884 F(33333333, P_GPLL0_DIV
, 1, 2, 9),
885 F(48000000, P_GPLL0
, 1, 2, 25),
886 F(66666667, P_GPLL0
, 1, 2, 9),
890 static struct clk_rcg2 mclk0_clk_src
= {
893 .parent_map
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
894 .freq_tbl
= ftbl_mclk_clk_src
,
895 .clkr
.hw
.init
= &(struct clk_init_data
){
896 .name
= "mclk0_clk_src",
897 .parent_data
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
898 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
899 .ops
= &clk_rcg2_ops
,
903 static struct clk_rcg2 mclk1_clk_src
= {
906 .parent_map
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
907 .freq_tbl
= ftbl_mclk_clk_src
,
908 .clkr
.hw
.init
= &(struct clk_init_data
){
909 .name
= "mclk1_clk_src",
910 .parent_data
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
911 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
912 .ops
= &clk_rcg2_ops
,
916 static struct clk_rcg2 mclk2_clk_src
= {
919 .parent_map
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
920 .freq_tbl
= ftbl_mclk_clk_src
,
921 .clkr
.hw
.init
= &(struct clk_init_data
){
922 .name
= "mclk2_clk_src",
923 .parent_data
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
924 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
925 .ops
= &clk_rcg2_ops
,
929 static struct clk_rcg2 mclk3_clk_src
= {
932 .parent_map
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
933 .freq_tbl
= ftbl_mclk_clk_src
,
934 .clkr
.hw
.init
= &(struct clk_init_data
){
935 .name
= "mclk3_clk_src",
936 .parent_data
= mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
937 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
938 .ops
= &clk_rcg2_ops
,
942 static const struct freq_tbl ftbl_mdp_clk_src
[] = {
943 F(85714286, P_GPLL0
, 7, 0, 0),
944 F(100000000, P_GPLL0
, 6, 0, 0),
945 F(150000000, P_GPLL0
, 4, 0, 0),
946 F(171428571, P_GPLL0
, 3.5, 0, 0),
947 F(200000000, P_GPLL0
, 3, 0, 0),
948 F(275000000, P_MMPLL5_OUT_EVEN
, 3, 0, 0),
949 F(300000000, P_GPLL0
, 2, 0, 0),
950 F(330000000, P_MMPLL5_OUT_EVEN
, 2.5, 0, 0),
951 F(412500000, P_MMPLL5_OUT_EVEN
, 2, 0, 0),
955 static struct clk_rcg2 mdp_clk_src
= {
958 .parent_map
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map
,
959 .freq_tbl
= ftbl_mdp_clk_src
,
960 .clkr
.hw
.init
= &(struct clk_init_data
){
961 .name
= "mdp_clk_src",
962 .parent_data
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
,
963 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
),
964 .ops
= &clk_rcg2_ops
,
968 static const struct freq_tbl ftbl_vsync_clk_src
[] = {
969 F(19200000, P_XO
, 1, 0, 0),
973 static struct clk_rcg2 vsync_clk_src
= {
976 .parent_map
= mmss_xo_gpll0_gpll0_div_map
,
977 .freq_tbl
= ftbl_vsync_clk_src
,
978 .clkr
.hw
.init
= &(struct clk_init_data
){
979 .name
= "vsync_clk_src",
980 .parent_data
= mmss_xo_gpll0_gpll0_div
,
981 .num_parents
= ARRAY_SIZE(mmss_xo_gpll0_gpll0_div
),
982 .ops
= &clk_rcg2_ops
,
986 static const struct freq_tbl ftbl_ahb_clk_src
[] = {
987 F(19200000, P_XO
, 1, 0, 0),
988 F(40000000, P_GPLL0
, 15, 0, 0),
989 F(80800000, P_MMPLL0_OUT_EVEN
, 10, 0, 0),
993 static struct clk_rcg2 ahb_clk_src
= {
996 .parent_map
= mmss_xo_mmpll0_gpll0_gpll0_div_map
,
997 .freq_tbl
= ftbl_ahb_clk_src
,
998 .clkr
.hw
.init
= &(struct clk_init_data
){
999 .name
= "ahb_clk_src",
1000 .parent_data
= mmss_xo_mmpll0_gpll0_gpll0_div
,
1001 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_gpll0_gpll0_div
),
1002 .ops
= &clk_rcg2_ops
,
1006 static const struct freq_tbl ftbl_axi_clk_src
[] = {
1007 F(75000000, P_GPLL0
, 8, 0, 0),
1008 F(171428571, P_GPLL0
, 3.5, 0, 0),
1009 F(240000000, P_GPLL0
, 2.5, 0, 0),
1010 F(323200000, P_MMPLL0_OUT_EVEN
, 2.5, 0, 0),
1011 F(406000000, P_MMPLL0_OUT_EVEN
, 2, 0, 0),
1016 static struct clk_rcg2 axi_clk_src
= {
1019 .parent_map
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
,
1020 .freq_tbl
= ftbl_axi_clk_src
,
1021 .clkr
.hw
.init
= &(struct clk_init_data
){
1022 .name
= "axi_clk_src",
1023 .parent_data
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
,
1024 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
),
1025 .ops
= &clk_rcg2_ops
,
1029 static struct clk_rcg2 pclk0_clk_src
= {
1033 .parent_map
= mmss_xo_dsi0pll_dsi1pll_map
,
1034 .clkr
.hw
.init
= &(struct clk_init_data
){
1035 .name
= "pclk0_clk_src",
1036 .parent_data
= mmss_xo_dsi0pll_dsi1pll
,
1037 .num_parents
= ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll
),
1038 .ops
= &clk_pixel_ops
,
1039 .flags
= CLK_SET_RATE_PARENT
,
1043 static struct clk_rcg2 pclk1_clk_src
= {
1047 .parent_map
= mmss_xo_dsi0pll_dsi1pll_map
,
1048 .clkr
.hw
.init
= &(struct clk_init_data
){
1049 .name
= "pclk1_clk_src",
1050 .parent_data
= mmss_xo_dsi0pll_dsi1pll
,
1051 .num_parents
= ARRAY_SIZE(mmss_xo_dsi0pll_dsi1pll
),
1052 .ops
= &clk_pixel_ops
,
1053 .flags
= CLK_SET_RATE_PARENT
,
1057 static const struct freq_tbl ftbl_rot_clk_src
[] = {
1058 F(171428571, P_GPLL0
, 3.5, 0, 0),
1059 F(275000000, P_MMPLL5_OUT_EVEN
, 3, 0, 0),
1060 F(330000000, P_MMPLL5_OUT_EVEN
, 2.5, 0, 0),
1061 F(412500000, P_MMPLL5_OUT_EVEN
, 2, 0, 0),
1065 static struct clk_rcg2 rot_clk_src
= {
1068 .parent_map
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map
,
1069 .freq_tbl
= ftbl_rot_clk_src
,
1070 .clkr
.hw
.init
= &(struct clk_init_data
){
1071 .name
= "rot_clk_src",
1072 .parent_data
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
,
1073 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
),
1074 .ops
= &clk_rcg2_ops
,
1078 static const struct freq_tbl ftbl_video_core_clk_src
[] = {
1079 F(200000000, P_GPLL0
, 3, 0, 0),
1080 F(269330000, P_MMPLL0_OUT_EVEN
, 3, 0, 0),
1081 F(355200000, P_MMPLL6_OUT_EVEN
, 2.5, 0, 0),
1082 F(444000000, P_MMPLL6_OUT_EVEN
, 2, 0, 0),
1083 F(533000000, P_MMPLL3_OUT_EVEN
, 2, 0, 0),
1087 static struct clk_rcg2 video_core_clk_src
= {
1090 .parent_map
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map
,
1091 .freq_tbl
= ftbl_video_core_clk_src
,
1092 .clkr
.hw
.init
= &(struct clk_init_data
){
1093 .name
= "video_core_clk_src",
1094 .parent_data
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
,
1095 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
),
1096 .ops
= &clk_rcg2_ops
,
1100 static struct clk_rcg2 video_subcore0_clk_src
= {
1103 .parent_map
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map
,
1104 .freq_tbl
= ftbl_video_core_clk_src
,
1105 .clkr
.hw
.init
= &(struct clk_init_data
){
1106 .name
= "video_subcore0_clk_src",
1107 .parent_data
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
,
1108 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
),
1109 .ops
= &clk_rcg2_ops
,
1113 static struct clk_rcg2 video_subcore1_clk_src
= {
1116 .parent_map
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map
,
1117 .freq_tbl
= ftbl_video_core_clk_src
,
1118 .clkr
.hw
.init
= &(struct clk_init_data
){
1119 .name
= "video_subcore1_clk_src",
1120 .parent_data
= mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
,
1121 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div
),
1122 .ops
= &clk_rcg2_ops
,
1126 static const struct freq_tbl ftbl_vfe_clk_src
[] = {
1127 F(200000000, P_GPLL0
, 3, 0, 0),
1128 F(300000000, P_GPLL0
, 2, 0, 0),
1129 F(320000000, P_MMPLL7_OUT_EVEN
, 3, 0, 0),
1130 F(384000000, P_MMPLL4_OUT_EVEN
, 2, 0, 0),
1131 F(404000000, P_MMPLL0_OUT_EVEN
, 2, 0, 0),
1132 F(480000000, P_MMPLL7_OUT_EVEN
, 2, 0, 0),
1133 F(576000000, P_MMPLL10_OUT_EVEN
, 1, 0, 0),
1134 F(600000000, P_GPLL0
, 1, 0, 0),
1138 static struct clk_rcg2 vfe0_clk_src
= {
1141 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
1142 .freq_tbl
= ftbl_vfe_clk_src
,
1143 .clkr
.hw
.init
= &(struct clk_init_data
){
1144 .name
= "vfe0_clk_src",
1145 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
1146 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
1147 .ops
= &clk_rcg2_ops
,
1151 static struct clk_rcg2 vfe1_clk_src
= {
1154 .parent_map
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map
,
1155 .freq_tbl
= ftbl_vfe_clk_src
,
1156 .clkr
.hw
.init
= &(struct clk_init_data
){
1157 .name
= "vfe1_clk_src",
1158 .parent_data
= mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
,
1159 .num_parents
= ARRAY_SIZE(mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div
),
1160 .ops
= &clk_rcg2_ops
,
1164 static struct clk_branch misc_ahb_clk
= {
1169 .enable_reg
= 0x328,
1170 .enable_mask
= BIT(0),
1171 .hw
.init
= &(struct clk_init_data
){
1172 .name
= "misc_ahb_clk",
1173 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1175 .ops
= &clk_branch2_ops
,
1176 .flags
= CLK_SET_RATE_PARENT
,
1181 static struct clk_branch video_core_clk
= {
1184 .enable_reg
= 0x1028,
1185 .enable_mask
= BIT(0),
1186 .hw
.init
= &(struct clk_init_data
){
1187 .name
= "video_core_clk",
1188 .parent_hws
= (const struct clk_hw
*[]){ &video_core_clk_src
.clkr
.hw
},
1190 .ops
= &clk_branch2_ops
,
1191 .flags
= CLK_SET_RATE_PARENT
,
1196 static struct clk_branch video_ahb_clk
= {
1201 .enable_reg
= 0x1030,
1202 .enable_mask
= BIT(0),
1203 .hw
.init
= &(struct clk_init_data
){
1204 .name
= "video_ahb_clk",
1205 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1207 .ops
= &clk_branch2_ops
,
1208 .flags
= CLK_SET_RATE_PARENT
,
1213 static struct clk_branch video_axi_clk
= {
1216 .enable_reg
= 0x1034,
1217 .enable_mask
= BIT(0),
1218 .hw
.init
= &(struct clk_init_data
){
1219 .name
= "video_axi_clk",
1220 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
1222 .ops
= &clk_branch2_ops
,
1227 static struct clk_branch video_maxi_clk
= {
1230 .enable_reg
= 0x1038,
1231 .enable_mask
= BIT(0),
1232 .hw
.init
= &(struct clk_init_data
){
1233 .name
= "video_maxi_clk",
1234 .parent_hws
= (const struct clk_hw
*[]){ &maxi_clk_src
.clkr
.hw
},
1236 .ops
= &clk_branch2_ops
,
1237 .flags
= CLK_SET_RATE_PARENT
,
1242 static struct clk_branch video_subcore0_clk
= {
1245 .enable_reg
= 0x1048,
1246 .enable_mask
= BIT(0),
1247 .hw
.init
= &(struct clk_init_data
){
1248 .name
= "video_subcore0_clk",
1249 .parent_hws
= (const struct clk_hw
*[]){ &video_subcore0_clk_src
.clkr
.hw
},
1251 .ops
= &clk_branch2_ops
,
1252 .flags
= CLK_SET_RATE_PARENT
,
1257 static struct clk_branch video_subcore1_clk
= {
1260 .enable_reg
= 0x104c,
1261 .enable_mask
= BIT(0),
1262 .hw
.init
= &(struct clk_init_data
){
1263 .name
= "video_subcore1_clk",
1264 .parent_hws
= (const struct clk_hw
*[]){ &video_subcore1_clk_src
.clkr
.hw
},
1266 .ops
= &clk_branch2_ops
,
1267 .flags
= CLK_SET_RATE_PARENT
,
1272 static struct clk_branch mdss_ahb_clk
= {
1277 .enable_reg
= 0x2308,
1278 .enable_mask
= BIT(0),
1279 .hw
.init
= &(struct clk_init_data
){
1280 .name
= "mdss_ahb_clk",
1281 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1283 .ops
= &clk_branch2_ops
,
1284 .flags
= CLK_SET_RATE_PARENT
,
1289 static struct clk_branch mdss_hdmi_dp_ahb_clk
= {
1292 .enable_reg
= 0x230c,
1293 .enable_mask
= BIT(0),
1294 .hw
.init
= &(struct clk_init_data
){
1295 .name
= "mdss_hdmi_dp_ahb_clk",
1296 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1298 .ops
= &clk_branch2_ops
,
1299 .flags
= CLK_SET_RATE_PARENT
,
1304 static struct clk_branch mdss_axi_clk
= {
1307 .enable_reg
= 0x2310,
1308 .enable_mask
= BIT(0),
1309 .hw
.init
= &(struct clk_init_data
){
1310 .name
= "mdss_axi_clk",
1311 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
1313 .ops
= &clk_branch2_ops
,
1318 static struct clk_branch mdss_pclk0_clk
= {
1321 .enable_reg
= 0x2314,
1322 .enable_mask
= BIT(0),
1323 .hw
.init
= &(struct clk_init_data
){
1324 .name
= "mdss_pclk0_clk",
1325 .parent_hws
= (const struct clk_hw
*[]){ &pclk0_clk_src
.clkr
.hw
},
1327 .ops
= &clk_branch2_ops
,
1328 .flags
= CLK_SET_RATE_PARENT
,
1333 static struct clk_branch mdss_pclk1_clk
= {
1336 .enable_reg
= 0x2318,
1337 .enable_mask
= BIT(0),
1338 .hw
.init
= &(struct clk_init_data
){
1339 .name
= "mdss_pclk1_clk",
1340 .parent_hws
= (const struct clk_hw
*[]){ &pclk1_clk_src
.clkr
.hw
},
1342 .ops
= &clk_branch2_ops
,
1343 .flags
= CLK_SET_RATE_PARENT
,
1348 static struct clk_branch mdss_mdp_clk
= {
1351 .enable_reg
= 0x231c,
1352 .enable_mask
= BIT(0),
1353 .hw
.init
= &(struct clk_init_data
){
1354 .name
= "mdss_mdp_clk",
1355 .parent_hws
= (const struct clk_hw
*[]){ &mdp_clk_src
.clkr
.hw
},
1357 .ops
= &clk_branch2_ops
,
1358 .flags
= CLK_SET_RATE_PARENT
,
1363 static struct clk_branch mdss_mdp_lut_clk
= {
1366 .enable_reg
= 0x2320,
1367 .enable_mask
= BIT(0),
1368 .hw
.init
= &(struct clk_init_data
){
1369 .name
= "mdss_mdp_lut_clk",
1370 .parent_hws
= (const struct clk_hw
*[]){ &mdp_clk_src
.clkr
.hw
},
1372 .ops
= &clk_branch2_ops
,
1373 .flags
= CLK_SET_RATE_PARENT
,
1378 static struct clk_branch mdss_extpclk_clk
= {
1381 .enable_reg
= 0x2324,
1382 .enable_mask
= BIT(0),
1383 .hw
.init
= &(struct clk_init_data
){
1384 .name
= "mdss_extpclk_clk",
1385 .parent_hws
= (const struct clk_hw
*[]){ &extpclk_clk_src
.clkr
.hw
},
1387 .ops
= &clk_branch2_ops
,
1388 .flags
= CLK_SET_RATE_PARENT
,
1393 static struct clk_branch mdss_vsync_clk
= {
1396 .enable_reg
= 0x2328,
1397 .enable_mask
= BIT(0),
1398 .hw
.init
= &(struct clk_init_data
){
1399 .name
= "mdss_vsync_clk",
1400 .parent_hws
= (const struct clk_hw
*[]){ &vsync_clk_src
.clkr
.hw
},
1402 .ops
= &clk_branch2_ops
,
1403 .flags
= CLK_SET_RATE_PARENT
,
1408 static struct clk_branch mdss_hdmi_clk
= {
1411 .enable_reg
= 0x2338,
1412 .enable_mask
= BIT(0),
1413 .hw
.init
= &(struct clk_init_data
){
1414 .name
= "mdss_hdmi_clk",
1415 .parent_hws
= (const struct clk_hw
*[]){ &hdmi_clk_src
.clkr
.hw
},
1417 .ops
= &clk_branch2_ops
,
1418 .flags
= CLK_SET_RATE_PARENT
,
1423 static struct clk_branch mdss_byte0_clk
= {
1426 .enable_reg
= 0x233c,
1427 .enable_mask
= BIT(0),
1428 .hw
.init
= &(struct clk_init_data
){
1429 .name
= "mdss_byte0_clk",
1430 .parent_hws
= (const struct clk_hw
*[]){ &byte0_clk_src
.clkr
.hw
},
1432 .ops
= &clk_branch2_ops
,
1433 .flags
= CLK_SET_RATE_PARENT
,
1438 static struct clk_branch mdss_byte1_clk
= {
1441 .enable_reg
= 0x2340,
1442 .enable_mask
= BIT(0),
1443 .hw
.init
= &(struct clk_init_data
){
1444 .name
= "mdss_byte1_clk",
1445 .parent_hws
= (const struct clk_hw
*[]){ &byte1_clk_src
.clkr
.hw
},
1447 .ops
= &clk_branch2_ops
,
1448 .flags
= CLK_SET_RATE_PARENT
,
1453 static struct clk_branch mdss_esc0_clk
= {
1456 .enable_reg
= 0x2344,
1457 .enable_mask
= BIT(0),
1458 .hw
.init
= &(struct clk_init_data
){
1459 .name
= "mdss_esc0_clk",
1460 .parent_hws
= (const struct clk_hw
*[]){ &esc0_clk_src
.clkr
.hw
},
1462 .ops
= &clk_branch2_ops
,
1463 .flags
= CLK_SET_RATE_PARENT
,
1468 static struct clk_branch mdss_esc1_clk
= {
1471 .enable_reg
= 0x2348,
1472 .enable_mask
= BIT(0),
1473 .hw
.init
= &(struct clk_init_data
){
1474 .name
= "mdss_esc1_clk",
1475 .parent_hws
= (const struct clk_hw
*[]){ &esc1_clk_src
.clkr
.hw
},
1477 .ops
= &clk_branch2_ops
,
1478 .flags
= CLK_SET_RATE_PARENT
,
1483 static struct clk_branch mdss_rot_clk
= {
1486 .enable_reg
= 0x2350,
1487 .enable_mask
= BIT(0),
1488 .hw
.init
= &(struct clk_init_data
){
1489 .name
= "mdss_rot_clk",
1490 .parent_hws
= (const struct clk_hw
*[]){ &rot_clk_src
.clkr
.hw
},
1492 .ops
= &clk_branch2_ops
,
1493 .flags
= CLK_SET_RATE_PARENT
,
1498 static struct clk_branch mdss_dp_link_clk
= {
1501 .enable_reg
= 0x2354,
1502 .enable_mask
= BIT(0),
1503 .hw
.init
= &(struct clk_init_data
){
1504 .name
= "mdss_dp_link_clk",
1505 .parent_hws
= (const struct clk_hw
*[]){ &dp_link_clk_src
.clkr
.hw
},
1507 .ops
= &clk_branch2_ops
,
1508 .flags
= CLK_SET_RATE_PARENT
,
1513 static struct clk_branch mdss_dp_link_intf_clk
= {
1516 .enable_reg
= 0x2358,
1517 .enable_mask
= BIT(0),
1518 .hw
.init
= &(struct clk_init_data
){
1519 .name
= "mdss_dp_link_intf_clk",
1520 .parent_hws
= (const struct clk_hw
*[]){ &dp_link_clk_src
.clkr
.hw
},
1522 .ops
= &clk_branch2_ops
,
1523 .flags
= CLK_SET_RATE_PARENT
,
1528 static struct clk_branch mdss_dp_crypto_clk
= {
1531 .enable_reg
= 0x235c,
1532 .enable_mask
= BIT(0),
1533 .hw
.init
= &(struct clk_init_data
){
1534 .name
= "mdss_dp_crypto_clk",
1535 .parent_hws
= (const struct clk_hw
*[]){ &dp_crypto_clk_src
.clkr
.hw
},
1537 .ops
= &clk_branch2_ops
,
1538 .flags
= CLK_SET_RATE_PARENT
,
1543 static struct clk_branch mdss_dp_pixel_clk
= {
1546 .enable_reg
= 0x2360,
1547 .enable_mask
= BIT(0),
1548 .hw
.init
= &(struct clk_init_data
){
1549 .name
= "mdss_dp_pixel_clk",
1550 .parent_hws
= (const struct clk_hw
*[]){ &dp_pixel_clk_src
.clkr
.hw
},
1552 .ops
= &clk_branch2_ops
,
1553 .flags
= CLK_SET_RATE_PARENT
,
1558 static struct clk_branch mdss_dp_aux_clk
= {
1561 .enable_reg
= 0x2364,
1562 .enable_mask
= BIT(0),
1563 .hw
.init
= &(struct clk_init_data
){
1564 .name
= "mdss_dp_aux_clk",
1565 .parent_hws
= (const struct clk_hw
*[]){ &dp_aux_clk_src
.clkr
.hw
},
1567 .ops
= &clk_branch2_ops
,
1568 .flags
= CLK_SET_RATE_PARENT
,
1573 static struct clk_branch mdss_byte0_intf_clk
= {
1576 .enable_reg
= 0x2374,
1577 .enable_mask
= BIT(0),
1578 .hw
.init
= &(struct clk_init_data
){
1579 .name
= "mdss_byte0_intf_clk",
1580 .parent_hws
= (const struct clk_hw
*[]){ &byte0_clk_src
.clkr
.hw
},
1582 .ops
= &clk_branch2_ops
,
1583 .flags
= CLK_SET_RATE_PARENT
,
1588 static struct clk_branch mdss_byte1_intf_clk
= {
1591 .enable_reg
= 0x2378,
1592 .enable_mask
= BIT(0),
1593 .hw
.init
= &(struct clk_init_data
){
1594 .name
= "mdss_byte1_intf_clk",
1595 .parent_hws
= (const struct clk_hw
*[]){ &byte1_clk_src
.clkr
.hw
},
1597 .ops
= &clk_branch2_ops
,
1598 .flags
= CLK_SET_RATE_PARENT
,
1603 static struct clk_branch camss_csi0phytimer_clk
= {
1606 .enable_reg
= 0x3024,
1607 .enable_mask
= BIT(0),
1608 .hw
.init
= &(struct clk_init_data
){
1609 .name
= "camss_csi0phytimer_clk",
1610 .parent_hws
= (const struct clk_hw
*[]){ &csi0phytimer_clk_src
.clkr
.hw
},
1612 .ops
= &clk_branch2_ops
,
1613 .flags
= CLK_SET_RATE_PARENT
,
1618 static struct clk_branch camss_csi1phytimer_clk
= {
1621 .enable_reg
= 0x3054,
1622 .enable_mask
= BIT(0),
1623 .hw
.init
= &(struct clk_init_data
){
1624 .name
= "camss_csi1phytimer_clk",
1625 .parent_hws
= (const struct clk_hw
*[]){ &csi1phytimer_clk_src
.clkr
.hw
},
1627 .ops
= &clk_branch2_ops
,
1628 .flags
= CLK_SET_RATE_PARENT
,
1633 static struct clk_branch camss_csi2phytimer_clk
= {
1636 .enable_reg
= 0x3084,
1637 .enable_mask
= BIT(0),
1638 .hw
.init
= &(struct clk_init_data
){
1639 .name
= "camss_csi2phytimer_clk",
1640 .parent_hws
= (const struct clk_hw
*[]){ &csi2phytimer_clk_src
.clkr
.hw
},
1642 .ops
= &clk_branch2_ops
,
1643 .flags
= CLK_SET_RATE_PARENT
,
1648 static struct clk_branch camss_csi0_clk
= {
1651 .enable_reg
= 0x30b4,
1652 .enable_mask
= BIT(0),
1653 .hw
.init
= &(struct clk_init_data
){
1654 .name
= "camss_csi0_clk",
1655 .parent_hws
= (const struct clk_hw
*[]){ &csi0_clk_src
.clkr
.hw
},
1657 .ops
= &clk_branch2_ops
,
1658 .flags
= CLK_SET_RATE_PARENT
,
1663 static struct clk_branch camss_csi0_ahb_clk
= {
1666 .enable_reg
= 0x30bc,
1667 .enable_mask
= BIT(0),
1668 .hw
.init
= &(struct clk_init_data
){
1669 .name
= "camss_csi0_ahb_clk",
1670 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1672 .ops
= &clk_branch2_ops
,
1673 .flags
= CLK_SET_RATE_PARENT
,
1678 static struct clk_branch camss_csi0rdi_clk
= {
1681 .enable_reg
= 0x30d4,
1682 .enable_mask
= BIT(0),
1683 .hw
.init
= &(struct clk_init_data
){
1684 .name
= "camss_csi0rdi_clk",
1685 .parent_hws
= (const struct clk_hw
*[]){ &csi0_clk_src
.clkr
.hw
},
1687 .ops
= &clk_branch2_ops
,
1688 .flags
= CLK_SET_RATE_PARENT
,
1693 static struct clk_branch camss_csi0pix_clk
= {
1696 .enable_reg
= 0x30e4,
1697 .enable_mask
= BIT(0),
1698 .hw
.init
= &(struct clk_init_data
){
1699 .name
= "camss_csi0pix_clk",
1700 .parent_hws
= (const struct clk_hw
*[]){ &csi0_clk_src
.clkr
.hw
},
1702 .ops
= &clk_branch2_ops
,
1703 .flags
= CLK_SET_RATE_PARENT
,
1708 static struct clk_branch camss_csi1_clk
= {
1711 .enable_reg
= 0x3124,
1712 .enable_mask
= BIT(0),
1713 .hw
.init
= &(struct clk_init_data
){
1714 .name
= "camss_csi1_clk",
1715 .parent_hws
= (const struct clk_hw
*[]){ &csi1_clk_src
.clkr
.hw
},
1717 .ops
= &clk_branch2_ops
,
1718 .flags
= CLK_SET_RATE_PARENT
,
1723 static struct clk_branch camss_csi1_ahb_clk
= {
1726 .enable_reg
= 0x3128,
1727 .enable_mask
= BIT(0),
1728 .hw
.init
= &(struct clk_init_data
){
1729 .name
= "camss_csi1_ahb_clk",
1730 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1732 .ops
= &clk_branch2_ops
,
1733 .flags
= CLK_SET_RATE_PARENT
,
1738 static struct clk_branch camss_csi1rdi_clk
= {
1741 .enable_reg
= 0x3144,
1742 .enable_mask
= BIT(0),
1743 .hw
.init
= &(struct clk_init_data
){
1744 .name
= "camss_csi1rdi_clk",
1745 .parent_hws
= (const struct clk_hw
*[]){ &csi1_clk_src
.clkr
.hw
},
1747 .ops
= &clk_branch2_ops
,
1748 .flags
= CLK_SET_RATE_PARENT
,
1753 static struct clk_branch camss_csi1pix_clk
= {
1756 .enable_reg
= 0x3154,
1757 .enable_mask
= BIT(0),
1758 .hw
.init
= &(struct clk_init_data
){
1759 .name
= "camss_csi1pix_clk",
1760 .parent_hws
= (const struct clk_hw
*[]){ &csi1_clk_src
.clkr
.hw
},
1762 .ops
= &clk_branch2_ops
,
1763 .flags
= CLK_SET_RATE_PARENT
,
1768 static struct clk_branch camss_csi2_clk
= {
1771 .enable_reg
= 0x3184,
1772 .enable_mask
= BIT(0),
1773 .hw
.init
= &(struct clk_init_data
){
1774 .name
= "camss_csi2_clk",
1775 .parent_hws
= (const struct clk_hw
*[]){ &csi2_clk_src
.clkr
.hw
},
1777 .ops
= &clk_branch2_ops
,
1778 .flags
= CLK_SET_RATE_PARENT
,
1783 static struct clk_branch camss_csi2_ahb_clk
= {
1786 .enable_reg
= 0x3188,
1787 .enable_mask
= BIT(0),
1788 .hw
.init
= &(struct clk_init_data
){
1789 .name
= "camss_csi2_ahb_clk",
1790 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1792 .ops
= &clk_branch2_ops
,
1793 .flags
= CLK_SET_RATE_PARENT
,
1798 static struct clk_branch camss_csi2rdi_clk
= {
1801 .enable_reg
= 0x31a4,
1802 .enable_mask
= BIT(0),
1803 .hw
.init
= &(struct clk_init_data
){
1804 .name
= "camss_csi2rdi_clk",
1805 .parent_hws
= (const struct clk_hw
*[]){ &csi2_clk_src
.clkr
.hw
},
1807 .ops
= &clk_branch2_ops
,
1808 .flags
= CLK_SET_RATE_PARENT
,
1813 static struct clk_branch camss_csi2pix_clk
= {
1816 .enable_reg
= 0x31b4,
1817 .enable_mask
= BIT(0),
1818 .hw
.init
= &(struct clk_init_data
){
1819 .name
= "camss_csi2pix_clk",
1820 .parent_hws
= (const struct clk_hw
*[]){ &csi2_clk_src
.clkr
.hw
},
1822 .ops
= &clk_branch2_ops
,
1823 .flags
= CLK_SET_RATE_PARENT
,
1828 static struct clk_branch camss_csi3_clk
= {
1831 .enable_reg
= 0x31e4,
1832 .enable_mask
= BIT(0),
1833 .hw
.init
= &(struct clk_init_data
){
1834 .name
= "camss_csi3_clk",
1835 .parent_hws
= (const struct clk_hw
*[]){ &csi3_clk_src
.clkr
.hw
},
1837 .ops
= &clk_branch2_ops
,
1838 .flags
= CLK_SET_RATE_PARENT
,
1843 static struct clk_branch camss_csi3_ahb_clk
= {
1846 .enable_reg
= 0x31e8,
1847 .enable_mask
= BIT(0),
1848 .hw
.init
= &(struct clk_init_data
){
1849 .name
= "camss_csi3_ahb_clk",
1850 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1852 .ops
= &clk_branch2_ops
,
1853 .flags
= CLK_SET_RATE_PARENT
,
1858 static struct clk_branch camss_csi3rdi_clk
= {
1861 .enable_reg
= 0x3204,
1862 .enable_mask
= BIT(0),
1863 .hw
.init
= &(struct clk_init_data
){
1864 .name
= "camss_csi3rdi_clk",
1865 .parent_hws
= (const struct clk_hw
*[]){ &csi3_clk_src
.clkr
.hw
},
1867 .ops
= &clk_branch2_ops
,
1868 .flags
= CLK_SET_RATE_PARENT
,
1873 static struct clk_branch camss_csi3pix_clk
= {
1876 .enable_reg
= 0x3214,
1877 .enable_mask
= BIT(0),
1878 .hw
.init
= &(struct clk_init_data
){
1879 .name
= "camss_csi3pix_clk",
1880 .parent_hws
= (const struct clk_hw
*[]){ &csi3_clk_src
.clkr
.hw
},
1882 .ops
= &clk_branch2_ops
,
1883 .flags
= CLK_SET_RATE_PARENT
,
1888 static struct clk_branch camss_ispif_ahb_clk
= {
1891 .enable_reg
= 0x3224,
1892 .enable_mask
= BIT(0),
1893 .hw
.init
= &(struct clk_init_data
){
1894 .name
= "camss_ispif_ahb_clk",
1895 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1897 .ops
= &clk_branch2_ops
,
1898 .flags
= CLK_SET_RATE_PARENT
,
1903 static struct clk_branch camss_cci_clk
= {
1906 .enable_reg
= 0x3344,
1907 .enable_mask
= BIT(0),
1908 .hw
.init
= &(struct clk_init_data
){
1909 .name
= "camss_cci_clk",
1910 .parent_hws
= (const struct clk_hw
*[]){ &cci_clk_src
.clkr
.hw
},
1912 .ops
= &clk_branch2_ops
,
1913 .flags
= CLK_SET_RATE_PARENT
,
1918 static struct clk_branch camss_cci_ahb_clk
= {
1921 .enable_reg
= 0x3348,
1922 .enable_mask
= BIT(0),
1923 .hw
.init
= &(struct clk_init_data
){
1924 .name
= "camss_cci_ahb_clk",
1925 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
1927 .ops
= &clk_branch2_ops
,
1928 .flags
= CLK_SET_RATE_PARENT
,
1933 static struct clk_branch camss_mclk0_clk
= {
1936 .enable_reg
= 0x3384,
1937 .enable_mask
= BIT(0),
1938 .hw
.init
= &(struct clk_init_data
){
1939 .name
= "camss_mclk0_clk",
1940 .parent_hws
= (const struct clk_hw
*[]){ &mclk0_clk_src
.clkr
.hw
},
1942 .ops
= &clk_branch2_ops
,
1943 .flags
= CLK_SET_RATE_PARENT
,
1948 static struct clk_branch camss_mclk1_clk
= {
1951 .enable_reg
= 0x33b4,
1952 .enable_mask
= BIT(0),
1953 .hw
.init
= &(struct clk_init_data
){
1954 .name
= "camss_mclk1_clk",
1955 .parent_hws
= (const struct clk_hw
*[]){ &mclk1_clk_src
.clkr
.hw
},
1957 .ops
= &clk_branch2_ops
,
1958 .flags
= CLK_SET_RATE_PARENT
,
1963 static struct clk_branch camss_mclk2_clk
= {
1966 .enable_reg
= 0x33e4,
1967 .enable_mask
= BIT(0),
1968 .hw
.init
= &(struct clk_init_data
){
1969 .name
= "camss_mclk2_clk",
1970 .parent_hws
= (const struct clk_hw
*[]){ &mclk2_clk_src
.clkr
.hw
},
1972 .ops
= &clk_branch2_ops
,
1973 .flags
= CLK_SET_RATE_PARENT
,
1978 static struct clk_branch camss_mclk3_clk
= {
1981 .enable_reg
= 0x3414,
1982 .enable_mask
= BIT(0),
1983 .hw
.init
= &(struct clk_init_data
){
1984 .name
= "camss_mclk3_clk",
1985 .parent_hws
= (const struct clk_hw
*[]){ &mclk3_clk_src
.clkr
.hw
},
1987 .ops
= &clk_branch2_ops
,
1988 .flags
= CLK_SET_RATE_PARENT
,
1993 static struct clk_branch camss_top_ahb_clk
= {
1996 .enable_reg
= 0x3484,
1997 .enable_mask
= BIT(0),
1998 .hw
.init
= &(struct clk_init_data
){
1999 .name
= "camss_top_ahb_clk",
2000 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2002 .ops
= &clk_branch2_ops
,
2003 .flags
= CLK_SET_RATE_PARENT
,
2008 static struct clk_branch camss_ahb_clk
= {
2011 .enable_reg
= 0x348c,
2012 .enable_mask
= BIT(0),
2013 .hw
.init
= &(struct clk_init_data
){
2014 .name
= "camss_ahb_clk",
2015 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2017 .ops
= &clk_branch2_ops
,
2018 .flags
= CLK_SET_RATE_PARENT
,
2023 static struct clk_branch camss_micro_ahb_clk
= {
2026 .enable_reg
= 0x3494,
2027 .enable_mask
= BIT(0),
2028 .hw
.init
= &(struct clk_init_data
){
2029 .name
= "camss_micro_ahb_clk",
2030 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2032 .ops
= &clk_branch2_ops
,
2033 .flags
= CLK_SET_RATE_PARENT
,
2038 static struct clk_branch camss_jpeg0_clk
= {
2041 .enable_reg
= 0x35a8,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(struct clk_init_data
){
2044 .name
= "camss_jpeg0_clk",
2045 .parent_hws
= (const struct clk_hw
*[]){ &jpeg0_clk_src
.clkr
.hw
},
2047 .ops
= &clk_branch2_ops
,
2048 .flags
= CLK_SET_RATE_PARENT
,
2053 static struct clk_branch camss_jpeg_ahb_clk
= {
2056 .enable_reg
= 0x35b4,
2057 .enable_mask
= BIT(0),
2058 .hw
.init
= &(struct clk_init_data
){
2059 .name
= "camss_jpeg_ahb_clk",
2060 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2062 .ops
= &clk_branch2_ops
,
2063 .flags
= CLK_SET_RATE_PARENT
,
2068 static struct clk_branch camss_jpeg_axi_clk
= {
2071 .enable_reg
= 0x35b8,
2072 .enable_mask
= BIT(0),
2073 .hw
.init
= &(struct clk_init_data
){
2074 .name
= "camss_jpeg_axi_clk",
2075 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
2077 .ops
= &clk_branch2_ops
,
2082 static struct clk_branch camss_vfe0_ahb_clk
= {
2085 .enable_reg
= 0x3668,
2086 .enable_mask
= BIT(0),
2087 .hw
.init
= &(struct clk_init_data
){
2088 .name
= "camss_vfe0_ahb_clk",
2089 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2091 .ops
= &clk_branch2_ops
,
2092 .flags
= CLK_SET_RATE_PARENT
,
2097 static struct clk_branch camss_vfe1_ahb_clk
= {
2100 .enable_reg
= 0x3678,
2101 .enable_mask
= BIT(0),
2102 .hw
.init
= &(struct clk_init_data
){
2103 .name
= "camss_vfe1_ahb_clk",
2104 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2106 .ops
= &clk_branch2_ops
,
2107 .flags
= CLK_SET_RATE_PARENT
,
2112 static struct clk_branch camss_vfe0_clk
= {
2115 .enable_reg
= 0x36a8,
2116 .enable_mask
= BIT(0),
2117 .hw
.init
= &(struct clk_init_data
){
2118 .name
= "camss_vfe0_clk",
2119 .parent_hws
= (const struct clk_hw
*[]){ &vfe0_clk_src
.clkr
.hw
},
2121 .ops
= &clk_branch2_ops
,
2122 .flags
= CLK_SET_RATE_PARENT
,
2127 static struct clk_branch camss_vfe1_clk
= {
2130 .enable_reg
= 0x36ac,
2131 .enable_mask
= BIT(0),
2132 .hw
.init
= &(struct clk_init_data
){
2133 .name
= "camss_vfe1_clk",
2134 .parent_hws
= (const struct clk_hw
*[]){ &vfe1_clk_src
.clkr
.hw
},
2136 .ops
= &clk_branch2_ops
,
2137 .flags
= CLK_SET_RATE_PARENT
,
2142 static struct clk_branch camss_cpp_clk
= {
2145 .enable_reg
= 0x36b0,
2146 .enable_mask
= BIT(0),
2147 .hw
.init
= &(struct clk_init_data
){
2148 .name
= "camss_cpp_clk",
2149 .parent_hws
= (const struct clk_hw
*[]){ &cpp_clk_src
.clkr
.hw
},
2151 .ops
= &clk_branch2_ops
,
2152 .flags
= CLK_SET_RATE_PARENT
,
2157 static struct clk_branch camss_cpp_ahb_clk
= {
2160 .enable_reg
= 0x36b4,
2161 .enable_mask
= BIT(0),
2162 .hw
.init
= &(struct clk_init_data
){
2163 .name
= "camss_cpp_ahb_clk",
2164 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2166 .ops
= &clk_branch2_ops
,
2167 .flags
= CLK_SET_RATE_PARENT
,
2172 static struct clk_branch camss_vfe_vbif_ahb_clk
= {
2175 .enable_reg
= 0x36b8,
2176 .enable_mask
= BIT(0),
2177 .hw
.init
= &(struct clk_init_data
){
2178 .name
= "camss_vfe_vbif_ahb_clk",
2179 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2181 .ops
= &clk_branch2_ops
,
2182 .flags
= CLK_SET_RATE_PARENT
,
2187 static struct clk_branch camss_vfe_vbif_axi_clk
= {
2190 .enable_reg
= 0x36bc,
2191 .enable_mask
= BIT(0),
2192 .hw
.init
= &(struct clk_init_data
){
2193 .name
= "camss_vfe_vbif_axi_clk",
2194 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
2196 .ops
= &clk_branch2_ops
,
2201 static struct clk_branch camss_cpp_axi_clk
= {
2204 .enable_reg
= 0x36c4,
2205 .enable_mask
= BIT(0),
2206 .hw
.init
= &(struct clk_init_data
){
2207 .name
= "camss_cpp_axi_clk",
2208 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
2210 .ops
= &clk_branch2_ops
,
2215 static struct clk_branch camss_cpp_vbif_ahb_clk
= {
2218 .enable_reg
= 0x36c8,
2219 .enable_mask
= BIT(0),
2220 .hw
.init
= &(struct clk_init_data
){
2221 .name
= "camss_cpp_vbif_ahb_clk",
2222 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2224 .ops
= &clk_branch2_ops
,
2225 .flags
= CLK_SET_RATE_PARENT
,
2230 static struct clk_branch camss_csi_vfe0_clk
= {
2233 .enable_reg
= 0x3704,
2234 .enable_mask
= BIT(0),
2235 .hw
.init
= &(struct clk_init_data
){
2236 .name
= "camss_csi_vfe0_clk",
2237 .parent_hws
= (const struct clk_hw
*[]){ &vfe0_clk_src
.clkr
.hw
},
2239 .ops
= &clk_branch2_ops
,
2240 .flags
= CLK_SET_RATE_PARENT
,
2245 static struct clk_branch camss_csi_vfe1_clk
= {
2248 .enable_reg
= 0x3714,
2249 .enable_mask
= BIT(0),
2250 .hw
.init
= &(struct clk_init_data
){
2251 .name
= "camss_csi_vfe1_clk",
2252 .parent_hws
= (const struct clk_hw
*[]){ &vfe1_clk_src
.clkr
.hw
},
2254 .ops
= &clk_branch2_ops
,
2255 .flags
= CLK_SET_RATE_PARENT
,
2260 static struct clk_branch camss_vfe0_stream_clk
= {
2263 .enable_reg
= 0x3720,
2264 .enable_mask
= BIT(0),
2265 .hw
.init
= &(struct clk_init_data
){
2266 .name
= "camss_vfe0_stream_clk",
2267 .parent_hws
= (const struct clk_hw
*[]){ &vfe0_clk_src
.clkr
.hw
},
2269 .ops
= &clk_branch2_ops
,
2270 .flags
= CLK_SET_RATE_PARENT
,
2275 static struct clk_branch camss_vfe1_stream_clk
= {
2278 .enable_reg
= 0x3724,
2279 .enable_mask
= BIT(0),
2280 .hw
.init
= &(struct clk_init_data
){
2281 .name
= "camss_vfe1_stream_clk",
2282 .parent_hws
= (const struct clk_hw
*[]){ &vfe1_clk_src
.clkr
.hw
},
2284 .ops
= &clk_branch2_ops
,
2285 .flags
= CLK_SET_RATE_PARENT
,
2290 static struct clk_branch camss_cphy_csid0_clk
= {
2293 .enable_reg
= 0x3730,
2294 .enable_mask
= BIT(0),
2295 .hw
.init
= &(struct clk_init_data
){
2296 .name
= "camss_cphy_csid0_clk",
2297 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2299 .ops
= &clk_branch2_ops
,
2300 .flags
= CLK_SET_RATE_PARENT
,
2305 static struct clk_branch camss_cphy_csid1_clk
= {
2308 .enable_reg
= 0x3734,
2309 .enable_mask
= BIT(0),
2310 .hw
.init
= &(struct clk_init_data
){
2311 .name
= "camss_cphy_csid1_clk",
2312 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2314 .ops
= &clk_branch2_ops
,
2315 .flags
= CLK_SET_RATE_PARENT
,
2320 static struct clk_branch camss_cphy_csid2_clk
= {
2323 .enable_reg
= 0x3738,
2324 .enable_mask
= BIT(0),
2325 .hw
.init
= &(struct clk_init_data
){
2326 .name
= "camss_cphy_csid2_clk",
2327 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2329 .ops
= &clk_branch2_ops
,
2330 .flags
= CLK_SET_RATE_PARENT
,
2335 static struct clk_branch camss_cphy_csid3_clk
= {
2338 .enable_reg
= 0x373c,
2339 .enable_mask
= BIT(0),
2340 .hw
.init
= &(struct clk_init_data
){
2341 .name
= "camss_cphy_csid3_clk",
2342 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2344 .ops
= &clk_branch2_ops
,
2345 .flags
= CLK_SET_RATE_PARENT
,
2350 static struct clk_branch camss_csiphy0_clk
= {
2353 .enable_reg
= 0x3740,
2354 .enable_mask
= BIT(0),
2355 .hw
.init
= &(struct clk_init_data
){
2356 .name
= "camss_csiphy0_clk",
2357 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2359 .ops
= &clk_branch2_ops
,
2360 .flags
= CLK_SET_RATE_PARENT
,
2365 static struct clk_branch camss_csiphy1_clk
= {
2368 .enable_reg
= 0x3744,
2369 .enable_mask
= BIT(0),
2370 .hw
.init
= &(struct clk_init_data
){
2371 .name
= "camss_csiphy1_clk",
2372 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2374 .ops
= &clk_branch2_ops
,
2375 .flags
= CLK_SET_RATE_PARENT
,
2380 static struct clk_branch camss_csiphy2_clk
= {
2383 .enable_reg
= 0x3748,
2384 .enable_mask
= BIT(0),
2385 .hw
.init
= &(struct clk_init_data
){
2386 .name
= "camss_csiphy2_clk",
2387 .parent_hws
= (const struct clk_hw
*[]){ &csiphy_clk_src
.clkr
.hw
},
2389 .ops
= &clk_branch2_ops
,
2390 .flags
= CLK_SET_RATE_PARENT
,
2395 static struct clk_branch fd_core_clk
= {
2398 .enable_reg
= 0x3b68,
2399 .enable_mask
= BIT(0),
2400 .hw
.init
= &(struct clk_init_data
){
2401 .name
= "fd_core_clk",
2402 .parent_hws
= (const struct clk_hw
*[]){ &fd_core_clk_src
.clkr
.hw
},
2404 .ops
= &clk_branch2_ops
,
2405 .flags
= CLK_SET_RATE_PARENT
,
2410 static struct clk_branch fd_core_uar_clk
= {
2413 .enable_reg
= 0x3b6c,
2414 .enable_mask
= BIT(0),
2415 .hw
.init
= &(struct clk_init_data
){
2416 .name
= "fd_core_uar_clk",
2417 .parent_hws
= (const struct clk_hw
*[]){ &fd_core_clk_src
.clkr
.hw
},
2419 .ops
= &clk_branch2_ops
,
2420 .flags
= CLK_SET_RATE_PARENT
,
2425 static struct clk_branch fd_ahb_clk
= {
2428 .enable_reg
= 0x3b74,
2429 .enable_mask
= BIT(0),
2430 .hw
.init
= &(struct clk_init_data
){
2431 .name
= "fd_ahb_clk",
2432 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2434 .ops
= &clk_branch2_ops
,
2435 .flags
= CLK_SET_RATE_PARENT
,
2440 static struct clk_branch mnoc_ahb_clk
= {
2442 .halt_check
= BRANCH_HALT_SKIP
,
2444 .enable_reg
= 0x5024,
2445 .enable_mask
= BIT(0),
2446 .hw
.init
= &(struct clk_init_data
){
2447 .name
= "mnoc_ahb_clk",
2448 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2450 .ops
= &clk_branch2_ops
,
2451 .flags
= CLK_SET_RATE_PARENT
,
2456 static struct clk_branch bimc_smmu_ahb_clk
= {
2458 .halt_check
= BRANCH_HALT_SKIP
,
2462 .enable_reg
= 0xe004,
2463 .enable_mask
= BIT(0),
2464 .hw
.init
= &(struct clk_init_data
){
2465 .name
= "bimc_smmu_ahb_clk",
2466 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2468 .ops
= &clk_branch2_ops
,
2469 .flags
= CLK_SET_RATE_PARENT
,
2474 static struct clk_branch bimc_smmu_axi_clk
= {
2476 .halt_check
= BRANCH_HALT_SKIP
,
2480 .enable_reg
= 0xe008,
2481 .enable_mask
= BIT(0),
2482 .hw
.init
= &(struct clk_init_data
){
2483 .name
= "bimc_smmu_axi_clk",
2484 .parent_hws
= (const struct clk_hw
*[]){ &axi_clk_src
.clkr
.hw
},
2486 .ops
= &clk_branch2_ops
,
2491 static struct clk_branch mnoc_maxi_clk
= {
2494 .enable_reg
= 0xf004,
2495 .enable_mask
= BIT(0),
2496 .hw
.init
= &(struct clk_init_data
){
2497 .name
= "mnoc_maxi_clk",
2498 .parent_hws
= (const struct clk_hw
*[]){ &maxi_clk_src
.clkr
.hw
},
2500 .ops
= &clk_branch2_ops
,
2501 .flags
= CLK_SET_RATE_PARENT
,
2506 static struct clk_branch vmem_maxi_clk
= {
2509 .enable_reg
= 0xf064,
2510 .enable_mask
= BIT(0),
2511 .hw
.init
= &(struct clk_init_data
){
2512 .name
= "vmem_maxi_clk",
2513 .parent_hws
= (const struct clk_hw
*[]){ &maxi_clk_src
.clkr
.hw
},
2515 .ops
= &clk_branch2_ops
,
2516 .flags
= CLK_SET_RATE_PARENT
,
2521 static struct clk_branch vmem_ahb_clk
= {
2524 .enable_reg
= 0xf068,
2525 .enable_mask
= BIT(0),
2526 .hw
.init
= &(struct clk_init_data
){
2527 .name
= "vmem_ahb_clk",
2528 .parent_hws
= (const struct clk_hw
*[]){ &ahb_clk_src
.clkr
.hw
},
2530 .ops
= &clk_branch2_ops
,
2531 .flags
= CLK_SET_RATE_PARENT
,
2536 static struct gdsc video_top_gdsc
= {
2538 .cxcs
= (unsigned int []){ 0x1028, 0x1034, 0x1038 },
2541 .name
= "video_top",
2543 .pwrsts
= PWRSTS_OFF_ON
,
2546 static struct gdsc video_subcore0_gdsc
= {
2548 .cxcs
= (unsigned int []){ 0x1048 },
2551 .name
= "video_subcore0",
2553 .parent
= &video_top_gdsc
.pd
,
2554 .pwrsts
= PWRSTS_OFF_ON
,
2558 static struct gdsc video_subcore1_gdsc
= {
2560 .cxcs
= (unsigned int []){ 0x104c },
2563 .name
= "video_subcore1",
2565 .parent
= &video_top_gdsc
.pd
,
2566 .pwrsts
= PWRSTS_OFF_ON
,
2570 static struct gdsc mdss_gdsc
= {
2572 .cxcs
= (unsigned int []){ 0x2310, 0x2350, 0x231c, 0x2320 },
2577 .pwrsts
= PWRSTS_OFF_ON
,
2580 static struct gdsc camss_top_gdsc
= {
2582 .cxcs
= (unsigned int []){ 0x35b8, 0x36c4, 0x3704, 0x3714, 0x3494,
2586 .name
= "camss_top",
2588 .pwrsts
= PWRSTS_OFF_ON
,
2591 static struct gdsc camss_vfe0_gdsc
= {
2594 .name
= "camss_vfe0",
2596 .parent
= &camss_top_gdsc
.pd
,
2597 .pwrsts
= PWRSTS_OFF_ON
,
2600 static struct gdsc camss_vfe1_gdsc
= {
2603 .name
= "camss_vfe1_gdsc",
2605 .parent
= &camss_top_gdsc
.pd
,
2606 .pwrsts
= PWRSTS_OFF_ON
,
2609 static struct gdsc camss_cpp_gdsc
= {
2612 .name
= "camss_cpp",
2614 .parent
= &camss_top_gdsc
.pd
,
2615 .pwrsts
= PWRSTS_OFF_ON
,
2618 static struct gdsc bimc_smmu_gdsc
= {
2620 .gds_hw_ctrl
= 0xe024,
2621 .cxcs
= (unsigned int []){ 0xe008 },
2624 .name
= "bimc_smmu",
2626 .pwrsts
= PWRSTS_OFF_ON
,
2630 static struct clk_regmap
*mmcc_msm8998_clocks
[] = {
2631 [MMPLL0
] = &mmpll0
.clkr
,
2632 [MMPLL0_OUT_EVEN
] = &mmpll0_out_even
.clkr
,
2633 [MMPLL1
] = &mmpll1
.clkr
,
2634 [MMPLL1_OUT_EVEN
] = &mmpll1_out_even
.clkr
,
2635 [MMPLL3
] = &mmpll3
.clkr
,
2636 [MMPLL3_OUT_EVEN
] = &mmpll3_out_even
.clkr
,
2637 [MMPLL4
] = &mmpll4
.clkr
,
2638 [MMPLL4_OUT_EVEN
] = &mmpll4_out_even
.clkr
,
2639 [MMPLL5
] = &mmpll5
.clkr
,
2640 [MMPLL5_OUT_EVEN
] = &mmpll5_out_even
.clkr
,
2641 [MMPLL6
] = &mmpll6
.clkr
,
2642 [MMPLL6_OUT_EVEN
] = &mmpll6_out_even
.clkr
,
2643 [MMPLL7
] = &mmpll7
.clkr
,
2644 [MMPLL7_OUT_EVEN
] = &mmpll7_out_even
.clkr
,
2645 [MMPLL10
] = &mmpll10
.clkr
,
2646 [MMPLL10_OUT_EVEN
] = &mmpll10_out_even
.clkr
,
2647 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
2648 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
2649 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
2650 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
2651 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
2652 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
2653 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
2654 [CSI3_CLK_SRC
] = &csi3_clk_src
.clkr
,
2655 [CSIPHY_CLK_SRC
] = &csiphy_clk_src
.clkr
,
2656 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
2657 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
2658 [CSI2PHYTIMER_CLK_SRC
] = &csi2phytimer_clk_src
.clkr
,
2659 [DP_AUX_CLK_SRC
] = &dp_aux_clk_src
.clkr
,
2660 [DP_CRYPTO_CLK_SRC
] = &dp_crypto_clk_src
.clkr
,
2661 [DP_LINK_CLK_SRC
] = &dp_link_clk_src
.clkr
,
2662 [DP_PIXEL_CLK_SRC
] = &dp_pixel_clk_src
.clkr
,
2663 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
2664 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
2665 [EXTPCLK_CLK_SRC
] = &extpclk_clk_src
.clkr
,
2666 [FD_CORE_CLK_SRC
] = &fd_core_clk_src
.clkr
,
2667 [HDMI_CLK_SRC
] = &hdmi_clk_src
.clkr
,
2668 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
2669 [MAXI_CLK_SRC
] = &maxi_clk_src
.clkr
,
2670 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
2671 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
2672 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
2673 [MCLK3_CLK_SRC
] = &mclk3_clk_src
.clkr
,
2674 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
2675 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
2676 [AHB_CLK_SRC
] = &ahb_clk_src
.clkr
,
2677 [AXI_CLK_SRC
] = &axi_clk_src
.clkr
,
2678 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
2679 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
2680 [ROT_CLK_SRC
] = &rot_clk_src
.clkr
,
2681 [VIDEO_CORE_CLK_SRC
] = &video_core_clk_src
.clkr
,
2682 [VIDEO_SUBCORE0_CLK_SRC
] = &video_subcore0_clk_src
.clkr
,
2683 [VIDEO_SUBCORE1_CLK_SRC
] = &video_subcore1_clk_src
.clkr
,
2684 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
2685 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
2686 [MISC_AHB_CLK
] = &misc_ahb_clk
.clkr
,
2687 [VIDEO_CORE_CLK
] = &video_core_clk
.clkr
,
2688 [VIDEO_AHB_CLK
] = &video_ahb_clk
.clkr
,
2689 [VIDEO_AXI_CLK
] = &video_axi_clk
.clkr
,
2690 [VIDEO_MAXI_CLK
] = &video_maxi_clk
.clkr
,
2691 [VIDEO_SUBCORE0_CLK
] = &video_subcore0_clk
.clkr
,
2692 [VIDEO_SUBCORE1_CLK
] = &video_subcore1_clk
.clkr
,
2693 [MDSS_AHB_CLK
] = &mdss_ahb_clk
.clkr
,
2694 [MDSS_HDMI_DP_AHB_CLK
] = &mdss_hdmi_dp_ahb_clk
.clkr
,
2695 [MDSS_AXI_CLK
] = &mdss_axi_clk
.clkr
,
2696 [MDSS_PCLK0_CLK
] = &mdss_pclk0_clk
.clkr
,
2697 [MDSS_PCLK1_CLK
] = &mdss_pclk1_clk
.clkr
,
2698 [MDSS_MDP_CLK
] = &mdss_mdp_clk
.clkr
,
2699 [MDSS_MDP_LUT_CLK
] = &mdss_mdp_lut_clk
.clkr
,
2700 [MDSS_EXTPCLK_CLK
] = &mdss_extpclk_clk
.clkr
,
2701 [MDSS_VSYNC_CLK
] = &mdss_vsync_clk
.clkr
,
2702 [MDSS_HDMI_CLK
] = &mdss_hdmi_clk
.clkr
,
2703 [MDSS_BYTE0_CLK
] = &mdss_byte0_clk
.clkr
,
2704 [MDSS_BYTE1_CLK
] = &mdss_byte1_clk
.clkr
,
2705 [MDSS_ESC0_CLK
] = &mdss_esc0_clk
.clkr
,
2706 [MDSS_ESC1_CLK
] = &mdss_esc1_clk
.clkr
,
2707 [MDSS_ROT_CLK
] = &mdss_rot_clk
.clkr
,
2708 [MDSS_DP_LINK_CLK
] = &mdss_dp_link_clk
.clkr
,
2709 [MDSS_DP_LINK_INTF_CLK
] = &mdss_dp_link_intf_clk
.clkr
,
2710 [MDSS_DP_CRYPTO_CLK
] = &mdss_dp_crypto_clk
.clkr
,
2711 [MDSS_DP_PIXEL_CLK
] = &mdss_dp_pixel_clk
.clkr
,
2712 [MDSS_DP_AUX_CLK
] = &mdss_dp_aux_clk
.clkr
,
2713 [MDSS_BYTE0_INTF_CLK
] = &mdss_byte0_intf_clk
.clkr
,
2714 [MDSS_BYTE1_INTF_CLK
] = &mdss_byte1_intf_clk
.clkr
,
2715 [CAMSS_CSI0PHYTIMER_CLK
] = &camss_csi0phytimer_clk
.clkr
,
2716 [CAMSS_CSI1PHYTIMER_CLK
] = &camss_csi1phytimer_clk
.clkr
,
2717 [CAMSS_CSI2PHYTIMER_CLK
] = &camss_csi2phytimer_clk
.clkr
,
2718 [CAMSS_CSI0_CLK
] = &camss_csi0_clk
.clkr
,
2719 [CAMSS_CSI0_AHB_CLK
] = &camss_csi0_ahb_clk
.clkr
,
2720 [CAMSS_CSI0RDI_CLK
] = &camss_csi0rdi_clk
.clkr
,
2721 [CAMSS_CSI0PIX_CLK
] = &camss_csi0pix_clk
.clkr
,
2722 [CAMSS_CSI1_CLK
] = &camss_csi1_clk
.clkr
,
2723 [CAMSS_CSI1_AHB_CLK
] = &camss_csi1_ahb_clk
.clkr
,
2724 [CAMSS_CSI1RDI_CLK
] = &camss_csi1rdi_clk
.clkr
,
2725 [CAMSS_CSI1PIX_CLK
] = &camss_csi1pix_clk
.clkr
,
2726 [CAMSS_CSI2_CLK
] = &camss_csi2_clk
.clkr
,
2727 [CAMSS_CSI2_AHB_CLK
] = &camss_csi2_ahb_clk
.clkr
,
2728 [CAMSS_CSI2RDI_CLK
] = &camss_csi2rdi_clk
.clkr
,
2729 [CAMSS_CSI2PIX_CLK
] = &camss_csi2pix_clk
.clkr
,
2730 [CAMSS_CSI3_CLK
] = &camss_csi3_clk
.clkr
,
2731 [CAMSS_CSI3_AHB_CLK
] = &camss_csi3_ahb_clk
.clkr
,
2732 [CAMSS_CSI3RDI_CLK
] = &camss_csi3rdi_clk
.clkr
,
2733 [CAMSS_CSI3PIX_CLK
] = &camss_csi3pix_clk
.clkr
,
2734 [CAMSS_ISPIF_AHB_CLK
] = &camss_ispif_ahb_clk
.clkr
,
2735 [CAMSS_CCI_CLK
] = &camss_cci_clk
.clkr
,
2736 [CAMSS_CCI_AHB_CLK
] = &camss_cci_ahb_clk
.clkr
,
2737 [CAMSS_MCLK0_CLK
] = &camss_mclk0_clk
.clkr
,
2738 [CAMSS_MCLK1_CLK
] = &camss_mclk1_clk
.clkr
,
2739 [CAMSS_MCLK2_CLK
] = &camss_mclk2_clk
.clkr
,
2740 [CAMSS_MCLK3_CLK
] = &camss_mclk3_clk
.clkr
,
2741 [CAMSS_TOP_AHB_CLK
] = &camss_top_ahb_clk
.clkr
,
2742 [CAMSS_AHB_CLK
] = &camss_ahb_clk
.clkr
,
2743 [CAMSS_MICRO_AHB_CLK
] = &camss_micro_ahb_clk
.clkr
,
2744 [CAMSS_JPEG0_CLK
] = &camss_jpeg0_clk
.clkr
,
2745 [CAMSS_JPEG_AHB_CLK
] = &camss_jpeg_ahb_clk
.clkr
,
2746 [CAMSS_JPEG_AXI_CLK
] = &camss_jpeg_axi_clk
.clkr
,
2747 [CAMSS_VFE0_AHB_CLK
] = &camss_vfe0_ahb_clk
.clkr
,
2748 [CAMSS_VFE1_AHB_CLK
] = &camss_vfe1_ahb_clk
.clkr
,
2749 [CAMSS_VFE0_CLK
] = &camss_vfe0_clk
.clkr
,
2750 [CAMSS_VFE1_CLK
] = &camss_vfe1_clk
.clkr
,
2751 [CAMSS_CPP_CLK
] = &camss_cpp_clk
.clkr
,
2752 [CAMSS_CPP_AHB_CLK
] = &camss_cpp_ahb_clk
.clkr
,
2753 [CAMSS_VFE_VBIF_AHB_CLK
] = &camss_vfe_vbif_ahb_clk
.clkr
,
2754 [CAMSS_VFE_VBIF_AXI_CLK
] = &camss_vfe_vbif_axi_clk
.clkr
,
2755 [CAMSS_CPP_AXI_CLK
] = &camss_cpp_axi_clk
.clkr
,
2756 [CAMSS_CPP_VBIF_AHB_CLK
] = &camss_cpp_vbif_ahb_clk
.clkr
,
2757 [CAMSS_CSI_VFE0_CLK
] = &camss_csi_vfe0_clk
.clkr
,
2758 [CAMSS_CSI_VFE1_CLK
] = &camss_csi_vfe1_clk
.clkr
,
2759 [CAMSS_VFE0_STREAM_CLK
] = &camss_vfe0_stream_clk
.clkr
,
2760 [CAMSS_VFE1_STREAM_CLK
] = &camss_vfe1_stream_clk
.clkr
,
2761 [CAMSS_CPHY_CSID0_CLK
] = &camss_cphy_csid0_clk
.clkr
,
2762 [CAMSS_CPHY_CSID1_CLK
] = &camss_cphy_csid1_clk
.clkr
,
2763 [CAMSS_CPHY_CSID2_CLK
] = &camss_cphy_csid2_clk
.clkr
,
2764 [CAMSS_CPHY_CSID3_CLK
] = &camss_cphy_csid3_clk
.clkr
,
2765 [CAMSS_CSIPHY0_CLK
] = &camss_csiphy0_clk
.clkr
,
2766 [CAMSS_CSIPHY1_CLK
] = &camss_csiphy1_clk
.clkr
,
2767 [CAMSS_CSIPHY2_CLK
] = &camss_csiphy2_clk
.clkr
,
2768 [FD_CORE_CLK
] = &fd_core_clk
.clkr
,
2769 [FD_CORE_UAR_CLK
] = &fd_core_uar_clk
.clkr
,
2770 [FD_AHB_CLK
] = &fd_ahb_clk
.clkr
,
2771 [MNOC_AHB_CLK
] = &mnoc_ahb_clk
.clkr
,
2772 [BIMC_SMMU_AHB_CLK
] = &bimc_smmu_ahb_clk
.clkr
,
2773 [BIMC_SMMU_AXI_CLK
] = &bimc_smmu_axi_clk
.clkr
,
2774 [MNOC_MAXI_CLK
] = &mnoc_maxi_clk
.clkr
,
2775 [VMEM_MAXI_CLK
] = &vmem_maxi_clk
.clkr
,
2776 [VMEM_AHB_CLK
] = &vmem_ahb_clk
.clkr
,
2779 static struct gdsc
*mmcc_msm8998_gdscs
[] = {
2780 [VIDEO_TOP_GDSC
] = &video_top_gdsc
,
2781 [VIDEO_SUBCORE0_GDSC
] = &video_subcore0_gdsc
,
2782 [VIDEO_SUBCORE1_GDSC
] = &video_subcore1_gdsc
,
2783 [MDSS_GDSC
] = &mdss_gdsc
,
2784 [CAMSS_TOP_GDSC
] = &camss_top_gdsc
,
2785 [CAMSS_VFE0_GDSC
] = &camss_vfe0_gdsc
,
2786 [CAMSS_VFE1_GDSC
] = &camss_vfe1_gdsc
,
2787 [CAMSS_CPP_GDSC
] = &camss_cpp_gdsc
,
2788 [BIMC_SMMU_GDSC
] = &bimc_smmu_gdsc
,
2791 static const struct qcom_reset_map mmcc_msm8998_resets
[] = {
2792 [SPDM_BCR
] = { 0x200 },
2793 [SPDM_RM_BCR
] = { 0x300 },
2794 [MISC_BCR
] = { 0x320 },
2795 [VIDEO_TOP_BCR
] = { 0x1020 },
2796 [THROTTLE_VIDEO_BCR
] = { 0x1180 },
2797 [MDSS_BCR
] = { 0x2300 },
2798 [THROTTLE_MDSS_BCR
] = { 0x2460 },
2799 [CAMSS_PHY0_BCR
] = { 0x3020 },
2800 [CAMSS_PHY1_BCR
] = { 0x3050 },
2801 [CAMSS_PHY2_BCR
] = { 0x3080 },
2802 [CAMSS_CSI0_BCR
] = { 0x30b0 },
2803 [CAMSS_CSI0RDI_BCR
] = { 0x30d0 },
2804 [CAMSS_CSI0PIX_BCR
] = { 0x30e0 },
2805 [CAMSS_CSI1_BCR
] = { 0x3120 },
2806 [CAMSS_CSI1RDI_BCR
] = { 0x3140 },
2807 [CAMSS_CSI1PIX_BCR
] = { 0x3150 },
2808 [CAMSS_CSI2_BCR
] = { 0x3180 },
2809 [CAMSS_CSI2RDI_BCR
] = { 0x31a0 },
2810 [CAMSS_CSI2PIX_BCR
] = { 0x31b0 },
2811 [CAMSS_CSI3_BCR
] = { 0x31e0 },
2812 [CAMSS_CSI3RDI_BCR
] = { 0x3200 },
2813 [CAMSS_CSI3PIX_BCR
] = { 0x3210 },
2814 [CAMSS_ISPIF_BCR
] = { 0x3220 },
2815 [CAMSS_CCI_BCR
] = { 0x3340 },
2816 [CAMSS_TOP_BCR
] = { 0x3480 },
2817 [CAMSS_AHB_BCR
] = { 0x3488 },
2818 [CAMSS_MICRO_BCR
] = { 0x3490 },
2819 [CAMSS_JPEG_BCR
] = { 0x35a0 },
2820 [CAMSS_VFE0_BCR
] = { 0x3660 },
2821 [CAMSS_VFE1_BCR
] = { 0x3670 },
2822 [CAMSS_VFE_VBIF_BCR
] = { 0x36a0 },
2823 [CAMSS_CPP_TOP_BCR
] = { 0x36c0 },
2824 [CAMSS_CPP_BCR
] = { 0x36d0 },
2825 [CAMSS_CSI_VFE0_BCR
] = { 0x3700 },
2826 [CAMSS_CSI_VFE1_BCR
] = { 0x3710 },
2827 [CAMSS_FD_BCR
] = { 0x3b60 },
2828 [THROTTLE_CAMSS_BCR
] = { 0x3c30 },
2829 [MNOCAHB_BCR
] = { 0x5020 },
2830 [MNOCAXI_BCR
] = { 0xd020 },
2831 [BMIC_SMMU_BCR
] = { 0xe000 },
2832 [MNOC_MAXI_BCR
] = { 0xf000 },
2833 [VMEM_BCR
] = { 0xf060 },
2834 [BTO_BCR
] = { 0x10004 },
2837 static const struct regmap_config mmcc_msm8998_regmap_config
= {
2841 .max_register
= 0x10004,
2845 static const struct qcom_cc_desc mmcc_msm8998_desc
= {
2846 .config
= &mmcc_msm8998_regmap_config
,
2847 .clks
= mmcc_msm8998_clocks
,
2848 .num_clks
= ARRAY_SIZE(mmcc_msm8998_clocks
),
2849 .resets
= mmcc_msm8998_resets
,
2850 .num_resets
= ARRAY_SIZE(mmcc_msm8998_resets
),
2851 .gdscs
= mmcc_msm8998_gdscs
,
2852 .num_gdscs
= ARRAY_SIZE(mmcc_msm8998_gdscs
),
2855 static const struct of_device_id mmcc_msm8998_match_table
[] = {
2856 { .compatible
= "qcom,mmcc-msm8998" },
2859 MODULE_DEVICE_TABLE(of
, mmcc_msm8998_match_table
);
2861 static int mmcc_msm8998_probe(struct platform_device
*pdev
)
2863 struct regmap
*regmap
;
2865 regmap
= qcom_cc_map(pdev
, &mmcc_msm8998_desc
);
2867 return PTR_ERR(regmap
);
2869 return qcom_cc_really_probe(&pdev
->dev
, &mmcc_msm8998_desc
, regmap
);
2872 static struct platform_driver mmcc_msm8998_driver
= {
2873 .probe
= mmcc_msm8998_probe
,
2875 .name
= "mmcc-msm8998",
2876 .of_match_table
= mmcc_msm8998_match_table
,
2879 module_platform_driver(mmcc_msm8998_driver
);
2881 MODULE_DESCRIPTION("QCOM MMCC MSM8998 Driver");
2882 MODULE_LICENSE("GPL v2");