1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2020 Linaro Limited
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,gcc-msm8939.h>
17 #include <dt-bindings/reset/qcom,gcc-msm8939.h>
20 #include "clk-regmap.h"
23 #include "clk-branch.h"
52 static struct clk_pll gpll0
= {
56 .config_reg
= 0x21010,
58 .status_reg
= 0x2101c,
60 .clkr
.hw
.init
= &(struct clk_init_data
){
62 .parent_data
= &(const struct clk_parent_data
) {
70 static struct clk_regmap gpll0_vote
= {
71 .enable_reg
= 0x45000,
72 .enable_mask
= BIT(0),
73 .hw
.init
= &(struct clk_init_data
){
75 .parent_hws
= (const struct clk_hw
*[]) {
79 .ops
= &clk_pll_vote_ops
,
83 static struct clk_pll gpll1
= {
87 .config_reg
= 0x20010,
89 .status_reg
= 0x2001c,
91 .clkr
.hw
.init
= &(struct clk_init_data
){
93 .parent_data
= &(const struct clk_parent_data
) {
101 static struct clk_regmap gpll1_vote
= {
102 .enable_reg
= 0x45000,
103 .enable_mask
= BIT(1),
104 .hw
.init
= &(struct clk_init_data
){
105 .name
= "gpll1_vote",
106 .parent_hws
= (const struct clk_hw
*[]) {
110 .ops
= &clk_pll_vote_ops
,
114 static struct clk_pll gpll2
= {
118 .config_reg
= 0x4a010,
120 .status_reg
= 0x4a01c,
122 .clkr
.hw
.init
= &(struct clk_init_data
){
124 .parent_data
= &(const struct clk_parent_data
) {
132 static struct clk_regmap gpll2_vote
= {
133 .enable_reg
= 0x45000,
134 .enable_mask
= BIT(2),
135 .hw
.init
= &(struct clk_init_data
){
136 .name
= "gpll2_vote",
137 .parent_hws
= (const struct clk_hw
*[]) {
141 .ops
= &clk_pll_vote_ops
,
145 static struct clk_pll bimc_pll
= {
149 .config_reg
= 0x23010,
151 .status_reg
= 0x2301c,
153 .clkr
.hw
.init
= &(struct clk_init_data
){
155 .parent_data
= &(const struct clk_parent_data
) {
163 static struct clk_regmap bimc_pll_vote
= {
164 .enable_reg
= 0x45000,
165 .enable_mask
= BIT(3),
166 .hw
.init
= &(struct clk_init_data
){
167 .name
= "bimc_pll_vote",
168 .parent_hws
= (const struct clk_hw
*[]) {
172 .ops
= &clk_pll_vote_ops
,
176 static struct clk_pll gpll3
= {
180 .config_reg
= 0x22010,
182 .status_reg
= 0x2201c,
184 .clkr
.hw
.init
= &(struct clk_init_data
){
186 .parent_data
= &(const struct clk_parent_data
) {
194 static struct clk_regmap gpll3_vote
= {
195 .enable_reg
= 0x45000,
196 .enable_mask
= BIT(4),
197 .hw
.init
= &(struct clk_init_data
){
198 .name
= "gpll3_vote",
199 .parent_hws
= (const struct clk_hw
*[]) {
203 .ops
= &clk_pll_vote_ops
,
207 /* GPLL3 at 1100 MHz, main output enabled. */
208 static const struct pll_config gpll3_config
= {
215 .pre_div_mask
= BIT(12),
217 .post_div_mask
= BIT(9) | BIT(8),
218 .mn_ena_mask
= BIT(24),
219 .main_output_mask
= BIT(0),
220 .aux_output_mask
= BIT(1),
223 static struct clk_pll gpll4
= {
227 .config_reg
= 0x24010,
229 .status_reg
= 0x2401c,
231 .clkr
.hw
.init
= &(struct clk_init_data
){
233 .parent_data
= &(const struct clk_parent_data
) {
241 static struct clk_regmap gpll4_vote
= {
242 .enable_reg
= 0x45000,
243 .enable_mask
= BIT(5),
244 .hw
.init
= &(struct clk_init_data
){
245 .name
= "gpll4_vote",
246 .parent_hws
= (const struct clk_hw
*[]) {
250 .ops
= &clk_pll_vote_ops
,
254 /* GPLL4 at 1200 MHz, main output enabled. */
255 static struct pll_config gpll4_config
= {
262 .pre_div_mask
= BIT(12),
264 .post_div_mask
= BIT(9) | BIT(8),
265 .mn_ena_mask
= BIT(24),
266 .main_output_mask
= BIT(0),
269 static struct clk_pll gpll5
= {
273 .config_reg
= 0x25010,
275 .status_reg
= 0x2501c,
277 .clkr
.hw
.init
= &(struct clk_init_data
){
279 .parent_data
= &(const struct clk_parent_data
) {
287 static struct clk_regmap gpll5_vote
= {
288 .enable_reg
= 0x45000,
289 .enable_mask
= BIT(6),
290 .hw
.init
= &(struct clk_init_data
){
291 .name
= "gpll5_vote",
292 .parent_hws
= (const struct clk_hw
*[]) {
296 .ops
= &clk_pll_vote_ops
,
300 static struct clk_pll gpll6
= {
304 .config_reg
= 0x37010,
306 .status_reg
= 0x3701c,
308 .clkr
.hw
.init
= &(struct clk_init_data
){
310 .parent_data
= &(const struct clk_parent_data
) {
318 static struct clk_regmap gpll6_vote
= {
319 .enable_reg
= 0x45000,
320 .enable_mask
= BIT(7),
321 .hw
.init
= &(struct clk_init_data
){
322 .name
= "gpll6_vote",
323 .parent_hws
= (const struct clk_hw
*[]) {
327 .ops
= &clk_pll_vote_ops
,
331 static const struct parent_map gcc_xo_gpll0_map
[] = {
336 static const struct clk_parent_data gcc_xo_gpll0_parent_data
[] = {
338 { .hw
= &gpll0_vote
.hw
},
341 static const struct parent_map gcc_xo_gpll0_bimc_map
[] = {
347 static const struct clk_parent_data gcc_xo_gpll0_bimc_parent_data
[] = {
349 { .hw
= &gpll0_vote
.hw
},
350 { .hw
= &bimc_pll_vote
.hw
},
353 static const struct parent_map gcc_xo_gpll0_gpll6a_map
[] = {
359 static const struct clk_parent_data gcc_xo_gpll0_gpll6a_parent_data
[] = {
361 { .hw
= &gpll0_vote
.hw
},
362 { .hw
= &gpll6_vote
.hw
},
365 static const struct parent_map gcc_xo_gpll0_gpll2a_gpll3_gpll6a_map
[] = {
373 static const struct clk_parent_data gcc_xo_gpll0_gpll2a_gpll3_gpll6a_parent_data
[] = {
375 { .hw
= &gpll0_vote
.hw
},
376 { .hw
= &gpll2_vote
.hw
},
377 { .hw
= &gpll3_vote
.hw
},
378 { .hw
= &gpll6_vote
.hw
},
381 static const struct parent_map gcc_xo_gpll0_gpll2_map
[] = {
387 static const struct clk_parent_data gcc_xo_gpll0_gpll2_parent_data
[] = {
389 { .hw
= &gpll0_vote
.hw
},
390 { .hw
= &gpll2_vote
.hw
},
393 static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_map
[] = {
400 static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_parent_data
[] = {
402 { .hw
= &gpll0_vote
.hw
},
403 { .hw
= &gpll2_vote
.hw
},
404 { .hw
= &gpll4_vote
.hw
},
407 static const struct parent_map gcc_xo_gpll0a_map
[] = {
412 static const struct clk_parent_data gcc_xo_gpll0a_parent_data
[] = {
414 { .hw
= &gpll0_vote
.hw
},
417 static const struct parent_map gcc_xo_gpll0_gpll1a_sleep_map
[] = {
424 static const struct clk_parent_data gcc_xo_gpll0_gpll1a_sleep_parent_data
[] = {
426 { .hw
= &gpll0_vote
.hw
},
427 { .hw
= &gpll1_vote
.hw
},
428 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
431 static const struct parent_map gcc_xo_gpll0_gpll1a_gpll6_sleep_map
[] = {
439 static const struct clk_parent_data gcc_xo_gpll0_gpll1a_gpll6_sleep_parent_data
[] = {
441 { .hw
= &gpll0_vote
.hw
},
442 { .hw
= &gpll1_vote
.hw
},
443 { .hw
= &gpll6_vote
.hw
},
444 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
447 static const struct parent_map gcc_xo_gpll0_gpll1a_map
[] = {
453 static const struct clk_parent_data gcc_xo_gpll0_gpll1a_parent_data
[] = {
455 { .hw
= &gpll0_vote
.hw
},
456 { .hw
= &gpll1_vote
.hw
},
459 static const struct parent_map gcc_xo_dsibyte_map
[] = {
461 { P_DSI0_PHYPLL_BYTE
, 2 },
464 static const struct clk_parent_data gcc_xo_dsibyte_parent_data
[] = {
466 { .fw_name
= "dsi0pllbyte", .name
= "dsi0pllbyte" },
469 static const struct parent_map gcc_xo_gpll0a_dsibyte_map
[] = {
472 { P_DSI0_PHYPLL_BYTE
, 1 },
475 static const struct clk_parent_data gcc_xo_gpll0a_dsibyte_parent_data
[] = {
477 { .hw
= &gpll0_vote
.hw
},
478 { .fw_name
= "dsi0pllbyte", .name
= "dsi0pllbyte" },
481 static const struct parent_map gcc_xo_gpll1_dsiphy_gpll6_gpll3a_gpll0a_map
[] = {
484 { P_DSI0_PHYPLL_DSI
, 2 },
490 static const struct clk_parent_data gcc_xo_gpll1_dsiphy_gpll6_gpll3a_gpll0a_parent_data
[] = {
492 { .hw
= &gpll1_vote
.hw
},
493 { .fw_name
= "dsi0pll", .name
= "dsi0pll" },
494 { .hw
= &gpll6_vote
.hw
},
495 { .hw
= &gpll3_vote
.hw
},
496 { .hw
= &gpll0_vote
.hw
},
499 static const struct parent_map gcc_xo_gpll0a_dsiphy_map
[] = {
502 { P_DSI0_PHYPLL_DSI
, 1 },
505 static const struct clk_parent_data gcc_xo_gpll0a_dsiphy_parent_data
[] = {
507 { .hw
= &gpll0_vote
.hw
},
508 { .fw_name
= "dsi0pll", .name
= "dsi0pll" },
511 static const struct parent_map gcc_xo_gpll0_gpll5a_gpll6_bimc_map
[] = {
519 static const struct clk_parent_data gcc_xo_gpll0_gpll5a_gpll6_bimc_parent_data
[] = {
521 { .hw
= &gpll0_vote
.hw
},
522 { .hw
= &gpll5_vote
.hw
},
523 { .hw
= &gpll6_vote
.hw
},
524 { .hw
= &bimc_pll_vote
.hw
},
527 static const struct parent_map gcc_xo_gpll0_gpll1_sleep_map
[] = {
534 static const struct clk_parent_data gcc_xo_gpll0_gpll1_sleep_parent_data
[] = {
536 { .hw
= &gpll0_vote
.hw
},
537 { .hw
= &gpll1_vote
.hw
},
538 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
541 static const struct parent_map gcc_xo_gpll1_epi2s_emclk_sleep_map
[] = {
544 { P_EXT_PRI_I2S
, 2 },
549 static const struct clk_parent_data gcc_xo_gpll1_epi2s_emclk_sleep_parent_data
[] = {
551 { .hw
= &gpll0_vote
.hw
},
552 { .fw_name
= "ext_pri_i2s", .name
= "ext_pri_i2s" },
553 { .fw_name
= "ext_mclk", .name
= "ext_mclk" },
554 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
557 static const struct parent_map gcc_xo_gpll1_esi2s_emclk_sleep_map
[] = {
560 { P_EXT_SEC_I2S
, 2 },
565 static const struct clk_parent_data gcc_xo_gpll1_esi2s_emclk_sleep_parent_data
[] = {
567 { .hw
= &gpll1_vote
.hw
},
568 { .fw_name
= "ext_sec_i2s", .name
= "ext_sec_i2s" },
569 { .fw_name
= "ext_mclk", .name
= "ext_mclk" },
570 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
573 static const struct parent_map gcc_xo_sleep_map
[] = {
578 static const struct clk_parent_data gcc_xo_sleep_parent_data
[] = {
580 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
583 static const struct parent_map gcc_xo_gpll1_emclk_sleep_map
[] = {
590 static const struct clk_parent_data gcc_xo_gpll1_emclk_sleep_parent_data
[] = {
592 { .hw
= &gpll1_vote
.hw
},
593 { .fw_name
= "ext_mclk", .name
= "ext_mclk" },
594 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
597 static const struct clk_parent_data gcc_xo_gpll6_gpll0_parent_data
[] = {
599 { .hw
= &gpll6_vote
.hw
},
600 { .hw
= &gpll0_vote
.hw
},
603 static const struct clk_parent_data gcc_xo_gpll6_gpll0a_parent_data
[] = {
605 { .hw
= &gpll6_vote
.hw
},
606 { .hw
= &gpll0_vote
.hw
},
609 static struct clk_rcg2 pcnoc_bfdcd_clk_src
= {
612 .parent_map
= gcc_xo_gpll0_map
,
613 .clkr
.hw
.init
= &(struct clk_init_data
){
614 .name
= "pcnoc_bfdcd_clk_src",
615 .parent_data
= gcc_xo_gpll0_parent_data
,
616 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
617 .ops
= &clk_rcg2_ops
,
621 static struct clk_rcg2 system_noc_bfdcd_clk_src
= {
624 .parent_map
= gcc_xo_gpll0_gpll6a_map
,
625 .clkr
.hw
.init
= &(struct clk_init_data
){
626 .name
= "system_noc_bfdcd_clk_src",
627 .parent_data
= gcc_xo_gpll0_gpll6a_parent_data
,
628 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6a_parent_data
),
629 .ops
= &clk_rcg2_ops
,
633 static struct clk_rcg2 bimc_ddr_clk_src
= {
636 .parent_map
= gcc_xo_gpll0_bimc_map
,
637 .clkr
.hw
.init
= &(struct clk_init_data
){
638 .name
= "bimc_ddr_clk_src",
639 .parent_data
= gcc_xo_gpll0_bimc_parent_data
,
640 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_bimc_parent_data
),
641 .ops
= &clk_rcg2_ops
,
642 .flags
= CLK_GET_RATE_NOCACHE
,
646 static struct clk_rcg2 system_mm_noc_bfdcd_clk_src
= {
649 .parent_map
= gcc_xo_gpll0_gpll6a_map
,
650 .clkr
.hw
.init
= &(struct clk_init_data
){
651 .name
= "system_mm_noc_bfdcd_clk_src",
652 .parent_data
= gcc_xo_gpll0_gpll6a_parent_data
,
653 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6a_parent_data
),
654 .ops
= &clk_rcg2_ops
,
658 static const struct freq_tbl ftbl_gcc_camss_ahb_clk
[] = {
659 F(40000000, P_GPLL0
, 10, 1, 2),
660 F(80000000, P_GPLL0
, 10, 0, 0),
664 static struct clk_rcg2 camss_ahb_clk_src
= {
668 .parent_map
= gcc_xo_gpll0_map
,
669 .freq_tbl
= ftbl_gcc_camss_ahb_clk
,
670 .clkr
.hw
.init
= &(struct clk_init_data
){
671 .name
= "camss_ahb_clk_src",
672 .parent_data
= gcc_xo_gpll0_parent_data
,
673 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
674 .ops
= &clk_rcg2_ops
,
678 static const struct freq_tbl ftbl_apss_ahb_clk
[] = {
679 F(19200000, P_XO
, 1, 0, 0),
680 F(50000000, P_GPLL0
, 16, 0, 0),
681 F(100000000, P_GPLL0
, 8, 0, 0),
682 F(133330000, P_GPLL0
, 6, 0, 0),
686 static struct clk_rcg2 apss_ahb_clk_src
= {
689 .parent_map
= gcc_xo_gpll0_map
,
690 .freq_tbl
= ftbl_apss_ahb_clk
,
691 .clkr
.hw
.init
= &(struct clk_init_data
){
692 .name
= "apss_ahb_clk_src",
693 .parent_data
= gcc_xo_gpll0_parent_data
,
694 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
695 .ops
= &clk_rcg2_ops
,
699 static const struct freq_tbl ftbl_gcc_camss_csi0_1_2_clk
[] = {
700 F(100000000, P_GPLL0
, 8, 0, 0),
701 F(200000000, P_GPLL0
, 4, 0, 0),
705 static struct clk_rcg2 csi0_clk_src
= {
708 .parent_map
= gcc_xo_gpll0_map
,
709 .freq_tbl
= ftbl_gcc_camss_csi0_1_2_clk
,
710 .clkr
.hw
.init
= &(struct clk_init_data
){
711 .name
= "csi0_clk_src",
712 .parent_data
= gcc_xo_gpll0_parent_data
,
713 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
714 .ops
= &clk_rcg2_ops
,
718 static struct clk_rcg2 csi1_clk_src
= {
721 .parent_map
= gcc_xo_gpll0_map
,
722 .freq_tbl
= ftbl_gcc_camss_csi0_1_2_clk
,
723 .clkr
.hw
.init
= &(struct clk_init_data
){
724 .name
= "csi1_clk_src",
725 .parent_data
= gcc_xo_gpll0_parent_data
,
726 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
727 .ops
= &clk_rcg2_ops
,
731 static struct clk_rcg2 csi2_clk_src
= {
734 .parent_map
= gcc_xo_gpll0_map
,
735 .freq_tbl
= ftbl_gcc_camss_csi0_1_2_clk
,
736 .clkr
.hw
.init
= &(struct clk_init_data
){
737 .name
= "csi2_clk_src",
738 .parent_data
= gcc_xo_gpll0_parent_data
,
739 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
740 .ops
= &clk_rcg2_ops
,
744 static const struct freq_tbl ftbl_gcc_oxili_gfx3d_clk
[] = {
745 F(19200000, P_XO
, 1, 0, 0),
746 F(50000000, P_GPLL0
, 16, 0, 0),
747 F(80000000, P_GPLL0
, 10, 0, 0),
748 F(100000000, P_GPLL0
, 8, 0, 0),
749 F(160000000, P_GPLL0
, 5, 0, 0),
750 F(200000000, P_GPLL0
, 4, 0, 0),
751 F(220000000, P_GPLL3
, 5, 0, 0),
752 F(266670000, P_GPLL0
, 3, 0, 0),
753 F(310000000, P_GPLL2_AUX
, 3, 0, 0),
754 F(400000000, P_GPLL0
, 2, 0, 0),
755 F(465000000, P_GPLL2_AUX
, 2, 0, 0),
756 F(550000000, P_GPLL3
, 2, 0, 0),
760 static struct clk_rcg2 gfx3d_clk_src
= {
763 .parent_map
= gcc_xo_gpll0_gpll2a_gpll3_gpll6a_map
,
764 .freq_tbl
= ftbl_gcc_oxili_gfx3d_clk
,
765 .clkr
.hw
.init
= &(struct clk_init_data
){
766 .name
= "gfx3d_clk_src",
767 .parent_data
= gcc_xo_gpll0_gpll2a_gpll3_gpll6a_parent_data
,
768 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2a_gpll3_gpll6a_parent_data
),
769 .ops
= &clk_rcg2_ops
,
773 static const struct freq_tbl ftbl_gcc_camss_vfe0_clk
[] = {
774 F(50000000, P_GPLL0
, 16, 0, 0),
775 F(80000000, P_GPLL0
, 10, 0, 0),
776 F(100000000, P_GPLL0
, 8, 0, 0),
777 F(160000000, P_GPLL0
, 5, 0, 0),
778 F(177780000, P_GPLL0
, 4.5, 0, 0),
779 F(200000000, P_GPLL0
, 4, 0, 0),
780 F(266670000, P_GPLL0
, 3, 0, 0),
781 F(320000000, P_GPLL0
, 2.5, 0, 0),
782 F(400000000, P_GPLL0
, 2, 0, 0),
783 F(465000000, P_GPLL2
, 2, 0, 0),
784 F(480000000, P_GPLL4
, 2.5, 0, 0),
785 F(600000000, P_GPLL4
, 2, 0, 0),
789 static struct clk_rcg2 vfe0_clk_src
= {
792 .parent_map
= gcc_xo_gpll0_gpll2_gpll4_map
,
793 .freq_tbl
= ftbl_gcc_camss_vfe0_clk
,
794 .clkr
.hw
.init
= &(struct clk_init_data
){
795 .name
= "vfe0_clk_src",
796 .parent_data
= gcc_xo_gpll0_gpll2_gpll4_parent_data
,
797 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2_gpll4_parent_data
),
798 .ops
= &clk_rcg2_ops
,
802 static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
[] = {
803 F(19200000, P_XO
, 1, 0, 0),
804 F(50000000, P_GPLL0
, 16, 0, 0),
808 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
811 .parent_map
= gcc_xo_gpll0_map
,
812 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
813 .clkr
.hw
.init
= &(struct clk_init_data
){
814 .name
= "blsp1_qup1_i2c_apps_clk_src",
815 .parent_data
= gcc_xo_gpll0_parent_data
,
816 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
817 .ops
= &clk_rcg2_ops
,
821 static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_spi_apps_clk
[] = {
822 F(960000, P_XO
, 10, 1, 2),
823 F(4800000, P_XO
, 4, 0, 0),
824 F(9600000, P_XO
, 2, 0, 0),
825 F(16000000, P_GPLL0
, 10, 1, 5),
826 F(19200000, P_XO
, 1, 0, 0),
827 F(25000000, P_GPLL0
, 16, 1, 2),
828 F(50000000, P_GPLL0
, 16, 0, 0),
832 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
836 .parent_map
= gcc_xo_gpll0_map
,
837 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
838 .clkr
.hw
.init
= &(struct clk_init_data
){
839 .name
= "blsp1_qup1_spi_apps_clk_src",
840 .parent_data
= gcc_xo_gpll0_parent_data
,
841 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
842 .ops
= &clk_rcg2_ops
,
846 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
849 .parent_map
= gcc_xo_gpll0_map
,
850 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
851 .clkr
.hw
.init
= &(struct clk_init_data
){
852 .name
= "blsp1_qup2_i2c_apps_clk_src",
853 .parent_data
= gcc_xo_gpll0_parent_data
,
854 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
855 .ops
= &clk_rcg2_ops
,
859 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
863 .parent_map
= gcc_xo_gpll0_map
,
864 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
865 .clkr
.hw
.init
= &(struct clk_init_data
){
866 .name
= "blsp1_qup2_spi_apps_clk_src",
867 .parent_data
= gcc_xo_gpll0_parent_data
,
868 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
869 .ops
= &clk_rcg2_ops
,
873 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
876 .parent_map
= gcc_xo_gpll0_map
,
877 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
878 .clkr
.hw
.init
= &(struct clk_init_data
){
879 .name
= "blsp1_qup3_i2c_apps_clk_src",
880 .parent_data
= gcc_xo_gpll0_parent_data
,
881 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
882 .ops
= &clk_rcg2_ops
,
886 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
890 .parent_map
= gcc_xo_gpll0_map
,
891 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
892 .clkr
.hw
.init
= &(struct clk_init_data
){
893 .name
= "blsp1_qup3_spi_apps_clk_src",
894 .parent_data
= gcc_xo_gpll0_parent_data
,
895 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
896 .ops
= &clk_rcg2_ops
,
900 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
903 .parent_map
= gcc_xo_gpll0_map
,
904 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
905 .clkr
.hw
.init
= &(struct clk_init_data
){
906 .name
= "blsp1_qup4_i2c_apps_clk_src",
907 .parent_data
= gcc_xo_gpll0_parent_data
,
908 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
909 .ops
= &clk_rcg2_ops
,
913 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
917 .parent_map
= gcc_xo_gpll0_map
,
918 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
919 .clkr
.hw
.init
= &(struct clk_init_data
){
920 .name
= "blsp1_qup4_spi_apps_clk_src",
921 .parent_data
= gcc_xo_gpll0_parent_data
,
922 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
923 .ops
= &clk_rcg2_ops
,
927 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
930 .parent_map
= gcc_xo_gpll0_map
,
931 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
932 .clkr
.hw
.init
= &(struct clk_init_data
){
933 .name
= "blsp1_qup5_i2c_apps_clk_src",
934 .parent_data
= gcc_xo_gpll0_parent_data
,
935 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
936 .ops
= &clk_rcg2_ops
,
940 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
944 .parent_map
= gcc_xo_gpll0_map
,
945 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
946 .clkr
.hw
.init
= &(struct clk_init_data
){
947 .name
= "blsp1_qup5_spi_apps_clk_src",
948 .parent_data
= gcc_xo_gpll0_parent_data
,
949 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
950 .ops
= &clk_rcg2_ops
,
954 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
957 .parent_map
= gcc_xo_gpll0_map
,
958 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_i2c_apps_clk
,
959 .clkr
.hw
.init
= &(struct clk_init_data
){
960 .name
= "blsp1_qup6_i2c_apps_clk_src",
961 .parent_data
= gcc_xo_gpll0_parent_data
,
962 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
963 .ops
= &clk_rcg2_ops
,
967 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
971 .parent_map
= gcc_xo_gpll0_map
,
972 .freq_tbl
= ftbl_gcc_blsp1_qup1_6_spi_apps_clk
,
973 .clkr
.hw
.init
= &(struct clk_init_data
){
974 .name
= "blsp1_qup6_spi_apps_clk_src",
975 .parent_data
= gcc_xo_gpll0_parent_data
,
976 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
977 .ops
= &clk_rcg2_ops
,
981 static const struct freq_tbl ftbl_gcc_blsp1_uart1_6_apps_clk
[] = {
982 F(3686400, P_GPLL0
, 1, 72, 15625),
983 F(7372800, P_GPLL0
, 1, 144, 15625),
984 F(14745600, P_GPLL0
, 1, 288, 15625),
985 F(16000000, P_GPLL0
, 10, 1, 5),
986 F(19200000, P_XO
, 1, 0, 0),
987 F(24000000, P_GPLL0
, 1, 3, 100),
988 F(25000000, P_GPLL0
, 16, 1, 2),
989 F(32000000, P_GPLL0
, 1, 1, 25),
990 F(40000000, P_GPLL0
, 1, 1, 20),
991 F(46400000, P_GPLL0
, 1, 29, 500),
992 F(48000000, P_GPLL0
, 1, 3, 50),
993 F(51200000, P_GPLL0
, 1, 8, 125),
994 F(56000000, P_GPLL0
, 1, 7, 100),
995 F(58982400, P_GPLL0
, 1, 1152, 15625),
996 F(60000000, P_GPLL0
, 1, 3, 40),
1000 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
1001 .cmd_rcgr
= 0x02044,
1004 .parent_map
= gcc_xo_gpll0_map
,
1005 .freq_tbl
= ftbl_gcc_blsp1_uart1_6_apps_clk
,
1006 .clkr
.hw
.init
= &(struct clk_init_data
){
1007 .name
= "blsp1_uart1_apps_clk_src",
1008 .parent_data
= gcc_xo_gpll0_parent_data
,
1009 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1010 .ops
= &clk_rcg2_ops
,
1014 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
1015 .cmd_rcgr
= 0x03034,
1018 .parent_map
= gcc_xo_gpll0_map
,
1019 .freq_tbl
= ftbl_gcc_blsp1_uart1_6_apps_clk
,
1020 .clkr
.hw
.init
= &(struct clk_init_data
){
1021 .name
= "blsp1_uart2_apps_clk_src",
1022 .parent_data
= gcc_xo_gpll0_parent_data
,
1023 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1024 .ops
= &clk_rcg2_ops
,
1028 static const struct freq_tbl ftbl_gcc_camss_cci_clk
[] = {
1029 F(19200000, P_XO
, 1, 0, 0),
1030 F(37500000, P_GPLL0
, 1, 3, 64),
1034 static struct clk_rcg2 cci_clk_src
= {
1035 .cmd_rcgr
= 0x51000,
1038 .parent_map
= gcc_xo_gpll0a_map
,
1039 .freq_tbl
= ftbl_gcc_camss_cci_clk
,
1040 .clkr
.hw
.init
= &(struct clk_init_data
){
1041 .name
= "cci_clk_src",
1042 .parent_data
= gcc_xo_gpll0a_parent_data
,
1043 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_parent_data
),
1044 .ops
= &clk_rcg2_ops
,
1049 * This is a frequency table for "General Purpose" clocks.
1050 * These clocks can be muxed to the SoC pins and may be used by
1051 * external devices. They're often used as PWM source.
1053 * See comment at ftbl_gcc_gp1_3_clk.
1055 static const struct freq_tbl ftbl_gcc_camss_gp0_1_clk
[] = {
1056 F(10000, P_XO
, 16, 1, 120),
1057 F(100000, P_XO
, 16, 1, 12),
1058 F(500000, P_GPLL0
, 16, 1, 100),
1059 F(1000000, P_GPLL0
, 16, 1, 50),
1060 F(2500000, P_GPLL0
, 16, 1, 20),
1061 F(5000000, P_GPLL0
, 16, 1, 10),
1062 F(100000000, P_GPLL0
, 8, 0, 0),
1063 F(200000000, P_GPLL0
, 4, 0, 0),
1067 static struct clk_rcg2 camss_gp0_clk_src
= {
1068 .cmd_rcgr
= 0x54000,
1071 .parent_map
= gcc_xo_gpll0_gpll1a_sleep_map
,
1072 .freq_tbl
= ftbl_gcc_camss_gp0_1_clk
,
1073 .clkr
.hw
.init
= &(struct clk_init_data
){
1074 .name
= "camss_gp0_clk_src",
1075 .parent_data
= gcc_xo_gpll0_gpll1a_sleep_parent_data
,
1076 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_sleep_parent_data
),
1077 .ops
= &clk_rcg2_ops
,
1081 static struct clk_rcg2 camss_gp1_clk_src
= {
1082 .cmd_rcgr
= 0x55000,
1085 .parent_map
= gcc_xo_gpll0_gpll1a_sleep_map
,
1086 .freq_tbl
= ftbl_gcc_camss_gp0_1_clk
,
1087 .clkr
.hw
.init
= &(struct clk_init_data
){
1088 .name
= "camss_gp1_clk_src",
1089 .parent_data
= gcc_xo_gpll0_gpll1a_sleep_parent_data
,
1090 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_sleep_parent_data
),
1091 .ops
= &clk_rcg2_ops
,
1095 static const struct freq_tbl ftbl_gcc_camss_jpeg0_clk
[] = {
1096 F(133330000, P_GPLL0
, 6, 0, 0),
1097 F(266670000, P_GPLL0
, 3, 0, 0),
1098 F(320000000, P_GPLL0
, 2.5, 0, 0),
1102 static struct clk_rcg2 jpeg0_clk_src
= {
1103 .cmd_rcgr
= 0x57000,
1105 .parent_map
= gcc_xo_gpll0_map
,
1106 .freq_tbl
= ftbl_gcc_camss_jpeg0_clk
,
1107 .clkr
.hw
.init
= &(struct clk_init_data
){
1108 .name
= "jpeg0_clk_src",
1109 .parent_data
= gcc_xo_gpll0_parent_data
,
1110 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1111 .ops
= &clk_rcg2_ops
,
1115 static const struct freq_tbl ftbl_gcc_camss_mclk0_1_clk
[] = {
1116 F(24000000, P_GPLL0
, 1, 1, 45),
1117 F(66670000, P_GPLL0
, 12, 0, 0),
1121 static struct clk_rcg2 mclk0_clk_src
= {
1122 .cmd_rcgr
= 0x52000,
1125 .parent_map
= gcc_xo_gpll0_gpll1a_gpll6_sleep_map
,
1126 .freq_tbl
= ftbl_gcc_camss_mclk0_1_clk
,
1127 .clkr
.hw
.init
= &(struct clk_init_data
){
1128 .name
= "mclk0_clk_src",
1129 .parent_data
= gcc_xo_gpll0_gpll1a_gpll6_sleep_parent_data
,
1130 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_gpll6_sleep_parent_data
),
1131 .ops
= &clk_rcg2_ops
,
1135 static struct clk_rcg2 mclk1_clk_src
= {
1136 .cmd_rcgr
= 0x53000,
1139 .parent_map
= gcc_xo_gpll0_gpll1a_gpll6_sleep_map
,
1140 .freq_tbl
= ftbl_gcc_camss_mclk0_1_clk
,
1141 .clkr
.hw
.init
= &(struct clk_init_data
){
1142 .name
= "mclk1_clk_src",
1143 .parent_data
= gcc_xo_gpll0_gpll1a_gpll6_sleep_parent_data
,
1144 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_gpll6_sleep_parent_data
),
1145 .ops
= &clk_rcg2_ops
,
1149 static const struct freq_tbl ftbl_gcc_camss_csi0_1phytimer_clk
[] = {
1150 F(100000000, P_GPLL0
, 8, 0, 0),
1151 F(200000000, P_GPLL0
, 4, 0, 0),
1155 static struct clk_rcg2 csi0phytimer_clk_src
= {
1156 .cmd_rcgr
= 0x4e000,
1158 .parent_map
= gcc_xo_gpll0_gpll1a_map
,
1159 .freq_tbl
= ftbl_gcc_camss_csi0_1phytimer_clk
,
1160 .clkr
.hw
.init
= &(struct clk_init_data
){
1161 .name
= "csi0phytimer_clk_src",
1162 .parent_data
= gcc_xo_gpll0_gpll1a_parent_data
,
1163 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_parent_data
),
1164 .ops
= &clk_rcg2_ops
,
1168 static struct clk_rcg2 csi1phytimer_clk_src
= {
1169 .cmd_rcgr
= 0x4f000,
1171 .parent_map
= gcc_xo_gpll0_gpll1a_map
,
1172 .freq_tbl
= ftbl_gcc_camss_csi0_1phytimer_clk
,
1173 .clkr
.hw
.init
= &(struct clk_init_data
){
1174 .name
= "csi1phytimer_clk_src",
1175 .parent_data
= gcc_xo_gpll0_gpll1a_parent_data
,
1176 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_parent_data
),
1177 .ops
= &clk_rcg2_ops
,
1181 static const struct freq_tbl ftbl_gcc_camss_cpp_clk
[] = {
1182 F(160000000, P_GPLL0
, 5, 0, 0),
1183 F(200000000, P_GPLL0
, 4, 0, 0),
1184 F(228570000, P_GPLL0
, 3.5, 0, 0),
1185 F(266670000, P_GPLL0
, 3, 0, 0),
1186 F(320000000, P_GPLL0
, 2.5, 0, 0),
1187 F(465000000, P_GPLL2
, 2, 0, 0),
1191 static struct clk_rcg2 cpp_clk_src
= {
1192 .cmd_rcgr
= 0x58018,
1194 .parent_map
= gcc_xo_gpll0_gpll2_map
,
1195 .freq_tbl
= ftbl_gcc_camss_cpp_clk
,
1196 .clkr
.hw
.init
= &(struct clk_init_data
){
1197 .name
= "cpp_clk_src",
1198 .parent_data
= gcc_xo_gpll0_gpll2_parent_data
,
1199 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2_parent_data
),
1200 .ops
= &clk_rcg2_ops
,
1204 static const struct freq_tbl ftbl_gcc_crypto_clk
[] = {
1205 F(50000000, P_GPLL0
, 16, 0, 0),
1206 F(80000000, P_GPLL0
, 10, 0, 0),
1207 F(100000000, P_GPLL0
, 8, 0, 0),
1208 F(160000000, P_GPLL0
, 5, 0, 0),
1212 /* This is not in the documentation but is in the downstream driver */
1213 static struct clk_rcg2 crypto_clk_src
= {
1214 .cmd_rcgr
= 0x16004,
1216 .parent_map
= gcc_xo_gpll0_map
,
1217 .freq_tbl
= ftbl_gcc_crypto_clk
,
1218 .clkr
.hw
.init
= &(struct clk_init_data
){
1219 .name
= "crypto_clk_src",
1220 .parent_data
= gcc_xo_gpll0_parent_data
,
1221 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1222 .ops
= &clk_rcg2_ops
,
1227 * This is a frequency table for "General Purpose" clocks.
1228 * These clocks can be muxed to the SoC pins and may be used by
1229 * external devices. They're often used as PWM source.
1231 * Please note that MND divider must be enabled for duty-cycle
1232 * control to be possible. (M != N) Also since D register is configured
1233 * with a value multiplied by 2, and duty cycle is calculated as
1235 * DutyCycle = ----------------
1237 * (where W = .mnd_width)
1238 * N must be half or less than maximum value for the register.
1239 * Otherwise duty-cycle control would be limited.
1240 * (e.g. for 8-bit NMD N should be less than 128)
1242 static const struct freq_tbl ftbl_gcc_gp1_3_clk
[] = {
1243 F(10000, P_XO
, 16, 1, 120),
1244 F(100000, P_XO
, 16, 1, 12),
1245 F(500000, P_GPLL0
, 16, 1, 100),
1246 F(1000000, P_GPLL0
, 16, 1, 50),
1247 F(2500000, P_GPLL0
, 16, 1, 20),
1248 F(5000000, P_GPLL0
, 16, 1, 10),
1249 F(19200000, P_XO
, 1, 0, 0),
1253 static struct clk_rcg2 gp1_clk_src
= {
1254 .cmd_rcgr
= 0x08004,
1257 .parent_map
= gcc_xo_gpll0_gpll1a_sleep_map
,
1258 .freq_tbl
= ftbl_gcc_gp1_3_clk
,
1259 .clkr
.hw
.init
= &(struct clk_init_data
){
1260 .name
= "gp1_clk_src",
1261 .parent_data
= gcc_xo_gpll0_gpll1a_sleep_parent_data
,
1262 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_sleep_parent_data
),
1263 .ops
= &clk_rcg2_ops
,
1267 static struct clk_rcg2 gp2_clk_src
= {
1268 .cmd_rcgr
= 0x09004,
1271 .parent_map
= gcc_xo_gpll0_gpll1a_sleep_map
,
1272 .freq_tbl
= ftbl_gcc_gp1_3_clk
,
1273 .clkr
.hw
.init
= &(struct clk_init_data
){
1274 .name
= "gp2_clk_src",
1275 .parent_data
= gcc_xo_gpll0_gpll1a_sleep_parent_data
,
1276 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_sleep_parent_data
),
1277 .ops
= &clk_rcg2_ops
,
1281 static struct clk_rcg2 gp3_clk_src
= {
1282 .cmd_rcgr
= 0x0a004,
1285 .parent_map
= gcc_xo_gpll0_gpll1a_sleep_map
,
1286 .freq_tbl
= ftbl_gcc_gp1_3_clk
,
1287 .clkr
.hw
.init
= &(struct clk_init_data
){
1288 .name
= "gp3_clk_src",
1289 .parent_data
= gcc_xo_gpll0_gpll1a_sleep_parent_data
,
1290 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1a_sleep_parent_data
),
1291 .ops
= &clk_rcg2_ops
,
1295 static struct clk_rcg2 byte0_clk_src
= {
1296 .cmd_rcgr
= 0x4d044,
1298 .parent_map
= gcc_xo_gpll0a_dsibyte_map
,
1299 .clkr
.hw
.init
= &(struct clk_init_data
){
1300 .name
= "byte0_clk_src",
1301 .parent_data
= gcc_xo_gpll0a_dsibyte_parent_data
,
1302 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_dsibyte_parent_data
),
1303 .ops
= &clk_byte2_ops
,
1304 .flags
= CLK_SET_RATE_PARENT
,
1308 static struct clk_rcg2 byte1_clk_src
= {
1309 .cmd_rcgr
= 0x4d0b0,
1311 .parent_map
= gcc_xo_gpll0a_dsibyte_map
,
1312 .clkr
.hw
.init
= &(struct clk_init_data
){
1313 .name
= "byte1_clk_src",
1314 .parent_data
= gcc_xo_gpll0a_dsibyte_parent_data
,
1315 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_dsibyte_parent_data
),
1316 .ops
= &clk_byte2_ops
,
1317 .flags
= CLK_SET_RATE_PARENT
,
1321 static const struct freq_tbl ftbl_gcc_mdss_esc_clk
[] = {
1322 F(19200000, P_XO
, 1, 0, 0),
1326 static struct clk_rcg2 esc0_clk_src
= {
1327 .cmd_rcgr
= 0x4d060,
1329 .parent_map
= gcc_xo_dsibyte_map
,
1330 .freq_tbl
= ftbl_gcc_mdss_esc_clk
,
1331 .clkr
.hw
.init
= &(struct clk_init_data
){
1332 .name
= "esc0_clk_src",
1333 .parent_data
= gcc_xo_dsibyte_parent_data
,
1334 .num_parents
= ARRAY_SIZE(gcc_xo_dsibyte_parent_data
),
1335 .ops
= &clk_rcg2_ops
,
1339 static struct clk_rcg2 esc1_clk_src
= {
1340 .cmd_rcgr
= 0x4d0a8,
1342 .parent_map
= gcc_xo_dsibyte_map
,
1343 .freq_tbl
= ftbl_gcc_mdss_esc_clk
,
1344 .clkr
.hw
.init
= &(struct clk_init_data
){
1345 .name
= "esc1_clk_src",
1346 .parent_data
= gcc_xo_dsibyte_parent_data
,
1347 .num_parents
= ARRAY_SIZE(gcc_xo_dsibyte_parent_data
),
1348 .ops
= &clk_rcg2_ops
,
1352 static const struct freq_tbl ftbl_gcc_mdss_mdp_clk
[] = {
1353 F(50000000, P_GPLL0_AUX
, 16, 0, 0),
1354 F(80000000, P_GPLL0_AUX
, 10, 0, 0),
1355 F(100000000, P_GPLL0_AUX
, 8, 0, 0),
1356 F(145500000, P_GPLL0_AUX
, 5.5, 0, 0),
1357 F(153600000, P_GPLL0
, 4, 0, 0),
1358 F(160000000, P_GPLL0_AUX
, 5, 0, 0),
1359 F(177780000, P_GPLL0_AUX
, 4.5, 0, 0),
1360 F(200000000, P_GPLL0_AUX
, 4, 0, 0),
1361 F(266670000, P_GPLL0_AUX
, 3, 0, 0),
1362 F(307200000, P_GPLL1
, 2, 0, 0),
1363 F(366670000, P_GPLL3_AUX
, 3, 0, 0),
1367 static struct clk_rcg2 mdp_clk_src
= {
1368 .cmd_rcgr
= 0x4d014,
1370 .parent_map
= gcc_xo_gpll1_dsiphy_gpll6_gpll3a_gpll0a_map
,
1371 .freq_tbl
= ftbl_gcc_mdss_mdp_clk
,
1372 .clkr
.hw
.init
= &(struct clk_init_data
){
1373 .name
= "mdp_clk_src",
1374 .parent_data
= gcc_xo_gpll1_dsiphy_gpll6_gpll3a_gpll0a_parent_data
,
1375 .num_parents
= ARRAY_SIZE(gcc_xo_gpll1_dsiphy_gpll6_gpll3a_gpll0a_parent_data
),
1376 .ops
= &clk_rcg2_ops
,
1380 static struct clk_rcg2 pclk0_clk_src
= {
1381 .cmd_rcgr
= 0x4d000,
1384 .parent_map
= gcc_xo_gpll0a_dsiphy_map
,
1385 .clkr
.hw
.init
= &(struct clk_init_data
){
1386 .name
= "pclk0_clk_src",
1387 .parent_data
= gcc_xo_gpll0a_dsiphy_parent_data
,
1388 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_dsiphy_parent_data
),
1389 .ops
= &clk_pixel_ops
,
1390 .flags
= CLK_SET_RATE_PARENT
,
1394 static struct clk_rcg2 pclk1_clk_src
= {
1395 .cmd_rcgr
= 0x4d0b8,
1398 .parent_map
= gcc_xo_gpll0a_dsiphy_map
,
1399 .clkr
.hw
.init
= &(struct clk_init_data
){
1400 .name
= "pclk1_clk_src",
1401 .parent_data
= gcc_xo_gpll0a_dsiphy_parent_data
,
1402 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_dsiphy_parent_data
),
1403 .ops
= &clk_pixel_ops
,
1404 .flags
= CLK_SET_RATE_PARENT
,
1408 static const struct freq_tbl ftbl_gcc_mdss_vsync_clk
[] = {
1409 F(19200000, P_XO
, 1, 0, 0),
1413 static struct clk_rcg2 vsync_clk_src
= {
1414 .cmd_rcgr
= 0x4d02c,
1416 .parent_map
= gcc_xo_gpll0a_map
,
1417 .freq_tbl
= ftbl_gcc_mdss_vsync_clk
,
1418 .clkr
.hw
.init
= &(struct clk_init_data
){
1419 .name
= "vsync_clk_src",
1420 .parent_data
= gcc_xo_gpll0a_parent_data
,
1421 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0a_parent_data
),
1422 .ops
= &clk_rcg2_ops
,
1426 static const struct freq_tbl ftbl_gcc_pdm2_clk
[] = {
1427 F(64000000, P_GPLL0
, 12.5, 0, 0),
1431 /* This is not in the documentation but is in the downstream driver */
1432 static struct clk_rcg2 pdm2_clk_src
= {
1433 .cmd_rcgr
= 0x44010,
1435 .parent_map
= gcc_xo_gpll0_map
,
1436 .freq_tbl
= ftbl_gcc_pdm2_clk
,
1437 .clkr
.hw
.init
= &(struct clk_init_data
){
1438 .name
= "pdm2_clk_src",
1439 .parent_data
= gcc_xo_gpll0_parent_data
,
1440 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1441 .ops
= &clk_rcg2_ops
,
1445 static const struct freq_tbl ftbl_gcc_sdcc_apps_clk
[] = {
1446 F(144000, P_XO
, 16, 3, 25),
1447 F(400000, P_XO
, 12, 1, 4),
1448 F(20000000, P_GPLL0
, 10, 1, 4),
1449 F(25000000, P_GPLL0
, 16, 1, 2),
1450 F(50000000, P_GPLL0
, 16, 0, 0),
1451 F(100000000, P_GPLL0
, 8, 0, 0),
1452 F(177770000, P_GPLL0
, 4.5, 0, 0),
1453 F(200000000, P_GPLL0
, 4, 0, 0),
1457 static struct clk_rcg2 sdcc1_apps_clk_src
= {
1458 .cmd_rcgr
= 0x42004,
1461 .parent_map
= gcc_xo_gpll0_map
,
1462 .freq_tbl
= ftbl_gcc_sdcc_apps_clk
,
1463 .clkr
.hw
.init
= &(struct clk_init_data
){
1464 .name
= "sdcc1_apps_clk_src",
1465 .parent_data
= gcc_xo_gpll0_parent_data
,
1466 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1467 .ops
= &clk_rcg2_floor_ops
,
1471 static struct clk_rcg2 sdcc2_apps_clk_src
= {
1472 .cmd_rcgr
= 0x43004,
1475 .parent_map
= gcc_xo_gpll0_map
,
1476 .freq_tbl
= ftbl_gcc_sdcc_apps_clk
,
1477 .clkr
.hw
.init
= &(struct clk_init_data
){
1478 .name
= "sdcc2_apps_clk_src",
1479 .parent_data
= gcc_xo_gpll0_parent_data
,
1480 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1481 .ops
= &clk_rcg2_floor_ops
,
1485 static const struct freq_tbl ftbl_gcc_apss_tcu_clk
[] = {
1486 F(154285000, P_GPLL6
, 7, 0, 0),
1487 F(320000000, P_GPLL0
, 2.5, 0, 0),
1488 F(400000000, P_GPLL0
, 2, 0, 0),
1492 static struct clk_rcg2 apss_tcu_clk_src
= {
1493 .cmd_rcgr
= 0x1207c,
1495 .parent_map
= gcc_xo_gpll0_gpll5a_gpll6_bimc_map
,
1496 .freq_tbl
= ftbl_gcc_apss_tcu_clk
,
1497 .clkr
.hw
.init
= &(struct clk_init_data
){
1498 .name
= "apss_tcu_clk_src",
1499 .parent_data
= gcc_xo_gpll0_gpll5a_gpll6_bimc_parent_data
,
1500 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll5a_gpll6_bimc_parent_data
),
1501 .ops
= &clk_rcg2_ops
,
1505 static const struct freq_tbl ftbl_gcc_bimc_gpu_clk
[] = {
1506 F(19200000, P_XO
, 1, 0, 0),
1507 F(100000000, P_GPLL0
, 8, 0, 0),
1508 F(200000000, P_GPLL0
, 4, 0, 0),
1509 F(266500000, P_BIMC
, 4, 0, 0),
1510 F(400000000, P_GPLL0
, 2, 0, 0),
1511 F(533000000, P_BIMC
, 2, 0, 0),
1515 static struct clk_rcg2 bimc_gpu_clk_src
= {
1516 .cmd_rcgr
= 0x31028,
1518 .parent_map
= gcc_xo_gpll0_gpll5a_gpll6_bimc_map
,
1519 .freq_tbl
= ftbl_gcc_bimc_gpu_clk
,
1520 .clkr
.hw
.init
= &(struct clk_init_data
){
1521 .name
= "bimc_gpu_clk_src",
1522 .parent_data
= gcc_xo_gpll0_gpll5a_gpll6_bimc_parent_data
,
1523 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll5a_gpll6_bimc_parent_data
),
1524 .flags
= CLK_GET_RATE_NOCACHE
,
1525 .ops
= &clk_rcg2_ops
,
1529 static const struct freq_tbl ftbl_gcc_usb_hs_system_clk
[] = {
1530 F(57140000, P_GPLL0
, 14, 0, 0),
1531 F(80000000, P_GPLL0
, 10, 0, 0),
1532 F(100000000, P_GPLL0
, 8, 0, 0),
1536 static struct clk_rcg2 usb_hs_system_clk_src
= {
1537 .cmd_rcgr
= 0x41010,
1539 .parent_map
= gcc_xo_gpll0_map
,
1540 .freq_tbl
= ftbl_gcc_usb_hs_system_clk
,
1541 .clkr
.hw
.init
= &(struct clk_init_data
){
1542 .name
= "usb_hs_system_clk_src",
1543 .parent_data
= gcc_xo_gpll0_parent_data
,
1544 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1545 .ops
= &clk_rcg2_ops
,
1549 static const struct freq_tbl ftbl_gcc_usb_fs_system_clk
[] = {
1550 F(64000000, P_GPLL0
, 12.5, 0, 0),
1554 static struct clk_rcg2 usb_fs_system_clk_src
= {
1555 .cmd_rcgr
= 0x3f010,
1557 .parent_map
= gcc_xo_gpll0_map
,
1558 .freq_tbl
= ftbl_gcc_usb_fs_system_clk
,
1559 .clkr
.hw
.init
= &(struct clk_init_data
){
1560 .name
= "usb_fs_system_clk_src",
1561 .parent_data
= gcc_xo_gpll6_gpll0_parent_data
,
1562 .num_parents
= ARRAY_SIZE(gcc_xo_gpll6_gpll0_parent_data
),
1563 .ops
= &clk_rcg2_ops
,
1567 static const struct freq_tbl ftbl_gcc_usb_fs_ic_clk
[] = {
1568 F(60000000, P_GPLL6
, 1, 1, 18),
1572 static struct clk_rcg2 usb_fs_ic_clk_src
= {
1573 .cmd_rcgr
= 0x3f034,
1575 .parent_map
= gcc_xo_gpll0_map
,
1576 .freq_tbl
= ftbl_gcc_usb_fs_ic_clk
,
1577 .clkr
.hw
.init
= &(struct clk_init_data
){
1578 .name
= "usb_fs_ic_clk_src",
1579 .parent_data
= gcc_xo_gpll6_gpll0a_parent_data
,
1580 .num_parents
= ARRAY_SIZE(gcc_xo_gpll6_gpll0a_parent_data
),
1581 .ops
= &clk_rcg2_ops
,
1585 static const struct freq_tbl ftbl_gcc_ultaudio_ahb_clk
[] = {
1586 F(3200000, P_XO
, 6, 0, 0),
1587 F(6400000, P_XO
, 3, 0, 0),
1588 F(9600000, P_XO
, 2, 0, 0),
1589 F(19200000, P_XO
, 1, 0, 0),
1590 F(40000000, P_GPLL0
, 10, 1, 2),
1591 F(66670000, P_GPLL0
, 12, 0, 0),
1592 F(80000000, P_GPLL0
, 10, 0, 0),
1593 F(100000000, P_GPLL0
, 8, 0, 0),
1597 static struct clk_rcg2 ultaudio_ahbfabric_clk_src
= {
1598 .cmd_rcgr
= 0x1c010,
1601 .parent_map
= gcc_xo_gpll0_gpll1_sleep_map
,
1602 .freq_tbl
= ftbl_gcc_ultaudio_ahb_clk
,
1603 .clkr
.hw
.init
= &(struct clk_init_data
){
1604 .name
= "ultaudio_ahbfabric_clk_src",
1605 .parent_data
= gcc_xo_gpll0_gpll1_sleep_parent_data
,
1606 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll1_sleep_parent_data
),
1607 .ops
= &clk_rcg2_ops
,
1611 static struct clk_branch gcc_ultaudio_ahbfabric_ixfabric_clk
= {
1612 .halt_reg
= 0x1c028,
1614 .enable_reg
= 0x1c028,
1615 .enable_mask
= BIT(0),
1616 .hw
.init
= &(struct clk_init_data
){
1617 .name
= "gcc_ultaudio_ahbfabric_ixfabric_clk",
1618 .parent_hws
= (const struct clk_hw
*[]){
1619 &ultaudio_ahbfabric_clk_src
.clkr
.hw
,
1622 .flags
= CLK_SET_RATE_PARENT
,
1623 .ops
= &clk_branch2_ops
,
1628 static struct clk_branch gcc_ultaudio_ahbfabric_ixfabric_lpm_clk
= {
1629 .halt_reg
= 0x1c024,
1631 .enable_reg
= 0x1c024,
1632 .enable_mask
= BIT(0),
1633 .hw
.init
= &(struct clk_init_data
){
1634 .name
= "gcc_ultaudio_ahbfabric_ixfabric_lpm_clk",
1635 .parent_hws
= (const struct clk_hw
*[]){
1636 &ultaudio_ahbfabric_clk_src
.clkr
.hw
,
1639 .flags
= CLK_SET_RATE_PARENT
,
1640 .ops
= &clk_branch2_ops
,
1645 static const struct freq_tbl ftbl_gcc_ultaudio_lpaif_i2s_clk
[] = {
1646 F(128000, P_XO
, 10, 1, 15),
1647 F(256000, P_XO
, 5, 1, 15),
1648 F(384000, P_XO
, 5, 1, 10),
1649 F(512000, P_XO
, 5, 2, 15),
1650 F(576000, P_XO
, 5, 3, 20),
1651 F(705600, P_GPLL1
, 16, 1, 80),
1652 F(768000, P_XO
, 5, 1, 5),
1653 F(800000, P_XO
, 5, 5, 24),
1654 F(1024000, P_XO
, 5, 4, 15),
1655 F(1152000, P_XO
, 1, 3, 50),
1656 F(1411200, P_GPLL1
, 16, 1, 40),
1657 F(1536000, P_XO
, 1, 2, 25),
1658 F(1600000, P_XO
, 12, 0, 0),
1659 F(1728000, P_XO
, 5, 9, 20),
1660 F(2048000, P_XO
, 5, 8, 15),
1661 F(2304000, P_XO
, 5, 3, 5),
1662 F(2400000, P_XO
, 8, 0, 0),
1663 F(2822400, P_GPLL1
, 16, 1, 20),
1664 F(3072000, P_XO
, 5, 4, 5),
1665 F(4096000, P_GPLL1
, 9, 2, 49),
1666 F(4800000, P_XO
, 4, 0, 0),
1667 F(5644800, P_GPLL1
, 16, 1, 10),
1668 F(6144000, P_GPLL1
, 7, 1, 21),
1669 F(8192000, P_GPLL1
, 9, 4, 49),
1670 F(9600000, P_XO
, 2, 0, 0),
1671 F(11289600, P_GPLL1
, 16, 1, 5),
1672 F(12288000, P_GPLL1
, 7, 2, 21),
1676 static struct clk_rcg2 ultaudio_lpaif_pri_i2s_clk_src
= {
1677 .cmd_rcgr
= 0x1c054,
1680 .parent_map
= gcc_xo_gpll1_epi2s_emclk_sleep_map
,
1681 .freq_tbl
= ftbl_gcc_ultaudio_lpaif_i2s_clk
,
1682 .clkr
.hw
.init
= &(struct clk_init_data
){
1683 .name
= "ultaudio_lpaif_pri_i2s_clk_src",
1684 .parent_data
= gcc_xo_gpll1_epi2s_emclk_sleep_parent_data
,
1685 .num_parents
= ARRAY_SIZE(gcc_xo_gpll1_epi2s_emclk_sleep_parent_data
),
1686 .ops
= &clk_rcg2_ops
,
1690 static struct clk_branch gcc_ultaudio_lpaif_pri_i2s_clk
= {
1691 .halt_reg
= 0x1c068,
1693 .enable_reg
= 0x1c068,
1694 .enable_mask
= BIT(0),
1695 .hw
.init
= &(struct clk_init_data
){
1696 .name
= "gcc_ultaudio_lpaif_pri_i2s_clk",
1697 .parent_hws
= (const struct clk_hw
*[]){
1698 &ultaudio_lpaif_pri_i2s_clk_src
.clkr
.hw
,
1701 .flags
= CLK_SET_RATE_PARENT
,
1702 .ops
= &clk_branch2_ops
,
1707 static struct clk_rcg2 ultaudio_lpaif_sec_i2s_clk_src
= {
1708 .cmd_rcgr
= 0x1c06c,
1711 .parent_map
= gcc_xo_gpll1_esi2s_emclk_sleep_map
,
1712 .freq_tbl
= ftbl_gcc_ultaudio_lpaif_i2s_clk
,
1713 .clkr
.hw
.init
= &(struct clk_init_data
){
1714 .name
= "ultaudio_lpaif_sec_i2s_clk_src",
1715 .parent_data
= gcc_xo_gpll1_esi2s_emclk_sleep_parent_data
,
1716 .num_parents
= ARRAY_SIZE(gcc_xo_gpll1_esi2s_emclk_sleep_parent_data
),
1717 .ops
= &clk_rcg2_ops
,
1721 static struct clk_branch gcc_ultaudio_lpaif_sec_i2s_clk
= {
1722 .halt_reg
= 0x1c080,
1724 .enable_reg
= 0x1c080,
1725 .enable_mask
= BIT(0),
1726 .hw
.init
= &(struct clk_init_data
){
1727 .name
= "gcc_ultaudio_lpaif_sec_i2s_clk",
1728 .parent_hws
= (const struct clk_hw
*[]){
1729 &ultaudio_lpaif_sec_i2s_clk_src
.clkr
.hw
,
1732 .flags
= CLK_SET_RATE_PARENT
,
1733 .ops
= &clk_branch2_ops
,
1738 static struct clk_rcg2 ultaudio_lpaif_aux_i2s_clk_src
= {
1739 .cmd_rcgr
= 0x1c084,
1742 .parent_map
= gcc_xo_gpll1_emclk_sleep_map
,
1743 .freq_tbl
= ftbl_gcc_ultaudio_lpaif_i2s_clk
,
1744 .clkr
.hw
.init
= &(struct clk_init_data
){
1745 .name
= "ultaudio_lpaif_aux_i2s_clk_src",
1746 .parent_data
= gcc_xo_gpll1_esi2s_emclk_sleep_parent_data
,
1747 .num_parents
= ARRAY_SIZE(gcc_xo_gpll1_esi2s_emclk_sleep_parent_data
),
1748 .ops
= &clk_rcg2_ops
,
1752 static struct clk_branch gcc_ultaudio_lpaif_aux_i2s_clk
= {
1753 .halt_reg
= 0x1c098,
1755 .enable_reg
= 0x1c098,
1756 .enable_mask
= BIT(0),
1757 .hw
.init
= &(struct clk_init_data
){
1758 .name
= "gcc_ultaudio_lpaif_aux_i2s_clk",
1759 .parent_hws
= (const struct clk_hw
*[]){
1760 &ultaudio_lpaif_aux_i2s_clk_src
.clkr
.hw
,
1763 .flags
= CLK_SET_RATE_PARENT
,
1764 .ops
= &clk_branch2_ops
,
1769 static const struct freq_tbl ftbl_gcc_ultaudio_xo_clk
[] = {
1770 F(19200000, P_XO
, 1, 0, 0),
1774 static struct clk_rcg2 ultaudio_xo_clk_src
= {
1775 .cmd_rcgr
= 0x1c034,
1777 .parent_map
= gcc_xo_sleep_map
,
1778 .freq_tbl
= ftbl_gcc_ultaudio_xo_clk
,
1779 .clkr
.hw
.init
= &(struct clk_init_data
){
1780 .name
= "ultaudio_xo_clk_src",
1781 .parent_data
= gcc_xo_sleep_parent_data
,
1782 .num_parents
= ARRAY_SIZE(gcc_xo_sleep_parent_data
),
1783 .ops
= &clk_rcg2_ops
,
1787 static struct clk_branch gcc_ultaudio_avsync_xo_clk
= {
1788 .halt_reg
= 0x1c04c,
1790 .enable_reg
= 0x1c04c,
1791 .enable_mask
= BIT(0),
1792 .hw
.init
= &(struct clk_init_data
){
1793 .name
= "gcc_ultaudio_avsync_xo_clk",
1794 .parent_hws
= (const struct clk_hw
*[]){
1795 &ultaudio_xo_clk_src
.clkr
.hw
,
1798 .flags
= CLK_SET_RATE_PARENT
,
1799 .ops
= &clk_branch2_ops
,
1804 static struct clk_branch gcc_ultaudio_stc_xo_clk
= {
1805 .halt_reg
= 0x1c050,
1807 .enable_reg
= 0x1c050,
1808 .enable_mask
= BIT(0),
1809 .hw
.init
= &(struct clk_init_data
){
1810 .name
= "gcc_ultaudio_stc_xo_clk",
1811 .parent_hws
= (const struct clk_hw
*[]){
1812 &ultaudio_xo_clk_src
.clkr
.hw
,
1815 .flags
= CLK_SET_RATE_PARENT
,
1816 .ops
= &clk_branch2_ops
,
1821 static const struct freq_tbl ftbl_codec_clk
[] = {
1822 F(9600000, P_XO
, 2, 0, 0),
1823 F(12288000, P_XO
, 1, 16, 25),
1824 F(19200000, P_XO
, 1, 0, 0),
1825 F(11289600, P_EXT_MCLK
, 1, 0, 0),
1829 static struct clk_rcg2 codec_digcodec_clk_src
= {
1830 .cmd_rcgr
= 0x1c09c,
1833 .parent_map
= gcc_xo_gpll1_emclk_sleep_map
,
1834 .freq_tbl
= ftbl_codec_clk
,
1835 .clkr
.hw
.init
= &(struct clk_init_data
){
1836 .name
= "codec_digcodec_clk_src",
1837 .parent_data
= gcc_xo_gpll1_emclk_sleep_parent_data
,
1838 .num_parents
= ARRAY_SIZE(gcc_xo_gpll1_emclk_sleep_parent_data
),
1839 .ops
= &clk_rcg2_ops
,
1843 static struct clk_branch gcc_codec_digcodec_clk
= {
1844 .halt_reg
= 0x1c0b0,
1846 .enable_reg
= 0x1c0b0,
1847 .enable_mask
= BIT(0),
1848 .hw
.init
= &(struct clk_init_data
){
1849 .name
= "gcc_ultaudio_codec_digcodec_clk",
1850 .parent_hws
= (const struct clk_hw
*[]){
1851 &codec_digcodec_clk_src
.clkr
.hw
,
1854 .flags
= CLK_SET_RATE_PARENT
,
1855 .ops
= &clk_branch2_ops
,
1860 static struct clk_branch gcc_ultaudio_pcnoc_mport_clk
= {
1861 .halt_reg
= 0x1c000,
1863 .enable_reg
= 0x1c000,
1864 .enable_mask
= BIT(0),
1865 .hw
.init
= &(struct clk_init_data
){
1866 .name
= "gcc_ultaudio_pcnoc_mport_clk",
1867 .parent_hws
= (const struct clk_hw
*[]){
1868 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
1871 .ops
= &clk_branch2_ops
,
1876 static struct clk_branch gcc_ultaudio_pcnoc_sway_clk
= {
1877 .halt_reg
= 0x1c004,
1879 .enable_reg
= 0x1c004,
1880 .enable_mask
= BIT(0),
1881 .hw
.init
= &(struct clk_init_data
){
1882 .name
= "gcc_ultaudio_pcnoc_sway_clk",
1883 .parent_hws
= (const struct clk_hw
*[]){
1884 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
1887 .ops
= &clk_branch2_ops
,
1892 static const struct freq_tbl ftbl_gcc_venus0_vcodec0_clk
[] = {
1893 F(133330000, P_GPLL0
, 6, 0, 0),
1894 F(200000000, P_GPLL0
, 4, 0, 0),
1895 F(266670000, P_GPLL0
, 3, 0, 0),
1899 static struct clk_rcg2 vcodec0_clk_src
= {
1900 .cmd_rcgr
= 0x4C000,
1903 .parent_map
= gcc_xo_gpll0_map
,
1904 .freq_tbl
= ftbl_gcc_venus0_vcodec0_clk
,
1905 .clkr
.hw
.init
= &(struct clk_init_data
){
1906 .name
= "vcodec0_clk_src",
1907 .parent_data
= gcc_xo_gpll0_parent_data
,
1908 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_parent_data
),
1909 .ops
= &clk_rcg2_ops
,
1913 static struct clk_branch gcc_blsp1_ahb_clk
= {
1914 .halt_reg
= 0x01008,
1915 .halt_check
= BRANCH_HALT_VOTED
,
1917 .enable_reg
= 0x45004,
1918 .enable_mask
= BIT(10),
1919 .hw
.init
= &(struct clk_init_data
){
1920 .name
= "gcc_blsp1_ahb_clk",
1921 .parent_hws
= (const struct clk_hw
*[]){
1922 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
1925 .ops
= &clk_branch2_ops
,
1930 static struct clk_branch gcc_blsp1_sleep_clk
= {
1931 .halt_reg
= 0x01004,
1933 .enable_reg
= 0x01004,
1934 .enable_mask
= BIT(0),
1935 .hw
.init
= &(struct clk_init_data
){
1936 .name
= "gcc_blsp1_sleep_clk",
1937 .ops
= &clk_branch2_ops
,
1942 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1943 .halt_reg
= 0x02008,
1945 .enable_reg
= 0x02008,
1946 .enable_mask
= BIT(0),
1947 .hw
.init
= &(struct clk_init_data
){
1948 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1949 .parent_hws
= (const struct clk_hw
*[]){
1950 &blsp1_qup1_i2c_apps_clk_src
.clkr
.hw
,
1953 .flags
= CLK_SET_RATE_PARENT
,
1954 .ops
= &clk_branch2_ops
,
1959 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1960 .halt_reg
= 0x02004,
1962 .enable_reg
= 0x02004,
1963 .enable_mask
= BIT(0),
1964 .hw
.init
= &(struct clk_init_data
){
1965 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1966 .parent_hws
= (const struct clk_hw
*[]){
1967 &blsp1_qup1_spi_apps_clk_src
.clkr
.hw
,
1970 .flags
= CLK_SET_RATE_PARENT
,
1971 .ops
= &clk_branch2_ops
,
1976 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1977 .halt_reg
= 0x03010,
1979 .enable_reg
= 0x03010,
1980 .enable_mask
= BIT(0),
1981 .hw
.init
= &(struct clk_init_data
){
1982 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1983 .parent_hws
= (const struct clk_hw
*[]){
1984 &blsp1_qup2_i2c_apps_clk_src
.clkr
.hw
,
1987 .flags
= CLK_SET_RATE_PARENT
,
1988 .ops
= &clk_branch2_ops
,
1993 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1994 .halt_reg
= 0x0300c,
1996 .enable_reg
= 0x0300c,
1997 .enable_mask
= BIT(0),
1998 .hw
.init
= &(struct clk_init_data
){
1999 .name
= "gcc_blsp1_qup2_spi_apps_clk",
2000 .parent_hws
= (const struct clk_hw
*[]){
2001 &blsp1_qup2_spi_apps_clk_src
.clkr
.hw
,
2004 .flags
= CLK_SET_RATE_PARENT
,
2005 .ops
= &clk_branch2_ops
,
2010 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
2011 .halt_reg
= 0x04020,
2013 .enable_reg
= 0x04020,
2014 .enable_mask
= BIT(0),
2015 .hw
.init
= &(struct clk_init_data
){
2016 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
2017 .parent_hws
= (const struct clk_hw
*[]){
2018 &blsp1_qup3_i2c_apps_clk_src
.clkr
.hw
,
2021 .flags
= CLK_SET_RATE_PARENT
,
2022 .ops
= &clk_branch2_ops
,
2027 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
2028 .halt_reg
= 0x0401c,
2030 .enable_reg
= 0x0401c,
2031 .enable_mask
= BIT(0),
2032 .hw
.init
= &(struct clk_init_data
){
2033 .name
= "gcc_blsp1_qup3_spi_apps_clk",
2034 .parent_hws
= (const struct clk_hw
*[]){
2035 &blsp1_qup3_spi_apps_clk_src
.clkr
.hw
,
2038 .flags
= CLK_SET_RATE_PARENT
,
2039 .ops
= &clk_branch2_ops
,
2044 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
2045 .halt_reg
= 0x05020,
2047 .enable_reg
= 0x05020,
2048 .enable_mask
= BIT(0),
2049 .hw
.init
= &(struct clk_init_data
){
2050 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
2051 .parent_hws
= (const struct clk_hw
*[]){
2052 &blsp1_qup4_i2c_apps_clk_src
.clkr
.hw
,
2055 .flags
= CLK_SET_RATE_PARENT
,
2056 .ops
= &clk_branch2_ops
,
2061 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
2062 .halt_reg
= 0x0501c,
2064 .enable_reg
= 0x0501c,
2065 .enable_mask
= BIT(0),
2066 .hw
.init
= &(struct clk_init_data
){
2067 .name
= "gcc_blsp1_qup4_spi_apps_clk",
2068 .parent_hws
= (const struct clk_hw
*[]){
2069 &blsp1_qup4_spi_apps_clk_src
.clkr
.hw
,
2072 .flags
= CLK_SET_RATE_PARENT
,
2073 .ops
= &clk_branch2_ops
,
2078 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
2079 .halt_reg
= 0x06020,
2081 .enable_reg
= 0x06020,
2082 .enable_mask
= BIT(0),
2083 .hw
.init
= &(struct clk_init_data
){
2084 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
2085 .parent_hws
= (const struct clk_hw
*[]){
2086 &blsp1_qup5_i2c_apps_clk_src
.clkr
.hw
,
2089 .flags
= CLK_SET_RATE_PARENT
,
2090 .ops
= &clk_branch2_ops
,
2095 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
2096 .halt_reg
= 0x0601c,
2098 .enable_reg
= 0x0601c,
2099 .enable_mask
= BIT(0),
2100 .hw
.init
= &(struct clk_init_data
){
2101 .name
= "gcc_blsp1_qup5_spi_apps_clk",
2102 .parent_hws
= (const struct clk_hw
*[]){
2103 &blsp1_qup5_spi_apps_clk_src
.clkr
.hw
,
2106 .flags
= CLK_SET_RATE_PARENT
,
2107 .ops
= &clk_branch2_ops
,
2112 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
2113 .halt_reg
= 0x07020,
2115 .enable_reg
= 0x07020,
2116 .enable_mask
= BIT(0),
2117 .hw
.init
= &(struct clk_init_data
){
2118 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
2119 .parent_hws
= (const struct clk_hw
*[]){
2120 &blsp1_qup6_i2c_apps_clk_src
.clkr
.hw
,
2123 .flags
= CLK_SET_RATE_PARENT
,
2124 .ops
= &clk_branch2_ops
,
2129 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
2130 .halt_reg
= 0x0701c,
2132 .enable_reg
= 0x0701c,
2133 .enable_mask
= BIT(0),
2134 .hw
.init
= &(struct clk_init_data
){
2135 .name
= "gcc_blsp1_qup6_spi_apps_clk",
2136 .parent_hws
= (const struct clk_hw
*[]){
2137 &blsp1_qup6_spi_apps_clk_src
.clkr
.hw
,
2140 .flags
= CLK_SET_RATE_PARENT
,
2141 .ops
= &clk_branch2_ops
,
2146 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
2147 .halt_reg
= 0x0203c,
2149 .enable_reg
= 0x0203c,
2150 .enable_mask
= BIT(0),
2151 .hw
.init
= &(struct clk_init_data
){
2152 .name
= "gcc_blsp1_uart1_apps_clk",
2153 .parent_hws
= (const struct clk_hw
*[]){
2154 &blsp1_uart1_apps_clk_src
.clkr
.hw
,
2157 .flags
= CLK_SET_RATE_PARENT
,
2158 .ops
= &clk_branch2_ops
,
2163 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
2164 .halt_reg
= 0x0302c,
2166 .enable_reg
= 0x0302c,
2167 .enable_mask
= BIT(0),
2168 .hw
.init
= &(struct clk_init_data
){
2169 .name
= "gcc_blsp1_uart2_apps_clk",
2170 .parent_hws
= (const struct clk_hw
*[]){
2171 &blsp1_uart2_apps_clk_src
.clkr
.hw
,
2174 .flags
= CLK_SET_RATE_PARENT
,
2175 .ops
= &clk_branch2_ops
,
2180 static struct clk_branch gcc_boot_rom_ahb_clk
= {
2181 .halt_reg
= 0x1300c,
2182 .halt_check
= BRANCH_HALT_VOTED
,
2184 .enable_reg
= 0x45004,
2185 .enable_mask
= BIT(7),
2186 .hw
.init
= &(struct clk_init_data
){
2187 .name
= "gcc_boot_rom_ahb_clk",
2188 .parent_hws
= (const struct clk_hw
*[]){
2189 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
2192 .ops
= &clk_branch2_ops
,
2197 static struct clk_branch gcc_camss_cci_ahb_clk
= {
2198 .halt_reg
= 0x5101c,
2200 .enable_reg
= 0x5101c,
2201 .enable_mask
= BIT(0),
2202 .hw
.init
= &(struct clk_init_data
){
2203 .name
= "gcc_camss_cci_ahb_clk",
2204 .parent_hws
= (const struct clk_hw
*[]){
2205 &camss_ahb_clk_src
.clkr
.hw
,
2208 .flags
= CLK_SET_RATE_PARENT
,
2209 .ops
= &clk_branch2_ops
,
2214 static struct clk_branch gcc_camss_cci_clk
= {
2215 .halt_reg
= 0x51018,
2217 .enable_reg
= 0x51018,
2218 .enable_mask
= BIT(0),
2219 .hw
.init
= &(struct clk_init_data
){
2220 .name
= "gcc_camss_cci_clk",
2221 .parent_hws
= (const struct clk_hw
*[]){
2222 &cci_clk_src
.clkr
.hw
,
2225 .flags
= CLK_SET_RATE_PARENT
,
2226 .ops
= &clk_branch2_ops
,
2231 static struct clk_branch gcc_camss_csi0_ahb_clk
= {
2232 .halt_reg
= 0x4e040,
2234 .enable_reg
= 0x4e040,
2235 .enable_mask
= BIT(0),
2236 .hw
.init
= &(struct clk_init_data
){
2237 .name
= "gcc_camss_csi0_ahb_clk",
2238 .parent_hws
= (const struct clk_hw
*[]){
2239 &camss_ahb_clk_src
.clkr
.hw
,
2242 .flags
= CLK_SET_RATE_PARENT
,
2243 .ops
= &clk_branch2_ops
,
2248 static struct clk_branch gcc_camss_csi0_clk
= {
2249 .halt_reg
= 0x4e03c,
2251 .enable_reg
= 0x4e03c,
2252 .enable_mask
= BIT(0),
2253 .hw
.init
= &(struct clk_init_data
){
2254 .name
= "gcc_camss_csi0_clk",
2255 .parent_hws
= (const struct clk_hw
*[]){
2256 &csi0_clk_src
.clkr
.hw
,
2259 .flags
= CLK_SET_RATE_PARENT
,
2260 .ops
= &clk_branch2_ops
,
2265 static struct clk_branch gcc_camss_csi0phy_clk
= {
2266 .halt_reg
= 0x4e048,
2268 .enable_reg
= 0x4e048,
2269 .enable_mask
= BIT(0),
2270 .hw
.init
= &(struct clk_init_data
){
2271 .name
= "gcc_camss_csi0phy_clk",
2272 .parent_hws
= (const struct clk_hw
*[]){
2273 &csi0_clk_src
.clkr
.hw
,
2276 .flags
= CLK_SET_RATE_PARENT
,
2277 .ops
= &clk_branch2_ops
,
2282 static struct clk_branch gcc_camss_csi0pix_clk
= {
2283 .halt_reg
= 0x4e058,
2285 .enable_reg
= 0x4e058,
2286 .enable_mask
= BIT(0),
2287 .hw
.init
= &(struct clk_init_data
){
2288 .name
= "gcc_camss_csi0pix_clk",
2289 .parent_hws
= (const struct clk_hw
*[]){
2290 &csi0_clk_src
.clkr
.hw
,
2293 .flags
= CLK_SET_RATE_PARENT
,
2294 .ops
= &clk_branch2_ops
,
2299 static struct clk_branch gcc_camss_csi0rdi_clk
= {
2300 .halt_reg
= 0x4e050,
2302 .enable_reg
= 0x4e050,
2303 .enable_mask
= BIT(0),
2304 .hw
.init
= &(struct clk_init_data
){
2305 .name
= "gcc_camss_csi0rdi_clk",
2306 .parent_hws
= (const struct clk_hw
*[]){
2307 &csi0_clk_src
.clkr
.hw
,
2310 .flags
= CLK_SET_RATE_PARENT
,
2311 .ops
= &clk_branch2_ops
,
2316 static struct clk_branch gcc_camss_csi1_ahb_clk
= {
2317 .halt_reg
= 0x4f040,
2319 .enable_reg
= 0x4f040,
2320 .enable_mask
= BIT(0),
2321 .hw
.init
= &(struct clk_init_data
){
2322 .name
= "gcc_camss_csi1_ahb_clk",
2323 .parent_hws
= (const struct clk_hw
*[]){
2324 &camss_ahb_clk_src
.clkr
.hw
,
2327 .flags
= CLK_SET_RATE_PARENT
,
2328 .ops
= &clk_branch2_ops
,
2333 static struct clk_branch gcc_camss_csi1_clk
= {
2334 .halt_reg
= 0x4f03c,
2336 .enable_reg
= 0x4f03c,
2337 .enable_mask
= BIT(0),
2338 .hw
.init
= &(struct clk_init_data
){
2339 .name
= "gcc_camss_csi1_clk",
2340 .parent_hws
= (const struct clk_hw
*[]){
2341 &csi1_clk_src
.clkr
.hw
,
2344 .flags
= CLK_SET_RATE_PARENT
,
2345 .ops
= &clk_branch2_ops
,
2350 static struct clk_branch gcc_camss_csi1phy_clk
= {
2351 .halt_reg
= 0x4f048,
2353 .enable_reg
= 0x4f048,
2354 .enable_mask
= BIT(0),
2355 .hw
.init
= &(struct clk_init_data
){
2356 .name
= "gcc_camss_csi1phy_clk",
2357 .parent_hws
= (const struct clk_hw
*[]){
2358 &csi1_clk_src
.clkr
.hw
,
2361 .flags
= CLK_SET_RATE_PARENT
,
2362 .ops
= &clk_branch2_ops
,
2367 static struct clk_branch gcc_camss_csi1pix_clk
= {
2368 .halt_reg
= 0x4f058,
2370 .enable_reg
= 0x4f058,
2371 .enable_mask
= BIT(0),
2372 .hw
.init
= &(struct clk_init_data
){
2373 .name
= "gcc_camss_csi1pix_clk",
2374 .parent_hws
= (const struct clk_hw
*[]){
2375 &csi1_clk_src
.clkr
.hw
,
2378 .flags
= CLK_SET_RATE_PARENT
,
2379 .ops
= &clk_branch2_ops
,
2384 static struct clk_branch gcc_camss_csi1rdi_clk
= {
2385 .halt_reg
= 0x4f050,
2387 .enable_reg
= 0x4f050,
2388 .enable_mask
= BIT(0),
2389 .hw
.init
= &(struct clk_init_data
){
2390 .name
= "gcc_camss_csi1rdi_clk",
2391 .parent_hws
= (const struct clk_hw
*[]){
2392 &csi1_clk_src
.clkr
.hw
,
2395 .flags
= CLK_SET_RATE_PARENT
,
2396 .ops
= &clk_branch2_ops
,
2401 static struct clk_branch gcc_camss_csi2_ahb_clk
= {
2402 .halt_reg
= 0x3c040,
2404 .enable_reg
= 0x3c040,
2405 .enable_mask
= BIT(0),
2406 .hw
.init
= &(struct clk_init_data
){
2407 .name
= "gcc_camss_csi2_ahb_clk",
2408 .parent_hws
= (const struct clk_hw
*[]){
2409 &camss_ahb_clk_src
.clkr
.hw
,
2412 .flags
= CLK_SET_RATE_PARENT
,
2413 .ops
= &clk_branch2_ops
,
2418 static struct clk_branch gcc_camss_csi2_clk
= {
2419 .halt_reg
= 0x3c03c,
2421 .enable_reg
= 0x3c03c,
2422 .enable_mask
= BIT(0),
2423 .hw
.init
= &(struct clk_init_data
){
2424 .name
= "gcc_camss_csi2_clk",
2425 .parent_hws
= (const struct clk_hw
*[]){
2426 &csi2_clk_src
.clkr
.hw
,
2429 .flags
= CLK_SET_RATE_PARENT
,
2430 .ops
= &clk_branch2_ops
,
2435 static struct clk_branch gcc_camss_csi2phy_clk
= {
2436 .halt_reg
= 0x3c048,
2438 .enable_reg
= 0x3c048,
2439 .enable_mask
= BIT(0),
2440 .hw
.init
= &(struct clk_init_data
){
2441 .name
= "gcc_camss_csi2phy_clk",
2442 .parent_hws
= (const struct clk_hw
*[]){
2443 &csi2_clk_src
.clkr
.hw
,
2446 .flags
= CLK_SET_RATE_PARENT
,
2447 .ops
= &clk_branch2_ops
,
2452 static struct clk_branch gcc_camss_csi2pix_clk
= {
2453 .halt_reg
= 0x3c058,
2455 .enable_reg
= 0x3c058,
2456 .enable_mask
= BIT(0),
2457 .hw
.init
= &(struct clk_init_data
){
2458 .name
= "gcc_camss_csi2pix_clk",
2459 .parent_hws
= (const struct clk_hw
*[]){
2460 &csi2_clk_src
.clkr
.hw
,
2463 .flags
= CLK_SET_RATE_PARENT
,
2464 .ops
= &clk_branch2_ops
,
2469 static struct clk_branch gcc_camss_csi2rdi_clk
= {
2470 .halt_reg
= 0x3c050,
2472 .enable_reg
= 0x3c050,
2473 .enable_mask
= BIT(0),
2474 .hw
.init
= &(struct clk_init_data
){
2475 .name
= "gcc_camss_csi2rdi_clk",
2476 .parent_hws
= (const struct clk_hw
*[]){
2477 &csi2_clk_src
.clkr
.hw
,
2480 .flags
= CLK_SET_RATE_PARENT
,
2481 .ops
= &clk_branch2_ops
,
2486 static struct clk_branch gcc_camss_csi_vfe0_clk
= {
2487 .halt_reg
= 0x58050,
2489 .enable_reg
= 0x58050,
2490 .enable_mask
= BIT(0),
2491 .hw
.init
= &(struct clk_init_data
){
2492 .name
= "gcc_camss_csi_vfe0_clk",
2493 .parent_hws
= (const struct clk_hw
*[]){
2494 &vfe0_clk_src
.clkr
.hw
,
2497 .flags
= CLK_SET_RATE_PARENT
,
2498 .ops
= &clk_branch2_ops
,
2503 static struct clk_branch gcc_camss_gp0_clk
= {
2504 .halt_reg
= 0x54018,
2506 .enable_reg
= 0x54018,
2507 .enable_mask
= BIT(0),
2508 .hw
.init
= &(struct clk_init_data
){
2509 .name
= "gcc_camss_gp0_clk",
2510 .parent_hws
= (const struct clk_hw
*[]){
2511 &camss_gp0_clk_src
.clkr
.hw
,
2514 .flags
= CLK_SET_RATE_PARENT
,
2515 .ops
= &clk_branch2_ops
,
2520 static struct clk_branch gcc_camss_gp1_clk
= {
2521 .halt_reg
= 0x55018,
2523 .enable_reg
= 0x55018,
2524 .enable_mask
= BIT(0),
2525 .hw
.init
= &(struct clk_init_data
){
2526 .name
= "gcc_camss_gp1_clk",
2527 .parent_hws
= (const struct clk_hw
*[]){
2528 &camss_gp1_clk_src
.clkr
.hw
,
2531 .flags
= CLK_SET_RATE_PARENT
,
2532 .ops
= &clk_branch2_ops
,
2537 static struct clk_branch gcc_camss_ispif_ahb_clk
= {
2538 .halt_reg
= 0x50004,
2540 .enable_reg
= 0x50004,
2541 .enable_mask
= BIT(0),
2542 .hw
.init
= &(struct clk_init_data
){
2543 .name
= "gcc_camss_ispif_ahb_clk",
2544 .parent_hws
= (const struct clk_hw
*[]){
2545 &camss_ahb_clk_src
.clkr
.hw
,
2548 .flags
= CLK_SET_RATE_PARENT
,
2549 .ops
= &clk_branch2_ops
,
2554 static struct clk_branch gcc_camss_jpeg0_clk
= {
2555 .halt_reg
= 0x57020,
2557 .enable_reg
= 0x57020,
2558 .enable_mask
= BIT(0),
2559 .hw
.init
= &(struct clk_init_data
){
2560 .name
= "gcc_camss_jpeg0_clk",
2561 .parent_hws
= (const struct clk_hw
*[]){
2562 &jpeg0_clk_src
.clkr
.hw
,
2565 .flags
= CLK_SET_RATE_PARENT
,
2566 .ops
= &clk_branch2_ops
,
2571 static struct clk_branch gcc_camss_jpeg_ahb_clk
= {
2572 .halt_reg
= 0x57024,
2574 .enable_reg
= 0x57024,
2575 .enable_mask
= BIT(0),
2576 .hw
.init
= &(struct clk_init_data
){
2577 .name
= "gcc_camss_jpeg_ahb_clk",
2578 .parent_hws
= (const struct clk_hw
*[]){
2579 &camss_ahb_clk_src
.clkr
.hw
,
2582 .flags
= CLK_SET_RATE_PARENT
,
2583 .ops
= &clk_branch2_ops
,
2588 static struct clk_branch gcc_camss_jpeg_axi_clk
= {
2589 .halt_reg
= 0x57028,
2591 .enable_reg
= 0x57028,
2592 .enable_mask
= BIT(0),
2593 .hw
.init
= &(struct clk_init_data
){
2594 .name
= "gcc_camss_jpeg_axi_clk",
2595 .parent_hws
= (const struct clk_hw
*[]){
2596 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
2599 .flags
= CLK_SET_RATE_PARENT
,
2600 .ops
= &clk_branch2_ops
,
2605 static struct clk_branch gcc_camss_mclk0_clk
= {
2606 .halt_reg
= 0x52018,
2608 .enable_reg
= 0x52018,
2609 .enable_mask
= BIT(0),
2610 .hw
.init
= &(struct clk_init_data
){
2611 .name
= "gcc_camss_mclk0_clk",
2612 .parent_hws
= (const struct clk_hw
*[]){
2613 &mclk0_clk_src
.clkr
.hw
,
2616 .flags
= CLK_SET_RATE_PARENT
,
2617 .ops
= &clk_branch2_ops
,
2622 static struct clk_branch gcc_camss_mclk1_clk
= {
2623 .halt_reg
= 0x53018,
2625 .enable_reg
= 0x53018,
2626 .enable_mask
= BIT(0),
2627 .hw
.init
= &(struct clk_init_data
){
2628 .name
= "gcc_camss_mclk1_clk",
2629 .parent_hws
= (const struct clk_hw
*[]){
2630 &mclk1_clk_src
.clkr
.hw
,
2633 .flags
= CLK_SET_RATE_PARENT
,
2634 .ops
= &clk_branch2_ops
,
2639 static struct clk_branch gcc_camss_micro_ahb_clk
= {
2640 .halt_reg
= 0x5600c,
2642 .enable_reg
= 0x5600c,
2643 .enable_mask
= BIT(0),
2644 .hw
.init
= &(struct clk_init_data
){
2645 .name
= "gcc_camss_micro_ahb_clk",
2646 .parent_hws
= (const struct clk_hw
*[]){
2647 &camss_ahb_clk_src
.clkr
.hw
,
2650 .flags
= CLK_SET_RATE_PARENT
,
2651 .ops
= &clk_branch2_ops
,
2656 static struct clk_branch gcc_camss_csi0phytimer_clk
= {
2657 .halt_reg
= 0x4e01c,
2659 .enable_reg
= 0x4e01c,
2660 .enable_mask
= BIT(0),
2661 .hw
.init
= &(struct clk_init_data
){
2662 .name
= "gcc_camss_csi0phytimer_clk",
2663 .parent_hws
= (const struct clk_hw
*[]){
2664 &csi0phytimer_clk_src
.clkr
.hw
,
2667 .flags
= CLK_SET_RATE_PARENT
,
2668 .ops
= &clk_branch2_ops
,
2673 static struct clk_branch gcc_camss_csi1phytimer_clk
= {
2674 .halt_reg
= 0x4f01c,
2676 .enable_reg
= 0x4f01c,
2677 .enable_mask
= BIT(0),
2678 .hw
.init
= &(struct clk_init_data
){
2679 .name
= "gcc_camss_csi1phytimer_clk",
2680 .parent_hws
= (const struct clk_hw
*[]){
2681 &csi1phytimer_clk_src
.clkr
.hw
,
2684 .flags
= CLK_SET_RATE_PARENT
,
2685 .ops
= &clk_branch2_ops
,
2690 static struct clk_branch gcc_camss_ahb_clk
= {
2691 .halt_reg
= 0x5a014,
2693 .enable_reg
= 0x5a014,
2694 .enable_mask
= BIT(0),
2695 .hw
.init
= &(struct clk_init_data
){
2696 .name
= "gcc_camss_ahb_clk",
2697 .parent_hws
= (const struct clk_hw
*[]){
2698 &camss_ahb_clk_src
.clkr
.hw
,
2701 .flags
= CLK_SET_RATE_PARENT
,
2702 .ops
= &clk_branch2_ops
,
2707 static struct clk_branch gcc_camss_top_ahb_clk
= {
2708 .halt_reg
= 0x56004,
2710 .enable_reg
= 0x56004,
2711 .enable_mask
= BIT(0),
2712 .hw
.init
= &(struct clk_init_data
){
2713 .name
= "gcc_camss_top_ahb_clk",
2714 .parent_hws
= (const struct clk_hw
*[]){
2715 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
2718 .flags
= CLK_SET_RATE_PARENT
,
2719 .ops
= &clk_branch2_ops
,
2724 static struct clk_branch gcc_camss_cpp_ahb_clk
= {
2725 .halt_reg
= 0x58040,
2727 .enable_reg
= 0x58040,
2728 .enable_mask
= BIT(0),
2729 .hw
.init
= &(struct clk_init_data
){
2730 .name
= "gcc_camss_cpp_ahb_clk",
2731 .parent_hws
= (const struct clk_hw
*[]){
2732 &camss_ahb_clk_src
.clkr
.hw
,
2735 .flags
= CLK_SET_RATE_PARENT
,
2736 .ops
= &clk_branch2_ops
,
2741 static struct clk_branch gcc_camss_cpp_clk
= {
2742 .halt_reg
= 0x5803c,
2744 .enable_reg
= 0x5803c,
2745 .enable_mask
= BIT(0),
2746 .hw
.init
= &(struct clk_init_data
){
2747 .name
= "gcc_camss_cpp_clk",
2748 .parent_hws
= (const struct clk_hw
*[]){
2749 &cpp_clk_src
.clkr
.hw
,
2752 .flags
= CLK_SET_RATE_PARENT
,
2753 .ops
= &clk_branch2_ops
,
2758 static struct clk_branch gcc_camss_vfe0_clk
= {
2759 .halt_reg
= 0x58038,
2761 .enable_reg
= 0x58038,
2762 .enable_mask
= BIT(0),
2763 .hw
.init
= &(struct clk_init_data
){
2764 .name
= "gcc_camss_vfe0_clk",
2765 .parent_hws
= (const struct clk_hw
*[]){
2766 &vfe0_clk_src
.clkr
.hw
,
2769 .flags
= CLK_SET_RATE_PARENT
,
2770 .ops
= &clk_branch2_ops
,
2775 static struct clk_branch gcc_camss_vfe_ahb_clk
= {
2776 .halt_reg
= 0x58044,
2778 .enable_reg
= 0x58044,
2779 .enable_mask
= BIT(0),
2780 .hw
.init
= &(struct clk_init_data
){
2781 .name
= "gcc_camss_vfe_ahb_clk",
2782 .parent_hws
= (const struct clk_hw
*[]){
2783 &camss_ahb_clk_src
.clkr
.hw
,
2786 .flags
= CLK_SET_RATE_PARENT
,
2787 .ops
= &clk_branch2_ops
,
2792 static struct clk_branch gcc_camss_vfe_axi_clk
= {
2793 .halt_reg
= 0x58048,
2795 .enable_reg
= 0x58048,
2796 .enable_mask
= BIT(0),
2797 .hw
.init
= &(struct clk_init_data
){
2798 .name
= "gcc_camss_vfe_axi_clk",
2799 .parent_hws
= (const struct clk_hw
*[]){
2800 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
2803 .flags
= CLK_SET_RATE_PARENT
,
2804 .ops
= &clk_branch2_ops
,
2809 static struct clk_branch gcc_crypto_ahb_clk
= {
2810 .halt_reg
= 0x16024,
2811 .halt_check
= BRANCH_HALT_VOTED
,
2813 .enable_reg
= 0x45004,
2814 .enable_mask
= BIT(0),
2815 .hw
.init
= &(struct clk_init_data
){
2816 .name
= "gcc_crypto_ahb_clk",
2817 .parent_hws
= (const struct clk_hw
*[]){
2818 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
2821 .flags
= CLK_SET_RATE_PARENT
,
2822 .ops
= &clk_branch2_ops
,
2827 static struct clk_branch gcc_crypto_axi_clk
= {
2828 .halt_reg
= 0x16020,
2829 .halt_check
= BRANCH_HALT_VOTED
,
2831 .enable_reg
= 0x45004,
2832 .enable_mask
= BIT(1),
2833 .hw
.init
= &(struct clk_init_data
){
2834 .name
= "gcc_crypto_axi_clk",
2835 .parent_hws
= (const struct clk_hw
*[]){
2836 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
2839 .flags
= CLK_SET_RATE_PARENT
,
2840 .ops
= &clk_branch2_ops
,
2845 static struct clk_branch gcc_crypto_clk
= {
2846 .halt_reg
= 0x1601c,
2847 .halt_check
= BRANCH_HALT_VOTED
,
2849 .enable_reg
= 0x45004,
2850 .enable_mask
= BIT(2),
2851 .hw
.init
= &(struct clk_init_data
){
2852 .name
= "gcc_crypto_clk",
2853 .parent_hws
= (const struct clk_hw
*[]){
2854 &crypto_clk_src
.clkr
.hw
,
2857 .flags
= CLK_SET_RATE_PARENT
,
2858 .ops
= &clk_branch2_ops
,
2863 static struct clk_branch gcc_oxili_gmem_clk
= {
2864 .halt_reg
= 0x59024,
2866 .enable_reg
= 0x59024,
2867 .enable_mask
= BIT(0),
2868 .hw
.init
= &(struct clk_init_data
){
2869 .name
= "gcc_oxili_gmem_clk",
2870 .parent_hws
= (const struct clk_hw
*[]){
2871 &gfx3d_clk_src
.clkr
.hw
,
2874 .flags
= CLK_SET_RATE_PARENT
,
2875 .ops
= &clk_branch2_ops
,
2880 static struct clk_branch gcc_gp1_clk
= {
2881 .halt_reg
= 0x08000,
2883 .enable_reg
= 0x08000,
2884 .enable_mask
= BIT(0),
2885 .hw
.init
= &(struct clk_init_data
){
2886 .name
= "gcc_gp1_clk",
2887 .parent_hws
= (const struct clk_hw
*[]){
2888 &gp1_clk_src
.clkr
.hw
,
2891 .flags
= CLK_SET_RATE_PARENT
,
2892 .ops
= &clk_branch2_ops
,
2897 static struct clk_branch gcc_gp2_clk
= {
2898 .halt_reg
= 0x09000,
2900 .enable_reg
= 0x09000,
2901 .enable_mask
= BIT(0),
2902 .hw
.init
= &(struct clk_init_data
){
2903 .name
= "gcc_gp2_clk",
2904 .parent_hws
= (const struct clk_hw
*[]){
2905 &gp2_clk_src
.clkr
.hw
,
2908 .flags
= CLK_SET_RATE_PARENT
,
2909 .ops
= &clk_branch2_ops
,
2914 static struct clk_branch gcc_gp3_clk
= {
2915 .halt_reg
= 0x0a000,
2917 .enable_reg
= 0x0a000,
2918 .enable_mask
= BIT(0),
2919 .hw
.init
= &(struct clk_init_data
){
2920 .name
= "gcc_gp3_clk",
2921 .parent_hws
= (const struct clk_hw
*[]){
2922 &gp3_clk_src
.clkr
.hw
,
2925 .flags
= CLK_SET_RATE_PARENT
,
2926 .ops
= &clk_branch2_ops
,
2931 static struct clk_branch gcc_mdss_ahb_clk
= {
2932 .halt_reg
= 0x4d07c,
2934 .enable_reg
= 0x4d07c,
2935 .enable_mask
= BIT(0),
2936 .hw
.init
= &(struct clk_init_data
){
2937 .name
= "gcc_mdss_ahb_clk",
2938 .parent_hws
= (const struct clk_hw
*[]){
2939 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
2942 .flags
= CLK_SET_RATE_PARENT
,
2943 .ops
= &clk_branch2_ops
,
2948 static struct clk_branch gcc_mdss_axi_clk
= {
2949 .halt_reg
= 0x4d080,
2951 .enable_reg
= 0x4d080,
2952 .enable_mask
= BIT(0),
2953 .hw
.init
= &(struct clk_init_data
){
2954 .name
= "gcc_mdss_axi_clk",
2955 .parent_hws
= (const struct clk_hw
*[]){
2956 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
2959 .flags
= CLK_SET_RATE_PARENT
,
2960 .ops
= &clk_branch2_ops
,
2965 static struct clk_branch gcc_mdss_byte0_clk
= {
2966 .halt_reg
= 0x4d094,
2968 .enable_reg
= 0x4d094,
2969 .enable_mask
= BIT(0),
2970 .hw
.init
= &(struct clk_init_data
){
2971 .name
= "gcc_mdss_byte0_clk",
2972 .parent_hws
= (const struct clk_hw
*[]){
2973 &byte0_clk_src
.clkr
.hw
,
2976 .flags
= CLK_SET_RATE_PARENT
,
2977 .ops
= &clk_branch2_ops
,
2982 static struct clk_branch gcc_mdss_byte1_clk
= {
2983 .halt_reg
= 0x4d0a0,
2985 .enable_reg
= 0x4d0a0,
2986 .enable_mask
= BIT(0),
2987 .hw
.init
= &(struct clk_init_data
){
2988 .name
= "gcc_mdss_byte1_clk",
2989 .parent_hws
= (const struct clk_hw
*[]){
2990 &byte1_clk_src
.clkr
.hw
,
2993 .flags
= CLK_SET_RATE_PARENT
,
2994 .ops
= &clk_branch2_ops
,
2999 static struct clk_branch gcc_mdss_esc0_clk
= {
3000 .halt_reg
= 0x4d098,
3002 .enable_reg
= 0x4d098,
3003 .enable_mask
= BIT(0),
3004 .hw
.init
= &(struct clk_init_data
){
3005 .name
= "gcc_mdss_esc0_clk",
3006 .parent_hws
= (const struct clk_hw
*[]){
3007 &esc0_clk_src
.clkr
.hw
,
3010 .flags
= CLK_SET_RATE_PARENT
,
3011 .ops
= &clk_branch2_ops
,
3016 static struct clk_branch gcc_mdss_esc1_clk
= {
3017 .halt_reg
= 0x4d09c,
3019 .enable_reg
= 0x4d09c,
3020 .enable_mask
= BIT(0),
3021 .hw
.init
= &(struct clk_init_data
){
3022 .name
= "gcc_mdss_esc1_clk",
3023 .parent_hws
= (const struct clk_hw
*[]){
3024 &esc1_clk_src
.clkr
.hw
,
3027 .flags
= CLK_SET_RATE_PARENT
,
3028 .ops
= &clk_branch2_ops
,
3033 static struct clk_branch gcc_mdss_mdp_clk
= {
3034 .halt_reg
= 0x4D088,
3036 .enable_reg
= 0x4D088,
3037 .enable_mask
= BIT(0),
3038 .hw
.init
= &(struct clk_init_data
){
3039 .name
= "gcc_mdss_mdp_clk",
3040 .parent_hws
= (const struct clk_hw
*[]){
3041 &mdp_clk_src
.clkr
.hw
,
3044 .flags
= CLK_SET_RATE_PARENT
,
3045 .ops
= &clk_branch2_ops
,
3050 static struct clk_branch gcc_mdss_pclk0_clk
= {
3051 .halt_reg
= 0x4d084,
3053 .enable_reg
= 0x4d084,
3054 .enable_mask
= BIT(0),
3055 .hw
.init
= &(struct clk_init_data
){
3056 .name
= "gcc_mdss_pclk0_clk",
3057 .parent_hws
= (const struct clk_hw
*[]){
3058 &pclk0_clk_src
.clkr
.hw
,
3061 .flags
= CLK_SET_RATE_PARENT
,
3062 .ops
= &clk_branch2_ops
,
3067 static struct clk_branch gcc_mdss_pclk1_clk
= {
3068 .halt_reg
= 0x4d0a4,
3070 .enable_reg
= 0x4d0a4,
3071 .enable_mask
= BIT(0),
3072 .hw
.init
= &(struct clk_init_data
){
3073 .name
= "gcc_mdss_pclk1_clk",
3074 .parent_hws
= (const struct clk_hw
*[]){
3075 &pclk1_clk_src
.clkr
.hw
,
3078 .flags
= CLK_SET_RATE_PARENT
,
3079 .ops
= &clk_branch2_ops
,
3084 static struct clk_branch gcc_mdss_vsync_clk
= {
3085 .halt_reg
= 0x4d090,
3087 .enable_reg
= 0x4d090,
3088 .enable_mask
= BIT(0),
3089 .hw
.init
= &(struct clk_init_data
){
3090 .name
= "gcc_mdss_vsync_clk",
3091 .parent_hws
= (const struct clk_hw
*[]){
3092 &vsync_clk_src
.clkr
.hw
,
3095 .flags
= CLK_SET_RATE_PARENT
,
3096 .ops
= &clk_branch2_ops
,
3101 static struct clk_branch gcc_mss_cfg_ahb_clk
= {
3102 .halt_reg
= 0x49000,
3104 .enable_reg
= 0x49000,
3105 .enable_mask
= BIT(0),
3106 .hw
.init
= &(struct clk_init_data
){
3107 .name
= "gcc_mss_cfg_ahb_clk",
3108 .parent_hws
= (const struct clk_hw
*[]){
3109 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3112 .flags
= CLK_SET_RATE_PARENT
,
3113 .ops
= &clk_branch2_ops
,
3118 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
3119 .halt_reg
= 0x49004,
3121 .enable_reg
= 0x49004,
3122 .enable_mask
= BIT(0),
3123 .hw
.init
= &(struct clk_init_data
){
3124 .name
= "gcc_mss_q6_bimc_axi_clk",
3125 .parent_hws
= (const struct clk_hw
*[]){
3126 &bimc_ddr_clk_src
.clkr
.hw
,
3129 .flags
= CLK_SET_RATE_PARENT
,
3130 .ops
= &clk_branch2_ops
,
3135 static struct clk_branch gcc_oxili_ahb_clk
= {
3136 .halt_reg
= 0x59028,
3138 .enable_reg
= 0x59028,
3139 .enable_mask
= BIT(0),
3140 .hw
.init
= &(struct clk_init_data
){
3141 .name
= "gcc_oxili_ahb_clk",
3142 .parent_hws
= (const struct clk_hw
*[]){
3143 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3146 .flags
= CLK_SET_RATE_PARENT
,
3147 .ops
= &clk_branch2_ops
,
3152 static struct clk_branch gcc_oxili_gfx3d_clk
= {
3153 .halt_reg
= 0x59020,
3155 .enable_reg
= 0x59020,
3156 .enable_mask
= BIT(0),
3157 .hw
.init
= &(struct clk_init_data
){
3158 .name
= "gcc_oxili_gfx3d_clk",
3159 .parent_hws
= (const struct clk_hw
*[]){
3160 &gfx3d_clk_src
.clkr
.hw
,
3163 .flags
= CLK_SET_RATE_PARENT
,
3164 .ops
= &clk_branch2_ops
,
3169 static struct clk_branch gcc_pdm2_clk
= {
3170 .halt_reg
= 0x4400c,
3172 .enable_reg
= 0x4400c,
3173 .enable_mask
= BIT(0),
3174 .hw
.init
= &(struct clk_init_data
){
3175 .name
= "gcc_pdm2_clk",
3176 .parent_hws
= (const struct clk_hw
*[]){
3177 &pdm2_clk_src
.clkr
.hw
,
3180 .flags
= CLK_SET_RATE_PARENT
,
3181 .ops
= &clk_branch2_ops
,
3186 static struct clk_branch gcc_pdm_ahb_clk
= {
3187 .halt_reg
= 0x44004,
3189 .enable_reg
= 0x44004,
3190 .enable_mask
= BIT(0),
3191 .hw
.init
= &(struct clk_init_data
){
3192 .name
= "gcc_pdm_ahb_clk",
3193 .parent_hws
= (const struct clk_hw
*[]){
3194 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3197 .flags
= CLK_SET_RATE_PARENT
,
3198 .ops
= &clk_branch2_ops
,
3203 static struct clk_branch gcc_prng_ahb_clk
= {
3204 .halt_reg
= 0x13004,
3205 .halt_check
= BRANCH_HALT_VOTED
,
3207 .enable_reg
= 0x45004,
3208 .enable_mask
= BIT(8),
3209 .hw
.init
= &(struct clk_init_data
){
3210 .name
= "gcc_prng_ahb_clk",
3211 .parent_hws
= (const struct clk_hw
*[]){
3212 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3215 .ops
= &clk_branch2_ops
,
3220 static struct clk_branch gcc_sdcc1_ahb_clk
= {
3221 .halt_reg
= 0x4201c,
3223 .enable_reg
= 0x4201c,
3224 .enable_mask
= BIT(0),
3225 .hw
.init
= &(struct clk_init_data
){
3226 .name
= "gcc_sdcc1_ahb_clk",
3227 .parent_hws
= (const struct clk_hw
*[]){
3228 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3231 .flags
= CLK_SET_RATE_PARENT
,
3232 .ops
= &clk_branch2_ops
,
3237 static struct clk_branch gcc_sdcc1_apps_clk
= {
3238 .halt_reg
= 0x42018,
3240 .enable_reg
= 0x42018,
3241 .enable_mask
= BIT(0),
3242 .hw
.init
= &(struct clk_init_data
){
3243 .name
= "gcc_sdcc1_apps_clk",
3244 .parent_hws
= (const struct clk_hw
*[]){
3245 &sdcc1_apps_clk_src
.clkr
.hw
,
3248 .flags
= CLK_SET_RATE_PARENT
,
3249 .ops
= &clk_branch2_ops
,
3254 static struct clk_branch gcc_sdcc2_ahb_clk
= {
3255 .halt_reg
= 0x4301c,
3257 .enable_reg
= 0x4301c,
3258 .enable_mask
= BIT(0),
3259 .hw
.init
= &(struct clk_init_data
){
3260 .name
= "gcc_sdcc2_ahb_clk",
3261 .parent_hws
= (const struct clk_hw
*[]){
3262 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3265 .flags
= CLK_SET_RATE_PARENT
,
3266 .ops
= &clk_branch2_ops
,
3271 static struct clk_branch gcc_sdcc2_apps_clk
= {
3272 .halt_reg
= 0x43018,
3274 .enable_reg
= 0x43018,
3275 .enable_mask
= BIT(0),
3276 .hw
.init
= &(struct clk_init_data
){
3277 .name
= "gcc_sdcc2_apps_clk",
3278 .parent_hws
= (const struct clk_hw
*[]){
3279 &sdcc2_apps_clk_src
.clkr
.hw
,
3282 .flags
= CLK_SET_RATE_PARENT
,
3283 .ops
= &clk_branch2_ops
,
3288 static struct clk_branch gcc_apss_tcu_clk
= {
3289 .halt_reg
= 0x12018,
3290 .halt_check
= BRANCH_HALT_VOTED
,
3292 .enable_reg
= 0x4500c,
3293 .enable_mask
= BIT(1),
3294 .hw
.init
= &(struct clk_init_data
){
3295 .name
= "gcc_apss_tcu_clk",
3296 .parent_hws
= (const struct clk_hw
*[]){
3297 &bimc_ddr_clk_src
.clkr
.hw
,
3300 .ops
= &clk_branch2_ops
,
3305 static struct clk_branch gcc_gfx_tcu_clk
= {
3306 .halt_reg
= 0x12020,
3307 .halt_check
= BRANCH_HALT_VOTED
,
3309 .enable_reg
= 0x4500c,
3310 .enable_mask
= BIT(2),
3311 .hw
.init
= &(struct clk_init_data
){
3312 .name
= "gcc_gfx_tcu_clk",
3313 .parent_hws
= (const struct clk_hw
*[]){
3314 &bimc_ddr_clk_src
.clkr
.hw
,
3317 .ops
= &clk_branch2_ops
,
3322 static struct clk_branch gcc_gfx_tbu_clk
= {
3323 .halt_reg
= 0x12010,
3324 .halt_check
= BRANCH_HALT_VOTED
,
3326 .enable_reg
= 0x4500c,
3327 .enable_mask
= BIT(3),
3328 .hw
.init
= &(struct clk_init_data
){
3329 .name
= "gcc_gfx_tbu_clk",
3330 .parent_hws
= (const struct clk_hw
*[]){
3331 &bimc_ddr_clk_src
.clkr
.hw
,
3334 .ops
= &clk_branch2_ops
,
3339 static struct clk_branch gcc_mdp_tbu_clk
= {
3340 .halt_reg
= 0x1201c,
3341 .halt_check
= BRANCH_HALT_VOTED
,
3343 .enable_reg
= 0x4500c,
3344 .enable_mask
= BIT(4),
3345 .hw
.init
= &(struct clk_init_data
){
3346 .name
= "gcc_mdp_tbu_clk",
3347 .parent_hws
= (const struct clk_hw
*[]){
3348 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
3351 .flags
= CLK_SET_RATE_PARENT
,
3352 .ops
= &clk_branch2_ops
,
3357 static struct clk_branch gcc_venus_tbu_clk
= {
3358 .halt_reg
= 0x12014,
3359 .halt_check
= BRANCH_HALT_VOTED
,
3361 .enable_reg
= 0x4500c,
3362 .enable_mask
= BIT(5),
3363 .hw
.init
= &(struct clk_init_data
){
3364 .name
= "gcc_venus_tbu_clk",
3365 .parent_hws
= (const struct clk_hw
*[]){
3366 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
3369 .flags
= CLK_SET_RATE_PARENT
,
3370 .ops
= &clk_branch2_ops
,
3375 static struct clk_branch gcc_vfe_tbu_clk
= {
3376 .halt_reg
= 0x1203c,
3377 .halt_check
= BRANCH_HALT_VOTED
,
3379 .enable_reg
= 0x4500c,
3380 .enable_mask
= BIT(9),
3381 .hw
.init
= &(struct clk_init_data
){
3382 .name
= "gcc_vfe_tbu_clk",
3383 .parent_hws
= (const struct clk_hw
*[]){
3384 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
3387 .flags
= CLK_SET_RATE_PARENT
,
3388 .ops
= &clk_branch2_ops
,
3393 static struct clk_branch gcc_jpeg_tbu_clk
= {
3394 .halt_reg
= 0x12034,
3395 .halt_check
= BRANCH_HALT_VOTED
,
3397 .enable_reg
= 0x4500c,
3398 .enable_mask
= BIT(10),
3399 .hw
.init
= &(struct clk_init_data
){
3400 .name
= "gcc_jpeg_tbu_clk",
3401 .parent_hws
= (const struct clk_hw
*[]){
3402 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
3405 .flags
= CLK_SET_RATE_PARENT
,
3406 .ops
= &clk_branch2_ops
,
3411 static struct clk_branch gcc_smmu_cfg_clk
= {
3412 .halt_reg
= 0x12038,
3413 .halt_check
= BRANCH_HALT_VOTED
,
3415 .enable_reg
= 0x4500c,
3416 .enable_mask
= BIT(12),
3417 .hw
.init
= &(struct clk_init_data
){
3418 .name
= "gcc_smmu_cfg_clk",
3419 .parent_hws
= (const struct clk_hw
*[]){
3420 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3423 .flags
= CLK_SET_RATE_PARENT
,
3424 .ops
= &clk_branch2_ops
,
3429 static struct clk_branch gcc_gtcu_ahb_clk
= {
3430 .halt_reg
= 0x12044,
3431 .halt_check
= BRANCH_HALT_VOTED
,
3433 .enable_reg
= 0x4500c,
3434 .enable_mask
= BIT(13),
3435 .hw
.init
= &(struct clk_init_data
){
3436 .name
= "gcc_gtcu_ahb_clk",
3437 .parent_hws
= (const struct clk_hw
*[]){
3438 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3441 .flags
= CLK_SET_RATE_PARENT
,
3442 .ops
= &clk_branch2_ops
,
3447 static struct clk_branch gcc_cpp_tbu_clk
= {
3448 .halt_reg
= 0x12040,
3449 .halt_check
= BRANCH_HALT_VOTED
,
3451 .enable_reg
= 0x4500c,
3452 .enable_mask
= BIT(14),
3453 .hw
.init
= &(struct clk_init_data
){
3454 .name
= "gcc_cpp_tbu_clk",
3455 .parent_hws
= (const struct clk_hw
*[]){
3456 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3459 .flags
= CLK_SET_RATE_PARENT
,
3460 .ops
= &clk_branch2_ops
,
3465 static struct clk_branch gcc_mdp_rt_tbu_clk
= {
3466 .halt_reg
= 0x1201c,
3467 .halt_check
= BRANCH_HALT_VOTED
,
3469 .enable_reg
= 0x4500c,
3470 .enable_mask
= BIT(15),
3471 .hw
.init
= &(struct clk_init_data
){
3472 .name
= "gcc_mdp_rt_tbu_clk",
3473 .parent_hws
= (const struct clk_hw
*[]){
3474 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3477 .flags
= CLK_SET_RATE_PARENT
,
3478 .ops
= &clk_branch2_ops
,
3483 static struct clk_branch gcc_bimc_gfx_clk
= {
3484 .halt_reg
= 0x31024,
3486 .enable_reg
= 0x31024,
3487 .enable_mask
= BIT(0),
3488 .hw
.init
= &(struct clk_init_data
){
3489 .name
= "gcc_bimc_gfx_clk",
3490 .parent_hws
= (const struct clk_hw
*[]){
3491 &bimc_gpu_clk_src
.clkr
.hw
,
3494 .flags
= CLK_SET_RATE_PARENT
,
3495 .ops
= &clk_branch2_ops
,
3500 static struct clk_branch gcc_bimc_gpu_clk
= {
3501 .halt_reg
= 0x31040,
3503 .enable_reg
= 0x31040,
3504 .enable_mask
= BIT(0),
3505 .hw
.init
= &(struct clk_init_data
){
3506 .name
= "gcc_bimc_gpu_clk",
3507 .parent_hws
= (const struct clk_hw
*[]){
3508 &bimc_gpu_clk_src
.clkr
.hw
,
3511 .flags
= CLK_SET_RATE_PARENT
,
3512 .ops
= &clk_branch2_ops
,
3517 static struct clk_branch gcc_usb2a_phy_sleep_clk
= {
3518 .halt_reg
= 0x4102c,
3520 .enable_reg
= 0x4102c,
3521 .enable_mask
= BIT(0),
3522 .hw
.init
= &(struct clk_init_data
){
3523 .name
= "gcc_usb2a_phy_sleep_clk",
3524 .ops
= &clk_branch2_ops
,
3529 static struct clk_branch gcc_usb_fs_ahb_clk
= {
3530 .halt_reg
= 0x3f008,
3532 .enable_reg
= 0x3f008,
3533 .enable_mask
= BIT(0),
3534 .hw
.init
= &(struct clk_init_data
){
3535 .name
= "gcc_usb_fs_ahb_clk",
3536 .parent_hws
= (const struct clk_hw
*[]){
3537 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3540 .flags
= CLK_SET_RATE_PARENT
,
3541 .ops
= &clk_branch2_ops
,
3546 static struct clk_branch gcc_usb_fs_ic_clk
= {
3547 .halt_reg
= 0x3f030,
3549 .enable_reg
= 0x3f030,
3550 .enable_mask
= BIT(0),
3551 .hw
.init
= &(struct clk_init_data
){
3552 .name
= "gcc_usb_fs_ic_clk",
3553 .parent_hws
= (const struct clk_hw
*[]){
3554 &usb_fs_ic_clk_src
.clkr
.hw
,
3557 .flags
= CLK_SET_RATE_PARENT
,
3558 .ops
= &clk_branch2_ops
,
3563 static struct clk_branch gcc_usb_fs_system_clk
= {
3564 .halt_reg
= 0x3f004,
3566 .enable_reg
= 0x3f004,
3567 .enable_mask
= BIT(0),
3568 .hw
.init
= &(struct clk_init_data
){
3569 .name
= "gcc_usb_fs_system_clk",
3570 .parent_hws
= (const struct clk_hw
*[]){
3571 &usb_fs_system_clk_src
.clkr
.hw
,
3574 .flags
= CLK_SET_RATE_PARENT
,
3575 .ops
= &clk_branch2_ops
,
3580 static struct clk_branch gcc_usb_hs_ahb_clk
= {
3581 .halt_reg
= 0x41008,
3583 .enable_reg
= 0x41008,
3584 .enable_mask
= BIT(0),
3585 .hw
.init
= &(struct clk_init_data
){
3586 .name
= "gcc_usb_hs_ahb_clk",
3587 .parent_hws
= (const struct clk_hw
*[]){
3588 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3591 .flags
= CLK_SET_RATE_PARENT
,
3592 .ops
= &clk_branch2_ops
,
3597 static struct clk_branch gcc_usb_hs_system_clk
= {
3598 .halt_reg
= 0x41004,
3600 .enable_reg
= 0x41004,
3601 .enable_mask
= BIT(0),
3602 .hw
.init
= &(struct clk_init_data
){
3603 .name
= "gcc_usb_hs_system_clk",
3604 .parent_hws
= (const struct clk_hw
*[]){
3605 &usb_hs_system_clk_src
.clkr
.hw
,
3608 .flags
= CLK_SET_RATE_PARENT
,
3609 .ops
= &clk_branch2_ops
,
3614 static struct clk_branch gcc_venus0_ahb_clk
= {
3615 .halt_reg
= 0x4c020,
3617 .enable_reg
= 0x4c020,
3618 .enable_mask
= BIT(0),
3619 .hw
.init
= &(struct clk_init_data
){
3620 .name
= "gcc_venus0_ahb_clk",
3621 .parent_hws
= (const struct clk_hw
*[]){
3622 &pcnoc_bfdcd_clk_src
.clkr
.hw
,
3625 .flags
= CLK_SET_RATE_PARENT
,
3626 .ops
= &clk_branch2_ops
,
3631 static struct clk_branch gcc_venus0_axi_clk
= {
3632 .halt_reg
= 0x4c024,
3634 .enable_reg
= 0x4c024,
3635 .enable_mask
= BIT(0),
3636 .hw
.init
= &(struct clk_init_data
){
3637 .name
= "gcc_venus0_axi_clk",
3638 .parent_hws
= (const struct clk_hw
*[]){
3639 &system_mm_noc_bfdcd_clk_src
.clkr
.hw
,
3642 .flags
= CLK_SET_RATE_PARENT
,
3643 .ops
= &clk_branch2_ops
,
3648 static struct clk_branch gcc_venus0_vcodec0_clk
= {
3649 .halt_reg
= 0x4c01c,
3651 .enable_reg
= 0x4c01c,
3652 .enable_mask
= BIT(0),
3653 .hw
.init
= &(struct clk_init_data
){
3654 .name
= "gcc_venus0_vcodec0_clk",
3655 .parent_hws
= (const struct clk_hw
*[]){
3656 &vcodec0_clk_src
.clkr
.hw
,
3659 .flags
= CLK_SET_RATE_PARENT
,
3660 .ops
= &clk_branch2_ops
,
3665 static struct clk_branch gcc_venus0_core0_vcodec0_clk
= {
3666 .halt_reg
= 0x4c02c,
3668 .enable_reg
= 0x4c02c,
3669 .enable_mask
= BIT(0),
3670 .hw
.init
= &(struct clk_init_data
){
3671 .name
= "gcc_venus0_core0_vcodec0_clk",
3672 .parent_hws
= (const struct clk_hw
*[]){
3673 &vcodec0_clk_src
.clkr
.hw
,
3676 .flags
= CLK_SET_RATE_PARENT
,
3677 .ops
= &clk_branch2_ops
,
3682 static struct clk_branch gcc_venus0_core1_vcodec0_clk
= {
3683 .halt_reg
= 0x4c034,
3685 .enable_reg
= 0x4c034,
3686 .enable_mask
= BIT(0),
3687 .hw
.init
= &(struct clk_init_data
){
3688 .name
= "gcc_venus0_core1_vcodec0_clk",
3689 .parent_hws
= (const struct clk_hw
*[]){
3690 &vcodec0_clk_src
.clkr
.hw
,
3693 .flags
= CLK_SET_RATE_PARENT
,
3694 .ops
= &clk_branch2_ops
,
3699 static struct clk_branch gcc_oxili_timer_clk
= {
3700 .halt_reg
= 0x59040,
3702 .enable_reg
= 0x59040,
3703 .enable_mask
= BIT(0),
3704 .hw
.init
= &(struct clk_init_data
){
3705 .name
= "gcc_oxili_timer_clk",
3706 .ops
= &clk_branch2_ops
,
3711 static struct gdsc venus_gdsc
= {
3716 .pwrsts
= PWRSTS_OFF_ON
,
3719 static struct gdsc mdss_gdsc
= {
3724 .pwrsts
= PWRSTS_OFF_ON
,
3727 static struct gdsc jpeg_gdsc
= {
3732 .pwrsts
= PWRSTS_OFF_ON
,
3735 static struct gdsc vfe_gdsc
= {
3740 .pwrsts
= PWRSTS_OFF_ON
,
3743 static struct gdsc oxili_gdsc
= {
3748 .pwrsts
= PWRSTS_OFF_ON
,
3751 static struct gdsc venus_core0_gdsc
= {
3754 .name
= "venus_core0",
3756 .pwrsts
= PWRSTS_OFF_ON
,
3759 static struct gdsc venus_core1_gdsc
= {
3762 .name
= "venus_core1",
3764 .pwrsts
= PWRSTS_OFF_ON
,
3767 static struct clk_regmap
*gcc_msm8939_clocks
[] = {
3768 [GPLL0
] = &gpll0
.clkr
,
3769 [GPLL0_VOTE
] = &gpll0_vote
,
3770 [BIMC_PLL
] = &bimc_pll
.clkr
,
3771 [BIMC_PLL_VOTE
] = &bimc_pll_vote
,
3772 [GPLL1
] = &gpll1
.clkr
,
3773 [GPLL1_VOTE
] = &gpll1_vote
,
3774 [GPLL2
] = &gpll2
.clkr
,
3775 [GPLL2_VOTE
] = &gpll2_vote
,
3776 [PCNOC_BFDCD_CLK_SRC
] = &pcnoc_bfdcd_clk_src
.clkr
,
3777 [SYSTEM_NOC_BFDCD_CLK_SRC
] = &system_noc_bfdcd_clk_src
.clkr
,
3778 [SYSTEM_MM_NOC_BFDCD_CLK_SRC
] = &system_mm_noc_bfdcd_clk_src
.clkr
,
3779 [CAMSS_AHB_CLK_SRC
] = &camss_ahb_clk_src
.clkr
,
3780 [APSS_AHB_CLK_SRC
] = &apss_ahb_clk_src
.clkr
,
3781 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
3782 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
3783 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
3784 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
3785 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
3786 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
3787 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
3788 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
3789 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
3790 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
3791 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
3792 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
3793 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
3794 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
3795 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
3796 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
3797 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
3798 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
3799 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
3800 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
3801 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
3802 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
3803 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
3804 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
3805 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
3806 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
3807 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
3808 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
3809 [CRYPTO_CLK_SRC
] = &crypto_clk_src
.clkr
,
3810 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
3811 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
3812 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
3813 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
3814 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
3815 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
3816 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
3817 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
3818 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
3819 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
3820 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
3821 [APSS_TCU_CLK_SRC
] = &apss_tcu_clk_src
.clkr
,
3822 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
3823 [VCODEC0_CLK_SRC
] = &vcodec0_clk_src
.clkr
,
3824 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
3825 [GCC_BLSP1_SLEEP_CLK
] = &gcc_blsp1_sleep_clk
.clkr
,
3826 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
3827 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
3828 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
3829 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
3830 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
3831 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
3832 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
3833 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
3834 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
3835 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
3836 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
3837 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
3838 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
3839 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
3840 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
3841 [GCC_CAMSS_CCI_AHB_CLK
] = &gcc_camss_cci_ahb_clk
.clkr
,
3842 [GCC_CAMSS_CCI_CLK
] = &gcc_camss_cci_clk
.clkr
,
3843 [GCC_CAMSS_CSI0_AHB_CLK
] = &gcc_camss_csi0_ahb_clk
.clkr
,
3844 [GCC_CAMSS_CSI0_CLK
] = &gcc_camss_csi0_clk
.clkr
,
3845 [GCC_CAMSS_CSI0PHY_CLK
] = &gcc_camss_csi0phy_clk
.clkr
,
3846 [GCC_CAMSS_CSI0PIX_CLK
] = &gcc_camss_csi0pix_clk
.clkr
,
3847 [GCC_CAMSS_CSI0RDI_CLK
] = &gcc_camss_csi0rdi_clk
.clkr
,
3848 [GCC_CAMSS_CSI1_AHB_CLK
] = &gcc_camss_csi1_ahb_clk
.clkr
,
3849 [GCC_CAMSS_CSI1_CLK
] = &gcc_camss_csi1_clk
.clkr
,
3850 [GCC_CAMSS_CSI1PHY_CLK
] = &gcc_camss_csi1phy_clk
.clkr
,
3851 [GCC_CAMSS_CSI1PIX_CLK
] = &gcc_camss_csi1pix_clk
.clkr
,
3852 [GCC_CAMSS_CSI1RDI_CLK
] = &gcc_camss_csi1rdi_clk
.clkr
,
3853 [GCC_CAMSS_CSI2_AHB_CLK
] = &gcc_camss_csi2_ahb_clk
.clkr
,
3854 [GCC_CAMSS_CSI2_CLK
] = &gcc_camss_csi2_clk
.clkr
,
3855 [GCC_CAMSS_CSI2PHY_CLK
] = &gcc_camss_csi2phy_clk
.clkr
,
3856 [GCC_CAMSS_CSI2PIX_CLK
] = &gcc_camss_csi2pix_clk
.clkr
,
3857 [GCC_CAMSS_CSI2RDI_CLK
] = &gcc_camss_csi2rdi_clk
.clkr
,
3858 [GCC_CAMSS_CSI_VFE0_CLK
] = &gcc_camss_csi_vfe0_clk
.clkr
,
3859 [GCC_CAMSS_GP0_CLK
] = &gcc_camss_gp0_clk
.clkr
,
3860 [GCC_CAMSS_GP1_CLK
] = &gcc_camss_gp1_clk
.clkr
,
3861 [GCC_CAMSS_ISPIF_AHB_CLK
] = &gcc_camss_ispif_ahb_clk
.clkr
,
3862 [GCC_CAMSS_JPEG0_CLK
] = &gcc_camss_jpeg0_clk
.clkr
,
3863 [GCC_CAMSS_JPEG_AHB_CLK
] = &gcc_camss_jpeg_ahb_clk
.clkr
,
3864 [GCC_CAMSS_JPEG_AXI_CLK
] = &gcc_camss_jpeg_axi_clk
.clkr
,
3865 [GCC_CAMSS_MCLK0_CLK
] = &gcc_camss_mclk0_clk
.clkr
,
3866 [GCC_CAMSS_MCLK1_CLK
] = &gcc_camss_mclk1_clk
.clkr
,
3867 [GCC_CAMSS_MICRO_AHB_CLK
] = &gcc_camss_micro_ahb_clk
.clkr
,
3868 [GCC_CAMSS_CSI0PHYTIMER_CLK
] = &gcc_camss_csi0phytimer_clk
.clkr
,
3869 [GCC_CAMSS_CSI1PHYTIMER_CLK
] = &gcc_camss_csi1phytimer_clk
.clkr
,
3870 [GCC_CAMSS_AHB_CLK
] = &gcc_camss_ahb_clk
.clkr
,
3871 [GCC_CAMSS_TOP_AHB_CLK
] = &gcc_camss_top_ahb_clk
.clkr
,
3872 [GCC_CAMSS_CPP_AHB_CLK
] = &gcc_camss_cpp_ahb_clk
.clkr
,
3873 [GCC_CAMSS_CPP_CLK
] = &gcc_camss_cpp_clk
.clkr
,
3874 [GCC_CAMSS_VFE0_CLK
] = &gcc_camss_vfe0_clk
.clkr
,
3875 [GCC_CAMSS_VFE_AHB_CLK
] = &gcc_camss_vfe_ahb_clk
.clkr
,
3876 [GCC_CAMSS_VFE_AXI_CLK
] = &gcc_camss_vfe_axi_clk
.clkr
,
3877 [GCC_CRYPTO_AHB_CLK
] = &gcc_crypto_ahb_clk
.clkr
,
3878 [GCC_CRYPTO_AXI_CLK
] = &gcc_crypto_axi_clk
.clkr
,
3879 [GCC_CRYPTO_CLK
] = &gcc_crypto_clk
.clkr
,
3880 [GCC_OXILI_GMEM_CLK
] = &gcc_oxili_gmem_clk
.clkr
,
3881 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
3882 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
3883 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
3884 [GCC_MDSS_AHB_CLK
] = &gcc_mdss_ahb_clk
.clkr
,
3885 [GCC_MDSS_AXI_CLK
] = &gcc_mdss_axi_clk
.clkr
,
3886 [GCC_MDSS_BYTE0_CLK
] = &gcc_mdss_byte0_clk
.clkr
,
3887 [GCC_MDSS_ESC0_CLK
] = &gcc_mdss_esc0_clk
.clkr
,
3888 [GCC_MDSS_MDP_CLK
] = &gcc_mdss_mdp_clk
.clkr
,
3889 [GCC_MDSS_PCLK0_CLK
] = &gcc_mdss_pclk0_clk
.clkr
,
3890 [GCC_MDSS_VSYNC_CLK
] = &gcc_mdss_vsync_clk
.clkr
,
3891 [GCC_MSS_CFG_AHB_CLK
] = &gcc_mss_cfg_ahb_clk
.clkr
,
3892 [GCC_OXILI_AHB_CLK
] = &gcc_oxili_ahb_clk
.clkr
,
3893 [GCC_OXILI_GFX3D_CLK
] = &gcc_oxili_gfx3d_clk
.clkr
,
3894 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
3895 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
3896 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
3897 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
3898 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
3899 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
3900 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
3901 [GCC_GTCU_AHB_CLK
] = &gcc_gtcu_ahb_clk
.clkr
,
3902 [GCC_JPEG_TBU_CLK
] = &gcc_jpeg_tbu_clk
.clkr
,
3903 [GCC_MDP_TBU_CLK
] = &gcc_mdp_tbu_clk
.clkr
,
3904 [GCC_SMMU_CFG_CLK
] = &gcc_smmu_cfg_clk
.clkr
,
3905 [GCC_VENUS_TBU_CLK
] = &gcc_venus_tbu_clk
.clkr
,
3906 [GCC_VFE_TBU_CLK
] = &gcc_vfe_tbu_clk
.clkr
,
3907 [GCC_USB2A_PHY_SLEEP_CLK
] = &gcc_usb2a_phy_sleep_clk
.clkr
,
3908 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
3909 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
3910 [GCC_VENUS0_AHB_CLK
] = &gcc_venus0_ahb_clk
.clkr
,
3911 [GCC_VENUS0_AXI_CLK
] = &gcc_venus0_axi_clk
.clkr
,
3912 [GCC_VENUS0_VCODEC0_CLK
] = &gcc_venus0_vcodec0_clk
.clkr
,
3913 [BIMC_DDR_CLK_SRC
] = &bimc_ddr_clk_src
.clkr
,
3914 [GCC_APSS_TCU_CLK
] = &gcc_apss_tcu_clk
.clkr
,
3915 [GCC_GFX_TCU_CLK
] = &gcc_gfx_tcu_clk
.clkr
,
3916 [BIMC_GPU_CLK_SRC
] = &bimc_gpu_clk_src
.clkr
,
3917 [GCC_BIMC_GFX_CLK
] = &gcc_bimc_gfx_clk
.clkr
,
3918 [GCC_BIMC_GPU_CLK
] = &gcc_bimc_gpu_clk
.clkr
,
3919 [ULTAUDIO_AHBFABRIC_CLK_SRC
] = &ultaudio_ahbfabric_clk_src
.clkr
,
3920 [ULTAUDIO_LPAIF_PRI_I2S_CLK_SRC
] = &ultaudio_lpaif_pri_i2s_clk_src
.clkr
,
3921 [ULTAUDIO_LPAIF_SEC_I2S_CLK_SRC
] = &ultaudio_lpaif_sec_i2s_clk_src
.clkr
,
3922 [ULTAUDIO_LPAIF_AUX_I2S_CLK_SRC
] = &ultaudio_lpaif_aux_i2s_clk_src
.clkr
,
3923 [ULTAUDIO_XO_CLK_SRC
] = &ultaudio_xo_clk_src
.clkr
,
3924 [CODEC_DIGCODEC_CLK_SRC
] = &codec_digcodec_clk_src
.clkr
,
3925 [GCC_ULTAUDIO_PCNOC_MPORT_CLK
] = &gcc_ultaudio_pcnoc_mport_clk
.clkr
,
3926 [GCC_ULTAUDIO_PCNOC_SWAY_CLK
] = &gcc_ultaudio_pcnoc_sway_clk
.clkr
,
3927 [GCC_ULTAUDIO_AVSYNC_XO_CLK
] = &gcc_ultaudio_avsync_xo_clk
.clkr
,
3928 [GCC_ULTAUDIO_STC_XO_CLK
] = &gcc_ultaudio_stc_xo_clk
.clkr
,
3929 [GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK
] = &gcc_ultaudio_ahbfabric_ixfabric_clk
.clkr
,
3930 [GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_LPM_CLK
] = &gcc_ultaudio_ahbfabric_ixfabric_lpm_clk
.clkr
,
3931 [GCC_ULTAUDIO_LPAIF_PRI_I2S_CLK
] = &gcc_ultaudio_lpaif_pri_i2s_clk
.clkr
,
3932 [GCC_ULTAUDIO_LPAIF_SEC_I2S_CLK
] = &gcc_ultaudio_lpaif_sec_i2s_clk
.clkr
,
3933 [GCC_ULTAUDIO_LPAIF_AUX_I2S_CLK
] = &gcc_ultaudio_lpaif_aux_i2s_clk
.clkr
,
3934 [GCC_CODEC_DIGCODEC_CLK
] = &gcc_codec_digcodec_clk
.clkr
,
3935 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
3936 [GPLL3
] = &gpll3
.clkr
,
3937 [GPLL3_VOTE
] = &gpll3_vote
,
3938 [GPLL4
] = &gpll4
.clkr
,
3939 [GPLL4_VOTE
] = &gpll4_vote
,
3940 [GPLL5
] = &gpll5
.clkr
,
3941 [GPLL5_VOTE
] = &gpll5_vote
,
3942 [GPLL6
] = &gpll6
.clkr
,
3943 [GPLL6_VOTE
] = &gpll6_vote
,
3944 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
3945 [GCC_MDSS_BYTE1_CLK
] = &gcc_mdss_byte1_clk
.clkr
,
3946 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
3947 [GCC_MDSS_ESC1_CLK
] = &gcc_mdss_esc1_clk
.clkr
,
3948 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
3949 [GCC_MDSS_PCLK1_CLK
] = &gcc_mdss_pclk1_clk
.clkr
,
3950 [GCC_GFX_TBU_CLK
] = &gcc_gfx_tbu_clk
.clkr
,
3951 [GCC_CPP_TBU_CLK
] = &gcc_cpp_tbu_clk
.clkr
,
3952 [GCC_MDP_RT_TBU_CLK
] = &gcc_mdp_rt_tbu_clk
.clkr
,
3953 [USB_FS_SYSTEM_CLK_SRC
] = &usb_fs_system_clk_src
.clkr
,
3954 [USB_FS_IC_CLK_SRC
] = &usb_fs_ic_clk_src
.clkr
,
3955 [GCC_USB_FS_AHB_CLK
] = &gcc_usb_fs_ahb_clk
.clkr
,
3956 [GCC_USB_FS_IC_CLK
] = &gcc_usb_fs_ic_clk
.clkr
,
3957 [GCC_USB_FS_SYSTEM_CLK
] = &gcc_usb_fs_system_clk
.clkr
,
3958 [GCC_VENUS0_CORE0_VCODEC0_CLK
] = &gcc_venus0_core0_vcodec0_clk
.clkr
,
3959 [GCC_VENUS0_CORE1_VCODEC0_CLK
] = &gcc_venus0_core1_vcodec0_clk
.clkr
,
3960 [GCC_OXILI_TIMER_CLK
] = &gcc_oxili_timer_clk
.clkr
,
3963 static struct gdsc
*gcc_msm8939_gdscs
[] = {
3964 [VENUS_GDSC
] = &venus_gdsc
,
3965 [MDSS_GDSC
] = &mdss_gdsc
,
3966 [JPEG_GDSC
] = &jpeg_gdsc
,
3967 [VFE_GDSC
] = &vfe_gdsc
,
3968 [OXILI_GDSC
] = &oxili_gdsc
,
3969 [VENUS_CORE0_GDSC
] = &venus_core0_gdsc
,
3970 [VENUS_CORE1_GDSC
] = &venus_core1_gdsc
,
3973 static const struct qcom_reset_map gcc_msm8939_resets
[] = {
3974 [GCC_BLSP1_BCR
] = { 0x01000 },
3975 [GCC_BLSP1_QUP1_BCR
] = { 0x02000 },
3976 [GCC_BLSP1_UART1_BCR
] = { 0x02038 },
3977 [GCC_BLSP1_QUP2_BCR
] = { 0x03008 },
3978 [GCC_BLSP1_UART2_BCR
] = { 0x03028 },
3979 [GCC_BLSP1_QUP3_BCR
] = { 0x04018 },
3980 [GCC_BLSP1_UART3_BCR
] = { 0x04038 },
3981 [GCC_BLSP1_QUP4_BCR
] = { 0x05018 },
3982 [GCC_BLSP1_QUP5_BCR
] = { 0x06018 },
3983 [GCC_BLSP1_QUP6_BCR
] = { 0x07018 },
3984 [GCC_IMEM_BCR
] = { 0x0e000 },
3985 [GCC_SMMU_BCR
] = { 0x12000 },
3986 [GCC_APSS_TCU_BCR
] = { 0x12050 },
3987 [GCC_SMMU_XPU_BCR
] = { 0x12054 },
3988 [GCC_PCNOC_TBU_BCR
] = { 0x12058 },
3989 [GCC_PRNG_BCR
] = { 0x13000 },
3990 [GCC_BOOT_ROM_BCR
] = { 0x13008 },
3991 [GCC_CRYPTO_BCR
] = { 0x16000 },
3992 [GCC_SEC_CTRL_BCR
] = { 0x1a000 },
3993 [GCC_AUDIO_CORE_BCR
] = { 0x1c008 },
3994 [GCC_ULT_AUDIO_BCR
] = { 0x1c0b4 },
3995 [GCC_DEHR_BCR
] = { 0x1f000 },
3996 [GCC_SYSTEM_NOC_BCR
] = { 0x26000 },
3997 [GCC_PCNOC_BCR
] = { 0x27018 },
3998 [GCC_TCSR_BCR
] = { 0x28000 },
3999 [GCC_QDSS_BCR
] = { 0x29000 },
4000 [GCC_DCD_BCR
] = { 0x2a000 },
4001 [GCC_MSG_RAM_BCR
] = { 0x2b000 },
4002 [GCC_MPM_BCR
] = { 0x2c000 },
4003 [GCC_SPMI_BCR
] = { 0x2e000 },
4004 [GCC_SPDM_BCR
] = { 0x2f000 },
4005 [GCC_MM_SPDM_BCR
] = { 0x2f024 },
4006 [GCC_BIMC_BCR
] = { 0x31000 },
4007 [GCC_RBCPR_BCR
] = { 0x33000 },
4008 [GCC_TLMM_BCR
] = { 0x34000 },
4009 [GCC_CAMSS_CSI2_BCR
] = { 0x3c038 },
4010 [GCC_CAMSS_CSI2PHY_BCR
] = { 0x3c044 },
4011 [GCC_CAMSS_CSI2RDI_BCR
] = { 0x3c04c },
4012 [GCC_CAMSS_CSI2PIX_BCR
] = { 0x3c054 },
4013 [GCC_USB_FS_BCR
] = { 0x3f000 },
4014 [GCC_USB_HS_BCR
] = { 0x41000 },
4015 [GCC_USB2A_PHY_BCR
] = { 0x41028 },
4016 [GCC_SDCC1_BCR
] = { 0x42000 },
4017 [GCC_SDCC2_BCR
] = { 0x43000 },
4018 [GCC_PDM_BCR
] = { 0x44000 },
4019 [GCC_SNOC_BUS_TIMEOUT0_BCR
] = { 0x47000 },
4020 [GCC_PCNOC_BUS_TIMEOUT0_BCR
] = { 0x48000 },
4021 [GCC_PCNOC_BUS_TIMEOUT1_BCR
] = { 0x48008 },
4022 [GCC_PCNOC_BUS_TIMEOUT2_BCR
] = { 0x48010 },
4023 [GCC_PCNOC_BUS_TIMEOUT3_BCR
] = { 0x48018 },
4024 [GCC_PCNOC_BUS_TIMEOUT4_BCR
] = { 0x48020 },
4025 [GCC_PCNOC_BUS_TIMEOUT5_BCR
] = { 0x48028 },
4026 [GCC_PCNOC_BUS_TIMEOUT6_BCR
] = { 0x48030 },
4027 [GCC_PCNOC_BUS_TIMEOUT7_BCR
] = { 0x48038 },
4028 [GCC_PCNOC_BUS_TIMEOUT8_BCR
] = { 0x48040 },
4029 [GCC_PCNOC_BUS_TIMEOUT9_BCR
] = { 0x48048 },
4030 [GCC_MMSS_BCR
] = { 0x4b000 },
4031 [GCC_VENUS0_BCR
] = { 0x4c014 },
4032 [GCC_MDSS_BCR
] = { 0x4d074 },
4033 [GCC_CAMSS_PHY0_BCR
] = { 0x4e018 },
4034 [GCC_CAMSS_CSI0_BCR
] = { 0x4e038 },
4035 [GCC_CAMSS_CSI0PHY_BCR
] = { 0x4e044 },
4036 [GCC_CAMSS_CSI0RDI_BCR
] = { 0x4e04c },
4037 [GCC_CAMSS_CSI0PIX_BCR
] = { 0x4e054 },
4038 [GCC_CAMSS_PHY1_BCR
] = { 0x4f018 },
4039 [GCC_CAMSS_CSI1_BCR
] = { 0x4f038 },
4040 [GCC_CAMSS_CSI1PHY_BCR
] = { 0x4f044 },
4041 [GCC_CAMSS_CSI1RDI_BCR
] = { 0x4f04c },
4042 [GCC_CAMSS_CSI1PIX_BCR
] = { 0x4f054 },
4043 [GCC_CAMSS_ISPIF_BCR
] = { 0x50000 },
4044 [GCC_BLSP1_QUP4_SPI_APPS_CBCR
] = { 0x0501c },
4045 [GCC_CAMSS_CCI_BCR
] = { 0x51014 },
4046 [GCC_CAMSS_MCLK0_BCR
] = { 0x52014 },
4047 [GCC_CAMSS_MCLK1_BCR
] = { 0x53014 },
4048 [GCC_CAMSS_GP0_BCR
] = { 0x54014 },
4049 [GCC_CAMSS_GP1_BCR
] = { 0x55014 },
4050 [GCC_CAMSS_TOP_BCR
] = { 0x56000 },
4051 [GCC_CAMSS_MICRO_BCR
] = { 0x56008 },
4052 [GCC_CAMSS_JPEG_BCR
] = { 0x57018 },
4053 [GCC_CAMSS_VFE_BCR
] = { 0x58030 },
4054 [GCC_CAMSS_CSI_VFE0_BCR
] = { 0x5804c },
4055 [GCC_OXILI_BCR
] = { 0x59018 },
4056 [GCC_GMEM_BCR
] = { 0x5902c },
4057 [GCC_CAMSS_AHB_BCR
] = { 0x5a018 },
4058 [GCC_CAMSS_MCLK2_BCR
] = { 0x5c014 },
4059 [GCC_MDP_TBU_BCR
] = { 0x62000 },
4060 [GCC_GFX_TBU_BCR
] = { 0x63000 },
4061 [GCC_GFX_TCU_BCR
] = { 0x64000 },
4062 [GCC_MSS_TBU_AXI_BCR
] = { 0x65000 },
4063 [GCC_MSS_TBU_GSS_AXI_BCR
] = { 0x66000 },
4064 [GCC_MSS_TBU_Q6_AXI_BCR
] = { 0x67000 },
4065 [GCC_GTCU_AHB_BCR
] = { 0x68000 },
4066 [GCC_SMMU_CFG_BCR
] = { 0x69000 },
4067 [GCC_VFE_TBU_BCR
] = { 0x6a000 },
4068 [GCC_VENUS_TBU_BCR
] = { 0x6b000 },
4069 [GCC_JPEG_TBU_BCR
] = { 0x6c000 },
4070 [GCC_PRONTO_TBU_BCR
] = { 0x6d000 },
4071 [GCC_CPP_TBU_BCR
] = { 0x6e000 },
4072 [GCC_MDP_RT_TBU_BCR
] = { 0x6f000 },
4073 [GCC_SMMU_CATS_BCR
] = { 0x7c000 },
4076 static const struct regmap_config gcc_msm8939_regmap_config
= {
4080 .max_register
= 0x80000,
4084 static const struct qcom_cc_desc gcc_msm8939_desc
= {
4085 .config
= &gcc_msm8939_regmap_config
,
4086 .clks
= gcc_msm8939_clocks
,
4087 .num_clks
= ARRAY_SIZE(gcc_msm8939_clocks
),
4088 .resets
= gcc_msm8939_resets
,
4089 .num_resets
= ARRAY_SIZE(gcc_msm8939_resets
),
4090 .gdscs
= gcc_msm8939_gdscs
,
4091 .num_gdscs
= ARRAY_SIZE(gcc_msm8939_gdscs
),
4094 static const struct of_device_id gcc_msm8939_match_table
[] = {
4095 { .compatible
= "qcom,gcc-msm8939" },
4098 MODULE_DEVICE_TABLE(of
, gcc_msm8939_match_table
);
4100 static int gcc_msm8939_probe(struct platform_device
*pdev
)
4102 struct regmap
*regmap
;
4104 regmap
= qcom_cc_map(pdev
, &gcc_msm8939_desc
);
4106 return PTR_ERR(regmap
);
4108 clk_pll_configure_sr_hpm_lp(&gpll3
, regmap
, &gpll3_config
, true);
4109 clk_pll_configure_sr_hpm_lp(&gpll4
, regmap
, &gpll4_config
, true);
4111 return qcom_cc_really_probe(&pdev
->dev
, &gcc_msm8939_desc
, regmap
);
4114 static struct platform_driver gcc_msm8939_driver
= {
4115 .probe
= gcc_msm8939_probe
,
4117 .name
= "gcc-msm8939",
4118 .of_match_table
= gcc_msm8939_match_table
,
4122 static int __init
gcc_msm8939_init(void)
4124 return platform_driver_register(&gcc_msm8939_driver
);
4126 core_initcall(gcc_msm8939_init
);
4128 static void __exit
gcc_msm8939_exit(void)
4130 platform_driver_unregister(&gcc_msm8939_driver
);
4132 module_exit(gcc_msm8939_exit
);
4134 MODULE_DESCRIPTION("Qualcomm GCC MSM8939 Driver");
4135 MODULE_LICENSE("GPL v2");