1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved.
6 #include <linux/kernel.h>
7 #include <linux/bitops.h>
9 #include <linux/platform_device.h>
10 #include <linux/module.h>
12 #include <linux/of_device.h>
13 #include <linux/clk-provider.h>
14 #include <linux/regmap.h>
15 #include <linux/reset-controller.h>
17 #include <dt-bindings/clock/qcom,gcc-sdm845.h>
20 #include "clk-regmap.h"
23 #include "clk-branch.h"
24 #include "clk-alpha-pll.h"
31 P_CORE_BI_PLL_TEST_SE
,
38 static const struct parent_map gcc_parent_map_0
[] = {
40 { P_GPLL0_OUT_MAIN
, 1 },
41 { P_GPLL0_OUT_EVEN
, 6 },
42 { P_CORE_BI_PLL_TEST_SE
, 7 },
45 static const char * const gcc_parent_names_0
[] = {
49 "core_bi_pll_test_se",
52 static const struct parent_map gcc_parent_map_1
[] = {
54 { P_GPLL0_OUT_MAIN
, 1 },
56 { P_GPLL0_OUT_EVEN
, 6 },
57 { P_CORE_BI_PLL_TEST_SE
, 7 },
60 static const char * const gcc_parent_names_1
[] = {
65 "core_bi_pll_test_se",
68 static const struct parent_map gcc_parent_map_2
[] = {
71 { P_CORE_BI_PLL_TEST_SE
, 7 },
74 static const char * const gcc_parent_names_2
[] = {
77 "core_bi_pll_test_se",
80 static const struct parent_map gcc_parent_map_3
[] = {
82 { P_GPLL0_OUT_MAIN
, 1 },
83 { P_CORE_BI_PLL_TEST_SE
, 7 },
86 static const char * const gcc_parent_names_3
[] = {
89 "core_bi_pll_test_se",
92 static const struct parent_map gcc_parent_map_4
[] = {
94 { P_CORE_BI_PLL_TEST_SE
, 7 },
97 static const char * const gcc_parent_names_4
[] = {
99 "core_bi_pll_test_se",
102 static const struct parent_map gcc_parent_map_6
[] = {
104 { P_GPLL0_OUT_MAIN
, 1 },
105 { P_AUD_REF_CLK
, 2 },
106 { P_GPLL0_OUT_EVEN
, 6 },
107 { P_CORE_BI_PLL_TEST_SE
, 7 },
110 static const char * const gcc_parent_names_6
[] = {
115 "core_bi_pll_test_se",
118 static const char * const gcc_parent_names_7_ao
[] = {
122 "core_bi_pll_test_se",
125 static const char * const gcc_parent_names_8
[] = {
128 "core_bi_pll_test_se",
131 static const char * const gcc_parent_names_8_ao
[] = {
134 "core_bi_pll_test_se",
137 static const struct parent_map gcc_parent_map_10
[] = {
139 { P_GPLL0_OUT_MAIN
, 1 },
140 { P_GPLL4_OUT_MAIN
, 5 },
141 { P_GPLL0_OUT_EVEN
, 6 },
142 { P_CORE_BI_PLL_TEST_SE
, 7 },
145 static const char * const gcc_parent_names_10
[] = {
150 "core_bi_pll_test_se",
153 static struct clk_alpha_pll gpll0
= {
155 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
157 .enable_reg
= 0x52000,
158 .enable_mask
= BIT(0),
159 .hw
.init
= &(struct clk_init_data
){
161 .parent_names
= (const char *[]){ "bi_tcxo" },
163 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
168 static struct clk_alpha_pll gpll4
= {
170 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
172 .enable_reg
= 0x52000,
173 .enable_mask
= BIT(4),
174 .hw
.init
= &(struct clk_init_data
){
176 .parent_names
= (const char *[]){ "bi_tcxo" },
178 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
183 static const struct clk_div_table post_div_table_fabia_even
[] = {
191 static struct clk_alpha_pll_postdiv gpll0_out_even
= {
194 .post_div_table
= post_div_table_fabia_even
,
195 .num_post_div
= ARRAY_SIZE(post_div_table_fabia_even
),
197 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
198 .clkr
.hw
.init
= &(struct clk_init_data
){
199 .name
= "gpll0_out_even",
200 .parent_names
= (const char *[]){ "gpll0" },
202 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
206 static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src
[] = {
207 F(19200000, P_BI_TCXO
, 1, 0, 0),
211 static struct clk_rcg2 gcc_cpuss_ahb_clk_src
= {
215 .parent_map
= gcc_parent_map_0
,
216 .freq_tbl
= ftbl_gcc_cpuss_ahb_clk_src
,
217 .clkr
.hw
.init
= &(struct clk_init_data
){
218 .name
= "gcc_cpuss_ahb_clk_src",
219 .parent_names
= gcc_parent_names_7_ao
,
221 .ops
= &clk_rcg2_ops
,
225 static const struct freq_tbl ftbl_gcc_cpuss_rbcpr_clk_src
[] = {
226 F(19200000, P_BI_TCXO
, 1, 0, 0),
230 static struct clk_rcg2 gcc_cpuss_rbcpr_clk_src
= {
234 .parent_map
= gcc_parent_map_3
,
235 .freq_tbl
= ftbl_gcc_cpuss_rbcpr_clk_src
,
236 .clkr
.hw
.init
= &(struct clk_init_data
){
237 .name
= "gcc_cpuss_rbcpr_clk_src",
238 .parent_names
= gcc_parent_names_8_ao
,
240 .ops
= &clk_rcg2_ops
,
244 static const struct freq_tbl ftbl_gcc_gp1_clk_src
[] = {
245 F(19200000, P_BI_TCXO
, 1, 0, 0),
246 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
247 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
248 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
249 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
253 static struct clk_rcg2 gcc_gp1_clk_src
= {
257 .parent_map
= gcc_parent_map_1
,
258 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
259 .clkr
.hw
.init
= &(struct clk_init_data
){
260 .name
= "gcc_gp1_clk_src",
261 .parent_names
= gcc_parent_names_1
,
263 .ops
= &clk_rcg2_ops
,
267 static struct clk_rcg2 gcc_gp2_clk_src
= {
271 .parent_map
= gcc_parent_map_1
,
272 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
273 .clkr
.hw
.init
= &(struct clk_init_data
){
274 .name
= "gcc_gp2_clk_src",
275 .parent_names
= gcc_parent_names_1
,
277 .ops
= &clk_rcg2_ops
,
281 static struct clk_rcg2 gcc_gp3_clk_src
= {
285 .parent_map
= gcc_parent_map_1
,
286 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
287 .clkr
.hw
.init
= &(struct clk_init_data
){
288 .name
= "gcc_gp3_clk_src",
289 .parent_names
= gcc_parent_names_1
,
291 .ops
= &clk_rcg2_ops
,
295 static const struct freq_tbl ftbl_gcc_pcie_0_aux_clk_src
[] = {
296 F(9600000, P_BI_TCXO
, 2, 0, 0),
297 F(19200000, P_BI_TCXO
, 1, 0, 0),
301 static struct clk_rcg2 gcc_pcie_0_aux_clk_src
= {
305 .parent_map
= gcc_parent_map_2
,
306 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
307 .clkr
.hw
.init
= &(struct clk_init_data
){
308 .name
= "gcc_pcie_0_aux_clk_src",
309 .parent_names
= gcc_parent_names_2
,
311 .ops
= &clk_rcg2_ops
,
315 static struct clk_rcg2 gcc_pcie_1_aux_clk_src
= {
319 .parent_map
= gcc_parent_map_2
,
320 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
321 .clkr
.hw
.init
= &(struct clk_init_data
){
322 .name
= "gcc_pcie_1_aux_clk_src",
323 .parent_names
= gcc_parent_names_2
,
325 .ops
= &clk_rcg2_ops
,
329 static const struct freq_tbl ftbl_gcc_pcie_phy_refgen_clk_src
[] = {
330 F(19200000, P_BI_TCXO
, 1, 0, 0),
331 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
335 static struct clk_rcg2 gcc_pcie_phy_refgen_clk_src
= {
339 .parent_map
= gcc_parent_map_0
,
340 .freq_tbl
= ftbl_gcc_pcie_phy_refgen_clk_src
,
341 .clkr
.hw
.init
= &(struct clk_init_data
){
342 .name
= "gcc_pcie_phy_refgen_clk_src",
343 .parent_names
= gcc_parent_names_0
,
345 .ops
= &clk_rcg2_ops
,
349 static const struct freq_tbl ftbl_gcc_qspi_core_clk_src
[] = {
350 F(19200000, P_BI_TCXO
, 1, 0, 0),
351 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
352 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
353 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
357 static struct clk_rcg2 gcc_qspi_core_clk_src
= {
361 .parent_map
= gcc_parent_map_0
,
362 .freq_tbl
= ftbl_gcc_qspi_core_clk_src
,
363 .clkr
.hw
.init
= &(struct clk_init_data
){
364 .name
= "gcc_qspi_core_clk_src",
365 .parent_names
= gcc_parent_names_0
,
367 .ops
= &clk_rcg2_floor_ops
,
371 static const struct freq_tbl ftbl_gcc_pdm2_clk_src
[] = {
372 F(9600000, P_BI_TCXO
, 2, 0, 0),
373 F(19200000, P_BI_TCXO
, 1, 0, 0),
374 F(60000000, P_GPLL0_OUT_MAIN
, 10, 0, 0),
378 static struct clk_rcg2 gcc_pdm2_clk_src
= {
382 .parent_map
= gcc_parent_map_0
,
383 .freq_tbl
= ftbl_gcc_pdm2_clk_src
,
384 .clkr
.hw
.init
= &(struct clk_init_data
){
385 .name
= "gcc_pdm2_clk_src",
386 .parent_names
= gcc_parent_names_0
,
388 .ops
= &clk_rcg2_ops
,
392 static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src
[] = {
393 F(7372800, P_GPLL0_OUT_EVEN
, 1, 384, 15625),
394 F(14745600, P_GPLL0_OUT_EVEN
, 1, 768, 15625),
395 F(19200000, P_BI_TCXO
, 1, 0, 0),
396 F(29491200, P_GPLL0_OUT_EVEN
, 1, 1536, 15625),
397 F(32000000, P_GPLL0_OUT_EVEN
, 1, 8, 75),
398 F(48000000, P_GPLL0_OUT_EVEN
, 1, 4, 25),
399 F(64000000, P_GPLL0_OUT_EVEN
, 1, 16, 75),
400 F(80000000, P_GPLL0_OUT_EVEN
, 1, 4, 15),
401 F(96000000, P_GPLL0_OUT_EVEN
, 1, 8, 25),
402 F(100000000, P_GPLL0_OUT_EVEN
, 3, 0, 0),
403 F(102400000, P_GPLL0_OUT_EVEN
, 1, 128, 375),
404 F(112000000, P_GPLL0_OUT_EVEN
, 1, 28, 75),
405 F(117964800, P_GPLL0_OUT_EVEN
, 1, 6144, 15625),
406 F(120000000, P_GPLL0_OUT_EVEN
, 2.5, 0, 0),
407 F(128000000, P_GPLL0_OUT_MAIN
, 1, 16, 75),
411 static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init
= {
412 .name
= "gcc_qupv3_wrap0_s0_clk_src",
413 .parent_names
= gcc_parent_names_0
,
415 .ops
= &clk_rcg2_shared_ops
,
418 static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src
= {
422 .parent_map
= gcc_parent_map_0
,
423 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
424 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s0_clk_src_init
,
427 static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init
= {
428 .name
= "gcc_qupv3_wrap0_s1_clk_src",
429 .parent_names
= gcc_parent_names_0
,
431 .ops
= &clk_rcg2_shared_ops
,
434 static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src
= {
438 .parent_map
= gcc_parent_map_0
,
439 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
440 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s1_clk_src_init
,
443 static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init
= {
444 .name
= "gcc_qupv3_wrap0_s2_clk_src",
445 .parent_names
= gcc_parent_names_0
,
447 .ops
= &clk_rcg2_shared_ops
,
450 static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src
= {
454 .parent_map
= gcc_parent_map_0
,
455 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
456 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s2_clk_src_init
,
459 static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init
= {
460 .name
= "gcc_qupv3_wrap0_s3_clk_src",
461 .parent_names
= gcc_parent_names_0
,
463 .ops
= &clk_rcg2_shared_ops
,
466 static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src
= {
470 .parent_map
= gcc_parent_map_0
,
471 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
472 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s3_clk_src_init
,
475 static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init
= {
476 .name
= "gcc_qupv3_wrap0_s4_clk_src",
477 .parent_names
= gcc_parent_names_0
,
479 .ops
= &clk_rcg2_shared_ops
,
482 static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src
= {
486 .parent_map
= gcc_parent_map_0
,
487 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
488 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s4_clk_src_init
,
491 static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init
= {
492 .name
= "gcc_qupv3_wrap0_s5_clk_src",
493 .parent_names
= gcc_parent_names_0
,
495 .ops
= &clk_rcg2_shared_ops
,
498 static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src
= {
502 .parent_map
= gcc_parent_map_0
,
503 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
504 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s5_clk_src_init
,
507 static struct clk_init_data gcc_qupv3_wrap0_s6_clk_src_init
= {
508 .name
= "gcc_qupv3_wrap0_s6_clk_src",
509 .parent_names
= gcc_parent_names_0
,
511 .ops
= &clk_rcg2_shared_ops
,
514 static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src
= {
518 .parent_map
= gcc_parent_map_0
,
519 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
520 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s6_clk_src_init
,
523 static struct clk_init_data gcc_qupv3_wrap0_s7_clk_src_init
= {
524 .name
= "gcc_qupv3_wrap0_s7_clk_src",
525 .parent_names
= gcc_parent_names_0
,
527 .ops
= &clk_rcg2_shared_ops
,
530 static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src
= {
534 .parent_map
= gcc_parent_map_0
,
535 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
536 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s7_clk_src_init
,
539 static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init
= {
540 .name
= "gcc_qupv3_wrap1_s0_clk_src",
541 .parent_names
= gcc_parent_names_0
,
543 .ops
= &clk_rcg2_shared_ops
,
546 static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src
= {
550 .parent_map
= gcc_parent_map_0
,
551 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
552 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s0_clk_src_init
,
555 static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init
= {
556 .name
= "gcc_qupv3_wrap1_s1_clk_src",
557 .parent_names
= gcc_parent_names_0
,
559 .ops
= &clk_rcg2_shared_ops
,
562 static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src
= {
566 .parent_map
= gcc_parent_map_0
,
567 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
568 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s1_clk_src_init
,
571 static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init
= {
572 .name
= "gcc_qupv3_wrap1_s2_clk_src",
573 .parent_names
= gcc_parent_names_0
,
575 .ops
= &clk_rcg2_shared_ops
,
578 static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src
= {
582 .parent_map
= gcc_parent_map_0
,
583 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
584 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s2_clk_src_init
,
587 static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init
= {
588 .name
= "gcc_qupv3_wrap1_s3_clk_src",
589 .parent_names
= gcc_parent_names_0
,
591 .ops
= &clk_rcg2_shared_ops
,
594 static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src
= {
598 .parent_map
= gcc_parent_map_0
,
599 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
600 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s3_clk_src_init
,
603 static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init
= {
604 .name
= "gcc_qupv3_wrap1_s4_clk_src",
605 .parent_names
= gcc_parent_names_0
,
607 .ops
= &clk_rcg2_shared_ops
,
610 static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src
= {
614 .parent_map
= gcc_parent_map_0
,
615 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
616 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s4_clk_src_init
,
619 static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init
= {
620 .name
= "gcc_qupv3_wrap1_s5_clk_src",
621 .parent_names
= gcc_parent_names_0
,
623 .ops
= &clk_rcg2_shared_ops
,
626 static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src
= {
630 .parent_map
= gcc_parent_map_0
,
631 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
632 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s5_clk_src_init
,
635 static struct clk_init_data gcc_qupv3_wrap1_s6_clk_src_init
= {
636 .name
= "gcc_qupv3_wrap1_s6_clk_src",
637 .parent_names
= gcc_parent_names_0
,
639 .ops
= &clk_rcg2_shared_ops
,
642 static struct clk_rcg2 gcc_qupv3_wrap1_s6_clk_src
= {
646 .parent_map
= gcc_parent_map_0
,
647 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
648 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s6_clk_src_init
,
651 static struct clk_init_data gcc_qupv3_wrap1_s7_clk_src_init
= {
652 .name
= "gcc_qupv3_wrap1_s7_clk_src",
653 .parent_names
= gcc_parent_names_0
,
655 .ops
= &clk_rcg2_shared_ops
,
658 static struct clk_rcg2 gcc_qupv3_wrap1_s7_clk_src
= {
662 .parent_map
= gcc_parent_map_0
,
663 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
664 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s7_clk_src_init
,
667 static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src
[] = {
668 F(400000, P_BI_TCXO
, 12, 1, 4),
669 F(9600000, P_BI_TCXO
, 2, 0, 0),
670 F(19200000, P_BI_TCXO
, 1, 0, 0),
671 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
672 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
673 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
674 F(201500000, P_GPLL4_OUT_MAIN
, 4, 0, 0),
678 static struct clk_rcg2 gcc_sdcc2_apps_clk_src
= {
682 .parent_map
= gcc_parent_map_10
,
683 .freq_tbl
= ftbl_gcc_sdcc2_apps_clk_src
,
684 .clkr
.hw
.init
= &(struct clk_init_data
){
685 .name
= "gcc_sdcc2_apps_clk_src",
686 .parent_names
= gcc_parent_names_10
,
688 .ops
= &clk_rcg2_floor_ops
,
692 static const struct freq_tbl ftbl_gcc_sdcc4_apps_clk_src
[] = {
693 F(400000, P_BI_TCXO
, 12, 1, 4),
694 F(9600000, P_BI_TCXO
, 2, 0, 0),
695 F(19200000, P_BI_TCXO
, 1, 0, 0),
696 F(25000000, P_GPLL0_OUT_MAIN
, 12, 1, 2),
697 F(50000000, P_GPLL0_OUT_MAIN
, 12, 0, 0),
698 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
702 static struct clk_rcg2 gcc_sdcc4_apps_clk_src
= {
706 .parent_map
= gcc_parent_map_0
,
707 .freq_tbl
= ftbl_gcc_sdcc4_apps_clk_src
,
708 .clkr
.hw
.init
= &(struct clk_init_data
){
709 .name
= "gcc_sdcc4_apps_clk_src",
710 .parent_names
= gcc_parent_names_0
,
712 .ops
= &clk_rcg2_floor_ops
,
716 static const struct freq_tbl ftbl_gcc_tsif_ref_clk_src
[] = {
717 F(105495, P_BI_TCXO
, 2, 1, 91),
721 static struct clk_rcg2 gcc_tsif_ref_clk_src
= {
725 .parent_map
= gcc_parent_map_6
,
726 .freq_tbl
= ftbl_gcc_tsif_ref_clk_src
,
727 .clkr
.hw
.init
= &(struct clk_init_data
){
728 .name
= "gcc_tsif_ref_clk_src",
729 .parent_names
= gcc_parent_names_6
,
731 .ops
= &clk_rcg2_ops
,
735 static const struct freq_tbl ftbl_gcc_ufs_card_axi_clk_src
[] = {
736 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
737 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
738 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
739 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
740 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
744 static struct clk_rcg2 gcc_ufs_card_axi_clk_src
= {
748 .parent_map
= gcc_parent_map_0
,
749 .freq_tbl
= ftbl_gcc_ufs_card_axi_clk_src
,
750 .clkr
.hw
.init
= &(struct clk_init_data
){
751 .name
= "gcc_ufs_card_axi_clk_src",
752 .parent_names
= gcc_parent_names_0
,
754 .ops
= &clk_rcg2_shared_ops
,
758 static const struct freq_tbl ftbl_gcc_ufs_card_ice_core_clk_src
[] = {
759 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
760 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
761 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
762 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
766 static struct clk_rcg2 gcc_ufs_card_ice_core_clk_src
= {
770 .parent_map
= gcc_parent_map_0
,
771 .freq_tbl
= ftbl_gcc_ufs_card_ice_core_clk_src
,
772 .clkr
.hw
.init
= &(struct clk_init_data
){
773 .name
= "gcc_ufs_card_ice_core_clk_src",
774 .parent_names
= gcc_parent_names_0
,
776 .ops
= &clk_rcg2_shared_ops
,
780 static struct clk_rcg2 gcc_ufs_card_phy_aux_clk_src
= {
784 .parent_map
= gcc_parent_map_4
,
785 .freq_tbl
= ftbl_gcc_cpuss_rbcpr_clk_src
,
786 .clkr
.hw
.init
= &(struct clk_init_data
){
787 .name
= "gcc_ufs_card_phy_aux_clk_src",
788 .parent_names
= gcc_parent_names_4
,
790 .ops
= &clk_rcg2_ops
,
794 static const struct freq_tbl ftbl_gcc_ufs_card_unipro_core_clk_src
[] = {
795 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
796 F(75000000, P_GPLL0_OUT_MAIN
, 8, 0, 0),
797 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
801 static struct clk_rcg2 gcc_ufs_card_unipro_core_clk_src
= {
805 .parent_map
= gcc_parent_map_0
,
806 .freq_tbl
= ftbl_gcc_ufs_card_unipro_core_clk_src
,
807 .clkr
.hw
.init
= &(struct clk_init_data
){
808 .name
= "gcc_ufs_card_unipro_core_clk_src",
809 .parent_names
= gcc_parent_names_0
,
811 .ops
= &clk_rcg2_shared_ops
,
815 static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src
[] = {
816 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
817 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
818 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
819 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
820 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
824 static struct clk_rcg2 gcc_ufs_phy_axi_clk_src
= {
828 .parent_map
= gcc_parent_map_0
,
829 .freq_tbl
= ftbl_gcc_ufs_phy_axi_clk_src
,
830 .clkr
.hw
.init
= &(struct clk_init_data
){
831 .name
= "gcc_ufs_phy_axi_clk_src",
832 .parent_names
= gcc_parent_names_0
,
834 .ops
= &clk_rcg2_shared_ops
,
838 static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src
= {
842 .parent_map
= gcc_parent_map_0
,
843 .freq_tbl
= ftbl_gcc_ufs_card_ice_core_clk_src
,
844 .clkr
.hw
.init
= &(struct clk_init_data
){
845 .name
= "gcc_ufs_phy_ice_core_clk_src",
846 .parent_names
= gcc_parent_names_0
,
848 .ops
= &clk_rcg2_shared_ops
,
852 static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src
= {
856 .parent_map
= gcc_parent_map_4
,
857 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
858 .clkr
.hw
.init
= &(struct clk_init_data
){
859 .name
= "gcc_ufs_phy_phy_aux_clk_src",
860 .parent_names
= gcc_parent_names_4
,
862 .ops
= &clk_rcg2_shared_ops
,
866 static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src
= {
870 .parent_map
= gcc_parent_map_0
,
871 .freq_tbl
= ftbl_gcc_ufs_card_unipro_core_clk_src
,
872 .clkr
.hw
.init
= &(struct clk_init_data
){
873 .name
= "gcc_ufs_phy_unipro_core_clk_src",
874 .parent_names
= gcc_parent_names_0
,
876 .ops
= &clk_rcg2_shared_ops
,
880 static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src
[] = {
881 F(33333333, P_GPLL0_OUT_EVEN
, 9, 0, 0),
882 F(66666667, P_GPLL0_OUT_EVEN
, 4.5, 0, 0),
883 F(133333333, P_GPLL0_OUT_MAIN
, 4.5, 0, 0),
884 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
885 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
889 static struct clk_rcg2 gcc_usb30_prim_master_clk_src
= {
893 .parent_map
= gcc_parent_map_0
,
894 .freq_tbl
= ftbl_gcc_usb30_prim_master_clk_src
,
895 .clkr
.hw
.init
= &(struct clk_init_data
){
896 .name
= "gcc_usb30_prim_master_clk_src",
897 .parent_names
= gcc_parent_names_0
,
899 .ops
= &clk_rcg2_shared_ops
,
903 static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src
[] = {
904 F(19200000, P_BI_TCXO
, 1, 0, 0),
905 F(20000000, P_GPLL0_OUT_EVEN
, 15, 0, 0),
906 F(40000000, P_GPLL0_OUT_EVEN
, 7.5, 0, 0),
907 F(60000000, P_GPLL0_OUT_MAIN
, 10, 0, 0),
911 static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src
= {
915 .parent_map
= gcc_parent_map_0
,
916 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
917 .clkr
.hw
.init
= &(struct clk_init_data
){
918 .name
= "gcc_usb30_prim_mock_utmi_clk_src",
919 .parent_names
= gcc_parent_names_0
,
921 .ops
= &clk_rcg2_shared_ops
,
925 static struct clk_rcg2 gcc_usb30_sec_master_clk_src
= {
929 .parent_map
= gcc_parent_map_0
,
930 .freq_tbl
= ftbl_gcc_usb30_prim_master_clk_src
,
931 .clkr
.hw
.init
= &(struct clk_init_data
){
932 .name
= "gcc_usb30_sec_master_clk_src",
933 .parent_names
= gcc_parent_names_0
,
935 .ops
= &clk_rcg2_ops
,
939 static struct clk_rcg2 gcc_usb30_sec_mock_utmi_clk_src
= {
943 .parent_map
= gcc_parent_map_0
,
944 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
945 .clkr
.hw
.init
= &(struct clk_init_data
){
946 .name
= "gcc_usb30_sec_mock_utmi_clk_src",
947 .parent_names
= gcc_parent_names_0
,
949 .ops
= &clk_rcg2_ops
,
953 static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src
= {
957 .parent_map
= gcc_parent_map_2
,
958 .freq_tbl
= ftbl_gcc_cpuss_rbcpr_clk_src
,
959 .clkr
.hw
.init
= &(struct clk_init_data
){
960 .name
= "gcc_usb3_prim_phy_aux_clk_src",
961 .parent_names
= gcc_parent_names_2
,
963 .ops
= &clk_rcg2_ops
,
967 static struct clk_rcg2 gcc_usb3_sec_phy_aux_clk_src
= {
971 .parent_map
= gcc_parent_map_2
,
972 .freq_tbl
= ftbl_gcc_cpuss_rbcpr_clk_src
,
973 .clkr
.hw
.init
= &(struct clk_init_data
){
974 .name
= "gcc_usb3_sec_phy_aux_clk_src",
975 .parent_names
= gcc_parent_names_2
,
977 .ops
= &clk_rcg2_shared_ops
,
981 static struct clk_rcg2 gcc_vs_ctrl_clk_src
= {
985 .parent_map
= gcc_parent_map_3
,
986 .freq_tbl
= ftbl_gcc_cpuss_rbcpr_clk_src
,
987 .clkr
.hw
.init
= &(struct clk_init_data
){
988 .name
= "gcc_vs_ctrl_clk_src",
989 .parent_names
= gcc_parent_names_3
,
991 .ops
= &clk_rcg2_ops
,
995 static const struct freq_tbl ftbl_gcc_vsensor_clk_src
[] = {
996 F(19200000, P_BI_TCXO
, 1, 0, 0),
997 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
998 F(600000000, P_GPLL0_OUT_MAIN
, 1, 0, 0),
1002 static struct clk_rcg2 gcc_vsensor_clk_src
= {
1003 .cmd_rcgr
= 0x7a018,
1006 .parent_map
= gcc_parent_map_3
,
1007 .freq_tbl
= ftbl_gcc_vsensor_clk_src
,
1008 .clkr
.hw
.init
= &(struct clk_init_data
){
1009 .name
= "gcc_vsensor_clk_src",
1010 .parent_names
= gcc_parent_names_8
,
1012 .ops
= &clk_rcg2_ops
,
1016 static struct clk_branch gcc_aggre_noc_pcie_tbu_clk
= {
1017 .halt_reg
= 0x90014,
1018 .halt_check
= BRANCH_HALT
,
1020 .enable_reg
= 0x90014,
1021 .enable_mask
= BIT(0),
1022 .hw
.init
= &(struct clk_init_data
){
1023 .name
= "gcc_aggre_noc_pcie_tbu_clk",
1024 .ops
= &clk_branch2_ops
,
1029 static struct clk_branch gcc_aggre_ufs_card_axi_clk
= {
1030 .halt_reg
= 0x82028,
1031 .halt_check
= BRANCH_HALT
,
1032 .hwcg_reg
= 0x82028,
1035 .enable_reg
= 0x82028,
1036 .enable_mask
= BIT(0),
1037 .hw
.init
= &(struct clk_init_data
){
1038 .name
= "gcc_aggre_ufs_card_axi_clk",
1039 .parent_names
= (const char *[]){
1040 "gcc_ufs_card_axi_clk_src",
1043 .flags
= CLK_SET_RATE_PARENT
,
1044 .ops
= &clk_branch2_ops
,
1049 static struct clk_branch gcc_aggre_ufs_phy_axi_clk
= {
1050 .halt_reg
= 0x82024,
1051 .halt_check
= BRANCH_HALT
,
1052 .hwcg_reg
= 0x82024,
1055 .enable_reg
= 0x82024,
1056 .enable_mask
= BIT(0),
1057 .hw
.init
= &(struct clk_init_data
){
1058 .name
= "gcc_aggre_ufs_phy_axi_clk",
1059 .parent_names
= (const char *[]){
1060 "gcc_ufs_phy_axi_clk_src",
1063 .flags
= CLK_SET_RATE_PARENT
,
1064 .ops
= &clk_branch2_ops
,
1069 static struct clk_branch gcc_aggre_usb3_prim_axi_clk
= {
1070 .halt_reg
= 0x8201c,
1071 .halt_check
= BRANCH_HALT
,
1073 .enable_reg
= 0x8201c,
1074 .enable_mask
= BIT(0),
1075 .hw
.init
= &(struct clk_init_data
){
1076 .name
= "gcc_aggre_usb3_prim_axi_clk",
1077 .parent_names
= (const char *[]){
1078 "gcc_usb30_prim_master_clk_src",
1081 .flags
= CLK_SET_RATE_PARENT
,
1082 .ops
= &clk_branch2_ops
,
1087 static struct clk_branch gcc_aggre_usb3_sec_axi_clk
= {
1088 .halt_reg
= 0x82020,
1089 .halt_check
= BRANCH_HALT
,
1091 .enable_reg
= 0x82020,
1092 .enable_mask
= BIT(0),
1093 .hw
.init
= &(struct clk_init_data
){
1094 .name
= "gcc_aggre_usb3_sec_axi_clk",
1095 .parent_names
= (const char *[]){
1096 "gcc_usb30_sec_master_clk_src",
1099 .flags
= CLK_SET_RATE_PARENT
,
1100 .ops
= &clk_branch2_ops
,
1105 static struct clk_branch gcc_apc_vs_clk
= {
1106 .halt_reg
= 0x7a050,
1107 .halt_check
= BRANCH_HALT
,
1109 .enable_reg
= 0x7a050,
1110 .enable_mask
= BIT(0),
1111 .hw
.init
= &(struct clk_init_data
){
1112 .name
= "gcc_apc_vs_clk",
1113 .parent_names
= (const char *[]){
1114 "gcc_vsensor_clk_src",
1117 .flags
= CLK_SET_RATE_PARENT
,
1118 .ops
= &clk_branch2_ops
,
1123 static struct clk_branch gcc_boot_rom_ahb_clk
= {
1124 .halt_reg
= 0x38004,
1125 .halt_check
= BRANCH_HALT_VOTED
,
1126 .hwcg_reg
= 0x38004,
1129 .enable_reg
= 0x52004,
1130 .enable_mask
= BIT(10),
1131 .hw
.init
= &(struct clk_init_data
){
1132 .name
= "gcc_boot_rom_ahb_clk",
1133 .ops
= &clk_branch2_ops
,
1138 static struct clk_branch gcc_camera_ahb_clk
= {
1140 .halt_check
= BRANCH_HALT
,
1144 .enable_reg
= 0xb008,
1145 .enable_mask
= BIT(0),
1146 .hw
.init
= &(struct clk_init_data
){
1147 .name
= "gcc_camera_ahb_clk",
1148 .flags
= CLK_IS_CRITICAL
,
1149 .ops
= &clk_branch2_ops
,
1154 static struct clk_branch gcc_camera_axi_clk
= {
1156 .halt_check
= BRANCH_VOTED
,
1158 .enable_reg
= 0xb020,
1159 .enable_mask
= BIT(0),
1160 .hw
.init
= &(struct clk_init_data
){
1161 .name
= "gcc_camera_axi_clk",
1162 .ops
= &clk_branch2_ops
,
1167 static struct clk_branch gcc_camera_xo_clk
= {
1169 .halt_check
= BRANCH_HALT
,
1171 .enable_reg
= 0xb02c,
1172 .enable_mask
= BIT(0),
1173 .hw
.init
= &(struct clk_init_data
){
1174 .name
= "gcc_camera_xo_clk",
1175 .flags
= CLK_IS_CRITICAL
,
1176 .ops
= &clk_branch2_ops
,
1181 static struct clk_branch gcc_ce1_ahb_clk
= {
1182 .halt_reg
= 0x4100c,
1183 .halt_check
= BRANCH_HALT_VOTED
,
1184 .hwcg_reg
= 0x4100c,
1187 .enable_reg
= 0x52004,
1188 .enable_mask
= BIT(3),
1189 .hw
.init
= &(struct clk_init_data
){
1190 .name
= "gcc_ce1_ahb_clk",
1191 .ops
= &clk_branch2_ops
,
1196 static struct clk_branch gcc_ce1_axi_clk
= {
1197 .halt_reg
= 0x41008,
1198 .halt_check
= BRANCH_HALT_VOTED
,
1200 .enable_reg
= 0x52004,
1201 .enable_mask
= BIT(4),
1202 .hw
.init
= &(struct clk_init_data
){
1203 .name
= "gcc_ce1_axi_clk",
1204 .ops
= &clk_branch2_ops
,
1209 static struct clk_branch gcc_ce1_clk
= {
1210 .halt_reg
= 0x41004,
1211 .halt_check
= BRANCH_HALT_VOTED
,
1213 .enable_reg
= 0x52004,
1214 .enable_mask
= BIT(5),
1215 .hw
.init
= &(struct clk_init_data
){
1216 .name
= "gcc_ce1_clk",
1217 .ops
= &clk_branch2_ops
,
1222 static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk
= {
1224 .halt_check
= BRANCH_HALT
,
1226 .enable_reg
= 0x502c,
1227 .enable_mask
= BIT(0),
1228 .hw
.init
= &(struct clk_init_data
){
1229 .name
= "gcc_cfg_noc_usb3_prim_axi_clk",
1230 .parent_names
= (const char *[]){
1231 "gcc_usb30_prim_master_clk_src",
1234 .flags
= CLK_SET_RATE_PARENT
,
1235 .ops
= &clk_branch2_ops
,
1240 static struct clk_branch gcc_cfg_noc_usb3_sec_axi_clk
= {
1242 .halt_check
= BRANCH_HALT
,
1244 .enable_reg
= 0x5030,
1245 .enable_mask
= BIT(0),
1246 .hw
.init
= &(struct clk_init_data
){
1247 .name
= "gcc_cfg_noc_usb3_sec_axi_clk",
1248 .parent_names
= (const char *[]){
1249 "gcc_usb30_sec_master_clk_src",
1252 .flags
= CLK_SET_RATE_PARENT
,
1253 .ops
= &clk_branch2_ops
,
1258 static struct clk_branch gcc_cpuss_ahb_clk
= {
1259 .halt_reg
= 0x48000,
1260 .halt_check
= BRANCH_HALT_VOTED
,
1262 .enable_reg
= 0x52004,
1263 .enable_mask
= BIT(21),
1264 .hw
.init
= &(struct clk_init_data
){
1265 .name
= "gcc_cpuss_ahb_clk",
1266 .parent_names
= (const char *[]){
1267 "gcc_cpuss_ahb_clk_src",
1270 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
1271 .ops
= &clk_branch2_ops
,
1276 static struct clk_branch gcc_cpuss_rbcpr_clk
= {
1277 .halt_reg
= 0x48008,
1278 .halt_check
= BRANCH_HALT
,
1280 .enable_reg
= 0x48008,
1281 .enable_mask
= BIT(0),
1282 .hw
.init
= &(struct clk_init_data
){
1283 .name
= "gcc_cpuss_rbcpr_clk",
1284 .parent_names
= (const char *[]){
1285 "gcc_cpuss_rbcpr_clk_src",
1288 .flags
= CLK_SET_RATE_PARENT
,
1289 .ops
= &clk_branch2_ops
,
1294 static struct clk_branch gcc_ddrss_gpu_axi_clk
= {
1295 .halt_reg
= 0x44038,
1296 .halt_check
= BRANCH_VOTED
,
1298 .enable_reg
= 0x44038,
1299 .enable_mask
= BIT(0),
1300 .hw
.init
= &(struct clk_init_data
){
1301 .name
= "gcc_ddrss_gpu_axi_clk",
1302 .ops
= &clk_branch2_ops
,
1307 static struct clk_branch gcc_disp_ahb_clk
= {
1309 .halt_check
= BRANCH_HALT
,
1313 .enable_reg
= 0xb00c,
1314 .enable_mask
= BIT(0),
1315 .hw
.init
= &(struct clk_init_data
){
1316 .name
= "gcc_disp_ahb_clk",
1317 .flags
= CLK_IS_CRITICAL
,
1318 .ops
= &clk_branch2_ops
,
1323 static struct clk_branch gcc_disp_axi_clk
= {
1325 .halt_check
= BRANCH_VOTED
,
1327 .enable_reg
= 0xb024,
1328 .enable_mask
= BIT(0),
1329 .hw
.init
= &(struct clk_init_data
){
1330 .name
= "gcc_disp_axi_clk",
1331 .ops
= &clk_branch2_ops
,
1336 static struct clk_branch gcc_disp_gpll0_clk_src
= {
1337 .halt_check
= BRANCH_HALT_DELAY
,
1339 .enable_reg
= 0x52004,
1340 .enable_mask
= BIT(18),
1341 .hw
.init
= &(struct clk_init_data
){
1342 .name
= "gcc_disp_gpll0_clk_src",
1343 .parent_names
= (const char *[]){
1347 .ops
= &clk_branch2_aon_ops
,
1352 static struct clk_branch gcc_disp_gpll0_div_clk_src
= {
1353 .halt_check
= BRANCH_HALT_DELAY
,
1355 .enable_reg
= 0x52004,
1356 .enable_mask
= BIT(19),
1357 .hw
.init
= &(struct clk_init_data
){
1358 .name
= "gcc_disp_gpll0_div_clk_src",
1359 .parent_names
= (const char *[]){
1363 .ops
= &clk_branch2_ops
,
1368 static struct clk_branch gcc_disp_xo_clk
= {
1370 .halt_check
= BRANCH_HALT
,
1372 .enable_reg
= 0xb030,
1373 .enable_mask
= BIT(0),
1374 .hw
.init
= &(struct clk_init_data
){
1375 .name
= "gcc_disp_xo_clk",
1376 .flags
= CLK_IS_CRITICAL
,
1377 .ops
= &clk_branch2_ops
,
1382 static struct clk_branch gcc_gp1_clk
= {
1383 .halt_reg
= 0x64000,
1384 .halt_check
= BRANCH_HALT
,
1386 .enable_reg
= 0x64000,
1387 .enable_mask
= BIT(0),
1388 .hw
.init
= &(struct clk_init_data
){
1389 .name
= "gcc_gp1_clk",
1390 .parent_names
= (const char *[]){
1394 .flags
= CLK_SET_RATE_PARENT
,
1395 .ops
= &clk_branch2_ops
,
1400 static struct clk_branch gcc_gp2_clk
= {
1401 .halt_reg
= 0x65000,
1402 .halt_check
= BRANCH_HALT
,
1404 .enable_reg
= 0x65000,
1405 .enable_mask
= BIT(0),
1406 .hw
.init
= &(struct clk_init_data
){
1407 .name
= "gcc_gp2_clk",
1408 .parent_names
= (const char *[]){
1412 .flags
= CLK_SET_RATE_PARENT
,
1413 .ops
= &clk_branch2_ops
,
1418 static struct clk_branch gcc_gp3_clk
= {
1419 .halt_reg
= 0x66000,
1420 .halt_check
= BRANCH_HALT
,
1422 .enable_reg
= 0x66000,
1423 .enable_mask
= BIT(0),
1424 .hw
.init
= &(struct clk_init_data
){
1425 .name
= "gcc_gp3_clk",
1426 .parent_names
= (const char *[]){
1430 .flags
= CLK_SET_RATE_PARENT
,
1431 .ops
= &clk_branch2_ops
,
1436 static struct clk_branch gcc_gpu_cfg_ahb_clk
= {
1437 .halt_reg
= 0x71004,
1438 .halt_check
= BRANCH_HALT
,
1439 .hwcg_reg
= 0x71004,
1442 .enable_reg
= 0x71004,
1443 .enable_mask
= BIT(0),
1444 .hw
.init
= &(struct clk_init_data
){
1445 .name
= "gcc_gpu_cfg_ahb_clk",
1446 .flags
= CLK_IS_CRITICAL
,
1447 .ops
= &clk_branch2_ops
,
1452 static struct clk_branch gcc_gpu_gpll0_clk_src
= {
1453 .halt_check
= BRANCH_HALT_DELAY
,
1455 .enable_reg
= 0x52004,
1456 .enable_mask
= BIT(15),
1457 .hw
.init
= &(struct clk_init_data
){
1458 .name
= "gcc_gpu_gpll0_clk_src",
1459 .parent_names
= (const char *[]){
1463 .ops
= &clk_branch2_ops
,
1468 static struct clk_branch gcc_gpu_gpll0_div_clk_src
= {
1469 .halt_check
= BRANCH_HALT_DELAY
,
1471 .enable_reg
= 0x52004,
1472 .enable_mask
= BIT(16),
1473 .hw
.init
= &(struct clk_init_data
){
1474 .name
= "gcc_gpu_gpll0_div_clk_src",
1475 .parent_names
= (const char *[]){
1479 .ops
= &clk_branch2_ops
,
1484 static struct clk_branch gcc_gpu_iref_clk
= {
1485 .halt_reg
= 0x8c010,
1486 .halt_check
= BRANCH_HALT
,
1488 .enable_reg
= 0x8c010,
1489 .enable_mask
= BIT(0),
1490 .hw
.init
= &(struct clk_init_data
){
1491 .name
= "gcc_gpu_iref_clk",
1492 .ops
= &clk_branch2_ops
,
1497 static struct clk_branch gcc_gpu_memnoc_gfx_clk
= {
1498 .halt_reg
= 0x7100c,
1499 .halt_check
= BRANCH_VOTED
,
1501 .enable_reg
= 0x7100c,
1502 .enable_mask
= BIT(0),
1503 .hw
.init
= &(struct clk_init_data
){
1504 .name
= "gcc_gpu_memnoc_gfx_clk",
1505 .ops
= &clk_branch2_ops
,
1510 static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk
= {
1511 .halt_reg
= 0x71018,
1512 .halt_check
= BRANCH_HALT
,
1514 .enable_reg
= 0x71018,
1515 .enable_mask
= BIT(0),
1516 .hw
.init
= &(struct clk_init_data
){
1517 .name
= "gcc_gpu_snoc_dvm_gfx_clk",
1518 .ops
= &clk_branch2_ops
,
1523 static struct clk_branch gcc_gpu_vs_clk
= {
1524 .halt_reg
= 0x7a04c,
1525 .halt_check
= BRANCH_HALT
,
1527 .enable_reg
= 0x7a04c,
1528 .enable_mask
= BIT(0),
1529 .hw
.init
= &(struct clk_init_data
){
1530 .name
= "gcc_gpu_vs_clk",
1531 .parent_names
= (const char *[]){
1532 "gcc_vsensor_clk_src",
1535 .flags
= CLK_SET_RATE_PARENT
,
1536 .ops
= &clk_branch2_ops
,
1541 static struct clk_branch gcc_mss_axis2_clk
= {
1542 .halt_reg
= 0x8a008,
1543 .halt_check
= BRANCH_HALT
,
1545 .enable_reg
= 0x8a008,
1546 .enable_mask
= BIT(0),
1547 .hw
.init
= &(struct clk_init_data
){
1548 .name
= "gcc_mss_axis2_clk",
1549 .ops
= &clk_branch2_ops
,
1554 static struct clk_branch gcc_mss_cfg_ahb_clk
= {
1555 .halt_reg
= 0x8a000,
1556 .halt_check
= BRANCH_HALT
,
1557 .hwcg_reg
= 0x8a000,
1560 .enable_reg
= 0x8a000,
1561 .enable_mask
= BIT(0),
1562 .hw
.init
= &(struct clk_init_data
){
1563 .name
= "gcc_mss_cfg_ahb_clk",
1564 .ops
= &clk_branch2_ops
,
1569 static struct clk_branch gcc_mss_gpll0_div_clk_src
= {
1570 .halt_check
= BRANCH_HALT_DELAY
,
1572 .enable_reg
= 0x52004,
1573 .enable_mask
= BIT(17),
1574 .hw
.init
= &(struct clk_init_data
){
1575 .name
= "gcc_mss_gpll0_div_clk_src",
1576 .ops
= &clk_branch2_ops
,
1581 static struct clk_branch gcc_mss_mfab_axis_clk
= {
1582 .halt_reg
= 0x8a004,
1583 .halt_check
= BRANCH_VOTED
,
1584 .hwcg_reg
= 0x8a004,
1587 .enable_reg
= 0x8a004,
1588 .enable_mask
= BIT(0),
1589 .hw
.init
= &(struct clk_init_data
){
1590 .name
= "gcc_mss_mfab_axis_clk",
1591 .ops
= &clk_branch2_ops
,
1596 static struct clk_branch gcc_mss_q6_memnoc_axi_clk
= {
1597 .halt_reg
= 0x8a154,
1598 .halt_check
= BRANCH_VOTED
,
1600 .enable_reg
= 0x8a154,
1601 .enable_mask
= BIT(0),
1602 .hw
.init
= &(struct clk_init_data
){
1603 .name
= "gcc_mss_q6_memnoc_axi_clk",
1604 .ops
= &clk_branch2_ops
,
1609 static struct clk_branch gcc_mss_snoc_axi_clk
= {
1610 .halt_reg
= 0x8a150,
1611 .halt_check
= BRANCH_HALT
,
1613 .enable_reg
= 0x8a150,
1614 .enable_mask
= BIT(0),
1615 .hw
.init
= &(struct clk_init_data
){
1616 .name
= "gcc_mss_snoc_axi_clk",
1617 .ops
= &clk_branch2_ops
,
1622 static struct clk_branch gcc_mss_vs_clk
= {
1623 .halt_reg
= 0x7a048,
1624 .halt_check
= BRANCH_HALT
,
1626 .enable_reg
= 0x7a048,
1627 .enable_mask
= BIT(0),
1628 .hw
.init
= &(struct clk_init_data
){
1629 .name
= "gcc_mss_vs_clk",
1630 .parent_names
= (const char *[]){
1631 "gcc_vsensor_clk_src",
1634 .flags
= CLK_SET_RATE_PARENT
,
1635 .ops
= &clk_branch2_ops
,
1640 static struct clk_branch gcc_pcie_0_aux_clk
= {
1641 .halt_reg
= 0x6b01c,
1642 .halt_check
= BRANCH_HALT_VOTED
,
1644 .enable_reg
= 0x5200c,
1645 .enable_mask
= BIT(3),
1646 .hw
.init
= &(struct clk_init_data
){
1647 .name
= "gcc_pcie_0_aux_clk",
1648 .parent_names
= (const char *[]){
1649 "gcc_pcie_0_aux_clk_src",
1652 .flags
= CLK_SET_RATE_PARENT
,
1653 .ops
= &clk_branch2_ops
,
1658 static struct clk_branch gcc_pcie_0_cfg_ahb_clk
= {
1659 .halt_reg
= 0x6b018,
1660 .halt_check
= BRANCH_HALT_VOTED
,
1661 .hwcg_reg
= 0x6b018,
1664 .enable_reg
= 0x5200c,
1665 .enable_mask
= BIT(2),
1666 .hw
.init
= &(struct clk_init_data
){
1667 .name
= "gcc_pcie_0_cfg_ahb_clk",
1668 .ops
= &clk_branch2_ops
,
1673 static struct clk_branch gcc_pcie_0_clkref_clk
= {
1674 .halt_reg
= 0x8c00c,
1675 .halt_check
= BRANCH_HALT
,
1677 .enable_reg
= 0x8c00c,
1678 .enable_mask
= BIT(0),
1679 .hw
.init
= &(struct clk_init_data
){
1680 .name
= "gcc_pcie_0_clkref_clk",
1681 .ops
= &clk_branch2_ops
,
1686 static struct clk_branch gcc_pcie_0_mstr_axi_clk
= {
1687 .halt_reg
= 0x6b014,
1688 .halt_check
= BRANCH_HALT_VOTED
,
1690 .enable_reg
= 0x5200c,
1691 .enable_mask
= BIT(1),
1692 .hw
.init
= &(struct clk_init_data
){
1693 .name
= "gcc_pcie_0_mstr_axi_clk",
1694 .ops
= &clk_branch2_ops
,
1699 static struct clk_branch gcc_pcie_0_pipe_clk
= {
1700 .halt_check
= BRANCH_HALT_SKIP
,
1702 .enable_reg
= 0x5200c,
1703 .enable_mask
= BIT(4),
1704 .hw
.init
= &(struct clk_init_data
){
1705 .name
= "gcc_pcie_0_pipe_clk",
1706 .parent_names
= (const char *[]){ "pcie_0_pipe_clk" },
1708 .flags
= CLK_SET_RATE_PARENT
,
1709 .ops
= &clk_branch2_ops
,
1714 static struct clk_branch gcc_pcie_0_slv_axi_clk
= {
1715 .halt_reg
= 0x6b010,
1716 .halt_check
= BRANCH_HALT_VOTED
,
1717 .hwcg_reg
= 0x6b010,
1720 .enable_reg
= 0x5200c,
1721 .enable_mask
= BIT(0),
1722 .hw
.init
= &(struct clk_init_data
){
1723 .name
= "gcc_pcie_0_slv_axi_clk",
1724 .ops
= &clk_branch2_ops
,
1729 static struct clk_branch gcc_pcie_0_slv_q2a_axi_clk
= {
1730 .halt_reg
= 0x6b00c,
1731 .halt_check
= BRANCH_HALT_VOTED
,
1733 .enable_reg
= 0x5200c,
1734 .enable_mask
= BIT(5),
1735 .hw
.init
= &(struct clk_init_data
){
1736 .name
= "gcc_pcie_0_slv_q2a_axi_clk",
1737 .ops
= &clk_branch2_ops
,
1742 static struct clk_branch gcc_pcie_1_aux_clk
= {
1743 .halt_reg
= 0x8d01c,
1744 .halt_check
= BRANCH_HALT_VOTED
,
1746 .enable_reg
= 0x52004,
1747 .enable_mask
= BIT(29),
1748 .hw
.init
= &(struct clk_init_data
){
1749 .name
= "gcc_pcie_1_aux_clk",
1750 .parent_names
= (const char *[]){
1751 "gcc_pcie_1_aux_clk_src",
1754 .flags
= CLK_SET_RATE_PARENT
,
1755 .ops
= &clk_branch2_ops
,
1760 static struct clk_branch gcc_pcie_1_cfg_ahb_clk
= {
1761 .halt_reg
= 0x8d018,
1762 .halt_check
= BRANCH_HALT_VOTED
,
1763 .hwcg_reg
= 0x8d018,
1766 .enable_reg
= 0x52004,
1767 .enable_mask
= BIT(28),
1768 .hw
.init
= &(struct clk_init_data
){
1769 .name
= "gcc_pcie_1_cfg_ahb_clk",
1770 .ops
= &clk_branch2_ops
,
1775 static struct clk_branch gcc_pcie_1_clkref_clk
= {
1776 .halt_reg
= 0x8c02c,
1777 .halt_check
= BRANCH_HALT
,
1779 .enable_reg
= 0x8c02c,
1780 .enable_mask
= BIT(0),
1781 .hw
.init
= &(struct clk_init_data
){
1782 .name
= "gcc_pcie_1_clkref_clk",
1783 .ops
= &clk_branch2_ops
,
1788 static struct clk_branch gcc_pcie_1_mstr_axi_clk
= {
1789 .halt_reg
= 0x8d014,
1790 .halt_check
= BRANCH_HALT_VOTED
,
1792 .enable_reg
= 0x52004,
1793 .enable_mask
= BIT(27),
1794 .hw
.init
= &(struct clk_init_data
){
1795 .name
= "gcc_pcie_1_mstr_axi_clk",
1796 .ops
= &clk_branch2_ops
,
1801 static struct clk_branch gcc_pcie_1_pipe_clk
= {
1802 .halt_check
= BRANCH_HALT_SKIP
,
1804 .enable_reg
= 0x52004,
1805 .enable_mask
= BIT(30),
1806 .hw
.init
= &(struct clk_init_data
){
1807 .name
= "gcc_pcie_1_pipe_clk",
1808 .parent_names
= (const char *[]){ "pcie_1_pipe_clk" },
1810 .ops
= &clk_branch2_ops
,
1815 static struct clk_branch gcc_pcie_1_slv_axi_clk
= {
1816 .halt_reg
= 0x8d010,
1817 .halt_check
= BRANCH_HALT_VOTED
,
1818 .hwcg_reg
= 0x8d010,
1821 .enable_reg
= 0x52004,
1822 .enable_mask
= BIT(26),
1823 .hw
.init
= &(struct clk_init_data
){
1824 .name
= "gcc_pcie_1_slv_axi_clk",
1825 .ops
= &clk_branch2_ops
,
1830 static struct clk_branch gcc_pcie_1_slv_q2a_axi_clk
= {
1831 .halt_reg
= 0x8d00c,
1832 .halt_check
= BRANCH_HALT_VOTED
,
1834 .enable_reg
= 0x52004,
1835 .enable_mask
= BIT(25),
1836 .hw
.init
= &(struct clk_init_data
){
1837 .name
= "gcc_pcie_1_slv_q2a_axi_clk",
1838 .ops
= &clk_branch2_ops
,
1843 static struct clk_branch gcc_pcie_phy_aux_clk
= {
1844 .halt_reg
= 0x6f004,
1845 .halt_check
= BRANCH_HALT
,
1847 .enable_reg
= 0x6f004,
1848 .enable_mask
= BIT(0),
1849 .hw
.init
= &(struct clk_init_data
){
1850 .name
= "gcc_pcie_phy_aux_clk",
1851 .parent_names
= (const char *[]){
1852 "gcc_pcie_0_aux_clk_src",
1855 .flags
= CLK_SET_RATE_PARENT
,
1856 .ops
= &clk_branch2_ops
,
1861 static struct clk_branch gcc_pcie_phy_refgen_clk
= {
1862 .halt_reg
= 0x6f02c,
1863 .halt_check
= BRANCH_HALT
,
1865 .enable_reg
= 0x6f02c,
1866 .enable_mask
= BIT(0),
1867 .hw
.init
= &(struct clk_init_data
){
1868 .name
= "gcc_pcie_phy_refgen_clk",
1869 .parent_names
= (const char *[]){
1870 "gcc_pcie_phy_refgen_clk_src",
1873 .flags
= CLK_SET_RATE_PARENT
,
1874 .ops
= &clk_branch2_ops
,
1879 static struct clk_branch gcc_pdm2_clk
= {
1880 .halt_reg
= 0x3300c,
1881 .halt_check
= BRANCH_HALT
,
1883 .enable_reg
= 0x3300c,
1884 .enable_mask
= BIT(0),
1885 .hw
.init
= &(struct clk_init_data
){
1886 .name
= "gcc_pdm2_clk",
1887 .parent_names
= (const char *[]){
1891 .flags
= CLK_SET_RATE_PARENT
,
1892 .ops
= &clk_branch2_ops
,
1897 static struct clk_branch gcc_pdm_ahb_clk
= {
1898 .halt_reg
= 0x33004,
1899 .halt_check
= BRANCH_HALT
,
1900 .hwcg_reg
= 0x33004,
1903 .enable_reg
= 0x33004,
1904 .enable_mask
= BIT(0),
1905 .hw
.init
= &(struct clk_init_data
){
1906 .name
= "gcc_pdm_ahb_clk",
1907 .ops
= &clk_branch2_ops
,
1912 static struct clk_branch gcc_pdm_xo4_clk
= {
1913 .halt_reg
= 0x33008,
1914 .halt_check
= BRANCH_HALT
,
1916 .enable_reg
= 0x33008,
1917 .enable_mask
= BIT(0),
1918 .hw
.init
= &(struct clk_init_data
){
1919 .name
= "gcc_pdm_xo4_clk",
1920 .ops
= &clk_branch2_ops
,
1925 static struct clk_branch gcc_prng_ahb_clk
= {
1926 .halt_reg
= 0x34004,
1927 .halt_check
= BRANCH_HALT_VOTED
,
1928 .hwcg_reg
= 0x34004,
1931 .enable_reg
= 0x52004,
1932 .enable_mask
= BIT(13),
1933 .hw
.init
= &(struct clk_init_data
){
1934 .name
= "gcc_prng_ahb_clk",
1935 .ops
= &clk_branch2_ops
,
1940 static struct clk_branch gcc_qmip_camera_ahb_clk
= {
1942 .halt_check
= BRANCH_HALT
,
1946 .enable_reg
= 0xb014,
1947 .enable_mask
= BIT(0),
1948 .hw
.init
= &(struct clk_init_data
){
1949 .name
= "gcc_qmip_camera_ahb_clk",
1950 .ops
= &clk_branch2_ops
,
1955 static struct clk_branch gcc_qmip_disp_ahb_clk
= {
1957 .halt_check
= BRANCH_HALT
,
1961 .enable_reg
= 0xb018,
1962 .enable_mask
= BIT(0),
1963 .hw
.init
= &(struct clk_init_data
){
1964 .name
= "gcc_qmip_disp_ahb_clk",
1965 .ops
= &clk_branch2_ops
,
1970 static struct clk_branch gcc_qmip_video_ahb_clk
= {
1972 .halt_check
= BRANCH_HALT
,
1976 .enable_reg
= 0xb010,
1977 .enable_mask
= BIT(0),
1978 .hw
.init
= &(struct clk_init_data
){
1979 .name
= "gcc_qmip_video_ahb_clk",
1980 .ops
= &clk_branch2_ops
,
1985 static struct clk_branch gcc_qspi_cnoc_periph_ahb_clk
= {
1986 .halt_reg
= 0x4b000,
1987 .halt_check
= BRANCH_HALT
,
1989 .enable_reg
= 0x4b000,
1990 .enable_mask
= BIT(0),
1991 .hw
.init
= &(struct clk_init_data
){
1992 .name
= "gcc_qspi_cnoc_periph_ahb_clk",
1993 .ops
= &clk_branch2_ops
,
1998 static struct clk_branch gcc_qspi_core_clk
= {
1999 .halt_reg
= 0x4b004,
2000 .halt_check
= BRANCH_HALT
,
2002 .enable_reg
= 0x4b004,
2003 .enable_mask
= BIT(0),
2004 .hw
.init
= &(struct clk_init_data
){
2005 .name
= "gcc_qspi_core_clk",
2006 .parent_names
= (const char *[]){
2007 "gcc_qspi_core_clk_src",
2010 .flags
= CLK_SET_RATE_PARENT
,
2011 .ops
= &clk_branch2_ops
,
2016 static struct clk_branch gcc_qupv3_wrap0_s0_clk
= {
2017 .halt_reg
= 0x17030,
2018 .halt_check
= BRANCH_HALT_VOTED
,
2020 .enable_reg
= 0x5200c,
2021 .enable_mask
= BIT(10),
2022 .hw
.init
= &(struct clk_init_data
){
2023 .name
= "gcc_qupv3_wrap0_s0_clk",
2024 .parent_names
= (const char *[]){
2025 "gcc_qupv3_wrap0_s0_clk_src",
2028 .flags
= CLK_SET_RATE_PARENT
,
2029 .ops
= &clk_branch2_ops
,
2034 static struct clk_branch gcc_qupv3_wrap0_s1_clk
= {
2035 .halt_reg
= 0x17160,
2036 .halt_check
= BRANCH_HALT_VOTED
,
2038 .enable_reg
= 0x5200c,
2039 .enable_mask
= BIT(11),
2040 .hw
.init
= &(struct clk_init_data
){
2041 .name
= "gcc_qupv3_wrap0_s1_clk",
2042 .parent_names
= (const char *[]){
2043 "gcc_qupv3_wrap0_s1_clk_src",
2046 .flags
= CLK_SET_RATE_PARENT
,
2047 .ops
= &clk_branch2_ops
,
2052 static struct clk_branch gcc_qupv3_wrap0_s2_clk
= {
2053 .halt_reg
= 0x17290,
2054 .halt_check
= BRANCH_HALT_VOTED
,
2056 .enable_reg
= 0x5200c,
2057 .enable_mask
= BIT(12),
2058 .hw
.init
= &(struct clk_init_data
){
2059 .name
= "gcc_qupv3_wrap0_s2_clk",
2060 .parent_names
= (const char *[]){
2061 "gcc_qupv3_wrap0_s2_clk_src",
2064 .flags
= CLK_SET_RATE_PARENT
,
2065 .ops
= &clk_branch2_ops
,
2070 static struct clk_branch gcc_qupv3_wrap0_s3_clk
= {
2071 .halt_reg
= 0x173c0,
2072 .halt_check
= BRANCH_HALT_VOTED
,
2074 .enable_reg
= 0x5200c,
2075 .enable_mask
= BIT(13),
2076 .hw
.init
= &(struct clk_init_data
){
2077 .name
= "gcc_qupv3_wrap0_s3_clk",
2078 .parent_names
= (const char *[]){
2079 "gcc_qupv3_wrap0_s3_clk_src",
2082 .flags
= CLK_SET_RATE_PARENT
,
2083 .ops
= &clk_branch2_ops
,
2088 static struct clk_branch gcc_qupv3_wrap0_s4_clk
= {
2089 .halt_reg
= 0x174f0,
2090 .halt_check
= BRANCH_HALT_VOTED
,
2092 .enable_reg
= 0x5200c,
2093 .enable_mask
= BIT(14),
2094 .hw
.init
= &(struct clk_init_data
){
2095 .name
= "gcc_qupv3_wrap0_s4_clk",
2096 .parent_names
= (const char *[]){
2097 "gcc_qupv3_wrap0_s4_clk_src",
2100 .flags
= CLK_SET_RATE_PARENT
,
2101 .ops
= &clk_branch2_ops
,
2106 static struct clk_branch gcc_qupv3_wrap0_s5_clk
= {
2107 .halt_reg
= 0x17620,
2108 .halt_check
= BRANCH_HALT_VOTED
,
2110 .enable_reg
= 0x5200c,
2111 .enable_mask
= BIT(15),
2112 .hw
.init
= &(struct clk_init_data
){
2113 .name
= "gcc_qupv3_wrap0_s5_clk",
2114 .parent_names
= (const char *[]){
2115 "gcc_qupv3_wrap0_s5_clk_src",
2118 .flags
= CLK_SET_RATE_PARENT
,
2119 .ops
= &clk_branch2_ops
,
2124 static struct clk_branch gcc_qupv3_wrap0_s6_clk
= {
2125 .halt_reg
= 0x17750,
2126 .halt_check
= BRANCH_HALT_VOTED
,
2128 .enable_reg
= 0x5200c,
2129 .enable_mask
= BIT(16),
2130 .hw
.init
= &(struct clk_init_data
){
2131 .name
= "gcc_qupv3_wrap0_s6_clk",
2132 .parent_names
= (const char *[]){
2133 "gcc_qupv3_wrap0_s6_clk_src",
2136 .flags
= CLK_SET_RATE_PARENT
,
2137 .ops
= &clk_branch2_ops
,
2142 static struct clk_branch gcc_qupv3_wrap0_s7_clk
= {
2143 .halt_reg
= 0x17880,
2144 .halt_check
= BRANCH_HALT_VOTED
,
2146 .enable_reg
= 0x5200c,
2147 .enable_mask
= BIT(17),
2148 .hw
.init
= &(struct clk_init_data
){
2149 .name
= "gcc_qupv3_wrap0_s7_clk",
2150 .parent_names
= (const char *[]){
2151 "gcc_qupv3_wrap0_s7_clk_src",
2154 .flags
= CLK_SET_RATE_PARENT
,
2155 .ops
= &clk_branch2_ops
,
2160 static struct clk_branch gcc_qupv3_wrap1_s0_clk
= {
2161 .halt_reg
= 0x18014,
2162 .halt_check
= BRANCH_HALT_VOTED
,
2164 .enable_reg
= 0x5200c,
2165 .enable_mask
= BIT(22),
2166 .hw
.init
= &(struct clk_init_data
){
2167 .name
= "gcc_qupv3_wrap1_s0_clk",
2168 .parent_names
= (const char *[]){
2169 "gcc_qupv3_wrap1_s0_clk_src",
2172 .flags
= CLK_SET_RATE_PARENT
,
2173 .ops
= &clk_branch2_ops
,
2178 static struct clk_branch gcc_qupv3_wrap1_s1_clk
= {
2179 .halt_reg
= 0x18144,
2180 .halt_check
= BRANCH_HALT_VOTED
,
2182 .enable_reg
= 0x5200c,
2183 .enable_mask
= BIT(23),
2184 .hw
.init
= &(struct clk_init_data
){
2185 .name
= "gcc_qupv3_wrap1_s1_clk",
2186 .parent_names
= (const char *[]){
2187 "gcc_qupv3_wrap1_s1_clk_src",
2190 .flags
= CLK_SET_RATE_PARENT
,
2191 .ops
= &clk_branch2_ops
,
2196 static struct clk_branch gcc_qupv3_wrap1_s2_clk
= {
2197 .halt_reg
= 0x18274,
2198 .halt_check
= BRANCH_HALT_VOTED
,
2200 .enable_reg
= 0x5200c,
2201 .enable_mask
= BIT(24),
2202 .hw
.init
= &(struct clk_init_data
){
2203 .name
= "gcc_qupv3_wrap1_s2_clk",
2204 .parent_names
= (const char *[]){
2205 "gcc_qupv3_wrap1_s2_clk_src",
2208 .flags
= CLK_SET_RATE_PARENT
,
2209 .ops
= &clk_branch2_ops
,
2214 static struct clk_branch gcc_qupv3_wrap1_s3_clk
= {
2215 .halt_reg
= 0x183a4,
2216 .halt_check
= BRANCH_HALT_VOTED
,
2218 .enable_reg
= 0x5200c,
2219 .enable_mask
= BIT(25),
2220 .hw
.init
= &(struct clk_init_data
){
2221 .name
= "gcc_qupv3_wrap1_s3_clk",
2222 .parent_names
= (const char *[]){
2223 "gcc_qupv3_wrap1_s3_clk_src",
2226 .flags
= CLK_SET_RATE_PARENT
,
2227 .ops
= &clk_branch2_ops
,
2232 static struct clk_branch gcc_qupv3_wrap1_s4_clk
= {
2233 .halt_reg
= 0x184d4,
2234 .halt_check
= BRANCH_HALT_VOTED
,
2236 .enable_reg
= 0x5200c,
2237 .enable_mask
= BIT(26),
2238 .hw
.init
= &(struct clk_init_data
){
2239 .name
= "gcc_qupv3_wrap1_s4_clk",
2240 .parent_names
= (const char *[]){
2241 "gcc_qupv3_wrap1_s4_clk_src",
2244 .flags
= CLK_SET_RATE_PARENT
,
2245 .ops
= &clk_branch2_ops
,
2250 static struct clk_branch gcc_qupv3_wrap1_s5_clk
= {
2251 .halt_reg
= 0x18604,
2252 .halt_check
= BRANCH_HALT_VOTED
,
2254 .enable_reg
= 0x5200c,
2255 .enable_mask
= BIT(27),
2256 .hw
.init
= &(struct clk_init_data
){
2257 .name
= "gcc_qupv3_wrap1_s5_clk",
2258 .parent_names
= (const char *[]){
2259 "gcc_qupv3_wrap1_s5_clk_src",
2262 .flags
= CLK_SET_RATE_PARENT
,
2263 .ops
= &clk_branch2_ops
,
2268 static struct clk_branch gcc_qupv3_wrap1_s6_clk
= {
2269 .halt_reg
= 0x18734,
2270 .halt_check
= BRANCH_HALT_VOTED
,
2272 .enable_reg
= 0x5200c,
2273 .enable_mask
= BIT(28),
2274 .hw
.init
= &(struct clk_init_data
){
2275 .name
= "gcc_qupv3_wrap1_s6_clk",
2276 .parent_names
= (const char *[]){
2277 "gcc_qupv3_wrap1_s6_clk_src",
2280 .flags
= CLK_SET_RATE_PARENT
,
2281 .ops
= &clk_branch2_ops
,
2286 static struct clk_branch gcc_qupv3_wrap1_s7_clk
= {
2287 .halt_reg
= 0x18864,
2288 .halt_check
= BRANCH_HALT_VOTED
,
2290 .enable_reg
= 0x5200c,
2291 .enable_mask
= BIT(29),
2292 .hw
.init
= &(struct clk_init_data
){
2293 .name
= "gcc_qupv3_wrap1_s7_clk",
2294 .parent_names
= (const char *[]){
2295 "gcc_qupv3_wrap1_s7_clk_src",
2298 .flags
= CLK_SET_RATE_PARENT
,
2299 .ops
= &clk_branch2_ops
,
2304 static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk
= {
2305 .halt_reg
= 0x17004,
2306 .halt_check
= BRANCH_HALT_VOTED
,
2308 .enable_reg
= 0x5200c,
2309 .enable_mask
= BIT(6),
2310 .hw
.init
= &(struct clk_init_data
){
2311 .name
= "gcc_qupv3_wrap_0_m_ahb_clk",
2312 .ops
= &clk_branch2_ops
,
2317 static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk
= {
2318 .halt_reg
= 0x17008,
2319 .halt_check
= BRANCH_HALT_VOTED
,
2320 .hwcg_reg
= 0x17008,
2323 .enable_reg
= 0x5200c,
2324 .enable_mask
= BIT(7),
2325 .hw
.init
= &(struct clk_init_data
){
2326 .name
= "gcc_qupv3_wrap_0_s_ahb_clk",
2327 .ops
= &clk_branch2_ops
,
2332 static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk
= {
2333 .halt_reg
= 0x1800c,
2334 .halt_check
= BRANCH_HALT_VOTED
,
2336 .enable_reg
= 0x5200c,
2337 .enable_mask
= BIT(20),
2338 .hw
.init
= &(struct clk_init_data
){
2339 .name
= "gcc_qupv3_wrap_1_m_ahb_clk",
2340 .ops
= &clk_branch2_ops
,
2345 static struct clk_branch gcc_qupv3_wrap_1_s_ahb_clk
= {
2346 .halt_reg
= 0x18010,
2347 .halt_check
= BRANCH_HALT_VOTED
,
2348 .hwcg_reg
= 0x18010,
2351 .enable_reg
= 0x5200c,
2352 .enable_mask
= BIT(21),
2353 .hw
.init
= &(struct clk_init_data
){
2354 .name
= "gcc_qupv3_wrap_1_s_ahb_clk",
2355 .ops
= &clk_branch2_ops
,
2360 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2361 .halt_reg
= 0x14008,
2362 .halt_check
= BRANCH_HALT
,
2364 .enable_reg
= 0x14008,
2365 .enable_mask
= BIT(0),
2366 .hw
.init
= &(struct clk_init_data
){
2367 .name
= "gcc_sdcc2_ahb_clk",
2368 .ops
= &clk_branch2_ops
,
2373 static struct clk_branch gcc_sdcc2_apps_clk
= {
2374 .halt_reg
= 0x14004,
2375 .halt_check
= BRANCH_HALT
,
2377 .enable_reg
= 0x14004,
2378 .enable_mask
= BIT(0),
2379 .hw
.init
= &(struct clk_init_data
){
2380 .name
= "gcc_sdcc2_apps_clk",
2381 .parent_names
= (const char *[]){
2382 "gcc_sdcc2_apps_clk_src",
2385 .flags
= CLK_SET_RATE_PARENT
,
2386 .ops
= &clk_branch2_ops
,
2391 static struct clk_branch gcc_sdcc4_ahb_clk
= {
2392 .halt_reg
= 0x16008,
2393 .halt_check
= BRANCH_HALT
,
2395 .enable_reg
= 0x16008,
2396 .enable_mask
= BIT(0),
2397 .hw
.init
= &(struct clk_init_data
){
2398 .name
= "gcc_sdcc4_ahb_clk",
2399 .ops
= &clk_branch2_ops
,
2404 static struct clk_branch gcc_sdcc4_apps_clk
= {
2405 .halt_reg
= 0x16004,
2406 .halt_check
= BRANCH_HALT
,
2408 .enable_reg
= 0x16004,
2409 .enable_mask
= BIT(0),
2410 .hw
.init
= &(struct clk_init_data
){
2411 .name
= "gcc_sdcc4_apps_clk",
2412 .parent_names
= (const char *[]){
2413 "gcc_sdcc4_apps_clk_src",
2416 .flags
= CLK_SET_RATE_PARENT
,
2417 .ops
= &clk_branch2_ops
,
2422 static struct clk_branch gcc_sys_noc_cpuss_ahb_clk
= {
2424 .halt_check
= BRANCH_HALT_VOTED
,
2426 .enable_reg
= 0x52004,
2427 .enable_mask
= BIT(0),
2428 .hw
.init
= &(struct clk_init_data
){
2429 .name
= "gcc_sys_noc_cpuss_ahb_clk",
2430 .parent_names
= (const char *[]){
2431 "gcc_cpuss_ahb_clk_src",
2434 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
2435 .ops
= &clk_branch2_ops
,
2440 static struct clk_branch gcc_tsif_ahb_clk
= {
2441 .halt_reg
= 0x36004,
2442 .halt_check
= BRANCH_HALT
,
2444 .enable_reg
= 0x36004,
2445 .enable_mask
= BIT(0),
2446 .hw
.init
= &(struct clk_init_data
){
2447 .name
= "gcc_tsif_ahb_clk",
2448 .ops
= &clk_branch2_ops
,
2453 static struct clk_branch gcc_tsif_inactivity_timers_clk
= {
2454 .halt_reg
= 0x3600c,
2455 .halt_check
= BRANCH_HALT
,
2457 .enable_reg
= 0x3600c,
2458 .enable_mask
= BIT(0),
2459 .hw
.init
= &(struct clk_init_data
){
2460 .name
= "gcc_tsif_inactivity_timers_clk",
2461 .ops
= &clk_branch2_ops
,
2466 static struct clk_branch gcc_tsif_ref_clk
= {
2467 .halt_reg
= 0x36008,
2468 .halt_check
= BRANCH_HALT
,
2470 .enable_reg
= 0x36008,
2471 .enable_mask
= BIT(0),
2472 .hw
.init
= &(struct clk_init_data
){
2473 .name
= "gcc_tsif_ref_clk",
2474 .parent_names
= (const char *[]){
2475 "gcc_tsif_ref_clk_src",
2478 .flags
= CLK_SET_RATE_PARENT
,
2479 .ops
= &clk_branch2_ops
,
2484 static struct clk_branch gcc_ufs_card_ahb_clk
= {
2485 .halt_reg
= 0x75010,
2486 .halt_check
= BRANCH_HALT
,
2487 .hwcg_reg
= 0x75010,
2490 .enable_reg
= 0x75010,
2491 .enable_mask
= BIT(0),
2492 .hw
.init
= &(struct clk_init_data
){
2493 .name
= "gcc_ufs_card_ahb_clk",
2494 .ops
= &clk_branch2_ops
,
2499 static struct clk_branch gcc_ufs_card_axi_clk
= {
2500 .halt_reg
= 0x7500c,
2501 .halt_check
= BRANCH_HALT
,
2502 .hwcg_reg
= 0x7500c,
2505 .enable_reg
= 0x7500c,
2506 .enable_mask
= BIT(0),
2507 .hw
.init
= &(struct clk_init_data
){
2508 .name
= "gcc_ufs_card_axi_clk",
2509 .parent_names
= (const char *[]){
2510 "gcc_ufs_card_axi_clk_src",
2513 .flags
= CLK_SET_RATE_PARENT
,
2514 .ops
= &clk_branch2_ops
,
2519 static struct clk_branch gcc_ufs_card_clkref_clk
= {
2520 .halt_reg
= 0x8c004,
2521 .halt_check
= BRANCH_HALT
,
2523 .enable_reg
= 0x8c004,
2524 .enable_mask
= BIT(0),
2525 .hw
.init
= &(struct clk_init_data
){
2526 .name
= "gcc_ufs_card_clkref_clk",
2527 .ops
= &clk_branch2_ops
,
2532 static struct clk_branch gcc_ufs_card_ice_core_clk
= {
2533 .halt_reg
= 0x75058,
2534 .halt_check
= BRANCH_HALT
,
2535 .hwcg_reg
= 0x75058,
2538 .enable_reg
= 0x75058,
2539 .enable_mask
= BIT(0),
2540 .hw
.init
= &(struct clk_init_data
){
2541 .name
= "gcc_ufs_card_ice_core_clk",
2542 .parent_names
= (const char *[]){
2543 "gcc_ufs_card_ice_core_clk_src",
2546 .flags
= CLK_SET_RATE_PARENT
,
2547 .ops
= &clk_branch2_ops
,
2552 static struct clk_branch gcc_ufs_card_phy_aux_clk
= {
2553 .halt_reg
= 0x7508c,
2554 .halt_check
= BRANCH_HALT
,
2555 .hwcg_reg
= 0x7508c,
2558 .enable_reg
= 0x7508c,
2559 .enable_mask
= BIT(0),
2560 .hw
.init
= &(struct clk_init_data
){
2561 .name
= "gcc_ufs_card_phy_aux_clk",
2562 .parent_names
= (const char *[]){
2563 "gcc_ufs_card_phy_aux_clk_src",
2566 .flags
= CLK_SET_RATE_PARENT
,
2567 .ops
= &clk_branch2_ops
,
2572 static struct clk_branch gcc_ufs_card_rx_symbol_0_clk
= {
2573 .halt_check
= BRANCH_HALT_SKIP
,
2575 .enable_reg
= 0x75018,
2576 .enable_mask
= BIT(0),
2577 .hw
.init
= &(struct clk_init_data
){
2578 .name
= "gcc_ufs_card_rx_symbol_0_clk",
2579 .ops
= &clk_branch2_ops
,
2584 static struct clk_branch gcc_ufs_card_rx_symbol_1_clk
= {
2585 .halt_check
= BRANCH_HALT_SKIP
,
2587 .enable_reg
= 0x750a8,
2588 .enable_mask
= BIT(0),
2589 .hw
.init
= &(struct clk_init_data
){
2590 .name
= "gcc_ufs_card_rx_symbol_1_clk",
2591 .ops
= &clk_branch2_ops
,
2596 static struct clk_branch gcc_ufs_card_tx_symbol_0_clk
= {
2597 .halt_check
= BRANCH_HALT_SKIP
,
2599 .enable_reg
= 0x75014,
2600 .enable_mask
= BIT(0),
2601 .hw
.init
= &(struct clk_init_data
){
2602 .name
= "gcc_ufs_card_tx_symbol_0_clk",
2603 .ops
= &clk_branch2_ops
,
2608 static struct clk_branch gcc_ufs_card_unipro_core_clk
= {
2609 .halt_reg
= 0x75054,
2610 .halt_check
= BRANCH_HALT
,
2611 .hwcg_reg
= 0x75054,
2614 .enable_reg
= 0x75054,
2615 .enable_mask
= BIT(0),
2616 .hw
.init
= &(struct clk_init_data
){
2617 .name
= "gcc_ufs_card_unipro_core_clk",
2618 .parent_names
= (const char *[]){
2619 "gcc_ufs_card_unipro_core_clk_src",
2622 .flags
= CLK_SET_RATE_PARENT
,
2623 .ops
= &clk_branch2_ops
,
2628 static struct clk_branch gcc_ufs_mem_clkref_clk
= {
2629 .halt_reg
= 0x8c000,
2630 .halt_check
= BRANCH_HALT
,
2632 .enable_reg
= 0x8c000,
2633 .enable_mask
= BIT(0),
2634 .hw
.init
= &(struct clk_init_data
){
2635 .name
= "gcc_ufs_mem_clkref_clk",
2636 .ops
= &clk_branch2_ops
,
2641 static struct clk_branch gcc_ufs_phy_ahb_clk
= {
2642 .halt_reg
= 0x77010,
2643 .halt_check
= BRANCH_HALT
,
2644 .hwcg_reg
= 0x77010,
2647 .enable_reg
= 0x77010,
2648 .enable_mask
= BIT(0),
2649 .hw
.init
= &(struct clk_init_data
){
2650 .name
= "gcc_ufs_phy_ahb_clk",
2651 .ops
= &clk_branch2_ops
,
2656 static struct clk_branch gcc_ufs_phy_axi_clk
= {
2657 .halt_reg
= 0x7700c,
2658 .halt_check
= BRANCH_HALT
,
2659 .hwcg_reg
= 0x7700c,
2662 .enable_reg
= 0x7700c,
2663 .enable_mask
= BIT(0),
2664 .hw
.init
= &(struct clk_init_data
){
2665 .name
= "gcc_ufs_phy_axi_clk",
2666 .parent_names
= (const char *[]){
2667 "gcc_ufs_phy_axi_clk_src",
2670 .flags
= CLK_SET_RATE_PARENT
,
2671 .ops
= &clk_branch2_ops
,
2676 static struct clk_branch gcc_ufs_phy_ice_core_clk
= {
2677 .halt_reg
= 0x77058,
2678 .halt_check
= BRANCH_HALT
,
2679 .hwcg_reg
= 0x77058,
2682 .enable_reg
= 0x77058,
2683 .enable_mask
= BIT(0),
2684 .hw
.init
= &(struct clk_init_data
){
2685 .name
= "gcc_ufs_phy_ice_core_clk",
2686 .parent_names
= (const char *[]){
2687 "gcc_ufs_phy_ice_core_clk_src",
2690 .flags
= CLK_SET_RATE_PARENT
,
2691 .ops
= &clk_branch2_ops
,
2696 static struct clk_branch gcc_ufs_phy_phy_aux_clk
= {
2697 .halt_reg
= 0x7708c,
2698 .halt_check
= BRANCH_HALT
,
2699 .hwcg_reg
= 0x7708c,
2702 .enable_reg
= 0x7708c,
2703 .enable_mask
= BIT(0),
2704 .hw
.init
= &(struct clk_init_data
){
2705 .name
= "gcc_ufs_phy_phy_aux_clk",
2706 .parent_names
= (const char *[]){
2707 "gcc_ufs_phy_phy_aux_clk_src",
2710 .flags
= CLK_SET_RATE_PARENT
,
2711 .ops
= &clk_branch2_ops
,
2716 static struct clk_branch gcc_ufs_phy_rx_symbol_0_clk
= {
2717 .halt_check
= BRANCH_HALT_SKIP
,
2719 .enable_reg
= 0x77018,
2720 .enable_mask
= BIT(0),
2721 .hw
.init
= &(struct clk_init_data
){
2722 .name
= "gcc_ufs_phy_rx_symbol_0_clk",
2723 .ops
= &clk_branch2_ops
,
2728 static struct clk_branch gcc_ufs_phy_rx_symbol_1_clk
= {
2729 .halt_check
= BRANCH_HALT_SKIP
,
2731 .enable_reg
= 0x770a8,
2732 .enable_mask
= BIT(0),
2733 .hw
.init
= &(struct clk_init_data
){
2734 .name
= "gcc_ufs_phy_rx_symbol_1_clk",
2735 .ops
= &clk_branch2_ops
,
2740 static struct clk_branch gcc_ufs_phy_tx_symbol_0_clk
= {
2741 .halt_check
= BRANCH_HALT_SKIP
,
2743 .enable_reg
= 0x77014,
2744 .enable_mask
= BIT(0),
2745 .hw
.init
= &(struct clk_init_data
){
2746 .name
= "gcc_ufs_phy_tx_symbol_0_clk",
2747 .ops
= &clk_branch2_ops
,
2752 static struct clk_branch gcc_ufs_phy_unipro_core_clk
= {
2753 .halt_reg
= 0x77054,
2754 .halt_check
= BRANCH_HALT
,
2755 .hwcg_reg
= 0x77054,
2758 .enable_reg
= 0x77054,
2759 .enable_mask
= BIT(0),
2760 .hw
.init
= &(struct clk_init_data
){
2761 .name
= "gcc_ufs_phy_unipro_core_clk",
2762 .parent_names
= (const char *[]){
2763 "gcc_ufs_phy_unipro_core_clk_src",
2766 .flags
= CLK_SET_RATE_PARENT
,
2767 .ops
= &clk_branch2_ops
,
2772 static struct clk_branch gcc_usb30_prim_master_clk
= {
2774 .halt_check
= BRANCH_HALT
,
2776 .enable_reg
= 0xf00c,
2777 .enable_mask
= BIT(0),
2778 .hw
.init
= &(struct clk_init_data
){
2779 .name
= "gcc_usb30_prim_master_clk",
2780 .parent_names
= (const char *[]){
2781 "gcc_usb30_prim_master_clk_src",
2784 .flags
= CLK_SET_RATE_PARENT
,
2785 .ops
= &clk_branch2_ops
,
2790 static struct clk_branch gcc_usb30_prim_mock_utmi_clk
= {
2792 .halt_check
= BRANCH_HALT
,
2794 .enable_reg
= 0xf014,
2795 .enable_mask
= BIT(0),
2796 .hw
.init
= &(struct clk_init_data
){
2797 .name
= "gcc_usb30_prim_mock_utmi_clk",
2798 .parent_names
= (const char *[]){
2799 "gcc_usb30_prim_mock_utmi_clk_src",
2802 .flags
= CLK_SET_RATE_PARENT
,
2803 .ops
= &clk_branch2_ops
,
2808 static struct clk_branch gcc_usb30_prim_sleep_clk
= {
2810 .halt_check
= BRANCH_HALT
,
2812 .enable_reg
= 0xf010,
2813 .enable_mask
= BIT(0),
2814 .hw
.init
= &(struct clk_init_data
){
2815 .name
= "gcc_usb30_prim_sleep_clk",
2816 .ops
= &clk_branch2_ops
,
2821 static struct clk_branch gcc_usb30_sec_master_clk
= {
2822 .halt_reg
= 0x1000c,
2823 .halt_check
= BRANCH_HALT
,
2825 .enable_reg
= 0x1000c,
2826 .enable_mask
= BIT(0),
2827 .hw
.init
= &(struct clk_init_data
){
2828 .name
= "gcc_usb30_sec_master_clk",
2829 .parent_names
= (const char *[]){
2830 "gcc_usb30_sec_master_clk_src",
2833 .flags
= CLK_SET_RATE_PARENT
,
2834 .ops
= &clk_branch2_ops
,
2839 static struct clk_branch gcc_usb30_sec_mock_utmi_clk
= {
2840 .halt_reg
= 0x10014,
2841 .halt_check
= BRANCH_HALT
,
2843 .enable_reg
= 0x10014,
2844 .enable_mask
= BIT(0),
2845 .hw
.init
= &(struct clk_init_data
){
2846 .name
= "gcc_usb30_sec_mock_utmi_clk",
2847 .parent_names
= (const char *[]){
2848 "gcc_usb30_sec_mock_utmi_clk_src",
2851 .flags
= CLK_SET_RATE_PARENT
,
2852 .ops
= &clk_branch2_ops
,
2857 static struct clk_branch gcc_usb30_sec_sleep_clk
= {
2858 .halt_reg
= 0x10010,
2859 .halt_check
= BRANCH_HALT
,
2861 .enable_reg
= 0x10010,
2862 .enable_mask
= BIT(0),
2863 .hw
.init
= &(struct clk_init_data
){
2864 .name
= "gcc_usb30_sec_sleep_clk",
2865 .ops
= &clk_branch2_ops
,
2870 static struct clk_branch gcc_usb3_prim_clkref_clk
= {
2871 .halt_reg
= 0x8c008,
2872 .halt_check
= BRANCH_HALT
,
2874 .enable_reg
= 0x8c008,
2875 .enable_mask
= BIT(0),
2876 .hw
.init
= &(struct clk_init_data
){
2877 .name
= "gcc_usb3_prim_clkref_clk",
2878 .ops
= &clk_branch2_ops
,
2883 static struct clk_branch gcc_usb3_prim_phy_aux_clk
= {
2885 .halt_check
= BRANCH_HALT
,
2887 .enable_reg
= 0xf04c,
2888 .enable_mask
= BIT(0),
2889 .hw
.init
= &(struct clk_init_data
){
2890 .name
= "gcc_usb3_prim_phy_aux_clk",
2891 .parent_names
= (const char *[]){
2892 "gcc_usb3_prim_phy_aux_clk_src",
2895 .flags
= CLK_SET_RATE_PARENT
,
2896 .ops
= &clk_branch2_ops
,
2901 static struct clk_branch gcc_usb3_prim_phy_com_aux_clk
= {
2903 .halt_check
= BRANCH_HALT
,
2905 .enable_reg
= 0xf050,
2906 .enable_mask
= BIT(0),
2907 .hw
.init
= &(struct clk_init_data
){
2908 .name
= "gcc_usb3_prim_phy_com_aux_clk",
2909 .parent_names
= (const char *[]){
2910 "gcc_usb3_prim_phy_aux_clk_src",
2913 .flags
= CLK_SET_RATE_PARENT
,
2914 .ops
= &clk_branch2_ops
,
2919 static struct clk_branch gcc_usb3_prim_phy_pipe_clk
= {
2920 .halt_check
= BRANCH_HALT_SKIP
,
2922 .enable_reg
= 0xf054,
2923 .enable_mask
= BIT(0),
2924 .hw
.init
= &(struct clk_init_data
){
2925 .name
= "gcc_usb3_prim_phy_pipe_clk",
2926 .ops
= &clk_branch2_ops
,
2931 static struct clk_branch gcc_usb3_sec_clkref_clk
= {
2932 .halt_reg
= 0x8c028,
2933 .halt_check
= BRANCH_HALT
,
2935 .enable_reg
= 0x8c028,
2936 .enable_mask
= BIT(0),
2937 .hw
.init
= &(struct clk_init_data
){
2938 .name
= "gcc_usb3_sec_clkref_clk",
2939 .ops
= &clk_branch2_ops
,
2944 static struct clk_branch gcc_usb3_sec_phy_aux_clk
= {
2945 .halt_reg
= 0x1004c,
2946 .halt_check
= BRANCH_HALT
,
2948 .enable_reg
= 0x1004c,
2949 .enable_mask
= BIT(0),
2950 .hw
.init
= &(struct clk_init_data
){
2951 .name
= "gcc_usb3_sec_phy_aux_clk",
2952 .parent_names
= (const char *[]){
2953 "gcc_usb3_sec_phy_aux_clk_src",
2956 .flags
= CLK_SET_RATE_PARENT
,
2957 .ops
= &clk_branch2_ops
,
2962 static struct clk_branch gcc_usb3_sec_phy_com_aux_clk
= {
2963 .halt_reg
= 0x10050,
2964 .halt_check
= BRANCH_HALT
,
2966 .enable_reg
= 0x10050,
2967 .enable_mask
= BIT(0),
2968 .hw
.init
= &(struct clk_init_data
){
2969 .name
= "gcc_usb3_sec_phy_com_aux_clk",
2970 .parent_names
= (const char *[]){
2971 "gcc_usb3_sec_phy_aux_clk_src",
2974 .flags
= CLK_SET_RATE_PARENT
,
2975 .ops
= &clk_branch2_ops
,
2980 static struct clk_branch gcc_usb3_sec_phy_pipe_clk
= {
2981 .halt_check
= BRANCH_HALT_SKIP
,
2983 .enable_reg
= 0x10054,
2984 .enable_mask
= BIT(0),
2985 .hw
.init
= &(struct clk_init_data
){
2986 .name
= "gcc_usb3_sec_phy_pipe_clk",
2987 .ops
= &clk_branch2_ops
,
2992 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk
= {
2993 .halt_reg
= 0x6a004,
2994 .halt_check
= BRANCH_HALT
,
2995 .hwcg_reg
= 0x6a004,
2998 .enable_reg
= 0x6a004,
2999 .enable_mask
= BIT(0),
3000 .hw
.init
= &(struct clk_init_data
){
3001 .name
= "gcc_usb_phy_cfg_ahb2phy_clk",
3002 .ops
= &clk_branch2_ops
,
3007 static struct clk_branch gcc_vdda_vs_clk
= {
3008 .halt_reg
= 0x7a00c,
3009 .halt_check
= BRANCH_HALT
,
3011 .enable_reg
= 0x7a00c,
3012 .enable_mask
= BIT(0),
3013 .hw
.init
= &(struct clk_init_data
){
3014 .name
= "gcc_vdda_vs_clk",
3015 .parent_names
= (const char *[]){
3016 "gcc_vsensor_clk_src",
3019 .flags
= CLK_SET_RATE_PARENT
,
3020 .ops
= &clk_branch2_ops
,
3025 static struct clk_branch gcc_vddcx_vs_clk
= {
3026 .halt_reg
= 0x7a004,
3027 .halt_check
= BRANCH_HALT
,
3029 .enable_reg
= 0x7a004,
3030 .enable_mask
= BIT(0),
3031 .hw
.init
= &(struct clk_init_data
){
3032 .name
= "gcc_vddcx_vs_clk",
3033 .parent_names
= (const char *[]){
3034 "gcc_vsensor_clk_src",
3037 .flags
= CLK_SET_RATE_PARENT
,
3038 .ops
= &clk_branch2_ops
,
3043 static struct clk_branch gcc_vddmx_vs_clk
= {
3044 .halt_reg
= 0x7a008,
3045 .halt_check
= BRANCH_HALT
,
3047 .enable_reg
= 0x7a008,
3048 .enable_mask
= BIT(0),
3049 .hw
.init
= &(struct clk_init_data
){
3050 .name
= "gcc_vddmx_vs_clk",
3051 .parent_names
= (const char *[]){
3052 "gcc_vsensor_clk_src",
3055 .flags
= CLK_SET_RATE_PARENT
,
3056 .ops
= &clk_branch2_ops
,
3061 static struct clk_branch gcc_video_ahb_clk
= {
3063 .halt_check
= BRANCH_HALT
,
3067 .enable_reg
= 0xb004,
3068 .enable_mask
= BIT(0),
3069 .hw
.init
= &(struct clk_init_data
){
3070 .name
= "gcc_video_ahb_clk",
3071 .flags
= CLK_IS_CRITICAL
,
3072 .ops
= &clk_branch2_ops
,
3077 static struct clk_branch gcc_video_axi_clk
= {
3079 .halt_check
= BRANCH_VOTED
,
3081 .enable_reg
= 0xb01c,
3082 .enable_mask
= BIT(0),
3083 .hw
.init
= &(struct clk_init_data
){
3084 .name
= "gcc_video_axi_clk",
3085 .ops
= &clk_branch2_ops
,
3090 static struct clk_branch gcc_video_xo_clk
= {
3092 .halt_check
= BRANCH_HALT
,
3094 .enable_reg
= 0xb028,
3095 .enable_mask
= BIT(0),
3096 .hw
.init
= &(struct clk_init_data
){
3097 .name
= "gcc_video_xo_clk",
3098 .flags
= CLK_IS_CRITICAL
,
3099 .ops
= &clk_branch2_ops
,
3104 static struct clk_branch gcc_vs_ctrl_ahb_clk
= {
3105 .halt_reg
= 0x7a014,
3106 .halt_check
= BRANCH_HALT
,
3107 .hwcg_reg
= 0x7a014,
3110 .enable_reg
= 0x7a014,
3111 .enable_mask
= BIT(0),
3112 .hw
.init
= &(struct clk_init_data
){
3113 .name
= "gcc_vs_ctrl_ahb_clk",
3114 .ops
= &clk_branch2_ops
,
3119 static struct clk_branch gcc_vs_ctrl_clk
= {
3120 .halt_reg
= 0x7a010,
3121 .halt_check
= BRANCH_HALT
,
3123 .enable_reg
= 0x7a010,
3124 .enable_mask
= BIT(0),
3125 .hw
.init
= &(struct clk_init_data
){
3126 .name
= "gcc_vs_ctrl_clk",
3127 .parent_names
= (const char *[]){
3128 "gcc_vs_ctrl_clk_src",
3131 .flags
= CLK_SET_RATE_PARENT
,
3132 .ops
= &clk_branch2_ops
,
3137 static struct clk_branch gcc_cpuss_dvm_bus_clk
= {
3138 .halt_reg
= 0x48190,
3139 .halt_check
= BRANCH_HALT
,
3141 .enable_reg
= 0x48190,
3142 .enable_mask
= BIT(0),
3143 .hw
.init
= &(struct clk_init_data
){
3144 .name
= "gcc_cpuss_dvm_bus_clk",
3145 .flags
= CLK_IS_CRITICAL
,
3146 .ops
= &clk_branch2_ops
,
3151 static struct clk_branch gcc_cpuss_gnoc_clk
= {
3152 .halt_reg
= 0x48004,
3153 .halt_check
= BRANCH_HALT_VOTED
,
3154 .hwcg_reg
= 0x48004,
3157 .enable_reg
= 0x52004,
3158 .enable_mask
= BIT(22),
3159 .hw
.init
= &(struct clk_init_data
){
3160 .name
= "gcc_cpuss_gnoc_clk",
3161 .flags
= CLK_IS_CRITICAL
,
3162 .ops
= &clk_branch2_ops
,
3167 /* TODO: Remove after DTS updated to protect these */
3168 #ifdef CONFIG_SDM_LPASSCC_845
3169 static struct clk_branch gcc_lpass_q6_axi_clk
= {
3170 .halt_reg
= 0x47000,
3171 .halt_check
= BRANCH_HALT
,
3173 .enable_reg
= 0x47000,
3174 .enable_mask
= BIT(0),
3175 .hw
.init
= &(struct clk_init_data
){
3176 .name
= "gcc_lpass_q6_axi_clk",
3177 .flags
= CLK_IS_CRITICAL
,
3178 .ops
= &clk_branch2_ops
,
3183 static struct clk_branch gcc_lpass_sway_clk
= {
3184 .halt_reg
= 0x47008,
3185 .halt_check
= BRANCH_HALT
,
3187 .enable_reg
= 0x47008,
3188 .enable_mask
= BIT(0),
3189 .hw
.init
= &(struct clk_init_data
){
3190 .name
= "gcc_lpass_sway_clk",
3191 .flags
= CLK_IS_CRITICAL
,
3192 .ops
= &clk_branch2_ops
,
3198 static struct gdsc pcie_0_gdsc
= {
3201 .name
= "pcie_0_gdsc",
3203 .pwrsts
= PWRSTS_OFF_ON
,
3204 .flags
= POLL_CFG_GDSCR
,
3207 static struct gdsc pcie_1_gdsc
= {
3210 .name
= "pcie_1_gdsc",
3212 .pwrsts
= PWRSTS_OFF_ON
,
3213 .flags
= POLL_CFG_GDSCR
,
3216 static struct gdsc ufs_card_gdsc
= {
3219 .name
= "ufs_card_gdsc",
3221 .pwrsts
= PWRSTS_OFF_ON
,
3222 .flags
= POLL_CFG_GDSCR
,
3225 static struct gdsc ufs_phy_gdsc
= {
3228 .name
= "ufs_phy_gdsc",
3230 .pwrsts
= PWRSTS_OFF_ON
,
3231 .flags
= POLL_CFG_GDSCR
,
3234 static struct gdsc usb30_prim_gdsc
= {
3237 .name
= "usb30_prim_gdsc",
3239 .pwrsts
= PWRSTS_OFF_ON
,
3240 .flags
= POLL_CFG_GDSCR
,
3243 static struct gdsc usb30_sec_gdsc
= {
3246 .name
= "usb30_sec_gdsc",
3248 .pwrsts
= PWRSTS_OFF_ON
,
3249 .flags
= POLL_CFG_GDSCR
,
3252 static struct gdsc hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc
= {
3255 .name
= "hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc",
3257 .pwrsts
= PWRSTS_OFF_ON
,
3261 static struct gdsc hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc
= {
3264 .name
= "hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc",
3266 .pwrsts
= PWRSTS_OFF_ON
,
3270 static struct gdsc hlos1_vote_aggre_noc_mmu_tbu1_gdsc
= {
3273 .name
= "hlos1_vote_aggre_noc_mmu_tbu1_gdsc",
3275 .pwrsts
= PWRSTS_OFF_ON
,
3279 static struct gdsc hlos1_vote_aggre_noc_mmu_tbu2_gdsc
= {
3282 .name
= "hlos1_vote_aggre_noc_mmu_tbu2_gdsc",
3284 .pwrsts
= PWRSTS_OFF_ON
,
3288 static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc
= {
3291 .name
= "hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc",
3293 .pwrsts
= PWRSTS_OFF_ON
,
3297 static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc
= {
3300 .name
= "hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc",
3302 .pwrsts
= PWRSTS_OFF_ON
,
3306 static struct gdsc hlos1_vote_mmnoc_mmu_tbu_sf_gdsc
= {
3309 .name
= "hlos1_vote_mmnoc_mmu_tbu_sf_gdsc",
3311 .pwrsts
= PWRSTS_OFF_ON
,
3315 static struct clk_regmap
*gcc_sdm845_clocks
[] = {
3316 [GCC_AGGRE_NOC_PCIE_TBU_CLK
] = &gcc_aggre_noc_pcie_tbu_clk
.clkr
,
3317 [GCC_AGGRE_UFS_CARD_AXI_CLK
] = &gcc_aggre_ufs_card_axi_clk
.clkr
,
3318 [GCC_AGGRE_UFS_PHY_AXI_CLK
] = &gcc_aggre_ufs_phy_axi_clk
.clkr
,
3319 [GCC_AGGRE_USB3_PRIM_AXI_CLK
] = &gcc_aggre_usb3_prim_axi_clk
.clkr
,
3320 [GCC_AGGRE_USB3_SEC_AXI_CLK
] = &gcc_aggre_usb3_sec_axi_clk
.clkr
,
3321 [GCC_APC_VS_CLK
] = &gcc_apc_vs_clk
.clkr
,
3322 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
3323 [GCC_CAMERA_AHB_CLK
] = &gcc_camera_ahb_clk
.clkr
,
3324 [GCC_CAMERA_AXI_CLK
] = &gcc_camera_axi_clk
.clkr
,
3325 [GCC_CAMERA_XO_CLK
] = &gcc_camera_xo_clk
.clkr
,
3326 [GCC_CE1_AHB_CLK
] = &gcc_ce1_ahb_clk
.clkr
,
3327 [GCC_CE1_AXI_CLK
] = &gcc_ce1_axi_clk
.clkr
,
3328 [GCC_CE1_CLK
] = &gcc_ce1_clk
.clkr
,
3329 [GCC_CFG_NOC_USB3_PRIM_AXI_CLK
] = &gcc_cfg_noc_usb3_prim_axi_clk
.clkr
,
3330 [GCC_CFG_NOC_USB3_SEC_AXI_CLK
] = &gcc_cfg_noc_usb3_sec_axi_clk
.clkr
,
3331 [GCC_CPUSS_AHB_CLK
] = &gcc_cpuss_ahb_clk
.clkr
,
3332 [GCC_CPUSS_AHB_CLK_SRC
] = &gcc_cpuss_ahb_clk_src
.clkr
,
3333 [GCC_CPUSS_RBCPR_CLK
] = &gcc_cpuss_rbcpr_clk
.clkr
,
3334 [GCC_CPUSS_RBCPR_CLK_SRC
] = &gcc_cpuss_rbcpr_clk_src
.clkr
,
3335 [GCC_DDRSS_GPU_AXI_CLK
] = &gcc_ddrss_gpu_axi_clk
.clkr
,
3336 [GCC_DISP_AHB_CLK
] = &gcc_disp_ahb_clk
.clkr
,
3337 [GCC_DISP_AXI_CLK
] = &gcc_disp_axi_clk
.clkr
,
3338 [GCC_DISP_GPLL0_CLK_SRC
] = &gcc_disp_gpll0_clk_src
.clkr
,
3339 [GCC_DISP_GPLL0_DIV_CLK_SRC
] = &gcc_disp_gpll0_div_clk_src
.clkr
,
3340 [GCC_DISP_XO_CLK
] = &gcc_disp_xo_clk
.clkr
,
3341 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
3342 [GCC_GP1_CLK_SRC
] = &gcc_gp1_clk_src
.clkr
,
3343 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
3344 [GCC_GP2_CLK_SRC
] = &gcc_gp2_clk_src
.clkr
,
3345 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
3346 [GCC_GP3_CLK_SRC
] = &gcc_gp3_clk_src
.clkr
,
3347 [GCC_GPU_CFG_AHB_CLK
] = &gcc_gpu_cfg_ahb_clk
.clkr
,
3348 [GCC_GPU_GPLL0_CLK_SRC
] = &gcc_gpu_gpll0_clk_src
.clkr
,
3349 [GCC_GPU_GPLL0_DIV_CLK_SRC
] = &gcc_gpu_gpll0_div_clk_src
.clkr
,
3350 [GCC_GPU_IREF_CLK
] = &gcc_gpu_iref_clk
.clkr
,
3351 [GCC_GPU_MEMNOC_GFX_CLK
] = &gcc_gpu_memnoc_gfx_clk
.clkr
,
3352 [GCC_GPU_SNOC_DVM_GFX_CLK
] = &gcc_gpu_snoc_dvm_gfx_clk
.clkr
,
3353 [GCC_GPU_VS_CLK
] = &gcc_gpu_vs_clk
.clkr
,
3354 [GCC_MSS_AXIS2_CLK
] = &gcc_mss_axis2_clk
.clkr
,
3355 [GCC_MSS_CFG_AHB_CLK
] = &gcc_mss_cfg_ahb_clk
.clkr
,
3356 [GCC_MSS_GPLL0_DIV_CLK_SRC
] = &gcc_mss_gpll0_div_clk_src
.clkr
,
3357 [GCC_MSS_MFAB_AXIS_CLK
] = &gcc_mss_mfab_axis_clk
.clkr
,
3358 [GCC_MSS_Q6_MEMNOC_AXI_CLK
] = &gcc_mss_q6_memnoc_axi_clk
.clkr
,
3359 [GCC_MSS_SNOC_AXI_CLK
] = &gcc_mss_snoc_axi_clk
.clkr
,
3360 [GCC_MSS_VS_CLK
] = &gcc_mss_vs_clk
.clkr
,
3361 [GCC_PCIE_0_AUX_CLK
] = &gcc_pcie_0_aux_clk
.clkr
,
3362 [GCC_PCIE_0_AUX_CLK_SRC
] = &gcc_pcie_0_aux_clk_src
.clkr
,
3363 [GCC_PCIE_0_CFG_AHB_CLK
] = &gcc_pcie_0_cfg_ahb_clk
.clkr
,
3364 [GCC_PCIE_0_CLKREF_CLK
] = &gcc_pcie_0_clkref_clk
.clkr
,
3365 [GCC_PCIE_0_MSTR_AXI_CLK
] = &gcc_pcie_0_mstr_axi_clk
.clkr
,
3366 [GCC_PCIE_0_PIPE_CLK
] = &gcc_pcie_0_pipe_clk
.clkr
,
3367 [GCC_PCIE_0_SLV_AXI_CLK
] = &gcc_pcie_0_slv_axi_clk
.clkr
,
3368 [GCC_PCIE_0_SLV_Q2A_AXI_CLK
] = &gcc_pcie_0_slv_q2a_axi_clk
.clkr
,
3369 [GCC_PCIE_1_AUX_CLK
] = &gcc_pcie_1_aux_clk
.clkr
,
3370 [GCC_PCIE_1_AUX_CLK_SRC
] = &gcc_pcie_1_aux_clk_src
.clkr
,
3371 [GCC_PCIE_1_CFG_AHB_CLK
] = &gcc_pcie_1_cfg_ahb_clk
.clkr
,
3372 [GCC_PCIE_1_CLKREF_CLK
] = &gcc_pcie_1_clkref_clk
.clkr
,
3373 [GCC_PCIE_1_MSTR_AXI_CLK
] = &gcc_pcie_1_mstr_axi_clk
.clkr
,
3374 [GCC_PCIE_1_PIPE_CLK
] = &gcc_pcie_1_pipe_clk
.clkr
,
3375 [GCC_PCIE_1_SLV_AXI_CLK
] = &gcc_pcie_1_slv_axi_clk
.clkr
,
3376 [GCC_PCIE_1_SLV_Q2A_AXI_CLK
] = &gcc_pcie_1_slv_q2a_axi_clk
.clkr
,
3377 [GCC_PCIE_PHY_AUX_CLK
] = &gcc_pcie_phy_aux_clk
.clkr
,
3378 [GCC_PCIE_PHY_REFGEN_CLK
] = &gcc_pcie_phy_refgen_clk
.clkr
,
3379 [GCC_PCIE_PHY_REFGEN_CLK_SRC
] = &gcc_pcie_phy_refgen_clk_src
.clkr
,
3380 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
3381 [GCC_PDM2_CLK_SRC
] = &gcc_pdm2_clk_src
.clkr
,
3382 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
3383 [GCC_PDM_XO4_CLK
] = &gcc_pdm_xo4_clk
.clkr
,
3384 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
3385 [GCC_QMIP_CAMERA_AHB_CLK
] = &gcc_qmip_camera_ahb_clk
.clkr
,
3386 [GCC_QMIP_DISP_AHB_CLK
] = &gcc_qmip_disp_ahb_clk
.clkr
,
3387 [GCC_QMIP_VIDEO_AHB_CLK
] = &gcc_qmip_video_ahb_clk
.clkr
,
3388 [GCC_QUPV3_WRAP0_S0_CLK
] = &gcc_qupv3_wrap0_s0_clk
.clkr
,
3389 [GCC_QUPV3_WRAP0_S0_CLK_SRC
] = &gcc_qupv3_wrap0_s0_clk_src
.clkr
,
3390 [GCC_QUPV3_WRAP0_S1_CLK
] = &gcc_qupv3_wrap0_s1_clk
.clkr
,
3391 [GCC_QUPV3_WRAP0_S1_CLK_SRC
] = &gcc_qupv3_wrap0_s1_clk_src
.clkr
,
3392 [GCC_QUPV3_WRAP0_S2_CLK
] = &gcc_qupv3_wrap0_s2_clk
.clkr
,
3393 [GCC_QUPV3_WRAP0_S2_CLK_SRC
] = &gcc_qupv3_wrap0_s2_clk_src
.clkr
,
3394 [GCC_QUPV3_WRAP0_S3_CLK
] = &gcc_qupv3_wrap0_s3_clk
.clkr
,
3395 [GCC_QUPV3_WRAP0_S3_CLK_SRC
] = &gcc_qupv3_wrap0_s3_clk_src
.clkr
,
3396 [GCC_QUPV3_WRAP0_S4_CLK
] = &gcc_qupv3_wrap0_s4_clk
.clkr
,
3397 [GCC_QUPV3_WRAP0_S4_CLK_SRC
] = &gcc_qupv3_wrap0_s4_clk_src
.clkr
,
3398 [GCC_QUPV3_WRAP0_S5_CLK
] = &gcc_qupv3_wrap0_s5_clk
.clkr
,
3399 [GCC_QUPV3_WRAP0_S5_CLK_SRC
] = &gcc_qupv3_wrap0_s5_clk_src
.clkr
,
3400 [GCC_QUPV3_WRAP0_S6_CLK
] = &gcc_qupv3_wrap0_s6_clk
.clkr
,
3401 [GCC_QUPV3_WRAP0_S6_CLK_SRC
] = &gcc_qupv3_wrap0_s6_clk_src
.clkr
,
3402 [GCC_QUPV3_WRAP0_S7_CLK
] = &gcc_qupv3_wrap0_s7_clk
.clkr
,
3403 [GCC_QUPV3_WRAP0_S7_CLK_SRC
] = &gcc_qupv3_wrap0_s7_clk_src
.clkr
,
3404 [GCC_QUPV3_WRAP1_S0_CLK
] = &gcc_qupv3_wrap1_s0_clk
.clkr
,
3405 [GCC_QUPV3_WRAP1_S0_CLK_SRC
] = &gcc_qupv3_wrap1_s0_clk_src
.clkr
,
3406 [GCC_QUPV3_WRAP1_S1_CLK
] = &gcc_qupv3_wrap1_s1_clk
.clkr
,
3407 [GCC_QUPV3_WRAP1_S1_CLK_SRC
] = &gcc_qupv3_wrap1_s1_clk_src
.clkr
,
3408 [GCC_QUPV3_WRAP1_S2_CLK
] = &gcc_qupv3_wrap1_s2_clk
.clkr
,
3409 [GCC_QUPV3_WRAP1_S2_CLK_SRC
] = &gcc_qupv3_wrap1_s2_clk_src
.clkr
,
3410 [GCC_QUPV3_WRAP1_S3_CLK
] = &gcc_qupv3_wrap1_s3_clk
.clkr
,
3411 [GCC_QUPV3_WRAP1_S3_CLK_SRC
] = &gcc_qupv3_wrap1_s3_clk_src
.clkr
,
3412 [GCC_QUPV3_WRAP1_S4_CLK
] = &gcc_qupv3_wrap1_s4_clk
.clkr
,
3413 [GCC_QUPV3_WRAP1_S4_CLK_SRC
] = &gcc_qupv3_wrap1_s4_clk_src
.clkr
,
3414 [GCC_QUPV3_WRAP1_S5_CLK
] = &gcc_qupv3_wrap1_s5_clk
.clkr
,
3415 [GCC_QUPV3_WRAP1_S5_CLK_SRC
] = &gcc_qupv3_wrap1_s5_clk_src
.clkr
,
3416 [GCC_QUPV3_WRAP1_S6_CLK
] = &gcc_qupv3_wrap1_s6_clk
.clkr
,
3417 [GCC_QUPV3_WRAP1_S6_CLK_SRC
] = &gcc_qupv3_wrap1_s6_clk_src
.clkr
,
3418 [GCC_QUPV3_WRAP1_S7_CLK
] = &gcc_qupv3_wrap1_s7_clk
.clkr
,
3419 [GCC_QUPV3_WRAP1_S7_CLK_SRC
] = &gcc_qupv3_wrap1_s7_clk_src
.clkr
,
3420 [GCC_QUPV3_WRAP_0_M_AHB_CLK
] = &gcc_qupv3_wrap_0_m_ahb_clk
.clkr
,
3421 [GCC_QUPV3_WRAP_0_S_AHB_CLK
] = &gcc_qupv3_wrap_0_s_ahb_clk
.clkr
,
3422 [GCC_QUPV3_WRAP_1_M_AHB_CLK
] = &gcc_qupv3_wrap_1_m_ahb_clk
.clkr
,
3423 [GCC_QUPV3_WRAP_1_S_AHB_CLK
] = &gcc_qupv3_wrap_1_s_ahb_clk
.clkr
,
3424 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
3425 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
3426 [GCC_SDCC2_APPS_CLK_SRC
] = &gcc_sdcc2_apps_clk_src
.clkr
,
3427 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
3428 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
3429 [GCC_SDCC4_APPS_CLK_SRC
] = &gcc_sdcc4_apps_clk_src
.clkr
,
3430 [GCC_SYS_NOC_CPUSS_AHB_CLK
] = &gcc_sys_noc_cpuss_ahb_clk
.clkr
,
3431 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
3432 [GCC_TSIF_INACTIVITY_TIMERS_CLK
] =
3433 &gcc_tsif_inactivity_timers_clk
.clkr
,
3434 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
3435 [GCC_TSIF_REF_CLK_SRC
] = &gcc_tsif_ref_clk_src
.clkr
,
3436 [GCC_UFS_CARD_AHB_CLK
] = &gcc_ufs_card_ahb_clk
.clkr
,
3437 [GCC_UFS_CARD_AXI_CLK
] = &gcc_ufs_card_axi_clk
.clkr
,
3438 [GCC_UFS_CARD_AXI_CLK_SRC
] = &gcc_ufs_card_axi_clk_src
.clkr
,
3439 [GCC_UFS_CARD_CLKREF_CLK
] = &gcc_ufs_card_clkref_clk
.clkr
,
3440 [GCC_UFS_CARD_ICE_CORE_CLK
] = &gcc_ufs_card_ice_core_clk
.clkr
,
3441 [GCC_UFS_CARD_ICE_CORE_CLK_SRC
] = &gcc_ufs_card_ice_core_clk_src
.clkr
,
3442 [GCC_UFS_CARD_PHY_AUX_CLK
] = &gcc_ufs_card_phy_aux_clk
.clkr
,
3443 [GCC_UFS_CARD_PHY_AUX_CLK_SRC
] = &gcc_ufs_card_phy_aux_clk_src
.clkr
,
3444 [GCC_UFS_CARD_RX_SYMBOL_0_CLK
] = &gcc_ufs_card_rx_symbol_0_clk
.clkr
,
3445 [GCC_UFS_CARD_RX_SYMBOL_1_CLK
] = &gcc_ufs_card_rx_symbol_1_clk
.clkr
,
3446 [GCC_UFS_CARD_TX_SYMBOL_0_CLK
] = &gcc_ufs_card_tx_symbol_0_clk
.clkr
,
3447 [GCC_UFS_CARD_UNIPRO_CORE_CLK
] = &gcc_ufs_card_unipro_core_clk
.clkr
,
3448 [GCC_UFS_CARD_UNIPRO_CORE_CLK_SRC
] =
3449 &gcc_ufs_card_unipro_core_clk_src
.clkr
,
3450 [GCC_UFS_MEM_CLKREF_CLK
] = &gcc_ufs_mem_clkref_clk
.clkr
,
3451 [GCC_UFS_PHY_AHB_CLK
] = &gcc_ufs_phy_ahb_clk
.clkr
,
3452 [GCC_UFS_PHY_AXI_CLK
] = &gcc_ufs_phy_axi_clk
.clkr
,
3453 [GCC_UFS_PHY_AXI_CLK_SRC
] = &gcc_ufs_phy_axi_clk_src
.clkr
,
3454 [GCC_UFS_PHY_ICE_CORE_CLK
] = &gcc_ufs_phy_ice_core_clk
.clkr
,
3455 [GCC_UFS_PHY_ICE_CORE_CLK_SRC
] = &gcc_ufs_phy_ice_core_clk_src
.clkr
,
3456 [GCC_UFS_PHY_PHY_AUX_CLK
] = &gcc_ufs_phy_phy_aux_clk
.clkr
,
3457 [GCC_UFS_PHY_PHY_AUX_CLK_SRC
] = &gcc_ufs_phy_phy_aux_clk_src
.clkr
,
3458 [GCC_UFS_PHY_RX_SYMBOL_0_CLK
] = &gcc_ufs_phy_rx_symbol_0_clk
.clkr
,
3459 [GCC_UFS_PHY_RX_SYMBOL_1_CLK
] = &gcc_ufs_phy_rx_symbol_1_clk
.clkr
,
3460 [GCC_UFS_PHY_TX_SYMBOL_0_CLK
] = &gcc_ufs_phy_tx_symbol_0_clk
.clkr
,
3461 [GCC_UFS_PHY_UNIPRO_CORE_CLK
] = &gcc_ufs_phy_unipro_core_clk
.clkr
,
3462 [GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC
] =
3463 &gcc_ufs_phy_unipro_core_clk_src
.clkr
,
3464 [GCC_USB30_PRIM_MASTER_CLK
] = &gcc_usb30_prim_master_clk
.clkr
,
3465 [GCC_USB30_PRIM_MASTER_CLK_SRC
] = &gcc_usb30_prim_master_clk_src
.clkr
,
3466 [GCC_USB30_PRIM_MOCK_UTMI_CLK
] = &gcc_usb30_prim_mock_utmi_clk
.clkr
,
3467 [GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC
] =
3468 &gcc_usb30_prim_mock_utmi_clk_src
.clkr
,
3469 [GCC_USB30_PRIM_SLEEP_CLK
] = &gcc_usb30_prim_sleep_clk
.clkr
,
3470 [GCC_USB30_SEC_MASTER_CLK
] = &gcc_usb30_sec_master_clk
.clkr
,
3471 [GCC_USB30_SEC_MASTER_CLK_SRC
] = &gcc_usb30_sec_master_clk_src
.clkr
,
3472 [GCC_USB30_SEC_MOCK_UTMI_CLK
] = &gcc_usb30_sec_mock_utmi_clk
.clkr
,
3473 [GCC_USB30_SEC_MOCK_UTMI_CLK_SRC
] =
3474 &gcc_usb30_sec_mock_utmi_clk_src
.clkr
,
3475 [GCC_USB30_SEC_SLEEP_CLK
] = &gcc_usb30_sec_sleep_clk
.clkr
,
3476 [GCC_USB3_PRIM_CLKREF_CLK
] = &gcc_usb3_prim_clkref_clk
.clkr
,
3477 [GCC_USB3_PRIM_PHY_AUX_CLK
] = &gcc_usb3_prim_phy_aux_clk
.clkr
,
3478 [GCC_USB3_PRIM_PHY_AUX_CLK_SRC
] = &gcc_usb3_prim_phy_aux_clk_src
.clkr
,
3479 [GCC_USB3_PRIM_PHY_COM_AUX_CLK
] = &gcc_usb3_prim_phy_com_aux_clk
.clkr
,
3480 [GCC_USB3_PRIM_PHY_PIPE_CLK
] = &gcc_usb3_prim_phy_pipe_clk
.clkr
,
3481 [GCC_USB3_SEC_CLKREF_CLK
] = &gcc_usb3_sec_clkref_clk
.clkr
,
3482 [GCC_USB3_SEC_PHY_AUX_CLK
] = &gcc_usb3_sec_phy_aux_clk
.clkr
,
3483 [GCC_USB3_SEC_PHY_AUX_CLK_SRC
] = &gcc_usb3_sec_phy_aux_clk_src
.clkr
,
3484 [GCC_USB3_SEC_PHY_COM_AUX_CLK
] = &gcc_usb3_sec_phy_com_aux_clk
.clkr
,
3485 [GCC_USB3_SEC_PHY_PIPE_CLK
] = &gcc_usb3_sec_phy_pipe_clk
.clkr
,
3486 [GCC_USB_PHY_CFG_AHB2PHY_CLK
] = &gcc_usb_phy_cfg_ahb2phy_clk
.clkr
,
3487 [GCC_VDDA_VS_CLK
] = &gcc_vdda_vs_clk
.clkr
,
3488 [GCC_VDDCX_VS_CLK
] = &gcc_vddcx_vs_clk
.clkr
,
3489 [GCC_VDDMX_VS_CLK
] = &gcc_vddmx_vs_clk
.clkr
,
3490 [GCC_VIDEO_AHB_CLK
] = &gcc_video_ahb_clk
.clkr
,
3491 [GCC_VIDEO_AXI_CLK
] = &gcc_video_axi_clk
.clkr
,
3492 [GCC_VIDEO_XO_CLK
] = &gcc_video_xo_clk
.clkr
,
3493 [GCC_VS_CTRL_AHB_CLK
] = &gcc_vs_ctrl_ahb_clk
.clkr
,
3494 [GCC_VS_CTRL_CLK
] = &gcc_vs_ctrl_clk
.clkr
,
3495 [GCC_VS_CTRL_CLK_SRC
] = &gcc_vs_ctrl_clk_src
.clkr
,
3496 [GCC_VSENSOR_CLK_SRC
] = &gcc_vsensor_clk_src
.clkr
,
3497 [GPLL0
] = &gpll0
.clkr
,
3498 [GPLL0_OUT_EVEN
] = &gpll0_out_even
.clkr
,
3499 [GPLL4
] = &gpll4
.clkr
,
3500 [GCC_CPUSS_DVM_BUS_CLK
] = &gcc_cpuss_dvm_bus_clk
.clkr
,
3501 [GCC_CPUSS_GNOC_CLK
] = &gcc_cpuss_gnoc_clk
.clkr
,
3502 [GCC_QSPI_CORE_CLK_SRC
] = &gcc_qspi_core_clk_src
.clkr
,
3503 [GCC_QSPI_CORE_CLK
] = &gcc_qspi_core_clk
.clkr
,
3504 [GCC_QSPI_CNOC_PERIPH_AHB_CLK
] = &gcc_qspi_cnoc_periph_ahb_clk
.clkr
,
3505 #ifdef CONFIG_SDM_LPASSCC_845
3506 [GCC_LPASS_Q6_AXI_CLK
] = &gcc_lpass_q6_axi_clk
.clkr
,
3507 [GCC_LPASS_SWAY_CLK
] = &gcc_lpass_sway_clk
.clkr
,
3511 static const struct qcom_reset_map gcc_sdm845_resets
[] = {
3512 [GCC_MMSS_BCR
] = { 0xb000 },
3513 [GCC_PCIE_0_BCR
] = { 0x6b000 },
3514 [GCC_PCIE_1_BCR
] = { 0x8d000 },
3515 [GCC_PCIE_PHY_BCR
] = { 0x6f000 },
3516 [GCC_PDM_BCR
] = { 0x33000 },
3517 [GCC_PRNG_BCR
] = { 0x34000 },
3518 [GCC_QUPV3_WRAPPER_0_BCR
] = { 0x17000 },
3519 [GCC_QUPV3_WRAPPER_1_BCR
] = { 0x18000 },
3520 [GCC_QUSB2PHY_PRIM_BCR
] = { 0x12000 },
3521 [GCC_QUSB2PHY_SEC_BCR
] = { 0x12004 },
3522 [GCC_SDCC2_BCR
] = { 0x14000 },
3523 [GCC_SDCC4_BCR
] = { 0x16000 },
3524 [GCC_TSIF_BCR
] = { 0x36000 },
3525 [GCC_UFS_CARD_BCR
] = { 0x75000 },
3526 [GCC_UFS_PHY_BCR
] = { 0x77000 },
3527 [GCC_USB30_PRIM_BCR
] = { 0xf000 },
3528 [GCC_USB30_SEC_BCR
] = { 0x10000 },
3529 [GCC_USB3_PHY_PRIM_BCR
] = { 0x50000 },
3530 [GCC_USB3PHY_PHY_PRIM_BCR
] = { 0x50004 },
3531 [GCC_USB3_DP_PHY_PRIM_BCR
] = { 0x50008 },
3532 [GCC_USB3_PHY_SEC_BCR
] = { 0x5000c },
3533 [GCC_USB3PHY_PHY_SEC_BCR
] = { 0x50010 },
3534 [GCC_USB3_DP_PHY_SEC_BCR
] = { 0x50014 },
3535 [GCC_USB_PHY_CFG_AHB2PHY_BCR
] = { 0x6a000 },
3536 [GCC_PCIE_0_PHY_BCR
] = { 0x6c01c },
3537 [GCC_PCIE_1_PHY_BCR
] = { 0x8e01c },
3540 static struct gdsc
*gcc_sdm845_gdscs
[] = {
3541 [PCIE_0_GDSC
] = &pcie_0_gdsc
,
3542 [PCIE_1_GDSC
] = &pcie_1_gdsc
,
3543 [UFS_CARD_GDSC
] = &ufs_card_gdsc
,
3544 [UFS_PHY_GDSC
] = &ufs_phy_gdsc
,
3545 [USB30_PRIM_GDSC
] = &usb30_prim_gdsc
,
3546 [USB30_SEC_GDSC
] = &usb30_sec_gdsc
,
3547 [HLOS1_VOTE_AGGRE_NOC_MMU_AUDIO_TBU_GDSC
] =
3548 &hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc
,
3549 [HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC
] =
3550 &hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc
,
3551 [HLOS1_VOTE_AGGRE_NOC_MMU_TBU1_GDSC
] =
3552 &hlos1_vote_aggre_noc_mmu_tbu1_gdsc
,
3553 [HLOS1_VOTE_AGGRE_NOC_MMU_TBU2_GDSC
] =
3554 &hlos1_vote_aggre_noc_mmu_tbu2_gdsc
,
3555 [HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC
] =
3556 &hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc
,
3557 [HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC
] =
3558 &hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc
,
3559 [HLOS1_VOTE_MMNOC_MMU_TBU_SF_GDSC
] = &hlos1_vote_mmnoc_mmu_tbu_sf_gdsc
,
3562 static const struct regmap_config gcc_sdm845_regmap_config
= {
3566 .max_register
= 0x182090,
3570 static const struct qcom_cc_desc gcc_sdm845_desc
= {
3571 .config
= &gcc_sdm845_regmap_config
,
3572 .clks
= gcc_sdm845_clocks
,
3573 .num_clks
= ARRAY_SIZE(gcc_sdm845_clocks
),
3574 .resets
= gcc_sdm845_resets
,
3575 .num_resets
= ARRAY_SIZE(gcc_sdm845_resets
),
3576 .gdscs
= gcc_sdm845_gdscs
,
3577 .num_gdscs
= ARRAY_SIZE(gcc_sdm845_gdscs
),
3580 static const struct of_device_id gcc_sdm845_match_table
[] = {
3581 { .compatible
= "qcom,gcc-sdm845" },
3584 MODULE_DEVICE_TABLE(of
, gcc_sdm845_match_table
);
3586 static const struct clk_rcg_dfs_data gcc_dfs_clocks
[] = {
3587 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s0_clk_src
),
3588 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s1_clk_src
),
3589 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s2_clk_src
),
3590 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s3_clk_src
),
3591 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s4_clk_src
),
3592 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s5_clk_src
),
3593 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s6_clk_src
),
3594 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s7_clk_src
),
3595 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s0_clk_src
),
3596 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s1_clk_src
),
3597 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s2_clk_src
),
3598 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s3_clk_src
),
3599 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s4_clk_src
),
3600 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s5_clk_src
),
3601 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s6_clk_src
),
3602 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s7_clk_src
),
3605 static int gcc_sdm845_probe(struct platform_device
*pdev
)
3607 struct regmap
*regmap
;
3610 regmap
= qcom_cc_map(pdev
, &gcc_sdm845_desc
);
3612 return PTR_ERR(regmap
);
3614 /* Disable the GPLL0 active input to MMSS and GPU via MISC registers */
3615 regmap_update_bits(regmap
, 0x09ffc, 0x3, 0x3);
3616 regmap_update_bits(regmap
, 0x71028, 0x3, 0x3);
3618 ret
= qcom_cc_register_rcg_dfs(regmap
, gcc_dfs_clocks
,
3619 ARRAY_SIZE(gcc_dfs_clocks
));
3623 return qcom_cc_really_probe(pdev
, &gcc_sdm845_desc
, regmap
);
3626 static struct platform_driver gcc_sdm845_driver
= {
3627 .probe
= gcc_sdm845_probe
,
3629 .name
= "gcc-sdm845",
3630 .of_match_table
= gcc_sdm845_match_table
,
3634 static int __init
gcc_sdm845_init(void)
3636 return platform_driver_register(&gcc_sdm845_driver
);
3638 core_initcall(gcc_sdm845_init
);
3640 static void __exit
gcc_sdm845_exit(void)
3642 platform_driver_unregister(&gcc_sdm845_driver
);
3644 module_exit(gcc_sdm845_exit
);
3646 MODULE_DESCRIPTION("QTI GCC SDM845 Driver");
3647 MODULE_LICENSE("GPL v2");
3648 MODULE_ALIAS("platform:gcc-sdm845");