1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
5 #include <linux/kernel.h>
6 #include <linux/init.h>
8 #include <linux/ctype.h>
11 #include <linux/platform_device.h>
12 #include <linux/module.h>
13 #include <linux/regmap.h>
15 #include <dt-bindings/clock/qcom,gcc-msm8994.h>
18 #include "clk-regmap.h"
19 #include "clk-alpha-pll.h"
21 #include "clk-branch.h"
31 static const struct parent_map gcc_xo_gpll0_map
[] = {
36 static const char * const gcc_xo_gpll0
[] = {
41 static const struct parent_map gcc_xo_gpll0_gpll4_map
[] = {
47 static const char * const gcc_xo_gpll0_gpll4
[] = {
53 static struct clk_fixed_factor xo
= {
56 .hw
.init
= &(struct clk_init_data
)
59 .parent_names
= (const char *[]) { "xo_board" },
61 .ops
= &clk_fixed_factor_ops
,
65 static struct clk_alpha_pll gpll0_early
= {
67 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
70 .enable_mask
= BIT(0),
71 .hw
.init
= &(struct clk_init_data
)
73 .name
= "gpll0_early",
74 .parent_names
= (const char *[]) { "xo" },
76 .ops
= &clk_alpha_pll_ops
,
81 static struct clk_alpha_pll_postdiv gpll0
= {
83 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
84 .clkr
.hw
.init
= &(struct clk_init_data
)
87 .parent_names
= (const char *[]) { "gpll0_early" },
89 .ops
= &clk_alpha_pll_postdiv_ops
,
93 static struct clk_alpha_pll gpll4_early
= {
95 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
98 .enable_mask
= BIT(4),
99 .hw
.init
= &(struct clk_init_data
)
101 .name
= "gpll4_early",
102 .parent_names
= (const char *[]) { "xo" },
104 .ops
= &clk_alpha_pll_ops
,
109 static struct clk_alpha_pll_postdiv gpll4
= {
111 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
112 .clkr
.hw
.init
= &(struct clk_init_data
)
115 .parent_names
= (const char *[]) { "gpll4_early" },
117 .ops
= &clk_alpha_pll_postdiv_ops
,
121 static struct freq_tbl ftbl_ufs_axi_clk_src
[] = {
122 F(50000000, P_GPLL0
, 12, 0, 0),
123 F(100000000, P_GPLL0
, 6, 0, 0),
124 F(150000000, P_GPLL0
, 4, 0, 0),
125 F(171430000, P_GPLL0
, 3.5, 0, 0),
126 F(200000000, P_GPLL0
, 3, 0, 0),
127 F(240000000, P_GPLL0
, 2.5, 0, 0),
131 static struct clk_rcg2 ufs_axi_clk_src
= {
135 .parent_map
= gcc_xo_gpll0_map
,
136 .freq_tbl
= ftbl_ufs_axi_clk_src
,
137 .clkr
.hw
.init
= &(struct clk_init_data
)
139 .name
= "ufs_axi_clk_src",
140 .parent_names
= gcc_xo_gpll0
,
142 .ops
= &clk_rcg2_ops
,
146 static struct freq_tbl ftbl_usb30_master_clk_src
[] = {
147 F(19200000, P_XO
, 1, 0, 0),
148 F(125000000, P_GPLL0
, 1, 5, 24),
152 static struct clk_rcg2 usb30_master_clk_src
= {
156 .parent_map
= gcc_xo_gpll0_map
,
157 .freq_tbl
= ftbl_usb30_master_clk_src
,
158 .clkr
.hw
.init
= &(struct clk_init_data
)
160 .name
= "usb30_master_clk_src",
161 .parent_names
= gcc_xo_gpll0
,
163 .ops
= &clk_rcg2_ops
,
167 static struct freq_tbl ftbl_blsp_i2c_apps_clk_src
[] = {
168 F(19200000, P_XO
, 1, 0, 0),
169 F(50000000, P_GPLL0
, 12, 0, 0),
173 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
176 .parent_map
= gcc_xo_gpll0_map
,
177 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
178 .clkr
.hw
.init
= &(struct clk_init_data
)
180 .name
= "blsp1_qup1_i2c_apps_clk_src",
181 .parent_names
= gcc_xo_gpll0
,
183 .ops
= &clk_rcg2_ops
,
187 static struct freq_tbl ftbl_blspqup_spi_apps_clk_src
[] = {
188 F(960000, P_XO
, 10, 1, 2),
189 F(4800000, P_XO
, 4, 0, 0),
190 F(9600000, P_XO
, 2, 0, 0),
191 F(15000000, P_GPLL0
, 10, 1, 4),
192 F(19200000, P_XO
, 1, 0, 0),
193 F(24000000, P_GPLL0
, 12.5, 1, 2),
194 F(25000000, P_GPLL0
, 12, 1, 2),
195 F(48000000, P_GPLL0
, 12.5, 0, 0),
196 F(50000000, P_GPLL0
, 12, 0, 0),
200 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
204 .parent_map
= gcc_xo_gpll0_map
,
205 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
206 .clkr
.hw
.init
= &(struct clk_init_data
)
208 .name
= "blsp1_qup1_spi_apps_clk_src",
209 .parent_names
= gcc_xo_gpll0
,
211 .ops
= &clk_rcg2_ops
,
215 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
218 .parent_map
= gcc_xo_gpll0_map
,
219 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
220 .clkr
.hw
.init
= &(struct clk_init_data
)
222 .name
= "blsp1_qup2_i2c_apps_clk_src",
223 .parent_names
= gcc_xo_gpll0
,
225 .ops
= &clk_rcg2_ops
,
229 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
233 .parent_map
= gcc_xo_gpll0_map
,
234 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
235 .clkr
.hw
.init
= &(struct clk_init_data
)
237 .name
= "blsp1_qup2_spi_apps_clk_src",
238 .parent_names
= gcc_xo_gpll0
,
240 .ops
= &clk_rcg2_ops
,
244 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
247 .parent_map
= gcc_xo_gpll0_map
,
248 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
249 .clkr
.hw
.init
= &(struct clk_init_data
)
251 .name
= "blsp1_qup3_i2c_apps_clk_src",
252 .parent_names
= gcc_xo_gpll0
,
254 .ops
= &clk_rcg2_ops
,
258 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
262 .parent_map
= gcc_xo_gpll0_map
,
263 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
264 .clkr
.hw
.init
= &(struct clk_init_data
)
266 .name
= "blsp1_qup3_spi_apps_clk_src",
267 .parent_names
= gcc_xo_gpll0
,
269 .ops
= &clk_rcg2_ops
,
273 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
276 .parent_map
= gcc_xo_gpll0_map
,
277 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
278 .clkr
.hw
.init
= &(struct clk_init_data
)
280 .name
= "blsp1_qup4_i2c_apps_clk_src",
281 .parent_names
= gcc_xo_gpll0
,
283 .ops
= &clk_rcg2_ops
,
287 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
291 .parent_map
= gcc_xo_gpll0_map
,
292 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
293 .clkr
.hw
.init
= &(struct clk_init_data
)
295 .name
= "blsp1_qup4_spi_apps_clk_src",
296 .parent_names
= gcc_xo_gpll0
,
298 .ops
= &clk_rcg2_ops
,
302 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
305 .parent_map
= gcc_xo_gpll0_map
,
306 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
307 .clkr
.hw
.init
= &(struct clk_init_data
)
309 .name
= "blsp1_qup5_i2c_apps_clk_src",
310 .parent_names
= gcc_xo_gpll0
,
312 .ops
= &clk_rcg2_ops
,
316 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
320 .parent_map
= gcc_xo_gpll0_map
,
321 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
322 .clkr
.hw
.init
= &(struct clk_init_data
)
324 .name
= "blsp1_qup5_spi_apps_clk_src",
325 .parent_names
= gcc_xo_gpll0
,
327 .ops
= &clk_rcg2_ops
,
331 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
334 .parent_map
= gcc_xo_gpll0_map
,
335 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
336 .clkr
.hw
.init
= &(struct clk_init_data
)
338 .name
= "blsp1_qup6_i2c_apps_clk_src",
339 .parent_names
= gcc_xo_gpll0
,
341 .ops
= &clk_rcg2_ops
,
345 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
349 .parent_map
= gcc_xo_gpll0_map
,
350 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
351 .clkr
.hw
.init
= &(struct clk_init_data
)
353 .name
= "blsp1_qup6_spi_apps_clk_src",
354 .parent_names
= gcc_xo_gpll0
,
356 .ops
= &clk_rcg2_ops
,
360 static struct freq_tbl ftbl_blsp_uart_apps_clk_src
[] = {
361 F(3686400, P_GPLL0
, 1, 96, 15625),
362 F(7372800, P_GPLL0
, 1, 192, 15625),
363 F(14745600, P_GPLL0
, 1, 384, 15625),
364 F(16000000, P_GPLL0
, 5, 2, 15),
365 F(19200000, P_XO
, 1, 0, 0),
366 F(24000000, P_GPLL0
, 5, 1, 5),
367 F(32000000, P_GPLL0
, 1, 4, 75),
368 F(40000000, P_GPLL0
, 15, 0, 0),
369 F(46400000, P_GPLL0
, 1, 29, 375),
370 F(48000000, P_GPLL0
, 12.5, 0, 0),
371 F(51200000, P_GPLL0
, 1, 32, 375),
372 F(56000000, P_GPLL0
, 1, 7, 75),
373 F(58982400, P_GPLL0
, 1, 1536, 15625),
374 F(60000000, P_GPLL0
, 10, 0, 0),
375 F(63160000, P_GPLL0
, 9.5, 0, 0),
379 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
383 .parent_map
= gcc_xo_gpll0_map
,
384 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
385 .clkr
.hw
.init
= &(struct clk_init_data
)
387 .name
= "blsp1_uart1_apps_clk_src",
388 .parent_names
= gcc_xo_gpll0
,
390 .ops
= &clk_rcg2_ops
,
394 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
398 .parent_map
= gcc_xo_gpll0_map
,
399 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
400 .clkr
.hw
.init
= &(struct clk_init_data
)
402 .name
= "blsp1_uart2_apps_clk_src",
403 .parent_names
= gcc_xo_gpll0
,
405 .ops
= &clk_rcg2_ops
,
409 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
413 .parent_map
= gcc_xo_gpll0_map
,
414 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
415 .clkr
.hw
.init
= &(struct clk_init_data
)
417 .name
= "blsp1_uart3_apps_clk_src",
418 .parent_names
= gcc_xo_gpll0
,
420 .ops
= &clk_rcg2_ops
,
424 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
428 .parent_map
= gcc_xo_gpll0_map
,
429 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
430 .clkr
.hw
.init
= &(struct clk_init_data
)
432 .name
= "blsp1_uart4_apps_clk_src",
433 .parent_names
= gcc_xo_gpll0
,
435 .ops
= &clk_rcg2_ops
,
439 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
443 .parent_map
= gcc_xo_gpll0_map
,
444 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
445 .clkr
.hw
.init
= &(struct clk_init_data
)
447 .name
= "blsp1_uart5_apps_clk_src",
448 .parent_names
= gcc_xo_gpll0
,
450 .ops
= &clk_rcg2_ops
,
454 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
458 .parent_map
= gcc_xo_gpll0_map
,
459 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
460 .clkr
.hw
.init
= &(struct clk_init_data
)
462 .name
= "blsp1_uart6_apps_clk_src",
463 .parent_names
= gcc_xo_gpll0
,
465 .ops
= &clk_rcg2_ops
,
469 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
472 .parent_map
= gcc_xo_gpll0_map
,
473 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
474 .clkr
.hw
.init
= &(struct clk_init_data
)
476 .name
= "blsp2_qup1_i2c_apps_clk_src",
477 .parent_names
= gcc_xo_gpll0
,
479 .ops
= &clk_rcg2_ops
,
483 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
487 .parent_map
= gcc_xo_gpll0_map
,
488 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
489 .clkr
.hw
.init
= &(struct clk_init_data
)
491 .name
= "blsp2_qup1_spi_apps_clk_src",
492 .parent_names
= gcc_xo_gpll0
,
494 .ops
= &clk_rcg2_ops
,
498 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
501 .parent_map
= gcc_xo_gpll0_map
,
502 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
503 .clkr
.hw
.init
= &(struct clk_init_data
)
505 .name
= "blsp2_qup2_i2c_apps_clk_src",
506 .parent_names
= gcc_xo_gpll0
,
508 .ops
= &clk_rcg2_ops
,
512 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
516 .parent_map
= gcc_xo_gpll0_map
,
517 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
518 .clkr
.hw
.init
= &(struct clk_init_data
)
520 .name
= "blsp2_qup2_spi_apps_clk_src",
521 .parent_names
= gcc_xo_gpll0
,
523 .ops
= &clk_rcg2_ops
,
527 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
530 .parent_map
= gcc_xo_gpll0_map
,
531 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
532 .clkr
.hw
.init
= &(struct clk_init_data
)
534 .name
= "blsp2_qup3_i2c_apps_clk_src",
535 .parent_names
= gcc_xo_gpll0
,
537 .ops
= &clk_rcg2_ops
,
541 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
545 .parent_map
= gcc_xo_gpll0_map
,
546 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
547 .clkr
.hw
.init
= &(struct clk_init_data
)
549 .name
= "blsp2_qup3_spi_apps_clk_src",
550 .parent_names
= gcc_xo_gpll0
,
552 .ops
= &clk_rcg2_ops
,
556 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src
= {
559 .parent_map
= gcc_xo_gpll0_map
,
560 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
561 .clkr
.hw
.init
= &(struct clk_init_data
)
563 .name
= "blsp2_qup4_i2c_apps_clk_src",
564 .parent_names
= gcc_xo_gpll0
,
566 .ops
= &clk_rcg2_ops
,
570 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src
= {
574 .parent_map
= gcc_xo_gpll0_map
,
575 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
576 .clkr
.hw
.init
= &(struct clk_init_data
)
578 .name
= "blsp2_qup4_spi_apps_clk_src",
579 .parent_names
= gcc_xo_gpll0
,
581 .ops
= &clk_rcg2_ops
,
585 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src
= {
588 .parent_map
= gcc_xo_gpll0_map
,
589 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
590 .clkr
.hw
.init
= &(struct clk_init_data
)
592 .name
= "blsp2_qup5_i2c_apps_clk_src",
593 .parent_names
= gcc_xo_gpll0
,
595 .ops
= &clk_rcg2_ops
,
599 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src
= {
603 .parent_map
= gcc_xo_gpll0_map
,
604 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
605 .clkr
.hw
.init
= &(struct clk_init_data
)
607 .name
= "blsp2_qup5_spi_apps_clk_src",
608 .parent_names
= gcc_xo_gpll0
,
610 .ops
= &clk_rcg2_ops
,
614 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src
= {
617 .parent_map
= gcc_xo_gpll0_map
,
618 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
619 .clkr
.hw
.init
= &(struct clk_init_data
)
621 .name
= "blsp2_qup6_i2c_apps_clk_src",
622 .parent_names
= gcc_xo_gpll0
,
624 .ops
= &clk_rcg2_ops
,
628 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src
= {
632 .parent_map
= gcc_xo_gpll0_map
,
633 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
634 .clkr
.hw
.init
= &(struct clk_init_data
)
636 .name
= "blsp2_qup6_spi_apps_clk_src",
637 .parent_names
= gcc_xo_gpll0
,
639 .ops
= &clk_rcg2_ops
,
643 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
647 .parent_map
= gcc_xo_gpll0_map
,
648 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
649 .clkr
.hw
.init
= &(struct clk_init_data
)
651 .name
= "blsp2_uart1_apps_clk_src",
652 .parent_names
= gcc_xo_gpll0
,
654 .ops
= &clk_rcg2_ops
,
658 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
662 .parent_map
= gcc_xo_gpll0_map
,
663 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
664 .clkr
.hw
.init
= &(struct clk_init_data
)
666 .name
= "blsp2_uart2_apps_clk_src",
667 .parent_names
= gcc_xo_gpll0
,
669 .ops
= &clk_rcg2_ops
,
673 static struct clk_rcg2 blsp2_uart3_apps_clk_src
= {
677 .parent_map
= gcc_xo_gpll0_map
,
678 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
679 .clkr
.hw
.init
= &(struct clk_init_data
)
681 .name
= "blsp2_uart3_apps_clk_src",
682 .parent_names
= gcc_xo_gpll0
,
684 .ops
= &clk_rcg2_ops
,
688 static struct clk_rcg2 blsp2_uart4_apps_clk_src
= {
692 .parent_map
= gcc_xo_gpll0_map
,
693 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
694 .clkr
.hw
.init
= &(struct clk_init_data
)
696 .name
= "blsp2_uart4_apps_clk_src",
697 .parent_names
= gcc_xo_gpll0
,
699 .ops
= &clk_rcg2_ops
,
703 static struct clk_rcg2 blsp2_uart5_apps_clk_src
= {
707 .parent_map
= gcc_xo_gpll0_map
,
708 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
709 .clkr
.hw
.init
= &(struct clk_init_data
)
711 .name
= "blsp2_uart5_apps_clk_src",
712 .parent_names
= gcc_xo_gpll0
,
714 .ops
= &clk_rcg2_ops
,
718 static struct clk_rcg2 blsp2_uart6_apps_clk_src
= {
722 .parent_map
= gcc_xo_gpll0_map
,
723 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
724 .clkr
.hw
.init
= &(struct clk_init_data
)
726 .name
= "blsp2_uart6_apps_clk_src",
727 .parent_names
= gcc_xo_gpll0
,
729 .ops
= &clk_rcg2_ops
,
733 static struct freq_tbl ftbl_gp1_clk_src
[] = {
734 F(19200000, P_XO
, 1, 0, 0),
735 F(100000000, P_GPLL0
, 6, 0, 0),
736 F(200000000, P_GPLL0
, 3, 0, 0),
740 static struct clk_rcg2 gp1_clk_src
= {
744 .parent_map
= gcc_xo_gpll0_map
,
745 .freq_tbl
= ftbl_gp1_clk_src
,
746 .clkr
.hw
.init
= &(struct clk_init_data
)
748 .name
= "gp1_clk_src",
749 .parent_names
= gcc_xo_gpll0
,
751 .ops
= &clk_rcg2_ops
,
755 static struct freq_tbl ftbl_gp2_clk_src
[] = {
756 F(19200000, P_XO
, 1, 0, 0),
757 F(100000000, P_GPLL0
, 6, 0, 0),
758 F(200000000, P_GPLL0
, 3, 0, 0),
762 static struct clk_rcg2 gp2_clk_src
= {
766 .parent_map
= gcc_xo_gpll0_map
,
767 .freq_tbl
= ftbl_gp2_clk_src
,
768 .clkr
.hw
.init
= &(struct clk_init_data
)
770 .name
= "gp2_clk_src",
771 .parent_names
= gcc_xo_gpll0
,
773 .ops
= &clk_rcg2_ops
,
777 static struct freq_tbl ftbl_gp3_clk_src
[] = {
778 F(19200000, P_XO
, 1, 0, 0),
779 F(100000000, P_GPLL0
, 6, 0, 0),
780 F(200000000, P_GPLL0
, 3, 0, 0),
784 static struct clk_rcg2 gp3_clk_src
= {
788 .parent_map
= gcc_xo_gpll0_map
,
789 .freq_tbl
= ftbl_gp3_clk_src
,
790 .clkr
.hw
.init
= &(struct clk_init_data
)
792 .name
= "gp3_clk_src",
793 .parent_names
= gcc_xo_gpll0
,
795 .ops
= &clk_rcg2_ops
,
799 static struct freq_tbl ftbl_pcie_0_aux_clk_src
[] = {
800 F(1011000, P_XO
, 1, 1, 19),
804 static struct clk_rcg2 pcie_0_aux_clk_src
= {
808 .freq_tbl
= ftbl_pcie_0_aux_clk_src
,
809 .clkr
.hw
.init
= &(struct clk_init_data
)
811 .name
= "pcie_0_aux_clk_src",
812 .parent_names
= (const char *[]) { "xo" },
814 .ops
= &clk_rcg2_ops
,
818 static struct freq_tbl ftbl_pcie_pipe_clk_src
[] = {
819 F(125000000, P_XO
, 1, 0, 0),
823 static struct clk_rcg2 pcie_0_pipe_clk_src
= {
826 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
827 .clkr
.hw
.init
= &(struct clk_init_data
)
829 .name
= "pcie_0_pipe_clk_src",
830 .parent_names
= (const char *[]) { "xo" },
832 .ops
= &clk_rcg2_ops
,
836 static struct freq_tbl ftbl_pcie_1_aux_clk_src
[] = {
837 F(1011000, P_XO
, 1, 1, 19),
841 static struct clk_rcg2 pcie_1_aux_clk_src
= {
845 .freq_tbl
= ftbl_pcie_1_aux_clk_src
,
846 .clkr
.hw
.init
= &(struct clk_init_data
)
848 .name
= "pcie_1_aux_clk_src",
849 .parent_names
= (const char *[]) { "xo" },
851 .ops
= &clk_rcg2_ops
,
855 static struct clk_rcg2 pcie_1_pipe_clk_src
= {
858 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
859 .clkr
.hw
.init
= &(struct clk_init_data
)
861 .name
= "pcie_1_pipe_clk_src",
862 .parent_names
= (const char *[]) { "xo" },
864 .ops
= &clk_rcg2_ops
,
868 static struct freq_tbl ftbl_pdm2_clk_src
[] = {
869 F(60000000, P_GPLL0
, 10, 0, 0),
873 static struct clk_rcg2 pdm2_clk_src
= {
876 .parent_map
= gcc_xo_gpll0_map
,
877 .freq_tbl
= ftbl_pdm2_clk_src
,
878 .clkr
.hw
.init
= &(struct clk_init_data
)
880 .name
= "pdm2_clk_src",
881 .parent_names
= gcc_xo_gpll0
,
883 .ops
= &clk_rcg2_ops
,
887 static struct freq_tbl ftbl_sdcc1_apps_clk_src
[] = {
888 F(144000, P_XO
, 16, 3, 25),
889 F(400000, P_XO
, 12, 1, 4),
890 F(20000000, P_GPLL0
, 15, 1, 2),
891 F(25000000, P_GPLL0
, 12, 1, 2),
892 F(50000000, P_GPLL0
, 12, 0, 0),
893 F(100000000, P_GPLL0
, 6, 0, 0),
894 F(192000000, P_GPLL4
, 2, 0, 0),
895 F(384000000, P_GPLL4
, 1, 0, 0),
899 static struct clk_rcg2 sdcc1_apps_clk_src
= {
903 .parent_map
= gcc_xo_gpll0_gpll4_map
,
904 .freq_tbl
= ftbl_sdcc1_apps_clk_src
,
905 .clkr
.hw
.init
= &(struct clk_init_data
)
907 .name
= "sdcc1_apps_clk_src",
908 .parent_names
= gcc_xo_gpll0_gpll4
,
910 .ops
= &clk_rcg2_floor_ops
,
914 static struct freq_tbl ftbl_sdcc2_4_apps_clk_src
[] = {
915 F(144000, P_XO
, 16, 3, 25),
916 F(400000, P_XO
, 12, 1, 4),
917 F(20000000, P_GPLL0
, 15, 1, 2),
918 F(25000000, P_GPLL0
, 12, 1, 2),
919 F(50000000, P_GPLL0
, 12, 0, 0),
920 F(100000000, P_GPLL0
, 6, 0, 0),
921 F(200000000, P_GPLL0
, 3, 0, 0),
925 static struct clk_rcg2 sdcc2_apps_clk_src
= {
929 .parent_map
= gcc_xo_gpll0_map
,
930 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
931 .clkr
.hw
.init
= &(struct clk_init_data
)
933 .name
= "sdcc2_apps_clk_src",
934 .parent_names
= gcc_xo_gpll0
,
936 .ops
= &clk_rcg2_floor_ops
,
940 static struct clk_rcg2 sdcc3_apps_clk_src
= {
944 .parent_map
= gcc_xo_gpll0_map
,
945 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
946 .clkr
.hw
.init
= &(struct clk_init_data
)
948 .name
= "sdcc3_apps_clk_src",
949 .parent_names
= gcc_xo_gpll0
,
951 .ops
= &clk_rcg2_floor_ops
,
955 static struct clk_rcg2 sdcc4_apps_clk_src
= {
959 .parent_map
= gcc_xo_gpll0_map
,
960 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
961 .clkr
.hw
.init
= &(struct clk_init_data
)
963 .name
= "sdcc4_apps_clk_src",
964 .parent_names
= gcc_xo_gpll0
,
966 .ops
= &clk_rcg2_floor_ops
,
970 static struct freq_tbl ftbl_tsif_ref_clk_src
[] = {
971 F(105500, P_XO
, 1, 1, 182),
975 static struct clk_rcg2 tsif_ref_clk_src
= {
979 .freq_tbl
= ftbl_tsif_ref_clk_src
,
980 .clkr
.hw
.init
= &(struct clk_init_data
)
982 .name
= "tsif_ref_clk_src",
983 .parent_names
= (const char *[]) { "xo" },
985 .ops
= &clk_rcg2_ops
,
989 static struct freq_tbl ftbl_usb30_mock_utmi_clk_src
[] = {
990 F(19200000, P_XO
, 1, 0, 0),
991 F(60000000, P_GPLL0
, 10, 0, 0),
995 static struct clk_rcg2 usb30_mock_utmi_clk_src
= {
998 .parent_map
= gcc_xo_gpll0_map
,
999 .freq_tbl
= ftbl_usb30_mock_utmi_clk_src
,
1000 .clkr
.hw
.init
= &(struct clk_init_data
)
1002 .name
= "usb30_mock_utmi_clk_src",
1003 .parent_names
= gcc_xo_gpll0
,
1005 .ops
= &clk_rcg2_ops
,
1009 static struct freq_tbl ftbl_usb3_phy_aux_clk_src
[] = {
1010 F(1200000, P_XO
, 16, 0, 0),
1014 static struct clk_rcg2 usb3_phy_aux_clk_src
= {
1017 .freq_tbl
= ftbl_usb3_phy_aux_clk_src
,
1018 .clkr
.hw
.init
= &(struct clk_init_data
)
1020 .name
= "usb3_phy_aux_clk_src",
1021 .parent_names
= (const char *[]) { "xo" },
1023 .ops
= &clk_rcg2_ops
,
1027 static struct freq_tbl ftbl_usb_hs_system_clk_src
[] = {
1028 F(75000000, P_GPLL0
, 8, 0, 0),
1032 static struct clk_rcg2 usb_hs_system_clk_src
= {
1035 .parent_map
= gcc_xo_gpll0_map
,
1036 .freq_tbl
= ftbl_usb_hs_system_clk_src
,
1037 .clkr
.hw
.init
= &(struct clk_init_data
)
1039 .name
= "usb_hs_system_clk_src",
1040 .parent_names
= gcc_xo_gpll0
,
1042 .ops
= &clk_rcg2_ops
,
1046 static struct clk_branch gcc_blsp1_ahb_clk
= {
1048 .halt_check
= BRANCH_HALT_VOTED
,
1050 .enable_reg
= 0x1484,
1051 .enable_mask
= BIT(17),
1052 .hw
.init
= &(struct clk_init_data
)
1054 .name
= "gcc_blsp1_ahb_clk",
1055 .ops
= &clk_branch2_ops
,
1060 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1063 .enable_reg
= 0x0648,
1064 .enable_mask
= BIT(0),
1065 .hw
.init
= &(struct clk_init_data
)
1067 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1068 .parent_names
= (const char *[]) {
1069 "blsp1_qup1_i2c_apps_clk_src",
1072 .flags
= CLK_SET_RATE_PARENT
,
1073 .ops
= &clk_branch2_ops
,
1078 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1081 .enable_reg
= 0x0644,
1082 .enable_mask
= BIT(0),
1083 .hw
.init
= &(struct clk_init_data
)
1085 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1086 .parent_names
= (const char *[]) {
1087 "blsp1_qup1_spi_apps_clk_src",
1090 .flags
= CLK_SET_RATE_PARENT
,
1091 .ops
= &clk_branch2_ops
,
1096 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1099 .enable_reg
= 0x06c8,
1100 .enable_mask
= BIT(0),
1101 .hw
.init
= &(struct clk_init_data
)
1103 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1104 .parent_names
= (const char *[]) {
1105 "blsp1_qup2_i2c_apps_clk_src",
1108 .flags
= CLK_SET_RATE_PARENT
,
1109 .ops
= &clk_branch2_ops
,
1114 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1117 .enable_reg
= 0x06c4,
1118 .enable_mask
= BIT(0),
1119 .hw
.init
= &(struct clk_init_data
)
1121 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1122 .parent_names
= (const char *[]) {
1123 "blsp1_qup2_spi_apps_clk_src",
1126 .flags
= CLK_SET_RATE_PARENT
,
1127 .ops
= &clk_branch2_ops
,
1132 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1135 .enable_reg
= 0x0748,
1136 .enable_mask
= BIT(0),
1137 .hw
.init
= &(struct clk_init_data
)
1139 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1140 .parent_names
= (const char *[]) {
1141 "blsp1_qup3_i2c_apps_clk_src",
1144 .flags
= CLK_SET_RATE_PARENT
,
1145 .ops
= &clk_branch2_ops
,
1150 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1153 .enable_reg
= 0x0744,
1154 .enable_mask
= BIT(0),
1155 .hw
.init
= &(struct clk_init_data
)
1157 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1158 .parent_names
= (const char *[]) {
1159 "blsp1_qup3_spi_apps_clk_src",
1162 .flags
= CLK_SET_RATE_PARENT
,
1163 .ops
= &clk_branch2_ops
,
1168 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1171 .enable_reg
= 0x07c8,
1172 .enable_mask
= BIT(0),
1173 .hw
.init
= &(struct clk_init_data
)
1175 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1176 .parent_names
= (const char *[]) {
1177 "blsp1_qup4_i2c_apps_clk_src",
1180 .flags
= CLK_SET_RATE_PARENT
,
1181 .ops
= &clk_branch2_ops
,
1186 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1189 .enable_reg
= 0x07c4,
1190 .enable_mask
= BIT(0),
1191 .hw
.init
= &(struct clk_init_data
)
1193 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1194 .parent_names
= (const char *[]) {
1195 "blsp1_qup4_spi_apps_clk_src",
1198 .flags
= CLK_SET_RATE_PARENT
,
1199 .ops
= &clk_branch2_ops
,
1204 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
1207 .enable_reg
= 0x0848,
1208 .enable_mask
= BIT(0),
1209 .hw
.init
= &(struct clk_init_data
)
1211 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
1212 .parent_names
= (const char *[]) {
1213 "blsp1_qup5_i2c_apps_clk_src",
1216 .flags
= CLK_SET_RATE_PARENT
,
1217 .ops
= &clk_branch2_ops
,
1222 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
1225 .enable_reg
= 0x0844,
1226 .enable_mask
= BIT(0),
1227 .hw
.init
= &(struct clk_init_data
)
1229 .name
= "gcc_blsp1_qup5_spi_apps_clk",
1230 .parent_names
= (const char *[]) {
1231 "blsp1_qup5_spi_apps_clk_src",
1234 .flags
= CLK_SET_RATE_PARENT
,
1235 .ops
= &clk_branch2_ops
,
1240 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
1243 .enable_reg
= 0x08c8,
1244 .enable_mask
= BIT(0),
1245 .hw
.init
= &(struct clk_init_data
)
1247 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
1248 .parent_names
= (const char *[]) {
1249 "blsp1_qup6_i2c_apps_clk_src",
1252 .flags
= CLK_SET_RATE_PARENT
,
1253 .ops
= &clk_branch2_ops
,
1258 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
1261 .enable_reg
= 0x08c4,
1262 .enable_mask
= BIT(0),
1263 .hw
.init
= &(struct clk_init_data
)
1265 .name
= "gcc_blsp1_qup6_spi_apps_clk",
1266 .parent_names
= (const char *[]) {
1267 "blsp1_qup6_spi_apps_clk_src",
1270 .flags
= CLK_SET_RATE_PARENT
,
1271 .ops
= &clk_branch2_ops
,
1276 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1279 .enable_reg
= 0x0684,
1280 .enable_mask
= BIT(0),
1281 .hw
.init
= &(struct clk_init_data
)
1283 .name
= "gcc_blsp1_uart1_apps_clk",
1284 .parent_names
= (const char *[]) {
1285 "blsp1_uart1_apps_clk_src",
1288 .flags
= CLK_SET_RATE_PARENT
,
1289 .ops
= &clk_branch2_ops
,
1294 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1297 .enable_reg
= 0x0704,
1298 .enable_mask
= BIT(0),
1299 .hw
.init
= &(struct clk_init_data
)
1301 .name
= "gcc_blsp1_uart2_apps_clk",
1302 .parent_names
= (const char *[]) {
1303 "blsp1_uart2_apps_clk_src",
1306 .flags
= CLK_SET_RATE_PARENT
,
1307 .ops
= &clk_branch2_ops
,
1312 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1315 .enable_reg
= 0x0784,
1316 .enable_mask
= BIT(0),
1317 .hw
.init
= &(struct clk_init_data
)
1319 .name
= "gcc_blsp1_uart3_apps_clk",
1320 .parent_names
= (const char *[]) {
1321 "blsp1_uart3_apps_clk_src",
1324 .flags
= CLK_SET_RATE_PARENT
,
1325 .ops
= &clk_branch2_ops
,
1330 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1333 .enable_reg
= 0x0804,
1334 .enable_mask
= BIT(0),
1335 .hw
.init
= &(struct clk_init_data
)
1337 .name
= "gcc_blsp1_uart4_apps_clk",
1338 .parent_names
= (const char *[]) {
1339 "blsp1_uart4_apps_clk_src",
1342 .flags
= CLK_SET_RATE_PARENT
,
1343 .ops
= &clk_branch2_ops
,
1348 static struct clk_branch gcc_blsp1_uart5_apps_clk
= {
1351 .enable_reg
= 0x0884,
1352 .enable_mask
= BIT(0),
1353 .hw
.init
= &(struct clk_init_data
)
1355 .name
= "gcc_blsp1_uart5_apps_clk",
1356 .parent_names
= (const char *[]) {
1357 "blsp1_uart5_apps_clk_src",
1360 .flags
= CLK_SET_RATE_PARENT
,
1361 .ops
= &clk_branch2_ops
,
1366 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1369 .enable_reg
= 0x0904,
1370 .enable_mask
= BIT(0),
1371 .hw
.init
= &(struct clk_init_data
)
1373 .name
= "gcc_blsp1_uart6_apps_clk",
1374 .parent_names
= (const char *[]) {
1375 "blsp1_uart6_apps_clk_src",
1378 .flags
= CLK_SET_RATE_PARENT
,
1379 .ops
= &clk_branch2_ops
,
1384 static struct clk_branch gcc_blsp2_ahb_clk
= {
1386 .halt_check
= BRANCH_HALT_VOTED
,
1388 .enable_reg
= 0x1484,
1389 .enable_mask
= BIT(15),
1390 .hw
.init
= &(struct clk_init_data
)
1392 .name
= "gcc_blsp2_ahb_clk",
1393 .ops
= &clk_branch2_ops
,
1398 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1401 .enable_reg
= 0x0988,
1402 .enable_mask
= BIT(0),
1403 .hw
.init
= &(struct clk_init_data
)
1405 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1406 .parent_names
= (const char *[]) {
1407 "blsp2_qup1_i2c_apps_clk_src",
1410 .flags
= CLK_SET_RATE_PARENT
,
1411 .ops
= &clk_branch2_ops
,
1416 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1419 .enable_reg
= 0x0984,
1420 .enable_mask
= BIT(0),
1421 .hw
.init
= &(struct clk_init_data
)
1423 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1424 .parent_names
= (const char *[]) {
1425 "blsp2_qup1_spi_apps_clk_src",
1428 .flags
= CLK_SET_RATE_PARENT
,
1429 .ops
= &clk_branch2_ops
,
1434 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1437 .enable_reg
= 0x0a08,
1438 .enable_mask
= BIT(0),
1439 .hw
.init
= &(struct clk_init_data
)
1441 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1442 .parent_names
= (const char *[]) {
1443 "blsp2_qup2_i2c_apps_clk_src",
1446 .flags
= CLK_SET_RATE_PARENT
,
1447 .ops
= &clk_branch2_ops
,
1452 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1455 .enable_reg
= 0x0a04,
1456 .enable_mask
= BIT(0),
1457 .hw
.init
= &(struct clk_init_data
)
1459 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1460 .parent_names
= (const char *[]) {
1461 "blsp2_qup2_spi_apps_clk_src",
1464 .flags
= CLK_SET_RATE_PARENT
,
1465 .ops
= &clk_branch2_ops
,
1470 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1473 .enable_reg
= 0x0a88,
1474 .enable_mask
= BIT(0),
1475 .hw
.init
= &(struct clk_init_data
)
1477 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1478 .parent_names
= (const char *[]) {
1479 "blsp2_qup3_i2c_apps_clk_src",
1482 .flags
= CLK_SET_RATE_PARENT
,
1483 .ops
= &clk_branch2_ops
,
1488 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1491 .enable_reg
= 0x0a84,
1492 .enable_mask
= BIT(0),
1493 .hw
.init
= &(struct clk_init_data
)
1495 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1496 .parent_names
= (const char *[]) {
1497 "blsp2_qup3_spi_apps_clk_src",
1500 .flags
= CLK_SET_RATE_PARENT
,
1501 .ops
= &clk_branch2_ops
,
1506 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk
= {
1509 .enable_reg
= 0x0b08,
1510 .enable_mask
= BIT(0),
1511 .hw
.init
= &(struct clk_init_data
)
1513 .name
= "gcc_blsp2_qup4_i2c_apps_clk",
1514 .parent_names
= (const char *[]) {
1515 "blsp2_qup4_i2c_apps_clk_src",
1518 .flags
= CLK_SET_RATE_PARENT
,
1519 .ops
= &clk_branch2_ops
,
1524 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk
= {
1527 .enable_reg
= 0x0b04,
1528 .enable_mask
= BIT(0),
1529 .hw
.init
= &(struct clk_init_data
)
1531 .name
= "gcc_blsp2_qup4_spi_apps_clk",
1532 .parent_names
= (const char *[]) {
1533 "blsp2_qup4_spi_apps_clk_src",
1536 .flags
= CLK_SET_RATE_PARENT
,
1537 .ops
= &clk_branch2_ops
,
1542 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk
= {
1545 .enable_reg
= 0x0b88,
1546 .enable_mask
= BIT(0),
1547 .hw
.init
= &(struct clk_init_data
)
1549 .name
= "gcc_blsp2_qup5_i2c_apps_clk",
1550 .parent_names
= (const char *[]) {
1551 "blsp2_qup5_i2c_apps_clk_src",
1554 .flags
= CLK_SET_RATE_PARENT
,
1555 .ops
= &clk_branch2_ops
,
1560 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk
= {
1563 .enable_reg
= 0x0b84,
1564 .enable_mask
= BIT(0),
1565 .hw
.init
= &(struct clk_init_data
)
1567 .name
= "gcc_blsp2_qup5_spi_apps_clk",
1568 .parent_names
= (const char *[]) {
1569 "blsp2_qup5_spi_apps_clk_src",
1572 .flags
= CLK_SET_RATE_PARENT
,
1573 .ops
= &clk_branch2_ops
,
1578 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk
= {
1581 .enable_reg
= 0x0c08,
1582 .enable_mask
= BIT(0),
1583 .hw
.init
= &(struct clk_init_data
)
1585 .name
= "gcc_blsp2_qup6_i2c_apps_clk",
1586 .parent_names
= (const char *[]) {
1587 "blsp2_qup6_i2c_apps_clk_src",
1590 .flags
= CLK_SET_RATE_PARENT
,
1591 .ops
= &clk_branch2_ops
,
1596 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk
= {
1599 .enable_reg
= 0x0c04,
1600 .enable_mask
= BIT(0),
1601 .hw
.init
= &(struct clk_init_data
)
1603 .name
= "gcc_blsp2_qup6_spi_apps_clk",
1604 .parent_names
= (const char *[]) {
1605 "blsp2_qup6_spi_apps_clk_src",
1608 .flags
= CLK_SET_RATE_PARENT
,
1609 .ops
= &clk_branch2_ops
,
1614 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1617 .enable_reg
= 0x09c4,
1618 .enable_mask
= BIT(0),
1619 .hw
.init
= &(struct clk_init_data
)
1621 .name
= "gcc_blsp2_uart1_apps_clk",
1622 .parent_names
= (const char *[]) {
1623 "blsp2_uart1_apps_clk_src",
1626 .flags
= CLK_SET_RATE_PARENT
,
1627 .ops
= &clk_branch2_ops
,
1632 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1635 .enable_reg
= 0x0a44,
1636 .enable_mask
= BIT(0),
1637 .hw
.init
= &(struct clk_init_data
)
1639 .name
= "gcc_blsp2_uart2_apps_clk",
1640 .parent_names
= (const char *[]) {
1641 "blsp2_uart2_apps_clk_src",
1644 .flags
= CLK_SET_RATE_PARENT
,
1645 .ops
= &clk_branch2_ops
,
1650 static struct clk_branch gcc_blsp2_uart3_apps_clk
= {
1653 .enable_reg
= 0x0ac4,
1654 .enable_mask
= BIT(0),
1655 .hw
.init
= &(struct clk_init_data
)
1657 .name
= "gcc_blsp2_uart3_apps_clk",
1658 .parent_names
= (const char *[]) {
1659 "blsp2_uart3_apps_clk_src",
1662 .flags
= CLK_SET_RATE_PARENT
,
1663 .ops
= &clk_branch2_ops
,
1668 static struct clk_branch gcc_blsp2_uart4_apps_clk
= {
1671 .enable_reg
= 0x0b44,
1672 .enable_mask
= BIT(0),
1673 .hw
.init
= &(struct clk_init_data
)
1675 .name
= "gcc_blsp2_uart4_apps_clk",
1676 .parent_names
= (const char *[]) {
1677 "blsp2_uart4_apps_clk_src",
1680 .flags
= CLK_SET_RATE_PARENT
,
1681 .ops
= &clk_branch2_ops
,
1686 static struct clk_branch gcc_blsp2_uart5_apps_clk
= {
1689 .enable_reg
= 0x0bc4,
1690 .enable_mask
= BIT(0),
1691 .hw
.init
= &(struct clk_init_data
)
1693 .name
= "gcc_blsp2_uart5_apps_clk",
1694 .parent_names
= (const char *[]) {
1695 "blsp2_uart5_apps_clk_src",
1698 .flags
= CLK_SET_RATE_PARENT
,
1699 .ops
= &clk_branch2_ops
,
1704 static struct clk_branch gcc_blsp2_uart6_apps_clk
= {
1707 .enable_reg
= 0x0c44,
1708 .enable_mask
= BIT(0),
1709 .hw
.init
= &(struct clk_init_data
)
1711 .name
= "gcc_blsp2_uart6_apps_clk",
1712 .parent_names
= (const char *[]) {
1713 "blsp2_uart6_apps_clk_src",
1716 .flags
= CLK_SET_RATE_PARENT
,
1717 .ops
= &clk_branch2_ops
,
1722 static struct clk_branch gcc_gp1_clk
= {
1725 .enable_reg
= 0x1900,
1726 .enable_mask
= BIT(0),
1727 .hw
.init
= &(struct clk_init_data
)
1729 .name
= "gcc_gp1_clk",
1730 .parent_names
= (const char *[]) {
1734 .flags
= CLK_SET_RATE_PARENT
,
1735 .ops
= &clk_branch2_ops
,
1740 static struct clk_branch gcc_gp2_clk
= {
1743 .enable_reg
= 0x1940,
1744 .enable_mask
= BIT(0),
1745 .hw
.init
= &(struct clk_init_data
)
1747 .name
= "gcc_gp2_clk",
1748 .parent_names
= (const char *[]) {
1752 .flags
= CLK_SET_RATE_PARENT
,
1753 .ops
= &clk_branch2_ops
,
1758 static struct clk_branch gcc_gp3_clk
= {
1761 .enable_reg
= 0x1980,
1762 .enable_mask
= BIT(0),
1763 .hw
.init
= &(struct clk_init_data
)
1765 .name
= "gcc_gp3_clk",
1766 .parent_names
= (const char *[]) {
1770 .flags
= CLK_SET_RATE_PARENT
,
1771 .ops
= &clk_branch2_ops
,
1776 static struct clk_branch gcc_lpass_q6_axi_clk
= {
1779 .enable_reg
= 0x0280,
1780 .enable_mask
= BIT(0),
1781 .hw
.init
= &(struct clk_init_data
)
1783 .name
= "gcc_lpass_q6_axi_clk",
1784 .ops
= &clk_branch2_ops
,
1789 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
1792 .enable_reg
= 0x0284,
1793 .enable_mask
= BIT(0),
1794 .hw
.init
= &(struct clk_init_data
)
1796 .name
= "gcc_mss_q6_bimc_axi_clk",
1797 .ops
= &clk_branch2_ops
,
1802 static struct clk_branch gcc_pcie_0_aux_clk
= {
1805 .enable_reg
= 0x1ad4,
1806 .enable_mask
= BIT(0),
1807 .hw
.init
= &(struct clk_init_data
)
1809 .name
= "gcc_pcie_0_aux_clk",
1810 .parent_names
= (const char *[]) {
1811 "pcie_0_aux_clk_src",
1814 .flags
= CLK_SET_RATE_PARENT
,
1815 .ops
= &clk_branch2_ops
,
1820 static struct clk_branch gcc_pcie_0_cfg_ahb_clk
= {
1823 .enable_reg
= 0x1ad0,
1824 .enable_mask
= BIT(0),
1825 .hw
.init
= &(struct clk_init_data
)
1827 .name
= "gcc_pcie_0_cfg_ahb_clk",
1828 .ops
= &clk_branch2_ops
,
1833 static struct clk_branch gcc_pcie_0_mstr_axi_clk
= {
1836 .enable_reg
= 0x1acc,
1837 .enable_mask
= BIT(0),
1838 .hw
.init
= &(struct clk_init_data
)
1840 .name
= "gcc_pcie_0_mstr_axi_clk",
1841 .ops
= &clk_branch2_ops
,
1846 static struct clk_branch gcc_pcie_0_pipe_clk
= {
1848 .halt_check
= BRANCH_HALT_DELAY
,
1850 .enable_reg
= 0x1ad8,
1851 .enable_mask
= BIT(0),
1852 .hw
.init
= &(struct clk_init_data
)
1854 .name
= "gcc_pcie_0_pipe_clk",
1855 .parent_names
= (const char *[]) {
1856 "pcie_0_pipe_clk_src",
1859 .flags
= CLK_SET_RATE_PARENT
,
1860 .ops
= &clk_branch2_ops
,
1865 static struct clk_branch gcc_pcie_0_slv_axi_clk
= {
1867 .halt_check
= BRANCH_HALT_DELAY
,
1869 .enable_reg
= 0x1ac8,
1870 .enable_mask
= BIT(0),
1871 .hw
.init
= &(struct clk_init_data
)
1873 .name
= "gcc_pcie_0_slv_axi_clk",
1874 .ops
= &clk_branch2_ops
,
1879 static struct clk_branch gcc_pcie_1_aux_clk
= {
1882 .enable_reg
= 0x1b54,
1883 .enable_mask
= BIT(0),
1884 .hw
.init
= &(struct clk_init_data
)
1886 .name
= "gcc_pcie_1_aux_clk",
1887 .parent_names
= (const char *[]) {
1888 "pcie_1_aux_clk_src",
1891 .flags
= CLK_SET_RATE_PARENT
,
1892 .ops
= &clk_branch2_ops
,
1897 static struct clk_branch gcc_pcie_1_cfg_ahb_clk
= {
1900 .enable_reg
= 0x1b54,
1901 .enable_mask
= BIT(0),
1902 .hw
.init
= &(struct clk_init_data
)
1904 .name
= "gcc_pcie_1_cfg_ahb_clk",
1905 .ops
= &clk_branch2_ops
,
1910 static struct clk_branch gcc_pcie_1_mstr_axi_clk
= {
1913 .enable_reg
= 0x1b50,
1914 .enable_mask
= BIT(0),
1915 .hw
.init
= &(struct clk_init_data
)
1917 .name
= "gcc_pcie_1_mstr_axi_clk",
1918 .ops
= &clk_branch2_ops
,
1923 static struct clk_branch gcc_pcie_1_pipe_clk
= {
1925 .halt_check
= BRANCH_HALT_DELAY
,
1927 .enable_reg
= 0x1b58,
1928 .enable_mask
= BIT(0),
1929 .hw
.init
= &(struct clk_init_data
)
1931 .name
= "gcc_pcie_1_pipe_clk",
1932 .parent_names
= (const char *[]) {
1933 "pcie_1_pipe_clk_src",
1936 .flags
= CLK_SET_RATE_PARENT
,
1937 .ops
= &clk_branch2_ops
,
1942 static struct clk_branch gcc_pcie_1_slv_axi_clk
= {
1945 .enable_reg
= 0x1b48,
1946 .enable_mask
= BIT(0),
1947 .hw
.init
= &(struct clk_init_data
)
1949 .name
= "gcc_pcie_1_slv_axi_clk",
1950 .ops
= &clk_branch2_ops
,
1955 static struct clk_branch gcc_pdm2_clk
= {
1958 .enable_reg
= 0x0ccc,
1959 .enable_mask
= BIT(0),
1960 .hw
.init
= &(struct clk_init_data
)
1962 .name
= "gcc_pdm2_clk",
1963 .parent_names
= (const char *[]) {
1967 .flags
= CLK_SET_RATE_PARENT
,
1968 .ops
= &clk_branch2_ops
,
1973 static struct clk_branch gcc_pdm_ahb_clk
= {
1976 .enable_reg
= 0x0cc4,
1977 .enable_mask
= BIT(0),
1978 .hw
.init
= &(struct clk_init_data
)
1980 .name
= "gcc_pdm_ahb_clk",
1981 .ops
= &clk_branch2_ops
,
1986 static struct clk_branch gcc_sdcc1_apps_clk
= {
1989 .enable_reg
= 0x04c4,
1990 .enable_mask
= BIT(0),
1991 .hw
.init
= &(struct clk_init_data
)
1993 .name
= "gcc_sdcc1_apps_clk",
1994 .parent_names
= (const char *[]) {
1995 "sdcc1_apps_clk_src",
1998 .flags
= CLK_SET_RATE_PARENT
,
1999 .ops
= &clk_branch2_ops
,
2004 static struct clk_branch gcc_sdcc1_ahb_clk
= {
2007 .enable_reg
= 0x04c8,
2008 .enable_mask
= BIT(0),
2009 .hw
.init
= &(struct clk_init_data
)
2011 .name
= "gcc_sdcc1_ahb_clk",
2012 .parent_names
= (const char *[]){
2013 "periph_noc_clk_src",
2016 .ops
= &clk_branch2_ops
,
2021 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2024 .enable_reg
= 0x0508,
2025 .enable_mask
= BIT(0),
2026 .hw
.init
= &(struct clk_init_data
)
2028 .name
= "gcc_sdcc2_ahb_clk",
2029 .parent_names
= (const char *[]){
2030 "periph_noc_clk_src",
2033 .ops
= &clk_branch2_ops
,
2038 static struct clk_branch gcc_sdcc2_apps_clk
= {
2041 .enable_reg
= 0x0504,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(struct clk_init_data
)
2045 .name
= "gcc_sdcc2_apps_clk",
2046 .parent_names
= (const char *[]) {
2047 "sdcc2_apps_clk_src",
2050 .flags
= CLK_SET_RATE_PARENT
,
2051 .ops
= &clk_branch2_ops
,
2056 static struct clk_branch gcc_sdcc3_ahb_clk
= {
2059 .enable_reg
= 0x0548,
2060 .enable_mask
= BIT(0),
2061 .hw
.init
= &(struct clk_init_data
)
2063 .name
= "gcc_sdcc3_ahb_clk",
2064 .parent_names
= (const char *[]){
2065 "periph_noc_clk_src",
2068 .ops
= &clk_branch2_ops
,
2073 static struct clk_branch gcc_sdcc3_apps_clk
= {
2076 .enable_reg
= 0x0544,
2077 .enable_mask
= BIT(0),
2078 .hw
.init
= &(struct clk_init_data
)
2080 .name
= "gcc_sdcc3_apps_clk",
2081 .parent_names
= (const char *[]) {
2082 "sdcc3_apps_clk_src",
2085 .flags
= CLK_SET_RATE_PARENT
,
2086 .ops
= &clk_branch2_ops
,
2091 static struct clk_branch gcc_sdcc4_ahb_clk
= {
2094 .enable_reg
= 0x0588,
2095 .enable_mask
= BIT(0),
2096 .hw
.init
= &(struct clk_init_data
)
2098 .name
= "gcc_sdcc4_ahb_clk",
2099 .parent_names
= (const char *[]){
2100 "periph_noc_clk_src",
2103 .ops
= &clk_branch2_ops
,
2108 static struct clk_branch gcc_sdcc4_apps_clk
= {
2111 .enable_reg
= 0x0584,
2112 .enable_mask
= BIT(0),
2113 .hw
.init
= &(struct clk_init_data
)
2115 .name
= "gcc_sdcc4_apps_clk",
2116 .parent_names
= (const char *[]) {
2117 "sdcc4_apps_clk_src",
2120 .flags
= CLK_SET_RATE_PARENT
,
2121 .ops
= &clk_branch2_ops
,
2126 static struct clk_branch gcc_sys_noc_ufs_axi_clk
= {
2129 .enable_reg
= 0x1d7c,
2130 .enable_mask
= BIT(0),
2131 .hw
.init
= &(struct clk_init_data
)
2133 .name
= "gcc_sys_noc_ufs_axi_clk",
2134 .parent_names
= (const char *[]) {
2138 .flags
= CLK_SET_RATE_PARENT
,
2139 .ops
= &clk_branch2_ops
,
2144 static struct clk_branch gcc_sys_noc_usb3_axi_clk
= {
2147 .enable_reg
= 0x03fc,
2148 .enable_mask
= BIT(0),
2149 .hw
.init
= &(struct clk_init_data
)
2151 .name
= "gcc_sys_noc_usb3_axi_clk",
2152 .parent_names
= (const char *[]) {
2153 "usb30_master_clk_src",
2156 .flags
= CLK_SET_RATE_PARENT
,
2157 .ops
= &clk_branch2_ops
,
2162 static struct clk_branch gcc_tsif_ahb_clk
= {
2165 .enable_reg
= 0x0d84,
2166 .enable_mask
= BIT(0),
2167 .hw
.init
= &(struct clk_init_data
)
2169 .name
= "gcc_tsif_ahb_clk",
2170 .ops
= &clk_branch2_ops
,
2175 static struct clk_branch gcc_tsif_ref_clk
= {
2178 .enable_reg
= 0x0d88,
2179 .enable_mask
= BIT(0),
2180 .hw
.init
= &(struct clk_init_data
)
2182 .name
= "gcc_tsif_ref_clk",
2183 .parent_names
= (const char *[]) {
2187 .flags
= CLK_SET_RATE_PARENT
,
2188 .ops
= &clk_branch2_ops
,
2193 static struct clk_branch gcc_ufs_ahb_clk
= {
2196 .enable_reg
= 0x1d4c,
2197 .enable_mask
= BIT(0),
2198 .hw
.init
= &(struct clk_init_data
)
2200 .name
= "gcc_ufs_ahb_clk",
2201 .ops
= &clk_branch2_ops
,
2206 static struct clk_branch gcc_ufs_axi_clk
= {
2209 .enable_reg
= 0x1d48,
2210 .enable_mask
= BIT(0),
2211 .hw
.init
= &(struct clk_init_data
)
2213 .name
= "gcc_ufs_axi_clk",
2214 .parent_names
= (const char *[]) {
2218 .flags
= CLK_SET_RATE_PARENT
,
2219 .ops
= &clk_branch2_ops
,
2224 static struct clk_branch gcc_ufs_rx_cfg_clk
= {
2227 .enable_reg
= 0x1d54,
2228 .enable_mask
= BIT(0),
2229 .hw
.init
= &(struct clk_init_data
)
2231 .name
= "gcc_ufs_rx_cfg_clk",
2232 .parent_names
= (const char *[]) {
2236 .flags
= CLK_SET_RATE_PARENT
,
2237 .ops
= &clk_branch2_ops
,
2242 static struct clk_branch gcc_ufs_rx_symbol_0_clk
= {
2244 .halt_check
= BRANCH_HALT_DELAY
,
2246 .enable_reg
= 0x1d60,
2247 .enable_mask
= BIT(0),
2248 .hw
.init
= &(struct clk_init_data
)
2250 .name
= "gcc_ufs_rx_symbol_0_clk",
2251 .ops
= &clk_branch2_ops
,
2256 static struct clk_branch gcc_ufs_rx_symbol_1_clk
= {
2258 .halt_check
= BRANCH_HALT_DELAY
,
2260 .enable_reg
= 0x1d64,
2261 .enable_mask
= BIT(0),
2262 .hw
.init
= &(struct clk_init_data
)
2264 .name
= "gcc_ufs_rx_symbol_1_clk",
2265 .ops
= &clk_branch2_ops
,
2270 static struct clk_branch gcc_ufs_tx_cfg_clk
= {
2273 .enable_reg
= 0x1d50,
2274 .enable_mask
= BIT(0),
2275 .hw
.init
= &(struct clk_init_data
)
2277 .name
= "gcc_ufs_tx_cfg_clk",
2278 .parent_names
= (const char *[]) {
2282 .flags
= CLK_SET_RATE_PARENT
,
2283 .ops
= &clk_branch2_ops
,
2288 static struct clk_branch gcc_ufs_tx_symbol_0_clk
= {
2290 .halt_check
= BRANCH_HALT_DELAY
,
2292 .enable_reg
= 0x1d58,
2293 .enable_mask
= BIT(0),
2294 .hw
.init
= &(struct clk_init_data
)
2296 .name
= "gcc_ufs_tx_symbol_0_clk",
2297 .ops
= &clk_branch2_ops
,
2302 static struct clk_branch gcc_ufs_tx_symbol_1_clk
= {
2304 .halt_check
= BRANCH_HALT_DELAY
,
2306 .enable_reg
= 0x1d5c,
2307 .enable_mask
= BIT(0),
2308 .hw
.init
= &(struct clk_init_data
)
2310 .name
= "gcc_ufs_tx_symbol_1_clk",
2311 .ops
= &clk_branch2_ops
,
2316 static struct clk_branch gcc_usb2_hs_phy_sleep_clk
= {
2319 .enable_reg
= 0x04ac,
2320 .enable_mask
= BIT(0),
2321 .hw
.init
= &(struct clk_init_data
)
2323 .name
= "gcc_usb2_hs_phy_sleep_clk",
2324 .ops
= &clk_branch2_ops
,
2329 static struct clk_branch gcc_usb30_master_clk
= {
2332 .enable_reg
= 0x03c8,
2333 .enable_mask
= BIT(0),
2334 .hw
.init
= &(struct clk_init_data
)
2336 .name
= "gcc_usb30_master_clk",
2337 .parent_names
= (const char *[]) {
2338 "usb30_master_clk_src",
2341 .flags
= CLK_SET_RATE_PARENT
,
2342 .ops
= &clk_branch2_ops
,
2347 static struct clk_branch gcc_usb30_mock_utmi_clk
= {
2350 .enable_reg
= 0x03d0,
2351 .enable_mask
= BIT(0),
2352 .hw
.init
= &(struct clk_init_data
)
2354 .name
= "gcc_usb30_mock_utmi_clk",
2355 .parent_names
= (const char *[]) {
2356 "usb30_mock_utmi_clk_src",
2359 .flags
= CLK_SET_RATE_PARENT
,
2360 .ops
= &clk_branch2_ops
,
2365 static struct clk_branch gcc_usb30_sleep_clk
= {
2368 .enable_reg
= 0x03cc,
2369 .enable_mask
= BIT(0),
2370 .hw
.init
= &(struct clk_init_data
)
2372 .name
= "gcc_usb30_sleep_clk",
2373 .ops
= &clk_branch2_ops
,
2378 static struct clk_branch gcc_usb3_phy_aux_clk
= {
2381 .enable_reg
= 0x1408,
2382 .enable_mask
= BIT(0),
2383 .hw
.init
= &(struct clk_init_data
)
2385 .name
= "gcc_usb3_phy_aux_clk",
2386 .parent_names
= (const char *[]) {
2387 "usb3_phy_aux_clk_src",
2390 .flags
= CLK_SET_RATE_PARENT
,
2391 .ops
= &clk_branch2_ops
,
2396 static struct clk_branch gcc_usb_hs_ahb_clk
= {
2399 .enable_reg
= 0x0488,
2400 .enable_mask
= BIT(0),
2401 .hw
.init
= &(struct clk_init_data
)
2403 .name
= "gcc_usb_hs_ahb_clk",
2404 .ops
= &clk_branch2_ops
,
2409 static struct clk_branch gcc_usb_hs_system_clk
= {
2412 .enable_reg
= 0x0484,
2413 .enable_mask
= BIT(0),
2414 .hw
.init
= &(struct clk_init_data
)
2416 .name
= "gcc_usb_hs_system_clk",
2417 .parent_names
= (const char *[]) {
2418 "usb_hs_system_clk_src",
2421 .flags
= CLK_SET_RATE_PARENT
,
2422 .ops
= &clk_branch2_ops
,
2427 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk
= {
2430 .enable_reg
= 0x1a84,
2431 .enable_mask
= BIT(0),
2432 .hw
.init
= &(struct clk_init_data
)
2434 .name
= "gcc_usb_phy_cfg_ahb2phy_clk",
2435 .ops
= &clk_branch2_ops
,
2440 static struct gdsc pcie_gdsc
= {
2445 .pwrsts
= PWRSTS_OFF_ON
,
2448 static struct gdsc pcie_0_gdsc
= {
2453 .pwrsts
= PWRSTS_OFF_ON
,
2456 static struct gdsc pcie_1_gdsc
= {
2461 .pwrsts
= PWRSTS_OFF_ON
,
2464 static struct gdsc usb30_gdsc
= {
2469 .pwrsts
= PWRSTS_OFF_ON
,
2472 static struct gdsc ufs_gdsc
= {
2477 .pwrsts
= PWRSTS_OFF_ON
,
2480 static struct clk_regmap
*gcc_msm8994_clocks
[] = {
2481 [GPLL0_EARLY
] = &gpll0_early
.clkr
,
2482 [GPLL0
] = &gpll0
.clkr
,
2483 [GPLL4_EARLY
] = &gpll4_early
.clkr
,
2484 [GPLL4
] = &gpll4
.clkr
,
2485 [UFS_AXI_CLK_SRC
] = &ufs_axi_clk_src
.clkr
,
2486 [USB30_MASTER_CLK_SRC
] = &usb30_master_clk_src
.clkr
,
2487 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
2488 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
2489 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
2490 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
2491 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
2492 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
2493 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
2494 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
2495 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
2496 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
2497 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
2498 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
2499 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
2500 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
2501 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
2502 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
2503 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
2504 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
2505 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
2506 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
2507 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
2508 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
2509 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
2510 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
2511 [BLSP2_QUP4_I2C_APPS_CLK_SRC
] = &blsp2_qup4_i2c_apps_clk_src
.clkr
,
2512 [BLSP2_QUP4_SPI_APPS_CLK_SRC
] = &blsp2_qup4_spi_apps_clk_src
.clkr
,
2513 [BLSP2_QUP5_I2C_APPS_CLK_SRC
] = &blsp2_qup5_i2c_apps_clk_src
.clkr
,
2514 [BLSP2_QUP5_SPI_APPS_CLK_SRC
] = &blsp2_qup5_spi_apps_clk_src
.clkr
,
2515 [BLSP2_QUP6_I2C_APPS_CLK_SRC
] = &blsp2_qup6_i2c_apps_clk_src
.clkr
,
2516 [BLSP2_QUP6_SPI_APPS_CLK_SRC
] = &blsp2_qup6_spi_apps_clk_src
.clkr
,
2517 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
2518 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
2519 [BLSP2_UART3_APPS_CLK_SRC
] = &blsp2_uart3_apps_clk_src
.clkr
,
2520 [BLSP2_UART4_APPS_CLK_SRC
] = &blsp2_uart4_apps_clk_src
.clkr
,
2521 [BLSP2_UART5_APPS_CLK_SRC
] = &blsp2_uart5_apps_clk_src
.clkr
,
2522 [BLSP2_UART6_APPS_CLK_SRC
] = &blsp2_uart6_apps_clk_src
.clkr
,
2523 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
2524 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
2525 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
2526 [PCIE_0_AUX_CLK_SRC
] = &pcie_0_aux_clk_src
.clkr
,
2527 [PCIE_0_PIPE_CLK_SRC
] = &pcie_0_pipe_clk_src
.clkr
,
2528 [PCIE_1_AUX_CLK_SRC
] = &pcie_1_aux_clk_src
.clkr
,
2529 [PCIE_1_PIPE_CLK_SRC
] = &pcie_1_pipe_clk_src
.clkr
,
2530 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
2531 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
2532 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
2533 [SDCC3_APPS_CLK_SRC
] = &sdcc3_apps_clk_src
.clkr
,
2534 [SDCC4_APPS_CLK_SRC
] = &sdcc4_apps_clk_src
.clkr
,
2535 [TSIF_REF_CLK_SRC
] = &tsif_ref_clk_src
.clkr
,
2536 [USB30_MOCK_UTMI_CLK_SRC
] = &usb30_mock_utmi_clk_src
.clkr
,
2537 [USB3_PHY_AUX_CLK_SRC
] = &usb3_phy_aux_clk_src
.clkr
,
2538 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
2539 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
2540 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
2541 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
2542 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
2543 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
2544 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
2545 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
2546 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
2547 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
2548 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
2549 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
2550 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
2551 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
2552 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
2553 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
2554 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
2555 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
2556 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
2557 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
2558 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
2559 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
2560 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
2561 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
2562 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
2563 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
2564 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
2565 [GCC_BLSP2_QUP4_I2C_APPS_CLK
] = &gcc_blsp2_qup4_i2c_apps_clk
.clkr
,
2566 [GCC_BLSP2_QUP4_SPI_APPS_CLK
] = &gcc_blsp2_qup4_spi_apps_clk
.clkr
,
2567 [GCC_BLSP2_QUP5_I2C_APPS_CLK
] = &gcc_blsp2_qup5_i2c_apps_clk
.clkr
,
2568 [GCC_BLSP2_QUP5_SPI_APPS_CLK
] = &gcc_blsp2_qup5_spi_apps_clk
.clkr
,
2569 [GCC_BLSP2_QUP6_I2C_APPS_CLK
] = &gcc_blsp2_qup6_i2c_apps_clk
.clkr
,
2570 [GCC_BLSP2_QUP6_SPI_APPS_CLK
] = &gcc_blsp2_qup6_spi_apps_clk
.clkr
,
2571 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
2572 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
2573 [GCC_BLSP2_UART3_APPS_CLK
] = &gcc_blsp2_uart3_apps_clk
.clkr
,
2574 [GCC_BLSP2_UART4_APPS_CLK
] = &gcc_blsp2_uart4_apps_clk
.clkr
,
2575 [GCC_BLSP2_UART5_APPS_CLK
] = &gcc_blsp2_uart5_apps_clk
.clkr
,
2576 [GCC_BLSP2_UART6_APPS_CLK
] = &gcc_blsp2_uart6_apps_clk
.clkr
,
2577 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2578 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2579 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2580 [GCC_LPASS_Q6_AXI_CLK
] = &gcc_lpass_q6_axi_clk
.clkr
,
2581 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
2582 [GCC_PCIE_0_AUX_CLK
] = &gcc_pcie_0_aux_clk
.clkr
,
2583 [GCC_PCIE_0_CFG_AHB_CLK
] = &gcc_pcie_0_cfg_ahb_clk
.clkr
,
2584 [GCC_PCIE_0_MSTR_AXI_CLK
] = &gcc_pcie_0_mstr_axi_clk
.clkr
,
2585 [GCC_PCIE_0_PIPE_CLK
] = &gcc_pcie_0_pipe_clk
.clkr
,
2586 [GCC_PCIE_0_SLV_AXI_CLK
] = &gcc_pcie_0_slv_axi_clk
.clkr
,
2587 [GCC_PCIE_1_AUX_CLK
] = &gcc_pcie_1_aux_clk
.clkr
,
2588 [GCC_PCIE_1_CFG_AHB_CLK
] = &gcc_pcie_1_cfg_ahb_clk
.clkr
,
2589 [GCC_PCIE_1_MSTR_AXI_CLK
] = &gcc_pcie_1_mstr_axi_clk
.clkr
,
2590 [GCC_PCIE_1_PIPE_CLK
] = &gcc_pcie_1_pipe_clk
.clkr
,
2591 [GCC_PCIE_1_SLV_AXI_CLK
] = &gcc_pcie_1_slv_axi_clk
.clkr
,
2592 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2593 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
2594 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2595 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2596 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
2597 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2598 [GCC_SDCC3_AHB_CLK
] = &gcc_sdcc3_ahb_clk
.clkr
,
2599 [GCC_SDCC3_APPS_CLK
] = &gcc_sdcc3_apps_clk
.clkr
,
2600 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
2601 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
2602 [GCC_SYS_NOC_UFS_AXI_CLK
] = &gcc_sys_noc_ufs_axi_clk
.clkr
,
2603 [GCC_SYS_NOC_USB3_AXI_CLK
] = &gcc_sys_noc_usb3_axi_clk
.clkr
,
2604 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
2605 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
2606 [GCC_UFS_AHB_CLK
] = &gcc_ufs_ahb_clk
.clkr
,
2607 [GCC_UFS_AXI_CLK
] = &gcc_ufs_axi_clk
.clkr
,
2608 [GCC_UFS_RX_CFG_CLK
] = &gcc_ufs_rx_cfg_clk
.clkr
,
2609 [GCC_UFS_RX_SYMBOL_0_CLK
] = &gcc_ufs_rx_symbol_0_clk
.clkr
,
2610 [GCC_UFS_RX_SYMBOL_1_CLK
] = &gcc_ufs_rx_symbol_1_clk
.clkr
,
2611 [GCC_UFS_TX_CFG_CLK
] = &gcc_ufs_tx_cfg_clk
.clkr
,
2612 [GCC_UFS_TX_SYMBOL_0_CLK
] = &gcc_ufs_tx_symbol_0_clk
.clkr
,
2613 [GCC_UFS_TX_SYMBOL_1_CLK
] = &gcc_ufs_tx_symbol_1_clk
.clkr
,
2614 [GCC_USB2_HS_PHY_SLEEP_CLK
] = &gcc_usb2_hs_phy_sleep_clk
.clkr
,
2615 [GCC_USB30_MASTER_CLK
] = &gcc_usb30_master_clk
.clkr
,
2616 [GCC_USB30_MOCK_UTMI_CLK
] = &gcc_usb30_mock_utmi_clk
.clkr
,
2617 [GCC_USB30_SLEEP_CLK
] = &gcc_usb30_sleep_clk
.clkr
,
2618 [GCC_USB3_PHY_AUX_CLK
] = &gcc_usb3_phy_aux_clk
.clkr
,
2619 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
2620 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
2621 [GCC_USB_PHY_CFG_AHB2PHY_CLK
] = &gcc_usb_phy_cfg_ahb2phy_clk
.clkr
,
2624 static struct gdsc
*gcc_msm8994_gdscs
[] = {
2625 [PCIE_GDSC
] = &pcie_gdsc
,
2626 [PCIE_0_GDSC
] = &pcie_0_gdsc
,
2627 [PCIE_1_GDSC
] = &pcie_1_gdsc
,
2628 [USB30_GDSC
] = &usb30_gdsc
,
2629 [UFS_GDSC
] = &ufs_gdsc
,
2632 static const struct qcom_reset_map gcc_msm8994_resets
[] = {
2633 [USB3_PHY_RESET
] = { 0x1400 },
2634 [USB3PHY_PHY_RESET
] = { 0x1404 },
2635 [PCIE_PHY_0_RESET
] = { 0x1b18 },
2636 [PCIE_PHY_1_RESET
] = { 0x1b98 },
2637 [QUSB2_PHY_RESET
] = { 0x04b8 },
2640 static const struct regmap_config gcc_msm8994_regmap_config
= {
2644 .max_register
= 0x2000,
2648 static const struct qcom_cc_desc gcc_msm8994_desc
= {
2649 .config
= &gcc_msm8994_regmap_config
,
2650 .clks
= gcc_msm8994_clocks
,
2651 .num_clks
= ARRAY_SIZE(gcc_msm8994_clocks
),
2652 .resets
= gcc_msm8994_resets
,
2653 .num_resets
= ARRAY_SIZE(gcc_msm8994_resets
),
2654 .gdscs
= gcc_msm8994_gdscs
,
2655 .num_gdscs
= ARRAY_SIZE(gcc_msm8994_gdscs
),
2658 static const struct of_device_id gcc_msm8994_match_table
[] = {
2659 { .compatible
= "qcom,gcc-msm8994" },
2662 MODULE_DEVICE_TABLE(of
, gcc_msm8994_match_table
);
2664 static int gcc_msm8994_probe(struct platform_device
*pdev
)
2666 struct device
*dev
= &pdev
->dev
;
2669 clk
= devm_clk_register(dev
, &xo
.hw
);
2671 return PTR_ERR(clk
);
2673 return qcom_cc_probe(pdev
, &gcc_msm8994_desc
);
2676 static struct platform_driver gcc_msm8994_driver
= {
2677 .probe
= gcc_msm8994_probe
,
2679 .name
= "gcc-msm8994",
2680 .of_match_table
= gcc_msm8994_match_table
,
2684 static int __init
gcc_msm8994_init(void)
2686 return platform_driver_register(&gcc_msm8994_driver
);
2688 core_initcall(gcc_msm8994_init
);
2690 static void __exit
gcc_msm8994_exit(void)
2692 platform_driver_unregister(&gcc_msm8994_driver
);
2694 module_exit(gcc_msm8994_exit
);
2696 MODULE_DESCRIPTION("Qualcomm GCC MSM8994 Driver");
2697 MODULE_LICENSE("GPL v2");
2698 MODULE_ALIAS("platform:gcc-msm8994");