1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2023 Otto Pflüger
5 * Based on gcc-msm8953.c:
6 * Copyright 2021, The Linux Foundation. All rights reserved.
7 * with parts taken from gcc-qcs404.c:
8 * Copyright 2018, The Linux Foundation. All rights reserved.
10 * Copyright 2020 Linaro Limited
11 * adapted with data from clock-gcc-8952.c in Qualcomm's msm-4.9 release:
12 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
15 #include <linux/bitops.h>
16 #include <linux/clk-provider.h>
17 #include <linux/err.h>
18 #include <linux/kernel.h>
19 #include <linux/module.h>
21 #include <linux/platform_device.h>
22 #include <linux/regmap.h>
23 #include <linux/reset-controller.h>
25 #include <dt-bindings/clock/qcom,gcc-msm8917.h>
27 #include "clk-alpha-pll.h"
28 #include "clk-branch.h"
53 static struct clk_alpha_pll gpll0_sleep_clk_src
= {
55 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
57 .enable_reg
= 0x45008,
58 .enable_mask
= BIT(23),
59 .enable_is_inverted
= true,
60 .hw
.init
= &(struct clk_init_data
){
61 .name
= "gpll0_sleep_clk_src",
62 .parent_data
= &(const struct clk_parent_data
) {
66 .ops
= &clk_branch_simple_ops
,
71 static struct clk_alpha_pll gpll0_early
= {
73 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
75 .enable_reg
= 0x45000,
76 .enable_mask
= BIT(0),
77 .hw
.init
= &(struct clk_init_data
) {
78 .name
= "gpll0_early",
79 .parent_hws
= (const struct clk_hw
*[]){
80 &gpll0_sleep_clk_src
.clkr
.hw
,
83 .ops
= &clk_alpha_pll_fixed_ops
,
88 static struct clk_alpha_pll_postdiv gpll0
= {
90 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
91 .clkr
.hw
.init
= &(struct clk_init_data
){
93 .parent_hws
= (const struct clk_hw
*[]){
97 .ops
= &clk_alpha_pll_postdiv_ro_ops
,
101 static const struct pll_vco gpll3_p_vco
[] = {
102 { 700000000, 1400000000, 0 },
105 static const struct alpha_pll_config gpll3_early_config
= {
107 .config_ctl_val
= 0x4001055b,
108 .early_output_mask
= 0,
109 .post_div_mask
= GENMASK(11, 8),
110 .post_div_val
= BIT(8),
113 static struct clk_alpha_pll gpll3_early
= {
115 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
116 .vco_table
= gpll3_p_vco
,
117 .num_vco
= ARRAY_SIZE(gpll3_p_vco
),
118 .flags
= SUPPORTS_DYNAMIC_UPDATE
,
120 .hw
.init
= &(struct clk_init_data
){
121 .name
= "gpll3_early",
122 .parent_data
= &(const struct clk_parent_data
) {
126 .ops
= &clk_alpha_pll_ops
,
131 static struct clk_alpha_pll_postdiv gpll3
= {
133 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
134 .clkr
.hw
.init
= &(struct clk_init_data
){
136 .parent_hws
= (const struct clk_hw
*[]){
137 &gpll3_early
.clkr
.hw
,
140 .ops
= &clk_alpha_pll_postdiv_ops
,
141 .flags
= CLK_SET_RATE_PARENT
,
145 static struct clk_alpha_pll gpll4_early
= {
147 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
149 .enable_reg
= 0x45000,
150 .enable_mask
= BIT(5),
151 .hw
.init
= &(struct clk_init_data
){
152 .name
= "gpll4_early",
153 .parent_data
= &(const struct clk_parent_data
) {
157 .ops
= &clk_alpha_pll_fixed_ops
,
162 static struct clk_alpha_pll_postdiv gpll4
= {
164 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
165 .clkr
.hw
.init
= &(struct clk_init_data
){
167 .parent_hws
= (const struct clk_hw
*[]){
168 &gpll4_early
.clkr
.hw
,
171 .ops
= &clk_alpha_pll_postdiv_ro_ops
,
175 static struct clk_pll gpll6_early
= {
179 .config_reg
= 0x37014,
181 .status_reg
= 0x3701c,
183 .clkr
.hw
.init
= &(struct clk_init_data
){
184 .name
= "gpll6_early",
185 .parent_data
= &(const struct clk_parent_data
) {
193 static struct clk_regmap gpll6
= {
194 .enable_reg
= 0x45000,
195 .enable_mask
= BIT(7),
196 .hw
.init
= &(struct clk_init_data
){
198 .parent_hws
= (const struct clk_hw
*[]){
199 &gpll6_early
.clkr
.hw
,
202 .ops
= &clk_pll_vote_ops
,
206 static const struct parent_map gcc_xo_gpll0_map
[] = {
211 static const struct parent_map gcc_xo_gpll0_out_aux_map
[] = {
216 static const struct clk_parent_data gcc_xo_gpll0_data
[] = {
218 { .hw
= &gpll0
.clkr
.hw
},
221 static const struct parent_map gcc_xo_gpll0_gpll6_sleep_map
[] = {
228 static const struct clk_parent_data gcc_xo_gpll0_gpll6_sleep_data
[] = {
230 { .hw
= &gpll0
.clkr
.hw
},
232 { .index
= DT_SLEEP_CLK
},
235 static const struct parent_map gcc_xo_gpll0_gpll6_gpll4_map
[] = {
242 static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll4_data
[] = {
244 { .hw
= &gpll0
.clkr
.hw
},
246 { .hw
= &gpll4
.clkr
.hw
},
249 static const struct freq_tbl ftbl_apss_ahb_clk_src
[] = {
250 F(19200000, P_XO
, 1, 0, 0),
251 F(50000000, P_GPLL0
, 16, 0, 0),
252 F(100000000, P_GPLL0
, 8, 0, 0),
253 F(133330000, P_GPLL0
, 6, 0, 0),
257 static struct clk_rcg2 apss_ahb_clk_src
= {
260 .freq_tbl
= ftbl_apss_ahb_clk_src
,
261 .parent_map
= gcc_xo_gpll0_map
,
262 .clkr
.hw
.init
= &(struct clk_init_data
) {
263 .name
= "apss_ahb_clk_src",
264 .parent_data
= gcc_xo_gpll0_data
,
265 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
266 .ops
= &clk_rcg2_ops
,
270 static const struct freq_tbl ftbl_blsp_i2c_apps_clk_src
[] = {
271 F(19200000, P_XO
, 1, 0, 0),
272 F(50000000, P_GPLL0
, 16, 0, 0),
276 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
279 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
280 .parent_map
= gcc_xo_gpll0_map
,
281 .clkr
.hw
.init
= &(struct clk_init_data
) {
282 .name
= "blsp1_qup2_i2c_apps_clk_src",
283 .parent_data
= gcc_xo_gpll0_data
,
284 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
285 .ops
= &clk_rcg2_ops
,
289 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
292 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
293 .parent_map
= gcc_xo_gpll0_map
,
294 .clkr
.hw
.init
= &(struct clk_init_data
) {
295 .name
= "blsp1_qup3_i2c_apps_clk_src",
296 .parent_data
= gcc_xo_gpll0_data
,
297 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
298 .ops
= &clk_rcg2_ops
,
302 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
305 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
306 .parent_map
= gcc_xo_gpll0_map
,
307 .clkr
.hw
.init
= &(struct clk_init_data
) {
308 .name
= "blsp1_qup4_i2c_apps_clk_src",
309 .parent_data
= gcc_xo_gpll0_data
,
310 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
311 .ops
= &clk_rcg2_ops
,
315 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
318 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
319 .parent_map
= gcc_xo_gpll0_map
,
320 .clkr
.hw
.init
= &(struct clk_init_data
) {
321 .name
= "blsp2_qup1_i2c_apps_clk_src",
322 .parent_data
= gcc_xo_gpll0_data
,
323 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
324 .ops
= &clk_rcg2_ops
,
328 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
331 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
332 .parent_map
= gcc_xo_gpll0_map
,
333 .clkr
.hw
.init
= &(struct clk_init_data
) {
334 .name
= "blsp2_qup2_i2c_apps_clk_src",
335 .parent_data
= gcc_xo_gpll0_data
,
336 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
337 .ops
= &clk_rcg2_ops
,
341 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
344 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
345 .parent_map
= gcc_xo_gpll0_map
,
346 .clkr
.hw
.init
= &(struct clk_init_data
) {
347 .name
= "blsp2_qup3_i2c_apps_clk_src",
348 .parent_data
= gcc_xo_gpll0_data
,
349 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
350 .ops
= &clk_rcg2_ops
,
354 static const struct freq_tbl ftbl_blsp_spi_apps_clk_src
[] = {
355 F(960000, P_XO
, 10, 1, 2),
356 F(4800000, P_XO
, 4, 0, 0),
357 F(9600000, P_XO
, 2, 0, 0),
358 F(16000000, P_GPLL0
, 10, 1, 5),
359 F(19200000, P_XO
, 1, 0, 0),
360 F(25000000, P_GPLL0
, 16, 1, 2),
361 F(50000000, P_GPLL0
, 16, 0, 0),
365 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
369 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
370 .parent_map
= gcc_xo_gpll0_map
,
371 .clkr
.hw
.init
= &(struct clk_init_data
) {
372 .name
= "blsp1_qup2_spi_apps_clk_src",
373 .parent_data
= gcc_xo_gpll0_data
,
374 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
375 .ops
= &clk_rcg2_ops
,
379 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
383 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
384 .parent_map
= gcc_xo_gpll0_map
,
385 .clkr
.hw
.init
= &(struct clk_init_data
) {
386 .name
= "blsp1_qup3_spi_apps_clk_src",
387 .parent_data
= gcc_xo_gpll0_data
,
388 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
389 .ops
= &clk_rcg2_ops
,
393 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
397 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
398 .parent_map
= gcc_xo_gpll0_map
,
399 .clkr
.hw
.init
= &(struct clk_init_data
) {
400 .name
= "blsp1_qup4_spi_apps_clk_src",
401 .parent_data
= gcc_xo_gpll0_data
,
402 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
403 .ops
= &clk_rcg2_ops
,
407 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
411 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
412 .parent_map
= gcc_xo_gpll0_map
,
413 .clkr
.hw
.init
= &(struct clk_init_data
) {
414 .name
= "blsp2_qup1_spi_apps_clk_src",
415 .parent_data
= gcc_xo_gpll0_data
,
416 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
417 .ops
= &clk_rcg2_ops
,
421 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
425 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
426 .parent_map
= gcc_xo_gpll0_map
,
427 .clkr
.hw
.init
= &(struct clk_init_data
) {
428 .name
= "blsp2_qup2_spi_apps_clk_src",
429 .parent_data
= gcc_xo_gpll0_data
,
430 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
431 .ops
= &clk_rcg2_ops
,
435 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
439 .freq_tbl
= ftbl_blsp_spi_apps_clk_src
,
440 .parent_map
= gcc_xo_gpll0_map
,
441 .clkr
.hw
.init
= &(struct clk_init_data
) {
442 .name
= "blsp2_qup3_spi_apps_clk_src",
443 .parent_data
= gcc_xo_gpll0_data
,
444 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
445 .ops
= &clk_rcg2_ops
,
449 static const struct freq_tbl ftbl_blsp_uart_apps_clk_src
[] = {
450 F(3686400, P_GPLL0
, 1, 72, 15625),
451 F(7372800, P_GPLL0
, 1, 144, 15625),
452 F(14745600, P_GPLL0
, 1, 288, 15625),
453 F(16000000, P_GPLL0
, 10, 1, 5),
454 F(19200000, P_XO
, 1, 0, 0),
455 F(24000000, P_GPLL0
, 1, 3, 100),
456 F(25000000, P_GPLL0
, 16, 1, 2),
457 F(32000000, P_GPLL0
, 1, 1, 25),
458 F(40000000, P_GPLL0
, 1, 1, 20),
459 F(46400000, P_GPLL0
, 1, 29, 500),
460 F(48000000, P_GPLL0
, 1, 3, 50),
461 F(51200000, P_GPLL0
, 1, 8, 125),
462 F(56000000, P_GPLL0
, 1, 7, 100),
463 F(58982400, P_GPLL0
, 1, 1152, 15625),
464 F(60000000, P_GPLL0
, 1, 3, 40),
465 F(64000000, P_GPLL0
, 1, 2, 25),
469 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
473 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
474 .parent_map
= gcc_xo_gpll0_map
,
475 .clkr
.hw
.init
= &(struct clk_init_data
) {
476 .name
= "blsp1_uart1_apps_clk_src",
477 .parent_data
= gcc_xo_gpll0_data
,
478 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
479 .ops
= &clk_rcg2_ops
,
483 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
487 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
488 .parent_map
= gcc_xo_gpll0_map
,
489 .clkr
.hw
.init
= &(struct clk_init_data
) {
490 .name
= "blsp1_uart2_apps_clk_src",
491 .parent_data
= gcc_xo_gpll0_data
,
492 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
493 .ops
= &clk_rcg2_ops
,
497 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
501 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
502 .parent_map
= gcc_xo_gpll0_map
,
503 .clkr
.hw
.init
= &(struct clk_init_data
) {
504 .name
= "blsp2_uart1_apps_clk_src",
505 .parent_data
= gcc_xo_gpll0_data
,
506 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
507 .ops
= &clk_rcg2_ops
,
511 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
515 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
516 .parent_map
= gcc_xo_gpll0_map
,
517 .clkr
.hw
.init
= &(struct clk_init_data
) {
518 .name
= "blsp2_uart2_apps_clk_src",
519 .parent_data
= gcc_xo_gpll0_data
,
520 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
521 .ops
= &clk_rcg2_ops
,
525 static const struct parent_map gcc_byte0_map
[] = {
527 { P_DSI0PLL_BYTE
, 1 },
530 static const struct clk_parent_data gcc_byte_data
[] = {
532 { .index
= DT_DSI0PLL_BYTE
},
535 static struct clk_rcg2 byte0_clk_src
= {
538 .parent_map
= gcc_byte0_map
,
539 .clkr
.hw
.init
= &(struct clk_init_data
) {
540 .name
= "byte0_clk_src",
541 .parent_data
= gcc_byte_data
,
542 .num_parents
= ARRAY_SIZE(gcc_byte_data
),
543 .ops
= &clk_byte2_ops
,
544 .flags
= CLK_SET_RATE_PARENT
,
548 static const struct freq_tbl ftbl_camss_gp_clk_src
[] = {
549 F(100000000, P_GPLL0
, 8, 0, 0),
550 F(160000000, P_GPLL0
, 5, 0, 0),
551 F(200000000, P_GPLL0
, 4, 0, 0),
555 static struct clk_rcg2 camss_gp0_clk_src
= {
559 .freq_tbl
= ftbl_camss_gp_clk_src
,
560 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
561 .clkr
.hw
.init
= &(struct clk_init_data
) {
562 .name
= "camss_gp0_clk_src",
563 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
564 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
565 .ops
= &clk_rcg2_ops
,
569 static struct clk_rcg2 camss_gp1_clk_src
= {
573 .freq_tbl
= ftbl_camss_gp_clk_src
,
574 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
575 .clkr
.hw
.init
= &(struct clk_init_data
) {
576 .name
= "camss_gp1_clk_src",
577 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
578 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
579 .ops
= &clk_rcg2_ops
,
583 static const struct freq_tbl ftbl_camss_top_ahb_clk_src
[] = {
584 F(40000000, P_GPLL0
, 10, 1, 2),
585 F(61540000, P_GPLL0
, 13, 0, 0),
586 F(80000000, P_GPLL0
, 10, 0, 0),
590 static struct clk_rcg2 camss_top_ahb_clk_src
= {
593 .freq_tbl
= ftbl_camss_top_ahb_clk_src
,
594 .parent_map
= gcc_xo_gpll0_map
,
595 .clkr
.hw
.init
= &(struct clk_init_data
) {
596 .name
= "camss_top_ahb_clk_src",
597 .parent_data
= gcc_xo_gpll0_data
,
598 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
599 .ops
= &clk_rcg2_ops
,
603 static const struct freq_tbl ftbl_cci_clk_src
[] = {
604 F(19200000, P_XO
, 1, 0, 0),
605 F(37500000, P_GPLL0
, 1, 3, 64),
609 static struct clk_rcg2 cci_clk_src
= {
613 .freq_tbl
= ftbl_cci_clk_src
,
614 .parent_map
= gcc_xo_gpll0_out_aux_map
,
615 .clkr
.hw
.init
= &(struct clk_init_data
) {
616 .name
= "cci_clk_src",
617 .parent_data
= gcc_xo_gpll0_data
,
618 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
619 .ops
= &clk_rcg2_ops
,
623 static const struct parent_map gcc_cpp_map
[] = {
629 static const struct clk_parent_data gcc_cpp_data
[] = {
631 { .hw
= &gpll0
.clkr
.hw
},
635 static const struct freq_tbl ftbl_cpp_clk_src
[] = {
636 F(133330000, P_GPLL0
, 6, 0, 0),
637 F(160000000, P_GPLL0
, 5, 0, 0),
638 F(266670000, P_GPLL0
, 3, 0, 0),
639 F(308570000, P_GPLL0
, 3.5, 0, 0),
640 F(320000000, P_GPLL0
, 2.5, 0, 0),
641 F(360000000, P_GPLL6
, 3, 0, 0),
645 static struct clk_rcg2 cpp_clk_src
= {
648 .freq_tbl
= ftbl_cpp_clk_src
,
649 .parent_map
= gcc_cpp_map
,
650 .clkr
.hw
.init
= &(struct clk_init_data
) {
651 .name
= "cpp_clk_src",
652 .parent_data
= gcc_cpp_data
,
653 .num_parents
= ARRAY_SIZE(gcc_cpp_data
),
654 .ops
= &clk_rcg2_ops
,
658 static const struct freq_tbl ftbl_crypto_clk_src
[] = {
659 F(50000000, P_GPLL0
, 16, 0, 0),
660 F(80000000, P_GPLL0
, 10, 0, 0),
661 F(100000000, P_GPLL0
, 8, 0, 0),
662 F(160000000, P_GPLL0
, 5, 0, 0),
666 static struct clk_rcg2 crypto_clk_src
= {
669 .freq_tbl
= ftbl_crypto_clk_src
,
670 .parent_map
= gcc_xo_gpll0_map
,
671 .clkr
.hw
.init
= &(struct clk_init_data
) {
672 .name
= "crypto_clk_src",
673 .parent_data
= gcc_xo_gpll0_data
,
674 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
675 .ops
= &clk_rcg2_ops
,
679 static const struct freq_tbl ftbl_csi_clk_src
[] = {
680 F(100000000, P_GPLL0
, 8, 0, 0),
681 F(160000000, P_GPLL0
, 5, 0, 0),
682 F(200000000, P_GPLL0
, 4, 0, 0),
686 static struct clk_rcg2 csi0_clk_src
= {
689 .freq_tbl
= ftbl_csi_clk_src
,
690 .parent_map
= gcc_xo_gpll0_map
,
691 .clkr
.hw
.init
= &(struct clk_init_data
) {
692 .name
= "csi0_clk_src",
693 .parent_data
= gcc_xo_gpll0_data
,
694 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
695 .ops
= &clk_rcg2_ops
,
699 static struct clk_rcg2 csi1_clk_src
= {
702 .freq_tbl
= ftbl_csi_clk_src
,
703 .parent_map
= gcc_xo_gpll0_map
,
704 .clkr
.hw
.init
= &(struct clk_init_data
) {
705 .name
= "csi1_clk_src",
706 .parent_data
= gcc_xo_gpll0_data
,
707 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
708 .ops
= &clk_rcg2_ops
,
712 static struct clk_rcg2 csi2_clk_src
= {
715 .freq_tbl
= ftbl_csi_clk_src
,
716 .parent_map
= gcc_xo_gpll0_map
,
717 .clkr
.hw
.init
= &(struct clk_init_data
) {
718 .name
= "csi2_clk_src",
719 .parent_data
= gcc_xo_gpll0_data
,
720 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
721 .ops
= &clk_rcg2_ops
,
725 static const struct freq_tbl ftbl_csi_phytimer_clk_src
[] = {
726 F(100000000, P_GPLL0
, 8, 0, 0),
727 F(160000000, P_GPLL0
, 5, 0, 0),
728 F(200000000, P_GPLL0
, 4, 0, 0),
729 F(266670000, P_GPLL0
, 3, 0, 0),
733 static struct clk_rcg2 csi0phytimer_clk_src
= {
736 .freq_tbl
= ftbl_csi_phytimer_clk_src
,
737 .parent_map
= gcc_xo_gpll0_map
,
738 .clkr
.hw
.init
= &(struct clk_init_data
) {
739 .name
= "csi0phytimer_clk_src",
740 .parent_data
= gcc_xo_gpll0_data
,
741 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
742 .ops
= &clk_rcg2_ops
,
746 static struct clk_rcg2 csi1phytimer_clk_src
= {
749 .freq_tbl
= ftbl_csi_phytimer_clk_src
,
750 .parent_map
= gcc_xo_gpll0_map
,
751 .clkr
.hw
.init
= &(struct clk_init_data
) {
752 .name
= "csi1phytimer_clk_src",
753 .parent_data
= gcc_xo_gpll0_data
,
754 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
755 .ops
= &clk_rcg2_ops
,
759 static const struct freq_tbl ftbl_esc0_1_clk_src
[] = {
760 F(19200000, P_XO
, 1, 0, 0),
764 static struct clk_rcg2 esc0_clk_src
= {
767 .freq_tbl
= ftbl_esc0_1_clk_src
,
768 .parent_map
= gcc_xo_gpll0_out_aux_map
,
769 .clkr
.hw
.init
= &(struct clk_init_data
) {
770 .name
= "esc0_clk_src",
771 .parent_data
= gcc_xo_gpll0_data
,
772 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
773 .ops
= &clk_rcg2_ops
,
777 static const struct parent_map gcc_gfx3d_map
[] = {
784 static const struct parent_map gcc_gfx3d_map_qm215
[] = {
791 static const struct clk_parent_data gcc_gfx3d_data
[] = {
793 { .hw
= &gpll0
.clkr
.hw
},
794 { .hw
= &gpll3
.clkr
.hw
},
798 static const struct freq_tbl ftbl_gfx3d_clk_src
[] = {
799 F(19200000, P_XO
, 1, 0, 0),
800 F(50000000, P_GPLL0
, 16, 0, 0),
801 F(80000000, P_GPLL0
, 10, 0, 0),
802 F(100000000, P_GPLL0
, 8, 0, 0),
803 F(160000000, P_GPLL0
, 5, 0, 0),
804 F(200000000, P_GPLL0
, 4, 0, 0),
805 F(228570000, P_GPLL0
, 3.5, 0, 0),
806 F(240000000, P_GPLL6
, 4.5, 0, 0),
807 F(266670000, P_GPLL0
, 3, 0, 0),
808 F(270000000, P_GPLL6
, 4, 0, 0),
809 F(320000000, P_GPLL0
, 2.5, 0, 0),
810 F(400000000, P_GPLL0
, 2, 0, 0),
811 F(465000000, P_GPLL3
, 1, 0, 0),
812 F(484800000, P_GPLL3
, 1, 0, 0),
813 F(500000000, P_GPLL3
, 1, 0, 0),
814 F(523200000, P_GPLL3
, 1, 0, 0),
815 F(550000000, P_GPLL3
, 1, 0, 0),
816 F(598000000, P_GPLL3
, 1, 0, 0),
820 static struct clk_rcg2 gfx3d_clk_src
= {
823 .freq_tbl
= ftbl_gfx3d_clk_src
,
824 .parent_map
= gcc_gfx3d_map
,
825 .clkr
.hw
.init
= &(struct clk_init_data
) {
826 .name
= "gfx3d_clk_src",
827 .parent_data
= gcc_gfx3d_data
,
828 .num_parents
= ARRAY_SIZE(gcc_gfx3d_data
),
829 .ops
= &clk_rcg2_ops
,
830 .flags
= CLK_SET_RATE_PARENT
| CLK_OPS_PARENT_ENABLE
,
834 static const struct freq_tbl ftbl_gp_clk_src
[] = {
835 F(19200000, P_XO
, 1, 0, 0),
839 static struct clk_rcg2 gp1_clk_src
= {
843 .freq_tbl
= ftbl_gp_clk_src
,
844 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
845 .clkr
.hw
.init
= &(struct clk_init_data
) {
846 .name
= "gp1_clk_src",
847 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
848 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
849 .ops
= &clk_rcg2_ops
,
853 static struct clk_rcg2 gp2_clk_src
= {
857 .freq_tbl
= ftbl_gp_clk_src
,
858 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
859 .clkr
.hw
.init
= &(struct clk_init_data
) {
860 .name
= "gp2_clk_src",
861 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
862 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
863 .ops
= &clk_rcg2_ops
,
867 static struct clk_rcg2 gp3_clk_src
= {
871 .freq_tbl
= ftbl_gp_clk_src
,
872 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
873 .clkr
.hw
.init
= &(struct clk_init_data
) {
874 .name
= "gp3_clk_src",
875 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
876 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
877 .ops
= &clk_rcg2_ops
,
881 static const struct freq_tbl ftbl_jpeg0_clk_src
[] = {
882 F(133330000, P_GPLL0
, 6, 0, 0),
883 F(266670000, P_GPLL0
, 3, 0, 0),
884 F(320000000, P_GPLL0
, 2.5, 0, 0),
888 static struct clk_rcg2 jpeg0_clk_src
= {
891 .freq_tbl
= ftbl_jpeg0_clk_src
,
892 .parent_map
= gcc_xo_gpll0_map
,
893 .clkr
.hw
.init
= &(struct clk_init_data
) {
894 .name
= "jpeg0_clk_src",
895 .parent_data
= gcc_xo_gpll0_data
,
896 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
897 .ops
= &clk_rcg2_ops
,
901 static const struct freq_tbl ftbl_mclk_clk_src
[] = {
902 F(19200000, P_XO
, 1, 0, 0),
903 F(24000000, P_GPLL6
, 1, 1, 45),
904 F(66667000, P_GPLL0
, 12, 0, 0),
908 static struct clk_rcg2 mclk0_clk_src
= {
912 .freq_tbl
= ftbl_mclk_clk_src
,
913 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
914 .clkr
.hw
.init
= &(struct clk_init_data
) {
915 .name
= "mclk0_clk_src",
916 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
917 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
918 .ops
= &clk_rcg2_ops
,
922 static struct clk_rcg2 mclk1_clk_src
= {
926 .freq_tbl
= ftbl_mclk_clk_src
,
927 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
928 .clkr
.hw
.init
= &(struct clk_init_data
) {
929 .name
= "mclk1_clk_src",
930 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
931 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
932 .ops
= &clk_rcg2_ops
,
936 static struct clk_rcg2 mclk2_clk_src
= {
940 .freq_tbl
= ftbl_mclk_clk_src
,
941 .parent_map
= gcc_xo_gpll0_gpll6_sleep_map
,
942 .clkr
.hw
.init
= &(struct clk_init_data
) {
943 .name
= "mclk2_clk_src",
944 .parent_data
= gcc_xo_gpll0_gpll6_sleep_data
,
945 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_sleep_data
),
946 .ops
= &clk_rcg2_ops
,
950 static const struct freq_tbl ftbl_mdp_clk_src
[] = {
951 F(50000000, P_GPLL0
, 16, 0, 0),
952 F(80000000, P_GPLL0
, 10, 0, 0),
953 F(100000000, P_GPLL0
, 8, 0, 0),
954 F(145450000, P_GPLL0
, 5.5, 0, 0),
955 F(160000000, P_GPLL0
, 5, 0, 0),
956 F(177780000, P_GPLL0
, 4.5, 0, 0),
957 F(200000000, P_GPLL0
, 4, 0, 0),
958 F(266670000, P_GPLL0
, 3, 0, 0),
959 F(320000000, P_GPLL0
, 2.5, 0, 0),
963 static struct clk_rcg2 mdp_clk_src
= {
966 .freq_tbl
= ftbl_mdp_clk_src
,
967 .parent_map
= gcc_xo_gpll0_map
,
968 .clkr
.hw
.init
= &(struct clk_init_data
) {
969 .name
= "mdp_clk_src",
970 .parent_data
= gcc_xo_gpll0_data
,
971 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
972 .ops
= &clk_rcg2_ops
,
976 static const struct parent_map gcc_pclk_map
[] = {
981 static const struct clk_parent_data gcc_pclk_data
[] = {
983 { .index
= DT_DSI0PLL
},
986 static struct clk_rcg2 pclk0_clk_src
= {
990 .parent_map
= gcc_pclk_map
,
991 .clkr
.hw
.init
= &(struct clk_init_data
) {
992 .name
= "pclk0_clk_src",
993 .parent_data
= gcc_pclk_data
,
994 .num_parents
= ARRAY_SIZE(gcc_pclk_data
),
995 .ops
= &clk_pixel_ops
,
996 .flags
= CLK_SET_RATE_PARENT
,
1000 static const struct freq_tbl ftbl_pdm2_clk_src
[] = {
1001 F(64000000, P_GPLL0
, 12.5, 0, 0),
1005 static struct clk_rcg2 pdm2_clk_src
= {
1006 .cmd_rcgr
= 0x44010,
1008 .freq_tbl
= ftbl_pdm2_clk_src
,
1009 .parent_map
= gcc_xo_gpll0_map
,
1010 .clkr
.hw
.init
= &(struct clk_init_data
) {
1011 .name
= "pdm2_clk_src",
1012 .parent_data
= gcc_xo_gpll0_data
,
1013 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
1014 .ops
= &clk_rcg2_ops
,
1018 static const struct freq_tbl ftbl_sdcc1_ice_core_clk_src
[] = {
1019 F(100000000, P_GPLL0
, 8, 0, 0),
1020 F(200000000, P_GPLL0
, 4, 0, 0),
1024 static struct clk_rcg2 sdcc1_ice_core_clk_src
= {
1025 .cmd_rcgr
= 0x5d000,
1027 .freq_tbl
= ftbl_sdcc1_ice_core_clk_src
,
1028 .parent_map
= gcc_xo_gpll0_map
,
1029 .clkr
.hw
.init
= &(struct clk_init_data
) {
1030 .name
= "sdcc1_ice_core_clk_src",
1031 .parent_data
= gcc_xo_gpll0_data
,
1032 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
1033 .ops
= &clk_rcg2_ops
,
1037 static const struct parent_map gcc_sdcc1_apps_map
[] = {
1043 static const struct clk_parent_data gcc_sdcc1_apss_data
[] = {
1045 { .hw
= &gpll0
.clkr
.hw
},
1046 { .hw
= &gpll4
.clkr
.hw
},
1049 static const struct freq_tbl ftbl_sdcc1_apps_clk_src
[] = {
1050 F(144000, P_XO
, 16, 3, 25),
1051 F(400000, P_XO
, 12, 1, 4),
1052 F(20000000, P_GPLL0
, 10, 1, 4),
1053 F(25000000, P_GPLL0
, 16, 1, 2),
1054 F(50000000, P_GPLL0
, 16, 0, 0),
1055 F(100000000, P_GPLL0
, 8, 0, 0),
1056 F(177770000, P_GPLL0
, 4.5, 0, 0),
1057 F(192000000, P_GPLL4
, 6, 0, 0),
1058 F(200000000, P_GPLL0
, 4, 0, 0),
1059 F(384000000, P_GPLL4
, 3, 0, 0),
1063 static struct clk_rcg2 sdcc1_apps_clk_src
= {
1064 .cmd_rcgr
= 0x42004,
1067 .freq_tbl
= ftbl_sdcc1_apps_clk_src
,
1068 .parent_map
= gcc_sdcc1_apps_map
,
1069 .clkr
.hw
.init
= &(struct clk_init_data
) {
1070 .name
= "sdcc1_apps_clk_src",
1071 .parent_data
= gcc_sdcc1_apss_data
,
1072 .num_parents
= ARRAY_SIZE(gcc_sdcc1_apss_data
),
1073 .ops
= &clk_rcg2_floor_ops
,
1077 static const struct freq_tbl ftbl_sdcc2_apps_clk_src
[] = {
1078 F(144000, P_XO
, 16, 3, 25),
1079 F(400000, P_XO
, 12, 1, 4),
1080 F(20000000, P_GPLL0
, 10, 1, 4),
1081 F(25000000, P_GPLL0
, 16, 1, 2),
1082 F(50000000, P_GPLL0
, 16, 0, 0),
1083 F(100000000, P_GPLL0
, 8, 0, 0),
1084 F(177770000, P_GPLL0
, 4.5, 0, 0),
1085 F(200000000, P_GPLL0
, 4, 0, 0),
1089 static struct clk_rcg2 sdcc2_apps_clk_src
= {
1090 .cmd_rcgr
= 0x43004,
1093 .freq_tbl
= ftbl_sdcc2_apps_clk_src
,
1094 .parent_map
= gcc_xo_gpll0_map
,
1095 .clkr
.hw
.init
= &(struct clk_init_data
) {
1096 .name
= "sdcc2_apps_clk_src",
1097 .parent_data
= gcc_xo_gpll0_data
,
1098 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
1099 .ops
= &clk_rcg2_floor_ops
,
1103 static const struct freq_tbl ftbl_usb_hs_system_clk_src
[] = {
1104 F(80000000, P_GPLL0
, 10, 0, 0),
1105 F(100000000, P_GPLL0
, 8, 0, 0),
1106 F(133330000, P_GPLL0
, 6, 0, 0),
1107 F(177780000, P_GPLL0
, 4.5, 0, 0),
1111 static struct clk_rcg2 usb_hs_system_clk_src
= {
1112 .cmd_rcgr
= 0x41010,
1114 .parent_map
= gcc_xo_gpll0_map
,
1115 .freq_tbl
= ftbl_usb_hs_system_clk_src
,
1116 .clkr
.hw
.init
= &(struct clk_init_data
){
1117 .name
= "usb_hs_system_clk_src",
1118 .parent_data
= gcc_xo_gpll0_data
,
1119 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
1120 .ops
= &clk_rcg2_ops
,
1124 static const struct freq_tbl ftbl_vcodec0_clk_src
[] = {
1125 F(133330000, P_GPLL0
, 6, 0, 0),
1126 F(180000000, P_GPLL6
, 6, 0, 0),
1127 F(228570000, P_GPLL0
, 3.5, 0, 0),
1128 F(266670000, P_GPLL0
, 3, 0, 0),
1129 F(308570000, P_GPLL6
, 3.5, 0, 0),
1130 F(329140000, P_GPLL4
, 3.5, 0, 0),
1131 F(360000000, P_GPLL6
, 3, 0, 0),
1135 static struct clk_rcg2 vcodec0_clk_src
= {
1136 .cmd_rcgr
= 0x4c000,
1138 .freq_tbl
= ftbl_vcodec0_clk_src
,
1139 .parent_map
= gcc_xo_gpll0_gpll6_gpll4_map
,
1140 .clkr
.hw
.init
= &(struct clk_init_data
) {
1141 .name
= "vcodec0_clk_src",
1142 .parent_data
= gcc_xo_gpll0_gpll6_gpll4_data
,
1143 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_gpll4_data
),
1144 .ops
= &clk_rcg2_ops
,
1148 static const struct freq_tbl ftbl_vfe_clk_src
[] = {
1149 F(50000000, P_GPLL0
, 16, 0, 0),
1150 F(80000000, P_GPLL0
, 10, 0, 0),
1151 F(100000000, P_GPLL0
, 8, 0, 0),
1152 F(133330000, P_GPLL0
, 6, 0, 0),
1153 F(160000000, P_GPLL0
, 5, 0, 0),
1154 F(200000000, P_GPLL0
, 4, 0, 0),
1155 F(266670000, P_GPLL0
, 3, 0, 0),
1156 F(308570000, P_GPLL6
, 3.5, 0, 0),
1157 F(320000000, P_GPLL0
, 2.5, 0, 0),
1158 F(329140000, P_GPLL4
, 3.5, 0, 0),
1159 F(360000000, P_GPLL6
, 3, 0, 0),
1163 static struct clk_rcg2 vfe0_clk_src
= {
1164 .cmd_rcgr
= 0x58000,
1166 .freq_tbl
= ftbl_vfe_clk_src
,
1167 .parent_map
= gcc_xo_gpll0_gpll6_gpll4_map
,
1168 .clkr
.hw
.init
= &(struct clk_init_data
) {
1169 .name
= "vfe0_clk_src",
1170 .parent_data
= gcc_xo_gpll0_gpll6_gpll4_data
,
1171 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_gpll4_data
),
1172 .ops
= &clk_rcg2_ops
,
1176 static struct clk_rcg2 vfe1_clk_src
= {
1177 .cmd_rcgr
= 0x58054,
1179 .freq_tbl
= ftbl_vfe_clk_src
,
1180 .parent_map
= gcc_xo_gpll0_gpll6_gpll4_map
,
1181 .clkr
.hw
.init
= &(struct clk_init_data
) {
1182 .name
= "vfe1_clk_src",
1183 .parent_data
= gcc_xo_gpll0_gpll6_gpll4_data
,
1184 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll6_gpll4_data
),
1185 .ops
= &clk_rcg2_ops
,
1189 static const struct freq_tbl ftbl_vsync_clk_src
[] = {
1190 F(19200000, P_XO
, 1, 0, 0),
1194 static struct clk_rcg2 vsync_clk_src
= {
1195 .cmd_rcgr
= 0x4d02c,
1197 .freq_tbl
= ftbl_vsync_clk_src
,
1198 .parent_map
= gcc_xo_gpll0_out_aux_map
,
1199 .clkr
.hw
.init
= &(struct clk_init_data
) {
1200 .name
= "vsync_clk_src",
1201 .parent_data
= gcc_xo_gpll0_data
,
1202 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_data
),
1203 .ops
= &clk_rcg2_ops
,
1207 static struct clk_branch gcc_apss_tcu_clk
= {
1208 .halt_reg
= 0x12018,
1209 .halt_check
= BRANCH_HALT_VOTED
,
1211 .enable_reg
= 0x4500c,
1212 .enable_mask
= BIT(1),
1213 .hw
.init
= &(struct clk_init_data
) {
1214 .name
= "gcc_apss_tcu_clk",
1215 .ops
= &clk_branch2_ops
,
1220 static struct clk_branch gcc_bimc_gfx_clk
= {
1221 .halt_reg
= 0x59034,
1222 .halt_check
= BRANCH_HALT
,
1224 .enable_reg
= 0x59034,
1225 .enable_mask
= BIT(0),
1226 .hw
.init
= &(struct clk_init_data
) {
1227 .name
= "gcc_bimc_gfx_clk",
1228 .ops
= &clk_branch2_ops
,
1233 static struct clk_branch gcc_bimc_gpu_clk
= {
1234 .halt_reg
= 0x59030,
1235 .halt_check
= BRANCH_HALT
,
1237 .enable_reg
= 0x59030,
1238 .enable_mask
= BIT(0),
1239 .hw
.init
= &(struct clk_init_data
) {
1240 .name
= "gcc_bimc_gpu_clk",
1241 .ops
= &clk_branch2_ops
,
1246 static struct clk_branch gcc_blsp1_ahb_clk
= {
1247 .halt_reg
= 0x01008,
1248 .halt_check
= BRANCH_HALT_VOTED
,
1250 .enable_reg
= 0x45004,
1251 .enable_mask
= BIT(10),
1252 .hw
.init
= &(struct clk_init_data
) {
1253 .name
= "gcc_blsp1_ahb_clk",
1254 .ops
= &clk_branch2_ops
,
1259 static struct clk_branch gcc_blsp2_ahb_clk
= {
1260 .halt_reg
= 0x0b008,
1261 .halt_check
= BRANCH_HALT_VOTED
,
1263 .enable_reg
= 0x45004,
1264 .enable_mask
= BIT(20),
1265 .hw
.init
= &(struct clk_init_data
) {
1266 .name
= "gcc_blsp2_ahb_clk",
1267 .ops
= &clk_branch2_ops
,
1272 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1273 .halt_reg
= 0x03010,
1274 .halt_check
= BRANCH_HALT
,
1276 .enable_reg
= 0x03010,
1277 .enable_mask
= BIT(0),
1278 .hw
.init
= &(struct clk_init_data
) {
1279 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1280 .parent_hws
= (const struct clk_hw
*[]){
1281 &blsp1_qup2_i2c_apps_clk_src
.clkr
.hw
,
1284 .ops
= &clk_branch2_ops
,
1285 .flags
= CLK_SET_RATE_PARENT
,
1290 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1291 .halt_reg
= 0x04020,
1292 .halt_check
= BRANCH_HALT
,
1294 .enable_reg
= 0x04020,
1295 .enable_mask
= BIT(0),
1296 .hw
.init
= &(struct clk_init_data
) {
1297 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1298 .parent_hws
= (const struct clk_hw
*[]){
1299 &blsp1_qup3_i2c_apps_clk_src
.clkr
.hw
,
1302 .ops
= &clk_branch2_ops
,
1303 .flags
= CLK_SET_RATE_PARENT
,
1308 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1309 .halt_reg
= 0x05020,
1310 .halt_check
= BRANCH_HALT
,
1312 .enable_reg
= 0x05020,
1313 .enable_mask
= BIT(0),
1314 .hw
.init
= &(struct clk_init_data
) {
1315 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1316 .parent_hws
= (const struct clk_hw
*[]){
1317 &blsp1_qup4_i2c_apps_clk_src
.clkr
.hw
,
1320 .ops
= &clk_branch2_ops
,
1321 .flags
= CLK_SET_RATE_PARENT
,
1326 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1327 .halt_reg
= 0x0c008,
1328 .halt_check
= BRANCH_HALT
,
1330 .enable_reg
= 0x0c008,
1331 .enable_mask
= BIT(0),
1332 .hw
.init
= &(struct clk_init_data
) {
1333 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1334 .parent_hws
= (const struct clk_hw
*[]){
1335 &blsp2_qup1_i2c_apps_clk_src
.clkr
.hw
,
1338 .ops
= &clk_branch2_ops
,
1339 .flags
= CLK_SET_RATE_PARENT
,
1344 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1345 .halt_reg
= 0x0d010,
1346 .halt_check
= BRANCH_HALT
,
1348 .enable_reg
= 0x0d010,
1349 .enable_mask
= BIT(0),
1350 .hw
.init
= &(struct clk_init_data
) {
1351 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1352 .parent_hws
= (const struct clk_hw
*[]){
1353 &blsp2_qup2_i2c_apps_clk_src
.clkr
.hw
,
1356 .ops
= &clk_branch2_ops
,
1357 .flags
= CLK_SET_RATE_PARENT
,
1362 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1363 .halt_reg
= 0x0f020,
1364 .halt_check
= BRANCH_HALT
,
1366 .enable_reg
= 0x0f020,
1367 .enable_mask
= BIT(0),
1368 .hw
.init
= &(struct clk_init_data
) {
1369 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1370 .parent_hws
= (const struct clk_hw
*[]){
1371 &blsp2_qup3_i2c_apps_clk_src
.clkr
.hw
,
1374 .ops
= &clk_branch2_ops
,
1375 .flags
= CLK_SET_RATE_PARENT
,
1380 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1381 .halt_reg
= 0x0300c,
1382 .halt_check
= BRANCH_HALT
,
1384 .enable_reg
= 0x0300c,
1385 .enable_mask
= BIT(0),
1386 .hw
.init
= &(struct clk_init_data
) {
1387 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1388 .parent_hws
= (const struct clk_hw
*[]){
1389 &blsp1_qup2_spi_apps_clk_src
.clkr
.hw
,
1392 .ops
= &clk_branch2_ops
,
1393 .flags
= CLK_SET_RATE_PARENT
,
1398 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1399 .halt_reg
= 0x0401c,
1400 .halt_check
= BRANCH_HALT
,
1402 .enable_reg
= 0x0401c,
1403 .enable_mask
= BIT(0),
1404 .hw
.init
= &(struct clk_init_data
) {
1405 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1406 .parent_hws
= (const struct clk_hw
*[]){
1407 &blsp1_qup3_spi_apps_clk_src
.clkr
.hw
,
1410 .ops
= &clk_branch2_ops
,
1411 .flags
= CLK_SET_RATE_PARENT
,
1416 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1417 .halt_reg
= 0x0501c,
1418 .halt_check
= BRANCH_HALT
,
1420 .enable_reg
= 0x0501c,
1421 .enable_mask
= BIT(0),
1422 .hw
.init
= &(struct clk_init_data
) {
1423 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1424 .parent_hws
= (const struct clk_hw
*[]){
1425 &blsp1_qup4_spi_apps_clk_src
.clkr
.hw
,
1428 .ops
= &clk_branch2_ops
,
1429 .flags
= CLK_SET_RATE_PARENT
,
1434 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1435 .halt_reg
= 0x0c004,
1436 .halt_check
= BRANCH_HALT
,
1438 .enable_reg
= 0x0c004,
1439 .enable_mask
= BIT(0),
1440 .hw
.init
= &(struct clk_init_data
) {
1441 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1442 .parent_hws
= (const struct clk_hw
*[]){
1443 &blsp2_qup1_spi_apps_clk_src
.clkr
.hw
,
1446 .ops
= &clk_branch2_ops
,
1447 .flags
= CLK_SET_RATE_PARENT
,
1452 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1453 .halt_reg
= 0x0d00c,
1454 .halt_check
= BRANCH_HALT
,
1456 .enable_reg
= 0x0d00c,
1457 .enable_mask
= BIT(0),
1458 .hw
.init
= &(struct clk_init_data
) {
1459 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1460 .parent_hws
= (const struct clk_hw
*[]){
1461 &blsp2_qup2_spi_apps_clk_src
.clkr
.hw
,
1464 .ops
= &clk_branch2_ops
,
1465 .flags
= CLK_SET_RATE_PARENT
,
1470 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1471 .halt_reg
= 0x0f01c,
1472 .halt_check
= BRANCH_HALT
,
1474 .enable_reg
= 0x0f01c,
1475 .enable_mask
= BIT(0),
1476 .hw
.init
= &(struct clk_init_data
) {
1477 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1478 .parent_hws
= (const struct clk_hw
*[]){
1479 &blsp2_qup3_spi_apps_clk_src
.clkr
.hw
,
1482 .ops
= &clk_branch2_ops
,
1483 .flags
= CLK_SET_RATE_PARENT
,
1488 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1489 .halt_reg
= 0x0203c,
1490 .halt_check
= BRANCH_HALT
,
1492 .enable_reg
= 0x0203c,
1493 .enable_mask
= BIT(0),
1494 .hw
.init
= &(struct clk_init_data
) {
1495 .name
= "gcc_blsp1_uart1_apps_clk",
1496 .parent_hws
= (const struct clk_hw
*[]){
1497 &blsp1_uart1_apps_clk_src
.clkr
.hw
,
1500 .ops
= &clk_branch2_ops
,
1501 .flags
= CLK_SET_RATE_PARENT
,
1506 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1507 .halt_reg
= 0x0302c,
1508 .halt_check
= BRANCH_HALT
,
1510 .enable_reg
= 0x0302c,
1511 .enable_mask
= BIT(0),
1512 .hw
.init
= &(struct clk_init_data
) {
1513 .name
= "gcc_blsp1_uart2_apps_clk",
1514 .parent_hws
= (const struct clk_hw
*[]){
1515 &blsp1_uart2_apps_clk_src
.clkr
.hw
,
1518 .ops
= &clk_branch2_ops
,
1519 .flags
= CLK_SET_RATE_PARENT
,
1524 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1525 .halt_reg
= 0x0c03c,
1526 .halt_check
= BRANCH_HALT
,
1528 .enable_reg
= 0x0c03c,
1529 .enable_mask
= BIT(0),
1530 .hw
.init
= &(struct clk_init_data
) {
1531 .name
= "gcc_blsp2_uart1_apps_clk",
1532 .parent_hws
= (const struct clk_hw
*[]){
1533 &blsp2_uart1_apps_clk_src
.clkr
.hw
,
1536 .ops
= &clk_branch2_ops
,
1537 .flags
= CLK_SET_RATE_PARENT
,
1542 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1543 .halt_reg
= 0x0d02c,
1544 .halt_check
= BRANCH_HALT
,
1546 .enable_reg
= 0x0d02c,
1547 .enable_mask
= BIT(0),
1548 .hw
.init
= &(struct clk_init_data
) {
1549 .name
= "gcc_blsp2_uart2_apps_clk",
1550 .parent_hws
= (const struct clk_hw
*[]){
1551 &blsp2_uart2_apps_clk_src
.clkr
.hw
,
1554 .ops
= &clk_branch2_ops
,
1555 .flags
= CLK_SET_RATE_PARENT
,
1560 static struct clk_branch gcc_boot_rom_ahb_clk
= {
1561 .halt_reg
= 0x1300c,
1562 .halt_check
= BRANCH_HALT_VOTED
,
1564 .enable_reg
= 0x45004,
1565 .enable_mask
= BIT(7),
1566 .hw
.init
= &(struct clk_init_data
) {
1567 .name
= "gcc_boot_rom_ahb_clk",
1568 .ops
= &clk_branch2_ops
,
1573 static struct clk_branch gcc_camss_ahb_clk
= {
1574 .halt_reg
= 0x56004,
1575 .halt_check
= BRANCH_HALT
,
1577 .enable_reg
= 0x56004,
1578 .enable_mask
= BIT(0),
1579 .hw
.init
= &(struct clk_init_data
) {
1580 .name
= "gcc_camss_ahb_clk",
1581 .ops
= &clk_branch2_ops
,
1586 static struct clk_branch gcc_camss_cci_ahb_clk
= {
1587 .halt_reg
= 0x5101c,
1588 .halt_check
= BRANCH_HALT
,
1590 .enable_reg
= 0x5101c,
1591 .enable_mask
= BIT(0),
1592 .hw
.init
= &(struct clk_init_data
) {
1593 .name
= "gcc_camss_cci_ahb_clk",
1594 .parent_hws
= (const struct clk_hw
*[]){
1595 &camss_top_ahb_clk_src
.clkr
.hw
,
1598 .ops
= &clk_branch2_ops
,
1599 .flags
= CLK_SET_RATE_PARENT
,
1604 static struct clk_branch gcc_camss_cci_clk
= {
1605 .halt_reg
= 0x51018,
1606 .halt_check
= BRANCH_HALT
,
1608 .enable_reg
= 0x51018,
1609 .enable_mask
= BIT(0),
1610 .hw
.init
= &(struct clk_init_data
) {
1611 .name
= "gcc_camss_cci_clk",
1612 .parent_hws
= (const struct clk_hw
*[]){
1613 &cci_clk_src
.clkr
.hw
,
1616 .ops
= &clk_branch2_ops
,
1617 .flags
= CLK_SET_RATE_PARENT
,
1622 static struct clk_branch gcc_camss_cpp_ahb_clk
= {
1623 .halt_reg
= 0x58040,
1624 .halt_check
= BRANCH_HALT
,
1626 .enable_reg
= 0x58040,
1627 .enable_mask
= BIT(0),
1628 .hw
.init
= &(struct clk_init_data
) {
1629 .name
= "gcc_camss_cpp_ahb_clk",
1630 .parent_hws
= (const struct clk_hw
*[]){
1631 &camss_top_ahb_clk_src
.clkr
.hw
,
1634 .ops
= &clk_branch2_ops
,
1635 .flags
= CLK_SET_RATE_PARENT
,
1640 static struct clk_branch gcc_camss_cpp_clk
= {
1641 .halt_reg
= 0x5803c,
1642 .halt_check
= BRANCH_HALT
,
1644 .enable_reg
= 0x5803c,
1645 .enable_mask
= BIT(0),
1646 .hw
.init
= &(struct clk_init_data
) {
1647 .name
= "gcc_camss_cpp_clk",
1648 .parent_hws
= (const struct clk_hw
*[]){
1649 &cpp_clk_src
.clkr
.hw
,
1652 .ops
= &clk_branch2_ops
,
1653 .flags
= CLK_SET_RATE_PARENT
,
1658 static struct clk_branch gcc_camss_csi0_ahb_clk
= {
1659 .halt_reg
= 0x4e040,
1660 .halt_check
= BRANCH_HALT
,
1662 .enable_reg
= 0x4e040,
1663 .enable_mask
= BIT(0),
1664 .hw
.init
= &(struct clk_init_data
) {
1665 .name
= "gcc_camss_csi0_ahb_clk",
1666 .parent_hws
= (const struct clk_hw
*[]){
1667 &camss_top_ahb_clk_src
.clkr
.hw
,
1670 .ops
= &clk_branch2_ops
,
1671 .flags
= CLK_SET_RATE_PARENT
,
1676 static struct clk_branch gcc_camss_csi1_ahb_clk
= {
1677 .halt_reg
= 0x4f040,
1678 .halt_check
= BRANCH_HALT
,
1680 .enable_reg
= 0x4f040,
1681 .enable_mask
= BIT(0),
1682 .hw
.init
= &(struct clk_init_data
) {
1683 .name
= "gcc_camss_csi1_ahb_clk",
1684 .parent_hws
= (const struct clk_hw
*[]){
1685 &camss_top_ahb_clk_src
.clkr
.hw
,
1688 .ops
= &clk_branch2_ops
,
1689 .flags
= CLK_SET_RATE_PARENT
,
1694 static struct clk_branch gcc_camss_csi2_ahb_clk
= {
1695 .halt_reg
= 0x3c040,
1696 .halt_check
= BRANCH_HALT
,
1698 .enable_reg
= 0x3c040,
1699 .enable_mask
= BIT(0),
1700 .hw
.init
= &(struct clk_init_data
) {
1701 .name
= "gcc_camss_csi2_ahb_clk",
1702 .parent_hws
= (const struct clk_hw
*[]){
1703 &camss_top_ahb_clk_src
.clkr
.hw
,
1706 .ops
= &clk_branch2_ops
,
1707 .flags
= CLK_SET_RATE_PARENT
,
1712 static struct clk_branch gcc_camss_csi0_clk
= {
1713 .halt_reg
= 0x4e03c,
1714 .halt_check
= BRANCH_HALT
,
1716 .enable_reg
= 0x4e03c,
1717 .enable_mask
= BIT(0),
1718 .hw
.init
= &(struct clk_init_data
) {
1719 .name
= "gcc_camss_csi0_clk",
1720 .parent_hws
= (const struct clk_hw
*[]){
1721 &csi0_clk_src
.clkr
.hw
,
1724 .ops
= &clk_branch2_ops
,
1725 .flags
= CLK_SET_RATE_PARENT
,
1730 static struct clk_branch gcc_camss_csi1_clk
= {
1731 .halt_reg
= 0x4f03c,
1732 .halt_check
= BRANCH_HALT
,
1734 .enable_reg
= 0x4f03c,
1735 .enable_mask
= BIT(0),
1736 .hw
.init
= &(struct clk_init_data
) {
1737 .name
= "gcc_camss_csi1_clk",
1738 .parent_hws
= (const struct clk_hw
*[]){
1739 &csi1_clk_src
.clkr
.hw
,
1742 .ops
= &clk_branch2_ops
,
1743 .flags
= CLK_SET_RATE_PARENT
,
1748 static struct clk_branch gcc_camss_csi2_clk
= {
1749 .halt_reg
= 0x3c03c,
1750 .halt_check
= BRANCH_HALT
,
1752 .enable_reg
= 0x3c03c,
1753 .enable_mask
= BIT(0),
1754 .hw
.init
= &(struct clk_init_data
) {
1755 .name
= "gcc_camss_csi2_clk",
1756 .parent_hws
= (const struct clk_hw
*[]){
1757 &csi2_clk_src
.clkr
.hw
,
1760 .ops
= &clk_branch2_ops
,
1761 .flags
= CLK_SET_RATE_PARENT
,
1766 static struct clk_branch gcc_camss_csi0phy_clk
= {
1767 .halt_reg
= 0x4e048,
1768 .halt_check
= BRANCH_HALT
,
1770 .enable_reg
= 0x4e048,
1771 .enable_mask
= BIT(0),
1772 .hw
.init
= &(struct clk_init_data
) {
1773 .name
= "gcc_camss_csi0phy_clk",
1774 .parent_hws
= (const struct clk_hw
*[]){
1775 &csi0_clk_src
.clkr
.hw
,
1778 .ops
= &clk_branch2_ops
,
1779 .flags
= CLK_SET_RATE_PARENT
,
1784 static struct clk_branch gcc_camss_csi1phy_clk
= {
1785 .halt_reg
= 0x4f048,
1786 .halt_check
= BRANCH_HALT
,
1788 .enable_reg
= 0x4f048,
1789 .enable_mask
= BIT(0),
1790 .hw
.init
= &(struct clk_init_data
) {
1791 .name
= "gcc_camss_csi1phy_clk",
1792 .parent_hws
= (const struct clk_hw
*[]){
1793 &csi1_clk_src
.clkr
.hw
,
1796 .ops
= &clk_branch2_ops
,
1797 .flags
= CLK_SET_RATE_PARENT
,
1802 static struct clk_branch gcc_camss_csi2phy_clk
= {
1803 .halt_reg
= 0x3c048,
1804 .halt_check
= BRANCH_HALT
,
1806 .enable_reg
= 0x3c048,
1807 .enable_mask
= BIT(0),
1808 .hw
.init
= &(struct clk_init_data
) {
1809 .name
= "gcc_camss_csi2phy_clk",
1810 .parent_hws
= (const struct clk_hw
*[]){
1811 &csi2_clk_src
.clkr
.hw
,
1814 .ops
= &clk_branch2_ops
,
1815 .flags
= CLK_SET_RATE_PARENT
,
1820 static struct clk_branch gcc_camss_csi0phytimer_clk
= {
1821 .halt_reg
= 0x4e01c,
1822 .halt_check
= BRANCH_HALT
,
1824 .enable_reg
= 0x4e01c,
1825 .enable_mask
= BIT(0),
1826 .hw
.init
= &(struct clk_init_data
) {
1827 .name
= "gcc_camss_csi0phytimer_clk",
1828 .parent_hws
= (const struct clk_hw
*[]){
1829 &csi0phytimer_clk_src
.clkr
.hw
,
1832 .ops
= &clk_branch2_ops
,
1833 .flags
= CLK_SET_RATE_PARENT
,
1838 static struct clk_branch gcc_camss_csi1phytimer_clk
= {
1839 .halt_reg
= 0x4f01c,
1840 .halt_check
= BRANCH_HALT
,
1842 .enable_reg
= 0x4f01c,
1843 .enable_mask
= BIT(0),
1844 .hw
.init
= &(struct clk_init_data
) {
1845 .name
= "gcc_camss_csi1phytimer_clk",
1846 .parent_hws
= (const struct clk_hw
*[]){
1847 &csi1phytimer_clk_src
.clkr
.hw
,
1850 .ops
= &clk_branch2_ops
,
1851 .flags
= CLK_SET_RATE_PARENT
,
1856 static struct clk_branch gcc_camss_csi0pix_clk
= {
1857 .halt_reg
= 0x4e058,
1858 .halt_check
= BRANCH_HALT
,
1860 .enable_reg
= 0x4e058,
1861 .enable_mask
= BIT(0),
1862 .hw
.init
= &(struct clk_init_data
) {
1863 .name
= "gcc_camss_csi0pix_clk",
1864 .parent_hws
= (const struct clk_hw
*[]){
1865 &csi0_clk_src
.clkr
.hw
,
1868 .ops
= &clk_branch2_ops
,
1869 .flags
= CLK_SET_RATE_PARENT
,
1874 static struct clk_branch gcc_camss_csi1pix_clk
= {
1875 .halt_reg
= 0x4f058,
1876 .halt_check
= BRANCH_HALT
,
1878 .enable_reg
= 0x4f058,
1879 .enable_mask
= BIT(0),
1880 .hw
.init
= &(struct clk_init_data
) {
1881 .name
= "gcc_camss_csi1pix_clk",
1882 .parent_hws
= (const struct clk_hw
*[]){
1883 &csi1_clk_src
.clkr
.hw
,
1886 .ops
= &clk_branch2_ops
,
1887 .flags
= CLK_SET_RATE_PARENT
,
1892 static struct clk_branch gcc_camss_csi2pix_clk
= {
1893 .halt_reg
= 0x3c058,
1894 .halt_check
= BRANCH_HALT
,
1896 .enable_reg
= 0x3c058,
1897 .enable_mask
= BIT(0),
1898 .hw
.init
= &(struct clk_init_data
) {
1899 .name
= "gcc_camss_csi2pix_clk",
1900 .parent_hws
= (const struct clk_hw
*[]){
1901 &csi2_clk_src
.clkr
.hw
,
1904 .ops
= &clk_branch2_ops
,
1905 .flags
= CLK_SET_RATE_PARENT
,
1910 static struct clk_branch gcc_camss_csi0rdi_clk
= {
1911 .halt_reg
= 0x4e050,
1912 .halt_check
= BRANCH_HALT
,
1914 .enable_reg
= 0x4e050,
1915 .enable_mask
= BIT(0),
1916 .hw
.init
= &(struct clk_init_data
) {
1917 .name
= "gcc_camss_csi0rdi_clk",
1918 .parent_hws
= (const struct clk_hw
*[]){
1919 &csi0_clk_src
.clkr
.hw
,
1922 .ops
= &clk_branch2_ops
,
1923 .flags
= CLK_SET_RATE_PARENT
,
1928 static struct clk_branch gcc_camss_csi1rdi_clk
= {
1929 .halt_reg
= 0x4f050,
1930 .halt_check
= BRANCH_HALT
,
1932 .enable_reg
= 0x4f050,
1933 .enable_mask
= BIT(0),
1934 .hw
.init
= &(struct clk_init_data
) {
1935 .name
= "gcc_camss_csi1rdi_clk",
1936 .parent_hws
= (const struct clk_hw
*[]){
1937 &csi1_clk_src
.clkr
.hw
,
1940 .ops
= &clk_branch2_ops
,
1941 .flags
= CLK_SET_RATE_PARENT
,
1946 static struct clk_branch gcc_camss_csi2rdi_clk
= {
1947 .halt_reg
= 0x3c050,
1948 .halt_check
= BRANCH_HALT
,
1950 .enable_reg
= 0x3c050,
1951 .enable_mask
= BIT(0),
1952 .hw
.init
= &(struct clk_init_data
) {
1953 .name
= "gcc_camss_csi2rdi_clk",
1954 .parent_hws
= (const struct clk_hw
*[]){
1955 &csi2_clk_src
.clkr
.hw
,
1958 .ops
= &clk_branch2_ops
,
1959 .flags
= CLK_SET_RATE_PARENT
,
1964 static struct clk_branch gcc_camss_csi_vfe0_clk
= {
1965 .halt_reg
= 0x58050,
1966 .halt_check
= BRANCH_HALT
,
1968 .enable_reg
= 0x58050,
1969 .enable_mask
= BIT(0),
1970 .hw
.init
= &(struct clk_init_data
) {
1971 .name
= "gcc_camss_csi_vfe0_clk",
1972 .parent_hws
= (const struct clk_hw
*[]){
1973 &vfe0_clk_src
.clkr
.hw
,
1976 .ops
= &clk_branch2_ops
,
1977 .flags
= CLK_SET_RATE_PARENT
,
1982 static struct clk_branch gcc_camss_csi_vfe1_clk
= {
1983 .halt_reg
= 0x58074,
1984 .halt_check
= BRANCH_HALT
,
1986 .enable_reg
= 0x58074,
1987 .enable_mask
= BIT(0),
1988 .hw
.init
= &(struct clk_init_data
) {
1989 .name
= "gcc_camss_csi_vfe1_clk",
1990 .parent_hws
= (const struct clk_hw
*[]){
1991 &vfe1_clk_src
.clkr
.hw
,
1994 .ops
= &clk_branch2_ops
,
1995 .flags
= CLK_SET_RATE_PARENT
,
2000 static struct clk_branch gcc_camss_gp0_clk
= {
2001 .halt_reg
= 0x54018,
2002 .halt_check
= BRANCH_HALT
,
2004 .enable_reg
= 0x54018,
2005 .enable_mask
= BIT(0),
2006 .hw
.init
= &(struct clk_init_data
) {
2007 .name
= "gcc_camss_gp0_clk",
2008 .parent_hws
= (const struct clk_hw
*[]){
2009 &camss_gp0_clk_src
.clkr
.hw
,
2012 .ops
= &clk_branch2_ops
,
2013 .flags
= CLK_SET_RATE_PARENT
,
2018 static struct clk_branch gcc_camss_gp1_clk
= {
2019 .halt_reg
= 0x55018,
2020 .halt_check
= BRANCH_HALT
,
2022 .enable_reg
= 0x55018,
2023 .enable_mask
= BIT(0),
2024 .hw
.init
= &(struct clk_init_data
) {
2025 .name
= "gcc_camss_gp1_clk",
2026 .parent_hws
= (const struct clk_hw
*[]){
2027 &camss_gp1_clk_src
.clkr
.hw
,
2030 .ops
= &clk_branch2_ops
,
2031 .flags
= CLK_SET_RATE_PARENT
,
2036 static struct clk_branch gcc_camss_ispif_ahb_clk
= {
2037 .halt_reg
= 0x50004,
2038 .halt_check
= BRANCH_HALT
,
2040 .enable_reg
= 0x50004,
2041 .enable_mask
= BIT(0),
2042 .hw
.init
= &(struct clk_init_data
) {
2043 .name
= "gcc_camss_ispif_ahb_clk",
2044 .parent_hws
= (const struct clk_hw
*[]){
2045 &camss_top_ahb_clk_src
.clkr
.hw
,
2048 .ops
= &clk_branch2_ops
,
2049 .flags
= CLK_SET_RATE_PARENT
,
2054 static struct clk_branch gcc_camss_jpeg0_clk
= {
2055 .halt_reg
= 0x57020,
2056 .halt_check
= BRANCH_HALT
,
2058 .enable_reg
= 0x57020,
2059 .enable_mask
= BIT(0),
2060 .hw
.init
= &(struct clk_init_data
) {
2061 .name
= "gcc_camss_jpeg0_clk",
2062 .parent_hws
= (const struct clk_hw
*[]){
2063 &jpeg0_clk_src
.clkr
.hw
,
2066 .ops
= &clk_branch2_ops
,
2067 .flags
= CLK_SET_RATE_PARENT
,
2072 static struct clk_branch gcc_camss_jpeg_ahb_clk
= {
2073 .halt_reg
= 0x57024,
2074 .halt_check
= BRANCH_HALT
,
2076 .enable_reg
= 0x57024,
2077 .enable_mask
= BIT(0),
2078 .hw
.init
= &(struct clk_init_data
) {
2079 .name
= "gcc_camss_jpeg_ahb_clk",
2080 .parent_hws
= (const struct clk_hw
*[]){
2081 &camss_top_ahb_clk_src
.clkr
.hw
,
2084 .ops
= &clk_branch2_ops
,
2085 .flags
= CLK_SET_RATE_PARENT
,
2090 static struct clk_branch gcc_camss_jpeg_axi_clk
= {
2091 .halt_reg
= 0x57028,
2092 .halt_check
= BRANCH_HALT
,
2094 .enable_reg
= 0x57028,
2095 .enable_mask
= BIT(0),
2096 .hw
.init
= &(struct clk_init_data
) {
2097 .name
= "gcc_camss_jpeg_axi_clk",
2098 .ops
= &clk_branch2_ops
,
2103 static struct clk_branch gcc_camss_mclk0_clk
= {
2104 .halt_reg
= 0x52018,
2105 .halt_check
= BRANCH_HALT
,
2107 .enable_reg
= 0x52018,
2108 .enable_mask
= BIT(0),
2109 .hw
.init
= &(struct clk_init_data
) {
2110 .name
= "gcc_camss_mclk0_clk",
2111 .parent_hws
= (const struct clk_hw
*[]){
2112 &mclk0_clk_src
.clkr
.hw
,
2115 .ops
= &clk_branch2_ops
,
2116 .flags
= CLK_SET_RATE_PARENT
,
2121 static struct clk_branch gcc_camss_mclk1_clk
= {
2122 .halt_reg
= 0x53018,
2123 .halt_check
= BRANCH_HALT
,
2125 .enable_reg
= 0x53018,
2126 .enable_mask
= BIT(0),
2127 .hw
.init
= &(struct clk_init_data
) {
2128 .name
= "gcc_camss_mclk1_clk",
2129 .parent_hws
= (const struct clk_hw
*[]){
2130 &mclk1_clk_src
.clkr
.hw
,
2133 .ops
= &clk_branch2_ops
,
2134 .flags
= CLK_SET_RATE_PARENT
,
2139 static struct clk_branch gcc_camss_mclk2_clk
= {
2140 .halt_reg
= 0x5c018,
2141 .halt_check
= BRANCH_HALT
,
2143 .enable_reg
= 0x5c018,
2144 .enable_mask
= BIT(0),
2145 .hw
.init
= &(struct clk_init_data
) {
2146 .name
= "gcc_camss_mclk2_clk",
2147 .parent_hws
= (const struct clk_hw
*[]){
2148 &mclk2_clk_src
.clkr
.hw
,
2151 .ops
= &clk_branch2_ops
,
2152 .flags
= CLK_SET_RATE_PARENT
,
2157 static struct clk_branch gcc_camss_micro_ahb_clk
= {
2158 .halt_reg
= 0x5600c,
2159 .halt_check
= BRANCH_HALT
,
2161 .enable_reg
= 0x5600c,
2162 .enable_mask
= BIT(0),
2163 .hw
.init
= &(struct clk_init_data
) {
2164 .name
= "gcc_camss_micro_ahb_clk",
2165 .parent_hws
= (const struct clk_hw
*[]){
2166 &camss_top_ahb_clk_src
.clkr
.hw
,
2169 .ops
= &clk_branch2_ops
,
2170 .flags
= CLK_SET_RATE_PARENT
,
2175 static struct clk_branch gcc_camss_top_ahb_clk
= {
2176 .halt_reg
= 0x5a014,
2177 .halt_check
= BRANCH_HALT
,
2179 .enable_reg
= 0x5a014,
2180 .enable_mask
= BIT(0),
2181 .hw
.init
= &(struct clk_init_data
) {
2182 .name
= "gcc_camss_top_ahb_clk",
2183 .parent_hws
= (const struct clk_hw
*[]){
2184 &camss_top_ahb_clk_src
.clkr
.hw
,
2187 .ops
= &clk_branch2_ops
,
2188 .flags
= CLK_SET_RATE_PARENT
,
2193 static struct clk_branch gcc_camss_vfe0_ahb_clk
= {
2194 .halt_reg
= 0x58044,
2195 .halt_check
= BRANCH_HALT
,
2197 .enable_reg
= 0x58044,
2198 .enable_mask
= BIT(0),
2199 .hw
.init
= &(struct clk_init_data
) {
2200 .name
= "gcc_camss_vfe0_ahb_clk",
2201 .parent_hws
= (const struct clk_hw
*[]){
2202 &camss_top_ahb_clk_src
.clkr
.hw
,
2205 .ops
= &clk_branch2_ops
,
2206 .flags
= CLK_SET_RATE_PARENT
,
2211 static struct clk_branch gcc_camss_vfe0_axi_clk
= {
2212 .halt_reg
= 0x58048,
2213 .halt_check
= BRANCH_HALT
,
2215 .enable_reg
= 0x58048,
2216 .enable_mask
= BIT(0),
2217 .hw
.init
= &(struct clk_init_data
) {
2218 .name
= "gcc_camss_vfe0_axi_clk",
2219 .ops
= &clk_branch2_ops
,
2224 static struct clk_branch gcc_camss_vfe0_clk
= {
2225 .halt_reg
= 0x58038,
2226 .halt_check
= BRANCH_HALT
,
2228 .enable_reg
= 0x58038,
2229 .enable_mask
= BIT(0),
2230 .hw
.init
= &(struct clk_init_data
) {
2231 .name
= "gcc_camss_vfe0_clk",
2232 .parent_hws
= (const struct clk_hw
*[]){
2233 &vfe0_clk_src
.clkr
.hw
,
2236 .ops
= &clk_branch2_ops
,
2237 .flags
= CLK_SET_RATE_PARENT
,
2242 static struct clk_branch gcc_camss_vfe1_ahb_clk
= {
2243 .halt_reg
= 0x58060,
2244 .halt_check
= BRANCH_HALT
,
2246 .enable_reg
= 0x58060,
2247 .enable_mask
= BIT(0),
2248 .hw
.init
= &(struct clk_init_data
) {
2249 .name
= "gcc_camss_vfe1_ahb_clk",
2250 .parent_hws
= (const struct clk_hw
*[]){
2251 &camss_top_ahb_clk_src
.clkr
.hw
,
2254 .ops
= &clk_branch2_ops
,
2255 .flags
= CLK_SET_RATE_PARENT
,
2260 static struct clk_branch gcc_camss_vfe1_axi_clk
= {
2261 .halt_reg
= 0x58068,
2262 .halt_check
= BRANCH_HALT
,
2264 .enable_reg
= 0x58068,
2265 .enable_mask
= BIT(0),
2266 .hw
.init
= &(struct clk_init_data
) {
2267 .name
= "gcc_camss_vfe1_axi_clk",
2268 .ops
= &clk_branch2_ops
,
2273 static struct clk_branch gcc_camss_vfe1_clk
= {
2274 .halt_reg
= 0x5805c,
2275 .halt_check
= BRANCH_HALT
,
2277 .enable_reg
= 0x5805c,
2278 .enable_mask
= BIT(0),
2279 .hw
.init
= &(struct clk_init_data
) {
2280 .name
= "gcc_camss_vfe1_clk",
2281 .parent_hws
= (const struct clk_hw
*[]){
2282 &vfe1_clk_src
.clkr
.hw
,
2285 .ops
= &clk_branch2_ops
,
2286 .flags
= CLK_SET_RATE_PARENT
,
2291 static struct clk_branch gcc_cpp_tbu_clk
= {
2292 .halt_reg
= 0x12040,
2293 .halt_check
= BRANCH_HALT_VOTED
,
2295 .enable_reg
= 0x4500c,
2296 .enable_mask
= BIT(14),
2297 .hw
.init
= &(struct clk_init_data
) {
2298 .name
= "gcc_cpp_tbu_clk",
2299 .ops
= &clk_branch2_ops
,
2304 static struct clk_branch gcc_crypto_ahb_clk
= {
2305 .halt_reg
= 0x16024,
2306 .halt_check
= BRANCH_HALT_VOTED
,
2308 .enable_reg
= 0x45004,
2309 .enable_mask
= BIT(0),
2310 .hw
.init
= &(struct clk_init_data
) {
2311 .name
= "gcc_crypto_ahb_clk",
2312 .ops
= &clk_branch2_ops
,
2317 static struct clk_branch gcc_crypto_axi_clk
= {
2318 .halt_reg
= 0x16020,
2319 .halt_check
= BRANCH_HALT_VOTED
,
2321 .enable_reg
= 0x45004,
2322 .enable_mask
= BIT(1),
2323 .hw
.init
= &(struct clk_init_data
) {
2324 .name
= "gcc_crypto_axi_clk",
2325 .ops
= &clk_branch2_ops
,
2330 static struct clk_branch gcc_crypto_clk
= {
2331 .halt_reg
= 0x1601c,
2332 .halt_check
= BRANCH_HALT_VOTED
,
2334 .enable_reg
= 0x45004,
2335 .enable_mask
= BIT(2),
2336 .hw
.init
= &(struct clk_init_data
) {
2337 .name
= "gcc_crypto_clk",
2338 .parent_hws
= (const struct clk_hw
*[]){
2339 &crypto_clk_src
.clkr
.hw
,
2342 .ops
= &clk_branch2_ops
,
2343 .flags
= CLK_SET_RATE_PARENT
,
2348 static struct clk_branch gcc_dcc_clk
= {
2349 .halt_reg
= 0x77004,
2350 .halt_check
= BRANCH_HALT
,
2352 .enable_reg
= 0x77004,
2353 .enable_mask
= BIT(0),
2354 .hw
.init
= &(struct clk_init_data
) {
2355 .name
= "gcc_dcc_clk",
2356 .ops
= &clk_branch2_ops
,
2361 static struct clk_branch gcc_gfx_tbu_clk
= {
2362 .halt_reg
= 0x12010,
2363 .halt_check
= BRANCH_HALT_VOTED
,
2365 .enable_reg
= 0x4500c,
2366 .enable_mask
= BIT(3),
2367 .hw
.init
= &(struct clk_init_data
){
2368 .name
= "gcc_gfx_tbu_clk",
2369 .ops
= &clk_branch2_ops
,
2374 static struct clk_branch gcc_gfx_tcu_clk
= {
2375 .halt_reg
= 0x12020,
2376 .halt_check
= BRANCH_HALT_VOTED
,
2378 .enable_reg
= 0x4500c,
2379 .enable_mask
= BIT(2),
2380 .hw
.init
= &(struct clk_init_data
){
2381 .name
= "gcc_gfx_tcu_clk",
2382 .ops
= &clk_branch2_ops
,
2387 static struct clk_branch gcc_gtcu_ahb_clk
= {
2388 .halt_reg
= 0x12044,
2389 .halt_check
= BRANCH_HALT_VOTED
,
2391 .enable_reg
= 0x4500c,
2392 .enable_mask
= BIT(13),
2393 .hw
.init
= &(struct clk_init_data
){
2394 .name
= "gcc_gtcu_ahb_clk",
2395 .ops
= &clk_branch2_ops
,
2400 static struct clk_branch gcc_gp1_clk
= {
2401 .halt_reg
= 0x08000,
2402 .halt_check
= BRANCH_HALT
,
2404 .enable_reg
= 0x08000,
2405 .enable_mask
= BIT(0),
2406 .hw
.init
= &(struct clk_init_data
) {
2407 .name
= "gcc_gp1_clk",
2408 .parent_hws
= (const struct clk_hw
*[]){
2409 &gp1_clk_src
.clkr
.hw
,
2412 .ops
= &clk_branch2_ops
,
2413 .flags
= CLK_SET_RATE_PARENT
,
2418 static struct clk_branch gcc_gp2_clk
= {
2419 .halt_reg
= 0x09000,
2420 .halt_check
= BRANCH_HALT
,
2422 .enable_reg
= 0x09000,
2423 .enable_mask
= BIT(0),
2424 .hw
.init
= &(struct clk_init_data
) {
2425 .name
= "gcc_gp2_clk",
2426 .parent_hws
= (const struct clk_hw
*[]){
2427 &gp2_clk_src
.clkr
.hw
,
2430 .ops
= &clk_branch2_ops
,
2431 .flags
= CLK_SET_RATE_PARENT
,
2436 static struct clk_branch gcc_gp3_clk
= {
2437 .halt_reg
= 0x0a000,
2438 .halt_check
= BRANCH_HALT
,
2440 .enable_reg
= 0x0a000,
2441 .enable_mask
= BIT(0),
2442 .hw
.init
= &(struct clk_init_data
) {
2443 .name
= "gcc_gp3_clk",
2444 .parent_hws
= (const struct clk_hw
*[]){
2445 &gp3_clk_src
.clkr
.hw
,
2448 .ops
= &clk_branch2_ops
,
2449 .flags
= CLK_SET_RATE_PARENT
,
2454 static struct clk_branch gcc_jpeg_tbu_clk
= {
2455 .halt_reg
= 0x12034,
2456 .halt_check
= BRANCH_HALT_VOTED
,
2458 .enable_reg
= 0x4500c,
2459 .enable_mask
= BIT(10),
2460 .hw
.init
= &(struct clk_init_data
) {
2461 .name
= "gcc_jpeg_tbu_clk",
2462 .ops
= &clk_branch2_ops
,
2467 static struct clk_branch gcc_mdp_tbu_clk
= {
2468 .halt_reg
= 0x1201c,
2469 .halt_check
= BRANCH_HALT_VOTED
,
2471 .enable_reg
= 0x4500c,
2472 .enable_mask
= BIT(4),
2473 .hw
.init
= &(struct clk_init_data
) {
2474 .name
= "gcc_mdp_tbu_clk",
2475 .ops
= &clk_branch2_ops
,
2480 static struct clk_branch gcc_mdss_ahb_clk
= {
2481 .halt_reg
= 0x4d07c,
2482 .halt_check
= BRANCH_HALT
,
2484 .enable_reg
= 0x4d07c,
2485 .enable_mask
= BIT(0),
2486 .hw
.init
= &(struct clk_init_data
) {
2487 .name
= "gcc_mdss_ahb_clk",
2488 .ops
= &clk_branch2_ops
,
2493 static struct clk_branch gcc_mdss_axi_clk
= {
2494 .halt_reg
= 0x4d080,
2495 .halt_check
= BRANCH_HALT
,
2497 .enable_reg
= 0x4d080,
2498 .enable_mask
= BIT(0),
2499 .hw
.init
= &(struct clk_init_data
) {
2500 .name
= "gcc_mdss_axi_clk",
2501 .ops
= &clk_branch2_ops
,
2506 static struct clk_branch gcc_mdss_byte0_clk
= {
2507 .halt_reg
= 0x4d094,
2508 .halt_check
= BRANCH_HALT
,
2510 .enable_reg
= 0x4d094,
2511 .enable_mask
= BIT(0),
2512 .hw
.init
= &(struct clk_init_data
) {
2513 .name
= "gcc_mdss_byte0_clk",
2514 .parent_hws
= (const struct clk_hw
*[]){
2515 &byte0_clk_src
.clkr
.hw
,
2518 .ops
= &clk_branch2_ops
,
2519 .flags
= CLK_SET_RATE_PARENT
,
2524 static struct clk_branch gcc_mdss_esc0_clk
= {
2525 .halt_reg
= 0x4d098,
2526 .halt_check
= BRANCH_HALT
,
2528 .enable_reg
= 0x4d098,
2529 .enable_mask
= BIT(0),
2530 .hw
.init
= &(struct clk_init_data
) {
2531 .name
= "gcc_mdss_esc0_clk",
2532 .parent_hws
= (const struct clk_hw
*[]){
2533 &esc0_clk_src
.clkr
.hw
,
2536 .ops
= &clk_branch2_ops
,
2537 .flags
= CLK_SET_RATE_PARENT
,
2542 static struct clk_branch gcc_mdss_mdp_clk
= {
2543 .halt_reg
= 0x4d088,
2544 .halt_check
= BRANCH_HALT
,
2546 .enable_reg
= 0x4d088,
2547 .enable_mask
= BIT(0),
2548 .hw
.init
= &(struct clk_init_data
) {
2549 .name
= "gcc_mdss_mdp_clk",
2550 .parent_hws
= (const struct clk_hw
*[]){
2551 &mdp_clk_src
.clkr
.hw
,
2554 .ops
= &clk_branch2_ops
,
2555 .flags
= CLK_SET_RATE_PARENT
,
2560 static struct clk_branch gcc_mdss_pclk0_clk
= {
2561 .halt_reg
= 0x4d084,
2562 .halt_check
= BRANCH_HALT
,
2564 .enable_reg
= 0x4d084,
2565 .enable_mask
= BIT(0),
2566 .hw
.init
= &(struct clk_init_data
) {
2567 .name
= "gcc_mdss_pclk0_clk",
2568 .parent_hws
= (const struct clk_hw
*[]){
2569 &pclk0_clk_src
.clkr
.hw
,
2572 .ops
= &clk_branch2_ops
,
2573 .flags
= CLK_SET_RATE_PARENT
,
2578 static struct clk_branch gcc_mdss_vsync_clk
= {
2579 .halt_reg
= 0x4d090,
2580 .halt_check
= BRANCH_HALT
,
2582 .enable_reg
= 0x4d090,
2583 .enable_mask
= BIT(0),
2584 .hw
.init
= &(struct clk_init_data
) {
2585 .name
= "gcc_mdss_vsync_clk",
2586 .parent_hws
= (const struct clk_hw
*[]){
2587 &vsync_clk_src
.clkr
.hw
,
2590 .ops
= &clk_branch2_ops
,
2591 .flags
= CLK_SET_RATE_PARENT
,
2596 static struct clk_branch gcc_mss_cfg_ahb_clk
= {
2597 .halt_reg
= 0x49000,
2598 .halt_check
= BRANCH_HALT
,
2600 .enable_reg
= 0x49000,
2601 .enable_mask
= BIT(0),
2602 .hw
.init
= &(struct clk_init_data
) {
2603 .name
= "gcc_mss_cfg_ahb_clk",
2604 .ops
= &clk_branch2_ops
,
2609 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
2610 .halt_reg
= 0x49004,
2611 .halt_check
= BRANCH_HALT
,
2613 .enable_reg
= 0x49004,
2614 .enable_mask
= BIT(0),
2615 .hw
.init
= &(struct clk_init_data
) {
2616 .name
= "gcc_mss_q6_bimc_axi_clk",
2617 .ops
= &clk_branch2_ops
,
2622 static struct clk_branch gcc_oxili_ahb_clk
= {
2623 .halt_reg
= 0x59028,
2624 .halt_check
= BRANCH_HALT
,
2626 .enable_reg
= 0x59028,
2627 .enable_mask
= BIT(0),
2628 .hw
.init
= &(struct clk_init_data
) {
2629 .name
= "gcc_oxili_ahb_clk",
2630 .ops
= &clk_branch2_ops
,
2635 static struct clk_branch gcc_oxili_gfx3d_clk
= {
2636 .halt_reg
= 0x59020,
2637 .halt_check
= BRANCH_HALT
,
2639 .enable_reg
= 0x59020,
2640 .enable_mask
= BIT(0),
2641 .hw
.init
= &(struct clk_init_data
) {
2642 .name
= "gcc_oxili_gfx3d_clk",
2643 .parent_hws
= (const struct clk_hw
*[]){
2644 &gfx3d_clk_src
.clkr
.hw
,
2647 .ops
= &clk_branch2_ops
,
2648 .flags
= CLK_SET_RATE_PARENT
,
2653 static struct clk_branch gcc_pdm2_clk
= {
2654 .halt_reg
= 0x4400c,
2655 .halt_check
= BRANCH_HALT
,
2657 .enable_reg
= 0x4400c,
2658 .enable_mask
= BIT(0),
2659 .hw
.init
= &(struct clk_init_data
) {
2660 .name
= "gcc_pdm2_clk",
2661 .parent_hws
= (const struct clk_hw
*[]){
2662 &pdm2_clk_src
.clkr
.hw
,
2665 .ops
= &clk_branch2_ops
,
2666 .flags
= CLK_SET_RATE_PARENT
,
2671 static struct clk_branch gcc_pdm_ahb_clk
= {
2672 .halt_reg
= 0x44004,
2673 .halt_check
= BRANCH_HALT
,
2675 .enable_reg
= 0x44004,
2676 .enable_mask
= BIT(0),
2677 .hw
.init
= &(struct clk_init_data
) {
2678 .name
= "gcc_pdm_ahb_clk",
2679 .ops
= &clk_branch2_ops
,
2684 static struct clk_branch gcc_prng_ahb_clk
= {
2685 .halt_reg
= 0x13004,
2686 .halt_check
= BRANCH_HALT_VOTED
,
2688 .enable_reg
= 0x45004,
2689 .enable_mask
= BIT(8),
2690 .hw
.init
= &(struct clk_init_data
) {
2691 .name
= "gcc_prng_ahb_clk",
2692 .ops
= &clk_branch2_ops
,
2697 static struct clk_branch gcc_qdss_dap_clk
= {
2698 .halt_reg
= 0x29084,
2699 .halt_check
= BRANCH_HALT_VOTED
,
2701 .enable_reg
= 0x45004,
2702 .enable_mask
= BIT(11),
2703 .hw
.init
= &(struct clk_init_data
) {
2704 .name
= "gcc_qdss_dap_clk",
2705 .ops
= &clk_branch2_ops
,
2710 static struct clk_branch gcc_sdcc1_ice_core_clk
= {
2711 .halt_reg
= 0x5d014,
2712 .halt_check
= BRANCH_HALT
,
2714 .enable_reg
= 0x5d014,
2715 .enable_mask
= BIT(0),
2716 .hw
.init
= &(struct clk_init_data
) {
2717 .name
= "gcc_sdcc1_ice_core_clk",
2718 .parent_hws
= (const struct clk_hw
*[]){
2719 &sdcc1_ice_core_clk_src
.clkr
.hw
,
2722 .ops
= &clk_branch2_ops
,
2723 .flags
= CLK_SET_RATE_PARENT
,
2728 static struct clk_branch gcc_sdcc1_ahb_clk
= {
2729 .halt_reg
= 0x4201c,
2730 .halt_check
= BRANCH_HALT
,
2732 .enable_reg
= 0x4201c,
2733 .enable_mask
= BIT(0),
2734 .hw
.init
= &(struct clk_init_data
) {
2735 .name
= "gcc_sdcc1_ahb_clk",
2736 .ops
= &clk_branch2_ops
,
2741 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2742 .halt_reg
= 0x4301c,
2743 .halt_check
= BRANCH_HALT
,
2745 .enable_reg
= 0x4301c,
2746 .enable_mask
= BIT(0),
2747 .hw
.init
= &(struct clk_init_data
) {
2748 .name
= "gcc_sdcc2_ahb_clk",
2749 .ops
= &clk_branch2_ops
,
2754 static struct clk_branch gcc_sdcc1_apps_clk
= {
2755 .halt_reg
= 0x42018,
2756 .halt_check
= BRANCH_HALT
,
2758 .enable_reg
= 0x42018,
2759 .enable_mask
= BIT(0),
2760 .hw
.init
= &(struct clk_init_data
) {
2761 .name
= "gcc_sdcc1_apps_clk",
2762 .parent_hws
= (const struct clk_hw
*[]){
2763 &sdcc1_apps_clk_src
.clkr
.hw
,
2766 .ops
= &clk_branch2_ops
,
2767 .flags
= CLK_SET_RATE_PARENT
,
2772 static struct clk_branch gcc_sdcc2_apps_clk
= {
2773 .halt_reg
= 0x43018,
2774 .halt_check
= BRANCH_HALT
,
2776 .enable_reg
= 0x43018,
2777 .enable_mask
= BIT(0),
2778 .hw
.init
= &(struct clk_init_data
) {
2779 .name
= "gcc_sdcc2_apps_clk",
2780 .parent_hws
= (const struct clk_hw
*[]){
2781 &sdcc2_apps_clk_src
.clkr
.hw
,
2784 .ops
= &clk_branch2_ops
,
2785 .flags
= CLK_SET_RATE_PARENT
,
2790 static struct clk_branch gcc_smmu_cfg_clk
= {
2791 .halt_reg
= 0x12038,
2792 .halt_check
= BRANCH_HALT_VOTED
,
2794 .enable_reg
= 0x4500c,
2795 .enable_mask
= BIT(12),
2796 .hw
.init
= &(struct clk_init_data
) {
2797 .name
= "gcc_smmu_cfg_clk",
2798 .ops
= &clk_branch2_ops
,
2803 static struct clk_branch gcc_usb2a_phy_sleep_clk
= {
2804 .halt_reg
= 0x4102c,
2806 .enable_reg
= 0x4102c,
2807 .enable_mask
= BIT(0),
2808 .hw
.init
= &(struct clk_init_data
){
2809 .name
= "gcc_usb2a_phy_sleep_clk",
2810 .ops
= &clk_branch2_ops
,
2815 static struct clk_branch gcc_usb_hs_ahb_clk
= {
2816 .halt_reg
= 0x41008,
2818 .enable_reg
= 0x41008,
2819 .enable_mask
= BIT(0),
2820 .hw
.init
= &(struct clk_init_data
){
2821 .name
= "gcc_usb_hs_ahb_clk",
2822 .ops
= &clk_branch2_ops
,
2827 static struct clk_branch gcc_usb_hs_phy_cfg_ahb_clk
= {
2828 .halt_reg
= 0x41030,
2830 .enable_reg
= 0x41030,
2831 .enable_mask
= BIT(0),
2832 .hw
.init
= &(struct clk_init_data
){
2833 .name
= "gcc_usb_hs_phy_cfg_ahb_clk",
2834 .ops
= &clk_branch2_ops
,
2839 static struct clk_branch gcc_usb_hs_system_clk
= {
2840 .halt_reg
= 0x41004,
2842 .enable_reg
= 0x41004,
2843 .enable_mask
= BIT(0),
2844 .hw
.init
= &(struct clk_init_data
){
2845 .name
= "gcc_usb_hs_system_clk",
2846 .parent_hws
= (const struct clk_hw
*[]){
2847 &usb_hs_system_clk_src
.clkr
.hw
,
2850 .flags
= CLK_SET_RATE_PARENT
,
2851 .ops
= &clk_branch2_ops
,
2856 static struct clk_branch gcc_venus0_ahb_clk
= {
2857 .halt_reg
= 0x4c020,
2858 .halt_check
= BRANCH_HALT
,
2860 .enable_reg
= 0x4c020,
2861 .enable_mask
= BIT(0),
2862 .hw
.init
= &(struct clk_init_data
) {
2863 .name
= "gcc_venus0_ahb_clk",
2864 .ops
= &clk_branch2_ops
,
2869 static struct clk_branch gcc_venus0_axi_clk
= {
2870 .halt_reg
= 0x4c024,
2871 .halt_check
= BRANCH_HALT
,
2873 .enable_reg
= 0x4c024,
2874 .enable_mask
= BIT(0),
2875 .hw
.init
= &(struct clk_init_data
) {
2876 .name
= "gcc_venus0_axi_clk",
2877 .ops
= &clk_branch2_ops
,
2882 static struct clk_branch gcc_venus0_core0_vcodec0_clk
= {
2883 .halt_reg
= 0x4c02c,
2884 .halt_check
= BRANCH_HALT
,
2886 .enable_reg
= 0x4c02c,
2887 .enable_mask
= BIT(0),
2888 .hw
.init
= &(struct clk_init_data
) {
2889 .name
= "gcc_venus0_core0_vcodec0_clk",
2890 .parent_hws
= (const struct clk_hw
*[]){
2891 &vcodec0_clk_src
.clkr
.hw
,
2894 .ops
= &clk_branch2_ops
,
2895 .flags
= CLK_SET_RATE_PARENT
,
2900 static struct clk_branch gcc_venus0_vcodec0_clk
= {
2901 .halt_reg
= 0x4c01c,
2902 .halt_check
= BRANCH_HALT
,
2904 .enable_reg
= 0x4c01c,
2905 .enable_mask
= BIT(0),
2906 .hw
.init
= &(struct clk_init_data
) {
2907 .name
= "gcc_venus0_vcodec0_clk",
2908 .parent_hws
= (const struct clk_hw
*[]){
2909 &vcodec0_clk_src
.clkr
.hw
,
2912 .ops
= &clk_branch2_ops
,
2913 .flags
= CLK_SET_RATE_PARENT
,
2918 static struct clk_branch gcc_venus_tbu_clk
= {
2919 .halt_reg
= 0x12014,
2920 .halt_check
= BRANCH_HALT_VOTED
,
2922 .enable_reg
= 0x4500c,
2923 .enable_mask
= BIT(5),
2924 .hw
.init
= &(struct clk_init_data
) {
2925 .name
= "gcc_venus_tbu_clk",
2926 .ops
= &clk_branch2_ops
,
2931 static struct clk_branch gcc_vfe1_tbu_clk
= {
2932 .halt_reg
= 0x12090,
2933 .halt_check
= BRANCH_HALT_VOTED
,
2935 .enable_reg
= 0x4500c,
2936 .enable_mask
= BIT(17),
2937 .hw
.init
= &(struct clk_init_data
) {
2938 .name
= "gcc_vfe1_tbu_clk",
2939 .ops
= &clk_branch2_ops
,
2944 static struct clk_branch gcc_vfe_tbu_clk
= {
2945 .halt_reg
= 0x1203c,
2946 .halt_check
= BRANCH_HALT_VOTED
,
2948 .enable_reg
= 0x4500c,
2949 .enable_mask
= BIT(9),
2950 .hw
.init
= &(struct clk_init_data
) {
2951 .name
= "gcc_vfe_tbu_clk",
2952 .ops
= &clk_branch2_ops
,
2957 static struct gdsc venus_gdsc
= {
2959 .cxcs
= (unsigned int []){ 0x4c024, 0x4c01c },
2962 .name
= "venus_gdsc",
2964 .pwrsts
= PWRSTS_OFF_ON
,
2967 static struct gdsc venus_core0_gdsc
= {
2969 .cxcs
= (unsigned int []){ 0x4c02c },
2972 .name
= "venus_core0",
2975 .pwrsts
= PWRSTS_OFF_ON
,
2978 static struct gdsc mdss_gdsc
= {
2980 .cxcs
= (unsigned int []){ 0x4d080, 0x4d088 },
2983 .name
= "mdss_gdsc",
2985 .pwrsts
= PWRSTS_OFF_ON
,
2988 static struct gdsc jpeg_gdsc
= {
2990 .cxcs
= (unsigned int []){ 0x57020, 0x57028 },
2993 .name
= "jpeg_gdsc",
2995 .pwrsts
= PWRSTS_OFF_ON
,
2998 static struct gdsc vfe0_gdsc
= {
3000 .cxcs
= (unsigned int []){ 0x58038, 0x58048, 0x5600c, 0x58050 },
3003 .name
= "vfe0_gdsc",
3005 .pwrsts
= PWRSTS_OFF_ON
,
3008 static struct gdsc vfe1_gdsc
= {
3010 .cxcs
= (unsigned int []){ 0x5805c, 0x58068, 0x5600c, 0x58074 },
3013 .name
= "vfe1_gdsc",
3015 .pwrsts
= PWRSTS_OFF_ON
,
3018 static struct gdsc oxili_gx_gdsc
= {
3020 .clamp_io_ctrl
= 0x5b00c,
3021 .cxcs
= (unsigned int []){ 0x59000, 0x59020 },
3024 .name
= "oxili_gx_gdsc",
3026 .pwrsts
= PWRSTS_OFF_ON
,
3030 static struct gdsc cpp_gdsc
= {
3032 .cxcs
= (unsigned int []){ 0x5803c, 0x58064 },
3038 .pwrsts
= PWRSTS_OFF_ON
,
3041 static struct clk_regmap
*gcc_msm8917_clocks
[] = {
3042 [GPLL0
] = &gpll0
.clkr
,
3043 [GPLL0_EARLY
] = &gpll0_early
.clkr
,
3044 [GPLL0_SLEEP_CLK_SRC
] = &gpll0_sleep_clk_src
.clkr
,
3045 [GPLL3
] = &gpll3
.clkr
,
3046 [GPLL3_EARLY
] = &gpll3_early
.clkr
,
3047 [GPLL4
] = &gpll4
.clkr
,
3048 [GPLL4_EARLY
] = &gpll4_early
.clkr
,
3050 [GPLL6_EARLY
] = &gpll6_early
.clkr
,
3051 [APSS_AHB_CLK_SRC
] = &apss_ahb_clk_src
.clkr
,
3052 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
3053 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
3054 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
3055 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
3056 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
3057 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
3058 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
3059 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
3060 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
3061 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
3062 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
3063 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
3064 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
3065 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
3066 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
3067 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
3068 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
3069 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
3070 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
3071 [CAMSS_TOP_AHB_CLK_SRC
] = &camss_top_ahb_clk_src
.clkr
,
3072 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
3073 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
3074 [CRYPTO_CLK_SRC
] = &crypto_clk_src
.clkr
,
3075 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
3076 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
3077 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
3078 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
3079 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
3080 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
3081 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
3082 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
3083 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
3084 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
3085 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
3086 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
3087 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
3088 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
3089 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
3090 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
3091 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
3092 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
3093 [SDCC1_ICE_CORE_CLK_SRC
] = &sdcc1_ice_core_clk_src
.clkr
,
3094 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
3095 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
3096 [VCODEC0_CLK_SRC
] = &vcodec0_clk_src
.clkr
,
3097 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
3098 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
3099 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
3100 [GCC_APSS_TCU_CLK
] = &gcc_apss_tcu_clk
.clkr
,
3101 [GCC_BIMC_GFX_CLK
] = &gcc_bimc_gfx_clk
.clkr
,
3102 [GCC_BIMC_GPU_CLK
] = &gcc_bimc_gpu_clk
.clkr
,
3103 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
3104 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
3105 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
3106 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
3107 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
3108 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
3109 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
3110 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
3111 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
3112 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
3113 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
3114 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
3115 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
3116 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
3117 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
3118 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
3119 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
3120 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
3121 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
3122 [GCC_CAMSS_AHB_CLK
] = &gcc_camss_ahb_clk
.clkr
,
3123 [GCC_CAMSS_CCI_AHB_CLK
] = &gcc_camss_cci_ahb_clk
.clkr
,
3124 [GCC_CAMSS_CCI_CLK
] = &gcc_camss_cci_clk
.clkr
,
3125 [GCC_CAMSS_CPP_AHB_CLK
] = &gcc_camss_cpp_ahb_clk
.clkr
,
3126 [GCC_CAMSS_CPP_CLK
] = &gcc_camss_cpp_clk
.clkr
,
3127 [GCC_CAMSS_CSI0PHYTIMER_CLK
] = &gcc_camss_csi0phytimer_clk
.clkr
,
3128 [GCC_CAMSS_CSI0PHY_CLK
] = &gcc_camss_csi0phy_clk
.clkr
,
3129 [GCC_CAMSS_CSI0PIX_CLK
] = &gcc_camss_csi0pix_clk
.clkr
,
3130 [GCC_CAMSS_CSI0RDI_CLK
] = &gcc_camss_csi0rdi_clk
.clkr
,
3131 [GCC_CAMSS_CSI0_AHB_CLK
] = &gcc_camss_csi0_ahb_clk
.clkr
,
3132 [GCC_CAMSS_CSI0_CLK
] = &gcc_camss_csi0_clk
.clkr
,
3133 [GCC_CAMSS_CSI1PHYTIMER_CLK
] = &gcc_camss_csi1phytimer_clk
.clkr
,
3134 [GCC_CAMSS_CSI1PHY_CLK
] = &gcc_camss_csi1phy_clk
.clkr
,
3135 [GCC_CAMSS_CSI1PIX_CLK
] = &gcc_camss_csi1pix_clk
.clkr
,
3136 [GCC_CAMSS_CSI1RDI_CLK
] = &gcc_camss_csi1rdi_clk
.clkr
,
3137 [GCC_CAMSS_CSI1_AHB_CLK
] = &gcc_camss_csi1_ahb_clk
.clkr
,
3138 [GCC_CAMSS_CSI1_CLK
] = &gcc_camss_csi1_clk
.clkr
,
3139 [GCC_CAMSS_CSI2PHY_CLK
] = &gcc_camss_csi2phy_clk
.clkr
,
3140 [GCC_CAMSS_CSI2PIX_CLK
] = &gcc_camss_csi2pix_clk
.clkr
,
3141 [GCC_CAMSS_CSI2RDI_CLK
] = &gcc_camss_csi2rdi_clk
.clkr
,
3142 [GCC_CAMSS_CSI2_AHB_CLK
] = &gcc_camss_csi2_ahb_clk
.clkr
,
3143 [GCC_CAMSS_CSI2_CLK
] = &gcc_camss_csi2_clk
.clkr
,
3144 [GCC_CAMSS_CSI_VFE0_CLK
] = &gcc_camss_csi_vfe0_clk
.clkr
,
3145 [GCC_CAMSS_CSI_VFE1_CLK
] = &gcc_camss_csi_vfe1_clk
.clkr
,
3146 [GCC_CAMSS_GP0_CLK
] = &gcc_camss_gp0_clk
.clkr
,
3147 [GCC_CAMSS_GP1_CLK
] = &gcc_camss_gp1_clk
.clkr
,
3148 [GCC_CAMSS_ISPIF_AHB_CLK
] = &gcc_camss_ispif_ahb_clk
.clkr
,
3149 [GCC_CAMSS_JPEG0_CLK
] = &gcc_camss_jpeg0_clk
.clkr
,
3150 [GCC_CAMSS_JPEG_AHB_CLK
] = &gcc_camss_jpeg_ahb_clk
.clkr
,
3151 [GCC_CAMSS_JPEG_AXI_CLK
] = &gcc_camss_jpeg_axi_clk
.clkr
,
3152 [GCC_CAMSS_MCLK0_CLK
] = &gcc_camss_mclk0_clk
.clkr
,
3153 [GCC_CAMSS_MCLK1_CLK
] = &gcc_camss_mclk1_clk
.clkr
,
3154 [GCC_CAMSS_MCLK2_CLK
] = &gcc_camss_mclk2_clk
.clkr
,
3155 [GCC_CAMSS_MICRO_AHB_CLK
] = &gcc_camss_micro_ahb_clk
.clkr
,
3156 [GCC_CAMSS_TOP_AHB_CLK
] = &gcc_camss_top_ahb_clk
.clkr
,
3157 [GCC_CAMSS_VFE0_AHB_CLK
] = &gcc_camss_vfe0_ahb_clk
.clkr
,
3158 [GCC_CAMSS_VFE0_AXI_CLK
] = &gcc_camss_vfe0_axi_clk
.clkr
,
3159 [GCC_CAMSS_VFE0_CLK
] = &gcc_camss_vfe0_clk
.clkr
,
3160 [GCC_CAMSS_VFE1_AHB_CLK
] = &gcc_camss_vfe1_ahb_clk
.clkr
,
3161 [GCC_CAMSS_VFE1_AXI_CLK
] = &gcc_camss_vfe1_axi_clk
.clkr
,
3162 [GCC_CAMSS_VFE1_CLK
] = &gcc_camss_vfe1_clk
.clkr
,
3163 [GCC_CPP_TBU_CLK
] = &gcc_cpp_tbu_clk
.clkr
,
3164 [GCC_CRYPTO_AHB_CLK
] = &gcc_crypto_ahb_clk
.clkr
,
3165 [GCC_CRYPTO_AXI_CLK
] = &gcc_crypto_axi_clk
.clkr
,
3166 [GCC_CRYPTO_CLK
] = &gcc_crypto_clk
.clkr
,
3167 [GCC_DCC_CLK
] = &gcc_dcc_clk
.clkr
,
3168 [GCC_GFX_TBU_CLK
] = &gcc_gfx_tbu_clk
.clkr
,
3169 [GCC_GFX_TCU_CLK
] = &gcc_gfx_tcu_clk
.clkr
,
3170 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
3171 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
3172 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
3173 [GCC_GTCU_AHB_CLK
] = &gcc_gtcu_ahb_clk
.clkr
,
3174 [GCC_JPEG_TBU_CLK
] = &gcc_jpeg_tbu_clk
.clkr
,
3175 [GCC_MDP_TBU_CLK
] = &gcc_mdp_tbu_clk
.clkr
,
3176 [GCC_MDSS_AHB_CLK
] = &gcc_mdss_ahb_clk
.clkr
,
3177 [GCC_MDSS_AXI_CLK
] = &gcc_mdss_axi_clk
.clkr
,
3178 [GCC_MDSS_BYTE0_CLK
] = &gcc_mdss_byte0_clk
.clkr
,
3179 [GCC_MDSS_ESC0_CLK
] = &gcc_mdss_esc0_clk
.clkr
,
3180 [GCC_MDSS_MDP_CLK
] = &gcc_mdss_mdp_clk
.clkr
,
3181 [GCC_MDSS_PCLK0_CLK
] = &gcc_mdss_pclk0_clk
.clkr
,
3182 [GCC_MDSS_VSYNC_CLK
] = &gcc_mdss_vsync_clk
.clkr
,
3183 [GCC_MSS_CFG_AHB_CLK
] = &gcc_mss_cfg_ahb_clk
.clkr
,
3184 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
3185 [GCC_OXILI_AHB_CLK
] = &gcc_oxili_ahb_clk
.clkr
,
3186 [GCC_OXILI_GFX3D_CLK
] = &gcc_oxili_gfx3d_clk
.clkr
,
3187 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
3188 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
3189 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
3190 [GCC_QDSS_DAP_CLK
] = &gcc_qdss_dap_clk
.clkr
,
3191 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
3192 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
3193 [GCC_SDCC1_ICE_CORE_CLK
] = &gcc_sdcc1_ice_core_clk
.clkr
,
3194 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
3195 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
3196 [GCC_SMMU_CFG_CLK
] = &gcc_smmu_cfg_clk
.clkr
,
3197 [GCC_USB2A_PHY_SLEEP_CLK
] = &gcc_usb2a_phy_sleep_clk
.clkr
,
3198 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
3199 [GCC_USB_HS_PHY_CFG_AHB_CLK
] = &gcc_usb_hs_phy_cfg_ahb_clk
.clkr
,
3200 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
3201 [GCC_VENUS0_AHB_CLK
] = &gcc_venus0_ahb_clk
.clkr
,
3202 [GCC_VENUS0_AXI_CLK
] = &gcc_venus0_axi_clk
.clkr
,
3203 [GCC_VENUS0_CORE0_VCODEC0_CLK
] = &gcc_venus0_core0_vcodec0_clk
.clkr
,
3204 [GCC_VENUS0_VCODEC0_CLK
] = &gcc_venus0_vcodec0_clk
.clkr
,
3205 [GCC_VENUS_TBU_CLK
] = &gcc_venus_tbu_clk
.clkr
,
3206 [GCC_VFE1_TBU_CLK
] = &gcc_vfe1_tbu_clk
.clkr
,
3207 [GCC_VFE_TBU_CLK
] = &gcc_vfe_tbu_clk
.clkr
,
3210 static const struct qcom_reset_map gcc_msm8917_resets
[] = {
3211 [GCC_CAMSS_MICRO_BCR
] = { 0x56008 },
3212 [GCC_MSS_BCR
] = { 0x71000 },
3213 [GCC_QUSB2_PHY_BCR
] = { 0x4103c },
3214 [GCC_USB_HS_BCR
] = { 0x41000 },
3215 [GCC_USB2_HS_PHY_ONLY_BCR
] = { 0x41034 },
3218 static const struct regmap_config gcc_msm8917_regmap_config
= {
3222 .max_register
= 0x80000,
3226 static struct gdsc
*gcc_msm8917_gdscs
[] = {
3227 [CPP_GDSC
] = &cpp_gdsc
,
3228 [JPEG_GDSC
] = &jpeg_gdsc
,
3229 [MDSS_GDSC
] = &mdss_gdsc
,
3230 [OXILI_GX_GDSC
] = &oxili_gx_gdsc
,
3231 [VENUS_CORE0_GDSC
] = &venus_core0_gdsc
,
3232 [VENUS_GDSC
] = &venus_gdsc
,
3233 [VFE0_GDSC
] = &vfe0_gdsc
,
3234 [VFE1_GDSC
] = &vfe1_gdsc
,
3237 static const struct qcom_cc_desc gcc_msm8917_desc
= {
3238 .config
= &gcc_msm8917_regmap_config
,
3239 .clks
= gcc_msm8917_clocks
,
3240 .num_clks
= ARRAY_SIZE(gcc_msm8917_clocks
),
3241 .resets
= gcc_msm8917_resets
,
3242 .num_resets
= ARRAY_SIZE(gcc_msm8917_resets
),
3243 .gdscs
= gcc_msm8917_gdscs
,
3244 .num_gdscs
= ARRAY_SIZE(gcc_msm8917_gdscs
),
3247 static const struct qcom_cc_desc gcc_qm215_desc
= {
3248 .config
= &gcc_msm8917_regmap_config
,
3249 .clks
= gcc_msm8917_clocks
,
3250 .num_clks
= ARRAY_SIZE(gcc_msm8917_clocks
),
3251 .resets
= gcc_msm8917_resets
,
3252 .num_resets
= ARRAY_SIZE(gcc_msm8917_resets
),
3253 .gdscs
= gcc_msm8917_gdscs
,
3254 .num_gdscs
= ARRAY_SIZE(gcc_msm8917_gdscs
),
3257 static int gcc_msm8917_probe(struct platform_device
*pdev
)
3259 struct regmap
*regmap
;
3260 const struct qcom_cc_desc
*gcc_desc
;
3262 gcc_desc
= of_device_get_match_data(&pdev
->dev
);
3264 if (gcc_desc
== &gcc_qm215_desc
)
3265 gfx3d_clk_src
.parent_map
= gcc_gfx3d_map_qm215
;
3267 regmap
= qcom_cc_map(pdev
, gcc_desc
);
3269 return PTR_ERR(regmap
);
3271 clk_alpha_pll_configure(&gpll3_early
, regmap
, &gpll3_early_config
);
3273 return qcom_cc_really_probe(&pdev
->dev
, gcc_desc
, regmap
);
3276 static const struct of_device_id gcc_msm8917_match_table
[] = {
3277 { .compatible
= "qcom,gcc-msm8917", .data
= &gcc_msm8917_desc
},
3278 { .compatible
= "qcom,gcc-qm215", .data
= &gcc_qm215_desc
},
3281 MODULE_DEVICE_TABLE(of
, gcc_msm8917_match_table
);
3283 static struct platform_driver gcc_msm8917_driver
= {
3284 .probe
= gcc_msm8917_probe
,
3286 .name
= "gcc-msm8917",
3287 .of_match_table
= gcc_msm8917_match_table
,
3291 static int __init
gcc_msm8917_init(void)
3293 return platform_driver_register(&gcc_msm8917_driver
);
3295 core_initcall(gcc_msm8917_init
);
3297 static void __exit
gcc_msm8917_exit(void)
3299 platform_driver_unregister(&gcc_msm8917_driver
);
3301 module_exit(gcc_msm8917_exit
);
3303 MODULE_DESCRIPTION("Qualcomm GCC MSM8917 Driver");
3304 MODULE_LICENSE("GPL");