1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
4 #include <linux/kernel.h>
5 #include <linux/bitops.h>
7 #include <linux/platform_device.h>
8 #include <linux/module.h>
10 #include <linux/of_device.h>
11 #include <linux/clk-provider.h>
12 #include <linux/regmap.h>
13 #include <linux/reset-controller.h>
15 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
18 #include "clk-alpha-pll.h"
19 #include "clk-branch.h"
22 #include "clk-regmap.h"
29 P_CORE_BI_PLL_TEST_SE
,
37 static const struct pll_vco trion_vco
[] = {
38 { 249600000, 2000000000, 0 },
41 static struct clk_alpha_pll gpll0
= {
43 .vco_table
= trion_vco
,
44 .num_vco
= ARRAY_SIZE(trion_vco
),
45 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_TRION
],
47 .enable_reg
= 0x52000,
48 .enable_mask
= BIT(0),
49 .hw
.init
= &(struct clk_init_data
){
51 .parent_data
= &(const struct clk_parent_data
){
56 .ops
= &clk_trion_fixed_pll_ops
,
61 static const struct clk_div_table post_div_table_trion_even
[] = {
69 static struct clk_alpha_pll_postdiv gpll0_out_even
= {
72 .post_div_table
= post_div_table_trion_even
,
73 .num_post_div
= ARRAY_SIZE(post_div_table_trion_even
),
74 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_TRION
],
76 .clkr
.hw
.init
= &(struct clk_init_data
){
77 .name
= "gpll0_out_even",
78 .parent_data
= &(const struct clk_parent_data
){
83 .ops
= &clk_trion_pll_postdiv_ops
,
87 static struct clk_alpha_pll gpll7
= {
89 .vco_table
= trion_vco
,
90 .num_vco
= ARRAY_SIZE(trion_vco
),
91 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_TRION
],
93 .enable_reg
= 0x52000,
94 .enable_mask
= BIT(7),
95 .hw
.init
= &(struct clk_init_data
){
97 .parent_data
= &(const struct clk_parent_data
){
102 .ops
= &clk_trion_fixed_pll_ops
,
107 static struct clk_alpha_pll gpll9
= {
109 .vco_table
= trion_vco
,
110 .num_vco
= ARRAY_SIZE(trion_vco
),
111 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_TRION
],
113 .enable_reg
= 0x52000,
114 .enable_mask
= BIT(9),
115 .hw
.init
= &(struct clk_init_data
){
117 .parent_data
= &(const struct clk_parent_data
){
118 .fw_name
= "bi_tcxo",
122 .ops
= &clk_trion_fixed_pll_ops
,
127 static const struct parent_map gcc_parent_map_0
[] = {
129 { P_GPLL0_OUT_MAIN
, 1 },
130 { P_GPLL0_OUT_EVEN
, 6 },
131 { P_CORE_BI_PLL_TEST_SE
, 7 },
134 static const struct clk_parent_data gcc_parents_0
[] = {
135 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
136 { .hw
= &gpll0
.clkr
.hw
},
137 { .hw
= &gpll0_out_even
.clkr
.hw
},
138 { .fw_name
= "core_bi_pll_test_se" },
141 static const struct parent_map gcc_parent_map_1
[] = {
143 { P_GPLL0_OUT_MAIN
, 1 },
145 { P_GPLL0_OUT_EVEN
, 6 },
146 { P_CORE_BI_PLL_TEST_SE
, 7 },
149 static const struct clk_parent_data gcc_parents_1
[] = {
150 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
151 { .hw
= &gpll0
.clkr
.hw
},
152 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
153 { .hw
= &gpll0_out_even
.clkr
.hw
},
154 { .fw_name
= "core_bi_pll_test_se" },
157 static const struct parent_map gcc_parent_map_2
[] = {
160 { P_CORE_BI_PLL_TEST_SE
, 7 },
163 static const struct clk_parent_data gcc_parents_2
[] = {
164 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
165 { .fw_name
= "sleep_clk", .name
= "sleep_clk" },
166 { .fw_name
= "core_bi_pll_test_se" },
169 static const struct parent_map gcc_parent_map_3
[] = {
171 { P_GPLL0_OUT_MAIN
, 1 },
172 { P_CORE_BI_PLL_TEST_SE
, 7 },
175 static const struct clk_parent_data gcc_parents_3
[] = {
176 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
177 { .hw
= &gpll0
.clkr
.hw
},
178 { .fw_name
= "core_bi_pll_test_se"},
181 static const struct parent_map gcc_parent_map_4
[] = {
183 { P_CORE_BI_PLL_TEST_SE
, 7 },
186 static const struct clk_parent_data gcc_parents_4
[] = {
187 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
188 { .fw_name
= "core_bi_pll_test_se" },
191 static const struct parent_map gcc_parent_map_5
[] = {
193 { P_GPLL0_OUT_MAIN
, 1 },
194 { P_GPLL7_OUT_MAIN
, 3 },
195 { P_GPLL0_OUT_EVEN
, 6 },
196 { P_CORE_BI_PLL_TEST_SE
, 7 },
199 static const struct clk_parent_data gcc_parents_5
[] = {
200 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
201 { .hw
= &gpll0
.clkr
.hw
},
202 { .hw
= &gpll7
.clkr
.hw
},
203 { .hw
= &gpll0_out_even
.clkr
.hw
},
204 { .fw_name
= "core_bi_pll_test_se" },
207 static const struct parent_map gcc_parent_map_6
[] = {
209 { P_GPLL0_OUT_MAIN
, 1 },
210 { P_GPLL9_OUT_MAIN
, 2 },
211 { P_GPLL0_OUT_EVEN
, 6 },
212 { P_CORE_BI_PLL_TEST_SE
, 7 },
215 static const struct clk_parent_data gcc_parents_6
[] = {
216 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
217 { .hw
= &gpll0
.clkr
.hw
},
218 { .hw
= &gpll9
.clkr
.hw
},
219 { .hw
= &gpll0_out_even
.clkr
.hw
},
220 { .fw_name
= "core_bi_pll_test_se" },
223 static const struct parent_map gcc_parent_map_7
[] = {
225 { P_GPLL0_OUT_MAIN
, 1 },
226 { P_AUD_REF_CLK
, 2 },
227 { P_GPLL0_OUT_EVEN
, 6 },
228 { P_CORE_BI_PLL_TEST_SE
, 7 },
231 static const struct clk_parent_data gcc_parents_7
[] = {
232 { .fw_name
= "bi_tcxo", .name
= "bi_tcxo" },
233 { .hw
= &gpll0
.clkr
.hw
},
234 { .fw_name
= "aud_ref_clk", .name
= "aud_ref_clk" },
235 { .hw
= &gpll0_out_even
.clkr
.hw
},
236 { .fw_name
= "core_bi_pll_test_se" },
239 static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src
[] = {
240 F(19200000, P_BI_TCXO
, 1, 0, 0),
241 F(50000000, P_GPLL0_OUT_MAIN
, 12, 0, 0),
242 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
246 static struct clk_rcg2 gcc_cpuss_ahb_clk_src
= {
250 .parent_map
= gcc_parent_map_0
,
251 .freq_tbl
= ftbl_gcc_cpuss_ahb_clk_src
,
252 .clkr
.hw
.init
= &(struct clk_init_data
){
253 .name
= "gcc_cpuss_ahb_clk_src",
254 .parent_data
= gcc_parents_0
,
256 .flags
= CLK_SET_RATE_PARENT
,
257 .ops
= &clk_rcg2_ops
,
261 static const struct freq_tbl ftbl_gcc_emac_ptp_clk_src
[] = {
262 F(19200000, P_BI_TCXO
, 1, 0, 0),
263 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
264 F(125000000, P_GPLL7_OUT_MAIN
, 4, 0, 0),
265 F(250000000, P_GPLL7_OUT_MAIN
, 2, 0, 0),
269 static struct clk_rcg2 gcc_emac_ptp_clk_src
= {
273 .parent_map
= gcc_parent_map_5
,
274 .freq_tbl
= ftbl_gcc_emac_ptp_clk_src
,
275 .clkr
.hw
.init
= &(struct clk_init_data
){
276 .name
= "gcc_emac_ptp_clk_src",
277 .parent_data
= gcc_parents_5
,
279 .flags
= CLK_SET_RATE_PARENT
,
280 .ops
= &clk_rcg2_ops
,
284 static const struct freq_tbl ftbl_gcc_emac_rgmii_clk_src
[] = {
285 F(2500000, P_BI_TCXO
, 1, 25, 192),
286 F(5000000, P_BI_TCXO
, 1, 25, 96),
287 F(19200000, P_BI_TCXO
, 1, 0, 0),
288 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
289 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
290 F(125000000, P_GPLL7_OUT_MAIN
, 4, 0, 0),
291 F(250000000, P_GPLL7_OUT_MAIN
, 2, 0, 0),
295 static struct clk_rcg2 gcc_emac_rgmii_clk_src
= {
299 .parent_map
= gcc_parent_map_5
,
300 .freq_tbl
= ftbl_gcc_emac_rgmii_clk_src
,
301 .clkr
.hw
.init
= &(struct clk_init_data
){
302 .name
= "gcc_emac_rgmii_clk_src",
303 .parent_data
= gcc_parents_5
,
305 .flags
= CLK_SET_RATE_PARENT
,
306 .ops
= &clk_rcg2_ops
,
310 static const struct freq_tbl ftbl_gcc_gp1_clk_src
[] = {
311 F(19200000, P_BI_TCXO
, 1, 0, 0),
312 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
313 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
314 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
315 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
319 static struct clk_rcg2 gcc_gp1_clk_src
= {
323 .parent_map
= gcc_parent_map_1
,
324 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
325 .clkr
.hw
.init
= &(struct clk_init_data
){
326 .name
= "gcc_gp1_clk_src",
327 .parent_data
= gcc_parents_1
,
329 .flags
= CLK_SET_RATE_PARENT
,
330 .ops
= &clk_rcg2_ops
,
334 static struct clk_rcg2 gcc_gp2_clk_src
= {
338 .parent_map
= gcc_parent_map_1
,
339 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
340 .clkr
.hw
.init
= &(struct clk_init_data
){
341 .name
= "gcc_gp2_clk_src",
342 .parent_data
= gcc_parents_1
,
344 .flags
= CLK_SET_RATE_PARENT
,
345 .ops
= &clk_rcg2_ops
,
349 static struct clk_rcg2 gcc_gp3_clk_src
= {
353 .parent_map
= gcc_parent_map_1
,
354 .freq_tbl
= ftbl_gcc_gp1_clk_src
,
355 .clkr
.hw
.init
= &(struct clk_init_data
){
356 .name
= "gcc_gp3_clk_src",
357 .parent_data
= gcc_parents_1
,
359 .flags
= CLK_SET_RATE_PARENT
,
360 .ops
= &clk_rcg2_ops
,
364 static const struct freq_tbl ftbl_gcc_pcie_0_aux_clk_src
[] = {
365 F(9600000, P_BI_TCXO
, 2, 0, 0),
366 F(19200000, P_BI_TCXO
, 1, 0, 0),
370 static struct clk_rcg2 gcc_pcie_0_aux_clk_src
= {
374 .parent_map
= gcc_parent_map_2
,
375 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
376 .clkr
.hw
.init
= &(struct clk_init_data
){
377 .name
= "gcc_pcie_0_aux_clk_src",
378 .parent_data
= gcc_parents_2
,
380 .flags
= CLK_SET_RATE_PARENT
,
381 .ops
= &clk_rcg2_ops
,
385 static struct clk_rcg2 gcc_pcie_1_aux_clk_src
= {
389 .parent_map
= gcc_parent_map_2
,
390 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
391 .clkr
.hw
.init
= &(struct clk_init_data
){
392 .name
= "gcc_pcie_1_aux_clk_src",
393 .parent_data
= gcc_parents_2
,
395 .flags
= CLK_SET_RATE_PARENT
,
396 .ops
= &clk_rcg2_ops
,
400 static const struct freq_tbl ftbl_gcc_pcie_phy_refgen_clk_src
[] = {
401 F(19200000, P_BI_TCXO
, 1, 0, 0),
402 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
406 static struct clk_rcg2 gcc_pcie_phy_refgen_clk_src
= {
410 .parent_map
= gcc_parent_map_0
,
411 .freq_tbl
= ftbl_gcc_pcie_phy_refgen_clk_src
,
412 .clkr
.hw
.init
= &(struct clk_init_data
){
413 .name
= "gcc_pcie_phy_refgen_clk_src",
414 .parent_data
= gcc_parents_0
,
416 .flags
= CLK_SET_RATE_PARENT
,
417 .ops
= &clk_rcg2_ops
,
421 static const struct freq_tbl ftbl_gcc_pdm2_clk_src
[] = {
422 F(9600000, P_BI_TCXO
, 2, 0, 0),
423 F(19200000, P_BI_TCXO
, 1, 0, 0),
424 F(60000000, P_GPLL0_OUT_MAIN
, 10, 0, 0),
428 static struct clk_rcg2 gcc_pdm2_clk_src
= {
432 .parent_map
= gcc_parent_map_0
,
433 .freq_tbl
= ftbl_gcc_pdm2_clk_src
,
434 .clkr
.hw
.init
= &(struct clk_init_data
){
435 .name
= "gcc_pdm2_clk_src",
436 .parent_data
= gcc_parents_0
,
438 .flags
= CLK_SET_RATE_PARENT
,
439 .ops
= &clk_rcg2_ops
,
443 static const struct freq_tbl ftbl_gcc_qspi_core_clk_src
[] = {
444 F(19200000, P_BI_TCXO
, 1, 0, 0),
445 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
446 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
447 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
451 static struct clk_rcg2 gcc_qspi_core_clk_src
= {
455 .parent_map
= gcc_parent_map_0
,
456 .freq_tbl
= ftbl_gcc_qspi_core_clk_src
,
457 .clkr
.hw
.init
= &(struct clk_init_data
){
458 .name
= "gcc_qspi_core_clk_src",
459 .parent_data
= gcc_parents_0
,
461 .flags
= CLK_SET_RATE_PARENT
,
462 .ops
= &clk_rcg2_ops
,
466 static const struct freq_tbl ftbl_gcc_qupv3_wrap0_s0_clk_src
[] = {
467 F(7372800, P_GPLL0_OUT_EVEN
, 1, 384, 15625),
468 F(14745600, P_GPLL0_OUT_EVEN
, 1, 768, 15625),
469 F(19200000, P_BI_TCXO
, 1, 0, 0),
470 F(29491200, P_GPLL0_OUT_EVEN
, 1, 1536, 15625),
471 F(32000000, P_GPLL0_OUT_EVEN
, 1, 8, 75),
472 F(48000000, P_GPLL0_OUT_EVEN
, 1, 4, 25),
473 F(64000000, P_GPLL0_OUT_EVEN
, 1, 16, 75),
474 F(80000000, P_GPLL0_OUT_EVEN
, 1, 4, 15),
475 F(96000000, P_GPLL0_OUT_EVEN
, 1, 8, 25),
476 F(100000000, P_GPLL0_OUT_EVEN
, 3, 0, 0),
477 F(102400000, P_GPLL0_OUT_EVEN
, 1, 128, 375),
478 F(112000000, P_GPLL0_OUT_EVEN
, 1, 28, 75),
479 F(117964800, P_GPLL0_OUT_EVEN
, 1, 6144, 15625),
480 F(120000000, P_GPLL0_OUT_EVEN
, 2.5, 0, 0),
481 F(128000000, P_GPLL0_OUT_MAIN
, 1, 16, 75),
485 static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src
= {
489 .parent_map
= gcc_parent_map_0
,
490 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
491 .clkr
.hw
.init
= &(struct clk_init_data
){
492 .name
= "gcc_qupv3_wrap0_s0_clk_src",
493 .parent_data
= gcc_parents_0
,
495 .flags
= CLK_SET_RATE_PARENT
,
496 .ops
= &clk_rcg2_ops
,
500 static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src
= {
504 .parent_map
= gcc_parent_map_0
,
505 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
506 .clkr
.hw
.init
= &(struct clk_init_data
){
507 .name
= "gcc_qupv3_wrap0_s1_clk_src",
508 .parent_data
= gcc_parents_0
,
510 .flags
= CLK_SET_RATE_PARENT
,
511 .ops
= &clk_rcg2_ops
,
515 static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src
= {
519 .parent_map
= gcc_parent_map_0
,
520 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
521 .clkr
.hw
.init
= &(struct clk_init_data
){
522 .name
= "gcc_qupv3_wrap0_s2_clk_src",
523 .parent_data
= gcc_parents_0
,
525 .flags
= CLK_SET_RATE_PARENT
,
526 .ops
= &clk_rcg2_ops
,
530 static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src
= {
534 .parent_map
= gcc_parent_map_0
,
535 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
536 .clkr
.hw
.init
= &(struct clk_init_data
){
537 .name
= "gcc_qupv3_wrap0_s3_clk_src",
538 .parent_data
= gcc_parents_0
,
540 .flags
= CLK_SET_RATE_PARENT
,
541 .ops
= &clk_rcg2_ops
,
545 static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src
= {
549 .parent_map
= gcc_parent_map_0
,
550 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
551 .clkr
.hw
.init
= &(struct clk_init_data
){
552 .name
= "gcc_qupv3_wrap0_s4_clk_src",
553 .parent_data
= gcc_parents_0
,
555 .flags
= CLK_SET_RATE_PARENT
,
556 .ops
= &clk_rcg2_ops
,
560 static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src
= {
564 .parent_map
= gcc_parent_map_0
,
565 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
566 .clkr
.hw
.init
= &(struct clk_init_data
){
567 .name
= "gcc_qupv3_wrap0_s5_clk_src",
568 .parent_data
= gcc_parents_0
,
570 .flags
= CLK_SET_RATE_PARENT
,
571 .ops
= &clk_rcg2_ops
,
575 static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src
= {
579 .parent_map
= gcc_parent_map_0
,
580 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
581 .clkr
.hw
.init
= &(struct clk_init_data
){
582 .name
= "gcc_qupv3_wrap0_s6_clk_src",
583 .parent_data
= gcc_parents_0
,
585 .flags
= CLK_SET_RATE_PARENT
,
586 .ops
= &clk_rcg2_ops
,
590 static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src
= {
594 .parent_map
= gcc_parent_map_0
,
595 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
596 .clkr
.hw
.init
= &(struct clk_init_data
){
597 .name
= "gcc_qupv3_wrap0_s7_clk_src",
598 .parent_data
= gcc_parents_0
,
600 .flags
= CLK_SET_RATE_PARENT
,
601 .ops
= &clk_rcg2_ops
,
605 static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src
= {
609 .parent_map
= gcc_parent_map_0
,
610 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
611 .clkr
.hw
.init
= &(struct clk_init_data
){
612 .name
= "gcc_qupv3_wrap1_s0_clk_src",
613 .parent_data
= gcc_parents_0
,
615 .flags
= CLK_SET_RATE_PARENT
,
616 .ops
= &clk_rcg2_ops
,
620 static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src
= {
624 .parent_map
= gcc_parent_map_0
,
625 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
626 .clkr
.hw
.init
= &(struct clk_init_data
){
627 .name
= "gcc_qupv3_wrap1_s1_clk_src",
628 .parent_data
= gcc_parents_0
,
630 .flags
= CLK_SET_RATE_PARENT
,
631 .ops
= &clk_rcg2_ops
,
635 static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src
= {
639 .parent_map
= gcc_parent_map_0
,
640 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
641 .clkr
.hw
.init
= &(struct clk_init_data
){
642 .name
= "gcc_qupv3_wrap1_s2_clk_src",
643 .parent_data
= gcc_parents_0
,
645 .flags
= CLK_SET_RATE_PARENT
,
646 .ops
= &clk_rcg2_ops
,
650 static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src
= {
654 .parent_map
= gcc_parent_map_0
,
655 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
656 .clkr
.hw
.init
= &(struct clk_init_data
){
657 .name
= "gcc_qupv3_wrap1_s3_clk_src",
658 .parent_data
= gcc_parents_0
,
660 .flags
= CLK_SET_RATE_PARENT
,
661 .ops
= &clk_rcg2_ops
,
665 static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src
= {
669 .parent_map
= gcc_parent_map_0
,
670 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
671 .clkr
.hw
.init
= &(struct clk_init_data
){
672 .name
= "gcc_qupv3_wrap1_s4_clk_src",
673 .parent_data
= gcc_parents_0
,
675 .flags
= CLK_SET_RATE_PARENT
,
676 .ops
= &clk_rcg2_ops
,
680 static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src
= {
684 .parent_map
= gcc_parent_map_0
,
685 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
686 .clkr
.hw
.init
= &(struct clk_init_data
){
687 .name
= "gcc_qupv3_wrap1_s5_clk_src",
688 .parent_data
= gcc_parents_0
,
690 .flags
= CLK_SET_RATE_PARENT
,
691 .ops
= &clk_rcg2_ops
,
695 static struct clk_rcg2 gcc_qupv3_wrap2_s0_clk_src
= {
699 .parent_map
= gcc_parent_map_0
,
700 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
701 .clkr
.hw
.init
= &(struct clk_init_data
){
702 .name
= "gcc_qupv3_wrap2_s0_clk_src",
703 .parent_data
= gcc_parents_0
,
705 .flags
= CLK_SET_RATE_PARENT
,
706 .ops
= &clk_rcg2_ops
,
710 static struct clk_rcg2 gcc_qupv3_wrap2_s1_clk_src
= {
714 .parent_map
= gcc_parent_map_0
,
715 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
716 .clkr
.hw
.init
= &(struct clk_init_data
){
717 .name
= "gcc_qupv3_wrap2_s1_clk_src",
718 .parent_data
= gcc_parents_0
,
720 .flags
= CLK_SET_RATE_PARENT
,
721 .ops
= &clk_rcg2_ops
,
725 static struct clk_rcg2 gcc_qupv3_wrap2_s2_clk_src
= {
729 .parent_map
= gcc_parent_map_0
,
730 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
731 .clkr
.hw
.init
= &(struct clk_init_data
){
732 .name
= "gcc_qupv3_wrap2_s2_clk_src",
733 .parent_data
= gcc_parents_0
,
735 .flags
= CLK_SET_RATE_PARENT
,
736 .ops
= &clk_rcg2_ops
,
740 static struct clk_rcg2 gcc_qupv3_wrap2_s3_clk_src
= {
744 .parent_map
= gcc_parent_map_0
,
745 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
746 .clkr
.hw
.init
= &(struct clk_init_data
){
747 .name
= "gcc_qupv3_wrap2_s3_clk_src",
748 .parent_data
= gcc_parents_0
,
750 .flags
= CLK_SET_RATE_PARENT
,
751 .ops
= &clk_rcg2_ops
,
755 static struct clk_rcg2 gcc_qupv3_wrap2_s4_clk_src
= {
759 .parent_map
= gcc_parent_map_0
,
760 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
761 .clkr
.hw
.init
= &(struct clk_init_data
){
762 .name
= "gcc_qupv3_wrap2_s4_clk_src",
763 .parent_data
= gcc_parents_0
,
765 .flags
= CLK_SET_RATE_PARENT
,
766 .ops
= &clk_rcg2_ops
,
770 static struct clk_rcg2 gcc_qupv3_wrap2_s5_clk_src
= {
774 .parent_map
= gcc_parent_map_0
,
775 .freq_tbl
= ftbl_gcc_qupv3_wrap0_s0_clk_src
,
776 .clkr
.hw
.init
= &(struct clk_init_data
){
777 .name
= "gcc_qupv3_wrap2_s5_clk_src",
778 .parent_data
= gcc_parents_0
,
780 .flags
= CLK_SET_RATE_PARENT
,
781 .ops
= &clk_rcg2_ops
,
785 static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src
[] = {
786 F(400000, P_BI_TCXO
, 12, 1, 4),
787 F(9600000, P_BI_TCXO
, 2, 0, 0),
788 F(19200000, P_BI_TCXO
, 1, 0, 0),
789 F(25000000, P_GPLL0_OUT_MAIN
, 12, 1, 2),
790 F(50000000, P_GPLL0_OUT_MAIN
, 12, 0, 0),
791 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
792 F(202000000, P_GPLL9_OUT_MAIN
, 4, 0, 0),
796 static struct clk_rcg2 gcc_sdcc2_apps_clk_src
= {
800 .parent_map
= gcc_parent_map_6
,
801 .freq_tbl
= ftbl_gcc_sdcc2_apps_clk_src
,
802 .clkr
.hw
.init
= &(struct clk_init_data
){
803 .name
= "gcc_sdcc2_apps_clk_src",
804 .parent_data
= gcc_parents_6
,
806 .flags
= CLK_SET_RATE_PARENT
,
807 .ops
= &clk_rcg2_floor_ops
,
811 static const struct freq_tbl ftbl_gcc_sdcc4_apps_clk_src
[] = {
812 F(400000, P_BI_TCXO
, 12, 1, 4),
813 F(9600000, P_BI_TCXO
, 2, 0, 0),
814 F(19200000, P_BI_TCXO
, 1, 0, 0),
815 F(25000000, P_GPLL0_OUT_MAIN
, 12, 1, 2),
816 F(50000000, P_GPLL0_OUT_MAIN
, 12, 0, 0),
817 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
821 static struct clk_rcg2 gcc_sdcc4_apps_clk_src
= {
825 .parent_map
= gcc_parent_map_3
,
826 .freq_tbl
= ftbl_gcc_sdcc4_apps_clk_src
,
827 .clkr
.hw
.init
= &(struct clk_init_data
){
828 .name
= "gcc_sdcc4_apps_clk_src",
829 .parent_data
= gcc_parents_3
,
831 .flags
= CLK_SET_RATE_PARENT
,
832 .ops
= &clk_rcg2_floor_ops
,
836 static const struct freq_tbl ftbl_gcc_tsif_ref_clk_src
[] = {
837 F(105495, P_BI_TCXO
, 2, 1, 91),
841 static struct clk_rcg2 gcc_tsif_ref_clk_src
= {
845 .parent_map
= gcc_parent_map_7
,
846 .freq_tbl
= ftbl_gcc_tsif_ref_clk_src
,
847 .clkr
.hw
.init
= &(struct clk_init_data
){
848 .name
= "gcc_tsif_ref_clk_src",
849 .parent_data
= gcc_parents_7
,
851 .flags
= CLK_SET_RATE_PARENT
,
852 .ops
= &clk_rcg2_ops
,
856 static const struct freq_tbl ftbl_gcc_ufs_card_axi_clk_src
[] = {
857 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
858 F(50000000, P_GPLL0_OUT_EVEN
, 6, 0, 0),
859 F(100000000, P_GPLL0_OUT_MAIN
, 6, 0, 0),
860 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
861 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
865 static struct clk_rcg2 gcc_ufs_card_axi_clk_src
= {
869 .parent_map
= gcc_parent_map_0
,
870 .freq_tbl
= ftbl_gcc_ufs_card_axi_clk_src
,
871 .clkr
.hw
.init
= &(struct clk_init_data
){
872 .name
= "gcc_ufs_card_axi_clk_src",
873 .parent_data
= gcc_parents_0
,
875 .flags
= CLK_SET_RATE_PARENT
,
876 .ops
= &clk_rcg2_ops
,
880 static const struct freq_tbl ftbl_gcc_ufs_card_ice_core_clk_src
[] = {
881 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
882 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
883 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
884 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
888 static struct clk_rcg2 gcc_ufs_card_ice_core_clk_src
= {
892 .parent_map
= gcc_parent_map_0
,
893 .freq_tbl
= ftbl_gcc_ufs_card_ice_core_clk_src
,
894 .clkr
.hw
.init
= &(struct clk_init_data
){
895 .name
= "gcc_ufs_card_ice_core_clk_src",
896 .parent_data
= gcc_parents_0
,
898 .flags
= CLK_SET_RATE_PARENT
,
899 .ops
= &clk_rcg2_ops
,
903 static const struct freq_tbl ftbl_gcc_ufs_card_phy_aux_clk_src
[] = {
904 F(19200000, P_BI_TCXO
, 1, 0, 0),
908 static struct clk_rcg2 gcc_ufs_card_phy_aux_clk_src
= {
912 .parent_map
= gcc_parent_map_4
,
913 .freq_tbl
= ftbl_gcc_ufs_card_phy_aux_clk_src
,
914 .clkr
.hw
.init
= &(struct clk_init_data
){
915 .name
= "gcc_ufs_card_phy_aux_clk_src",
916 .parent_data
= gcc_parents_4
,
918 .flags
= CLK_SET_RATE_PARENT
,
919 .ops
= &clk_rcg2_ops
,
923 static const struct freq_tbl ftbl_gcc_ufs_card_unipro_core_clk_src
[] = {
924 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
925 F(75000000, P_GPLL0_OUT_MAIN
, 8, 0, 0),
926 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
930 static struct clk_rcg2 gcc_ufs_card_unipro_core_clk_src
= {
934 .parent_map
= gcc_parent_map_0
,
935 .freq_tbl
= ftbl_gcc_ufs_card_unipro_core_clk_src
,
936 .clkr
.hw
.init
= &(struct clk_init_data
){
937 .name
= "gcc_ufs_card_unipro_core_clk_src",
938 .parent_data
= gcc_parents_0
,
940 .flags
= CLK_SET_RATE_PARENT
,
941 .ops
= &clk_rcg2_ops
,
945 static const struct freq_tbl ftbl_gcc_ufs_phy_axi_clk_src
[] = {
946 F(25000000, P_GPLL0_OUT_EVEN
, 12, 0, 0),
947 F(37500000, P_GPLL0_OUT_EVEN
, 8, 0, 0),
948 F(75000000, P_GPLL0_OUT_EVEN
, 4, 0, 0),
949 F(150000000, P_GPLL0_OUT_MAIN
, 4, 0, 0),
950 F(300000000, P_GPLL0_OUT_MAIN
, 2, 0, 0),
954 static struct clk_rcg2 gcc_ufs_phy_axi_clk_src
= {
958 .parent_map
= gcc_parent_map_0
,
959 .freq_tbl
= ftbl_gcc_ufs_phy_axi_clk_src
,
960 .clkr
.hw
.init
= &(struct clk_init_data
){
961 .name
= "gcc_ufs_phy_axi_clk_src",
962 .parent_data
= gcc_parents_0
,
964 .flags
= CLK_SET_RATE_PARENT
,
965 .ops
= &clk_rcg2_ops
,
969 static struct clk_rcg2 gcc_ufs_phy_ice_core_clk_src
= {
973 .parent_map
= gcc_parent_map_0
,
974 .freq_tbl
= ftbl_gcc_ufs_card_ice_core_clk_src
,
975 .clkr
.hw
.init
= &(struct clk_init_data
){
976 .name
= "gcc_ufs_phy_ice_core_clk_src",
977 .parent_data
= gcc_parents_0
,
979 .flags
= CLK_SET_RATE_PARENT
,
980 .ops
= &clk_rcg2_ops
,
984 static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src
= {
988 .parent_map
= gcc_parent_map_4
,
989 .freq_tbl
= ftbl_gcc_pcie_0_aux_clk_src
,
990 .clkr
.hw
.init
= &(struct clk_init_data
){
991 .name
= "gcc_ufs_phy_phy_aux_clk_src",
992 .parent_data
= gcc_parents_4
,
994 .flags
= CLK_SET_RATE_PARENT
,
995 .ops
= &clk_rcg2_ops
,
999 static struct clk_rcg2 gcc_ufs_phy_unipro_core_clk_src
= {
1000 .cmd_rcgr
= 0x77078,
1003 .parent_map
= gcc_parent_map_0
,
1004 .freq_tbl
= ftbl_gcc_ufs_card_ice_core_clk_src
,
1005 .clkr
.hw
.init
= &(struct clk_init_data
){
1006 .name
= "gcc_ufs_phy_unipro_core_clk_src",
1007 .parent_data
= gcc_parents_0
,
1009 .flags
= CLK_SET_RATE_PARENT
,
1010 .ops
= &clk_rcg2_ops
,
1014 static const struct freq_tbl ftbl_gcc_usb30_prim_master_clk_src
[] = {
1015 F(33333333, P_GPLL0_OUT_EVEN
, 9, 0, 0),
1016 F(66666667, P_GPLL0_OUT_EVEN
, 4.5, 0, 0),
1017 F(133333333, P_GPLL0_OUT_MAIN
, 4.5, 0, 0),
1018 F(200000000, P_GPLL0_OUT_MAIN
, 3, 0, 0),
1019 F(240000000, P_GPLL0_OUT_MAIN
, 2.5, 0, 0),
1023 static struct clk_rcg2 gcc_usb30_prim_master_clk_src
= {
1027 .parent_map
= gcc_parent_map_0
,
1028 .freq_tbl
= ftbl_gcc_usb30_prim_master_clk_src
,
1029 .clkr
.hw
.init
= &(struct clk_init_data
){
1030 .name
= "gcc_usb30_prim_master_clk_src",
1031 .parent_data
= gcc_parents_0
,
1033 .flags
= CLK_SET_RATE_PARENT
,
1034 .ops
= &clk_rcg2_ops
,
1038 static const struct freq_tbl ftbl_gcc_usb30_prim_mock_utmi_clk_src
[] = {
1039 F(19200000, P_BI_TCXO
, 1, 0, 0),
1040 F(20000000, P_GPLL0_OUT_EVEN
, 15, 0, 0),
1041 F(60000000, P_GPLL0_OUT_EVEN
, 5, 0, 0),
1045 static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src
= {
1049 .parent_map
= gcc_parent_map_0
,
1050 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
1051 .clkr
.hw
.init
= &(struct clk_init_data
){
1052 .name
= "gcc_usb30_prim_mock_utmi_clk_src",
1053 .parent_data
= gcc_parents_0
,
1055 .flags
= CLK_SET_RATE_PARENT
,
1056 .ops
= &clk_rcg2_ops
,
1060 static struct clk_rcg2 gcc_usb30_sec_master_clk_src
= {
1061 .cmd_rcgr
= 0x1001c,
1064 .parent_map
= gcc_parent_map_0
,
1065 .freq_tbl
= ftbl_gcc_usb30_prim_master_clk_src
,
1066 .clkr
.hw
.init
= &(struct clk_init_data
){
1067 .name
= "gcc_usb30_sec_master_clk_src",
1068 .parent_data
= gcc_parents_0
,
1070 .flags
= CLK_SET_RATE_PARENT
,
1071 .ops
= &clk_rcg2_ops
,
1075 static struct clk_rcg2 gcc_usb30_sec_mock_utmi_clk_src
= {
1076 .cmd_rcgr
= 0x10034,
1079 .parent_map
= gcc_parent_map_0
,
1080 .freq_tbl
= ftbl_gcc_usb30_prim_mock_utmi_clk_src
,
1081 .clkr
.hw
.init
= &(struct clk_init_data
){
1082 .name
= "gcc_usb30_sec_mock_utmi_clk_src",
1083 .parent_data
= gcc_parents_0
,
1085 .flags
= CLK_SET_RATE_PARENT
,
1086 .ops
= &clk_rcg2_ops
,
1090 static struct clk_rcg2 gcc_usb3_prim_phy_aux_clk_src
= {
1094 .parent_map
= gcc_parent_map_2
,
1095 .freq_tbl
= ftbl_gcc_ufs_card_phy_aux_clk_src
,
1096 .clkr
.hw
.init
= &(struct clk_init_data
){
1097 .name
= "gcc_usb3_prim_phy_aux_clk_src",
1098 .parent_data
= gcc_parents_2
,
1100 .flags
= CLK_SET_RATE_PARENT
,
1101 .ops
= &clk_rcg2_ops
,
1105 static struct clk_rcg2 gcc_usb3_sec_phy_aux_clk_src
= {
1106 .cmd_rcgr
= 0x10060,
1109 .parent_map
= gcc_parent_map_2
,
1110 .freq_tbl
= ftbl_gcc_ufs_card_phy_aux_clk_src
,
1111 .clkr
.hw
.init
= &(struct clk_init_data
){
1112 .name
= "gcc_usb3_sec_phy_aux_clk_src",
1113 .parent_data
= gcc_parents_2
,
1115 .flags
= CLK_SET_RATE_PARENT
,
1116 .ops
= &clk_rcg2_ops
,
1120 static struct clk_branch gcc_aggre_noc_pcie_tbu_clk
= {
1121 .halt_reg
= 0x90018,
1122 .halt_check
= BRANCH_HALT
,
1124 .enable_reg
= 0x90018,
1125 .enable_mask
= BIT(0),
1126 .hw
.init
= &(struct clk_init_data
){
1127 .name
= "gcc_aggre_noc_pcie_tbu_clk",
1128 .ops
= &clk_branch2_ops
,
1133 static struct clk_branch gcc_aggre_ufs_card_axi_clk
= {
1134 .halt_reg
= 0x750c0,
1135 .halt_check
= BRANCH_HALT
,
1136 .hwcg_reg
= 0x750c0,
1139 .enable_reg
= 0x750c0,
1140 .enable_mask
= BIT(0),
1141 .hw
.init
= &(struct clk_init_data
){
1142 .name
= "gcc_aggre_ufs_card_axi_clk",
1143 .parent_hws
= (const struct clk_hw
*[]){
1144 &gcc_ufs_card_axi_clk_src
.clkr
.hw
},
1146 .flags
= CLK_SET_RATE_PARENT
,
1147 .ops
= &clk_branch2_ops
,
1152 static struct clk_branch gcc_aggre_ufs_card_axi_hw_ctl_clk
= {
1153 .halt_reg
= 0x750c0,
1154 .halt_check
= BRANCH_HALT
,
1155 .hwcg_reg
= 0x750c0,
1158 .enable_reg
= 0x750c0,
1159 .enable_mask
= BIT(1),
1160 .hw
.init
= &(struct clk_init_data
){
1161 .name
= "gcc_aggre_ufs_card_axi_hw_ctl_clk",
1162 .parent_hws
= (const struct clk_hw
*[]){
1163 &gcc_aggre_ufs_card_axi_clk
.clkr
.hw
},
1165 .flags
= CLK_SET_RATE_PARENT
,
1166 .ops
= &clk_branch_simple_ops
,
1171 static struct clk_branch gcc_aggre_ufs_phy_axi_clk
= {
1172 .halt_reg
= 0x770c0,
1173 .halt_check
= BRANCH_HALT
,
1174 .hwcg_reg
= 0x770c0,
1177 .enable_reg
= 0x770c0,
1178 .enable_mask
= BIT(0),
1179 .hw
.init
= &(struct clk_init_data
){
1180 .name
= "gcc_aggre_ufs_phy_axi_clk",
1181 .parent_hws
= (const struct clk_hw
*[]){
1182 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
},
1184 .flags
= CLK_SET_RATE_PARENT
,
1185 .ops
= &clk_branch2_ops
,
1190 static struct clk_branch gcc_aggre_ufs_phy_axi_hw_ctl_clk
= {
1191 .halt_reg
= 0x770c0,
1192 .halt_check
= BRANCH_HALT
,
1193 .hwcg_reg
= 0x770c0,
1196 .enable_reg
= 0x770c0,
1197 .enable_mask
= BIT(1),
1198 .hw
.init
= &(struct clk_init_data
){
1199 .name
= "gcc_aggre_ufs_phy_axi_hw_ctl_clk",
1200 .parent_hws
= (const struct clk_hw
*[]){
1201 &gcc_aggre_ufs_phy_axi_clk
.clkr
.hw
},
1203 .flags
= CLK_SET_RATE_PARENT
,
1204 .ops
= &clk_branch_simple_ops
,
1209 static struct clk_branch gcc_aggre_usb3_prim_axi_clk
= {
1211 .halt_check
= BRANCH_HALT
,
1213 .enable_reg
= 0xf07c,
1214 .enable_mask
= BIT(0),
1215 .hw
.init
= &(struct clk_init_data
){
1216 .name
= "gcc_aggre_usb3_prim_axi_clk",
1217 .parent_hws
= (const struct clk_hw
*[]){
1218 &gcc_usb30_prim_master_clk_src
.clkr
.hw
},
1220 .flags
= CLK_SET_RATE_PARENT
,
1221 .ops
= &clk_branch2_ops
,
1226 static struct clk_branch gcc_aggre_usb3_sec_axi_clk
= {
1227 .halt_reg
= 0x1007c,
1228 .halt_check
= BRANCH_HALT
,
1230 .enable_reg
= 0x1007c,
1231 .enable_mask
= BIT(0),
1232 .hw
.init
= &(struct clk_init_data
){
1233 .name
= "gcc_aggre_usb3_sec_axi_clk",
1234 .parent_hws
= (const struct clk_hw
*[]){
1235 &gcc_usb30_sec_master_clk_src
.clkr
.hw
},
1237 .flags
= CLK_SET_RATE_PARENT
,
1238 .ops
= &clk_branch2_ops
,
1243 static struct clk_branch gcc_boot_rom_ahb_clk
= {
1244 .halt_reg
= 0x38004,
1245 .halt_check
= BRANCH_HALT_VOTED
,
1246 .hwcg_reg
= 0x38004,
1249 .enable_reg
= 0x52004,
1250 .enable_mask
= BIT(10),
1251 .hw
.init
= &(struct clk_init_data
){
1252 .name
= "gcc_boot_rom_ahb_clk",
1253 .ops
= &clk_branch2_ops
,
1259 * Clock ON depends on external parent 'config noc', so cant poll
1260 * delay and also mark as crtitical for camss boot
1262 static struct clk_branch gcc_camera_ahb_clk
= {
1264 .halt_check
= BRANCH_HALT_DELAY
,
1268 .enable_reg
= 0xb008,
1269 .enable_mask
= BIT(0),
1270 .hw
.init
= &(struct clk_init_data
){
1271 .name
= "gcc_camera_ahb_clk",
1272 .flags
= CLK_IS_CRITICAL
,
1273 .ops
= &clk_branch2_ops
,
1278 static struct clk_branch gcc_camera_hf_axi_clk
= {
1280 .halt_check
= BRANCH_HALT
,
1282 .enable_reg
= 0xb030,
1283 .enable_mask
= BIT(0),
1284 .hw
.init
= &(struct clk_init_data
){
1285 .name
= "gcc_camera_hf_axi_clk",
1286 .ops
= &clk_branch2_ops
,
1291 static struct clk_branch gcc_camera_sf_axi_clk
= {
1293 .halt_check
= BRANCH_HALT
,
1295 .enable_reg
= 0xb034,
1296 .enable_mask
= BIT(0),
1297 .hw
.init
= &(struct clk_init_data
){
1298 .name
= "gcc_camera_sf_axi_clk",
1299 .ops
= &clk_branch2_ops
,
1304 /* XO critical input to camss, so no need to poll */
1305 static struct clk_branch gcc_camera_xo_clk
= {
1307 .halt_check
= BRANCH_HALT_DELAY
,
1309 .enable_reg
= 0xb044,
1310 .enable_mask
= BIT(0),
1311 .hw
.init
= &(struct clk_init_data
){
1312 .name
= "gcc_camera_xo_clk",
1313 .flags
= CLK_IS_CRITICAL
,
1314 .ops
= &clk_branch2_ops
,
1319 static struct clk_branch gcc_cfg_noc_usb3_prim_axi_clk
= {
1321 .halt_check
= BRANCH_HALT
,
1323 .enable_reg
= 0xf078,
1324 .enable_mask
= BIT(0),
1325 .hw
.init
= &(struct clk_init_data
){
1326 .name
= "gcc_cfg_noc_usb3_prim_axi_clk",
1327 .parent_hws
= (const struct clk_hw
*[]){
1328 &gcc_usb30_prim_master_clk_src
.clkr
.hw
},
1330 .flags
= CLK_SET_RATE_PARENT
,
1331 .ops
= &clk_branch2_ops
,
1336 static struct clk_branch gcc_cfg_noc_usb3_sec_axi_clk
= {
1337 .halt_reg
= 0x10078,
1338 .halt_check
= BRANCH_HALT
,
1340 .enable_reg
= 0x10078,
1341 .enable_mask
= BIT(0),
1342 .hw
.init
= &(struct clk_init_data
){
1343 .name
= "gcc_cfg_noc_usb3_sec_axi_clk",
1344 .parent_hws
= (const struct clk_hw
*[]){
1345 &gcc_usb30_sec_master_clk_src
.clkr
.hw
},
1347 .flags
= CLK_SET_RATE_PARENT
,
1348 .ops
= &clk_branch2_ops
,
1353 static struct clk_branch gcc_cpuss_ahb_clk
= {
1354 .halt_reg
= 0x48000,
1355 .halt_check
= BRANCH_HALT_VOTED
,
1357 .enable_reg
= 0x52004,
1358 .enable_mask
= BIT(21),
1359 .hw
.init
= &(struct clk_init_data
){
1360 .name
= "gcc_cpuss_ahb_clk",
1361 .parent_hws
= (const struct clk_hw
*[]){
1362 &gcc_cpuss_ahb_clk_src
.clkr
.hw
},
1364 /* required for cpuss */
1365 .flags
= CLK_IS_CRITICAL
| CLK_SET_RATE_PARENT
,
1366 .ops
= &clk_branch2_ops
,
1371 static struct clk_branch gcc_cpuss_dvm_bus_clk
= {
1372 .halt_reg
= 0x48190,
1373 .halt_check
= BRANCH_HALT
,
1375 .enable_reg
= 0x48190,
1376 .enable_mask
= BIT(0),
1377 .hw
.init
= &(struct clk_init_data
){
1378 .name
= "gcc_cpuss_dvm_bus_clk",
1379 /* required for cpuss */
1380 .flags
= CLK_IS_CRITICAL
,
1381 .ops
= &clk_branch2_ops
,
1386 static struct clk_branch gcc_cpuss_gnoc_clk
= {
1387 .halt_reg
= 0x48004,
1388 .halt_check
= BRANCH_HALT_VOTED
,
1389 .hwcg_reg
= 0x48004,
1392 .enable_reg
= 0x52004,
1393 .enable_mask
= BIT(22),
1394 .hw
.init
= &(struct clk_init_data
){
1395 .name
= "gcc_cpuss_gnoc_clk",
1396 /* required for cpuss */
1397 .flags
= CLK_IS_CRITICAL
,
1398 .ops
= &clk_branch2_ops
,
1403 static struct clk_branch gcc_cpuss_rbcpr_clk
= {
1404 .halt_reg
= 0x48008,
1405 .halt_check
= BRANCH_HALT
,
1407 .enable_reg
= 0x48008,
1408 .enable_mask
= BIT(0),
1409 .hw
.init
= &(struct clk_init_data
){
1410 .name
= "gcc_cpuss_rbcpr_clk",
1411 .ops
= &clk_branch2_ops
,
1416 static struct clk_branch gcc_ddrss_gpu_axi_clk
= {
1417 .halt_reg
= 0x71154,
1418 .halt_check
= BRANCH_VOTED
,
1420 .enable_reg
= 0x71154,
1421 .enable_mask
= BIT(0),
1422 .hw
.init
= &(struct clk_init_data
){
1423 .name
= "gcc_ddrss_gpu_axi_clk",
1424 .ops
= &clk_branch2_ops
,
1430 * Clock ON depends on external parent 'config noc', so cant poll
1431 * delay and also mark as crtitical for disp boot
1433 static struct clk_branch gcc_disp_ahb_clk
= {
1435 .halt_check
= BRANCH_HALT_DELAY
,
1439 .enable_reg
= 0xb00c,
1440 .enable_mask
= BIT(0),
1441 .hw
.init
= &(struct clk_init_data
){
1442 .name
= "gcc_disp_ahb_clk",
1443 .flags
= CLK_IS_CRITICAL
,
1444 .ops
= &clk_branch2_ops
,
1449 static struct clk_branch gcc_disp_hf_axi_clk
= {
1451 .halt_check
= BRANCH_HALT
,
1453 .enable_reg
= 0xb038,
1454 .enable_mask
= BIT(0),
1455 .hw
.init
= &(struct clk_init_data
){
1456 .name
= "gcc_disp_hf_axi_clk",
1457 .ops
= &clk_branch2_ops
,
1462 static struct clk_branch gcc_disp_sf_axi_clk
= {
1464 .halt_check
= BRANCH_HALT
,
1466 .enable_reg
= 0xb03c,
1467 .enable_mask
= BIT(0),
1468 .hw
.init
= &(struct clk_init_data
){
1469 .name
= "gcc_disp_sf_axi_clk",
1470 .ops
= &clk_branch2_ops
,
1475 /* XO critical input to disp, so no need to poll */
1476 static struct clk_branch gcc_disp_xo_clk
= {
1478 .halt_check
= BRANCH_HALT_DELAY
,
1480 .enable_reg
= 0xb048,
1481 .enable_mask
= BIT(0),
1482 .hw
.init
= &(struct clk_init_data
){
1483 .name
= "gcc_disp_xo_clk",
1484 .flags
= CLK_IS_CRITICAL
,
1485 .ops
= &clk_branch2_ops
,
1490 static struct clk_branch gcc_emac_axi_clk
= {
1492 .halt_check
= BRANCH_HALT
,
1494 .enable_reg
= 0x6010,
1495 .enable_mask
= BIT(0),
1496 .hw
.init
= &(struct clk_init_data
){
1497 .name
= "gcc_emac_axi_clk",
1498 .ops
= &clk_branch2_ops
,
1503 static struct clk_branch gcc_emac_ptp_clk
= {
1505 .halt_check
= BRANCH_HALT
,
1507 .enable_reg
= 0x6034,
1508 .enable_mask
= BIT(0),
1509 .hw
.init
= &(struct clk_init_data
){
1510 .name
= "gcc_emac_ptp_clk",
1511 .parent_hws
= (const struct clk_hw
*[]){
1512 &gcc_emac_ptp_clk_src
.clkr
.hw
},
1514 .flags
= CLK_SET_RATE_PARENT
,
1515 .ops
= &clk_branch2_ops
,
1520 static struct clk_branch gcc_emac_rgmii_clk
= {
1522 .halt_check
= BRANCH_HALT
,
1524 .enable_reg
= 0x6018,
1525 .enable_mask
= BIT(0),
1526 .hw
.init
= &(struct clk_init_data
){
1527 .name
= "gcc_emac_rgmii_clk",
1528 .parent_hws
= (const struct clk_hw
*[]){
1529 &gcc_emac_rgmii_clk_src
.clkr
.hw
},
1531 .flags
= CLK_SET_RATE_PARENT
,
1532 .ops
= &clk_branch2_ops
,
1537 static struct clk_branch gcc_emac_slv_ahb_clk
= {
1539 .halt_check
= BRANCH_HALT
,
1543 .enable_reg
= 0x6014,
1544 .enable_mask
= BIT(0),
1545 .hw
.init
= &(struct clk_init_data
){
1546 .name
= "gcc_emac_slv_ahb_clk",
1547 .ops
= &clk_branch2_ops
,
1552 static struct clk_branch gcc_gp1_clk
= {
1553 .halt_reg
= 0x64000,
1554 .halt_check
= BRANCH_HALT
,
1556 .enable_reg
= 0x64000,
1557 .enable_mask
= BIT(0),
1558 .hw
.init
= &(struct clk_init_data
){
1559 .name
= "gcc_gp1_clk",
1560 .parent_hws
= (const struct clk_hw
*[]){
1561 &gcc_gp1_clk_src
.clkr
.hw
},
1563 .flags
= CLK_SET_RATE_PARENT
,
1564 .ops
= &clk_branch2_ops
,
1569 static struct clk_branch gcc_gp2_clk
= {
1570 .halt_reg
= 0x65000,
1571 .halt_check
= BRANCH_HALT
,
1573 .enable_reg
= 0x65000,
1574 .enable_mask
= BIT(0),
1575 .hw
.init
= &(struct clk_init_data
){
1576 .name
= "gcc_gp2_clk",
1577 .parent_hws
= (const struct clk_hw
*[]){
1578 &gcc_gp2_clk_src
.clkr
.hw
},
1580 .flags
= CLK_SET_RATE_PARENT
,
1581 .ops
= &clk_branch2_ops
,
1586 static struct clk_branch gcc_gp3_clk
= {
1587 .halt_reg
= 0x66000,
1588 .halt_check
= BRANCH_HALT
,
1590 .enable_reg
= 0x66000,
1591 .enable_mask
= BIT(0),
1592 .hw
.init
= &(struct clk_init_data
){
1593 .name
= "gcc_gp3_clk",
1594 .parent_hws
= (const struct clk_hw
*[]){
1595 &gcc_gp3_clk_src
.clkr
.hw
},
1597 .flags
= CLK_SET_RATE_PARENT
,
1598 .ops
= &clk_branch2_ops
,
1603 static struct clk_branch gcc_gpu_cfg_ahb_clk
= {
1604 .halt_reg
= 0x71004,
1605 .halt_check
= BRANCH_HALT
,
1606 .hwcg_reg
= 0x71004,
1609 .enable_reg
= 0x71004,
1610 .enable_mask
= BIT(0),
1611 .hw
.init
= &(struct clk_init_data
){
1612 .name
= "gcc_gpu_cfg_ahb_clk",
1613 /* required for gpu */
1614 .flags
= CLK_IS_CRITICAL
,
1615 .ops
= &clk_branch2_ops
,
1620 static struct clk_branch gcc_gpu_iref_clk
= {
1621 .halt_reg
= 0x8c010,
1622 .halt_check
= BRANCH_HALT
,
1624 .enable_reg
= 0x8c010,
1625 .enable_mask
= BIT(0),
1626 .hw
.init
= &(struct clk_init_data
){
1627 .name
= "gcc_gpu_iref_clk",
1628 .ops
= &clk_branch2_ops
,
1633 static struct clk_branch gcc_gpu_memnoc_gfx_clk
= {
1634 .halt_reg
= 0x7100c,
1635 .halt_check
= BRANCH_VOTED
,
1637 .enable_reg
= 0x7100c,
1638 .enable_mask
= BIT(0),
1639 .hw
.init
= &(struct clk_init_data
){
1640 .name
= "gcc_gpu_memnoc_gfx_clk",
1641 .ops
= &clk_branch2_ops
,
1646 static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk
= {
1647 .halt_reg
= 0x71018,
1648 .halt_check
= BRANCH_HALT
,
1650 .enable_reg
= 0x71018,
1651 .enable_mask
= BIT(0),
1652 .hw
.init
= &(struct clk_init_data
){
1653 .name
= "gcc_gpu_snoc_dvm_gfx_clk",
1654 .ops
= &clk_branch2_ops
,
1659 static struct clk_branch gcc_npu_at_clk
= {
1660 .halt_reg
= 0x4d010,
1661 .halt_check
= BRANCH_VOTED
,
1663 .enable_reg
= 0x4d010,
1664 .enable_mask
= BIT(0),
1665 .hw
.init
= &(struct clk_init_data
){
1666 .name
= "gcc_npu_at_clk",
1667 .ops
= &clk_branch2_ops
,
1672 static struct clk_branch gcc_npu_axi_clk
= {
1673 .halt_reg
= 0x4d008,
1674 .halt_check
= BRANCH_VOTED
,
1676 .enable_reg
= 0x4d008,
1677 .enable_mask
= BIT(0),
1678 .hw
.init
= &(struct clk_init_data
){
1679 .name
= "gcc_npu_axi_clk",
1680 .ops
= &clk_branch2_ops
,
1685 static struct clk_branch gcc_npu_cfg_ahb_clk
= {
1686 .halt_reg
= 0x4d004,
1687 .halt_check
= BRANCH_HALT
,
1688 .hwcg_reg
= 0x4d004,
1691 .enable_reg
= 0x4d004,
1692 .enable_mask
= BIT(0),
1693 .hw
.init
= &(struct clk_init_data
){
1694 .name
= "gcc_npu_cfg_ahb_clk",
1695 /* required for npu */
1696 .flags
= CLK_IS_CRITICAL
,
1697 .ops
= &clk_branch2_ops
,
1702 static struct clk_branch gcc_npu_trig_clk
= {
1703 .halt_reg
= 0x4d00c,
1704 .halt_check
= BRANCH_VOTED
,
1706 .enable_reg
= 0x4d00c,
1707 .enable_mask
= BIT(0),
1708 .hw
.init
= &(struct clk_init_data
){
1709 .name
= "gcc_npu_trig_clk",
1710 .ops
= &clk_branch2_ops
,
1715 static struct clk_branch gcc_pcie0_phy_refgen_clk
= {
1716 .halt_reg
= 0x6f02c,
1717 .halt_check
= BRANCH_HALT
,
1719 .enable_reg
= 0x6f02c,
1720 .enable_mask
= BIT(0),
1721 .hw
.init
= &(struct clk_init_data
){
1722 .name
= "gcc_pcie0_phy_refgen_clk",
1723 .parent_hws
= (const struct clk_hw
*[]){
1724 &gcc_pcie_phy_refgen_clk_src
.clkr
.hw
},
1726 .flags
= CLK_SET_RATE_PARENT
,
1727 .ops
= &clk_branch2_ops
,
1732 static struct clk_branch gcc_pcie1_phy_refgen_clk
= {
1733 .halt_reg
= 0x6f030,
1734 .halt_check
= BRANCH_HALT
,
1736 .enable_reg
= 0x6f030,
1737 .enable_mask
= BIT(0),
1738 .hw
.init
= &(struct clk_init_data
){
1739 .name
= "gcc_pcie1_phy_refgen_clk",
1740 .parent_hws
= (const struct clk_hw
*[]){
1741 &gcc_pcie_phy_refgen_clk_src
.clkr
.hw
},
1743 .flags
= CLK_SET_RATE_PARENT
,
1744 .ops
= &clk_branch2_ops
,
1749 static struct clk_branch gcc_pcie_0_aux_clk
= {
1750 .halt_reg
= 0x6b020,
1751 .halt_check
= BRANCH_HALT_VOTED
,
1753 .enable_reg
= 0x5200c,
1754 .enable_mask
= BIT(3),
1755 .hw
.init
= &(struct clk_init_data
){
1756 .name
= "gcc_pcie_0_aux_clk",
1757 .parent_hws
= (const struct clk_hw
*[]){
1758 &gcc_pcie_0_aux_clk_src
.clkr
.hw
},
1760 .flags
= CLK_SET_RATE_PARENT
,
1761 .ops
= &clk_branch2_ops
,
1766 static struct clk_branch gcc_pcie_0_cfg_ahb_clk
= {
1767 .halt_reg
= 0x6b01c,
1768 .halt_check
= BRANCH_HALT_VOTED
,
1769 .hwcg_reg
= 0x6b01c,
1772 .enable_reg
= 0x5200c,
1773 .enable_mask
= BIT(2),
1774 .hw
.init
= &(struct clk_init_data
){
1775 .name
= "gcc_pcie_0_cfg_ahb_clk",
1776 .ops
= &clk_branch2_ops
,
1781 static struct clk_branch gcc_pcie_0_clkref_clk
= {
1782 .halt_reg
= 0x8c00c,
1783 .halt_check
= BRANCH_HALT
,
1785 .enable_reg
= 0x8c00c,
1786 .enable_mask
= BIT(0),
1787 .hw
.init
= &(struct clk_init_data
){
1788 .name
= "gcc_pcie_0_clkref_clk",
1789 .ops
= &clk_branch2_ops
,
1794 static struct clk_branch gcc_pcie_0_mstr_axi_clk
= {
1795 .halt_reg
= 0x6b018,
1796 .halt_check
= BRANCH_HALT_VOTED
,
1798 .enable_reg
= 0x5200c,
1799 .enable_mask
= BIT(1),
1800 .hw
.init
= &(struct clk_init_data
){
1801 .name
= "gcc_pcie_0_mstr_axi_clk",
1802 .ops
= &clk_branch2_ops
,
1807 /* Clock ON depends on external parent 'PIPE' clock, so dont poll */
1808 static struct clk_branch gcc_pcie_0_pipe_clk
= {
1809 .halt_reg
= 0x6b024,
1810 .halt_check
= BRANCH_HALT_DELAY
,
1812 .enable_reg
= 0x5200c,
1813 .enable_mask
= BIT(4),
1814 .hw
.init
= &(struct clk_init_data
){
1815 .name
= "gcc_pcie_0_pipe_clk",
1816 .ops
= &clk_branch2_ops
,
1821 static struct clk_branch gcc_pcie_0_slv_axi_clk
= {
1822 .halt_reg
= 0x6b014,
1823 .halt_check
= BRANCH_HALT_VOTED
,
1824 .hwcg_reg
= 0x6b014,
1827 .enable_reg
= 0x5200c,
1828 .enable_mask
= BIT(0),
1829 .hw
.init
= &(struct clk_init_data
){
1830 .name
= "gcc_pcie_0_slv_axi_clk",
1831 .ops
= &clk_branch2_ops
,
1836 static struct clk_branch gcc_pcie_0_slv_q2a_axi_clk
= {
1837 .halt_reg
= 0x6b010,
1838 .halt_check
= BRANCH_HALT_VOTED
,
1840 .enable_reg
= 0x5200c,
1841 .enable_mask
= BIT(5),
1842 .hw
.init
= &(struct clk_init_data
){
1843 .name
= "gcc_pcie_0_slv_q2a_axi_clk",
1844 .ops
= &clk_branch2_ops
,
1849 static struct clk_branch gcc_pcie_1_aux_clk
= {
1850 .halt_reg
= 0x8d020,
1851 .halt_check
= BRANCH_HALT_VOTED
,
1853 .enable_reg
= 0x52004,
1854 .enable_mask
= BIT(29),
1855 .hw
.init
= &(struct clk_init_data
){
1856 .name
= "gcc_pcie_1_aux_clk",
1857 .parent_hws
= (const struct clk_hw
*[]){
1858 &gcc_pcie_1_aux_clk_src
.clkr
.hw
},
1860 .flags
= CLK_SET_RATE_PARENT
,
1861 .ops
= &clk_branch2_ops
,
1866 static struct clk_branch gcc_pcie_1_cfg_ahb_clk
= {
1867 .halt_reg
= 0x8d01c,
1868 .halt_check
= BRANCH_HALT_VOTED
,
1869 .hwcg_reg
= 0x8d01c,
1872 .enable_reg
= 0x52004,
1873 .enable_mask
= BIT(28),
1874 .hw
.init
= &(struct clk_init_data
){
1875 .name
= "gcc_pcie_1_cfg_ahb_clk",
1876 .ops
= &clk_branch2_ops
,
1881 static struct clk_branch gcc_pcie_1_clkref_clk
= {
1882 .halt_reg
= 0x8c02c,
1883 .halt_check
= BRANCH_HALT
,
1885 .enable_reg
= 0x8c02c,
1886 .enable_mask
= BIT(0),
1887 .hw
.init
= &(struct clk_init_data
){
1888 .name
= "gcc_pcie_1_clkref_clk",
1889 .ops
= &clk_branch2_ops
,
1894 static struct clk_branch gcc_pcie_1_mstr_axi_clk
= {
1895 .halt_reg
= 0x8d018,
1896 .halt_check
= BRANCH_HALT_VOTED
,
1898 .enable_reg
= 0x52004,
1899 .enable_mask
= BIT(27),
1900 .hw
.init
= &(struct clk_init_data
){
1901 .name
= "gcc_pcie_1_mstr_axi_clk",
1902 .ops
= &clk_branch2_ops
,
1907 /* Clock ON depends on external parent 'PIPE' clock, so dont poll */
1908 static struct clk_branch gcc_pcie_1_pipe_clk
= {
1909 .halt_reg
= 0x8d024,
1910 .halt_check
= BRANCH_HALT_DELAY
,
1912 .enable_reg
= 0x52004,
1913 .enable_mask
= BIT(30),
1914 .hw
.init
= &(struct clk_init_data
){
1915 .name
= "gcc_pcie_1_pipe_clk",
1916 .ops
= &clk_branch2_ops
,
1921 static struct clk_branch gcc_pcie_1_slv_axi_clk
= {
1922 .halt_reg
= 0x8d014,
1923 .halt_check
= BRANCH_HALT_VOTED
,
1924 .hwcg_reg
= 0x8d014,
1927 .enable_reg
= 0x52004,
1928 .enable_mask
= BIT(26),
1929 .hw
.init
= &(struct clk_init_data
){
1930 .name
= "gcc_pcie_1_slv_axi_clk",
1931 .ops
= &clk_branch2_ops
,
1936 static struct clk_branch gcc_pcie_1_slv_q2a_axi_clk
= {
1937 .halt_reg
= 0x8d010,
1938 .halt_check
= BRANCH_HALT_VOTED
,
1940 .enable_reg
= 0x52004,
1941 .enable_mask
= BIT(25),
1942 .hw
.init
= &(struct clk_init_data
){
1943 .name
= "gcc_pcie_1_slv_q2a_axi_clk",
1944 .ops
= &clk_branch2_ops
,
1949 static struct clk_branch gcc_pcie_phy_aux_clk
= {
1950 .halt_reg
= 0x6f004,
1951 .halt_check
= BRANCH_HALT
,
1953 .enable_reg
= 0x6f004,
1954 .enable_mask
= BIT(0),
1955 .hw
.init
= &(struct clk_init_data
){
1956 .name
= "gcc_pcie_phy_aux_clk",
1957 .parent_hws
= (const struct clk_hw
*[]){
1958 &gcc_pcie_0_aux_clk_src
.clkr
.hw
},
1960 .flags
= CLK_SET_RATE_PARENT
,
1961 .ops
= &clk_branch2_ops
,
1966 static struct clk_branch gcc_pdm2_clk
= {
1967 .halt_reg
= 0x3300c,
1968 .halt_check
= BRANCH_HALT
,
1970 .enable_reg
= 0x3300c,
1971 .enable_mask
= BIT(0),
1972 .hw
.init
= &(struct clk_init_data
){
1973 .name
= "gcc_pdm2_clk",
1974 .parent_hws
= (const struct clk_hw
*[]){
1975 &gcc_pdm2_clk_src
.clkr
.hw
},
1977 .flags
= CLK_SET_RATE_PARENT
,
1978 .ops
= &clk_branch2_ops
,
1983 static struct clk_branch gcc_pdm_ahb_clk
= {
1984 .halt_reg
= 0x33004,
1985 .halt_check
= BRANCH_HALT
,
1986 .hwcg_reg
= 0x33004,
1989 .enable_reg
= 0x33004,
1990 .enable_mask
= BIT(0),
1991 .hw
.init
= &(struct clk_init_data
){
1992 .name
= "gcc_pdm_ahb_clk",
1993 .ops
= &clk_branch2_ops
,
1998 static struct clk_branch gcc_pdm_xo4_clk
= {
1999 .halt_reg
= 0x33008,
2000 .halt_check
= BRANCH_HALT
,
2002 .enable_reg
= 0x33008,
2003 .enable_mask
= BIT(0),
2004 .hw
.init
= &(struct clk_init_data
){
2005 .name
= "gcc_pdm_xo4_clk",
2006 .ops
= &clk_branch2_ops
,
2011 static struct clk_branch gcc_prng_ahb_clk
= {
2012 .halt_reg
= 0x34004,
2013 .halt_check
= BRANCH_HALT_VOTED
,
2015 .enable_reg
= 0x52004,
2016 .enable_mask
= BIT(13),
2017 .hw
.init
= &(struct clk_init_data
){
2018 .name
= "gcc_prng_ahb_clk",
2019 .ops
= &clk_branch2_ops
,
2024 static struct clk_branch gcc_qmip_camera_nrt_ahb_clk
= {
2026 .halt_check
= BRANCH_HALT
,
2030 .enable_reg
= 0xb018,
2031 .enable_mask
= BIT(0),
2032 .hw
.init
= &(struct clk_init_data
){
2033 .name
= "gcc_qmip_camera_nrt_ahb_clk",
2034 .ops
= &clk_branch2_ops
,
2039 static struct clk_branch gcc_qmip_camera_rt_ahb_clk
= {
2041 .halt_check
= BRANCH_HALT
,
2045 .enable_reg
= 0xb01c,
2046 .enable_mask
= BIT(0),
2047 .hw
.init
= &(struct clk_init_data
){
2048 .name
= "gcc_qmip_camera_rt_ahb_clk",
2049 .ops
= &clk_branch2_ops
,
2054 static struct clk_branch gcc_qmip_disp_ahb_clk
= {
2056 .halt_check
= BRANCH_HALT
,
2060 .enable_reg
= 0xb020,
2061 .enable_mask
= BIT(0),
2062 .hw
.init
= &(struct clk_init_data
){
2063 .name
= "gcc_qmip_disp_ahb_clk",
2064 .ops
= &clk_branch2_ops
,
2069 static struct clk_branch gcc_qmip_video_cvp_ahb_clk
= {
2071 .halt_check
= BRANCH_HALT
,
2075 .enable_reg
= 0xb010,
2076 .enable_mask
= BIT(0),
2077 .hw
.init
= &(struct clk_init_data
){
2078 .name
= "gcc_qmip_video_cvp_ahb_clk",
2079 .ops
= &clk_branch2_ops
,
2084 static struct clk_branch gcc_qmip_video_vcodec_ahb_clk
= {
2086 .halt_check
= BRANCH_HALT
,
2090 .enable_reg
= 0xb014,
2091 .enable_mask
= BIT(0),
2092 .hw
.init
= &(struct clk_init_data
){
2093 .name
= "gcc_qmip_video_vcodec_ahb_clk",
2094 .ops
= &clk_branch2_ops
,
2099 static struct clk_branch gcc_qspi_cnoc_periph_ahb_clk
= {
2100 .halt_reg
= 0x4b000,
2101 .halt_check
= BRANCH_HALT
,
2103 .enable_reg
= 0x4b000,
2104 .enable_mask
= BIT(0),
2105 .hw
.init
= &(struct clk_init_data
){
2106 .name
= "gcc_qspi_cnoc_periph_ahb_clk",
2107 .ops
= &clk_branch2_ops
,
2112 static struct clk_branch gcc_qspi_core_clk
= {
2113 .halt_reg
= 0x4b004,
2114 .halt_check
= BRANCH_HALT
,
2116 .enable_reg
= 0x4b004,
2117 .enable_mask
= BIT(0),
2118 .hw
.init
= &(struct clk_init_data
){
2119 .name
= "gcc_qspi_core_clk",
2120 .parent_hws
= (const struct clk_hw
*[]){
2121 &gcc_qspi_core_clk_src
.clkr
.hw
},
2123 .flags
= CLK_SET_RATE_PARENT
,
2124 .ops
= &clk_branch2_ops
,
2129 static struct clk_branch gcc_qupv3_wrap0_s0_clk
= {
2130 .halt_reg
= 0x17144,
2131 .halt_check
= BRANCH_HALT_VOTED
,
2133 .enable_reg
= 0x5200c,
2134 .enable_mask
= BIT(10),
2135 .hw
.init
= &(struct clk_init_data
){
2136 .name
= "gcc_qupv3_wrap0_s0_clk",
2137 .parent_hws
= (const struct clk_hw
*[]){
2138 &gcc_qupv3_wrap0_s0_clk_src
.clkr
.hw
},
2140 .flags
= CLK_SET_RATE_PARENT
,
2141 .ops
= &clk_branch2_ops
,
2146 static struct clk_branch gcc_qupv3_wrap0_s1_clk
= {
2147 .halt_reg
= 0x17274,
2148 .halt_check
= BRANCH_HALT_VOTED
,
2150 .enable_reg
= 0x5200c,
2151 .enable_mask
= BIT(11),
2152 .hw
.init
= &(struct clk_init_data
){
2153 .name
= "gcc_qupv3_wrap0_s1_clk",
2154 .parent_hws
= (const struct clk_hw
*[]){
2155 &gcc_qupv3_wrap0_s1_clk_src
.clkr
.hw
},
2157 .flags
= CLK_SET_RATE_PARENT
,
2158 .ops
= &clk_branch2_ops
,
2163 static struct clk_branch gcc_qupv3_wrap0_s2_clk
= {
2164 .halt_reg
= 0x173a4,
2165 .halt_check
= BRANCH_HALT_VOTED
,
2167 .enable_reg
= 0x5200c,
2168 .enable_mask
= BIT(12),
2169 .hw
.init
= &(struct clk_init_data
){
2170 .name
= "gcc_qupv3_wrap0_s2_clk",
2171 .parent_hws
= (const struct clk_hw
*[]){
2172 &gcc_qupv3_wrap0_s2_clk_src
.clkr
.hw
},
2174 .flags
= CLK_SET_RATE_PARENT
,
2175 .ops
= &clk_branch2_ops
,
2180 static struct clk_branch gcc_qupv3_wrap0_s3_clk
= {
2181 .halt_reg
= 0x174d4,
2182 .halt_check
= BRANCH_HALT_VOTED
,
2184 .enable_reg
= 0x5200c,
2185 .enable_mask
= BIT(13),
2186 .hw
.init
= &(struct clk_init_data
){
2187 .name
= "gcc_qupv3_wrap0_s3_clk",
2188 .parent_hws
= (const struct clk_hw
*[]){
2189 &gcc_qupv3_wrap0_s3_clk_src
.clkr
.hw
},
2191 .flags
= CLK_SET_RATE_PARENT
,
2192 .ops
= &clk_branch2_ops
,
2197 static struct clk_branch gcc_qupv3_wrap0_s4_clk
= {
2198 .halt_reg
= 0x17604,
2199 .halt_check
= BRANCH_HALT_VOTED
,
2201 .enable_reg
= 0x5200c,
2202 .enable_mask
= BIT(14),
2203 .hw
.init
= &(struct clk_init_data
){
2204 .name
= "gcc_qupv3_wrap0_s4_clk",
2205 .parent_hws
= (const struct clk_hw
*[]){
2206 &gcc_qupv3_wrap0_s4_clk_src
.clkr
.hw
},
2208 .flags
= CLK_SET_RATE_PARENT
,
2209 .ops
= &clk_branch2_ops
,
2214 static struct clk_branch gcc_qupv3_wrap0_s5_clk
= {
2215 .halt_reg
= 0x17734,
2216 .halt_check
= BRANCH_HALT_VOTED
,
2218 .enable_reg
= 0x5200c,
2219 .enable_mask
= BIT(15),
2220 .hw
.init
= &(struct clk_init_data
){
2221 .name
= "gcc_qupv3_wrap0_s5_clk",
2222 .parent_hws
= (const struct clk_hw
*[]){
2223 &gcc_qupv3_wrap0_s5_clk_src
.clkr
.hw
},
2225 .flags
= CLK_SET_RATE_PARENT
,
2226 .ops
= &clk_branch2_ops
,
2231 static struct clk_branch gcc_qupv3_wrap0_s6_clk
= {
2232 .halt_reg
= 0x17864,
2233 .halt_check
= BRANCH_HALT_VOTED
,
2235 .enable_reg
= 0x5200c,
2236 .enable_mask
= BIT(16),
2237 .hw
.init
= &(struct clk_init_data
){
2238 .name
= "gcc_qupv3_wrap0_s6_clk",
2239 .parent_hws
= (const struct clk_hw
*[]){
2240 &gcc_qupv3_wrap0_s6_clk_src
.clkr
.hw
},
2242 .flags
= CLK_SET_RATE_PARENT
,
2243 .ops
= &clk_branch2_ops
,
2248 static struct clk_branch gcc_qupv3_wrap0_s7_clk
= {
2249 .halt_reg
= 0x17994,
2250 .halt_check
= BRANCH_HALT_VOTED
,
2252 .enable_reg
= 0x5200c,
2253 .enable_mask
= BIT(17),
2254 .hw
.init
= &(struct clk_init_data
){
2255 .name
= "gcc_qupv3_wrap0_s7_clk",
2256 .parent_hws
= (const struct clk_hw
*[]){
2257 &gcc_qupv3_wrap0_s7_clk_src
.clkr
.hw
},
2259 .flags
= CLK_SET_RATE_PARENT
,
2260 .ops
= &clk_branch2_ops
,
2265 static struct clk_branch gcc_qupv3_wrap1_s0_clk
= {
2266 .halt_reg
= 0x18144,
2267 .halt_check
= BRANCH_HALT_VOTED
,
2269 .enable_reg
= 0x5200c,
2270 .enable_mask
= BIT(22),
2271 .hw
.init
= &(struct clk_init_data
){
2272 .name
= "gcc_qupv3_wrap1_s0_clk",
2273 .parent_hws
= (const struct clk_hw
*[]){
2274 &gcc_qupv3_wrap1_s0_clk_src
.clkr
.hw
},
2276 .flags
= CLK_SET_RATE_PARENT
,
2277 .ops
= &clk_branch2_ops
,
2282 static struct clk_branch gcc_qupv3_wrap1_s1_clk
= {
2283 .halt_reg
= 0x18274,
2284 .halt_check
= BRANCH_HALT_VOTED
,
2286 .enable_reg
= 0x5200c,
2287 .enable_mask
= BIT(23),
2288 .hw
.init
= &(struct clk_init_data
){
2289 .name
= "gcc_qupv3_wrap1_s1_clk",
2290 .parent_hws
= (const struct clk_hw
*[]){
2291 &gcc_qupv3_wrap1_s1_clk_src
.clkr
.hw
},
2293 .flags
= CLK_SET_RATE_PARENT
,
2294 .ops
= &clk_branch2_ops
,
2299 static struct clk_branch gcc_qupv3_wrap1_s2_clk
= {
2300 .halt_reg
= 0x183a4,
2301 .halt_check
= BRANCH_HALT_VOTED
,
2303 .enable_reg
= 0x5200c,
2304 .enable_mask
= BIT(24),
2305 .hw
.init
= &(struct clk_init_data
){
2306 .name
= "gcc_qupv3_wrap1_s2_clk",
2307 .parent_hws
= (const struct clk_hw
*[]){
2308 &gcc_qupv3_wrap1_s2_clk_src
.clkr
.hw
},
2310 .flags
= CLK_SET_RATE_PARENT
,
2311 .ops
= &clk_branch2_ops
,
2316 static struct clk_branch gcc_qupv3_wrap1_s3_clk
= {
2317 .halt_reg
= 0x184d4,
2318 .halt_check
= BRANCH_HALT_VOTED
,
2320 .enable_reg
= 0x5200c,
2321 .enable_mask
= BIT(25),
2322 .hw
.init
= &(struct clk_init_data
){
2323 .name
= "gcc_qupv3_wrap1_s3_clk",
2324 .parent_hws
= (const struct clk_hw
*[]){
2325 &gcc_qupv3_wrap1_s3_clk_src
.clkr
.hw
},
2327 .flags
= CLK_SET_RATE_PARENT
,
2328 .ops
= &clk_branch2_ops
,
2333 static struct clk_branch gcc_qupv3_wrap1_s4_clk
= {
2334 .halt_reg
= 0x18604,
2335 .halt_check
= BRANCH_HALT_VOTED
,
2337 .enable_reg
= 0x5200c,
2338 .enable_mask
= BIT(26),
2339 .hw
.init
= &(struct clk_init_data
){
2340 .name
= "gcc_qupv3_wrap1_s4_clk",
2341 .parent_hws
= (const struct clk_hw
*[]){
2342 &gcc_qupv3_wrap1_s4_clk_src
.clkr
.hw
},
2344 .flags
= CLK_SET_RATE_PARENT
,
2345 .ops
= &clk_branch2_ops
,
2350 static struct clk_branch gcc_qupv3_wrap1_s5_clk
= {
2351 .halt_reg
= 0x18734,
2352 .halt_check
= BRANCH_HALT_VOTED
,
2354 .enable_reg
= 0x5200c,
2355 .enable_mask
= BIT(27),
2356 .hw
.init
= &(struct clk_init_data
){
2357 .name
= "gcc_qupv3_wrap1_s5_clk",
2358 .parent_hws
= (const struct clk_hw
*[]){
2359 &gcc_qupv3_wrap1_s5_clk_src
.clkr
.hw
},
2361 .flags
= CLK_SET_RATE_PARENT
,
2362 .ops
= &clk_branch2_ops
,
2367 static struct clk_branch gcc_qupv3_wrap2_s0_clk
= {
2368 .halt_reg
= 0x1e144,
2369 .halt_check
= BRANCH_HALT_VOTED
,
2371 .enable_reg
= 0x52014,
2372 .enable_mask
= BIT(4),
2373 .hw
.init
= &(struct clk_init_data
){
2374 .name
= "gcc_qupv3_wrap2_s0_clk",
2375 .parent_hws
= (const struct clk_hw
*[]){
2376 &gcc_qupv3_wrap2_s0_clk_src
.clkr
.hw
},
2378 .flags
= CLK_SET_RATE_PARENT
,
2379 .ops
= &clk_branch2_ops
,
2384 static struct clk_branch gcc_qupv3_wrap2_s1_clk
= {
2385 .halt_reg
= 0x1e274,
2386 .halt_check
= BRANCH_HALT_VOTED
,
2388 .enable_reg
= 0x52014,
2389 .enable_mask
= BIT(5),
2390 .hw
.init
= &(struct clk_init_data
){
2391 .name
= "gcc_qupv3_wrap2_s1_clk",
2392 .parent_hws
= (const struct clk_hw
*[]){
2393 &gcc_qupv3_wrap2_s1_clk_src
.clkr
.hw
},
2395 .flags
= CLK_SET_RATE_PARENT
,
2396 .ops
= &clk_branch2_ops
,
2401 static struct clk_branch gcc_qupv3_wrap2_s2_clk
= {
2402 .halt_reg
= 0x1e3a4,
2403 .halt_check
= BRANCH_HALT_VOTED
,
2405 .enable_reg
= 0x52014,
2406 .enable_mask
= BIT(6),
2407 .hw
.init
= &(struct clk_init_data
){
2408 .name
= "gcc_qupv3_wrap2_s2_clk",
2409 .parent_hws
= (const struct clk_hw
*[]){
2410 &gcc_qupv3_wrap2_s2_clk_src
.clkr
.hw
},
2412 .flags
= CLK_SET_RATE_PARENT
,
2413 .ops
= &clk_branch2_ops
,
2418 static struct clk_branch gcc_qupv3_wrap2_s3_clk
= {
2419 .halt_reg
= 0x1e4d4,
2420 .halt_check
= BRANCH_HALT_VOTED
,
2422 .enable_reg
= 0x52014,
2423 .enable_mask
= BIT(7),
2424 .hw
.init
= &(struct clk_init_data
){
2425 .name
= "gcc_qupv3_wrap2_s3_clk",
2426 .parent_hws
= (const struct clk_hw
*[]){
2427 &gcc_qupv3_wrap2_s3_clk_src
.clkr
.hw
},
2429 .flags
= CLK_SET_RATE_PARENT
,
2430 .ops
= &clk_branch2_ops
,
2435 static struct clk_branch gcc_qupv3_wrap2_s4_clk
= {
2436 .halt_reg
= 0x1e604,
2437 .halt_check
= BRANCH_HALT_VOTED
,
2439 .enable_reg
= 0x52014,
2440 .enable_mask
= BIT(8),
2441 .hw
.init
= &(struct clk_init_data
){
2442 .name
= "gcc_qupv3_wrap2_s4_clk",
2443 .parent_hws
= (const struct clk_hw
*[]){
2444 &gcc_qupv3_wrap2_s4_clk_src
.clkr
.hw
},
2446 .flags
= CLK_SET_RATE_PARENT
,
2447 .ops
= &clk_branch2_ops
,
2452 static struct clk_branch gcc_qupv3_wrap2_s5_clk
= {
2453 .halt_reg
= 0x1e734,
2454 .halt_check
= BRANCH_HALT_VOTED
,
2456 .enable_reg
= 0x52014,
2457 .enable_mask
= BIT(9),
2458 .hw
.init
= &(struct clk_init_data
){
2459 .name
= "gcc_qupv3_wrap2_s5_clk",
2460 .parent_hws
= (const struct clk_hw
*[]){
2461 &gcc_qupv3_wrap2_s5_clk_src
.clkr
.hw
},
2463 .flags
= CLK_SET_RATE_PARENT
,
2464 .ops
= &clk_branch2_ops
,
2469 static struct clk_branch gcc_qupv3_wrap_0_m_ahb_clk
= {
2470 .halt_reg
= 0x17004,
2471 .halt_check
= BRANCH_HALT_VOTED
,
2473 .enable_reg
= 0x5200c,
2474 .enable_mask
= BIT(6),
2475 .hw
.init
= &(struct clk_init_data
){
2476 .name
= "gcc_qupv3_wrap_0_m_ahb_clk",
2477 .ops
= &clk_branch2_ops
,
2482 static struct clk_branch gcc_qupv3_wrap_0_s_ahb_clk
= {
2483 .halt_reg
= 0x17008,
2484 .halt_check
= BRANCH_HALT_VOTED
,
2485 .hwcg_reg
= 0x17008,
2488 .enable_reg
= 0x5200c,
2489 .enable_mask
= BIT(7),
2490 .hw
.init
= &(struct clk_init_data
){
2491 .name
= "gcc_qupv3_wrap_0_s_ahb_clk",
2492 .ops
= &clk_branch2_ops
,
2497 static struct clk_branch gcc_qupv3_wrap_1_m_ahb_clk
= {
2498 .halt_reg
= 0x18004,
2499 .halt_check
= BRANCH_HALT_VOTED
,
2501 .enable_reg
= 0x5200c,
2502 .enable_mask
= BIT(20),
2503 .hw
.init
= &(struct clk_init_data
){
2504 .name
= "gcc_qupv3_wrap_1_m_ahb_clk",
2505 .ops
= &clk_branch2_ops
,
2510 static struct clk_branch gcc_qupv3_wrap_1_s_ahb_clk
= {
2511 .halt_reg
= 0x18008,
2512 .halt_check
= BRANCH_HALT_VOTED
,
2513 .hwcg_reg
= 0x18008,
2516 .enable_reg
= 0x5200c,
2517 .enable_mask
= BIT(21),
2518 .hw
.init
= &(struct clk_init_data
){
2519 .name
= "gcc_qupv3_wrap_1_s_ahb_clk",
2520 .ops
= &clk_branch2_ops
,
2525 static struct clk_branch gcc_qupv3_wrap_2_m_ahb_clk
= {
2526 .halt_reg
= 0x1e004,
2527 .halt_check
= BRANCH_HALT_VOTED
,
2529 .enable_reg
= 0x52014,
2530 .enable_mask
= BIT(2),
2531 .hw
.init
= &(struct clk_init_data
){
2532 .name
= "gcc_qupv3_wrap_2_m_ahb_clk",
2533 .ops
= &clk_branch2_ops
,
2538 static struct clk_branch gcc_qupv3_wrap_2_s_ahb_clk
= {
2539 .halt_reg
= 0x1e008,
2540 .halt_check
= BRANCH_HALT_VOTED
,
2541 .hwcg_reg
= 0x1e008,
2544 .enable_reg
= 0x52014,
2545 .enable_mask
= BIT(1),
2546 .hw
.init
= &(struct clk_init_data
){
2547 .name
= "gcc_qupv3_wrap_2_s_ahb_clk",
2548 .ops
= &clk_branch2_ops
,
2553 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2554 .halt_reg
= 0x14008,
2555 .halt_check
= BRANCH_HALT
,
2557 .enable_reg
= 0x14008,
2558 .enable_mask
= BIT(0),
2559 .hw
.init
= &(struct clk_init_data
){
2560 .name
= "gcc_sdcc2_ahb_clk",
2561 .ops
= &clk_branch2_ops
,
2566 static struct clk_branch gcc_sdcc2_apps_clk
= {
2567 .halt_reg
= 0x14004,
2568 .halt_check
= BRANCH_HALT
,
2570 .enable_reg
= 0x14004,
2571 .enable_mask
= BIT(0),
2572 .hw
.init
= &(struct clk_init_data
){
2573 .name
= "gcc_sdcc2_apps_clk",
2574 .parent_hws
= (const struct clk_hw
*[]){
2575 &gcc_sdcc2_apps_clk_src
.clkr
.hw
},
2577 .flags
= CLK_SET_RATE_PARENT
,
2578 .ops
= &clk_branch2_ops
,
2583 static struct clk_branch gcc_sdcc4_ahb_clk
= {
2584 .halt_reg
= 0x16008,
2585 .halt_check
= BRANCH_HALT
,
2587 .enable_reg
= 0x16008,
2588 .enable_mask
= BIT(0),
2589 .hw
.init
= &(struct clk_init_data
){
2590 .name
= "gcc_sdcc4_ahb_clk",
2591 .ops
= &clk_branch2_ops
,
2596 static struct clk_branch gcc_sdcc4_apps_clk
= {
2597 .halt_reg
= 0x16004,
2598 .halt_check
= BRANCH_HALT
,
2600 .enable_reg
= 0x16004,
2601 .enable_mask
= BIT(0),
2602 .hw
.init
= &(struct clk_init_data
){
2603 .name
= "gcc_sdcc4_apps_clk",
2604 .parent_hws
= (const struct clk_hw
*[]){
2605 &gcc_sdcc4_apps_clk_src
.clkr
.hw
},
2607 .flags
= CLK_SET_RATE_PARENT
,
2608 .ops
= &clk_branch2_ops
,
2613 static struct clk_branch gcc_sys_noc_cpuss_ahb_clk
= {
2614 .halt_reg
= 0x4819c,
2615 .halt_check
= BRANCH_HALT_VOTED
,
2617 .enable_reg
= 0x52004,
2618 .enable_mask
= BIT(0),
2619 .hw
.init
= &(struct clk_init_data
){
2620 .name
= "gcc_sys_noc_cpuss_ahb_clk",
2621 .parent_hws
= (const struct clk_hw
*[]){
2622 &gcc_cpuss_ahb_clk_src
.clkr
.hw
},
2624 /* required for cpuss */
2625 .flags
= CLK_IS_CRITICAL
| CLK_SET_RATE_PARENT
,
2626 .ops
= &clk_branch2_ops
,
2631 static struct clk_branch gcc_tsif_ahb_clk
= {
2632 .halt_reg
= 0x36004,
2633 .halt_check
= BRANCH_HALT
,
2635 .enable_reg
= 0x36004,
2636 .enable_mask
= BIT(0),
2637 .hw
.init
= &(struct clk_init_data
){
2638 .name
= "gcc_tsif_ahb_clk",
2639 .ops
= &clk_branch2_ops
,
2644 static struct clk_branch gcc_tsif_inactivity_timers_clk
= {
2645 .halt_reg
= 0x3600c,
2646 .halt_check
= BRANCH_HALT
,
2648 .enable_reg
= 0x3600c,
2649 .enable_mask
= BIT(0),
2650 .hw
.init
= &(struct clk_init_data
){
2651 .name
= "gcc_tsif_inactivity_timers_clk",
2652 .ops
= &clk_branch2_ops
,
2657 static struct clk_branch gcc_tsif_ref_clk
= {
2658 .halt_reg
= 0x36008,
2659 .halt_check
= BRANCH_HALT
,
2661 .enable_reg
= 0x36008,
2662 .enable_mask
= BIT(0),
2663 .hw
.init
= &(struct clk_init_data
){
2664 .name
= "gcc_tsif_ref_clk",
2665 .parent_hws
= (const struct clk_hw
*[]){
2666 &gcc_tsif_ref_clk_src
.clkr
.hw
},
2668 .flags
= CLK_SET_RATE_PARENT
,
2669 .ops
= &clk_branch2_ops
,
2674 static struct clk_branch gcc_ufs_card_ahb_clk
= {
2675 .halt_reg
= 0x75014,
2676 .halt_check
= BRANCH_HALT
,
2677 .hwcg_reg
= 0x75014,
2680 .enable_reg
= 0x75014,
2681 .enable_mask
= BIT(0),
2682 .hw
.init
= &(struct clk_init_data
){
2683 .name
= "gcc_ufs_card_ahb_clk",
2684 .ops
= &clk_branch2_ops
,
2689 static struct clk_branch gcc_ufs_card_axi_clk
= {
2690 .halt_reg
= 0x75010,
2691 .halt_check
= BRANCH_HALT
,
2692 .hwcg_reg
= 0x75010,
2695 .enable_reg
= 0x75010,
2696 .enable_mask
= BIT(0),
2697 .hw
.init
= &(struct clk_init_data
){
2698 .name
= "gcc_ufs_card_axi_clk",
2699 .parent_hws
= (const struct clk_hw
*[]){
2700 &gcc_ufs_card_axi_clk_src
.clkr
.hw
},
2702 .flags
= CLK_SET_RATE_PARENT
,
2703 .ops
= &clk_branch2_ops
,
2708 static struct clk_branch gcc_ufs_card_axi_hw_ctl_clk
= {
2709 .halt_reg
= 0x75010,
2710 .halt_check
= BRANCH_HALT
,
2711 .hwcg_reg
= 0x75010,
2714 .enable_reg
= 0x75010,
2715 .enable_mask
= BIT(1),
2716 .hw
.init
= &(struct clk_init_data
){
2717 .name
= "gcc_ufs_card_axi_hw_ctl_clk",
2718 .parent_hws
= (const struct clk_hw
*[]){
2719 &gcc_ufs_card_axi_clk
.clkr
.hw
},
2721 .flags
= CLK_SET_RATE_PARENT
,
2722 .ops
= &clk_branch_simple_ops
,
2727 static struct clk_branch gcc_ufs_card_clkref_clk
= {
2728 .halt_reg
= 0x8c004,
2729 .halt_check
= BRANCH_HALT
,
2731 .enable_reg
= 0x8c004,
2732 .enable_mask
= BIT(0),
2733 .hw
.init
= &(struct clk_init_data
){
2734 .name
= "gcc_ufs_card_clkref_clk",
2735 .ops
= &clk_branch2_ops
,
2740 static struct clk_branch gcc_ufs_card_ice_core_clk
= {
2741 .halt_reg
= 0x7505c,
2742 .halt_check
= BRANCH_HALT
,
2743 .hwcg_reg
= 0x7505c,
2746 .enable_reg
= 0x7505c,
2747 .enable_mask
= BIT(0),
2748 .hw
.init
= &(struct clk_init_data
){
2749 .name
= "gcc_ufs_card_ice_core_clk",
2750 .parent_hws
= (const struct clk_hw
*[]){
2751 &gcc_ufs_card_ice_core_clk_src
.clkr
.hw
},
2753 .flags
= CLK_SET_RATE_PARENT
,
2754 .ops
= &clk_branch2_ops
,
2759 static struct clk_branch gcc_ufs_card_ice_core_hw_ctl_clk
= {
2760 .halt_reg
= 0x7505c,
2761 .halt_check
= BRANCH_HALT
,
2762 .hwcg_reg
= 0x7505c,
2765 .enable_reg
= 0x7505c,
2766 .enable_mask
= BIT(1),
2767 .hw
.init
= &(struct clk_init_data
){
2768 .name
= "gcc_ufs_card_ice_core_hw_ctl_clk",
2769 .parent_hws
= (const struct clk_hw
*[]){
2770 &gcc_ufs_card_ice_core_clk
.clkr
.hw
},
2772 .flags
= CLK_SET_RATE_PARENT
,
2773 .ops
= &clk_branch_simple_ops
,
2778 static struct clk_branch gcc_ufs_card_phy_aux_clk
= {
2779 .halt_reg
= 0x75090,
2780 .halt_check
= BRANCH_HALT
,
2781 .hwcg_reg
= 0x75090,
2784 .enable_reg
= 0x75090,
2785 .enable_mask
= BIT(0),
2786 .hw
.init
= &(struct clk_init_data
){
2787 .name
= "gcc_ufs_card_phy_aux_clk",
2788 .parent_hws
= (const struct clk_hw
*[]){
2789 &gcc_ufs_card_phy_aux_clk_src
.clkr
.hw
},
2791 .flags
= CLK_SET_RATE_PARENT
,
2792 .ops
= &clk_branch2_ops
,
2797 static struct clk_branch gcc_ufs_card_phy_aux_hw_ctl_clk
= {
2798 .halt_reg
= 0x75090,
2799 .halt_check
= BRANCH_HALT
,
2800 .hwcg_reg
= 0x75090,
2803 .enable_reg
= 0x75090,
2804 .enable_mask
= BIT(1),
2805 .hw
.init
= &(struct clk_init_data
){
2806 .name
= "gcc_ufs_card_phy_aux_hw_ctl_clk",
2807 .parent_hws
= (const struct clk_hw
*[]){
2808 &gcc_ufs_card_phy_aux_clk
.clkr
.hw
},
2810 .flags
= CLK_SET_RATE_PARENT
,
2811 .ops
= &clk_branch_simple_ops
,
2816 static struct clk_branch gcc_ufs_card_unipro_core_clk
= {
2817 .halt_reg
= 0x75058,
2818 .halt_check
= BRANCH_HALT
,
2819 .hwcg_reg
= 0x75058,
2822 .enable_reg
= 0x75058,
2823 .enable_mask
= BIT(0),
2824 .hw
.init
= &(struct clk_init_data
){
2825 .name
= "gcc_ufs_card_unipro_core_clk",
2826 .parent_hws
= (const struct clk_hw
*[]){
2827 &gcc_ufs_card_unipro_core_clk_src
.clkr
.hw
},
2829 .flags
= CLK_SET_RATE_PARENT
,
2830 .ops
= &clk_branch2_ops
,
2835 static struct clk_branch gcc_ufs_card_unipro_core_hw_ctl_clk
= {
2836 .halt_reg
= 0x75058,
2837 .halt_check
= BRANCH_HALT
,
2838 .hwcg_reg
= 0x75058,
2841 .enable_reg
= 0x75058,
2842 .enable_mask
= BIT(1),
2843 .hw
.init
= &(struct clk_init_data
){
2844 .name
= "gcc_ufs_card_unipro_core_hw_ctl_clk",
2845 .parent_hws
= (const struct clk_hw
*[]){
2846 &gcc_ufs_card_unipro_core_clk
.clkr
.hw
},
2848 .flags
= CLK_SET_RATE_PARENT
,
2849 .ops
= &clk_branch_simple_ops
,
2854 static struct clk_branch gcc_ufs_mem_clkref_clk
= {
2855 .halt_reg
= 0x8c000,
2856 .halt_check
= BRANCH_HALT
,
2858 .enable_reg
= 0x8c000,
2859 .enable_mask
= BIT(0),
2860 .hw
.init
= &(struct clk_init_data
){
2861 .name
= "gcc_ufs_mem_clkref_clk",
2862 .ops
= &clk_branch2_ops
,
2867 static struct clk_branch gcc_ufs_phy_ahb_clk
= {
2868 .halt_reg
= 0x77014,
2869 .halt_check
= BRANCH_HALT
,
2870 .hwcg_reg
= 0x77014,
2873 .enable_reg
= 0x77014,
2874 .enable_mask
= BIT(0),
2875 .hw
.init
= &(struct clk_init_data
){
2876 .name
= "gcc_ufs_phy_ahb_clk",
2877 .ops
= &clk_branch2_ops
,
2882 static struct clk_branch gcc_ufs_phy_axi_clk
= {
2883 .halt_reg
= 0x77010,
2884 .halt_check
= BRANCH_HALT
,
2885 .hwcg_reg
= 0x77010,
2888 .enable_reg
= 0x77010,
2889 .enable_mask
= BIT(0),
2890 .hw
.init
= &(struct clk_init_data
){
2891 .name
= "gcc_ufs_phy_axi_clk",
2892 .parent_hws
= (const struct clk_hw
*[]){
2893 &gcc_ufs_phy_axi_clk_src
.clkr
.hw
},
2895 .flags
= CLK_SET_RATE_PARENT
,
2896 .ops
= &clk_branch2_ops
,
2901 static struct clk_branch gcc_ufs_phy_axi_hw_ctl_clk
= {
2902 .halt_reg
= 0x77010,
2903 .halt_check
= BRANCH_HALT
,
2904 .hwcg_reg
= 0x77010,
2907 .enable_reg
= 0x77010,
2908 .enable_mask
= BIT(1),
2909 .hw
.init
= &(struct clk_init_data
){
2910 .name
= "gcc_ufs_phy_axi_hw_ctl_clk",
2911 .parent_hws
= (const struct clk_hw
*[]){
2912 &gcc_ufs_phy_axi_clk
.clkr
.hw
},
2914 .flags
= CLK_SET_RATE_PARENT
,
2915 .ops
= &clk_branch_simple_ops
,
2920 static struct clk_branch gcc_ufs_phy_ice_core_clk
= {
2921 .halt_reg
= 0x7705c,
2922 .halt_check
= BRANCH_HALT
,
2923 .hwcg_reg
= 0x7705c,
2926 .enable_reg
= 0x7705c,
2927 .enable_mask
= BIT(0),
2928 .hw
.init
= &(struct clk_init_data
){
2929 .name
= "gcc_ufs_phy_ice_core_clk",
2930 .parent_hws
= (const struct clk_hw
*[]){
2931 &gcc_ufs_phy_ice_core_clk_src
.clkr
.hw
},
2933 .flags
= CLK_SET_RATE_PARENT
,
2934 .ops
= &clk_branch2_ops
,
2939 static struct clk_branch gcc_ufs_phy_ice_core_hw_ctl_clk
= {
2940 .halt_reg
= 0x7705c,
2941 .halt_check
= BRANCH_HALT
,
2942 .hwcg_reg
= 0x7705c,
2945 .enable_reg
= 0x7705c,
2946 .enable_mask
= BIT(1),
2947 .hw
.init
= &(struct clk_init_data
){
2948 .name
= "gcc_ufs_phy_ice_core_hw_ctl_clk",
2949 .parent_hws
= (const struct clk_hw
*[]){
2950 &gcc_ufs_phy_ice_core_clk
.clkr
.hw
},
2952 .flags
= CLK_SET_RATE_PARENT
,
2953 .ops
= &clk_branch_simple_ops
,
2958 static struct clk_branch gcc_ufs_phy_phy_aux_clk
= {
2959 .halt_reg
= 0x77090,
2960 .halt_check
= BRANCH_HALT
,
2961 .hwcg_reg
= 0x77090,
2964 .enable_reg
= 0x77090,
2965 .enable_mask
= BIT(0),
2966 .hw
.init
= &(struct clk_init_data
){
2967 .name
= "gcc_ufs_phy_phy_aux_clk",
2968 .parent_hws
= (const struct clk_hw
*[]){
2969 &gcc_ufs_phy_phy_aux_clk_src
.clkr
.hw
},
2971 .flags
= CLK_SET_RATE_PARENT
,
2972 .ops
= &clk_branch2_ops
,
2977 static struct clk_branch gcc_ufs_phy_phy_aux_hw_ctl_clk
= {
2978 .halt_reg
= 0x77090,
2979 .halt_check
= BRANCH_HALT
,
2980 .hwcg_reg
= 0x77090,
2983 .enable_reg
= 0x77090,
2984 .enable_mask
= BIT(1),
2985 .hw
.init
= &(struct clk_init_data
){
2986 .name
= "gcc_ufs_phy_phy_aux_hw_ctl_clk",
2987 .parent_hws
= (const struct clk_hw
*[]){
2988 &gcc_ufs_phy_phy_aux_clk
.clkr
.hw
},
2990 .flags
= CLK_SET_RATE_PARENT
,
2991 .ops
= &clk_branch_simple_ops
,
2996 static struct clk_branch gcc_ufs_phy_unipro_core_clk
= {
2997 .halt_reg
= 0x77058,
2998 .halt_check
= BRANCH_HALT
,
2999 .hwcg_reg
= 0x77058,
3002 .enable_reg
= 0x77058,
3003 .enable_mask
= BIT(0),
3004 .hw
.init
= &(struct clk_init_data
){
3005 .name
= "gcc_ufs_phy_unipro_core_clk",
3006 .parent_hws
= (const struct clk_hw
*[]){
3007 &gcc_ufs_phy_unipro_core_clk_src
.clkr
.hw
},
3009 .flags
= CLK_SET_RATE_PARENT
,
3010 .ops
= &clk_branch2_ops
,
3015 static struct clk_branch gcc_ufs_phy_unipro_core_hw_ctl_clk
= {
3016 .halt_reg
= 0x77058,
3017 .halt_check
= BRANCH_HALT
,
3018 .hwcg_reg
= 0x77058,
3021 .enable_reg
= 0x77058,
3022 .enable_mask
= BIT(1),
3023 .hw
.init
= &(struct clk_init_data
){
3024 .name
= "gcc_ufs_phy_unipro_core_hw_ctl_clk",
3025 .parent_hws
= (const struct clk_hw
*[]){
3026 &gcc_ufs_phy_unipro_core_clk
.clkr
.hw
},
3028 .flags
= CLK_SET_RATE_PARENT
,
3029 .ops
= &clk_branch_simple_ops
,
3034 static struct clk_branch gcc_usb30_prim_master_clk
= {
3036 .halt_check
= BRANCH_HALT
,
3038 .enable_reg
= 0xf010,
3039 .enable_mask
= BIT(0),
3040 .hw
.init
= &(struct clk_init_data
){
3041 .name
= "gcc_usb30_prim_master_clk",
3042 .parent_hws
= (const struct clk_hw
*[]){
3043 &gcc_usb30_prim_master_clk_src
.clkr
.hw
},
3045 .flags
= CLK_SET_RATE_PARENT
,
3046 .ops
= &clk_branch2_ops
,
3051 static struct clk_branch gcc_usb30_prim_mock_utmi_clk
= {
3053 .halt_check
= BRANCH_HALT
,
3055 .enable_reg
= 0xf018,
3056 .enable_mask
= BIT(0),
3057 .hw
.init
= &(struct clk_init_data
){
3058 .name
= "gcc_usb30_prim_mock_utmi_clk",
3059 .parent_hws
= (const struct clk_hw
*[]){
3060 &gcc_usb30_prim_mock_utmi_clk_src
.clkr
.hw
},
3062 .flags
= CLK_SET_RATE_PARENT
,
3063 .ops
= &clk_branch2_ops
,
3068 static struct clk_branch gcc_usb30_prim_sleep_clk
= {
3070 .halt_check
= BRANCH_HALT
,
3072 .enable_reg
= 0xf014,
3073 .enable_mask
= BIT(0),
3074 .hw
.init
= &(struct clk_init_data
){
3075 .name
= "gcc_usb30_prim_sleep_clk",
3076 .ops
= &clk_branch2_ops
,
3081 static struct clk_branch gcc_usb30_sec_master_clk
= {
3082 .halt_reg
= 0x10010,
3083 .halt_check
= BRANCH_HALT
,
3085 .enable_reg
= 0x10010,
3086 .enable_mask
= BIT(0),
3087 .hw
.init
= &(struct clk_init_data
){
3088 .name
= "gcc_usb30_sec_master_clk",
3089 .parent_hws
= (const struct clk_hw
*[]){
3090 &gcc_usb30_sec_master_clk_src
.clkr
.hw
},
3092 .flags
= CLK_SET_RATE_PARENT
,
3093 .ops
= &clk_branch2_ops
,
3098 static struct clk_branch gcc_usb30_sec_mock_utmi_clk
= {
3099 .halt_reg
= 0x10018,
3100 .halt_check
= BRANCH_HALT
,
3102 .enable_reg
= 0x10018,
3103 .enable_mask
= BIT(0),
3104 .hw
.init
= &(struct clk_init_data
){
3105 .name
= "gcc_usb30_sec_mock_utmi_clk",
3106 .parent_hws
= (const struct clk_hw
*[]){
3107 &gcc_usb30_sec_mock_utmi_clk_src
.clkr
.hw
},
3109 .flags
= CLK_SET_RATE_PARENT
,
3110 .ops
= &clk_branch2_ops
,
3115 static struct clk_branch gcc_usb30_sec_sleep_clk
= {
3116 .halt_reg
= 0x10014,
3117 .halt_check
= BRANCH_HALT
,
3119 .enable_reg
= 0x10014,
3120 .enable_mask
= BIT(0),
3121 .hw
.init
= &(struct clk_init_data
){
3122 .name
= "gcc_usb30_sec_sleep_clk",
3123 .ops
= &clk_branch2_ops
,
3128 static struct clk_branch gcc_usb3_prim_clkref_clk
= {
3129 .halt_reg
= 0x8c008,
3130 .halt_check
= BRANCH_HALT
,
3132 .enable_reg
= 0x8c008,
3133 .enable_mask
= BIT(0),
3134 .hw
.init
= &(struct clk_init_data
){
3135 .name
= "gcc_usb3_prim_clkref_clk",
3136 .ops
= &clk_branch2_ops
,
3141 static struct clk_branch gcc_usb3_prim_phy_aux_clk
= {
3143 .halt_check
= BRANCH_HALT
,
3145 .enable_reg
= 0xf050,
3146 .enable_mask
= BIT(0),
3147 .hw
.init
= &(struct clk_init_data
){
3148 .name
= "gcc_usb3_prim_phy_aux_clk",
3149 .parent_hws
= (const struct clk_hw
*[]){
3150 &gcc_usb3_prim_phy_aux_clk_src
.clkr
.hw
},
3152 .flags
= CLK_SET_RATE_PARENT
,
3153 .ops
= &clk_branch2_ops
,
3158 static struct clk_branch gcc_usb3_prim_phy_com_aux_clk
= {
3160 .halt_check
= BRANCH_HALT
,
3162 .enable_reg
= 0xf054,
3163 .enable_mask
= BIT(0),
3164 .hw
.init
= &(struct clk_init_data
){
3165 .name
= "gcc_usb3_prim_phy_com_aux_clk",
3166 .parent_hws
= (const struct clk_hw
*[]){
3167 &gcc_usb3_prim_phy_aux_clk_src
.clkr
.hw
},
3169 .flags
= CLK_SET_RATE_PARENT
,
3170 .ops
= &clk_branch2_ops
,
3175 static struct clk_branch gcc_usb3_prim_phy_pipe_clk
= {
3176 .halt_check
= BRANCH_HALT_SKIP
,
3178 .enable_reg
= 0xf058,
3179 .enable_mask
= BIT(0),
3180 .hw
.init
= &(struct clk_init_data
){
3181 .name
= "gcc_usb3_prim_phy_pipe_clk",
3182 .ops
= &clk_branch2_ops
,
3187 static struct clk_branch gcc_usb3_sec_clkref_clk
= {
3188 .halt_reg
= 0x8c028,
3189 .halt_check
= BRANCH_HALT
,
3191 .enable_reg
= 0x8c028,
3192 .enable_mask
= BIT(0),
3193 .hw
.init
= &(struct clk_init_data
){
3194 .name
= "gcc_usb3_sec_clkref_clk",
3195 .ops
= &clk_branch2_ops
,
3200 static struct clk_branch gcc_usb3_sec_phy_aux_clk
= {
3201 .halt_reg
= 0x10050,
3202 .halt_check
= BRANCH_HALT
,
3204 .enable_reg
= 0x10050,
3205 .enable_mask
= BIT(0),
3206 .hw
.init
= &(struct clk_init_data
){
3207 .name
= "gcc_usb3_sec_phy_aux_clk",
3208 .parent_hws
= (const struct clk_hw
*[]){
3209 &gcc_usb3_sec_phy_aux_clk_src
.clkr
.hw
},
3211 .flags
= CLK_SET_RATE_PARENT
,
3212 .ops
= &clk_branch2_ops
,
3217 static struct clk_branch gcc_usb3_sec_phy_com_aux_clk
= {
3218 .halt_reg
= 0x10054,
3219 .halt_check
= BRANCH_HALT
,
3221 .enable_reg
= 0x10054,
3222 .enable_mask
= BIT(0),
3223 .hw
.init
= &(struct clk_init_data
){
3224 .name
= "gcc_usb3_sec_phy_com_aux_clk",
3225 .parent_hws
= (const struct clk_hw
*[]){
3226 &gcc_usb3_sec_phy_aux_clk_src
.clkr
.hw
},
3228 .flags
= CLK_SET_RATE_PARENT
,
3229 .ops
= &clk_branch2_ops
,
3234 static struct clk_branch gcc_usb3_sec_phy_pipe_clk
= {
3235 .halt_check
= BRANCH_HALT_SKIP
,
3237 .enable_reg
= 0x10058,
3238 .enable_mask
= BIT(0),
3239 .hw
.init
= &(struct clk_init_data
){
3240 .name
= "gcc_usb3_sec_phy_pipe_clk",
3241 .ops
= &clk_branch2_ops
,
3247 * Clock ON depends on external parent 'config noc', so cant poll
3248 * delay and also mark as crtitical for video boot
3250 static struct clk_branch gcc_video_ahb_clk
= {
3252 .halt_check
= BRANCH_HALT_DELAY
,
3256 .enable_reg
= 0xb004,
3257 .enable_mask
= BIT(0),
3258 .hw
.init
= &(struct clk_init_data
){
3259 .name
= "gcc_video_ahb_clk",
3260 .flags
= CLK_IS_CRITICAL
,
3261 .ops
= &clk_branch2_ops
,
3266 static struct clk_branch gcc_video_axi0_clk
= {
3268 .halt_check
= BRANCH_HALT
,
3270 .enable_reg
= 0xb024,
3271 .enable_mask
= BIT(0),
3272 .hw
.init
= &(struct clk_init_data
){
3273 .name
= "gcc_video_axi0_clk",
3274 .ops
= &clk_branch2_ops
,
3279 static struct clk_branch gcc_video_axi1_clk
= {
3281 .halt_check
= BRANCH_HALT
,
3283 .enable_reg
= 0xb028,
3284 .enable_mask
= BIT(0),
3285 .hw
.init
= &(struct clk_init_data
){
3286 .name
= "gcc_video_axi1_clk",
3287 .ops
= &clk_branch2_ops
,
3292 static struct clk_branch gcc_video_axic_clk
= {
3294 .halt_check
= BRANCH_HALT
,
3296 .enable_reg
= 0xb02c,
3297 .enable_mask
= BIT(0),
3298 .hw
.init
= &(struct clk_init_data
){
3299 .name
= "gcc_video_axic_clk",
3300 .ops
= &clk_branch2_ops
,
3305 /* XO critical input to video, so no need to poll */
3306 static struct clk_branch gcc_video_xo_clk
= {
3308 .halt_check
= BRANCH_HALT_DELAY
,
3310 .enable_reg
= 0xb040,
3311 .enable_mask
= BIT(0),
3312 .hw
.init
= &(struct clk_init_data
){
3313 .name
= "gcc_video_xo_clk",
3314 .flags
= CLK_IS_CRITICAL
,
3315 .ops
= &clk_branch2_ops
,
3320 static struct gdsc usb30_prim_gdsc
= {
3323 .name
= "usb30_prim_gdsc",
3325 .pwrsts
= PWRSTS_OFF_ON
,
3326 .flags
= POLL_CFG_GDSCR
,
3329 static struct gdsc usb30_sec_gdsc
= {
3332 .name
= "usb30_sec_gdsc",
3334 .pwrsts
= PWRSTS_OFF_ON
,
3335 .flags
= POLL_CFG_GDSCR
,
3338 static struct clk_regmap
*gcc_sm8150_clocks
[] = {
3339 [GCC_AGGRE_NOC_PCIE_TBU_CLK
] = &gcc_aggre_noc_pcie_tbu_clk
.clkr
,
3340 [GCC_AGGRE_UFS_CARD_AXI_CLK
] = &gcc_aggre_ufs_card_axi_clk
.clkr
,
3341 [GCC_AGGRE_UFS_CARD_AXI_HW_CTL_CLK
] =
3342 &gcc_aggre_ufs_card_axi_hw_ctl_clk
.clkr
,
3343 [GCC_AGGRE_UFS_PHY_AXI_CLK
] = &gcc_aggre_ufs_phy_axi_clk
.clkr
,
3344 [GCC_AGGRE_UFS_PHY_AXI_HW_CTL_CLK
] =
3345 &gcc_aggre_ufs_phy_axi_hw_ctl_clk
.clkr
,
3346 [GCC_AGGRE_USB3_PRIM_AXI_CLK
] = &gcc_aggre_usb3_prim_axi_clk
.clkr
,
3347 [GCC_AGGRE_USB3_SEC_AXI_CLK
] = &gcc_aggre_usb3_sec_axi_clk
.clkr
,
3348 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
3349 [GCC_CAMERA_AHB_CLK
] = &gcc_camera_ahb_clk
.clkr
,
3350 [GCC_CAMERA_HF_AXI_CLK
] = &gcc_camera_hf_axi_clk
.clkr
,
3351 [GCC_CAMERA_SF_AXI_CLK
] = &gcc_camera_sf_axi_clk
.clkr
,
3352 [GCC_CAMERA_XO_CLK
] = &gcc_camera_xo_clk
.clkr
,
3353 [GCC_CFG_NOC_USB3_PRIM_AXI_CLK
] = &gcc_cfg_noc_usb3_prim_axi_clk
.clkr
,
3354 [GCC_CFG_NOC_USB3_SEC_AXI_CLK
] = &gcc_cfg_noc_usb3_sec_axi_clk
.clkr
,
3355 [GCC_CPUSS_AHB_CLK
] = &gcc_cpuss_ahb_clk
.clkr
,
3356 [GCC_CPUSS_AHB_CLK_SRC
] = &gcc_cpuss_ahb_clk_src
.clkr
,
3357 [GCC_CPUSS_DVM_BUS_CLK
] = &gcc_cpuss_dvm_bus_clk
.clkr
,
3358 [GCC_CPUSS_GNOC_CLK
] = &gcc_cpuss_gnoc_clk
.clkr
,
3359 [GCC_CPUSS_RBCPR_CLK
] = &gcc_cpuss_rbcpr_clk
.clkr
,
3360 [GCC_DDRSS_GPU_AXI_CLK
] = &gcc_ddrss_gpu_axi_clk
.clkr
,
3361 [GCC_DISP_AHB_CLK
] = &gcc_disp_ahb_clk
.clkr
,
3362 [GCC_DISP_HF_AXI_CLK
] = &gcc_disp_hf_axi_clk
.clkr
,
3363 [GCC_DISP_SF_AXI_CLK
] = &gcc_disp_sf_axi_clk
.clkr
,
3364 [GCC_DISP_XO_CLK
] = &gcc_disp_xo_clk
.clkr
,
3365 [GCC_EMAC_AXI_CLK
] = &gcc_emac_axi_clk
.clkr
,
3366 [GCC_EMAC_PTP_CLK
] = &gcc_emac_ptp_clk
.clkr
,
3367 [GCC_EMAC_PTP_CLK_SRC
] = &gcc_emac_ptp_clk_src
.clkr
,
3368 [GCC_EMAC_RGMII_CLK
] = &gcc_emac_rgmii_clk
.clkr
,
3369 [GCC_EMAC_RGMII_CLK_SRC
] = &gcc_emac_rgmii_clk_src
.clkr
,
3370 [GCC_EMAC_SLV_AHB_CLK
] = &gcc_emac_slv_ahb_clk
.clkr
,
3371 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
3372 [GCC_GP1_CLK_SRC
] = &gcc_gp1_clk_src
.clkr
,
3373 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
3374 [GCC_GP2_CLK_SRC
] = &gcc_gp2_clk_src
.clkr
,
3375 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
3376 [GCC_GP3_CLK_SRC
] = &gcc_gp3_clk_src
.clkr
,
3377 [GCC_GPU_CFG_AHB_CLK
] = &gcc_gpu_cfg_ahb_clk
.clkr
,
3378 [GCC_GPU_IREF_CLK
] = &gcc_gpu_iref_clk
.clkr
,
3379 [GCC_GPU_MEMNOC_GFX_CLK
] = &gcc_gpu_memnoc_gfx_clk
.clkr
,
3380 [GCC_GPU_SNOC_DVM_GFX_CLK
] = &gcc_gpu_snoc_dvm_gfx_clk
.clkr
,
3381 [GCC_NPU_AT_CLK
] = &gcc_npu_at_clk
.clkr
,
3382 [GCC_NPU_AXI_CLK
] = &gcc_npu_axi_clk
.clkr
,
3383 [GCC_NPU_CFG_AHB_CLK
] = &gcc_npu_cfg_ahb_clk
.clkr
,
3384 [GCC_NPU_TRIG_CLK
] = &gcc_npu_trig_clk
.clkr
,
3385 [GCC_PCIE0_PHY_REFGEN_CLK
] = &gcc_pcie0_phy_refgen_clk
.clkr
,
3386 [GCC_PCIE1_PHY_REFGEN_CLK
] = &gcc_pcie1_phy_refgen_clk
.clkr
,
3387 [GCC_PCIE_0_AUX_CLK
] = &gcc_pcie_0_aux_clk
.clkr
,
3388 [GCC_PCIE_0_AUX_CLK_SRC
] = &gcc_pcie_0_aux_clk_src
.clkr
,
3389 [GCC_PCIE_0_CFG_AHB_CLK
] = &gcc_pcie_0_cfg_ahb_clk
.clkr
,
3390 [GCC_PCIE_0_CLKREF_CLK
] = &gcc_pcie_0_clkref_clk
.clkr
,
3391 [GCC_PCIE_0_MSTR_AXI_CLK
] = &gcc_pcie_0_mstr_axi_clk
.clkr
,
3392 [GCC_PCIE_0_PIPE_CLK
] = &gcc_pcie_0_pipe_clk
.clkr
,
3393 [GCC_PCIE_0_SLV_AXI_CLK
] = &gcc_pcie_0_slv_axi_clk
.clkr
,
3394 [GCC_PCIE_0_SLV_Q2A_AXI_CLK
] = &gcc_pcie_0_slv_q2a_axi_clk
.clkr
,
3395 [GCC_PCIE_1_AUX_CLK
] = &gcc_pcie_1_aux_clk
.clkr
,
3396 [GCC_PCIE_1_AUX_CLK_SRC
] = &gcc_pcie_1_aux_clk_src
.clkr
,
3397 [GCC_PCIE_1_CFG_AHB_CLK
] = &gcc_pcie_1_cfg_ahb_clk
.clkr
,
3398 [GCC_PCIE_1_CLKREF_CLK
] = &gcc_pcie_1_clkref_clk
.clkr
,
3399 [GCC_PCIE_1_MSTR_AXI_CLK
] = &gcc_pcie_1_mstr_axi_clk
.clkr
,
3400 [GCC_PCIE_1_PIPE_CLK
] = &gcc_pcie_1_pipe_clk
.clkr
,
3401 [GCC_PCIE_1_SLV_AXI_CLK
] = &gcc_pcie_1_slv_axi_clk
.clkr
,
3402 [GCC_PCIE_1_SLV_Q2A_AXI_CLK
] = &gcc_pcie_1_slv_q2a_axi_clk
.clkr
,
3403 [GCC_PCIE_PHY_AUX_CLK
] = &gcc_pcie_phy_aux_clk
.clkr
,
3404 [GCC_PCIE_PHY_REFGEN_CLK_SRC
] = &gcc_pcie_phy_refgen_clk_src
.clkr
,
3405 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
3406 [GCC_PDM2_CLK_SRC
] = &gcc_pdm2_clk_src
.clkr
,
3407 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
3408 [GCC_PDM_XO4_CLK
] = &gcc_pdm_xo4_clk
.clkr
,
3409 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
3410 [GCC_QMIP_CAMERA_NRT_AHB_CLK
] = &gcc_qmip_camera_nrt_ahb_clk
.clkr
,
3411 [GCC_QMIP_CAMERA_RT_AHB_CLK
] = &gcc_qmip_camera_rt_ahb_clk
.clkr
,
3412 [GCC_QMIP_DISP_AHB_CLK
] = &gcc_qmip_disp_ahb_clk
.clkr
,
3413 [GCC_QMIP_VIDEO_CVP_AHB_CLK
] = &gcc_qmip_video_cvp_ahb_clk
.clkr
,
3414 [GCC_QMIP_VIDEO_VCODEC_AHB_CLK
] = &gcc_qmip_video_vcodec_ahb_clk
.clkr
,
3415 [GCC_QSPI_CNOC_PERIPH_AHB_CLK
] = &gcc_qspi_cnoc_periph_ahb_clk
.clkr
,
3416 [GCC_QSPI_CORE_CLK
] = &gcc_qspi_core_clk
.clkr
,
3417 [GCC_QSPI_CORE_CLK_SRC
] = &gcc_qspi_core_clk_src
.clkr
,
3418 [GCC_QUPV3_WRAP0_S0_CLK
] = &gcc_qupv3_wrap0_s0_clk
.clkr
,
3419 [GCC_QUPV3_WRAP0_S0_CLK_SRC
] = &gcc_qupv3_wrap0_s0_clk_src
.clkr
,
3420 [GCC_QUPV3_WRAP0_S1_CLK
] = &gcc_qupv3_wrap0_s1_clk
.clkr
,
3421 [GCC_QUPV3_WRAP0_S1_CLK_SRC
] = &gcc_qupv3_wrap0_s1_clk_src
.clkr
,
3422 [GCC_QUPV3_WRAP0_S2_CLK
] = &gcc_qupv3_wrap0_s2_clk
.clkr
,
3423 [GCC_QUPV3_WRAP0_S2_CLK_SRC
] = &gcc_qupv3_wrap0_s2_clk_src
.clkr
,
3424 [GCC_QUPV3_WRAP0_S3_CLK
] = &gcc_qupv3_wrap0_s3_clk
.clkr
,
3425 [GCC_QUPV3_WRAP0_S3_CLK_SRC
] = &gcc_qupv3_wrap0_s3_clk_src
.clkr
,
3426 [GCC_QUPV3_WRAP0_S4_CLK
] = &gcc_qupv3_wrap0_s4_clk
.clkr
,
3427 [GCC_QUPV3_WRAP0_S4_CLK_SRC
] = &gcc_qupv3_wrap0_s4_clk_src
.clkr
,
3428 [GCC_QUPV3_WRAP0_S5_CLK
] = &gcc_qupv3_wrap0_s5_clk
.clkr
,
3429 [GCC_QUPV3_WRAP0_S5_CLK_SRC
] = &gcc_qupv3_wrap0_s5_clk_src
.clkr
,
3430 [GCC_QUPV3_WRAP0_S6_CLK
] = &gcc_qupv3_wrap0_s6_clk
.clkr
,
3431 [GCC_QUPV3_WRAP0_S6_CLK_SRC
] = &gcc_qupv3_wrap0_s6_clk_src
.clkr
,
3432 [GCC_QUPV3_WRAP0_S7_CLK
] = &gcc_qupv3_wrap0_s7_clk
.clkr
,
3433 [GCC_QUPV3_WRAP0_S7_CLK_SRC
] = &gcc_qupv3_wrap0_s7_clk_src
.clkr
,
3434 [GCC_QUPV3_WRAP1_S0_CLK
] = &gcc_qupv3_wrap1_s0_clk
.clkr
,
3435 [GCC_QUPV3_WRAP1_S0_CLK_SRC
] = &gcc_qupv3_wrap1_s0_clk_src
.clkr
,
3436 [GCC_QUPV3_WRAP1_S1_CLK
] = &gcc_qupv3_wrap1_s1_clk
.clkr
,
3437 [GCC_QUPV3_WRAP1_S1_CLK_SRC
] = &gcc_qupv3_wrap1_s1_clk_src
.clkr
,
3438 [GCC_QUPV3_WRAP1_S2_CLK
] = &gcc_qupv3_wrap1_s2_clk
.clkr
,
3439 [GCC_QUPV3_WRAP1_S2_CLK_SRC
] = &gcc_qupv3_wrap1_s2_clk_src
.clkr
,
3440 [GCC_QUPV3_WRAP1_S3_CLK
] = &gcc_qupv3_wrap1_s3_clk
.clkr
,
3441 [GCC_QUPV3_WRAP1_S3_CLK_SRC
] = &gcc_qupv3_wrap1_s3_clk_src
.clkr
,
3442 [GCC_QUPV3_WRAP1_S4_CLK
] = &gcc_qupv3_wrap1_s4_clk
.clkr
,
3443 [GCC_QUPV3_WRAP1_S4_CLK_SRC
] = &gcc_qupv3_wrap1_s4_clk_src
.clkr
,
3444 [GCC_QUPV3_WRAP1_S5_CLK
] = &gcc_qupv3_wrap1_s5_clk
.clkr
,
3445 [GCC_QUPV3_WRAP1_S5_CLK_SRC
] = &gcc_qupv3_wrap1_s5_clk_src
.clkr
,
3446 [GCC_QUPV3_WRAP2_S0_CLK
] = &gcc_qupv3_wrap2_s0_clk
.clkr
,
3447 [GCC_QUPV3_WRAP2_S0_CLK_SRC
] = &gcc_qupv3_wrap2_s0_clk_src
.clkr
,
3448 [GCC_QUPV3_WRAP2_S1_CLK
] = &gcc_qupv3_wrap2_s1_clk
.clkr
,
3449 [GCC_QUPV3_WRAP2_S1_CLK_SRC
] = &gcc_qupv3_wrap2_s1_clk_src
.clkr
,
3450 [GCC_QUPV3_WRAP2_S2_CLK
] = &gcc_qupv3_wrap2_s2_clk
.clkr
,
3451 [GCC_QUPV3_WRAP2_S2_CLK_SRC
] = &gcc_qupv3_wrap2_s2_clk_src
.clkr
,
3452 [GCC_QUPV3_WRAP2_S3_CLK
] = &gcc_qupv3_wrap2_s3_clk
.clkr
,
3453 [GCC_QUPV3_WRAP2_S3_CLK_SRC
] = &gcc_qupv3_wrap2_s3_clk_src
.clkr
,
3454 [GCC_QUPV3_WRAP2_S4_CLK
] = &gcc_qupv3_wrap2_s4_clk
.clkr
,
3455 [GCC_QUPV3_WRAP2_S4_CLK_SRC
] = &gcc_qupv3_wrap2_s4_clk_src
.clkr
,
3456 [GCC_QUPV3_WRAP2_S5_CLK
] = &gcc_qupv3_wrap2_s5_clk
.clkr
,
3457 [GCC_QUPV3_WRAP2_S5_CLK_SRC
] = &gcc_qupv3_wrap2_s5_clk_src
.clkr
,
3458 [GCC_QUPV3_WRAP_0_M_AHB_CLK
] = &gcc_qupv3_wrap_0_m_ahb_clk
.clkr
,
3459 [GCC_QUPV3_WRAP_0_S_AHB_CLK
] = &gcc_qupv3_wrap_0_s_ahb_clk
.clkr
,
3460 [GCC_QUPV3_WRAP_1_M_AHB_CLK
] = &gcc_qupv3_wrap_1_m_ahb_clk
.clkr
,
3461 [GCC_QUPV3_WRAP_1_S_AHB_CLK
] = &gcc_qupv3_wrap_1_s_ahb_clk
.clkr
,
3462 [GCC_QUPV3_WRAP_2_M_AHB_CLK
] = &gcc_qupv3_wrap_2_m_ahb_clk
.clkr
,
3463 [GCC_QUPV3_WRAP_2_S_AHB_CLK
] = &gcc_qupv3_wrap_2_s_ahb_clk
.clkr
,
3464 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
3465 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
3466 [GCC_SDCC2_APPS_CLK_SRC
] = &gcc_sdcc2_apps_clk_src
.clkr
,
3467 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
3468 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
3469 [GCC_SDCC4_APPS_CLK_SRC
] = &gcc_sdcc4_apps_clk_src
.clkr
,
3470 [GCC_SYS_NOC_CPUSS_AHB_CLK
] = &gcc_sys_noc_cpuss_ahb_clk
.clkr
,
3471 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
3472 [GCC_TSIF_INACTIVITY_TIMERS_CLK
] = &gcc_tsif_inactivity_timers_clk
.clkr
,
3473 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
3474 [GCC_TSIF_REF_CLK_SRC
] = &gcc_tsif_ref_clk_src
.clkr
,
3475 [GCC_UFS_CARD_AHB_CLK
] = &gcc_ufs_card_ahb_clk
.clkr
,
3476 [GCC_UFS_CARD_AXI_CLK
] = &gcc_ufs_card_axi_clk
.clkr
,
3477 [GCC_UFS_CARD_AXI_CLK_SRC
] = &gcc_ufs_card_axi_clk_src
.clkr
,
3478 [GCC_UFS_CARD_AXI_HW_CTL_CLK
] = &gcc_ufs_card_axi_hw_ctl_clk
.clkr
,
3479 [GCC_UFS_CARD_CLKREF_CLK
] = &gcc_ufs_card_clkref_clk
.clkr
,
3480 [GCC_UFS_CARD_ICE_CORE_CLK
] = &gcc_ufs_card_ice_core_clk
.clkr
,
3481 [GCC_UFS_CARD_ICE_CORE_CLK_SRC
] = &gcc_ufs_card_ice_core_clk_src
.clkr
,
3482 [GCC_UFS_CARD_ICE_CORE_HW_CTL_CLK
] =
3483 &gcc_ufs_card_ice_core_hw_ctl_clk
.clkr
,
3484 [GCC_UFS_CARD_PHY_AUX_CLK
] = &gcc_ufs_card_phy_aux_clk
.clkr
,
3485 [GCC_UFS_CARD_PHY_AUX_CLK_SRC
] = &gcc_ufs_card_phy_aux_clk_src
.clkr
,
3486 [GCC_UFS_CARD_PHY_AUX_HW_CTL_CLK
] =
3487 &gcc_ufs_card_phy_aux_hw_ctl_clk
.clkr
,
3488 [GCC_UFS_CARD_UNIPRO_CORE_CLK
] = &gcc_ufs_card_unipro_core_clk
.clkr
,
3489 [GCC_UFS_CARD_UNIPRO_CORE_CLK_SRC
] =
3490 &gcc_ufs_card_unipro_core_clk_src
.clkr
,
3491 [GCC_UFS_CARD_UNIPRO_CORE_HW_CTL_CLK
] =
3492 &gcc_ufs_card_unipro_core_hw_ctl_clk
.clkr
,
3493 [GCC_UFS_MEM_CLKREF_CLK
] = &gcc_ufs_mem_clkref_clk
.clkr
,
3494 [GCC_UFS_PHY_AHB_CLK
] = &gcc_ufs_phy_ahb_clk
.clkr
,
3495 [GCC_UFS_PHY_AXI_CLK
] = &gcc_ufs_phy_axi_clk
.clkr
,
3496 [GCC_UFS_PHY_AXI_CLK_SRC
] = &gcc_ufs_phy_axi_clk_src
.clkr
,
3497 [GCC_UFS_PHY_AXI_HW_CTL_CLK
] = &gcc_ufs_phy_axi_hw_ctl_clk
.clkr
,
3498 [GCC_UFS_PHY_ICE_CORE_CLK
] = &gcc_ufs_phy_ice_core_clk
.clkr
,
3499 [GCC_UFS_PHY_ICE_CORE_CLK_SRC
] = &gcc_ufs_phy_ice_core_clk_src
.clkr
,
3500 [GCC_UFS_PHY_ICE_CORE_HW_CTL_CLK
] =
3501 &gcc_ufs_phy_ice_core_hw_ctl_clk
.clkr
,
3502 [GCC_UFS_PHY_PHY_AUX_CLK
] = &gcc_ufs_phy_phy_aux_clk
.clkr
,
3503 [GCC_UFS_PHY_PHY_AUX_CLK_SRC
] = &gcc_ufs_phy_phy_aux_clk_src
.clkr
,
3504 [GCC_UFS_PHY_PHY_AUX_HW_CTL_CLK
] = &gcc_ufs_phy_phy_aux_hw_ctl_clk
.clkr
,
3505 [GCC_UFS_PHY_UNIPRO_CORE_CLK
] = &gcc_ufs_phy_unipro_core_clk
.clkr
,
3506 [GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC
] =
3507 &gcc_ufs_phy_unipro_core_clk_src
.clkr
,
3508 [GCC_UFS_PHY_UNIPRO_CORE_HW_CTL_CLK
] =
3509 &gcc_ufs_phy_unipro_core_hw_ctl_clk
.clkr
,
3510 [GCC_USB30_PRIM_MASTER_CLK
] = &gcc_usb30_prim_master_clk
.clkr
,
3511 [GCC_USB30_PRIM_MASTER_CLK_SRC
] = &gcc_usb30_prim_master_clk_src
.clkr
,
3512 [GCC_USB30_PRIM_MOCK_UTMI_CLK
] = &gcc_usb30_prim_mock_utmi_clk
.clkr
,
3513 [GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC
] =
3514 &gcc_usb30_prim_mock_utmi_clk_src
.clkr
,
3515 [GCC_USB30_PRIM_SLEEP_CLK
] = &gcc_usb30_prim_sleep_clk
.clkr
,
3516 [GCC_USB30_SEC_MASTER_CLK
] = &gcc_usb30_sec_master_clk
.clkr
,
3517 [GCC_USB30_SEC_MASTER_CLK_SRC
] = &gcc_usb30_sec_master_clk_src
.clkr
,
3518 [GCC_USB30_SEC_MOCK_UTMI_CLK
] = &gcc_usb30_sec_mock_utmi_clk
.clkr
,
3519 [GCC_USB30_SEC_MOCK_UTMI_CLK_SRC
] =
3520 &gcc_usb30_sec_mock_utmi_clk_src
.clkr
,
3521 [GCC_USB30_SEC_SLEEP_CLK
] = &gcc_usb30_sec_sleep_clk
.clkr
,
3522 [GCC_USB3_PRIM_CLKREF_CLK
] = &gcc_usb3_prim_clkref_clk
.clkr
,
3523 [GCC_USB3_PRIM_PHY_AUX_CLK
] = &gcc_usb3_prim_phy_aux_clk
.clkr
,
3524 [GCC_USB3_PRIM_PHY_AUX_CLK_SRC
] = &gcc_usb3_prim_phy_aux_clk_src
.clkr
,
3525 [GCC_USB3_PRIM_PHY_COM_AUX_CLK
] = &gcc_usb3_prim_phy_com_aux_clk
.clkr
,
3526 [GCC_USB3_PRIM_PHY_PIPE_CLK
] = &gcc_usb3_prim_phy_pipe_clk
.clkr
,
3527 [GCC_USB3_SEC_CLKREF_CLK
] = &gcc_usb3_sec_clkref_clk
.clkr
,
3528 [GCC_USB3_SEC_PHY_AUX_CLK
] = &gcc_usb3_sec_phy_aux_clk
.clkr
,
3529 [GCC_USB3_SEC_PHY_AUX_CLK_SRC
] = &gcc_usb3_sec_phy_aux_clk_src
.clkr
,
3530 [GCC_USB3_SEC_PHY_COM_AUX_CLK
] = &gcc_usb3_sec_phy_com_aux_clk
.clkr
,
3531 [GCC_USB3_SEC_PHY_PIPE_CLK
] = &gcc_usb3_sec_phy_pipe_clk
.clkr
,
3532 [GCC_VIDEO_AHB_CLK
] = &gcc_video_ahb_clk
.clkr
,
3533 [GCC_VIDEO_AXI0_CLK
] = &gcc_video_axi0_clk
.clkr
,
3534 [GCC_VIDEO_AXI1_CLK
] = &gcc_video_axi1_clk
.clkr
,
3535 [GCC_VIDEO_AXIC_CLK
] = &gcc_video_axic_clk
.clkr
,
3536 [GCC_VIDEO_XO_CLK
] = &gcc_video_xo_clk
.clkr
,
3537 [GPLL0
] = &gpll0
.clkr
,
3538 [GPLL0_OUT_EVEN
] = &gpll0_out_even
.clkr
,
3539 [GPLL7
] = &gpll7
.clkr
,
3540 [GPLL9
] = &gpll9
.clkr
,
3543 static const struct qcom_reset_map gcc_sm8150_resets
[] = {
3544 [GCC_EMAC_BCR
] = { 0x6000 },
3545 [GCC_GPU_BCR
] = { 0x71000 },
3546 [GCC_MMSS_BCR
] = { 0xb000 },
3547 [GCC_NPU_BCR
] = { 0x4d000 },
3548 [GCC_PCIE_0_BCR
] = { 0x6b000 },
3549 [GCC_PCIE_0_PHY_BCR
] = { 0x6c01c },
3550 [GCC_PCIE_1_BCR
] = { 0x8d000 },
3551 [GCC_PCIE_1_PHY_BCR
] = { 0x8e01c },
3552 [GCC_PCIE_PHY_BCR
] = { 0x6f000 },
3553 [GCC_PDM_BCR
] = { 0x33000 },
3554 [GCC_PRNG_BCR
] = { 0x34000 },
3555 [GCC_QSPI_BCR
] = { 0x24008 },
3556 [GCC_QUPV3_WRAPPER_0_BCR
] = { 0x17000 },
3557 [GCC_QUPV3_WRAPPER_1_BCR
] = { 0x18000 },
3558 [GCC_QUPV3_WRAPPER_2_BCR
] = { 0x1e000 },
3559 [GCC_QUSB2PHY_PRIM_BCR
] = { 0x12000 },
3560 [GCC_QUSB2PHY_SEC_BCR
] = { 0x12004 },
3561 [GCC_USB3_PHY_PRIM_BCR
] = { 0x50000 },
3562 [GCC_USB3_DP_PHY_PRIM_BCR
] = { 0x50008 },
3563 [GCC_USB3_PHY_SEC_BCR
] = { 0x5000c },
3564 [GCC_USB3PHY_PHY_SEC_BCR
] = { 0x50010 },
3565 [GCC_SDCC2_BCR
] = { 0x14000 },
3566 [GCC_SDCC4_BCR
] = { 0x16000 },
3567 [GCC_TSIF_BCR
] = { 0x36000 },
3568 [GCC_UFS_CARD_BCR
] = { 0x75000 },
3569 [GCC_UFS_PHY_BCR
] = { 0x77000 },
3570 [GCC_USB30_PRIM_BCR
] = { 0xf000 },
3571 [GCC_USB30_SEC_BCR
] = { 0x10000 },
3572 [GCC_USB_PHY_CFG_AHB2PHY_BCR
] = { 0x6a000 },
3575 static struct gdsc
*gcc_sm8150_gdscs
[] = {
3576 [USB30_PRIM_GDSC
] = &usb30_prim_gdsc
,
3577 [USB30_SEC_GDSC
] = &usb30_sec_gdsc
,
3580 static const struct regmap_config gcc_sm8150_regmap_config
= {
3584 .max_register
= 0x9c040,
3588 static const struct qcom_cc_desc gcc_sm8150_desc
= {
3589 .config
= &gcc_sm8150_regmap_config
,
3590 .clks
= gcc_sm8150_clocks
,
3591 .num_clks
= ARRAY_SIZE(gcc_sm8150_clocks
),
3592 .resets
= gcc_sm8150_resets
,
3593 .num_resets
= ARRAY_SIZE(gcc_sm8150_resets
),
3594 .gdscs
= gcc_sm8150_gdscs
,
3595 .num_gdscs
= ARRAY_SIZE(gcc_sm8150_gdscs
),
3598 static const struct of_device_id gcc_sm8150_match_table
[] = {
3599 { .compatible
= "qcom,gcc-sm8150" },
3602 MODULE_DEVICE_TABLE(of
, gcc_sm8150_match_table
);
3604 static int gcc_sm8150_probe(struct platform_device
*pdev
)
3606 struct regmap
*regmap
;
3608 regmap
= qcom_cc_map(pdev
, &gcc_sm8150_desc
);
3610 return PTR_ERR(regmap
);
3612 /* Disable the GPLL0 active input to NPU and GPU via MISC registers */
3613 regmap_update_bits(regmap
, 0x4d110, 0x3, 0x3);
3614 regmap_update_bits(regmap
, 0x71028, 0x3, 0x3);
3616 return qcom_cc_really_probe(pdev
, &gcc_sm8150_desc
, regmap
);
3619 static struct platform_driver gcc_sm8150_driver
= {
3620 .probe
= gcc_sm8150_probe
,
3622 .name
= "gcc-sm8150",
3623 .of_match_table
= gcc_sm8150_match_table
,
3627 static int __init
gcc_sm8150_init(void)
3629 return platform_driver_register(&gcc_sm8150_driver
);
3631 subsys_initcall(gcc_sm8150_init
);
3633 static void __exit
gcc_sm8150_exit(void)
3635 platform_driver_unregister(&gcc_sm8150_driver
);
3637 module_exit(gcc_sm8150_exit
);
3639 MODULE_DESCRIPTION("QTI GCC SM8150 Driver");
3640 MODULE_LICENSE("GPL v2");