1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 * Copyright (c) 2023 The Linux Foundation. All rights reserved.
6 #include <linux/clk-provider.h>
7 #include <linux/interconnect-clk.h>
8 #include <linux/interconnect-provider.h>
9 #include <linux/kernel.h>
10 #include <linux/module.h>
12 #include <linux/platform_device.h>
13 #include <linux/regmap.h>
15 #include <dt-bindings/clock/qcom,ipq9574-gcc.h>
16 #include <dt-bindings/reset/qcom,ipq9574-gcc.h>
17 #include <dt-bindings/interconnect/qcom,ipq9574.h>
19 #include "clk-alpha-pll.h"
20 #include "clk-branch.h"
22 #include "clk-regmap.h"
23 #include "clk-regmap-divider.h"
24 #include "clk-regmap-mux.h"
25 #include "clk-regmap-phy-mux.h"
29 /* Need to match the order of clocks in DT binding */
33 DT_BIAS_PLL_UBI_NC_CLK
,
34 DT_PCIE30_PHY0_PIPE_CLK
,
35 DT_PCIE30_PHY1_PIPE_CLK
,
36 DT_PCIE30_PHY2_PIPE_CLK
,
37 DT_PCIE30_PHY3_PIPE_CLK
,
38 DT_USB3PHY_0_CC_PIPE_CLK
,
54 P_BIAS_PLL_UBI_NC_CLK
,
57 static const struct parent_map gcc_xo_map
[] = {
61 static const struct clk_parent_data gcc_xo_data
[] = {
65 static const struct clk_parent_data gcc_sleep_clk_data
[] = {
66 { .index
= DT_SLEEP_CLK
},
69 static struct clk_alpha_pll gpll0_main
= {
71 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
73 .enable_reg
= 0x0b000,
74 .enable_mask
= BIT(0),
75 .hw
.init
= &(const struct clk_init_data
) {
77 .parent_data
= gcc_xo_data
,
78 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
79 .ops
= &clk_alpha_pll_ops
,
84 static struct clk_fixed_factor gpll0_out_main_div2
= {
87 .hw
.init
= &(const struct clk_init_data
) {
88 .name
= "gpll0_out_main_div2",
89 .parent_hws
= (const struct clk_hw
*[]) {
93 .ops
= &clk_fixed_factor_ops
,
97 static struct clk_alpha_pll_postdiv gpll0
= {
99 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
101 .clkr
.hw
.init
= &(const struct clk_init_data
) {
103 .parent_hws
= (const struct clk_hw
*[]) {
107 .ops
= &clk_alpha_pll_postdiv_ro_ops
,
111 static struct clk_alpha_pll gpll4_main
= {
113 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
115 .enable_reg
= 0x0b000,
116 .enable_mask
= BIT(2),
117 .hw
.init
= &(const struct clk_init_data
) {
118 .name
= "gpll4_main",
119 .parent_data
= gcc_xo_data
,
120 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
121 .ops
= &clk_alpha_pll_ops
,
126 static struct clk_alpha_pll_postdiv gpll4
= {
128 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
130 .clkr
.hw
.init
= &(const struct clk_init_data
) {
132 .parent_hws
= (const struct clk_hw
*[]) {
136 .ops
= &clk_alpha_pll_postdiv_ro_ops
,
140 static struct clk_alpha_pll gpll2_main
= {
142 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
144 .enable_reg
= 0x0b000,
145 .enable_mask
= BIT(1),
146 .hw
.init
= &(const struct clk_init_data
) {
147 .name
= "gpll2_main",
148 .parent_data
= gcc_xo_data
,
149 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
150 .ops
= &clk_alpha_pll_ops
,
155 static struct clk_alpha_pll_postdiv gpll2
= {
157 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO
],
159 .clkr
.hw
.init
= &(const struct clk_init_data
) {
161 .parent_hws
= (const struct clk_hw
*[]) {
165 .ops
= &clk_alpha_pll_postdiv_ro_ops
,
169 static struct clk_branch gcc_sleep_clk_src
= {
172 .enable_reg
= 0x3400c,
173 .enable_mask
= BIT(1),
174 .hw
.init
= &(const struct clk_init_data
) {
175 .name
= "gcc_sleep_clk_src",
176 .parent_data
= gcc_sleep_clk_data
,
177 .num_parents
= ARRAY_SIZE(gcc_sleep_clk_data
),
178 .flags
= CLK_IS_CRITICAL
,
179 .ops
= &clk_branch2_ops
,
184 static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2
[] = {
186 { .hw
= &gpll0
.clkr
.hw
},
187 { .hw
= &gpll0_out_main_div2
.hw
},
190 static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map
[] = {
196 static const struct clk_parent_data gcc_xo_gpll0
[] = {
198 { .hw
= &gpll0
.clkr
.hw
},
201 static const struct parent_map gcc_xo_gpll0_map
[] = {
206 static const struct clk_parent_data gcc_xo_gpll0_gpll4
[] = {
208 { .hw
= &gpll0
.clkr
.hw
},
209 { .hw
= &gpll4
.clkr
.hw
},
212 static const struct parent_map gcc_xo_gpll0_gpll4_map
[] = {
218 static const struct clk_parent_data gcc_xo_gpll0_gpll0_div2_gpll0
[] = {
220 { .hw
= &gpll0
.clkr
.hw
},
221 { .hw
= &gpll0_out_main_div2
.hw
},
222 { .hw
= &gpll0
.clkr
.hw
},
225 static const struct parent_map gcc_xo_gpll0_gpll0_div2_gpll0_map
[] = {
232 static const struct clk_parent_data gcc_xo_gpll0_gpll0_sleep_clk
[] = {
234 { .hw
= &gpll0
.clkr
.hw
},
235 { .hw
= &gpll0_out_main_div2
.hw
},
236 { .index
= DT_SLEEP_CLK
},
239 static const struct parent_map gcc_xo_gpll0_gpll0_sleep_clk_map
[] = {
246 static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk
[] = {
248 { .hw
= &gpll0
.clkr
.hw
},
249 { .index
= DT_SLEEP_CLK
},
252 static const struct parent_map gcc_xo_gpll0_core_pi_sleep_clk_map
[] = {
258 static const struct clk_parent_data gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
[] = {
260 { .hw
= &gpll0
.clkr
.hw
},
261 { .hw
= &gpll4
.clkr
.hw
},
262 { .index
= DT_BIAS_PLL_UBI_NC_CLK
},
265 static const struct parent_map gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk_map
[] = {
269 { P_BIAS_PLL_UBI_NC_CLK
, 3 },
272 static const struct clk_parent_data
273 gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk
[] = {
275 { .hw
= &gpll0
.clkr
.hw
},
276 { .hw
= &gpll0
.clkr
.hw
},
277 { .index
= DT_SLEEP_CLK
},
280 static const struct parent_map
281 gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk_map
[] = {
284 { P_GPLL0_OUT_AUX
, 2 },
288 static const struct clk_parent_data gcc_xo_gpll0_out_main_div2_gpll0
[] = {
290 { .hw
= &gpll0
.clkr
.hw
},
291 { .hw
= &gpll0_out_main_div2
.hw
},
294 static const struct parent_map gcc_xo_gpll0_out_main_div2_gpll0_map
[] = {
300 static const struct clk_parent_data
301 gcc_xo_gpll4_gpll0_gpll0_out_main_div2
[] = {
303 { .hw
= &gpll4
.clkr
.hw
},
304 { .hw
= &gpll0
.clkr
.hw
},
305 { .hw
= &gpll0_out_main_div2
.hw
},
308 static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_out_main_div2_map
[] = {
315 static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo
[] = {
316 { .index
= DT_USB3PHY_0_CC_PIPE_CLK
},
320 static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map
[] = {
321 { P_USB3PHY_0_PIPE
, 0 },
325 static const struct clk_parent_data
326 gcc_xo_gpll0_gpll2_gpll0_out_main_div2
[] = {
328 { .hw
= &gpll0
.clkr
.hw
},
329 { .hw
= &gpll2
.clkr
.hw
},
330 { .hw
= &gpll0_out_main_div2
.hw
},
333 static const struct parent_map gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map
[] = {
340 static const struct clk_parent_data gcc_xo_gpll0_gpll4_gpll0_div2
[] = {
342 { .hw
= &gpll0
.clkr
.hw
},
343 { .hw
= &gpll4
.clkr
.hw
},
344 { .hw
= &gpll0_out_main_div2
.hw
},
347 static const struct parent_map gcc_xo_gpll0_gpll4_gpll0_div2_map
[] = {
354 static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll0_div2
[] = {
356 { .hw
= &gpll4
.clkr
.hw
},
357 { .hw
= &gpll0
.clkr
.hw
},
358 { .hw
= &gpll0_out_main_div2
.hw
},
361 static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_div2_map
[] = {
368 static const struct clk_parent_data gcc_xo_gpll0_gpll2
[] = {
370 { .hw
= &gpll0
.clkr
.hw
},
371 { .hw
= &gpll2
.clkr
.hw
},
374 static const struct parent_map gcc_xo_gpll0_gpll2_map
[] = {
380 static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_pi_sleep
[] = {
382 { .hw
= &gpll0
.clkr
.hw
},
383 { .hw
= &gpll2
.clkr
.hw
},
384 { .hw
= &gpll4
.clkr
.hw
},
385 { .index
= DT_SLEEP_CLK
},
388 static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_pi_sleep_map
[] = {
396 static const struct clk_parent_data gcc_xo_gpll0_gpll0_aux_gpll2
[] = {
398 { .hw
= &gpll0
.clkr
.hw
},
399 { .hw
= &gpll0
.clkr
.hw
},
400 { .hw
= &gpll2
.clkr
.hw
},
403 static const struct parent_map gcc_xo_gpll0_gpll0_aux_gpll2_map
[] = {
406 { P_GPLL0_OUT_AUX
, 2 },
410 static const struct freq_tbl ftbl_apss_ahb_clk_src
[] = {
411 F(24000000, P_XO
, 1, 0, 0),
412 F(50000000, P_GPLL0
, 16, 0, 0),
413 F(100000000, P_GPLL0
, 8, 0, 0),
417 static struct clk_rcg2 apss_ahb_clk_src
= {
419 .freq_tbl
= ftbl_apss_ahb_clk_src
,
421 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
422 .clkr
.hw
.init
= &(const struct clk_init_data
) {
423 .name
= "apss_ahb_clk_src",
424 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
425 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
426 .ops
= &clk_rcg2_ops
,
430 static const struct freq_tbl ftbl_apss_axi_clk_src
[] = {
431 F(533000000, P_GPLL0
, 1.5, 0, 0),
435 static struct clk_rcg2 apss_axi_clk_src
= {
437 .freq_tbl
= ftbl_apss_axi_clk_src
,
439 .parent_map
= gcc_xo_gpll0_gpll0_div2_gpll0_map
,
440 .clkr
.hw
.init
= &(const struct clk_init_data
) {
441 .name
= "apss_axi_clk_src",
442 .parent_data
= gcc_xo_gpll0_gpll0_div2_gpll0
,
443 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_div2_gpll0
),
444 .ops
= &clk_rcg2_ops
,
448 static const struct freq_tbl ftbl_blsp1_qup_i2c_apps_clk_src
[] = {
449 F(9600000, P_XO
, 2.5, 0, 0),
450 F(24000000, P_XO
, 1, 0, 0),
451 F(50000000, P_GPLL0
, 16, 0, 0),
455 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
457 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
459 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
460 .clkr
.hw
.init
= &(const struct clk_init_data
) {
461 .name
= "blsp1_qup1_i2c_apps_clk_src",
462 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
463 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
464 .ops
= &clk_rcg2_ops
,
468 static const struct freq_tbl ftbl_blsp1_qup_spi_apps_clk_src
[] = {
469 F(960000, P_XO
, 10, 2, 5),
470 F(4800000, P_XO
, 5, 0, 0),
471 F(9600000, P_XO
, 2, 4, 5),
472 F(16000000, P_GPLL0
, 10, 1, 5),
473 F(24000000, P_XO
, 1, 0, 0),
474 F(25000000, P_GPLL0
, 16, 1, 2),
475 F(50000000, P_GPLL0
, 16, 0, 0),
479 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
481 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
484 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
485 .clkr
.hw
.init
= &(const struct clk_init_data
) {
486 .name
= "blsp1_qup1_spi_apps_clk_src",
487 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
488 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
489 .ops
= &clk_rcg2_ops
,
493 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
495 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
497 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
498 .clkr
.hw
.init
= &(const struct clk_init_data
) {
499 .name
= "blsp1_qup2_i2c_apps_clk_src",
500 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
501 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
502 .ops
= &clk_rcg2_ops
,
506 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
508 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
511 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
512 .clkr
.hw
.init
= &(const struct clk_init_data
) {
513 .name
= "blsp1_qup2_spi_apps_clk_src",
514 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
515 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
516 .ops
= &clk_rcg2_ops
,
520 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
522 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
524 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
525 .clkr
.hw
.init
= &(const struct clk_init_data
) {
526 .name
= "blsp1_qup3_i2c_apps_clk_src",
527 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
528 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
529 .ops
= &clk_rcg2_ops
,
533 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
535 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
538 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
539 .clkr
.hw
.init
= &(const struct clk_init_data
) {
540 .name
= "blsp1_qup3_spi_apps_clk_src",
541 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
542 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
543 .ops
= &clk_rcg2_ops
,
547 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
549 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
551 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
552 .clkr
.hw
.init
= &(const struct clk_init_data
) {
553 .name
= "blsp1_qup4_i2c_apps_clk_src",
554 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
555 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
556 .ops
= &clk_rcg2_ops
,
560 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
562 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
565 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
566 .clkr
.hw
.init
= &(const struct clk_init_data
) {
567 .name
= "blsp1_qup4_spi_apps_clk_src",
568 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
569 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
570 .ops
= &clk_rcg2_ops
,
574 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
576 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
578 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
579 .clkr
.hw
.init
= &(const struct clk_init_data
) {
580 .name
= "blsp1_qup5_i2c_apps_clk_src",
581 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
582 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
583 .ops
= &clk_rcg2_ops
,
587 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
589 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
592 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
593 .clkr
.hw
.init
= &(const struct clk_init_data
) {
594 .name
= "blsp1_qup5_spi_apps_clk_src",
595 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
596 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
597 .ops
= &clk_rcg2_ops
,
601 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
603 .freq_tbl
= ftbl_blsp1_qup_i2c_apps_clk_src
,
605 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
606 .clkr
.hw
.init
= &(const struct clk_init_data
) {
607 .name
= "blsp1_qup6_i2c_apps_clk_src",
608 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
609 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
610 .ops
= &clk_rcg2_ops
,
614 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
616 .freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src
,
619 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
620 .clkr
.hw
.init
= &(const struct clk_init_data
) {
621 .name
= "blsp1_qup6_spi_apps_clk_src",
622 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
623 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
624 .ops
= &clk_rcg2_ops
,
628 static const struct freq_tbl ftbl_blsp1_uart_apps_clk_src
[] = {
629 F(3686400, P_GPLL0_DIV2
, 1, 144, 15625),
630 F(7372800, P_GPLL0_DIV2
, 1, 288, 15625),
631 F(14745600, P_GPLL0_DIV2
, 1, 576, 15625),
632 F(24000000, P_XO
, 1, 0, 0),
633 F(25000000, P_GPLL0
, 16, 1, 2),
634 F(32000000, P_GPLL0
, 1, 1, 25),
635 F(40000000, P_GPLL0
, 1, 1, 20),
636 F(46400000, P_GPLL0
, 1, 29, 500),
637 F(48000000, P_GPLL0
, 1, 3, 50),
638 F(51200000, P_GPLL0
, 1, 8, 125),
639 F(56000000, P_GPLL0
, 1, 7, 100),
640 F(58982400, P_GPLL0
, 1, 1152, 15625),
641 F(60000000, P_GPLL0
, 1, 3, 40),
642 F(64000000, P_GPLL0
, 12.5, 0, 0),
646 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
648 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
651 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
652 .clkr
.hw
.init
= &(const struct clk_init_data
) {
653 .name
= "blsp1_uart1_apps_clk_src",
654 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
655 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
656 .ops
= &clk_rcg2_ops
,
660 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
662 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
665 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
666 .clkr
.hw
.init
= &(const struct clk_init_data
) {
667 .name
= "blsp1_uart2_apps_clk_src",
668 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
669 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
670 .ops
= &clk_rcg2_ops
,
674 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
676 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
679 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
680 .clkr
.hw
.init
= &(const struct clk_init_data
) {
681 .name
= "blsp1_uart3_apps_clk_src",
682 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
683 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
684 .ops
= &clk_rcg2_ops
,
688 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
690 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
693 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
694 .clkr
.hw
.init
= &(const struct clk_init_data
) {
695 .name
= "blsp1_uart4_apps_clk_src",
696 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
697 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
698 .ops
= &clk_rcg2_ops
,
702 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
704 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
707 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
708 .clkr
.hw
.init
= &(const struct clk_init_data
) {
709 .name
= "blsp1_uart5_apps_clk_src",
710 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
711 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
712 .ops
= &clk_rcg2_ops
,
716 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
718 .freq_tbl
= ftbl_blsp1_uart_apps_clk_src
,
721 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
722 .clkr
.hw
.init
= &(const struct clk_init_data
) {
723 .name
= "blsp1_uart6_apps_clk_src",
724 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
725 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
726 .ops
= &clk_rcg2_ops
,
730 static const struct freq_tbl ftbl_gcc_crypto_clk_src
[] = {
731 F(160000000, P_GPLL0
, 5, 0, 0),
735 static struct clk_rcg2 gcc_crypto_clk_src
= {
737 .freq_tbl
= ftbl_gcc_crypto_clk_src
,
739 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
740 .clkr
.hw
.init
= &(const struct clk_init_data
) {
741 .name
= "gcc_crypto_clk_src",
742 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
743 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
744 .ops
= &clk_rcg2_ops
,
748 static struct clk_branch gcc_crypto_clk
= {
750 .halt_check
= BRANCH_HALT_VOTED
,
752 .enable_reg
= 0x0b004,
753 .enable_mask
= BIT(14),
754 .hw
.init
= &(const struct clk_init_data
) {
755 .name
= "gcc_crypto_clk",
756 .parent_hws
= (const struct clk_hw
*[]) {
757 &gcc_crypto_clk_src
.clkr
.hw
},
759 .flags
= CLK_SET_RATE_PARENT
,
760 .ops
= &clk_branch2_ops
,
765 static struct clk_branch gcc_apss_ahb_clk
= {
767 .halt_check
= BRANCH_HALT_VOTED
,
769 .enable_reg
= 0x0b004,
770 .enable_mask
= BIT(0),
771 .hw
.init
= &(const struct clk_init_data
) {
772 .name
= "gcc_apss_ahb_clk",
773 .parent_hws
= (const struct clk_hw
*[]) {
774 &apss_ahb_clk_src
.clkr
.hw
777 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
778 .ops
= &clk_branch2_ops
,
783 static struct clk_branch gcc_apss_axi_clk
= {
785 .halt_check
= BRANCH_HALT_VOTED
,
787 .enable_reg
= 0x0b004,
788 .enable_mask
= BIT(1),
789 .hw
.init
= &(const struct clk_init_data
) {
790 .name
= "gcc_apss_axi_clk",
791 .parent_hws
= (const struct clk_hw
*[]) {
792 &apss_axi_clk_src
.clkr
.hw
795 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
796 .ops
= &clk_branch2_ops
,
801 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
804 .enable_reg
= 0x2024,
805 .enable_mask
= BIT(0),
806 .hw
.init
= &(const struct clk_init_data
) {
807 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
808 .parent_hws
= (const struct clk_hw
*[]) {
809 &blsp1_qup1_i2c_apps_clk_src
.clkr
.hw
812 .flags
= CLK_SET_RATE_PARENT
,
813 .ops
= &clk_branch2_ops
,
818 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
821 .enable_reg
= 0x02020,
822 .enable_mask
= BIT(0),
823 .hw
.init
= &(const struct clk_init_data
) {
824 .name
= "gcc_blsp1_qup1_spi_apps_clk",
825 .parent_hws
= (const struct clk_hw
*[]) {
826 &blsp1_qup1_spi_apps_clk_src
.clkr
.hw
829 .flags
= CLK_SET_RATE_PARENT
,
830 .ops
= &clk_branch2_ops
,
835 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
838 .enable_reg
= 0x03024,
839 .enable_mask
= BIT(0),
840 .hw
.init
= &(const struct clk_init_data
) {
841 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
842 .parent_hws
= (const struct clk_hw
*[]) {
843 &blsp1_qup2_i2c_apps_clk_src
.clkr
.hw
846 .flags
= CLK_SET_RATE_PARENT
,
847 .ops
= &clk_branch2_ops
,
852 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
855 .enable_reg
= 0x03020,
856 .enable_mask
= BIT(0),
857 .hw
.init
= &(const struct clk_init_data
) {
858 .name
= "gcc_blsp1_qup2_spi_apps_clk",
859 .parent_hws
= (const struct clk_hw
*[]) {
860 &blsp1_qup2_spi_apps_clk_src
.clkr
.hw
863 .flags
= CLK_SET_RATE_PARENT
,
864 .ops
= &clk_branch2_ops
,
869 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
872 .enable_reg
= 0x04024,
873 .enable_mask
= BIT(0),
874 .hw
.init
= &(const struct clk_init_data
) {
875 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
876 .parent_hws
= (const struct clk_hw
*[]) {
877 &blsp1_qup3_i2c_apps_clk_src
.clkr
.hw
880 .flags
= CLK_SET_RATE_PARENT
,
881 .ops
= &clk_branch2_ops
,
886 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
889 .enable_reg
= 0x04020,
890 .enable_mask
= BIT(0),
891 .hw
.init
= &(const struct clk_init_data
) {
892 .name
= "gcc_blsp1_qup3_spi_apps_clk",
893 .parent_hws
= (const struct clk_hw
*[]) {
894 &blsp1_qup3_spi_apps_clk_src
.clkr
.hw
897 .flags
= CLK_SET_RATE_PARENT
,
898 .ops
= &clk_branch2_ops
,
903 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
906 .enable_reg
= 0x05024,
907 .enable_mask
= BIT(0),
908 .hw
.init
= &(const struct clk_init_data
) {
909 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
910 .parent_hws
= (const struct clk_hw
*[]) {
911 &blsp1_qup4_i2c_apps_clk_src
.clkr
.hw
914 .flags
= CLK_SET_RATE_PARENT
,
915 .ops
= &clk_branch2_ops
,
920 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
923 .enable_reg
= 0x05020,
924 .enable_mask
= BIT(0),
925 .hw
.init
= &(const struct clk_init_data
) {
926 .name
= "gcc_blsp1_qup4_spi_apps_clk",
927 .parent_hws
= (const struct clk_hw
*[]) {
928 &blsp1_qup4_spi_apps_clk_src
.clkr
.hw
931 .flags
= CLK_SET_RATE_PARENT
,
932 .ops
= &clk_branch2_ops
,
937 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
940 .enable_reg
= 0x06024,
941 .enable_mask
= BIT(0),
942 .hw
.init
= &(const struct clk_init_data
) {
943 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
944 .parent_hws
= (const struct clk_hw
*[]) {
945 &blsp1_qup5_i2c_apps_clk_src
.clkr
.hw
948 .flags
= CLK_SET_RATE_PARENT
,
949 .ops
= &clk_branch2_ops
,
954 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
957 .enable_reg
= 0x06020,
958 .enable_mask
= BIT(0),
959 .hw
.init
= &(const struct clk_init_data
) {
960 .name
= "gcc_blsp1_qup5_spi_apps_clk",
961 .parent_hws
= (const struct clk_hw
*[]) {
962 &blsp1_qup5_spi_apps_clk_src
.clkr
.hw
965 .flags
= CLK_SET_RATE_PARENT
,
966 .ops
= &clk_branch2_ops
,
971 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
974 .enable_reg
= 0x07024,
975 .enable_mask
= BIT(0),
976 .hw
.init
= &(const struct clk_init_data
) {
977 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
978 .parent_hws
= (const struct clk_hw
*[]) {
979 &blsp1_qup6_i2c_apps_clk_src
.clkr
.hw
982 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
983 .ops
= &clk_branch2_ops
,
988 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
991 .enable_reg
= 0x07020,
992 .enable_mask
= BIT(0),
993 .hw
.init
= &(const struct clk_init_data
) {
994 .name
= "gcc_blsp1_qup6_spi_apps_clk",
995 .parent_hws
= (const struct clk_hw
*[]) {
996 &blsp1_qup6_spi_apps_clk_src
.clkr
.hw
999 .flags
= CLK_SET_RATE_PARENT
,
1000 .ops
= &clk_branch2_ops
,
1005 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1006 .halt_reg
= 0x02040,
1008 .enable_reg
= 0x02040,
1009 .enable_mask
= BIT(0),
1010 .hw
.init
= &(const struct clk_init_data
) {
1011 .name
= "gcc_blsp1_uart1_apps_clk",
1012 .parent_hws
= (const struct clk_hw
*[]) {
1013 &blsp1_uart1_apps_clk_src
.clkr
.hw
1016 .flags
= CLK_SET_RATE_PARENT
,
1017 .ops
= &clk_branch2_ops
,
1022 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1023 .halt_reg
= 0x03040,
1025 .enable_reg
= 0x03040,
1026 .enable_mask
= BIT(0),
1027 .hw
.init
= &(const struct clk_init_data
) {
1028 .name
= "gcc_blsp1_uart2_apps_clk",
1029 .parent_hws
= (const struct clk_hw
*[]) {
1030 &blsp1_uart2_apps_clk_src
.clkr
.hw
1033 .flags
= CLK_SET_RATE_PARENT
,
1034 .ops
= &clk_branch2_ops
,
1039 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1040 .halt_reg
= 0x04054,
1042 .enable_reg
= 0x04054,
1043 .enable_mask
= BIT(0),
1044 .hw
.init
= &(const struct clk_init_data
) {
1045 .name
= "gcc_blsp1_uart3_apps_clk",
1046 .parent_hws
= (const struct clk_hw
*[]) {
1047 &blsp1_uart3_apps_clk_src
.clkr
.hw
1050 .flags
= CLK_SET_RATE_PARENT
,
1051 .ops
= &clk_branch2_ops
,
1056 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1057 .halt_reg
= 0x05040,
1059 .enable_reg
= 0x05040,
1060 .enable_mask
= BIT(0),
1061 .hw
.init
= &(const struct clk_init_data
) {
1062 .name
= "gcc_blsp1_uart4_apps_clk",
1063 .parent_hws
= (const struct clk_hw
*[]) {
1064 &blsp1_uart4_apps_clk_src
.clkr
.hw
1067 .flags
= CLK_SET_RATE_PARENT
,
1068 .ops
= &clk_branch2_ops
,
1073 static struct clk_branch gcc_blsp1_uart5_apps_clk
= {
1074 .halt_reg
= 0x06040,
1076 .enable_reg
= 0x06040,
1077 .enable_mask
= BIT(0),
1078 .hw
.init
= &(const struct clk_init_data
) {
1079 .name
= "gcc_blsp1_uart5_apps_clk",
1080 .parent_hws
= (const struct clk_hw
*[]) {
1081 &blsp1_uart5_apps_clk_src
.clkr
.hw
1084 .flags
= CLK_SET_RATE_PARENT
,
1085 .ops
= &clk_branch2_ops
,
1090 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1091 .halt_reg
= 0x07040,
1093 .enable_reg
= 0x07040,
1094 .enable_mask
= BIT(0),
1095 .hw
.init
= &(const struct clk_init_data
) {
1096 .name
= "gcc_blsp1_uart6_apps_clk",
1097 .parent_hws
= (const struct clk_hw
*[]) {
1098 &blsp1_uart6_apps_clk_src
.clkr
.hw
1101 .flags
= CLK_SET_RATE_PARENT
,
1102 .ops
= &clk_branch2_ops
,
1107 static const struct freq_tbl ftbl_pcie0_axi_m_clk_src
[] = {
1108 F(240000000, P_GPLL4
, 5, 0, 0),
1112 static struct clk_rcg2 pcie0_axi_m_clk_src
= {
1113 .cmd_rcgr
= 0x28018,
1114 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1116 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1117 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1118 .name
= "pcie0_axi_m_clk_src",
1119 .parent_data
= gcc_xo_gpll0_gpll4
,
1120 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1121 .ops
= &clk_rcg2_ops
,
1125 static struct clk_branch gcc_pcie0_axi_m_clk
= {
1126 .halt_reg
= 0x28038,
1128 .enable_reg
= 0x28038,
1129 .enable_mask
= BIT(0),
1130 .hw
.init
= &(const struct clk_init_data
) {
1131 .name
= "gcc_pcie0_axi_m_clk",
1132 .parent_hws
= (const struct clk_hw
*[]) {
1133 &pcie0_axi_m_clk_src
.clkr
.hw
1136 .flags
= CLK_SET_RATE_PARENT
,
1137 .ops
= &clk_branch2_ops
,
1142 static struct clk_branch gcc_anoc_pcie0_1lane_m_clk
= {
1143 .halt_reg
= 0x2e07c,
1145 .enable_reg
= 0x2e07c,
1146 .enable_mask
= BIT(0),
1147 .hw
.init
= &(const struct clk_init_data
) {
1148 .name
= "gcc_anoc_pcie0_1lane_m_clk",
1149 .parent_hws
= (const struct clk_hw
*[]) {
1150 &pcie0_axi_m_clk_src
.clkr
.hw
1153 .flags
= CLK_SET_RATE_PARENT
,
1154 .ops
= &clk_branch2_ops
,
1159 static struct clk_rcg2 pcie1_axi_m_clk_src
= {
1160 .cmd_rcgr
= 0x29018,
1161 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1163 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1164 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1165 .name
= "pcie1_axi_m_clk_src",
1166 .parent_data
= gcc_xo_gpll0_gpll4
,
1167 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1168 .ops
= &clk_rcg2_ops
,
1172 static struct clk_branch gcc_pcie1_axi_m_clk
= {
1173 .halt_reg
= 0x29038,
1175 .enable_reg
= 0x29038,
1176 .enable_mask
= BIT(0),
1177 .hw
.init
= &(const struct clk_init_data
) {
1178 .name
= "gcc_pcie1_axi_m_clk",
1179 .parent_hws
= (const struct clk_hw
*[]) {
1180 &pcie1_axi_m_clk_src
.clkr
.hw
1183 .flags
= CLK_SET_RATE_PARENT
,
1184 .ops
= &clk_branch2_ops
,
1189 static struct clk_branch gcc_anoc_pcie1_1lane_m_clk
= {
1190 .halt_reg
= 0x2e08c,
1192 .enable_reg
= 0x2e08c,
1193 .enable_mask
= BIT(0),
1194 .hw
.init
= &(const struct clk_init_data
) {
1195 .name
= "gcc_anoc_pcie1_1lane_m_clk",
1196 .parent_hws
= (const struct clk_hw
*[]) {
1197 &pcie1_axi_m_clk_src
.clkr
.hw
1200 .flags
= CLK_SET_RATE_PARENT
,
1201 .ops
= &clk_branch2_ops
,
1206 static const struct freq_tbl ftbl_pcie2_axi_m_clk_src
[] = {
1207 F(342857143, P_GPLL4
, 3.5, 0, 0),
1211 static struct clk_rcg2 pcie2_axi_m_clk_src
= {
1212 .cmd_rcgr
= 0x2a018,
1213 .freq_tbl
= ftbl_pcie2_axi_m_clk_src
,
1215 .parent_map
= gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk_map
,
1216 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1217 .name
= "pcie2_axi_m_clk_src",
1218 .parent_data
= gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
,
1219 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
),
1220 .ops
= &clk_rcg2_ops
,
1224 static struct clk_branch gcc_pcie2_axi_m_clk
= {
1225 .halt_reg
= 0x2a038,
1227 .enable_reg
= 0x2a038,
1228 .enable_mask
= BIT(0),
1229 .hw
.init
= &(const struct clk_init_data
) {
1230 .name
= "gcc_pcie2_axi_m_clk",
1231 .parent_hws
= (const struct clk_hw
*[]) {
1232 &pcie2_axi_m_clk_src
.clkr
.hw
1235 .flags
= CLK_SET_RATE_PARENT
,
1236 .ops
= &clk_branch2_ops
,
1241 static struct clk_branch gcc_anoc_pcie2_2lane_m_clk
= {
1242 .halt_reg
= 0x2e080,
1244 .enable_reg
= 0x2e080,
1245 .enable_mask
= BIT(0),
1246 .hw
.init
= &(const struct clk_init_data
) {
1247 .name
= "gcc_anoc_pcie2_2lane_m_clk",
1248 .parent_hws
= (const struct clk_hw
*[]) {
1249 &pcie2_axi_m_clk_src
.clkr
.hw
1252 .flags
= CLK_SET_RATE_PARENT
,
1253 .ops
= &clk_branch2_ops
,
1258 static struct clk_rcg2 pcie3_axi_m_clk_src
= {
1259 .cmd_rcgr
= 0x2b018,
1260 .freq_tbl
= ftbl_pcie2_axi_m_clk_src
,
1262 .parent_map
= gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk_map
,
1263 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1264 .name
= "pcie3_axi_m_clk_src",
1265 .parent_data
= gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
,
1266 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
),
1267 .ops
= &clk_rcg2_ops
,
1271 static struct clk_branch gcc_pcie3_axi_m_clk
= {
1272 .halt_reg
= 0x2b038,
1274 .enable_reg
= 0x2b038,
1275 .enable_mask
= BIT(0),
1276 .hw
.init
= &(const struct clk_init_data
) {
1277 .name
= "gcc_pcie3_axi_m_clk",
1278 .parent_hws
= (const struct clk_hw
*[]) {
1279 &pcie3_axi_m_clk_src
.clkr
.hw
1282 .flags
= CLK_SET_RATE_PARENT
,
1283 .ops
= &clk_branch2_ops
,
1288 static struct clk_branch gcc_anoc_pcie3_2lane_m_clk
= {
1289 .halt_reg
= 0x2e090,
1291 .enable_reg
= 0x2e090,
1292 .enable_mask
= BIT(0),
1293 .hw
.init
= &(const struct clk_init_data
) {
1294 .name
= "gcc_anoc_pcie3_2lane_m_clk",
1295 .parent_hws
= (const struct clk_hw
*[]) {
1296 &pcie3_axi_m_clk_src
.clkr
.hw
1299 .flags
= CLK_SET_RATE_PARENT
,
1300 .ops
= &clk_branch2_ops
,
1305 static struct clk_rcg2 pcie0_axi_s_clk_src
= {
1306 .cmd_rcgr
= 0x28020,
1307 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1309 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1310 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1311 .name
= "pcie0_axi_s_clk_src",
1312 .parent_data
= gcc_xo_gpll0_gpll4
,
1313 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1314 .ops
= &clk_rcg2_ops
,
1318 static struct clk_branch gcc_pcie0_axi_s_clk
= {
1319 .halt_reg
= 0x2803c,
1321 .enable_reg
= 0x2803c,
1322 .enable_mask
= BIT(0),
1323 .hw
.init
= &(const struct clk_init_data
) {
1324 .name
= "gcc_pcie0_axi_s_clk",
1325 .parent_hws
= (const struct clk_hw
*[]) {
1326 &pcie0_axi_s_clk_src
.clkr
.hw
1329 .flags
= CLK_SET_RATE_PARENT
,
1330 .ops
= &clk_branch2_ops
,
1335 static struct clk_branch gcc_pcie0_axi_s_bridge_clk
= {
1336 .halt_reg
= 0x28040,
1338 .enable_reg
= 0x28040,
1339 .enable_mask
= BIT(0),
1340 .hw
.init
= &(const struct clk_init_data
) {
1341 .name
= "gcc_pcie0_axi_s_bridge_clk",
1342 .parent_hws
= (const struct clk_hw
*[]) {
1343 &pcie0_axi_s_clk_src
.clkr
.hw
1346 .flags
= CLK_SET_RATE_PARENT
,
1347 .ops
= &clk_branch2_ops
,
1352 static struct clk_branch gcc_snoc_pcie0_1lane_s_clk
= {
1353 .halt_reg
= 0x2e048,
1355 .enable_reg
= 0x2e048,
1356 .enable_mask
= BIT(0),
1357 .hw
.init
= &(const struct clk_init_data
) {
1358 .name
= "gcc_snoc_pcie0_1lane_s_clk",
1359 .parent_hws
= (const struct clk_hw
*[]) {
1360 &pcie0_axi_s_clk_src
.clkr
.hw
1363 .flags
= CLK_SET_RATE_PARENT
,
1364 .ops
= &clk_branch2_ops
,
1369 static struct clk_rcg2 pcie1_axi_s_clk_src
= {
1370 .cmd_rcgr
= 0x29020,
1371 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1373 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1374 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1375 .name
= "pcie1_axi_s_clk_src",
1376 .parent_data
= gcc_xo_gpll0_gpll4
,
1377 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1378 .ops
= &clk_rcg2_ops
,
1382 static struct clk_branch gcc_pcie1_axi_s_clk
= {
1383 .halt_reg
= 0x2903c,
1385 .enable_reg
= 0x2903c,
1386 .enable_mask
= BIT(0),
1387 .hw
.init
= &(const struct clk_init_data
) {
1388 .name
= "gcc_pcie1_axi_s_clk",
1389 .parent_hws
= (const struct clk_hw
*[]) {
1390 &pcie1_axi_s_clk_src
.clkr
.hw
1393 .flags
= CLK_SET_RATE_PARENT
,
1394 .ops
= &clk_branch2_ops
,
1399 static struct clk_branch gcc_pcie1_axi_s_bridge_clk
= {
1400 .halt_reg
= 0x29040,
1402 .enable_reg
= 0x29040,
1403 .enable_mask
= BIT(0),
1404 .hw
.init
= &(const struct clk_init_data
) {
1405 .name
= "gcc_pcie1_axi_s_bridge_clk",
1406 .parent_hws
= (const struct clk_hw
*[]) {
1407 &pcie1_axi_s_clk_src
.clkr
.hw
1410 .flags
= CLK_SET_RATE_PARENT
,
1411 .ops
= &clk_branch2_ops
,
1416 static struct clk_branch gcc_snoc_pcie1_1lane_s_clk
= {
1417 .halt_reg
= 0x2e04c,
1419 .enable_reg
= 0x2e04c,
1420 .enable_mask
= BIT(0),
1421 .hw
.init
= &(const struct clk_init_data
) {
1422 .name
= "gcc_snoc_pcie1_1lane_s_clk",
1423 .parent_hws
= (const struct clk_hw
*[]) {
1424 &pcie1_axi_s_clk_src
.clkr
.hw
1427 .flags
= CLK_SET_RATE_PARENT
,
1428 .ops
= &clk_branch2_ops
,
1433 static struct clk_rcg2 pcie2_axi_s_clk_src
= {
1434 .cmd_rcgr
= 0x2a020,
1435 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1437 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1438 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1439 .name
= "pcie2_axi_s_clk_src",
1440 .parent_data
= gcc_xo_gpll0_gpll4
,
1441 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1442 .ops
= &clk_rcg2_ops
,
1446 static struct clk_branch gcc_pcie2_axi_s_clk
= {
1447 .halt_reg
= 0x2a03c,
1449 .enable_reg
= 0x2a03c,
1450 .enable_mask
= BIT(0),
1451 .hw
.init
= &(const struct clk_init_data
) {
1452 .name
= "gcc_pcie2_axi_s_clk",
1453 .parent_hws
= (const struct clk_hw
*[]) {
1454 &pcie2_axi_s_clk_src
.clkr
.hw
1457 .flags
= CLK_SET_RATE_PARENT
,
1458 .ops
= &clk_branch2_ops
,
1463 static struct clk_branch gcc_pcie2_axi_s_bridge_clk
= {
1464 .halt_reg
= 0x2a040,
1466 .enable_reg
= 0x2a040,
1467 .enable_mask
= BIT(0),
1468 .hw
.init
= &(const struct clk_init_data
) {
1469 .name
= "gcc_pcie2_axi_s_bridge_clk",
1470 .parent_hws
= (const struct clk_hw
*[]) {
1471 &pcie2_axi_s_clk_src
.clkr
.hw
1474 .flags
= CLK_SET_RATE_PARENT
,
1475 .ops
= &clk_branch2_ops
,
1480 static struct clk_branch gcc_snoc_pcie2_2lane_s_clk
= {
1481 .halt_reg
= 0x2e050,
1483 .enable_reg
= 0x2e050,
1484 .enable_mask
= BIT(0),
1485 .hw
.init
= &(const struct clk_init_data
) {
1486 .name
= "gcc_snoc_pcie2_2lane_s_clk",
1487 .parent_hws
= (const struct clk_hw
*[]) {
1488 &pcie2_axi_s_clk_src
.clkr
.hw
1491 .flags
= CLK_SET_RATE_PARENT
,
1492 .ops
= &clk_branch2_ops
,
1497 static struct clk_rcg2 pcie3_axi_s_clk_src
= {
1498 .cmd_rcgr
= 0x2b020,
1499 .freq_tbl
= ftbl_pcie0_axi_m_clk_src
,
1501 .parent_map
= gcc_xo_gpll0_gpll4_map
,
1502 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1503 .name
= "pcie3_axi_s_clk_src",
1504 .parent_data
= gcc_xo_gpll0_gpll4
,
1505 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
1506 .ops
= &clk_rcg2_ops
,
1510 static struct clk_branch gcc_pcie3_axi_s_clk
= {
1511 .halt_reg
= 0x2b03c,
1513 .enable_reg
= 0x2b03c,
1514 .enable_mask
= BIT(0),
1515 .hw
.init
= &(const struct clk_init_data
) {
1516 .name
= "gcc_pcie3_axi_s_clk",
1517 .parent_hws
= (const struct clk_hw
*[]) {
1518 &pcie3_axi_s_clk_src
.clkr
.hw
1521 .flags
= CLK_SET_RATE_PARENT
,
1522 .ops
= &clk_branch2_ops
,
1527 static struct clk_branch gcc_pcie3_axi_s_bridge_clk
= {
1528 .halt_reg
= 0x2b040,
1530 .enable_reg
= 0x2b040,
1531 .enable_mask
= BIT(0),
1532 .hw
.init
= &(const struct clk_init_data
) {
1533 .name
= "gcc_pcie3_axi_s_bridge_clk",
1534 .parent_hws
= (const struct clk_hw
*[]) {
1535 &pcie3_axi_s_clk_src
.clkr
.hw
1538 .flags
= CLK_SET_RATE_PARENT
,
1539 .ops
= &clk_branch2_ops
,
1544 static struct clk_branch gcc_snoc_pcie3_2lane_s_clk
= {
1545 .halt_reg
= 0x2e054,
1547 .enable_reg
= 0x2e054,
1548 .enable_mask
= BIT(0),
1549 .hw
.init
= &(const struct clk_init_data
) {
1550 .name
= "gcc_snoc_pcie3_2lane_s_clk",
1551 .parent_hws
= (const struct clk_hw
*[]) {
1552 &pcie3_axi_s_clk_src
.clkr
.hw
1555 .flags
= CLK_SET_RATE_PARENT
,
1556 .ops
= &clk_branch2_ops
,
1561 static struct clk_regmap_phy_mux pcie0_pipe_clk_src
= {
1564 .hw
.init
= &(const struct clk_init_data
) {
1565 .name
= "pcie0_pipe_clk_src",
1566 .parent_data
= &(const struct clk_parent_data
) {
1567 .index
= DT_PCIE30_PHY0_PIPE_CLK
,
1570 .ops
= &clk_regmap_phy_mux_ops
,
1575 static struct clk_branch gcc_pcie0_pipe_clk
= {
1576 .halt_reg
= 0x28044,
1577 .halt_check
= BRANCH_HALT_DELAY
,
1579 .enable_reg
= 0x28044,
1580 .enable_mask
= BIT(0),
1581 .hw
.init
= &(const struct clk_init_data
) {
1582 .name
= "gcc_pcie0_pipe_clk",
1583 .parent_hws
= (const struct clk_hw
*[]) {
1584 &pcie0_pipe_clk_src
.clkr
.hw
1587 .flags
= CLK_SET_RATE_PARENT
,
1588 .ops
= &clk_branch2_ops
,
1593 static struct clk_regmap_phy_mux pcie1_pipe_clk_src
= {
1596 .hw
.init
= &(const struct clk_init_data
) {
1597 .name
= "pcie1_pipe_clk_src",
1598 .parent_data
= &(const struct clk_parent_data
) {
1599 .index
= DT_PCIE30_PHY1_PIPE_CLK
,
1602 .ops
= &clk_regmap_phy_mux_ops
,
1607 static struct clk_branch gcc_pcie1_pipe_clk
= {
1608 .halt_reg
= 0x29044,
1609 .halt_check
= BRANCH_HALT_DELAY
,
1611 .enable_reg
= 0x29044,
1612 .enable_mask
= BIT(0),
1613 .hw
.init
= &(const struct clk_init_data
) {
1614 .name
= "gcc_pcie1_pipe_clk",
1615 .parent_hws
= (const struct clk_hw
*[]) {
1616 &pcie1_pipe_clk_src
.clkr
.hw
1619 .flags
= CLK_SET_RATE_PARENT
,
1620 .ops
= &clk_branch2_ops
,
1625 static struct clk_regmap_phy_mux pcie2_pipe_clk_src
= {
1628 .hw
.init
= &(const struct clk_init_data
) {
1629 .name
= "pcie2_pipe_clk_src",
1630 .parent_data
= &(const struct clk_parent_data
) {
1631 .index
= DT_PCIE30_PHY2_PIPE_CLK
,
1634 .ops
= &clk_regmap_phy_mux_ops
,
1639 static struct clk_branch gcc_pcie2_pipe_clk
= {
1640 .halt_reg
= 0x2a044,
1641 .halt_check
= BRANCH_HALT_DELAY
,
1643 .enable_reg
= 0x2a044,
1644 .enable_mask
= BIT(0),
1645 .hw
.init
= &(const struct clk_init_data
) {
1646 .name
= "gcc_pcie2_pipe_clk",
1647 .parent_hws
= (const struct clk_hw
*[]) {
1648 &pcie2_pipe_clk_src
.clkr
.hw
1651 .flags
= CLK_SET_RATE_PARENT
,
1652 .ops
= &clk_branch2_ops
,
1657 static struct clk_regmap_phy_mux pcie3_pipe_clk_src
= {
1660 .hw
.init
= &(const struct clk_init_data
) {
1661 .name
= "pcie3_pipe_clk_src",
1662 .parent_data
= &(const struct clk_parent_data
) {
1663 .index
= DT_PCIE30_PHY3_PIPE_CLK
,
1666 .ops
= &clk_regmap_phy_mux_ops
,
1671 static struct clk_branch gcc_pcie3_pipe_clk
= {
1672 .halt_reg
= 0x2b044,
1673 .halt_check
= BRANCH_HALT_DELAY
,
1675 .enable_reg
= 0x2b044,
1676 .enable_mask
= BIT(0),
1677 .hw
.init
= &(const struct clk_init_data
) {
1678 .name
= "gcc_pcie3_pipe_clk",
1679 .parent_hws
= (const struct clk_hw
*[]) {
1680 &pcie3_pipe_clk_src
.clkr
.hw
1683 .flags
= CLK_SET_RATE_PARENT
,
1684 .ops
= &clk_branch2_ops
,
1689 static const struct freq_tbl ftbl_pcie_rchng_clk_src
[] = {
1690 F(24000000, P_XO
, 1, 0, 0),
1691 F(100000000, P_GPLL0
, 8, 0, 0),
1695 static struct clk_rcg2 pcie0_rchng_clk_src
= {
1696 .cmd_rcgr
= 0x28028,
1697 .freq_tbl
= ftbl_pcie_rchng_clk_src
,
1699 .parent_map
= gcc_xo_gpll0_map
,
1700 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1701 .name
= "pcie0_rchng_clk_src",
1702 .parent_data
= gcc_xo_gpll0
,
1703 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1704 .ops
= &clk_rcg2_ops
,
1708 static struct clk_branch gcc_pcie0_rchng_clk
= {
1709 .halt_reg
= 0x28028,
1711 .enable_reg
= 0x28028,
1712 .enable_mask
= BIT(1),
1713 .hw
.init
= &(const struct clk_init_data
) {
1714 .name
= "gcc_pcie0_rchng_clk",
1715 .parent_hws
= (const struct clk_hw
*[]) {
1716 &pcie0_rchng_clk_src
.clkr
.hw
1720 .flags
= CLK_SET_RATE_PARENT
,
1721 .ops
= &clk_branch2_ops
,
1726 static struct clk_rcg2 pcie1_rchng_clk_src
= {
1727 .cmd_rcgr
= 0x29028,
1728 .freq_tbl
= ftbl_pcie_rchng_clk_src
,
1730 .parent_map
= gcc_xo_gpll0_map
,
1731 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1732 .name
= "pcie1_rchng_clk_src",
1733 .parent_data
= gcc_xo_gpll0
,
1734 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1735 .ops
= &clk_rcg2_ops
,
1739 static struct clk_branch gcc_pcie1_rchng_clk
= {
1740 .halt_reg
= 0x29028,
1742 .enable_reg
= 0x29028,
1743 .enable_mask
= BIT(1),
1744 .hw
.init
= &(const struct clk_init_data
) {
1745 .name
= "gcc_pcie1_rchng_clk",
1746 .parent_hws
= (const struct clk_hw
*[]) {
1747 &pcie1_rchng_clk_src
.clkr
.hw
1750 .flags
= CLK_SET_RATE_PARENT
,
1751 .ops
= &clk_branch2_ops
,
1756 static struct clk_rcg2 pcie2_rchng_clk_src
= {
1757 .cmd_rcgr
= 0x2a028,
1758 .freq_tbl
= ftbl_pcie_rchng_clk_src
,
1760 .parent_map
= gcc_xo_gpll0_map
,
1761 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1762 .name
= "pcie2_rchng_clk_src",
1763 .parent_data
= gcc_xo_gpll0
,
1764 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1765 .ops
= &clk_rcg2_ops
,
1769 static struct clk_branch gcc_pcie2_rchng_clk
= {
1770 .halt_reg
= 0x2a028,
1772 .enable_reg
= 0x2a028,
1773 .enable_mask
= BIT(1),
1774 .hw
.init
= &(const struct clk_init_data
) {
1775 .name
= "gcc_pcie2_rchng_clk",
1776 .parent_hws
= (const struct clk_hw
*[]) {
1777 &pcie2_rchng_clk_src
.clkr
.hw
1780 .flags
= CLK_SET_RATE_PARENT
,
1781 .ops
= &clk_branch2_ops
,
1786 static struct clk_rcg2 pcie3_rchng_clk_src
= {
1787 .cmd_rcgr
= 0x2b028,
1788 .freq_tbl
= ftbl_pcie_rchng_clk_src
,
1790 .parent_map
= gcc_xo_gpll0_map
,
1791 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1792 .name
= "pcie3_rchng_clk_src",
1793 .parent_data
= gcc_xo_gpll0
,
1794 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1795 .ops
= &clk_rcg2_ops
,
1799 static struct clk_branch gcc_pcie3_rchng_clk
= {
1800 .halt_reg
= 0x2b028,
1802 .enable_reg
= 0x2b028,
1803 .enable_mask
= BIT(1),
1804 .hw
.init
= &(const struct clk_init_data
) {
1805 .name
= "gcc_pcie3_rchng_clk",
1806 .parent_hws
= (const struct clk_hw
*[]) {
1807 &pcie3_rchng_clk_src
.clkr
.hw
1810 .flags
= CLK_SET_RATE_PARENT
,
1811 .ops
= &clk_branch2_ops
,
1816 static const struct freq_tbl ftbl_pcie_aux_clk_src
[] = {
1817 F(20000000, P_GPLL0
, 10, 1, 4),
1821 static struct clk_rcg2 pcie_aux_clk_src
= {
1822 .cmd_rcgr
= 0x28004,
1823 .freq_tbl
= ftbl_pcie_aux_clk_src
,
1826 .parent_map
= gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk_map
,
1827 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1828 .name
= "pcie_aux_clk_src",
1829 .parent_data
= gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk
,
1830 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_aux_core_pi_sleep_clk
),
1831 .ops
= &clk_rcg2_ops
,
1835 static struct clk_branch gcc_pcie0_aux_clk
= {
1836 .halt_reg
= 0x28034,
1838 .enable_reg
= 0x28034,
1839 .enable_mask
= BIT(0),
1840 .hw
.init
= &(const struct clk_init_data
) {
1841 .name
= "gcc_pcie0_aux_clk",
1842 .parent_hws
= (const struct clk_hw
*[]) {
1843 &pcie_aux_clk_src
.clkr
.hw
1846 .flags
= CLK_SET_RATE_PARENT
,
1847 .ops
= &clk_branch2_ops
,
1852 static struct clk_branch gcc_pcie1_aux_clk
= {
1853 .halt_reg
= 0x29034,
1855 .enable_reg
= 0x29034,
1856 .enable_mask
= BIT(0),
1857 .hw
.init
= &(const struct clk_init_data
) {
1858 .name
= "gcc_pcie1_aux_clk",
1859 .parent_hws
= (const struct clk_hw
*[]) {
1860 &pcie_aux_clk_src
.clkr
.hw
1863 .flags
= CLK_SET_RATE_PARENT
,
1864 .ops
= &clk_branch2_ops
,
1869 static struct clk_branch gcc_pcie2_aux_clk
= {
1870 .halt_reg
= 0x2a034,
1872 .enable_reg
= 0x2a034,
1873 .enable_mask
= BIT(0),
1874 .hw
.init
= &(const struct clk_init_data
) {
1875 .name
= "gcc_pcie2_aux_clk",
1876 .parent_hws
= (const struct clk_hw
*[]) {
1877 &pcie_aux_clk_src
.clkr
.hw
1880 .flags
= CLK_SET_RATE_PARENT
,
1881 .ops
= &clk_branch2_ops
,
1886 static struct clk_branch gcc_pcie3_aux_clk
= {
1887 .halt_reg
= 0x2b034,
1889 .enable_reg
= 0x2b034,
1890 .enable_mask
= BIT(0),
1891 .hw
.init
= &(const struct clk_init_data
) {
1892 .name
= "gcc_pcie3_aux_clk",
1893 .parent_hws
= (const struct clk_hw
*[]) {
1894 &pcie_aux_clk_src
.clkr
.hw
1897 .flags
= CLK_SET_RATE_PARENT
,
1898 .ops
= &clk_branch2_ops
,
1903 static const struct freq_tbl ftbl_usb_aux_clk_src
[] = {
1904 F(24000000, P_XO
, 1, 0, 0),
1908 static struct clk_rcg2 usb0_aux_clk_src
= {
1909 .cmd_rcgr
= 0x2c018,
1910 .freq_tbl
= ftbl_usb_aux_clk_src
,
1913 .parent_map
= gcc_xo_gpll0_core_pi_sleep_clk_map
,
1914 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1915 .name
= "usb0_aux_clk_src",
1916 .parent_data
= gcc_xo_gpll0_core_pi_sleep_clk
,
1917 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_core_pi_sleep_clk
),
1918 .ops
= &clk_rcg2_ops
,
1922 static struct clk_branch gcc_usb0_aux_clk
= {
1923 .halt_reg
= 0x2c048,
1925 .enable_reg
= 0x2c048,
1926 .enable_mask
= BIT(0),
1927 .hw
.init
= &(const struct clk_init_data
) {
1928 .name
= "gcc_usb0_aux_clk",
1929 .parent_hws
= (const struct clk_hw
*[]) {
1930 &usb0_aux_clk_src
.clkr
.hw
1933 .flags
= CLK_SET_RATE_PARENT
,
1934 .ops
= &clk_branch2_ops
,
1939 static const struct freq_tbl ftbl_usb0_master_clk_src
[] = {
1940 F(100000000, P_GPLL0
, 8, 0, 0),
1941 F(200000000, P_GPLL0
, 4, 0, 0),
1945 static struct clk_rcg2 usb0_master_clk_src
= {
1946 .cmd_rcgr
= 0x2c004,
1947 .freq_tbl
= ftbl_usb0_master_clk_src
,
1950 .parent_map
= gcc_xo_gpll0_out_main_div2_gpll0_map
,
1951 .clkr
.hw
.init
= &(const struct clk_init_data
) {
1952 .name
= "usb0_master_clk_src",
1953 .parent_data
= gcc_xo_gpll0_out_main_div2_gpll0
,
1954 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_out_main_div2_gpll0
),
1955 .ops
= &clk_rcg2_ops
,
1959 static struct clk_branch gcc_usb0_master_clk
= {
1960 .halt_reg
= 0x2c044,
1962 .enable_reg
= 0x2c044,
1963 .enable_mask
= BIT(0),
1964 .hw
.init
= &(const struct clk_init_data
) {
1965 .name
= "gcc_usb0_master_clk",
1966 .parent_hws
= (const struct clk_hw
*[]) {
1967 &usb0_master_clk_src
.clkr
.hw
1970 .flags
= CLK_SET_RATE_PARENT
,
1971 .ops
= &clk_branch2_ops
,
1976 static struct clk_branch gcc_snoc_usb_clk
= {
1977 .halt_reg
= 0x2e058,
1979 .enable_reg
= 0x2e058,
1980 .enable_mask
= BIT(0),
1981 .hw
.init
= &(const struct clk_init_data
) {
1982 .name
= "gcc_snoc_usb_clk",
1983 .parent_hws
= (const struct clk_hw
*[]) {
1984 &usb0_master_clk_src
.clkr
.hw
1987 .flags
= CLK_SET_RATE_PARENT
,
1988 .ops
= &clk_branch2_ops
,
1993 static struct clk_branch gcc_anoc_usb_axi_clk
= {
1994 .halt_reg
= 0x2e084,
1996 .enable_reg
= 0x2e084,
1997 .enable_mask
= BIT(0),
1998 .hw
.init
= &(const struct clk_init_data
) {
1999 .name
= "gcc_anoc_usb_axi_clk",
2000 .parent_hws
= (const struct clk_hw
*[]) {
2001 &usb0_master_clk_src
.clkr
.hw
2004 .flags
= CLK_SET_RATE_PARENT
,
2005 .ops
= &clk_branch2_ops
,
2010 static const struct freq_tbl ftbl_usb0_mock_utmi_clk_src
[] = {
2011 F(24000000, P_XO
, 1, 0, 0),
2012 F(60000000, P_GPLL4
, 10, 1, 2),
2016 static struct clk_rcg2 usb0_mock_utmi_clk_src
= {
2017 .cmd_rcgr
= 0x2c02c,
2018 .freq_tbl
= ftbl_usb0_mock_utmi_clk_src
,
2021 .parent_map
= gcc_xo_gpll4_gpll0_gpll0_out_main_div2_map
,
2022 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2023 .name
= "usb0_mock_utmi_clk_src",
2024 .parent_data
= gcc_xo_gpll4_gpll0_gpll0_out_main_div2
,
2025 .num_parents
= ARRAY_SIZE(gcc_xo_gpll4_gpll0_gpll0_out_main_div2
),
2026 .ops
= &clk_rcg2_ops
,
2030 static struct clk_regmap_div usb0_mock_utmi_div_clk_src
= {
2034 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2035 .name
= "usb0_mock_utmi_div_clk_src",
2036 .parent_data
= &(const struct clk_parent_data
) {
2037 .hw
= &usb0_mock_utmi_clk_src
.clkr
.hw
,
2040 .flags
= CLK_SET_RATE_PARENT
,
2041 .ops
= &clk_regmap_div_ro_ops
,
2045 static struct clk_branch gcc_usb0_mock_utmi_clk
= {
2046 .halt_reg
= 0x2c04c,
2048 .enable_reg
= 0x2c04c,
2049 .enable_mask
= BIT(0),
2050 .hw
.init
= &(const struct clk_init_data
) {
2051 .name
= "gcc_usb0_mock_utmi_clk",
2052 .parent_hws
= (const struct clk_hw
*[]) {
2053 &usb0_mock_utmi_div_clk_src
.clkr
.hw
2056 .flags
= CLK_SET_RATE_PARENT
,
2057 .ops
= &clk_branch2_ops
,
2062 static struct clk_regmap_mux usb0_pipe_clk_src
= {
2066 .parent_map
= gcc_usb3phy_0_cc_pipe_clk_xo_map
,
2068 .hw
.init
= &(const struct clk_init_data
) {
2069 .name
= "usb0_pipe_clk_src",
2070 .parent_data
= gcc_usb3phy_0_cc_pipe_clk_xo
,
2071 .num_parents
= ARRAY_SIZE(gcc_usb3phy_0_cc_pipe_clk_xo
),
2072 .flags
= CLK_SET_RATE_PARENT
,
2073 .ops
= &clk_regmap_mux_closest_ops
,
2078 static struct clk_branch gcc_usb0_pipe_clk
= {
2079 .halt_reg
= 0x2c054,
2080 .halt_check
= BRANCH_HALT_DELAY
,
2082 .enable_reg
= 0x2c054,
2083 .enable_mask
= BIT(0),
2084 .hw
.init
= &(const struct clk_init_data
){
2085 .name
= "gcc_usb0_pipe_clk",
2086 .parent_hws
= (const struct clk_hw
*[]) {
2087 &usb0_pipe_clk_src
.clkr
.hw
2090 .flags
= CLK_SET_RATE_PARENT
,
2091 .ops
= &clk_branch2_ops
,
2096 static struct clk_branch gcc_usb0_sleep_clk
= {
2097 .halt_reg
= 0x2c058,
2099 .enable_reg
= 0x2c058,
2100 .enable_mask
= BIT(0),
2101 .hw
.init
= &(const struct clk_init_data
){
2102 .name
= "gcc_usb0_sleep_clk",
2103 .parent_hws
= (const struct clk_hw
*[]) {
2104 &gcc_sleep_clk_src
.clkr
.hw
2107 .flags
= CLK_SET_RATE_PARENT
,
2108 .ops
= &clk_branch2_ops
,
2113 static const struct freq_tbl ftbl_sdcc_apps_clk_src
[] = {
2114 F(144000, P_XO
, 16, 12, 125),
2115 F(400000, P_XO
, 12, 1, 5),
2116 F(24000000, P_GPLL2
, 12, 1, 4),
2117 F(48000000, P_GPLL2
, 12, 1, 2),
2118 F(96000000, P_GPLL2
, 12, 0, 0),
2119 F(177777778, P_GPLL0
, 4.5, 0, 0),
2120 F(192000000, P_GPLL2
, 6, 0, 0),
2121 F(384000000, P_GPLL2
, 3, 0, 0),
2122 F(400000000, P_GPLL0
, 2, 0, 0),
2126 static struct clk_rcg2 sdcc1_apps_clk_src
= {
2127 .cmd_rcgr
= 0x33004,
2128 .freq_tbl
= ftbl_sdcc_apps_clk_src
,
2131 .parent_map
= gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map
,
2132 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2133 .name
= "sdcc1_apps_clk_src",
2134 .parent_data
= gcc_xo_gpll0_gpll2_gpll0_out_main_div2
,
2135 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2_gpll0_out_main_div2
),
2136 .ops
= &clk_rcg2_floor_ops
,
2140 static struct clk_branch gcc_sdcc1_apps_clk
= {
2141 .halt_reg
= 0x3302c,
2143 .enable_reg
= 0x3302c,
2144 .enable_mask
= BIT(0),
2145 .hw
.init
= &(const struct clk_init_data
) {
2146 .name
= "gcc_sdcc1_apps_clk",
2147 .parent_hws
= (const struct clk_hw
*[]) {
2148 &sdcc1_apps_clk_src
.clkr
.hw
2151 .flags
= CLK_SET_RATE_PARENT
,
2152 .ops
= &clk_branch2_ops
,
2157 static const struct freq_tbl ftbl_sdcc_ice_core_clk_src
[] = {
2158 F(150000000, P_GPLL4
, 8, 0, 0),
2159 F(300000000, P_GPLL4
, 4, 0, 0),
2163 static struct clk_rcg2 sdcc1_ice_core_clk_src
= {
2164 .cmd_rcgr
= 0x33018,
2165 .freq_tbl
= ftbl_sdcc_ice_core_clk_src
,
2168 .parent_map
= gcc_xo_gpll0_gpll4_gpll0_div2_map
,
2169 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2170 .name
= "sdcc1_ice_core_clk_src",
2171 .parent_data
= gcc_xo_gpll0_gpll4_gpll0_div2
,
2172 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4_gpll0_div2
),
2173 .ops
= &clk_rcg2_ops
,
2177 static struct clk_branch gcc_sdcc1_ice_core_clk
= {
2178 .halt_reg
= 0x33030,
2180 .enable_reg
= 0x33030,
2181 .enable_mask
= BIT(0),
2182 .hw
.init
= &(const struct clk_init_data
) {
2183 .name
= "gcc_sdcc1_ice_core_clk",
2184 .parent_hws
= (const struct clk_hw
*[]) {
2185 &sdcc1_ice_core_clk_src
.clkr
.hw
2188 .flags
= CLK_SET_RATE_PARENT
,
2189 .ops
= &clk_branch2_ops
,
2194 static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src
[] = {
2195 F(24000000, P_XO
, 1, 0, 0),
2196 F(50000000, P_GPLL0
, 16, 0, 0),
2197 F(80000000, P_GPLL0
, 10, 0, 0),
2198 F(100000000, P_GPLL0
, 8, 0, 0),
2202 static struct clk_rcg2 pcnoc_bfdcd_clk_src
= {
2203 .cmd_rcgr
= 0x31004,
2204 .freq_tbl
= ftbl_pcnoc_bfdcd_clk_src
,
2206 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
2207 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2208 .name
= "pcnoc_bfdcd_clk_src",
2209 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
2210 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
2211 .flags
= CLK_IS_CRITICAL
,
2212 .ops
= &clk_rcg2_ops
,
2216 static struct clk_branch gcc_crypto_axi_clk
= {
2217 .halt_reg
= 0x16010,
2218 .halt_check
= BRANCH_HALT_VOTED
,
2220 .enable_reg
= 0xb004,
2221 .enable_mask
= BIT(15),
2222 .hw
.init
= &(const struct clk_init_data
) {
2223 .name
= "gcc_crypto_axi_clk",
2224 .parent_hws
= (const struct clk_hw
*[]) {
2225 &pcnoc_bfdcd_clk_src
.clkr
.hw
},
2227 .flags
= CLK_SET_RATE_PARENT
,
2228 .ops
= &clk_branch2_ops
,
2233 static struct clk_branch gcc_crypto_ahb_clk
= {
2234 .halt_reg
= 0x16014,
2235 .halt_check
= BRANCH_HALT_VOTED
,
2237 .enable_reg
= 0xb004,
2238 .enable_mask
= BIT(16),
2239 .hw
.init
= &(const struct clk_init_data
) {
2240 .name
= "gcc_crypto_ahb_clk",
2241 .parent_hws
= (const struct clk_hw
*[]) {
2242 &pcnoc_bfdcd_clk_src
.clkr
.hw
},
2244 .flags
= CLK_SET_RATE_PARENT
,
2245 .ops
= &clk_branch2_ops
,
2250 static struct clk_branch gcc_nsscfg_clk
= {
2251 .halt_reg
= 0x1702c,
2253 .enable_reg
= 0x1702c,
2254 .enable_mask
= BIT(0),
2255 .hw
.init
= &(const struct clk_init_data
) {
2256 .name
= "gcc_nsscfg_clk",
2257 .parent_hws
= (const struct clk_hw
*[]) {
2258 &pcnoc_bfdcd_clk_src
.clkr
.hw
2261 .flags
= CLK_SET_RATE_PARENT
,
2262 .ops
= &clk_branch2_ops
,
2267 static struct clk_branch gcc_nssnoc_nsscc_clk
= {
2268 .halt_reg
= 0x17030,
2270 .enable_reg
= 0x17030,
2271 .enable_mask
= BIT(0),
2272 .hw
.init
= &(const struct clk_init_data
) {
2273 .name
= "gcc_nssnoc_nsscc_clk",
2274 .parent_hws
= (const struct clk_hw
*[]) {
2275 &pcnoc_bfdcd_clk_src
.clkr
.hw
2278 .flags
= CLK_SET_RATE_PARENT
,
2279 .ops
= &clk_branch2_ops
,
2284 static struct clk_branch gcc_nsscc_clk
= {
2285 .halt_reg
= 0x17034,
2287 .enable_reg
= 0x17034,
2288 .enable_mask
= BIT(0),
2289 .hw
.init
= &(const struct clk_init_data
) {
2290 .name
= "gcc_nsscc_clk",
2291 .parent_hws
= (const struct clk_hw
*[]) {
2292 &pcnoc_bfdcd_clk_src
.clkr
.hw
2295 .flags
= CLK_SET_RATE_PARENT
,
2296 .ops
= &clk_branch2_ops
,
2301 static struct clk_branch gcc_nssnoc_pcnoc_1_clk
= {
2302 .halt_reg
= 0x17080,
2304 .enable_reg
= 0x17080,
2305 .enable_mask
= BIT(0),
2306 .hw
.init
= &(const struct clk_init_data
) {
2307 .name
= "gcc_nssnoc_pcnoc_1_clk",
2308 .parent_hws
= (const struct clk_hw
*[]) {
2309 &pcnoc_bfdcd_clk_src
.clkr
.hw
2312 .flags
= CLK_SET_RATE_PARENT
,
2313 .ops
= &clk_branch2_ops
,
2318 static struct clk_branch gcc_qdss_dap_ahb_clk
= {
2319 .halt_reg
= 0x2d064,
2321 .enable_reg
= 0x2d064,
2322 .enable_mask
= BIT(0),
2323 .hw
.init
= &(const struct clk_init_data
) {
2324 .name
= "gcc_qdss_dap_ahb_clk",
2325 .parent_hws
= (const struct clk_hw
*[]) {
2326 &pcnoc_bfdcd_clk_src
.clkr
.hw
2329 .flags
= CLK_SET_RATE_PARENT
,
2330 .ops
= &clk_branch2_ops
,
2335 static struct clk_branch gcc_qdss_cfg_ahb_clk
= {
2336 .halt_reg
= 0x2d068,
2338 .enable_reg
= 0x2d068,
2339 .enable_mask
= BIT(0),
2340 .hw
.init
= &(const struct clk_init_data
) {
2341 .name
= "gcc_qdss_cfg_ahb_clk",
2342 .parent_hws
= (const struct clk_hw
*[]) {
2343 &pcnoc_bfdcd_clk_src
.clkr
.hw
2346 .flags
= CLK_SET_RATE_PARENT
,
2347 .ops
= &clk_branch2_ops
,
2352 static struct clk_branch gcc_qpic_ahb_clk
= {
2353 .halt_reg
= 0x32010,
2355 .enable_reg
= 0x32010,
2356 .enable_mask
= BIT(0),
2357 .hw
.init
= &(const struct clk_init_data
) {
2358 .name
= "gcc_qpic_ahb_clk",
2359 .parent_hws
= (const struct clk_hw
*[]) {
2360 &pcnoc_bfdcd_clk_src
.clkr
.hw
2363 .flags
= CLK_SET_RATE_PARENT
,
2364 .ops
= &clk_branch2_ops
,
2369 static struct clk_branch gcc_qpic_clk
= {
2370 .halt_reg
= 0x32014,
2372 .enable_reg
= 0x32014,
2373 .enable_mask
= BIT(0),
2374 .hw
.init
= &(const struct clk_init_data
) {
2375 .name
= "gcc_qpic_clk",
2376 .parent_hws
= (const struct clk_hw
*[]) {
2377 &pcnoc_bfdcd_clk_src
.clkr
.hw
2380 .flags
= CLK_SET_RATE_PARENT
,
2381 .ops
= &clk_branch2_ops
,
2386 static struct clk_branch gcc_blsp1_ahb_clk
= {
2387 .halt_reg
= 0x01004,
2388 .halt_check
= BRANCH_HALT_VOTED
,
2390 .enable_reg
= 0x0b004,
2391 .enable_mask
= BIT(4),
2392 .hw
.init
= &(const struct clk_init_data
) {
2393 .name
= "gcc_blsp1_ahb_clk",
2394 .parent_hws
= (const struct clk_hw
*[]) {
2395 &pcnoc_bfdcd_clk_src
.clkr
.hw
2398 .flags
= CLK_SET_RATE_PARENT
,
2399 .ops
= &clk_branch2_ops
,
2404 static struct clk_branch gcc_mdio_ahb_clk
= {
2405 .halt_reg
= 0x17040,
2407 .enable_reg
= 0x17040,
2408 .enable_mask
= BIT(0),
2409 .hw
.init
= &(const struct clk_init_data
) {
2410 .name
= "gcc_mdio_ahb_clk",
2411 .parent_hws
= (const struct clk_hw
*[]) {
2412 &pcnoc_bfdcd_clk_src
.clkr
.hw
2415 .flags
= CLK_SET_RATE_PARENT
,
2416 .ops
= &clk_branch2_ops
,
2421 static struct clk_branch gcc_prng_ahb_clk
= {
2422 .halt_reg
= 0x13024,
2423 .halt_check
= BRANCH_HALT_VOTED
,
2425 .enable_reg
= 0x0b004,
2426 .enable_mask
= BIT(10),
2427 .hw
.init
= &(const struct clk_init_data
) {
2428 .name
= "gcc_prng_ahb_clk",
2429 .parent_hws
= (const struct clk_hw
*[]) {
2430 &pcnoc_bfdcd_clk_src
.clkr
.hw
2433 .flags
= CLK_SET_RATE_PARENT
,
2434 .ops
= &clk_branch2_ops
,
2439 static struct clk_branch gcc_uniphy0_ahb_clk
= {
2440 .halt_reg
= 0x1704c,
2442 .enable_reg
= 0x1704c,
2443 .enable_mask
= BIT(0),
2444 .hw
.init
= &(const struct clk_init_data
) {
2445 .name
= "gcc_uniphy0_ahb_clk",
2446 .parent_hws
= (const struct clk_hw
*[]) {
2447 &pcnoc_bfdcd_clk_src
.clkr
.hw
2450 .flags
= CLK_SET_RATE_PARENT
,
2451 .ops
= &clk_branch2_ops
,
2456 static struct clk_branch gcc_uniphy1_ahb_clk
= {
2457 .halt_reg
= 0x1705c,
2459 .enable_reg
= 0x1705c,
2460 .enable_mask
= BIT(0),
2461 .hw
.init
= &(const struct clk_init_data
) {
2462 .name
= "gcc_uniphy1_ahb_clk",
2463 .parent_hws
= (const struct clk_hw
*[]) {
2464 &pcnoc_bfdcd_clk_src
.clkr
.hw
2467 .flags
= CLK_SET_RATE_PARENT
,
2468 .ops
= &clk_branch2_ops
,
2473 static struct clk_branch gcc_uniphy2_ahb_clk
= {
2474 .halt_reg
= 0x1706c,
2476 .enable_reg
= 0x1706c,
2477 .enable_mask
= BIT(0),
2478 .hw
.init
= &(const struct clk_init_data
) {
2479 .name
= "gcc_uniphy2_ahb_clk",
2480 .parent_hws
= (const struct clk_hw
*[]) {
2481 &pcnoc_bfdcd_clk_src
.clkr
.hw
2484 .flags
= CLK_SET_RATE_PARENT
,
2485 .ops
= &clk_branch2_ops
,
2490 static struct clk_branch gcc_cmn_12gpll_ahb_clk
= {
2491 .halt_reg
= 0x3a004,
2493 .enable_reg
= 0x3a004,
2494 .enable_mask
= BIT(0),
2495 .hw
.init
= &(const struct clk_init_data
) {
2496 .name
= "gcc_cmn_12gpll_ahb_clk",
2497 .parent_hws
= (const struct clk_hw
*[]) {
2498 &pcnoc_bfdcd_clk_src
.clkr
.hw
2501 .flags
= CLK_SET_RATE_PARENT
,
2502 .ops
= &clk_branch2_ops
,
2507 static struct clk_branch gcc_cmn_12gpll_apu_clk
= {
2508 .halt_reg
= 0x3a00c,
2510 .enable_reg
= 0x3a00c,
2511 .enable_mask
= BIT(0),
2512 .hw
.init
= &(const struct clk_init_data
) {
2513 .name
= "gcc_cmn_12gpll_apu_clk",
2514 .parent_hws
= (const struct clk_hw
*[]) {
2515 &pcnoc_bfdcd_clk_src
.clkr
.hw
2518 .flags
= CLK_SET_RATE_PARENT
,
2519 .ops
= &clk_branch2_ops
,
2524 static struct clk_branch gcc_pcie0_ahb_clk
= {
2525 .halt_reg
= 0x28030,
2527 .enable_reg
= 0x28030,
2528 .enable_mask
= BIT(0),
2529 .hw
.init
= &(const struct clk_init_data
) {
2530 .name
= "gcc_pcie0_ahb_clk",
2531 .parent_hws
= (const struct clk_hw
*[]) {
2532 &pcnoc_bfdcd_clk_src
.clkr
.hw
2535 .flags
= CLK_SET_RATE_PARENT
,
2536 .ops
= &clk_branch2_ops
,
2541 static struct clk_branch gcc_pcie1_ahb_clk
= {
2542 .halt_reg
= 0x29030,
2544 .enable_reg
= 0x29030,
2545 .enable_mask
= BIT(0),
2546 .hw
.init
= &(const struct clk_init_data
) {
2547 .name
= "gcc_pcie1_ahb_clk",
2548 .parent_hws
= (const struct clk_hw
*[]) {
2549 &pcnoc_bfdcd_clk_src
.clkr
.hw
2552 .flags
= CLK_SET_RATE_PARENT
,
2553 .ops
= &clk_branch2_ops
,
2558 static struct clk_branch gcc_pcie2_ahb_clk
= {
2559 .halt_reg
= 0x2a030,
2561 .enable_reg
= 0x2a030,
2562 .enable_mask
= BIT(0),
2563 .hw
.init
= &(const struct clk_init_data
) {
2564 .name
= "gcc_pcie2_ahb_clk",
2565 .parent_hws
= (const struct clk_hw
*[]) {
2566 &pcnoc_bfdcd_clk_src
.clkr
.hw
2569 .flags
= CLK_SET_RATE_PARENT
,
2570 .ops
= &clk_branch2_ops
,
2575 static struct clk_branch gcc_pcie3_ahb_clk
= {
2576 .halt_reg
= 0x2b030,
2578 .enable_reg
= 0x2b030,
2579 .enable_mask
= BIT(0),
2580 .hw
.init
= &(const struct clk_init_data
) {
2581 .name
= "gcc_pcie3_ahb_clk",
2582 .parent_hws
= (const struct clk_hw
*[]) {
2583 &pcnoc_bfdcd_clk_src
.clkr
.hw
2586 .flags
= CLK_SET_RATE_PARENT
,
2587 .ops
= &clk_branch2_ops
,
2592 static struct clk_branch gcc_usb0_phy_cfg_ahb_clk
= {
2593 .halt_reg
= 0x2c05c,
2595 .enable_reg
= 0x2c05c,
2596 .enable_mask
= BIT(0),
2597 .hw
.init
= &(const struct clk_init_data
) {
2598 .name
= "gcc_usb0_phy_cfg_ahb_clk",
2599 .parent_hws
= (const struct clk_hw
*[]) {
2600 &pcnoc_bfdcd_clk_src
.clkr
.hw
2603 .flags
= CLK_SET_RATE_PARENT
,
2604 .ops
= &clk_branch2_ops
,
2609 static struct clk_branch gcc_sdcc1_ahb_clk
= {
2610 .halt_reg
= 0x33034,
2612 .enable_reg
= 0x33034,
2613 .enable_mask
= BIT(0),
2614 .hw
.init
= &(const struct clk_init_data
) {
2615 .name
= "gcc_sdcc1_ahb_clk",
2616 .parent_hws
= (const struct clk_hw
*[]) {
2617 &pcnoc_bfdcd_clk_src
.clkr
.hw
2620 .flags
= CLK_SET_RATE_PARENT
,
2621 .ops
= &clk_branch2_ops
,
2626 static const struct freq_tbl ftbl_system_noc_bfdcd_clk_src
[] = {
2627 F(24000000, P_XO
, 1, 0, 0),
2628 F(133333333, P_GPLL0
, 6, 0, 0),
2629 F(200000000, P_GPLL0
, 4, 0, 0),
2630 F(342850000, P_GPLL4
, 3.5, 0, 0),
2634 static struct clk_rcg2 system_noc_bfdcd_clk_src
= {
2635 .cmd_rcgr
= 0x2e004,
2636 .freq_tbl
= ftbl_system_noc_bfdcd_clk_src
,
2638 .parent_map
= gcc_xo_gpll0_gpll4_map
,
2639 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2640 .name
= "system_noc_bfdcd_clk_src",
2641 .parent_data
= gcc_xo_gpll0_gpll4
,
2642 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
2643 .flags
= CLK_IS_CRITICAL
,
2644 .ops
= &clk_rcg2_ops
,
2648 static struct clk_branch gcc_nssnoc_snoc_clk
= {
2649 .halt_reg
= 0x17028,
2651 .enable_reg
= 0x17028,
2652 .enable_mask
= BIT(0),
2653 .hw
.init
= &(const struct clk_init_data
) {
2654 .name
= "gcc_nssnoc_snoc_clk",
2655 .parent_hws
= (const struct clk_hw
*[]) {
2656 &system_noc_bfdcd_clk_src
.clkr
.hw
2659 .flags
= CLK_SET_RATE_PARENT
,
2660 .ops
= &clk_branch2_ops
,
2665 static struct clk_branch gcc_nssnoc_snoc_1_clk
= {
2666 .halt_reg
= 0x1707c,
2668 .enable_reg
= 0x1707c,
2669 .enable_mask
= BIT(0),
2670 .hw
.init
= &(const struct clk_init_data
) {
2671 .name
= "gcc_nssnoc_snoc_1_clk",
2672 .parent_hws
= (const struct clk_hw
*[]) {
2673 &system_noc_bfdcd_clk_src
.clkr
.hw
2676 .flags
= CLK_SET_RATE_PARENT
,
2677 .ops
= &clk_branch2_ops
,
2682 static struct clk_branch gcc_qdss_etr_usb_clk
= {
2683 .halt_reg
= 0x2d060,
2685 .enable_reg
= 0x2d060,
2686 .enable_mask
= BIT(0),
2687 .hw
.init
= &(const struct clk_init_data
) {
2688 .name
= "gcc_qdss_etr_usb_clk",
2689 .parent_hws
= (const struct clk_hw
*[]) {
2690 &system_noc_bfdcd_clk_src
.clkr
.hw
2693 .flags
= CLK_SET_RATE_PARENT
,
2694 .ops
= &clk_branch2_ops
,
2699 static const struct freq_tbl ftbl_wcss_ahb_clk_src
[] = {
2700 F(24000000, P_XO
, 1, 0, 0),
2701 F(133333333, P_GPLL0
, 6, 0, 0),
2705 static struct clk_rcg2 wcss_ahb_clk_src
= {
2706 .cmd_rcgr
= 0x25030,
2707 .freq_tbl
= ftbl_wcss_ahb_clk_src
,
2709 .parent_map
= gcc_xo_gpll0_map
,
2710 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2711 .name
= "wcss_ahb_clk_src",
2712 .parent_data
= gcc_xo_gpll0
,
2713 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
2714 .ops
= &clk_rcg2_ops
,
2718 static const struct freq_tbl ftbl_wcss_axi_m_clk_src
[] = {
2719 F(24000000, P_XO
, 1, 0, 0),
2720 F(133333333, P_GPLL0
, 6, 0, 0),
2721 F(266666667, P_GPLL0
, 3, 0, 0),
2725 static struct clk_rcg2 wcss_axi_m_clk_src
= {
2726 .cmd_rcgr
= 0x25078,
2727 .freq_tbl
= ftbl_wcss_axi_m_clk_src
,
2729 .parent_map
= gcc_xo_gpll0_map
,
2730 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2731 .name
= "wcss_axi_m_clk_src",
2732 .parent_data
= gcc_xo_gpll0
,
2733 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
2734 .ops
= &clk_rcg2_ops
,
2738 static const struct freq_tbl ftbl_qdss_at_clk_src
[] = {
2739 F(240000000, P_GPLL4
, 5, 0, 0),
2743 static struct clk_rcg2 qdss_at_clk_src
= {
2744 .cmd_rcgr
= 0x2d004,
2745 .freq_tbl
= ftbl_qdss_at_clk_src
,
2747 .parent_map
= gcc_xo_gpll4_gpll0_gpll0_div2_map
,
2748 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2749 .name
= "qdss_at_clk_src",
2750 .parent_data
= gcc_xo_gpll4_gpll0_gpll0_div2
,
2751 .num_parents
= ARRAY_SIZE(gcc_xo_gpll4_gpll0_gpll0_div2
),
2752 .ops
= &clk_rcg2_ops
,
2756 static struct clk_branch gcc_nssnoc_atb_clk
= {
2757 .halt_reg
= 0x17014,
2759 .enable_reg
= 0x17014,
2760 .enable_mask
= BIT(0),
2761 .hw
.init
= &(const struct clk_init_data
) {
2762 .name
= "gcc_nssnoc_atb_clk",
2763 .parent_hws
= (const struct clk_hw
*[]) {
2764 &qdss_at_clk_src
.clkr
.hw
2767 .flags
= CLK_SET_RATE_PARENT
,
2768 .ops
= &clk_branch2_ops
,
2773 static struct clk_branch gcc_qdss_at_clk
= {
2774 .halt_reg
= 0x2d038,
2776 .enable_reg
= 0x2d038,
2777 .enable_mask
= BIT(0),
2778 .hw
.init
= &(const struct clk_init_data
) {
2779 .name
= "gcc_qdss_at_clk",
2780 .parent_hws
= (const struct clk_hw
*[]) {
2781 &qdss_at_clk_src
.clkr
.hw
2784 .flags
= CLK_SET_RATE_PARENT
,
2785 .ops
= &clk_branch2_ops
,
2790 static struct clk_branch gcc_sys_noc_at_clk
= {
2791 .halt_reg
= 0x2e038,
2793 .enable_reg
= 0x2e038,
2794 .enable_mask
= BIT(0),
2795 .hw
.init
= &(const struct clk_init_data
) {
2796 .name
= "gcc_sys_noc_at_clk",
2797 .parent_hws
= (const struct clk_hw
*[]) {
2798 &qdss_at_clk_src
.clkr
.hw
2801 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
2802 .ops
= &clk_branch2_ops
,
2807 static struct clk_branch gcc_pcnoc_at_clk
= {
2808 .halt_reg
= 0x31024,
2810 .enable_reg
= 0x31024,
2811 .enable_mask
= BIT(0),
2812 .hw
.init
= &(const struct clk_init_data
) {
2813 .name
= "gcc_pcnoc_at_clk",
2814 .parent_hws
= (const struct clk_hw
*[]) {
2815 &qdss_at_clk_src
.clkr
.hw
2818 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
2819 .ops
= &clk_branch2_ops
,
2824 static struct clk_fixed_factor gcc_eud_at_div_clk_src
= {
2827 .hw
.init
= &(const struct clk_init_data
) {
2828 .name
= "gcc_eud_at_div_clk_src",
2829 .parent_hws
= (const struct clk_hw
*[]) {
2830 &qdss_at_clk_src
.clkr
.hw
2833 .flags
= CLK_SET_RATE_PARENT
,
2834 .ops
= &clk_fixed_factor_ops
,
2838 static struct clk_branch gcc_usb0_eud_at_clk
= {
2839 .halt_reg
= 0x30004,
2841 .enable_reg
= 0x30004,
2842 .enable_mask
= BIT(0),
2843 .hw
.init
= &(const struct clk_init_data
) {
2844 .name
= "gcc_usb0_eud_at_clk",
2845 .parent_hws
= (const struct clk_hw
*[]) {
2846 &gcc_eud_at_div_clk_src
.hw
2849 .flags
= CLK_SET_RATE_PARENT
,
2850 .ops
= &clk_branch2_ops
,
2855 static struct clk_branch gcc_qdss_eud_at_clk
= {
2856 .halt_reg
= 0x2d06c,
2858 .enable_reg
= 0x2d06c,
2859 .enable_mask
= BIT(0),
2860 .hw
.init
= &(const struct clk_init_data
) {
2861 .name
= "gcc_qdss_eud_at_clk",
2862 .parent_hws
= (const struct clk_hw
*[]) {
2863 &gcc_eud_at_div_clk_src
.hw
2866 .flags
= CLK_SET_RATE_PARENT
,
2867 .ops
= &clk_branch2_ops
,
2872 static const struct freq_tbl ftbl_qdss_stm_clk_src
[] = {
2873 F(24000000, P_XO
, 1, 0, 0),
2874 F(200000000, P_GPLL0
, 4, 0, 0),
2878 static struct clk_rcg2 qdss_stm_clk_src
= {
2879 .cmd_rcgr
= 0x2d00c,
2880 .freq_tbl
= ftbl_qdss_stm_clk_src
,
2882 .parent_map
= gcc_xo_gpll0_gpll0_out_main_div2_map
,
2883 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2884 .name
= "qdss_stm_clk_src",
2885 .parent_data
= gcc_xo_gpll0_gpll0_out_main_div2
,
2886 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_out_main_div2
),
2887 .ops
= &clk_rcg2_ops
,
2891 static struct clk_branch gcc_qdss_stm_clk
= {
2892 .halt_reg
= 0x2d03c,
2894 .enable_reg
= 0x2d03c,
2895 .enable_mask
= BIT(0),
2896 .hw
.init
= &(const struct clk_init_data
) {
2897 .name
= "gcc_qdss_stm_clk",
2898 .parent_hws
= (const struct clk_hw
*[]) {
2899 &qdss_stm_clk_src
.clkr
.hw
2902 .flags
= CLK_SET_RATE_PARENT
,
2903 .ops
= &clk_branch2_ops
,
2908 static struct clk_branch gcc_sys_noc_qdss_stm_axi_clk
= {
2909 .halt_reg
= 0x2e034,
2911 .enable_reg
= 0x2e034,
2912 .enable_mask
= BIT(0),
2913 .hw
.init
= &(const struct clk_init_data
) {
2914 .name
= "gcc_sys_noc_qdss_stm_axi_clk",
2915 .parent_hws
= (const struct clk_hw
*[]) {
2916 &qdss_stm_clk_src
.clkr
.hw
2919 .flags
= CLK_SET_RATE_PARENT
,
2920 .ops
= &clk_branch2_ops
,
2925 static const struct freq_tbl ftbl_qdss_traceclkin_clk_src
[] = {
2926 F(300000000, P_GPLL4
, 4, 0, 0),
2930 static struct clk_rcg2 qdss_traceclkin_clk_src
= {
2931 .cmd_rcgr
= 0x2d014,
2932 .freq_tbl
= ftbl_qdss_traceclkin_clk_src
,
2934 .parent_map
= gcc_xo_gpll4_gpll0_gpll0_div2_map
,
2935 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2936 .name
= "qdss_traceclkin_clk_src",
2937 .parent_data
= gcc_xo_gpll4_gpll0_gpll0_div2
,
2938 .num_parents
= ARRAY_SIZE(gcc_xo_gpll4_gpll0_gpll0_div2
),
2939 .ops
= &clk_rcg2_ops
,
2943 static struct clk_branch gcc_qdss_traceclkin_clk
= {
2944 .halt_reg
= 0x2d040,
2946 .enable_reg
= 0x2d040,
2947 .enable_mask
= BIT(0),
2948 .hw
.init
= &(const struct clk_init_data
) {
2949 .name
= "gcc_qdss_traceclkin_clk",
2950 .parent_hws
= (const struct clk_hw
*[]) {
2951 &qdss_traceclkin_clk_src
.clkr
.hw
2954 .flags
= CLK_SET_RATE_PARENT
,
2955 .ops
= &clk_branch2_ops
,
2960 static const struct freq_tbl ftbl_qdss_tsctr_clk_src
[] = {
2961 F(600000000, P_GPLL4
, 2, 0, 0),
2965 static struct clk_rcg2 qdss_tsctr_clk_src
= {
2966 .cmd_rcgr
= 0x2d01c,
2967 .freq_tbl
= ftbl_qdss_tsctr_clk_src
,
2969 .parent_map
= gcc_xo_gpll4_gpll0_gpll0_div2_map
,
2970 .clkr
.hw
.init
= &(const struct clk_init_data
) {
2971 .name
= "qdss_tsctr_clk_src",
2972 .parent_data
= gcc_xo_gpll4_gpll0_gpll0_div2
,
2973 .num_parents
= ARRAY_SIZE(gcc_xo_gpll4_gpll0_gpll0_div2
),
2974 .ops
= &clk_rcg2_ops
,
2978 static struct clk_fixed_factor qdss_tsctr_div2_clk_src
= {
2981 .hw
.init
= &(const struct clk_init_data
) {
2982 .name
= "qdss_tsctr_div2_clk_src",
2983 .parent_hws
= (const struct clk_hw
*[]) {
2984 &qdss_tsctr_clk_src
.clkr
.hw
2987 .flags
= CLK_SET_RATE_PARENT
,
2988 .ops
= &clk_fixed_factor_ops
,
2992 static struct clk_branch gcc_qdss_tsctr_div2_clk
= {
2993 .halt_reg
= 0x2d044,
2995 .enable_reg
= 0x2d044,
2996 .enable_mask
= BIT(0),
2997 .hw
.init
= &(const struct clk_init_data
) {
2998 .name
= "gcc_qdss_tsctr_div2_clk",
2999 .parent_hws
= (const struct clk_hw
*[]) {
3000 &qdss_tsctr_div2_clk_src
.hw
3003 .flags
= CLK_SET_RATE_PARENT
,
3004 .ops
= &clk_branch2_ops
,
3009 static const struct freq_tbl ftbl_uniphy_sys_clk_src
[] = {
3010 F(24000000, P_XO
, 1, 0, 0),
3014 static struct clk_rcg2 uniphy_sys_clk_src
= {
3015 .cmd_rcgr
= 0x17090,
3016 .freq_tbl
= ftbl_uniphy_sys_clk_src
,
3019 .parent_map
= gcc_xo_map
,
3020 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3021 .name
= "uniphy_sys_clk_src",
3022 .parent_data
= gcc_xo_data
,
3023 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
3024 .ops
= &clk_rcg2_ops
,
3028 static struct clk_rcg2 nss_ts_clk_src
= {
3029 .cmd_rcgr
= 0x17088,
3030 .freq_tbl
= ftbl_uniphy_sys_clk_src
,
3033 .parent_map
= gcc_xo_map
,
3034 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3035 .name
= "nss_ts_clk_src",
3036 .parent_data
= gcc_xo_data
,
3037 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
3038 .ops
= &clk_rcg2_ops
,
3042 static struct clk_branch gcc_qdss_ts_clk
= {
3043 .halt_reg
= 0x2d078,
3045 .enable_reg
= 0x2d078,
3046 .enable_mask
= BIT(0),
3047 .hw
.init
= &(const struct clk_init_data
) {
3048 .name
= "gcc_qdss_ts_clk",
3049 .parent_hws
= (const struct clk_hw
*[]) {
3050 &nss_ts_clk_src
.clkr
.hw
3053 .flags
= CLK_SET_RATE_PARENT
,
3054 .ops
= &clk_branch2_ops
,
3059 static struct clk_fixed_factor qdss_dap_sync_clk_src
= {
3062 .hw
.init
= &(const struct clk_init_data
) {
3063 .name
= "qdss_dap_sync_clk_src",
3064 .parent_hws
= (const struct clk_hw
*[]) {
3065 &qdss_tsctr_clk_src
.clkr
.hw
3068 .ops
= &clk_fixed_factor_ops
,
3072 static struct clk_branch gcc_qdss_tsctr_div4_clk
= {
3073 .halt_reg
= 0x2d04c,
3075 .enable_reg
= 0x2d04c,
3076 .enable_mask
= BIT(0),
3077 .hw
.init
= &(const struct clk_init_data
) {
3078 .name
= "gcc_qdss_tsctr_div4_clk",
3079 .parent_hws
= (const struct clk_hw
*[]) {
3080 &qdss_dap_sync_clk_src
.hw
3083 .flags
= CLK_SET_RATE_PARENT
,
3084 .ops
= &clk_branch2_ops
,
3089 static struct clk_fixed_factor qdss_tsctr_div8_clk_src
= {
3092 .hw
.init
= &(const struct clk_init_data
) {
3093 .name
= "qdss_tsctr_div8_clk_src",
3094 .parent_hws
= (const struct clk_hw
*[]) {
3095 &qdss_tsctr_clk_src
.clkr
.hw
3098 .ops
= &clk_fixed_factor_ops
,
3102 static struct clk_branch gcc_nss_ts_clk
= {
3103 .halt_reg
= 0x17018,
3105 .enable_reg
= 0x17018,
3106 .enable_mask
= BIT(0),
3107 .hw
.init
= &(const struct clk_init_data
) {
3108 .name
= "gcc_nss_ts_clk",
3109 .parent_hws
= (const struct clk_hw
*[]) {
3110 &nss_ts_clk_src
.clkr
.hw
3113 .flags
= CLK_SET_RATE_PARENT
,
3114 .ops
= &clk_branch2_ops
,
3119 static struct clk_branch gcc_qdss_tsctr_div8_clk
= {
3120 .halt_reg
= 0x2d050,
3122 .enable_reg
= 0x2d050,
3123 .enable_mask
= BIT(0),
3124 .hw
.init
= &(const struct clk_init_data
) {
3125 .name
= "gcc_qdss_tsctr_div8_clk",
3126 .parent_hws
= (const struct clk_hw
*[]) {
3127 &qdss_tsctr_div8_clk_src
.hw
3130 .flags
= CLK_SET_RATE_PARENT
,
3131 .ops
= &clk_branch2_ops
,
3136 static struct clk_fixed_factor qdss_tsctr_div16_clk_src
= {
3139 .hw
.init
= &(const struct clk_init_data
) {
3140 .name
= "qdss_tsctr_div16_clk_src",
3141 .parent_hws
= (const struct clk_hw
*[]) {
3142 &qdss_tsctr_clk_src
.clkr
.hw
3145 .ops
= &clk_fixed_factor_ops
,
3149 static struct clk_branch gcc_qdss_tsctr_div16_clk
= {
3150 .halt_reg
= 0x2d054,
3152 .enable_reg
= 0x2d054,
3153 .enable_mask
= BIT(0),
3154 .hw
.init
= &(const struct clk_init_data
) {
3155 .name
= "gcc_qdss_tsctr_div16_clk",
3156 .parent_hws
= (const struct clk_hw
*[]) {
3157 &qdss_tsctr_div16_clk_src
.hw
3160 .flags
= CLK_SET_RATE_PARENT
,
3161 .ops
= &clk_branch2_ops
,
3166 static struct clk_branch gcc_qdss_dap_clk
= {
3167 .halt_reg
= 0x2d058,
3169 .enable_reg
= 0x2d058,
3170 .enable_mask
= BIT(0),
3171 .hw
.init
= &(const struct clk_init_data
) {
3172 .name
= "gcc_qdss_dap_clk",
3173 .parent_hws
= (const struct clk_hw
*[]) {
3174 &qdss_dap_sync_clk_src
.hw
3177 .flags
= CLK_SET_RATE_PARENT
,
3178 .ops
= &clk_branch2_ops
,
3183 static struct clk_branch gcc_qdss_apb2jtag_clk
= {
3184 .halt_reg
= 0x2d05c,
3186 .enable_reg
= 0x2d05c,
3187 .enable_mask
= BIT(0),
3188 .hw
.init
= &(const struct clk_init_data
) {
3189 .name
= "gcc_qdss_apb2jtag_clk",
3190 .parent_hws
= (const struct clk_hw
*[]) {
3191 &qdss_dap_sync_clk_src
.hw
3194 .flags
= CLK_SET_RATE_PARENT
,
3195 .ops
= &clk_branch2_ops
,
3200 static struct clk_fixed_factor qdss_tsctr_div3_clk_src
= {
3203 .hw
.init
= &(const struct clk_init_data
) {
3204 .name
= "qdss_tsctr_div3_clk_src",
3205 .parent_hws
= (const struct clk_hw
*[]) {
3206 &qdss_tsctr_clk_src
.clkr
.hw
3209 .ops
= &clk_fixed_factor_ops
,
3213 static struct clk_branch gcc_qdss_tsctr_div3_clk
= {
3214 .halt_reg
= 0x2d048,
3216 .enable_reg
= 0x2d048,
3217 .enable_mask
= BIT(0),
3218 .hw
.init
= &(const struct clk_init_data
) {
3219 .name
= "gcc_qdss_tsctr_div3_clk",
3220 .parent_hws
= (const struct clk_hw
*[]) {
3221 &qdss_tsctr_div3_clk_src
.hw
3224 .flags
= CLK_SET_RATE_PARENT
,
3225 .ops
= &clk_branch2_ops
,
3230 static const struct freq_tbl ftbl_qpic_io_macro_clk_src
[] = {
3231 F(24000000, P_XO
, 1, 0, 0),
3232 F(100000000, P_GPLL0
, 8, 0, 0),
3233 F(200000000, P_GPLL0
, 4, 0, 0),
3234 F(320000000, P_GPLL0
, 2.5, 0, 0),
3235 F(400000000, P_GPLL0
, 2, 0, 0),
3239 static struct clk_rcg2 qpic_io_macro_clk_src
= {
3240 .cmd_rcgr
= 0x32004,
3241 .freq_tbl
= ftbl_qpic_io_macro_clk_src
,
3243 .parent_map
= gcc_xo_gpll0_gpll2_map
,
3244 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3245 .name
= "qpic_io_macro_clk_src",
3246 .parent_data
= gcc_xo_gpll0_gpll2
,
3247 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2
),
3248 .ops
= &clk_rcg2_ops
,
3252 static struct clk_branch gcc_qpic_io_macro_clk
= {
3253 .halt_reg
= 0x3200c,
3255 .enable_reg
= 0x3200c,
3256 .enable_mask
= BIT(0),
3257 .hw
.init
= &(const struct clk_init_data
){
3258 .name
= "gcc_qpic_io_macro_clk",
3259 .parent_hws
= (const struct clk_hw
*[]){
3260 &qpic_io_macro_clk_src
.clkr
.hw
3263 .flags
= CLK_SET_RATE_PARENT
,
3264 .ops
= &clk_branch2_ops
,
3269 static const struct freq_tbl ftbl_q6_axi_clk_src
[] = {
3270 F(533333333, P_GPLL0
, 1.5, 0, 0),
3274 static struct clk_rcg2 q6_axi_clk_src
= {
3275 .cmd_rcgr
= 0x25004,
3276 .freq_tbl
= ftbl_q6_axi_clk_src
,
3278 .parent_map
= gcc_xo_gpll0_gpll2_gpll4_pi_sleep_map
,
3279 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3280 .name
= "q6_axi_clk_src",
3281 .parent_data
= gcc_xo_gpll0_gpll2_gpll4_pi_sleep
,
3282 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll2_gpll4_pi_sleep
),
3283 .ops
= &clk_rcg2_ops
,
3287 static const struct freq_tbl ftbl_q6_axim2_clk_src
[] = {
3288 F(342857143, P_GPLL4
, 3.5, 0, 0),
3292 static const struct parent_map gcc_xo_gpll0_gpll4_bias_pll_ubinc_clk_map
[] = {
3296 { P_BIAS_PLL_UBI_NC_CLK
, 4 },
3299 static struct clk_rcg2 q6_axim2_clk_src
= {
3300 .cmd_rcgr
= 0x25028,
3301 .freq_tbl
= ftbl_q6_axim2_clk_src
,
3303 .parent_map
= gcc_xo_gpll0_gpll4_bias_pll_ubinc_clk_map
,
3304 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3305 .name
= "q6_axim2_clk_src",
3306 .parent_data
= gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
,
3307 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4_bias_pll_ubi_nc_clk
),
3308 .ops
= &clk_rcg2_ops
,
3312 static const struct freq_tbl ftbl_nssnoc_memnoc_bfdcd_clk_src
[] = {
3313 F(533333333, P_GPLL0
, 1.5, 0, 0),
3317 static struct clk_rcg2 nssnoc_memnoc_bfdcd_clk_src
= {
3318 .cmd_rcgr
= 0x17004,
3319 .freq_tbl
= ftbl_nssnoc_memnoc_bfdcd_clk_src
,
3321 .parent_map
= gcc_xo_gpll0_gpll0_aux_gpll2_map
,
3322 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3323 .name
= "nssnoc_memnoc_bfdcd_clk_src",
3324 .parent_data
= gcc_xo_gpll0_gpll0_aux_gpll2
,
3325 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_aux_gpll2
),
3326 .ops
= &clk_rcg2_ops
,
3330 static struct clk_branch gcc_nssnoc_memnoc_clk
= {
3331 .halt_reg
= 0x17024,
3333 .enable_reg
= 0x17024,
3334 .enable_mask
= BIT(0),
3335 .hw
.init
= &(const struct clk_init_data
) {
3336 .name
= "gcc_nssnoc_memnoc_clk",
3337 .parent_hws
= (const struct clk_hw
*[]) {
3338 &nssnoc_memnoc_bfdcd_clk_src
.clkr
.hw
3341 .flags
= CLK_SET_RATE_PARENT
,
3342 .ops
= &clk_branch2_ops
,
3347 static struct clk_branch gcc_nssnoc_mem_noc_1_clk
= {
3348 .halt_reg
= 0x17084,
3350 .enable_reg
= 0x17084,
3351 .enable_mask
= BIT(0),
3352 .hw
.init
= &(const struct clk_init_data
) {
3353 .name
= "gcc_nssnoc_mem_noc_1_clk",
3354 .parent_hws
= (const struct clk_hw
*[]) {
3355 &nssnoc_memnoc_bfdcd_clk_src
.clkr
.hw
3358 .flags
= CLK_SET_RATE_PARENT
,
3359 .ops
= &clk_branch2_ops
,
3364 static struct clk_branch gcc_nss_tbu_clk
= {
3365 .halt_reg
= 0x12040,
3367 .enable_reg
= 0xb00c,
3368 .enable_mask
= BIT(4),
3369 .hw
.init
= &(const struct clk_init_data
) {
3370 .name
= "gcc_nss_tbu_clk",
3371 .parent_hws
= (const struct clk_hw
*[]) {
3372 &nssnoc_memnoc_bfdcd_clk_src
.clkr
.hw
3375 .flags
= CLK_SET_RATE_PARENT
,
3376 .ops
= &clk_branch2_ops
,
3381 static struct clk_branch gcc_mem_noc_nssnoc_clk
= {
3382 .halt_reg
= 0x19014,
3384 .enable_reg
= 0x19014,
3385 .enable_mask
= BIT(0),
3386 .hw
.init
= &(const struct clk_init_data
) {
3387 .name
= "gcc_mem_noc_nssnoc_clk",
3388 .parent_hws
= (const struct clk_hw
*[]) {
3389 &nssnoc_memnoc_bfdcd_clk_src
.clkr
.hw
3392 .flags
= CLK_SET_RATE_PARENT
,
3393 .ops
= &clk_branch2_ops
,
3398 static const struct freq_tbl ftbl_lpass_axim_clk_src
[] = {
3399 F(133333333, P_GPLL0
, 6, 0, 0),
3403 static struct clk_rcg2 lpass_axim_clk_src
= {
3404 .cmd_rcgr
= 0x2700c,
3405 .freq_tbl
= ftbl_lpass_axim_clk_src
,
3407 .parent_map
= gcc_xo_gpll0_map
,
3408 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3409 .name
= "lpass_axim_clk_src",
3410 .parent_data
= gcc_xo_gpll0
,
3411 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
3412 .ops
= &clk_rcg2_ops
,
3416 static struct clk_rcg2 lpass_sway_clk_src
= {
3417 .cmd_rcgr
= 0x27004,
3418 .freq_tbl
= ftbl_lpass_axim_clk_src
,
3420 .parent_map
= gcc_xo_gpll0_map
,
3421 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3422 .name
= "lpass_sway_clk_src",
3423 .parent_data
= gcc_xo_gpll0
,
3424 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
3425 .ops
= &clk_rcg2_ops
,
3429 static const struct freq_tbl ftbl_adss_pwm_clk_src
[] = {
3430 F(24000000, P_XO
, 1, 0, 0),
3431 F(100000000, P_GPLL0
, 8, 0, 0),
3435 static struct clk_rcg2 adss_pwm_clk_src
= {
3436 .cmd_rcgr
= 0x1c004,
3437 .freq_tbl
= ftbl_adss_pwm_clk_src
,
3439 .parent_map
= gcc_xo_gpll0_map
,
3440 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3441 .name
= "adss_pwm_clk_src",
3442 .parent_data
= gcc_xo_gpll0
,
3443 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
3444 .ops
= &clk_rcg2_ops
,
3448 static struct clk_branch gcc_adss_pwm_clk
= {
3449 .halt_reg
= 0x1c00c,
3451 .enable_reg
= 0x1c00c,
3452 .enable_mask
= BIT(0),
3453 .hw
.init
= &(const struct clk_init_data
) {
3454 .name
= "gcc_adss_pwm_clk",
3455 .parent_hws
= (const struct clk_hw
*[]) {
3456 &adss_pwm_clk_src
.clkr
.hw
3459 .flags
= CLK_SET_RATE_PARENT
,
3460 .ops
= &clk_branch2_ops
,
3465 static const struct freq_tbl ftbl_gp1_clk_src
[] = {
3466 F(24000000, P_XO
, 1, 0, 0),
3467 F(200000000, P_GPLL0
, 4, 0, 0),
3471 static struct clk_rcg2 gp1_clk_src
= {
3473 .freq_tbl
= ftbl_gp1_clk_src
,
3475 .parent_map
= gcc_xo_gpll0_gpll0_sleep_clk_map
,
3476 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3477 .name
= "gp1_clk_src",
3478 .parent_data
= gcc_xo_gpll0_gpll0_sleep_clk
,
3479 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_sleep_clk
),
3480 .ops
= &clk_rcg2_ops
,
3484 static struct clk_rcg2 gp2_clk_src
= {
3486 .freq_tbl
= ftbl_gp1_clk_src
,
3488 .parent_map
= gcc_xo_gpll0_gpll0_sleep_clk_map
,
3489 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3490 .name
= "gp2_clk_src",
3491 .parent_data
= gcc_xo_gpll0_gpll0_sleep_clk
,
3492 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_sleep_clk
),
3493 .ops
= &clk_rcg2_ops
,
3497 static struct clk_rcg2 gp3_clk_src
= {
3499 .freq_tbl
= ftbl_gp1_clk_src
,
3501 .parent_map
= gcc_xo_gpll0_gpll0_sleep_clk_map
,
3502 .clkr
.hw
.init
= &(const struct clk_init_data
) {
3503 .name
= "gp3_clk_src",
3504 .parent_data
= gcc_xo_gpll0_gpll0_sleep_clk
,
3505 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll0_sleep_clk
),
3506 .ops
= &clk_rcg2_ops
,
3510 static struct clk_branch gcc_xo_clk_src
= {
3511 .halt_reg
= 0x34004,
3513 .enable_reg
= 0x34004,
3514 .enable_mask
= BIT(1),
3515 .hw
.init
= &(const struct clk_init_data
) {
3516 .name
= "gcc_xo_clk_src",
3517 .parent_data
= gcc_xo_data
,
3518 .num_parents
= ARRAY_SIZE(gcc_xo_data
),
3519 .flags
= CLK_SET_RATE_PARENT
,
3520 .ops
= &clk_branch2_ops
,
3525 static struct clk_branch gcc_nssnoc_xo_dcd_clk
= {
3526 .halt_reg
= 0x17074,
3528 .enable_reg
= 0x17074,
3529 .enable_mask
= BIT(0),
3530 .hw
.init
= &(const struct clk_init_data
) {
3531 .name
= "gcc_nssnoc_xo_dcd_clk",
3532 .parent_hws
= (const struct clk_hw
*[]) {
3533 &gcc_xo_clk_src
.clkr
.hw
3536 .flags
= CLK_SET_RATE_PARENT
,
3537 .ops
= &clk_branch2_ops
,
3542 static struct clk_branch gcc_xo_clk
= {
3543 .halt_reg
= 0x34018,
3545 .enable_reg
= 0x34018,
3546 .enable_mask
= BIT(0),
3547 .hw
.init
= &(const struct clk_init_data
) {
3548 .name
= "gcc_xo_clk",
3549 .parent_hws
= (const struct clk_hw
*[]) {
3550 &gcc_xo_clk_src
.clkr
.hw
3553 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
3554 .ops
= &clk_branch2_ops
,
3559 static struct clk_branch gcc_uniphy0_sys_clk
= {
3560 .halt_reg
= 0x17048,
3562 .enable_reg
= 0x17048,
3563 .enable_mask
= BIT(0),
3564 .hw
.init
= &(const struct clk_init_data
) {
3565 .name
= "gcc_uniphy0_sys_clk",
3566 .parent_hws
= (const struct clk_hw
*[]) {
3567 &uniphy_sys_clk_src
.clkr
.hw
3570 .flags
= CLK_SET_RATE_PARENT
,
3571 .ops
= &clk_branch2_ops
,
3576 static struct clk_branch gcc_uniphy1_sys_clk
= {
3577 .halt_reg
= 0x17058,
3579 .enable_reg
= 0x17058,
3580 .enable_mask
= BIT(0),
3581 .hw
.init
= &(const struct clk_init_data
) {
3582 .name
= "gcc_uniphy1_sys_clk",
3583 .parent_hws
= (const struct clk_hw
*[]) {
3584 &uniphy_sys_clk_src
.clkr
.hw
3587 .flags
= CLK_SET_RATE_PARENT
,
3588 .ops
= &clk_branch2_ops
,
3593 static struct clk_branch gcc_uniphy2_sys_clk
= {
3594 .halt_reg
= 0x17068,
3596 .enable_reg
= 0x17068,
3597 .enable_mask
= BIT(0),
3598 .hw
.init
= &(const struct clk_init_data
) {
3599 .name
= "gcc_uniphy2_sys_clk",
3600 .parent_hws
= (const struct clk_hw
*[]) {
3601 &uniphy_sys_clk_src
.clkr
.hw
3604 .flags
= CLK_SET_RATE_PARENT
,
3605 .ops
= &clk_branch2_ops
,
3610 static struct clk_branch gcc_cmn_12gpll_sys_clk
= {
3611 .halt_reg
= 0x3a008,
3613 .enable_reg
= 0x3a008,
3614 .enable_mask
= BIT(0),
3615 .hw
.init
= &(const struct clk_init_data
) {
3616 .name
= "gcc_cmn_12gpll_sys_clk",
3617 .parent_hws
= (const struct clk_hw
*[]) {
3618 &uniphy_sys_clk_src
.clkr
.hw
3621 .flags
= CLK_SET_RATE_PARENT
,
3622 .ops
= &clk_branch2_ops
,
3627 static struct clk_fixed_factor gcc_xo_div4_clk_src
= {
3630 .hw
.init
= &(const struct clk_init_data
) {
3631 .name
= "gcc_xo_div4_clk_src",
3632 .parent_hws
= (const struct clk_hw
*[]) {
3633 &gcc_xo_clk_src
.clkr
.hw
3636 .flags
= CLK_SET_RATE_PARENT
,
3637 .ops
= &clk_fixed_factor_ops
,
3641 static struct clk_branch gcc_nssnoc_qosgen_ref_clk
= {
3642 .halt_reg
= 0x1701c,
3644 .enable_reg
= 0x1701c,
3645 .enable_mask
= BIT(0),
3646 .hw
.init
= &(const struct clk_init_data
) {
3647 .name
= "gcc_nssnoc_qosgen_ref_clk",
3648 .parent_hws
= (const struct clk_hw
*[]) {
3649 &gcc_xo_div4_clk_src
.hw
3652 .flags
= CLK_SET_RATE_PARENT
,
3653 .ops
= &clk_branch2_ops
,
3658 static struct clk_branch gcc_nssnoc_timeout_ref_clk
= {
3659 .halt_reg
= 0x17020,
3661 .enable_reg
= 0x17020,
3662 .enable_mask
= BIT(0),
3663 .hw
.init
= &(const struct clk_init_data
) {
3664 .name
= "gcc_nssnoc_timeout_ref_clk",
3665 .parent_hws
= (const struct clk_hw
*[]) {
3666 &gcc_xo_div4_clk_src
.hw
3669 .flags
= CLK_SET_RATE_PARENT
,
3670 .ops
= &clk_branch2_ops
,
3675 static struct clk_branch gcc_xo_div4_clk
= {
3676 .halt_reg
= 0x3401c,
3678 .enable_reg
= 0x3401c,
3679 .enable_mask
= BIT(0),
3680 .hw
.init
= &(const struct clk_init_data
) {
3681 .name
= "gcc_xo_div4_clk",
3682 .parent_hws
= (const struct clk_hw
*[]) {
3683 &gcc_xo_div4_clk_src
.hw
3686 .flags
= CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
,
3687 .ops
= &clk_branch2_ops
,
3692 static struct clk_hw
*gcc_ipq9574_hws
[] = {
3693 &gpll0_out_main_div2
.hw
,
3694 &gcc_xo_div4_clk_src
.hw
,
3695 &qdss_dap_sync_clk_src
.hw
,
3696 &qdss_tsctr_div2_clk_src
.hw
,
3697 &qdss_tsctr_div8_clk_src
.hw
,
3698 &qdss_tsctr_div16_clk_src
.hw
,
3699 &qdss_tsctr_div3_clk_src
.hw
,
3700 &gcc_eud_at_div_clk_src
.hw
,
3703 static struct clk_regmap
*gcc_ipq9574_clks
[] = {
3704 [GPLL0_MAIN
] = &gpll0_main
.clkr
,
3705 [GPLL0
] = &gpll0
.clkr
,
3706 [GPLL4_MAIN
] = &gpll4_main
.clkr
,
3707 [GPLL4
] = &gpll4
.clkr
,
3708 [GPLL2_MAIN
] = &gpll2_main
.clkr
,
3709 [GPLL2
] = &gpll2
.clkr
,
3710 [GCC_SLEEP_CLK_SRC
] = &gcc_sleep_clk_src
.clkr
,
3711 [APSS_AHB_CLK_SRC
] = &apss_ahb_clk_src
.clkr
,
3712 [APSS_AXI_CLK_SRC
] = &apss_axi_clk_src
.clkr
,
3713 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
3714 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
3715 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
3716 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
3717 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
3718 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
3719 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
3720 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
3721 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
3722 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
3723 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
3724 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
3725 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
3726 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
3727 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
3728 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
3729 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
3730 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
3731 [GCC_APSS_AHB_CLK
] = &gcc_apss_ahb_clk
.clkr
,
3732 [GCC_APSS_AXI_CLK
] = &gcc_apss_axi_clk
.clkr
,
3733 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
3734 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
3735 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
3736 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
3737 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
3738 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
3739 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
3740 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
3741 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
3742 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
3743 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
3744 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
3745 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
3746 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
3747 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
3748 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
3749 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
3750 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
3751 [GCC_CRYPTO_AHB_CLK
] = &gcc_crypto_ahb_clk
.clkr
,
3752 [GCC_CRYPTO_AXI_CLK
] = &gcc_crypto_axi_clk
.clkr
,
3753 [GCC_CRYPTO_CLK
] = &gcc_crypto_clk
.clkr
,
3754 [GCC_CRYPTO_CLK_SRC
] = &gcc_crypto_clk_src
.clkr
,
3755 [PCIE0_AXI_M_CLK_SRC
] = &pcie0_axi_m_clk_src
.clkr
,
3756 [GCC_PCIE0_AXI_M_CLK
] = &gcc_pcie0_axi_m_clk
.clkr
,
3757 [PCIE1_AXI_M_CLK_SRC
] = &pcie1_axi_m_clk_src
.clkr
,
3758 [GCC_PCIE1_AXI_M_CLK
] = &gcc_pcie1_axi_m_clk
.clkr
,
3759 [PCIE2_AXI_M_CLK_SRC
] = &pcie2_axi_m_clk_src
.clkr
,
3760 [GCC_PCIE2_AXI_M_CLK
] = &gcc_pcie2_axi_m_clk
.clkr
,
3761 [PCIE3_AXI_M_CLK_SRC
] = &pcie3_axi_m_clk_src
.clkr
,
3762 [GCC_PCIE3_AXI_M_CLK
] = &gcc_pcie3_axi_m_clk
.clkr
,
3763 [PCIE0_AXI_S_CLK_SRC
] = &pcie0_axi_s_clk_src
.clkr
,
3764 [GCC_PCIE0_AXI_S_BRIDGE_CLK
] = &gcc_pcie0_axi_s_bridge_clk
.clkr
,
3765 [GCC_PCIE0_AXI_S_CLK
] = &gcc_pcie0_axi_s_clk
.clkr
,
3766 [PCIE1_AXI_S_CLK_SRC
] = &pcie1_axi_s_clk_src
.clkr
,
3767 [GCC_PCIE1_AXI_S_BRIDGE_CLK
] = &gcc_pcie1_axi_s_bridge_clk
.clkr
,
3768 [GCC_PCIE1_AXI_S_CLK
] = &gcc_pcie1_axi_s_clk
.clkr
,
3769 [PCIE2_AXI_S_CLK_SRC
] = &pcie2_axi_s_clk_src
.clkr
,
3770 [GCC_PCIE2_AXI_S_BRIDGE_CLK
] = &gcc_pcie2_axi_s_bridge_clk
.clkr
,
3771 [GCC_PCIE2_AXI_S_CLK
] = &gcc_pcie2_axi_s_clk
.clkr
,
3772 [PCIE3_AXI_S_CLK_SRC
] = &pcie3_axi_s_clk_src
.clkr
,
3773 [GCC_PCIE3_AXI_S_BRIDGE_CLK
] = &gcc_pcie3_axi_s_bridge_clk
.clkr
,
3774 [GCC_PCIE3_AXI_S_CLK
] = &gcc_pcie3_axi_s_clk
.clkr
,
3775 [PCIE0_PIPE_CLK_SRC
] = &pcie0_pipe_clk_src
.clkr
,
3776 [PCIE1_PIPE_CLK_SRC
] = &pcie1_pipe_clk_src
.clkr
,
3777 [PCIE2_PIPE_CLK_SRC
] = &pcie2_pipe_clk_src
.clkr
,
3778 [PCIE3_PIPE_CLK_SRC
] = &pcie3_pipe_clk_src
.clkr
,
3779 [PCIE_AUX_CLK_SRC
] = &pcie_aux_clk_src
.clkr
,
3780 [GCC_PCIE0_AUX_CLK
] = &gcc_pcie0_aux_clk
.clkr
,
3781 [GCC_PCIE1_AUX_CLK
] = &gcc_pcie1_aux_clk
.clkr
,
3782 [GCC_PCIE2_AUX_CLK
] = &gcc_pcie2_aux_clk
.clkr
,
3783 [GCC_PCIE3_AUX_CLK
] = &gcc_pcie3_aux_clk
.clkr
,
3784 [PCIE0_RCHNG_CLK_SRC
] = &pcie0_rchng_clk_src
.clkr
,
3785 [GCC_PCIE0_RCHNG_CLK
] = &gcc_pcie0_rchng_clk
.clkr
,
3786 [PCIE1_RCHNG_CLK_SRC
] = &pcie1_rchng_clk_src
.clkr
,
3787 [GCC_PCIE1_RCHNG_CLK
] = &gcc_pcie1_rchng_clk
.clkr
,
3788 [PCIE2_RCHNG_CLK_SRC
] = &pcie2_rchng_clk_src
.clkr
,
3789 [GCC_PCIE2_RCHNG_CLK
] = &gcc_pcie2_rchng_clk
.clkr
,
3790 [PCIE3_RCHNG_CLK_SRC
] = &pcie3_rchng_clk_src
.clkr
,
3791 [GCC_PCIE3_RCHNG_CLK
] = &gcc_pcie3_rchng_clk
.clkr
,
3792 [GCC_PCIE0_AHB_CLK
] = &gcc_pcie0_ahb_clk
.clkr
,
3793 [GCC_PCIE1_AHB_CLK
] = &gcc_pcie1_ahb_clk
.clkr
,
3794 [GCC_PCIE2_AHB_CLK
] = &gcc_pcie2_ahb_clk
.clkr
,
3795 [GCC_PCIE3_AHB_CLK
] = &gcc_pcie3_ahb_clk
.clkr
,
3796 [USB0_AUX_CLK_SRC
] = &usb0_aux_clk_src
.clkr
,
3797 [GCC_USB0_AUX_CLK
] = &gcc_usb0_aux_clk
.clkr
,
3798 [USB0_MASTER_CLK_SRC
] = &usb0_master_clk_src
.clkr
,
3799 [GCC_USB0_MASTER_CLK
] = &gcc_usb0_master_clk
.clkr
,
3800 [GCC_SNOC_USB_CLK
] = &gcc_snoc_usb_clk
.clkr
,
3801 [GCC_ANOC_USB_AXI_CLK
] = &gcc_anoc_usb_axi_clk
.clkr
,
3802 [USB0_MOCK_UTMI_CLK_SRC
] = &usb0_mock_utmi_clk_src
.clkr
,
3803 [USB0_MOCK_UTMI_DIV_CLK_SRC
] = &usb0_mock_utmi_div_clk_src
.clkr
,
3804 [GCC_USB0_MOCK_UTMI_CLK
] = &gcc_usb0_mock_utmi_clk
.clkr
,
3805 [USB0_PIPE_CLK_SRC
] = &usb0_pipe_clk_src
.clkr
,
3806 [GCC_USB0_PHY_CFG_AHB_CLK
] = &gcc_usb0_phy_cfg_ahb_clk
.clkr
,
3807 [GCC_USB0_PIPE_CLK
] = &gcc_usb0_pipe_clk
.clkr
,
3808 [GCC_USB0_SLEEP_CLK
] = &gcc_usb0_sleep_clk
.clkr
,
3809 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
3810 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
3811 [SDCC1_ICE_CORE_CLK_SRC
] = &sdcc1_ice_core_clk_src
.clkr
,
3812 [GCC_SDCC1_ICE_CORE_CLK
] = &gcc_sdcc1_ice_core_clk
.clkr
,
3813 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
3814 [PCNOC_BFDCD_CLK_SRC
] = &pcnoc_bfdcd_clk_src
.clkr
,
3815 [GCC_NSSCFG_CLK
] = &gcc_nsscfg_clk
.clkr
,
3816 [GCC_NSSNOC_NSSCC_CLK
] = &gcc_nssnoc_nsscc_clk
.clkr
,
3817 [GCC_NSSCC_CLK
] = &gcc_nsscc_clk
.clkr
,
3818 [GCC_NSSNOC_PCNOC_1_CLK
] = &gcc_nssnoc_pcnoc_1_clk
.clkr
,
3819 [GCC_QDSS_DAP_AHB_CLK
] = &gcc_qdss_dap_ahb_clk
.clkr
,
3820 [GCC_QDSS_CFG_AHB_CLK
] = &gcc_qdss_cfg_ahb_clk
.clkr
,
3821 [GCC_QPIC_AHB_CLK
] = &gcc_qpic_ahb_clk
.clkr
,
3822 [GCC_QPIC_CLK
] = &gcc_qpic_clk
.clkr
,
3823 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
3824 [GCC_MDIO_AHB_CLK
] = &gcc_mdio_ahb_clk
.clkr
,
3825 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
3826 [GCC_UNIPHY0_AHB_CLK
] = &gcc_uniphy0_ahb_clk
.clkr
,
3827 [GCC_UNIPHY1_AHB_CLK
] = &gcc_uniphy1_ahb_clk
.clkr
,
3828 [GCC_UNIPHY2_AHB_CLK
] = &gcc_uniphy2_ahb_clk
.clkr
,
3829 [GCC_CMN_12GPLL_AHB_CLK
] = &gcc_cmn_12gpll_ahb_clk
.clkr
,
3830 [GCC_CMN_12GPLL_APU_CLK
] = &gcc_cmn_12gpll_apu_clk
.clkr
,
3831 [SYSTEM_NOC_BFDCD_CLK_SRC
] = &system_noc_bfdcd_clk_src
.clkr
,
3832 [GCC_NSSNOC_SNOC_CLK
] = &gcc_nssnoc_snoc_clk
.clkr
,
3833 [GCC_NSSNOC_SNOC_1_CLK
] = &gcc_nssnoc_snoc_1_clk
.clkr
,
3834 [GCC_QDSS_ETR_USB_CLK
] = &gcc_qdss_etr_usb_clk
.clkr
,
3835 [WCSS_AHB_CLK_SRC
] = &wcss_ahb_clk_src
.clkr
,
3836 [WCSS_AXI_M_CLK_SRC
] = &wcss_axi_m_clk_src
.clkr
,
3837 [QDSS_AT_CLK_SRC
] = &qdss_at_clk_src
.clkr
,
3838 [GCC_NSSNOC_ATB_CLK
] = &gcc_nssnoc_atb_clk
.clkr
,
3839 [GCC_QDSS_AT_CLK
] = &gcc_qdss_at_clk
.clkr
,
3840 [GCC_SYS_NOC_AT_CLK
] = &gcc_sys_noc_at_clk
.clkr
,
3841 [GCC_PCNOC_AT_CLK
] = &gcc_pcnoc_at_clk
.clkr
,
3842 [GCC_USB0_EUD_AT_CLK
] = &gcc_usb0_eud_at_clk
.clkr
,
3843 [GCC_QDSS_EUD_AT_CLK
] = &gcc_qdss_eud_at_clk
.clkr
,
3844 [QDSS_STM_CLK_SRC
] = &qdss_stm_clk_src
.clkr
,
3845 [GCC_QDSS_STM_CLK
] = &gcc_qdss_stm_clk
.clkr
,
3846 [GCC_SYS_NOC_QDSS_STM_AXI_CLK
] = &gcc_sys_noc_qdss_stm_axi_clk
.clkr
,
3847 [QDSS_TRACECLKIN_CLK_SRC
] = &qdss_traceclkin_clk_src
.clkr
,
3848 [GCC_QDSS_TRACECLKIN_CLK
] = &gcc_qdss_traceclkin_clk
.clkr
,
3849 [QDSS_TSCTR_CLK_SRC
] = &qdss_tsctr_clk_src
.clkr
,
3850 [GCC_QDSS_TSCTR_DIV2_CLK
] = &gcc_qdss_tsctr_div2_clk
.clkr
,
3851 [GCC_QDSS_TS_CLK
] = &gcc_qdss_ts_clk
.clkr
,
3852 [GCC_QDSS_TSCTR_DIV4_CLK
] = &gcc_qdss_tsctr_div4_clk
.clkr
,
3853 [GCC_NSS_TS_CLK
] = &gcc_nss_ts_clk
.clkr
,
3854 [GCC_QDSS_TSCTR_DIV8_CLK
] = &gcc_qdss_tsctr_div8_clk
.clkr
,
3855 [GCC_QDSS_TSCTR_DIV16_CLK
] = &gcc_qdss_tsctr_div16_clk
.clkr
,
3856 [GCC_QDSS_DAP_CLK
] = &gcc_qdss_dap_clk
.clkr
,
3857 [GCC_QDSS_APB2JTAG_CLK
] = &gcc_qdss_apb2jtag_clk
.clkr
,
3858 [GCC_QDSS_TSCTR_DIV3_CLK
] = &gcc_qdss_tsctr_div3_clk
.clkr
,
3859 [QPIC_IO_MACRO_CLK_SRC
] = &qpic_io_macro_clk_src
.clkr
,
3860 [GCC_QPIC_IO_MACRO_CLK
] = &gcc_qpic_io_macro_clk
.clkr
,
3861 [Q6_AXI_CLK_SRC
] = &q6_axi_clk_src
.clkr
,
3862 [Q6_AXIM2_CLK_SRC
] = &q6_axim2_clk_src
.clkr
,
3863 [NSSNOC_MEMNOC_BFDCD_CLK_SRC
] = &nssnoc_memnoc_bfdcd_clk_src
.clkr
,
3864 [GCC_NSSNOC_MEMNOC_CLK
] = &gcc_nssnoc_memnoc_clk
.clkr
,
3865 [GCC_NSSNOC_MEM_NOC_1_CLK
] = &gcc_nssnoc_mem_noc_1_clk
.clkr
,
3866 [GCC_NSS_TBU_CLK
] = &gcc_nss_tbu_clk
.clkr
,
3867 [GCC_MEM_NOC_NSSNOC_CLK
] = &gcc_mem_noc_nssnoc_clk
.clkr
,
3868 [LPASS_AXIM_CLK_SRC
] = &lpass_axim_clk_src
.clkr
,
3869 [LPASS_SWAY_CLK_SRC
] = &lpass_sway_clk_src
.clkr
,
3870 [ADSS_PWM_CLK_SRC
] = &adss_pwm_clk_src
.clkr
,
3871 [GCC_ADSS_PWM_CLK
] = &gcc_adss_pwm_clk
.clkr
,
3872 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
3873 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
3874 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
3875 [GCC_XO_CLK_SRC
] = &gcc_xo_clk_src
.clkr
,
3876 [GCC_NSSNOC_XO_DCD_CLK
] = &gcc_nssnoc_xo_dcd_clk
.clkr
,
3877 [GCC_XO_CLK
] = &gcc_xo_clk
.clkr
,
3878 [GCC_NSSNOC_QOSGEN_REF_CLK
] = &gcc_nssnoc_qosgen_ref_clk
.clkr
,
3879 [GCC_NSSNOC_TIMEOUT_REF_CLK
] = &gcc_nssnoc_timeout_ref_clk
.clkr
,
3880 [GCC_XO_DIV4_CLK
] = &gcc_xo_div4_clk
.clkr
,
3881 [GCC_UNIPHY0_SYS_CLK
] = &gcc_uniphy0_sys_clk
.clkr
,
3882 [GCC_UNIPHY1_SYS_CLK
] = &gcc_uniphy1_sys_clk
.clkr
,
3883 [GCC_UNIPHY2_SYS_CLK
] = &gcc_uniphy2_sys_clk
.clkr
,
3884 [GCC_CMN_12GPLL_SYS_CLK
] = &gcc_cmn_12gpll_sys_clk
.clkr
,
3885 [UNIPHY_SYS_CLK_SRC
] = &uniphy_sys_clk_src
.clkr
,
3886 [NSS_TS_CLK_SRC
] = &nss_ts_clk_src
.clkr
,
3887 [GCC_ANOC_PCIE0_1LANE_M_CLK
] = &gcc_anoc_pcie0_1lane_m_clk
.clkr
,
3888 [GCC_ANOC_PCIE1_1LANE_M_CLK
] = &gcc_anoc_pcie1_1lane_m_clk
.clkr
,
3889 [GCC_ANOC_PCIE2_2LANE_M_CLK
] = &gcc_anoc_pcie2_2lane_m_clk
.clkr
,
3890 [GCC_ANOC_PCIE3_2LANE_M_CLK
] = &gcc_anoc_pcie3_2lane_m_clk
.clkr
,
3891 [GCC_SNOC_PCIE0_1LANE_S_CLK
] = &gcc_snoc_pcie0_1lane_s_clk
.clkr
,
3892 [GCC_SNOC_PCIE1_1LANE_S_CLK
] = &gcc_snoc_pcie1_1lane_s_clk
.clkr
,
3893 [GCC_SNOC_PCIE2_2LANE_S_CLK
] = &gcc_snoc_pcie2_2lane_s_clk
.clkr
,
3894 [GCC_SNOC_PCIE3_2LANE_S_CLK
] = &gcc_snoc_pcie3_2lane_s_clk
.clkr
,
3895 [GCC_PCIE0_PIPE_CLK
] = &gcc_pcie0_pipe_clk
.clkr
,
3896 [GCC_PCIE1_PIPE_CLK
] = &gcc_pcie1_pipe_clk
.clkr
,
3897 [GCC_PCIE2_PIPE_CLK
] = &gcc_pcie2_pipe_clk
.clkr
,
3898 [GCC_PCIE3_PIPE_CLK
] = &gcc_pcie3_pipe_clk
.clkr
,
3901 static const struct qcom_reset_map gcc_ipq9574_resets
[] = {
3902 [GCC_ADSS_BCR
] = { 0x1c000, 0 },
3903 [GCC_ANOC0_TBU_BCR
] = { 0x1203c, 0 },
3904 [GCC_ANOC1_TBU_BCR
] = { 0x1204c, 0 },
3905 [GCC_ANOC_BCR
] = { 0x2e074, 0 },
3906 [GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR
] = { 0x38000, 0 },
3907 [GCC_APSS_TCU_BCR
] = { 0x12014, 0 },
3908 [GCC_BLSP1_BCR
] = { 0x01000, 0 },
3909 [GCC_BLSP1_QUP1_BCR
] = { 0x02000, 0 },
3910 [GCC_BLSP1_QUP2_BCR
] = { 0x03000, 0 },
3911 [GCC_BLSP1_QUP3_BCR
] = { 0x04000, 0 },
3912 [GCC_BLSP1_QUP4_BCR
] = { 0x05000, 0 },
3913 [GCC_BLSP1_QUP5_BCR
] = { 0x06000, 0 },
3914 [GCC_BLSP1_QUP6_BCR
] = { 0x07000, 0 },
3915 [GCC_BLSP1_UART1_BCR
] = { 0x02028, 0 },
3916 [GCC_BLSP1_UART2_BCR
] = { 0x03028, 0 },
3917 [GCC_BLSP1_UART3_BCR
] = { 0x04028, 0 },
3918 [GCC_BLSP1_UART4_BCR
] = { 0x05028, 0 },
3919 [GCC_BLSP1_UART5_BCR
] = { 0x06028, 0 },
3920 [GCC_BLSP1_UART6_BCR
] = { 0x07028, 0 },
3921 [GCC_BOOT_ROM_BCR
] = { 0x13028, 0 },
3922 [GCC_CMN_BLK_BCR
] = { 0x3a000, 0 },
3923 [GCC_CMN_BLK_AHB_ARES
] = { 0x3a010, 0 },
3924 [GCC_CMN_BLK_SYS_ARES
] = { 0x3a010, 1 },
3925 [GCC_CMN_BLK_APU_ARES
] = { 0x3a010, 2 },
3926 [GCC_CRYPTO_BCR
] = { 0x16000, 0 },
3927 [GCC_DCC_BCR
] = { 0x35000, 0 },
3928 [GCC_DDRSS_BCR
] = { 0x11000, 0 },
3929 [GCC_IMEM_BCR
] = { 0x0e000, 0 },
3930 [GCC_LPASS_BCR
] = { 0x27000, 0 },
3931 [GCC_MDIO_BCR
] = { 0x1703c, 0 },
3932 [GCC_MPM_BCR
] = { 0x37000, 0 },
3933 [GCC_MSG_RAM_BCR
] = { 0x26000, 0 },
3934 [GCC_NSS_BCR
] = { 0x17000, 0 },
3935 [GCC_NSS_TBU_BCR
] = { 0x12044, 0 },
3936 [GCC_NSSNOC_MEMNOC_1_ARES
] = { 0x17038, 13 },
3937 [GCC_NSSNOC_PCNOC_1_ARES
] = { 0x17038, 12 },
3938 [GCC_NSSNOC_SNOC_1_ARES
] = { 0x17038, 11 },
3939 [GCC_NSSNOC_XO_DCD_ARES
] = { 0x17038, 10 },
3940 [GCC_NSSNOC_TS_ARES
] = { 0x17038, 9 },
3941 [GCC_NSSCC_ARES
] = { 0x17038, 8 },
3942 [GCC_NSSNOC_NSSCC_ARES
] = { 0x17038, 7 },
3943 [GCC_NSSNOC_ATB_ARES
] = { 0x17038, 6 },
3944 [GCC_NSSNOC_MEMNOC_ARES
] = { 0x17038, 5 },
3945 [GCC_NSSNOC_QOSGEN_REF_ARES
] = { 0x17038, 4 },
3946 [GCC_NSSNOC_SNOC_ARES
] = { 0x17038, 3 },
3947 [GCC_NSSNOC_TIMEOUT_REF_ARES
] = { 0x17038, 2 },
3948 [GCC_NSS_CFG_ARES
] = { 0x17038, 1 },
3949 [GCC_UBI0_DBG_ARES
] = { 0x17038, 0 },
3950 [GCC_PCIE0PHY_PHY_BCR
] = { 0x2805c, 0 },
3951 [GCC_PCIE0_AHB_ARES
] = { 0x28058, 7 },
3952 [GCC_PCIE0_AUX_ARES
] = { 0x28058, 6 },
3953 [GCC_PCIE0_AXI_M_ARES
] = { 0x28058, 5 },
3954 [GCC_PCIE0_AXI_M_STICKY_ARES
] = { 0x28058, 4 },
3955 [GCC_PCIE0_AXI_S_ARES
] = { 0x28058, 3 },
3956 [GCC_PCIE0_AXI_S_STICKY_ARES
] = { 0x28058, 2 },
3957 [GCC_PCIE0_CORE_STICKY_ARES
] = { 0x28058, 1 },
3958 [GCC_PCIE0_PIPE_ARES
] = { 0x28058, 0 },
3959 [GCC_PCIE1_AHB_ARES
] = { 0x29058, 7 },
3960 [GCC_PCIE1_AUX_ARES
] = { 0x29058, 6 },
3961 [GCC_PCIE1_AXI_M_ARES
] = { 0x29058, 5 },
3962 [GCC_PCIE1_AXI_M_STICKY_ARES
] = { 0x29058, 4 },
3963 [GCC_PCIE1_AXI_S_ARES
] = { 0x29058, 3 },
3964 [GCC_PCIE1_AXI_S_STICKY_ARES
] = { 0x29058, 2 },
3965 [GCC_PCIE1_CORE_STICKY_ARES
] = { 0x29058, 1 },
3966 [GCC_PCIE1_PIPE_ARES
] = { 0x29058, 0 },
3967 [GCC_PCIE2_AHB_ARES
] = { 0x2a058, 7 },
3968 [GCC_PCIE2_AUX_ARES
] = { 0x2a058, 6 },
3969 [GCC_PCIE2_AXI_M_ARES
] = { 0x2a058, 5 },
3970 [GCC_PCIE2_AXI_M_STICKY_ARES
] = { 0x2a058, 4 },
3971 [GCC_PCIE2_AXI_S_ARES
] = { 0x2a058, 3 },
3972 [GCC_PCIE2_AXI_S_STICKY_ARES
] = { 0x2a058, 2 },
3973 [GCC_PCIE2_CORE_STICKY_ARES
] = { 0x2a058, 1 },
3974 [GCC_PCIE2_PIPE_ARES
] = { 0x2a058, 0 },
3975 [GCC_PCIE3_AHB_ARES
] = { 0x2b058, 7 },
3976 [GCC_PCIE3_AUX_ARES
] = { 0x2b058, 6 },
3977 [GCC_PCIE3_AXI_M_ARES
] = { 0x2b058, 5 },
3978 [GCC_PCIE3_AXI_M_STICKY_ARES
] = { 0x2b058, 4 },
3979 [GCC_PCIE3_AXI_S_ARES
] = { 0x2b058, 3 },
3980 [GCC_PCIE3_AXI_S_STICKY_ARES
] = { 0x2b058, 2 },
3981 [GCC_PCIE3_CORE_STICKY_ARES
] = { 0x2b058, 1 },
3982 [GCC_PCIE3_PIPE_ARES
] = { 0x2b058, 0 },
3983 [GCC_PCIE0_BCR
] = { 0x28000, 0 },
3984 [GCC_PCIE0_LINK_DOWN_BCR
] = { 0x28054, 0 },
3985 [GCC_PCIE0_PHY_BCR
] = { 0x28060, 0 },
3986 [GCC_PCIE1_BCR
] = { 0x29000, 0 },
3987 [GCC_PCIE1_LINK_DOWN_BCR
] = { 0x29054, 0 },
3988 [GCC_PCIE1_PHY_BCR
] = { 0x29060, 0 },
3989 [GCC_PCIE1PHY_PHY_BCR
] = { 0x2905c, 0 },
3990 [GCC_PCIE2_BCR
] = { 0x2a000, 0 },
3991 [GCC_PCIE2_LINK_DOWN_BCR
] = { 0x2a054, 0 },
3992 [GCC_PCIE2_PHY_BCR
] = { 0x2a060, 0 },
3993 [GCC_PCIE2PHY_PHY_BCR
] = { 0x2a05c, 0 },
3994 [GCC_PCIE3_BCR
] = { 0x2b000, 0 },
3995 [GCC_PCIE3_LINK_DOWN_BCR
] = { 0x2b054, 0 },
3996 [GCC_PCIE3PHY_PHY_BCR
] = { 0x2b05c, 0 },
3997 [GCC_PCIE3_PHY_BCR
] = { 0x2b060, 0 },
3998 [GCC_PCNOC_BCR
] = { 0x31000, 0 },
3999 [GCC_PCNOC_BUS_TIMEOUT0_BCR
] = { 0x31030, 0 },
4000 [GCC_PCNOC_BUS_TIMEOUT1_BCR
] = { 0x31038, 0 },
4001 [GCC_PCNOC_BUS_TIMEOUT2_BCR
] = { 0x31040, 0 },
4002 [GCC_PCNOC_BUS_TIMEOUT3_BCR
] = { 0x31048, 0 },
4003 [GCC_PCNOC_BUS_TIMEOUT4_BCR
] = { 0x31050, 0 },
4004 [GCC_PCNOC_BUS_TIMEOUT5_BCR
] = { 0x31058, 0 },
4005 [GCC_PCNOC_BUS_TIMEOUT6_BCR
] = { 0x31060, 0 },
4006 [GCC_PCNOC_BUS_TIMEOUT7_BCR
] = { 0x31068, 0 },
4007 [GCC_PCNOC_BUS_TIMEOUT8_BCR
] = { 0x31070, 0 },
4008 [GCC_PCNOC_BUS_TIMEOUT9_BCR
] = { 0x31078, 0 },
4009 [GCC_PCNOC_TBU_BCR
] = { 0x12034, 0 },
4010 [GCC_PRNG_BCR
] = { 0x13020, 0 },
4011 [GCC_Q6SS_DBG_ARES
] = { 0x2506c, 4 },
4012 [GCC_Q6_AHB_ARES
] = { 0x2506c, 3 },
4013 [GCC_Q6_AHB_S_ARES
] = { 0x2506c, 2 },
4014 [GCC_Q6_AXIM2_ARES
] = { 0x2506c, 1 },
4015 [GCC_Q6_AXIM_ARES
] = { 0x2506c, 0 },
4016 [GCC_QDSS_BCR
] = { 0x2d000, 0 },
4017 [GCC_QPIC_BCR
] = { 0x32000, 0 },
4018 [GCC_QPIC_AHB_ARES
] = { 0x3201c, 1 },
4019 [GCC_QPIC_ARES
] = { 0x3201c, 0 },
4020 [GCC_QUSB2_0_PHY_BCR
] = { 0x2c068, 0 },
4021 [GCC_RBCPR_BCR
] = { 0x39000, 0 },
4022 [GCC_RBCPR_MX_BCR
] = { 0x39014, 0 },
4023 [GCC_SDCC_BCR
] = { 0x33000, 0 },
4024 [GCC_SEC_CTRL_BCR
] = { 0x1a000, 0 },
4025 [GCC_SMMU_CFG_BCR
] = { 0x1202c, 0 },
4026 [GCC_SNOC_BCR
] = { 0x2e000, 0 },
4027 [GCC_SPDM_BCR
] = { 0x36000, 0 },
4028 [GCC_TCSR_BCR
] = { 0x3d000, 0 },
4029 [GCC_TLMM_BCR
] = { 0x3e000, 0 },
4030 [GCC_TME_BCR
] = { 0x10000, 0 },
4031 [GCC_UNIPHY0_BCR
] = { 0x17044, 0 },
4032 [GCC_UNIPHY0_SYS_RESET
] = { 0x17050, 0 },
4033 [GCC_UNIPHY0_AHB_RESET
] = { 0x17050, 1 },
4034 [GCC_UNIPHY0_XPCS_RESET
] = { 0x17050, 2 },
4035 [GCC_UNIPHY1_SYS_RESET
] = { 0x17060, 0 },
4036 [GCC_UNIPHY1_AHB_RESET
] = { 0x17060, 1 },
4037 [GCC_UNIPHY1_XPCS_RESET
] = { 0x17060, 2 },
4038 [GCC_UNIPHY2_SYS_RESET
] = { 0x17070, 0 },
4039 [GCC_UNIPHY2_AHB_RESET
] = { 0x17070, 1 },
4040 [GCC_UNIPHY2_XPCS_RESET
] = { 0x17070, 2 },
4041 [GCC_UNIPHY1_BCR
] = { 0x17054, 0 },
4042 [GCC_UNIPHY2_BCR
] = { 0x17064, 0 },
4043 [GCC_USB0_PHY_BCR
] = { 0x2c06c, 0 },
4044 [GCC_USB3PHY_0_PHY_BCR
] = { 0x2c070, 0 },
4045 [GCC_USB_BCR
] = { 0x2c000, 0 },
4046 [GCC_USB_MISC_RESET
] = { 0x2c064, 0 },
4047 [GCC_WCSSAON_RESET
] = { 0x25074, 0 },
4048 [GCC_WCSS_ACMT_ARES
] = { 0x25070, 5 },
4049 [GCC_WCSS_AHB_S_ARES
] = { 0x25070, 4 },
4050 [GCC_WCSS_AXI_M_ARES
] = { 0x25070, 3 },
4051 [GCC_WCSS_BCR
] = { 0x18004, 0 },
4052 [GCC_WCSS_DBG_ARES
] = { 0x25070, 2 },
4053 [GCC_WCSS_DBG_BDG_ARES
] = { 0x25070, 1 },
4054 [GCC_WCSS_ECAHB_ARES
] = { 0x25070, 0 },
4055 [GCC_WCSS_Q6_BCR
] = { 0x18000, 0 },
4056 [GCC_WCSS_Q6_TBU_BCR
] = { 0x12054, 0 },
4059 #define IPQ_APPS_ID 9574 /* some unique value */
4061 static const struct qcom_icc_hws_data icc_ipq9574_hws
[] = {
4062 { MASTER_ANOC_PCIE0
, SLAVE_ANOC_PCIE0
, GCC_ANOC_PCIE0_1LANE_M_CLK
},
4063 { MASTER_SNOC_PCIE0
, SLAVE_SNOC_PCIE0
, GCC_SNOC_PCIE0_1LANE_S_CLK
},
4064 { MASTER_ANOC_PCIE1
, SLAVE_ANOC_PCIE1
, GCC_ANOC_PCIE1_1LANE_M_CLK
},
4065 { MASTER_SNOC_PCIE1
, SLAVE_SNOC_PCIE1
, GCC_SNOC_PCIE1_1LANE_S_CLK
},
4066 { MASTER_ANOC_PCIE2
, SLAVE_ANOC_PCIE2
, GCC_ANOC_PCIE2_2LANE_M_CLK
},
4067 { MASTER_SNOC_PCIE2
, SLAVE_SNOC_PCIE2
, GCC_SNOC_PCIE2_2LANE_S_CLK
},
4068 { MASTER_ANOC_PCIE3
, SLAVE_ANOC_PCIE3
, GCC_ANOC_PCIE3_2LANE_M_CLK
},
4069 { MASTER_SNOC_PCIE3
, SLAVE_SNOC_PCIE3
, GCC_SNOC_PCIE3_2LANE_S_CLK
},
4070 { MASTER_USB
, SLAVE_USB
, GCC_SNOC_USB_CLK
},
4071 { MASTER_USB_AXI
, SLAVE_USB_AXI
, GCC_ANOC_USB_AXI_CLK
},
4072 { MASTER_NSSNOC_NSSCC
, SLAVE_NSSNOC_NSSCC
, GCC_NSSNOC_NSSCC_CLK
},
4073 { MASTER_NSSNOC_SNOC_0
, SLAVE_NSSNOC_SNOC_0
, GCC_NSSNOC_SNOC_CLK
},
4074 { MASTER_NSSNOC_SNOC_1
, SLAVE_NSSNOC_SNOC_1
, GCC_NSSNOC_SNOC_1_CLK
},
4075 { MASTER_NSSNOC_PCNOC_1
, SLAVE_NSSNOC_PCNOC_1
, GCC_NSSNOC_PCNOC_1_CLK
},
4076 { MASTER_NSSNOC_QOSGEN_REF
, SLAVE_NSSNOC_QOSGEN_REF
, GCC_NSSNOC_QOSGEN_REF_CLK
},
4077 { MASTER_NSSNOC_TIMEOUT_REF
, SLAVE_NSSNOC_TIMEOUT_REF
, GCC_NSSNOC_TIMEOUT_REF_CLK
},
4078 { MASTER_NSSNOC_XO_DCD
, SLAVE_NSSNOC_XO_DCD
, GCC_NSSNOC_XO_DCD_CLK
},
4079 { MASTER_NSSNOC_ATB
, SLAVE_NSSNOC_ATB
, GCC_NSSNOC_ATB_CLK
},
4080 { MASTER_MEM_NOC_NSSNOC
, SLAVE_MEM_NOC_NSSNOC
, GCC_MEM_NOC_NSSNOC_CLK
},
4081 { MASTER_NSSNOC_MEMNOC
, SLAVE_NSSNOC_MEMNOC
, GCC_NSSNOC_MEMNOC_CLK
},
4082 { MASTER_NSSNOC_MEM_NOC_1
, SLAVE_NSSNOC_MEM_NOC_1
, GCC_NSSNOC_MEM_NOC_1_CLK
},
4085 static const struct of_device_id gcc_ipq9574_match_table
[] = {
4086 { .compatible
= "qcom,ipq9574-gcc" },
4089 MODULE_DEVICE_TABLE(of
, gcc_ipq9574_match_table
);
4091 static const struct regmap_config gcc_ipq9574_regmap_config
= {
4095 .max_register
= 0x7fffc,
4099 static const struct qcom_cc_desc gcc_ipq9574_desc
= {
4100 .config
= &gcc_ipq9574_regmap_config
,
4101 .clks
= gcc_ipq9574_clks
,
4102 .num_clks
= ARRAY_SIZE(gcc_ipq9574_clks
),
4103 .resets
= gcc_ipq9574_resets
,
4104 .num_resets
= ARRAY_SIZE(gcc_ipq9574_resets
),
4105 .clk_hws
= gcc_ipq9574_hws
,
4106 .num_clk_hws
= ARRAY_SIZE(gcc_ipq9574_hws
),
4107 .icc_hws
= icc_ipq9574_hws
,
4108 .num_icc_hws
= ARRAY_SIZE(icc_ipq9574_hws
),
4109 .icc_first_node_id
= IPQ_APPS_ID
,
4112 static int gcc_ipq9574_probe(struct platform_device
*pdev
)
4114 return qcom_cc_probe(pdev
, &gcc_ipq9574_desc
);
4117 static struct platform_driver gcc_ipq9574_driver
= {
4118 .probe
= gcc_ipq9574_probe
,
4120 .name
= "qcom,gcc-ipq9574",
4121 .of_match_table
= gcc_ipq9574_match_table
,
4122 .sync_state
= icc_sync_state
,
4126 static int __init
gcc_ipq9574_init(void)
4128 return platform_driver_register(&gcc_ipq9574_driver
);
4130 core_initcall(gcc_ipq9574_init
);
4132 static void __exit
gcc_ipq9574_exit(void)
4134 platform_driver_unregister(&gcc_ipq9574_driver
);
4136 module_exit(gcc_ipq9574_exit
);
4138 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ9574 Driver");
4139 MODULE_LICENSE("GPL");