1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
5 #include <linux/clk-provider.h>
6 #include <linux/kernel.h>
7 #include <linux/init.h>
9 #include <linux/ctype.h>
12 #include <linux/platform_device.h>
13 #include <linux/module.h>
14 #include <linux/regmap.h>
16 #include <dt-bindings/clock/qcom,gcc-msm8994.h>
19 #include "clk-regmap.h"
20 #include "clk-alpha-pll.h"
22 #include "clk-branch.h"
32 static struct clk_alpha_pll gpll0_early
= {
34 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
37 .enable_mask
= BIT(0),
38 .hw
.init
= &(struct clk_init_data
){
39 .name
= "gpll0_early",
40 .parent_data
= &(const struct clk_parent_data
){
44 .ops
= &clk_alpha_pll_ops
,
49 static struct clk_alpha_pll_postdiv gpll0
= {
51 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
52 .clkr
.hw
.init
= &(struct clk_init_data
){
54 .parent_hws
= (const struct clk_hw
*[]){
58 .ops
= &clk_alpha_pll_postdiv_ops
,
62 static struct clk_alpha_pll gpll4_early
= {
64 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
67 .enable_mask
= BIT(4),
68 .hw
.init
= &(struct clk_init_data
){
69 .name
= "gpll4_early",
70 .parent_data
= &(const struct clk_parent_data
){
74 .ops
= &clk_alpha_pll_ops
,
79 static struct clk_alpha_pll_postdiv gpll4
= {
82 .regs
= clk_alpha_pll_regs
[CLK_ALPHA_PLL_TYPE_DEFAULT
],
83 .clkr
.hw
.init
= &(struct clk_init_data
){
85 .parent_hws
= (const struct clk_hw
*[]){
89 .ops
= &clk_alpha_pll_postdiv_ops
,
93 static const struct parent_map gcc_xo_gpll0_map
[] = {
98 static const struct clk_parent_data gcc_xo_gpll0
[] = {
100 { .hw
= &gpll0
.clkr
.hw
},
103 static const struct parent_map gcc_xo_gpll0_gpll4_map
[] = {
109 static const struct clk_parent_data gcc_xo_gpll0_gpll4
[] = {
111 { .hw
= &gpll0
.clkr
.hw
},
112 { .hw
= &gpll4
.clkr
.hw
},
115 static const struct freq_tbl ftbl_ufs_axi_clk_src
[] = {
116 F(50000000, P_GPLL0
, 12, 0, 0),
117 F(100000000, P_GPLL0
, 6, 0, 0),
118 F(150000000, P_GPLL0
, 4, 0, 0),
119 F(171430000, P_GPLL0
, 3.5, 0, 0),
120 F(200000000, P_GPLL0
, 3, 0, 0),
121 F(240000000, P_GPLL0
, 2.5, 0, 0),
125 static struct clk_rcg2 ufs_axi_clk_src
= {
129 .parent_map
= gcc_xo_gpll0_map
,
130 .freq_tbl
= ftbl_ufs_axi_clk_src
,
131 .clkr
.hw
.init
= &(struct clk_init_data
){
132 .name
= "ufs_axi_clk_src",
133 .parent_data
= gcc_xo_gpll0
,
134 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
135 .ops
= &clk_rcg2_ops
,
139 static const struct freq_tbl ftbl_usb30_master_clk_src
[] = {
140 F(19200000, P_XO
, 1, 0, 0),
141 F(125000000, P_GPLL0
, 1, 5, 24),
145 static struct clk_rcg2 usb30_master_clk_src
= {
149 .parent_map
= gcc_xo_gpll0_map
,
150 .freq_tbl
= ftbl_usb30_master_clk_src
,
151 .clkr
.hw
.init
= &(struct clk_init_data
){
152 .name
= "usb30_master_clk_src",
153 .parent_data
= gcc_xo_gpll0
,
154 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
155 .ops
= &clk_rcg2_ops
,
159 static const struct freq_tbl ftbl_blsp_i2c_apps_clk_src
[] = {
160 F(19200000, P_XO
, 1, 0, 0),
161 F(50000000, P_GPLL0
, 12, 0, 0),
165 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
168 .parent_map
= gcc_xo_gpll0_map
,
169 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
170 .clkr
.hw
.init
= &(struct clk_init_data
){
171 .name
= "blsp1_qup1_i2c_apps_clk_src",
172 .parent_data
= gcc_xo_gpll0
,
173 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
174 .ops
= &clk_rcg2_ops
,
178 static const struct freq_tbl ftbl_blsp1_qup1_spi_apps_clk_src
[] = {
179 F(960000, P_XO
, 10, 1, 2),
180 F(4800000, P_XO
, 4, 0, 0),
181 F(9600000, P_XO
, 2, 0, 0),
182 F(15000000, P_GPLL0
, 10, 1, 4),
183 F(19200000, P_XO
, 1, 0, 0),
184 F(24000000, P_GPLL0
, 12.5, 1, 2),
185 F(25000000, P_GPLL0
, 12, 1, 2),
186 F(48000000, P_GPLL0
, 12.5, 0, 0),
187 F(50000000, P_GPLL0
, 12, 0, 0),
191 static const struct freq_tbl ftbl_blsp1_qup_spi_apps_clk_src_8992
[] = {
192 F(960000, P_XO
, 10, 1, 2),
193 F(4800000, P_XO
, 4, 0, 0),
194 F(9600000, P_XO
, 2, 0, 0),
195 F(15000000, P_GPLL0
, 10, 1, 4),
196 F(19200000, P_XO
, 1, 0, 0),
197 F(25000000, P_GPLL0
, 12, 1, 2),
198 F(50000000, P_GPLL0
, 12, 0, 0),
202 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
206 .parent_map
= gcc_xo_gpll0_map
,
207 .freq_tbl
= ftbl_blsp1_qup1_spi_apps_clk_src
,
208 .clkr
.hw
.init
= &(struct clk_init_data
){
209 .name
= "blsp1_qup1_spi_apps_clk_src",
210 .parent_data
= gcc_xo_gpll0
,
211 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
212 .ops
= &clk_rcg2_ops
,
216 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
219 .parent_map
= gcc_xo_gpll0_map
,
220 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
221 .clkr
.hw
.init
= &(struct clk_init_data
){
222 .name
= "blsp1_qup2_i2c_apps_clk_src",
223 .parent_data
= gcc_xo_gpll0
,
224 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
225 .ops
= &clk_rcg2_ops
,
229 static const struct freq_tbl ftbl_blsp1_qup2_spi_apps_clk_src
[] = {
230 F(960000, P_XO
, 10, 1, 2),
231 F(4800000, P_XO
, 4, 0, 0),
232 F(9600000, P_XO
, 2, 0, 0),
233 F(15000000, P_GPLL0
, 10, 1, 4),
234 F(19200000, P_XO
, 1, 0, 0),
235 F(24000000, P_GPLL0
, 12.5, 1, 2),
236 F(25000000, P_GPLL0
, 12, 1, 2),
237 F(42860000, P_GPLL0
, 14, 0, 0),
238 F(46150000, P_GPLL0
, 13, 0, 0),
242 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
246 .parent_map
= gcc_xo_gpll0_map
,
247 .freq_tbl
= ftbl_blsp1_qup2_spi_apps_clk_src
,
248 .clkr
.hw
.init
= &(struct clk_init_data
){
249 .name
= "blsp1_qup2_spi_apps_clk_src",
250 .parent_data
= gcc_xo_gpll0
,
251 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
252 .ops
= &clk_rcg2_ops
,
256 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
259 .parent_map
= gcc_xo_gpll0_map
,
260 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
261 .clkr
.hw
.init
= &(struct clk_init_data
){
262 .name
= "blsp1_qup3_i2c_apps_clk_src",
263 .parent_data
= gcc_xo_gpll0
,
264 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
265 .ops
= &clk_rcg2_ops
,
269 static const struct freq_tbl ftbl_blsp1_qup3_4_spi_apps_clk_src
[] = {
270 F(960000, P_XO
, 10, 1, 2),
271 F(4800000, P_XO
, 4, 0, 0),
272 F(9600000, P_XO
, 2, 0, 0),
273 F(15000000, P_GPLL0
, 10, 1, 4),
274 F(19200000, P_XO
, 1, 0, 0),
275 F(24000000, P_GPLL0
, 12.5, 1, 2),
276 F(25000000, P_GPLL0
, 12, 1, 2),
277 F(42860000, P_GPLL0
, 14, 0, 0),
278 F(44440000, P_GPLL0
, 13.5, 0, 0),
282 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
286 .parent_map
= gcc_xo_gpll0_map
,
287 .freq_tbl
= ftbl_blsp1_qup3_4_spi_apps_clk_src
,
288 .clkr
.hw
.init
= &(struct clk_init_data
){
289 .name
= "blsp1_qup3_spi_apps_clk_src",
290 .parent_data
= gcc_xo_gpll0
,
291 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
292 .ops
= &clk_rcg2_ops
,
296 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
299 .parent_map
= gcc_xo_gpll0_map
,
300 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
301 .clkr
.hw
.init
= &(struct clk_init_data
){
302 .name
= "blsp1_qup4_i2c_apps_clk_src",
303 .parent_data
= gcc_xo_gpll0
,
304 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
305 .ops
= &clk_rcg2_ops
,
309 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
313 .parent_map
= gcc_xo_gpll0_map
,
314 .freq_tbl
= ftbl_blsp1_qup3_4_spi_apps_clk_src
,
315 .clkr
.hw
.init
= &(struct clk_init_data
){
316 .name
= "blsp1_qup4_spi_apps_clk_src",
317 .parent_data
= gcc_xo_gpll0
,
318 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
319 .ops
= &clk_rcg2_ops
,
323 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
326 .parent_map
= gcc_xo_gpll0_map
,
327 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
328 .clkr
.hw
.init
= &(struct clk_init_data
){
329 .name
= "blsp1_qup5_i2c_apps_clk_src",
330 .parent_data
= gcc_xo_gpll0
,
331 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
332 .ops
= &clk_rcg2_ops
,
336 static const struct freq_tbl ftbl_blsp1_qup5_spi_apps_clk_src
[] = {
337 F(960000, P_XO
, 10, 1, 2),
338 F(4800000, P_XO
, 4, 0, 0),
339 F(9600000, P_XO
, 2, 0, 0),
340 F(15000000, P_GPLL0
, 10, 1, 4),
341 F(19200000, P_XO
, 1, 0, 0),
342 F(24000000, P_GPLL0
, 12.5, 1, 2),
343 F(25000000, P_GPLL0
, 12, 1, 2),
344 F(40000000, P_GPLL0
, 15, 0, 0),
345 F(42860000, P_GPLL0
, 14, 0, 0),
349 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
353 .parent_map
= gcc_xo_gpll0_map
,
354 .freq_tbl
= ftbl_blsp1_qup5_spi_apps_clk_src
,
355 .clkr
.hw
.init
= &(struct clk_init_data
){
356 .name
= "blsp1_qup5_spi_apps_clk_src",
357 .parent_data
= gcc_xo_gpll0
,
358 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
359 .ops
= &clk_rcg2_ops
,
363 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
366 .parent_map
= gcc_xo_gpll0_map
,
367 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
368 .clkr
.hw
.init
= &(struct clk_init_data
){
369 .name
= "blsp1_qup6_i2c_apps_clk_src",
370 .parent_data
= gcc_xo_gpll0
,
371 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
372 .ops
= &clk_rcg2_ops
,
376 static const struct freq_tbl ftbl_blsp1_qup6_spi_apps_clk_src
[] = {
377 F(960000, P_XO
, 10, 1, 2),
378 F(4800000, P_XO
, 4, 0, 0),
379 F(9600000, P_XO
, 2, 0, 0),
380 F(15000000, P_GPLL0
, 10, 1, 4),
381 F(19200000, P_XO
, 1, 0, 0),
382 F(24000000, P_GPLL0
, 12.5, 1, 2),
383 F(27906976, P_GPLL0
, 1, 2, 43),
384 F(41380000, P_GPLL0
, 15, 0, 0),
385 F(42860000, P_GPLL0
, 14, 0, 0),
389 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
393 .parent_map
= gcc_xo_gpll0_map
,
394 .freq_tbl
= ftbl_blsp1_qup6_spi_apps_clk_src
,
395 .clkr
.hw
.init
= &(struct clk_init_data
){
396 .name
= "blsp1_qup6_spi_apps_clk_src",
397 .parent_data
= gcc_xo_gpll0
,
398 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
399 .ops
= &clk_rcg2_ops
,
403 static const struct freq_tbl ftbl_blsp_uart_apps_clk_src
[] = {
404 F(3686400, P_GPLL0
, 1, 96, 15625),
405 F(7372800, P_GPLL0
, 1, 192, 15625),
406 F(14745600, P_GPLL0
, 1, 384, 15625),
407 F(16000000, P_GPLL0
, 5, 2, 15),
408 F(19200000, P_XO
, 1, 0, 0),
409 F(24000000, P_GPLL0
, 5, 1, 5),
410 F(32000000, P_GPLL0
, 1, 4, 75),
411 F(40000000, P_GPLL0
, 15, 0, 0),
412 F(46400000, P_GPLL0
, 1, 29, 375),
413 F(48000000, P_GPLL0
, 12.5, 0, 0),
414 F(51200000, P_GPLL0
, 1, 32, 375),
415 F(56000000, P_GPLL0
, 1, 7, 75),
416 F(58982400, P_GPLL0
, 1, 1536, 15625),
417 F(60000000, P_GPLL0
, 10, 0, 0),
418 F(63160000, P_GPLL0
, 9.5, 0, 0),
422 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
426 .parent_map
= gcc_xo_gpll0_map
,
427 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
428 .clkr
.hw
.init
= &(struct clk_init_data
){
429 .name
= "blsp1_uart1_apps_clk_src",
430 .parent_data
= gcc_xo_gpll0
,
431 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
432 .ops
= &clk_rcg2_ops
,
436 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
440 .parent_map
= gcc_xo_gpll0_map
,
441 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
442 .clkr
.hw
.init
= &(struct clk_init_data
){
443 .name
= "blsp1_uart2_apps_clk_src",
444 .parent_data
= gcc_xo_gpll0
,
445 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
446 .ops
= &clk_rcg2_ops
,
450 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
454 .parent_map
= gcc_xo_gpll0_map
,
455 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
456 .clkr
.hw
.init
= &(struct clk_init_data
){
457 .name
= "blsp1_uart3_apps_clk_src",
458 .parent_data
= gcc_xo_gpll0
,
459 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
460 .ops
= &clk_rcg2_ops
,
464 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
468 .parent_map
= gcc_xo_gpll0_map
,
469 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
470 .clkr
.hw
.init
= &(struct clk_init_data
){
471 .name
= "blsp1_uart4_apps_clk_src",
472 .parent_data
= gcc_xo_gpll0
,
473 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
474 .ops
= &clk_rcg2_ops
,
478 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
482 .parent_map
= gcc_xo_gpll0_map
,
483 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
484 .clkr
.hw
.init
= &(struct clk_init_data
){
485 .name
= "blsp1_uart5_apps_clk_src",
486 .parent_data
= gcc_xo_gpll0
,
487 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
488 .ops
= &clk_rcg2_ops
,
492 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
496 .parent_map
= gcc_xo_gpll0_map
,
497 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
498 .clkr
.hw
.init
= &(struct clk_init_data
){
499 .name
= "blsp1_uart6_apps_clk_src",
500 .parent_data
= gcc_xo_gpll0
,
501 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
502 .ops
= &clk_rcg2_ops
,
506 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
509 .parent_map
= gcc_xo_gpll0_map
,
510 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
511 .clkr
.hw
.init
= &(struct clk_init_data
){
512 .name
= "blsp2_qup1_i2c_apps_clk_src",
513 .parent_data
= gcc_xo_gpll0
,
514 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
515 .ops
= &clk_rcg2_ops
,
519 static const struct freq_tbl ftbl_blsp2_qup1_2_spi_apps_clk_src
[] = {
520 F(960000, P_XO
, 10, 1, 2),
521 F(4800000, P_XO
, 4, 0, 0),
522 F(9600000, P_XO
, 2, 0, 0),
523 F(15000000, P_GPLL0
, 10, 1, 4),
524 F(19200000, P_XO
, 1, 0, 0),
525 F(24000000, P_GPLL0
, 12.5, 1, 2),
526 F(25000000, P_GPLL0
, 12, 1, 2),
527 F(42860000, P_GPLL0
, 14, 0, 0),
528 F(44440000, P_GPLL0
, 13.5, 0, 0),
532 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
536 .parent_map
= gcc_xo_gpll0_map
,
537 .freq_tbl
= ftbl_blsp2_qup1_2_spi_apps_clk_src
,
538 .clkr
.hw
.init
= &(struct clk_init_data
){
539 .name
= "blsp2_qup1_spi_apps_clk_src",
540 .parent_data
= gcc_xo_gpll0
,
541 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
542 .ops
= &clk_rcg2_ops
,
546 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
549 .parent_map
= gcc_xo_gpll0_map
,
550 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
551 .clkr
.hw
.init
= &(struct clk_init_data
){
552 .name
= "blsp2_qup2_i2c_apps_clk_src",
553 .parent_data
= gcc_xo_gpll0
,
554 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
555 .ops
= &clk_rcg2_ops
,
559 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
563 .parent_map
= gcc_xo_gpll0_map
,
564 .freq_tbl
= ftbl_blsp2_qup1_2_spi_apps_clk_src
,
565 .clkr
.hw
.init
= &(struct clk_init_data
){
566 .name
= "blsp2_qup2_spi_apps_clk_src",
567 .parent_data
= gcc_xo_gpll0
,
568 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
569 .ops
= &clk_rcg2_ops
,
573 static const struct freq_tbl ftbl_blsp2_qup3_4_spi_apps_clk_src
[] = {
574 F(960000, P_XO
, 10, 1, 2),
575 F(4800000, P_XO
, 4, 0, 0),
576 F(9600000, P_XO
, 2, 0, 0),
577 F(15000000, P_GPLL0
, 10, 1, 4),
578 F(19200000, P_XO
, 1, 0, 0),
579 F(24000000, P_GPLL0
, 12.5, 1, 2),
580 F(25000000, P_GPLL0
, 12, 1, 2),
581 F(42860000, P_GPLL0
, 14, 0, 0),
582 F(48000000, P_GPLL0
, 12.5, 0, 0),
586 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
589 .parent_map
= gcc_xo_gpll0_map
,
590 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
591 .clkr
.hw
.init
= &(struct clk_init_data
){
592 .name
= "blsp2_qup3_i2c_apps_clk_src",
593 .parent_data
= gcc_xo_gpll0
,
594 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
595 .ops
= &clk_rcg2_ops
,
599 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
603 .parent_map
= gcc_xo_gpll0_map
,
604 .freq_tbl
= ftbl_blsp2_qup3_4_spi_apps_clk_src
,
605 .clkr
.hw
.init
= &(struct clk_init_data
){
606 .name
= "blsp2_qup3_spi_apps_clk_src",
607 .parent_data
= gcc_xo_gpll0
,
608 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
609 .ops
= &clk_rcg2_ops
,
613 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src
= {
616 .parent_map
= gcc_xo_gpll0_map
,
617 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
618 .clkr
.hw
.init
= &(struct clk_init_data
){
619 .name
= "blsp2_qup4_i2c_apps_clk_src",
620 .parent_data
= gcc_xo_gpll0
,
621 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
622 .ops
= &clk_rcg2_ops
,
626 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src
= {
630 .parent_map
= gcc_xo_gpll0_map
,
631 .freq_tbl
= ftbl_blsp2_qup3_4_spi_apps_clk_src
,
632 .clkr
.hw
.init
= &(struct clk_init_data
){
633 .name
= "blsp2_qup4_spi_apps_clk_src",
634 .parent_data
= gcc_xo_gpll0
,
635 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
636 .ops
= &clk_rcg2_ops
,
640 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src
= {
643 .parent_map
= gcc_xo_gpll0_map
,
644 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
645 .clkr
.hw
.init
= &(struct clk_init_data
){
646 .name
= "blsp2_qup5_i2c_apps_clk_src",
647 .parent_data
= gcc_xo_gpll0
,
648 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
649 .ops
= &clk_rcg2_ops
,
653 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src
= {
657 .parent_map
= gcc_xo_gpll0_map
,
658 /* BLSP1 QUP1 and BLSP2 QUP5 use the same freqs */
659 .freq_tbl
= ftbl_blsp1_qup1_spi_apps_clk_src
,
660 .clkr
.hw
.init
= &(struct clk_init_data
){
661 .name
= "blsp2_qup5_spi_apps_clk_src",
662 .parent_data
= gcc_xo_gpll0
,
663 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
664 .ops
= &clk_rcg2_ops
,
668 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src
= {
671 .parent_map
= gcc_xo_gpll0_map
,
672 .freq_tbl
= ftbl_blsp_i2c_apps_clk_src
,
673 .clkr
.hw
.init
= &(struct clk_init_data
){
674 .name
= "blsp2_qup6_i2c_apps_clk_src",
675 .parent_data
= gcc_xo_gpll0
,
676 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
677 .ops
= &clk_rcg2_ops
,
681 static const struct freq_tbl ftbl_blsp2_qup6_spi_apps_clk_src
[] = {
682 F(960000, P_XO
, 10, 1, 2),
683 F(4800000, P_XO
, 4, 0, 0),
684 F(9600000, P_XO
, 2, 0, 0),
685 F(15000000, P_GPLL0
, 10, 1, 4),
686 F(19200000, P_XO
, 1, 0, 0),
687 F(24000000, P_GPLL0
, 12.5, 1, 2),
688 F(25000000, P_GPLL0
, 12, 1, 2),
689 F(44440000, P_GPLL0
, 13.5, 0, 0),
690 F(48000000, P_GPLL0
, 12.5, 0, 0),
694 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src
= {
698 .parent_map
= gcc_xo_gpll0_map
,
699 .freq_tbl
= ftbl_blsp2_qup6_spi_apps_clk_src
,
700 .clkr
.hw
.init
= &(struct clk_init_data
){
701 .name
= "blsp2_qup6_spi_apps_clk_src",
702 .parent_data
= gcc_xo_gpll0
,
703 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
704 .ops
= &clk_rcg2_ops
,
708 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
712 .parent_map
= gcc_xo_gpll0_map
,
713 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
714 .clkr
.hw
.init
= &(struct clk_init_data
){
715 .name
= "blsp2_uart1_apps_clk_src",
716 .parent_data
= gcc_xo_gpll0
,
717 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
718 .ops
= &clk_rcg2_ops
,
722 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
726 .parent_map
= gcc_xo_gpll0_map
,
727 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
728 .clkr
.hw
.init
= &(struct clk_init_data
){
729 .name
= "blsp2_uart2_apps_clk_src",
730 .parent_data
= gcc_xo_gpll0
,
731 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
732 .ops
= &clk_rcg2_ops
,
736 static struct clk_rcg2 blsp2_uart3_apps_clk_src
= {
740 .parent_map
= gcc_xo_gpll0_map
,
741 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
742 .clkr
.hw
.init
= &(struct clk_init_data
){
743 .name
= "blsp2_uart3_apps_clk_src",
744 .parent_data
= gcc_xo_gpll0
,
745 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
746 .ops
= &clk_rcg2_ops
,
750 static struct clk_rcg2 blsp2_uart4_apps_clk_src
= {
754 .parent_map
= gcc_xo_gpll0_map
,
755 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
756 .clkr
.hw
.init
= &(struct clk_init_data
){
757 .name
= "blsp2_uart4_apps_clk_src",
758 .parent_data
= gcc_xo_gpll0
,
759 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
760 .ops
= &clk_rcg2_ops
,
764 static struct clk_rcg2 blsp2_uart5_apps_clk_src
= {
768 .parent_map
= gcc_xo_gpll0_map
,
769 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
770 .clkr
.hw
.init
= &(struct clk_init_data
){
771 .name
= "blsp2_uart5_apps_clk_src",
772 .parent_data
= gcc_xo_gpll0
,
773 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
774 .ops
= &clk_rcg2_ops
,
778 static struct clk_rcg2 blsp2_uart6_apps_clk_src
= {
782 .parent_map
= gcc_xo_gpll0_map
,
783 .freq_tbl
= ftbl_blsp_uart_apps_clk_src
,
784 .clkr
.hw
.init
= &(struct clk_init_data
){
785 .name
= "blsp2_uart6_apps_clk_src",
786 .parent_data
= gcc_xo_gpll0
,
787 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
788 .ops
= &clk_rcg2_ops
,
792 static const struct freq_tbl ftbl_gp1_clk_src
[] = {
793 F(19200000, P_XO
, 1, 0, 0),
794 F(100000000, P_GPLL0
, 6, 0, 0),
795 F(200000000, P_GPLL0
, 3, 0, 0),
799 static struct clk_rcg2 gp1_clk_src
= {
803 .parent_map
= gcc_xo_gpll0_map
,
804 .freq_tbl
= ftbl_gp1_clk_src
,
805 .clkr
.hw
.init
= &(struct clk_init_data
){
806 .name
= "gp1_clk_src",
807 .parent_data
= gcc_xo_gpll0
,
808 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
809 .ops
= &clk_rcg2_ops
,
813 static const struct freq_tbl ftbl_gp2_clk_src
[] = {
814 F(19200000, P_XO
, 1, 0, 0),
815 F(100000000, P_GPLL0
, 6, 0, 0),
816 F(200000000, P_GPLL0
, 3, 0, 0),
820 static struct clk_rcg2 gp2_clk_src
= {
824 .parent_map
= gcc_xo_gpll0_map
,
825 .freq_tbl
= ftbl_gp2_clk_src
,
826 .clkr
.hw
.init
= &(struct clk_init_data
){
827 .name
= "gp2_clk_src",
828 .parent_data
= gcc_xo_gpll0
,
829 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
830 .ops
= &clk_rcg2_ops
,
834 static const struct freq_tbl ftbl_gp3_clk_src
[] = {
835 F(19200000, P_XO
, 1, 0, 0),
836 F(100000000, P_GPLL0
, 6, 0, 0),
837 F(200000000, P_GPLL0
, 3, 0, 0),
841 static struct clk_rcg2 gp3_clk_src
= {
845 .parent_map
= gcc_xo_gpll0_map
,
846 .freq_tbl
= ftbl_gp3_clk_src
,
847 .clkr
.hw
.init
= &(struct clk_init_data
){
848 .name
= "gp3_clk_src",
849 .parent_data
= gcc_xo_gpll0
,
850 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
851 .ops
= &clk_rcg2_ops
,
855 static const struct freq_tbl ftbl_pcie_0_aux_clk_src
[] = {
856 F(1011000, P_XO
, 1, 1, 19),
860 static struct clk_rcg2 pcie_0_aux_clk_src
= {
864 .freq_tbl
= ftbl_pcie_0_aux_clk_src
,
865 .clkr
.hw
.init
= &(struct clk_init_data
){
866 .name
= "pcie_0_aux_clk_src",
867 .parent_data
= &(const struct clk_parent_data
){
871 .ops
= &clk_rcg2_ops
,
875 static const struct freq_tbl ftbl_pcie_pipe_clk_src
[] = {
876 F(125000000, P_XO
, 1, 0, 0),
880 static struct clk_rcg2 pcie_0_pipe_clk_src
= {
883 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
884 .clkr
.hw
.init
= &(struct clk_init_data
){
885 .name
= "pcie_0_pipe_clk_src",
886 .parent_data
= &(const struct clk_parent_data
){
890 .ops
= &clk_rcg2_ops
,
894 static const struct freq_tbl ftbl_pcie_1_aux_clk_src
[] = {
895 F(1011000, P_XO
, 1, 1, 19),
899 static struct clk_rcg2 pcie_1_aux_clk_src
= {
903 .freq_tbl
= ftbl_pcie_1_aux_clk_src
,
904 .clkr
.hw
.init
= &(struct clk_init_data
){
905 .name
= "pcie_1_aux_clk_src",
906 .parent_data
= &(const struct clk_parent_data
){
910 .ops
= &clk_rcg2_ops
,
914 static struct clk_rcg2 pcie_1_pipe_clk_src
= {
917 .freq_tbl
= ftbl_pcie_pipe_clk_src
,
918 .clkr
.hw
.init
= &(struct clk_init_data
){
919 .name
= "pcie_1_pipe_clk_src",
920 .parent_data
= &(const struct clk_parent_data
){
924 .ops
= &clk_rcg2_ops
,
928 static const struct freq_tbl ftbl_pdm2_clk_src
[] = {
929 F(60000000, P_GPLL0
, 10, 0, 0),
933 static struct clk_rcg2 pdm2_clk_src
= {
936 .parent_map
= gcc_xo_gpll0_map
,
937 .freq_tbl
= ftbl_pdm2_clk_src
,
938 .clkr
.hw
.init
= &(struct clk_init_data
){
939 .name
= "pdm2_clk_src",
940 .parent_data
= gcc_xo_gpll0
,
941 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
942 .ops
= &clk_rcg2_ops
,
946 static const struct freq_tbl ftbl_sdcc1_apps_clk_src
[] = {
947 F(144000, P_XO
, 16, 3, 25),
948 F(400000, P_XO
, 12, 1, 4),
949 F(20000000, P_GPLL0
, 15, 1, 2),
950 F(25000000, P_GPLL0
, 12, 1, 2),
951 F(50000000, P_GPLL0
, 12, 0, 0),
952 F(100000000, P_GPLL0
, 6, 0, 0),
953 F(192000000, P_GPLL4
, 2, 0, 0),
954 F(384000000, P_GPLL4
, 1, 0, 0),
958 static const struct freq_tbl ftbl_sdcc1_apps_clk_src_8992
[] = {
959 F(144000, P_XO
, 16, 3, 25),
960 F(400000, P_XO
, 12, 1, 4),
961 F(20000000, P_GPLL0
, 15, 1, 2),
962 F(25000000, P_GPLL0
, 12, 1, 2),
963 F(50000000, P_GPLL0
, 12, 0, 0),
964 F(100000000, P_GPLL0
, 6, 0, 0),
965 F(172000000, P_GPLL4
, 2, 0, 0),
966 F(344000000, P_GPLL4
, 1, 0, 0),
970 static struct clk_rcg2 sdcc1_apps_clk_src
= {
974 .parent_map
= gcc_xo_gpll0_gpll4_map
,
975 .freq_tbl
= ftbl_sdcc1_apps_clk_src
,
976 .clkr
.hw
.init
= &(struct clk_init_data
){
977 .name
= "sdcc1_apps_clk_src",
978 .parent_data
= gcc_xo_gpll0_gpll4
,
979 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0_gpll4
),
980 .ops
= &clk_rcg2_floor_ops
,
984 static const struct freq_tbl ftbl_sdcc2_4_apps_clk_src
[] = {
985 F(144000, P_XO
, 16, 3, 25),
986 F(400000, P_XO
, 12, 1, 4),
987 F(20000000, P_GPLL0
, 15, 1, 2),
988 F(25000000, P_GPLL0
, 12, 1, 2),
989 F(50000000, P_GPLL0
, 12, 0, 0),
990 F(100000000, P_GPLL0
, 6, 0, 0),
991 F(200000000, P_GPLL0
, 3, 0, 0),
995 static struct clk_rcg2 sdcc2_apps_clk_src
= {
999 .parent_map
= gcc_xo_gpll0_map
,
1000 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
1001 .clkr
.hw
.init
= &(struct clk_init_data
){
1002 .name
= "sdcc2_apps_clk_src",
1003 .parent_data
= gcc_xo_gpll0
,
1004 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1005 .ops
= &clk_rcg2_floor_ops
,
1009 static struct clk_rcg2 sdcc3_apps_clk_src
= {
1013 .parent_map
= gcc_xo_gpll0_map
,
1014 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
1015 .clkr
.hw
.init
= &(struct clk_init_data
){
1016 .name
= "sdcc3_apps_clk_src",
1017 .parent_data
= gcc_xo_gpll0
,
1018 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1019 .ops
= &clk_rcg2_floor_ops
,
1023 static struct clk_rcg2 sdcc4_apps_clk_src
= {
1027 .parent_map
= gcc_xo_gpll0_map
,
1028 .freq_tbl
= ftbl_sdcc2_4_apps_clk_src
,
1029 .clkr
.hw
.init
= &(struct clk_init_data
){
1030 .name
= "sdcc4_apps_clk_src",
1031 .parent_data
= gcc_xo_gpll0
,
1032 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1033 .ops
= &clk_rcg2_floor_ops
,
1037 static const struct freq_tbl ftbl_tsif_ref_clk_src
[] = {
1038 F(105500, P_XO
, 1, 1, 182),
1042 static struct clk_rcg2 tsif_ref_clk_src
= {
1046 .freq_tbl
= ftbl_tsif_ref_clk_src
,
1047 .clkr
.hw
.init
= &(struct clk_init_data
){
1048 .name
= "tsif_ref_clk_src",
1049 .parent_data
= &(const struct clk_parent_data
){
1053 .ops
= &clk_rcg2_ops
,
1057 static const struct freq_tbl ftbl_usb30_mock_utmi_clk_src
[] = {
1058 F(19200000, P_XO
, 1, 0, 0),
1059 F(60000000, P_GPLL0
, 10, 0, 0),
1063 static struct clk_rcg2 usb30_mock_utmi_clk_src
= {
1066 .parent_map
= gcc_xo_gpll0_map
,
1067 .freq_tbl
= ftbl_usb30_mock_utmi_clk_src
,
1068 .clkr
.hw
.init
= &(struct clk_init_data
){
1069 .name
= "usb30_mock_utmi_clk_src",
1070 .parent_data
= gcc_xo_gpll0
,
1071 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1072 .ops
= &clk_rcg2_ops
,
1076 static const struct freq_tbl ftbl_usb3_phy_aux_clk_src
[] = {
1077 F(1200000, P_XO
, 16, 0, 0),
1081 static struct clk_rcg2 usb3_phy_aux_clk_src
= {
1084 .freq_tbl
= ftbl_usb3_phy_aux_clk_src
,
1085 .clkr
.hw
.init
= &(struct clk_init_data
){
1086 .name
= "usb3_phy_aux_clk_src",
1087 .parent_data
= &(const struct clk_parent_data
){
1091 .ops
= &clk_rcg2_ops
,
1095 static const struct freq_tbl ftbl_usb_hs_system_clk_src
[] = {
1096 F(75000000, P_GPLL0
, 8, 0, 0),
1100 static struct clk_rcg2 usb_hs_system_clk_src
= {
1103 .parent_map
= gcc_xo_gpll0_map
,
1104 .freq_tbl
= ftbl_usb_hs_system_clk_src
,
1105 .clkr
.hw
.init
= &(struct clk_init_data
){
1106 .name
= "usb_hs_system_clk_src",
1107 .parent_data
= gcc_xo_gpll0
,
1108 .num_parents
= ARRAY_SIZE(gcc_xo_gpll0
),
1109 .ops
= &clk_rcg2_ops
,
1113 static struct clk_branch gcc_blsp1_ahb_clk
= {
1115 .halt_check
= BRANCH_HALT_VOTED
,
1117 .enable_reg
= 0x1484,
1118 .enable_mask
= BIT(17),
1119 .hw
.init
= &(struct clk_init_data
){
1120 .name
= "gcc_blsp1_ahb_clk",
1121 .ops
= &clk_branch2_ops
,
1126 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1129 .enable_reg
= 0x0648,
1130 .enable_mask
= BIT(0),
1131 .hw
.init
= &(struct clk_init_data
){
1132 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1133 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup1_i2c_apps_clk_src
.clkr
.hw
},
1135 .flags
= CLK_SET_RATE_PARENT
,
1136 .ops
= &clk_branch2_ops
,
1141 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1144 .enable_reg
= 0x0644,
1145 .enable_mask
= BIT(0),
1146 .hw
.init
= &(struct clk_init_data
){
1147 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1148 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup1_spi_apps_clk_src
.clkr
.hw
},
1150 .flags
= CLK_SET_RATE_PARENT
,
1151 .ops
= &clk_branch2_ops
,
1156 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1159 .enable_reg
= 0x06c8,
1160 .enable_mask
= BIT(0),
1161 .hw
.init
= &(struct clk_init_data
){
1162 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1163 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup2_i2c_apps_clk_src
.clkr
.hw
},
1165 .flags
= CLK_SET_RATE_PARENT
,
1166 .ops
= &clk_branch2_ops
,
1171 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1174 .enable_reg
= 0x06c4,
1175 .enable_mask
= BIT(0),
1176 .hw
.init
= &(struct clk_init_data
){
1177 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1178 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup2_spi_apps_clk_src
.clkr
.hw
},
1180 .flags
= CLK_SET_RATE_PARENT
,
1181 .ops
= &clk_branch2_ops
,
1186 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1189 .enable_reg
= 0x0748,
1190 .enable_mask
= BIT(0),
1191 .hw
.init
= &(struct clk_init_data
){
1192 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1193 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup3_i2c_apps_clk_src
.clkr
.hw
},
1195 .flags
= CLK_SET_RATE_PARENT
,
1196 .ops
= &clk_branch2_ops
,
1201 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1204 .enable_reg
= 0x0744,
1205 .enable_mask
= BIT(0),
1206 .hw
.init
= &(struct clk_init_data
){
1207 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1208 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup3_spi_apps_clk_src
.clkr
.hw
},
1210 .flags
= CLK_SET_RATE_PARENT
,
1211 .ops
= &clk_branch2_ops
,
1216 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1219 .enable_reg
= 0x07c8,
1220 .enable_mask
= BIT(0),
1221 .hw
.init
= &(struct clk_init_data
){
1222 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1223 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup4_i2c_apps_clk_src
.clkr
.hw
},
1225 .flags
= CLK_SET_RATE_PARENT
,
1226 .ops
= &clk_branch2_ops
,
1231 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1234 .enable_reg
= 0x07c4,
1235 .enable_mask
= BIT(0),
1236 .hw
.init
= &(struct clk_init_data
){
1237 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1238 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup4_spi_apps_clk_src
.clkr
.hw
},
1240 .flags
= CLK_SET_RATE_PARENT
,
1241 .ops
= &clk_branch2_ops
,
1246 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
1249 .enable_reg
= 0x0848,
1250 .enable_mask
= BIT(0),
1251 .hw
.init
= &(struct clk_init_data
){
1252 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
1253 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup5_i2c_apps_clk_src
.clkr
.hw
},
1255 .flags
= CLK_SET_RATE_PARENT
,
1256 .ops
= &clk_branch2_ops
,
1261 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
1264 .enable_reg
= 0x0844,
1265 .enable_mask
= BIT(0),
1266 .hw
.init
= &(struct clk_init_data
){
1267 .name
= "gcc_blsp1_qup5_spi_apps_clk",
1268 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup5_spi_apps_clk_src
.clkr
.hw
},
1270 .flags
= CLK_SET_RATE_PARENT
,
1271 .ops
= &clk_branch2_ops
,
1276 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
1279 .enable_reg
= 0x08c8,
1280 .enable_mask
= BIT(0),
1281 .hw
.init
= &(struct clk_init_data
){
1282 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
1283 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup6_i2c_apps_clk_src
.clkr
.hw
},
1285 .flags
= CLK_SET_RATE_PARENT
,
1286 .ops
= &clk_branch2_ops
,
1291 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
1294 .enable_reg
= 0x08c4,
1295 .enable_mask
= BIT(0),
1296 .hw
.init
= &(struct clk_init_data
){
1297 .name
= "gcc_blsp1_qup6_spi_apps_clk",
1298 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_qup6_spi_apps_clk_src
.clkr
.hw
},
1300 .flags
= CLK_SET_RATE_PARENT
,
1301 .ops
= &clk_branch2_ops
,
1306 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1309 .enable_reg
= 0x0684,
1310 .enable_mask
= BIT(0),
1311 .hw
.init
= &(struct clk_init_data
){
1312 .name
= "gcc_blsp1_uart1_apps_clk",
1313 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_uart1_apps_clk_src
.clkr
.hw
},
1315 .flags
= CLK_SET_RATE_PARENT
,
1316 .ops
= &clk_branch2_ops
,
1321 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1324 .enable_reg
= 0x0704,
1325 .enable_mask
= BIT(0),
1326 .hw
.init
= &(struct clk_init_data
){
1327 .name
= "gcc_blsp1_uart2_apps_clk",
1328 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_uart2_apps_clk_src
.clkr
.hw
},
1330 .flags
= CLK_SET_RATE_PARENT
,
1331 .ops
= &clk_branch2_ops
,
1336 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1339 .enable_reg
= 0x0784,
1340 .enable_mask
= BIT(0),
1341 .hw
.init
= &(struct clk_init_data
){
1342 .name
= "gcc_blsp1_uart3_apps_clk",
1343 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_uart3_apps_clk_src
.clkr
.hw
},
1345 .flags
= CLK_SET_RATE_PARENT
,
1346 .ops
= &clk_branch2_ops
,
1351 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1354 .enable_reg
= 0x0804,
1355 .enable_mask
= BIT(0),
1356 .hw
.init
= &(struct clk_init_data
){
1357 .name
= "gcc_blsp1_uart4_apps_clk",
1358 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_uart4_apps_clk_src
.clkr
.hw
},
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_hws
= (const struct clk_hw
*[]){ &blsp1_uart5_apps_clk_src
.clkr
.hw
},
1375 .flags
= CLK_SET_RATE_PARENT
,
1376 .ops
= &clk_branch2_ops
,
1381 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1384 .enable_reg
= 0x0904,
1385 .enable_mask
= BIT(0),
1386 .hw
.init
= &(struct clk_init_data
){
1387 .name
= "gcc_blsp1_uart6_apps_clk",
1388 .parent_hws
= (const struct clk_hw
*[]){ &blsp1_uart6_apps_clk_src
.clkr
.hw
},
1390 .flags
= CLK_SET_RATE_PARENT
,
1391 .ops
= &clk_branch2_ops
,
1396 static struct clk_branch gcc_blsp2_ahb_clk
= {
1398 .halt_check
= BRANCH_HALT_VOTED
,
1400 .enable_reg
= 0x1484,
1401 .enable_mask
= BIT(15),
1402 .hw
.init
= &(struct clk_init_data
){
1403 .name
= "gcc_blsp2_ahb_clk",
1404 .ops
= &clk_branch2_ops
,
1409 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1412 .enable_reg
= 0x0988,
1413 .enable_mask
= BIT(0),
1414 .hw
.init
= &(struct clk_init_data
){
1415 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1416 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup1_i2c_apps_clk_src
.clkr
.hw
},
1418 .flags
= CLK_SET_RATE_PARENT
,
1419 .ops
= &clk_branch2_ops
,
1424 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1427 .enable_reg
= 0x0984,
1428 .enable_mask
= BIT(0),
1429 .hw
.init
= &(struct clk_init_data
){
1430 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1431 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup1_spi_apps_clk_src
.clkr
.hw
},
1433 .flags
= CLK_SET_RATE_PARENT
,
1434 .ops
= &clk_branch2_ops
,
1439 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1442 .enable_reg
= 0x0a08,
1443 .enable_mask
= BIT(0),
1444 .hw
.init
= &(struct clk_init_data
){
1445 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1446 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup2_i2c_apps_clk_src
.clkr
.hw
},
1448 .flags
= CLK_SET_RATE_PARENT
,
1449 .ops
= &clk_branch2_ops
,
1454 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1457 .enable_reg
= 0x0a04,
1458 .enable_mask
= BIT(0),
1459 .hw
.init
= &(struct clk_init_data
){
1460 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1461 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup2_spi_apps_clk_src
.clkr
.hw
},
1463 .flags
= CLK_SET_RATE_PARENT
,
1464 .ops
= &clk_branch2_ops
,
1469 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1472 .enable_reg
= 0x0a88,
1473 .enable_mask
= BIT(0),
1474 .hw
.init
= &(struct clk_init_data
){
1475 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1476 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup3_i2c_apps_clk_src
.clkr
.hw
},
1478 .flags
= CLK_SET_RATE_PARENT
,
1479 .ops
= &clk_branch2_ops
,
1484 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1487 .enable_reg
= 0x0a84,
1488 .enable_mask
= BIT(0),
1489 .hw
.init
= &(struct clk_init_data
){
1490 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1491 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup3_spi_apps_clk_src
.clkr
.hw
},
1493 .flags
= CLK_SET_RATE_PARENT
,
1494 .ops
= &clk_branch2_ops
,
1499 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk
= {
1502 .enable_reg
= 0x0b08,
1503 .enable_mask
= BIT(0),
1504 .hw
.init
= &(struct clk_init_data
){
1505 .name
= "gcc_blsp2_qup4_i2c_apps_clk",
1506 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup4_i2c_apps_clk_src
.clkr
.hw
},
1508 .flags
= CLK_SET_RATE_PARENT
,
1509 .ops
= &clk_branch2_ops
,
1514 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk
= {
1517 .enable_reg
= 0x0b04,
1518 .enable_mask
= BIT(0),
1519 .hw
.init
= &(struct clk_init_data
){
1520 .name
= "gcc_blsp2_qup4_spi_apps_clk",
1521 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup4_spi_apps_clk_src
.clkr
.hw
},
1523 .flags
= CLK_SET_RATE_PARENT
,
1524 .ops
= &clk_branch2_ops
,
1529 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk
= {
1532 .enable_reg
= 0x0b88,
1533 .enable_mask
= BIT(0),
1534 .hw
.init
= &(struct clk_init_data
){
1535 .name
= "gcc_blsp2_qup5_i2c_apps_clk",
1536 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup5_i2c_apps_clk_src
.clkr
.hw
},
1538 .flags
= CLK_SET_RATE_PARENT
,
1539 .ops
= &clk_branch2_ops
,
1544 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk
= {
1547 .enable_reg
= 0x0b84,
1548 .enable_mask
= BIT(0),
1549 .hw
.init
= &(struct clk_init_data
){
1550 .name
= "gcc_blsp2_qup5_spi_apps_clk",
1551 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup5_spi_apps_clk_src
.clkr
.hw
},
1553 .flags
= CLK_SET_RATE_PARENT
,
1554 .ops
= &clk_branch2_ops
,
1559 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk
= {
1562 .enable_reg
= 0x0c08,
1563 .enable_mask
= BIT(0),
1564 .hw
.init
= &(struct clk_init_data
){
1565 .name
= "gcc_blsp2_qup6_i2c_apps_clk",
1566 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup6_i2c_apps_clk_src
.clkr
.hw
},
1568 .flags
= CLK_SET_RATE_PARENT
,
1569 .ops
= &clk_branch2_ops
,
1574 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk
= {
1577 .enable_reg
= 0x0c04,
1578 .enable_mask
= BIT(0),
1579 .hw
.init
= &(struct clk_init_data
){
1580 .name
= "gcc_blsp2_qup6_spi_apps_clk",
1581 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_qup6_spi_apps_clk_src
.clkr
.hw
},
1583 .flags
= CLK_SET_RATE_PARENT
,
1584 .ops
= &clk_branch2_ops
,
1589 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1592 .enable_reg
= 0x09c4,
1593 .enable_mask
= BIT(0),
1594 .hw
.init
= &(struct clk_init_data
){
1595 .name
= "gcc_blsp2_uart1_apps_clk",
1596 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart1_apps_clk_src
.clkr
.hw
},
1598 .flags
= CLK_SET_RATE_PARENT
,
1599 .ops
= &clk_branch2_ops
,
1604 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1607 .enable_reg
= 0x0a44,
1608 .enable_mask
= BIT(0),
1609 .hw
.init
= &(struct clk_init_data
){
1610 .name
= "gcc_blsp2_uart2_apps_clk",
1611 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart2_apps_clk_src
.clkr
.hw
},
1613 .flags
= CLK_SET_RATE_PARENT
,
1614 .ops
= &clk_branch2_ops
,
1619 static struct clk_branch gcc_blsp2_uart3_apps_clk
= {
1622 .enable_reg
= 0x0ac4,
1623 .enable_mask
= BIT(0),
1624 .hw
.init
= &(struct clk_init_data
){
1625 .name
= "gcc_blsp2_uart3_apps_clk",
1626 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart3_apps_clk_src
.clkr
.hw
},
1628 .flags
= CLK_SET_RATE_PARENT
,
1629 .ops
= &clk_branch2_ops
,
1634 static struct clk_branch gcc_blsp2_uart4_apps_clk
= {
1637 .enable_reg
= 0x0b44,
1638 .enable_mask
= BIT(0),
1639 .hw
.init
= &(struct clk_init_data
){
1640 .name
= "gcc_blsp2_uart4_apps_clk",
1641 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart4_apps_clk_src
.clkr
.hw
},
1643 .flags
= CLK_SET_RATE_PARENT
,
1644 .ops
= &clk_branch2_ops
,
1649 static struct clk_branch gcc_blsp2_uart5_apps_clk
= {
1652 .enable_reg
= 0x0bc4,
1653 .enable_mask
= BIT(0),
1654 .hw
.init
= &(struct clk_init_data
){
1655 .name
= "gcc_blsp2_uart5_apps_clk",
1656 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart5_apps_clk_src
.clkr
.hw
},
1658 .flags
= CLK_SET_RATE_PARENT
,
1659 .ops
= &clk_branch2_ops
,
1664 static struct clk_branch gcc_blsp2_uart6_apps_clk
= {
1667 .enable_reg
= 0x0c44,
1668 .enable_mask
= BIT(0),
1669 .hw
.init
= &(struct clk_init_data
){
1670 .name
= "gcc_blsp2_uart6_apps_clk",
1671 .parent_hws
= (const struct clk_hw
*[]){ &blsp2_uart6_apps_clk_src
.clkr
.hw
},
1673 .flags
= CLK_SET_RATE_PARENT
,
1674 .ops
= &clk_branch2_ops
,
1679 static struct clk_branch gcc_gp1_clk
= {
1682 .enable_reg
= 0x1900,
1683 .enable_mask
= BIT(0),
1684 .hw
.init
= &(struct clk_init_data
){
1685 .name
= "gcc_gp1_clk",
1686 .parent_hws
= (const struct clk_hw
*[]){ &gp1_clk_src
.clkr
.hw
},
1688 .flags
= CLK_SET_RATE_PARENT
,
1689 .ops
= &clk_branch2_ops
,
1694 static struct clk_branch gcc_gp2_clk
= {
1697 .enable_reg
= 0x1940,
1698 .enable_mask
= BIT(0),
1699 .hw
.init
= &(struct clk_init_data
){
1700 .name
= "gcc_gp2_clk",
1701 .parent_hws
= (const struct clk_hw
*[]){ &gp2_clk_src
.clkr
.hw
},
1703 .flags
= CLK_SET_RATE_PARENT
,
1704 .ops
= &clk_branch2_ops
,
1709 static struct clk_branch gcc_gp3_clk
= {
1712 .enable_reg
= 0x1980,
1713 .enable_mask
= BIT(0),
1714 .hw
.init
= &(struct clk_init_data
){
1715 .name
= "gcc_gp3_clk",
1716 .parent_hws
= (const struct clk_hw
*[]){ &gp3_clk_src
.clkr
.hw
},
1718 .flags
= CLK_SET_RATE_PARENT
,
1719 .ops
= &clk_branch2_ops
,
1724 static struct clk_branch gcc_lpass_q6_axi_clk
= {
1727 .enable_reg
= 0x0280,
1728 .enable_mask
= BIT(0),
1729 .hw
.init
= &(struct clk_init_data
){
1730 .name
= "gcc_lpass_q6_axi_clk",
1731 .ops
= &clk_branch2_ops
,
1736 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
1739 .enable_reg
= 0x0284,
1740 .enable_mask
= BIT(0),
1741 .hw
.init
= &(struct clk_init_data
){
1742 .name
= "gcc_mss_q6_bimc_axi_clk",
1743 .ops
= &clk_branch2_ops
,
1748 static struct clk_branch gcc_pcie_0_aux_clk
= {
1751 .enable_reg
= 0x1ad4,
1752 .enable_mask
= BIT(0),
1753 .hw
.init
= &(struct clk_init_data
){
1754 .name
= "gcc_pcie_0_aux_clk",
1755 .parent_hws
= (const struct clk_hw
*[]){ &pcie_0_aux_clk_src
.clkr
.hw
},
1757 .flags
= CLK_SET_RATE_PARENT
,
1758 .ops
= &clk_branch2_ops
,
1763 static struct clk_branch gcc_pcie_0_cfg_ahb_clk
= {
1766 .enable_reg
= 0x1ad0,
1767 .enable_mask
= BIT(0),
1768 .hw
.init
= &(struct clk_init_data
){
1769 .name
= "gcc_pcie_0_cfg_ahb_clk",
1770 .ops
= &clk_branch2_ops
,
1775 static struct clk_branch gcc_pcie_0_mstr_axi_clk
= {
1778 .enable_reg
= 0x1acc,
1779 .enable_mask
= BIT(0),
1780 .hw
.init
= &(struct clk_init_data
){
1781 .name
= "gcc_pcie_0_mstr_axi_clk",
1782 .ops
= &clk_branch2_ops
,
1787 static struct clk_branch gcc_pcie_0_pipe_clk
= {
1789 .halt_check
= BRANCH_HALT_DELAY
,
1791 .enable_reg
= 0x1ad8,
1792 .enable_mask
= BIT(0),
1793 .hw
.init
= &(struct clk_init_data
){
1794 .name
= "gcc_pcie_0_pipe_clk",
1795 .parent_hws
= (const struct clk_hw
*[]){ &pcie_0_pipe_clk_src
.clkr
.hw
},
1797 .flags
= CLK_SET_RATE_PARENT
,
1798 .ops
= &clk_branch2_ops
,
1803 static struct clk_branch gcc_pcie_0_slv_axi_clk
= {
1805 .halt_check
= BRANCH_HALT_DELAY
,
1807 .enable_reg
= 0x1ac8,
1808 .enable_mask
= BIT(0),
1809 .hw
.init
= &(struct clk_init_data
){
1810 .name
= "gcc_pcie_0_slv_axi_clk",
1811 .ops
= &clk_branch2_ops
,
1816 static struct clk_branch gcc_pcie_1_aux_clk
= {
1819 .enable_reg
= 0x1b54,
1820 .enable_mask
= BIT(0),
1821 .hw
.init
= &(struct clk_init_data
){
1822 .name
= "gcc_pcie_1_aux_clk",
1823 .parent_hws
= (const struct clk_hw
*[]){ &pcie_1_aux_clk_src
.clkr
.hw
},
1825 .flags
= CLK_SET_RATE_PARENT
,
1826 .ops
= &clk_branch2_ops
,
1831 static struct clk_branch gcc_pcie_1_cfg_ahb_clk
= {
1834 .enable_reg
= 0x1b54,
1835 .enable_mask
= BIT(0),
1836 .hw
.init
= &(struct clk_init_data
){
1837 .name
= "gcc_pcie_1_cfg_ahb_clk",
1838 .ops
= &clk_branch2_ops
,
1843 static struct clk_branch gcc_pcie_1_mstr_axi_clk
= {
1846 .enable_reg
= 0x1b50,
1847 .enable_mask
= BIT(0),
1848 .hw
.init
= &(struct clk_init_data
){
1849 .name
= "gcc_pcie_1_mstr_axi_clk",
1850 .ops
= &clk_branch2_ops
,
1855 static struct clk_branch gcc_pcie_1_pipe_clk
= {
1857 .halt_check
= BRANCH_HALT_DELAY
,
1859 .enable_reg
= 0x1b58,
1860 .enable_mask
= BIT(0),
1861 .hw
.init
= &(struct clk_init_data
){
1862 .name
= "gcc_pcie_1_pipe_clk",
1863 .parent_hws
= (const struct clk_hw
*[]){ &pcie_1_pipe_clk_src
.clkr
.hw
},
1865 .flags
= CLK_SET_RATE_PARENT
,
1866 .ops
= &clk_branch2_ops
,
1871 static struct clk_branch gcc_pcie_1_slv_axi_clk
= {
1874 .enable_reg
= 0x1b48,
1875 .enable_mask
= BIT(0),
1876 .hw
.init
= &(struct clk_init_data
){
1877 .name
= "gcc_pcie_1_slv_axi_clk",
1878 .ops
= &clk_branch2_ops
,
1883 static struct clk_branch gcc_pdm2_clk
= {
1886 .enable_reg
= 0x0ccc,
1887 .enable_mask
= BIT(0),
1888 .hw
.init
= &(struct clk_init_data
){
1889 .name
= "gcc_pdm2_clk",
1890 .parent_hws
= (const struct clk_hw
*[]){ &pdm2_clk_src
.clkr
.hw
},
1892 .flags
= CLK_SET_RATE_PARENT
,
1893 .ops
= &clk_branch2_ops
,
1898 static struct clk_branch gcc_pdm_ahb_clk
= {
1901 .enable_reg
= 0x0cc4,
1902 .enable_mask
= BIT(0),
1903 .hw
.init
= &(struct clk_init_data
){
1904 .name
= "gcc_pdm_ahb_clk",
1905 .ops
= &clk_branch2_ops
,
1910 static struct clk_branch gcc_sdcc1_apps_clk
= {
1913 .enable_reg
= 0x04c4,
1914 .enable_mask
= BIT(0),
1915 .hw
.init
= &(struct clk_init_data
){
1916 .name
= "gcc_sdcc1_apps_clk",
1917 .parent_hws
= (const struct clk_hw
*[]){ &sdcc1_apps_clk_src
.clkr
.hw
},
1919 .flags
= CLK_SET_RATE_PARENT
,
1920 .ops
= &clk_branch2_ops
,
1925 static struct clk_branch gcc_sdcc1_ahb_clk
= {
1928 .enable_reg
= 0x04c8,
1929 .enable_mask
= BIT(0),
1930 .hw
.init
= &(struct clk_init_data
){
1931 .name
= "gcc_sdcc1_ahb_clk",
1932 .ops
= &clk_branch2_ops
,
1937 static struct clk_branch gcc_sdcc2_ahb_clk
= {
1940 .enable_reg
= 0x0508,
1941 .enable_mask
= BIT(0),
1942 .hw
.init
= &(struct clk_init_data
){
1943 .name
= "gcc_sdcc2_ahb_clk",
1944 .ops
= &clk_branch2_ops
,
1949 static struct clk_branch gcc_sdcc2_apps_clk
= {
1952 .enable_reg
= 0x0504,
1953 .enable_mask
= BIT(0),
1954 .hw
.init
= &(struct clk_init_data
){
1955 .name
= "gcc_sdcc2_apps_clk",
1956 .parent_hws
= (const struct clk_hw
*[]){ &sdcc2_apps_clk_src
.clkr
.hw
},
1958 .flags
= CLK_SET_RATE_PARENT
,
1959 .ops
= &clk_branch2_ops
,
1964 static struct clk_branch gcc_sdcc3_ahb_clk
= {
1967 .enable_reg
= 0x0548,
1968 .enable_mask
= BIT(0),
1969 .hw
.init
= &(struct clk_init_data
){
1970 .name
= "gcc_sdcc3_ahb_clk",
1971 .ops
= &clk_branch2_ops
,
1976 static struct clk_branch gcc_sdcc3_apps_clk
= {
1979 .enable_reg
= 0x0544,
1980 .enable_mask
= BIT(0),
1981 .hw
.init
= &(struct clk_init_data
){
1982 .name
= "gcc_sdcc3_apps_clk",
1983 .parent_hws
= (const struct clk_hw
*[]){ &sdcc3_apps_clk_src
.clkr
.hw
},
1985 .flags
= CLK_SET_RATE_PARENT
,
1986 .ops
= &clk_branch2_ops
,
1991 static struct clk_branch gcc_sdcc4_ahb_clk
= {
1994 .enable_reg
= 0x0588,
1995 .enable_mask
= BIT(0),
1996 .hw
.init
= &(struct clk_init_data
){
1997 .name
= "gcc_sdcc4_ahb_clk",
1998 .ops
= &clk_branch2_ops
,
2003 static struct clk_branch gcc_sdcc4_apps_clk
= {
2006 .enable_reg
= 0x0584,
2007 .enable_mask
= BIT(0),
2008 .hw
.init
= &(struct clk_init_data
){
2009 .name
= "gcc_sdcc4_apps_clk",
2010 .parent_hws
= (const struct clk_hw
*[]){ &sdcc4_apps_clk_src
.clkr
.hw
},
2012 .flags
= CLK_SET_RATE_PARENT
,
2013 .ops
= &clk_branch2_ops
,
2018 static struct clk_branch gcc_sys_noc_ufs_axi_clk
= {
2021 .enable_reg
= 0x1d7c,
2022 .enable_mask
= BIT(0),
2023 .hw
.init
= &(struct clk_init_data
){
2024 .name
= "gcc_sys_noc_ufs_axi_clk",
2025 .parent_hws
= (const struct clk_hw
*[]){ &ufs_axi_clk_src
.clkr
.hw
},
2027 .flags
= CLK_SET_RATE_PARENT
,
2028 .ops
= &clk_branch2_ops
,
2033 static struct clk_branch gcc_sys_noc_usb3_axi_clk
= {
2036 .enable_reg
= 0x03fc,
2037 .enable_mask
= BIT(0),
2038 .hw
.init
= &(struct clk_init_data
){
2039 .name
= "gcc_sys_noc_usb3_axi_clk",
2040 .parent_hws
= (const struct clk_hw
*[]){ &usb30_master_clk_src
.clkr
.hw
},
2042 .flags
= CLK_SET_RATE_PARENT
,
2043 .ops
= &clk_branch2_ops
,
2048 static struct clk_branch gcc_tsif_ahb_clk
= {
2051 .enable_reg
= 0x0d84,
2052 .enable_mask
= BIT(0),
2053 .hw
.init
= &(struct clk_init_data
){
2054 .name
= "gcc_tsif_ahb_clk",
2055 .ops
= &clk_branch2_ops
,
2060 static struct clk_branch gcc_tsif_ref_clk
= {
2063 .enable_reg
= 0x0d88,
2064 .enable_mask
= BIT(0),
2065 .hw
.init
= &(struct clk_init_data
){
2066 .name
= "gcc_tsif_ref_clk",
2067 .parent_hws
= (const struct clk_hw
*[]){ &tsif_ref_clk_src
.clkr
.hw
},
2069 .flags
= CLK_SET_RATE_PARENT
,
2070 .ops
= &clk_branch2_ops
,
2075 static struct clk_branch gcc_ufs_ahb_clk
= {
2078 .enable_reg
= 0x1d4c,
2079 .enable_mask
= BIT(0),
2080 .hw
.init
= &(struct clk_init_data
){
2081 .name
= "gcc_ufs_ahb_clk",
2082 .ops
= &clk_branch2_ops
,
2087 static struct clk_branch gcc_ufs_axi_clk
= {
2090 .enable_reg
= 0x1d48,
2091 .enable_mask
= BIT(0),
2092 .hw
.init
= &(struct clk_init_data
){
2093 .name
= "gcc_ufs_axi_clk",
2094 .parent_hws
= (const struct clk_hw
*[]){ &ufs_axi_clk_src
.clkr
.hw
},
2096 .flags
= CLK_SET_RATE_PARENT
,
2097 .ops
= &clk_branch2_ops
,
2102 static struct clk_branch gcc_ufs_rx_cfg_clk
= {
2105 .enable_reg
= 0x1d54,
2106 .enable_mask
= BIT(0),
2107 .hw
.init
= &(struct clk_init_data
){
2108 .name
= "gcc_ufs_rx_cfg_clk",
2109 .parent_hws
= (const struct clk_hw
*[]){ &ufs_axi_clk_src
.clkr
.hw
},
2111 .flags
= CLK_SET_RATE_PARENT
,
2112 .ops
= &clk_branch2_ops
,
2117 static struct clk_branch gcc_ufs_rx_symbol_0_clk
= {
2119 .halt_check
= BRANCH_HALT_DELAY
,
2121 .enable_reg
= 0x1d60,
2122 .enable_mask
= BIT(0),
2123 .hw
.init
= &(struct clk_init_data
){
2124 .name
= "gcc_ufs_rx_symbol_0_clk",
2125 .ops
= &clk_branch2_ops
,
2130 static struct clk_branch gcc_ufs_rx_symbol_1_clk
= {
2132 .halt_check
= BRANCH_HALT_DELAY
,
2134 .enable_reg
= 0x1d64,
2135 .enable_mask
= BIT(0),
2136 .hw
.init
= &(struct clk_init_data
){
2137 .name
= "gcc_ufs_rx_symbol_1_clk",
2138 .ops
= &clk_branch2_ops
,
2143 static struct clk_branch gcc_ufs_tx_cfg_clk
= {
2146 .enable_reg
= 0x1d50,
2147 .enable_mask
= BIT(0),
2148 .hw
.init
= &(struct clk_init_data
){
2149 .name
= "gcc_ufs_tx_cfg_clk",
2150 .parent_hws
= (const struct clk_hw
*[]){ &ufs_axi_clk_src
.clkr
.hw
},
2152 .flags
= CLK_SET_RATE_PARENT
,
2153 .ops
= &clk_branch2_ops
,
2158 static struct clk_branch gcc_ufs_tx_symbol_0_clk
= {
2160 .halt_check
= BRANCH_HALT_DELAY
,
2162 .enable_reg
= 0x1d58,
2163 .enable_mask
= BIT(0),
2164 .hw
.init
= &(struct clk_init_data
){
2165 .name
= "gcc_ufs_tx_symbol_0_clk",
2166 .ops
= &clk_branch2_ops
,
2171 static struct clk_branch gcc_ufs_tx_symbol_1_clk
= {
2173 .halt_check
= BRANCH_HALT_DELAY
,
2175 .enable_reg
= 0x1d5c,
2176 .enable_mask
= BIT(0),
2177 .hw
.init
= &(struct clk_init_data
){
2178 .name
= "gcc_ufs_tx_symbol_1_clk",
2179 .ops
= &clk_branch2_ops
,
2184 static struct clk_branch gcc_usb2_hs_phy_sleep_clk
= {
2187 .enable_reg
= 0x04ac,
2188 .enable_mask
= BIT(0),
2189 .hw
.init
= &(struct clk_init_data
){
2190 .name
= "gcc_usb2_hs_phy_sleep_clk",
2191 .parent_data
= &(const struct clk_parent_data
){
2196 .ops
= &clk_branch2_ops
,
2201 static struct clk_branch gcc_usb30_master_clk
= {
2204 .enable_reg
= 0x03c8,
2205 .enable_mask
= BIT(0),
2206 .hw
.init
= &(struct clk_init_data
){
2207 .name
= "gcc_usb30_master_clk",
2208 .parent_hws
= (const struct clk_hw
*[]){ &usb30_master_clk_src
.clkr
.hw
},
2210 .flags
= CLK_SET_RATE_PARENT
,
2211 .ops
= &clk_branch2_ops
,
2216 static struct clk_branch gcc_usb30_mock_utmi_clk
= {
2219 .enable_reg
= 0x03d0,
2220 .enable_mask
= BIT(0),
2221 .hw
.init
= &(struct clk_init_data
){
2222 .name
= "gcc_usb30_mock_utmi_clk",
2223 .parent_hws
= (const struct clk_hw
*[]){ &usb30_mock_utmi_clk_src
.clkr
.hw
},
2225 .flags
= CLK_SET_RATE_PARENT
,
2226 .ops
= &clk_branch2_ops
,
2231 static struct clk_branch gcc_usb30_sleep_clk
= {
2234 .enable_reg
= 0x03cc,
2235 .enable_mask
= BIT(0),
2236 .hw
.init
= &(struct clk_init_data
){
2237 .name
= "gcc_usb30_sleep_clk",
2238 .parent_data
= &(const struct clk_parent_data
){
2243 .ops
= &clk_branch2_ops
,
2248 static struct clk_branch gcc_usb3_phy_aux_clk
= {
2251 .enable_reg
= 0x1408,
2252 .enable_mask
= BIT(0),
2253 .hw
.init
= &(struct clk_init_data
){
2254 .name
= "gcc_usb3_phy_aux_clk",
2255 .parent_hws
= (const struct clk_hw
*[]){ &usb3_phy_aux_clk_src
.clkr
.hw
},
2257 .flags
= CLK_SET_RATE_PARENT
,
2258 .ops
= &clk_branch2_ops
,
2263 static struct clk_branch gcc_usb3_phy_pipe_clk
= {
2265 .halt_check
= BRANCH_HALT_SKIP
,
2267 .enable_reg
= 0x140c,
2268 .enable_mask
= BIT(0),
2269 .hw
.init
= &(struct clk_init_data
){
2270 .name
= "gcc_usb3_phy_pipe_clk",
2271 .ops
= &clk_branch2_ops
,
2276 static struct clk_branch gcc_usb_hs_ahb_clk
= {
2279 .enable_reg
= 0x0488,
2280 .enable_mask
= BIT(0),
2281 .hw
.init
= &(struct clk_init_data
){
2282 .name
= "gcc_usb_hs_ahb_clk",
2283 .ops
= &clk_branch2_ops
,
2288 static struct clk_branch gcc_usb_hs_system_clk
= {
2291 .enable_reg
= 0x0484,
2292 .enable_mask
= BIT(0),
2293 .hw
.init
= &(struct clk_init_data
){
2294 .name
= "gcc_usb_hs_system_clk",
2295 .parent_hws
= (const struct clk_hw
*[]){ &usb_hs_system_clk_src
.clkr
.hw
},
2297 .flags
= CLK_SET_RATE_PARENT
,
2298 .ops
= &clk_branch2_ops
,
2303 static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk
= {
2306 .enable_reg
= 0x1a84,
2307 .enable_mask
= BIT(0),
2308 .hw
.init
= &(struct clk_init_data
){
2309 .name
= "gcc_usb_phy_cfg_ahb2phy_clk",
2310 .ops
= &clk_branch2_ops
,
2315 static struct clk_branch gpll0_out_mmsscc
= {
2316 .halt_check
= BRANCH_HALT_DELAY
,
2318 .enable_reg
= 0x1484,
2319 .enable_mask
= BIT(26),
2320 .hw
.init
= &(struct clk_init_data
){
2321 .name
= "gpll0_out_mmsscc",
2322 .parent_hws
= (const struct clk_hw
*[]){ &gpll0
.clkr
.hw
},
2324 .ops
= &clk_branch2_ops
,
2329 static struct clk_branch gpll0_out_msscc
= {
2330 .halt_check
= BRANCH_HALT_DELAY
,
2332 .enable_reg
= 0x1484,
2333 .enable_mask
= BIT(27),
2334 .hw
.init
= &(struct clk_init_data
){
2335 .name
= "gpll0_out_msscc",
2336 .parent_hws
= (const struct clk_hw
*[]){ &gpll0
.clkr
.hw
},
2338 .ops
= &clk_branch2_ops
,
2343 static struct clk_branch pcie_0_phy_ldo
= {
2345 .halt_check
= BRANCH_HALT_SKIP
,
2347 .enable_reg
= 0x1E00,
2348 .enable_mask
= BIT(0),
2349 .hw
.init
= &(struct clk_init_data
){
2350 .name
= "pcie_0_phy_ldo",
2351 .ops
= &clk_branch2_ops
,
2356 static struct clk_branch pcie_1_phy_ldo
= {
2358 .halt_check
= BRANCH_HALT_SKIP
,
2360 .enable_reg
= 0x1E04,
2361 .enable_mask
= BIT(0),
2362 .hw
.init
= &(struct clk_init_data
){
2363 .name
= "pcie_1_phy_ldo",
2364 .ops
= &clk_branch2_ops
,
2369 static struct clk_branch ufs_phy_ldo
= {
2371 .halt_check
= BRANCH_HALT_SKIP
,
2373 .enable_reg
= 0x1E0C,
2374 .enable_mask
= BIT(0),
2375 .hw
.init
= &(struct clk_init_data
){
2376 .name
= "ufs_phy_ldo",
2377 .ops
= &clk_branch2_ops
,
2382 static struct clk_branch usb_ss_phy_ldo
= {
2384 .halt_check
= BRANCH_HALT_SKIP
,
2386 .enable_reg
= 0x1E08,
2387 .enable_mask
= BIT(0),
2388 .hw
.init
= &(struct clk_init_data
){
2389 .name
= "usb_ss_phy_ldo",
2390 .ops
= &clk_branch2_ops
,
2395 static struct clk_branch gcc_boot_rom_ahb_clk
= {
2397 .halt_check
= BRANCH_HALT_VOTED
,
2401 .enable_reg
= 0x1484,
2402 .enable_mask
= BIT(10),
2403 .hw
.init
= &(struct clk_init_data
){
2404 .name
= "gcc_boot_rom_ahb_clk",
2405 .ops
= &clk_branch2_ops
,
2410 static struct clk_branch gcc_prng_ahb_clk
= {
2412 .halt_check
= BRANCH_HALT_VOTED
,
2414 .enable_reg
= 0x1484,
2415 .enable_mask
= BIT(13),
2416 .hw
.init
= &(struct clk_init_data
){
2417 .name
= "gcc_prng_ahb_clk",
2418 .ops
= &clk_branch2_ops
,
2423 static struct gdsc pcie_0_gdsc
= {
2428 .pwrsts
= PWRSTS_OFF_ON
,
2431 static struct gdsc pcie_1_gdsc
= {
2436 .pwrsts
= PWRSTS_OFF_ON
,
2439 static struct gdsc usb30_gdsc
= {
2444 .pwrsts
= PWRSTS_OFF_ON
,
2447 static struct gdsc ufs_gdsc
= {
2452 .pwrsts
= PWRSTS_OFF_ON
,
2455 static struct clk_regmap
*gcc_msm8994_clocks
[] = {
2456 [GPLL0_EARLY
] = &gpll0_early
.clkr
,
2457 [GPLL0
] = &gpll0
.clkr
,
2458 [GPLL4_EARLY
] = &gpll4_early
.clkr
,
2459 [GPLL4
] = &gpll4
.clkr
,
2460 [UFS_AXI_CLK_SRC
] = &ufs_axi_clk_src
.clkr
,
2461 [USB30_MASTER_CLK_SRC
] = &usb30_master_clk_src
.clkr
,
2462 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
2463 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
2464 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
2465 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
2466 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
2467 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
2468 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
2469 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
2470 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
2471 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
2472 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
2473 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
2474 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
2475 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
2476 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
2477 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
2478 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
2479 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
2480 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
2481 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
2482 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
2483 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
2484 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
2485 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
2486 [BLSP2_QUP4_I2C_APPS_CLK_SRC
] = &blsp2_qup4_i2c_apps_clk_src
.clkr
,
2487 [BLSP2_QUP4_SPI_APPS_CLK_SRC
] = &blsp2_qup4_spi_apps_clk_src
.clkr
,
2488 [BLSP2_QUP5_I2C_APPS_CLK_SRC
] = &blsp2_qup5_i2c_apps_clk_src
.clkr
,
2489 [BLSP2_QUP5_SPI_APPS_CLK_SRC
] = &blsp2_qup5_spi_apps_clk_src
.clkr
,
2490 [BLSP2_QUP6_I2C_APPS_CLK_SRC
] = &blsp2_qup6_i2c_apps_clk_src
.clkr
,
2491 [BLSP2_QUP6_SPI_APPS_CLK_SRC
] = &blsp2_qup6_spi_apps_clk_src
.clkr
,
2492 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
2493 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
2494 [BLSP2_UART3_APPS_CLK_SRC
] = &blsp2_uart3_apps_clk_src
.clkr
,
2495 [BLSP2_UART4_APPS_CLK_SRC
] = &blsp2_uart4_apps_clk_src
.clkr
,
2496 [BLSP2_UART5_APPS_CLK_SRC
] = &blsp2_uart5_apps_clk_src
.clkr
,
2497 [BLSP2_UART6_APPS_CLK_SRC
] = &blsp2_uart6_apps_clk_src
.clkr
,
2498 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
2499 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
2500 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
2501 [PCIE_0_AUX_CLK_SRC
] = &pcie_0_aux_clk_src
.clkr
,
2502 [PCIE_0_PIPE_CLK_SRC
] = &pcie_0_pipe_clk_src
.clkr
,
2503 [PCIE_1_AUX_CLK_SRC
] = &pcie_1_aux_clk_src
.clkr
,
2504 [PCIE_1_PIPE_CLK_SRC
] = &pcie_1_pipe_clk_src
.clkr
,
2505 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
2506 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
2507 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
2508 [SDCC3_APPS_CLK_SRC
] = &sdcc3_apps_clk_src
.clkr
,
2509 [SDCC4_APPS_CLK_SRC
] = &sdcc4_apps_clk_src
.clkr
,
2510 [TSIF_REF_CLK_SRC
] = &tsif_ref_clk_src
.clkr
,
2511 [USB30_MOCK_UTMI_CLK_SRC
] = &usb30_mock_utmi_clk_src
.clkr
,
2512 [USB3_PHY_AUX_CLK_SRC
] = &usb3_phy_aux_clk_src
.clkr
,
2513 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
2514 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
2515 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
2516 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
2517 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
2518 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
2519 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
2520 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
2521 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
2522 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
2523 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
2524 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
2525 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
2526 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
2527 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
2528 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
2529 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
2530 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
2531 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
2532 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
2533 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
2534 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
2535 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
2536 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
2537 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
2538 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
2539 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
2540 [GCC_BLSP2_QUP4_I2C_APPS_CLK
] = &gcc_blsp2_qup4_i2c_apps_clk
.clkr
,
2541 [GCC_BLSP2_QUP4_SPI_APPS_CLK
] = &gcc_blsp2_qup4_spi_apps_clk
.clkr
,
2542 [GCC_BLSP2_QUP5_I2C_APPS_CLK
] = &gcc_blsp2_qup5_i2c_apps_clk
.clkr
,
2543 [GCC_BLSP2_QUP5_SPI_APPS_CLK
] = &gcc_blsp2_qup5_spi_apps_clk
.clkr
,
2544 [GCC_BLSP2_QUP6_I2C_APPS_CLK
] = &gcc_blsp2_qup6_i2c_apps_clk
.clkr
,
2545 [GCC_BLSP2_QUP6_SPI_APPS_CLK
] = &gcc_blsp2_qup6_spi_apps_clk
.clkr
,
2546 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
2547 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
2548 [GCC_BLSP2_UART3_APPS_CLK
] = &gcc_blsp2_uart3_apps_clk
.clkr
,
2549 [GCC_BLSP2_UART4_APPS_CLK
] = &gcc_blsp2_uart4_apps_clk
.clkr
,
2550 [GCC_BLSP2_UART5_APPS_CLK
] = &gcc_blsp2_uart5_apps_clk
.clkr
,
2551 [GCC_BLSP2_UART6_APPS_CLK
] = &gcc_blsp2_uart6_apps_clk
.clkr
,
2552 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2553 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2554 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2555 [GCC_LPASS_Q6_AXI_CLK
] = &gcc_lpass_q6_axi_clk
.clkr
,
2556 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
2557 [GCC_PCIE_0_AUX_CLK
] = &gcc_pcie_0_aux_clk
.clkr
,
2558 [GCC_PCIE_0_CFG_AHB_CLK
] = &gcc_pcie_0_cfg_ahb_clk
.clkr
,
2559 [GCC_PCIE_0_MSTR_AXI_CLK
] = &gcc_pcie_0_mstr_axi_clk
.clkr
,
2560 [GCC_PCIE_0_PIPE_CLK
] = &gcc_pcie_0_pipe_clk
.clkr
,
2561 [GCC_PCIE_0_SLV_AXI_CLK
] = &gcc_pcie_0_slv_axi_clk
.clkr
,
2562 [GCC_PCIE_1_AUX_CLK
] = &gcc_pcie_1_aux_clk
.clkr
,
2563 [GCC_PCIE_1_CFG_AHB_CLK
] = &gcc_pcie_1_cfg_ahb_clk
.clkr
,
2564 [GCC_PCIE_1_MSTR_AXI_CLK
] = &gcc_pcie_1_mstr_axi_clk
.clkr
,
2565 [GCC_PCIE_1_PIPE_CLK
] = &gcc_pcie_1_pipe_clk
.clkr
,
2566 [GCC_PCIE_1_SLV_AXI_CLK
] = &gcc_pcie_1_slv_axi_clk
.clkr
,
2567 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2568 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
2569 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2570 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2571 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
2572 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2573 [GCC_SDCC3_AHB_CLK
] = &gcc_sdcc3_ahb_clk
.clkr
,
2574 [GCC_SDCC3_APPS_CLK
] = &gcc_sdcc3_apps_clk
.clkr
,
2575 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
2576 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
2577 [GCC_SYS_NOC_UFS_AXI_CLK
] = &gcc_sys_noc_ufs_axi_clk
.clkr
,
2578 [GCC_SYS_NOC_USB3_AXI_CLK
] = &gcc_sys_noc_usb3_axi_clk
.clkr
,
2579 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
2580 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
2581 [GCC_UFS_AHB_CLK
] = &gcc_ufs_ahb_clk
.clkr
,
2582 [GCC_UFS_AXI_CLK
] = &gcc_ufs_axi_clk
.clkr
,
2583 [GCC_UFS_RX_CFG_CLK
] = &gcc_ufs_rx_cfg_clk
.clkr
,
2584 [GCC_UFS_RX_SYMBOL_0_CLK
] = &gcc_ufs_rx_symbol_0_clk
.clkr
,
2585 [GCC_UFS_RX_SYMBOL_1_CLK
] = &gcc_ufs_rx_symbol_1_clk
.clkr
,
2586 [GCC_UFS_TX_CFG_CLK
] = &gcc_ufs_tx_cfg_clk
.clkr
,
2587 [GCC_UFS_TX_SYMBOL_0_CLK
] = &gcc_ufs_tx_symbol_0_clk
.clkr
,
2588 [GCC_UFS_TX_SYMBOL_1_CLK
] = &gcc_ufs_tx_symbol_1_clk
.clkr
,
2589 [GCC_USB2_HS_PHY_SLEEP_CLK
] = &gcc_usb2_hs_phy_sleep_clk
.clkr
,
2590 [GCC_USB30_MASTER_CLK
] = &gcc_usb30_master_clk
.clkr
,
2591 [GCC_USB30_MOCK_UTMI_CLK
] = &gcc_usb30_mock_utmi_clk
.clkr
,
2592 [GCC_USB30_SLEEP_CLK
] = &gcc_usb30_sleep_clk
.clkr
,
2593 [GCC_USB3_PHY_AUX_CLK
] = &gcc_usb3_phy_aux_clk
.clkr
,
2594 [GCC_USB3_PHY_PIPE_CLK
] = &gcc_usb3_phy_pipe_clk
.clkr
,
2595 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
2596 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
2597 [GCC_USB_PHY_CFG_AHB2PHY_CLK
] = &gcc_usb_phy_cfg_ahb2phy_clk
.clkr
,
2598 [GPLL0_OUT_MMSSCC
] = &gpll0_out_mmsscc
.clkr
,
2599 [GPLL0_OUT_MSSCC
] = &gpll0_out_msscc
.clkr
,
2600 [PCIE_0_PHY_LDO
] = &pcie_0_phy_ldo
.clkr
,
2601 [PCIE_1_PHY_LDO
] = &pcie_1_phy_ldo
.clkr
,
2602 [UFS_PHY_LDO
] = &ufs_phy_ldo
.clkr
,
2603 [USB_SS_PHY_LDO
] = &usb_ss_phy_ldo
.clkr
,
2604 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
2605 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
2608 * The following clocks should NOT be managed by this driver, but they once were
2609 * mistakengly added. Now they are only here to indicate that they are not defined
2610 * on purpose, even though the names will stay in the header file (for ABI sanity).
2612 [CONFIG_NOC_CLK_SRC
] = NULL
,
2613 [PERIPH_NOC_CLK_SRC
] = NULL
,
2614 [SYSTEM_NOC_CLK_SRC
] = NULL
,
2617 static struct gdsc
*gcc_msm8994_gdscs
[] = {
2618 /* This GDSC does not exist, but ABI has to remain intact */
2620 [PCIE_0_GDSC
] = &pcie_0_gdsc
,
2621 [PCIE_1_GDSC
] = &pcie_1_gdsc
,
2622 [USB30_GDSC
] = &usb30_gdsc
,
2623 [UFS_GDSC
] = &ufs_gdsc
,
2626 static const struct qcom_reset_map gcc_msm8994_resets
[] = {
2627 [USB3_PHY_RESET
] = { 0x1400 },
2628 [USB3PHY_PHY_RESET
] = { 0x1404 },
2629 [MSS_RESET
] = { 0x1680 },
2630 [PCIE_PHY_0_RESET
] = { 0x1b18 },
2631 [PCIE_PHY_1_RESET
] = { 0x1b98 },
2632 [QUSB2_PHY_RESET
] = { 0x04b8 },
2635 static const struct regmap_config gcc_msm8994_regmap_config
= {
2639 .max_register
= 0x2000,
2643 static const struct qcom_cc_desc gcc_msm8994_desc
= {
2644 .config
= &gcc_msm8994_regmap_config
,
2645 .clks
= gcc_msm8994_clocks
,
2646 .num_clks
= ARRAY_SIZE(gcc_msm8994_clocks
),
2647 .resets
= gcc_msm8994_resets
,
2648 .num_resets
= ARRAY_SIZE(gcc_msm8994_resets
),
2649 .gdscs
= gcc_msm8994_gdscs
,
2650 .num_gdscs
= ARRAY_SIZE(gcc_msm8994_gdscs
),
2653 static const struct of_device_id gcc_msm8994_match_table
[] = {
2654 { .compatible
= "qcom,gcc-msm8992" },
2655 { .compatible
= "qcom,gcc-msm8994" }, /* V2 and V2.1 */
2658 MODULE_DEVICE_TABLE(of
, gcc_msm8994_match_table
);
2660 static int gcc_msm8994_probe(struct platform_device
*pdev
)
2662 if (of_device_is_compatible(pdev
->dev
.of_node
, "qcom,gcc-msm8992")) {
2663 /* MSM8992 features less clocks and some have different freq tables */
2664 gcc_msm8994_desc
.clks
[UFS_AXI_CLK_SRC
] = NULL
;
2665 gcc_msm8994_desc
.clks
[GCC_LPASS_Q6_AXI_CLK
] = NULL
;
2666 gcc_msm8994_desc
.clks
[UFS_PHY_LDO
] = NULL
;
2667 gcc_msm8994_desc
.clks
[GCC_UFS_AHB_CLK
] = NULL
;
2668 gcc_msm8994_desc
.clks
[GCC_UFS_AXI_CLK
] = NULL
;
2669 gcc_msm8994_desc
.clks
[GCC_UFS_RX_CFG_CLK
] = NULL
;
2670 gcc_msm8994_desc
.clks
[GCC_UFS_RX_SYMBOL_0_CLK
] = NULL
;
2671 gcc_msm8994_desc
.clks
[GCC_UFS_RX_SYMBOL_1_CLK
] = NULL
;
2672 gcc_msm8994_desc
.clks
[GCC_UFS_TX_CFG_CLK
] = NULL
;
2673 gcc_msm8994_desc
.clks
[GCC_UFS_TX_SYMBOL_0_CLK
] = NULL
;
2674 gcc_msm8994_desc
.clks
[GCC_UFS_TX_SYMBOL_1_CLK
] = NULL
;
2676 sdcc1_apps_clk_src
.freq_tbl
= ftbl_sdcc1_apps_clk_src_8992
;
2677 blsp1_qup1_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2678 blsp1_qup2_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2679 blsp1_qup3_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2680 blsp1_qup4_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2681 blsp1_qup5_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2682 blsp1_qup6_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2683 blsp2_qup1_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2684 blsp2_qup2_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2685 blsp2_qup3_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2686 blsp2_qup4_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2687 blsp2_qup5_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2688 blsp2_qup6_i2c_apps_clk_src
.freq_tbl
= ftbl_blsp1_qup_spi_apps_clk_src_8992
;
2691 * Some 8992 boards might *possibly* use
2692 * PCIe1 clocks and controller, but it's not
2693 * standard and they should be disabled otherwise.
2695 gcc_msm8994_desc
.clks
[PCIE_1_AUX_CLK_SRC
] = NULL
;
2696 gcc_msm8994_desc
.clks
[PCIE_1_PIPE_CLK_SRC
] = NULL
;
2697 gcc_msm8994_desc
.clks
[PCIE_1_PHY_LDO
] = NULL
;
2698 gcc_msm8994_desc
.clks
[GCC_PCIE_1_AUX_CLK
] = NULL
;
2699 gcc_msm8994_desc
.clks
[GCC_PCIE_1_CFG_AHB_CLK
] = NULL
;
2700 gcc_msm8994_desc
.clks
[GCC_PCIE_1_MSTR_AXI_CLK
] = NULL
;
2701 gcc_msm8994_desc
.clks
[GCC_PCIE_1_PIPE_CLK
] = NULL
;
2702 gcc_msm8994_desc
.clks
[GCC_PCIE_1_SLV_AXI_CLK
] = NULL
;
2703 gcc_msm8994_desc
.clks
[GCC_SYS_NOC_UFS_AXI_CLK
] = NULL
;
2706 return qcom_cc_probe(pdev
, &gcc_msm8994_desc
);
2709 static struct platform_driver gcc_msm8994_driver
= {
2710 .probe
= gcc_msm8994_probe
,
2712 .name
= "gcc-msm8994",
2713 .of_match_table
= gcc_msm8994_match_table
,
2717 static int __init
gcc_msm8994_init(void)
2719 return platform_driver_register(&gcc_msm8994_driver
);
2721 core_initcall(gcc_msm8994_init
);
2723 static void __exit
gcc_msm8994_exit(void)
2725 platform_driver_unregister(&gcc_msm8994_driver
);
2727 module_exit(gcc_msm8994_exit
);
2729 MODULE_DESCRIPTION("Qualcomm GCC MSM8994 Driver");
2730 MODULE_LICENSE("GPL v2");
2731 MODULE_ALIAS("platform:gcc-msm8994");