1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
6 #include <linux/kernel.h>
7 #include <linux/bitops.h>
9 #include <linux/platform_device.h>
10 #include <linux/module.h>
12 #include <linux/of_device.h>
13 #include <linux/clk-provider.h>
14 #include <linux/regmap.h>
15 #include <linux/reset-controller.h>
17 #include <dt-bindings/clock/qcom,gcc-msm8998.h>
20 #include "clk-regmap.h"
21 #include "clk-alpha-pll.h"
24 #include "clk-branch.h"
28 static struct pll_vco fabia_vco[] = {
29 { 250000000, 2000000000, 0 },
30 { 125000000, 1000000000, 1 },
33 static struct clk_alpha_pll gpll0 = {
35 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
36 .vco_table = fabia_vco,
37 .num_vco = ARRAY_SIZE(fabia_vco),
39 .enable_reg = 0x52000,
40 .enable_mask = BIT(0),
41 .hw.init = &(struct clk_init_data){
43 .parent_data = (const struct clk_parent_data []) {
47 .ops = &clk_alpha_pll_fixed_fabia_ops,
52 static struct clk_alpha_pll_postdiv gpll0_out_even = {
54 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
55 .clkr.hw.init = &(struct clk_init_data){
56 .name = "gpll0_out_even",
57 .parent_hws = (const struct clk_hw*[]) {
61 .ops = &clk_alpha_pll_postdiv_fabia_ops,
65 static struct clk_alpha_pll_postdiv gpll0_out_main = {
67 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
68 .clkr.hw.init = &(struct clk_init_data){
69 .name = "gpll0_out_main",
70 .parent_hws = (const struct clk_hw*[]) {
74 .ops = &clk_alpha_pll_postdiv_fabia_ops,
78 static struct clk_alpha_pll_postdiv gpll0_out_odd = {
80 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
81 .clkr.hw.init = &(struct clk_init_data){
82 .name = "gpll0_out_odd",
83 .parent_hws = (const struct clk_hw*[]) {
87 .ops = &clk_alpha_pll_postdiv_fabia_ops,
91 static struct clk_alpha_pll_postdiv gpll0_out_test = {
93 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
94 .clkr.hw.init = &(struct clk_init_data){
95 .name = "gpll0_out_test",
96 .parent_hws = (const struct clk_hw*[]) {
100 .ops = &clk_alpha_pll_postdiv_fabia_ops,
104 static struct clk_alpha_pll gpll1 = {
106 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
107 .vco_table = fabia_vco,
108 .num_vco = ARRAY_SIZE(fabia_vco),
110 .enable_reg = 0x52000,
111 .enable_mask = BIT(1),
112 .hw.init = &(struct clk_init_data){
114 .parent_data = (const struct clk_parent_data []) {
118 .ops = &clk_alpha_pll_fixed_fabia_ops,
123 static struct clk_alpha_pll_postdiv gpll1_out_even = {
125 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
126 .clkr.hw.init = &(struct clk_init_data){
127 .name = "gpll1_out_even",
128 .parent_hws = (const struct clk_hw*[]) {
132 .ops = &clk_alpha_pll_postdiv_fabia_ops,
136 static struct clk_alpha_pll_postdiv gpll1_out_main = {
138 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
139 .clkr.hw.init = &(struct clk_init_data){
140 .name = "gpll1_out_main",
141 .parent_hws = (const struct clk_hw*[]) {
145 .ops = &clk_alpha_pll_postdiv_fabia_ops,
149 static struct clk_alpha_pll_postdiv gpll1_out_odd = {
151 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
152 .clkr.hw.init = &(struct clk_init_data){
153 .name = "gpll1_out_odd",
154 .parent_hws = (const struct clk_hw*[]) {
158 .ops = &clk_alpha_pll_postdiv_fabia_ops,
162 static struct clk_alpha_pll_postdiv gpll1_out_test = {
164 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
165 .clkr.hw.init = &(struct clk_init_data){
166 .name = "gpll1_out_test",
167 .parent_hws = (const struct clk_hw*[]) {
171 .ops = &clk_alpha_pll_postdiv_fabia_ops,
175 static struct clk_alpha_pll gpll2 = {
177 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
178 .vco_table = fabia_vco,
179 .num_vco = ARRAY_SIZE(fabia_vco),
181 .enable_reg = 0x52000,
182 .enable_mask = BIT(2),
183 .hw.init = &(struct clk_init_data){
185 .parent_data = (const struct clk_parent_data []) {
189 .ops = &clk_alpha_pll_fixed_fabia_ops,
194 static struct clk_alpha_pll_postdiv gpll2_out_even = {
196 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
197 .clkr.hw.init = &(struct clk_init_data){
198 .name = "gpll2_out_even",
199 .parent_hws = (const struct clk_hw*[]) {
203 .ops = &clk_alpha_pll_postdiv_fabia_ops,
207 static struct clk_alpha_pll_postdiv gpll2_out_main = {
209 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
210 .clkr.hw.init = &(struct clk_init_data){
211 .name = "gpll2_out_main",
212 .parent_hws = (const struct clk_hw*[]) {
216 .ops = &clk_alpha_pll_postdiv_fabia_ops,
220 static struct clk_alpha_pll_postdiv gpll2_out_odd = {
222 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
223 .clkr.hw.init = &(struct clk_init_data){
224 .name = "gpll2_out_odd",
225 .parent_hws = (const struct clk_hw*[]) {
229 .ops = &clk_alpha_pll_postdiv_fabia_ops,
233 static struct clk_alpha_pll_postdiv gpll2_out_test = {
235 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
236 .clkr.hw.init = &(struct clk_init_data){
237 .name = "gpll2_out_test",
238 .parent_hws = (const struct clk_hw*[]) {
242 .ops = &clk_alpha_pll_postdiv_fabia_ops,
246 static struct clk_alpha_pll gpll3 = {
248 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
249 .vco_table = fabia_vco,
250 .num_vco = ARRAY_SIZE(fabia_vco),
252 .enable_reg = 0x52000,
253 .enable_mask = BIT(3),
254 .hw.init = &(struct clk_init_data){
256 .parent_data = (const struct clk_parent_data []) {
260 .ops = &clk_alpha_pll_fixed_fabia_ops,
265 static struct clk_alpha_pll_postdiv gpll3_out_even = {
267 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
268 .clkr.hw.init = &(struct clk_init_data){
269 .name = "gpll3_out_even",
270 .parent_hws = (const struct clk_hw*[]) {
274 .ops = &clk_alpha_pll_postdiv_fabia_ops,
278 static struct clk_alpha_pll_postdiv gpll3_out_main = {
280 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
281 .clkr.hw.init = &(struct clk_init_data){
282 .name = "gpll3_out_main",
283 .parent_hws = (const struct clk_hw*[]) {
287 .ops = &clk_alpha_pll_postdiv_fabia_ops,
291 static struct clk_alpha_pll_postdiv gpll3_out_odd = {
293 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
294 .clkr.hw.init = &(struct clk_init_data){
295 .name = "gpll3_out_odd",
296 .parent_hws = (const struct clk_hw*[]) {
300 .ops = &clk_alpha_pll_postdiv_fabia_ops,
304 static struct clk_alpha_pll_postdiv gpll3_out_test = {
306 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
307 .clkr.hw.init = &(struct clk_init_data){
308 .name = "gpll3_out_test",
309 .parent_hws = (const struct clk_hw*[]) {
313 .ops = &clk_alpha_pll_postdiv_fabia_ops,
317 static struct clk_alpha_pll gpll4 = {
319 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
320 .vco_table = fabia_vco,
321 .num_vco = ARRAY_SIZE(fabia_vco),
323 .enable_reg = 0x52000,
324 .enable_mask = BIT(4),
325 .hw.init = &(struct clk_init_data){
327 .parent_data = (const struct clk_parent_data []) {
331 .ops = &clk_alpha_pll_fixed_fabia_ops,
336 static struct clk_alpha_pll_postdiv gpll4_out_even = {
338 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
339 .clkr.hw.init = &(struct clk_init_data){
340 .name = "gpll4_out_even",
341 .parent_hws = (const struct clk_hw*[]) {
345 .ops = &clk_alpha_pll_postdiv_fabia_ops,
349 static struct clk_alpha_pll_postdiv gpll4_out_main = {
351 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
352 .clkr.hw.init = &(struct clk_init_data){
353 .name = "gpll4_out_main",
354 .parent_hws = (const struct clk_hw*[]) {
358 .ops = &clk_alpha_pll_postdiv_fabia_ops,
362 static struct clk_alpha_pll_postdiv gpll4_out_odd = {
364 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
365 .clkr.hw.init = &(struct clk_init_data){
366 .name = "gpll4_out_odd",
367 .parent_hws = (const struct clk_hw*[]) {
371 .ops = &clk_alpha_pll_postdiv_fabia_ops,
375 static struct clk_alpha_pll_postdiv gpll4_out_test = {
377 .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_FABIA],
378 .clkr.hw.init = &(struct clk_init_data){
379 .name = "gpll4_out_test",
380 .parent_hws = (const struct clk_hw*[]) {
384 .ops = &clk_alpha_pll_postdiv_fabia_ops,
390 P_CORE_BI_PLL_TEST_SE,
393 P_PLL0_EARLY_DIV_CLK_SRC,
398 static const struct parent_map gcc_parent_map_0[] = {
400 { P_GPLL0_OUT_MAIN, 1 },
401 { P_PLL0_EARLY_DIV_CLK_SRC, 6 },
402 { P_CORE_BI_PLL_TEST_SE, 7 },
405 static const struct clk_parent_data gcc_parent_data_0[] = {
407 { .hw = &gpll0_out_main.clkr.hw },
408 { .hw = &gpll0_out_main.clkr.hw },
409 { .fw_name = "core_bi_pll_test_se" },
412 static const struct parent_map gcc_parent_map_1[] = {
414 { P_GPLL0_OUT_MAIN, 1 },
415 { P_CORE_BI_PLL_TEST_SE, 7 },
418 static const struct clk_parent_data gcc_parent_data_1[] = {
420 { .hw = &gpll0_out_main.clkr.hw },
421 { .fw_name = "core_bi_pll_test_se" },
424 static const struct parent_map gcc_parent_map_2[] = {
426 { P_GPLL0_OUT_MAIN, 1 },
428 { P_PLL0_EARLY_DIV_CLK_SRC, 6 },
429 { P_CORE_BI_PLL_TEST_SE, 7 },
432 static const struct clk_parent_data gcc_parent_data_2[] = {
434 { .hw = &gpll0_out_main.clkr.hw },
435 { .fw_name = "sleep_clk" },
436 { .hw = &gpll0_out_main.clkr.hw },
437 { .fw_name = "core_bi_pll_test_se" },
440 static const struct parent_map gcc_parent_map_3[] = {
443 { P_CORE_BI_PLL_TEST_SE, 7 },
446 static const struct clk_parent_data gcc_parent_data_3[] = {
448 { .fw_name = "sleep_clk" },
449 { .fw_name = "core_bi_pll_test_se" },
452 static const struct parent_map gcc_parent_map_4[] = {
454 { P_GPLL0_OUT_MAIN, 1 },
455 { P_GPLL4_OUT_MAIN, 5 },
456 { P_CORE_BI_PLL_TEST_SE, 7 },
459 static const struct clk_parent_data gcc_parent_data_4[] = {
461 { .hw = &gpll0_out_main.clkr.hw },
462 { .hw = &gpll4_out_main.clkr.hw },
463 { .fw_name = "core_bi_pll_test_se" },
466 static const struct parent_map gcc_parent_map_5[] = {
468 { P_GPLL0_OUT_MAIN, 1 },
469 { P_AUD_REF_CLK, 2 },
470 { P_CORE_BI_PLL_TEST_SE, 7 },
473 static const struct clk_parent_data gcc_parent_data_5[] = {
475 { .hw = &gpll0_out_main.clkr.hw },
476 { .fw_name = "aud_ref_clk" },
477 { .fw_name = "core_bi_pll_test_se" },
480 static const struct freq_tbl ftbl_blsp1_qup1_i2c_apps_clk_src[] = {
481 F(19200000, P_XO, 1, 0, 0),
482 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
486 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
490 .parent_map = gcc_parent_map_1,
491 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
492 .clkr.hw.init = &(struct clk_init_data){
493 .name = "blsp1_qup1_i2c_apps_clk_src",
494 .parent_data = gcc_parent_data_1,
495 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
496 .ops = &clk_rcg2_ops,
500 static const struct freq_tbl ftbl_blsp1_qup1_spi_apps_clk_src[] = {
501 F(960000, P_XO, 10, 1, 2),
502 F(4800000, P_XO, 4, 0, 0),
503 F(9600000, P_XO, 2, 0, 0),
504 F(15000000, P_GPLL0_OUT_MAIN, 10, 1, 4),
505 F(19200000, P_XO, 1, 0, 0),
506 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
507 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
511 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
515 .parent_map = gcc_parent_map_0,
516 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
517 .clkr.hw.init = &(struct clk_init_data){
518 .name = "blsp1_qup1_spi_apps_clk_src",
519 .parent_data = gcc_parent_data_0,
520 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
521 .ops = &clk_rcg2_ops,
525 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
529 .parent_map = gcc_parent_map_1,
530 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
531 .clkr.hw.init = &(struct clk_init_data){
532 .name = "blsp1_qup2_i2c_apps_clk_src",
533 .parent_data = gcc_parent_data_1,
534 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
535 .ops = &clk_rcg2_ops,
539 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
543 .parent_map = gcc_parent_map_0,
544 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
545 .clkr.hw.init = &(struct clk_init_data){
546 .name = "blsp1_qup2_spi_apps_clk_src",
547 .parent_data = gcc_parent_data_0,
548 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
549 .ops = &clk_rcg2_ops,
553 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
557 .parent_map = gcc_parent_map_1,
558 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
559 .clkr.hw.init = &(struct clk_init_data){
560 .name = "blsp1_qup3_i2c_apps_clk_src",
561 .parent_data = gcc_parent_data_1,
562 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
563 .ops = &clk_rcg2_ops,
567 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
571 .parent_map = gcc_parent_map_0,
572 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
573 .clkr.hw.init = &(struct clk_init_data){
574 .name = "blsp1_qup3_spi_apps_clk_src",
575 .parent_data = gcc_parent_data_0,
576 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
577 .ops = &clk_rcg2_ops,
581 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
585 .parent_map = gcc_parent_map_1,
586 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
587 .clkr.hw.init = &(struct clk_init_data){
588 .name = "blsp1_qup4_i2c_apps_clk_src",
589 .parent_data = gcc_parent_data_1,
590 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
591 .ops = &clk_rcg2_ops,
595 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
599 .parent_map = gcc_parent_map_0,
600 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
601 .clkr.hw.init = &(struct clk_init_data){
602 .name = "blsp1_qup4_spi_apps_clk_src",
603 .parent_data = gcc_parent_data_0,
604 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
605 .ops = &clk_rcg2_ops,
609 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
613 .parent_map = gcc_parent_map_1,
614 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
615 .clkr.hw.init = &(struct clk_init_data){
616 .name = "blsp1_qup5_i2c_apps_clk_src",
617 .parent_data = gcc_parent_data_1,
618 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
619 .ops = &clk_rcg2_ops,
623 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
627 .parent_map = gcc_parent_map_0,
628 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
629 .clkr.hw.init = &(struct clk_init_data){
630 .name = "blsp1_qup5_spi_apps_clk_src",
631 .parent_data = gcc_parent_data_0,
632 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
633 .ops = &clk_rcg2_ops,
637 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
641 .parent_map = gcc_parent_map_1,
642 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
643 .clkr.hw.init = &(struct clk_init_data){
644 .name = "blsp1_qup6_i2c_apps_clk_src",
645 .parent_data = gcc_parent_data_1,
646 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
647 .ops = &clk_rcg2_ops,
651 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
655 .parent_map = gcc_parent_map_0,
656 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
657 .clkr.hw.init = &(struct clk_init_data){
658 .name = "blsp1_qup6_spi_apps_clk_src",
659 .parent_data = gcc_parent_data_0,
660 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
661 .ops = &clk_rcg2_ops,
665 static const struct freq_tbl ftbl_blsp1_uart1_apps_clk_src[] = {
666 F(3686400, P_GPLL0_OUT_MAIN, 1, 96, 15625),
667 F(7372800, P_GPLL0_OUT_MAIN, 1, 192, 15625),
668 F(14745600, P_GPLL0_OUT_MAIN, 1, 384, 15625),
669 F(16000000, P_GPLL0_OUT_MAIN, 5, 2, 15),
670 F(19200000, P_XO, 1, 0, 0),
671 F(24000000, P_GPLL0_OUT_MAIN, 5, 1, 5),
672 F(32000000, P_GPLL0_OUT_MAIN, 1, 4, 75),
673 F(40000000, P_GPLL0_OUT_MAIN, 15, 0, 0),
674 F(46400000, P_GPLL0_OUT_MAIN, 1, 29, 375),
675 F(48000000, P_GPLL0_OUT_MAIN, 12.5, 0, 0),
676 F(51200000, P_GPLL0_OUT_MAIN, 1, 32, 375),
677 F(56000000, P_GPLL0_OUT_MAIN, 1, 7, 75),
678 F(58982400, P_GPLL0_OUT_MAIN, 1, 1536, 15625),
679 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
680 F(63157895, P_GPLL0_OUT_MAIN, 9.5, 0, 0),
684 static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
688 .parent_map = gcc_parent_map_0,
689 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
690 .clkr.hw.init = &(struct clk_init_data){
691 .name = "blsp1_uart1_apps_clk_src",
692 .parent_data = gcc_parent_data_0,
693 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
694 .ops = &clk_rcg2_ops,
698 static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
702 .parent_map = gcc_parent_map_0,
703 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
704 .clkr.hw.init = &(struct clk_init_data){
705 .name = "blsp1_uart2_apps_clk_src",
706 .parent_data = gcc_parent_data_0,
707 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
708 .ops = &clk_rcg2_ops,
712 static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
716 .parent_map = gcc_parent_map_0,
717 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
718 .clkr.hw.init = &(struct clk_init_data){
719 .name = "blsp1_uart3_apps_clk_src",
720 .parent_data = gcc_parent_data_0,
721 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
722 .ops = &clk_rcg2_ops,
726 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src = {
730 .parent_map = gcc_parent_map_1,
731 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
732 .clkr.hw.init = &(struct clk_init_data){
733 .name = "blsp2_qup1_i2c_apps_clk_src",
734 .parent_data = gcc_parent_data_1,
735 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
736 .ops = &clk_rcg2_ops,
740 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src = {
744 .parent_map = gcc_parent_map_0,
745 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
746 .clkr.hw.init = &(struct clk_init_data){
747 .name = "blsp2_qup1_spi_apps_clk_src",
748 .parent_data = gcc_parent_data_0,
749 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
750 .ops = &clk_rcg2_ops,
754 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src = {
758 .parent_map = gcc_parent_map_1,
759 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
760 .clkr.hw.init = &(struct clk_init_data){
761 .name = "blsp2_qup2_i2c_apps_clk_src",
762 .parent_data = gcc_parent_data_1,
763 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
764 .ops = &clk_rcg2_ops,
768 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src = {
772 .parent_map = gcc_parent_map_0,
773 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
774 .clkr.hw.init = &(struct clk_init_data){
775 .name = "blsp2_qup2_spi_apps_clk_src",
776 .parent_data = gcc_parent_data_0,
777 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
778 .ops = &clk_rcg2_ops,
782 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src = {
786 .parent_map = gcc_parent_map_1,
787 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
788 .clkr.hw.init = &(struct clk_init_data){
789 .name = "blsp2_qup3_i2c_apps_clk_src",
790 .parent_data = gcc_parent_data_1,
791 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
792 .ops = &clk_rcg2_ops,
796 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src = {
800 .parent_map = gcc_parent_map_0,
801 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
802 .clkr.hw.init = &(struct clk_init_data){
803 .name = "blsp2_qup3_spi_apps_clk_src",
804 .parent_data = gcc_parent_data_0,
805 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
806 .ops = &clk_rcg2_ops,
810 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src = {
814 .parent_map = gcc_parent_map_1,
815 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
816 .clkr.hw.init = &(struct clk_init_data){
817 .name = "blsp2_qup4_i2c_apps_clk_src",
818 .parent_data = gcc_parent_data_1,
819 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
820 .ops = &clk_rcg2_ops,
824 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src = {
828 .parent_map = gcc_parent_map_0,
829 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
830 .clkr.hw.init = &(struct clk_init_data){
831 .name = "blsp2_qup4_spi_apps_clk_src",
832 .parent_data = gcc_parent_data_0,
833 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
834 .ops = &clk_rcg2_ops,
838 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src = {
842 .parent_map = gcc_parent_map_1,
843 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
844 .clkr.hw.init = &(struct clk_init_data){
845 .name = "blsp2_qup5_i2c_apps_clk_src",
846 .parent_data = gcc_parent_data_1,
847 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
848 .ops = &clk_rcg2_ops,
852 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src = {
856 .parent_map = gcc_parent_map_0,
857 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
858 .clkr.hw.init = &(struct clk_init_data){
859 .name = "blsp2_qup5_spi_apps_clk_src",
860 .parent_data = gcc_parent_data_0,
861 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
862 .ops = &clk_rcg2_ops,
866 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src = {
870 .parent_map = gcc_parent_map_1,
871 .freq_tbl = ftbl_blsp1_qup1_i2c_apps_clk_src,
872 .clkr.hw.init = &(struct clk_init_data){
873 .name = "blsp2_qup6_i2c_apps_clk_src",
874 .parent_data = gcc_parent_data_1,
875 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
876 .ops = &clk_rcg2_ops,
880 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src = {
884 .parent_map = gcc_parent_map_0,
885 .freq_tbl = ftbl_blsp1_qup1_spi_apps_clk_src,
886 .clkr.hw.init = &(struct clk_init_data){
887 .name = "blsp2_qup6_spi_apps_clk_src",
888 .parent_data = gcc_parent_data_0,
889 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
890 .ops = &clk_rcg2_ops,
894 static struct clk_rcg2 blsp2_uart1_apps_clk_src = {
898 .parent_map = gcc_parent_map_0,
899 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
900 .clkr.hw.init = &(struct clk_init_data){
901 .name = "blsp2_uart1_apps_clk_src",
902 .parent_data = gcc_parent_data_0,
903 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
904 .ops = &clk_rcg2_ops,
908 static struct clk_rcg2 blsp2_uart2_apps_clk_src = {
912 .parent_map = gcc_parent_map_0,
913 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
914 .clkr.hw.init = &(struct clk_init_data){
915 .name = "blsp2_uart2_apps_clk_src",
916 .parent_data = gcc_parent_data_0,
917 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
918 .ops = &clk_rcg2_ops,
922 static struct clk_rcg2 blsp2_uart3_apps_clk_src = {
926 .parent_map = gcc_parent_map_0,
927 .freq_tbl = ftbl_blsp1_uart1_apps_clk_src,
928 .clkr.hw.init = &(struct clk_init_data){
929 .name = "blsp2_uart3_apps_clk_src",
930 .parent_data = gcc_parent_data_0,
931 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
932 .ops = &clk_rcg2_ops,
936 static const struct freq_tbl ftbl_gp1_clk_src[] = {
937 F(19200000, P_XO, 1, 0, 0),
938 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
939 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
943 static struct clk_rcg2 gp1_clk_src = {
947 .parent_map = gcc_parent_map_2,
948 .freq_tbl = ftbl_gp1_clk_src,
949 .clkr.hw.init = &(struct clk_init_data){
950 .name = "gp1_clk_src",
951 .parent_data = gcc_parent_data_2,
952 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
953 .ops = &clk_rcg2_ops,
957 static struct clk_rcg2 gp2_clk_src = {
961 .parent_map = gcc_parent_map_2,
962 .freq_tbl = ftbl_gp1_clk_src,
963 .clkr.hw.init = &(struct clk_init_data){
964 .name = "gp2_clk_src",
965 .parent_data = gcc_parent_data_2,
966 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
967 .ops = &clk_rcg2_ops,
971 static struct clk_rcg2 gp3_clk_src = {
975 .parent_map = gcc_parent_map_2,
976 .freq_tbl = ftbl_gp1_clk_src,
977 .clkr.hw.init = &(struct clk_init_data){
978 .name = "gp3_clk_src",
979 .parent_data = gcc_parent_data_2,
980 .num_parents = ARRAY_SIZE(gcc_parent_data_2),
981 .ops = &clk_rcg2_ops,
985 static const struct freq_tbl ftbl_hmss_ahb_clk_src[] = {
986 F(19200000, P_XO, 1, 0, 0),
987 F(37500000, P_GPLL0_OUT_MAIN, 16, 0, 0),
988 F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
992 static struct clk_rcg2 hmss_ahb_clk_src = {
996 .parent_map = gcc_parent_map_1,
997 .freq_tbl = ftbl_hmss_ahb_clk_src,
998 .clkr.hw.init = &(struct clk_init_data){
999 .name = "hmss_ahb_clk_src",
1000 .parent_data = gcc_parent_data_1,
1001 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1002 .ops = &clk_rcg2_ops,
1006 static const struct freq_tbl ftbl_hmss_rbcpr_clk_src[] = {
1007 F(19200000, P_XO, 1, 0, 0),
1011 static struct clk_rcg2 hmss_rbcpr_clk_src = {
1012 .cmd_rcgr = 0x48044,
1015 .parent_map = gcc_parent_map_1,
1016 .freq_tbl = ftbl_hmss_rbcpr_clk_src,
1017 .clkr.hw.init = &(struct clk_init_data){
1018 .name = "hmss_rbcpr_clk_src",
1019 .parent_data = gcc_parent_data_1,
1020 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1021 .ops = &clk_rcg2_ops,
1025 static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {
1026 F(1010526, P_XO, 1, 1, 19),
1030 static struct clk_rcg2 pcie_aux_clk_src = {
1031 .cmd_rcgr = 0x6c000,
1034 .parent_map = gcc_parent_map_3,
1035 .freq_tbl = ftbl_pcie_aux_clk_src,
1036 .clkr.hw.init = &(struct clk_init_data){
1037 .name = "pcie_aux_clk_src",
1038 .parent_data = gcc_parent_data_3,
1039 .num_parents = ARRAY_SIZE(gcc_parent_data_3),
1040 .ops = &clk_rcg2_ops,
1044 static const struct freq_tbl ftbl_pdm2_clk_src[] = {
1045 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
1049 static struct clk_rcg2 pdm2_clk_src = {
1050 .cmd_rcgr = 0x33010,
1053 .parent_map = gcc_parent_map_1,
1054 .freq_tbl = ftbl_pdm2_clk_src,
1055 .clkr.hw.init = &(struct clk_init_data){
1056 .name = "pdm2_clk_src",
1057 .parent_data = gcc_parent_data_1,
1058 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1059 .ops = &clk_rcg2_ops,
1063 static const struct freq_tbl ftbl_sdcc2_apps_clk_src[] = {
1064 F(144000, P_XO, 16, 3, 25),
1065 F(400000, P_XO, 12, 1, 4),
1066 F(20000000, P_GPLL0_OUT_MAIN, 15, 1, 2),
1067 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
1068 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
1069 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1070 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
1074 static struct clk_rcg2 sdcc2_apps_clk_src = {
1075 .cmd_rcgr = 0x14010,
1078 .parent_map = gcc_parent_map_4,
1079 .freq_tbl = ftbl_sdcc2_apps_clk_src,
1080 .clkr.hw.init = &(struct clk_init_data){
1081 .name = "sdcc2_apps_clk_src",
1082 .parent_data = gcc_parent_data_4,
1083 .num_parents = ARRAY_SIZE(gcc_parent_data_4),
1084 .ops = &clk_rcg2_floor_ops,
1088 static const struct freq_tbl ftbl_sdcc4_apps_clk_src[] = {
1089 F(144000, P_XO, 16, 3, 25),
1090 F(400000, P_XO, 12, 1, 4),
1091 F(20000000, P_GPLL0_OUT_MAIN, 15, 1, 2),
1092 F(25000000, P_GPLL0_OUT_MAIN, 12, 1, 2),
1093 F(50000000, P_GPLL0_OUT_MAIN, 12, 0, 0),
1094 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1098 static struct clk_rcg2 sdcc4_apps_clk_src = {
1099 .cmd_rcgr = 0x16010,
1102 .parent_map = gcc_parent_map_1,
1103 .freq_tbl = ftbl_sdcc4_apps_clk_src,
1104 .clkr.hw.init = &(struct clk_init_data){
1105 .name = "sdcc4_apps_clk_src",
1106 .parent_data = gcc_parent_data_1,
1107 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
1108 .ops = &clk_rcg2_floor_ops,
1112 static const struct freq_tbl ftbl_tsif_ref_clk_src[] = {
1113 F(105495, P_XO, 1, 1, 182),
1117 static struct clk_rcg2 tsif_ref_clk_src = {
1118 .cmd_rcgr = 0x36010,
1121 .parent_map = gcc_parent_map_5,
1122 .freq_tbl = ftbl_tsif_ref_clk_src,
1123 .clkr.hw.init = &(struct clk_init_data){
1124 .name = "tsif_ref_clk_src",
1125 .parent_data = gcc_parent_data_5,
1126 .num_parents = ARRAY_SIZE(gcc_parent_data_5),
1127 .ops = &clk_rcg2_ops,
1131 static const struct freq_tbl ftbl_ufs_axi_clk_src[] = {
1132 F(100000000, P_GPLL0_OUT_MAIN, 6, 0, 0),
1133 F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
1134 F(240000000, P_GPLL0_OUT_MAIN, 2.5, 0, 0),
1138 static struct clk_rcg2 ufs_axi_clk_src = {
1139 .cmd_rcgr = 0x75018,
1142 .parent_map = gcc_parent_map_0,
1143 .freq_tbl = ftbl_ufs_axi_clk_src,
1144 .clkr.hw.init = &(struct clk_init_data){
1145 .name = "ufs_axi_clk_src",
1146 .parent_data = gcc_parent_data_0,
1147 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1148 .ops = &clk_rcg2_ops,
1152 static const struct freq_tbl ftbl_ufs_unipro_core_clk_src[] = {
1153 F(37500000, P_GPLL0_OUT_MAIN, 16, 0, 0),
1154 F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0),
1155 F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
1159 static struct clk_rcg2 ufs_unipro_core_clk_src = {
1160 .cmd_rcgr = 0x76028,
1163 .parent_map = gcc_parent_map_0,
1164 .freq_tbl = ftbl_ufs_unipro_core_clk_src,
1165 .clkr.hw.init = &(struct clk_init_data){
1166 .name = "ufs_unipro_core_clk_src",
1167 .parent_data = gcc_parent_data_0,
1168 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1169 .ops = &clk_rcg2_ops,
1173 static const struct freq_tbl ftbl_usb30_master_clk_src[] = {
1174 F(19200000, P_XO, 1, 0, 0),
1175 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0),
1176 F(120000000, P_GPLL0_OUT_MAIN, 5, 0, 0),
1177 F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
1181 static struct clk_rcg2 usb30_master_clk_src = {
1185 .parent_map = gcc_parent_map_0,
1186 .freq_tbl = ftbl_usb30_master_clk_src,
1187 .clkr.hw.init = &(struct clk_init_data){
1188 .name = "usb30_master_clk_src",
1189 .parent_data = gcc_parent_data_0,
1190 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1191 .ops = &clk_rcg2_ops,
1195 static struct clk_rcg2 usb30_mock_utmi_clk_src = {
1199 .parent_map = gcc_parent_map_0,
1200 .freq_tbl = ftbl_hmss_rbcpr_clk_src,
1201 .clkr.hw.init = &(struct clk_init_data){
1202 .name = "usb30_mock_utmi_clk_src",
1203 .parent_data = gcc_parent_data_0,
1204 .num_parents = ARRAY_SIZE(gcc_parent_data_0),
1205 .ops = &clk_rcg2_ops,
1209 static const struct freq_tbl ftbl_usb3_phy_aux_clk_src[] = {
1210 F(1200000, P_XO, 16, 0, 0),
1214 static struct clk_rcg2 usb3_phy_aux_clk_src = {
1215 .cmd_rcgr = 0x5000c,
1218 .parent_map = gcc_parent_map_3,
1219 .freq_tbl = ftbl_usb3_phy_aux_clk_src,
1220 .clkr.hw.init = &(struct clk_init_data){
1221 .name = "usb3_phy_aux_clk_src",
1222 .parent_data = gcc_parent_data_3,
1223 .num_parents = ARRAY_SIZE(gcc_parent_data_3),
1224 .ops = &clk_rcg2_ops,
1228 static struct clk_branch gcc_aggre1_noc_xo_clk = {
1229 .halt_reg = 0x8202c,
1230 .halt_check = BRANCH_HALT,
1232 .enable_reg = 0x8202c,
1233 .enable_mask = BIT(0),
1234 .hw.init = &(struct clk_init_data){
1235 .name = "gcc_aggre1_noc_xo_clk",
1236 .ops = &clk_branch2_ops,
1241 static struct clk_branch gcc_aggre1_ufs_axi_clk = {
1242 .halt_reg = 0x82028,
1243 .halt_check = BRANCH_HALT,
1245 .enable_reg = 0x82028,
1246 .enable_mask = BIT(0),
1247 .hw.init = &(struct clk_init_data){
1248 .name = "gcc_aggre1_ufs_axi_clk",
1249 .parent_hws = (const struct clk_hw *[]) {
1250 &ufs_axi_clk_src.clkr.hw,
1253 .flags = CLK_SET_RATE_PARENT,
1254 .ops = &clk_branch2_ops,
1259 static struct clk_branch gcc_aggre1_usb3_axi_clk = {
1260 .halt_reg = 0x82024,
1261 .halt_check = BRANCH_HALT,
1263 .enable_reg = 0x82024,
1264 .enable_mask = BIT(0),
1265 .hw.init = &(struct clk_init_data){
1266 .name = "gcc_aggre1_usb3_axi_clk",
1267 .parent_hws = (const struct clk_hw *[]) {
1268 &usb30_master_clk_src.clkr.hw,
1271 .flags = CLK_SET_RATE_PARENT,
1272 .ops = &clk_branch2_ops,
1277 static struct clk_branch gcc_apss_qdss_tsctr_div2_clk = {
1278 .halt_reg = 0x48090,
1279 .halt_check = BRANCH_HALT,
1281 .enable_reg = 0x48090,
1282 .enable_mask = BIT(0),
1283 .hw.init = &(struct clk_init_data){
1284 .name = "gcc_apss_qdss_tsctr_div2_clk",
1285 .ops = &clk_branch2_ops,
1290 static struct clk_branch gcc_apss_qdss_tsctr_div8_clk = {
1291 .halt_reg = 0x48094,
1292 .halt_check = BRANCH_HALT,
1294 .enable_reg = 0x48094,
1295 .enable_mask = BIT(0),
1296 .hw.init = &(struct clk_init_data){
1297 .name = "gcc_apss_qdss_tsctr_div8_clk",
1298 .ops = &clk_branch2_ops,
1303 static struct clk_branch gcc_bimc_hmss_axi_clk = {
1304 .halt_reg = 0x48004,
1305 .halt_check = BRANCH_HALT_VOTED,
1307 .enable_reg = 0x52004,
1308 .enable_mask = BIT(22),
1309 .hw.init = &(struct clk_init_data){
1310 .name = "gcc_bimc_hmss_axi_clk",
1311 .ops = &clk_branch2_ops,
1316 static struct clk_branch gcc_bimc_mss_q6_axi_clk = {
1317 .halt_reg = 0x4401c,
1318 .halt_check = BRANCH_HALT,
1320 .enable_reg = 0x4401c,
1321 .enable_mask = BIT(0),
1322 .hw.init = &(struct clk_init_data){
1323 .name = "gcc_bimc_mss_q6_axi_clk",
1324 .ops = &clk_branch2_ops,
1329 static struct clk_branch gcc_mss_cfg_ahb_clk = {
1330 .halt_reg = 0x8a000,
1331 .halt_check = BRANCH_HALT,
1333 .enable_reg = 0x8a000,
1334 .enable_mask = BIT(0),
1335 .hw.init = &(struct clk_init_data){
1336 .name = "gcc_mss_cfg_ahb_clk",
1337 .ops = &clk_branch2_ops,
1342 static struct clk_branch gcc_mss_snoc_axi_clk = {
1343 .halt_reg = 0x8a03c,
1344 .halt_check = BRANCH_HALT,
1346 .enable_reg = 0x8a03c,
1347 .enable_mask = BIT(0),
1348 .hw.init = &(struct clk_init_data){
1349 .name = "gcc_mss_snoc_axi_clk",
1350 .ops = &clk_branch2_ops,
1355 static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = {
1356 .halt_reg = 0x8a004,
1357 .halt_check = BRANCH_HALT,
1359 .enable_reg = 0x8a004,
1360 .enable_mask = BIT(0),
1361 .hw.init = &(struct clk_init_data){
1362 .name = "gcc_mss_mnoc_bimc_axi_clk",
1363 .ops = &clk_branch2_ops,
1368 static struct clk_branch gcc_boot_rom_ahb_clk = {
1369 .halt_reg = 0x38004,
1370 .halt_check = BRANCH_HALT_VOTED,
1371 .hwcg_reg = 0x38004,
1374 .enable_reg = 0x52004,
1375 .enable_mask = BIT(10),
1376 .hw.init = &(struct clk_init_data){
1377 .name = "gcc_boot_rom_ahb_clk",
1378 .ops = &clk_branch2_ops,
1383 static struct clk_branch gcc_mmss_gpll0_clk = {
1384 .halt_check = BRANCH_HALT_DELAY,
1386 .enable_reg = 0x5200c,
1387 .enable_mask = BIT(1),
1388 .hw.init = &(struct clk_init_data){
1389 .name = "gcc_mmss_gpll0_clk",
1390 .parent_hws = (const struct clk_hw *[]) {
1391 &gpll0_out_main.clkr.hw,
1394 .ops = &clk_branch2_ops,
1399 static struct clk_branch gcc_mss_gpll0_div_clk_src = {
1400 .halt_check = BRANCH_HALT_DELAY,
1402 .enable_reg = 0x5200c,
1403 .enable_mask = BIT(2),
1404 .hw.init = &(struct clk_init_data){
1405 .name = "gcc_mss_gpll0_div_clk_src",
1406 .ops = &clk_branch2_ops,
1411 static struct clk_branch gcc_blsp1_ahb_clk = {
1412 .halt_reg = 0x17004,
1413 .halt_check = BRANCH_HALT_VOTED,
1415 .enable_reg = 0x52004,
1416 .enable_mask = BIT(17),
1417 .hw.init = &(struct clk_init_data){
1418 .name = "gcc_blsp1_ahb_clk",
1419 .ops = &clk_branch2_ops,
1424 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
1425 .halt_reg = 0x19008,
1426 .halt_check = BRANCH_HALT,
1428 .enable_reg = 0x19008,
1429 .enable_mask = BIT(0),
1430 .hw.init = &(struct clk_init_data){
1431 .name = "gcc_blsp1_qup1_i2c_apps_clk",
1432 .parent_hws = (const struct clk_hw *[]) {
1433 &blsp1_qup1_i2c_apps_clk_src.clkr.hw,
1436 .flags = CLK_SET_RATE_PARENT,
1437 .ops = &clk_branch2_ops,
1442 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
1443 .halt_reg = 0x19004,
1444 .halt_check = BRANCH_HALT,
1446 .enable_reg = 0x19004,
1447 .enable_mask = BIT(0),
1448 .hw.init = &(struct clk_init_data){
1449 .name = "gcc_blsp1_qup1_spi_apps_clk",
1450 .parent_hws = (const struct clk_hw *[]) {
1451 &blsp1_qup1_spi_apps_clk_src.clkr.hw,
1454 .flags = CLK_SET_RATE_PARENT,
1455 .ops = &clk_branch2_ops,
1460 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
1461 .halt_reg = 0x1b008,
1462 .halt_check = BRANCH_HALT,
1464 .enable_reg = 0x1b008,
1465 .enable_mask = BIT(0),
1466 .hw.init = &(struct clk_init_data){
1467 .name = "gcc_blsp1_qup2_i2c_apps_clk",
1468 .parent_hws = (const struct clk_hw *[]) {
1469 &blsp1_qup2_i2c_apps_clk_src.clkr.hw,
1472 .flags = CLK_SET_RATE_PARENT,
1473 .ops = &clk_branch2_ops,
1478 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
1479 .halt_reg = 0x1b004,
1480 .halt_check = BRANCH_HALT,
1482 .enable_reg = 0x1b004,
1483 .enable_mask = BIT(0),
1484 .hw.init = &(struct clk_init_data){
1485 .name = "gcc_blsp1_qup2_spi_apps_clk",
1486 .parent_hws = (const struct clk_hw *[]) {
1487 &blsp1_qup2_spi_apps_clk_src.clkr.hw,
1490 .flags = CLK_SET_RATE_PARENT,
1491 .ops = &clk_branch2_ops,
1496 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
1497 .halt_reg = 0x1d008,
1498 .halt_check = BRANCH_HALT,
1500 .enable_reg = 0x1d008,
1501 .enable_mask = BIT(0),
1502 .hw.init = &(struct clk_init_data){
1503 .name = "gcc_blsp1_qup3_i2c_apps_clk",
1504 .parent_hws = (const struct clk_hw *[]) {
1505 &blsp1_qup3_i2c_apps_clk_src.clkr.hw,
1508 .flags = CLK_SET_RATE_PARENT,
1509 .ops = &clk_branch2_ops,
1514 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
1515 .halt_reg = 0x1d004,
1516 .halt_check = BRANCH_HALT,
1518 .enable_reg = 0x1d004,
1519 .enable_mask = BIT(0),
1520 .hw.init = &(struct clk_init_data){
1521 .name = "gcc_blsp1_qup3_spi_apps_clk",
1522 .parent_hws = (const struct clk_hw *[]) {
1523 &blsp1_qup3_spi_apps_clk_src.clkr.hw,
1526 .flags = CLK_SET_RATE_PARENT,
1527 .ops = &clk_branch2_ops,
1532 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
1533 .halt_reg = 0x1f008,
1534 .halt_check = BRANCH_HALT,
1536 .enable_reg = 0x1f008,
1537 .enable_mask = BIT(0),
1538 .hw.init = &(struct clk_init_data){
1539 .name = "gcc_blsp1_qup4_i2c_apps_clk",
1540 .parent_hws = (const struct clk_hw *[]) {
1541 &blsp1_qup4_i2c_apps_clk_src.clkr.hw,
1544 .flags = CLK_SET_RATE_PARENT,
1545 .ops = &clk_branch2_ops,
1550 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
1551 .halt_reg = 0x1f004,
1552 .halt_check = BRANCH_HALT,
1554 .enable_reg = 0x1f004,
1555 .enable_mask = BIT(0),
1556 .hw.init = &(struct clk_init_data){
1557 .name = "gcc_blsp1_qup4_spi_apps_clk",
1558 .parent_hws = (const struct clk_hw *[]) {
1559 &blsp1_qup4_spi_apps_clk_src.clkr.hw,
1562 .flags = CLK_SET_RATE_PARENT,
1563 .ops = &clk_branch2_ops,
1568 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
1569 .halt_reg = 0x21008,
1570 .halt_check = BRANCH_HALT,
1572 .enable_reg = 0x21008,
1573 .enable_mask = BIT(0),
1574 .hw.init = &(struct clk_init_data){
1575 .name = "gcc_blsp1_qup5_i2c_apps_clk",
1576 .parent_hws = (const struct clk_hw *[]) {
1577 &blsp1_qup5_i2c_apps_clk_src.clkr.hw,
1580 .flags = CLK_SET_RATE_PARENT,
1581 .ops = &clk_branch2_ops,
1586 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
1587 .halt_reg = 0x21004,
1588 .halt_check = BRANCH_HALT,
1590 .enable_reg = 0x21004,
1591 .enable_mask = BIT(0),
1592 .hw.init = &(struct clk_init_data){
1593 .name = "gcc_blsp1_qup5_spi_apps_clk",
1594 .parent_hws = (const struct clk_hw *[]) {
1595 &blsp1_qup5_spi_apps_clk_src.clkr.hw,
1598 .flags = CLK_SET_RATE_PARENT,
1599 .ops = &clk_branch2_ops,
1604 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk = {
1605 .halt_reg = 0x23008,
1606 .halt_check = BRANCH_HALT,
1608 .enable_reg = 0x23008,
1609 .enable_mask = BIT(0),
1610 .hw.init = &(struct clk_init_data){
1611 .name = "gcc_blsp1_qup6_i2c_apps_clk",
1612 .parent_hws = (const struct clk_hw *[]) {
1613 &blsp1_qup6_i2c_apps_clk_src.clkr.hw,
1616 .flags = CLK_SET_RATE_PARENT,
1617 .ops = &clk_branch2_ops,
1622 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
1623 .halt_reg = 0x23004,
1624 .halt_check = BRANCH_HALT,
1626 .enable_reg = 0x23004,
1627 .enable_mask = BIT(0),
1628 .hw.init = &(struct clk_init_data){
1629 .name = "gcc_blsp1_qup6_spi_apps_clk",
1630 .parent_hws = (const struct clk_hw *[]) {
1631 &blsp1_qup6_spi_apps_clk_src.clkr.hw,
1634 .flags = CLK_SET_RATE_PARENT,
1635 .ops = &clk_branch2_ops,
1640 static struct clk_branch gcc_blsp1_sleep_clk = {
1641 .halt_reg = 0x17008,
1642 .halt_check = BRANCH_HALT_VOTED,
1644 .enable_reg = 0x52004,
1645 .enable_mask = BIT(16),
1646 .hw.init = &(struct clk_init_data){
1647 .name = "gcc_blsp1_sleep_clk",
1648 .ops = &clk_branch2_ops,
1653 static struct clk_branch gcc_blsp1_uart1_apps_clk = {
1654 .halt_reg = 0x1a004,
1655 .halt_check = BRANCH_HALT,
1657 .enable_reg = 0x1a004,
1658 .enable_mask = BIT(0),
1659 .hw.init = &(struct clk_init_data){
1660 .name = "gcc_blsp1_uart1_apps_clk",
1661 .parent_hws = (const struct clk_hw *[]) {
1662 &blsp1_uart1_apps_clk_src.clkr.hw,
1665 .flags = CLK_SET_RATE_PARENT,
1666 .ops = &clk_branch2_ops,
1671 static struct clk_branch gcc_blsp1_uart2_apps_clk = {
1672 .halt_reg = 0x1c004,
1673 .halt_check = BRANCH_HALT,
1675 .enable_reg = 0x1c004,
1676 .enable_mask = BIT(0),
1677 .hw.init = &(struct clk_init_data){
1678 .name = "gcc_blsp1_uart2_apps_clk",
1679 .parent_hws = (const struct clk_hw *[]) {
1680 &blsp1_uart2_apps_clk_src.clkr.hw,
1683 .flags = CLK_SET_RATE_PARENT,
1684 .ops = &clk_branch2_ops,
1689 static struct clk_branch gcc_blsp1_uart3_apps_clk = {
1690 .halt_reg = 0x1e004,
1691 .halt_check = BRANCH_HALT,
1693 .enable_reg = 0x1e004,
1694 .enable_mask = BIT(0),
1695 .hw.init = &(struct clk_init_data){
1696 .name = "gcc_blsp1_uart3_apps_clk",
1697 .parent_hws = (const struct clk_hw *[]) {
1698 &blsp1_uart3_apps_clk_src.clkr.hw,
1701 .flags = CLK_SET_RATE_PARENT,
1702 .ops = &clk_branch2_ops,
1707 static struct clk_branch gcc_blsp2_ahb_clk = {
1708 .halt_reg = 0x25004,
1709 .halt_check = BRANCH_HALT_VOTED,
1711 .enable_reg = 0x52004,
1712 .enable_mask = BIT(15),
1713 .hw.init = &(struct clk_init_data){
1714 .name = "gcc_blsp2_ahb_clk",
1715 .ops = &clk_branch2_ops,
1720 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk = {
1721 .halt_reg = 0x26008,
1722 .halt_check = BRANCH_HALT,
1724 .enable_reg = 0x26008,
1725 .enable_mask = BIT(0),
1726 .hw.init = &(struct clk_init_data){
1727 .name = "gcc_blsp2_qup1_i2c_apps_clk",
1728 .parent_hws = (const struct clk_hw *[]) {
1729 &blsp2_qup1_i2c_apps_clk_src.clkr.hw,
1732 .flags = CLK_SET_RATE_PARENT,
1733 .ops = &clk_branch2_ops,
1738 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk = {
1739 .halt_reg = 0x26004,
1740 .halt_check = BRANCH_HALT,
1742 .enable_reg = 0x26004,
1743 .enable_mask = BIT(0),
1744 .hw.init = &(struct clk_init_data){
1745 .name = "gcc_blsp2_qup1_spi_apps_clk",
1746 .parent_hws = (const struct clk_hw *[]) {
1747 &blsp2_qup1_spi_apps_clk_src.clkr.hw,
1750 .flags = CLK_SET_RATE_PARENT,
1751 .ops = &clk_branch2_ops,
1756 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk = {
1757 .halt_reg = 0x28008,
1758 .halt_check = BRANCH_HALT,
1760 .enable_reg = 0x28008,
1761 .enable_mask = BIT(0),
1762 .hw.init = &(struct clk_init_data){
1763 .name = "gcc_blsp2_qup2_i2c_apps_clk",
1764 .parent_hws = (const struct clk_hw *[]) {
1765 &blsp2_qup2_i2c_apps_clk_src.clkr.hw,
1768 .flags = CLK_SET_RATE_PARENT,
1769 .ops = &clk_branch2_ops,
1774 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk = {
1775 .halt_reg = 0x28004,
1776 .halt_check = BRANCH_HALT,
1778 .enable_reg = 0x28004,
1779 .enable_mask = BIT(0),
1780 .hw.init = &(struct clk_init_data){
1781 .name = "gcc_blsp2_qup2_spi_apps_clk",
1782 .parent_hws = (const struct clk_hw *[]) {
1783 &blsp2_qup2_spi_apps_clk_src.clkr.hw,
1786 .flags = CLK_SET_RATE_PARENT,
1787 .ops = &clk_branch2_ops,
1792 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk = {
1793 .halt_reg = 0x2a008,
1794 .halt_check = BRANCH_HALT,
1796 .enable_reg = 0x2a008,
1797 .enable_mask = BIT(0),
1798 .hw.init = &(struct clk_init_data){
1799 .name = "gcc_blsp2_qup3_i2c_apps_clk",
1800 .parent_hws = (const struct clk_hw *[]) {
1801 &blsp2_qup3_i2c_apps_clk_src.clkr.hw,
1804 .flags = CLK_SET_RATE_PARENT,
1805 .ops = &clk_branch2_ops,
1810 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk = {
1811 .halt_reg = 0x2a004,
1812 .halt_check = BRANCH_HALT,
1814 .enable_reg = 0x2a004,
1815 .enable_mask = BIT(0),
1816 .hw.init = &(struct clk_init_data){
1817 .name = "gcc_blsp2_qup3_spi_apps_clk",
1818 .parent_hws = (const struct clk_hw *[]) {
1819 &blsp2_qup3_spi_apps_clk_src.clkr.hw,
1822 .flags = CLK_SET_RATE_PARENT,
1823 .ops = &clk_branch2_ops,
1828 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk = {
1829 .halt_reg = 0x2c008,
1830 .halt_check = BRANCH_HALT,
1832 .enable_reg = 0x2c008,
1833 .enable_mask = BIT(0),
1834 .hw.init = &(struct clk_init_data){
1835 .name = "gcc_blsp2_qup4_i2c_apps_clk",
1836 .parent_hws = (const struct clk_hw *[]) {
1837 &blsp2_qup4_i2c_apps_clk_src.clkr.hw,
1840 .flags = CLK_SET_RATE_PARENT,
1841 .ops = &clk_branch2_ops,
1846 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk = {
1847 .halt_reg = 0x2c004,
1848 .halt_check = BRANCH_HALT,
1850 .enable_reg = 0x2c004,
1851 .enable_mask = BIT(0),
1852 .hw.init = &(struct clk_init_data){
1853 .name = "gcc_blsp2_qup4_spi_apps_clk",
1854 .parent_hws = (const struct clk_hw *[]) {
1855 &blsp2_qup4_spi_apps_clk_src.clkr.hw,
1858 .flags = CLK_SET_RATE_PARENT,
1859 .ops = &clk_branch2_ops,
1864 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk = {
1865 .halt_reg = 0x2e008,
1866 .halt_check = BRANCH_HALT,
1868 .enable_reg = 0x2e008,
1869 .enable_mask = BIT(0),
1870 .hw.init = &(struct clk_init_data){
1871 .name = "gcc_blsp2_qup5_i2c_apps_clk",
1872 .parent_hws = (const struct clk_hw *[]) {
1873 &blsp2_qup5_i2c_apps_clk_src.clkr.hw,
1876 .flags = CLK_SET_RATE_PARENT,
1877 .ops = &clk_branch2_ops,
1882 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk = {
1883 .halt_reg = 0x2e004,
1884 .halt_check = BRANCH_HALT,
1886 .enable_reg = 0x2e004,
1887 .enable_mask = BIT(0),
1888 .hw.init = &(struct clk_init_data){
1889 .name = "gcc_blsp2_qup5_spi_apps_clk",
1890 .parent_hws = (const struct clk_hw *[]) {
1891 &blsp2_qup5_spi_apps_clk_src.clkr.hw,
1894 .flags = CLK_SET_RATE_PARENT,
1895 .ops = &clk_branch2_ops,
1900 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk = {
1901 .halt_reg = 0x30008,
1902 .halt_check = BRANCH_HALT,
1904 .enable_reg = 0x30008,
1905 .enable_mask = BIT(0),
1906 .hw.init = &(struct clk_init_data){
1907 .name = "gcc_blsp2_qup6_i2c_apps_clk",
1908 .parent_hws = (const struct clk_hw *[]) {
1909 &blsp2_qup6_i2c_apps_clk_src.clkr.hw,
1912 .flags = CLK_SET_RATE_PARENT,
1913 .ops = &clk_branch2_ops,
1918 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk = {
1919 .halt_reg = 0x30004,
1920 .halt_check = BRANCH_HALT,
1922 .enable_reg = 0x30004,
1923 .enable_mask = BIT(0),
1924 .hw.init = &(struct clk_init_data){
1925 .name = "gcc_blsp2_qup6_spi_apps_clk",
1926 .parent_hws = (const struct clk_hw *[]) {
1927 &blsp2_qup6_spi_apps_clk_src.clkr.hw,
1930 .flags = CLK_SET_RATE_PARENT,
1931 .ops = &clk_branch2_ops,
1936 static struct clk_branch gcc_blsp2_sleep_clk = {
1937 .halt_reg = 0x25008,
1938 .halt_check = BRANCH_HALT_VOTED,
1940 .enable_reg = 0x52004,
1941 .enable_mask = BIT(14),
1942 .hw.init = &(struct clk_init_data){
1943 .name = "gcc_blsp2_sleep_clk",
1944 .ops = &clk_branch2_ops,
1949 static struct clk_branch gcc_blsp2_uart1_apps_clk = {
1950 .halt_reg = 0x27004,
1951 .halt_check = BRANCH_HALT,
1953 .enable_reg = 0x27004,
1954 .enable_mask = BIT(0),
1955 .hw.init = &(struct clk_init_data){
1956 .name = "gcc_blsp2_uart1_apps_clk",
1957 .parent_hws = (const struct clk_hw *[]) {
1958 &blsp2_uart1_apps_clk_src.clkr.hw,
1961 .flags = CLK_SET_RATE_PARENT,
1962 .ops = &clk_branch2_ops,
1967 static struct clk_branch gcc_blsp2_uart2_apps_clk = {
1968 .halt_reg = 0x29004,
1969 .halt_check = BRANCH_HALT,
1971 .enable_reg = 0x29004,
1972 .enable_mask = BIT(0),
1973 .hw.init = &(struct clk_init_data){
1974 .name = "gcc_blsp2_uart2_apps_clk",
1975 .parent_hws = (const struct clk_hw *[]) {
1976 &blsp2_uart2_apps_clk_src.clkr.hw,
1979 .flags = CLK_SET_RATE_PARENT,
1980 .ops = &clk_branch2_ops,
1985 static struct clk_branch gcc_blsp2_uart3_apps_clk = {
1986 .halt_reg = 0x2b004,
1987 .halt_check = BRANCH_HALT,
1989 .enable_reg = 0x2b004,
1990 .enable_mask = BIT(0),
1991 .hw.init = &(struct clk_init_data){
1992 .name = "gcc_blsp2_uart3_apps_clk",
1993 .parent_hws = (const struct clk_hw *[]) {
1994 &blsp2_uart3_apps_clk_src.clkr.hw,
1997 .flags = CLK_SET_RATE_PARENT,
1998 .ops = &clk_branch2_ops,
2003 static struct clk_branch gcc_cfg_noc_usb3_axi_clk = {
2005 .halt_check = BRANCH_HALT,
2007 .enable_reg = 0x5018,
2008 .enable_mask = BIT(0),
2009 .hw.init = &(struct clk_init_data){
2010 .name = "gcc_cfg_noc_usb3_axi_clk",
2011 .parent_hws = (const struct clk_hw *[]) {
2012 &usb30_master_clk_src.clkr.hw,
2015 .flags = CLK_SET_RATE_PARENT,
2016 .ops = &clk_branch2_ops,
2021 static struct clk_branch gcc_gp1_clk = {
2022 .halt_reg = 0x64000,
2023 .halt_check = BRANCH_HALT,
2025 .enable_reg = 0x64000,
2026 .enable_mask = BIT(0),
2027 .hw.init = &(struct clk_init_data){
2028 .name = "gcc_gp1_clk",
2029 .parent_hws = (const struct clk_hw *[]) {
2030 &gp1_clk_src.clkr.hw,
2033 .flags = CLK_SET_RATE_PARENT,
2034 .ops = &clk_branch2_ops,
2039 static struct clk_branch gcc_gp2_clk = {
2040 .halt_reg = 0x65000,
2041 .halt_check = BRANCH_HALT,
2043 .enable_reg = 0x65000,
2044 .enable_mask = BIT(0),
2045 .hw.init = &(struct clk_init_data){
2046 .name = "gcc_gp2_clk",
2047 .parent_hws = (const struct clk_hw *[]) {
2048 &gp2_clk_src.clkr.hw,
2051 .flags = CLK_SET_RATE_PARENT,
2052 .ops = &clk_branch2_ops,
2057 static struct clk_branch gcc_gp3_clk = {
2058 .halt_reg = 0x66000,
2059 .halt_check = BRANCH_HALT,
2061 .enable_reg = 0x66000,
2062 .enable_mask = BIT(0),
2063 .hw.init = &(struct clk_init_data){
2064 .name = "gcc_gp3_clk",
2065 .parent_hws = (const struct clk_hw *[]) {
2066 &gp3_clk_src.clkr.hw,
2069 .flags = CLK_SET_RATE_PARENT,
2070 .ops = &clk_branch2_ops,
2075 static struct clk_branch gcc_bimc_gfx_clk = {
2076 .halt_reg = 0x46040,
2077 .halt_check = BRANCH_HALT,
2079 .enable_reg = 0x46040,
2080 .enable_mask = BIT(0),
2081 .hw.init = &(struct clk_init_data){
2082 .name = "gcc_bimc_gfx_clk",
2083 .ops = &clk_branch2_ops,
2088 static struct clk_branch gcc_gpu_bimc_gfx_clk = {
2089 .halt_reg = 0x71010,
2090 .halt_check = BRANCH_HALT,
2092 .enable_reg = 0x71010,
2093 .enable_mask = BIT(0),
2094 .hw.init = &(struct clk_init_data){
2095 .name = "gcc_gpu_bimc_gfx_clk",
2096 .ops = &clk_branch2_ops,
2101 static struct clk_branch gcc_gpu_bimc_gfx_src_clk = {
2102 .halt_reg = 0x7100c,
2103 .halt_check = BRANCH_HALT,
2105 .enable_reg = 0x7100c,
2106 .enable_mask = BIT(0),
2107 .hw.init = &(struct clk_init_data){
2108 .name = "gcc_gpu_bimc_gfx_src_clk",
2109 .ops = &clk_branch2_ops,
2114 static struct clk_branch gcc_gpu_cfg_ahb_clk = {
2115 .halt_reg = 0x71004,
2116 .halt_check = BRANCH_HALT,
2118 .enable_reg = 0x71004,
2119 .enable_mask = BIT(0),
2120 .hw.init = &(struct clk_init_data){
2121 .name = "gcc_gpu_cfg_ahb_clk",
2122 .ops = &clk_branch2_ops,
2124 * The GPU IOMMU depends on this clock and hypervisor
2125 * will crash the SoC if this clock goes down, due to
2126 * secure contexts protection.
2128 .flags = CLK_IS_CRITICAL,
2133 static struct clk_branch gcc_gpu_snoc_dvm_gfx_clk = {
2134 .halt_reg = 0x71018,
2135 .halt_check = BRANCH_HALT,
2137 .enable_reg = 0x71018,
2138 .enable_mask = BIT(0),
2139 .hw.init = &(struct clk_init_data){
2140 .name = "gcc_gpu_snoc_dvm_gfx_clk",
2141 .ops = &clk_branch2_ops,
2146 static struct clk_branch gcc_hmss_ahb_clk = {
2147 .halt_reg = 0x48000,
2148 .halt_check = BRANCH_HALT_VOTED,
2150 .enable_reg = 0x52004,
2151 .enable_mask = BIT(21),
2152 .hw.init = &(struct clk_init_data){
2153 .name = "gcc_hmss_ahb_clk",
2154 .parent_hws = (const struct clk_hw *[]) {
2155 &hmss_ahb_clk_src.clkr.hw,
2158 .flags = CLK_SET_RATE_PARENT,
2159 .ops = &clk_branch2_ops,
2164 static struct clk_branch gcc_hmss_at_clk = {
2165 .halt_reg = 0x48010,
2166 .halt_check = BRANCH_HALT,
2168 .enable_reg = 0x48010,
2169 .enable_mask = BIT(0),
2170 .hw.init = &(struct clk_init_data){
2171 .name = "gcc_hmss_at_clk",
2172 .ops = &clk_branch2_ops,
2177 static struct clk_branch gcc_hmss_rbcpr_clk = {
2178 .halt_reg = 0x48008,
2179 .halt_check = BRANCH_HALT,
2181 .enable_reg = 0x48008,
2182 .enable_mask = BIT(0),
2183 .hw.init = &(struct clk_init_data){
2184 .name = "gcc_hmss_rbcpr_clk",
2185 .parent_hws = (const struct clk_hw *[]) {
2186 &hmss_rbcpr_clk_src.clkr.hw,
2189 .flags = CLK_SET_RATE_PARENT,
2190 .ops = &clk_branch2_ops,
2195 static struct clk_branch gcc_hmss_trig_clk = {
2196 .halt_reg = 0x4800c,
2197 .halt_check = BRANCH_HALT,
2199 .enable_reg = 0x4800c,
2200 .enable_mask = BIT(0),
2201 .hw.init = &(struct clk_init_data){
2202 .name = "gcc_hmss_trig_clk",
2203 .ops = &clk_branch2_ops,
2208 static struct freq_tbl ftbl_hmss_gpll0_clk_src[] = {
2209 F( 300000000, P_GPLL0_OUT_MAIN, 2, 0, 0),
2210 F( 600000000, P_GPLL0_OUT_MAIN, 1, 0, 0),
2214 static struct clk_rcg2 hmss_gpll0_clk_src = {
2215 .cmd_rcgr = 0x4805c,
2217 .parent_map = gcc_parent_map_1,
2218 .freq_tbl = ftbl_hmss_gpll0_clk_src,
2219 .clkr.hw.init = &(struct clk_init_data) {
2220 .name = "hmss_gpll0_clk_src",
2221 .parent_data = gcc_parent_data_1,
2222 .num_parents = ARRAY_SIZE(gcc_parent_data_1),
2223 .ops = &clk_rcg2_ops,
2227 static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = {
2229 .halt_check = BRANCH_HALT,
2231 .enable_reg = 0x9004,
2232 .enable_mask = BIT(0),
2233 .hw.init = &(struct clk_init_data){
2234 .name = "gcc_mmss_noc_cfg_ahb_clk",
2235 .ops = &clk_branch2_ops,
2237 * Any access to mmss depends on this clock.
2238 * Gating this clock has been shown to crash the system
2239 * when mmssnoc_axi_rpm_clk is inited in rpmcc.
2241 .flags = CLK_IS_CRITICAL,
2246 static struct clk_branch gcc_mmss_qm_ahb_clk = {
2248 .halt_check = BRANCH_HALT,
2250 .enable_reg = 0x9030,
2251 .enable_mask = BIT(0),
2252 .hw.init = &(struct clk_init_data){
2253 .name = "gcc_mmss_qm_ahb_clk",
2254 .ops = &clk_branch2_ops,
2259 static struct clk_branch gcc_mmss_qm_core_clk = {
2261 .halt_check = BRANCH_HALT,
2263 .enable_reg = 0x900c,
2264 .enable_mask = BIT(0),
2265 .hw.init = &(struct clk_init_data){
2266 .name = "gcc_mmss_qm_core_clk",
2267 .ops = &clk_branch2_ops,
2272 static struct clk_branch gcc_mmss_sys_noc_axi_clk = {
2274 .halt_check = BRANCH_HALT,
2276 .enable_reg = 0x9000,
2277 .enable_mask = BIT(0),
2278 .hw.init = &(struct clk_init_data){
2279 .name = "gcc_mmss_sys_noc_axi_clk",
2280 .ops = &clk_branch2_ops,
2285 static struct clk_branch gcc_mss_at_clk = {
2286 .halt_reg = 0x8a00c,
2287 .halt_check = BRANCH_HALT,
2289 .enable_reg = 0x8a00c,
2290 .enable_mask = BIT(0),
2291 .hw.init = &(struct clk_init_data){
2292 .name = "gcc_mss_at_clk",
2293 .ops = &clk_branch2_ops,
2298 static struct clk_branch gcc_pcie_0_aux_clk = {
2299 .halt_reg = 0x6b014,
2300 .halt_check = BRANCH_HALT,
2302 .enable_reg = 0x6b014,
2303 .enable_mask = BIT(0),
2304 .hw.init = &(struct clk_init_data){
2305 .name = "gcc_pcie_0_aux_clk",
2306 .parent_hws = (const struct clk_hw *[]) {
2307 &pcie_aux_clk_src.clkr.hw,
2310 .flags = CLK_SET_RATE_PARENT,
2311 .ops = &clk_branch2_ops,
2316 static struct clk_branch gcc_pcie_0_cfg_ahb_clk = {
2317 .halt_reg = 0x6b010,
2318 .halt_check = BRANCH_HALT,
2320 .enable_reg = 0x6b010,
2321 .enable_mask = BIT(0),
2322 .hw.init = &(struct clk_init_data){
2323 .name = "gcc_pcie_0_cfg_ahb_clk",
2324 .ops = &clk_branch2_ops,
2329 static struct clk_branch gcc_pcie_0_mstr_axi_clk = {
2330 .halt_reg = 0x6b00c,
2331 .halt_check = BRANCH_HALT,
2333 .enable_reg = 0x6b00c,
2334 .enable_mask = BIT(0),
2335 .hw.init = &(struct clk_init_data){
2336 .name = "gcc_pcie_0_mstr_axi_clk",
2337 .ops = &clk_branch2_ops,
2342 static struct clk_branch gcc_pcie_0_pipe_clk = {
2343 .halt_reg = 0x6b018,
2344 .halt_check = BRANCH_HALT_SKIP,
2346 .enable_reg = 0x6b018,
2347 .enable_mask = BIT(0),
2348 .hw.init = &(struct clk_init_data){
2349 .name = "gcc_pcie_0_pipe_clk",
2350 .ops = &clk_branch2_ops,
2355 static struct clk_branch gcc_pcie_0_slv_axi_clk = {
2356 .halt_reg = 0x6b008,
2357 .halt_check = BRANCH_HALT,
2359 .enable_reg = 0x6b008,
2360 .enable_mask = BIT(0),
2361 .hw.init = &(struct clk_init_data){
2362 .name = "gcc_pcie_0_slv_axi_clk",
2363 .ops = &clk_branch2_ops,
2368 static struct clk_branch gcc_pcie_phy_aux_clk = {
2369 .halt_reg = 0x6f004,
2370 .halt_check = BRANCH_HALT,
2372 .enable_reg = 0x6f004,
2373 .enable_mask = BIT(0),
2374 .hw.init = &(struct clk_init_data){
2375 .name = "gcc_pcie_phy_aux_clk",
2376 .parent_hws = (const struct clk_hw *[]) {
2377 &pcie_aux_clk_src.clkr.hw,
2380 .flags = CLK_SET_RATE_PARENT,
2381 .ops = &clk_branch2_ops,
2386 static struct clk_branch gcc_pdm2_clk = {
2387 .halt_reg = 0x3300c,
2388 .halt_check = BRANCH_HALT,
2390 .enable_reg = 0x3300c,
2391 .enable_mask = BIT(0),
2392 .hw.init = &(struct clk_init_data){
2393 .name = "gcc_pdm2_clk",
2394 .parent_hws = (const struct clk_hw *[]) {
2395 &pdm2_clk_src.clkr.hw,
2398 .flags = CLK_SET_RATE_PARENT,
2399 .ops = &clk_branch2_ops,
2404 static struct clk_branch gcc_pdm_ahb_clk = {
2405 .halt_reg = 0x33004,
2406 .halt_check = BRANCH_HALT,
2408 .enable_reg = 0x33004,
2409 .enable_mask = BIT(0),
2410 .hw.init = &(struct clk_init_data){
2411 .name = "gcc_pdm_ahb_clk",
2412 .ops = &clk_branch2_ops,
2417 static struct clk_branch gcc_pdm_xo4_clk = {
2418 .halt_reg = 0x33008,
2419 .halt_check = BRANCH_HALT,
2421 .enable_reg = 0x33008,
2422 .enable_mask = BIT(0),
2423 .hw.init = &(struct clk_init_data){
2424 .name = "gcc_pdm_xo4_clk",
2425 .ops = &clk_branch2_ops,
2430 static struct clk_branch gcc_prng_ahb_clk = {
2431 .halt_reg = 0x34004,
2432 .halt_check = BRANCH_HALT_VOTED,
2434 .enable_reg = 0x52004,
2435 .enable_mask = BIT(13),
2436 .hw.init = &(struct clk_init_data){
2437 .name = "gcc_prng_ahb_clk",
2438 .ops = &clk_branch2_ops,
2443 static struct clk_branch gcc_sdcc2_ahb_clk = {
2444 .halt_reg = 0x14008,
2445 .halt_check = BRANCH_HALT,
2447 .enable_reg = 0x14008,
2448 .enable_mask = BIT(0),
2449 .hw.init = &(struct clk_init_data){
2450 .name = "gcc_sdcc2_ahb_clk",
2451 .ops = &clk_branch2_ops,
2456 static struct clk_branch gcc_sdcc2_apps_clk = {
2457 .halt_reg = 0x14004,
2458 .halt_check = BRANCH_HALT,
2460 .enable_reg = 0x14004,
2461 .enable_mask = BIT(0),
2462 .hw.init = &(struct clk_init_data){
2463 .name = "gcc_sdcc2_apps_clk",
2464 .parent_hws = (const struct clk_hw *[]) {
2465 &sdcc2_apps_clk_src.clkr.hw,
2468 .flags = CLK_SET_RATE_PARENT,
2469 .ops = &clk_branch2_ops,
2474 static struct clk_branch gcc_sdcc4_ahb_clk = {
2475 .halt_reg = 0x16008,
2476 .halt_check = BRANCH_HALT,
2478 .enable_reg = 0x16008,
2479 .enable_mask = BIT(0),
2480 .hw.init = &(struct clk_init_data){
2481 .name = "gcc_sdcc4_ahb_clk",
2482 .ops = &clk_branch2_ops,
2487 static struct clk_branch gcc_sdcc4_apps_clk = {
2488 .halt_reg = 0x16004,
2489 .halt_check = BRANCH_HALT,
2491 .enable_reg = 0x16004,
2492 .enable_mask = BIT(0),
2493 .hw.init = &(struct clk_init_data){
2494 .name = "gcc_sdcc4_apps_clk",
2495 .parent_hws = (const struct clk_hw *[]) {
2496 &sdcc4_apps_clk_src.clkr.hw,
2499 .flags = CLK_SET_RATE_PARENT,
2500 .ops = &clk_branch2_ops,
2505 static struct clk_branch gcc_tsif_ahb_clk = {
2506 .halt_reg = 0x36004,
2507 .halt_check = BRANCH_HALT,
2509 .enable_reg = 0x36004,
2510 .enable_mask = BIT(0),
2511 .hw.init = &(struct clk_init_data){
2512 .name = "gcc_tsif_ahb_clk",
2513 .ops = &clk_branch2_ops,
2518 static struct clk_branch gcc_tsif_inactivity_timers_clk = {
2519 .halt_reg = 0x3600c,
2520 .halt_check = BRANCH_HALT,
2522 .enable_reg = 0x3600c,
2523 .enable_mask = BIT(0),
2524 .hw.init = &(struct clk_init_data){
2525 .name = "gcc_tsif_inactivity_timers_clk",
2526 .ops = &clk_branch2_ops,
2531 static struct clk_branch gcc_tsif_ref_clk = {
2532 .halt_reg = 0x36008,
2533 .halt_check = BRANCH_HALT,
2535 .enable_reg = 0x36008,
2536 .enable_mask = BIT(0),
2537 .hw.init = &(struct clk_init_data){
2538 .name = "gcc_tsif_ref_clk",
2539 .parent_hws = (const struct clk_hw *[]) {
2540 &tsif_ref_clk_src.clkr.hw,
2543 .flags = CLK_SET_RATE_PARENT,
2544 .ops = &clk_branch2_ops,
2549 static struct clk_branch gcc_ufs_ahb_clk = {
2550 .halt_reg = 0x7500c,
2551 .halt_check = BRANCH_HALT,
2553 .enable_reg = 0x7500c,
2554 .enable_mask = BIT(0),
2555 .hw.init = &(struct clk_init_data){
2556 .name = "gcc_ufs_ahb_clk",
2557 .ops = &clk_branch2_ops,
2562 static struct clk_branch gcc_ufs_axi_clk = {
2563 .halt_reg = 0x75008,
2564 .halt_check = BRANCH_HALT,
2566 .enable_reg = 0x75008,
2567 .enable_mask = BIT(0),
2568 .hw.init = &(struct clk_init_data){
2569 .name = "gcc_ufs_axi_clk",
2570 .parent_hws = (const struct clk_hw *[]) {
2571 &ufs_axi_clk_src.clkr.hw,
2574 .flags = CLK_SET_RATE_PARENT,
2575 .ops = &clk_branch2_ops,
2580 static struct clk_branch gcc_ufs_ice_core_clk = {
2581 .halt_reg = 0x7600c,
2582 .halt_check = BRANCH_HALT,
2584 .enable_reg = 0x7600c,
2585 .enable_mask = BIT(0),
2586 .hw.init = &(struct clk_init_data){
2587 .name = "gcc_ufs_ice_core_clk",
2588 .ops = &clk_branch2_ops,
2593 static struct clk_branch gcc_ufs_phy_aux_clk = {
2594 .halt_reg = 0x76040,
2595 .halt_check = BRANCH_HALT,
2597 .enable_reg = 0x76040,
2598 .enable_mask = BIT(0),
2599 .hw.init = &(struct clk_init_data){
2600 .name = "gcc_ufs_phy_aux_clk",
2601 .ops = &clk_branch2_ops,
2606 static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
2607 .halt_reg = 0x75014,
2608 .halt_check = BRANCH_HALT_SKIP,
2610 .enable_reg = 0x75014,
2611 .enable_mask = BIT(0),
2612 .hw.init = &(struct clk_init_data){
2613 .name = "gcc_ufs_rx_symbol_0_clk",
2614 .ops = &clk_branch2_ops,
2619 static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
2620 .halt_reg = 0x7605c,
2621 .halt_check = BRANCH_HALT_SKIP,
2623 .enable_reg = 0x7605c,
2624 .enable_mask = BIT(0),
2625 .hw.init = &(struct clk_init_data){
2626 .name = "gcc_ufs_rx_symbol_1_clk",
2627 .ops = &clk_branch2_ops,
2632 static struct clk_branch gcc_ufs_tx_symbol_0_clk = {
2633 .halt_reg = 0x75010,
2634 .halt_check = BRANCH_HALT_SKIP,
2636 .enable_reg = 0x75010,
2637 .enable_mask = BIT(0),
2638 .hw.init = &(struct clk_init_data){
2639 .name = "gcc_ufs_tx_symbol_0_clk",
2640 .ops = &clk_branch2_ops,
2645 static struct clk_branch gcc_ufs_unipro_core_clk = {
2646 .halt_reg = 0x76008,
2647 .halt_check = BRANCH_HALT,
2649 .enable_reg = 0x76008,
2650 .enable_mask = BIT(0),
2651 .hw.init = &(struct clk_init_data){
2652 .name = "gcc_ufs_unipro_core_clk",
2653 .parent_hws = (const struct clk_hw *[]) {
2654 &ufs_unipro_core_clk_src.clkr.hw,
2657 .flags = CLK_SET_RATE_PARENT,
2658 .ops = &clk_branch2_ops,
2663 static struct clk_branch gcc_usb30_master_clk = {
2665 .halt_check = BRANCH_HALT,
2667 .enable_reg = 0xf008,
2668 .enable_mask = BIT(0),
2669 .hw.init = &(struct clk_init_data){
2670 .name = "gcc_usb30_master_clk",
2671 .parent_hws = (const struct clk_hw *[]) {
2672 &usb30_master_clk_src.clkr.hw,
2675 .flags = CLK_SET_RATE_PARENT,
2676 .ops = &clk_branch2_ops,
2681 static struct clk_branch gcc_usb30_mock_utmi_clk = {
2683 .halt_check = BRANCH_HALT,
2685 .enable_reg = 0xf010,
2686 .enable_mask = BIT(0),
2687 .hw.init = &(struct clk_init_data){
2688 .name = "gcc_usb30_mock_utmi_clk",
2689 .parent_hws = (const struct clk_hw *[]) {
2690 &usb30_mock_utmi_clk_src.clkr.hw,
2693 .flags = CLK_SET_RATE_PARENT,
2694 .ops = &clk_branch2_ops,
2699 static struct clk_branch gcc_usb30_sleep_clk = {
2701 .halt_check = BRANCH_HALT,
2703 .enable_reg = 0xf00c,
2704 .enable_mask = BIT(0),
2705 .hw.init = &(struct clk_init_data){
2706 .name = "gcc_usb30_sleep_clk",
2707 .ops = &clk_branch2_ops,
2712 static struct clk_branch gcc_usb3_phy_aux_clk = {
2713 .halt_reg = 0x50000,
2714 .halt_check = BRANCH_HALT,
2716 .enable_reg = 0x50000,
2717 .enable_mask = BIT(0),
2718 .hw.init = &(struct clk_init_data){
2719 .name = "gcc_usb3_phy_aux_clk",
2720 .parent_hws = (const struct clk_hw *[]) {
2721 &usb3_phy_aux_clk_src.clkr.hw,
2724 .flags = CLK_SET_RATE_PARENT,
2725 .ops = &clk_branch2_ops,
2730 static struct clk_branch gcc_usb3_phy_pipe_clk = {
2731 .halt_reg = 0x50004,
2732 .halt_check = BRANCH_HALT_SKIP,
2734 .enable_reg = 0x50004,
2735 .enable_mask = BIT(0),
2736 .hw.init = &(struct clk_init_data){
2737 .name = "gcc_usb3_phy_pipe_clk",
2738 .ops = &clk_branch2_ops,
2743 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = {
2744 .halt_reg = 0x6a004,
2745 .halt_check = BRANCH_HALT,
2747 .enable_reg = 0x6a004,
2748 .enable_mask = BIT(0),
2749 .hw.init = &(struct clk_init_data){
2750 .name = "gcc_usb_phy_cfg_ahb2phy_clk",
2751 .ops = &clk_branch2_ops,
2756 static struct clk_branch gcc_hdmi_clkref_clk = {
2757 .halt_reg = 0x88000,
2759 .enable_reg = 0x88000,
2760 .enable_mask = BIT(0),
2761 .hw.init = &(struct clk_init_data){
2762 .name = "gcc_hdmi_clkref_clk",
2763 .parent_data = (const struct clk_parent_data []) {
2764 { .fw_name = "xo" },
2767 .ops = &clk_branch2_ops,
2772 static struct clk_branch gcc_ufs_clkref_clk = {
2773 .halt_reg = 0x88004,
2775 .enable_reg = 0x88004,
2776 .enable_mask = BIT(0),
2777 .hw.init = &(struct clk_init_data){
2778 .name = "gcc_ufs_clkref_clk",
2779 .parent_data = (const struct clk_parent_data []) {
2780 { .fw_name = "xo" },
2783 .ops = &clk_branch2_ops,
2788 static struct clk_branch gcc_usb3_clkref_clk = {
2789 .halt_reg = 0x88008,
2791 .enable_reg = 0x88008,
2792 .enable_mask = BIT(0),
2793 .hw.init = &(struct clk_init_data){
2794 .name = "gcc_usb3_clkref_clk",
2795 .parent_data = (const struct clk_parent_data []) {
2796 { .fw_name = "xo" },
2799 .ops = &clk_branch2_ops,
2804 static struct clk_branch gcc_pcie_clkref_clk = {
2805 .halt_reg = 0x8800c,
2807 .enable_reg = 0x8800c,
2808 .enable_mask = BIT(0),
2809 .hw.init = &(struct clk_init_data){
2810 .name = "gcc_pcie_clkref_clk",
2811 .parent_data = (const struct clk_parent_data []) {
2812 { .fw_name = "xo" },
2815 .ops = &clk_branch2_ops,
2820 static struct clk_branch gcc_rx1_usb2_clkref_clk = {
2821 .halt_reg = 0x88014,
2823 .enable_reg = 0x88014,
2824 .enable_mask = BIT(0),
2825 .hw.init = &(struct clk_init_data){
2826 .name = "gcc_rx1_usb2_clkref_clk",
2827 .parent_data = (const struct clk_parent_data []) {
2828 { .fw_name = "xo" },
2831 .ops = &clk_branch2_ops,
2836 static struct gdsc pcie_0_gdsc = {
2840 .name = "pcie_0_gdsc",
2842 .pwrsts = PWRSTS_OFF_ON,
2846 static struct gdsc ufs_gdsc = {
2852 .pwrsts = PWRSTS_OFF_ON,
2856 static struct gdsc usb_30_gdsc = {
2860 .name = "usb_30_gdsc",
2862 .pwrsts = PWRSTS_OFF_ON,
2866 static struct clk_regmap *gcc_msm8998_clocks[] = {
2867 [BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
2868 [BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
2869 [BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
2870 [BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
2871 [BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
2872 [BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
2873 [BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
2874 [BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
2875 [BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
2876 [BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
2877 [BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
2878 [BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
2879 [BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
2880 [BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
2881 [BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
2882 [BLSP2_QUP1_I2C_APPS_CLK_SRC] = &blsp2_qup1_i2c_apps_clk_src.clkr,
2883 [BLSP2_QUP1_SPI_APPS_CLK_SRC] = &blsp2_qup1_spi_apps_clk_src.clkr,
2884 [BLSP2_QUP2_I2C_APPS_CLK_SRC] = &blsp2_qup2_i2c_apps_clk_src.clkr,
2885 [BLSP2_QUP2_SPI_APPS_CLK_SRC] = &blsp2_qup2_spi_apps_clk_src.clkr,
2886 [BLSP2_QUP3_I2C_APPS_CLK_SRC] = &blsp2_qup3_i2c_apps_clk_src.clkr,
2887 [BLSP2_QUP3_SPI_APPS_CLK_SRC] = &blsp2_qup3_spi_apps_clk_src.clkr,
2888 [BLSP2_QUP4_I2C_APPS_CLK_SRC] = &blsp2_qup4_i2c_apps_clk_src.clkr,
2889 [BLSP2_QUP4_SPI_APPS_CLK_SRC] = &blsp2_qup4_spi_apps_clk_src.clkr,
2890 [BLSP2_QUP5_I2C_APPS_CLK_SRC] = &blsp2_qup5_i2c_apps_clk_src.clkr,
2891 [BLSP2_QUP5_SPI_APPS_CLK_SRC] = &blsp2_qup5_spi_apps_clk_src.clkr,
2892 [BLSP2_QUP6_I2C_APPS_CLK_SRC] = &blsp2_qup6_i2c_apps_clk_src.clkr,
2893 [BLSP2_QUP6_SPI_APPS_CLK_SRC] = &blsp2_qup6_spi_apps_clk_src.clkr,
2894 [BLSP2_UART1_APPS_CLK_SRC] = &blsp2_uart1_apps_clk_src.clkr,
2895 [BLSP2_UART2_APPS_CLK_SRC] = &blsp2_uart2_apps_clk_src.clkr,
2896 [BLSP2_UART3_APPS_CLK_SRC] = &blsp2_uart3_apps_clk_src.clkr,
2897 [GCC_AGGRE1_NOC_XO_CLK] = &gcc_aggre1_noc_xo_clk.clkr,
2898 [GCC_AGGRE1_UFS_AXI_CLK] = &gcc_aggre1_ufs_axi_clk.clkr,
2899 [GCC_AGGRE1_USB3_AXI_CLK] = &gcc_aggre1_usb3_axi_clk.clkr,
2900 [GCC_APSS_QDSS_TSCTR_DIV2_CLK] = &gcc_apss_qdss_tsctr_div2_clk.clkr,
2901 [GCC_APSS_QDSS_TSCTR_DIV8_CLK] = &gcc_apss_qdss_tsctr_div8_clk.clkr,
2902 [GCC_BIMC_HMSS_AXI_CLK] = &gcc_bimc_hmss_axi_clk.clkr,
2903 [GCC_BIMC_MSS_Q6_AXI_CLK] = &gcc_bimc_mss_q6_axi_clk.clkr,
2904 [GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
2905 [GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
2906 [GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
2907 [GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
2908 [GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
2909 [GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
2910 [GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
2911 [GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
2912 [GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
2913 [GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
2914 [GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
2915 [GCC_BLSP1_QUP6_I2C_APPS_CLK] = &gcc_blsp1_qup6_i2c_apps_clk.clkr,
2916 [GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
2917 [GCC_BLSP1_SLEEP_CLK] = &gcc_blsp1_sleep_clk.clkr,
2918 [GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
2919 [GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
2920 [GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
2921 [GCC_BLSP2_AHB_CLK] = &gcc_blsp2_ahb_clk.clkr,
2922 [GCC_BLSP2_QUP1_I2C_APPS_CLK] = &gcc_blsp2_qup1_i2c_apps_clk.clkr,
2923 [GCC_BLSP2_QUP1_SPI_APPS_CLK] = &gcc_blsp2_qup1_spi_apps_clk.clkr,
2924 [GCC_BLSP2_QUP2_I2C_APPS_CLK] = &gcc_blsp2_qup2_i2c_apps_clk.clkr,
2925 [GCC_BLSP2_QUP2_SPI_APPS_CLK] = &gcc_blsp2_qup2_spi_apps_clk.clkr,
2926 [GCC_BLSP2_QUP3_I2C_APPS_CLK] = &gcc_blsp2_qup3_i2c_apps_clk.clkr,
2927 [GCC_BLSP2_QUP3_SPI_APPS_CLK] = &gcc_blsp2_qup3_spi_apps_clk.clkr,
2928 [GCC_BLSP2_QUP4_I2C_APPS_CLK] = &gcc_blsp2_qup4_i2c_apps_clk.clkr,
2929 [GCC_BLSP2_QUP4_SPI_APPS_CLK] = &gcc_blsp2_qup4_spi_apps_clk.clkr,
2930 [GCC_BLSP2_QUP5_I2C_APPS_CLK] = &gcc_blsp2_qup5_i2c_apps_clk.clkr,
2931 [GCC_BLSP2_QUP5_SPI_APPS_CLK] = &gcc_blsp2_qup5_spi_apps_clk.clkr,
2932 [GCC_BLSP2_QUP6_I2C_APPS_CLK] = &gcc_blsp2_qup6_i2c_apps_clk.clkr,
2933 [GCC_BLSP2_QUP6_SPI_APPS_CLK] = &gcc_blsp2_qup6_spi_apps_clk.clkr,
2934 [GCC_BLSP2_SLEEP_CLK] = &gcc_blsp2_sleep_clk.clkr,
2935 [GCC_BLSP2_UART1_APPS_CLK] = &gcc_blsp2_uart1_apps_clk.clkr,
2936 [GCC_BLSP2_UART2_APPS_CLK] = &gcc_blsp2_uart2_apps_clk.clkr,
2937 [GCC_BLSP2_UART3_APPS_CLK] = &gcc_blsp2_uart3_apps_clk.clkr,
2938 [GCC_CFG_NOC_USB3_AXI_CLK] = &gcc_cfg_noc_usb3_axi_clk.clkr,
2939 [GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
2940 [GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
2941 [GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
2942 [GCC_BIMC_GFX_CLK] = &gcc_bimc_gfx_clk.clkr,
2943 [GCC_GPU_BIMC_GFX_CLK] = &gcc_gpu_bimc_gfx_clk.clkr,
2944 [GCC_GPU_BIMC_GFX_SRC_CLK] = &gcc_gpu_bimc_gfx_src_clk.clkr,
2945 [GCC_GPU_CFG_AHB_CLK] = &gcc_gpu_cfg_ahb_clk.clkr,
2946 [GCC_GPU_SNOC_DVM_GFX_CLK] = &gcc_gpu_snoc_dvm_gfx_clk.clkr,
2947 [GCC_HMSS_AHB_CLK] = &gcc_hmss_ahb_clk.clkr,
2948 [GCC_HMSS_AT_CLK] = &gcc_hmss_at_clk.clkr,
2949 [GCC_HMSS_RBCPR_CLK] = &gcc_hmss_rbcpr_clk.clkr,
2950 [GCC_HMSS_TRIG_CLK] = &gcc_hmss_trig_clk.clkr,
2951 [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr,
2952 [GCC_MMSS_QM_AHB_CLK] = &gcc_mmss_qm_ahb_clk.clkr,
2953 [GCC_MMSS_QM_CORE_CLK] = &gcc_mmss_qm_core_clk.clkr,
2954 [GCC_MMSS_SYS_NOC_AXI_CLK] = &gcc_mmss_sys_noc_axi_clk.clkr,
2955 [GCC_MSS_AT_CLK] = &gcc_mss_at_clk.clkr,
2956 [GCC_PCIE_0_AUX_CLK] = &gcc_pcie_0_aux_clk.clkr,
2957 [GCC_PCIE_0_CFG_AHB_CLK] = &gcc_pcie_0_cfg_ahb_clk.clkr,
2958 [GCC_PCIE_0_MSTR_AXI_CLK] = &gcc_pcie_0_mstr_axi_clk.clkr,
2959 [GCC_PCIE_0_PIPE_CLK] = &gcc_pcie_0_pipe_clk.clkr,
2960 [GCC_PCIE_0_SLV_AXI_CLK] = &gcc_pcie_0_slv_axi_clk.clkr,
2961 [GCC_PCIE_PHY_AUX_CLK] = &gcc_pcie_phy_aux_clk.clkr,
2962 [GCC_PDM2_CLK] = &gcc_pdm2_clk.clkr,
2963 [GCC_PDM_AHB_CLK] = &gcc_pdm_ahb_clk.clkr,
2964 [GCC_PDM_XO4_CLK] = &gcc_pdm_xo4_clk.clkr,
2965 [GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
2966 [GCC_SDCC2_AHB_CLK] = &gcc_sdcc2_ahb_clk.clkr,
2967 [GCC_SDCC2_APPS_CLK] = &gcc_sdcc2_apps_clk.clkr,
2968 [GCC_SDCC4_AHB_CLK] = &gcc_sdcc4_ahb_clk.clkr,
2969 [GCC_SDCC4_APPS_CLK] = &gcc_sdcc4_apps_clk.clkr,
2970 [GCC_TSIF_AHB_CLK] = &gcc_tsif_ahb_clk.clkr,
2971 [GCC_TSIF_INACTIVITY_TIMERS_CLK] = &gcc_tsif_inactivity_timers_clk.clkr,
2972 [GCC_TSIF_REF_CLK] = &gcc_tsif_ref_clk.clkr,
2973 [GCC_UFS_AHB_CLK] = &gcc_ufs_ahb_clk.clkr,
2974 [GCC_UFS_AXI_CLK] = &gcc_ufs_axi_clk.clkr,
2975 [GCC_UFS_ICE_CORE_CLK] = &gcc_ufs_ice_core_clk.clkr,
2976 [GCC_UFS_PHY_AUX_CLK] = &gcc_ufs_phy_aux_clk.clkr,
2977 [GCC_UFS_RX_SYMBOL_0_CLK] = &gcc_ufs_rx_symbol_0_clk.clkr,
2978 [GCC_UFS_RX_SYMBOL_1_CLK] = &gcc_ufs_rx_symbol_1_clk.clkr,
2979 [GCC_UFS_TX_SYMBOL_0_CLK] = &gcc_ufs_tx_symbol_0_clk.clkr,
2980 [GCC_UFS_UNIPRO_CORE_CLK] = &gcc_ufs_unipro_core_clk.clkr,
2981 [GCC_USB30_MASTER_CLK] = &gcc_usb30_master_clk.clkr,
2982 [GCC_USB30_MOCK_UTMI_CLK] = &gcc_usb30_mock_utmi_clk.clkr,
2983 [GCC_USB30_SLEEP_CLK] = &gcc_usb30_sleep_clk.clkr,
2984 [GCC_USB3_PHY_AUX_CLK] = &gcc_usb3_phy_aux_clk.clkr,
2985 [GCC_USB3_PHY_PIPE_CLK] = &gcc_usb3_phy_pipe_clk.clkr,
2986 [GCC_USB_PHY_CFG_AHB2PHY_CLK] = &gcc_usb_phy_cfg_ahb2phy_clk.clkr,
2987 [GP1_CLK_SRC] = &gp1_clk_src.clkr,
2988 [GP2_CLK_SRC] = &gp2_clk_src.clkr,
2989 [GP3_CLK_SRC] = &gp3_clk_src.clkr,
2990 [GPLL0] = &gpll0.clkr,
2991 [GPLL0_OUT_EVEN] = &gpll0_out_even.clkr,
2992 [GPLL0_OUT_MAIN] = &gpll0_out_main.clkr,
2993 [GPLL0_OUT_ODD] = &gpll0_out_odd.clkr,
2994 [GPLL0_OUT_TEST] = &gpll0_out_test.clkr,
2995 [GPLL1] = &gpll1.clkr,
2996 [GPLL1_OUT_EVEN] = &gpll1_out_even.clkr,
2997 [GPLL1_OUT_MAIN] = &gpll1_out_main.clkr,
2998 [GPLL1_OUT_ODD] = &gpll1_out_odd.clkr,
2999 [GPLL1_OUT_TEST] = &gpll1_out_test.clkr,
3000 [GPLL2] = &gpll2.clkr,
3001 [GPLL2_OUT_EVEN] = &gpll2_out_even.clkr,
3002 [GPLL2_OUT_MAIN] = &gpll2_out_main.clkr,
3003 [GPLL2_OUT_ODD] = &gpll2_out_odd.clkr,
3004 [GPLL2_OUT_TEST] = &gpll2_out_test.clkr,
3005 [GPLL3] = &gpll3.clkr,
3006 [GPLL3_OUT_EVEN] = &gpll3_out_even.clkr,
3007 [GPLL3_OUT_MAIN] = &gpll3_out_main.clkr,
3008 [GPLL3_OUT_ODD] = &gpll3_out_odd.clkr,
3009 [GPLL3_OUT_TEST] = &gpll3_out_test.clkr,
3010 [GPLL4] = &gpll4.clkr,
3011 [GPLL4_OUT_EVEN] = &gpll4_out_even.clkr,
3012 [GPLL4_OUT_MAIN] = &gpll4_out_main.clkr,
3013 [GPLL4_OUT_ODD] = &gpll4_out_odd.clkr,
3014 [GPLL4_OUT_TEST] = &gpll4_out_test.clkr,
3015 [HMSS_AHB_CLK_SRC] = &hmss_ahb_clk_src.clkr,
3016 [HMSS_RBCPR_CLK_SRC] = &hmss_rbcpr_clk_src.clkr,
3017 [PCIE_AUX_CLK_SRC] = &pcie_aux_clk_src.clkr,
3018 [PDM2_CLK_SRC] = &pdm2_clk_src.clkr,
3019 [SDCC2_APPS_CLK_SRC] = &sdcc2_apps_clk_src.clkr,
3020 [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr,
3021 [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr,
3022 [UFS_AXI_CLK_SRC] = &ufs_axi_clk_src.clkr,
3023 [UFS_UNIPRO_CORE_CLK_SRC] = &ufs_unipro_core_clk_src.clkr,
3024 [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr,
3025 [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr,
3026 [USB3_PHY_AUX_CLK_SRC] = &usb3_phy_aux_clk_src.clkr,
3027 [GCC_HDMI_CLKREF_CLK] = &gcc_hdmi_clkref_clk.clkr,
3028 [GCC_UFS_CLKREF_CLK] = &gcc_ufs_clkref_clk.clkr,
3029 [GCC_USB3_CLKREF_CLK] = &gcc_usb3_clkref_clk.clkr,
3030 [GCC_PCIE_CLKREF_CLK] = &gcc_pcie_clkref_clk.clkr,
3031 [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr,
3032 [GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
3033 [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr,
3034 [GCC_MSS_GPLL0_DIV_CLK_SRC] = &gcc_mss_gpll0_div_clk_src.clkr,
3035 [GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr,
3036 [GCC_MSS_MNOC_BIMC_AXI_CLK] = &gcc_mss_mnoc_bimc_axi_clk.clkr,
3037 [GCC_MMSS_GPLL0_CLK] = &gcc_mmss_gpll0_clk.clkr,
3038 [HMSS_GPLL0_CLK_SRC] = &hmss_gpll0_clk_src.clkr,
3041 static struct gdsc *gcc_msm8998_gdscs[] = {
3042 [PCIE_0_GDSC] = &pcie_0_gdsc,
3043 [UFS_GDSC] = &ufs_gdsc,
3044 [USB_30_GDSC] = &usb_30_gdsc,
3047 static const struct qcom_reset_map gcc_msm8998_resets[] = {
3048 [GCC_BLSP1_QUP1_BCR] = { 0x19000 },
3049 [GCC_BLSP1_QUP2_BCR] = { 0x1b000 },
3050 [GCC_BLSP1_QUP3_BCR] = { 0x1d000 },
3051 [GCC_BLSP1_QUP4_BCR] = { 0x1f000 },
3052 [GCC_BLSP1_QUP5_BCR] = { 0x21000 },
3053 [GCC_BLSP1_QUP6_BCR] = { 0x23000 },
3054 [GCC_BLSP2_QUP1_BCR] = { 0x26000 },
3055 [GCC_BLSP2_QUP2_BCR] = { 0x28000 },
3056 [GCC_BLSP2_QUP3_BCR] = { 0x2a000 },
3057 [GCC_BLSP2_QUP4_BCR] = { 0x2c000 },
3058 [GCC_BLSP2_QUP5_BCR] = { 0x2e000 },
3059 [GCC_BLSP2_QUP6_BCR] = { 0x30000 },
3060 [GCC_PCIE_0_BCR] = { 0x6b000 },
3061 [GCC_PDM_BCR] = { 0x33000 },
3062 [GCC_SDCC2_BCR] = { 0x14000 },
3063 [GCC_SDCC4_BCR] = { 0x16000 },
3064 [GCC_TSIF_BCR] = { 0x36000 },
3065 [GCC_UFS_BCR] = { 0x75000 },
3066 [GCC_USB_30_BCR] = { 0xf000 },
3067 [GCC_SYSTEM_NOC_BCR] = { 0x4000 },
3068 [GCC_CONFIG_NOC_BCR] = { 0x5000 },
3069 [GCC_AHB2PHY_EAST_BCR] = { 0x7000 },
3070 [GCC_IMEM_BCR] = { 0x8000 },
3071 [GCC_PIMEM_BCR] = { 0xa000 },
3072 [GCC_MMSS_BCR] = { 0xb000 },
3073 [GCC_QDSS_BCR] = { 0xc000 },
3074 [GCC_WCSS_BCR] = { 0x11000 },
3075 [GCC_QUSB2PHY_PRIM_BCR] = { 0x12000 },
3076 [GCC_QUSB2PHY_SEC_BCR] = { 0x12004 },
3077 [GCC_BLSP1_BCR] = { 0x17000 },
3078 [GCC_BLSP1_UART1_BCR] = { 0x1a000 },
3079 [GCC_BLSP1_UART2_BCR] = { 0x1c000 },
3080 [GCC_BLSP1_UART3_BCR] = { 0x1e000 },
3081 [GCC_CM_PHY_REFGEN1_BCR] = { 0x22000 },
3082 [GCC_CM_PHY_REFGEN2_BCR] = { 0x24000 },
3083 [GCC_BLSP2_BCR] = { 0x25000 },
3084 [GCC_BLSP2_UART1_BCR] = { 0x27000 },
3085 [GCC_BLSP2_UART2_BCR] = { 0x29000 },
3086 [GCC_BLSP2_UART3_BCR] = { 0x2b000 },
3087 [GCC_SRAM_SENSOR_BCR] = { 0x2d000 },
3088 [GCC_PRNG_BCR] = { 0x34000 },
3089 [GCC_TSIF_0_RESET] = { 0x36024 },
3090 [GCC_TSIF_1_RESET] = { 0x36028 },
3091 [GCC_TCSR_BCR] = { 0x37000 },
3092 [GCC_BOOT_ROM_BCR] = { 0x38000 },
3093 [GCC_MSG_RAM_BCR] = { 0x39000 },
3094 [GCC_TLMM_BCR] = { 0x3a000 },
3095 [GCC_MPM_BCR] = { 0x3b000 },
3096 [GCC_SEC_CTRL_BCR] = { 0x3d000 },
3097 [GCC_SPMI_BCR] = { 0x3f000 },
3098 [GCC_SPDM_BCR] = { 0x40000 },
3099 [GCC_CE1_BCR] = { 0x41000 },
3100 [GCC_BIMC_BCR] = { 0x44000 },
3101 [GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x49000 },
3102 [GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x49008 },
3103 [GCC_SNOC_BUS_TIMEOUT3_BCR] = { 0x49010 },
3104 [GCC_SNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x49018 },
3105 [GCC_PNOC_BUS_TIMEOUT0_BCR] = { 0x4a000 },
3106 [GCC_CNOC_PERIPH_BUS_TIMEOUT1_BCR] = { 0x4a004 },
3107 [GCC_CNOC_PERIPH_BUS_TIMEOUT2_BCR] = { 0x4a00c },
3108 [GCC_CNOC_BUS_TIMEOUT0_BCR] = { 0x4b000 },
3109 [GCC_CNOC_BUS_TIMEOUT1_BCR] = { 0x4b008 },
3110 [GCC_CNOC_BUS_TIMEOUT2_BCR] = { 0x4b010 },
3111 [GCC_CNOC_BUS_TIMEOUT3_BCR] = { 0x4b018 },
3112 [GCC_CNOC_BUS_TIMEOUT4_BCR] = { 0x4b020 },
3113 [GCC_CNOC_BUS_TIMEOUT5_BCR] = { 0x4b028 },
3114 [GCC_CNOC_BUS_TIMEOUT6_BCR] = { 0x4b030 },
3115 [GCC_CNOC_BUS_TIMEOUT7_BCR] = { 0x4b038 },
3116 [GCC_APB2JTAG_BCR] = { 0x4c000 },
3117 [GCC_RBCPR_CX_BCR] = { 0x4e000 },
3118 [GCC_RBCPR_MX_BCR] = { 0x4f000 },
3119 [GCC_USB3_PHY_BCR] = { 0x50020 },
3120 [GCC_USB3PHY_PHY_BCR] = { 0x50024 },
3121 [GCC_USB3_DP_PHY_BCR] = { 0x50028 },
3122 [GCC_SSC_BCR] = { 0x63000 },
3123 [GCC_SSC_RESET] = { 0x63020 },
3124 [GCC_USB_PHY_CFG_AHB2PHY_BCR] = { 0x6a000 },
3125 [GCC_PCIE_0_LINK_DOWN_BCR] = { 0x6c014 },
3126 [GCC_PCIE_0_PHY_BCR] = { 0x6c01c },
3127 [GCC_PCIE_0_NOCSR_COM_PHY_BCR] = { 0x6c020 },
3128 [GCC_PCIE_PHY_BCR] = { 0x6f000 },
3129 [GCC_PCIE_PHY_NOCSR_COM_PHY_BCR] = { 0x6f00c },
3130 [GCC_PCIE_PHY_CFG_AHB_BCR] = { 0x6f010 },
3131 [GCC_PCIE_PHY_COM_BCR] = { 0x6f014 },
3132 [GCC_GPU_BCR] = { 0x71000 },
3133 [GCC_SPSS_BCR] = { 0x72000 },
3134 [GCC_OBT_ODT_BCR] = { 0x73000 },
3135 [GCC_MSS_RESTART] = { 0x79000 },
3136 [GCC_VS_BCR] = { 0x7a000 },
3137 [GCC_MSS_VS_RESET] = { 0x7a100 },
3138 [GCC_GPU_VS_RESET] = { 0x7a104 },
3139 [GCC_APC0_VS_RESET] = { 0x7a108 },
3140 [GCC_APC1_VS_RESET] = { 0x7a10c },
3141 [GCC_CNOC_BUS_TIMEOUT8_BCR] = { 0x80000 },
3142 [GCC_CNOC_BUS_TIMEOUT9_BCR] = { 0x80008 },
3143 [GCC_CNOC_BUS_TIMEOUT10_BCR] = { 0x80010 },
3144 [GCC_CNOC_BUS_TIMEOUT11_BCR] = { 0x80018 },
3145 [GCC_CNOC_BUS_TIMEOUT12_BCR] = { 0x80020 },
3146 [GCC_CNOC_BUS_TIMEOUT13_BCR] = { 0x80028 },
3147 [GCC_CNOC_BUS_TIMEOUT14_BCR] = { 0x80030 },
3148 [GCC_CNOC_BUS_TIMEOUT_EXTREF_BCR] = { 0x80038 },
3149 [GCC_AGGRE1_NOC_BCR] = { 0x82000 },
3150 [GCC_AGGRE2_NOC_BCR] = { 0x83000 },
3151 [GCC_DCC_BCR] = { 0x84000 },
3152 [GCC_QREFS_VBG_CAL_BCR] = { 0x88028 },
3153 [GCC_IPA_BCR] = { 0x89000 },
3154 [GCC_GLM_BCR] = { 0x8b000 },
3155 [GCC_SKL_BCR] = { 0x8c000 },
3156 [GCC_MSMPU_BCR] = { 0x8d000 },
3159 static const struct regmap_config gcc_msm8998_regmap_config = {
3163 .max_register = 0x8f000,
3167 static const struct qcom_cc_desc gcc_msm8998_desc = {
3168 .config = &gcc_msm8998_regmap_config,
3169 .clks = gcc_msm8998_clocks,
3170 .num_clks = ARRAY_SIZE(gcc_msm8998_clocks),
3171 .resets = gcc_msm8998_resets,
3172 .num_resets = ARRAY_SIZE(gcc_msm8998_resets),
3173 .gdscs = gcc_msm8998_gdscs,
3174 .num_gdscs = ARRAY_SIZE(gcc_msm8998_gdscs),
3177 static int gcc_msm8998_probe(struct platform_device *pdev)
3179 struct regmap *regmap;
3182 regmap = qcom_cc_map(pdev, &gcc_msm8998_desc);
3184 return PTR_ERR(regmap);
3187 * Set the HMSS_AHB_CLK_SLEEP_ENA bit to allow the hmss_ahb_clk to be
3188 * turned off by hardware during certain apps low power modes.
3190 ret = regmap_update_bits(regmap, 0x52008, BIT(21), BIT(21));
3194 return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
3197 static const struct of_device_id gcc_msm8998_match_table[] = {
3198 { .compatible = "qcom,gcc-msm8998" },
3201 MODULE_DEVICE_TABLE(of, gcc_msm8998_match_table);
3203 static struct platform_driver gcc_msm8998_driver = {
3204 .probe = gcc_msm8998_probe,
3206 .name = "gcc-msm8998",
3207 .of_match_table = gcc_msm8998_match_table,
3211 static int __init gcc_msm8998_init(void)
3213 return platform_driver_register(&gcc_msm8998_driver);
3215 core_initcall(gcc_msm8998_init);
3217 static void __exit gcc_msm8998_exit(void)
3219 platform_driver_unregister(&gcc_msm8998_driver);
3221 module_exit(gcc_msm8998_exit);
3223 MODULE_DESCRIPTION("QCOM GCC msm8998 Driver");
3224 MODULE_LICENSE("GPL v2");
3225 MODULE_ALIAS("platform:gcc-msm8998");