1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
7 #include <linux/clk-provider.h>
8 #include <linux/module.h>
9 #include <linux/platform_device.h>
10 #include <linux/regmap.h>
12 #include <dt-bindings/clock/qcom,gcc-sm6350.h>
14 #include "clk-alpha-pll.h"
15 #include "clk-branch.h"
17 #include "clk-regmap.h"
18 #include "clk-regmap-divider.h"
19 #include "clk-regmap-mux.h"
34 static struct clk_alpha_pll gpll0
= {
36 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
38 .enable_reg
= 0x52010,
39 .enable_mask
= BIT(0),
40 .hw
.init
= &(struct clk_init_data
){
42 .parent_data
= &(const struct clk_parent_data
){
46 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
51 static const struct clk_div_table post_div_table_gpll0_out_even
[] = {
56 static struct clk_alpha_pll_postdiv gpll0_out_even
= {
59 .post_div_table
= post_div_table_gpll0_out_even
,
60 .num_post_div
= ARRAY_SIZE(post_div_table_gpll0_out_even
),
62 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
63 .clkr
.hw
.init
= &(struct clk_init_data
){
64 .name
= "gpll0_out_even",
65 .parent_hws
= (const struct clk_hw
*[]){
69 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
73 static const struct clk_div_table post_div_table_gpll0_out_odd
[] = {
78 static struct clk_alpha_pll_postdiv gpll0_out_odd
= {
81 .post_div_table
= post_div_table_gpll0_out_odd
,
82 .num_post_div
= ARRAY_SIZE(post_div_table_gpll0_out_odd
),
84 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
85 .clkr
.hw
.init
= &(struct clk_init_data
){
86 .name
= "gpll0_out_odd",
87 .parent_hws
= (const struct clk_hw
*[]){
91 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
95 static struct clk_alpha_pll gpll6
= {
97 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
99 .enable_reg
= 0x52010,
100 .enable_mask
= BIT(6),
101 .hw
.init
= &(struct clk_init_data
){
103 .parent_data
= &(const struct clk_parent_data
){
104 .fw_name
= "bi_tcxo",
107 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
112 static const struct clk_div_table post_div_table_gpll6_out_even
[] = {
117 static struct clk_alpha_pll_postdiv gpll6_out_even
= {
120 .post_div_table
= post_div_table_gpll6_out_even
,
121 .num_post_div
= ARRAY_SIZE(post_div_table_gpll6_out_even
),
123 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
124 .clkr
.hw
.init
= &(struct clk_init_data
){
125 .name
= "gpll6_out_even",
126 .parent_hws
= (const struct clk_hw
*[]){
130 .ops
= &clk_alpha_pll_postdiv_fabia_ops
,
134 static struct clk_alpha_pll gpll7
= {
136 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_FABIA
],
138 .enable_reg
= 0x52010,
139 .enable_mask
= BIT(7),
140 .hw
.init
= &(struct clk_init_data
){
142 .parent_data
= &(const struct clk_parent_data
){
143 .fw_name
= "bi_tcxo",
146 .ops
= &clk_alpha_pll_fixed_fabia_ops
,
151 static const struct parent_map gcc_parent_map_0
[] = {
153 { P_GPLL0_OUT_MAIN
, 1 },
154 { P_GPLL6_OUT_EVEN
, 2 },
155 { P_GPLL0_OUT_EVEN
, 6 },
158 static const struct clk_parent_data gcc_parent_data_0
[] = {
159 { .fw_name
= "bi_tcxo" },
160 { .hw
= &gpll0
.clkr
.hw
},
161 { .hw
= &gpll6_out_even
.clkr
.hw
},
162 { .hw
= &gpll0_out_even
.clkr
.hw
},
165 static const struct parent_map gcc_parent_map_1
[] = {
167 { P_GPLL0_OUT_EVEN
, 6 },
170 static const struct clk_parent_data gcc_parent_data_1
[] = {
171 { .fw_name
= "bi_tcxo" },
172 { .hw
= &gpll0_out_even
.clkr
.hw
},
175 static const struct parent_map gcc_parent_map_2
[] = {
177 { P_GPLL0_OUT_ODD
, 2 },
180 static const struct clk_parent_data gcc_parent_data_2_ao
[] = {
181 { .fw_name
= "bi_tcxo_ao" },
182 { .hw
= &gpll0_out_odd
.clkr
.hw
},
185 static const struct parent_map gcc_parent_map_4
[] = {
187 { P_GPLL0_OUT_MAIN
, 1 },
188 { P_GPLL0_OUT_ODD
, 2 },
191 static const struct clk_parent_data gcc_parent_data_4
[] = {
192 { .fw_name
= "bi_tcxo" },
193 { .hw
= &gpll0
.clkr
.hw
},
194 { .hw
= &gpll0_out_odd
.clkr
.hw
},
197 static const struct parent_map gcc_parent_map_5
[] = {
199 { P_GPLL0_OUT_ODD
, 2 },
201 { P_GPLL0_OUT_EVEN
, 6 },
204 static const struct clk_parent_data gcc_parent_data_5
[] = {
205 { .fw_name
= "bi_tcxo" },
206 { .hw
= &gpll0_out_odd
.clkr
.hw
},
207 { .fw_name
= "sleep_clk" },
208 { .hw
= &gpll0_out_even
.clkr
.hw
},
211 static const struct parent_map gcc_parent_map_6
[] = {
216 static const struct clk_parent_data gcc_parent_data_6
[] = {
217 { .fw_name
= "bi_tcxo" },
218 { .fw_name
= "sleep_clk" }
221 static const struct parent_map gcc_parent_map_7
[] = {
223 { P_GPLL6_OUT_EVEN
, 2 },
224 { P_GPLL0_OUT_EVEN
, 6 },
227 static const struct clk_parent_data gcc_parent_data_7
[] = {
228 { .fw_name
= "bi_tcxo" },
229 { .hw
= &gpll6_out_even
.clkr
.hw
},
230 { .hw
= &gpll0_out_even
.clkr
.hw
},
233 static const struct parent_map gcc_parent_map_8
[] = {
235 { P_GPLL0_OUT_ODD
, 2 },
236 { P_GPLL7_OUT_MAIN
, 3 },
239 static const struct clk_parent_data gcc_parent_data_8
[] = {
240 { .fw_name
= "bi_tcxo" },
241 { .hw
= &gpll0_out_odd
.clkr
.hw
},
242 { .hw
= &gpll7
.clkr
.hw
},
245 static struct clk_regmap_div gcc_gpu_gpll0_main_div_clk_src
= {
249 .clkr
.hw
.init
= &(struct clk_init_data
) {
250 .name
= "gcc_gpu_gpll0_main_div_clk_src",
251 .parent_hws
= (const struct clk_hw
*[]){
255 .ops
= &clk_regmap_div_ro_ops
,
259 static struct clk_regmap_div gcc_npu_pll0_main_div_clk_src
= {
263 .clkr
.hw
.init
= &(struct clk_init_data
) {
264 .name
= "gcc_npu_pll0_main_div_clk_src",
265 .parent_hws
= (const struct clk_hw
*[]){
269 .ops
= &clk_regmap_div_ro_ops
,
273 static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src
[] = {
274 F(19200000, P_BI_TCXO
, 1, 0, 0),
278 static struct clk_rcg2 gcc_cpuss_ahb_clk_src
= {
282 .parent_map
= gcc_parent_map_2
,
283 .freq_tbl
= ftbl_gcc_cpuss_ahb_clk_src
,
284 .clkr
.hw
.init
= &(struct clk_init_data
){
285 .name
= "gcc_cpuss_ahb_clk_src",
286 .parent_data
= gcc_parent_data_2_ao
,
287 .num_parents
= ARRAY_SIZE(gcc_parent_data_2_ao
),
288 .ops
= &clk_rcg2_ops
,
292 static const struct freq_tbl ftbl_gcc_gp1_clk_src
[] = {
293 F(19200000, P_BI_TCXO
, 1, 0, 0),
294 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
295 F(50000000, P_GPLL0_OUT_ODD
, 4, 0, 0),
296 F(100000000, P_GPLL0_OUT_ODD
, 2, 0, 0),
297 F(200000000, P_GPLL0_OUT_ODD
, 1, 0, 0),
301 static struct clk_rcg2 gcc_gp1_clk_src
= {
305 .parent_map
= gcc_parent_map_5
,
306 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
307 .clkr
.hw
.init
= &(struct clk_init_data
){
308 .name
= "gcc_gp1_clk_src",
309 .parent_data
= gcc_parent_data_5
,
310 .num_parents
= ARRAY_SIZE(gcc_parent_data_5
),
311 .ops
= &clk_rcg2_ops
,
315 static struct clk_rcg2 gcc_gp2_clk_src
= {
319 .parent_map
= gcc_parent_map_5
,
320 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
321 .clkr
.hw
.init
= &(struct clk_init_data
){
322 .name
= "gcc_gp2_clk_src",
323 .parent_data
= gcc_parent_data_5
,
324 .num_parents
= ARRAY_SIZE(gcc_parent_data_5
),
325 .ops
= &clk_rcg2_ops
,
329 static struct clk_rcg2 gcc_gp3_clk_src
= {
333 .parent_map
= gcc_parent_map_5
,
334 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
335 .clkr
.hw
.init
= &(struct clk_init_data
){
336 .name
= "gcc_gp3_clk_src",
337 .parent_data
= gcc_parent_data_5
,
338 .num_parents
= ARRAY_SIZE(gcc_parent_data_5
),
339 .ops
= &clk_rcg2_ops
,
343 static const struct freq_tbl ftbl_gcc_pdm2_clk_src
[] = {
344 F(19200000, P_BI_TCXO
, 1, 0, 0),
345 F(60000000, P_GPLL0_OUT_EVEN
, 5, 0, 0),
349 static struct clk_rcg2 gcc_pdm2_clk_src
= {
353 .parent_map
= gcc_parent_map_1
,
354 .freq_tbl
= ftbl_gcc_pdm2_clk_src
,
355 .clkr
.hw
.init
= &(struct clk_init_data
){
356 .name
= "gcc_pdm2_clk_src",
357 .parent_data
= gcc_parent_data_1
,
358 .num_parents
= ARRAY_SIZE(gcc_parent_data_1
),
359 .ops
= &clk_rcg2_ops
,
363 static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src
[] = {
364 F(7372800, P_GPLL0_OUT_EVEN
, 1, 384, 15625),
365 F(14745600, P_GPLL0_OUT_EVEN
, 1, 768, 15625),
366 F(19200000, P_BI_TCXO
, 1, 0, 0),
367 F(29491200, P_GPLL0_OUT_EVEN
, 1, 1536, 15625),
368 F(32000000, P_GPLL0_OUT_EVEN
, 1, 8, 75),
369 F(48000000, P_GPLL0_OUT_EVEN
, 1, 4, 25),
370 F(64000000, P_GPLL0_OUT_EVEN
, 1, 16, 75),
371 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
372 F(80000000, P_GPLL0_OUT_EVEN
, 1, 4, 15),
373 F(96000000, P_GPLL0_OUT_EVEN
, 1, 8, 25),
374 F(100000000, P_GPLL0_OUT_EVEN
, 3, 0, 0),
375 F(102400000, P_GPLL0_OUT_EVEN
, 1, 128, 375),
376 F(112000000, P_GPLL0_OUT_EVEN
, 1, 28, 75),
377 F(117964800, P_GPLL0_OUT_EVEN
, 1, 6144, 15625),
378 F(120000000, P_GPLL0_OUT_EVEN
, 2.5, 0, 0),
379 F(128000000, P_GPLL6_OUT_EVEN
, 3, 0, 0),
383 static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init
= {
384 .name
= "gcc_qupv3_wrap0_s0_clk_src",
385 .parent_data
= gcc_parent_data_0
,
386 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
387 .ops
= &clk_rcg2_ops
,
390 static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src
= {
394 .parent_map
= gcc_parent_map_0
,
395 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
396 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s0_clk_src_init
,
399 static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init
= {
400 .name
= "gcc_qupv3_wrap0_s1_clk_src",
401 .parent_data
= gcc_parent_data_0
,
402 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
403 .ops
= &clk_rcg2_ops
,
406 static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src
= {
410 .parent_map
= gcc_parent_map_0
,
411 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
412 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s1_clk_src_init
,
415 static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init
= {
416 .name
= "gcc_qupv3_wrap0_s2_clk_src",
417 .parent_data
= gcc_parent_data_0
,
418 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
419 .ops
= &clk_rcg2_ops
,
422 static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src
= {
426 .parent_map
= gcc_parent_map_0
,
427 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
428 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s2_clk_src_init
,
431 static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init
= {
432 .name
= "gcc_qupv3_wrap0_s3_clk_src",
433 .parent_data
= gcc_parent_data_0
,
434 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
435 .ops
= &clk_rcg2_ops
,
438 static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src
= {
442 .parent_map
= gcc_parent_map_0
,
443 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
444 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s3_clk_src_init
,
447 static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init
= {
448 .name
= "gcc_qupv3_wrap0_s4_clk_src",
449 .parent_data
= gcc_parent_data_0
,
450 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
451 .ops
= &clk_rcg2_ops
,
454 static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src
= {
458 .parent_map
= gcc_parent_map_0
,
459 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
460 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s4_clk_src_init
,
463 static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init
= {
464 .name
= "gcc_qupv3_wrap0_s5_clk_src",
465 .parent_data
= gcc_parent_data_0
,
466 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
467 .ops
= &clk_rcg2_ops
,
470 static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src
= {
474 .parent_map
= gcc_parent_map_0
,
475 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
476 .clkr
.hw
.init
= &gcc_qupv3_wrap0_s5_clk_src_init
,
479 static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init
= {
480 .name
= "gcc_qupv3_wrap1_s0_clk_src",
481 .parent_data
= gcc_parent_data_0
,
482 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
483 .ops
= &clk_rcg2_ops
,
486 static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src
= {
490 .parent_map
= gcc_parent_map_0
,
491 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
492 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s0_clk_src_init
,
495 static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init
= {
496 .name
= "gcc_qupv3_wrap1_s1_clk_src",
497 .parent_data
= gcc_parent_data_0
,
498 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
499 .ops
= &clk_rcg2_ops
,
502 static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src
= {
506 .parent_map
= gcc_parent_map_0
,
507 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
508 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s1_clk_src_init
,
511 static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init
= {
512 .name
= "gcc_qupv3_wrap1_s2_clk_src",
513 .parent_data
= gcc_parent_data_0
,
514 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
515 .ops
= &clk_rcg2_ops
,
518 static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src
= {
522 .parent_map
= gcc_parent_map_0
,
523 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
524 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s2_clk_src_init
,
527 static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init
= {
528 .name
= "gcc_qupv3_wrap1_s3_clk_src",
529 .parent_data
= gcc_parent_data_0
,
530 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
531 .ops
= &clk_rcg2_ops
,
534 static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src
= {
538 .parent_map
= gcc_parent_map_0
,
539 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
540 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s3_clk_src_init
,
543 static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init
= {
544 .name
= "gcc_qupv3_wrap1_s4_clk_src",
545 .parent_data
= gcc_parent_data_0
,
546 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
547 .ops
= &clk_rcg2_ops
,
550 static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src
= {
554 .parent_map
= gcc_parent_map_0
,
555 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
556 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s4_clk_src_init
,
559 static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init
= {
560 .name
= "gcc_qupv3_wrap1_s5_clk_src",
561 .parent_data
= gcc_parent_data_0
,
562 .num_parents
= ARRAY_SIZE(gcc_parent_data_0
),
563 .ops
= &clk_rcg2_ops
,
566 static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src
= {
570 .parent_map
= gcc_parent_map_0
,
571 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
572 .clkr
.hw
.init
= &gcc_qupv3_wrap1_s5_clk_src_init
,
575 static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_src
[] = {
576 F(144000, P_BI_TCXO
, 16, 3, 25),
577 F(400000, P_BI_TCXO
, 12, 1, 4),
578 F(19200000, P_BI_TCXO
, 1, 0, 0),
579 F(20000000, P_GPLL0_OUT_EVEN
, 5, 1, 3),
580 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
581 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
582 F(100000000, P_GPLL0_OUT_EVEN
, 3, 0, 0),
583 F(192000000, P_GPLL6_OUT_EVEN
, 2, 0, 0),
584 F(384000000, P_GPLL6_OUT_EVEN
, 1, 0, 0),
588 static struct clk_rcg2 gcc_sdcc1_apps_clk_src
= {
592 .parent_map
= gcc_parent_map_7
,
593 .freq_tbl
= ftbl_gcc_sdcc1_apps_clk_src
,
594 .clkr
.hw
.init
= &(struct clk_init_data
){
595 .name
= "gcc_sdcc1_apps_clk_src",
596 .parent_data
= gcc_parent_data_7
,
597 .num_parents
= ARRAY_SIZE(gcc_parent_data_7
),
598 .ops
= &clk_rcg2_ops
,
602 static const struct freq_tbl ftbl_gcc_sdcc1_ice_core_clk_src
[] = {
603 F(100000000, P_GPLL0_OUT_EVEN
, 3, 0, 0),
604 F(150000000, P_GPLL0_OUT_EVEN
, 2, 0, 0),
605 F(300000000, P_GPLL0_OUT_EVEN
, 1, 0, 0),
609 static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src
= {
613 .parent_map
= gcc_parent_map_1
,
614 .freq_tbl
= ftbl_gcc_sdcc1_ice_core_clk_src
,
615 .clkr
.hw
.init
= &(struct clk_init_data
){
616 .name
= "gcc_sdcc1_ice_core_clk_src",
617 .parent_data
= gcc_parent_data_1
,
618 .num_parents
= ARRAY_SIZE(gcc_parent_data_1
),
619 .ops
= &clk_rcg2_ops
,
623 static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src
[] = {
624 F(400000, P_BI_TCXO
, 12, 1, 4),
625 F(9600000, P_BI_TCXO
, 2, 0, 0),
626 F(19200000, P_BI_TCXO
, 1, 0, 0),
627 F(25000000, P_GPLL0_OUT_ODD
, 8, 0, 0),
628 F(50000000, P_GPLL0_OUT_ODD
, 4, 0, 0),
629 F(100000000, P_GPLL0_OUT_ODD
, 2, 0, 0),
630 F(202000000, P_GPLL7_OUT_MAIN
, 4, 0, 0),
634 static struct clk_rcg2 gcc_sdcc2_apps_clk_src
= {
638 .parent_map
= gcc_parent_map_8
,
639 .freq_tbl
= ftbl_gcc_sdcc2_apps_clk_src
,
640 .clkr
.hw
.init
= &(struct clk_init_data
){
641 .name
= "gcc_sdcc2_apps_clk_src",
642 .parent_data
= gcc_parent_data_8
,
643 .num_parents
= ARRAY_SIZE(gcc_parent_data_8
),
644 .flags
= CLK_OPS_PARENT_ENABLE
,
645 .ops
= &clk_rcg2_floor_ops
,
649 static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src
[] = {
650 F(25000000, P_GPLL0_OUT_ODD
, 8, 0, 0),
651 F(50000000, P_GPLL0_OUT_ODD
, 4, 0, 0),
652 F(100000000, P_GPLL0_OUT_ODD
, 2, 0, 0),
653 F(200000000, P_GPLL0_OUT_ODD
, 1, 0, 0),
654 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
658 static struct clk_rcg2 gcc_ufs_phy_axi_clk_src
= {
662 .parent_map
= gcc_parent_map_4
,
663 .freq_tbl
= ftbl_gcc_ufs_phy_axi_clk_src
,
664 .clkr
.hw
.init
= &(struct clk_init_data
){
665 .name
= "gcc_ufs_phy_axi_clk_src",
666 .parent_data
= gcc_parent_data_4
,
667 .num_parents
= ARRAY_SIZE(gcc_parent_data_4
),
668 .ops
= &clk_rcg2_ops
,
672 static const struct freq_tbl ftbl_gcc_ufs_phy_ice_core_clk_src
[] = {
673 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
674 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
675 F(150000000, P_GPLL0_OUT_EVEN
, 2, 0, 0),
676 F(300000000, P_GPLL0_OUT_EVEN
, 1, 0, 0),
680 static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src
= {
684 .parent_map
= gcc_parent_map_1
,
685 .freq_tbl
= ftbl_gcc_ufs_phy_ice_core_clk_src
,
686 .clkr
.hw
.init
= &(struct clk_init_data
){
687 .name
= "gcc_ufs_phy_ice_core_clk_src",
688 .parent_data
= gcc_parent_data_1
,
689 .num_parents
= ARRAY_SIZE(gcc_parent_data_1
),
690 .ops
= &clk_rcg2_ops
,
694 static const struct freq_tbl ftbl_gcc_ufs_phy_phy_aux_clk_src
[] = {
695 F(9600000, P_BI_TCXO
, 2, 0, 0),
696 F(19200000, P_BI_TCXO
, 1, 0, 0),
700 static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src
= {
704 .freq_tbl
= ftbl_gcc_ufs_phy_phy_aux_clk_src
,
705 .clkr
.hw
.init
= &(struct clk_init_data
){
706 .name
= "gcc_ufs_phy_phy_aux_clk_src",
707 .parent_data
= &(const struct clk_parent_data
){
708 .fw_name
= "bi_tcxo",
711 .ops
= &clk_rcg2_ops
,
715 static const struct freq_tbl ftbl_gcc_ufs_phy_unipro_core_clk_src
[] = {
716 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
717 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
718 F(150000000, P_GPLL0_OUT_EVEN
, 2, 0, 0),
722 static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src
= {
726 .parent_map
= gcc_parent_map_1
,
727 .freq_tbl
= ftbl_gcc_ufs_phy_unipro_core_clk_src
,
728 .clkr
.hw
.init
= &(struct clk_init_data
){
729 .name
= "gcc_ufs_phy_unipro_core_clk_src",
730 .parent_data
= gcc_parent_data_1
,
731 .num_parents
= ARRAY_SIZE(gcc_parent_data_1
),
732 .ops
= &clk_rcg2_ops
,
736 static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src
[] = {
737 F(66666667, P_GPLL0_OUT_ODD
, 3, 0, 0),
738 F(133333333, P_GPLL0_OUT_MAIN
, 4.5, 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_usb30_prim_master_clk_src
= {
748 .parent_map
= gcc_parent_map_4
,
749 .freq_tbl
= ftbl_gcc_usb30_prim_master_clk_src
,
750 .clkr
.hw
.init
= &(struct clk_init_data
){
751 .name
= "gcc_usb30_prim_master_clk_src",
752 .parent_data
= gcc_parent_data_4
,
753 .num_parents
= ARRAY_SIZE(gcc_parent_data_4
),
754 .ops
= &clk_rcg2_ops
,
758 static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src
[] = {
759 F(19200000, P_BI_TCXO
, 1, 0, 0),
763 static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src
= {
767 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
768 .clkr
.hw
.init
= &(struct clk_init_data
){
769 .name
= "gcc_usb30_prim_mock_utmi_clk_src",
770 .parent_data
= &(const struct clk_parent_data
){
771 .fw_name
= "bi_tcxo",
774 .ops
= &clk_rcg2_ops
,
778 static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src
= {
782 .parent_map
= gcc_parent_map_6
,
783 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
784 .clkr
.hw
.init
= &(struct clk_init_data
){
785 .name
= "gcc_usb3_prim_phy_aux_clk_src",
786 .parent_data
= gcc_parent_data_6
,
787 .num_parents
= ARRAY_SIZE(gcc_parent_data_6
),
788 .ops
= &clk_rcg2_ops
,
792 static struct clk_branch gcc_aggre_ufs_phy_axi_clk
= {
794 .halt_check
= BRANCH_HALT_DELAY
,
798 .enable_reg
= 0x3e014,
799 .enable_mask
= BIT(0),
800 .hw
.init
= &(struct clk_init_data
){
801 .name
= "gcc_aggre_ufs_phy_axi_clk",
802 .parent_hws
= (const struct clk_hw
*[]){
803 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
,
806 .flags
= CLK_SET_RATE_PARENT
,
807 .ops
= &clk_branch2_ops
,
812 static struct clk_branch gcc_aggre_ufs_phy_axi_hw_ctl_clk
= {
814 .halt_check
= BRANCH_HALT
,
818 .enable_reg
= 0x3e014,
819 .enable_mask
= BIT(1),
820 .hw
.init
= &(struct clk_init_data
){
821 .name
= "gcc_aggre_ufs_phy_axi_hw_ctl_clk",
822 .parent_hws
= (const struct clk_hw
*[]){
823 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
,
826 .flags
= CLK_SET_RATE_PARENT
,
827 .ops
= &clk_branch2_ops
,
832 static struct clk_branch gcc_ufs_phy_axi_hw_ctl_clk
= {
834 .halt_check
= BRANCH_HALT
,
838 .enable_reg
= 0x3e014,
839 .enable_mask
= BIT(1),
840 .hw
.init
= &(struct clk_init_data
){
841 .name
= "gcc_ufs_phy_axi_hw_ctl_clk",
842 .parent_hws
= (const struct clk_hw
*[]){
843 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
,
846 .flags
= CLK_SET_RATE_PARENT
,
847 .ops
= &clk_branch2_ops
,
852 static struct clk_branch gcc_aggre_usb3_prim_axi_clk
= {
854 .halt_check
= BRANCH_HALT
,
858 .enable_reg
= 0x3e010,
859 .enable_mask
= BIT(0),
860 .hw
.init
= &(struct clk_init_data
){
861 .name
= "gcc_aggre_usb3_prim_axi_clk",
862 .parent_hws
= (const struct clk_hw
*[]){
863 &gcc_usb30_prim_master_clk_src
.clkr
.hw
,
866 .flags
= CLK_SET_RATE_PARENT
,
867 .ops
= &clk_branch2_ops
,
872 static struct clk_branch gcc_boot_rom_ahb_clk
= {
874 .halt_check
= BRANCH_HALT_VOTED
,
878 .enable_reg
= 0x52000,
879 .enable_mask
= BIT(28),
880 .hw
.init
= &(struct clk_init_data
){
881 .name
= "gcc_boot_rom_ahb_clk",
882 .ops
= &clk_branch2_ops
,
887 static struct clk_branch gcc_camera_ahb_clk
= {
889 .halt_check
= BRANCH_HALT
,
893 .enable_reg
= 0x17008,
894 .enable_mask
= BIT(0),
895 .hw
.init
= &(struct clk_init_data
){
896 .name
= "gcc_camera_ahb_clk",
897 .flags
= CLK_IS_CRITICAL
,
898 .ops
= &clk_branch2_ops
,
903 static struct clk_branch gcc_camera_axi_clk
= {
905 .halt_check
= BRANCH_HALT
,
909 .enable_reg
= 0x17018,
910 .enable_mask
= BIT(0),
911 .hw
.init
= &(struct clk_init_data
){
912 .name
= "gcc_camera_axi_clk",
913 .ops
= &clk_branch2_ops
,
918 static struct clk_branch gcc_camera_throttle_nrt_axi_clk
= {
920 .halt_check
= BRANCH_VOTED
,
924 .enable_reg
= 0x17078,
925 .enable_mask
= BIT(0),
926 .hw
.init
= &(struct clk_init_data
){
927 .name
= "gcc_camera_throttle_nrt_axi_clk",
928 .ops
= &clk_branch2_ops
,
933 static struct clk_branch gcc_camera_throttle_rt_axi_clk
= {
935 .halt_check
= BRANCH_VOTED
,
939 .enable_reg
= 0x17024,
940 .enable_mask
= BIT(0),
941 .hw
.init
= &(struct clk_init_data
){
942 .name
= "gcc_camera_throttle_rt_axi_clk",
943 .ops
= &clk_branch2_ops
,
948 static struct clk_branch gcc_camera_xo_clk
= {
950 .halt_check
= BRANCH_HALT
,
952 .enable_reg
= 0x17030,
953 .enable_mask
= BIT(0),
954 .hw
.init
= &(struct clk_init_data
){
955 .name
= "gcc_camera_xo_clk",
956 .flags
= CLK_IS_CRITICAL
,
957 .ops
= &clk_branch2_ops
,
962 static struct clk_branch gcc_ce1_ahb_clk
= {
964 .halt_check
= BRANCH_HALT_VOTED
,
968 .enable_reg
= 0x52008,
969 .enable_mask
= BIT(3),
970 .hw
.init
= &(struct clk_init_data
){
971 .name
= "gcc_ce1_ahb_clk",
972 .ops
= &clk_branch2_ops
,
977 static struct clk_branch gcc_ce1_axi_clk
= {
979 .halt_check
= BRANCH_HALT_VOTED
,
981 .enable_reg
= 0x52008,
982 .enable_mask
= BIT(2),
983 .hw
.init
= &(struct clk_init_data
){
984 .name
= "gcc_ce1_axi_clk",
985 .ops
= &clk_branch2_ops
,
990 static struct clk_branch gcc_ce1_clk
= {
992 .halt_check
= BRANCH_HALT_VOTED
,
994 .enable_reg
= 0x52008,
995 .enable_mask
= BIT(1),
996 .hw
.init
= &(struct clk_init_data
){
997 .name
= "gcc_ce1_clk",
998 .ops
= &clk_branch2_ops
,
1003 static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk
= {
1004 .halt_reg
= 0x1101c,
1005 .halt_check
= BRANCH_HALT
,
1006 .hwcg_reg
= 0x1101c,
1009 .enable_reg
= 0x1101c,
1010 .enable_mask
= BIT(0),
1011 .hw
.init
= &(struct clk_init_data
){
1012 .name
= "gcc_cfg_noc_usb3_prim_axi_clk",
1013 .parent_hws
= (const struct clk_hw
*[]){
1014 &gcc_usb30_prim_master_clk_src
.clkr
.hw
,
1017 .flags
= CLK_SET_RATE_PARENT
,
1018 .ops
= &clk_branch2_ops
,
1023 static struct clk_branch gcc_cpuss_ahb_clk
= {
1024 .halt_reg
= 0x30000,
1025 .halt_check
= BRANCH_HALT_VOTED
,
1026 .hwcg_reg
= 0x30000,
1029 .enable_reg
= 0x52008,
1030 .enable_mask
= BIT(4),
1031 .hw
.init
= &(struct clk_init_data
){
1032 .name
= "gcc_cpuss_ahb_clk",
1033 .parent_hws
= (const struct clk_hw
*[]){
1034 &gcc_cpuss_ahb_clk_src
.clkr
.hw
,
1037 .flags
= CLK_IS_CRITICAL
| CLK_SET_RATE_PARENT
,
1038 .ops
= &clk_branch2_ops
,
1043 static struct clk_branch gcc_cpuss_gnoc_clk
= {
1044 .halt_reg
= 0x30004,
1045 .halt_check
= BRANCH_HALT_VOTED
,
1046 .hwcg_reg
= 0x30004,
1049 .enable_reg
= 0x52008,
1050 .enable_mask
= BIT(5),
1051 .hw
.init
= &(struct clk_init_data
){
1052 .name
= "gcc_cpuss_gnoc_clk",
1053 .flags
= CLK_IS_CRITICAL
,
1054 .ops
= &clk_branch2_ops
,
1059 static struct clk_branch gcc_cpuss_rbcpr_clk
= {
1060 .halt_reg
= 0x30008,
1061 .halt_check
= BRANCH_HALT
,
1063 .enable_reg
= 0x30008,
1064 .enable_mask
= BIT(0),
1065 .hw
.init
= &(struct clk_init_data
){
1066 .name
= "gcc_cpuss_rbcpr_clk",
1067 .ops
= &clk_branch2_ops
,
1072 static struct clk_branch gcc_ddrss_gpu_axi_clk
= {
1073 .halt_reg
= 0x2d038,
1074 .halt_check
= BRANCH_VOTED
,
1075 .hwcg_reg
= 0x2d038,
1078 .enable_reg
= 0x2d038,
1079 .enable_mask
= BIT(0),
1080 .hw
.init
= &(struct clk_init_data
){
1081 .name
= "gcc_ddrss_gpu_axi_clk",
1082 .ops
= &clk_branch2_ops
,
1087 static struct clk_branch gcc_disp_ahb_clk
= {
1088 .halt_reg
= 0x1700c,
1089 .halt_check
= BRANCH_HALT
,
1090 .hwcg_reg
= 0x1700c,
1093 .enable_reg
= 0x1700c,
1094 .enable_mask
= BIT(0),
1095 .hw
.init
= &(struct clk_init_data
){
1096 .name
= "gcc_disp_ahb_clk",
1097 .flags
= CLK_IS_CRITICAL
,
1098 .ops
= &clk_branch2_ops
,
1103 static struct clk_branch gcc_disp_axi_clk
= {
1104 .halt_reg
= 0x1701c,
1105 .halt_check
= BRANCH_HALT
,
1106 .hwcg_reg
= 0x1701c,
1109 .enable_reg
= 0x1701c,
1110 .enable_mask
= BIT(0),
1111 .hw
.init
= &(struct clk_init_data
){
1112 .name
= "gcc_disp_axi_clk",
1113 .ops
= &clk_branch2_ops
,
1118 static struct clk_branch gcc_disp_cc_sleep_clk
= {
1119 .halt_reg
= 0x17074,
1120 .halt_check
= BRANCH_HALT_DELAY
,
1121 .hwcg_reg
= 0x17074,
1124 .enable_reg
= 0x17074,
1125 .enable_mask
= BIT(0),
1126 .hw
.init
= &(struct clk_init_data
){
1127 .name
= "gcc_disp_cc_sleep_clk",
1128 .ops
= &clk_branch2_ops
,
1133 static struct clk_branch gcc_disp_cc_xo_clk
= {
1134 .halt_reg
= 0x17070,
1135 .halt_check
= BRANCH_HALT
,
1136 .hwcg_reg
= 0x17070,
1139 .enable_reg
= 0x17070,
1140 .enable_mask
= BIT(0),
1141 .hw
.init
= &(struct clk_init_data
){
1142 .name
= "gcc_disp_cc_xo_clk",
1143 .flags
= CLK_IS_CRITICAL
,
1144 .ops
= &clk_branch2_ops
,
1149 static struct clk_branch gcc_disp_gpll0_clk
= {
1150 .halt_check
= BRANCH_HALT_DELAY
,
1152 .enable_reg
= 0x52000,
1153 .enable_mask
= BIT(2),
1154 .hw
.init
= &(struct clk_init_data
){
1155 .name
= "gcc_disp_gpll0_clk",
1156 .parent_hws
= (const struct clk_hw
*[]){
1160 .ops
= &clk_branch2_ops
,
1165 static struct clk_branch gcc_disp_throttle_axi_clk
= {
1166 .halt_reg
= 0x17028,
1167 .halt_check
= BRANCH_HALT
,
1168 .hwcg_reg
= 0x17028,
1171 .enable_reg
= 0x17028,
1172 .enable_mask
= BIT(0),
1173 .hw
.init
= &(struct clk_init_data
){
1174 .name
= "gcc_disp_throttle_axi_clk",
1175 .ops
= &clk_branch2_ops
,
1180 static struct clk_branch gcc_disp_xo_clk
= {
1181 .halt_reg
= 0x17034,
1182 .halt_check
= BRANCH_HALT
,
1184 .enable_reg
= 0x17034,
1185 .enable_mask
= BIT(0),
1186 .hw
.init
= &(struct clk_init_data
){
1187 .name
= "gcc_disp_xo_clk",
1188 .ops
= &clk_branch2_ops
,
1193 static struct clk_branch gcc_gp1_clk
= {
1194 .halt_reg
= 0x37000,
1195 .halt_check
= BRANCH_HALT
,
1197 .enable_reg
= 0x37000,
1198 .enable_mask
= BIT(0),
1199 .hw
.init
= &(struct clk_init_data
){
1200 .name
= "gcc_gp1_clk",
1201 .parent_hws
= (const struct clk_hw
*[]){
1202 &gcc_gp1_clk_src
.clkr
.hw
,
1205 .flags
= CLK_SET_RATE_PARENT
,
1206 .ops
= &clk_branch2_ops
,
1211 static struct clk_branch gcc_gp2_clk
= {
1212 .halt_reg
= 0x38000,
1213 .halt_check
= BRANCH_HALT
,
1215 .enable_reg
= 0x38000,
1216 .enable_mask
= BIT(0),
1217 .hw
.init
= &(struct clk_init_data
){
1218 .name
= "gcc_gp2_clk",
1219 .parent_hws
= (const struct clk_hw
*[]){
1220 &gcc_gp2_clk_src
.clkr
.hw
,
1223 .flags
= CLK_SET_RATE_PARENT
,
1224 .ops
= &clk_branch2_ops
,
1229 static struct clk_branch gcc_gp3_clk
= {
1230 .halt_reg
= 0x39000,
1231 .halt_check
= BRANCH_HALT
,
1233 .enable_reg
= 0x39000,
1234 .enable_mask
= BIT(0),
1235 .hw
.init
= &(struct clk_init_data
){
1236 .name
= "gcc_gp3_clk",
1237 .parent_hws
= (const struct clk_hw
*[]){
1238 &gcc_gp3_clk_src
.clkr
.hw
,
1241 .flags
= CLK_SET_RATE_PARENT
,
1242 .ops
= &clk_branch2_ops
,
1247 static struct clk_branch gcc_gpu_cfg_ahb_clk
= {
1248 .halt_reg
= 0x45004,
1249 .halt_check
= BRANCH_HALT
,
1250 .hwcg_reg
= 0x45004,
1253 .enable_reg
= 0x45004,
1254 .enable_mask
= BIT(0),
1255 .hw
.init
= &(struct clk_init_data
){
1256 .name
= "gcc_gpu_cfg_ahb_clk",
1257 .flags
= CLK_IS_CRITICAL
,
1258 .ops
= &clk_branch2_ops
,
1263 static struct clk_branch gcc_gpu_gpll0_clk
= {
1264 .halt_check
= BRANCH_HALT_DELAY
,
1266 .enable_reg
= 0x52008,
1267 .enable_mask
= BIT(7),
1268 .hw
.init
= &(struct clk_init_data
){
1269 .name
= "gcc_gpu_gpll0_clk",
1270 .parent_hws
= (const struct clk_hw
*[]){
1274 .ops
= &clk_branch2_ops
,
1279 static struct clk_branch gcc_gpu_gpll0_div_clk
= {
1280 .halt_check
= BRANCH_HALT_DELAY
,
1282 .enable_reg
= 0x52008,
1283 .enable_mask
= BIT(8),
1284 .hw
.init
= &(struct clk_init_data
){
1285 .name
= "gcc_gpu_gpll0_div_clk",
1286 .parent_hws
= (const struct clk_hw
*[]){
1287 &gcc_gpu_gpll0_main_div_clk_src
.clkr
.hw
,
1290 .ops
= &clk_branch2_ops
,
1295 static struct clk_branch gcc_gpu_memnoc_gfx_clk
= {
1296 .halt_reg
= 0x4500c,
1297 .halt_check
= BRANCH_VOTED
,
1298 .hwcg_reg
= 0x4500c,
1301 .enable_reg
= 0x4500c,
1302 .enable_mask
= BIT(0),
1303 .hw
.init
= &(struct clk_init_data
){
1304 .name
= "gcc_gpu_memnoc_gfx_clk",
1305 .ops
= &clk_branch2_ops
,
1310 static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk
= {
1311 .halt_reg
= 0x45014,
1312 .halt_check
= BRANCH_HALT
,
1313 .hwcg_reg
= 0x45014,
1316 .enable_reg
= 0x45014,
1317 .enable_mask
= BIT(0),
1318 .hw
.init
= &(struct clk_init_data
){
1319 .name
= "gcc_gpu_snoc_dvm_gfx_clk",
1320 .ops
= &clk_branch2_ops
,
1325 static struct clk_branch gcc_npu_axi_clk
= {
1326 .halt_reg
= 0x4c008,
1327 .halt_check
= BRANCH_VOTED
,
1328 .hwcg_reg
= 0x4c008,
1331 .enable_reg
= 0x4c008,
1332 .enable_mask
= BIT(0),
1333 .hw
.init
= &(struct clk_init_data
){
1334 .name
= "gcc_npu_axi_clk",
1335 .ops
= &clk_branch2_ops
,
1340 static struct clk_branch gcc_npu_bwmon_axi_clk
= {
1341 .halt_reg
= 0x4d004,
1342 .halt_check
= BRANCH_HALT_DELAY
,
1343 .hwcg_reg
= 0x4d004,
1346 .enable_reg
= 0x4d004,
1347 .enable_mask
= BIT(0),
1348 .hw
.init
= &(struct clk_init_data
){
1349 .name
= "gcc_npu_bwmon_axi_clk",
1350 .ops
= &clk_branch2_ops
,
1355 static struct clk_branch gcc_npu_bwmon_dma_cfg_ahb_clk
= {
1356 .halt_reg
= 0x4d008,
1357 .halt_check
= BRANCH_HALT
,
1359 .enable_reg
= 0x4d008,
1360 .enable_mask
= BIT(0),
1361 .hw
.init
= &(struct clk_init_data
){
1362 .name
= "gcc_npu_bwmon_dma_cfg_ahb_clk",
1363 .ops
= &clk_branch2_ops
,
1368 static struct clk_branch gcc_npu_bwmon_dsp_cfg_ahb_clk
= {
1369 .halt_reg
= 0x4d00c,
1370 .halt_check
= BRANCH_HALT
,
1372 .enable_reg
= 0x4d00c,
1373 .enable_mask
= BIT(0),
1374 .hw
.init
= &(struct clk_init_data
){
1375 .name
= "gcc_npu_bwmon_dsp_cfg_ahb_clk",
1376 .ops
= &clk_branch2_ops
,
1381 static struct clk_branch gcc_npu_cfg_ahb_clk
= {
1382 .halt_reg
= 0x4c004,
1383 .halt_check
= BRANCH_HALT
,
1384 .hwcg_reg
= 0x4c004,
1387 .enable_reg
= 0x4c004,
1388 .enable_mask
= BIT(0),
1389 .hw
.init
= &(struct clk_init_data
){
1390 .name
= "gcc_npu_cfg_ahb_clk",
1391 .flags
= CLK_IS_CRITICAL
,
1392 .ops
= &clk_branch2_ops
,
1397 static struct clk_branch gcc_npu_dma_clk
= {
1398 .halt_reg
= 0x4c140,
1399 .halt_check
= BRANCH_VOTED
,
1400 .hwcg_reg
= 0x4c140,
1403 .enable_reg
= 0x4c140,
1404 .enable_mask
= BIT(0),
1405 .hw
.init
= &(struct clk_init_data
){
1406 .name
= "gcc_npu_dma_clk",
1407 .ops
= &clk_branch2_ops
,
1412 static struct clk_branch gcc_npu_gpll0_clk
= {
1413 .halt_check
= BRANCH_HALT_DELAY
,
1415 .enable_reg
= 0x52008,
1416 .enable_mask
= BIT(9),
1417 .hw
.init
= &(struct clk_init_data
){
1418 .name
= "gcc_npu_gpll0_clk",
1419 .parent_hws
= (const struct clk_hw
*[]){
1423 .ops
= &clk_branch2_ops
,
1428 static struct clk_branch gcc_npu_gpll0_div_clk
= {
1429 .halt_check
= BRANCH_HALT_DELAY
,
1431 .enable_reg
= 0x52008,
1432 .enable_mask
= BIT(10),
1433 .hw
.init
= &(struct clk_init_data
){
1434 .name
= "gcc_npu_gpll0_div_clk",
1435 .parent_hws
= (const struct clk_hw
*[]){
1436 &gcc_npu_pll0_main_div_clk_src
.clkr
.hw
,
1439 .ops
= &clk_branch2_ops
,
1444 static struct clk_branch gcc_pdm2_clk
= {
1445 .halt_reg
= 0x2300c,
1446 .halt_check
= BRANCH_HALT
,
1448 .enable_reg
= 0x2300c,
1449 .enable_mask
= BIT(0),
1450 .hw
.init
= &(struct clk_init_data
){
1451 .name
= "gcc_pdm2_clk",
1452 .parent_hws
= (const struct clk_hw
*[]){
1453 &gcc_pdm2_clk_src
.clkr
.hw
,
1456 .flags
= CLK_SET_RATE_PARENT
,
1457 .ops
= &clk_branch2_ops
,
1462 static struct clk_branch gcc_pdm_ahb_clk
= {
1463 .halt_reg
= 0x23004,
1464 .halt_check
= BRANCH_HALT
,
1465 .hwcg_reg
= 0x23004,
1468 .enable_reg
= 0x23004,
1469 .enable_mask
= BIT(0),
1470 .hw
.init
= &(struct clk_init_data
){
1471 .name
= "gcc_pdm_ahb_clk",
1472 .ops
= &clk_branch2_ops
,
1477 static struct clk_branch gcc_pdm_xo4_clk
= {
1478 .halt_reg
= 0x23008,
1479 .halt_check
= BRANCH_HALT
,
1481 .enable_reg
= 0x23008,
1482 .enable_mask
= BIT(0),
1483 .hw
.init
= &(struct clk_init_data
){
1484 .name
= "gcc_pdm_xo4_clk",
1485 .ops
= &clk_branch2_ops
,
1490 static struct clk_branch gcc_prng_ahb_clk
= {
1491 .halt_reg
= 0x24004,
1492 .halt_check
= BRANCH_HALT_VOTED
,
1493 .hwcg_reg
= 0x24004,
1496 .enable_reg
= 0x52000,
1497 .enable_mask
= BIT(26),
1498 .hw
.init
= &(struct clk_init_data
){
1499 .name
= "gcc_prng_ahb_clk",
1500 .ops
= &clk_branch2_ops
,
1505 static struct clk_branch gcc_qupv3_wrap0_core_2x_clk
= {
1506 .halt_reg
= 0x21014,
1507 .halt_check
= BRANCH_HALT_VOTED
,
1509 .enable_reg
= 0x52000,
1510 .enable_mask
= BIT(9),
1511 .hw
.init
= &(struct clk_init_data
){
1512 .name
= "gcc_qupv3_wrap0_core_2x_clk",
1513 .ops
= &clk_branch2_ops
,
1518 static struct clk_branch gcc_qupv3_wrap0_core_clk
= {
1519 .halt_reg
= 0x2100c,
1520 .halt_check
= BRANCH_HALT_VOTED
,
1522 .enable_reg
= 0x52000,
1523 .enable_mask
= BIT(8),
1524 .hw
.init
= &(struct clk_init_data
){
1525 .name
= "gcc_qupv3_wrap0_core_clk",
1526 .ops
= &clk_branch2_ops
,
1531 static struct clk_branch gcc_qupv3_wrap0_s0_clk
= {
1532 .halt_reg
= 0x21144,
1533 .halt_check
= BRANCH_HALT_VOTED
,
1535 .enable_reg
= 0x52000,
1536 .enable_mask
= BIT(10),
1537 .hw
.init
= &(struct clk_init_data
){
1538 .name
= "gcc_qupv3_wrap0_s0_clk",
1539 .parent_hws
= (const struct clk_hw
*[]){
1540 &gcc_qupv3_wrap0_s0_clk_src
.clkr
.hw
,
1543 .flags
= CLK_SET_RATE_PARENT
,
1544 .ops
= &clk_branch2_ops
,
1549 static struct clk_branch gcc_qupv3_wrap0_s1_clk
= {
1550 .halt_reg
= 0x21274,
1551 .halt_check
= BRANCH_HALT_VOTED
,
1553 .enable_reg
= 0x52000,
1554 .enable_mask
= BIT(11),
1555 .hw
.init
= &(struct clk_init_data
){
1556 .name
= "gcc_qupv3_wrap0_s1_clk",
1557 .parent_hws
= (const struct clk_hw
*[]){
1558 &gcc_qupv3_wrap0_s1_clk_src
.clkr
.hw
,
1561 .flags
= CLK_SET_RATE_PARENT
,
1562 .ops
= &clk_branch2_ops
,
1567 static struct clk_branch gcc_qupv3_wrap0_s2_clk
= {
1568 .halt_reg
= 0x213a4,
1569 .halt_check
= BRANCH_HALT_VOTED
,
1571 .enable_reg
= 0x52000,
1572 .enable_mask
= BIT(12),
1573 .hw
.init
= &(struct clk_init_data
){
1574 .name
= "gcc_qupv3_wrap0_s2_clk",
1575 .parent_hws
= (const struct clk_hw
*[]){
1576 &gcc_qupv3_wrap0_s2_clk_src
.clkr
.hw
,
1579 .flags
= CLK_SET_RATE_PARENT
,
1580 .ops
= &clk_branch2_ops
,
1585 static struct clk_branch gcc_qupv3_wrap0_s3_clk
= {
1586 .halt_reg
= 0x214d4,
1587 .halt_check
= BRANCH_HALT_VOTED
,
1589 .enable_reg
= 0x52000,
1590 .enable_mask
= BIT(13),
1591 .hw
.init
= &(struct clk_init_data
){
1592 .name
= "gcc_qupv3_wrap0_s3_clk",
1593 .parent_hws
= (const struct clk_hw
*[]){
1594 &gcc_qupv3_wrap0_s3_clk_src
.clkr
.hw
,
1597 .flags
= CLK_SET_RATE_PARENT
,
1598 .ops
= &clk_branch2_ops
,
1603 static struct clk_branch gcc_qupv3_wrap0_s4_clk
= {
1604 .halt_reg
= 0x21604,
1605 .halt_check
= BRANCH_HALT_VOTED
,
1607 .enable_reg
= 0x52000,
1608 .enable_mask
= BIT(14),
1609 .hw
.init
= &(struct clk_init_data
){
1610 .name
= "gcc_qupv3_wrap0_s4_clk",
1611 .parent_hws
= (const struct clk_hw
*[]){
1612 &gcc_qupv3_wrap0_s4_clk_src
.clkr
.hw
,
1615 .flags
= CLK_SET_RATE_PARENT
,
1616 .ops
= &clk_branch2_ops
,
1621 static struct clk_branch gcc_qupv3_wrap0_s5_clk
= {
1622 .halt_reg
= 0x21734,
1623 .halt_check
= BRANCH_HALT_VOTED
,
1625 .enable_reg
= 0x52000,
1626 .enable_mask
= BIT(15),
1627 .hw
.init
= &(struct clk_init_data
){
1628 .name
= "gcc_qupv3_wrap0_s5_clk",
1629 .parent_hws
= (const struct clk_hw
*[]){
1630 &gcc_qupv3_wrap0_s5_clk_src
.clkr
.hw
,
1633 .flags
= CLK_SET_RATE_PARENT
,
1634 .ops
= &clk_branch2_ops
,
1639 static struct clk_branch gcc_qupv3_wrap1_core_2x_clk
= {
1640 .halt_reg
= 0x22004,
1641 .halt_check
= BRANCH_HALT_VOTED
,
1643 .enable_reg
= 0x52000,
1644 .enable_mask
= BIT(16),
1645 .hw
.init
= &(struct clk_init_data
){
1646 .name
= "gcc_qupv3_wrap1_core_2x_clk",
1647 .ops
= &clk_branch2_ops
,
1652 static struct clk_branch gcc_qupv3_wrap1_core_clk
= {
1653 .halt_reg
= 0x22008,
1654 .halt_check
= BRANCH_HALT_VOTED
,
1656 .enable_reg
= 0x52000,
1657 .enable_mask
= BIT(17),
1658 .hw
.init
= &(struct clk_init_data
){
1659 .name
= "gcc_qupv3_wrap1_core_clk",
1660 .ops
= &clk_branch2_ops
,
1665 static struct clk_branch gcc_qupv3_wrap1_s0_clk
= {
1666 .halt_reg
= 0x22014,
1667 .halt_check
= BRANCH_HALT_VOTED
,
1669 .enable_reg
= 0x52000,
1670 .enable_mask
= BIT(20),
1671 .hw
.init
= &(struct clk_init_data
){
1672 .name
= "gcc_qupv3_wrap1_s0_clk",
1673 .parent_hws
= (const struct clk_hw
*[]){
1674 &gcc_qupv3_wrap1_s0_clk_src
.clkr
.hw
,
1677 .flags
= CLK_SET_RATE_PARENT
,
1678 .ops
= &clk_branch2_ops
,
1683 static struct clk_branch gcc_qupv3_wrap1_s1_clk
= {
1684 .halt_reg
= 0x22144,
1685 .halt_check
= BRANCH_HALT_VOTED
,
1687 .enable_reg
= 0x52000,
1688 .enable_mask
= BIT(21),
1689 .hw
.init
= &(struct clk_init_data
){
1690 .name
= "gcc_qupv3_wrap1_s1_clk",
1691 .parent_hws
= (const struct clk_hw
*[]){
1692 &gcc_qupv3_wrap1_s1_clk_src
.clkr
.hw
,
1695 .flags
= CLK_SET_RATE_PARENT
,
1696 .ops
= &clk_branch2_ops
,
1701 static struct clk_branch gcc_qupv3_wrap1_s2_clk
= {
1702 .halt_reg
= 0x22274,
1703 .halt_check
= BRANCH_HALT_VOTED
,
1705 .enable_reg
= 0x52000,
1706 .enable_mask
= BIT(22),
1707 .hw
.init
= &(struct clk_init_data
){
1708 .name
= "gcc_qupv3_wrap1_s2_clk",
1709 .parent_hws
= (const struct clk_hw
*[]){
1710 &gcc_qupv3_wrap1_s2_clk_src
.clkr
.hw
,
1713 .flags
= CLK_SET_RATE_PARENT
,
1714 .ops
= &clk_branch2_ops
,
1719 static struct clk_branch gcc_qupv3_wrap1_s3_clk
= {
1720 .halt_reg
= 0x223a4,
1721 .halt_check
= BRANCH_HALT_VOTED
,
1723 .enable_reg
= 0x52000,
1724 .enable_mask
= BIT(23),
1725 .hw
.init
= &(struct clk_init_data
){
1726 .name
= "gcc_qupv3_wrap1_s3_clk",
1727 .parent_hws
= (const struct clk_hw
*[]){
1728 &gcc_qupv3_wrap1_s3_clk_src
.clkr
.hw
,
1731 .flags
= CLK_SET_RATE_PARENT
,
1732 .ops
= &clk_branch2_ops
,
1737 static struct clk_branch gcc_qupv3_wrap1_s4_clk
= {
1738 .halt_reg
= 0x224d4,
1739 .halt_check
= BRANCH_HALT_VOTED
,
1741 .enable_reg
= 0x52000,
1742 .enable_mask
= BIT(24),
1743 .hw
.init
= &(struct clk_init_data
){
1744 .name
= "gcc_qupv3_wrap1_s4_clk",
1745 .parent_hws
= (const struct clk_hw
*[]){
1746 &gcc_qupv3_wrap1_s4_clk_src
.clkr
.hw
,
1749 .flags
= CLK_SET_RATE_PARENT
,
1750 .ops
= &clk_branch2_ops
,
1755 static struct clk_branch gcc_qupv3_wrap1_s5_clk
= {
1756 .halt_reg
= 0x22604,
1757 .halt_check
= BRANCH_HALT_VOTED
,
1759 .enable_reg
= 0x52000,
1760 .enable_mask
= BIT(25),
1761 .hw
.init
= &(struct clk_init_data
){
1762 .name
= "gcc_qupv3_wrap1_s5_clk",
1763 .parent_hws
= (const struct clk_hw
*[]){
1764 &gcc_qupv3_wrap1_s5_clk_src
.clkr
.hw
,
1767 .flags
= CLK_SET_RATE_PARENT
,
1768 .ops
= &clk_branch2_ops
,
1773 static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk
= {
1774 .halt_reg
= 0x21004,
1775 .halt_check
= BRANCH_HALT_VOTED
,
1776 .hwcg_reg
= 0x21004,
1779 .enable_reg
= 0x52000,
1780 .enable_mask
= BIT(6),
1781 .hw
.init
= &(struct clk_init_data
){
1782 .name
= "gcc_qupv3_wrap_0_m_ahb_clk",
1783 .ops
= &clk_branch2_ops
,
1788 static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk
= {
1789 .halt_reg
= 0x21008,
1790 .halt_check
= BRANCH_HALT_VOTED
,
1791 .hwcg_reg
= 0x21008,
1794 .enable_reg
= 0x52000,
1795 .enable_mask
= BIT(7),
1796 .hw
.init
= &(struct clk_init_data
){
1797 .name
= "gcc_qupv3_wrap_0_s_ahb_clk",
1798 .ops
= &clk_branch2_ops
,
1803 static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk
= {
1804 .halt_reg
= 0x2200c,
1805 .halt_check
= BRANCH_HALT_VOTED
,
1806 .hwcg_reg
= 0x2200c,
1809 .enable_reg
= 0x52000,
1810 .enable_mask
= BIT(18),
1811 .hw
.init
= &(struct clk_init_data
){
1812 .name
= "gcc_qupv3_wrap_1_m_ahb_clk",
1813 .ops
= &clk_branch2_ops
,
1818 static struct clk_branch gcc_qupv3_wrap_1_s_ahb_clk
= {
1819 .halt_reg
= 0x22010,
1820 .halt_check
= BRANCH_HALT_VOTED
,
1821 .hwcg_reg
= 0x22010,
1824 .enable_reg
= 0x52000,
1825 .enable_mask
= BIT(19),
1826 .hw
.init
= &(struct clk_init_data
){
1827 .name
= "gcc_qupv3_wrap_1_s_ahb_clk",
1828 .ops
= &clk_branch2_ops
,
1833 static struct clk_branch gcc_sdcc1_ahb_clk
= {
1834 .halt_reg
= 0x4b004,
1835 .halt_check
= BRANCH_HALT
,
1837 .enable_reg
= 0x4b004,
1838 .enable_mask
= BIT(0),
1839 .hw
.init
= &(struct clk_init_data
){
1840 .name
= "gcc_sdcc1_ahb_clk",
1841 .ops
= &clk_branch2_ops
,
1846 static struct clk_branch gcc_sdcc1_apps_clk
= {
1847 .halt_reg
= 0x4b008,
1848 .halt_check
= BRANCH_HALT
,
1850 .enable_reg
= 0x4b008,
1851 .enable_mask
= BIT(0),
1852 .hw
.init
= &(struct clk_init_data
){
1853 .name
= "gcc_sdcc1_apps_clk",
1854 .parent_hws
= (const struct clk_hw
*[]){
1855 &gcc_sdcc1_apps_clk_src
.clkr
.hw
,
1858 .flags
= CLK_SET_RATE_PARENT
,
1859 .ops
= &clk_branch2_ops
,
1864 static struct clk_branch gcc_sdcc1_ice_core_clk
= {
1865 .halt_reg
= 0x4b03c,
1866 .halt_check
= BRANCH_HALT
,
1867 .hwcg_reg
= 0x4b03c,
1870 .enable_reg
= 0x4b03c,
1871 .enable_mask
= BIT(0),
1872 .hw
.init
= &(struct clk_init_data
){
1873 .name
= "gcc_sdcc1_ice_core_clk",
1874 .parent_hws
= (const struct clk_hw
*[]){
1875 &gcc_sdcc1_ice_core_clk_src
.clkr
.hw
,
1878 .flags
= CLK_SET_RATE_PARENT
,
1879 .ops
= &clk_branch2_ops
,
1884 static struct clk_branch gcc_sdcc2_ahb_clk
= {
1885 .halt_reg
= 0x20008,
1886 .halt_check
= BRANCH_HALT
,
1888 .enable_reg
= 0x20008,
1889 .enable_mask
= BIT(0),
1890 .hw
.init
= &(struct clk_init_data
){
1891 .name
= "gcc_sdcc2_ahb_clk",
1892 .ops
= &clk_branch2_ops
,
1897 static struct clk_branch gcc_sdcc2_apps_clk
= {
1898 .halt_reg
= 0x20004,
1899 .halt_check
= BRANCH_HALT
,
1901 .enable_reg
= 0x20004,
1902 .enable_mask
= BIT(0),
1903 .hw
.init
= &(struct clk_init_data
){
1904 .name
= "gcc_sdcc2_apps_clk",
1905 .parent_hws
= (const struct clk_hw
*[]){
1906 &gcc_sdcc2_apps_clk_src
.clkr
.hw
,
1909 .flags
= CLK_SET_RATE_PARENT
,
1910 .ops
= &clk_branch2_ops
,
1915 static struct clk_branch gcc_sys_noc_cpuss_ahb_clk
= {
1916 .halt_reg
= 0x10140,
1917 .halt_check
= BRANCH_HALT_VOTED
,
1918 .hwcg_reg
= 0x10140,
1921 .enable_reg
= 0x52000,
1922 .enable_mask
= BIT(0),
1923 .hw
.init
= &(struct clk_init_data
){
1924 .name
= "gcc_sys_noc_cpuss_ahb_clk",
1925 .parent_hws
= (const struct clk_hw
*[]){
1926 &gcc_cpuss_ahb_clk_src
.clkr
.hw
,
1929 .flags
= CLK_IS_CRITICAL
| CLK_SET_RATE_PARENT
,
1930 .ops
= &clk_branch2_ops
,
1935 static struct clk_branch gcc_ufs_mem_clkref_clk
= {
1936 .halt_reg
= 0x8c000,
1937 .halt_check
= BRANCH_HALT
,
1939 .enable_reg
= 0x8c000,
1940 .enable_mask
= BIT(0),
1941 .hw
.init
= &(struct clk_init_data
){
1942 .name
= "gcc_ufs_mem_clkref_clk",
1943 .ops
= &clk_branch2_ops
,
1948 static struct clk_branch gcc_ufs_phy_ahb_clk
= {
1949 .halt_reg
= 0x3a00c,
1950 .halt_check
= BRANCH_HALT
,
1951 .hwcg_reg
= 0x3a00c,
1954 .enable_reg
= 0x3a00c,
1955 .enable_mask
= BIT(0),
1956 .hw
.init
= &(struct clk_init_data
){
1957 .name
= "gcc_ufs_phy_ahb_clk",
1958 .ops
= &clk_branch2_ops
,
1963 static struct clk_branch gcc_ufs_phy_axi_clk
= {
1964 .halt_reg
= 0x3a034,
1965 .halt_check
= BRANCH_HALT
,
1966 .hwcg_reg
= 0x3a034,
1969 .enable_reg
= 0x3a034,
1970 .enable_mask
= BIT(0),
1971 .hw
.init
= &(struct clk_init_data
){
1972 .name
= "gcc_ufs_phy_axi_clk",
1973 .parent_hws
= (const struct clk_hw
*[]){
1974 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
,
1977 .flags
= CLK_SET_RATE_PARENT
,
1978 .ops
= &clk_branch2_ops
,
1983 static struct clk_branch gcc_ufs_phy_ice_core_clk
= {
1984 .halt_reg
= 0x3a0a4,
1985 .halt_check
= BRANCH_HALT
,
1986 .hwcg_reg
= 0x3a0a4,
1989 .enable_reg
= 0x3a0a4,
1990 .enable_mask
= BIT(0),
1991 .hw
.init
= &(struct clk_init_data
){
1992 .name
= "gcc_ufs_phy_ice_core_clk",
1993 .parent_hws
= (const struct clk_hw
*[]){
1994 &gcc_ufs_phy_ice_core_clk_src
.clkr
.hw
,
1997 .flags
= CLK_SET_RATE_PARENT
,
1998 .ops
= &clk_branch2_ops
,
2003 static struct clk_branch gcc_ufs_phy_ice_core_hw_ctl_clk
= {
2004 .halt_reg
= 0x3a0a4,
2005 .halt_check
= BRANCH_HALT
,
2006 .hwcg_reg
= 0x3a0a4,
2009 .enable_reg
= 0x3a0a4,
2010 .enable_mask
= BIT(1),
2011 .hw
.init
= &(struct clk_init_data
){
2012 .name
= "gcc_ufs_phy_ice_core_hw_ctl_clk",
2013 .parent_hws
= (const struct clk_hw
*[]){
2014 &gcc_ufs_phy_ice_core_clk_src
.clkr
.hw
,
2017 .flags
= CLK_SET_RATE_PARENT
,
2018 .ops
= &clk_branch2_ops
,
2023 static struct clk_branch gcc_ufs_phy_phy_aux_clk
= {
2024 .halt_reg
= 0x3a0ac,
2025 .halt_check
= BRANCH_HALT
,
2026 .hwcg_reg
= 0x3a0ac,
2029 .enable_reg
= 0x3a0ac,
2030 .enable_mask
= BIT(0),
2031 .hw
.init
= &(struct clk_init_data
){
2032 .name
= "gcc_ufs_phy_phy_aux_clk",
2033 .parent_hws
= (const struct clk_hw
*[]){
2034 &gcc_ufs_phy_phy_aux_clk_src
.clkr
.hw
,
2037 .flags
= CLK_SET_RATE_PARENT
,
2038 .ops
= &clk_branch2_ops
,
2043 static struct clk_branch gcc_ufs_phy_phy_aux_hw_ctl_clk
= {
2044 .halt_reg
= 0x3a0ac,
2045 .halt_check
= BRANCH_HALT
,
2046 .hwcg_reg
= 0x3a0ac,
2049 .enable_reg
= 0x3a0ac,
2050 .enable_mask
= BIT(1),
2051 .hw
.init
= &(struct clk_init_data
){
2052 .name
= "gcc_ufs_phy_phy_aux_hw_ctl_clk",
2053 .parent_hws
= (const struct clk_hw
*[]){
2054 &gcc_ufs_phy_phy_aux_clk_src
.clkr
.hw
,
2057 .flags
= CLK_SET_RATE_PARENT
,
2058 .ops
= &clk_branch2_ops
,
2063 static struct clk_branch gcc_ufs_phy_rx_symbol_0_clk
= {
2064 .halt_reg
= 0x3a014,
2065 .halt_check
= BRANCH_HALT_SKIP
,
2067 .enable_reg
= 0x3a014,
2068 .enable_mask
= BIT(0),
2069 .hw
.init
= &(struct clk_init_data
){
2070 .name
= "gcc_ufs_phy_rx_symbol_0_clk",
2071 .ops
= &clk_branch2_ops
,
2076 static struct clk_branch gcc_ufs_phy_rx_symbol_1_clk
= {
2077 .halt_reg
= 0x3a018,
2078 .halt_check
= BRANCH_HALT_SKIP
,
2080 .enable_reg
= 0x3a018,
2081 .enable_mask
= BIT(0),
2082 .hw
.init
= &(struct clk_init_data
){
2083 .name
= "gcc_ufs_phy_rx_symbol_1_clk",
2084 .ops
= &clk_branch2_ops
,
2089 static struct clk_branch gcc_ufs_phy_tx_symbol_0_clk
= {
2090 .halt_reg
= 0x3a010,
2091 .halt_check
= BRANCH_HALT_SKIP
,
2093 .enable_reg
= 0x3a010,
2094 .enable_mask
= BIT(0),
2095 .hw
.init
= &(struct clk_init_data
){
2096 .name
= "gcc_ufs_phy_tx_symbol_0_clk",
2097 .ops
= &clk_branch2_ops
,
2102 static struct clk_branch gcc_ufs_phy_unipro_core_clk
= {
2103 .halt_reg
= 0x3a09c,
2104 .halt_check
= BRANCH_HALT
,
2105 .hwcg_reg
= 0x3a09c,
2108 .enable_reg
= 0x3a09c,
2109 .enable_mask
= BIT(0),
2110 .hw
.init
= &(struct clk_init_data
){
2111 .name
= "gcc_ufs_phy_unipro_core_clk",
2112 .parent_hws
= (const struct clk_hw
*[]){
2113 &gcc_ufs_phy_unipro_core_clk_src
.clkr
.hw
,
2116 .flags
= CLK_SET_RATE_PARENT
,
2117 .ops
= &clk_branch2_ops
,
2122 static struct clk_branch gcc_ufs_phy_unipro_core_hw_ctl_clk
= {
2123 .halt_reg
= 0x3a09c,
2124 .halt_check
= BRANCH_HALT
,
2125 .hwcg_reg
= 0x3a09c,
2128 .enable_reg
= 0x3a09c,
2129 .enable_mask
= BIT(1),
2130 .hw
.init
= &(struct clk_init_data
){
2131 .name
= "gcc_ufs_phy_unipro_core_hw_ctl_clk",
2132 .parent_hws
= (const struct clk_hw
*[]){
2133 &gcc_ufs_phy_unipro_core_clk_src
.clkr
.hw
,
2136 .flags
= CLK_SET_RATE_PARENT
,
2137 .ops
= &clk_branch2_ops
,
2142 static struct clk_branch gcc_usb30_prim_master_clk
= {
2143 .halt_reg
= 0x1a00c,
2144 .halt_check
= BRANCH_HALT
,
2146 .enable_reg
= 0x1a00c,
2147 .enable_mask
= BIT(0),
2148 .hw
.init
= &(struct clk_init_data
){
2149 .name
= "gcc_usb30_prim_master_clk",
2150 .parent_hws
= (const struct clk_hw
*[]){
2151 &gcc_usb30_prim_master_clk_src
.clkr
.hw
,
2154 .flags
= CLK_SET_RATE_PARENT
,
2155 .ops
= &clk_branch2_ops
,
2160 static struct clk_branch gcc_usb30_prim_mock_utmi_clk
= {
2161 .halt_reg
= 0x1a018,
2162 .halt_check
= BRANCH_HALT
,
2164 .enable_reg
= 0x1a018,
2165 .enable_mask
= BIT(0),
2166 .hw
.init
= &(struct clk_init_data
){
2167 .name
= "gcc_usb30_prim_mock_utmi_clk",
2168 .parent_hws
= (const struct clk_hw
*[]){
2169 &gcc_usb30_prim_mock_utmi_clk_src
.clkr
.hw
,
2172 .flags
= CLK_SET_RATE_PARENT
,
2173 .ops
= &clk_branch2_ops
,
2178 static struct clk_branch gcc_usb30_prim_sleep_clk
= {
2179 .halt_reg
= 0x1a014,
2180 .halt_check
= BRANCH_HALT
,
2182 .enable_reg
= 0x1a014,
2183 .enable_mask
= BIT(0),
2184 .hw
.init
= &(struct clk_init_data
){
2185 .name
= "gcc_usb30_prim_sleep_clk",
2186 .ops
= &clk_branch2_ops
,
2191 static struct clk_branch gcc_usb3_prim_clkref_clk
= {
2192 .halt_reg
= 0x8c010,
2193 .halt_check
= BRANCH_HALT
,
2195 .enable_reg
= 0x8c010,
2196 .enable_mask
= BIT(0),
2197 .hw
.init
= &(struct clk_init_data
){
2198 .name
= "gcc_usb3_prim_clkref_clk",
2199 .ops
= &clk_branch2_ops
,
2204 static struct clk_branch gcc_usb3_prim_phy_aux_clk
= {
2205 .halt_reg
= 0x1a050,
2206 .halt_check
= BRANCH_HALT
,
2208 .enable_reg
= 0x1a050,
2209 .enable_mask
= BIT(0),
2210 .hw
.init
= &(struct clk_init_data
){
2211 .name
= "gcc_usb3_prim_phy_aux_clk",
2212 .parent_hws
= (const struct clk_hw
*[]){
2213 &gcc_usb3_prim_phy_aux_clk_src
.clkr
.hw
,
2216 .flags
= CLK_SET_RATE_PARENT
,
2217 .ops
= &clk_branch2_ops
,
2222 static struct clk_branch gcc_usb3_prim_phy_com_aux_clk
= {
2223 .halt_reg
= 0x1a054,
2224 .halt_check
= BRANCH_HALT
,
2226 .enable_reg
= 0x1a054,
2227 .enable_mask
= BIT(0),
2228 .hw
.init
= &(struct clk_init_data
){
2229 .name
= "gcc_usb3_prim_phy_com_aux_clk",
2230 .parent_hws
= (const struct clk_hw
*[]){
2231 &gcc_usb3_prim_phy_aux_clk_src
.clkr
.hw
,
2234 .flags
= CLK_SET_RATE_PARENT
,
2235 .ops
= &clk_branch2_ops
,
2240 static struct clk_branch gcc_usb3_prim_phy_pipe_clk
= {
2241 .halt_reg
= 0x1a058,
2242 .halt_check
= BRANCH_HALT_SKIP
,
2243 .hwcg_reg
= 0x1a058,
2246 .enable_reg
= 0x1a058,
2247 .enable_mask
= BIT(0),
2248 .hw
.init
= &(struct clk_init_data
){
2249 .name
= "gcc_usb3_prim_phy_pipe_clk",
2250 .ops
= &clk_branch2_ops
,
2255 static struct clk_branch gcc_video_ahb_clk
= {
2256 .halt_reg
= 0x17004,
2257 .halt_check
= BRANCH_HALT
,
2258 .hwcg_reg
= 0x17004,
2261 .enable_reg
= 0x17004,
2262 .enable_mask
= BIT(0),
2263 .hw
.init
= &(struct clk_init_data
){
2264 .name
= "gcc_video_ahb_clk",
2265 .flags
= CLK_IS_CRITICAL
,
2266 .ops
= &clk_branch2_ops
,
2271 static struct clk_branch gcc_video_axi_clk
= {
2272 .halt_reg
= 0x17014,
2273 .halt_check
= BRANCH_HALT
,
2274 .hwcg_reg
= 0x17014,
2277 .enable_reg
= 0x17014,
2278 .enable_mask
= BIT(0),
2279 .hw
.init
= &(struct clk_init_data
){
2280 .name
= "gcc_video_axi_clk",
2281 .ops
= &clk_branch2_ops
,
2286 static struct clk_branch gcc_video_throttle_axi_clk
= {
2287 .halt_reg
= 0x17020,
2288 .halt_check
= BRANCH_HALT
,
2289 .hwcg_reg
= 0x17020,
2292 .enable_reg
= 0x17020,
2293 .enable_mask
= BIT(0),
2294 .hw
.init
= &(struct clk_init_data
){
2295 .name
= "gcc_video_throttle_axi_clk",
2296 .ops
= &clk_branch2_ops
,
2301 static struct clk_branch gcc_video_xo_clk
= {
2302 .halt_reg
= 0x1702c,
2303 .halt_check
= BRANCH_HALT
,
2305 .enable_reg
= 0x1702c,
2306 .enable_mask
= BIT(0),
2307 .hw
.init
= &(struct clk_init_data
){
2308 .name
= "gcc_video_xo_clk",
2309 .flags
= CLK_IS_CRITICAL
,
2310 .ops
= &clk_branch2_ops
,
2315 static struct gdsc usb30_prim_gdsc
= {
2318 .name
= "usb30_prim_gdsc",
2320 .pwrsts
= PWRSTS_RET_ON
,
2323 static struct gdsc ufs_phy_gdsc
= {
2326 .name
= "ufs_phy_gdsc",
2328 .pwrsts
= PWRSTS_OFF_ON
,
2331 static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc
= {
2334 .name
= "hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc",
2336 .pwrsts
= PWRSTS_OFF_ON
,
2340 static struct gdsc hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc
= {
2343 .name
= "hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc",
2345 .pwrsts
= PWRSTS_OFF_ON
,
2349 static struct clk_regmap
*gcc_sm6350_clocks
[] = {
2350 [GCC_AGGRE_UFS_PHY_AXI_CLK
] = &gcc_aggre_ufs_phy_axi_clk
.clkr
,
2351 [GCC_AGGRE_USB3_PRIM_AXI_CLK
] = &gcc_aggre_usb3_prim_axi_clk
.clkr
,
2352 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
2353 [GCC_CAMERA_AHB_CLK
] = &gcc_camera_ahb_clk
.clkr
,
2354 [GCC_CAMERA_AXI_CLK
] = &gcc_camera_axi_clk
.clkr
,
2355 [GCC_CAMERA_THROTTLE_NRT_AXI_CLK
] =
2356 &gcc_camera_throttle_nrt_axi_clk
.clkr
,
2357 [GCC_CAMERA_THROTTLE_RT_AXI_CLK
] = &gcc_camera_throttle_rt_axi_clk
.clkr
,
2358 [GCC_CAMERA_XO_CLK
] = &gcc_camera_xo_clk
.clkr
,
2359 [GCC_CE1_AHB_CLK
] = &gcc_ce1_ahb_clk
.clkr
,
2360 [GCC_CE1_AXI_CLK
] = &gcc_ce1_axi_clk
.clkr
,
2361 [GCC_CE1_CLK
] = &gcc_ce1_clk
.clkr
,
2362 [GCC_CFG_NOC_USB3_PRIM_AXI_CLK
] = &gcc_cfg_noc_usb3_prim_axi_clk
.clkr
,
2363 [GCC_CPUSS_AHB_CLK
] = &gcc_cpuss_ahb_clk
.clkr
,
2364 [GCC_CPUSS_AHB_CLK_SRC
] = &gcc_cpuss_ahb_clk_src
.clkr
,
2365 [GCC_CPUSS_GNOC_CLK
] = &gcc_cpuss_gnoc_clk
.clkr
,
2366 [GCC_CPUSS_RBCPR_CLK
] = &gcc_cpuss_rbcpr_clk
.clkr
,
2367 [GCC_DDRSS_GPU_AXI_CLK
] = &gcc_ddrss_gpu_axi_clk
.clkr
,
2368 [GCC_DISP_AHB_CLK
] = &gcc_disp_ahb_clk
.clkr
,
2369 [GCC_DISP_AXI_CLK
] = &gcc_disp_axi_clk
.clkr
,
2370 [GCC_DISP_CC_SLEEP_CLK
] = &gcc_disp_cc_sleep_clk
.clkr
,
2371 [GCC_DISP_CC_XO_CLK
] = &gcc_disp_cc_xo_clk
.clkr
,
2372 [GCC_DISP_GPLL0_CLK
] = &gcc_disp_gpll0_clk
.clkr
,
2373 [GCC_DISP_THROTTLE_AXI_CLK
] = &gcc_disp_throttle_axi_clk
.clkr
,
2374 [GCC_DISP_XO_CLK
] = &gcc_disp_xo_clk
.clkr
,
2375 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2376 [GCC_GP1_CLK_SRC
] = &gcc_gp1_clk_src
.clkr
,
2377 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2378 [GCC_GP2_CLK_SRC
] = &gcc_gp2_clk_src
.clkr
,
2379 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2380 [GCC_GP3_CLK_SRC
] = &gcc_gp3_clk_src
.clkr
,
2381 [GCC_GPU_CFG_AHB_CLK
] = &gcc_gpu_cfg_ahb_clk
.clkr
,
2382 [GCC_GPU_GPLL0_CLK
] = &gcc_gpu_gpll0_clk
.clkr
,
2383 [GCC_GPU_GPLL0_DIV_CLK
] = &gcc_gpu_gpll0_div_clk
.clkr
,
2384 [GCC_GPU_MEMNOC_GFX_CLK
] = &gcc_gpu_memnoc_gfx_clk
.clkr
,
2385 [GCC_GPU_SNOC_DVM_GFX_CLK
] = &gcc_gpu_snoc_dvm_gfx_clk
.clkr
,
2386 [GCC_NPU_AXI_CLK
] = &gcc_npu_axi_clk
.clkr
,
2387 [GCC_NPU_BWMON_AXI_CLK
] = &gcc_npu_bwmon_axi_clk
.clkr
,
2388 [GCC_NPU_BWMON_DMA_CFG_AHB_CLK
] = &gcc_npu_bwmon_dma_cfg_ahb_clk
.clkr
,
2389 [GCC_NPU_BWMON_DSP_CFG_AHB_CLK
] = &gcc_npu_bwmon_dsp_cfg_ahb_clk
.clkr
,
2390 [GCC_NPU_CFG_AHB_CLK
] = &gcc_npu_cfg_ahb_clk
.clkr
,
2391 [GCC_NPU_DMA_CLK
] = &gcc_npu_dma_clk
.clkr
,
2392 [GCC_NPU_GPLL0_CLK
] = &gcc_npu_gpll0_clk
.clkr
,
2393 [GCC_NPU_GPLL0_DIV_CLK
] = &gcc_npu_gpll0_div_clk
.clkr
,
2394 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2395 [GCC_PDM2_CLK_SRC
] = &gcc_pdm2_clk_src
.clkr
,
2396 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
2397 [GCC_PDM_XO4_CLK
] = &gcc_pdm_xo4_clk
.clkr
,
2398 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
2399 [GCC_QUPV3_WRAP0_CORE_2X_CLK
] = &gcc_qupv3_wrap0_core_2x_clk
.clkr
,
2400 [GCC_QUPV3_WRAP0_CORE_CLK
] = &gcc_qupv3_wrap0_core_clk
.clkr
,
2401 [GCC_QUPV3_WRAP0_S0_CLK
] = &gcc_qupv3_wrap0_s0_clk
.clkr
,
2402 [GCC_QUPV3_WRAP0_S0_CLK_SRC
] = &gcc_qupv3_wrap0_s0_clk_src
.clkr
,
2403 [GCC_QUPV3_WRAP0_S1_CLK
] = &gcc_qupv3_wrap0_s1_clk
.clkr
,
2404 [GCC_QUPV3_WRAP0_S1_CLK_SRC
] = &gcc_qupv3_wrap0_s1_clk_src
.clkr
,
2405 [GCC_QUPV3_WRAP0_S2_CLK
] = &gcc_qupv3_wrap0_s2_clk
.clkr
,
2406 [GCC_QUPV3_WRAP0_S2_CLK_SRC
] = &gcc_qupv3_wrap0_s2_clk_src
.clkr
,
2407 [GCC_QUPV3_WRAP0_S3_CLK
] = &gcc_qupv3_wrap0_s3_clk
.clkr
,
2408 [GCC_QUPV3_WRAP0_S3_CLK_SRC
] = &gcc_qupv3_wrap0_s3_clk_src
.clkr
,
2409 [GCC_QUPV3_WRAP0_S4_CLK
] = &gcc_qupv3_wrap0_s4_clk
.clkr
,
2410 [GCC_QUPV3_WRAP0_S4_CLK_SRC
] = &gcc_qupv3_wrap0_s4_clk_src
.clkr
,
2411 [GCC_QUPV3_WRAP0_S5_CLK
] = &gcc_qupv3_wrap0_s5_clk
.clkr
,
2412 [GCC_QUPV3_WRAP0_S5_CLK_SRC
] = &gcc_qupv3_wrap0_s5_clk_src
.clkr
,
2413 [GCC_QUPV3_WRAP1_CORE_2X_CLK
] = &gcc_qupv3_wrap1_core_2x_clk
.clkr
,
2414 [GCC_QUPV3_WRAP1_CORE_CLK
] = &gcc_qupv3_wrap1_core_clk
.clkr
,
2415 [GCC_QUPV3_WRAP1_S0_CLK
] = &gcc_qupv3_wrap1_s0_clk
.clkr
,
2416 [GCC_QUPV3_WRAP1_S0_CLK_SRC
] = &gcc_qupv3_wrap1_s0_clk_src
.clkr
,
2417 [GCC_QUPV3_WRAP1_S1_CLK
] = &gcc_qupv3_wrap1_s1_clk
.clkr
,
2418 [GCC_QUPV3_WRAP1_S1_CLK_SRC
] = &gcc_qupv3_wrap1_s1_clk_src
.clkr
,
2419 [GCC_QUPV3_WRAP1_S2_CLK
] = &gcc_qupv3_wrap1_s2_clk
.clkr
,
2420 [GCC_QUPV3_WRAP1_S2_CLK_SRC
] = &gcc_qupv3_wrap1_s2_clk_src
.clkr
,
2421 [GCC_QUPV3_WRAP1_S3_CLK
] = &gcc_qupv3_wrap1_s3_clk
.clkr
,
2422 [GCC_QUPV3_WRAP1_S3_CLK_SRC
] = &gcc_qupv3_wrap1_s3_clk_src
.clkr
,
2423 [GCC_QUPV3_WRAP1_S4_CLK
] = &gcc_qupv3_wrap1_s4_clk
.clkr
,
2424 [GCC_QUPV3_WRAP1_S4_CLK_SRC
] = &gcc_qupv3_wrap1_s4_clk_src
.clkr
,
2425 [GCC_QUPV3_WRAP1_S5_CLK
] = &gcc_qupv3_wrap1_s5_clk
.clkr
,
2426 [GCC_QUPV3_WRAP1_S5_CLK_SRC
] = &gcc_qupv3_wrap1_s5_clk_src
.clkr
,
2427 [GCC_QUPV3_WRAP_0_M_AHB_CLK
] = &gcc_qupv3_wrap_0_m_ahb_clk
.clkr
,
2428 [GCC_QUPV3_WRAP_0_S_AHB_CLK
] = &gcc_qupv3_wrap_0_s_ahb_clk
.clkr
,
2429 [GCC_QUPV3_WRAP_1_M_AHB_CLK
] = &gcc_qupv3_wrap_1_m_ahb_clk
.clkr
,
2430 [GCC_QUPV3_WRAP_1_S_AHB_CLK
] = &gcc_qupv3_wrap_1_s_ahb_clk
.clkr
,
2431 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2432 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2433 [GCC_SDCC1_APPS_CLK_SRC
] = &gcc_sdcc1_apps_clk_src
.clkr
,
2434 [GCC_SDCC1_ICE_CORE_CLK
] = &gcc_sdcc1_ice_core_clk
.clkr
,
2435 [GCC_SDCC1_ICE_CORE_CLK_SRC
] = &gcc_sdcc1_ice_core_clk_src
.clkr
,
2436 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
2437 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2438 [GCC_SDCC2_APPS_CLK_SRC
] = &gcc_sdcc2_apps_clk_src
.clkr
,
2439 [GCC_SYS_NOC_CPUSS_AHB_CLK
] = &gcc_sys_noc_cpuss_ahb_clk
.clkr
,
2440 [GCC_UFS_MEM_CLKREF_CLK
] = &gcc_ufs_mem_clkref_clk
.clkr
,
2441 [GCC_UFS_PHY_AHB_CLK
] = &gcc_ufs_phy_ahb_clk
.clkr
,
2442 [GCC_UFS_PHY_AXI_CLK
] = &gcc_ufs_phy_axi_clk
.clkr
,
2443 [GCC_UFS_PHY_AXI_CLK_SRC
] = &gcc_ufs_phy_axi_clk_src
.clkr
,
2444 [GCC_UFS_PHY_ICE_CORE_CLK
] = &gcc_ufs_phy_ice_core_clk
.clkr
,
2445 [GCC_UFS_PHY_ICE_CORE_CLK_SRC
] = &gcc_ufs_phy_ice_core_clk_src
.clkr
,
2446 [GCC_UFS_PHY_PHY_AUX_CLK
] = &gcc_ufs_phy_phy_aux_clk
.clkr
,
2447 [GCC_UFS_PHY_PHY_AUX_CLK_SRC
] = &gcc_ufs_phy_phy_aux_clk_src
.clkr
,
2448 [GCC_UFS_PHY_RX_SYMBOL_0_CLK
] = &gcc_ufs_phy_rx_symbol_0_clk
.clkr
,
2449 [GCC_UFS_PHY_RX_SYMBOL_1_CLK
] = &gcc_ufs_phy_rx_symbol_1_clk
.clkr
,
2450 [GCC_UFS_PHY_TX_SYMBOL_0_CLK
] = &gcc_ufs_phy_tx_symbol_0_clk
.clkr
,
2451 [GCC_UFS_PHY_UNIPRO_CORE_CLK
] = &gcc_ufs_phy_unipro_core_clk
.clkr
,
2452 [GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC
] =
2453 &gcc_ufs_phy_unipro_core_clk_src
.clkr
,
2454 [GCC_USB30_PRIM_MASTER_CLK
] = &gcc_usb30_prim_master_clk
.clkr
,
2455 [GCC_USB30_PRIM_MASTER_CLK_SRC
] = &gcc_usb30_prim_master_clk_src
.clkr
,
2456 [GCC_USB30_PRIM_MOCK_UTMI_CLK
] = &gcc_usb30_prim_mock_utmi_clk
.clkr
,
2457 [GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC
] =
2458 &gcc_usb30_prim_mock_utmi_clk_src
.clkr
,
2459 [GCC_USB30_PRIM_SLEEP_CLK
] = &gcc_usb30_prim_sleep_clk
.clkr
,
2460 [GCC_USB3_PRIM_CLKREF_CLK
] = &gcc_usb3_prim_clkref_clk
.clkr
,
2461 [GCC_USB3_PRIM_PHY_AUX_CLK
] = &gcc_usb3_prim_phy_aux_clk
.clkr
,
2462 [GCC_USB3_PRIM_PHY_AUX_CLK_SRC
] = &gcc_usb3_prim_phy_aux_clk_src
.clkr
,
2463 [GCC_USB3_PRIM_PHY_COM_AUX_CLK
] = &gcc_usb3_prim_phy_com_aux_clk
.clkr
,
2464 [GCC_USB3_PRIM_PHY_PIPE_CLK
] = &gcc_usb3_prim_phy_pipe_clk
.clkr
,
2465 [GCC_VIDEO_AHB_CLK
] = &gcc_video_ahb_clk
.clkr
,
2466 [GCC_VIDEO_AXI_CLK
] = &gcc_video_axi_clk
.clkr
,
2467 [GCC_VIDEO_THROTTLE_AXI_CLK
] = &gcc_video_throttle_axi_clk
.clkr
,
2468 [GCC_VIDEO_XO_CLK
] = &gcc_video_xo_clk
.clkr
,
2469 [GPLL0
] = &gpll0
.clkr
,
2470 [GPLL0_OUT_EVEN
] = &gpll0_out_even
.clkr
,
2471 [GPLL0_OUT_ODD
] = &gpll0_out_odd
.clkr
,
2472 [GPLL6
] = &gpll6
.clkr
,
2473 [GPLL6_OUT_EVEN
] = &gpll6_out_even
.clkr
,
2474 [GPLL7
] = &gpll7
.clkr
,
2475 [GCC_UFS_PHY_PHY_AUX_HW_CTL_CLK
] = &gcc_ufs_phy_phy_aux_hw_ctl_clk
.clkr
,
2476 [GCC_UFS_PHY_AXI_HW_CTL_CLK
] = &gcc_ufs_phy_axi_hw_ctl_clk
.clkr
,
2477 [GCC_AGGRE_UFS_PHY_AXI_HW_CTL_CLK
] =
2478 &gcc_aggre_ufs_phy_axi_hw_ctl_clk
.clkr
,
2479 [GCC_UFS_PHY_UNIPRO_CORE_HW_CTL_CLK
] =
2480 &gcc_ufs_phy_unipro_core_hw_ctl_clk
.clkr
,
2481 [GCC_UFS_PHY_ICE_CORE_HW_CTL_CLK
] =
2482 &gcc_ufs_phy_ice_core_hw_ctl_clk
.clkr
,
2483 [GCC_GPU_GPLL0_MAIN_DIV_CLK_SRC
] = &gcc_gpu_gpll0_main_div_clk_src
.clkr
,
2484 [GCC_NPU_PLL0_MAIN_DIV_CLK_SRC
] = &gcc_npu_pll0_main_div_clk_src
.clkr
,
2487 static struct gdsc
*gcc_sm6350_gdscs
[] = {
2488 [USB30_PRIM_GDSC
] = &usb30_prim_gdsc
,
2489 [UFS_PHY_GDSC
] = &ufs_phy_gdsc
,
2490 [HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC
] = &hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc
,
2491 [HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC
] = &hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc
,
2494 static const struct qcom_reset_map gcc_sm6350_resets
[] = {
2495 [GCC_QUSB2PHY_PRIM_BCR
] = { 0x1d000 },
2496 [GCC_QUSB2PHY_SEC_BCR
] = { 0x1e000 },
2497 [GCC_SDCC1_BCR
] = { 0x4b000 },
2498 [GCC_SDCC2_BCR
] = { 0x20000 },
2499 [GCC_UFS_PHY_BCR
] = { 0x3a000 },
2500 [GCC_USB30_PRIM_BCR
] = { 0x1a000 },
2501 [GCC_USB3_PHY_PRIM_BCR
] = { 0x1c000 },
2502 [GCC_USB3_DP_PHY_PRIM_BCR
] = { 0x1c008 },
2505 static const struct clk_rcg_dfs_data gcc_dfs_clocks
[] = {
2506 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s0_clk_src
),
2507 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s1_clk_src
),
2508 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s2_clk_src
),
2509 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s3_clk_src
),
2510 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s4_clk_src
),
2511 DEFINE_RCG_DFS(gcc_qupv3_wrap0_s5_clk_src
),
2512 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s0_clk_src
),
2513 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s1_clk_src
),
2514 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s2_clk_src
),
2515 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s3_clk_src
),
2516 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s4_clk_src
),
2517 DEFINE_RCG_DFS(gcc_qupv3_wrap1_s5_clk_src
),
2520 static const struct regmap_config gcc_sm6350_regmap_config
= {
2524 .max_register
= 0xbf030,
2528 static const struct qcom_cc_desc gcc_sm6350_desc
= {
2529 .config
= &gcc_sm6350_regmap_config
,
2530 .clks
= gcc_sm6350_clocks
,
2531 .num_clks
= ARRAY_SIZE(gcc_sm6350_clocks
),
2532 .resets
= gcc_sm6350_resets
,
2533 .num_resets
= ARRAY_SIZE(gcc_sm6350_resets
),
2534 .gdscs
= gcc_sm6350_gdscs
,
2535 .num_gdscs
= ARRAY_SIZE(gcc_sm6350_gdscs
),
2538 static const struct of_device_id gcc_sm6350_match_table
[] = {
2539 { .compatible
= "qcom,gcc-sm6350" },
2542 MODULE_DEVICE_TABLE(of
, gcc_sm6350_match_table
);
2544 static int gcc_sm6350_probe(struct platform_device
*pdev
)
2546 struct regmap
*regmap
;
2549 regmap
= qcom_cc_map(pdev
, &gcc_sm6350_desc
);
2551 return PTR_ERR(regmap
);
2553 /* Disable the GPLL0 active input to NPU and GPU via MISC registers */
2554 regmap_update_bits(regmap
, 0x4cf00, 0x3, 0x3);
2555 regmap_update_bits(regmap
, 0x45f00, 0x3, 0x3);
2557 ret
= qcom_cc_register_rcg_dfs(regmap
, gcc_dfs_clocks
,
2558 ARRAY_SIZE(gcc_dfs_clocks
));
2562 return qcom_cc_really_probe(&pdev
->dev
, &gcc_sm6350_desc
, regmap
);
2565 static struct platform_driver gcc_sm6350_driver
= {
2566 .probe
= gcc_sm6350_probe
,
2568 .name
= "gcc-sm6350",
2569 .of_match_table
= gcc_sm6350_match_table
,
2573 static int __init
gcc_sm6350_init(void)
2575 return platform_driver_register(&gcc_sm6350_driver
);
2577 core_initcall(gcc_sm6350_init
);
2579 static void __exit
gcc_sm6350_exit(void)
2581 platform_driver_unregister(&gcc_sm6350_driver
);
2583 module_exit(gcc_sm6350_exit
);
2585 MODULE_DESCRIPTION("QTI GCC SM6350 Driver");
2586 MODULE_LICENSE("GPL v2");