1 /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/err.h>
16 #include <linux/ctype.h>
19 #include <linux/platform_device.h>
20 #include <linux/module.h>
21 #include <linux/regmap.h>
23 #include <dt-bindings/clock/qcom,gcc-msm8994.h>
26 #include "clk-regmap.h"
27 #include "clk-alpha-pll.h"
29 #include "clk-branch.h"
38 static const struct parent_map gcc_xo_gpll0_map
[] = {
43 static const char * const gcc_xo_gpll0
[] = {
48 static const struct parent_map gcc_xo_gpll0_gpll4_map
[] = {
54 static const char * const gcc_xo_gpll0_gpll4
[] = {
60 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
62 static struct clk_fixed_factor xo
= {
65 .hw
.init
= &(struct clk_init_data
)
68 .parent_names
= (const char *[]) { "xo_board" },
70 .ops
= &clk_fixed_factor_ops
,
74 static struct clk_alpha_pll gpll0_early
= {
76 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
79 .enable_mask
= BIT(0),
80 .hw
.init
= &(struct clk_init_data
)
82 .name
= "gpll0_early",
83 .parent_names
= (const char *[]) { "xo" },
85 .ops
= &clk_alpha_pll_ops
,
90 static struct clk_alpha_pll_postdiv gpll0
= {
92 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
93 .clkr
.hw
.init
= &(struct clk_init_data
)
96 .parent_names
= (const char *[]) { "gpll0_early" },
98 .ops
= &clk_alpha_pll_postdiv_ops
,
102 static struct clk_alpha_pll gpll4_early
= {
104 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
106 .enable_reg
= 0x1480,
107 .enable_mask
= BIT(4),
108 .hw
.init
= &(struct clk_init_data
)
110 .name
= "gpll4_early",
111 .parent_names
= (const char *[]) { "xo" },
113 .ops
= &clk_alpha_pll_ops
,
118 static struct clk_alpha_pll_postdiv gpll4
= {
120 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
121 .clkr
.hw
.init
= &(struct clk_init_data
)
124 .parent_names
= (const char *[]) { "gpll4_early" },
126 .ops
= &clk_alpha_pll_postdiv_ops
,
130 static struct freq_tbl ftbl_ufs_axi_clk_src
[] = {
131 F(50000000, P_GPLL0
, 12, 0, 0),
132 F(100000000, P_GPLL0
, 6, 0, 0),
133 F(150000000, P_GPLL0
, 4, 0, 0),
134 F(171430000, P_GPLL0
, 3.5, 0, 0),
135 F(200000000, P_GPLL0
, 3, 0, 0),
136 F(240000000, P_GPLL0
, 2.5, 0, 0),
140 static struct clk_rcg2 ufs_axi_clk_src
= {
144 .parent_map
= gcc_xo_gpll0_map
,
145 .freq_tbl
= ftbl_ufs_axi_clk_src
,
146 .clkr
.hw
.init
= &(struct clk_init_data
)
148 .name
= "ufs_axi_clk_src",
149 .parent_names
= gcc_xo_gpll0
,
151 .ops
= &clk_rcg2_ops
,
155 static struct freq_tbl ftbl_usb30_master_clk_src
[] = {
156 F(19200000, P_XO
, 1, 0, 0),
157 F(125000000, P_GPLL0
, 1, 5, 24),
161 static struct clk_rcg2 usb30_master_clk_src
= {
165 .parent_map
= gcc_xo_gpll0_map
,
166 .freq_tbl
= ftbl_usb30_master_clk_src
,
167 .clkr
.hw
.init
= &(struct clk_init_data
)
169 .name
= "usb30_master_clk_src",
170 .parent_names
= gcc_xo_gpll0
,
172 .ops
= &clk_rcg2_ops
,
176 static struct freq_tbl ftbl_blsp_i2c_apps_clk_src
[] = {
177 F(19200000, P_XO
, 1, 0, 0),
178 F(50000000, P_GPLL0
, 12, 0, 0),
182 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
185 .parent_map
= gcc_xo_gpll0_map
,
186 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
187 .clkr
.hw
.init
= &(struct clk_init_data
)
189 .name
= "blsp1_qup1_i2c_apps_clk_src",
190 .parent_names
= gcc_xo_gpll0
,
192 .ops
= &clk_rcg2_ops
,
196 static struct freq_tbl ftbl_blspqup_spi_apps_clk_src
[] = {
197 F(960000, P_XO
, 10, 1, 2),
198 F(4800000, P_XO
, 4, 0, 0),
199 F(9600000, P_XO
, 2, 0, 0),
200 F(15000000, P_GPLL0
, 10, 1, 4),
201 F(19200000, P_XO
, 1, 0, 0),
202 F(24000000, P_GPLL0
, 12.5, 1, 2),
203 F(25000000, P_GPLL0
, 12, 1, 2),
204 F(48000000, P_GPLL0
, 12.5, 0, 0),
205 F(50000000, P_GPLL0
, 12, 0, 0),
209 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
213 .parent_map
= gcc_xo_gpll0_map
,
214 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
215 .clkr
.hw
.init
= &(struct clk_init_data
)
217 .name
= "blsp1_qup1_spi_apps_clk_src",
218 .parent_names
= gcc_xo_gpll0
,
220 .ops
= &clk_rcg2_ops
,
224 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
227 .parent_map
= gcc_xo_gpll0_map
,
228 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
229 .clkr
.hw
.init
= &(struct clk_init_data
)
231 .name
= "blsp1_qup2_i2c_apps_clk_src",
232 .parent_names
= gcc_xo_gpll0
,
234 .ops
= &clk_rcg2_ops
,
238 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
242 .parent_map
= gcc_xo_gpll0_map
,
243 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
244 .clkr
.hw
.init
= &(struct clk_init_data
)
246 .name
= "blsp1_qup2_spi_apps_clk_src",
247 .parent_names
= gcc_xo_gpll0
,
249 .ops
= &clk_rcg2_ops
,
253 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
256 .parent_map
= gcc_xo_gpll0_map
,
257 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
258 .clkr
.hw
.init
= &(struct clk_init_data
)
260 .name
= "blsp1_qup3_i2c_apps_clk_src",
261 .parent_names
= gcc_xo_gpll0
,
263 .ops
= &clk_rcg2_ops
,
267 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
271 .parent_map
= gcc_xo_gpll0_map
,
272 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
273 .clkr
.hw
.init
= &(struct clk_init_data
)
275 .name
= "blsp1_qup3_spi_apps_clk_src",
276 .parent_names
= gcc_xo_gpll0
,
278 .ops
= &clk_rcg2_ops
,
282 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
285 .parent_map
= gcc_xo_gpll0_map
,
286 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
287 .clkr
.hw
.init
= &(struct clk_init_data
)
289 .name
= "blsp1_qup4_i2c_apps_clk_src",
290 .parent_names
= gcc_xo_gpll0
,
292 .ops
= &clk_rcg2_ops
,
296 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
300 .parent_map
= gcc_xo_gpll0_map
,
301 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
302 .clkr
.hw
.init
= &(struct clk_init_data
)
304 .name
= "blsp1_qup4_spi_apps_clk_src",
305 .parent_names
= gcc_xo_gpll0
,
307 .ops
= &clk_rcg2_ops
,
311 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
314 .parent_map
= gcc_xo_gpll0_map
,
315 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
316 .clkr
.hw
.init
= &(struct clk_init_data
)
318 .name
= "blsp1_qup5_i2c_apps_clk_src",
319 .parent_names
= gcc_xo_gpll0
,
321 .ops
= &clk_rcg2_ops
,
325 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
329 .parent_map
= gcc_xo_gpll0_map
,
330 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
331 .clkr
.hw
.init
= &(struct clk_init_data
)
333 .name
= "blsp1_qup5_spi_apps_clk_src",
334 .parent_names
= gcc_xo_gpll0
,
336 .ops
= &clk_rcg2_ops
,
340 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
343 .parent_map
= gcc_xo_gpll0_map
,
344 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
345 .clkr
.hw
.init
= &(struct clk_init_data
)
347 .name
= "blsp1_qup6_i2c_apps_clk_src",
348 .parent_names
= gcc_xo_gpll0
,
350 .ops
= &clk_rcg2_ops
,
354 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
358 .parent_map
= gcc_xo_gpll0_map
,
359 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
360 .clkr
.hw
.init
= &(struct clk_init_data
)
362 .name
= "blsp1_qup6_spi_apps_clk_src",
363 .parent_names
= gcc_xo_gpll0
,
365 .ops
= &clk_rcg2_ops
,
369 static struct freq_tbl ftbl_blsp_uart_apps_clk_src
[] = {
370 F(3686400, P_GPLL0
, 1, 96, 15625),
371 F(7372800, P_GPLL0
, 1, 192, 15625),
372 F(14745600, P_GPLL0
, 1, 384, 15625),
373 F(16000000, P_GPLL0
, 5, 2, 15),
374 F(19200000, P_XO
, 1, 0, 0),
375 F(24000000, P_GPLL0
, 5, 1, 5),
376 F(32000000, P_GPLL0
, 1, 4, 75),
377 F(40000000, P_GPLL0
, 15, 0, 0),
378 F(46400000, P_GPLL0
, 1, 29, 375),
379 F(48000000, P_GPLL0
, 12.5, 0, 0),
380 F(51200000, P_GPLL0
, 1, 32, 375),
381 F(56000000, P_GPLL0
, 1, 7, 75),
382 F(58982400, P_GPLL0
, 1, 1536, 15625),
383 F(60000000, P_GPLL0
, 10, 0, 0),
384 F(63160000, P_GPLL0
, 9.5, 0, 0),
388 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
392 .parent_map
= gcc_xo_gpll0_map
,
393 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
394 .clkr
.hw
.init
= &(struct clk_init_data
)
396 .name
= "blsp1_uart1_apps_clk_src",
397 .parent_names
= gcc_xo_gpll0
,
399 .ops
= &clk_rcg2_ops
,
403 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
407 .parent_map
= gcc_xo_gpll0_map
,
408 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
409 .clkr
.hw
.init
= &(struct clk_init_data
)
411 .name
= "blsp1_uart2_apps_clk_src",
412 .parent_names
= gcc_xo_gpll0
,
414 .ops
= &clk_rcg2_ops
,
418 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
422 .parent_map
= gcc_xo_gpll0_map
,
423 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
424 .clkr
.hw
.init
= &(struct clk_init_data
)
426 .name
= "blsp1_uart3_apps_clk_src",
427 .parent_names
= gcc_xo_gpll0
,
429 .ops
= &clk_rcg2_ops
,
433 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
437 .parent_map
= gcc_xo_gpll0_map
,
438 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
439 .clkr
.hw
.init
= &(struct clk_init_data
)
441 .name
= "blsp1_uart4_apps_clk_src",
442 .parent_names
= gcc_xo_gpll0
,
444 .ops
= &clk_rcg2_ops
,
448 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
452 .parent_map
= gcc_xo_gpll0_map
,
453 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
454 .clkr
.hw
.init
= &(struct clk_init_data
)
456 .name
= "blsp1_uart5_apps_clk_src",
457 .parent_names
= gcc_xo_gpll0
,
459 .ops
= &clk_rcg2_ops
,
463 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
467 .parent_map
= gcc_xo_gpll0_map
,
468 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
469 .clkr
.hw
.init
= &(struct clk_init_data
)
471 .name
= "blsp1_uart6_apps_clk_src",
472 .parent_names
= gcc_xo_gpll0
,
474 .ops
= &clk_rcg2_ops
,
478 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
481 .parent_map
= gcc_xo_gpll0_map
,
482 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
483 .clkr
.hw
.init
= &(struct clk_init_data
)
485 .name
= "blsp2_qup1_i2c_apps_clk_src",
486 .parent_names
= gcc_xo_gpll0
,
488 .ops
= &clk_rcg2_ops
,
492 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
496 .parent_map
= gcc_xo_gpll0_map
,
497 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
498 .clkr
.hw
.init
= &(struct clk_init_data
)
500 .name
= "blsp2_qup1_spi_apps_clk_src",
501 .parent_names
= gcc_xo_gpll0
,
503 .ops
= &clk_rcg2_ops
,
507 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
510 .parent_map
= gcc_xo_gpll0_map
,
511 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
512 .clkr
.hw
.init
= &(struct clk_init_data
)
514 .name
= "blsp2_qup2_i2c_apps_clk_src",
515 .parent_names
= gcc_xo_gpll0
,
517 .ops
= &clk_rcg2_ops
,
521 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
525 .parent_map
= gcc_xo_gpll0_map
,
526 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
527 .clkr
.hw
.init
= &(struct clk_init_data
)
529 .name
= "blsp2_qup2_spi_apps_clk_src",
530 .parent_names
= gcc_xo_gpll0
,
532 .ops
= &clk_rcg2_ops
,
536 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
539 .parent_map
= gcc_xo_gpll0_map
,
540 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
541 .clkr
.hw
.init
= &(struct clk_init_data
)
543 .name
= "blsp2_qup3_i2c_apps_clk_src",
544 .parent_names
= gcc_xo_gpll0
,
546 .ops
= &clk_rcg2_ops
,
550 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
554 .parent_map
= gcc_xo_gpll0_map
,
555 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
556 .clkr
.hw
.init
= &(struct clk_init_data
)
558 .name
= "blsp2_qup3_spi_apps_clk_src",
559 .parent_names
= gcc_xo_gpll0
,
561 .ops
= &clk_rcg2_ops
,
565 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src
= {
568 .parent_map
= gcc_xo_gpll0_map
,
569 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
570 .clkr
.hw
.init
= &(struct clk_init_data
)
572 .name
= "blsp2_qup4_i2c_apps_clk_src",
573 .parent_names
= gcc_xo_gpll0
,
575 .ops
= &clk_rcg2_ops
,
579 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src
= {
583 .parent_map
= gcc_xo_gpll0_map
,
584 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
585 .clkr
.hw
.init
= &(struct clk_init_data
)
587 .name
= "blsp2_qup4_spi_apps_clk_src",
588 .parent_names
= gcc_xo_gpll0
,
590 .ops
= &clk_rcg2_ops
,
594 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src
= {
597 .parent_map
= gcc_xo_gpll0_map
,
598 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
599 .clkr
.hw
.init
= &(struct clk_init_data
)
601 .name
= "blsp2_qup5_i2c_apps_clk_src",
602 .parent_names
= gcc_xo_gpll0
,
604 .ops
= &clk_rcg2_ops
,
608 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src
= {
612 .parent_map
= gcc_xo_gpll0_map
,
613 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
614 .clkr
.hw
.init
= &(struct clk_init_data
)
616 .name
= "blsp2_qup5_spi_apps_clk_src",
617 .parent_names
= gcc_xo_gpll0
,
619 .ops
= &clk_rcg2_ops
,
623 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src
= {
626 .parent_map
= gcc_xo_gpll0_map
,
627 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
628 .clkr
.hw
.init
= &(struct clk_init_data
)
630 .name
= "blsp2_qup6_i2c_apps_clk_src",
631 .parent_names
= gcc_xo_gpll0
,
633 .ops
= &clk_rcg2_ops
,
637 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src
= {
641 .parent_map
= gcc_xo_gpll0_map
,
642 .freq_tbl
= ftbl_blspqup_spi_apps_clk_src
,
643 .clkr
.hw
.init
= &(struct clk_init_data
)
645 .name
= "blsp2_qup6_spi_apps_clk_src",
646 .parent_names
= gcc_xo_gpll0
,
648 .ops
= &clk_rcg2_ops
,
652 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
656 .parent_map
= gcc_xo_gpll0_map
,
657 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
658 .clkr
.hw
.init
= &(struct clk_init_data
)
660 .name
= "blsp2_uart1_apps_clk_src",
661 .parent_names
= gcc_xo_gpll0
,
663 .ops
= &clk_rcg2_ops
,
667 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
671 .parent_map
= gcc_xo_gpll0_map
,
672 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
673 .clkr
.hw
.init
= &(struct clk_init_data
)
675 .name
= "blsp2_uart2_apps_clk_src",
676 .parent_names
= gcc_xo_gpll0
,
678 .ops
= &clk_rcg2_ops
,
682 static struct clk_rcg2 blsp2_uart3_apps_clk_src
= {
686 .parent_map
= gcc_xo_gpll0_map
,
687 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
688 .clkr
.hw
.init
= &(struct clk_init_data
)
690 .name
= "blsp2_uart3_apps_clk_src",
691 .parent_names
= gcc_xo_gpll0
,
693 .ops
= &clk_rcg2_ops
,
697 static struct clk_rcg2 blsp2_uart4_apps_clk_src
= {
701 .parent_map
= gcc_xo_gpll0_map
,
702 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
703 .clkr
.hw
.init
= &(struct clk_init_data
)
705 .name
= "blsp2_uart4_apps_clk_src",
706 .parent_names
= gcc_xo_gpll0
,
708 .ops
= &clk_rcg2_ops
,
712 static struct clk_rcg2 blsp2_uart5_apps_clk_src
= {
716 .parent_map
= gcc_xo_gpll0_map
,
717 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
718 .clkr
.hw
.init
= &(struct clk_init_data
)
720 .name
= "blsp2_uart5_apps_clk_src",
721 .parent_names
= gcc_xo_gpll0
,
723 .ops
= &clk_rcg2_ops
,
727 static struct clk_rcg2 blsp2_uart6_apps_clk_src
= {
731 .parent_map
= gcc_xo_gpll0_map
,
732 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
733 .clkr
.hw
.init
= &(struct clk_init_data
)
735 .name
= "blsp2_uart6_apps_clk_src",
736 .parent_names
= gcc_xo_gpll0
,
738 .ops
= &clk_rcg2_ops
,
742 static struct freq_tbl ftbl_gp1_clk_src
[] = {
743 F(19200000, P_XO
, 1, 0, 0),
744 F(100000000, P_GPLL0
, 6, 0, 0),
745 F(200000000, P_GPLL0
, 3, 0, 0),
749 static struct clk_rcg2 gp1_clk_src
= {
753 .parent_map
= gcc_xo_gpll0_map
,
754 .freq_tbl
= ftbl_gp1_clk_src
,
755 .clkr
.hw
.init
= &(struct clk_init_data
)
757 .name
= "gp1_clk_src",
758 .parent_names
= gcc_xo_gpll0
,
760 .ops
= &clk_rcg2_ops
,
764 static struct freq_tbl ftbl_gp2_clk_src
[] = {
765 F(19200000, P_XO
, 1, 0, 0),
766 F(100000000, P_GPLL0
, 6, 0, 0),
767 F(200000000, P_GPLL0
, 3, 0, 0),
771 static struct clk_rcg2 gp2_clk_src
= {
775 .parent_map
= gcc_xo_gpll0_map
,
776 .freq_tbl
= ftbl_gp2_clk_src
,
777 .clkr
.hw
.init
= &(struct clk_init_data
)
779 .name
= "gp2_clk_src",
780 .parent_names
= gcc_xo_gpll0
,
782 .ops
= &clk_rcg2_ops
,
786 static struct freq_tbl ftbl_gp3_clk_src
[] = {
787 F(19200000, P_XO
, 1, 0, 0),
788 F(100000000, P_GPLL0
, 6, 0, 0),
789 F(200000000, P_GPLL0
, 3, 0, 0),
793 static struct clk_rcg2 gp3_clk_src
= {
797 .parent_map
= gcc_xo_gpll0_map
,
798 .freq_tbl
= ftbl_gp3_clk_src
,
799 .clkr
.hw
.init
= &(struct clk_init_data
)
801 .name
= "gp3_clk_src",
802 .parent_names
= gcc_xo_gpll0
,
804 .ops
= &clk_rcg2_ops
,
808 static struct freq_tbl ftbl_pcie_0_aux_clk_src
[] = {
809 F(1011000, P_XO
, 1, 1, 19),
813 static struct clk_rcg2 pcie_0_aux_clk_src
= {
817 .freq_tbl
= ftbl_pcie_0_aux_clk_src
,
818 .clkr
.hw
.init
= &(struct clk_init_data
)
820 .name
= "pcie_0_aux_clk_src",
821 .parent_names
= (const char *[]) { "xo" },
823 .ops
= &clk_rcg2_ops
,
827 static struct freq_tbl ftbl_pcie_pipe_clk_src
[] = {
828 F(125000000, P_XO
, 1, 0, 0),
832 static struct clk_rcg2 pcie_0_pipe_clk_src
= {
835 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
836 .clkr
.hw
.init
= &(struct clk_init_data
)
838 .name
= "pcie_0_pipe_clk_src",
839 .parent_names
= (const char *[]) { "xo" },
841 .ops
= &clk_rcg2_ops
,
845 static struct freq_tbl ftbl_pcie_1_aux_clk_src
[] = {
846 F(1011000, P_XO
, 1, 1, 19),
850 static struct clk_rcg2 pcie_1_aux_clk_src
= {
854 .freq_tbl
= ftbl_pcie_1_aux_clk_src
,
855 .clkr
.hw
.init
= &(struct clk_init_data
)
857 .name
= "pcie_1_aux_clk_src",
858 .parent_names
= (const char *[]) { "xo" },
860 .ops
= &clk_rcg2_ops
,
864 static struct clk_rcg2 pcie_1_pipe_clk_src
= {
867 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
868 .clkr
.hw
.init
= &(struct clk_init_data
)
870 .name
= "pcie_1_pipe_clk_src",
871 .parent_names
= (const char *[]) { "xo" },
873 .ops
= &clk_rcg2_ops
,
877 static struct freq_tbl ftbl_pdm2_clk_src
[] = {
878 F(60000000, P_GPLL0
, 10, 0, 0),
882 static struct clk_rcg2 pdm2_clk_src
= {
885 .parent_map
= gcc_xo_gpll0_map
,
886 .freq_tbl
= ftbl_pdm2_clk_src
,
887 .clkr
.hw
.init
= &(struct clk_init_data
)
889 .name
= "pdm2_clk_src",
890 .parent_names
= gcc_xo_gpll0
,
892 .ops
= &clk_rcg2_ops
,
896 static struct freq_tbl ftbl_sdcc1_apps_clk_src
[] = {
897 F(144000, P_XO
, 16, 3, 25),
898 F(400000, P_XO
, 12, 1, 4),
899 F(20000000, P_GPLL0
, 15, 1, 2),
900 F(25000000, P_GPLL0
, 12, 1, 2),
901 F(50000000, P_GPLL0
, 12, 0, 0),
902 F(100000000, P_GPLL0
, 6, 0, 0),
903 F(192000000, P_GPLL4
, 2, 0, 0),
904 F(384000000, P_GPLL4
, 1, 0, 0),
908 static struct clk_rcg2 sdcc1_apps_clk_src
= {
912 .parent_map
= gcc_xo_gpll0_gpll4_map
,
913 .freq_tbl
= ftbl_sdcc1_apps_clk_src
,
914 .clkr
.hw
.init
= &(struct clk_init_data
)
916 .name
= "sdcc1_apps_clk_src",
917 .parent_names
= gcc_xo_gpll0_gpll4
,
919 .ops
= &clk_rcg2_floor_ops
,
923 static struct freq_tbl ftbl_sdcc2_4_apps_clk_src
[] = {
924 F(144000, P_XO
, 16, 3, 25),
925 F(400000, P_XO
, 12, 1, 4),
926 F(20000000, P_GPLL0
, 15, 1, 2),
927 F(25000000, P_GPLL0
, 12, 1, 2),
928 F(50000000, P_GPLL0
, 12, 0, 0),
929 F(100000000, P_GPLL0
, 6, 0, 0),
930 F(200000000, P_GPLL0
, 3, 0, 0),
934 static struct clk_rcg2 sdcc2_apps_clk_src
= {
938 .parent_map
= gcc_xo_gpll0_map
,
939 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
940 .clkr
.hw
.init
= &(struct clk_init_data
)
942 .name
= "sdcc2_apps_clk_src",
943 .parent_names
= gcc_xo_gpll0
,
945 .ops
= &clk_rcg2_floor_ops
,
949 static struct clk_rcg2 sdcc3_apps_clk_src
= {
953 .parent_map
= gcc_xo_gpll0_map
,
954 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
955 .clkr
.hw
.init
= &(struct clk_init_data
)
957 .name
= "sdcc3_apps_clk_src",
958 .parent_names
= gcc_xo_gpll0
,
960 .ops
= &clk_rcg2_floor_ops
,
964 static struct clk_rcg2 sdcc4_apps_clk_src
= {
968 .parent_map
= gcc_xo_gpll0_map
,
969 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
970 .clkr
.hw
.init
= &(struct clk_init_data
)
972 .name
= "sdcc4_apps_clk_src",
973 .parent_names
= gcc_xo_gpll0
,
975 .ops
= &clk_rcg2_floor_ops
,
979 static struct freq_tbl ftbl_tsif_ref_clk_src
[] = {
980 F(105500, P_XO
, 1, 1, 182),
984 static struct clk_rcg2 tsif_ref_clk_src
= {
988 .freq_tbl
= ftbl_tsif_ref_clk_src
,
989 .clkr
.hw
.init
= &(struct clk_init_data
)
991 .name
= "tsif_ref_clk_src",
992 .parent_names
= (const char *[]) { "xo" },
994 .ops
= &clk_rcg2_ops
,
998 static struct freq_tbl ftbl_usb30_mock_utmi_clk_src
[] = {
999 F(19200000, P_XO
, 1, 0, 0),
1000 F(60000000, P_GPLL0
, 10, 0, 0),
1004 static struct clk_rcg2 usb30_mock_utmi_clk_src
= {
1007 .parent_map
= gcc_xo_gpll0_map
,
1008 .freq_tbl
= ftbl_usb30_mock_utmi_clk_src
,
1009 .clkr
.hw
.init
= &(struct clk_init_data
)
1011 .name
= "usb30_mock_utmi_clk_src",
1012 .parent_names
= gcc_xo_gpll0
,
1014 .ops
= &clk_rcg2_ops
,
1018 static struct freq_tbl ftbl_usb3_phy_aux_clk_src
[] = {
1019 F(1200000, P_XO
, 16, 0, 0),
1023 static struct clk_rcg2 usb3_phy_aux_clk_src
= {
1026 .freq_tbl
= ftbl_usb3_phy_aux_clk_src
,
1027 .clkr
.hw
.init
= &(struct clk_init_data
)
1029 .name
= "usb3_phy_aux_clk_src",
1030 .parent_names
= (const char *[]) { "xo" },
1032 .ops
= &clk_rcg2_ops
,
1036 static struct freq_tbl ftbl_usb_hs_system_clk_src
[] = {
1037 F(75000000, P_GPLL0
, 8, 0, 0),
1041 static struct clk_rcg2 usb_hs_system_clk_src
= {
1044 .parent_map
= gcc_xo_gpll0_map
,
1045 .freq_tbl
= ftbl_usb_hs_system_clk_src
,
1046 .clkr
.hw
.init
= &(struct clk_init_data
)
1048 .name
= "usb_hs_system_clk_src",
1049 .parent_names
= gcc_xo_gpll0
,
1051 .ops
= &clk_rcg2_ops
,
1055 static struct clk_branch gcc_blsp1_ahb_clk
= {
1057 .halt_check
= BRANCH_HALT_VOTED
,
1059 .enable_reg
= 0x1484,
1060 .enable_mask
= BIT(17),
1061 .hw
.init
= &(struct clk_init_data
)
1063 .name
= "gcc_blsp1_ahb_clk",
1064 .ops
= &clk_branch2_ops
,
1069 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1072 .enable_reg
= 0x0648,
1073 .enable_mask
= BIT(0),
1074 .hw
.init
= &(struct clk_init_data
)
1076 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1077 .parent_names
= (const char *[]) {
1078 "blsp1_qup1_i2c_apps_clk_src",
1081 .flags
= CLK_SET_RATE_PARENT
,
1082 .ops
= &clk_branch2_ops
,
1087 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1090 .enable_reg
= 0x0644,
1091 .enable_mask
= BIT(0),
1092 .hw
.init
= &(struct clk_init_data
)
1094 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1095 .parent_names
= (const char *[]) {
1096 "blsp1_qup1_spi_apps_clk_src",
1099 .flags
= CLK_SET_RATE_PARENT
,
1100 .ops
= &clk_branch2_ops
,
1105 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1108 .enable_reg
= 0x06c8,
1109 .enable_mask
= BIT(0),
1110 .hw
.init
= &(struct clk_init_data
)
1112 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1113 .parent_names
= (const char *[]) {
1114 "blsp1_qup2_i2c_apps_clk_src",
1117 .flags
= CLK_SET_RATE_PARENT
,
1118 .ops
= &clk_branch2_ops
,
1123 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1126 .enable_reg
= 0x06c4,
1127 .enable_mask
= BIT(0),
1128 .hw
.init
= &(struct clk_init_data
)
1130 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1131 .parent_names
= (const char *[]) {
1132 "blsp1_qup2_spi_apps_clk_src",
1135 .flags
= CLK_SET_RATE_PARENT
,
1136 .ops
= &clk_branch2_ops
,
1141 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1144 .enable_reg
= 0x0748,
1145 .enable_mask
= BIT(0),
1146 .hw
.init
= &(struct clk_init_data
)
1148 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1149 .parent_names
= (const char *[]) {
1150 "blsp1_qup3_i2c_apps_clk_src",
1153 .flags
= CLK_SET_RATE_PARENT
,
1154 .ops
= &clk_branch2_ops
,
1159 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1162 .enable_reg
= 0x0744,
1163 .enable_mask
= BIT(0),
1164 .hw
.init
= &(struct clk_init_data
)
1166 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1167 .parent_names
= (const char *[]) {
1168 "blsp1_qup3_spi_apps_clk_src",
1171 .flags
= CLK_SET_RATE_PARENT
,
1172 .ops
= &clk_branch2_ops
,
1177 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1180 .enable_reg
= 0x07c8,
1181 .enable_mask
= BIT(0),
1182 .hw
.init
= &(struct clk_init_data
)
1184 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1185 .parent_names
= (const char *[]) {
1186 "blsp1_qup4_i2c_apps_clk_src",
1189 .flags
= CLK_SET_RATE_PARENT
,
1190 .ops
= &clk_branch2_ops
,
1195 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1198 .enable_reg
= 0x07c4,
1199 .enable_mask
= BIT(0),
1200 .hw
.init
= &(struct clk_init_data
)
1202 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1203 .parent_names
= (const char *[]) {
1204 "blsp1_qup4_spi_apps_clk_src",
1207 .flags
= CLK_SET_RATE_PARENT
,
1208 .ops
= &clk_branch2_ops
,
1213 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
1216 .enable_reg
= 0x0848,
1217 .enable_mask
= BIT(0),
1218 .hw
.init
= &(struct clk_init_data
)
1220 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
1221 .parent_names
= (const char *[]) {
1222 "blsp1_qup5_i2c_apps_clk_src",
1225 .flags
= CLK_SET_RATE_PARENT
,
1226 .ops
= &clk_branch2_ops
,
1231 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
1234 .enable_reg
= 0x0844,
1235 .enable_mask
= BIT(0),
1236 .hw
.init
= &(struct clk_init_data
)
1238 .name
= "gcc_blsp1_qup5_spi_apps_clk",
1239 .parent_names
= (const char *[]) {
1240 "blsp1_qup5_spi_apps_clk_src",
1243 .flags
= CLK_SET_RATE_PARENT
,
1244 .ops
= &clk_branch2_ops
,
1249 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
1252 .enable_reg
= 0x08c8,
1253 .enable_mask
= BIT(0),
1254 .hw
.init
= &(struct clk_init_data
)
1256 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
1257 .parent_names
= (const char *[]) {
1258 "blsp1_qup6_i2c_apps_clk_src",
1261 .flags
= CLK_SET_RATE_PARENT
,
1262 .ops
= &clk_branch2_ops
,
1267 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
1270 .enable_reg
= 0x08c4,
1271 .enable_mask
= BIT(0),
1272 .hw
.init
= &(struct clk_init_data
)
1274 .name
= "gcc_blsp1_qup6_spi_apps_clk",
1275 .parent_names
= (const char *[]) {
1276 "blsp1_qup6_spi_apps_clk_src",
1279 .flags
= CLK_SET_RATE_PARENT
,
1280 .ops
= &clk_branch2_ops
,
1285 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1288 .enable_reg
= 0x0684,
1289 .enable_mask
= BIT(0),
1290 .hw
.init
= &(struct clk_init_data
)
1292 .name
= "gcc_blsp1_uart1_apps_clk",
1293 .parent_names
= (const char *[]) {
1294 "blsp1_uart1_apps_clk_src",
1297 .flags
= CLK_SET_RATE_PARENT
,
1298 .ops
= &clk_branch2_ops
,
1303 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1306 .enable_reg
= 0x0704,
1307 .enable_mask
= BIT(0),
1308 .hw
.init
= &(struct clk_init_data
)
1310 .name
= "gcc_blsp1_uart2_apps_clk",
1311 .parent_names
= (const char *[]) {
1312 "blsp1_uart2_apps_clk_src",
1315 .flags
= CLK_SET_RATE_PARENT
,
1316 .ops
= &clk_branch2_ops
,
1321 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1324 .enable_reg
= 0x0784,
1325 .enable_mask
= BIT(0),
1326 .hw
.init
= &(struct clk_init_data
)
1328 .name
= "gcc_blsp1_uart3_apps_clk",
1329 .parent_names
= (const char *[]) {
1330 "blsp1_uart3_apps_clk_src",
1333 .flags
= CLK_SET_RATE_PARENT
,
1334 .ops
= &clk_branch2_ops
,
1339 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1342 .enable_reg
= 0x0804,
1343 .enable_mask
= BIT(0),
1344 .hw
.init
= &(struct clk_init_data
)
1346 .name
= "gcc_blsp1_uart4_apps_clk",
1347 .parent_names
= (const char *[]) {
1348 "blsp1_uart4_apps_clk_src",
1351 .flags
= CLK_SET_RATE_PARENT
,
1352 .ops
= &clk_branch2_ops
,
1357 static struct clk_branch gcc_blsp1_uart5_apps_clk
= {
1360 .enable_reg
= 0x0884,
1361 .enable_mask
= BIT(0),
1362 .hw
.init
= &(struct clk_init_data
)
1364 .name
= "gcc_blsp1_uart5_apps_clk",
1365 .parent_names
= (const char *[]) {
1366 "blsp1_uart5_apps_clk_src",
1369 .flags
= CLK_SET_RATE_PARENT
,
1370 .ops
= &clk_branch2_ops
,
1375 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1378 .enable_reg
= 0x0904,
1379 .enable_mask
= BIT(0),
1380 .hw
.init
= &(struct clk_init_data
)
1382 .name
= "gcc_blsp1_uart6_apps_clk",
1383 .parent_names
= (const char *[]) {
1384 "blsp1_uart6_apps_clk_src",
1387 .flags
= CLK_SET_RATE_PARENT
,
1388 .ops
= &clk_branch2_ops
,
1393 static struct clk_branch gcc_blsp2_ahb_clk
= {
1395 .halt_check
= BRANCH_HALT_VOTED
,
1397 .enable_reg
= 0x1484,
1398 .enable_mask
= BIT(15),
1399 .hw
.init
= &(struct clk_init_data
)
1401 .name
= "gcc_blsp2_ahb_clk",
1402 .ops
= &clk_branch2_ops
,
1407 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1410 .enable_reg
= 0x0988,
1411 .enable_mask
= BIT(0),
1412 .hw
.init
= &(struct clk_init_data
)
1414 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1415 .parent_names
= (const char *[]) {
1416 "blsp2_qup1_i2c_apps_clk_src",
1419 .flags
= CLK_SET_RATE_PARENT
,
1420 .ops
= &clk_branch2_ops
,
1425 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1428 .enable_reg
= 0x0984,
1429 .enable_mask
= BIT(0),
1430 .hw
.init
= &(struct clk_init_data
)
1432 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1433 .parent_names
= (const char *[]) {
1434 "blsp2_qup1_spi_apps_clk_src",
1437 .flags
= CLK_SET_RATE_PARENT
,
1438 .ops
= &clk_branch2_ops
,
1443 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1446 .enable_reg
= 0x0a08,
1447 .enable_mask
= BIT(0),
1448 .hw
.init
= &(struct clk_init_data
)
1450 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1451 .parent_names
= (const char *[]) {
1452 "blsp2_qup2_i2c_apps_clk_src",
1455 .flags
= CLK_SET_RATE_PARENT
,
1456 .ops
= &clk_branch2_ops
,
1461 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1464 .enable_reg
= 0x0a04,
1465 .enable_mask
= BIT(0),
1466 .hw
.init
= &(struct clk_init_data
)
1468 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1469 .parent_names
= (const char *[]) {
1470 "blsp2_qup2_spi_apps_clk_src",
1473 .flags
= CLK_SET_RATE_PARENT
,
1474 .ops
= &clk_branch2_ops
,
1479 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1482 .enable_reg
= 0x0a88,
1483 .enable_mask
= BIT(0),
1484 .hw
.init
= &(struct clk_init_data
)
1486 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1487 .parent_names
= (const char *[]) {
1488 "blsp2_qup3_i2c_apps_clk_src",
1491 .flags
= CLK_SET_RATE_PARENT
,
1492 .ops
= &clk_branch2_ops
,
1497 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1500 .enable_reg
= 0x0a84,
1501 .enable_mask
= BIT(0),
1502 .hw
.init
= &(struct clk_init_data
)
1504 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1505 .parent_names
= (const char *[]) {
1506 "blsp2_qup3_spi_apps_clk_src",
1509 .flags
= CLK_SET_RATE_PARENT
,
1510 .ops
= &clk_branch2_ops
,
1515 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk
= {
1518 .enable_reg
= 0x0b08,
1519 .enable_mask
= BIT(0),
1520 .hw
.init
= &(struct clk_init_data
)
1522 .name
= "gcc_blsp2_qup4_i2c_apps_clk",
1523 .parent_names
= (const char *[]) {
1524 "blsp2_qup4_i2c_apps_clk_src",
1527 .flags
= CLK_SET_RATE_PARENT
,
1528 .ops
= &clk_branch2_ops
,
1533 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk
= {
1536 .enable_reg
= 0x0b04,
1537 .enable_mask
= BIT(0),
1538 .hw
.init
= &(struct clk_init_data
)
1540 .name
= "gcc_blsp2_qup4_spi_apps_clk",
1541 .parent_names
= (const char *[]) {
1542 "blsp2_qup4_spi_apps_clk_src",
1545 .flags
= CLK_SET_RATE_PARENT
,
1546 .ops
= &clk_branch2_ops
,
1551 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk
= {
1554 .enable_reg
= 0x0b88,
1555 .enable_mask
= BIT(0),
1556 .hw
.init
= &(struct clk_init_data
)
1558 .name
= "gcc_blsp2_qup5_i2c_apps_clk",
1559 .parent_names
= (const char *[]) {
1560 "blsp2_qup5_i2c_apps_clk_src",
1563 .flags
= CLK_SET_RATE_PARENT
,
1564 .ops
= &clk_branch2_ops
,
1569 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk
= {
1572 .enable_reg
= 0x0b84,
1573 .enable_mask
= BIT(0),
1574 .hw
.init
= &(struct clk_init_data
)
1576 .name
= "gcc_blsp2_qup5_spi_apps_clk",
1577 .parent_names
= (const char *[]) {
1578 "blsp2_qup5_spi_apps_clk_src",
1581 .flags
= CLK_SET_RATE_PARENT
,
1582 .ops
= &clk_branch2_ops
,
1587 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk
= {
1590 .enable_reg
= 0x0c08,
1591 .enable_mask
= BIT(0),
1592 .hw
.init
= &(struct clk_init_data
)
1594 .name
= "gcc_blsp2_qup6_i2c_apps_clk",
1595 .parent_names
= (const char *[]) {
1596 "blsp2_qup6_i2c_apps_clk_src",
1599 .flags
= CLK_SET_RATE_PARENT
,
1600 .ops
= &clk_branch2_ops
,
1605 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk
= {
1608 .enable_reg
= 0x0c04,
1609 .enable_mask
= BIT(0),
1610 .hw
.init
= &(struct clk_init_data
)
1612 .name
= "gcc_blsp2_qup6_spi_apps_clk",
1613 .parent_names
= (const char *[]) {
1614 "blsp2_qup6_spi_apps_clk_src",
1617 .flags
= CLK_SET_RATE_PARENT
,
1618 .ops
= &clk_branch2_ops
,
1623 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1626 .enable_reg
= 0x09c4,
1627 .enable_mask
= BIT(0),
1628 .hw
.init
= &(struct clk_init_data
)
1630 .name
= "gcc_blsp2_uart1_apps_clk",
1631 .parent_names
= (const char *[]) {
1632 "blsp2_uart1_apps_clk_src",
1635 .flags
= CLK_SET_RATE_PARENT
,
1636 .ops
= &clk_branch2_ops
,
1641 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1644 .enable_reg
= 0x0a44,
1645 .enable_mask
= BIT(0),
1646 .hw
.init
= &(struct clk_init_data
)
1648 .name
= "gcc_blsp2_uart2_apps_clk",
1649 .parent_names
= (const char *[]) {
1650 "blsp2_uart2_apps_clk_src",
1653 .flags
= CLK_SET_RATE_PARENT
,
1654 .ops
= &clk_branch2_ops
,
1659 static struct clk_branch gcc_blsp2_uart3_apps_clk
= {
1662 .enable_reg
= 0x0ac4,
1663 .enable_mask
= BIT(0),
1664 .hw
.init
= &(struct clk_init_data
)
1666 .name
= "gcc_blsp2_uart3_apps_clk",
1667 .parent_names
= (const char *[]) {
1668 "blsp2_uart3_apps_clk_src",
1671 .flags
= CLK_SET_RATE_PARENT
,
1672 .ops
= &clk_branch2_ops
,
1677 static struct clk_branch gcc_blsp2_uart4_apps_clk
= {
1680 .enable_reg
= 0x0b44,
1681 .enable_mask
= BIT(0),
1682 .hw
.init
= &(struct clk_init_data
)
1684 .name
= "gcc_blsp2_uart4_apps_clk",
1685 .parent_names
= (const char *[]) {
1686 "blsp2_uart4_apps_clk_src",
1689 .flags
= CLK_SET_RATE_PARENT
,
1690 .ops
= &clk_branch2_ops
,
1695 static struct clk_branch gcc_blsp2_uart5_apps_clk
= {
1698 .enable_reg
= 0x0bc4,
1699 .enable_mask
= BIT(0),
1700 .hw
.init
= &(struct clk_init_data
)
1702 .name
= "gcc_blsp2_uart5_apps_clk",
1703 .parent_names
= (const char *[]) {
1704 "blsp2_uart5_apps_clk_src",
1707 .flags
= CLK_SET_RATE_PARENT
,
1708 .ops
= &clk_branch2_ops
,
1713 static struct clk_branch gcc_blsp2_uart6_apps_clk
= {
1716 .enable_reg
= 0x0c44,
1717 .enable_mask
= BIT(0),
1718 .hw
.init
= &(struct clk_init_data
)
1720 .name
= "gcc_blsp2_uart6_apps_clk",
1721 .parent_names
= (const char *[]) {
1722 "blsp2_uart6_apps_clk_src",
1725 .flags
= CLK_SET_RATE_PARENT
,
1726 .ops
= &clk_branch2_ops
,
1731 static struct clk_branch gcc_gp1_clk
= {
1734 .enable_reg
= 0x1900,
1735 .enable_mask
= BIT(0),
1736 .hw
.init
= &(struct clk_init_data
)
1738 .name
= "gcc_gp1_clk",
1739 .parent_names
= (const char *[]) {
1743 .flags
= CLK_SET_RATE_PARENT
,
1744 .ops
= &clk_branch2_ops
,
1749 static struct clk_branch gcc_gp2_clk
= {
1752 .enable_reg
= 0x1940,
1753 .enable_mask
= BIT(0),
1754 .hw
.init
= &(struct clk_init_data
)
1756 .name
= "gcc_gp2_clk",
1757 .parent_names
= (const char *[]) {
1761 .flags
= CLK_SET_RATE_PARENT
,
1762 .ops
= &clk_branch2_ops
,
1767 static struct clk_branch gcc_gp3_clk
= {
1770 .enable_reg
= 0x1980,
1771 .enable_mask
= BIT(0),
1772 .hw
.init
= &(struct clk_init_data
)
1774 .name
= "gcc_gp3_clk",
1775 .parent_names
= (const char *[]) {
1779 .flags
= CLK_SET_RATE_PARENT
,
1780 .ops
= &clk_branch2_ops
,
1785 static struct clk_branch gcc_pcie_0_aux_clk
= {
1788 .enable_reg
= 0x1ad4,
1789 .enable_mask
= BIT(0),
1790 .hw
.init
= &(struct clk_init_data
)
1792 .name
= "gcc_pcie_0_aux_clk",
1793 .parent_names
= (const char *[]) {
1794 "pcie_0_aux_clk_src",
1797 .flags
= CLK_SET_RATE_PARENT
,
1798 .ops
= &clk_branch2_ops
,
1803 static struct clk_branch gcc_pcie_0_pipe_clk
= {
1805 .halt_check
= BRANCH_HALT_DELAY
,
1807 .enable_reg
= 0x1ad8,
1808 .enable_mask
= BIT(0),
1809 .hw
.init
= &(struct clk_init_data
)
1811 .name
= "gcc_pcie_0_pipe_clk",
1812 .parent_names
= (const char *[]) {
1813 "pcie_0_pipe_clk_src",
1816 .flags
= CLK_SET_RATE_PARENT
,
1817 .ops
= &clk_branch2_ops
,
1822 static struct clk_branch gcc_pcie_1_aux_clk
= {
1825 .enable_reg
= 0x1b54,
1826 .enable_mask
= BIT(0),
1827 .hw
.init
= &(struct clk_init_data
)
1829 .name
= "gcc_pcie_1_aux_clk",
1830 .parent_names
= (const char *[]) {
1831 "pcie_1_aux_clk_src",
1834 .flags
= CLK_SET_RATE_PARENT
,
1835 .ops
= &clk_branch2_ops
,
1840 static struct clk_branch gcc_pcie_1_pipe_clk
= {
1842 .halt_check
= BRANCH_HALT_DELAY
,
1844 .enable_reg
= 0x1b58,
1845 .enable_mask
= BIT(0),
1846 .hw
.init
= &(struct clk_init_data
)
1848 .name
= "gcc_pcie_1_pipe_clk",
1849 .parent_names
= (const char *[]) {
1850 "pcie_1_pipe_clk_src",
1853 .flags
= CLK_SET_RATE_PARENT
,
1854 .ops
= &clk_branch2_ops
,
1859 static struct clk_branch gcc_pdm2_clk
= {
1862 .enable_reg
= 0x0ccc,
1863 .enable_mask
= BIT(0),
1864 .hw
.init
= &(struct clk_init_data
)
1866 .name
= "gcc_pdm2_clk",
1867 .parent_names
= (const char *[]) {
1871 .flags
= CLK_SET_RATE_PARENT
,
1872 .ops
= &clk_branch2_ops
,
1877 static struct clk_branch gcc_sdcc1_apps_clk
= {
1880 .enable_reg
= 0x04c4,
1881 .enable_mask
= BIT(0),
1882 .hw
.init
= &(struct clk_init_data
)
1884 .name
= "gcc_sdcc1_apps_clk",
1885 .parent_names
= (const char *[]) {
1886 "sdcc1_apps_clk_src",
1889 .flags
= CLK_SET_RATE_PARENT
,
1890 .ops
= &clk_branch2_ops
,
1895 static struct clk_branch gcc_sdcc1_ahb_clk
= {
1898 .enable_reg
= 0x04c8,
1899 .enable_mask
= BIT(0),
1900 .hw
.init
= &(struct clk_init_data
)
1902 .name
= "gcc_sdcc1_ahb_clk",
1903 .parent_names
= (const char *[]){
1904 "periph_noc_clk_src",
1907 .ops
= &clk_branch2_ops
,
1912 static struct clk_branch gcc_sdcc2_apps_clk
= {
1915 .enable_reg
= 0x0504,
1916 .enable_mask
= BIT(0),
1917 .hw
.init
= &(struct clk_init_data
)
1919 .name
= "gcc_sdcc2_apps_clk",
1920 .parent_names
= (const char *[]) {
1921 "sdcc2_apps_clk_src",
1924 .flags
= CLK_SET_RATE_PARENT
,
1925 .ops
= &clk_branch2_ops
,
1930 static struct clk_branch gcc_sdcc3_apps_clk
= {
1933 .enable_reg
= 0x0544,
1934 .enable_mask
= BIT(0),
1935 .hw
.init
= &(struct clk_init_data
)
1937 .name
= "gcc_sdcc3_apps_clk",
1938 .parent_names
= (const char *[]) {
1939 "sdcc3_apps_clk_src",
1942 .flags
= CLK_SET_RATE_PARENT
,
1943 .ops
= &clk_branch2_ops
,
1948 static struct clk_branch gcc_sdcc4_apps_clk
= {
1951 .enable_reg
= 0x0584,
1952 .enable_mask
= BIT(0),
1953 .hw
.init
= &(struct clk_init_data
)
1955 .name
= "gcc_sdcc4_apps_clk",
1956 .parent_names
= (const char *[]) {
1957 "sdcc4_apps_clk_src",
1960 .flags
= CLK_SET_RATE_PARENT
,
1961 .ops
= &clk_branch2_ops
,
1966 static struct clk_branch gcc_sys_noc_ufs_axi_clk
= {
1969 .enable_reg
= 0x1d7c,
1970 .enable_mask
= BIT(0),
1971 .hw
.init
= &(struct clk_init_data
)
1973 .name
= "gcc_sys_noc_ufs_axi_clk",
1974 .parent_names
= (const char *[]) {
1978 .flags
= CLK_SET_RATE_PARENT
,
1979 .ops
= &clk_branch2_ops
,
1984 static struct clk_branch gcc_sys_noc_usb3_axi_clk
= {
1987 .enable_reg
= 0x03fc,
1988 .enable_mask
= BIT(0),
1989 .hw
.init
= &(struct clk_init_data
)
1991 .name
= "gcc_sys_noc_usb3_axi_clk",
1992 .parent_names
= (const char *[]) {
1993 "usb30_master_clk_src",
1996 .flags
= CLK_SET_RATE_PARENT
,
1997 .ops
= &clk_branch2_ops
,
2002 static struct clk_branch gcc_tsif_ref_clk
= {
2005 .enable_reg
= 0x0d88,
2006 .enable_mask
= BIT(0),
2007 .hw
.init
= &(struct clk_init_data
)
2009 .name
= "gcc_tsif_ref_clk",
2010 .parent_names
= (const char *[]) {
2014 .flags
= CLK_SET_RATE_PARENT
,
2015 .ops
= &clk_branch2_ops
,
2020 static struct clk_branch gcc_ufs_axi_clk
= {
2023 .enable_reg
= 0x1d48,
2024 .enable_mask
= BIT(0),
2025 .hw
.init
= &(struct clk_init_data
)
2027 .name
= "gcc_ufs_axi_clk",
2028 .parent_names
= (const char *[]) {
2032 .flags
= CLK_SET_RATE_PARENT
,
2033 .ops
= &clk_branch2_ops
,
2038 static struct clk_branch gcc_ufs_rx_cfg_clk
= {
2041 .enable_reg
= 0x1d54,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(struct clk_init_data
)
2045 .name
= "gcc_ufs_rx_cfg_clk",
2046 .parent_names
= (const char *[]) {
2050 .flags
= CLK_SET_RATE_PARENT
,
2051 .ops
= &clk_branch2_ops
,
2056 static struct clk_branch gcc_ufs_tx_cfg_clk
= {
2059 .enable_reg
= 0x1d50,
2060 .enable_mask
= BIT(0),
2061 .hw
.init
= &(struct clk_init_data
)
2063 .name
= "gcc_ufs_tx_cfg_clk",
2064 .parent_names
= (const char *[]) {
2068 .flags
= CLK_SET_RATE_PARENT
,
2069 .ops
= &clk_branch2_ops
,
2074 static struct clk_branch gcc_usb30_master_clk
= {
2077 .enable_reg
= 0x03c8,
2078 .enable_mask
= BIT(0),
2079 .hw
.init
= &(struct clk_init_data
)
2081 .name
= "gcc_usb30_master_clk",
2082 .parent_names
= (const char *[]) {
2083 "usb30_master_clk_src",
2086 .flags
= CLK_SET_RATE_PARENT
,
2087 .ops
= &clk_branch2_ops
,
2092 static struct clk_branch gcc_usb30_mock_utmi_clk
= {
2095 .enable_reg
= 0x03d0,
2096 .enable_mask
= BIT(0),
2097 .hw
.init
= &(struct clk_init_data
)
2099 .name
= "gcc_usb30_mock_utmi_clk",
2100 .parent_names
= (const char *[]) {
2101 "usb30_mock_utmi_clk_src",
2104 .flags
= CLK_SET_RATE_PARENT
,
2105 .ops
= &clk_branch2_ops
,
2110 static struct clk_branch gcc_usb3_phy_aux_clk
= {
2113 .enable_reg
= 0x1408,
2114 .enable_mask
= BIT(0),
2115 .hw
.init
= &(struct clk_init_data
)
2117 .name
= "gcc_usb3_phy_aux_clk",
2118 .parent_names
= (const char *[]) {
2119 "usb3_phy_aux_clk_src",
2122 .flags
= CLK_SET_RATE_PARENT
,
2123 .ops
= &clk_branch2_ops
,
2128 static struct clk_branch gcc_usb_hs_system_clk
= {
2131 .enable_reg
= 0x0484,
2132 .enable_mask
= BIT(0),
2133 .hw
.init
= &(struct clk_init_data
)
2135 .name
= "gcc_usb_hs_system_clk",
2136 .parent_names
= (const char *[]) {
2137 "usb_hs_system_clk_src",
2140 .flags
= CLK_SET_RATE_PARENT
,
2141 .ops
= &clk_branch2_ops
,
2146 static struct clk_regmap
*gcc_msm8994_clocks
[] = {
2147 [GPLL0_EARLY
] = &gpll0_early
.clkr
,
2148 [GPLL0
] = &gpll0
.clkr
,
2149 [GPLL4_EARLY
] = &gpll4_early
.clkr
,
2150 [GPLL4
] = &gpll4
.clkr
,
2151 [UFS_AXI_CLK_SRC
] = &ufs_axi_clk_src
.clkr
,
2152 [USB30_MASTER_CLK_SRC
] = &usb30_master_clk_src
.clkr
,
2153 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
2154 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
2155 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
2156 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
2157 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
2158 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
2159 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
2160 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
2161 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
2162 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
2163 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
2164 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
2165 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
2166 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
2167 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
2168 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
2169 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
2170 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
2171 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
2172 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
2173 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
2174 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
2175 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
2176 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
2177 [BLSP2_QUP4_I2C_APPS_CLK_SRC
] = &blsp2_qup4_i2c_apps_clk_src
.clkr
,
2178 [BLSP2_QUP4_SPI_APPS_CLK_SRC
] = &blsp2_qup4_spi_apps_clk_src
.clkr
,
2179 [BLSP2_QUP5_I2C_APPS_CLK_SRC
] = &blsp2_qup5_i2c_apps_clk_src
.clkr
,
2180 [BLSP2_QUP5_SPI_APPS_CLK_SRC
] = &blsp2_qup5_spi_apps_clk_src
.clkr
,
2181 [BLSP2_QUP6_I2C_APPS_CLK_SRC
] = &blsp2_qup6_i2c_apps_clk_src
.clkr
,
2182 [BLSP2_QUP6_SPI_APPS_CLK_SRC
] = &blsp2_qup6_spi_apps_clk_src
.clkr
,
2183 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
2184 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
2185 [BLSP2_UART3_APPS_CLK_SRC
] = &blsp2_uart3_apps_clk_src
.clkr
,
2186 [BLSP2_UART4_APPS_CLK_SRC
] = &blsp2_uart4_apps_clk_src
.clkr
,
2187 [BLSP2_UART5_APPS_CLK_SRC
] = &blsp2_uart5_apps_clk_src
.clkr
,
2188 [BLSP2_UART6_APPS_CLK_SRC
] = &blsp2_uart6_apps_clk_src
.clkr
,
2189 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
2190 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
2191 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
2192 [PCIE_0_AUX_CLK_SRC
] = &pcie_0_aux_clk_src
.clkr
,
2193 [PCIE_0_PIPE_CLK_SRC
] = &pcie_0_pipe_clk_src
.clkr
,
2194 [PCIE_1_AUX_CLK_SRC
] = &pcie_1_aux_clk_src
.clkr
,
2195 [PCIE_1_PIPE_CLK_SRC
] = &pcie_1_pipe_clk_src
.clkr
,
2196 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
2197 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
2198 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
2199 [SDCC3_APPS_CLK_SRC
] = &sdcc3_apps_clk_src
.clkr
,
2200 [SDCC4_APPS_CLK_SRC
] = &sdcc4_apps_clk_src
.clkr
,
2201 [TSIF_REF_CLK_SRC
] = &tsif_ref_clk_src
.clkr
,
2202 [USB30_MOCK_UTMI_CLK_SRC
] = &usb30_mock_utmi_clk_src
.clkr
,
2203 [USB3_PHY_AUX_CLK_SRC
] = &usb3_phy_aux_clk_src
.clkr
,
2204 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
2205 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
2206 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
2207 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
2208 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
2209 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
2210 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
2211 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
2212 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
2213 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
2214 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
2215 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
2216 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
2217 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
2218 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
2219 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
2220 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
2221 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
2222 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
2223 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
2224 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
2225 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
2226 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
2227 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
2228 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
2229 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
2230 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
2231 [GCC_BLSP2_QUP4_I2C_APPS_CLK
] = &gcc_blsp2_qup4_i2c_apps_clk
.clkr
,
2232 [GCC_BLSP2_QUP4_SPI_APPS_CLK
] = &gcc_blsp2_qup4_spi_apps_clk
.clkr
,
2233 [GCC_BLSP2_QUP5_I2C_APPS_CLK
] = &gcc_blsp2_qup5_i2c_apps_clk
.clkr
,
2234 [GCC_BLSP2_QUP5_SPI_APPS_CLK
] = &gcc_blsp2_qup5_spi_apps_clk
.clkr
,
2235 [GCC_BLSP2_QUP6_I2C_APPS_CLK
] = &gcc_blsp2_qup6_i2c_apps_clk
.clkr
,
2236 [GCC_BLSP2_QUP6_SPI_APPS_CLK
] = &gcc_blsp2_qup6_spi_apps_clk
.clkr
,
2237 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
2238 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
2239 [GCC_BLSP2_UART3_APPS_CLK
] = &gcc_blsp2_uart3_apps_clk
.clkr
,
2240 [GCC_BLSP2_UART4_APPS_CLK
] = &gcc_blsp2_uart4_apps_clk
.clkr
,
2241 [GCC_BLSP2_UART5_APPS_CLK
] = &gcc_blsp2_uart5_apps_clk
.clkr
,
2242 [GCC_BLSP2_UART6_APPS_CLK
] = &gcc_blsp2_uart6_apps_clk
.clkr
,
2243 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2244 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2245 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2246 [GCC_PCIE_0_AUX_CLK
] = &gcc_pcie_0_aux_clk
.clkr
,
2247 [GCC_PCIE_0_PIPE_CLK
] = &gcc_pcie_0_pipe_clk
.clkr
,
2248 [GCC_PCIE_1_AUX_CLK
] = &gcc_pcie_1_aux_clk
.clkr
,
2249 [GCC_PCIE_1_PIPE_CLK
] = &gcc_pcie_1_pipe_clk
.clkr
,
2250 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2251 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2252 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2253 [GCC_SDCC3_APPS_CLK
] = &gcc_sdcc3_apps_clk
.clkr
,
2254 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
2255 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2256 [GCC_SYS_NOC_UFS_AXI_CLK
] = &gcc_sys_noc_ufs_axi_clk
.clkr
,
2257 [GCC_SYS_NOC_USB3_AXI_CLK
] = &gcc_sys_noc_usb3_axi_clk
.clkr
,
2258 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
2259 [GCC_UFS_AXI_CLK
] = &gcc_ufs_axi_clk
.clkr
,
2260 [GCC_UFS_RX_CFG_CLK
] = &gcc_ufs_rx_cfg_clk
.clkr
,
2261 [GCC_UFS_TX_CFG_CLK
] = &gcc_ufs_tx_cfg_clk
.clkr
,
2262 [GCC_USB30_MASTER_CLK
] = &gcc_usb30_master_clk
.clkr
,
2263 [GCC_USB30_MOCK_UTMI_CLK
] = &gcc_usb30_mock_utmi_clk
.clkr
,
2264 [GCC_USB3_PHY_AUX_CLK
] = &gcc_usb3_phy_aux_clk
.clkr
,
2265 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
2268 static const struct regmap_config gcc_msm8994_regmap_config
= {
2272 .max_register
= 0x2000,
2276 static const struct qcom_cc_desc gcc_msm8994_desc
= {
2277 .config
= &gcc_msm8994_regmap_config
,
2278 .clks
= gcc_msm8994_clocks
,
2279 .num_clks
= ARRAY_SIZE(gcc_msm8994_clocks
),
2282 static const struct of_device_id gcc_msm8994_match_table
[] = {
2283 { .compatible
= "qcom,gcc-msm8994" },
2286 MODULE_DEVICE_TABLE(of
, gcc_msm8994_match_table
);
2288 static int gcc_msm8994_probe(struct platform_device
*pdev
)
2290 struct device
*dev
= &pdev
->dev
;
2293 clk
= devm_clk_register(dev
, &xo
.hw
);
2295 return PTR_ERR(clk
);
2297 return qcom_cc_probe(pdev
, &gcc_msm8994_desc
);
2300 static struct platform_driver gcc_msm8994_driver
= {
2301 .probe
= gcc_msm8994_probe
,
2303 .name
= "gcc-msm8994",
2304 .of_match_table
= gcc_msm8994_match_table
,
2308 static int __init
gcc_msm8994_init(void)
2310 return platform_driver_register(&gcc_msm8994_driver
);
2312 core_initcall(gcc_msm8994_init
);
2314 static void __exit
gcc_msm8994_exit(void)
2316 platform_driver_unregister(&gcc_msm8994_driver
);
2318 module_exit(gcc_msm8994_exit
);
2320 MODULE_DESCRIPTION("Qualcomm GCC MSM8994 Driver");
2321 MODULE_LICENSE("GPL v2");
2322 MODULE_ALIAS("platform:gcc-msm8994");