1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2015, 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/of_device.h>
13 #include <linux/clk-provider.h>
14 #include <linux/regmap.h>
15 #include <linux/reset-controller.h>
16 #include <linux/clk.h>
18 #include <dt-bindings/clock/qcom,mmcc-msm8996.h>
21 #include "clk-regmap.h"
22 #include "clk-regmap-divider.h"
23 #include "clk-alpha-pll.h"
25 #include "clk-branch.h"
48 static const struct parent_map mmss_xo_hdmi_map
[] = {
53 static const char * const mmss_xo_hdmi
[] = {
58 static const struct parent_map mmss_xo_dsi0pll_dsi1pll_map
[] = {
64 static const char * const mmss_xo_dsi0pll_dsi1pll
[] = {
70 static const struct parent_map mmss_xo_gpll0_gpll0_div_map
[] = {
76 static const char * const mmss_xo_gpll0_gpll0_div
[] = {
82 static const struct parent_map mmss_xo_dsibyte_map
[] = {
84 { P_DSI0PLL_BYTE
, 1 },
88 static const char * const mmss_xo_dsibyte
[] = {
94 static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map
[] = {
101 static const char * const mmss_xo_mmpll0_gpll0_gpll0_div
[] = {
108 static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
[] = {
116 static const char * const mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
[] = {
124 static const struct parent_map mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div_map
[] = {
132 static const char * const mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div
[] = {
140 static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map
[] = {
148 static const char * const mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
[] = {
156 static const struct parent_map mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
[] = {
164 static const char * const mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
[] = {
172 static const struct parent_map mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_map
[] = {
181 static const char * const mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0
[] = {
190 static const struct parent_map mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_gpll0_div_map
[] = {
200 static const char * const mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_gpll0_div
[] = {
210 static const struct parent_map mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
[] = {
220 static const char * const mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
[] = {
230 static struct clk_fixed_factor gpll0_div
= {
233 .hw
.init
= &(struct clk_init_data
){
235 .parent_names
= (const char *[]){ "gpll0" },
237 .ops
= &clk_fixed_factor_ops
,
241 static struct pll_vco mmpll_p_vco
[] = {
242 { 250000000, 500000000, 3 },
243 { 500000000, 1000000000, 2 },
244 { 1000000000, 1500000000, 1 },
245 { 1500000000, 2000000000, 0 },
248 static struct pll_vco mmpll_gfx_vco
[] = {
249 { 400000000, 1000000000, 2 },
250 { 1000000000, 1500000000, 1 },
251 { 1500000000, 2000000000, 0 },
254 static struct pll_vco mmpll_t_vco
[] = {
255 { 500000000, 1500000000, 0 },
258 static struct clk_alpha_pll mmpll0_early
= {
260 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
261 .vco_table
= mmpll_p_vco
,
262 .num_vco
= ARRAY_SIZE(mmpll_p_vco
),
265 .enable_mask
= BIT(0),
266 .hw
.init
= &(struct clk_init_data
){
267 .name
= "mmpll0_early",
268 .parent_names
= (const char *[]){ "xo" },
270 .ops
= &clk_alpha_pll_ops
,
275 static struct clk_alpha_pll_postdiv mmpll0
= {
277 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
279 .clkr
.hw
.init
= &(struct clk_init_data
){
281 .parent_names
= (const char *[]){ "mmpll0_early" },
283 .ops
= &clk_alpha_pll_postdiv_ops
,
284 .flags
= CLK_SET_RATE_PARENT
,
288 static struct clk_alpha_pll mmpll1_early
= {
290 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
291 .vco_table
= mmpll_p_vco
,
292 .num_vco
= ARRAY_SIZE(mmpll_p_vco
),
295 .enable_mask
= BIT(1),
296 .hw
.init
= &(struct clk_init_data
){
297 .name
= "mmpll1_early",
298 .parent_names
= (const char *[]){ "xo" },
300 .ops
= &clk_alpha_pll_ops
,
305 static struct clk_alpha_pll_postdiv mmpll1
= {
307 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
309 .clkr
.hw
.init
= &(struct clk_init_data
){
311 .parent_names
= (const char *[]){ "mmpll1_early" },
313 .ops
= &clk_alpha_pll_postdiv_ops
,
314 .flags
= CLK_SET_RATE_PARENT
,
318 static struct clk_alpha_pll mmpll2_early
= {
320 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
321 .vco_table
= mmpll_gfx_vco
,
322 .num_vco
= ARRAY_SIZE(mmpll_gfx_vco
),
323 .clkr
.hw
.init
= &(struct clk_init_data
){
324 .name
= "mmpll2_early",
325 .parent_names
= (const char *[]){ "xo" },
327 .ops
= &clk_alpha_pll_ops
,
331 static struct clk_alpha_pll_postdiv mmpll2
= {
333 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
335 .clkr
.hw
.init
= &(struct clk_init_data
){
337 .parent_names
= (const char *[]){ "mmpll2_early" },
339 .ops
= &clk_alpha_pll_postdiv_ops
,
340 .flags
= CLK_SET_RATE_PARENT
,
344 static struct clk_alpha_pll mmpll3_early
= {
346 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
347 .vco_table
= mmpll_p_vco
,
348 .num_vco
= ARRAY_SIZE(mmpll_p_vco
),
349 .clkr
.hw
.init
= &(struct clk_init_data
){
350 .name
= "mmpll3_early",
351 .parent_names
= (const char *[]){ "xo" },
353 .ops
= &clk_alpha_pll_ops
,
357 static struct clk_alpha_pll_postdiv mmpll3
= {
359 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
361 .clkr
.hw
.init
= &(struct clk_init_data
){
363 .parent_names
= (const char *[]){ "mmpll3_early" },
365 .ops
= &clk_alpha_pll_postdiv_ops
,
366 .flags
= CLK_SET_RATE_PARENT
,
370 static struct clk_alpha_pll mmpll4_early
= {
372 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
373 .vco_table
= mmpll_t_vco
,
374 .num_vco
= ARRAY_SIZE(mmpll_t_vco
),
375 .clkr
.hw
.init
= &(struct clk_init_data
){
376 .name
= "mmpll4_early",
377 .parent_names
= (const char *[]){ "xo" },
379 .ops
= &clk_alpha_pll_ops
,
383 static struct clk_alpha_pll_postdiv mmpll4
= {
385 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
387 .clkr
.hw
.init
= &(struct clk_init_data
){
389 .parent_names
= (const char *[]){ "mmpll4_early" },
391 .ops
= &clk_alpha_pll_postdiv_ops
,
392 .flags
= CLK_SET_RATE_PARENT
,
396 static struct clk_alpha_pll mmpll5_early
= {
398 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
399 .vco_table
= mmpll_p_vco
,
400 .num_vco
= ARRAY_SIZE(mmpll_p_vco
),
401 .clkr
.hw
.init
= &(struct clk_init_data
){
402 .name
= "mmpll5_early",
403 .parent_names
= (const char *[]){ "xo" },
405 .ops
= &clk_alpha_pll_ops
,
409 static struct clk_alpha_pll_postdiv mmpll5
= {
411 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
413 .clkr
.hw
.init
= &(struct clk_init_data
){
415 .parent_names
= (const char *[]){ "mmpll5_early" },
417 .ops
= &clk_alpha_pll_postdiv_ops
,
418 .flags
= CLK_SET_RATE_PARENT
,
422 static struct clk_alpha_pll mmpll8_early
= {
424 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
425 .vco_table
= mmpll_gfx_vco
,
426 .num_vco
= ARRAY_SIZE(mmpll_gfx_vco
),
427 .clkr
.hw
.init
= &(struct clk_init_data
){
428 .name
= "mmpll8_early",
429 .parent_names
= (const char *[]){ "xo" },
431 .ops
= &clk_alpha_pll_ops
,
435 static struct clk_alpha_pll_postdiv mmpll8
= {
437 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
439 .clkr
.hw
.init
= &(struct clk_init_data
){
441 .parent_names
= (const char *[]){ "mmpll8_early" },
443 .ops
= &clk_alpha_pll_postdiv_ops
,
444 .flags
= CLK_SET_RATE_PARENT
,
448 static struct clk_alpha_pll mmpll9_early
= {
450 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
451 .vco_table
= mmpll_t_vco
,
452 .num_vco
= ARRAY_SIZE(mmpll_t_vco
),
453 .clkr
.hw
.init
= &(struct clk_init_data
){
454 .name
= "mmpll9_early",
455 .parent_names
= (const char *[]){ "xo" },
457 .ops
= &clk_alpha_pll_ops
,
461 static struct clk_alpha_pll_postdiv mmpll9
= {
463 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
465 .clkr
.hw
.init
= &(struct clk_init_data
){
467 .parent_names
= (const char *[]){ "mmpll9_early" },
469 .ops
= &clk_alpha_pll_postdiv_ops
,
470 .flags
= CLK_SET_RATE_PARENT
,
474 static const struct freq_tbl ftbl_ahb_clk_src
[] = {
475 F(19200000, P_XO
, 1, 0, 0),
476 F(40000000, P_GPLL0_DIV
, 7.5, 0, 0),
477 F(80000000, P_MMPLL0
, 10, 0, 0),
481 static struct clk_rcg2 ahb_clk_src
= {
484 .parent_map
= mmss_xo_mmpll0_gpll0_gpll0_div_map
,
485 .freq_tbl
= ftbl_ahb_clk_src
,
486 .clkr
.hw
.init
= &(struct clk_init_data
){
487 .name
= "ahb_clk_src",
488 .parent_names
= mmss_xo_mmpll0_gpll0_gpll0_div
,
490 .ops
= &clk_rcg2_ops
,
494 static const struct freq_tbl ftbl_axi_clk_src
[] = {
495 F(19200000, P_XO
, 1, 0, 0),
496 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
497 F(100000000, P_GPLL0
, 6, 0, 0),
498 F(171430000, P_GPLL0
, 3.5, 0, 0),
499 F(200000000, P_GPLL0
, 3, 0, 0),
500 F(320000000, P_MMPLL0
, 2.5, 0, 0),
501 F(400000000, P_MMPLL0
, 2, 0, 0),
505 static struct clk_rcg2 axi_clk_src
= {
508 .parent_map
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
,
509 .freq_tbl
= ftbl_axi_clk_src
,
510 .clkr
.hw
.init
= &(struct clk_init_data
){
511 .name
= "axi_clk_src",
512 .parent_names
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
,
514 .ops
= &clk_rcg2_ops
,
518 static struct clk_rcg2 maxi_clk_src
= {
521 .parent_map
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map
,
522 .freq_tbl
= ftbl_axi_clk_src
,
523 .clkr
.hw
.init
= &(struct clk_init_data
){
524 .name
= "maxi_clk_src",
525 .parent_names
= mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div
,
527 .ops
= &clk_rcg2_ops
,
531 static struct clk_rcg2 gfx3d_clk_src
= {
534 .parent_map
= mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_map
,
535 .clkr
.hw
.init
= &(struct clk_init_data
){
536 .name
= "gfx3d_clk_src",
537 .parent_names
= mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0
,
539 .ops
= &clk_gfx3d_ops
,
540 .flags
= CLK_SET_RATE_PARENT
,
544 static const struct freq_tbl ftbl_rbbmtimer_clk_src
[] = {
545 F(19200000, P_XO
, 1, 0, 0),
549 static struct clk_rcg2 rbbmtimer_clk_src
= {
552 .parent_map
= mmss_xo_mmpll0_gpll0_gpll0_div_map
,
553 .freq_tbl
= ftbl_rbbmtimer_clk_src
,
554 .clkr
.hw
.init
= &(struct clk_init_data
){
555 .name
= "rbbmtimer_clk_src",
556 .parent_names
= mmss_xo_mmpll0_gpll0_gpll0_div
,
558 .ops
= &clk_rcg2_ops
,
562 static struct clk_rcg2 isense_clk_src
= {
565 .parent_map
= mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_gpll0_div_map
,
566 .clkr
.hw
.init
= &(struct clk_init_data
){
567 .name
= "isense_clk_src",
568 .parent_names
= mmss_xo_mmpll0_mmpll9_mmpll2_mmpll8_gpll0_gpll0_div
,
570 .ops
= &clk_rcg2_ops
,
574 static const struct freq_tbl ftbl_rbcpr_clk_src
[] = {
575 F(19200000, P_XO
, 1, 0, 0),
576 F(50000000, P_GPLL0
, 12, 0, 0),
580 static struct clk_rcg2 rbcpr_clk_src
= {
583 .parent_map
= mmss_xo_mmpll0_gpll0_gpll0_div_map
,
584 .freq_tbl
= ftbl_rbcpr_clk_src
,
585 .clkr
.hw
.init
= &(struct clk_init_data
){
586 .name
= "rbcpr_clk_src",
587 .parent_names
= mmss_xo_mmpll0_gpll0_gpll0_div
,
589 .ops
= &clk_rcg2_ops
,
593 static const struct freq_tbl ftbl_video_core_clk_src
[] = {
594 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
595 F(150000000, P_GPLL0
, 4, 0, 0),
596 F(346666667, P_MMPLL3
, 3, 0, 0),
597 F(520000000, P_MMPLL3
, 2, 0, 0),
601 static struct clk_rcg2 video_core_clk_src
= {
605 .parent_map
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div_map
,
606 .freq_tbl
= ftbl_video_core_clk_src
,
607 .clkr
.hw
.init
= &(struct clk_init_data
){
608 .name
= "video_core_clk_src",
609 .parent_names
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div
,
611 .ops
= &clk_rcg2_ops
,
615 static struct clk_rcg2 video_subcore0_clk_src
= {
619 .parent_map
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div_map
,
620 .freq_tbl
= ftbl_video_core_clk_src
,
621 .clkr
.hw
.init
= &(struct clk_init_data
){
622 .name
= "video_subcore0_clk_src",
623 .parent_names
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div
,
625 .ops
= &clk_rcg2_ops
,
629 static struct clk_rcg2 video_subcore1_clk_src
= {
633 .parent_map
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div_map
,
634 .freq_tbl
= ftbl_video_core_clk_src
,
635 .clkr
.hw
.init
= &(struct clk_init_data
){
636 .name
= "video_subcore1_clk_src",
637 .parent_names
= mmss_xo_mmpll0_mmpll3_gpll0_gpll0_div
,
639 .ops
= &clk_rcg2_ops
,
643 static struct clk_rcg2 pclk0_clk_src
= {
647 .parent_map
= mmss_xo_dsi0pll_dsi1pll_map
,
648 .clkr
.hw
.init
= &(struct clk_init_data
){
649 .name
= "pclk0_clk_src",
650 .parent_names
= mmss_xo_dsi0pll_dsi1pll
,
652 .ops
= &clk_pixel_ops
,
653 .flags
= CLK_SET_RATE_PARENT
,
657 static struct clk_rcg2 pclk1_clk_src
= {
661 .parent_map
= mmss_xo_dsi0pll_dsi1pll_map
,
662 .clkr
.hw
.init
= &(struct clk_init_data
){
663 .name
= "pclk1_clk_src",
664 .parent_names
= mmss_xo_dsi0pll_dsi1pll
,
666 .ops
= &clk_pixel_ops
,
667 .flags
= CLK_SET_RATE_PARENT
,
671 static const struct freq_tbl ftbl_mdp_clk_src
[] = {
672 F(85714286, P_GPLL0
, 7, 0, 0),
673 F(100000000, P_GPLL0
, 6, 0, 0),
674 F(150000000, P_GPLL0
, 4, 0, 0),
675 F(171428571, P_GPLL0
, 3.5, 0, 0),
676 F(200000000, P_GPLL0
, 3, 0, 0),
677 F(275000000, P_MMPLL5
, 3, 0, 0),
678 F(300000000, P_GPLL0
, 2, 0, 0),
679 F(330000000, P_MMPLL5
, 2.5, 0, 0),
680 F(412500000, P_MMPLL5
, 2, 0, 0),
684 static struct clk_rcg2 mdp_clk_src
= {
687 .parent_map
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map
,
688 .freq_tbl
= ftbl_mdp_clk_src
,
689 .clkr
.hw
.init
= &(struct clk_init_data
){
690 .name
= "mdp_clk_src",
691 .parent_names
= mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div
,
693 .ops
= &clk_rcg2_ops
,
697 static struct freq_tbl extpclk_freq_tbl
[] = {
698 { .src
= P_HDMIPLL
},
702 static struct clk_rcg2 extpclk_clk_src
= {
705 .parent_map
= mmss_xo_hdmi_map
,
706 .freq_tbl
= extpclk_freq_tbl
,
707 .clkr
.hw
.init
= &(struct clk_init_data
){
708 .name
= "extpclk_clk_src",
709 .parent_names
= mmss_xo_hdmi
,
711 .ops
= &clk_byte_ops
,
712 .flags
= CLK_SET_RATE_PARENT
,
716 static struct freq_tbl ftbl_mdss_vsync_clk
[] = {
717 F(19200000, P_XO
, 1, 0, 0),
721 static struct clk_rcg2 vsync_clk_src
= {
724 .parent_map
= mmss_xo_gpll0_gpll0_div_map
,
725 .freq_tbl
= ftbl_mdss_vsync_clk
,
726 .clkr
.hw
.init
= &(struct clk_init_data
){
727 .name
= "vsync_clk_src",
728 .parent_names
= mmss_xo_gpll0_gpll0_div
,
730 .ops
= &clk_rcg2_ops
,
734 static struct freq_tbl ftbl_mdss_hdmi_clk
[] = {
735 F(19200000, P_XO
, 1, 0, 0),
739 static struct clk_rcg2 hdmi_clk_src
= {
742 .parent_map
= mmss_xo_gpll0_gpll0_div_map
,
743 .freq_tbl
= ftbl_mdss_hdmi_clk
,
744 .clkr
.hw
.init
= &(struct clk_init_data
){
745 .name
= "hdmi_clk_src",
746 .parent_names
= mmss_xo_gpll0_gpll0_div
,
748 .ops
= &clk_rcg2_ops
,
752 static struct clk_rcg2 byte0_clk_src
= {
755 .parent_map
= mmss_xo_dsibyte_map
,
756 .clkr
.hw
.init
= &(struct clk_init_data
){
757 .name
= "byte0_clk_src",
758 .parent_names
= mmss_xo_dsibyte
,
760 .ops
= &clk_byte2_ops
,
761 .flags
= CLK_SET_RATE_PARENT
,
765 static struct clk_rcg2 byte1_clk_src
= {
768 .parent_map
= mmss_xo_dsibyte_map
,
769 .clkr
.hw
.init
= &(struct clk_init_data
){
770 .name
= "byte1_clk_src",
771 .parent_names
= mmss_xo_dsibyte
,
773 .ops
= &clk_byte2_ops
,
774 .flags
= CLK_SET_RATE_PARENT
,
778 static struct freq_tbl ftbl_mdss_esc0_1_clk
[] = {
779 F(19200000, P_XO
, 1, 0, 0),
783 static struct clk_rcg2 esc0_clk_src
= {
786 .parent_map
= mmss_xo_dsibyte_map
,
787 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
788 .clkr
.hw
.init
= &(struct clk_init_data
){
789 .name
= "esc0_clk_src",
790 .parent_names
= mmss_xo_dsibyte
,
792 .ops
= &clk_rcg2_ops
,
796 static struct clk_rcg2 esc1_clk_src
= {
799 .parent_map
= mmss_xo_dsibyte_map
,
800 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
801 .clkr
.hw
.init
= &(struct clk_init_data
){
802 .name
= "esc1_clk_src",
803 .parent_names
= mmss_xo_dsibyte
,
805 .ops
= &clk_rcg2_ops
,
809 static const struct freq_tbl ftbl_camss_gp0_clk_src
[] = {
810 F(10000, P_XO
, 16, 1, 120),
811 F(24000, P_XO
, 16, 1, 50),
812 F(6000000, P_GPLL0_DIV
, 10, 1, 5),
813 F(12000000, P_GPLL0_DIV
, 1, 1, 25),
814 F(13000000, P_GPLL0_DIV
, 2, 13, 150),
815 F(24000000, P_GPLL0_DIV
, 1, 2, 25),
819 static struct clk_rcg2 camss_gp0_clk_src
= {
823 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
824 .freq_tbl
= ftbl_camss_gp0_clk_src
,
825 .clkr
.hw
.init
= &(struct clk_init_data
){
826 .name
= "camss_gp0_clk_src",
827 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
829 .ops
= &clk_rcg2_ops
,
833 static struct clk_rcg2 camss_gp1_clk_src
= {
837 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
838 .freq_tbl
= ftbl_camss_gp0_clk_src
,
839 .clkr
.hw
.init
= &(struct clk_init_data
){
840 .name
= "camss_gp1_clk_src",
841 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
843 .ops
= &clk_rcg2_ops
,
847 static const struct freq_tbl ftbl_mclk0_clk_src
[] = {
848 F(4800000, P_XO
, 4, 0, 0),
849 F(6000000, P_GPLL0_DIV
, 10, 1, 5),
850 F(8000000, P_GPLL0_DIV
, 1, 2, 75),
851 F(9600000, P_XO
, 2, 0, 0),
852 F(16666667, P_GPLL0_DIV
, 2, 1, 9),
853 F(19200000, P_XO
, 1, 0, 0),
854 F(24000000, P_GPLL0_DIV
, 1, 2, 25),
855 F(33333333, P_GPLL0_DIV
, 1, 1, 9),
856 F(48000000, P_GPLL0
, 1, 2, 25),
857 F(66666667, P_GPLL0
, 1, 1, 9),
861 static struct clk_rcg2 mclk0_clk_src
= {
865 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
866 .freq_tbl
= ftbl_mclk0_clk_src
,
867 .clkr
.hw
.init
= &(struct clk_init_data
){
868 .name
= "mclk0_clk_src",
869 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
871 .ops
= &clk_rcg2_ops
,
875 static struct clk_rcg2 mclk1_clk_src
= {
879 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
880 .freq_tbl
= ftbl_mclk0_clk_src
,
881 .clkr
.hw
.init
= &(struct clk_init_data
){
882 .name
= "mclk1_clk_src",
883 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
885 .ops
= &clk_rcg2_ops
,
889 static struct clk_rcg2 mclk2_clk_src
= {
893 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
894 .freq_tbl
= ftbl_mclk0_clk_src
,
895 .clkr
.hw
.init
= &(struct clk_init_data
){
896 .name
= "mclk2_clk_src",
897 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
899 .ops
= &clk_rcg2_ops
,
903 static struct clk_rcg2 mclk3_clk_src
= {
907 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
908 .freq_tbl
= ftbl_mclk0_clk_src
,
909 .clkr
.hw
.init
= &(struct clk_init_data
){
910 .name
= "mclk3_clk_src",
911 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
913 .ops
= &clk_rcg2_ops
,
917 static const struct freq_tbl ftbl_cci_clk_src
[] = {
918 F(19200000, P_XO
, 1, 0, 0),
919 F(37500000, P_GPLL0
, 16, 0, 0),
920 F(50000000, P_GPLL0
, 12, 0, 0),
921 F(100000000, P_GPLL0
, 6, 0, 0),
925 static struct clk_rcg2 cci_clk_src
= {
929 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
930 .freq_tbl
= ftbl_cci_clk_src
,
931 .clkr
.hw
.init
= &(struct clk_init_data
){
932 .name
= "cci_clk_src",
933 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
935 .ops
= &clk_rcg2_ops
,
939 static const struct freq_tbl ftbl_csi0phytimer_clk_src
[] = {
940 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
941 F(200000000, P_GPLL0
, 3, 0, 0),
942 F(266666667, P_MMPLL0
, 3, 0, 0),
946 static struct clk_rcg2 csi0phytimer_clk_src
= {
949 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
950 .freq_tbl
= ftbl_csi0phytimer_clk_src
,
951 .clkr
.hw
.init
= &(struct clk_init_data
){
952 .name
= "csi0phytimer_clk_src",
953 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
955 .ops
= &clk_rcg2_ops
,
959 static struct clk_rcg2 csi1phytimer_clk_src
= {
962 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
963 .freq_tbl
= ftbl_csi0phytimer_clk_src
,
964 .clkr
.hw
.init
= &(struct clk_init_data
){
965 .name
= "csi1phytimer_clk_src",
966 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
968 .ops
= &clk_rcg2_ops
,
972 static struct clk_rcg2 csi2phytimer_clk_src
= {
975 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
976 .freq_tbl
= ftbl_csi0phytimer_clk_src
,
977 .clkr
.hw
.init
= &(struct clk_init_data
){
978 .name
= "csi2phytimer_clk_src",
979 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
981 .ops
= &clk_rcg2_ops
,
985 static const struct freq_tbl ftbl_csiphy0_3p_clk_src
[] = {
986 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
987 F(200000000, P_GPLL0
, 3, 0, 0),
988 F(320000000, P_MMPLL4
, 3, 0, 0),
989 F(384000000, P_MMPLL4
, 2.5, 0, 0),
993 static struct clk_rcg2 csiphy0_3p_clk_src
= {
996 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
997 .freq_tbl
= ftbl_csiphy0_3p_clk_src
,
998 .clkr
.hw
.init
= &(struct clk_init_data
){
999 .name
= "csiphy0_3p_clk_src",
1000 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1002 .ops
= &clk_rcg2_ops
,
1006 static struct clk_rcg2 csiphy1_3p_clk_src
= {
1009 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1010 .freq_tbl
= ftbl_csiphy0_3p_clk_src
,
1011 .clkr
.hw
.init
= &(struct clk_init_data
){
1012 .name
= "csiphy1_3p_clk_src",
1013 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1015 .ops
= &clk_rcg2_ops
,
1019 static struct clk_rcg2 csiphy2_3p_clk_src
= {
1022 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1023 .freq_tbl
= ftbl_csiphy0_3p_clk_src
,
1024 .clkr
.hw
.init
= &(struct clk_init_data
){
1025 .name
= "csiphy2_3p_clk_src",
1026 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1028 .ops
= &clk_rcg2_ops
,
1032 static const struct freq_tbl ftbl_jpeg0_clk_src
[] = {
1033 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
1034 F(150000000, P_GPLL0
, 4, 0, 0),
1035 F(228571429, P_MMPLL0
, 3.5, 0, 0),
1036 F(266666667, P_MMPLL0
, 3, 0, 0),
1037 F(320000000, P_MMPLL0
, 2.5, 0, 0),
1038 F(480000000, P_MMPLL4
, 2, 0, 0),
1042 static struct clk_rcg2 jpeg0_clk_src
= {
1045 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1046 .freq_tbl
= ftbl_jpeg0_clk_src
,
1047 .clkr
.hw
.init
= &(struct clk_init_data
){
1048 .name
= "jpeg0_clk_src",
1049 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1051 .ops
= &clk_rcg2_ops
,
1055 static const struct freq_tbl ftbl_jpeg2_clk_src
[] = {
1056 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
1057 F(150000000, P_GPLL0
, 4, 0, 0),
1058 F(228571429, P_MMPLL0
, 3.5, 0, 0),
1059 F(266666667, P_MMPLL0
, 3, 0, 0),
1060 F(320000000, P_MMPLL0
, 2.5, 0, 0),
1064 static struct clk_rcg2 jpeg2_clk_src
= {
1067 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1068 .freq_tbl
= ftbl_jpeg2_clk_src
,
1069 .clkr
.hw
.init
= &(struct clk_init_data
){
1070 .name
= "jpeg2_clk_src",
1071 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1073 .ops
= &clk_rcg2_ops
,
1077 static struct clk_rcg2 jpeg_dma_clk_src
= {
1080 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1081 .freq_tbl
= ftbl_jpeg0_clk_src
,
1082 .clkr
.hw
.init
= &(struct clk_init_data
){
1083 .name
= "jpeg_dma_clk_src",
1084 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1086 .ops
= &clk_rcg2_ops
,
1090 static const struct freq_tbl ftbl_vfe0_clk_src
[] = {
1091 F(75000000, P_GPLL0_DIV
, 4, 0, 0),
1092 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
1093 F(300000000, P_GPLL0
, 2, 0, 0),
1094 F(320000000, P_MMPLL0
, 2.5, 0, 0),
1095 F(480000000, P_MMPLL4
, 2, 0, 0),
1096 F(600000000, P_GPLL0
, 1, 0, 0),
1100 static struct clk_rcg2 vfe0_clk_src
= {
1103 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1104 .freq_tbl
= ftbl_vfe0_clk_src
,
1105 .clkr
.hw
.init
= &(struct clk_init_data
){
1106 .name
= "vfe0_clk_src",
1107 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1109 .ops
= &clk_rcg2_ops
,
1113 static struct clk_rcg2 vfe1_clk_src
= {
1116 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1117 .freq_tbl
= ftbl_vfe0_clk_src
,
1118 .clkr
.hw
.init
= &(struct clk_init_data
){
1119 .name
= "vfe1_clk_src",
1120 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1122 .ops
= &clk_rcg2_ops
,
1126 static const struct freq_tbl ftbl_cpp_clk_src
[] = {
1127 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
1128 F(200000000, P_GPLL0
, 3, 0, 0),
1129 F(320000000, P_MMPLL0
, 2.5, 0, 0),
1130 F(480000000, P_MMPLL4
, 2, 0, 0),
1131 F(640000000, P_MMPLL4
, 1.5, 0, 0),
1135 static struct clk_rcg2 cpp_clk_src
= {
1138 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1139 .freq_tbl
= ftbl_cpp_clk_src
,
1140 .clkr
.hw
.init
= &(struct clk_init_data
){
1141 .name
= "cpp_clk_src",
1142 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1144 .ops
= &clk_rcg2_ops
,
1148 static const struct freq_tbl ftbl_csi0_clk_src
[] = {
1149 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
1150 F(200000000, P_GPLL0
, 3, 0, 0),
1151 F(266666667, P_MMPLL0
, 3, 0, 0),
1152 F(480000000, P_MMPLL4
, 2, 0, 0),
1153 F(600000000, P_GPLL0
, 1, 0, 0),
1157 static struct clk_rcg2 csi0_clk_src
= {
1160 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1161 .freq_tbl
= ftbl_csi0_clk_src
,
1162 .clkr
.hw
.init
= &(struct clk_init_data
){
1163 .name
= "csi0_clk_src",
1164 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1166 .ops
= &clk_rcg2_ops
,
1170 static struct clk_rcg2 csi1_clk_src
= {
1173 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1174 .freq_tbl
= ftbl_csi0_clk_src
,
1175 .clkr
.hw
.init
= &(struct clk_init_data
){
1176 .name
= "csi1_clk_src",
1177 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1179 .ops
= &clk_rcg2_ops
,
1183 static struct clk_rcg2 csi2_clk_src
= {
1186 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1187 .freq_tbl
= ftbl_csi0_clk_src
,
1188 .clkr
.hw
.init
= &(struct clk_init_data
){
1189 .name
= "csi2_clk_src",
1190 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1192 .ops
= &clk_rcg2_ops
,
1196 static struct clk_rcg2 csi3_clk_src
= {
1199 .parent_map
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div_map
,
1200 .freq_tbl
= ftbl_csi0_clk_src
,
1201 .clkr
.hw
.init
= &(struct clk_init_data
){
1202 .name
= "csi3_clk_src",
1203 .parent_names
= mmss_xo_mmpll0_mmpll1_mmpll4_mmpll3_gpll0_gpll0_div
,
1205 .ops
= &clk_rcg2_ops
,
1209 static const struct freq_tbl ftbl_fd_core_clk_src
[] = {
1210 F(100000000, P_GPLL0_DIV
, 3, 0, 0),
1211 F(200000000, P_GPLL0
, 3, 0, 0),
1212 F(400000000, P_MMPLL0
, 2, 0, 0),
1216 static struct clk_rcg2 fd_core_clk_src
= {
1219 .parent_map
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div_map
,
1220 .freq_tbl
= ftbl_fd_core_clk_src
,
1221 .clkr
.hw
.init
= &(struct clk_init_data
){
1222 .name
= "fd_core_clk_src",
1223 .parent_names
= mmss_xo_mmpll0_mmpll4_gpll0_gpll0_div
,
1225 .ops
= &clk_rcg2_ops
,
1229 static struct clk_branch mmss_mmagic_ahb_clk
= {
1232 .enable_reg
= 0x5024,
1233 .enable_mask
= BIT(0),
1234 .hw
.init
= &(struct clk_init_data
){
1235 .name
= "mmss_mmagic_ahb_clk",
1236 .parent_names
= (const char *[]){ "ahb_clk_src" },
1238 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1239 .ops
= &clk_branch2_ops
,
1244 static struct clk_branch mmss_mmagic_cfg_ahb_clk
= {
1247 .enable_reg
= 0x5054,
1248 .enable_mask
= BIT(0),
1249 .hw
.init
= &(struct clk_init_data
){
1250 .name
= "mmss_mmagic_cfg_ahb_clk",
1251 .parent_names
= (const char *[]){ "ahb_clk_src" },
1253 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1254 .ops
= &clk_branch2_ops
,
1259 static struct clk_branch mmss_misc_ahb_clk
= {
1262 .enable_reg
= 0x5018,
1263 .enable_mask
= BIT(0),
1264 .hw
.init
= &(struct clk_init_data
){
1265 .name
= "mmss_misc_ahb_clk",
1266 .parent_names
= (const char *[]){ "ahb_clk_src" },
1268 .flags
= CLK_SET_RATE_PARENT
,
1269 .ops
= &clk_branch2_ops
,
1274 static struct clk_branch mmss_misc_cxo_clk
= {
1277 .enable_reg
= 0x5014,
1278 .enable_mask
= BIT(0),
1279 .hw
.init
= &(struct clk_init_data
){
1280 .name
= "mmss_misc_cxo_clk",
1281 .parent_names
= (const char *[]){ "xo" },
1283 .ops
= &clk_branch2_ops
,
1288 static struct clk_branch mmss_mmagic_maxi_clk
= {
1291 .enable_reg
= 0x5074,
1292 .enable_mask
= BIT(0),
1293 .hw
.init
= &(struct clk_init_data
){
1294 .name
= "mmss_mmagic_maxi_clk",
1295 .parent_names
= (const char *[]){ "maxi_clk_src" },
1297 .flags
= CLK_SET_RATE_PARENT
,
1298 .ops
= &clk_branch2_ops
,
1303 static struct clk_branch mmagic_camss_axi_clk
= {
1306 .enable_reg
= 0x3c44,
1307 .enable_mask
= BIT(0),
1308 .hw
.init
= &(struct clk_init_data
){
1309 .name
= "mmagic_camss_axi_clk",
1310 .parent_names
= (const char *[]){ "axi_clk_src" },
1312 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1313 .ops
= &clk_branch2_ops
,
1318 static struct clk_branch mmagic_camss_noc_cfg_ahb_clk
= {
1321 .enable_reg
= 0x3c48,
1322 .enable_mask
= BIT(0),
1323 .hw
.init
= &(struct clk_init_data
){
1324 .name
= "mmagic_camss_noc_cfg_ahb_clk",
1325 .parent_names
= (const char *[]){ "gcc_mmss_noc_cfg_ahb_clk" },
1327 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1328 .ops
= &clk_branch2_ops
,
1333 static struct clk_branch smmu_vfe_ahb_clk
= {
1336 .enable_reg
= 0x3c04,
1337 .enable_mask
= BIT(0),
1338 .hw
.init
= &(struct clk_init_data
){
1339 .name
= "smmu_vfe_ahb_clk",
1340 .parent_names
= (const char *[]){ "ahb_clk_src" },
1342 .flags
= CLK_SET_RATE_PARENT
,
1343 .ops
= &clk_branch2_ops
,
1348 static struct clk_branch smmu_vfe_axi_clk
= {
1351 .enable_reg
= 0x3c08,
1352 .enable_mask
= BIT(0),
1353 .hw
.init
= &(struct clk_init_data
){
1354 .name
= "smmu_vfe_axi_clk",
1355 .parent_names
= (const char *[]){ "axi_clk_src" },
1357 .flags
= CLK_SET_RATE_PARENT
,
1358 .ops
= &clk_branch2_ops
,
1363 static struct clk_branch smmu_cpp_ahb_clk
= {
1366 .enable_reg
= 0x3c14,
1367 .enable_mask
= BIT(0),
1368 .hw
.init
= &(struct clk_init_data
){
1369 .name
= "smmu_cpp_ahb_clk",
1370 .parent_names
= (const char *[]){ "ahb_clk_src" },
1372 .flags
= CLK_SET_RATE_PARENT
,
1373 .ops
= &clk_branch2_ops
,
1378 static struct clk_branch smmu_cpp_axi_clk
= {
1381 .enable_reg
= 0x3c18,
1382 .enable_mask
= BIT(0),
1383 .hw
.init
= &(struct clk_init_data
){
1384 .name
= "smmu_cpp_axi_clk",
1385 .parent_names
= (const char *[]){ "axi_clk_src" },
1387 .flags
= CLK_SET_RATE_PARENT
,
1388 .ops
= &clk_branch2_ops
,
1393 static struct clk_branch smmu_jpeg_ahb_clk
= {
1396 .enable_reg
= 0x3c24,
1397 .enable_mask
= BIT(0),
1398 .hw
.init
= &(struct clk_init_data
){
1399 .name
= "smmu_jpeg_ahb_clk",
1400 .parent_names
= (const char *[]){ "ahb_clk_src" },
1402 .flags
= CLK_SET_RATE_PARENT
,
1403 .ops
= &clk_branch2_ops
,
1408 static struct clk_branch smmu_jpeg_axi_clk
= {
1411 .enable_reg
= 0x3c28,
1412 .enable_mask
= BIT(0),
1413 .hw
.init
= &(struct clk_init_data
){
1414 .name
= "smmu_jpeg_axi_clk",
1415 .parent_names
= (const char *[]){ "axi_clk_src" },
1417 .flags
= CLK_SET_RATE_PARENT
,
1418 .ops
= &clk_branch2_ops
,
1423 static struct clk_branch mmagic_mdss_axi_clk
= {
1426 .enable_reg
= 0x2474,
1427 .enable_mask
= BIT(0),
1428 .hw
.init
= &(struct clk_init_data
){
1429 .name
= "mmagic_mdss_axi_clk",
1430 .parent_names
= (const char *[]){ "axi_clk_src" },
1432 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1433 .ops
= &clk_branch2_ops
,
1438 static struct clk_branch mmagic_mdss_noc_cfg_ahb_clk
= {
1441 .enable_reg
= 0x2478,
1442 .enable_mask
= BIT(0),
1443 .hw
.init
= &(struct clk_init_data
){
1444 .name
= "mmagic_mdss_noc_cfg_ahb_clk",
1445 .parent_names
= (const char *[]){ "gcc_mmss_noc_cfg_ahb_clk" },
1447 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1448 .ops
= &clk_branch2_ops
,
1453 static struct clk_branch smmu_rot_ahb_clk
= {
1456 .enable_reg
= 0x2444,
1457 .enable_mask
= BIT(0),
1458 .hw
.init
= &(struct clk_init_data
){
1459 .name
= "smmu_rot_ahb_clk",
1460 .parent_names
= (const char *[]){ "ahb_clk_src" },
1462 .flags
= CLK_SET_RATE_PARENT
,
1463 .ops
= &clk_branch2_ops
,
1468 static struct clk_branch smmu_rot_axi_clk
= {
1471 .enable_reg
= 0x2448,
1472 .enable_mask
= BIT(0),
1473 .hw
.init
= &(struct clk_init_data
){
1474 .name
= "smmu_rot_axi_clk",
1475 .parent_names
= (const char *[]){ "axi_clk_src" },
1477 .flags
= CLK_SET_RATE_PARENT
,
1478 .ops
= &clk_branch2_ops
,
1483 static struct clk_branch smmu_mdp_ahb_clk
= {
1486 .enable_reg
= 0x2454,
1487 .enable_mask
= BIT(0),
1488 .hw
.init
= &(struct clk_init_data
){
1489 .name
= "smmu_mdp_ahb_clk",
1490 .parent_names
= (const char *[]){ "ahb_clk_src" },
1492 .flags
= CLK_SET_RATE_PARENT
,
1493 .ops
= &clk_branch2_ops
,
1498 static struct clk_branch smmu_mdp_axi_clk
= {
1501 .enable_reg
= 0x2458,
1502 .enable_mask
= BIT(0),
1503 .hw
.init
= &(struct clk_init_data
){
1504 .name
= "smmu_mdp_axi_clk",
1505 .parent_names
= (const char *[]){ "axi_clk_src" },
1507 .flags
= CLK_SET_RATE_PARENT
,
1508 .ops
= &clk_branch2_ops
,
1513 static struct clk_branch mmagic_video_axi_clk
= {
1516 .enable_reg
= 0x1194,
1517 .enable_mask
= BIT(0),
1518 .hw
.init
= &(struct clk_init_data
){
1519 .name
= "mmagic_video_axi_clk",
1520 .parent_names
= (const char *[]){ "axi_clk_src" },
1522 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1523 .ops
= &clk_branch2_ops
,
1528 static struct clk_branch mmagic_video_noc_cfg_ahb_clk
= {
1531 .enable_reg
= 0x1198,
1532 .enable_mask
= BIT(0),
1533 .hw
.init
= &(struct clk_init_data
){
1534 .name
= "mmagic_video_noc_cfg_ahb_clk",
1535 .parent_names
= (const char *[]){ "gcc_mmss_noc_cfg_ahb_clk" },
1537 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1538 .ops
= &clk_branch2_ops
,
1543 static struct clk_branch smmu_video_ahb_clk
= {
1546 .enable_reg
= 0x1174,
1547 .enable_mask
= BIT(0),
1548 .hw
.init
= &(struct clk_init_data
){
1549 .name
= "smmu_video_ahb_clk",
1550 .parent_names
= (const char *[]){ "ahb_clk_src" },
1552 .flags
= CLK_SET_RATE_PARENT
,
1553 .ops
= &clk_branch2_ops
,
1558 static struct clk_branch smmu_video_axi_clk
= {
1561 .enable_reg
= 0x1178,
1562 .enable_mask
= BIT(0),
1563 .hw
.init
= &(struct clk_init_data
){
1564 .name
= "smmu_video_axi_clk",
1565 .parent_names
= (const char *[]){ "axi_clk_src" },
1567 .flags
= CLK_SET_RATE_PARENT
,
1568 .ops
= &clk_branch2_ops
,
1573 static struct clk_branch mmagic_bimc_noc_cfg_ahb_clk
= {
1576 .enable_reg
= 0x5298,
1577 .enable_mask
= BIT(0),
1578 .hw
.init
= &(struct clk_init_data
){
1579 .name
= "mmagic_bimc_noc_cfg_ahb_clk",
1580 .parent_names
= (const char *[]){ "gcc_mmss_noc_cfg_ahb_clk" },
1582 .flags
= CLK_SET_RATE_PARENT
,
1583 .ops
= &clk_branch2_ops
,
1588 static struct clk_branch gpu_gx_gfx3d_clk
= {
1591 .enable_reg
= 0x4028,
1592 .enable_mask
= BIT(0),
1593 .hw
.init
= &(struct clk_init_data
){
1594 .name
= "gpu_gx_gfx3d_clk",
1595 .parent_names
= (const char *[]){ "gfx3d_clk_src" },
1597 .flags
= CLK_SET_RATE_PARENT
,
1598 .ops
= &clk_branch2_ops
,
1603 static struct clk_branch gpu_gx_rbbmtimer_clk
= {
1606 .enable_reg
= 0x40b0,
1607 .enable_mask
= BIT(0),
1608 .hw
.init
= &(struct clk_init_data
){
1609 .name
= "gpu_gx_rbbmtimer_clk",
1610 .parent_names
= (const char *[]){ "rbbmtimer_clk_src" },
1612 .flags
= CLK_SET_RATE_PARENT
,
1613 .ops
= &clk_branch2_ops
,
1618 static struct clk_branch gpu_ahb_clk
= {
1621 .enable_reg
= 0x403c,
1622 .enable_mask
= BIT(0),
1623 .hw
.init
= &(struct clk_init_data
){
1624 .name
= "gpu_ahb_clk",
1625 .parent_names
= (const char *[]){ "ahb_clk_src" },
1627 .flags
= CLK_SET_RATE_PARENT
,
1628 .ops
= &clk_branch2_ops
,
1633 static struct clk_branch gpu_aon_isense_clk
= {
1636 .enable_reg
= 0x4044,
1637 .enable_mask
= BIT(0),
1638 .hw
.init
= &(struct clk_init_data
){
1639 .name
= "gpu_aon_isense_clk",
1640 .parent_names
= (const char *[]){ "isense_clk_src" },
1642 .flags
= CLK_SET_RATE_PARENT
,
1643 .ops
= &clk_branch2_ops
,
1648 static struct clk_branch vmem_maxi_clk
= {
1651 .enable_reg
= 0x1204,
1652 .enable_mask
= BIT(0),
1653 .hw
.init
= &(struct clk_init_data
){
1654 .name
= "vmem_maxi_clk",
1655 .parent_names
= (const char *[]){ "maxi_clk_src" },
1657 .flags
= CLK_SET_RATE_PARENT
,
1658 .ops
= &clk_branch2_ops
,
1663 static struct clk_branch vmem_ahb_clk
= {
1666 .enable_reg
= 0x1208,
1667 .enable_mask
= BIT(0),
1668 .hw
.init
= &(struct clk_init_data
){
1669 .name
= "vmem_ahb_clk",
1670 .parent_names
= (const char *[]){ "ahb_clk_src" },
1672 .flags
= CLK_SET_RATE_PARENT
,
1673 .ops
= &clk_branch2_ops
,
1678 static struct clk_branch mmss_rbcpr_clk
= {
1681 .enable_reg
= 0x4084,
1682 .enable_mask
= BIT(0),
1683 .hw
.init
= &(struct clk_init_data
){
1684 .name
= "mmss_rbcpr_clk",
1685 .parent_names
= (const char *[]){ "rbcpr_clk_src" },
1687 .flags
= CLK_SET_RATE_PARENT
,
1688 .ops
= &clk_branch2_ops
,
1693 static struct clk_branch mmss_rbcpr_ahb_clk
= {
1696 .enable_reg
= 0x4088,
1697 .enable_mask
= BIT(0),
1698 .hw
.init
= &(struct clk_init_data
){
1699 .name
= "mmss_rbcpr_ahb_clk",
1700 .parent_names
= (const char *[]){ "ahb_clk_src" },
1702 .flags
= CLK_SET_RATE_PARENT
,
1703 .ops
= &clk_branch2_ops
,
1708 static struct clk_branch video_core_clk
= {
1711 .enable_reg
= 0x1028,
1712 .enable_mask
= BIT(0),
1713 .hw
.init
= &(struct clk_init_data
){
1714 .name
= "video_core_clk",
1715 .parent_names
= (const char *[]){ "video_core_clk_src" },
1717 .flags
= CLK_SET_RATE_PARENT
,
1718 .ops
= &clk_branch2_ops
,
1723 static struct clk_branch video_axi_clk
= {
1726 .enable_reg
= 0x1034,
1727 .enable_mask
= BIT(0),
1728 .hw
.init
= &(struct clk_init_data
){
1729 .name
= "video_axi_clk",
1730 .parent_names
= (const char *[]){ "axi_clk_src" },
1732 .flags
= CLK_SET_RATE_PARENT
,
1733 .ops
= &clk_branch2_ops
,
1738 static struct clk_branch video_maxi_clk
= {
1741 .enable_reg
= 0x1038,
1742 .enable_mask
= BIT(0),
1743 .hw
.init
= &(struct clk_init_data
){
1744 .name
= "video_maxi_clk",
1745 .parent_names
= (const char *[]){ "maxi_clk_src" },
1747 .flags
= CLK_SET_RATE_PARENT
,
1748 .ops
= &clk_branch2_ops
,
1753 static struct clk_branch video_ahb_clk
= {
1756 .enable_reg
= 0x1030,
1757 .enable_mask
= BIT(0),
1758 .hw
.init
= &(struct clk_init_data
){
1759 .name
= "video_ahb_clk",
1760 .parent_names
= (const char *[]){ "ahb_clk_src" },
1762 .flags
= CLK_SET_RATE_PARENT
,
1763 .ops
= &clk_branch2_ops
,
1768 static struct clk_branch video_subcore0_clk
= {
1771 .enable_reg
= 0x1048,
1772 .enable_mask
= BIT(0),
1773 .hw
.init
= &(struct clk_init_data
){
1774 .name
= "video_subcore0_clk",
1775 .parent_names
= (const char *[]){ "video_subcore0_clk_src" },
1777 .flags
= CLK_SET_RATE_PARENT
,
1778 .ops
= &clk_branch2_ops
,
1783 static struct clk_branch video_subcore1_clk
= {
1786 .enable_reg
= 0x104c,
1787 .enable_mask
= BIT(0),
1788 .hw
.init
= &(struct clk_init_data
){
1789 .name
= "video_subcore1_clk",
1790 .parent_names
= (const char *[]){ "video_subcore1_clk_src" },
1792 .flags
= CLK_SET_RATE_PARENT
,
1793 .ops
= &clk_branch2_ops
,
1798 static struct clk_branch mdss_ahb_clk
= {
1801 .enable_reg
= 0x2308,
1802 .enable_mask
= BIT(0),
1803 .hw
.init
= &(struct clk_init_data
){
1804 .name
= "mdss_ahb_clk",
1805 .parent_names
= (const char *[]){ "ahb_clk_src" },
1807 .flags
= CLK_SET_RATE_PARENT
,
1808 .ops
= &clk_branch2_ops
,
1813 static struct clk_branch mdss_hdmi_ahb_clk
= {
1816 .enable_reg
= 0x230c,
1817 .enable_mask
= BIT(0),
1818 .hw
.init
= &(struct clk_init_data
){
1819 .name
= "mdss_hdmi_ahb_clk",
1820 .parent_names
= (const char *[]){ "ahb_clk_src" },
1822 .flags
= CLK_SET_RATE_PARENT
,
1823 .ops
= &clk_branch2_ops
,
1828 static struct clk_branch mdss_axi_clk
= {
1831 .enable_reg
= 0x2310,
1832 .enable_mask
= BIT(0),
1833 .hw
.init
= &(struct clk_init_data
){
1834 .name
= "mdss_axi_clk",
1835 .parent_names
= (const char *[]){ "axi_clk_src" },
1837 .flags
= CLK_SET_RATE_PARENT
,
1838 .ops
= &clk_branch2_ops
,
1843 static struct clk_branch mdss_pclk0_clk
= {
1846 .enable_reg
= 0x2314,
1847 .enable_mask
= BIT(0),
1848 .hw
.init
= &(struct clk_init_data
){
1849 .name
= "mdss_pclk0_clk",
1850 .parent_names
= (const char *[]){ "pclk0_clk_src" },
1852 .flags
= CLK_SET_RATE_PARENT
,
1853 .ops
= &clk_branch2_ops
,
1858 static struct clk_branch mdss_pclk1_clk
= {
1861 .enable_reg
= 0x2318,
1862 .enable_mask
= BIT(0),
1863 .hw
.init
= &(struct clk_init_data
){
1864 .name
= "mdss_pclk1_clk",
1865 .parent_names
= (const char *[]){ "pclk1_clk_src" },
1867 .flags
= CLK_SET_RATE_PARENT
,
1868 .ops
= &clk_branch2_ops
,
1873 static struct clk_branch mdss_mdp_clk
= {
1876 .enable_reg
= 0x231c,
1877 .enable_mask
= BIT(0),
1878 .hw
.init
= &(struct clk_init_data
){
1879 .name
= "mdss_mdp_clk",
1880 .parent_names
= (const char *[]){ "mdp_clk_src" },
1882 .flags
= CLK_SET_RATE_PARENT
,
1883 .ops
= &clk_branch2_ops
,
1888 static struct clk_branch mdss_extpclk_clk
= {
1891 .enable_reg
= 0x2324,
1892 .enable_mask
= BIT(0),
1893 .hw
.init
= &(struct clk_init_data
){
1894 .name
= "mdss_extpclk_clk",
1895 .parent_names
= (const char *[]){ "extpclk_clk_src" },
1897 .flags
= CLK_SET_RATE_PARENT
,
1898 .ops
= &clk_branch2_ops
,
1903 static struct clk_branch mdss_vsync_clk
= {
1906 .enable_reg
= 0x2328,
1907 .enable_mask
= BIT(0),
1908 .hw
.init
= &(struct clk_init_data
){
1909 .name
= "mdss_vsync_clk",
1910 .parent_names
= (const char *[]){ "vsync_clk_src" },
1912 .flags
= CLK_SET_RATE_PARENT
,
1913 .ops
= &clk_branch2_ops
,
1918 static struct clk_branch mdss_hdmi_clk
= {
1921 .enable_reg
= 0x2338,
1922 .enable_mask
= BIT(0),
1923 .hw
.init
= &(struct clk_init_data
){
1924 .name
= "mdss_hdmi_clk",
1925 .parent_names
= (const char *[]){ "hdmi_clk_src" },
1927 .flags
= CLK_SET_RATE_PARENT
,
1928 .ops
= &clk_branch2_ops
,
1933 static struct clk_branch mdss_byte0_clk
= {
1936 .enable_reg
= 0x233c,
1937 .enable_mask
= BIT(0),
1938 .hw
.init
= &(struct clk_init_data
){
1939 .name
= "mdss_byte0_clk",
1940 .parent_names
= (const char *[]){ "byte0_clk_src" },
1942 .flags
= CLK_SET_RATE_PARENT
,
1943 .ops
= &clk_branch2_ops
,
1948 static struct clk_branch mdss_byte1_clk
= {
1951 .enable_reg
= 0x2340,
1952 .enable_mask
= BIT(0),
1953 .hw
.init
= &(struct clk_init_data
){
1954 .name
= "mdss_byte1_clk",
1955 .parent_names
= (const char *[]){ "byte1_clk_src" },
1957 .flags
= CLK_SET_RATE_PARENT
,
1958 .ops
= &clk_branch2_ops
,
1963 static struct clk_branch mdss_esc0_clk
= {
1966 .enable_reg
= 0x2344,
1967 .enable_mask
= BIT(0),
1968 .hw
.init
= &(struct clk_init_data
){
1969 .name
= "mdss_esc0_clk",
1970 .parent_names
= (const char *[]){ "esc0_clk_src" },
1972 .flags
= CLK_SET_RATE_PARENT
,
1973 .ops
= &clk_branch2_ops
,
1978 static struct clk_branch mdss_esc1_clk
= {
1981 .enable_reg
= 0x2348,
1982 .enable_mask
= BIT(0),
1983 .hw
.init
= &(struct clk_init_data
){
1984 .name
= "mdss_esc1_clk",
1985 .parent_names
= (const char *[]){ "esc1_clk_src" },
1987 .flags
= CLK_SET_RATE_PARENT
,
1988 .ops
= &clk_branch2_ops
,
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_names
= (const char *[]){ "ahb_clk_src" },
2002 .flags
= CLK_SET_RATE_PARENT
,
2003 .ops
= &clk_branch2_ops
,
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_names
= (const char *[]){ "ahb_clk_src" },
2017 .flags
= CLK_SET_RATE_PARENT
,
2018 .ops
= &clk_branch2_ops
,
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_names
= (const char *[]){ "ahb_clk_src" },
2032 .flags
= CLK_SET_RATE_PARENT
,
2033 .ops
= &clk_branch2_ops
,
2038 static struct clk_branch camss_gp0_clk
= {
2041 .enable_reg
= 0x3444,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(struct clk_init_data
){
2044 .name
= "camss_gp0_clk",
2045 .parent_names
= (const char *[]){ "camss_gp0_clk_src" },
2047 .flags
= CLK_SET_RATE_PARENT
,
2048 .ops
= &clk_branch2_ops
,
2053 static struct clk_branch camss_gp1_clk
= {
2056 .enable_reg
= 0x3474,
2057 .enable_mask
= BIT(0),
2058 .hw
.init
= &(struct clk_init_data
){
2059 .name
= "camss_gp1_clk",
2060 .parent_names
= (const char *[]){ "camss_gp1_clk_src" },
2062 .flags
= CLK_SET_RATE_PARENT
,
2063 .ops
= &clk_branch2_ops
,
2068 static struct clk_branch camss_mclk0_clk
= {
2071 .enable_reg
= 0x3384,
2072 .enable_mask
= BIT(0),
2073 .hw
.init
= &(struct clk_init_data
){
2074 .name
= "camss_mclk0_clk",
2075 .parent_names
= (const char *[]){ "mclk0_clk_src" },
2077 .flags
= CLK_SET_RATE_PARENT
,
2078 .ops
= &clk_branch2_ops
,
2083 static struct clk_branch camss_mclk1_clk
= {
2086 .enable_reg
= 0x33b4,
2087 .enable_mask
= BIT(0),
2088 .hw
.init
= &(struct clk_init_data
){
2089 .name
= "camss_mclk1_clk",
2090 .parent_names
= (const char *[]){ "mclk1_clk_src" },
2092 .flags
= CLK_SET_RATE_PARENT
,
2093 .ops
= &clk_branch2_ops
,
2098 static struct clk_branch camss_mclk2_clk
= {
2101 .enable_reg
= 0x33e4,
2102 .enable_mask
= BIT(0),
2103 .hw
.init
= &(struct clk_init_data
){
2104 .name
= "camss_mclk2_clk",
2105 .parent_names
= (const char *[]){ "mclk2_clk_src" },
2107 .flags
= CLK_SET_RATE_PARENT
,
2108 .ops
= &clk_branch2_ops
,
2113 static struct clk_branch camss_mclk3_clk
= {
2116 .enable_reg
= 0x3414,
2117 .enable_mask
= BIT(0),
2118 .hw
.init
= &(struct clk_init_data
){
2119 .name
= "camss_mclk3_clk",
2120 .parent_names
= (const char *[]){ "mclk3_clk_src" },
2122 .flags
= CLK_SET_RATE_PARENT
,
2123 .ops
= &clk_branch2_ops
,
2128 static struct clk_branch camss_cci_clk
= {
2131 .enable_reg
= 0x3344,
2132 .enable_mask
= BIT(0),
2133 .hw
.init
= &(struct clk_init_data
){
2134 .name
= "camss_cci_clk",
2135 .parent_names
= (const char *[]){ "cci_clk_src" },
2137 .flags
= CLK_SET_RATE_PARENT
,
2138 .ops
= &clk_branch2_ops
,
2143 static struct clk_branch camss_cci_ahb_clk
= {
2146 .enable_reg
= 0x3348,
2147 .enable_mask
= BIT(0),
2148 .hw
.init
= &(struct clk_init_data
){
2149 .name
= "camss_cci_ahb_clk",
2150 .parent_names
= (const char *[]){ "ahb_clk_src" },
2152 .flags
= CLK_SET_RATE_PARENT
,
2153 .ops
= &clk_branch2_ops
,
2158 static struct clk_branch camss_csi0phytimer_clk
= {
2161 .enable_reg
= 0x3024,
2162 .enable_mask
= BIT(0),
2163 .hw
.init
= &(struct clk_init_data
){
2164 .name
= "camss_csi0phytimer_clk",
2165 .parent_names
= (const char *[]){ "csi0phytimer_clk_src" },
2167 .flags
= CLK_SET_RATE_PARENT
,
2168 .ops
= &clk_branch2_ops
,
2173 static struct clk_branch camss_csi1phytimer_clk
= {
2176 .enable_reg
= 0x3054,
2177 .enable_mask
= BIT(0),
2178 .hw
.init
= &(struct clk_init_data
){
2179 .name
= "camss_csi1phytimer_clk",
2180 .parent_names
= (const char *[]){ "csi1phytimer_clk_src" },
2182 .flags
= CLK_SET_RATE_PARENT
,
2183 .ops
= &clk_branch2_ops
,
2188 static struct clk_branch camss_csi2phytimer_clk
= {
2191 .enable_reg
= 0x3084,
2192 .enable_mask
= BIT(0),
2193 .hw
.init
= &(struct clk_init_data
){
2194 .name
= "camss_csi2phytimer_clk",
2195 .parent_names
= (const char *[]){ "csi2phytimer_clk_src" },
2197 .flags
= CLK_SET_RATE_PARENT
,
2198 .ops
= &clk_branch2_ops
,
2203 static struct clk_branch camss_csiphy0_3p_clk
= {
2206 .enable_reg
= 0x3234,
2207 .enable_mask
= BIT(0),
2208 .hw
.init
= &(struct clk_init_data
){
2209 .name
= "camss_csiphy0_3p_clk",
2210 .parent_names
= (const char *[]){ "csiphy0_3p_clk_src" },
2212 .flags
= CLK_SET_RATE_PARENT
,
2213 .ops
= &clk_branch2_ops
,
2218 static struct clk_branch camss_csiphy1_3p_clk
= {
2221 .enable_reg
= 0x3254,
2222 .enable_mask
= BIT(0),
2223 .hw
.init
= &(struct clk_init_data
){
2224 .name
= "camss_csiphy1_3p_clk",
2225 .parent_names
= (const char *[]){ "csiphy1_3p_clk_src" },
2227 .flags
= CLK_SET_RATE_PARENT
,
2228 .ops
= &clk_branch2_ops
,
2233 static struct clk_branch camss_csiphy2_3p_clk
= {
2236 .enable_reg
= 0x3274,
2237 .enable_mask
= BIT(0),
2238 .hw
.init
= &(struct clk_init_data
){
2239 .name
= "camss_csiphy2_3p_clk",
2240 .parent_names
= (const char *[]){ "csiphy2_3p_clk_src" },
2242 .flags
= CLK_SET_RATE_PARENT
,
2243 .ops
= &clk_branch2_ops
,
2248 static struct clk_branch camss_jpeg0_clk
= {
2251 .enable_reg
= 0x35a8,
2252 .enable_mask
= BIT(0),
2253 .hw
.init
= &(struct clk_init_data
){
2254 .name
= "camss_jpeg0_clk",
2255 .parent_names
= (const char *[]){ "jpeg0_clk_src" },
2257 .flags
= CLK_SET_RATE_PARENT
,
2258 .ops
= &clk_branch2_ops
,
2263 static struct clk_branch camss_jpeg2_clk
= {
2266 .enable_reg
= 0x35b0,
2267 .enable_mask
= BIT(0),
2268 .hw
.init
= &(struct clk_init_data
){
2269 .name
= "camss_jpeg2_clk",
2270 .parent_names
= (const char *[]){ "jpeg2_clk_src" },
2272 .flags
= CLK_SET_RATE_PARENT
,
2273 .ops
= &clk_branch2_ops
,
2278 static struct clk_branch camss_jpeg_dma_clk
= {
2281 .enable_reg
= 0x35c0,
2282 .enable_mask
= BIT(0),
2283 .hw
.init
= &(struct clk_init_data
){
2284 .name
= "camss_jpeg_dma_clk",
2285 .parent_names
= (const char *[]){ "jpeg_dma_clk_src" },
2287 .flags
= CLK_SET_RATE_PARENT
,
2288 .ops
= &clk_branch2_ops
,
2293 static struct clk_branch camss_jpeg_ahb_clk
= {
2296 .enable_reg
= 0x35b4,
2297 .enable_mask
= BIT(0),
2298 .hw
.init
= &(struct clk_init_data
){
2299 .name
= "camss_jpeg_ahb_clk",
2300 .parent_names
= (const char *[]){ "ahb_clk_src" },
2302 .flags
= CLK_SET_RATE_PARENT
,
2303 .ops
= &clk_branch2_ops
,
2308 static struct clk_branch camss_jpeg_axi_clk
= {
2311 .enable_reg
= 0x35b8,
2312 .enable_mask
= BIT(0),
2313 .hw
.init
= &(struct clk_init_data
){
2314 .name
= "camss_jpeg_axi_clk",
2315 .parent_names
= (const char *[]){ "axi_clk_src" },
2317 .flags
= CLK_SET_RATE_PARENT
,
2318 .ops
= &clk_branch2_ops
,
2323 static struct clk_branch camss_vfe_ahb_clk
= {
2326 .enable_reg
= 0x36b8,
2327 .enable_mask
= BIT(0),
2328 .hw
.init
= &(struct clk_init_data
){
2329 .name
= "camss_vfe_ahb_clk",
2330 .parent_names
= (const char *[]){ "ahb_clk_src" },
2332 .flags
= CLK_SET_RATE_PARENT
,
2333 .ops
= &clk_branch2_ops
,
2338 static struct clk_branch camss_vfe_axi_clk
= {
2341 .enable_reg
= 0x36bc,
2342 .enable_mask
= BIT(0),
2343 .hw
.init
= &(struct clk_init_data
){
2344 .name
= "camss_vfe_axi_clk",
2345 .parent_names
= (const char *[]){ "axi_clk_src" },
2347 .flags
= CLK_SET_RATE_PARENT
,
2348 .ops
= &clk_branch2_ops
,
2353 static struct clk_branch camss_vfe0_clk
= {
2356 .enable_reg
= 0x36a8,
2357 .enable_mask
= BIT(0),
2358 .hw
.init
= &(struct clk_init_data
){
2359 .name
= "camss_vfe0_clk",
2360 .parent_names
= (const char *[]){ "vfe0_clk_src" },
2362 .flags
= CLK_SET_RATE_PARENT
,
2363 .ops
= &clk_branch2_ops
,
2368 static struct clk_branch camss_vfe0_stream_clk
= {
2371 .enable_reg
= 0x3720,
2372 .enable_mask
= BIT(0),
2373 .hw
.init
= &(struct clk_init_data
){
2374 .name
= "camss_vfe0_stream_clk",
2375 .parent_names
= (const char *[]){ "vfe0_clk_src" },
2377 .flags
= CLK_SET_RATE_PARENT
,
2378 .ops
= &clk_branch2_ops
,
2383 static struct clk_branch camss_vfe0_ahb_clk
= {
2386 .enable_reg
= 0x3668,
2387 .enable_mask
= BIT(0),
2388 .hw
.init
= &(struct clk_init_data
){
2389 .name
= "camss_vfe0_ahb_clk",
2390 .parent_names
= (const char *[]){ "ahb_clk_src" },
2392 .flags
= CLK_SET_RATE_PARENT
,
2393 .ops
= &clk_branch2_ops
,
2398 static struct clk_branch camss_vfe1_clk
= {
2401 .enable_reg
= 0x36ac,
2402 .enable_mask
= BIT(0),
2403 .hw
.init
= &(struct clk_init_data
){
2404 .name
= "camss_vfe1_clk",
2405 .parent_names
= (const char *[]){ "vfe1_clk_src" },
2407 .flags
= CLK_SET_RATE_PARENT
,
2408 .ops
= &clk_branch2_ops
,
2413 static struct clk_branch camss_vfe1_stream_clk
= {
2416 .enable_reg
= 0x3724,
2417 .enable_mask
= BIT(0),
2418 .hw
.init
= &(struct clk_init_data
){
2419 .name
= "camss_vfe1_stream_clk",
2420 .parent_names
= (const char *[]){ "vfe1_clk_src" },
2422 .flags
= CLK_SET_RATE_PARENT
,
2423 .ops
= &clk_branch2_ops
,
2428 static struct clk_branch camss_vfe1_ahb_clk
= {
2431 .enable_reg
= 0x3678,
2432 .enable_mask
= BIT(0),
2433 .hw
.init
= &(struct clk_init_data
){
2434 .name
= "camss_vfe1_ahb_clk",
2435 .parent_names
= (const char *[]){ "ahb_clk_src" },
2437 .flags
= CLK_SET_RATE_PARENT
,
2438 .ops
= &clk_branch2_ops
,
2443 static struct clk_branch camss_csi_vfe0_clk
= {
2446 .enable_reg
= 0x3704,
2447 .enable_mask
= BIT(0),
2448 .hw
.init
= &(struct clk_init_data
){
2449 .name
= "camss_csi_vfe0_clk",
2450 .parent_names
= (const char *[]){ "vfe0_clk_src" },
2452 .flags
= CLK_SET_RATE_PARENT
,
2453 .ops
= &clk_branch2_ops
,
2458 static struct clk_branch camss_csi_vfe1_clk
= {
2461 .enable_reg
= 0x3714,
2462 .enable_mask
= BIT(0),
2463 .hw
.init
= &(struct clk_init_data
){
2464 .name
= "camss_csi_vfe1_clk",
2465 .parent_names
= (const char *[]){ "vfe1_clk_src" },
2467 .flags
= CLK_SET_RATE_PARENT
,
2468 .ops
= &clk_branch2_ops
,
2473 static struct clk_branch camss_cpp_vbif_ahb_clk
= {
2476 .enable_reg
= 0x36c8,
2477 .enable_mask
= BIT(0),
2478 .hw
.init
= &(struct clk_init_data
){
2479 .name
= "camss_cpp_vbif_ahb_clk",
2480 .parent_names
= (const char *[]){ "ahb_clk_src" },
2482 .flags
= CLK_SET_RATE_PARENT
,
2483 .ops
= &clk_branch2_ops
,
2488 static struct clk_branch camss_cpp_axi_clk
= {
2491 .enable_reg
= 0x36c4,
2492 .enable_mask
= BIT(0),
2493 .hw
.init
= &(struct clk_init_data
){
2494 .name
= "camss_cpp_axi_clk",
2495 .parent_names
= (const char *[]){ "axi_clk_src" },
2497 .flags
= CLK_SET_RATE_PARENT
,
2498 .ops
= &clk_branch2_ops
,
2503 static struct clk_branch camss_cpp_clk
= {
2506 .enable_reg
= 0x36b0,
2507 .enable_mask
= BIT(0),
2508 .hw
.init
= &(struct clk_init_data
){
2509 .name
= "camss_cpp_clk",
2510 .parent_names
= (const char *[]){ "cpp_clk_src" },
2512 .flags
= CLK_SET_RATE_PARENT
,
2513 .ops
= &clk_branch2_ops
,
2518 static struct clk_branch camss_cpp_ahb_clk
= {
2521 .enable_reg
= 0x36b4,
2522 .enable_mask
= BIT(0),
2523 .hw
.init
= &(struct clk_init_data
){
2524 .name
= "camss_cpp_ahb_clk",
2525 .parent_names
= (const char *[]){ "ahb_clk_src" },
2527 .flags
= CLK_SET_RATE_PARENT
,
2528 .ops
= &clk_branch2_ops
,
2533 static struct clk_branch camss_csi0_clk
= {
2536 .enable_reg
= 0x30b4,
2537 .enable_mask
= BIT(0),
2538 .hw
.init
= &(struct clk_init_data
){
2539 .name
= "camss_csi0_clk",
2540 .parent_names
= (const char *[]){ "csi0_clk_src" },
2542 .flags
= CLK_SET_RATE_PARENT
,
2543 .ops
= &clk_branch2_ops
,
2548 static struct clk_branch camss_csi0_ahb_clk
= {
2551 .enable_reg
= 0x30bc,
2552 .enable_mask
= BIT(0),
2553 .hw
.init
= &(struct clk_init_data
){
2554 .name
= "camss_csi0_ahb_clk",
2555 .parent_names
= (const char *[]){ "ahb_clk_src" },
2557 .flags
= CLK_SET_RATE_PARENT
,
2558 .ops
= &clk_branch2_ops
,
2563 static struct clk_branch camss_csi0phy_clk
= {
2566 .enable_reg
= 0x30c4,
2567 .enable_mask
= BIT(0),
2568 .hw
.init
= &(struct clk_init_data
){
2569 .name
= "camss_csi0phy_clk",
2570 .parent_names
= (const char *[]){ "csi0_clk_src" },
2572 .flags
= CLK_SET_RATE_PARENT
,
2573 .ops
= &clk_branch2_ops
,
2578 static struct clk_branch camss_csi0rdi_clk
= {
2581 .enable_reg
= 0x30d4,
2582 .enable_mask
= BIT(0),
2583 .hw
.init
= &(struct clk_init_data
){
2584 .name
= "camss_csi0rdi_clk",
2585 .parent_names
= (const char *[]){ "csi0_clk_src" },
2587 .flags
= CLK_SET_RATE_PARENT
,
2588 .ops
= &clk_branch2_ops
,
2593 static struct clk_branch camss_csi0pix_clk
= {
2596 .enable_reg
= 0x30e4,
2597 .enable_mask
= BIT(0),
2598 .hw
.init
= &(struct clk_init_data
){
2599 .name
= "camss_csi0pix_clk",
2600 .parent_names
= (const char *[]){ "csi0_clk_src" },
2602 .flags
= CLK_SET_RATE_PARENT
,
2603 .ops
= &clk_branch2_ops
,
2608 static struct clk_branch camss_csi1_clk
= {
2611 .enable_reg
= 0x3124,
2612 .enable_mask
= BIT(0),
2613 .hw
.init
= &(struct clk_init_data
){
2614 .name
= "camss_csi1_clk",
2615 .parent_names
= (const char *[]){ "csi1_clk_src" },
2617 .flags
= CLK_SET_RATE_PARENT
,
2618 .ops
= &clk_branch2_ops
,
2623 static struct clk_branch camss_csi1_ahb_clk
= {
2626 .enable_reg
= 0x3128,
2627 .enable_mask
= BIT(0),
2628 .hw
.init
= &(struct clk_init_data
){
2629 .name
= "camss_csi1_ahb_clk",
2630 .parent_names
= (const char *[]){ "ahb_clk_src" },
2632 .flags
= CLK_SET_RATE_PARENT
,
2633 .ops
= &clk_branch2_ops
,
2638 static struct clk_branch camss_csi1phy_clk
= {
2641 .enable_reg
= 0x3134,
2642 .enable_mask
= BIT(0),
2643 .hw
.init
= &(struct clk_init_data
){
2644 .name
= "camss_csi1phy_clk",
2645 .parent_names
= (const char *[]){ "csi1_clk_src" },
2647 .flags
= CLK_SET_RATE_PARENT
,
2648 .ops
= &clk_branch2_ops
,
2653 static struct clk_branch camss_csi1rdi_clk
= {
2656 .enable_reg
= 0x3144,
2657 .enable_mask
= BIT(0),
2658 .hw
.init
= &(struct clk_init_data
){
2659 .name
= "camss_csi1rdi_clk",
2660 .parent_names
= (const char *[]){ "csi1_clk_src" },
2662 .flags
= CLK_SET_RATE_PARENT
,
2663 .ops
= &clk_branch2_ops
,
2668 static struct clk_branch camss_csi1pix_clk
= {
2671 .enable_reg
= 0x3154,
2672 .enable_mask
= BIT(0),
2673 .hw
.init
= &(struct clk_init_data
){
2674 .name
= "camss_csi1pix_clk",
2675 .parent_names
= (const char *[]){ "csi1_clk_src" },
2677 .flags
= CLK_SET_RATE_PARENT
,
2678 .ops
= &clk_branch2_ops
,
2683 static struct clk_branch camss_csi2_clk
= {
2686 .enable_reg
= 0x3184,
2687 .enable_mask
= BIT(0),
2688 .hw
.init
= &(struct clk_init_data
){
2689 .name
= "camss_csi2_clk",
2690 .parent_names
= (const char *[]){ "csi2_clk_src" },
2692 .flags
= CLK_SET_RATE_PARENT
,
2693 .ops
= &clk_branch2_ops
,
2698 static struct clk_branch camss_csi2_ahb_clk
= {
2701 .enable_reg
= 0x3188,
2702 .enable_mask
= BIT(0),
2703 .hw
.init
= &(struct clk_init_data
){
2704 .name
= "camss_csi2_ahb_clk",
2705 .parent_names
= (const char *[]){ "ahb_clk_src" },
2707 .flags
= CLK_SET_RATE_PARENT
,
2708 .ops
= &clk_branch2_ops
,
2713 static struct clk_branch camss_csi2phy_clk
= {
2716 .enable_reg
= 0x3194,
2717 .enable_mask
= BIT(0),
2718 .hw
.init
= &(struct clk_init_data
){
2719 .name
= "camss_csi2phy_clk",
2720 .parent_names
= (const char *[]){ "csi2_clk_src" },
2722 .flags
= CLK_SET_RATE_PARENT
,
2723 .ops
= &clk_branch2_ops
,
2728 static struct clk_branch camss_csi2rdi_clk
= {
2731 .enable_reg
= 0x31a4,
2732 .enable_mask
= BIT(0),
2733 .hw
.init
= &(struct clk_init_data
){
2734 .name
= "camss_csi2rdi_clk",
2735 .parent_names
= (const char *[]){ "csi2_clk_src" },
2737 .flags
= CLK_SET_RATE_PARENT
,
2738 .ops
= &clk_branch2_ops
,
2743 static struct clk_branch camss_csi2pix_clk
= {
2746 .enable_reg
= 0x31b4,
2747 .enable_mask
= BIT(0),
2748 .hw
.init
= &(struct clk_init_data
){
2749 .name
= "camss_csi2pix_clk",
2750 .parent_names
= (const char *[]){ "csi2_clk_src" },
2752 .flags
= CLK_SET_RATE_PARENT
,
2753 .ops
= &clk_branch2_ops
,
2758 static struct clk_branch camss_csi3_clk
= {
2761 .enable_reg
= 0x31e4,
2762 .enable_mask
= BIT(0),
2763 .hw
.init
= &(struct clk_init_data
){
2764 .name
= "camss_csi3_clk",
2765 .parent_names
= (const char *[]){ "csi3_clk_src" },
2767 .flags
= CLK_SET_RATE_PARENT
,
2768 .ops
= &clk_branch2_ops
,
2773 static struct clk_branch camss_csi3_ahb_clk
= {
2776 .enable_reg
= 0x31e8,
2777 .enable_mask
= BIT(0),
2778 .hw
.init
= &(struct clk_init_data
){
2779 .name
= "camss_csi3_ahb_clk",
2780 .parent_names
= (const char *[]){ "ahb_clk_src" },
2782 .flags
= CLK_SET_RATE_PARENT
,
2783 .ops
= &clk_branch2_ops
,
2788 static struct clk_branch camss_csi3phy_clk
= {
2791 .enable_reg
= 0x31f4,
2792 .enable_mask
= BIT(0),
2793 .hw
.init
= &(struct clk_init_data
){
2794 .name
= "camss_csi3phy_clk",
2795 .parent_names
= (const char *[]){ "csi3_clk_src" },
2797 .flags
= CLK_SET_RATE_PARENT
,
2798 .ops
= &clk_branch2_ops
,
2803 static struct clk_branch camss_csi3rdi_clk
= {
2806 .enable_reg
= 0x3204,
2807 .enable_mask
= BIT(0),
2808 .hw
.init
= &(struct clk_init_data
){
2809 .name
= "camss_csi3rdi_clk",
2810 .parent_names
= (const char *[]){ "csi3_clk_src" },
2812 .flags
= CLK_SET_RATE_PARENT
,
2813 .ops
= &clk_branch2_ops
,
2818 static struct clk_branch camss_csi3pix_clk
= {
2821 .enable_reg
= 0x3214,
2822 .enable_mask
= BIT(0),
2823 .hw
.init
= &(struct clk_init_data
){
2824 .name
= "camss_csi3pix_clk",
2825 .parent_names
= (const char *[]){ "csi3_clk_src" },
2827 .flags
= CLK_SET_RATE_PARENT
,
2828 .ops
= &clk_branch2_ops
,
2833 static struct clk_branch camss_ispif_ahb_clk
= {
2836 .enable_reg
= 0x3224,
2837 .enable_mask
= BIT(0),
2838 .hw
.init
= &(struct clk_init_data
){
2839 .name
= "camss_ispif_ahb_clk",
2840 .parent_names
= (const char *[]){ "ahb_clk_src" },
2842 .flags
= CLK_SET_RATE_PARENT
,
2843 .ops
= &clk_branch2_ops
,
2848 static struct clk_branch fd_core_clk
= {
2851 .enable_reg
= 0x3b68,
2852 .enable_mask
= BIT(0),
2853 .hw
.init
= &(struct clk_init_data
){
2854 .name
= "fd_core_clk",
2855 .parent_names
= (const char *[]){ "fd_core_clk_src" },
2857 .flags
= CLK_SET_RATE_PARENT
,
2858 .ops
= &clk_branch2_ops
,
2863 static struct clk_branch fd_core_uar_clk
= {
2866 .enable_reg
= 0x3b6c,
2867 .enable_mask
= BIT(0),
2868 .hw
.init
= &(struct clk_init_data
){
2869 .name
= "fd_core_uar_clk",
2870 .parent_names
= (const char *[]){ "fd_core_clk_src" },
2872 .flags
= CLK_SET_RATE_PARENT
,
2873 .ops
= &clk_branch2_ops
,
2878 static struct clk_branch fd_ahb_clk
= {
2879 .halt_reg
= 0x3ba74,
2881 .enable_reg
= 0x3ba74,
2882 .enable_mask
= BIT(0),
2883 .hw
.init
= &(struct clk_init_data
){
2884 .name
= "fd_ahb_clk",
2885 .parent_names
= (const char *[]){ "ahb_clk_src" },
2887 .flags
= CLK_SET_RATE_PARENT
,
2888 .ops
= &clk_branch2_ops
,
2893 static struct clk_hw
*mmcc_msm8996_hws
[] = {
2897 static struct gdsc mmagic_bimc_gdsc
= {
2900 .name
= "mmagic_bimc",
2902 .pwrsts
= PWRSTS_OFF_ON
,
2906 static struct gdsc mmagic_video_gdsc
= {
2908 .gds_hw_ctrl
= 0x120c,
2910 .name
= "mmagic_video",
2912 .pwrsts
= PWRSTS_OFF_ON
,
2913 .flags
= VOTABLE
| ALWAYS_ON
,
2916 static struct gdsc mmagic_mdss_gdsc
= {
2918 .gds_hw_ctrl
= 0x2480,
2920 .name
= "mmagic_mdss",
2922 .pwrsts
= PWRSTS_OFF_ON
,
2923 .flags
= VOTABLE
| ALWAYS_ON
,
2926 static struct gdsc mmagic_camss_gdsc
= {
2928 .gds_hw_ctrl
= 0x3c50,
2930 .name
= "mmagic_camss",
2932 .pwrsts
= PWRSTS_OFF_ON
,
2933 .flags
= VOTABLE
| ALWAYS_ON
,
2936 static struct gdsc venus_gdsc
= {
2938 .cxcs
= (unsigned int []){ 0x1028, 0x1034, 0x1038 },
2943 .parent
= &mmagic_video_gdsc
.pd
,
2944 .pwrsts
= PWRSTS_OFF_ON
,
2947 static struct gdsc venus_core0_gdsc
= {
2949 .cxcs
= (unsigned int []){ 0x1048 },
2952 .name
= "venus_core0",
2954 .parent
= &venus_gdsc
.pd
,
2955 .pwrsts
= PWRSTS_OFF_ON
,
2959 static struct gdsc venus_core1_gdsc
= {
2961 .cxcs
= (unsigned int []){ 0x104c },
2964 .name
= "venus_core1",
2966 .parent
= &venus_gdsc
.pd
,
2967 .pwrsts
= PWRSTS_OFF_ON
,
2971 static struct gdsc camss_gdsc
= {
2973 .cxcs
= (unsigned int []){ 0x36bc, 0x36c4 },
2978 .parent
= &mmagic_camss_gdsc
.pd
,
2979 .pwrsts
= PWRSTS_OFF_ON
,
2982 static struct gdsc vfe0_gdsc
= {
2984 .cxcs
= (unsigned int []){ 0x36a8 },
2989 .parent
= &camss_gdsc
.pd
,
2990 .pwrsts
= PWRSTS_OFF_ON
,
2993 static struct gdsc vfe1_gdsc
= {
2995 .cxcs
= (unsigned int []){ 0x36ac },
3000 .parent
= &camss_gdsc
.pd
,
3001 .pwrsts
= PWRSTS_OFF_ON
,
3004 static struct gdsc jpeg_gdsc
= {
3006 .cxcs
= (unsigned int []){ 0x35a8, 0x35b0, 0x35c0, 0x35b8 },
3011 .parent
= &camss_gdsc
.pd
,
3012 .pwrsts
= PWRSTS_OFF_ON
,
3015 static struct gdsc cpp_gdsc
= {
3017 .cxcs
= (unsigned int []){ 0x36b0 },
3022 .parent
= &camss_gdsc
.pd
,
3023 .pwrsts
= PWRSTS_OFF_ON
,
3026 static struct gdsc fd_gdsc
= {
3028 .cxcs
= (unsigned int []){ 0x3b68, 0x3b6c },
3033 .parent
= &camss_gdsc
.pd
,
3034 .pwrsts
= PWRSTS_OFF_ON
,
3037 static struct gdsc mdss_gdsc
= {
3039 .cxcs
= (unsigned int []){ 0x2310, 0x231c },
3044 .parent
= &mmagic_mdss_gdsc
.pd
,
3045 .pwrsts
= PWRSTS_OFF_ON
,
3048 static struct gdsc gpu_gdsc
= {
3050 .gds_hw_ctrl
= 0x4038,
3054 .pwrsts
= PWRSTS_OFF_ON
,
3058 static struct gdsc gpu_gx_gdsc
= {
3060 .clamp_io_ctrl
= 0x4300,
3061 .cxcs
= (unsigned int []){ 0x4028 },
3066 .pwrsts
= PWRSTS_OFF_ON
,
3067 .parent
= &gpu_gdsc
.pd
,
3069 .supply
= "vdd-gfx",
3072 static struct clk_regmap
*mmcc_msm8996_clocks
[] = {
3073 [MMPLL0_EARLY
] = &mmpll0_early
.clkr
,
3074 [MMPLL0_PLL
] = &mmpll0
.clkr
,
3075 [MMPLL1_EARLY
] = &mmpll1_early
.clkr
,
3076 [MMPLL1_PLL
] = &mmpll1
.clkr
,
3077 [MMPLL2_EARLY
] = &mmpll2_early
.clkr
,
3078 [MMPLL2_PLL
] = &mmpll2
.clkr
,
3079 [MMPLL3_EARLY
] = &mmpll3_early
.clkr
,
3080 [MMPLL3_PLL
] = &mmpll3
.clkr
,
3081 [MMPLL4_EARLY
] = &mmpll4_early
.clkr
,
3082 [MMPLL4_PLL
] = &mmpll4
.clkr
,
3083 [MMPLL5_EARLY
] = &mmpll5_early
.clkr
,
3084 [MMPLL5_PLL
] = &mmpll5
.clkr
,
3085 [MMPLL8_EARLY
] = &mmpll8_early
.clkr
,
3086 [MMPLL8_PLL
] = &mmpll8
.clkr
,
3087 [MMPLL9_EARLY
] = &mmpll9_early
.clkr
,
3088 [MMPLL9_PLL
] = &mmpll9
.clkr
,
3089 [AHB_CLK_SRC
] = &ahb_clk_src
.clkr
,
3090 [AXI_CLK_SRC
] = &axi_clk_src
.clkr
,
3091 [MAXI_CLK_SRC
] = &maxi_clk_src
.clkr
,
3092 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
3093 [RBBMTIMER_CLK_SRC
] = &rbbmtimer_clk_src
.clkr
,
3094 [ISENSE_CLK_SRC
] = &isense_clk_src
.clkr
,
3095 [RBCPR_CLK_SRC
] = &rbcpr_clk_src
.clkr
,
3096 [VIDEO_CORE_CLK_SRC
] = &video_core_clk_src
.clkr
,
3097 [VIDEO_SUBCORE0_CLK_SRC
] = &video_subcore0_clk_src
.clkr
,
3098 [VIDEO_SUBCORE1_CLK_SRC
] = &video_subcore1_clk_src
.clkr
,
3099 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
3100 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
3101 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
3102 [EXTPCLK_CLK_SRC
] = &extpclk_clk_src
.clkr
,
3103 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
3104 [HDMI_CLK_SRC
] = &hdmi_clk_src
.clkr
,
3105 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
3106 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
3107 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
3108 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
3109 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
3110 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
3111 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
3112 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
3113 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
3114 [MCLK3_CLK_SRC
] = &mclk3_clk_src
.clkr
,
3115 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
3116 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
3117 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
3118 [CSI2PHYTIMER_CLK_SRC
] = &csi2phytimer_clk_src
.clkr
,
3119 [CSIPHY0_3P_CLK_SRC
] = &csiphy0_3p_clk_src
.clkr
,
3120 [CSIPHY1_3P_CLK_SRC
] = &csiphy1_3p_clk_src
.clkr
,
3121 [CSIPHY2_3P_CLK_SRC
] = &csiphy2_3p_clk_src
.clkr
,
3122 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
3123 [JPEG2_CLK_SRC
] = &jpeg2_clk_src
.clkr
,
3124 [JPEG_DMA_CLK_SRC
] = &jpeg_dma_clk_src
.clkr
,
3125 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
3126 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
3127 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
3128 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
3129 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
3130 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
3131 [CSI3_CLK_SRC
] = &csi3_clk_src
.clkr
,
3132 [FD_CORE_CLK_SRC
] = &fd_core_clk_src
.clkr
,
3133 [MMSS_MMAGIC_AHB_CLK
] = &mmss_mmagic_ahb_clk
.clkr
,
3134 [MMSS_MMAGIC_CFG_AHB_CLK
] = &mmss_mmagic_cfg_ahb_clk
.clkr
,
3135 [MMSS_MISC_AHB_CLK
] = &mmss_misc_ahb_clk
.clkr
,
3136 [MMSS_MISC_CXO_CLK
] = &mmss_misc_cxo_clk
.clkr
,
3137 [MMSS_MMAGIC_MAXI_CLK
] = &mmss_mmagic_maxi_clk
.clkr
,
3138 [MMAGIC_CAMSS_AXI_CLK
] = &mmagic_camss_axi_clk
.clkr
,
3139 [MMAGIC_CAMSS_NOC_CFG_AHB_CLK
] = &mmagic_camss_noc_cfg_ahb_clk
.clkr
,
3140 [SMMU_VFE_AHB_CLK
] = &smmu_vfe_ahb_clk
.clkr
,
3141 [SMMU_VFE_AXI_CLK
] = &smmu_vfe_axi_clk
.clkr
,
3142 [SMMU_CPP_AHB_CLK
] = &smmu_cpp_ahb_clk
.clkr
,
3143 [SMMU_CPP_AXI_CLK
] = &smmu_cpp_axi_clk
.clkr
,
3144 [SMMU_JPEG_AHB_CLK
] = &smmu_jpeg_ahb_clk
.clkr
,
3145 [SMMU_JPEG_AXI_CLK
] = &smmu_jpeg_axi_clk
.clkr
,
3146 [MMAGIC_MDSS_AXI_CLK
] = &mmagic_mdss_axi_clk
.clkr
,
3147 [MMAGIC_MDSS_NOC_CFG_AHB_CLK
] = &mmagic_mdss_noc_cfg_ahb_clk
.clkr
,
3148 [SMMU_ROT_AHB_CLK
] = &smmu_rot_ahb_clk
.clkr
,
3149 [SMMU_ROT_AXI_CLK
] = &smmu_rot_axi_clk
.clkr
,
3150 [SMMU_MDP_AHB_CLK
] = &smmu_mdp_ahb_clk
.clkr
,
3151 [SMMU_MDP_AXI_CLK
] = &smmu_mdp_axi_clk
.clkr
,
3152 [MMAGIC_VIDEO_AXI_CLK
] = &mmagic_video_axi_clk
.clkr
,
3153 [MMAGIC_VIDEO_NOC_CFG_AHB_CLK
] = &mmagic_video_noc_cfg_ahb_clk
.clkr
,
3154 [SMMU_VIDEO_AHB_CLK
] = &smmu_video_ahb_clk
.clkr
,
3155 [SMMU_VIDEO_AXI_CLK
] = &smmu_video_axi_clk
.clkr
,
3156 [MMAGIC_BIMC_NOC_CFG_AHB_CLK
] = &mmagic_bimc_noc_cfg_ahb_clk
.clkr
,
3157 [GPU_GX_GFX3D_CLK
] = &gpu_gx_gfx3d_clk
.clkr
,
3158 [GPU_GX_RBBMTIMER_CLK
] = &gpu_gx_rbbmtimer_clk
.clkr
,
3159 [GPU_AHB_CLK
] = &gpu_ahb_clk
.clkr
,
3160 [GPU_AON_ISENSE_CLK
] = &gpu_aon_isense_clk
.clkr
,
3161 [VMEM_MAXI_CLK
] = &vmem_maxi_clk
.clkr
,
3162 [VMEM_AHB_CLK
] = &vmem_ahb_clk
.clkr
,
3163 [MMSS_RBCPR_CLK
] = &mmss_rbcpr_clk
.clkr
,
3164 [MMSS_RBCPR_AHB_CLK
] = &mmss_rbcpr_ahb_clk
.clkr
,
3165 [VIDEO_CORE_CLK
] = &video_core_clk
.clkr
,
3166 [VIDEO_AXI_CLK
] = &video_axi_clk
.clkr
,
3167 [VIDEO_MAXI_CLK
] = &video_maxi_clk
.clkr
,
3168 [VIDEO_AHB_CLK
] = &video_ahb_clk
.clkr
,
3169 [VIDEO_SUBCORE0_CLK
] = &video_subcore0_clk
.clkr
,
3170 [VIDEO_SUBCORE1_CLK
] = &video_subcore1_clk
.clkr
,
3171 [MDSS_AHB_CLK
] = &mdss_ahb_clk
.clkr
,
3172 [MDSS_HDMI_AHB_CLK
] = &mdss_hdmi_ahb_clk
.clkr
,
3173 [MDSS_AXI_CLK
] = &mdss_axi_clk
.clkr
,
3174 [MDSS_PCLK0_CLK
] = &mdss_pclk0_clk
.clkr
,
3175 [MDSS_PCLK1_CLK
] = &mdss_pclk1_clk
.clkr
,
3176 [MDSS_MDP_CLK
] = &mdss_mdp_clk
.clkr
,
3177 [MDSS_EXTPCLK_CLK
] = &mdss_extpclk_clk
.clkr
,
3178 [MDSS_VSYNC_CLK
] = &mdss_vsync_clk
.clkr
,
3179 [MDSS_HDMI_CLK
] = &mdss_hdmi_clk
.clkr
,
3180 [MDSS_BYTE0_CLK
] = &mdss_byte0_clk
.clkr
,
3181 [MDSS_BYTE1_CLK
] = &mdss_byte1_clk
.clkr
,
3182 [MDSS_ESC0_CLK
] = &mdss_esc0_clk
.clkr
,
3183 [MDSS_ESC1_CLK
] = &mdss_esc1_clk
.clkr
,
3184 [CAMSS_TOP_AHB_CLK
] = &camss_top_ahb_clk
.clkr
,
3185 [CAMSS_AHB_CLK
] = &camss_ahb_clk
.clkr
,
3186 [CAMSS_MICRO_AHB_CLK
] = &camss_micro_ahb_clk
.clkr
,
3187 [CAMSS_GP0_CLK
] = &camss_gp0_clk
.clkr
,
3188 [CAMSS_GP1_CLK
] = &camss_gp1_clk
.clkr
,
3189 [CAMSS_MCLK0_CLK
] = &camss_mclk0_clk
.clkr
,
3190 [CAMSS_MCLK1_CLK
] = &camss_mclk1_clk
.clkr
,
3191 [CAMSS_MCLK2_CLK
] = &camss_mclk2_clk
.clkr
,
3192 [CAMSS_MCLK3_CLK
] = &camss_mclk3_clk
.clkr
,
3193 [CAMSS_CCI_CLK
] = &camss_cci_clk
.clkr
,
3194 [CAMSS_CCI_AHB_CLK
] = &camss_cci_ahb_clk
.clkr
,
3195 [CAMSS_CSI0PHYTIMER_CLK
] = &camss_csi0phytimer_clk
.clkr
,
3196 [CAMSS_CSI1PHYTIMER_CLK
] = &camss_csi1phytimer_clk
.clkr
,
3197 [CAMSS_CSI2PHYTIMER_CLK
] = &camss_csi2phytimer_clk
.clkr
,
3198 [CAMSS_CSIPHY0_3P_CLK
] = &camss_csiphy0_3p_clk
.clkr
,
3199 [CAMSS_CSIPHY1_3P_CLK
] = &camss_csiphy1_3p_clk
.clkr
,
3200 [CAMSS_CSIPHY2_3P_CLK
] = &camss_csiphy2_3p_clk
.clkr
,
3201 [CAMSS_JPEG0_CLK
] = &camss_jpeg0_clk
.clkr
,
3202 [CAMSS_JPEG2_CLK
] = &camss_jpeg2_clk
.clkr
,
3203 [CAMSS_JPEG_DMA_CLK
] = &camss_jpeg_dma_clk
.clkr
,
3204 [CAMSS_JPEG_AHB_CLK
] = &camss_jpeg_ahb_clk
.clkr
,
3205 [CAMSS_JPEG_AXI_CLK
] = &camss_jpeg_axi_clk
.clkr
,
3206 [CAMSS_VFE_AHB_CLK
] = &camss_vfe_ahb_clk
.clkr
,
3207 [CAMSS_VFE_AXI_CLK
] = &camss_vfe_axi_clk
.clkr
,
3208 [CAMSS_VFE0_CLK
] = &camss_vfe0_clk
.clkr
,
3209 [CAMSS_VFE0_STREAM_CLK
] = &camss_vfe0_stream_clk
.clkr
,
3210 [CAMSS_VFE0_AHB_CLK
] = &camss_vfe0_ahb_clk
.clkr
,
3211 [CAMSS_VFE1_CLK
] = &camss_vfe1_clk
.clkr
,
3212 [CAMSS_VFE1_STREAM_CLK
] = &camss_vfe1_stream_clk
.clkr
,
3213 [CAMSS_VFE1_AHB_CLK
] = &camss_vfe1_ahb_clk
.clkr
,
3214 [CAMSS_CSI_VFE0_CLK
] = &camss_csi_vfe0_clk
.clkr
,
3215 [CAMSS_CSI_VFE1_CLK
] = &camss_csi_vfe1_clk
.clkr
,
3216 [CAMSS_CPP_VBIF_AHB_CLK
] = &camss_cpp_vbif_ahb_clk
.clkr
,
3217 [CAMSS_CPP_AXI_CLK
] = &camss_cpp_axi_clk
.clkr
,
3218 [CAMSS_CPP_CLK
] = &camss_cpp_clk
.clkr
,
3219 [CAMSS_CPP_AHB_CLK
] = &camss_cpp_ahb_clk
.clkr
,
3220 [CAMSS_CSI0_CLK
] = &camss_csi0_clk
.clkr
,
3221 [CAMSS_CSI0_AHB_CLK
] = &camss_csi0_ahb_clk
.clkr
,
3222 [CAMSS_CSI0PHY_CLK
] = &camss_csi0phy_clk
.clkr
,
3223 [CAMSS_CSI0RDI_CLK
] = &camss_csi0rdi_clk
.clkr
,
3224 [CAMSS_CSI0PIX_CLK
] = &camss_csi0pix_clk
.clkr
,
3225 [CAMSS_CSI1_CLK
] = &camss_csi1_clk
.clkr
,
3226 [CAMSS_CSI1_AHB_CLK
] = &camss_csi1_ahb_clk
.clkr
,
3227 [CAMSS_CSI1PHY_CLK
] = &camss_csi1phy_clk
.clkr
,
3228 [CAMSS_CSI1RDI_CLK
] = &camss_csi1rdi_clk
.clkr
,
3229 [CAMSS_CSI1PIX_CLK
] = &camss_csi1pix_clk
.clkr
,
3230 [CAMSS_CSI2_CLK
] = &camss_csi2_clk
.clkr
,
3231 [CAMSS_CSI2_AHB_CLK
] = &camss_csi2_ahb_clk
.clkr
,
3232 [CAMSS_CSI2PHY_CLK
] = &camss_csi2phy_clk
.clkr
,
3233 [CAMSS_CSI2RDI_CLK
] = &camss_csi2rdi_clk
.clkr
,
3234 [CAMSS_CSI2PIX_CLK
] = &camss_csi2pix_clk
.clkr
,
3235 [CAMSS_CSI3_CLK
] = &camss_csi3_clk
.clkr
,
3236 [CAMSS_CSI3_AHB_CLK
] = &camss_csi3_ahb_clk
.clkr
,
3237 [CAMSS_CSI3PHY_CLK
] = &camss_csi3phy_clk
.clkr
,
3238 [CAMSS_CSI3RDI_CLK
] = &camss_csi3rdi_clk
.clkr
,
3239 [CAMSS_CSI3PIX_CLK
] = &camss_csi3pix_clk
.clkr
,
3240 [CAMSS_ISPIF_AHB_CLK
] = &camss_ispif_ahb_clk
.clkr
,
3241 [FD_CORE_CLK
] = &fd_core_clk
.clkr
,
3242 [FD_CORE_UAR_CLK
] = &fd_core_uar_clk
.clkr
,
3243 [FD_AHB_CLK
] = &fd_ahb_clk
.clkr
,
3246 static struct gdsc
*mmcc_msm8996_gdscs
[] = {
3247 [MMAGIC_BIMC_GDSC
] = &mmagic_bimc_gdsc
,
3248 [MMAGIC_VIDEO_GDSC
] = &mmagic_video_gdsc
,
3249 [MMAGIC_MDSS_GDSC
] = &mmagic_mdss_gdsc
,
3250 [MMAGIC_CAMSS_GDSC
] = &mmagic_camss_gdsc
,
3251 [VENUS_GDSC
] = &venus_gdsc
,
3252 [VENUS_CORE0_GDSC
] = &venus_core0_gdsc
,
3253 [VENUS_CORE1_GDSC
] = &venus_core1_gdsc
,
3254 [CAMSS_GDSC
] = &camss_gdsc
,
3255 [VFE0_GDSC
] = &vfe0_gdsc
,
3256 [VFE1_GDSC
] = &vfe1_gdsc
,
3257 [JPEG_GDSC
] = &jpeg_gdsc
,
3258 [CPP_GDSC
] = &cpp_gdsc
,
3259 [FD_GDSC
] = &fd_gdsc
,
3260 [MDSS_GDSC
] = &mdss_gdsc
,
3261 [GPU_GDSC
] = &gpu_gdsc
,
3262 [GPU_GX_GDSC
] = &gpu_gx_gdsc
,
3265 static const struct qcom_reset_map mmcc_msm8996_resets
[] = {
3266 [MMAGICAHB_BCR
] = { 0x5020 },
3267 [MMAGIC_CFG_BCR
] = { 0x5050 },
3268 [MISC_BCR
] = { 0x5010 },
3269 [BTO_BCR
] = { 0x5030 },
3270 [MMAGICAXI_BCR
] = { 0x5060 },
3271 [MMAGICMAXI_BCR
] = { 0x5070 },
3272 [DSA_BCR
] = { 0x50a0 },
3273 [MMAGIC_CAMSS_BCR
] = { 0x3c40 },
3274 [THROTTLE_CAMSS_BCR
] = { 0x3c30 },
3275 [SMMU_VFE_BCR
] = { 0x3c00 },
3276 [SMMU_CPP_BCR
] = { 0x3c10 },
3277 [SMMU_JPEG_BCR
] = { 0x3c20 },
3278 [MMAGIC_MDSS_BCR
] = { 0x2470 },
3279 [THROTTLE_MDSS_BCR
] = { 0x2460 },
3280 [SMMU_ROT_BCR
] = { 0x2440 },
3281 [SMMU_MDP_BCR
] = { 0x2450 },
3282 [MMAGIC_VIDEO_BCR
] = { 0x1190 },
3283 [THROTTLE_VIDEO_BCR
] = { 0x1180 },
3284 [SMMU_VIDEO_BCR
] = { 0x1170 },
3285 [MMAGIC_BIMC_BCR
] = { 0x5290 },
3286 [GPU_GX_BCR
] = { 0x4020 },
3287 [GPU_BCR
] = { 0x4030 },
3288 [GPU_AON_BCR
] = { 0x4040 },
3289 [VMEM_BCR
] = { 0x1200 },
3290 [MMSS_RBCPR_BCR
] = { 0x4080 },
3291 [VIDEO_BCR
] = { 0x1020 },
3292 [MDSS_BCR
] = { 0x2300 },
3293 [CAMSS_TOP_BCR
] = { 0x3480 },
3294 [CAMSS_AHB_BCR
] = { 0x3488 },
3295 [CAMSS_MICRO_BCR
] = { 0x3490 },
3296 [CAMSS_CCI_BCR
] = { 0x3340 },
3297 [CAMSS_PHY0_BCR
] = { 0x3020 },
3298 [CAMSS_PHY1_BCR
] = { 0x3050 },
3299 [CAMSS_PHY2_BCR
] = { 0x3080 },
3300 [CAMSS_CSIPHY0_3P_BCR
] = { 0x3230 },
3301 [CAMSS_CSIPHY1_3P_BCR
] = { 0x3250 },
3302 [CAMSS_CSIPHY2_3P_BCR
] = { 0x3270 },
3303 [CAMSS_JPEG_BCR
] = { 0x35a0 },
3304 [CAMSS_VFE_BCR
] = { 0x36a0 },
3305 [CAMSS_VFE0_BCR
] = { 0x3660 },
3306 [CAMSS_VFE1_BCR
] = { 0x3670 },
3307 [CAMSS_CSI_VFE0_BCR
] = { 0x3700 },
3308 [CAMSS_CSI_VFE1_BCR
] = { 0x3710 },
3309 [CAMSS_CPP_TOP_BCR
] = { 0x36c0 },
3310 [CAMSS_CPP_BCR
] = { 0x36d0 },
3311 [CAMSS_CSI0_BCR
] = { 0x30b0 },
3312 [CAMSS_CSI0RDI_BCR
] = { 0x30d0 },
3313 [CAMSS_CSI0PIX_BCR
] = { 0x30e0 },
3314 [CAMSS_CSI1_BCR
] = { 0x3120 },
3315 [CAMSS_CSI1RDI_BCR
] = { 0x3140 },
3316 [CAMSS_CSI1PIX_BCR
] = { 0x3150 },
3317 [CAMSS_CSI2_BCR
] = { 0x3180 },
3318 [CAMSS_CSI2RDI_BCR
] = { 0x31a0 },
3319 [CAMSS_CSI2PIX_BCR
] = { 0x31b0 },
3320 [CAMSS_CSI3_BCR
] = { 0x31e0 },
3321 [CAMSS_CSI3RDI_BCR
] = { 0x3200 },
3322 [CAMSS_CSI3PIX_BCR
] = { 0x3210 },
3323 [CAMSS_ISPIF_BCR
] = { 0x3220 },
3324 [FD_BCR
] = { 0x3b60 },
3325 [MMSS_SPDM_RM_BCR
] = { 0x300 },
3328 static const struct regmap_config mmcc_msm8996_regmap_config
= {
3332 .max_register
= 0xb008,
3336 static const struct qcom_cc_desc mmcc_msm8996_desc
= {
3337 .config
= &mmcc_msm8996_regmap_config
,
3338 .clks
= mmcc_msm8996_clocks
,
3339 .num_clks
= ARRAY_SIZE(mmcc_msm8996_clocks
),
3340 .resets
= mmcc_msm8996_resets
,
3341 .num_resets
= ARRAY_SIZE(mmcc_msm8996_resets
),
3342 .gdscs
= mmcc_msm8996_gdscs
,
3343 .num_gdscs
= ARRAY_SIZE(mmcc_msm8996_gdscs
),
3344 .clk_hws
= mmcc_msm8996_hws
,
3345 .num_clk_hws
= ARRAY_SIZE(mmcc_msm8996_hws
),
3348 static const struct of_device_id mmcc_msm8996_match_table
[] = {
3349 { .compatible
= "qcom,mmcc-msm8996" },
3352 MODULE_DEVICE_TABLE(of
, mmcc_msm8996_match_table
);
3354 static int mmcc_msm8996_probe(struct platform_device
*pdev
)
3356 struct regmap
*regmap
;
3358 regmap
= qcom_cc_map(pdev
, &mmcc_msm8996_desc
);
3360 return PTR_ERR(regmap
);
3362 /* Disable the AHB DCD */
3363 regmap_update_bits(regmap
, 0x50d8, BIT(31), 0);
3364 /* Disable the NoC FSM for mmss_mmagic_cfg_ahb_clk */
3365 regmap_update_bits(regmap
, 0x5054, BIT(15), 0);
3367 return qcom_cc_really_probe(pdev
, &mmcc_msm8996_desc
, regmap
);
3370 static struct platform_driver mmcc_msm8996_driver
= {
3371 .probe
= mmcc_msm8996_probe
,
3373 .name
= "mmcc-msm8996",
3374 .of_match_table
= mmcc_msm8996_match_table
,
3377 module_platform_driver(mmcc_msm8996_driver
);
3379 MODULE_DESCRIPTION("QCOM MMCC MSM8996 Driver");
3380 MODULE_LICENSE("GPL v2");
3381 MODULE_ALIAS("platform:mmcc-msm8996");