2 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include <linux/kernel.h>
15 #include <linux/bitops.h>
16 #include <linux/err.h>
17 #include <linux/platform_device.h>
18 #include <linux/module.h>
20 #include <linux/of_device.h>
21 #include <linux/clk-provider.h>
22 #include <linux/regmap.h>
23 #include <linux/reset-controller.h>
25 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
26 #include <dt-bindings/reset/qcom,gcc-msm8974.h>
29 #include "clk-regmap.h"
32 #include "clk-branch.h"
42 static const struct parent_map gcc_xo_gpll0_map
[] = {
47 static const char *gcc_xo_gpll0
[] = {
52 static const struct parent_map gcc_xo_gpll0_gpll4_map
[] = {
58 static const char *gcc_xo_gpll0_gpll4
[] = {
64 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
66 static struct clk_pll gpll0
= {
74 .clkr
.hw
.init
= &(struct clk_init_data
){
76 .parent_names
= (const char *[]){ "xo" },
82 static struct clk_regmap gpll0_vote
= {
84 .enable_mask
= BIT(0),
85 .hw
.init
= &(struct clk_init_data
){
87 .parent_names
= (const char *[]){ "gpll0" },
89 .ops
= &clk_pll_vote_ops
,
93 static struct clk_rcg2 config_noc_clk_src
= {
96 .parent_map
= gcc_xo_gpll0_map
,
97 .clkr
.hw
.init
= &(struct clk_init_data
){
98 .name
= "config_noc_clk_src",
99 .parent_names
= gcc_xo_gpll0
,
101 .ops
= &clk_rcg2_ops
,
105 static struct clk_rcg2 periph_noc_clk_src
= {
108 .parent_map
= gcc_xo_gpll0_map
,
109 .clkr
.hw
.init
= &(struct clk_init_data
){
110 .name
= "periph_noc_clk_src",
111 .parent_names
= gcc_xo_gpll0
,
113 .ops
= &clk_rcg2_ops
,
117 static struct clk_rcg2 system_noc_clk_src
= {
120 .parent_map
= gcc_xo_gpll0_map
,
121 .clkr
.hw
.init
= &(struct clk_init_data
){
122 .name
= "system_noc_clk_src",
123 .parent_names
= gcc_xo_gpll0
,
125 .ops
= &clk_rcg2_ops
,
129 static struct clk_pll gpll1
= {
133 .config_reg
= 0x0054,
135 .status_reg
= 0x005c,
137 .clkr
.hw
.init
= &(struct clk_init_data
){
139 .parent_names
= (const char *[]){ "xo" },
145 static struct clk_regmap gpll1_vote
= {
146 .enable_reg
= 0x1480,
147 .enable_mask
= BIT(1),
148 .hw
.init
= &(struct clk_init_data
){
149 .name
= "gpll1_vote",
150 .parent_names
= (const char *[]){ "gpll1" },
152 .ops
= &clk_pll_vote_ops
,
156 static struct clk_pll gpll4
= {
160 .config_reg
= 0x1dd4,
162 .status_reg
= 0x1ddc,
164 .clkr
.hw
.init
= &(struct clk_init_data
){
166 .parent_names
= (const char *[]){ "xo" },
172 static struct clk_regmap gpll4_vote
= {
173 .enable_reg
= 0x1480,
174 .enable_mask
= BIT(4),
175 .hw
.init
= &(struct clk_init_data
){
176 .name
= "gpll4_vote",
177 .parent_names
= (const char *[]){ "gpll4" },
179 .ops
= &clk_pll_vote_ops
,
183 static const struct freq_tbl ftbl_gcc_usb30_master_clk
[] = {
184 F(125000000, P_GPLL0
, 1, 5, 24),
188 static struct clk_rcg2 usb30_master_clk_src
= {
192 .parent_map
= gcc_xo_gpll0_map
,
193 .freq_tbl
= ftbl_gcc_usb30_master_clk
,
194 .clkr
.hw
.init
= &(struct clk_init_data
){
195 .name
= "usb30_master_clk_src",
196 .parent_names
= gcc_xo_gpll0
,
198 .ops
= &clk_rcg2_ops
,
202 static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
[] = {
203 F(19200000, P_XO
, 1, 0, 0),
204 F(37500000, P_GPLL0
, 16, 0, 0),
205 F(50000000, P_GPLL0
, 12, 0, 0),
209 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
212 .parent_map
= gcc_xo_gpll0_map
,
213 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
214 .clkr
.hw
.init
= &(struct clk_init_data
){
215 .name
= "blsp1_qup1_i2c_apps_clk_src",
216 .parent_names
= gcc_xo_gpll0
,
218 .ops
= &clk_rcg2_ops
,
222 static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
[] = {
223 F(960000, P_XO
, 10, 1, 2),
224 F(4800000, P_XO
, 4, 0, 0),
225 F(9600000, P_XO
, 2, 0, 0),
226 F(15000000, P_GPLL0
, 10, 1, 4),
227 F(19200000, P_XO
, 1, 0, 0),
228 F(25000000, P_GPLL0
, 12, 1, 2),
229 F(50000000, P_GPLL0
, 12, 0, 0),
233 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
237 .parent_map
= gcc_xo_gpll0_map
,
238 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
239 .clkr
.hw
.init
= &(struct clk_init_data
){
240 .name
= "blsp1_qup1_spi_apps_clk_src",
241 .parent_names
= gcc_xo_gpll0
,
243 .ops
= &clk_rcg2_ops
,
247 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
250 .parent_map
= gcc_xo_gpll0_map
,
251 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
252 .clkr
.hw
.init
= &(struct clk_init_data
){
253 .name
= "blsp1_qup2_i2c_apps_clk_src",
254 .parent_names
= gcc_xo_gpll0
,
256 .ops
= &clk_rcg2_ops
,
260 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
264 .parent_map
= gcc_xo_gpll0_map
,
265 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
266 .clkr
.hw
.init
= &(struct clk_init_data
){
267 .name
= "blsp1_qup2_spi_apps_clk_src",
268 .parent_names
= gcc_xo_gpll0
,
270 .ops
= &clk_rcg2_ops
,
274 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
277 .parent_map
= gcc_xo_gpll0_map
,
278 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
279 .clkr
.hw
.init
= &(struct clk_init_data
){
280 .name
= "blsp1_qup3_i2c_apps_clk_src",
281 .parent_names
= gcc_xo_gpll0
,
283 .ops
= &clk_rcg2_ops
,
287 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
291 .parent_map
= gcc_xo_gpll0_map
,
292 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
293 .clkr
.hw
.init
= &(struct clk_init_data
){
294 .name
= "blsp1_qup3_spi_apps_clk_src",
295 .parent_names
= gcc_xo_gpll0
,
297 .ops
= &clk_rcg2_ops
,
301 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
304 .parent_map
= gcc_xo_gpll0_map
,
305 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
306 .clkr
.hw
.init
= &(struct clk_init_data
){
307 .name
= "blsp1_qup4_i2c_apps_clk_src",
308 .parent_names
= gcc_xo_gpll0
,
310 .ops
= &clk_rcg2_ops
,
314 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
318 .parent_map
= gcc_xo_gpll0_map
,
319 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
320 .clkr
.hw
.init
= &(struct clk_init_data
){
321 .name
= "blsp1_qup4_spi_apps_clk_src",
322 .parent_names
= gcc_xo_gpll0
,
324 .ops
= &clk_rcg2_ops
,
328 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
331 .parent_map
= gcc_xo_gpll0_map
,
332 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
333 .clkr
.hw
.init
= &(struct clk_init_data
){
334 .name
= "blsp1_qup5_i2c_apps_clk_src",
335 .parent_names
= gcc_xo_gpll0
,
337 .ops
= &clk_rcg2_ops
,
341 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
345 .parent_map
= gcc_xo_gpll0_map
,
346 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
347 .clkr
.hw
.init
= &(struct clk_init_data
){
348 .name
= "blsp1_qup5_spi_apps_clk_src",
349 .parent_names
= gcc_xo_gpll0
,
351 .ops
= &clk_rcg2_ops
,
355 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
358 .parent_map
= gcc_xo_gpll0_map
,
359 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
360 .clkr
.hw
.init
= &(struct clk_init_data
){
361 .name
= "blsp1_qup6_i2c_apps_clk_src",
362 .parent_names
= gcc_xo_gpll0
,
364 .ops
= &clk_rcg2_ops
,
368 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
372 .parent_map
= gcc_xo_gpll0_map
,
373 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
374 .clkr
.hw
.init
= &(struct clk_init_data
){
375 .name
= "blsp1_qup6_spi_apps_clk_src",
376 .parent_names
= gcc_xo_gpll0
,
378 .ops
= &clk_rcg2_ops
,
382 static const struct freq_tbl ftbl_gcc_blsp1_2_uart1_6_apps_clk
[] = {
383 F(3686400, P_GPLL0
, 1, 96, 15625),
384 F(7372800, P_GPLL0
, 1, 192, 15625),
385 F(14745600, P_GPLL0
, 1, 384, 15625),
386 F(16000000, P_GPLL0
, 5, 2, 15),
387 F(19200000, P_XO
, 1, 0, 0),
388 F(24000000, P_GPLL0
, 5, 1, 5),
389 F(32000000, P_GPLL0
, 1, 4, 75),
390 F(40000000, P_GPLL0
, 15, 0, 0),
391 F(46400000, P_GPLL0
, 1, 29, 375),
392 F(48000000, P_GPLL0
, 12.5, 0, 0),
393 F(51200000, P_GPLL0
, 1, 32, 375),
394 F(56000000, P_GPLL0
, 1, 7, 75),
395 F(58982400, P_GPLL0
, 1, 1536, 15625),
396 F(60000000, P_GPLL0
, 10, 0, 0),
397 F(63160000, P_GPLL0
, 9.5, 0, 0),
401 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
405 .parent_map
= gcc_xo_gpll0_map
,
406 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
407 .clkr
.hw
.init
= &(struct clk_init_data
){
408 .name
= "blsp1_uart1_apps_clk_src",
409 .parent_names
= gcc_xo_gpll0
,
411 .ops
= &clk_rcg2_ops
,
415 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
419 .parent_map
= gcc_xo_gpll0_map
,
420 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
421 .clkr
.hw
.init
= &(struct clk_init_data
){
422 .name
= "blsp1_uart2_apps_clk_src",
423 .parent_names
= gcc_xo_gpll0
,
425 .ops
= &clk_rcg2_ops
,
429 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
433 .parent_map
= gcc_xo_gpll0_map
,
434 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
435 .clkr
.hw
.init
= &(struct clk_init_data
){
436 .name
= "blsp1_uart3_apps_clk_src",
437 .parent_names
= gcc_xo_gpll0
,
439 .ops
= &clk_rcg2_ops
,
443 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
447 .parent_map
= gcc_xo_gpll0_map
,
448 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
449 .clkr
.hw
.init
= &(struct clk_init_data
){
450 .name
= "blsp1_uart4_apps_clk_src",
451 .parent_names
= gcc_xo_gpll0
,
453 .ops
= &clk_rcg2_ops
,
457 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
461 .parent_map
= gcc_xo_gpll0_map
,
462 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
463 .clkr
.hw
.init
= &(struct clk_init_data
){
464 .name
= "blsp1_uart5_apps_clk_src",
465 .parent_names
= gcc_xo_gpll0
,
467 .ops
= &clk_rcg2_ops
,
471 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
475 .parent_map
= gcc_xo_gpll0_map
,
476 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
477 .clkr
.hw
.init
= &(struct clk_init_data
){
478 .name
= "blsp1_uart6_apps_clk_src",
479 .parent_names
= gcc_xo_gpll0
,
481 .ops
= &clk_rcg2_ops
,
485 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
488 .parent_map
= gcc_xo_gpll0_map
,
489 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
490 .clkr
.hw
.init
= &(struct clk_init_data
){
491 .name
= "blsp2_qup1_i2c_apps_clk_src",
492 .parent_names
= gcc_xo_gpll0
,
494 .ops
= &clk_rcg2_ops
,
498 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
502 .parent_map
= gcc_xo_gpll0_map
,
503 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
504 .clkr
.hw
.init
= &(struct clk_init_data
){
505 .name
= "blsp2_qup1_spi_apps_clk_src",
506 .parent_names
= gcc_xo_gpll0
,
508 .ops
= &clk_rcg2_ops
,
512 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
515 .parent_map
= gcc_xo_gpll0_map
,
516 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
517 .clkr
.hw
.init
= &(struct clk_init_data
){
518 .name
= "blsp2_qup2_i2c_apps_clk_src",
519 .parent_names
= gcc_xo_gpll0
,
521 .ops
= &clk_rcg2_ops
,
525 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
529 .parent_map
= gcc_xo_gpll0_map
,
530 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
531 .clkr
.hw
.init
= &(struct clk_init_data
){
532 .name
= "blsp2_qup2_spi_apps_clk_src",
533 .parent_names
= gcc_xo_gpll0
,
535 .ops
= &clk_rcg2_ops
,
539 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
542 .parent_map
= gcc_xo_gpll0_map
,
543 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
544 .clkr
.hw
.init
= &(struct clk_init_data
){
545 .name
= "blsp2_qup3_i2c_apps_clk_src",
546 .parent_names
= gcc_xo_gpll0
,
548 .ops
= &clk_rcg2_ops
,
552 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
556 .parent_map
= gcc_xo_gpll0_map
,
557 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
558 .clkr
.hw
.init
= &(struct clk_init_data
){
559 .name
= "blsp2_qup3_spi_apps_clk_src",
560 .parent_names
= gcc_xo_gpll0
,
562 .ops
= &clk_rcg2_ops
,
566 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src
= {
569 .parent_map
= gcc_xo_gpll0_map
,
570 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
571 .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_gcc_blsp1_2_qup1_6_spi_apps_clk
,
585 .clkr
.hw
.init
= &(struct clk_init_data
){
586 .name
= "blsp2_qup4_spi_apps_clk_src",
587 .parent_names
= gcc_xo_gpll0
,
589 .ops
= &clk_rcg2_ops
,
593 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src
= {
596 .parent_map
= gcc_xo_gpll0_map
,
597 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
598 .clkr
.hw
.init
= &(struct clk_init_data
){
599 .name
= "blsp2_qup5_i2c_apps_clk_src",
600 .parent_names
= gcc_xo_gpll0
,
602 .ops
= &clk_rcg2_ops
,
606 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src
= {
610 .parent_map
= gcc_xo_gpll0_map
,
611 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
612 .clkr
.hw
.init
= &(struct clk_init_data
){
613 .name
= "blsp2_qup5_spi_apps_clk_src",
614 .parent_names
= gcc_xo_gpll0
,
616 .ops
= &clk_rcg2_ops
,
620 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src
= {
623 .parent_map
= gcc_xo_gpll0_map
,
624 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
625 .clkr
.hw
.init
= &(struct clk_init_data
){
626 .name
= "blsp2_qup6_i2c_apps_clk_src",
627 .parent_names
= gcc_xo_gpll0
,
629 .ops
= &clk_rcg2_ops
,
633 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src
= {
637 .parent_map
= gcc_xo_gpll0_map
,
638 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
639 .clkr
.hw
.init
= &(struct clk_init_data
){
640 .name
= "blsp2_qup6_spi_apps_clk_src",
641 .parent_names
= gcc_xo_gpll0
,
643 .ops
= &clk_rcg2_ops
,
647 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
651 .parent_map
= gcc_xo_gpll0_map
,
652 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
653 .clkr
.hw
.init
= &(struct clk_init_data
){
654 .name
= "blsp2_uart1_apps_clk_src",
655 .parent_names
= gcc_xo_gpll0
,
657 .ops
= &clk_rcg2_ops
,
661 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
665 .parent_map
= gcc_xo_gpll0_map
,
666 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
667 .clkr
.hw
.init
= &(struct clk_init_data
){
668 .name
= "blsp2_uart2_apps_clk_src",
669 .parent_names
= gcc_xo_gpll0
,
671 .ops
= &clk_rcg2_ops
,
675 static struct clk_rcg2 blsp2_uart3_apps_clk_src
= {
679 .parent_map
= gcc_xo_gpll0_map
,
680 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
681 .clkr
.hw
.init
= &(struct clk_init_data
){
682 .name
= "blsp2_uart3_apps_clk_src",
683 .parent_names
= gcc_xo_gpll0
,
685 .ops
= &clk_rcg2_ops
,
689 static struct clk_rcg2 blsp2_uart4_apps_clk_src
= {
693 .parent_map
= gcc_xo_gpll0_map
,
694 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
695 .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_gcc_blsp1_2_uart1_6_apps_clk
,
709 .clkr
.hw
.init
= &(struct clk_init_data
){
710 .name
= "blsp2_uart5_apps_clk_src",
711 .parent_names
= gcc_xo_gpll0
,
713 .ops
= &clk_rcg2_ops
,
717 static struct clk_rcg2 blsp2_uart6_apps_clk_src
= {
721 .parent_map
= gcc_xo_gpll0_map
,
722 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
723 .clkr
.hw
.init
= &(struct clk_init_data
){
724 .name
= "blsp2_uart6_apps_clk_src",
725 .parent_names
= gcc_xo_gpll0
,
727 .ops
= &clk_rcg2_ops
,
731 static const struct freq_tbl ftbl_gcc_ce1_clk
[] = {
732 F(50000000, P_GPLL0
, 12, 0, 0),
733 F(75000000, P_GPLL0
, 8, 0, 0),
734 F(100000000, P_GPLL0
, 6, 0, 0),
735 F(150000000, P_GPLL0
, 4, 0, 0),
739 static struct clk_rcg2 ce1_clk_src
= {
742 .parent_map
= gcc_xo_gpll0_map
,
743 .freq_tbl
= ftbl_gcc_ce1_clk
,
744 .clkr
.hw
.init
= &(struct clk_init_data
){
745 .name
= "ce1_clk_src",
746 .parent_names
= gcc_xo_gpll0
,
748 .ops
= &clk_rcg2_ops
,
752 static const struct freq_tbl ftbl_gcc_ce2_clk
[] = {
753 F(50000000, P_GPLL0
, 12, 0, 0),
754 F(75000000, P_GPLL0
, 8, 0, 0),
755 F(100000000, P_GPLL0
, 6, 0, 0),
756 F(150000000, P_GPLL0
, 4, 0, 0),
760 static struct clk_rcg2 ce2_clk_src
= {
763 .parent_map
= gcc_xo_gpll0_map
,
764 .freq_tbl
= ftbl_gcc_ce2_clk
,
765 .clkr
.hw
.init
= &(struct clk_init_data
){
766 .name
= "ce2_clk_src",
767 .parent_names
= gcc_xo_gpll0
,
769 .ops
= &clk_rcg2_ops
,
773 static const struct freq_tbl ftbl_gcc_gp_clk
[] = {
774 F(4800000, P_XO
, 4, 0, 0),
775 F(6000000, P_GPLL0
, 10, 1, 10),
776 F(6750000, P_GPLL0
, 1, 1, 89),
777 F(8000000, P_GPLL0
, 15, 1, 5),
778 F(9600000, P_XO
, 2, 0, 0),
779 F(16000000, P_GPLL0
, 1, 2, 75),
780 F(19200000, P_XO
, 1, 0, 0),
781 F(24000000, P_GPLL0
, 5, 1, 5),
786 static struct clk_rcg2 gp1_clk_src
= {
790 .parent_map
= gcc_xo_gpll0_map
,
791 .freq_tbl
= ftbl_gcc_gp_clk
,
792 .clkr
.hw
.init
= &(struct clk_init_data
){
793 .name
= "gp1_clk_src",
794 .parent_names
= gcc_xo_gpll0
,
796 .ops
= &clk_rcg2_ops
,
800 static struct clk_rcg2 gp2_clk_src
= {
804 .parent_map
= gcc_xo_gpll0_map
,
805 .freq_tbl
= ftbl_gcc_gp_clk
,
806 .clkr
.hw
.init
= &(struct clk_init_data
){
807 .name
= "gp2_clk_src",
808 .parent_names
= gcc_xo_gpll0
,
810 .ops
= &clk_rcg2_ops
,
814 static struct clk_rcg2 gp3_clk_src
= {
818 .parent_map
= gcc_xo_gpll0_map
,
819 .freq_tbl
= ftbl_gcc_gp_clk
,
820 .clkr
.hw
.init
= &(struct clk_init_data
){
821 .name
= "gp3_clk_src",
822 .parent_names
= gcc_xo_gpll0
,
824 .ops
= &clk_rcg2_ops
,
828 static const struct freq_tbl ftbl_gcc_pdm2_clk
[] = {
829 F(60000000, P_GPLL0
, 10, 0, 0),
833 static struct clk_rcg2 pdm2_clk_src
= {
836 .parent_map
= gcc_xo_gpll0_map
,
837 .freq_tbl
= ftbl_gcc_pdm2_clk
,
838 .clkr
.hw
.init
= &(struct clk_init_data
){
839 .name
= "pdm2_clk_src",
840 .parent_names
= gcc_xo_gpll0
,
842 .ops
= &clk_rcg2_ops
,
846 static const struct freq_tbl ftbl_gcc_sdcc1_4_apps_clk
[] = {
847 F(144000, P_XO
, 16, 3, 25),
848 F(400000, P_XO
, 12, 1, 4),
849 F(20000000, P_GPLL0
, 15, 1, 2),
850 F(25000000, P_GPLL0
, 12, 1, 2),
851 F(50000000, P_GPLL0
, 12, 0, 0),
852 F(100000000, P_GPLL0
, 6, 0, 0),
853 F(200000000, P_GPLL0
, 3, 0, 0),
857 static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk_pro
[] = {
858 F(144000, P_XO
, 16, 3, 25),
859 F(400000, P_XO
, 12, 1, 4),
860 F(20000000, P_GPLL0
, 15, 1, 2),
861 F(25000000, P_GPLL0
, 12, 1, 2),
862 F(50000000, P_GPLL0
, 12, 0, 0),
863 F(100000000, P_GPLL0
, 6, 0, 0),
864 F(192000000, P_GPLL4
, 4, 0, 0),
865 F(200000000, P_GPLL0
, 3, 0, 0),
866 F(384000000, P_GPLL4
, 2, 0, 0),
870 static struct clk_init_data sdcc1_apps_clk_src_init
= {
871 .name
= "sdcc1_apps_clk_src",
872 .parent_names
= gcc_xo_gpll0
,
874 .ops
= &clk_rcg2_ops
,
877 static struct clk_rcg2 sdcc1_apps_clk_src
= {
881 .parent_map
= gcc_xo_gpll0_map
,
882 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
883 .clkr
.hw
.init
= &sdcc1_apps_clk_src_init
,
886 static struct clk_rcg2 sdcc2_apps_clk_src
= {
890 .parent_map
= gcc_xo_gpll0_map
,
891 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
892 .clkr
.hw
.init
= &(struct clk_init_data
){
893 .name
= "sdcc2_apps_clk_src",
894 .parent_names
= gcc_xo_gpll0
,
896 .ops
= &clk_rcg2_ops
,
900 static struct clk_rcg2 sdcc3_apps_clk_src
= {
904 .parent_map
= gcc_xo_gpll0_map
,
905 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
906 .clkr
.hw
.init
= &(struct clk_init_data
){
907 .name
= "sdcc3_apps_clk_src",
908 .parent_names
= gcc_xo_gpll0
,
910 .ops
= &clk_rcg2_ops
,
914 static struct clk_rcg2 sdcc4_apps_clk_src
= {
918 .parent_map
= gcc_xo_gpll0_map
,
919 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
920 .clkr
.hw
.init
= &(struct clk_init_data
){
921 .name
= "sdcc4_apps_clk_src",
922 .parent_names
= gcc_xo_gpll0
,
924 .ops
= &clk_rcg2_ops
,
928 static const struct freq_tbl ftbl_gcc_tsif_ref_clk
[] = {
929 F(105000, P_XO
, 2, 1, 91),
933 static struct clk_rcg2 tsif_ref_clk_src
= {
937 .parent_map
= gcc_xo_gpll0_map
,
938 .freq_tbl
= ftbl_gcc_tsif_ref_clk
,
939 .clkr
.hw
.init
= &(struct clk_init_data
){
940 .name
= "tsif_ref_clk_src",
941 .parent_names
= gcc_xo_gpll0
,
943 .ops
= &clk_rcg2_ops
,
947 static const struct freq_tbl ftbl_gcc_usb30_mock_utmi_clk
[] = {
948 F(60000000, P_GPLL0
, 10, 0, 0),
952 static struct clk_rcg2 usb30_mock_utmi_clk_src
= {
955 .parent_map
= gcc_xo_gpll0_map
,
956 .freq_tbl
= ftbl_gcc_usb30_mock_utmi_clk
,
957 .clkr
.hw
.init
= &(struct clk_init_data
){
958 .name
= "usb30_mock_utmi_clk_src",
959 .parent_names
= gcc_xo_gpll0
,
961 .ops
= &clk_rcg2_ops
,
965 static const struct freq_tbl ftbl_gcc_usb_hs_system_clk
[] = {
966 F(60000000, P_GPLL0
, 10, 0, 0),
967 F(75000000, P_GPLL0
, 8, 0, 0),
971 static struct clk_rcg2 usb_hs_system_clk_src
= {
974 .parent_map
= gcc_xo_gpll0_map
,
975 .freq_tbl
= ftbl_gcc_usb_hs_system_clk
,
976 .clkr
.hw
.init
= &(struct clk_init_data
){
977 .name
= "usb_hs_system_clk_src",
978 .parent_names
= gcc_xo_gpll0
,
980 .ops
= &clk_rcg2_ops
,
984 static const struct freq_tbl ftbl_gcc_usb_hsic_clk
[] = {
985 F(480000000, P_GPLL1
, 1, 0, 0),
989 static const struct parent_map usb_hsic_clk_src_map
[] = {
994 static struct clk_rcg2 usb_hsic_clk_src
= {
997 .parent_map
= usb_hsic_clk_src_map
,
998 .freq_tbl
= ftbl_gcc_usb_hsic_clk
,
999 .clkr
.hw
.init
= &(struct clk_init_data
){
1000 .name
= "usb_hsic_clk_src",
1001 .parent_names
= (const char *[]){
1006 .ops
= &clk_rcg2_ops
,
1010 static const struct freq_tbl ftbl_gcc_usb_hsic_io_cal_clk
[] = {
1011 F(9600000, P_XO
, 2, 0, 0),
1015 static struct clk_rcg2 usb_hsic_io_cal_clk_src
= {
1018 .parent_map
= gcc_xo_gpll0_map
,
1019 .freq_tbl
= ftbl_gcc_usb_hsic_io_cal_clk
,
1020 .clkr
.hw
.init
= &(struct clk_init_data
){
1021 .name
= "usb_hsic_io_cal_clk_src",
1022 .parent_names
= gcc_xo_gpll0
,
1024 .ops
= &clk_rcg2_ops
,
1028 static const struct freq_tbl ftbl_gcc_usb_hsic_system_clk
[] = {
1029 F(60000000, P_GPLL0
, 10, 0, 0),
1030 F(75000000, P_GPLL0
, 8, 0, 0),
1034 static struct clk_rcg2 usb_hsic_system_clk_src
= {
1037 .parent_map
= gcc_xo_gpll0_map
,
1038 .freq_tbl
= ftbl_gcc_usb_hsic_system_clk
,
1039 .clkr
.hw
.init
= &(struct clk_init_data
){
1040 .name
= "usb_hsic_system_clk_src",
1041 .parent_names
= gcc_xo_gpll0
,
1043 .ops
= &clk_rcg2_ops
,
1047 static struct clk_regmap gcc_mmss_gpll0_clk_src
= {
1048 .enable_reg
= 0x1484,
1049 .enable_mask
= BIT(26),
1050 .hw
.init
= &(struct clk_init_data
){
1051 .name
= "mmss_gpll0_vote",
1052 .parent_names
= (const char *[]){
1056 .ops
= &clk_branch_simple_ops
,
1060 static struct clk_branch gcc_bam_dma_ahb_clk
= {
1062 .halt_check
= BRANCH_HALT_VOTED
,
1064 .enable_reg
= 0x1484,
1065 .enable_mask
= BIT(12),
1066 .hw
.init
= &(struct clk_init_data
){
1067 .name
= "gcc_bam_dma_ahb_clk",
1068 .parent_names
= (const char *[]){
1069 "periph_noc_clk_src",
1072 .ops
= &clk_branch2_ops
,
1077 static struct clk_branch gcc_blsp1_ahb_clk
= {
1079 .halt_check
= BRANCH_HALT_VOTED
,
1081 .enable_reg
= 0x1484,
1082 .enable_mask
= BIT(17),
1083 .hw
.init
= &(struct clk_init_data
){
1084 .name
= "gcc_blsp1_ahb_clk",
1085 .parent_names
= (const char *[]){
1086 "periph_noc_clk_src",
1089 .ops
= &clk_branch2_ops
,
1094 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1097 .enable_reg
= 0x0648,
1098 .enable_mask
= BIT(0),
1099 .hw
.init
= &(struct clk_init_data
){
1100 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1101 .parent_names
= (const char *[]){
1102 "blsp1_qup1_i2c_apps_clk_src",
1105 .flags
= CLK_SET_RATE_PARENT
,
1106 .ops
= &clk_branch2_ops
,
1111 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1114 .enable_reg
= 0x0644,
1115 .enable_mask
= BIT(0),
1116 .hw
.init
= &(struct clk_init_data
){
1117 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1118 .parent_names
= (const char *[]){
1119 "blsp1_qup1_spi_apps_clk_src",
1122 .flags
= CLK_SET_RATE_PARENT
,
1123 .ops
= &clk_branch2_ops
,
1128 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1131 .enable_reg
= 0x06c8,
1132 .enable_mask
= BIT(0),
1133 .hw
.init
= &(struct clk_init_data
){
1134 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1135 .parent_names
= (const char *[]){
1136 "blsp1_qup2_i2c_apps_clk_src",
1139 .flags
= CLK_SET_RATE_PARENT
,
1140 .ops
= &clk_branch2_ops
,
1145 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1148 .enable_reg
= 0x06c4,
1149 .enable_mask
= BIT(0),
1150 .hw
.init
= &(struct clk_init_data
){
1151 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1152 .parent_names
= (const char *[]){
1153 "blsp1_qup2_spi_apps_clk_src",
1156 .flags
= CLK_SET_RATE_PARENT
,
1157 .ops
= &clk_branch2_ops
,
1162 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1165 .enable_reg
= 0x0748,
1166 .enable_mask
= BIT(0),
1167 .hw
.init
= &(struct clk_init_data
){
1168 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1169 .parent_names
= (const char *[]){
1170 "blsp1_qup3_i2c_apps_clk_src",
1173 .flags
= CLK_SET_RATE_PARENT
,
1174 .ops
= &clk_branch2_ops
,
1179 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1182 .enable_reg
= 0x0744,
1183 .enable_mask
= BIT(0),
1184 .hw
.init
= &(struct clk_init_data
){
1185 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1186 .parent_names
= (const char *[]){
1187 "blsp1_qup3_spi_apps_clk_src",
1190 .flags
= CLK_SET_RATE_PARENT
,
1191 .ops
= &clk_branch2_ops
,
1196 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1199 .enable_reg
= 0x07c8,
1200 .enable_mask
= BIT(0),
1201 .hw
.init
= &(struct clk_init_data
){
1202 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1203 .parent_names
= (const char *[]){
1204 "blsp1_qup4_i2c_apps_clk_src",
1207 .flags
= CLK_SET_RATE_PARENT
,
1208 .ops
= &clk_branch2_ops
,
1213 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1216 .enable_reg
= 0x07c4,
1217 .enable_mask
= BIT(0),
1218 .hw
.init
= &(struct clk_init_data
){
1219 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1220 .parent_names
= (const char *[]){
1221 "blsp1_qup4_spi_apps_clk_src",
1224 .flags
= CLK_SET_RATE_PARENT
,
1225 .ops
= &clk_branch2_ops
,
1230 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
1233 .enable_reg
= 0x0848,
1234 .enable_mask
= BIT(0),
1235 .hw
.init
= &(struct clk_init_data
){
1236 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
1237 .parent_names
= (const char *[]){
1238 "blsp1_qup5_i2c_apps_clk_src",
1241 .flags
= CLK_SET_RATE_PARENT
,
1242 .ops
= &clk_branch2_ops
,
1247 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
1250 .enable_reg
= 0x0844,
1251 .enable_mask
= BIT(0),
1252 .hw
.init
= &(struct clk_init_data
){
1253 .name
= "gcc_blsp1_qup5_spi_apps_clk",
1254 .parent_names
= (const char *[]){
1255 "blsp1_qup5_spi_apps_clk_src",
1258 .flags
= CLK_SET_RATE_PARENT
,
1259 .ops
= &clk_branch2_ops
,
1264 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
1267 .enable_reg
= 0x08c8,
1268 .enable_mask
= BIT(0),
1269 .hw
.init
= &(struct clk_init_data
){
1270 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
1271 .parent_names
= (const char *[]){
1272 "blsp1_qup6_i2c_apps_clk_src",
1275 .flags
= CLK_SET_RATE_PARENT
,
1276 .ops
= &clk_branch2_ops
,
1281 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
1284 .enable_reg
= 0x08c4,
1285 .enable_mask
= BIT(0),
1286 .hw
.init
= &(struct clk_init_data
){
1287 .name
= "gcc_blsp1_qup6_spi_apps_clk",
1288 .parent_names
= (const char *[]){
1289 "blsp1_qup6_spi_apps_clk_src",
1292 .flags
= CLK_SET_RATE_PARENT
,
1293 .ops
= &clk_branch2_ops
,
1298 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1301 .enable_reg
= 0x0684,
1302 .enable_mask
= BIT(0),
1303 .hw
.init
= &(struct clk_init_data
){
1304 .name
= "gcc_blsp1_uart1_apps_clk",
1305 .parent_names
= (const char *[]){
1306 "blsp1_uart1_apps_clk_src",
1309 .flags
= CLK_SET_RATE_PARENT
,
1310 .ops
= &clk_branch2_ops
,
1315 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1318 .enable_reg
= 0x0704,
1319 .enable_mask
= BIT(0),
1320 .hw
.init
= &(struct clk_init_data
){
1321 .name
= "gcc_blsp1_uart2_apps_clk",
1322 .parent_names
= (const char *[]){
1323 "blsp1_uart2_apps_clk_src",
1326 .flags
= CLK_SET_RATE_PARENT
,
1327 .ops
= &clk_branch2_ops
,
1332 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1335 .enable_reg
= 0x0784,
1336 .enable_mask
= BIT(0),
1337 .hw
.init
= &(struct clk_init_data
){
1338 .name
= "gcc_blsp1_uart3_apps_clk",
1339 .parent_names
= (const char *[]){
1340 "blsp1_uart3_apps_clk_src",
1343 .flags
= CLK_SET_RATE_PARENT
,
1344 .ops
= &clk_branch2_ops
,
1349 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1352 .enable_reg
= 0x0804,
1353 .enable_mask
= BIT(0),
1354 .hw
.init
= &(struct clk_init_data
){
1355 .name
= "gcc_blsp1_uart4_apps_clk",
1356 .parent_names
= (const char *[]){
1357 "blsp1_uart4_apps_clk_src",
1360 .flags
= CLK_SET_RATE_PARENT
,
1361 .ops
= &clk_branch2_ops
,
1366 static struct clk_branch gcc_blsp1_uart5_apps_clk
= {
1369 .enable_reg
= 0x0884,
1370 .enable_mask
= BIT(0),
1371 .hw
.init
= &(struct clk_init_data
){
1372 .name
= "gcc_blsp1_uart5_apps_clk",
1373 .parent_names
= (const char *[]){
1374 "blsp1_uart5_apps_clk_src",
1377 .flags
= CLK_SET_RATE_PARENT
,
1378 .ops
= &clk_branch2_ops
,
1383 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1386 .enable_reg
= 0x0904,
1387 .enable_mask
= BIT(0),
1388 .hw
.init
= &(struct clk_init_data
){
1389 .name
= "gcc_blsp1_uart6_apps_clk",
1390 .parent_names
= (const char *[]){
1391 "blsp1_uart6_apps_clk_src",
1394 .flags
= CLK_SET_RATE_PARENT
,
1395 .ops
= &clk_branch2_ops
,
1400 static struct clk_branch gcc_blsp2_ahb_clk
= {
1402 .halt_check
= BRANCH_HALT_VOTED
,
1404 .enable_reg
= 0x1484,
1405 .enable_mask
= BIT(15),
1406 .hw
.init
= &(struct clk_init_data
){
1407 .name
= "gcc_blsp2_ahb_clk",
1408 .parent_names
= (const char *[]){
1409 "periph_noc_clk_src",
1412 .ops
= &clk_branch2_ops
,
1417 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1420 .enable_reg
= 0x0988,
1421 .enable_mask
= BIT(0),
1422 .hw
.init
= &(struct clk_init_data
){
1423 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1424 .parent_names
= (const char *[]){
1425 "blsp2_qup1_i2c_apps_clk_src",
1428 .flags
= CLK_SET_RATE_PARENT
,
1429 .ops
= &clk_branch2_ops
,
1434 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1437 .enable_reg
= 0x0984,
1438 .enable_mask
= BIT(0),
1439 .hw
.init
= &(struct clk_init_data
){
1440 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1441 .parent_names
= (const char *[]){
1442 "blsp2_qup1_spi_apps_clk_src",
1445 .flags
= CLK_SET_RATE_PARENT
,
1446 .ops
= &clk_branch2_ops
,
1451 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1454 .enable_reg
= 0x0a08,
1455 .enable_mask
= BIT(0),
1456 .hw
.init
= &(struct clk_init_data
){
1457 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1458 .parent_names
= (const char *[]){
1459 "blsp2_qup2_i2c_apps_clk_src",
1462 .flags
= CLK_SET_RATE_PARENT
,
1463 .ops
= &clk_branch2_ops
,
1468 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1471 .enable_reg
= 0x0a04,
1472 .enable_mask
= BIT(0),
1473 .hw
.init
= &(struct clk_init_data
){
1474 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1475 .parent_names
= (const char *[]){
1476 "blsp2_qup2_spi_apps_clk_src",
1479 .flags
= CLK_SET_RATE_PARENT
,
1480 .ops
= &clk_branch2_ops
,
1485 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1488 .enable_reg
= 0x0a88,
1489 .enable_mask
= BIT(0),
1490 .hw
.init
= &(struct clk_init_data
){
1491 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1492 .parent_names
= (const char *[]){
1493 "blsp2_qup3_i2c_apps_clk_src",
1496 .flags
= CLK_SET_RATE_PARENT
,
1497 .ops
= &clk_branch2_ops
,
1502 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1505 .enable_reg
= 0x0a84,
1506 .enable_mask
= BIT(0),
1507 .hw
.init
= &(struct clk_init_data
){
1508 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1509 .parent_names
= (const char *[]){
1510 "blsp2_qup3_spi_apps_clk_src",
1513 .flags
= CLK_SET_RATE_PARENT
,
1514 .ops
= &clk_branch2_ops
,
1519 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk
= {
1522 .enable_reg
= 0x0b08,
1523 .enable_mask
= BIT(0),
1524 .hw
.init
= &(struct clk_init_data
){
1525 .name
= "gcc_blsp2_qup4_i2c_apps_clk",
1526 .parent_names
= (const char *[]){
1527 "blsp2_qup4_i2c_apps_clk_src",
1530 .flags
= CLK_SET_RATE_PARENT
,
1531 .ops
= &clk_branch2_ops
,
1536 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk
= {
1539 .enable_reg
= 0x0b04,
1540 .enable_mask
= BIT(0),
1541 .hw
.init
= &(struct clk_init_data
){
1542 .name
= "gcc_blsp2_qup4_spi_apps_clk",
1543 .parent_names
= (const char *[]){
1544 "blsp2_qup4_spi_apps_clk_src",
1547 .flags
= CLK_SET_RATE_PARENT
,
1548 .ops
= &clk_branch2_ops
,
1553 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk
= {
1556 .enable_reg
= 0x0b88,
1557 .enable_mask
= BIT(0),
1558 .hw
.init
= &(struct clk_init_data
){
1559 .name
= "gcc_blsp2_qup5_i2c_apps_clk",
1560 .parent_names
= (const char *[]){
1561 "blsp2_qup5_i2c_apps_clk_src",
1564 .flags
= CLK_SET_RATE_PARENT
,
1565 .ops
= &clk_branch2_ops
,
1570 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk
= {
1573 .enable_reg
= 0x0b84,
1574 .enable_mask
= BIT(0),
1575 .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
){
1593 .name
= "gcc_blsp2_qup6_i2c_apps_clk",
1594 .parent_names
= (const char *[]){
1595 "blsp2_qup6_i2c_apps_clk_src",
1598 .flags
= CLK_SET_RATE_PARENT
,
1599 .ops
= &clk_branch2_ops
,
1604 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk
= {
1607 .enable_reg
= 0x0c04,
1608 .enable_mask
= BIT(0),
1609 .hw
.init
= &(struct clk_init_data
){
1610 .name
= "gcc_blsp2_qup6_spi_apps_clk",
1611 .parent_names
= (const char *[]){
1612 "blsp2_qup6_spi_apps_clk_src",
1615 .flags
= CLK_SET_RATE_PARENT
,
1616 .ops
= &clk_branch2_ops
,
1621 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1624 .enable_reg
= 0x09c4,
1625 .enable_mask
= BIT(0),
1626 .hw
.init
= &(struct clk_init_data
){
1627 .name
= "gcc_blsp2_uart1_apps_clk",
1628 .parent_names
= (const char *[]){
1629 "blsp2_uart1_apps_clk_src",
1632 .flags
= CLK_SET_RATE_PARENT
,
1633 .ops
= &clk_branch2_ops
,
1638 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1641 .enable_reg
= 0x0a44,
1642 .enable_mask
= BIT(0),
1643 .hw
.init
= &(struct clk_init_data
){
1644 .name
= "gcc_blsp2_uart2_apps_clk",
1645 .parent_names
= (const char *[]){
1646 "blsp2_uart2_apps_clk_src",
1649 .flags
= CLK_SET_RATE_PARENT
,
1650 .ops
= &clk_branch2_ops
,
1655 static struct clk_branch gcc_blsp2_uart3_apps_clk
= {
1658 .enable_reg
= 0x0ac4,
1659 .enable_mask
= BIT(0),
1660 .hw
.init
= &(struct clk_init_data
){
1661 .name
= "gcc_blsp2_uart3_apps_clk",
1662 .parent_names
= (const char *[]){
1663 "blsp2_uart3_apps_clk_src",
1666 .flags
= CLK_SET_RATE_PARENT
,
1667 .ops
= &clk_branch2_ops
,
1672 static struct clk_branch gcc_blsp2_uart4_apps_clk
= {
1675 .enable_reg
= 0x0b44,
1676 .enable_mask
= BIT(0),
1677 .hw
.init
= &(struct clk_init_data
){
1678 .name
= "gcc_blsp2_uart4_apps_clk",
1679 .parent_names
= (const char *[]){
1680 "blsp2_uart4_apps_clk_src",
1683 .flags
= CLK_SET_RATE_PARENT
,
1684 .ops
= &clk_branch2_ops
,
1689 static struct clk_branch gcc_blsp2_uart5_apps_clk
= {
1692 .enable_reg
= 0x0bc4,
1693 .enable_mask
= BIT(0),
1694 .hw
.init
= &(struct clk_init_data
){
1695 .name
= "gcc_blsp2_uart5_apps_clk",
1696 .parent_names
= (const char *[]){
1697 "blsp2_uart5_apps_clk_src",
1700 .flags
= CLK_SET_RATE_PARENT
,
1701 .ops
= &clk_branch2_ops
,
1706 static struct clk_branch gcc_blsp2_uart6_apps_clk
= {
1709 .enable_reg
= 0x0c44,
1710 .enable_mask
= BIT(0),
1711 .hw
.init
= &(struct clk_init_data
){
1712 .name
= "gcc_blsp2_uart6_apps_clk",
1713 .parent_names
= (const char *[]){
1714 "blsp2_uart6_apps_clk_src",
1717 .flags
= CLK_SET_RATE_PARENT
,
1718 .ops
= &clk_branch2_ops
,
1723 static struct clk_branch gcc_boot_rom_ahb_clk
= {
1725 .halt_check
= BRANCH_HALT_VOTED
,
1727 .enable_reg
= 0x1484,
1728 .enable_mask
= BIT(10),
1729 .hw
.init
= &(struct clk_init_data
){
1730 .name
= "gcc_boot_rom_ahb_clk",
1731 .parent_names
= (const char *[]){
1732 "config_noc_clk_src",
1735 .ops
= &clk_branch2_ops
,
1740 static struct clk_branch gcc_ce1_ahb_clk
= {
1742 .halt_check
= BRANCH_HALT_VOTED
,
1744 .enable_reg
= 0x1484,
1745 .enable_mask
= BIT(3),
1746 .hw
.init
= &(struct clk_init_data
){
1747 .name
= "gcc_ce1_ahb_clk",
1748 .parent_names
= (const char *[]){
1749 "config_noc_clk_src",
1752 .ops
= &clk_branch2_ops
,
1757 static struct clk_branch gcc_ce1_axi_clk
= {
1759 .halt_check
= BRANCH_HALT_VOTED
,
1761 .enable_reg
= 0x1484,
1762 .enable_mask
= BIT(4),
1763 .hw
.init
= &(struct clk_init_data
){
1764 .name
= "gcc_ce1_axi_clk",
1765 .parent_names
= (const char *[]){
1766 "system_noc_clk_src",
1769 .ops
= &clk_branch2_ops
,
1774 static struct clk_branch gcc_ce1_clk
= {
1776 .halt_check
= BRANCH_HALT_VOTED
,
1778 .enable_reg
= 0x1484,
1779 .enable_mask
= BIT(5),
1780 .hw
.init
= &(struct clk_init_data
){
1781 .name
= "gcc_ce1_clk",
1782 .parent_names
= (const char *[]){
1786 .ops
= &clk_branch2_ops
,
1791 static struct clk_branch gcc_ce2_ahb_clk
= {
1793 .halt_check
= BRANCH_HALT_VOTED
,
1795 .enable_reg
= 0x1484,
1796 .enable_mask
= BIT(0),
1797 .hw
.init
= &(struct clk_init_data
){
1798 .name
= "gcc_ce2_ahb_clk",
1799 .parent_names
= (const char *[]){
1800 "config_noc_clk_src",
1803 .ops
= &clk_branch2_ops
,
1808 static struct clk_branch gcc_ce2_axi_clk
= {
1810 .halt_check
= BRANCH_HALT_VOTED
,
1812 .enable_reg
= 0x1484,
1813 .enable_mask
= BIT(1),
1814 .hw
.init
= &(struct clk_init_data
){
1815 .name
= "gcc_ce2_axi_clk",
1816 .parent_names
= (const char *[]){
1817 "system_noc_clk_src",
1820 .ops
= &clk_branch2_ops
,
1825 static struct clk_branch gcc_ce2_clk
= {
1827 .halt_check
= BRANCH_HALT_VOTED
,
1829 .enable_reg
= 0x1484,
1830 .enable_mask
= BIT(2),
1831 .hw
.init
= &(struct clk_init_data
){
1832 .name
= "gcc_ce2_clk",
1833 .parent_names
= (const char *[]){
1837 .flags
= CLK_SET_RATE_PARENT
,
1838 .ops
= &clk_branch2_ops
,
1843 static struct clk_branch gcc_gp1_clk
= {
1846 .enable_reg
= 0x1900,
1847 .enable_mask
= BIT(0),
1848 .hw
.init
= &(struct clk_init_data
){
1849 .name
= "gcc_gp1_clk",
1850 .parent_names
= (const char *[]){
1854 .flags
= CLK_SET_RATE_PARENT
,
1855 .ops
= &clk_branch2_ops
,
1860 static struct clk_branch gcc_gp2_clk
= {
1863 .enable_reg
= 0x1940,
1864 .enable_mask
= BIT(0),
1865 .hw
.init
= &(struct clk_init_data
){
1866 .name
= "gcc_gp2_clk",
1867 .parent_names
= (const char *[]){
1871 .flags
= CLK_SET_RATE_PARENT
,
1872 .ops
= &clk_branch2_ops
,
1877 static struct clk_branch gcc_gp3_clk
= {
1880 .enable_reg
= 0x1980,
1881 .enable_mask
= BIT(0),
1882 .hw
.init
= &(struct clk_init_data
){
1883 .name
= "gcc_gp3_clk",
1884 .parent_names
= (const char *[]){
1888 .flags
= CLK_SET_RATE_PARENT
,
1889 .ops
= &clk_branch2_ops
,
1894 static struct clk_branch gcc_lpass_q6_axi_clk
= {
1897 .enable_reg
= 0x11c0,
1898 .enable_mask
= BIT(0),
1899 .hw
.init
= &(struct clk_init_data
){
1900 .name
= "gcc_lpass_q6_axi_clk",
1901 .parent_names
= (const char *[]){
1902 "system_noc_clk_src",
1905 .ops
= &clk_branch2_ops
,
1910 static struct clk_branch gcc_mmss_noc_cfg_ahb_clk
= {
1913 .enable_reg
= 0x024c,
1914 .enable_mask
= BIT(0),
1915 .hw
.init
= &(struct clk_init_data
){
1916 .name
= "gcc_mmss_noc_cfg_ahb_clk",
1917 .parent_names
= (const char *[]){
1918 "config_noc_clk_src",
1921 .ops
= &clk_branch2_ops
,
1922 .flags
= CLK_IGNORE_UNUSED
,
1927 static struct clk_branch gcc_ocmem_noc_cfg_ahb_clk
= {
1930 .enable_reg
= 0x0248,
1931 .enable_mask
= BIT(0),
1932 .hw
.init
= &(struct clk_init_data
){
1933 .name
= "gcc_ocmem_noc_cfg_ahb_clk",
1934 .parent_names
= (const char *[]){
1935 "config_noc_clk_src",
1938 .ops
= &clk_branch2_ops
,
1943 static struct clk_branch gcc_mss_cfg_ahb_clk
= {
1946 .enable_reg
= 0x0280,
1947 .enable_mask
= BIT(0),
1948 .hw
.init
= &(struct clk_init_data
){
1949 .name
= "gcc_mss_cfg_ahb_clk",
1950 .parent_names
= (const char *[]){
1951 "config_noc_clk_src",
1954 .ops
= &clk_branch2_ops
,
1959 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
1962 .enable_reg
= 0x0284,
1963 .enable_mask
= BIT(0),
1964 .hw
.init
= &(struct clk_init_data
){
1965 .name
= "gcc_mss_q6_bimc_axi_clk",
1966 .flags
= CLK_IS_ROOT
,
1967 .ops
= &clk_branch2_ops
,
1972 static struct clk_branch gcc_pdm2_clk
= {
1975 .enable_reg
= 0x0ccc,
1976 .enable_mask
= BIT(0),
1977 .hw
.init
= &(struct clk_init_data
){
1978 .name
= "gcc_pdm2_clk",
1979 .parent_names
= (const char *[]){
1983 .flags
= CLK_SET_RATE_PARENT
,
1984 .ops
= &clk_branch2_ops
,
1989 static struct clk_branch gcc_pdm_ahb_clk
= {
1992 .enable_reg
= 0x0cc4,
1993 .enable_mask
= BIT(0),
1994 .hw
.init
= &(struct clk_init_data
){
1995 .name
= "gcc_pdm_ahb_clk",
1996 .parent_names
= (const char *[]){
1997 "periph_noc_clk_src",
2000 .ops
= &clk_branch2_ops
,
2005 static struct clk_branch gcc_prng_ahb_clk
= {
2007 .halt_check
= BRANCH_HALT_VOTED
,
2009 .enable_reg
= 0x1484,
2010 .enable_mask
= BIT(13),
2011 .hw
.init
= &(struct clk_init_data
){
2012 .name
= "gcc_prng_ahb_clk",
2013 .parent_names
= (const char *[]){
2014 "periph_noc_clk_src",
2017 .ops
= &clk_branch2_ops
,
2022 static struct clk_branch gcc_sdcc1_ahb_clk
= {
2025 .enable_reg
= 0x04c8,
2026 .enable_mask
= BIT(0),
2027 .hw
.init
= &(struct clk_init_data
){
2028 .name
= "gcc_sdcc1_ahb_clk",
2029 .parent_names
= (const char *[]){
2030 "periph_noc_clk_src",
2033 .ops
= &clk_branch2_ops
,
2038 static struct clk_branch gcc_sdcc1_apps_clk
= {
2041 .enable_reg
= 0x04c4,
2042 .enable_mask
= BIT(0),
2043 .hw
.init
= &(struct clk_init_data
){
2044 .name
= "gcc_sdcc1_apps_clk",
2045 .parent_names
= (const char *[]){
2046 "sdcc1_apps_clk_src",
2049 .flags
= CLK_SET_RATE_PARENT
,
2050 .ops
= &clk_branch2_ops
,
2055 static struct clk_branch gcc_sdcc1_cdccal_ff_clk
= {
2058 .enable_reg
= 0x04e8,
2059 .enable_mask
= BIT(0),
2060 .hw
.init
= &(struct clk_init_data
){
2061 .name
= "gcc_sdcc1_cdccal_ff_clk",
2062 .parent_names
= (const char *[]){
2066 .ops
= &clk_branch2_ops
,
2071 static struct clk_branch gcc_sdcc1_cdccal_sleep_clk
= {
2074 .enable_reg
= 0x04e4,
2075 .enable_mask
= BIT(0),
2076 .hw
.init
= &(struct clk_init_data
){
2077 .name
= "gcc_sdcc1_cdccal_sleep_clk",
2078 .parent_names
= (const char *[]){
2082 .ops
= &clk_branch2_ops
,
2087 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2090 .enable_reg
= 0x0508,
2091 .enable_mask
= BIT(0),
2092 .hw
.init
= &(struct clk_init_data
){
2093 .name
= "gcc_sdcc2_ahb_clk",
2094 .parent_names
= (const char *[]){
2095 "periph_noc_clk_src",
2098 .ops
= &clk_branch2_ops
,
2103 static struct clk_branch gcc_sdcc2_apps_clk
= {
2106 .enable_reg
= 0x0504,
2107 .enable_mask
= BIT(0),
2108 .hw
.init
= &(struct clk_init_data
){
2109 .name
= "gcc_sdcc2_apps_clk",
2110 .parent_names
= (const char *[]){
2111 "sdcc2_apps_clk_src",
2114 .flags
= CLK_SET_RATE_PARENT
,
2115 .ops
= &clk_branch2_ops
,
2120 static struct clk_branch gcc_sdcc3_ahb_clk
= {
2123 .enable_reg
= 0x0548,
2124 .enable_mask
= BIT(0),
2125 .hw
.init
= &(struct clk_init_data
){
2126 .name
= "gcc_sdcc3_ahb_clk",
2127 .parent_names
= (const char *[]){
2128 "periph_noc_clk_src",
2131 .ops
= &clk_branch2_ops
,
2136 static struct clk_branch gcc_sdcc3_apps_clk
= {
2139 .enable_reg
= 0x0544,
2140 .enable_mask
= BIT(0),
2141 .hw
.init
= &(struct clk_init_data
){
2142 .name
= "gcc_sdcc3_apps_clk",
2143 .parent_names
= (const char *[]){
2144 "sdcc3_apps_clk_src",
2147 .flags
= CLK_SET_RATE_PARENT
,
2148 .ops
= &clk_branch2_ops
,
2153 static struct clk_branch gcc_sdcc4_ahb_clk
= {
2156 .enable_reg
= 0x0588,
2157 .enable_mask
= BIT(0),
2158 .hw
.init
= &(struct clk_init_data
){
2159 .name
= "gcc_sdcc4_ahb_clk",
2160 .parent_names
= (const char *[]){
2161 "periph_noc_clk_src",
2164 .ops
= &clk_branch2_ops
,
2169 static struct clk_branch gcc_sdcc4_apps_clk
= {
2172 .enable_reg
= 0x0584,
2173 .enable_mask
= BIT(0),
2174 .hw
.init
= &(struct clk_init_data
){
2175 .name
= "gcc_sdcc4_apps_clk",
2176 .parent_names
= (const char *[]){
2177 "sdcc4_apps_clk_src",
2180 .flags
= CLK_SET_RATE_PARENT
,
2181 .ops
= &clk_branch2_ops
,
2186 static struct clk_branch gcc_sys_noc_usb3_axi_clk
= {
2189 .enable_reg
= 0x0108,
2190 .enable_mask
= BIT(0),
2191 .hw
.init
= &(struct clk_init_data
){
2192 .name
= "gcc_sys_noc_usb3_axi_clk",
2193 .parent_names
= (const char *[]){
2194 "usb30_master_clk_src",
2197 .flags
= CLK_SET_RATE_PARENT
,
2198 .ops
= &clk_branch2_ops
,
2203 static struct clk_branch gcc_tsif_ahb_clk
= {
2206 .enable_reg
= 0x0d84,
2207 .enable_mask
= BIT(0),
2208 .hw
.init
= &(struct clk_init_data
){
2209 .name
= "gcc_tsif_ahb_clk",
2210 .parent_names
= (const char *[]){
2211 "periph_noc_clk_src",
2214 .ops
= &clk_branch2_ops
,
2219 static struct clk_branch gcc_tsif_ref_clk
= {
2222 .enable_reg
= 0x0d88,
2223 .enable_mask
= BIT(0),
2224 .hw
.init
= &(struct clk_init_data
){
2225 .name
= "gcc_tsif_ref_clk",
2226 .parent_names
= (const char *[]){
2230 .flags
= CLK_SET_RATE_PARENT
,
2231 .ops
= &clk_branch2_ops
,
2236 static struct clk_branch gcc_usb2a_phy_sleep_clk
= {
2239 .enable_reg
= 0x04ac,
2240 .enable_mask
= BIT(0),
2241 .hw
.init
= &(struct clk_init_data
){
2242 .name
= "gcc_usb2a_phy_sleep_clk",
2243 .parent_names
= (const char *[]){
2247 .ops
= &clk_branch2_ops
,
2252 static struct clk_branch gcc_usb2b_phy_sleep_clk
= {
2255 .enable_reg
= 0x04b4,
2256 .enable_mask
= BIT(0),
2257 .hw
.init
= &(struct clk_init_data
){
2258 .name
= "gcc_usb2b_phy_sleep_clk",
2259 .parent_names
= (const char *[]){
2263 .ops
= &clk_branch2_ops
,
2268 static struct clk_branch gcc_usb30_master_clk
= {
2271 .enable_reg
= 0x03c8,
2272 .enable_mask
= BIT(0),
2273 .hw
.init
= &(struct clk_init_data
){
2274 .name
= "gcc_usb30_master_clk",
2275 .parent_names
= (const char *[]){
2276 "usb30_master_clk_src",
2279 .flags
= CLK_SET_RATE_PARENT
,
2280 .ops
= &clk_branch2_ops
,
2285 static struct clk_branch gcc_usb30_mock_utmi_clk
= {
2288 .enable_reg
= 0x03d0,
2289 .enable_mask
= BIT(0),
2290 .hw
.init
= &(struct clk_init_data
){
2291 .name
= "gcc_usb30_mock_utmi_clk",
2292 .parent_names
= (const char *[]){
2293 "usb30_mock_utmi_clk_src",
2296 .flags
= CLK_SET_RATE_PARENT
,
2297 .ops
= &clk_branch2_ops
,
2302 static struct clk_branch gcc_usb30_sleep_clk
= {
2305 .enable_reg
= 0x03cc,
2306 .enable_mask
= BIT(0),
2307 .hw
.init
= &(struct clk_init_data
){
2308 .name
= "gcc_usb30_sleep_clk",
2309 .parent_names
= (const char *[]){
2313 .ops
= &clk_branch2_ops
,
2318 static struct clk_branch gcc_usb_hs_ahb_clk
= {
2321 .enable_reg
= 0x0488,
2322 .enable_mask
= BIT(0),
2323 .hw
.init
= &(struct clk_init_data
){
2324 .name
= "gcc_usb_hs_ahb_clk",
2325 .parent_names
= (const char *[]){
2326 "periph_noc_clk_src",
2329 .ops
= &clk_branch2_ops
,
2334 static struct clk_branch gcc_usb_hs_system_clk
= {
2337 .enable_reg
= 0x0484,
2338 .enable_mask
= BIT(0),
2339 .hw
.init
= &(struct clk_init_data
){
2340 .name
= "gcc_usb_hs_system_clk",
2341 .parent_names
= (const char *[]){
2342 "usb_hs_system_clk_src",
2345 .flags
= CLK_SET_RATE_PARENT
,
2346 .ops
= &clk_branch2_ops
,
2351 static struct clk_branch gcc_usb_hsic_ahb_clk
= {
2354 .enable_reg
= 0x0408,
2355 .enable_mask
= BIT(0),
2356 .hw
.init
= &(struct clk_init_data
){
2357 .name
= "gcc_usb_hsic_ahb_clk",
2358 .parent_names
= (const char *[]){
2359 "periph_noc_clk_src",
2362 .ops
= &clk_branch2_ops
,
2367 static struct clk_branch gcc_usb_hsic_clk
= {
2370 .enable_reg
= 0x0410,
2371 .enable_mask
= BIT(0),
2372 .hw
.init
= &(struct clk_init_data
){
2373 .name
= "gcc_usb_hsic_clk",
2374 .parent_names
= (const char *[]){
2378 .flags
= CLK_SET_RATE_PARENT
,
2379 .ops
= &clk_branch2_ops
,
2384 static struct clk_branch gcc_usb_hsic_io_cal_clk
= {
2387 .enable_reg
= 0x0414,
2388 .enable_mask
= BIT(0),
2389 .hw
.init
= &(struct clk_init_data
){
2390 .name
= "gcc_usb_hsic_io_cal_clk",
2391 .parent_names
= (const char *[]){
2392 "usb_hsic_io_cal_clk_src",
2395 .flags
= CLK_SET_RATE_PARENT
,
2396 .ops
= &clk_branch2_ops
,
2401 static struct clk_branch gcc_usb_hsic_io_cal_sleep_clk
= {
2404 .enable_reg
= 0x0418,
2405 .enable_mask
= BIT(0),
2406 .hw
.init
= &(struct clk_init_data
){
2407 .name
= "gcc_usb_hsic_io_cal_sleep_clk",
2408 .parent_names
= (const char *[]){
2412 .ops
= &clk_branch2_ops
,
2417 static struct clk_branch gcc_usb_hsic_system_clk
= {
2420 .enable_reg
= 0x040c,
2421 .enable_mask
= BIT(0),
2422 .hw
.init
= &(struct clk_init_data
){
2423 .name
= "gcc_usb_hsic_system_clk",
2424 .parent_names
= (const char *[]){
2425 "usb_hsic_system_clk_src",
2428 .flags
= CLK_SET_RATE_PARENT
,
2429 .ops
= &clk_branch2_ops
,
2434 static struct clk_regmap
*gcc_msm8974_clocks
[] = {
2435 [GPLL0
] = &gpll0
.clkr
,
2436 [GPLL0_VOTE
] = &gpll0_vote
,
2437 [CONFIG_NOC_CLK_SRC
] = &config_noc_clk_src
.clkr
,
2438 [PERIPH_NOC_CLK_SRC
] = &periph_noc_clk_src
.clkr
,
2439 [SYSTEM_NOC_CLK_SRC
] = &system_noc_clk_src
.clkr
,
2440 [GPLL1
] = &gpll1
.clkr
,
2441 [GPLL1_VOTE
] = &gpll1_vote
,
2442 [USB30_MASTER_CLK_SRC
] = &usb30_master_clk_src
.clkr
,
2443 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
2444 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
2445 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
2446 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
2447 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
2448 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
2449 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
2450 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
2451 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
2452 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
2453 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
2454 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
2455 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
2456 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
2457 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
2458 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
2459 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
2460 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
2461 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
2462 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
2463 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
2464 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
2465 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
2466 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
2467 [BLSP2_QUP4_I2C_APPS_CLK_SRC
] = &blsp2_qup4_i2c_apps_clk_src
.clkr
,
2468 [BLSP2_QUP4_SPI_APPS_CLK_SRC
] = &blsp2_qup4_spi_apps_clk_src
.clkr
,
2469 [BLSP2_QUP5_I2C_APPS_CLK_SRC
] = &blsp2_qup5_i2c_apps_clk_src
.clkr
,
2470 [BLSP2_QUP5_SPI_APPS_CLK_SRC
] = &blsp2_qup5_spi_apps_clk_src
.clkr
,
2471 [BLSP2_QUP6_I2C_APPS_CLK_SRC
] = &blsp2_qup6_i2c_apps_clk_src
.clkr
,
2472 [BLSP2_QUP6_SPI_APPS_CLK_SRC
] = &blsp2_qup6_spi_apps_clk_src
.clkr
,
2473 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
2474 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
2475 [BLSP2_UART3_APPS_CLK_SRC
] = &blsp2_uart3_apps_clk_src
.clkr
,
2476 [BLSP2_UART4_APPS_CLK_SRC
] = &blsp2_uart4_apps_clk_src
.clkr
,
2477 [BLSP2_UART5_APPS_CLK_SRC
] = &blsp2_uart5_apps_clk_src
.clkr
,
2478 [BLSP2_UART6_APPS_CLK_SRC
] = &blsp2_uart6_apps_clk_src
.clkr
,
2479 [CE1_CLK_SRC
] = &ce1_clk_src
.clkr
,
2480 [CE2_CLK_SRC
] = &ce2_clk_src
.clkr
,
2481 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
2482 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
2483 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
2484 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
2485 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
2486 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
2487 [SDCC3_APPS_CLK_SRC
] = &sdcc3_apps_clk_src
.clkr
,
2488 [SDCC4_APPS_CLK_SRC
] = &sdcc4_apps_clk_src
.clkr
,
2489 [TSIF_REF_CLK_SRC
] = &tsif_ref_clk_src
.clkr
,
2490 [USB30_MOCK_UTMI_CLK_SRC
] = &usb30_mock_utmi_clk_src
.clkr
,
2491 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
2492 [USB_HSIC_CLK_SRC
] = &usb_hsic_clk_src
.clkr
,
2493 [USB_HSIC_IO_CAL_CLK_SRC
] = &usb_hsic_io_cal_clk_src
.clkr
,
2494 [USB_HSIC_SYSTEM_CLK_SRC
] = &usb_hsic_system_clk_src
.clkr
,
2495 [GCC_BAM_DMA_AHB_CLK
] = &gcc_bam_dma_ahb_clk
.clkr
,
2496 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
2497 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
2498 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
2499 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
2500 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
2501 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
2502 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
2503 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
2504 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
2505 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
2506 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
2507 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
2508 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
2509 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
2510 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
2511 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
2512 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
2513 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
2514 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
2515 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
2516 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
2517 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
2518 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
2519 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
2520 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
2521 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
2522 [GCC_BLSP2_QUP4_I2C_APPS_CLK
] = &gcc_blsp2_qup4_i2c_apps_clk
.clkr
,
2523 [GCC_BLSP2_QUP4_SPI_APPS_CLK
] = &gcc_blsp2_qup4_spi_apps_clk
.clkr
,
2524 [GCC_BLSP2_QUP5_I2C_APPS_CLK
] = &gcc_blsp2_qup5_i2c_apps_clk
.clkr
,
2525 [GCC_BLSP2_QUP5_SPI_APPS_CLK
] = &gcc_blsp2_qup5_spi_apps_clk
.clkr
,
2526 [GCC_BLSP2_QUP6_I2C_APPS_CLK
] = &gcc_blsp2_qup6_i2c_apps_clk
.clkr
,
2527 [GCC_BLSP2_QUP6_SPI_APPS_CLK
] = &gcc_blsp2_qup6_spi_apps_clk
.clkr
,
2528 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
2529 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
2530 [GCC_BLSP2_UART3_APPS_CLK
] = &gcc_blsp2_uart3_apps_clk
.clkr
,
2531 [GCC_BLSP2_UART4_APPS_CLK
] = &gcc_blsp2_uart4_apps_clk
.clkr
,
2532 [GCC_BLSP2_UART5_APPS_CLK
] = &gcc_blsp2_uart5_apps_clk
.clkr
,
2533 [GCC_BLSP2_UART6_APPS_CLK
] = &gcc_blsp2_uart6_apps_clk
.clkr
,
2534 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
2535 [GCC_CE1_AHB_CLK
] = &gcc_ce1_ahb_clk
.clkr
,
2536 [GCC_CE1_AXI_CLK
] = &gcc_ce1_axi_clk
.clkr
,
2537 [GCC_CE1_CLK
] = &gcc_ce1_clk
.clkr
,
2538 [GCC_CE2_AHB_CLK
] = &gcc_ce2_ahb_clk
.clkr
,
2539 [GCC_CE2_AXI_CLK
] = &gcc_ce2_axi_clk
.clkr
,
2540 [GCC_CE2_CLK
] = &gcc_ce2_clk
.clkr
,
2541 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2542 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2543 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2544 [GCC_LPASS_Q6_AXI_CLK
] = &gcc_lpass_q6_axi_clk
.clkr
,
2545 [GCC_MMSS_NOC_CFG_AHB_CLK
] = &gcc_mmss_noc_cfg_ahb_clk
.clkr
,
2546 [GCC_OCMEM_NOC_CFG_AHB_CLK
] = &gcc_ocmem_noc_cfg_ahb_clk
.clkr
,
2547 [GCC_MSS_CFG_AHB_CLK
] = &gcc_mss_cfg_ahb_clk
.clkr
,
2548 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
2549 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2550 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
2551 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
2552 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2553 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2554 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
2555 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2556 [GCC_SDCC3_AHB_CLK
] = &gcc_sdcc3_ahb_clk
.clkr
,
2557 [GCC_SDCC3_APPS_CLK
] = &gcc_sdcc3_apps_clk
.clkr
,
2558 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
2559 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
2560 [GCC_SYS_NOC_USB3_AXI_CLK
] = &gcc_sys_noc_usb3_axi_clk
.clkr
,
2561 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
2562 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
2563 [GCC_USB2A_PHY_SLEEP_CLK
] = &gcc_usb2a_phy_sleep_clk
.clkr
,
2564 [GCC_USB2B_PHY_SLEEP_CLK
] = &gcc_usb2b_phy_sleep_clk
.clkr
,
2565 [GCC_USB30_MASTER_CLK
] = &gcc_usb30_master_clk
.clkr
,
2566 [GCC_USB30_MOCK_UTMI_CLK
] = &gcc_usb30_mock_utmi_clk
.clkr
,
2567 [GCC_USB30_SLEEP_CLK
] = &gcc_usb30_sleep_clk
.clkr
,
2568 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
2569 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
2570 [GCC_USB_HSIC_AHB_CLK
] = &gcc_usb_hsic_ahb_clk
.clkr
,
2571 [GCC_USB_HSIC_CLK
] = &gcc_usb_hsic_clk
.clkr
,
2572 [GCC_USB_HSIC_IO_CAL_CLK
] = &gcc_usb_hsic_io_cal_clk
.clkr
,
2573 [GCC_USB_HSIC_IO_CAL_SLEEP_CLK
] = &gcc_usb_hsic_io_cal_sleep_clk
.clkr
,
2574 [GCC_USB_HSIC_SYSTEM_CLK
] = &gcc_usb_hsic_system_clk
.clkr
,
2575 [GCC_MMSS_GPLL0_CLK_SRC
] = &gcc_mmss_gpll0_clk_src
,
2577 [GPLL4_VOTE
] = NULL
,
2578 [GCC_SDCC1_CDCCAL_SLEEP_CLK
] = NULL
,
2579 [GCC_SDCC1_CDCCAL_FF_CLK
] = NULL
,
2582 static const struct qcom_reset_map gcc_msm8974_resets
[] = {
2583 [GCC_SYSTEM_NOC_BCR
] = { 0x0100 },
2584 [GCC_CONFIG_NOC_BCR
] = { 0x0140 },
2585 [GCC_PERIPH_NOC_BCR
] = { 0x0180 },
2586 [GCC_IMEM_BCR
] = { 0x0200 },
2587 [GCC_MMSS_BCR
] = { 0x0240 },
2588 [GCC_QDSS_BCR
] = { 0x0300 },
2589 [GCC_USB_30_BCR
] = { 0x03c0 },
2590 [GCC_USB3_PHY_BCR
] = { 0x03fc },
2591 [GCC_USB_HS_HSIC_BCR
] = { 0x0400 },
2592 [GCC_USB_HS_BCR
] = { 0x0480 },
2593 [GCC_USB2A_PHY_BCR
] = { 0x04a8 },
2594 [GCC_USB2B_PHY_BCR
] = { 0x04b0 },
2595 [GCC_SDCC1_BCR
] = { 0x04c0 },
2596 [GCC_SDCC2_BCR
] = { 0x0500 },
2597 [GCC_SDCC3_BCR
] = { 0x0540 },
2598 [GCC_SDCC4_BCR
] = { 0x0580 },
2599 [GCC_BLSP1_BCR
] = { 0x05c0 },
2600 [GCC_BLSP1_QUP1_BCR
] = { 0x0640 },
2601 [GCC_BLSP1_UART1_BCR
] = { 0x0680 },
2602 [GCC_BLSP1_QUP2_BCR
] = { 0x06c0 },
2603 [GCC_BLSP1_UART2_BCR
] = { 0x0700 },
2604 [GCC_BLSP1_QUP3_BCR
] = { 0x0740 },
2605 [GCC_BLSP1_UART3_BCR
] = { 0x0780 },
2606 [GCC_BLSP1_QUP4_BCR
] = { 0x07c0 },
2607 [GCC_BLSP1_UART4_BCR
] = { 0x0800 },
2608 [GCC_BLSP1_QUP5_BCR
] = { 0x0840 },
2609 [GCC_BLSP1_UART5_BCR
] = { 0x0880 },
2610 [GCC_BLSP1_QUP6_BCR
] = { 0x08c0 },
2611 [GCC_BLSP1_UART6_BCR
] = { 0x0900 },
2612 [GCC_BLSP2_BCR
] = { 0x0940 },
2613 [GCC_BLSP2_QUP1_BCR
] = { 0x0980 },
2614 [GCC_BLSP2_UART1_BCR
] = { 0x09c0 },
2615 [GCC_BLSP2_QUP2_BCR
] = { 0x0a00 },
2616 [GCC_BLSP2_UART2_BCR
] = { 0x0a40 },
2617 [GCC_BLSP2_QUP3_BCR
] = { 0x0a80 },
2618 [GCC_BLSP2_UART3_BCR
] = { 0x0ac0 },
2619 [GCC_BLSP2_QUP4_BCR
] = { 0x0b00 },
2620 [GCC_BLSP2_UART4_BCR
] = { 0x0b40 },
2621 [GCC_BLSP2_QUP5_BCR
] = { 0x0b80 },
2622 [GCC_BLSP2_UART5_BCR
] = { 0x0bc0 },
2623 [GCC_BLSP2_QUP6_BCR
] = { 0x0c00 },
2624 [GCC_BLSP2_UART6_BCR
] = { 0x0c40 },
2625 [GCC_PDM_BCR
] = { 0x0cc0 },
2626 [GCC_BAM_DMA_BCR
] = { 0x0d40 },
2627 [GCC_TSIF_BCR
] = { 0x0d80 },
2628 [GCC_TCSR_BCR
] = { 0x0dc0 },
2629 [GCC_BOOT_ROM_BCR
] = { 0x0e00 },
2630 [GCC_MSG_RAM_BCR
] = { 0x0e40 },
2631 [GCC_TLMM_BCR
] = { 0x0e80 },
2632 [GCC_MPM_BCR
] = { 0x0ec0 },
2633 [GCC_SEC_CTRL_BCR
] = { 0x0f40 },
2634 [GCC_SPMI_BCR
] = { 0x0fc0 },
2635 [GCC_SPDM_BCR
] = { 0x1000 },
2636 [GCC_CE1_BCR
] = { 0x1040 },
2637 [GCC_CE2_BCR
] = { 0x1080 },
2638 [GCC_BIMC_BCR
] = { 0x1100 },
2639 [GCC_MPM_NON_AHB_RESET
] = { 0x0ec4, 2 },
2640 [GCC_MPM_AHB_RESET
] = { 0x0ec4, 1 },
2641 [GCC_SNOC_BUS_TIMEOUT0_BCR
] = { 0x1240 },
2642 [GCC_SNOC_BUS_TIMEOUT2_BCR
] = { 0x1248 },
2643 [GCC_PNOC_BUS_TIMEOUT0_BCR
] = { 0x1280 },
2644 [GCC_PNOC_BUS_TIMEOUT1_BCR
] = { 0x1288 },
2645 [GCC_PNOC_BUS_TIMEOUT2_BCR
] = { 0x1290 },
2646 [GCC_PNOC_BUS_TIMEOUT3_BCR
] = { 0x1298 },
2647 [GCC_PNOC_BUS_TIMEOUT4_BCR
] = { 0x12a0 },
2648 [GCC_CNOC_BUS_TIMEOUT0_BCR
] = { 0x12c0 },
2649 [GCC_CNOC_BUS_TIMEOUT1_BCR
] = { 0x12c8 },
2650 [GCC_CNOC_BUS_TIMEOUT2_BCR
] = { 0x12d0 },
2651 [GCC_CNOC_BUS_TIMEOUT3_BCR
] = { 0x12d8 },
2652 [GCC_CNOC_BUS_TIMEOUT4_BCR
] = { 0x12e0 },
2653 [GCC_CNOC_BUS_TIMEOUT5_BCR
] = { 0x12e8 },
2654 [GCC_CNOC_BUS_TIMEOUT6_BCR
] = { 0x12f0 },
2655 [GCC_DEHR_BCR
] = { 0x1300 },
2656 [GCC_RBCPR_BCR
] = { 0x1380 },
2657 [GCC_MSS_RESTART
] = { 0x1680 },
2658 [GCC_LPASS_RESTART
] = { 0x16c0 },
2659 [GCC_WCSS_RESTART
] = { 0x1700 },
2660 [GCC_VENUS_RESTART
] = { 0x1740 },
2663 static const struct regmap_config gcc_msm8974_regmap_config
= {
2667 .max_register
= 0x1fc0,
2671 static const struct qcom_cc_desc gcc_msm8974_desc
= {
2672 .config
= &gcc_msm8974_regmap_config
,
2673 .clks
= gcc_msm8974_clocks
,
2674 .num_clks
= ARRAY_SIZE(gcc_msm8974_clocks
),
2675 .resets
= gcc_msm8974_resets
,
2676 .num_resets
= ARRAY_SIZE(gcc_msm8974_resets
),
2679 static const struct of_device_id gcc_msm8974_match_table
[] = {
2680 { .compatible
= "qcom,gcc-msm8974" },
2681 { .compatible
= "qcom,gcc-msm8974pro" , .data
= (void *)1UL },
2682 { .compatible
= "qcom,gcc-msm8974pro-ac", .data
= (void *)1UL },
2685 MODULE_DEVICE_TABLE(of
, gcc_msm8974_match_table
);
2687 static void msm8974_pro_clock_override(void)
2689 sdcc1_apps_clk_src_init
.parent_names
= gcc_xo_gpll0_gpll4
;
2690 sdcc1_apps_clk_src_init
.num_parents
= 3;
2691 sdcc1_apps_clk_src
.freq_tbl
= ftbl_gcc_sdcc1_apps_clk_pro
;
2692 sdcc1_apps_clk_src
.parent_map
= gcc_xo_gpll0_gpll4_map
;
2694 gcc_msm8974_clocks
[GPLL4
] = &gpll4
.clkr
;
2695 gcc_msm8974_clocks
[GPLL4_VOTE
] = &gpll4_vote
;
2696 gcc_msm8974_clocks
[GCC_SDCC1_CDCCAL_SLEEP_CLK
] =
2697 &gcc_sdcc1_cdccal_sleep_clk
.clkr
;
2698 gcc_msm8974_clocks
[GCC_SDCC1_CDCCAL_FF_CLK
] =
2699 &gcc_sdcc1_cdccal_ff_clk
.clkr
;
2702 static int gcc_msm8974_probe(struct platform_device
*pdev
)
2705 struct device
*dev
= &pdev
->dev
;
2707 const struct of_device_id
*id
;
2709 id
= of_match_device(gcc_msm8974_match_table
, dev
);
2715 msm8974_pro_clock_override();
2717 /* Temporary until RPM clocks supported */
2718 clk
= clk_register_fixed_rate(dev
, "xo", NULL
, CLK_IS_ROOT
, 19200000);
2720 return PTR_ERR(clk
);
2722 /* Should move to DT node? */
2723 clk
= clk_register_fixed_rate(dev
, "sleep_clk_src", NULL
,
2724 CLK_IS_ROOT
, 32768);
2726 return PTR_ERR(clk
);
2728 return qcom_cc_probe(pdev
, &gcc_msm8974_desc
);
2731 static int gcc_msm8974_remove(struct platform_device
*pdev
)
2733 qcom_cc_remove(pdev
);
2737 static struct platform_driver gcc_msm8974_driver
= {
2738 .probe
= gcc_msm8974_probe
,
2739 .remove
= gcc_msm8974_remove
,
2741 .name
= "gcc-msm8974",
2742 .of_match_table
= gcc_msm8974_match_table
,
2746 static int __init
gcc_msm8974_init(void)
2748 return platform_driver_register(&gcc_msm8974_driver
);
2750 core_initcall(gcc_msm8974_init
);
2752 static void __exit
gcc_msm8974_exit(void)
2754 platform_driver_unregister(&gcc_msm8974_driver
);
2756 module_exit(gcc_msm8974_exit
);
2758 MODULE_DESCRIPTION("QCOM GCC MSM8974 Driver");
2759 MODULE_LICENSE("GPL v2");
2760 MODULE_ALIAS("platform:gcc-msm8974");