xref: /openbmc/linux/drivers/clk/qcom/gcc-ipq6018.c (revision 421b135a)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2018, The Linux Foundation. All rights reserved.
4  */
5 
6 #include <linux/kernel.h>
7 #include <linux/err.h>
8 #include <linux/platform_device.h>
9 #include <linux/module.h>
10 #include <linux/of.h>
11 #include <linux/clk-provider.h>
12 #include <linux/regmap.h>
13 
14 #include <linux/reset-controller.h>
15 #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
16 #include <dt-bindings/reset/qcom,gcc-ipq6018.h>
17 
18 #include "common.h"
19 #include "clk-regmap.h"
20 #include "clk-pll.h"
21 #include "clk-rcg.h"
22 #include "clk-branch.h"
23 #include "clk-alpha-pll.h"
24 #include "clk-regmap-divider.h"
25 #include "clk-regmap-mux.h"
26 #include "reset.h"
27 
28 enum {
29 	P_XO,
30 	P_BIAS_PLL,
31 	P_UNIPHY0_RX,
32 	P_UNIPHY0_TX,
33 	P_UNIPHY1_RX,
34 	P_BIAS_PLL_NSS_NOC,
35 	P_UNIPHY1_TX,
36 	P_PCIE20_PHY0_PIPE,
37 	P_USB3PHY_0_PIPE,
38 	P_GPLL0,
39 	P_GPLL0_DIV2,
40 	P_GPLL2,
41 	P_GPLL4,
42 	P_GPLL6,
43 	P_SLEEP_CLK,
44 	P_UBI32_PLL,
45 	P_NSS_CRYPTO_PLL,
46 	P_PI_SLEEP,
47 };
48 
49 static struct clk_alpha_pll gpll0_main = {
50 	.offset = 0x21000,
51 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
52 	.clkr = {
53 		.enable_reg = 0x0b000,
54 		.enable_mask = BIT(0),
55 		.hw.init = &(struct clk_init_data){
56 			.name = "gpll0_main",
57 			.parent_data = &(const struct clk_parent_data){
58 				.fw_name = "xo",
59 			},
60 			.num_parents = 1,
61 			.ops = &clk_alpha_pll_ops,
62 		},
63 	},
64 };
65 
66 static struct clk_fixed_factor gpll0_out_main_div2 = {
67 	.mult = 1,
68 	.div = 2,
69 	.hw.init = &(struct clk_init_data){
70 		.name = "gpll0_out_main_div2",
71 		.parent_hws = (const struct clk_hw *[]){
72 				&gpll0_main.clkr.hw },
73 		.num_parents = 1,
74 		.ops = &clk_fixed_factor_ops,
75 	},
76 };
77 
78 static struct clk_alpha_pll_postdiv gpll0 = {
79 	.offset = 0x21000,
80 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
81 	.width = 4,
82 	.clkr.hw.init = &(struct clk_init_data){
83 		.name = "gpll0",
84 		.parent_hws = (const struct clk_hw *[]){
85 				&gpll0_main.clkr.hw },
86 		.num_parents = 1,
87 		.ops = &clk_alpha_pll_postdiv_ro_ops,
88 	},
89 };
90 
91 static const struct clk_parent_data gcc_xo_gpll0_gpll0_out_main_div2[] = {
92 	{ .fw_name = "xo" },
93 	{ .hw = &gpll0.clkr.hw},
94 	{ .hw = &gpll0_out_main_div2.hw},
95 };
96 
97 static const struct parent_map gcc_xo_gpll0_gpll0_out_main_div2_map[] = {
98 	{ P_XO, 0 },
99 	{ P_GPLL0, 1 },
100 	{ P_GPLL0_DIV2, 4 },
101 };
102 
103 static struct clk_alpha_pll ubi32_pll_main = {
104 	.offset = 0x25000,
105 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA],
106 	.flags = SUPPORTS_DYNAMIC_UPDATE,
107 	.clkr = {
108 		.enable_reg = 0x0b000,
109 		.enable_mask = BIT(6),
110 		.hw.init = &(struct clk_init_data){
111 			.name = "ubi32_pll_main",
112 			.parent_data = &(const struct clk_parent_data){
113 				.fw_name = "xo",
114 			},
115 			.num_parents = 1,
116 			.ops = &clk_alpha_pll_huayra_ops,
117 		},
118 	},
119 };
120 
121 static struct clk_alpha_pll_postdiv ubi32_pll = {
122 	.offset = 0x25000,
123 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA],
124 	.width = 2,
125 	.clkr.hw.init = &(struct clk_init_data){
126 		.name = "ubi32_pll",
127 		.parent_hws = (const struct clk_hw *[]){
128 				&ubi32_pll_main.clkr.hw },
129 		.num_parents = 1,
130 		.ops = &clk_alpha_pll_postdiv_ro_ops,
131 		.flags = CLK_SET_RATE_PARENT,
132 	},
133 };
134 
135 static struct clk_alpha_pll gpll6_main = {
136 	.offset = 0x37000,
137 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_BRAMMO],
138 	.clkr = {
139 		.enable_reg = 0x0b000,
140 		.enable_mask = BIT(7),
141 		.hw.init = &(struct clk_init_data){
142 			.name = "gpll6_main",
143 			.parent_data = &(const struct clk_parent_data){
144 				.fw_name = "xo",
145 			},
146 			.num_parents = 1,
147 			.ops = &clk_alpha_pll_ops,
148 		},
149 	},
150 };
151 
152 static struct clk_alpha_pll_postdiv gpll6 = {
153 	.offset = 0x37000,
154 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_BRAMMO],
155 	.width = 2,
156 	.clkr.hw.init = &(struct clk_init_data){
157 		.name = "gpll6",
158 		.parent_hws = (const struct clk_hw *[]){
159 				&gpll6_main.clkr.hw },
160 		.num_parents = 1,
161 		.ops = &clk_alpha_pll_postdiv_ro_ops,
162 	},
163 };
164 
165 static struct clk_alpha_pll gpll4_main = {
166 	.offset = 0x24000,
167 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
168 	.clkr = {
169 		.enable_reg = 0x0b000,
170 		.enable_mask = BIT(5),
171 		.hw.init = &(struct clk_init_data){
172 			.name = "gpll4_main",
173 			.parent_data = &(const struct clk_parent_data){
174 				.fw_name = "xo",
175 			},
176 			.num_parents = 1,
177 			.ops = &clk_alpha_pll_ops,
178 		},
179 	},
180 };
181 
182 static struct clk_alpha_pll_postdiv gpll4 = {
183 	.offset = 0x24000,
184 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
185 	.width = 4,
186 	.clkr.hw.init = &(struct clk_init_data){
187 		.name = "gpll4",
188 		.parent_hws = (const struct clk_hw *[]){
189 				&gpll4_main.clkr.hw },
190 		.num_parents = 1,
191 		.ops = &clk_alpha_pll_postdiv_ro_ops,
192 	},
193 };
194 
195 static const struct freq_tbl ftbl_pcnoc_bfdcd_clk_src[] = {
196 	F(24000000, P_XO, 1, 0, 0),
197 	F(50000000, P_GPLL0, 16, 0, 0),
198 	F(100000000, P_GPLL0, 8, 0, 0),
199 	{ }
200 };
201 
202 static struct clk_rcg2 pcnoc_bfdcd_clk_src = {
203 	.cmd_rcgr = 0x27000,
204 	.freq_tbl = ftbl_pcnoc_bfdcd_clk_src,
205 	.hid_width = 5,
206 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
207 	.clkr.hw.init = &(struct clk_init_data){
208 		.name = "pcnoc_bfdcd_clk_src",
209 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
210 		.num_parents = 3,
211 		.ops = &clk_rcg2_ops,
212 	},
213 };
214 
215 static struct clk_alpha_pll gpll2_main = {
216 	.offset = 0x4a000,
217 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
218 	.clkr = {
219 		.enable_reg = 0x0b000,
220 		.enable_mask = BIT(2),
221 		.hw.init = &(struct clk_init_data){
222 			.name = "gpll2_main",
223 			.parent_data = &(const struct clk_parent_data){
224 				.fw_name = "xo",
225 			},
226 			.num_parents = 1,
227 			.ops = &clk_alpha_pll_ops,
228 		},
229 	},
230 };
231 
232 static struct clk_alpha_pll_postdiv gpll2 = {
233 	.offset = 0x4a000,
234 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
235 	.width = 4,
236 	.clkr.hw.init = &(struct clk_init_data){
237 		.name = "gpll2",
238 		.parent_hws = (const struct clk_hw *[]){
239 				&gpll2_main.clkr.hw },
240 		.num_parents = 1,
241 		.ops = &clk_alpha_pll_postdiv_ro_ops,
242 	},
243 };
244 
245 static struct clk_alpha_pll nss_crypto_pll_main = {
246 	.offset = 0x22000,
247 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
248 	.clkr = {
249 		.enable_reg = 0x0b000,
250 		.enable_mask = BIT(4),
251 		.hw.init = &(struct clk_init_data){
252 			.name = "nss_crypto_pll_main",
253 			.parent_data = &(const struct clk_parent_data){
254 				.fw_name = "xo",
255 			},
256 			.num_parents = 1,
257 			.ops = &clk_alpha_pll_ops,
258 		},
259 	},
260 };
261 
262 static struct clk_alpha_pll_postdiv nss_crypto_pll = {
263 	.offset = 0x22000,
264 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
265 	.width = 4,
266 	.clkr.hw.init = &(struct clk_init_data){
267 		.name = "nss_crypto_pll",
268 		.parent_hws = (const struct clk_hw *[]){
269 				&nss_crypto_pll_main.clkr.hw },
270 		.num_parents = 1,
271 		.ops = &clk_alpha_pll_postdiv_ro_ops,
272 	},
273 };
274 
275 static const struct freq_tbl ftbl_qdss_tsctr_clk_src[] = {
276 	F(160000000, P_GPLL0_DIV2, 2.5, 0, 0),
277 	F(320000000, P_GPLL0, 2.5, 0, 0),
278 	F(600000000, P_GPLL4, 2, 0, 0),
279 	{ }
280 };
281 
282 static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll6_gpll0_div2[] = {
283 	{ .fw_name = "xo" },
284 	{ .hw = &gpll4.clkr.hw },
285 	{ .hw = &gpll0.clkr.hw },
286 	{ .hw = &gpll6.clkr.hw },
287 	{ .hw = &gpll0_out_main_div2.hw },
288 };
289 
290 static const struct parent_map gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map[] = {
291 	{ P_XO, 0 },
292 	{ P_GPLL4, 1 },
293 	{ P_GPLL0, 2 },
294 	{ P_GPLL6, 3 },
295 	{ P_GPLL0_DIV2, 4 },
296 };
297 
298 static struct clk_rcg2 qdss_tsctr_clk_src = {
299 	.cmd_rcgr = 0x29064,
300 	.freq_tbl = ftbl_qdss_tsctr_clk_src,
301 	.hid_width = 5,
302 	.parent_map = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map,
303 	.clkr.hw.init = &(struct clk_init_data){
304 		.name = "qdss_tsctr_clk_src",
305 		.parent_data = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2,
306 		.num_parents = 5,
307 		.ops = &clk_rcg2_ops,
308 	},
309 };
310 
311 static struct clk_fixed_factor qdss_dap_sync_clk_src = {
312 	.mult = 1,
313 	.div = 4,
314 	.hw.init = &(struct clk_init_data){
315 		.name = "qdss_dap_sync_clk_src",
316 		.parent_hws = (const struct clk_hw *[]){
317 				&qdss_tsctr_clk_src.clkr.hw },
318 		.num_parents = 1,
319 		.ops = &clk_fixed_factor_ops,
320 	},
321 };
322 
323 static const struct freq_tbl ftbl_qdss_at_clk_src[] = {
324 	F(66670000, P_GPLL0_DIV2, 6, 0, 0),
325 	F(240000000, P_GPLL4, 5, 0, 0),
326 	{ }
327 };
328 
329 static struct clk_rcg2 qdss_at_clk_src = {
330 	.cmd_rcgr = 0x2900c,
331 	.freq_tbl = ftbl_qdss_at_clk_src,
332 	.hid_width = 5,
333 	.parent_map = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2_map,
334 	.clkr.hw.init = &(struct clk_init_data){
335 		.name = "qdss_at_clk_src",
336 		.parent_data = gcc_xo_gpll4_gpll0_gpll6_gpll0_div2,
337 		.num_parents = 5,
338 		.ops = &clk_rcg2_ops,
339 	},
340 };
341 
342 static struct clk_fixed_factor qdss_tsctr_div2_clk_src = {
343 	.mult = 1,
344 	.div = 2,
345 	.hw.init = &(struct clk_init_data){
346 		.name = "qdss_tsctr_div2_clk_src",
347 		.parent_hws = (const struct clk_hw *[]){
348 				&qdss_tsctr_clk_src.clkr.hw },
349 		.num_parents = 1,
350 		.flags = CLK_SET_RATE_PARENT,
351 		.ops = &clk_fixed_factor_ops,
352 	},
353 };
354 
355 static const struct freq_tbl ftbl_nss_ppe_clk_src[] = {
356 	F(24000000, P_XO, 1, 0, 0),
357 	F(300000000, P_BIAS_PLL, 1, 0, 0),
358 	{ }
359 };
360 
361 static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = {
362 	{ .fw_name = "xo" },
363 	{ .fw_name = "bias_pll_cc_clk" },
364 	{ .hw = &gpll0.clkr.hw },
365 	{ .hw = &gpll4.clkr.hw },
366 	{ .hw = &nss_crypto_pll.clkr.hw },
367 	{ .hw = &ubi32_pll.clkr.hw },
368 };
369 
370 static const struct parent_map gcc_xo_bias_gpll0_gpll4_nss_ubi32_map[] = {
371 	{ P_XO, 0 },
372 	{ P_BIAS_PLL, 1 },
373 	{ P_GPLL0, 2 },
374 	{ P_GPLL4, 3 },
375 	{ P_NSS_CRYPTO_PLL, 4 },
376 	{ P_UBI32_PLL, 5 },
377 };
378 
379 static struct clk_rcg2 nss_ppe_clk_src = {
380 	.cmd_rcgr = 0x68080,
381 	.freq_tbl = ftbl_nss_ppe_clk_src,
382 	.hid_width = 5,
383 	.parent_map = gcc_xo_bias_gpll0_gpll4_nss_ubi32_map,
384 	.clkr.hw.init = &(struct clk_init_data){
385 		.name = "nss_ppe_clk_src",
386 		.parent_data = gcc_xo_bias_gpll0_gpll4_nss_ubi32,
387 		.num_parents = 6,
388 		.ops = &clk_rcg2_ops,
389 	},
390 };
391 
392 static struct clk_branch gcc_xo_clk_src = {
393 	.halt_reg = 0x30018,
394 	.clkr = {
395 		.enable_reg = 0x30018,
396 		.enable_mask = BIT(1),
397 		.hw.init = &(struct clk_init_data){
398 			.name = "gcc_xo_clk_src",
399 			.parent_data = &(const struct clk_parent_data){
400 				.fw_name = "xo",
401 			},
402 			.num_parents = 1,
403 			.flags = CLK_SET_RATE_PARENT,
404 			.ops = &clk_branch2_ops,
405 		},
406 	},
407 };
408 
409 static const struct freq_tbl ftbl_nss_ce_clk_src[] = {
410 	F(24000000, P_XO, 1, 0, 0),
411 	F(200000000, P_GPLL0, 4, 0, 0),
412 	{ }
413 };
414 
415 static const struct clk_parent_data gcc_xo_gpll0[] = {
416 	{ .fw_name = "xo" },
417 	{ .hw = &gpll0.clkr.hw },
418 };
419 
420 static const struct parent_map gcc_xo_gpll0_map[] = {
421 	{ P_XO, 0 },
422 	{ P_GPLL0, 1 },
423 };
424 
425 static struct clk_rcg2 nss_ce_clk_src = {
426 	.cmd_rcgr = 0x68098,
427 	.freq_tbl = ftbl_nss_ce_clk_src,
428 	.hid_width = 5,
429 	.parent_map = gcc_xo_gpll0_map,
430 	.clkr.hw.init = &(struct clk_init_data){
431 		.name = "nss_ce_clk_src",
432 		.parent_data = gcc_xo_gpll0,
433 		.num_parents = 2,
434 		.ops = &clk_rcg2_ops,
435 	},
436 };
437 
438 static struct clk_branch gcc_sleep_clk_src = {
439 	.halt_reg = 0x30000,
440 	.clkr = {
441 		.enable_reg = 0x30000,
442 		.enable_mask = BIT(1),
443 		.hw.init = &(struct clk_init_data){
444 			.name = "gcc_sleep_clk_src",
445 			.parent_data = &(const struct clk_parent_data){
446 				.fw_name = "sleep_clk",
447 			},
448 			.num_parents = 1,
449 			.ops = &clk_branch2_ops,
450 		},
451 	},
452 };
453 
454 static const struct freq_tbl ftbl_snoc_nssnoc_bfdcd_clk_src[] = {
455 	F(24000000, P_XO, 1, 0, 0),
456 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
457 	F(100000000, P_GPLL0, 8, 0, 0),
458 	F(133333333, P_GPLL0, 6, 0, 0),
459 	F(160000000, P_GPLL0, 5, 0, 0),
460 	F(200000000, P_GPLL0, 4, 0, 0),
461 	F(266666667, P_GPLL0, 3, 0, 0),
462 	{ }
463 };
464 
465 static const struct clk_parent_data
466 			gcc_xo_gpll0_gpll6_gpll0_out_main_div2[] = {
467 	{ .fw_name = "xo" },
468 	{ .hw = &gpll0.clkr.hw },
469 	{ .hw = &gpll6.clkr.hw },
470 	{ .hw = &gpll0_out_main_div2.hw },
471 };
472 
473 static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map[] = {
474 	{ P_XO, 0 },
475 	{ P_GPLL0, 1 },
476 	{ P_GPLL6, 2 },
477 	{ P_GPLL0_DIV2, 3 },
478 };
479 
480 static struct clk_rcg2 snoc_nssnoc_bfdcd_clk_src = {
481 	.cmd_rcgr = 0x76054,
482 	.freq_tbl = ftbl_snoc_nssnoc_bfdcd_clk_src,
483 	.hid_width = 5,
484 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
485 	.clkr.hw.init = &(struct clk_init_data){
486 		.name = "snoc_nssnoc_bfdcd_clk_src",
487 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
488 		.num_parents = 4,
489 		.ops = &clk_rcg2_ops,
490 	},
491 };
492 
493 static const struct freq_tbl ftbl_apss_ahb_clk_src[] = {
494 	F(24000000, P_XO, 1, 0, 0),
495 	F(25000000, P_GPLL0_DIV2, 16, 0, 0),
496 	F(50000000, P_GPLL0, 16, 0, 0),
497 	F(100000000, P_GPLL0, 8, 0, 0),
498 	{ }
499 };
500 
501 static struct clk_rcg2 apss_ahb_clk_src = {
502 	.cmd_rcgr = 0x46000,
503 	.freq_tbl = ftbl_apss_ahb_clk_src,
504 	.hid_width = 5,
505 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
506 	.clkr.hw.init = &(struct clk_init_data){
507 		.name = "apss_ahb_clk_src",
508 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
509 		.num_parents = 3,
510 		.ops = &clk_rcg2_ops,
511 	},
512 };
513 
514 static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
515 	F(24000000, P_XO, 1, 0, 0),
516 	F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
517 	F(25000000, P_UNIPHY0_RX, 5, 0, 0),
518 	F(78125000, P_UNIPHY1_RX, 4, 0, 0),
519 	F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
520 	F(125000000, P_UNIPHY0_RX, 1, 0, 0),
521 	F(156250000, P_UNIPHY1_RX, 2, 0, 0),
522 	F(312500000, P_UNIPHY1_RX, 1, 0, 0),
523 	{ }
524 };
525 
526 static const struct clk_parent_data
527 gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
528 	{ .fw_name = "xo" },
529 	{ .fw_name = "uniphy0_gcc_rx_clk" },
530 	{ .fw_name = "uniphy0_gcc_tx_clk" },
531 	{ .fw_name = "uniphy1_gcc_rx_clk" },
532 	{ .fw_name = "uniphy1_gcc_tx_clk" },
533 	{ .hw = &ubi32_pll.clkr.hw },
534 	{ .fw_name = "bias_pll_cc_clk" },
535 };
536 
537 static const struct parent_map
538 gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map[] = {
539 	{ P_XO, 0 },
540 	{ P_UNIPHY0_RX, 1 },
541 	{ P_UNIPHY0_TX, 2 },
542 	{ P_UNIPHY1_RX, 3 },
543 	{ P_UNIPHY1_TX, 4 },
544 	{ P_UBI32_PLL, 5 },
545 	{ P_BIAS_PLL, 6 },
546 };
547 
548 static struct clk_rcg2 nss_port5_rx_clk_src = {
549 	.cmd_rcgr = 0x68060,
550 	.freq_tbl = ftbl_nss_port5_rx_clk_src,
551 	.hid_width = 5,
552 	.parent_map = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map,
553 	.clkr.hw.init = &(struct clk_init_data){
554 		.name = "nss_port5_rx_clk_src",
555 		.parent_data = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias,
556 		.num_parents = 7,
557 		.ops = &clk_rcg2_ops,
558 	},
559 };
560 
561 static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
562 	F(24000000, P_XO, 1, 0, 0),
563 	F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
564 	F(25000000, P_UNIPHY0_TX, 5, 0, 0),
565 	F(78125000, P_UNIPHY1_TX, 4, 0, 0),
566 	F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
567 	F(125000000, P_UNIPHY0_TX, 1, 0, 0),
568 	F(156250000, P_UNIPHY1_TX, 2, 0, 0),
569 	F(312500000, P_UNIPHY1_TX, 1, 0, 0),
570 	{ }
571 };
572 
573 static const struct clk_parent_data
574 gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
575 	{ .fw_name = "xo" },
576 	{ .fw_name = "uniphy0_gcc_tx_clk" },
577 	{ .fw_name = "uniphy0_gcc_rx_clk" },
578 	{ .fw_name = "uniphy1_gcc_tx_clk" },
579 	{ .fw_name = "uniphy1_gcc_rx_clk" },
580 	{ .hw = &ubi32_pll.clkr.hw },
581 	{ .fw_name = "bias_pll_cc_clk" },
582 };
583 
584 static const struct parent_map
585 gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map[] = {
586 	{ P_XO, 0 },
587 	{ P_UNIPHY0_TX, 1 },
588 	{ P_UNIPHY0_RX, 2 },
589 	{ P_UNIPHY1_TX, 3 },
590 	{ P_UNIPHY1_RX, 4 },
591 	{ P_UBI32_PLL, 5 },
592 	{ P_BIAS_PLL, 6 },
593 };
594 
595 static struct clk_rcg2 nss_port5_tx_clk_src = {
596 	.cmd_rcgr = 0x68068,
597 	.freq_tbl = ftbl_nss_port5_tx_clk_src,
598 	.hid_width = 5,
599 	.parent_map = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map,
600 	.clkr.hw.init = &(struct clk_init_data){
601 		.name = "nss_port5_tx_clk_src",
602 		.parent_data = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias,
603 		.num_parents = 7,
604 		.ops = &clk_rcg2_ops,
605 	},
606 };
607 
608 static const struct freq_tbl ftbl_pcie_axi_clk_src[] = {
609 	F(24000000, P_XO, 1, 0, 0),
610 	F(200000000, P_GPLL0, 4, 0, 0),
611 	F(240000000, P_GPLL4, 5, 0, 0),
612 	{ }
613 };
614 
615 static const struct freq_tbl ftbl_pcie_rchng_clk_src[] = {
616 	F(24000000, P_XO, 1, 0, 0),
617 	F(100000000, P_GPLL0, 8, 0, 0),
618 	{ }
619 };
620 
621 static const struct clk_parent_data gcc_xo_gpll0_gpll4[] = {
622 	{ .fw_name = "xo" },
623 	{ .hw = &gpll0.clkr.hw },
624 	{ .hw = &gpll4.clkr.hw },
625 };
626 
627 static const struct parent_map gcc_xo_gpll0_gpll4_map[] = {
628 	{ P_XO, 0 },
629 	{ P_GPLL0, 1 },
630 	{ P_GPLL4, 2 },
631 };
632 
633 static struct clk_rcg2 pcie0_axi_clk_src = {
634 	.cmd_rcgr = 0x75054,
635 	.freq_tbl = ftbl_pcie_axi_clk_src,
636 	.hid_width = 5,
637 	.parent_map = gcc_xo_gpll0_gpll4_map,
638 	.clkr.hw.init = &(struct clk_init_data){
639 		.name = "pcie0_axi_clk_src",
640 		.parent_data = gcc_xo_gpll0_gpll4,
641 		.num_parents = 3,
642 		.ops = &clk_rcg2_ops,
643 	},
644 };
645 
646 static const struct freq_tbl ftbl_usb0_master_clk_src[] = {
647 	F(80000000, P_GPLL0_DIV2, 5, 0, 0),
648 	F(100000000, P_GPLL0, 8, 0, 0),
649 	F(133330000, P_GPLL0, 6, 0, 0),
650 	F(200000000, P_GPLL0, 4, 0, 0),
651 	{ }
652 };
653 
654 static const struct clk_parent_data gcc_xo_gpll0_out_main_div2_gpll0[] = {
655 	{ .fw_name = "xo" },
656 	{ .hw = &gpll0_out_main_div2.hw },
657 	{ .hw = &gpll0.clkr.hw },
658 };
659 
660 static const struct parent_map gcc_xo_gpll0_out_main_div2_gpll0_map[] = {
661 	{ P_XO, 0 },
662 	{ P_GPLL0_DIV2, 2 },
663 	{ P_GPLL0, 1 },
664 };
665 
666 static struct clk_rcg2 usb0_master_clk_src = {
667 	.cmd_rcgr = 0x3e00c,
668 	.freq_tbl = ftbl_usb0_master_clk_src,
669 	.mnd_width = 8,
670 	.hid_width = 5,
671 	.parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
672 	.clkr.hw.init = &(struct clk_init_data){
673 		.name = "usb0_master_clk_src",
674 		.parent_data = gcc_xo_gpll0_out_main_div2_gpll0,
675 		.num_parents = 3,
676 		.ops = &clk_rcg2_ops,
677 	},
678 };
679 
680 static struct clk_regmap_div apss_ahb_postdiv_clk_src = {
681 	.reg = 0x46018,
682 	.shift = 4,
683 	.width = 4,
684 	.clkr = {
685 		.hw.init = &(struct clk_init_data){
686 			.name = "apss_ahb_postdiv_clk_src",
687 			.parent_hws = (const struct clk_hw *[]){
688 					&apss_ahb_clk_src.clkr.hw },
689 			.num_parents = 1,
690 			.ops = &clk_regmap_div_ops,
691 		},
692 	},
693 };
694 
695 static struct clk_fixed_factor gcc_xo_div4_clk_src = {
696 	.mult = 1,
697 	.div = 4,
698 	.hw.init = &(struct clk_init_data){
699 		.name = "gcc_xo_div4_clk_src",
700 		.parent_hws = (const struct clk_hw *[]){
701 				&gcc_xo_clk_src.clkr.hw },
702 		.num_parents = 1,
703 		.ops = &clk_fixed_factor_ops,
704 		.flags = CLK_SET_RATE_PARENT,
705 	},
706 };
707 
708 static const struct freq_tbl ftbl_nss_port1_rx_clk_src[] = {
709 	F(24000000, P_XO, 1, 0, 0),
710 	F(25000000, P_UNIPHY0_RX, 5, 0, 0),
711 	F(125000000, P_UNIPHY0_RX, 1, 0, 0),
712 	{ }
713 };
714 
715 static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
716 	{ .fw_name = "xo" },
717 	{ .fw_name = "uniphy0_gcc_rx_clk" },
718 	{ .fw_name = "uniphy0_gcc_tx_clk" },
719 	{ .hw = &ubi32_pll.clkr.hw },
720 	{ .fw_name = "bias_pll_cc_clk" },
721 };
722 
723 static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
724 	{ P_XO, 0 },
725 	{ P_UNIPHY0_RX, 1 },
726 	{ P_UNIPHY0_TX, 2 },
727 	{ P_UBI32_PLL, 5 },
728 	{ P_BIAS_PLL, 6 },
729 };
730 
731 static struct clk_rcg2 nss_port1_rx_clk_src = {
732 	.cmd_rcgr = 0x68020,
733 	.freq_tbl = ftbl_nss_port1_rx_clk_src,
734 	.hid_width = 5,
735 	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
736 	.clkr.hw.init = &(struct clk_init_data){
737 		.name = "nss_port1_rx_clk_src",
738 		.parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
739 		.num_parents = 5,
740 		.ops = &clk_rcg2_ops,
741 	},
742 };
743 
744 static const struct freq_tbl ftbl_nss_port1_tx_clk_src[] = {
745 	F(24000000, P_XO, 1, 0, 0),
746 	F(25000000, P_UNIPHY0_TX, 5, 0, 0),
747 	F(125000000, P_UNIPHY0_TX, 1, 0, 0),
748 	{ }
749 };
750 
751 static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
752 	{ .fw_name = "xo" },
753 	{ .fw_name = "uniphy0_gcc_tx_clk" },
754 	{ .fw_name = "uniphy0_gcc_rx_clk" },
755 	{ .hw = &ubi32_pll.clkr.hw },
756 	{ .fw_name = "bias_pll_cc_clk" },
757 };
758 
759 static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
760 	{ P_XO, 0 },
761 	{ P_UNIPHY0_TX, 1 },
762 	{ P_UNIPHY0_RX, 2 },
763 	{ P_UBI32_PLL, 5 },
764 	{ P_BIAS_PLL, 6 },
765 };
766 
767 static struct clk_rcg2 nss_port1_tx_clk_src = {
768 	.cmd_rcgr = 0x68028,
769 	.freq_tbl = ftbl_nss_port1_tx_clk_src,
770 	.hid_width = 5,
771 	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
772 	.clkr.hw.init = &(struct clk_init_data){
773 		.name = "nss_port1_tx_clk_src",
774 		.parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
775 		.num_parents = 5,
776 		.ops = &clk_rcg2_ops,
777 	},
778 };
779 
780 static struct clk_rcg2 nss_port2_rx_clk_src = {
781 	.cmd_rcgr = 0x68030,
782 	.freq_tbl = ftbl_nss_port1_rx_clk_src,
783 	.hid_width = 5,
784 	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
785 	.clkr.hw.init = &(struct clk_init_data){
786 		.name = "nss_port2_rx_clk_src",
787 		.parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
788 		.num_parents = 5,
789 		.ops = &clk_rcg2_ops,
790 	},
791 };
792 
793 static struct clk_rcg2 nss_port2_tx_clk_src = {
794 	.cmd_rcgr = 0x68038,
795 	.freq_tbl = ftbl_nss_port1_tx_clk_src,
796 	.hid_width = 5,
797 	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
798 	.clkr.hw.init = &(struct clk_init_data){
799 		.name = "nss_port2_tx_clk_src",
800 		.parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
801 		.num_parents = 5,
802 		.ops = &clk_rcg2_ops,
803 	},
804 };
805 
806 static struct clk_rcg2 nss_port3_rx_clk_src = {
807 	.cmd_rcgr = 0x68040,
808 	.freq_tbl = ftbl_nss_port1_rx_clk_src,
809 	.hid_width = 5,
810 	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
811 	.clkr.hw.init = &(struct clk_init_data){
812 		.name = "nss_port3_rx_clk_src",
813 		.parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
814 		.num_parents = 5,
815 		.ops = &clk_rcg2_ops,
816 	},
817 };
818 
819 static struct clk_rcg2 nss_port3_tx_clk_src = {
820 	.cmd_rcgr = 0x68048,
821 	.freq_tbl = ftbl_nss_port1_tx_clk_src,
822 	.hid_width = 5,
823 	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
824 	.clkr.hw.init = &(struct clk_init_data){
825 		.name = "nss_port3_tx_clk_src",
826 		.parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
827 		.num_parents = 5,
828 		.ops = &clk_rcg2_ops,
829 	},
830 };
831 
832 static struct clk_rcg2 nss_port4_rx_clk_src = {
833 	.cmd_rcgr = 0x68050,
834 	.freq_tbl = ftbl_nss_port1_rx_clk_src,
835 	.hid_width = 5,
836 	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
837 	.clkr.hw.init = &(struct clk_init_data){
838 		.name = "nss_port4_rx_clk_src",
839 		.parent_data = gcc_xo_uniphy0_rx_tx_ubi32_bias,
840 		.num_parents = 5,
841 		.ops = &clk_rcg2_ops,
842 	},
843 };
844 
845 static struct clk_rcg2 nss_port4_tx_clk_src = {
846 	.cmd_rcgr = 0x68058,
847 	.freq_tbl = ftbl_nss_port1_tx_clk_src,
848 	.hid_width = 5,
849 	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
850 	.clkr.hw.init = &(struct clk_init_data){
851 		.name = "nss_port4_tx_clk_src",
852 		.parent_data = gcc_xo_uniphy0_tx_rx_ubi32_bias,
853 		.num_parents = 5,
854 		.ops = &clk_rcg2_ops,
855 	},
856 };
857 
858 static struct clk_regmap_div nss_port5_rx_div_clk_src = {
859 	.reg = 0x68440,
860 	.shift = 0,
861 	.width = 4,
862 	.clkr = {
863 		.hw.init = &(struct clk_init_data){
864 			.name = "nss_port5_rx_div_clk_src",
865 			.parent_hws = (const struct clk_hw *[]){
866 					&nss_port5_rx_clk_src.clkr.hw },
867 			.num_parents = 1,
868 			.ops = &clk_regmap_div_ops,
869 			.flags = CLK_SET_RATE_PARENT,
870 		},
871 	},
872 };
873 
874 static struct clk_regmap_div nss_port5_tx_div_clk_src = {
875 	.reg = 0x68444,
876 	.shift = 0,
877 	.width = 4,
878 	.clkr = {
879 		.hw.init = &(struct clk_init_data){
880 			.name = "nss_port5_tx_div_clk_src",
881 			.parent_hws = (const struct clk_hw *[]){
882 					&nss_port5_tx_clk_src.clkr.hw },
883 			.num_parents = 1,
884 			.ops = &clk_regmap_div_ops,
885 			.flags = CLK_SET_RATE_PARENT,
886 		},
887 	},
888 };
889 
890 static const struct freq_tbl ftbl_apss_axi_clk_src[] = {
891 	F(24000000, P_XO, 1, 0, 0),
892 	F(100000000, P_GPLL0_DIV2, 4, 0, 0),
893 	F(200000000, P_GPLL0, 4, 0, 0),
894 	F(308570000, P_GPLL6, 3.5, 0, 0),
895 	F(400000000, P_GPLL0, 2, 0, 0),
896 	F(533000000, P_GPLL0, 1.5, 0, 0),
897 	{ }
898 };
899 
900 static const struct clk_parent_data gcc_xo_gpll0_gpll6_ubi32_gpll0_div2[] = {
901 	{ .fw_name = "xo" },
902 	{ .hw = &gpll0.clkr.hw },
903 	{ .hw = &gpll6.clkr.hw },
904 	{ .hw = &ubi32_pll.clkr.hw },
905 	{ .hw = &gpll0_out_main_div2.hw },
906 };
907 
908 static const struct parent_map
909 gcc_xo_gpll0_gpll6_ubi32_gpll0_div2_map[] = {
910 	{ P_XO, 0 },
911 	{ P_GPLL0, 1 },
912 	{ P_GPLL6, 2 },
913 	{ P_UBI32_PLL, 3 },
914 	{ P_GPLL0_DIV2, 6 },
915 };
916 
917 static struct clk_rcg2 apss_axi_clk_src = {
918 	.cmd_rcgr = 0x38048,
919 	.freq_tbl = ftbl_apss_axi_clk_src,
920 	.hid_width = 5,
921 	.parent_map = gcc_xo_gpll0_gpll6_ubi32_gpll0_div2_map,
922 	.clkr.hw.init = &(struct clk_init_data){
923 		.name = "apss_axi_clk_src",
924 		.parent_data = gcc_xo_gpll0_gpll6_ubi32_gpll0_div2,
925 		.num_parents = 5,
926 		.ops = &clk_rcg2_ops,
927 	},
928 };
929 
930 static const struct freq_tbl ftbl_nss_crypto_clk_src[] = {
931 	F(24000000, P_XO, 1, 0, 0),
932 	F(300000000, P_NSS_CRYPTO_PLL, 2, 0, 0),
933 	{ }
934 };
935 
936 static const struct clk_parent_data gcc_xo_nss_crypto_pll_gpll0[] = {
937 	{ .fw_name = "xo" },
938 	{ .hw = &nss_crypto_pll.clkr.hw },
939 	{ .hw = &gpll0.clkr.hw },
940 };
941 
942 static const struct parent_map gcc_xo_nss_crypto_pll_gpll0_map[] = {
943 	{ P_XO, 0 },
944 	{ P_NSS_CRYPTO_PLL, 1 },
945 	{ P_GPLL0, 2 },
946 };
947 
948 static struct clk_rcg2 nss_crypto_clk_src = {
949 	.cmd_rcgr = 0x68144,
950 	.freq_tbl = ftbl_nss_crypto_clk_src,
951 	.mnd_width = 16,
952 	.hid_width = 5,
953 	.parent_map = gcc_xo_nss_crypto_pll_gpll0_map,
954 	.clkr.hw.init = &(struct clk_init_data){
955 		.name = "nss_crypto_clk_src",
956 		.parent_data = gcc_xo_nss_crypto_pll_gpll0,
957 		.num_parents = 3,
958 		.ops = &clk_rcg2_ops,
959 	},
960 };
961 
962 static struct clk_regmap_div nss_port1_rx_div_clk_src = {
963 	.reg = 0x68400,
964 	.shift = 0,
965 	.width = 4,
966 	.clkr = {
967 		.hw.init = &(struct clk_init_data){
968 			.name = "nss_port1_rx_div_clk_src",
969 			.parent_hws = (const struct clk_hw *[]){
970 				&nss_port1_rx_clk_src.clkr.hw },
971 			.num_parents = 1,
972 			.ops = &clk_regmap_div_ops,
973 			.flags = CLK_SET_RATE_PARENT,
974 		},
975 	},
976 };
977 
978 static struct clk_regmap_div nss_port1_tx_div_clk_src = {
979 	.reg = 0x68404,
980 	.shift = 0,
981 	.width = 4,
982 	.clkr = {
983 		.hw.init = &(struct clk_init_data){
984 			.name = "nss_port1_tx_div_clk_src",
985 			.parent_hws = (const struct clk_hw *[]){
986 					&nss_port1_tx_clk_src.clkr.hw },
987 			.num_parents = 1,
988 			.ops = &clk_regmap_div_ops,
989 			.flags = CLK_SET_RATE_PARENT,
990 		},
991 	},
992 };
993 
994 static struct clk_regmap_div nss_port2_rx_div_clk_src = {
995 	.reg = 0x68410,
996 	.shift = 0,
997 	.width = 4,
998 	.clkr = {
999 		.hw.init = &(struct clk_init_data){
1000 			.name = "nss_port2_rx_div_clk_src",
1001 			.parent_hws = (const struct clk_hw *[]){
1002 					&nss_port2_rx_clk_src.clkr.hw },
1003 			.num_parents = 1,
1004 			.ops = &clk_regmap_div_ops,
1005 			.flags = CLK_SET_RATE_PARENT,
1006 		},
1007 	},
1008 };
1009 
1010 static struct clk_regmap_div nss_port2_tx_div_clk_src = {
1011 	.reg = 0x68414,
1012 	.shift = 0,
1013 	.width = 4,
1014 	.clkr = {
1015 		.hw.init = &(struct clk_init_data){
1016 			.name = "nss_port2_tx_div_clk_src",
1017 			.parent_hws = (const struct clk_hw *[]){
1018 					&nss_port2_tx_clk_src.clkr.hw },
1019 			.num_parents = 1,
1020 			.ops = &clk_regmap_div_ops,
1021 			.flags = CLK_SET_RATE_PARENT,
1022 		},
1023 	},
1024 };
1025 
1026 static struct clk_regmap_div nss_port3_rx_div_clk_src = {
1027 	.reg = 0x68420,
1028 	.shift = 0,
1029 	.width = 4,
1030 	.clkr = {
1031 		.hw.init = &(struct clk_init_data){
1032 			.name = "nss_port3_rx_div_clk_src",
1033 			.parent_hws = (const struct clk_hw *[]){
1034 					&nss_port3_rx_clk_src.clkr.hw },
1035 			.num_parents = 1,
1036 			.ops = &clk_regmap_div_ops,
1037 			.flags = CLK_SET_RATE_PARENT,
1038 		},
1039 	},
1040 };
1041 
1042 static struct clk_regmap_div nss_port3_tx_div_clk_src = {
1043 	.reg = 0x68424,
1044 	.shift = 0,
1045 	.width = 4,
1046 	.clkr = {
1047 		.hw.init = &(struct clk_init_data){
1048 			.name = "nss_port3_tx_div_clk_src",
1049 			.parent_hws = (const struct clk_hw *[]){
1050 					&nss_port3_tx_clk_src.clkr.hw },
1051 			.num_parents = 1,
1052 			.ops = &clk_regmap_div_ops,
1053 			.flags = CLK_SET_RATE_PARENT,
1054 		},
1055 	},
1056 };
1057 
1058 static struct clk_regmap_div nss_port4_rx_div_clk_src = {
1059 	.reg = 0x68430,
1060 	.shift = 0,
1061 	.width = 4,
1062 	.clkr = {
1063 		.hw.init = &(struct clk_init_data){
1064 			.name = "nss_port4_rx_div_clk_src",
1065 			.parent_hws = (const struct clk_hw *[]){
1066 					&nss_port4_rx_clk_src.clkr.hw },
1067 			.num_parents = 1,
1068 			.ops = &clk_regmap_div_ops,
1069 			.flags = CLK_SET_RATE_PARENT,
1070 		},
1071 	},
1072 };
1073 
1074 static struct clk_regmap_div nss_port4_tx_div_clk_src = {
1075 	.reg = 0x68434,
1076 	.shift = 0,
1077 	.width = 4,
1078 	.clkr = {
1079 		.hw.init = &(struct clk_init_data){
1080 			.name = "nss_port4_tx_div_clk_src",
1081 			.parent_hws = (const struct clk_hw *[]){
1082 					&nss_port4_tx_clk_src.clkr.hw },
1083 			.num_parents = 1,
1084 			.ops = &clk_regmap_div_ops,
1085 			.flags = CLK_SET_RATE_PARENT,
1086 		},
1087 	},
1088 };
1089 
1090 static const struct freq_tbl ftbl_nss_ubi_clk_src[] = {
1091 	F(24000000, P_XO, 1, 0, 0),
1092 	F(149760000, P_UBI32_PLL, 10, 0, 0),
1093 	F(187200000, P_UBI32_PLL, 8, 0, 0),
1094 	F(249600000, P_UBI32_PLL, 6, 0, 0),
1095 	F(374400000, P_UBI32_PLL, 4, 0, 0),
1096 	F(748800000, P_UBI32_PLL, 2, 0, 0),
1097 	F(1497600000, P_UBI32_PLL, 1, 0, 0),
1098 	{ }
1099 };
1100 
1101 static const struct clk_parent_data
1102 			gcc_xo_ubi32_pll_gpll0_gpll2_gpll4_gpll6[] = {
1103 	{ .fw_name = "xo" },
1104 	{ .hw = &ubi32_pll.clkr.hw },
1105 	{ .hw = &gpll0.clkr.hw },
1106 	{ .hw = &gpll2.clkr.hw },
1107 	{ .hw = &gpll4.clkr.hw },
1108 	{ .hw = &gpll6.clkr.hw },
1109 };
1110 
1111 static const struct parent_map gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map[] = {
1112 	{ P_XO, 0 },
1113 	{ P_UBI32_PLL, 1 },
1114 	{ P_GPLL0, 2 },
1115 	{ P_GPLL2, 3 },
1116 	{ P_GPLL4, 4 },
1117 	{ P_GPLL6, 5 },
1118 };
1119 
1120 static struct clk_rcg2 nss_ubi0_clk_src = {
1121 	.cmd_rcgr = 0x68104,
1122 	.freq_tbl = ftbl_nss_ubi_clk_src,
1123 	.hid_width = 5,
1124 	.parent_map = gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map,
1125 	.clkr.hw.init = &(struct clk_init_data){
1126 		.name = "nss_ubi0_clk_src",
1127 		.parent_data = gcc_xo_ubi32_pll_gpll0_gpll2_gpll4_gpll6,
1128 		.num_parents = 6,
1129 		.ops = &clk_rcg2_ops,
1130 		.flags = CLK_SET_RATE_PARENT,
1131 	},
1132 };
1133 
1134 static const struct freq_tbl ftbl_adss_pwm_clk_src[] = {
1135 	F(24000000, P_XO, 1, 0, 0),
1136 	F(100000000, P_GPLL0, 8, 0, 0),
1137 	{ }
1138 };
1139 
1140 static struct clk_rcg2 adss_pwm_clk_src = {
1141 	.cmd_rcgr = 0x1c008,
1142 	.freq_tbl = ftbl_adss_pwm_clk_src,
1143 	.hid_width = 5,
1144 	.parent_map = gcc_xo_gpll0_map,
1145 	.clkr.hw.init = &(struct clk_init_data){
1146 		.name = "adss_pwm_clk_src",
1147 		.parent_data = gcc_xo_gpll0,
1148 		.num_parents = 2,
1149 		.ops = &clk_rcg2_ops,
1150 	},
1151 };
1152 
1153 static const struct freq_tbl ftbl_blsp1_qup_i2c_apps_clk_src[] = {
1154 	F(24000000, P_XO, 1, 0, 0),
1155 	F(25000000, P_GPLL0_DIV2, 16, 0, 0),
1156 	F(50000000, P_GPLL0, 16, 0, 0),
1157 	{ }
1158 };
1159 
1160 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
1161 	.cmd_rcgr = 0x0200c,
1162 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1163 	.hid_width = 5,
1164 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1165 	.clkr.hw.init = &(struct clk_init_data){
1166 		.name = "blsp1_qup1_i2c_apps_clk_src",
1167 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1168 		.num_parents = 3,
1169 		.ops = &clk_rcg2_ops,
1170 	},
1171 };
1172 
1173 static const struct freq_tbl ftbl_blsp1_qup_spi_apps_clk_src[] = {
1174 	F(960000, P_XO, 10, 2, 5),
1175 	F(4800000, P_XO, 5, 0, 0),
1176 	F(9600000, P_XO, 2, 4, 5),
1177 	F(12500000, P_GPLL0_DIV2, 16, 1, 2),
1178 	F(16000000, P_GPLL0, 10, 1, 5),
1179 	F(24000000, P_XO, 1, 0, 0),
1180 	F(25000000, P_GPLL0, 16, 1, 2),
1181 	F(50000000, P_GPLL0, 16, 0, 0),
1182 	{ }
1183 };
1184 
1185 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src = {
1186 	.cmd_rcgr = 0x02024,
1187 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1188 	.mnd_width = 8,
1189 	.hid_width = 5,
1190 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1191 	.clkr.hw.init = &(struct clk_init_data){
1192 		.name = "blsp1_qup1_spi_apps_clk_src",
1193 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1194 		.num_parents = 3,
1195 		.ops = &clk_rcg2_ops,
1196 	},
1197 };
1198 
1199 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src = {
1200 	.cmd_rcgr = 0x03000,
1201 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1202 	.hid_width = 5,
1203 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1204 	.clkr.hw.init = &(struct clk_init_data){
1205 		.name = "blsp1_qup2_i2c_apps_clk_src",
1206 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1207 		.num_parents = 3,
1208 		.ops = &clk_rcg2_ops,
1209 	},
1210 };
1211 
1212 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src = {
1213 	.cmd_rcgr = 0x03014,
1214 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1215 	.mnd_width = 8,
1216 	.hid_width = 5,
1217 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1218 	.clkr.hw.init = &(struct clk_init_data){
1219 		.name = "blsp1_qup2_spi_apps_clk_src",
1220 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1221 		.num_parents = 3,
1222 		.ops = &clk_rcg2_ops,
1223 	},
1224 };
1225 
1226 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src = {
1227 	.cmd_rcgr = 0x04000,
1228 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1229 	.hid_width = 5,
1230 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1231 	.clkr.hw.init = &(struct clk_init_data){
1232 		.name = "blsp1_qup3_i2c_apps_clk_src",
1233 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1234 		.num_parents = 3,
1235 		.ops = &clk_rcg2_ops,
1236 	},
1237 };
1238 
1239 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src = {
1240 	.cmd_rcgr = 0x04014,
1241 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1242 	.mnd_width = 8,
1243 	.hid_width = 5,
1244 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1245 	.clkr.hw.init = &(struct clk_init_data){
1246 		.name = "blsp1_qup3_spi_apps_clk_src",
1247 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1248 		.num_parents = 3,
1249 		.ops = &clk_rcg2_ops,
1250 	},
1251 };
1252 
1253 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src = {
1254 	.cmd_rcgr = 0x05000,
1255 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1256 	.hid_width = 5,
1257 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1258 	.clkr.hw.init = &(struct clk_init_data){
1259 		.name = "blsp1_qup4_i2c_apps_clk_src",
1260 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1261 		.num_parents = 3,
1262 		.ops = &clk_rcg2_ops,
1263 	},
1264 };
1265 
1266 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src = {
1267 	.cmd_rcgr = 0x05014,
1268 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1269 	.mnd_width = 8,
1270 	.hid_width = 5,
1271 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1272 	.clkr.hw.init = &(struct clk_init_data){
1273 		.name = "blsp1_qup4_spi_apps_clk_src",
1274 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1275 		.num_parents = 3,
1276 		.ops = &clk_rcg2_ops,
1277 	},
1278 };
1279 
1280 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src = {
1281 	.cmd_rcgr = 0x06000,
1282 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1283 	.hid_width = 5,
1284 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1285 	.clkr.hw.init = &(struct clk_init_data){
1286 		.name = "blsp1_qup5_i2c_apps_clk_src",
1287 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1288 		.num_parents = 3,
1289 		.ops = &clk_rcg2_ops,
1290 	},
1291 };
1292 
1293 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src = {
1294 	.cmd_rcgr = 0x06014,
1295 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1296 	.mnd_width = 8,
1297 	.hid_width = 5,
1298 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1299 	.clkr.hw.init = &(struct clk_init_data){
1300 		.name = "blsp1_qup5_spi_apps_clk_src",
1301 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1302 		.num_parents = 3,
1303 		.ops = &clk_rcg2_ops,
1304 	},
1305 };
1306 
1307 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src = {
1308 	.cmd_rcgr = 0x07000,
1309 	.freq_tbl = ftbl_blsp1_qup_i2c_apps_clk_src,
1310 	.hid_width = 5,
1311 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1312 	.clkr.hw.init = &(struct clk_init_data){
1313 		.name = "blsp1_qup6_i2c_apps_clk_src",
1314 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1315 		.num_parents = 3,
1316 		.ops = &clk_rcg2_ops,
1317 	},
1318 };
1319 
1320 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src = {
1321 	.cmd_rcgr = 0x07014,
1322 	.freq_tbl = ftbl_blsp1_qup_spi_apps_clk_src,
1323 	.mnd_width = 8,
1324 	.hid_width = 5,
1325 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1326 	.clkr.hw.init = &(struct clk_init_data){
1327 		.name = "blsp1_qup6_spi_apps_clk_src",
1328 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1329 		.num_parents = 3,
1330 		.ops = &clk_rcg2_ops,
1331 	},
1332 };
1333 
1334 static const struct freq_tbl ftbl_blsp1_uart_apps_clk_src[] = {
1335 	F(3686400, P_GPLL0_DIV2, 1, 144, 15625),
1336 	F(7372800, P_GPLL0_DIV2, 1, 288, 15625),
1337 	F(14745600, P_GPLL0_DIV2, 1, 576, 15625),
1338 	F(16000000, P_GPLL0_DIV2, 5, 1, 5),
1339 	F(24000000, P_XO, 1, 0, 0),
1340 	F(24000000, P_GPLL0, 1, 3, 100),
1341 	F(25000000, P_GPLL0, 16, 1, 2),
1342 	F(32000000, P_GPLL0, 1, 1, 25),
1343 	F(40000000, P_GPLL0, 1, 1, 20),
1344 	F(46400000, P_GPLL0, 1, 29, 500),
1345 	F(48000000, P_GPLL0, 1, 3, 50),
1346 	F(51200000, P_GPLL0, 1, 8, 125),
1347 	F(56000000, P_GPLL0, 1, 7, 100),
1348 	F(58982400, P_GPLL0, 1, 1152, 15625),
1349 	F(60000000, P_GPLL0, 1, 3, 40),
1350 	F(64000000, P_GPLL0, 12.5, 1, 1),
1351 	{ }
1352 };
1353 
1354 static struct clk_rcg2 blsp1_uart1_apps_clk_src = {
1355 	.cmd_rcgr = 0x02044,
1356 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1357 	.mnd_width = 16,
1358 	.hid_width = 5,
1359 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1360 	.clkr.hw.init = &(struct clk_init_data){
1361 		.name = "blsp1_uart1_apps_clk_src",
1362 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1363 		.num_parents = 3,
1364 		.ops = &clk_rcg2_ops,
1365 	},
1366 };
1367 
1368 static struct clk_rcg2 blsp1_uart2_apps_clk_src = {
1369 	.cmd_rcgr = 0x03034,
1370 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1371 	.mnd_width = 16,
1372 	.hid_width = 5,
1373 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1374 	.clkr.hw.init = &(struct clk_init_data){
1375 		.name = "blsp1_uart2_apps_clk_src",
1376 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1377 		.num_parents = 3,
1378 		.ops = &clk_rcg2_ops,
1379 	},
1380 };
1381 
1382 static struct clk_rcg2 blsp1_uart3_apps_clk_src = {
1383 	.cmd_rcgr = 0x04034,
1384 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1385 	.mnd_width = 16,
1386 	.hid_width = 5,
1387 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1388 	.clkr.hw.init = &(struct clk_init_data){
1389 		.name = "blsp1_uart3_apps_clk_src",
1390 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1391 		.num_parents = 3,
1392 		.ops = &clk_rcg2_ops,
1393 	},
1394 };
1395 
1396 static struct clk_rcg2 blsp1_uart4_apps_clk_src = {
1397 	.cmd_rcgr = 0x05034,
1398 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1399 	.mnd_width = 16,
1400 	.hid_width = 5,
1401 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1402 	.clkr.hw.init = &(struct clk_init_data){
1403 		.name = "blsp1_uart4_apps_clk_src",
1404 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1405 		.num_parents = 3,
1406 		.ops = &clk_rcg2_ops,
1407 	},
1408 };
1409 
1410 static struct clk_rcg2 blsp1_uart5_apps_clk_src = {
1411 	.cmd_rcgr = 0x06034,
1412 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1413 	.mnd_width = 16,
1414 	.hid_width = 5,
1415 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1416 	.clkr.hw.init = &(struct clk_init_data){
1417 		.name = "blsp1_uart5_apps_clk_src",
1418 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1419 		.num_parents = 3,
1420 		.ops = &clk_rcg2_ops,
1421 	},
1422 };
1423 
1424 static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
1425 	.cmd_rcgr = 0x07034,
1426 	.freq_tbl = ftbl_blsp1_uart_apps_clk_src,
1427 	.mnd_width = 16,
1428 	.hid_width = 5,
1429 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1430 	.clkr.hw.init = &(struct clk_init_data){
1431 		.name = "blsp1_uart6_apps_clk_src",
1432 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1433 		.num_parents = 3,
1434 		.ops = &clk_rcg2_ops,
1435 	},
1436 };
1437 
1438 static const struct freq_tbl ftbl_crypto_clk_src[] = {
1439 	F(40000000, P_GPLL0_DIV2, 10, 0, 0),
1440 	F(80000000, P_GPLL0, 10, 0, 0),
1441 	F(100000000, P_GPLL0, 8, 0, 0),
1442 	F(160000000, P_GPLL0, 5, 0, 0),
1443 	{ }
1444 };
1445 
1446 static struct clk_rcg2 crypto_clk_src = {
1447 	.cmd_rcgr = 0x16004,
1448 	.freq_tbl = ftbl_crypto_clk_src,
1449 	.hid_width = 5,
1450 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1451 	.clkr.hw.init = &(struct clk_init_data){
1452 		.name = "crypto_clk_src",
1453 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1454 		.num_parents = 3,
1455 		.ops = &clk_rcg2_ops,
1456 	},
1457 };
1458 
1459 static const struct freq_tbl ftbl_gp_clk_src[] = {
1460 	F(24000000, P_XO, 1, 0, 0),
1461 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1462 	F(100000000, P_GPLL0, 8, 0, 0),
1463 	F(200000000, P_GPLL0, 4, 0, 0),
1464 	F(266666666, P_GPLL0, 3, 0, 0),
1465 	{ }
1466 };
1467 
1468 static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_sleep_clk[] = {
1469 	{ .fw_name = "xo" },
1470 	{ .hw = &gpll0.clkr.hw },
1471 	{ .hw = &gpll6.clkr.hw },
1472 	{ .hw = &gpll0_out_main_div2.hw },
1473 	{ .fw_name = "sleep_clk" },
1474 };
1475 
1476 static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map[] = {
1477 	{ P_XO, 0 },
1478 	{ P_GPLL0, 1 },
1479 	{ P_GPLL6, 2 },
1480 	{ P_GPLL0_DIV2, 4 },
1481 	{ P_SLEEP_CLK, 6 },
1482 };
1483 
1484 static struct clk_rcg2 gp1_clk_src = {
1485 	.cmd_rcgr = 0x08004,
1486 	.freq_tbl = ftbl_gp_clk_src,
1487 	.mnd_width = 8,
1488 	.hid_width = 5,
1489 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1490 	.clkr.hw.init = &(struct clk_init_data){
1491 		.name = "gp1_clk_src",
1492 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1493 		.num_parents = 5,
1494 		.ops = &clk_rcg2_ops,
1495 	},
1496 };
1497 
1498 static struct clk_rcg2 gp2_clk_src = {
1499 	.cmd_rcgr = 0x09004,
1500 	.freq_tbl = ftbl_gp_clk_src,
1501 	.mnd_width = 8,
1502 	.hid_width = 5,
1503 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1504 	.clkr.hw.init = &(struct clk_init_data){
1505 		.name = "gp2_clk_src",
1506 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1507 		.num_parents = 5,
1508 		.ops = &clk_rcg2_ops,
1509 	},
1510 };
1511 
1512 static struct clk_rcg2 gp3_clk_src = {
1513 	.cmd_rcgr = 0x0a004,
1514 	.freq_tbl = ftbl_gp_clk_src,
1515 	.mnd_width = 8,
1516 	.hid_width = 5,
1517 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
1518 	.clkr.hw.init = &(struct clk_init_data){
1519 		.name = "gp3_clk_src",
1520 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_sleep_clk,
1521 		.num_parents = 5,
1522 		.ops = &clk_rcg2_ops,
1523 	},
1524 };
1525 
1526 static struct clk_fixed_factor nss_ppe_cdiv_clk_src = {
1527 	.mult = 1,
1528 	.div = 4,
1529 	.hw.init = &(struct clk_init_data){
1530 		.name = "nss_ppe_cdiv_clk_src",
1531 		.parent_hws = (const struct clk_hw *[]){
1532 				&nss_ppe_clk_src.clkr.hw },
1533 		.num_parents = 1,
1534 		.ops = &clk_fixed_factor_ops,
1535 		.flags = CLK_SET_RATE_PARENT,
1536 	},
1537 };
1538 
1539 static struct clk_regmap_div nss_ubi0_div_clk_src = {
1540 	.reg = 0x68118,
1541 	.shift = 0,
1542 	.width = 4,
1543 	.clkr = {
1544 		.hw.init = &(struct clk_init_data){
1545 			.name = "nss_ubi0_div_clk_src",
1546 			.parent_hws = (const struct clk_hw *[]){
1547 				&nss_ubi0_clk_src.clkr.hw },
1548 			.num_parents = 1,
1549 			.ops = &clk_regmap_div_ro_ops,
1550 			.flags = CLK_SET_RATE_PARENT,
1551 		},
1552 	},
1553 };
1554 
1555 static const struct freq_tbl ftbl_pcie_aux_clk_src[] = {
1556 	F(24000000, P_XO, 1, 0, 0),
1557 	{ }
1558 };
1559 
1560 static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk[] = {
1561 	{ .fw_name = "xo" },
1562 	{ .hw = &gpll0.clkr.hw },
1563 	{ .fw_name = "sleep_clk" },
1564 };
1565 
1566 static const struct parent_map gcc_xo_gpll0_core_pi_sleep_clk_map[] = {
1567 	{ P_XO, 0 },
1568 	{ P_GPLL0, 2 },
1569 	{ P_PI_SLEEP, 6 },
1570 };
1571 
1572 static struct clk_rcg2 pcie0_aux_clk_src = {
1573 	.cmd_rcgr = 0x75024,
1574 	.freq_tbl = ftbl_pcie_aux_clk_src,
1575 	.mnd_width = 16,
1576 	.hid_width = 5,
1577 	.parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1578 	.clkr.hw.init = &(struct clk_init_data){
1579 		.name = "pcie0_aux_clk_src",
1580 		.parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1581 		.num_parents = 3,
1582 		.ops = &clk_rcg2_ops,
1583 	},
1584 };
1585 
1586 static const struct clk_parent_data gcc_pcie20_phy0_pipe_clk_xo[] = {
1587 	{ .fw_name = "pcie20_phy0_pipe_clk" },
1588 	{ .fw_name = "xo" },
1589 };
1590 
1591 static const struct parent_map gcc_pcie20_phy0_pipe_clk_xo_map[] = {
1592 	{ P_PCIE20_PHY0_PIPE, 0 },
1593 	{ P_XO, 2 },
1594 };
1595 
1596 static struct clk_regmap_mux pcie0_pipe_clk_src = {
1597 	.reg = 0x7501c,
1598 	.shift = 8,
1599 	.width = 2,
1600 	.parent_map = gcc_pcie20_phy0_pipe_clk_xo_map,
1601 	.clkr = {
1602 		.hw.init = &(struct clk_init_data){
1603 			.name = "pcie0_pipe_clk_src",
1604 			.parent_data = gcc_pcie20_phy0_pipe_clk_xo,
1605 			.num_parents = 2,
1606 			.ops = &clk_regmap_mux_closest_ops,
1607 			.flags = CLK_SET_RATE_PARENT,
1608 		},
1609 	},
1610 };
1611 
1612 static const struct freq_tbl ftbl_sdcc_apps_clk_src[] = {
1613 	F(144000, P_XO, 16, 12, 125),
1614 	F(400000, P_XO, 12, 1, 5),
1615 	F(24000000, P_GPLL2, 12, 1, 4),
1616 	F(48000000, P_GPLL2, 12, 1, 2),
1617 	F(96000000, P_GPLL2, 12, 0, 0),
1618 	F(177777778, P_GPLL0, 4.5, 0, 0),
1619 	F(192000000, P_GPLL2, 6, 0, 0),
1620 	F(384000000, P_GPLL2, 3, 0, 0),
1621 	{ }
1622 };
1623 
1624 static const struct clk_parent_data
1625 			gcc_xo_gpll0_gpll2_gpll0_out_main_div2[] = {
1626 	{ .fw_name = "xo" },
1627 	{ .hw = &gpll0.clkr.hw },
1628 	{ .hw = &gpll2.clkr.hw },
1629 	{ .hw = &gpll0_out_main_div2.hw },
1630 };
1631 
1632 static const struct parent_map gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map[] = {
1633 	{ P_XO, 0 },
1634 	{ P_GPLL0, 1 },
1635 	{ P_GPLL2, 2 },
1636 	{ P_GPLL0_DIV2, 4 },
1637 };
1638 
1639 static struct clk_rcg2 sdcc1_apps_clk_src = {
1640 	.cmd_rcgr = 0x42004,
1641 	.freq_tbl = ftbl_sdcc_apps_clk_src,
1642 	.mnd_width = 8,
1643 	.hid_width = 5,
1644 	.parent_map = gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map,
1645 	.clkr.hw.init = &(struct clk_init_data){
1646 		.name = "sdcc1_apps_clk_src",
1647 		.parent_data = gcc_xo_gpll0_gpll2_gpll0_out_main_div2,
1648 		.num_parents = 4,
1649 		.ops = &clk_rcg2_floor_ops,
1650 	},
1651 };
1652 
1653 static const struct freq_tbl ftbl_usb_aux_clk_src[] = {
1654 	F(24000000, P_XO, 1, 0, 0),
1655 	{ }
1656 };
1657 
1658 static struct clk_rcg2 usb0_aux_clk_src = {
1659 	.cmd_rcgr = 0x3e05c,
1660 	.freq_tbl = ftbl_usb_aux_clk_src,
1661 	.mnd_width = 16,
1662 	.hid_width = 5,
1663 	.parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1664 	.clkr.hw.init = &(struct clk_init_data){
1665 		.name = "usb0_aux_clk_src",
1666 		.parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1667 		.num_parents = 3,
1668 		.ops = &clk_rcg2_ops,
1669 	},
1670 };
1671 
1672 static const struct freq_tbl ftbl_usb_mock_utmi_clk_src[] = {
1673 	F(24000000, P_XO, 1, 0, 0),
1674 	F(60000000, P_GPLL6, 6, 1, 3),
1675 	{ }
1676 };
1677 
1678 static const struct clk_parent_data
1679 			gcc_xo_gpll6_gpll0_gpll0_out_main_div2[] = {
1680 	{ .fw_name = "xo" },
1681 	{ .hw = &gpll6.clkr.hw },
1682 	{ .hw = &gpll0.clkr.hw },
1683 	{ .hw = &gpll0_out_main_div2.hw },
1684 };
1685 
1686 static const struct parent_map gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map[] = {
1687 	{ P_XO, 0 },
1688 	{ P_GPLL6, 1 },
1689 	{ P_GPLL0, 3 },
1690 	{ P_GPLL0_DIV2, 4 },
1691 };
1692 
1693 static struct clk_rcg2 usb0_mock_utmi_clk_src = {
1694 	.cmd_rcgr = 0x3e020,
1695 	.freq_tbl = ftbl_usb_mock_utmi_clk_src,
1696 	.mnd_width = 8,
1697 	.hid_width = 5,
1698 	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1699 	.clkr.hw.init = &(struct clk_init_data){
1700 		.name = "usb0_mock_utmi_clk_src",
1701 		.parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1702 		.num_parents = 4,
1703 		.ops = &clk_rcg2_ops,
1704 	},
1705 };
1706 
1707 static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
1708 	{ .fw_name = "usb3phy_0_cc_pipe_clk" },
1709 	{ .fw_name = "xo" },
1710 };
1711 
1712 static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] = {
1713 	{ P_USB3PHY_0_PIPE, 0 },
1714 	{ P_XO, 2 },
1715 };
1716 
1717 static struct clk_regmap_mux usb0_pipe_clk_src = {
1718 	.reg = 0x3e048,
1719 	.shift = 8,
1720 	.width = 2,
1721 	.parent_map = gcc_usb3phy_0_cc_pipe_clk_xo_map,
1722 	.clkr = {
1723 		.hw.init = &(struct clk_init_data){
1724 			.name = "usb0_pipe_clk_src",
1725 			.parent_data = gcc_usb3phy_0_cc_pipe_clk_xo,
1726 			.num_parents = 2,
1727 			.ops = &clk_regmap_mux_closest_ops,
1728 			.flags = CLK_SET_RATE_PARENT,
1729 		},
1730 	},
1731 };
1732 
1733 static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] = {
1734 	F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1735 	F(160000000, P_GPLL0, 5, 0, 0),
1736 	F(216000000, P_GPLL6, 5, 0, 0),
1737 	F(308570000, P_GPLL6, 3.5, 0, 0),
1738 	{ }
1739 };
1740 
1741 static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_div2[] = {
1742 	{ .fw_name = "xo"},
1743 	{ .hw = &gpll0.clkr.hw },
1744 	{ .hw = &gpll6.clkr.hw },
1745 	{ .hw = &gpll0_out_main_div2.hw },
1746 };
1747 
1748 static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_div2_map[] = {
1749 	{ P_XO, 0 },
1750 	{ P_GPLL0, 1 },
1751 	{ P_GPLL6, 2 },
1752 	{ P_GPLL0_DIV2, 4 },
1753 };
1754 
1755 static struct clk_rcg2 sdcc1_ice_core_clk_src = {
1756 	.cmd_rcgr = 0x5d000,
1757 	.freq_tbl = ftbl_sdcc_ice_core_clk_src,
1758 	.mnd_width = 8,
1759 	.hid_width = 5,
1760 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_div2_map,
1761 	.clkr.hw.init = &(struct clk_init_data){
1762 		.name = "sdcc1_ice_core_clk_src",
1763 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_div2,
1764 		.num_parents = 4,
1765 		.ops = &clk_rcg2_ops,
1766 	},
1767 };
1768 
1769 static const struct freq_tbl ftbl_qdss_stm_clk_src[] = {
1770 	F(24000000, P_XO, 1, 0, 0),
1771 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1772 	F(100000000, P_GPLL0, 8, 0, 0),
1773 	F(200000000, P_GPLL0, 4, 0, 0),
1774 	{ }
1775 };
1776 
1777 static struct clk_rcg2 qdss_stm_clk_src = {
1778 	.cmd_rcgr = 0x2902C,
1779 	.freq_tbl = ftbl_qdss_stm_clk_src,
1780 	.hid_width = 5,
1781 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1782 	.clkr.hw.init = &(struct clk_init_data){
1783 		.name = "qdss_stm_clk_src",
1784 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1785 		.num_parents = 3,
1786 		.ops = &clk_rcg2_ops,
1787 	},
1788 };
1789 
1790 static const struct freq_tbl ftbl_qdss_traceclkin_clk_src[] = {
1791 	F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1792 	F(160000000, P_GPLL0, 5, 0, 0),
1793 	F(300000000, P_GPLL4, 4, 0, 0),
1794 	{ }
1795 };
1796 
1797 static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll0_div2[] = {
1798 	{ .fw_name = "xo" },
1799 	{ .hw = &gpll4.clkr.hw },
1800 	{ .hw = &gpll0.clkr.hw },
1801 	{ .hw = &gpll0_out_main_div2.hw },
1802 };
1803 
1804 static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_div2_map[] = {
1805 	{ P_XO, 0 },
1806 	{ P_GPLL4, 1 },
1807 	{ P_GPLL0, 2 },
1808 	{ P_GPLL0_DIV2, 4 },
1809 };
1810 
1811 static struct clk_rcg2 qdss_traceclkin_clk_src = {
1812 	.cmd_rcgr = 0x29048,
1813 	.freq_tbl = ftbl_qdss_traceclkin_clk_src,
1814 	.hid_width = 5,
1815 	.parent_map = gcc_xo_gpll4_gpll0_gpll0_div2_map,
1816 	.clkr.hw.init = &(struct clk_init_data){
1817 		.name = "qdss_traceclkin_clk_src",
1818 		.parent_data = gcc_xo_gpll4_gpll0_gpll0_div2,
1819 		.num_parents = 4,
1820 		.ops = &clk_rcg2_ops,
1821 	},
1822 };
1823 
1824 static struct clk_rcg2 usb1_mock_utmi_clk_src = {
1825 	.cmd_rcgr = 0x3f020,
1826 	.freq_tbl = ftbl_usb_mock_utmi_clk_src,
1827 	.mnd_width = 8,
1828 	.hid_width = 5,
1829 	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1830 	.clkr.hw.init = &(struct clk_init_data){
1831 		.name = "usb1_mock_utmi_clk_src",
1832 		.parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1833 		.num_parents = 4,
1834 		.ops = &clk_rcg2_ops,
1835 	},
1836 };
1837 
1838 static struct clk_branch gcc_adss_pwm_clk = {
1839 	.halt_reg = 0x1c020,
1840 	.clkr = {
1841 		.enable_reg = 0x1c020,
1842 		.enable_mask = BIT(0),
1843 		.hw.init = &(struct clk_init_data){
1844 			.name = "gcc_adss_pwm_clk",
1845 			.parent_hws = (const struct clk_hw *[]){
1846 					&adss_pwm_clk_src.clkr.hw },
1847 			.num_parents = 1,
1848 			.flags = CLK_SET_RATE_PARENT,
1849 			.ops = &clk_branch2_ops,
1850 		},
1851 	},
1852 };
1853 
1854 static struct clk_branch gcc_apss_ahb_clk = {
1855 	.halt_reg = 0x4601c,
1856 	.halt_check = BRANCH_HALT_VOTED,
1857 	.clkr = {
1858 		.enable_reg = 0x0b004,
1859 		.enable_mask = BIT(14),
1860 		.hw.init = &(struct clk_init_data){
1861 			.name = "gcc_apss_ahb_clk",
1862 			.parent_hws = (const struct clk_hw *[]){
1863 					&apss_ahb_postdiv_clk_src.clkr.hw },
1864 			.num_parents = 1,
1865 			.flags = CLK_SET_RATE_PARENT,
1866 			.ops = &clk_branch2_ops,
1867 		},
1868 	},
1869 };
1870 
1871 static const struct freq_tbl ftbl_system_noc_bfdcd_clk_src[] = {
1872 	F(24000000, P_XO, 1, 0, 0),
1873 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1874 	F(100000000, P_GPLL0, 8, 0, 0),
1875 	F(133333333, P_GPLL0, 6, 0, 0),
1876 	F(160000000, P_GPLL0, 5, 0, 0),
1877 	F(200000000, P_GPLL0, 4, 0, 0),
1878 	F(266666667, P_GPLL0, 3, 0, 0),
1879 	{ }
1880 };
1881 
1882 static struct clk_rcg2 system_noc_bfdcd_clk_src = {
1883 	.cmd_rcgr = 0x26004,
1884 	.freq_tbl = ftbl_system_noc_bfdcd_clk_src,
1885 	.hid_width = 5,
1886 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
1887 	.clkr.hw.init = &(struct clk_init_data){
1888 		.name = "system_noc_bfdcd_clk_src",
1889 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
1890 		.num_parents = 4,
1891 		.ops = &clk_rcg2_ops,
1892 	},
1893 };
1894 
1895 static const struct freq_tbl ftbl_ubi32_mem_noc_bfdcd_clk_src[] = {
1896 	F(24000000, P_XO, 1, 0, 0),
1897 	F(307670000, P_BIAS_PLL_NSS_NOC, 1.5, 0, 0),
1898 	F(533333333, P_GPLL0, 1.5, 0, 0),
1899 	{ }
1900 };
1901 
1902 static const struct clk_parent_data
1903 			gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk[] = {
1904 	{ .fw_name = "xo" },
1905 	{ .hw = &gpll0.clkr.hw },
1906 	{ .hw = &gpll2.clkr.hw },
1907 	{ .fw_name = "bias_pll_nss_noc_clk" },
1908 };
1909 
1910 static const struct parent_map gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map[] = {
1911 	{ P_XO, 0 },
1912 	{ P_GPLL0, 1 },
1913 	{ P_GPLL2, 3 },
1914 	{ P_BIAS_PLL_NSS_NOC, 4 },
1915 };
1916 
1917 static struct clk_rcg2 ubi32_mem_noc_bfdcd_clk_src = {
1918 	.cmd_rcgr = 0x68088,
1919 	.freq_tbl = ftbl_ubi32_mem_noc_bfdcd_clk_src,
1920 	.hid_width = 5,
1921 	.parent_map = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map,
1922 	.clkr.hw.init = &(struct clk_init_data){
1923 		.name = "ubi32_mem_noc_bfdcd_clk_src",
1924 		.parent_data = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk,
1925 		.num_parents = 4,
1926 		.ops = &clk_rcg2_ops,
1927 	},
1928 };
1929 
1930 static struct clk_branch gcc_apss_axi_clk = {
1931 	.halt_reg = 0x46020,
1932 	.halt_check = BRANCH_HALT_VOTED,
1933 	.clkr = {
1934 		.enable_reg = 0x0b004,
1935 		.enable_mask = BIT(13),
1936 		.hw.init = &(struct clk_init_data){
1937 			.name = "gcc_apss_axi_clk",
1938 			.parent_hws = (const struct clk_hw *[]){
1939 					&apss_axi_clk_src.clkr.hw },
1940 			.num_parents = 1,
1941 			.flags = CLK_SET_RATE_PARENT,
1942 			.ops = &clk_branch2_ops,
1943 		},
1944 	},
1945 };
1946 
1947 static struct clk_branch gcc_blsp1_ahb_clk = {
1948 	.halt_reg = 0x01008,
1949 	.halt_check = BRANCH_HALT_VOTED,
1950 	.clkr = {
1951 		.enable_reg = 0x0b004,
1952 		.enable_mask = BIT(10),
1953 		.hw.init = &(struct clk_init_data){
1954 			.name = "gcc_blsp1_ahb_clk",
1955 			.parent_hws = (const struct clk_hw *[]){
1956 					&pcnoc_bfdcd_clk_src.clkr.hw },
1957 			.num_parents = 1,
1958 			.flags = CLK_SET_RATE_PARENT,
1959 			.ops = &clk_branch2_ops,
1960 		},
1961 	},
1962 };
1963 
1964 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
1965 	.halt_reg = 0x02008,
1966 	.clkr = {
1967 		.enable_reg = 0x02008,
1968 		.enable_mask = BIT(0),
1969 		.hw.init = &(struct clk_init_data){
1970 			.name = "gcc_blsp1_qup1_i2c_apps_clk",
1971 			.parent_hws = (const struct clk_hw *[]){
1972 					&blsp1_qup1_i2c_apps_clk_src.clkr.hw },
1973 			.num_parents = 1,
1974 			.flags = CLK_SET_RATE_PARENT,
1975 			.ops = &clk_branch2_ops,
1976 		},
1977 	},
1978 };
1979 
1980 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
1981 	.halt_reg = 0x02004,
1982 	.clkr = {
1983 		.enable_reg = 0x02004,
1984 		.enable_mask = BIT(0),
1985 		.hw.init = &(struct clk_init_data){
1986 			.name = "gcc_blsp1_qup1_spi_apps_clk",
1987 			.parent_hws = (const struct clk_hw *[]){
1988 					&blsp1_qup1_spi_apps_clk_src.clkr.hw },
1989 			.num_parents = 1,
1990 			.flags = CLK_SET_RATE_PARENT,
1991 			.ops = &clk_branch2_ops,
1992 		},
1993 	},
1994 };
1995 
1996 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
1997 	.halt_reg = 0x03010,
1998 	.clkr = {
1999 		.enable_reg = 0x03010,
2000 		.enable_mask = BIT(0),
2001 		.hw.init = &(struct clk_init_data){
2002 			.name = "gcc_blsp1_qup2_i2c_apps_clk",
2003 			.parent_hws = (const struct clk_hw *[]){
2004 					&blsp1_qup2_i2c_apps_clk_src.clkr.hw },
2005 			.num_parents = 1,
2006 			.flags = CLK_SET_RATE_PARENT,
2007 			.ops = &clk_branch2_ops,
2008 		},
2009 	},
2010 };
2011 
2012 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
2013 	.halt_reg = 0x0300c,
2014 	.clkr = {
2015 		.enable_reg = 0x0300c,
2016 		.enable_mask = BIT(0),
2017 		.hw.init = &(struct clk_init_data){
2018 			.name = "gcc_blsp1_qup2_spi_apps_clk",
2019 			.parent_hws = (const struct clk_hw *[]){
2020 					&blsp1_qup2_spi_apps_clk_src.clkr.hw },
2021 			.num_parents = 1,
2022 			.flags = CLK_SET_RATE_PARENT,
2023 			.ops = &clk_branch2_ops,
2024 		},
2025 	},
2026 };
2027 
2028 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
2029 	.halt_reg = 0x04010,
2030 	.clkr = {
2031 		.enable_reg = 0x04010,
2032 		.enable_mask = BIT(0),
2033 		.hw.init = &(struct clk_init_data){
2034 			.name = "gcc_blsp1_qup3_i2c_apps_clk",
2035 			.parent_hws = (const struct clk_hw *[]){
2036 					&blsp1_qup3_i2c_apps_clk_src.clkr.hw },
2037 			.num_parents = 1,
2038 			.flags = CLK_SET_RATE_PARENT,
2039 			.ops = &clk_branch2_ops,
2040 		},
2041 	},
2042 };
2043 
2044 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
2045 	.halt_reg = 0x0400c,
2046 	.clkr = {
2047 		.enable_reg = 0x0400c,
2048 		.enable_mask = BIT(0),
2049 		.hw.init = &(struct clk_init_data){
2050 			.name = "gcc_blsp1_qup3_spi_apps_clk",
2051 			.parent_hws = (const struct clk_hw *[]){
2052 					&blsp1_qup3_spi_apps_clk_src.clkr.hw },
2053 			.num_parents = 1,
2054 			.flags = CLK_SET_RATE_PARENT,
2055 			.ops = &clk_branch2_ops,
2056 		},
2057 	},
2058 };
2059 
2060 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
2061 	.halt_reg = 0x05010,
2062 	.clkr = {
2063 		.enable_reg = 0x05010,
2064 		.enable_mask = BIT(0),
2065 		.hw.init = &(struct clk_init_data){
2066 			.name = "gcc_blsp1_qup4_i2c_apps_clk",
2067 			.parent_hws = (const struct clk_hw *[]){
2068 					&blsp1_qup4_i2c_apps_clk_src.clkr.hw },
2069 			.num_parents = 1,
2070 			.flags = CLK_SET_RATE_PARENT,
2071 			.ops = &clk_branch2_ops,
2072 		},
2073 	},
2074 };
2075 
2076 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
2077 	.halt_reg = 0x0500c,
2078 	.clkr = {
2079 		.enable_reg = 0x0500c,
2080 		.enable_mask = BIT(0),
2081 		.hw.init = &(struct clk_init_data){
2082 			.name = "gcc_blsp1_qup4_spi_apps_clk",
2083 			.parent_hws = (const struct clk_hw *[]){
2084 					&blsp1_qup4_spi_apps_clk_src.clkr.hw },
2085 			.num_parents = 1,
2086 			.flags = CLK_SET_RATE_PARENT,
2087 			.ops = &clk_branch2_ops,
2088 		},
2089 	},
2090 };
2091 
2092 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
2093 	.halt_reg = 0x06010,
2094 	.clkr = {
2095 		.enable_reg = 0x06010,
2096 		.enable_mask = BIT(0),
2097 		.hw.init = &(struct clk_init_data){
2098 			.name = "gcc_blsp1_qup5_i2c_apps_clk",
2099 			.parent_hws = (const struct clk_hw *[]){
2100 					&blsp1_qup5_i2c_apps_clk_src.clkr.hw },
2101 			.num_parents = 1,
2102 			.flags = CLK_SET_RATE_PARENT,
2103 			.ops = &clk_branch2_ops,
2104 		},
2105 	},
2106 };
2107 
2108 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
2109 	.halt_reg = 0x0600c,
2110 	.clkr = {
2111 		.enable_reg = 0x0600c,
2112 		.enable_mask = BIT(0),
2113 		.hw.init = &(struct clk_init_data){
2114 			.name = "gcc_blsp1_qup5_spi_apps_clk",
2115 			.parent_hws = (const struct clk_hw *[]){
2116 					&blsp1_qup5_spi_apps_clk_src.clkr.hw },
2117 			.num_parents = 1,
2118 			.flags = CLK_SET_RATE_PARENT,
2119 			.ops = &clk_branch2_ops,
2120 		},
2121 	},
2122 };
2123 
2124 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
2125 	.halt_reg = 0x0700c,
2126 	.clkr = {
2127 		.enable_reg = 0x0700c,
2128 		.enable_mask = BIT(0),
2129 		.hw.init = &(struct clk_init_data){
2130 			.name = "gcc_blsp1_qup6_spi_apps_clk",
2131 			.parent_hws = (const struct clk_hw *[]){
2132 					&blsp1_qup6_spi_apps_clk_src.clkr.hw },
2133 			.num_parents = 1,
2134 			.flags = CLK_SET_RATE_PARENT,
2135 			.ops = &clk_branch2_ops,
2136 		},
2137 	},
2138 };
2139 
2140 static struct clk_branch gcc_blsp1_uart1_apps_clk = {
2141 	.halt_reg = 0x0203c,
2142 	.clkr = {
2143 		.enable_reg = 0x0203c,
2144 		.enable_mask = BIT(0),
2145 		.hw.init = &(struct clk_init_data){
2146 			.name = "gcc_blsp1_uart1_apps_clk",
2147 			.parent_hws = (const struct clk_hw *[]){
2148 					&blsp1_uart1_apps_clk_src.clkr.hw },
2149 			.num_parents = 1,
2150 			.flags = CLK_SET_RATE_PARENT,
2151 			.ops = &clk_branch2_ops,
2152 		},
2153 	},
2154 };
2155 
2156 static struct clk_branch gcc_blsp1_uart2_apps_clk = {
2157 	.halt_reg = 0x0302c,
2158 	.clkr = {
2159 		.enable_reg = 0x0302c,
2160 		.enable_mask = BIT(0),
2161 		.hw.init = &(struct clk_init_data){
2162 			.name = "gcc_blsp1_uart2_apps_clk",
2163 			.parent_hws = (const struct clk_hw *[]){
2164 					&blsp1_uart2_apps_clk_src.clkr.hw },
2165 			.num_parents = 1,
2166 			.flags = CLK_SET_RATE_PARENT,
2167 			.ops = &clk_branch2_ops,
2168 		},
2169 	},
2170 };
2171 
2172 static struct clk_branch gcc_blsp1_uart3_apps_clk = {
2173 	.halt_reg = 0x0402c,
2174 	.clkr = {
2175 		.enable_reg = 0x0402c,
2176 		.enable_mask = BIT(0),
2177 		.hw.init = &(struct clk_init_data){
2178 			.name = "gcc_blsp1_uart3_apps_clk",
2179 			.parent_hws = (const struct clk_hw *[]){
2180 					&blsp1_uart3_apps_clk_src.clkr.hw },
2181 			.num_parents = 1,
2182 			.flags = CLK_SET_RATE_PARENT,
2183 			.ops = &clk_branch2_ops,
2184 		},
2185 	},
2186 };
2187 
2188 static struct clk_branch gcc_blsp1_uart4_apps_clk = {
2189 	.halt_reg = 0x0502c,
2190 	.clkr = {
2191 		.enable_reg = 0x0502c,
2192 		.enable_mask = BIT(0),
2193 		.hw.init = &(struct clk_init_data){
2194 			.name = "gcc_blsp1_uart4_apps_clk",
2195 			.parent_hws = (const struct clk_hw *[]){
2196 					&blsp1_uart4_apps_clk_src.clkr.hw },
2197 			.num_parents = 1,
2198 			.flags = CLK_SET_RATE_PARENT,
2199 			.ops = &clk_branch2_ops,
2200 		},
2201 	},
2202 };
2203 
2204 static struct clk_branch gcc_blsp1_uart5_apps_clk = {
2205 	.halt_reg = 0x0602c,
2206 	.clkr = {
2207 		.enable_reg = 0x0602c,
2208 		.enable_mask = BIT(0),
2209 		.hw.init = &(struct clk_init_data){
2210 			.name = "gcc_blsp1_uart5_apps_clk",
2211 			.parent_hws = (const struct clk_hw *[]){
2212 					&blsp1_uart5_apps_clk_src.clkr.hw },
2213 			.num_parents = 1,
2214 			.flags = CLK_SET_RATE_PARENT,
2215 			.ops = &clk_branch2_ops,
2216 		},
2217 	},
2218 };
2219 
2220 static struct clk_branch gcc_blsp1_uart6_apps_clk = {
2221 	.halt_reg = 0x0702c,
2222 	.clkr = {
2223 		.enable_reg = 0x0702c,
2224 		.enable_mask = BIT(0),
2225 		.hw.init = &(struct clk_init_data){
2226 			.name = "gcc_blsp1_uart6_apps_clk",
2227 			.parent_hws = (const struct clk_hw *[]){
2228 					&blsp1_uart6_apps_clk_src.clkr.hw },
2229 			.num_parents = 1,
2230 			.flags = CLK_SET_RATE_PARENT,
2231 			.ops = &clk_branch2_ops,
2232 		},
2233 	},
2234 };
2235 
2236 static struct clk_branch gcc_crypto_ahb_clk = {
2237 	.halt_reg = 0x16024,
2238 	.halt_check = BRANCH_HALT_VOTED,
2239 	.clkr = {
2240 		.enable_reg = 0x0b004,
2241 		.enable_mask = BIT(0),
2242 		.hw.init = &(struct clk_init_data){
2243 			.name = "gcc_crypto_ahb_clk",
2244 			.parent_hws = (const struct clk_hw *[]){
2245 					&pcnoc_bfdcd_clk_src.clkr.hw },
2246 			.num_parents = 1,
2247 			.flags = CLK_SET_RATE_PARENT,
2248 			.ops = &clk_branch2_ops,
2249 		},
2250 	},
2251 };
2252 
2253 static struct clk_branch gcc_crypto_axi_clk = {
2254 	.halt_reg = 0x16020,
2255 	.halt_check = BRANCH_HALT_VOTED,
2256 	.clkr = {
2257 		.enable_reg = 0x0b004,
2258 		.enable_mask = BIT(1),
2259 		.hw.init = &(struct clk_init_data){
2260 			.name = "gcc_crypto_axi_clk",
2261 			.parent_hws = (const struct clk_hw *[]){
2262 					&pcnoc_bfdcd_clk_src.clkr.hw },
2263 			.num_parents = 1,
2264 			.flags = CLK_SET_RATE_PARENT,
2265 			.ops = &clk_branch2_ops,
2266 		},
2267 	},
2268 };
2269 
2270 static struct clk_branch gcc_crypto_clk = {
2271 	.halt_reg = 0x1601c,
2272 	.halt_check = BRANCH_HALT_VOTED,
2273 	.clkr = {
2274 		.enable_reg = 0x0b004,
2275 		.enable_mask = BIT(2),
2276 		.hw.init = &(struct clk_init_data){
2277 			.name = "gcc_crypto_clk",
2278 			.parent_hws = (const struct clk_hw *[]){
2279 					&crypto_clk_src.clkr.hw },
2280 			.num_parents = 1,
2281 			.flags = CLK_SET_RATE_PARENT,
2282 			.ops = &clk_branch2_ops,
2283 		},
2284 	},
2285 };
2286 
2287 static struct clk_fixed_factor gpll6_out_main_div2 = {
2288 	.mult = 1,
2289 	.div = 2,
2290 	.hw.init = &(struct clk_init_data){
2291 		.name = "gpll6_out_main_div2",
2292 		.parent_hws = (const struct clk_hw *[]){
2293 				&gpll6_main.clkr.hw },
2294 		.num_parents = 1,
2295 		.ops = &clk_fixed_factor_ops,
2296 		.flags = CLK_SET_RATE_PARENT,
2297 	},
2298 };
2299 
2300 static struct clk_branch gcc_xo_clk = {
2301 	.halt_reg = 0x30030,
2302 	.clkr = {
2303 		.enable_reg = 0x30030,
2304 		.enable_mask = BIT(0),
2305 		.hw.init = &(struct clk_init_data){
2306 			.name = "gcc_xo_clk",
2307 			.parent_hws = (const struct clk_hw *[]){
2308 					&gcc_xo_clk_src.clkr.hw },
2309 			.num_parents = 1,
2310 			.flags = CLK_SET_RATE_PARENT,
2311 			.ops = &clk_branch2_ops,
2312 		},
2313 	},
2314 };
2315 
2316 static struct clk_branch gcc_gp1_clk = {
2317 	.halt_reg = 0x08000,
2318 	.clkr = {
2319 		.enable_reg = 0x08000,
2320 		.enable_mask = BIT(0),
2321 		.hw.init = &(struct clk_init_data){
2322 			.name = "gcc_gp1_clk",
2323 			.parent_hws = (const struct clk_hw *[]){
2324 					&gp1_clk_src.clkr.hw },
2325 			.num_parents = 1,
2326 			.flags = CLK_SET_RATE_PARENT,
2327 			.ops = &clk_branch2_ops,
2328 		},
2329 	},
2330 };
2331 
2332 static struct clk_branch gcc_gp2_clk = {
2333 	.halt_reg = 0x09000,
2334 	.clkr = {
2335 		.enable_reg = 0x09000,
2336 		.enable_mask = BIT(0),
2337 		.hw.init = &(struct clk_init_data){
2338 			.name = "gcc_gp2_clk",
2339 			.parent_hws = (const struct clk_hw *[]){
2340 					&gp2_clk_src.clkr.hw },
2341 			.num_parents = 1,
2342 			.flags = CLK_SET_RATE_PARENT,
2343 			.ops = &clk_branch2_ops,
2344 		},
2345 	},
2346 };
2347 
2348 static struct clk_branch gcc_gp3_clk = {
2349 	.halt_reg = 0x0a000,
2350 	.clkr = {
2351 		.enable_reg = 0x0a000,
2352 		.enable_mask = BIT(0),
2353 		.hw.init = &(struct clk_init_data){
2354 			.name = "gcc_gp3_clk",
2355 			.parent_hws = (const struct clk_hw *[]){
2356 					&gp3_clk_src.clkr.hw },
2357 			.num_parents = 1,
2358 			.flags = CLK_SET_RATE_PARENT,
2359 			.ops = &clk_branch2_ops,
2360 		},
2361 	},
2362 };
2363 
2364 static struct clk_branch gcc_mdio_ahb_clk = {
2365 	.halt_reg = 0x58004,
2366 	.clkr = {
2367 		.enable_reg = 0x58004,
2368 		.enable_mask = BIT(0),
2369 		.hw.init = &(struct clk_init_data){
2370 			.name = "gcc_mdio_ahb_clk",
2371 			.parent_hws = (const struct clk_hw *[]){
2372 					&pcnoc_bfdcd_clk_src.clkr.hw },
2373 			.num_parents = 1,
2374 			.flags = CLK_SET_RATE_PARENT,
2375 			.ops = &clk_branch2_ops,
2376 		},
2377 	},
2378 };
2379 
2380 static struct clk_branch gcc_crypto_ppe_clk = {
2381 	.halt_reg = 0x68310,
2382 	.clkr = {
2383 		.enable_reg = 0x68310,
2384 		.enable_mask = BIT(0),
2385 		.hw.init = &(struct clk_init_data){
2386 			.name = "gcc_crypto_ppe_clk",
2387 			.parent_hws = (const struct clk_hw *[]){
2388 					&nss_ppe_clk_src.clkr.hw },
2389 			.num_parents = 1,
2390 			.flags = CLK_SET_RATE_PARENT,
2391 			.ops = &clk_branch2_ops,
2392 		},
2393 	},
2394 };
2395 
2396 static struct clk_branch gcc_nss_ce_apb_clk = {
2397 	.halt_reg = 0x68174,
2398 	.clkr = {
2399 		.enable_reg = 0x68174,
2400 		.enable_mask = BIT(0),
2401 		.hw.init = &(struct clk_init_data){
2402 			.name = "gcc_nss_ce_apb_clk",
2403 			.parent_hws = (const struct clk_hw *[]){
2404 					&nss_ce_clk_src.clkr.hw },
2405 			.num_parents = 1,
2406 			.flags = CLK_SET_RATE_PARENT,
2407 			.ops = &clk_branch2_ops,
2408 		},
2409 	},
2410 };
2411 
2412 static struct clk_branch gcc_nss_ce_axi_clk = {
2413 	.halt_reg = 0x68170,
2414 	.clkr = {
2415 		.enable_reg = 0x68170,
2416 		.enable_mask = BIT(0),
2417 		.hw.init = &(struct clk_init_data){
2418 			.name = "gcc_nss_ce_axi_clk",
2419 			.parent_hws = (const struct clk_hw *[]){
2420 					&nss_ce_clk_src.clkr.hw },
2421 			.num_parents = 1,
2422 			.flags = CLK_SET_RATE_PARENT,
2423 			.ops = &clk_branch2_ops,
2424 		},
2425 	},
2426 };
2427 
2428 static struct clk_branch gcc_nss_cfg_clk = {
2429 	.halt_reg = 0x68160,
2430 	.clkr = {
2431 		.enable_reg = 0x68160,
2432 		.enable_mask = BIT(0),
2433 		.hw.init = &(struct clk_init_data){
2434 			.name = "gcc_nss_cfg_clk",
2435 			.parent_hws = (const struct clk_hw *[]){
2436 					&pcnoc_bfdcd_clk_src.clkr.hw },
2437 			.num_parents = 1,
2438 			.flags = CLK_SET_RATE_PARENT,
2439 			.ops = &clk_branch2_ops,
2440 		},
2441 	},
2442 };
2443 
2444 static struct clk_branch gcc_nss_crypto_clk = {
2445 	.halt_reg = 0x68164,
2446 	.clkr = {
2447 		.enable_reg = 0x68164,
2448 		.enable_mask = BIT(0),
2449 		.hw.init = &(struct clk_init_data){
2450 			.name = "gcc_nss_crypto_clk",
2451 			.parent_hws = (const struct clk_hw *[]){
2452 					&nss_crypto_clk_src.clkr.hw },
2453 			.num_parents = 1,
2454 			.flags = CLK_SET_RATE_PARENT,
2455 			.ops = &clk_branch2_ops,
2456 		},
2457 	},
2458 };
2459 
2460 static struct clk_branch gcc_nss_csr_clk = {
2461 	.halt_reg = 0x68318,
2462 	.clkr = {
2463 		.enable_reg = 0x68318,
2464 		.enable_mask = BIT(0),
2465 		.hw.init = &(struct clk_init_data){
2466 			.name = "gcc_nss_csr_clk",
2467 			.parent_hws = (const struct clk_hw *[]){
2468 					&nss_ce_clk_src.clkr.hw },
2469 			.num_parents = 1,
2470 			.flags = CLK_SET_RATE_PARENT,
2471 			.ops = &clk_branch2_ops,
2472 		},
2473 	},
2474 };
2475 
2476 static struct clk_branch gcc_nss_edma_cfg_clk = {
2477 	.halt_reg = 0x6819C,
2478 	.clkr = {
2479 		.enable_reg = 0x6819C,
2480 		.enable_mask = BIT(0),
2481 		.hw.init = &(struct clk_init_data){
2482 			.name = "gcc_nss_edma_cfg_clk",
2483 			.parent_hws = (const struct clk_hw *[]){
2484 					&nss_ppe_clk_src.clkr.hw },
2485 			.num_parents = 1,
2486 			.flags = CLK_SET_RATE_PARENT,
2487 			.ops = &clk_branch2_ops,
2488 		},
2489 	},
2490 };
2491 
2492 static struct clk_branch gcc_nss_edma_clk = {
2493 	.halt_reg = 0x68198,
2494 	.clkr = {
2495 		.enable_reg = 0x68198,
2496 		.enable_mask = BIT(0),
2497 		.hw.init = &(struct clk_init_data){
2498 			.name = "gcc_nss_edma_clk",
2499 			.parent_hws = (const struct clk_hw *[]){
2500 					&nss_ppe_clk_src.clkr.hw },
2501 			.num_parents = 1,
2502 			.flags = CLK_SET_RATE_PARENT,
2503 			.ops = &clk_branch2_ops,
2504 		},
2505 	},
2506 };
2507 
2508 static struct clk_branch gcc_nss_noc_clk = {
2509 	.halt_reg = 0x68168,
2510 	.clkr = {
2511 		.enable_reg = 0x68168,
2512 		.enable_mask = BIT(0),
2513 		.hw.init = &(struct clk_init_data){
2514 			.name = "gcc_nss_noc_clk",
2515 			.parent_hws = (const struct clk_hw *[]){
2516 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2517 			.num_parents = 1,
2518 			.flags = CLK_SET_RATE_PARENT,
2519 			.ops = &clk_branch2_ops,
2520 		},
2521 	},
2522 };
2523 
2524 static struct clk_branch gcc_ubi0_utcm_clk = {
2525 	.halt_reg = 0x2606c,
2526 	.clkr = {
2527 		.enable_reg = 0x2606c,
2528 		.enable_mask = BIT(0),
2529 		.hw.init = &(struct clk_init_data){
2530 			.name = "gcc_ubi0_utcm_clk",
2531 			.parent_hws = (const struct clk_hw *[]){
2532 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2533 			.num_parents = 1,
2534 			.flags = CLK_SET_RATE_PARENT,
2535 			.ops = &clk_branch2_ops,
2536 		},
2537 	},
2538 };
2539 
2540 static struct clk_branch gcc_snoc_nssnoc_clk = {
2541 	.halt_reg = 0x26070,
2542 	.clkr = {
2543 		.enable_reg = 0x26070,
2544 		.enable_mask = BIT(0),
2545 		.hw.init = &(struct clk_init_data){
2546 			.name = "gcc_snoc_nssnoc_clk",
2547 			.parent_hws = (const struct clk_hw *[]){
2548 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2549 			.num_parents = 1,
2550 			.flags = CLK_SET_RATE_PARENT,
2551 			.ops = &clk_branch2_ops,
2552 		},
2553 	},
2554 };
2555 
2556 static const struct freq_tbl ftbl_wcss_ahb_clk_src[] = {
2557 	F(24000000, P_XO, 1, 0, 0),
2558 	F(133333333, P_GPLL0, 6, 0, 0),
2559 	{ }
2560 };
2561 
2562 static const struct freq_tbl ftbl_q6_axi_clk_src[] = {
2563 	F(24000000, P_XO, 1, 0, 0),
2564 	F(400000000, P_GPLL0, 2, 0, 0),
2565 	{ }
2566 };
2567 
2568 static struct clk_rcg2 wcss_ahb_clk_src = {
2569 	.cmd_rcgr = 0x59020,
2570 	.freq_tbl = ftbl_wcss_ahb_clk_src,
2571 	.hid_width = 5,
2572 	.parent_map = gcc_xo_gpll0_map,
2573 	.clkr.hw.init = &(struct clk_init_data){
2574 		.name = "wcss_ahb_clk_src",
2575 		.parent_data = gcc_xo_gpll0,
2576 		.num_parents = 2,
2577 		.ops = &clk_rcg2_ops,
2578 	},
2579 };
2580 
2581 static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_gpll6[] = {
2582 	{ .fw_name = "xo" },
2583 	{ .hw = &gpll0.clkr.hw },
2584 	{ .hw = &gpll2.clkr.hw },
2585 	{ .hw = &gpll4.clkr.hw },
2586 	{ .hw = &gpll6.clkr.hw },
2587 };
2588 
2589 static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_gpll6_map[] = {
2590 	{ P_XO, 0 },
2591 	{ P_GPLL0, 1 },
2592 	{ P_GPLL2, 2 },
2593 	{ P_GPLL4, 3 },
2594 	{ P_GPLL6, 4 },
2595 };
2596 
2597 static struct clk_rcg2 q6_axi_clk_src = {
2598 	.cmd_rcgr = 0x59120,
2599 	.freq_tbl = ftbl_q6_axi_clk_src,
2600 	.hid_width = 5,
2601 	.parent_map = gcc_xo_gpll0_gpll2_gpll4_gpll6_map,
2602 	.clkr.hw.init = &(struct clk_init_data){
2603 		.name = "q6_axi_clk_src",
2604 		.parent_data = gcc_xo_gpll0_gpll2_gpll4_gpll6,
2605 		.num_parents = 5,
2606 		.ops = &clk_rcg2_ops,
2607 	},
2608 };
2609 
2610 static const struct freq_tbl ftbl_lpass_core_axim_clk_src[] = {
2611 	F(24000000, P_XO, 1, 0, 0),
2612 	F(100000000, P_GPLL0, 8, 0, 0),
2613 	{ }
2614 };
2615 
2616 static struct clk_rcg2 lpass_core_axim_clk_src = {
2617 	.cmd_rcgr = 0x1F020,
2618 	.freq_tbl = ftbl_lpass_core_axim_clk_src,
2619 	.hid_width = 5,
2620 	.parent_map = gcc_xo_gpll0_map,
2621 	.clkr.hw.init = &(struct clk_init_data){
2622 		.name = "lpass_core_axim_clk_src",
2623 		.parent_data = gcc_xo_gpll0,
2624 		.num_parents = 2,
2625 		.ops = &clk_rcg2_ops,
2626 	},
2627 };
2628 
2629 static const struct freq_tbl ftbl_lpass_snoc_cfg_clk_src[] = {
2630 	F(24000000, P_XO, 1, 0, 0),
2631 	F(266666667, P_GPLL0, 3, 0, 0),
2632 	{ }
2633 };
2634 
2635 static struct clk_rcg2 lpass_snoc_cfg_clk_src = {
2636 	.cmd_rcgr = 0x1F040,
2637 	.freq_tbl = ftbl_lpass_snoc_cfg_clk_src,
2638 	.hid_width = 5,
2639 	.parent_map = gcc_xo_gpll0_map,
2640 	.clkr.hw.init = &(struct clk_init_data){
2641 		.name = "lpass_snoc_cfg_clk_src",
2642 		.parent_data = gcc_xo_gpll0,
2643 		.num_parents = 2,
2644 		.ops = &clk_rcg2_ops,
2645 	},
2646 };
2647 
2648 static const struct freq_tbl ftbl_lpass_q6_axim_clk_src[] = {
2649 	F(24000000, P_XO, 1, 0, 0),
2650 	F(400000000, P_GPLL0, 2, 0, 0),
2651 	{ }
2652 };
2653 
2654 static struct clk_rcg2 lpass_q6_axim_clk_src = {
2655 	.cmd_rcgr = 0x1F008,
2656 	.freq_tbl = ftbl_lpass_q6_axim_clk_src,
2657 	.hid_width = 5,
2658 	.parent_map = gcc_xo_gpll0_map,
2659 	.clkr.hw.init = &(struct clk_init_data){
2660 		.name = "lpass_q6_axim_clk_src",
2661 		.parent_data = gcc_xo_gpll0,
2662 		.num_parents = 2,
2663 		.ops = &clk_rcg2_ops,
2664 	},
2665 };
2666 
2667 static struct freq_tbl ftbl_rbcpr_wcss_clk_src[] = {
2668 	F(24000000, P_XO, 1, 0, 0),
2669 	F(50000000, P_GPLL0, 16, 0, 0),
2670 	{ }
2671 };
2672 
2673 static struct clk_rcg2 rbcpr_wcss_clk_src = {
2674 	.cmd_rcgr = 0x3a00c,
2675 	.freq_tbl = ftbl_rbcpr_wcss_clk_src,
2676 	.hid_width = 5,
2677 	.parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
2678 	.clkr.hw.init = &(struct clk_init_data){
2679 		.name = "rbcpr_wcss_clk_src",
2680 		.parent_data = gcc_xo_gpll0_out_main_div2_gpll0,
2681 		.num_parents = 3,
2682 		.ops = &clk_rcg2_ops,
2683 	},
2684 };
2685 
2686 static struct clk_branch gcc_lpass_core_axim_clk = {
2687 	.halt_reg = 0x1F028,
2688 	.clkr = {
2689 		.enable_reg = 0x1F028,
2690 		.enable_mask = BIT(0),
2691 		.hw.init = &(struct clk_init_data){
2692 			.name = "gcc_lpass_core_axim_clk",
2693 			.parent_hws = (const struct clk_hw *[]){
2694 					&lpass_core_axim_clk_src.clkr.hw },
2695 			.num_parents = 1,
2696 			.flags = CLK_SET_RATE_PARENT,
2697 			.ops = &clk_branch2_ops,
2698 		},
2699 	},
2700 };
2701 
2702 static struct clk_branch gcc_lpass_snoc_cfg_clk = {
2703 	.halt_reg = 0x1F048,
2704 	.clkr = {
2705 		.enable_reg = 0x1F048,
2706 		.enable_mask = BIT(0),
2707 		.hw.init = &(struct clk_init_data){
2708 			.name = "gcc_lpass_snoc_cfg_clk",
2709 			.parent_hws = (const struct clk_hw *[]){
2710 					&lpass_snoc_cfg_clk_src.clkr.hw },
2711 			.num_parents = 1,
2712 			.flags = CLK_SET_RATE_PARENT,
2713 			.ops = &clk_branch2_ops,
2714 		},
2715 	},
2716 };
2717 
2718 static struct clk_branch gcc_lpass_q6_axim_clk = {
2719 	.halt_reg = 0x1F010,
2720 	.clkr = {
2721 		.enable_reg = 0x1F010,
2722 		.enable_mask = BIT(0),
2723 		.hw.init = &(struct clk_init_data){
2724 			.name = "gcc_lpass_q6_axim_clk",
2725 			.parent_hws = (const struct clk_hw *[]){
2726 					&lpass_q6_axim_clk_src.clkr.hw },
2727 			.num_parents = 1,
2728 			.flags = CLK_SET_RATE_PARENT,
2729 			.ops = &clk_branch2_ops,
2730 		},
2731 	},
2732 };
2733 
2734 static struct clk_branch gcc_lpass_q6_atbm_at_clk = {
2735 	.halt_reg = 0x1F018,
2736 	.clkr = {
2737 		.enable_reg = 0x1F018,
2738 		.enable_mask = BIT(0),
2739 		.hw.init = &(struct clk_init_data){
2740 			.name = "gcc_lpass_q6_atbm_at_clk",
2741 			.parent_hws = (const struct clk_hw *[]){
2742 					&qdss_at_clk_src.clkr.hw },
2743 			.num_parents = 1,
2744 			.flags = CLK_SET_RATE_PARENT,
2745 			.ops = &clk_branch2_ops,
2746 		},
2747 	},
2748 };
2749 
2750 static struct clk_branch gcc_lpass_q6_pclkdbg_clk = {
2751 	.halt_reg = 0x1F01C,
2752 	.clkr = {
2753 		.enable_reg = 0x1F01C,
2754 		.enable_mask = BIT(0),
2755 		.hw.init = &(struct clk_init_data){
2756 			.name = "gcc_lpass_q6_pclkdbg_clk",
2757 			.parent_hws = (const struct clk_hw *[]){
2758 					&qdss_dap_sync_clk_src.hw },
2759 			.num_parents = 1,
2760 			.flags = CLK_SET_RATE_PARENT,
2761 			.ops = &clk_branch2_ops,
2762 		},
2763 	},
2764 };
2765 
2766 static struct clk_branch gcc_lpass_q6ss_tsctr_1to2_clk = {
2767 	.halt_reg = 0x1F014,
2768 	.clkr = {
2769 		.enable_reg = 0x1F014,
2770 		.enable_mask = BIT(0),
2771 		.hw.init = &(struct clk_init_data){
2772 			.name = "gcc_lpass_q6ss_tsctr_1to2_clk",
2773 			.parent_hws = (const struct clk_hw *[]){
2774 					&qdss_tsctr_div2_clk_src.hw },
2775 			.num_parents = 1,
2776 			.flags = CLK_SET_RATE_PARENT,
2777 			.ops = &clk_branch2_ops,
2778 		},
2779 	},
2780 };
2781 
2782 static struct clk_branch gcc_lpass_q6ss_trig_clk = {
2783 	.halt_reg = 0x1F038,
2784 	.clkr = {
2785 		.enable_reg = 0x1F038,
2786 		.enable_mask = BIT(0),
2787 		.hw.init = &(struct clk_init_data){
2788 			.name = "gcc_lpass_q6ss_trig_clk",
2789 			.parent_hws = (const struct clk_hw *[]){
2790 					&qdss_dap_sync_clk_src.hw },
2791 			.num_parents = 1,
2792 			.flags = CLK_SET_RATE_PARENT,
2793 			.ops = &clk_branch2_ops,
2794 		},
2795 	},
2796 };
2797 
2798 static struct clk_branch gcc_lpass_tbu_clk = {
2799 	.halt_reg = 0x12094,
2800 	.clkr = {
2801 		.enable_reg = 0xb00c,
2802 		.enable_mask = BIT(10),
2803 		.hw.init = &(struct clk_init_data){
2804 			.name = "gcc_lpass_tbu_clk",
2805 			.parent_hws = (const struct clk_hw *[]){
2806 					&lpass_q6_axim_clk_src.clkr.hw },
2807 			.num_parents = 1,
2808 			.flags = CLK_SET_RATE_PARENT,
2809 			.ops = &clk_branch2_ops,
2810 		},
2811 	},
2812 };
2813 
2814 static struct clk_branch gcc_pcnoc_lpass_clk = {
2815 	.halt_reg = 0x27020,
2816 	.clkr = {
2817 		.enable_reg = 0x27020,
2818 		.enable_mask = BIT(0),
2819 		.hw.init = &(struct clk_init_data){
2820 			.name = "gcc_pcnoc_lpass_clk",
2821 			.parent_hws = (const struct clk_hw *[]){
2822 					&lpass_core_axim_clk_src.clkr.hw },
2823 			.num_parents = 1,
2824 			.flags = CLK_SET_RATE_PARENT,
2825 			.ops = &clk_branch2_ops,
2826 		},
2827 	},
2828 };
2829 
2830 static struct clk_branch gcc_mem_noc_lpass_clk = {
2831 	.halt_reg = 0x1D044,
2832 	.clkr = {
2833 		.enable_reg = 0x1D044,
2834 		.enable_mask = BIT(0),
2835 		.hw.init = &(struct clk_init_data){
2836 			.name = "gcc_mem_noc_lpass_clk",
2837 			.parent_hws = (const struct clk_hw *[]){
2838 					&lpass_q6_axim_clk_src.clkr.hw },
2839 			.num_parents = 1,
2840 			.flags = CLK_SET_RATE_PARENT,
2841 			.ops = &clk_branch2_ops,
2842 		},
2843 	},
2844 };
2845 
2846 static struct clk_branch gcc_snoc_lpass_cfg_clk = {
2847 	.halt_reg = 0x26074,
2848 	.clkr = {
2849 		.enable_reg = 0x26074,
2850 		.enable_mask = BIT(0),
2851 		.hw.init = &(struct clk_init_data){
2852 			.name = "gcc_snoc_lpass_cfg_clk",
2853 			.parent_hws = (const struct clk_hw *[]){
2854 					&lpass_snoc_cfg_clk_src.clkr.hw },
2855 			.num_parents = 1,
2856 			.flags = CLK_SET_RATE_PARENT,
2857 			.ops = &clk_branch2_ops,
2858 		},
2859 	},
2860 };
2861 
2862 static struct clk_branch gcc_mem_noc_ubi32_clk = {
2863 	.halt_reg = 0x1D03C,
2864 	.clkr = {
2865 		.enable_reg = 0x1D03C,
2866 		.enable_mask = BIT(0),
2867 		.hw.init = &(struct clk_init_data){
2868 			.name = "gcc_mem_noc_ubi32_clk",
2869 			.parent_hws = (const struct clk_hw *[]){
2870 					&ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
2871 			.num_parents = 1,
2872 			.flags = CLK_SET_RATE_PARENT,
2873 			.ops = &clk_branch2_ops,
2874 		},
2875 	},
2876 };
2877 
2878 static struct clk_branch gcc_nss_port1_rx_clk = {
2879 	.halt_reg = 0x68240,
2880 	.clkr = {
2881 		.enable_reg = 0x68240,
2882 		.enable_mask = BIT(0),
2883 		.hw.init = &(struct clk_init_data){
2884 			.name = "gcc_nss_port1_rx_clk",
2885 			.parent_hws = (const struct clk_hw *[]){
2886 					&nss_port1_rx_div_clk_src.clkr.hw },
2887 			.num_parents = 1,
2888 			.flags = CLK_SET_RATE_PARENT,
2889 			.ops = &clk_branch2_ops,
2890 		},
2891 	},
2892 };
2893 
2894 static struct clk_branch gcc_nss_port1_tx_clk = {
2895 	.halt_reg = 0x68244,
2896 	.clkr = {
2897 		.enable_reg = 0x68244,
2898 		.enable_mask = BIT(0),
2899 		.hw.init = &(struct clk_init_data){
2900 			.name = "gcc_nss_port1_tx_clk",
2901 			.parent_hws = (const struct clk_hw *[]){
2902 					&nss_port1_tx_div_clk_src.clkr.hw },
2903 			.num_parents = 1,
2904 			.flags = CLK_SET_RATE_PARENT,
2905 			.ops = &clk_branch2_ops,
2906 		},
2907 	},
2908 };
2909 
2910 static struct clk_branch gcc_nss_port2_rx_clk = {
2911 	.halt_reg = 0x68248,
2912 	.clkr = {
2913 		.enable_reg = 0x68248,
2914 		.enable_mask = BIT(0),
2915 		.hw.init = &(struct clk_init_data){
2916 			.name = "gcc_nss_port2_rx_clk",
2917 			.parent_hws = (const struct clk_hw *[]){
2918 					&nss_port2_rx_div_clk_src.clkr.hw },
2919 			.num_parents = 1,
2920 			.flags = CLK_SET_RATE_PARENT,
2921 			.ops = &clk_branch2_ops,
2922 		},
2923 	},
2924 };
2925 
2926 static struct clk_branch gcc_nss_port2_tx_clk = {
2927 	.halt_reg = 0x6824c,
2928 	.clkr = {
2929 		.enable_reg = 0x6824c,
2930 		.enable_mask = BIT(0),
2931 		.hw.init = &(struct clk_init_data){
2932 			.name = "gcc_nss_port2_tx_clk",
2933 			.parent_hws = (const struct clk_hw *[]){
2934 					&nss_port2_tx_div_clk_src.clkr.hw },
2935 			.num_parents = 1,
2936 			.flags = CLK_SET_RATE_PARENT,
2937 			.ops = &clk_branch2_ops,
2938 		},
2939 	},
2940 };
2941 
2942 static struct clk_branch gcc_nss_port3_rx_clk = {
2943 	.halt_reg = 0x68250,
2944 	.clkr = {
2945 		.enable_reg = 0x68250,
2946 		.enable_mask = BIT(0),
2947 		.hw.init = &(struct clk_init_data){
2948 			.name = "gcc_nss_port3_rx_clk",
2949 			.parent_hws = (const struct clk_hw *[]){
2950 					&nss_port3_rx_div_clk_src.clkr.hw },
2951 			.num_parents = 1,
2952 			.flags = CLK_SET_RATE_PARENT,
2953 			.ops = &clk_branch2_ops,
2954 		},
2955 	},
2956 };
2957 
2958 static struct clk_branch gcc_nss_port3_tx_clk = {
2959 	.halt_reg = 0x68254,
2960 	.clkr = {
2961 		.enable_reg = 0x68254,
2962 		.enable_mask = BIT(0),
2963 		.hw.init = &(struct clk_init_data){
2964 			.name = "gcc_nss_port3_tx_clk",
2965 			.parent_hws = (const struct clk_hw *[]){
2966 					&nss_port3_tx_div_clk_src.clkr.hw },
2967 			.num_parents = 1,
2968 			.flags = CLK_SET_RATE_PARENT,
2969 			.ops = &clk_branch2_ops,
2970 		},
2971 	},
2972 };
2973 
2974 static struct clk_branch gcc_nss_port4_rx_clk = {
2975 	.halt_reg = 0x68258,
2976 	.clkr = {
2977 		.enable_reg = 0x68258,
2978 		.enable_mask = BIT(0),
2979 		.hw.init = &(struct clk_init_data){
2980 			.name = "gcc_nss_port4_rx_clk",
2981 			.parent_hws = (const struct clk_hw *[]){
2982 					&nss_port4_rx_div_clk_src.clkr.hw },
2983 			.num_parents = 1,
2984 			.flags = CLK_SET_RATE_PARENT,
2985 			.ops = &clk_branch2_ops,
2986 		},
2987 	},
2988 };
2989 
2990 static struct clk_branch gcc_nss_port4_tx_clk = {
2991 	.halt_reg = 0x6825c,
2992 	.clkr = {
2993 		.enable_reg = 0x6825c,
2994 		.enable_mask = BIT(0),
2995 		.hw.init = &(struct clk_init_data){
2996 			.name = "gcc_nss_port4_tx_clk",
2997 			.parent_hws = (const struct clk_hw *[]){
2998 					&nss_port4_tx_div_clk_src.clkr.hw },
2999 			.num_parents = 1,
3000 			.flags = CLK_SET_RATE_PARENT,
3001 			.ops = &clk_branch2_ops,
3002 		},
3003 	},
3004 };
3005 
3006 static struct clk_branch gcc_nss_port5_rx_clk = {
3007 	.halt_reg = 0x68260,
3008 	.clkr = {
3009 		.enable_reg = 0x68260,
3010 		.enable_mask = BIT(0),
3011 		.hw.init = &(struct clk_init_data){
3012 			.name = "gcc_nss_port5_rx_clk",
3013 			.parent_hws = (const struct clk_hw *[]){
3014 					&nss_port5_rx_div_clk_src.clkr.hw },
3015 			.num_parents = 1,
3016 			.flags = CLK_SET_RATE_PARENT,
3017 			.ops = &clk_branch2_ops,
3018 		},
3019 	},
3020 };
3021 
3022 static struct clk_branch gcc_nss_port5_tx_clk = {
3023 	.halt_reg = 0x68264,
3024 	.clkr = {
3025 		.enable_reg = 0x68264,
3026 		.enable_mask = BIT(0),
3027 		.hw.init = &(struct clk_init_data){
3028 			.name = "gcc_nss_port5_tx_clk",
3029 			.parent_hws = (const struct clk_hw *[]){
3030 					&nss_port5_tx_div_clk_src.clkr.hw },
3031 			.num_parents = 1,
3032 			.flags = CLK_SET_RATE_PARENT,
3033 			.ops = &clk_branch2_ops,
3034 		},
3035 	},
3036 };
3037 
3038 static struct clk_branch gcc_nss_ppe_cfg_clk = {
3039 	.halt_reg = 0x68194,
3040 	.clkr = {
3041 		.enable_reg = 0x68194,
3042 		.enable_mask = BIT(0),
3043 		.hw.init = &(struct clk_init_data){
3044 			.name = "gcc_nss_ppe_cfg_clk",
3045 			.parent_hws = (const struct clk_hw *[]){
3046 					&nss_ppe_clk_src.clkr.hw },
3047 			.num_parents = 1,
3048 			.flags = CLK_SET_RATE_PARENT,
3049 			.ops = &clk_branch2_ops,
3050 		},
3051 	},
3052 };
3053 
3054 static struct clk_branch gcc_nss_ppe_clk = {
3055 	.halt_reg = 0x68190,
3056 	.clkr = {
3057 		.enable_reg = 0x68190,
3058 		.enable_mask = BIT(0),
3059 		.hw.init = &(struct clk_init_data){
3060 			.name = "gcc_nss_ppe_clk",
3061 			.parent_hws = (const struct clk_hw *[]){
3062 					&nss_ppe_clk_src.clkr.hw },
3063 			.num_parents = 1,
3064 			.flags = CLK_SET_RATE_PARENT,
3065 			.ops = &clk_branch2_ops,
3066 		},
3067 	},
3068 };
3069 
3070 static struct clk_branch gcc_nss_ppe_ipe_clk = {
3071 	.halt_reg = 0x68338,
3072 	.clkr = {
3073 		.enable_reg = 0x68338,
3074 		.enable_mask = BIT(0),
3075 		.hw.init = &(struct clk_init_data){
3076 			.name = "gcc_nss_ppe_ipe_clk",
3077 			.parent_hws = (const struct clk_hw *[]){
3078 					&nss_ppe_clk_src.clkr.hw },
3079 			.num_parents = 1,
3080 			.flags = CLK_SET_RATE_PARENT,
3081 			.ops = &clk_branch2_ops,
3082 		},
3083 	},
3084 };
3085 
3086 static struct clk_branch gcc_nss_ptp_ref_clk = {
3087 	.halt_reg = 0x6816C,
3088 	.clkr = {
3089 		.enable_reg = 0x6816C,
3090 		.enable_mask = BIT(0),
3091 		.hw.init = &(struct clk_init_data){
3092 			.name = "gcc_nss_ptp_ref_clk",
3093 			.parent_hws = (const struct clk_hw *[]){
3094 					&nss_ppe_cdiv_clk_src.hw },
3095 			.num_parents = 1,
3096 			.flags = CLK_SET_RATE_PARENT,
3097 			.ops = &clk_branch2_ops,
3098 		},
3099 	},
3100 };
3101 
3102 static struct clk_branch gcc_nssnoc_ce_apb_clk = {
3103 	.halt_reg = 0x6830C,
3104 	.clkr = {
3105 		.enable_reg = 0x6830C,
3106 		.enable_mask = BIT(0),
3107 		.hw.init = &(struct clk_init_data){
3108 			.name = "gcc_nssnoc_ce_apb_clk",
3109 			.parent_hws = (const struct clk_hw *[]){
3110 					&nss_ce_clk_src.clkr.hw },
3111 			.num_parents = 1,
3112 			.flags = CLK_SET_RATE_PARENT,
3113 			.ops = &clk_branch2_ops,
3114 		},
3115 	},
3116 };
3117 
3118 static struct clk_branch gcc_nssnoc_ce_axi_clk = {
3119 	.halt_reg = 0x68308,
3120 	.clkr = {
3121 		.enable_reg = 0x68308,
3122 		.enable_mask = BIT(0),
3123 		.hw.init = &(struct clk_init_data){
3124 			.name = "gcc_nssnoc_ce_axi_clk",
3125 			.parent_hws = (const struct clk_hw *[]){
3126 					&nss_ce_clk_src.clkr.hw },
3127 			.num_parents = 1,
3128 			.flags = CLK_SET_RATE_PARENT,
3129 			.ops = &clk_branch2_ops,
3130 		},
3131 	},
3132 };
3133 
3134 static struct clk_branch gcc_nssnoc_crypto_clk = {
3135 	.halt_reg = 0x68314,
3136 	.clkr = {
3137 		.enable_reg = 0x68314,
3138 		.enable_mask = BIT(0),
3139 		.hw.init = &(struct clk_init_data){
3140 			.name = "gcc_nssnoc_crypto_clk",
3141 			.parent_hws = (const struct clk_hw *[]){
3142 					&nss_crypto_clk_src.clkr.hw },
3143 			.num_parents = 1,
3144 			.flags = CLK_SET_RATE_PARENT,
3145 			.ops = &clk_branch2_ops,
3146 		},
3147 	},
3148 };
3149 
3150 static struct clk_branch gcc_nssnoc_ppe_cfg_clk = {
3151 	.halt_reg = 0x68304,
3152 	.clkr = {
3153 		.enable_reg = 0x68304,
3154 		.enable_mask = BIT(0),
3155 		.hw.init = &(struct clk_init_data){
3156 			.name = "gcc_nssnoc_ppe_cfg_clk",
3157 			.parent_hws = (const struct clk_hw *[]){
3158 					&nss_ppe_clk_src.clkr.hw },
3159 			.flags = CLK_SET_RATE_PARENT,
3160 			.ops = &clk_branch2_ops,
3161 		},
3162 	},
3163 };
3164 
3165 static struct clk_branch gcc_nssnoc_ppe_clk = {
3166 	.halt_reg = 0x68300,
3167 	.clkr = {
3168 		.enable_reg = 0x68300,
3169 		.enable_mask = BIT(0),
3170 		.hw.init = &(struct clk_init_data){
3171 			.name = "gcc_nssnoc_ppe_clk",
3172 			.parent_hws = (const struct clk_hw *[]){
3173 					&nss_ppe_clk_src.clkr.hw },
3174 			.num_parents = 1,
3175 			.flags = CLK_SET_RATE_PARENT,
3176 			.ops = &clk_branch2_ops,
3177 		},
3178 	},
3179 };
3180 
3181 static struct clk_branch gcc_nssnoc_qosgen_ref_clk = {
3182 	.halt_reg = 0x68180,
3183 	.clkr = {
3184 		.enable_reg = 0x68180,
3185 		.enable_mask = BIT(0),
3186 		.hw.init = &(struct clk_init_data){
3187 			.name = "gcc_nssnoc_qosgen_ref_clk",
3188 			.parent_hws = (const struct clk_hw *[]){
3189 					&gcc_xo_clk_src.clkr.hw },
3190 			.num_parents = 1,
3191 			.flags = CLK_SET_RATE_PARENT,
3192 			.ops = &clk_branch2_ops,
3193 		},
3194 	},
3195 };
3196 
3197 static struct clk_branch gcc_nssnoc_snoc_clk = {
3198 	.halt_reg = 0x68188,
3199 	.clkr = {
3200 		.enable_reg = 0x68188,
3201 		.enable_mask = BIT(0),
3202 		.hw.init = &(struct clk_init_data){
3203 			.name = "gcc_nssnoc_snoc_clk",
3204 			.parent_hws = (const struct clk_hw *[]){
3205 					&system_noc_bfdcd_clk_src.clkr.hw },
3206 			.num_parents = 1,
3207 			.flags = CLK_SET_RATE_PARENT,
3208 			.ops = &clk_branch2_ops,
3209 		},
3210 	},
3211 };
3212 
3213 static struct clk_branch gcc_nssnoc_timeout_ref_clk = {
3214 	.halt_reg = 0x68184,
3215 	.clkr = {
3216 		.enable_reg = 0x68184,
3217 		.enable_mask = BIT(0),
3218 		.hw.init = &(struct clk_init_data){
3219 			.name = "gcc_nssnoc_timeout_ref_clk",
3220 			.parent_hws = (const struct clk_hw *[]){
3221 					&gcc_xo_div4_clk_src.hw },
3222 			.num_parents = 1,
3223 			.flags = CLK_SET_RATE_PARENT,
3224 			.ops = &clk_branch2_ops,
3225 		},
3226 	},
3227 };
3228 
3229 static struct clk_branch gcc_nssnoc_ubi0_ahb_clk = {
3230 	.halt_reg = 0x68270,
3231 	.clkr = {
3232 		.enable_reg = 0x68270,
3233 		.enable_mask = BIT(0),
3234 		.hw.init = &(struct clk_init_data){
3235 			.name = "gcc_nssnoc_ubi0_ahb_clk",
3236 			.parent_hws = (const struct clk_hw *[]){
3237 					&nss_ce_clk_src.clkr.hw },
3238 			.num_parents = 1,
3239 			.flags = CLK_SET_RATE_PARENT,
3240 			.ops = &clk_branch2_ops,
3241 		},
3242 	},
3243 };
3244 
3245 static struct clk_branch gcc_port1_mac_clk = {
3246 	.halt_reg = 0x68320,
3247 	.clkr = {
3248 		.enable_reg = 0x68320,
3249 		.enable_mask = BIT(0),
3250 		.hw.init = &(struct clk_init_data){
3251 			.name = "gcc_port1_mac_clk",
3252 			.parent_hws = (const struct clk_hw *[]){
3253 					&nss_ppe_clk_src.clkr.hw },
3254 			.num_parents = 1,
3255 			.flags = CLK_SET_RATE_PARENT,
3256 			.ops = &clk_branch2_ops,
3257 		},
3258 	},
3259 };
3260 
3261 static struct clk_branch gcc_port2_mac_clk = {
3262 	.halt_reg = 0x68324,
3263 	.clkr = {
3264 		.enable_reg = 0x68324,
3265 		.enable_mask = BIT(0),
3266 		.hw.init = &(struct clk_init_data){
3267 			.name = "gcc_port2_mac_clk",
3268 			.parent_hws = (const struct clk_hw *[]){
3269 					&nss_ppe_clk_src.clkr.hw },
3270 			.num_parents = 1,
3271 			.flags = CLK_SET_RATE_PARENT,
3272 			.ops = &clk_branch2_ops,
3273 		},
3274 	},
3275 };
3276 
3277 static struct clk_branch gcc_port3_mac_clk = {
3278 	.halt_reg = 0x68328,
3279 	.clkr = {
3280 		.enable_reg = 0x68328,
3281 		.enable_mask = BIT(0),
3282 		.hw.init = &(struct clk_init_data){
3283 			.name = "gcc_port3_mac_clk",
3284 			.parent_hws = (const struct clk_hw *[]){
3285 					&nss_ppe_clk_src.clkr.hw },
3286 			.num_parents = 1,
3287 			.flags = CLK_SET_RATE_PARENT,
3288 			.ops = &clk_branch2_ops,
3289 		},
3290 	},
3291 };
3292 
3293 static struct clk_branch gcc_port4_mac_clk = {
3294 	.halt_reg = 0x6832c,
3295 	.clkr = {
3296 		.enable_reg = 0x6832c,
3297 		.enable_mask = BIT(0),
3298 		.hw.init = &(struct clk_init_data){
3299 			.name = "gcc_port4_mac_clk",
3300 			.parent_hws = (const struct clk_hw *[]){
3301 					&nss_ppe_clk_src.clkr.hw },
3302 			.num_parents = 1,
3303 			.flags = CLK_SET_RATE_PARENT,
3304 			.ops = &clk_branch2_ops,
3305 		},
3306 	},
3307 };
3308 
3309 static struct clk_branch gcc_port5_mac_clk = {
3310 	.halt_reg = 0x68330,
3311 	.clkr = {
3312 		.enable_reg = 0x68330,
3313 		.enable_mask = BIT(0),
3314 		.hw.init = &(struct clk_init_data){
3315 			.name = "gcc_port5_mac_clk",
3316 			.parent_hws = (const struct clk_hw *[]){
3317 					&nss_ppe_clk_src.clkr.hw },
3318 			.num_parents = 1,
3319 			.flags = CLK_SET_RATE_PARENT,
3320 			.ops = &clk_branch2_ops,
3321 		},
3322 	},
3323 };
3324 
3325 static struct clk_branch gcc_ubi0_ahb_clk = {
3326 	.halt_reg = 0x6820C,
3327 	.halt_check = BRANCH_HALT_DELAY,
3328 	.clkr = {
3329 		.enable_reg = 0x6820C,
3330 		.enable_mask = BIT(0),
3331 		.hw.init = &(struct clk_init_data){
3332 			.name = "gcc_ubi0_ahb_clk",
3333 			.parent_hws = (const struct clk_hw *[]){
3334 					&nss_ce_clk_src.clkr.hw },
3335 			.num_parents = 1,
3336 			.flags = CLK_SET_RATE_PARENT,
3337 			.ops = &clk_branch2_ops,
3338 		},
3339 	},
3340 };
3341 
3342 static struct clk_branch gcc_ubi0_axi_clk = {
3343 	.halt_reg = 0x68200,
3344 	.halt_check = BRANCH_HALT_DELAY,
3345 	.clkr = {
3346 		.enable_reg = 0x68200,
3347 		.enable_mask = BIT(0),
3348 		.hw.init = &(struct clk_init_data){
3349 			.name = "gcc_ubi0_axi_clk",
3350 			.parent_hws = (const struct clk_hw *[]){
3351 					&ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
3352 			.num_parents = 1,
3353 			.flags = CLK_SET_RATE_PARENT,
3354 			.ops = &clk_branch2_ops,
3355 		},
3356 	},
3357 };
3358 
3359 static struct clk_branch gcc_ubi0_nc_axi_clk = {
3360 	.halt_reg = 0x68204,
3361 	.halt_check = BRANCH_HALT_DELAY,
3362 	.clkr = {
3363 		.enable_reg = 0x68204,
3364 		.enable_mask = BIT(0),
3365 		.hw.init = &(struct clk_init_data){
3366 			.name = "gcc_ubi0_nc_axi_clk",
3367 			.parent_hws = (const struct clk_hw *[]){
3368 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
3369 			.num_parents = 1,
3370 			.flags = CLK_SET_RATE_PARENT,
3371 			.ops = &clk_branch2_ops,
3372 		},
3373 	},
3374 };
3375 
3376 static struct clk_branch gcc_ubi0_core_clk = {
3377 	.halt_reg = 0x68210,
3378 	.halt_check = BRANCH_HALT_DELAY,
3379 	.clkr = {
3380 		.enable_reg = 0x68210,
3381 		.enable_mask = BIT(0),
3382 		.hw.init = &(struct clk_init_data){
3383 			.name = "gcc_ubi0_core_clk",
3384 			.parent_hws = (const struct clk_hw *[]){
3385 					&nss_ubi0_div_clk_src.clkr.hw },
3386 			.num_parents = 1,
3387 			.flags = CLK_SET_RATE_PARENT,
3388 			.ops = &clk_branch2_ops,
3389 		},
3390 	},
3391 };
3392 
3393 static struct clk_branch gcc_pcie0_ahb_clk = {
3394 	.halt_reg = 0x75010,
3395 	.clkr = {
3396 		.enable_reg = 0x75010,
3397 		.enable_mask = BIT(0),
3398 		.hw.init = &(struct clk_init_data){
3399 			.name = "gcc_pcie0_ahb_clk",
3400 			.parent_hws = (const struct clk_hw *[]){
3401 					&pcnoc_bfdcd_clk_src.clkr.hw },
3402 			.num_parents = 1,
3403 			.flags = CLK_SET_RATE_PARENT,
3404 			.ops = &clk_branch2_ops,
3405 		},
3406 	},
3407 };
3408 
3409 static struct clk_branch gcc_pcie0_aux_clk = {
3410 	.halt_reg = 0x75014,
3411 	.clkr = {
3412 		.enable_reg = 0x75014,
3413 		.enable_mask = BIT(0),
3414 		.hw.init = &(struct clk_init_data){
3415 			.name = "gcc_pcie0_aux_clk",
3416 			.parent_hws = (const struct clk_hw *[]){
3417 					&pcie0_aux_clk_src.clkr.hw },
3418 			.num_parents = 1,
3419 			.flags = CLK_SET_RATE_PARENT,
3420 			.ops = &clk_branch2_ops,
3421 		},
3422 	},
3423 };
3424 
3425 static struct clk_branch gcc_pcie0_axi_m_clk = {
3426 	.halt_reg = 0x75008,
3427 	.clkr = {
3428 		.enable_reg = 0x75008,
3429 		.enable_mask = BIT(0),
3430 		.hw.init = &(struct clk_init_data){
3431 			.name = "gcc_pcie0_axi_m_clk",
3432 			.parent_hws = (const struct clk_hw *[]){
3433 					&pcie0_axi_clk_src.clkr.hw },
3434 			.num_parents = 1,
3435 			.flags = CLK_SET_RATE_PARENT,
3436 			.ops = &clk_branch2_ops,
3437 		},
3438 	},
3439 };
3440 
3441 static struct clk_branch gcc_pcie0_axi_s_clk = {
3442 	.halt_reg = 0x7500c,
3443 	.clkr = {
3444 		.enable_reg = 0x7500c,
3445 		.enable_mask = BIT(0),
3446 		.hw.init = &(struct clk_init_data){
3447 			.name = "gcc_pcie0_axi_s_clk",
3448 			.parent_hws = (const struct clk_hw *[]){
3449 					&pcie0_axi_clk_src.clkr.hw },
3450 			.num_parents = 1,
3451 			.flags = CLK_SET_RATE_PARENT,
3452 			.ops = &clk_branch2_ops,
3453 		},
3454 	},
3455 };
3456 
3457 static struct clk_branch gcc_sys_noc_pcie0_axi_clk = {
3458 	.halt_reg = 0x26048,
3459 	.clkr = {
3460 		.enable_reg = 0x26048,
3461 		.enable_mask = BIT(0),
3462 		.hw.init = &(struct clk_init_data){
3463 			.name = "gcc_sys_noc_pcie0_axi_clk",
3464 			.parent_hws = (const struct clk_hw *[]){
3465 					&pcie0_axi_clk_src.clkr.hw },
3466 			.num_parents = 1,
3467 			.flags = CLK_SET_RATE_PARENT,
3468 			.ops = &clk_branch2_ops,
3469 		},
3470 	},
3471 };
3472 
3473 static struct clk_branch gcc_pcie0_pipe_clk = {
3474 	.halt_reg = 0x75018,
3475 	.halt_check = BRANCH_HALT_DELAY,
3476 	.clkr = {
3477 		.enable_reg = 0x75018,
3478 		.enable_mask = BIT(0),
3479 		.hw.init = &(struct clk_init_data){
3480 			.name = "gcc_pcie0_pipe_clk",
3481 			.parent_hws = (const struct clk_hw *[]){
3482 					&pcie0_pipe_clk_src.clkr.hw },
3483 			.num_parents = 1,
3484 			.flags = CLK_SET_RATE_PARENT,
3485 			.ops = &clk_branch2_ops,
3486 		},
3487 	},
3488 };
3489 
3490 static struct clk_branch gcc_prng_ahb_clk = {
3491 	.halt_reg = 0x13004,
3492 	.halt_check = BRANCH_HALT_VOTED,
3493 	.clkr = {
3494 		.enable_reg = 0x0b004,
3495 		.enable_mask = BIT(8),
3496 		.hw.init = &(struct clk_init_data){
3497 			.name = "gcc_prng_ahb_clk",
3498 			.parent_hws = (const struct clk_hw *[]){
3499 					&pcnoc_bfdcd_clk_src.clkr.hw },
3500 			.num_parents = 1,
3501 			.flags = CLK_SET_RATE_PARENT,
3502 			.ops = &clk_branch2_ops,
3503 		},
3504 	},
3505 };
3506 
3507 static struct clk_branch gcc_qdss_dap_clk = {
3508 	.halt_reg = 0x29084,
3509 	.clkr = {
3510 		.enable_reg = 0x29084,
3511 		.enable_mask = BIT(0),
3512 		.hw.init = &(struct clk_init_data){
3513 			.name = "gcc_qdss_dap_clk",
3514 			.parent_hws = (const struct clk_hw *[]){
3515 					&qdss_dap_sync_clk_src.hw },
3516 			.num_parents = 1,
3517 			.flags = CLK_SET_RATE_PARENT,
3518 			.ops = &clk_branch2_ops,
3519 		},
3520 	},
3521 };
3522 
3523 static struct clk_branch gcc_qpic_ahb_clk = {
3524 	.halt_reg = 0x57024,
3525 	.clkr = {
3526 		.enable_reg = 0x57024,
3527 		.enable_mask = BIT(0),
3528 		.hw.init = &(struct clk_init_data){
3529 			.name = "gcc_qpic_ahb_clk",
3530 			.parent_hws = (const struct clk_hw *[]){
3531 					&pcnoc_bfdcd_clk_src.clkr.hw },
3532 			.num_parents = 1,
3533 			.flags = CLK_SET_RATE_PARENT,
3534 			.ops = &clk_branch2_ops,
3535 		},
3536 	},
3537 };
3538 
3539 static struct clk_branch gcc_qpic_clk = {
3540 	.halt_reg = 0x57020,
3541 	.clkr = {
3542 		.enable_reg = 0x57020,
3543 		.enable_mask = BIT(0),
3544 		.hw.init = &(struct clk_init_data){
3545 			.name = "gcc_qpic_clk",
3546 			.parent_hws = (const struct clk_hw *[]){
3547 					&pcnoc_bfdcd_clk_src.clkr.hw },
3548 			.num_parents = 1,
3549 			.flags = CLK_SET_RATE_PARENT,
3550 			.ops = &clk_branch2_ops,
3551 		},
3552 	},
3553 };
3554 
3555 static struct clk_branch gcc_sdcc1_ahb_clk = {
3556 	.halt_reg = 0x4201c,
3557 	.clkr = {
3558 		.enable_reg = 0x4201c,
3559 		.enable_mask = BIT(0),
3560 		.hw.init = &(struct clk_init_data){
3561 			.name = "gcc_sdcc1_ahb_clk",
3562 			.parent_hws = (const struct clk_hw *[]){
3563 					&pcnoc_bfdcd_clk_src.clkr.hw },
3564 			.num_parents = 1,
3565 			.flags = CLK_SET_RATE_PARENT,
3566 			.ops = &clk_branch2_ops,
3567 		},
3568 	},
3569 };
3570 
3571 static struct clk_branch gcc_sdcc1_apps_clk = {
3572 	.halt_reg = 0x42018,
3573 	.clkr = {
3574 		.enable_reg = 0x42018,
3575 		.enable_mask = BIT(0),
3576 		.hw.init = &(struct clk_init_data){
3577 			.name = "gcc_sdcc1_apps_clk",
3578 			.parent_hws = (const struct clk_hw *[]){
3579 					&sdcc1_apps_clk_src.clkr.hw },
3580 			.num_parents = 1,
3581 			.flags = CLK_SET_RATE_PARENT,
3582 			.ops = &clk_branch2_ops,
3583 		},
3584 	},
3585 };
3586 
3587 static struct clk_branch gcc_uniphy0_ahb_clk = {
3588 	.halt_reg = 0x56008,
3589 	.clkr = {
3590 		.enable_reg = 0x56008,
3591 		.enable_mask = BIT(0),
3592 		.hw.init = &(struct clk_init_data){
3593 			.name = "gcc_uniphy0_ahb_clk",
3594 			.parent_hws = (const struct clk_hw *[]){
3595 					&pcnoc_bfdcd_clk_src.clkr.hw },
3596 			.num_parents = 1,
3597 			.flags = CLK_SET_RATE_PARENT,
3598 			.ops = &clk_branch2_ops,
3599 		},
3600 	},
3601 };
3602 
3603 static struct clk_branch gcc_uniphy0_port1_rx_clk = {
3604 	.halt_reg = 0x56010,
3605 	.clkr = {
3606 		.enable_reg = 0x56010,
3607 		.enable_mask = BIT(0),
3608 		.hw.init = &(struct clk_init_data){
3609 			.name = "gcc_uniphy0_port1_rx_clk",
3610 			.parent_hws = (const struct clk_hw *[]){
3611 					&nss_port1_rx_div_clk_src.clkr.hw },
3612 			.num_parents = 1,
3613 			.flags = CLK_SET_RATE_PARENT,
3614 			.ops = &clk_branch2_ops,
3615 		},
3616 	},
3617 };
3618 
3619 static struct clk_branch gcc_uniphy0_port1_tx_clk = {
3620 	.halt_reg = 0x56014,
3621 	.clkr = {
3622 		.enable_reg = 0x56014,
3623 		.enable_mask = BIT(0),
3624 		.hw.init = &(struct clk_init_data){
3625 			.name = "gcc_uniphy0_port1_tx_clk",
3626 			.parent_hws = (const struct clk_hw *[]){
3627 					&nss_port1_tx_div_clk_src.clkr.hw },
3628 			.num_parents = 1,
3629 			.flags = CLK_SET_RATE_PARENT,
3630 			.ops = &clk_branch2_ops,
3631 		},
3632 	},
3633 };
3634 
3635 static struct clk_branch gcc_uniphy0_port2_rx_clk = {
3636 	.halt_reg = 0x56018,
3637 	.clkr = {
3638 		.enable_reg = 0x56018,
3639 		.enable_mask = BIT(0),
3640 		.hw.init = &(struct clk_init_data){
3641 			.name = "gcc_uniphy0_port2_rx_clk",
3642 			.parent_hws = (const struct clk_hw *[]){
3643 					&nss_port2_rx_div_clk_src.clkr.hw },
3644 			.num_parents = 1,
3645 			.flags = CLK_SET_RATE_PARENT,
3646 			.ops = &clk_branch2_ops,
3647 		},
3648 	},
3649 };
3650 
3651 static struct clk_branch gcc_uniphy0_port2_tx_clk = {
3652 	.halt_reg = 0x5601c,
3653 	.clkr = {
3654 		.enable_reg = 0x5601c,
3655 		.enable_mask = BIT(0),
3656 		.hw.init = &(struct clk_init_data){
3657 			.name = "gcc_uniphy0_port2_tx_clk",
3658 			.parent_hws = (const struct clk_hw *[]){
3659 					&nss_port2_tx_div_clk_src.clkr.hw },
3660 			.num_parents = 1,
3661 			.flags = CLK_SET_RATE_PARENT,
3662 			.ops = &clk_branch2_ops,
3663 		},
3664 	},
3665 };
3666 
3667 static struct clk_branch gcc_uniphy0_port3_rx_clk = {
3668 	.halt_reg = 0x56020,
3669 	.clkr = {
3670 		.enable_reg = 0x56020,
3671 		.enable_mask = BIT(0),
3672 		.hw.init = &(struct clk_init_data){
3673 			.name = "gcc_uniphy0_port3_rx_clk",
3674 			.parent_hws = (const struct clk_hw *[]){
3675 					&nss_port3_rx_div_clk_src.clkr.hw },
3676 			.num_parents = 1,
3677 			.flags = CLK_SET_RATE_PARENT,
3678 			.ops = &clk_branch2_ops,
3679 		},
3680 	},
3681 };
3682 
3683 static struct clk_branch gcc_uniphy0_port3_tx_clk = {
3684 	.halt_reg = 0x56024,
3685 	.clkr = {
3686 		.enable_reg = 0x56024,
3687 		.enable_mask = BIT(0),
3688 		.hw.init = &(struct clk_init_data){
3689 			.name = "gcc_uniphy0_port3_tx_clk",
3690 			.parent_hws = (const struct clk_hw *[]){
3691 					&nss_port3_tx_div_clk_src.clkr.hw },
3692 			.num_parents = 1,
3693 			.flags = CLK_SET_RATE_PARENT,
3694 			.ops = &clk_branch2_ops,
3695 		},
3696 	},
3697 };
3698 
3699 static struct clk_branch gcc_uniphy0_port4_rx_clk = {
3700 	.halt_reg = 0x56028,
3701 	.clkr = {
3702 		.enable_reg = 0x56028,
3703 		.enable_mask = BIT(0),
3704 		.hw.init = &(struct clk_init_data){
3705 			.name = "gcc_uniphy0_port4_rx_clk",
3706 			.parent_hws = (const struct clk_hw *[]){
3707 					&nss_port4_rx_div_clk_src.clkr.hw },
3708 			.num_parents = 1,
3709 			.flags = CLK_SET_RATE_PARENT,
3710 			.ops = &clk_branch2_ops,
3711 		},
3712 	},
3713 };
3714 
3715 static struct clk_branch gcc_uniphy0_port4_tx_clk = {
3716 	.halt_reg = 0x5602c,
3717 	.clkr = {
3718 		.enable_reg = 0x5602c,
3719 		.enable_mask = BIT(0),
3720 		.hw.init = &(struct clk_init_data){
3721 			.name = "gcc_uniphy0_port4_tx_clk",
3722 			.parent_hws = (const struct clk_hw *[]){
3723 					&nss_port4_tx_div_clk_src.clkr.hw },
3724 			.num_parents = 1,
3725 			.flags = CLK_SET_RATE_PARENT,
3726 			.ops = &clk_branch2_ops,
3727 		},
3728 	},
3729 };
3730 
3731 static struct clk_branch gcc_uniphy0_port5_rx_clk = {
3732 	.halt_reg = 0x56030,
3733 	.clkr = {
3734 		.enable_reg = 0x56030,
3735 		.enable_mask = BIT(0),
3736 		.hw.init = &(struct clk_init_data){
3737 			.name = "gcc_uniphy0_port5_rx_clk",
3738 			.parent_hws = (const struct clk_hw *[]){
3739 					&nss_port5_rx_div_clk_src.clkr.hw },
3740 			.num_parents = 1,
3741 			.flags = CLK_SET_RATE_PARENT,
3742 			.ops = &clk_branch2_ops,
3743 		},
3744 	},
3745 };
3746 
3747 static struct clk_branch gcc_uniphy0_port5_tx_clk = {
3748 	.halt_reg = 0x56034,
3749 	.clkr = {
3750 		.enable_reg = 0x56034,
3751 		.enable_mask = BIT(0),
3752 		.hw.init = &(struct clk_init_data){
3753 			.name = "gcc_uniphy0_port5_tx_clk",
3754 			.parent_hws = (const struct clk_hw *[]){
3755 					&nss_port5_tx_div_clk_src.clkr.hw },
3756 			.num_parents = 1,
3757 			.flags = CLK_SET_RATE_PARENT,
3758 			.ops = &clk_branch2_ops,
3759 		},
3760 	},
3761 };
3762 
3763 static struct clk_branch gcc_uniphy0_sys_clk = {
3764 	.halt_reg = 0x5600C,
3765 	.clkr = {
3766 		.enable_reg = 0x5600C,
3767 		.enable_mask = BIT(0),
3768 		.hw.init = &(struct clk_init_data){
3769 			.name = "gcc_uniphy0_sys_clk",
3770 			.parent_hws = (const struct clk_hw *[]){
3771 					&gcc_xo_clk_src.clkr.hw },
3772 			.num_parents = 1,
3773 			.flags = CLK_SET_RATE_PARENT,
3774 			.ops = &clk_branch2_ops,
3775 		},
3776 	},
3777 };
3778 
3779 static struct clk_branch gcc_uniphy1_ahb_clk = {
3780 	.halt_reg = 0x56108,
3781 	.clkr = {
3782 		.enable_reg = 0x56108,
3783 		.enable_mask = BIT(0),
3784 		.hw.init = &(struct clk_init_data){
3785 			.name = "gcc_uniphy1_ahb_clk",
3786 			.parent_hws = (const struct clk_hw *[]){
3787 					&pcnoc_bfdcd_clk_src.clkr.hw },
3788 			.num_parents = 1,
3789 			.flags = CLK_SET_RATE_PARENT,
3790 			.ops = &clk_branch2_ops,
3791 		},
3792 	},
3793 };
3794 
3795 static struct clk_branch gcc_uniphy1_port5_rx_clk = {
3796 	.halt_reg = 0x56110,
3797 	.clkr = {
3798 		.enable_reg = 0x56110,
3799 		.enable_mask = BIT(0),
3800 		.hw.init = &(struct clk_init_data){
3801 			.name = "gcc_uniphy1_port5_rx_clk",
3802 			.parent_hws = (const struct clk_hw *[]){
3803 					&nss_port5_rx_div_clk_src.clkr.hw },
3804 			.num_parents = 1,
3805 			.flags = CLK_SET_RATE_PARENT,
3806 			.ops = &clk_branch2_ops,
3807 		},
3808 	},
3809 };
3810 
3811 static struct clk_branch gcc_uniphy1_port5_tx_clk = {
3812 	.halt_reg = 0x56114,
3813 	.clkr = {
3814 		.enable_reg = 0x56114,
3815 		.enable_mask = BIT(0),
3816 		.hw.init = &(struct clk_init_data){
3817 			.name = "gcc_uniphy1_port5_tx_clk",
3818 			.parent_hws = (const struct clk_hw *[]){
3819 					&nss_port5_tx_div_clk_src.clkr.hw },
3820 			.num_parents = 1,
3821 			.flags = CLK_SET_RATE_PARENT,
3822 			.ops = &clk_branch2_ops,
3823 		},
3824 	},
3825 };
3826 
3827 static struct clk_branch gcc_uniphy1_sys_clk = {
3828 	.halt_reg = 0x5610C,
3829 	.clkr = {
3830 		.enable_reg = 0x5610C,
3831 		.enable_mask = BIT(0),
3832 		.hw.init = &(struct clk_init_data){
3833 			.name = "gcc_uniphy1_sys_clk",
3834 			.parent_hws = (const struct clk_hw *[]){
3835 					&gcc_xo_clk_src.clkr.hw },
3836 			.num_parents = 1,
3837 			.flags = CLK_SET_RATE_PARENT,
3838 			.ops = &clk_branch2_ops,
3839 		},
3840 	},
3841 };
3842 
3843 static struct clk_branch gcc_usb0_aux_clk = {
3844 	.halt_reg = 0x3e044,
3845 	.clkr = {
3846 		.enable_reg = 0x3e044,
3847 		.enable_mask = BIT(0),
3848 		.hw.init = &(struct clk_init_data){
3849 			.name = "gcc_usb0_aux_clk",
3850 			.parent_hws = (const struct clk_hw *[]){
3851 					&usb0_aux_clk_src.clkr.hw },
3852 			.num_parents = 1,
3853 			.flags = CLK_SET_RATE_PARENT,
3854 			.ops = &clk_branch2_ops,
3855 		},
3856 	},
3857 };
3858 
3859 static struct clk_branch gcc_usb0_master_clk = {
3860 	.halt_reg = 0x3e000,
3861 	.clkr = {
3862 		.enable_reg = 0x3e000,
3863 		.enable_mask = BIT(0),
3864 		.hw.init = &(struct clk_init_data){
3865 			.name = "gcc_usb0_master_clk",
3866 			.parent_hws = (const struct clk_hw *[]){
3867 					&usb0_master_clk_src.clkr.hw },
3868 			.num_parents = 1,
3869 			.flags = CLK_SET_RATE_PARENT,
3870 			.ops = &clk_branch2_ops,
3871 		},
3872 	},
3873 };
3874 
3875 static struct clk_branch gcc_snoc_bus_timeout2_ahb_clk = {
3876 	.halt_reg = 0x47014,
3877 	.clkr = {
3878 		.enable_reg = 0x47014,
3879 		.enable_mask = BIT(0),
3880 		.hw.init = &(struct clk_init_data){
3881 			.name = "gcc_snoc_bus_timeout2_ahb_clk",
3882 			.parent_hws = (const struct clk_hw *[]){
3883 					&usb0_master_clk_src.clkr.hw },
3884 			.num_parents = 1,
3885 			.flags = CLK_SET_RATE_PARENT,
3886 			.ops = &clk_branch2_ops,
3887 		},
3888 	},
3889 };
3890 
3891 static struct clk_rcg2 pcie0_rchng_clk_src = {
3892 	.cmd_rcgr = 0x75070,
3893 	.freq_tbl = ftbl_pcie_rchng_clk_src,
3894 	.hid_width = 5,
3895 	.parent_map = gcc_xo_gpll0_map,
3896 	.clkr.hw.init = &(struct clk_init_data){
3897 		.name = "pcie0_rchng_clk_src",
3898 		.parent_data = gcc_xo_gpll0,
3899 		.num_parents = 2,
3900 		.ops = &clk_rcg2_ops,
3901 	},
3902 };
3903 
3904 static struct clk_branch gcc_pcie0_rchng_clk = {
3905 	.halt_reg = 0x75070,
3906 	.clkr = {
3907 		.enable_reg = 0x75070,
3908 		.enable_mask = BIT(1),
3909 		.hw.init = &(struct clk_init_data){
3910 			.name = "gcc_pcie0_rchng_clk",
3911 			.parent_hws = (const struct clk_hw *[]){
3912 					&pcie0_rchng_clk_src.clkr.hw },
3913 			.num_parents = 1,
3914 			.flags = CLK_SET_RATE_PARENT,
3915 			.ops = &clk_branch2_ops,
3916 		},
3917 	},
3918 };
3919 
3920 static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
3921 	.halt_reg = 0x75048,
3922 	.clkr = {
3923 		.enable_reg = 0x75048,
3924 		.enable_mask = BIT(0),
3925 		.hw.init = &(struct clk_init_data){
3926 			.name = "gcc_pcie0_axi_s_bridge_clk",
3927 			.parent_hws = (const struct clk_hw *[]){
3928 					&pcie0_axi_clk_src.clkr.hw },
3929 			.num_parents = 1,
3930 			.flags = CLK_SET_RATE_PARENT,
3931 			.ops = &clk_branch2_ops,
3932 		},
3933 	},
3934 };
3935 
3936 static struct clk_branch gcc_sys_noc_usb0_axi_clk = {
3937 	.halt_reg = 0x26040,
3938 	.clkr = {
3939 		.enable_reg = 0x26040,
3940 		.enable_mask = BIT(0),
3941 		.hw.init = &(struct clk_init_data){
3942 			.name = "gcc_sys_noc_usb0_axi_clk",
3943 			.parent_hws = (const struct clk_hw *[]){
3944 					&usb0_master_clk_src.clkr.hw },
3945 			.num_parents = 1,
3946 			.flags = CLK_SET_RATE_PARENT,
3947 			.ops = &clk_branch2_ops,
3948 		},
3949 	},
3950 };
3951 
3952 static struct clk_branch gcc_usb0_mock_utmi_clk = {
3953 	.halt_reg = 0x3e008,
3954 	.clkr = {
3955 		.enable_reg = 0x3e008,
3956 		.enable_mask = BIT(0),
3957 		.hw.init = &(struct clk_init_data){
3958 			.name = "gcc_usb0_mock_utmi_clk",
3959 			.parent_hws = (const struct clk_hw *[]){
3960 					&usb0_mock_utmi_clk_src.clkr.hw },
3961 			.num_parents = 1,
3962 			.flags = CLK_SET_RATE_PARENT,
3963 			.ops = &clk_branch2_ops,
3964 		},
3965 	},
3966 };
3967 
3968 static struct clk_branch gcc_usb0_phy_cfg_ahb_clk = {
3969 	.halt_reg = 0x3e080,
3970 	.clkr = {
3971 		.enable_reg = 0x3e080,
3972 		.enable_mask = BIT(0),
3973 		.hw.init = &(struct clk_init_data){
3974 			.name = "gcc_usb0_phy_cfg_ahb_clk",
3975 			.parent_hws = (const struct clk_hw *[]){
3976 					&pcnoc_bfdcd_clk_src.clkr.hw },
3977 			.num_parents = 1,
3978 			.flags = CLK_SET_RATE_PARENT,
3979 			.ops = &clk_branch2_ops,
3980 		},
3981 	},
3982 };
3983 
3984 static struct clk_branch gcc_usb0_pipe_clk = {
3985 	.halt_reg = 0x3e040,
3986 	.halt_check = BRANCH_HALT_DELAY,
3987 	.clkr = {
3988 		.enable_reg = 0x3e040,
3989 		.enable_mask = BIT(0),
3990 		.hw.init = &(struct clk_init_data){
3991 			.name = "gcc_usb0_pipe_clk",
3992 			.parent_hws = (const struct clk_hw *[]){
3993 					&usb0_pipe_clk_src.clkr.hw },
3994 			.num_parents = 1,
3995 			.flags = CLK_SET_RATE_PARENT,
3996 			.ops = &clk_branch2_ops,
3997 		},
3998 	},
3999 };
4000 
4001 static struct clk_branch gcc_usb0_sleep_clk = {
4002 	.halt_reg = 0x3e004,
4003 	.clkr = {
4004 		.enable_reg = 0x3e004,
4005 		.enable_mask = BIT(0),
4006 		.hw.init = &(struct clk_init_data){
4007 			.name = "gcc_usb0_sleep_clk",
4008 			.parent_hws = (const struct clk_hw *[]){
4009 					&gcc_sleep_clk_src.clkr.hw },
4010 			.num_parents = 1,
4011 			.flags = CLK_SET_RATE_PARENT,
4012 			.ops = &clk_branch2_ops,
4013 		},
4014 	},
4015 };
4016 
4017 static struct clk_branch gcc_usb1_master_clk = {
4018 	.halt_reg = 0x3f000,
4019 	.clkr = {
4020 		.enable_reg = 0x3f000,
4021 		.enable_mask = BIT(0),
4022 		.hw.init = &(struct clk_init_data){
4023 			.name = "gcc_usb1_master_clk",
4024 			.parent_hws = (const struct clk_hw *[]){
4025 					&pcnoc_bfdcd_clk_src.clkr.hw },
4026 			.num_parents = 1,
4027 			.flags = CLK_SET_RATE_PARENT,
4028 			.ops = &clk_branch2_ops,
4029 		},
4030 	},
4031 };
4032 
4033 static struct clk_branch gcc_usb1_mock_utmi_clk = {
4034 	.halt_reg = 0x3f008,
4035 	.clkr = {
4036 		.enable_reg = 0x3f008,
4037 		.enable_mask = BIT(0),
4038 		.hw.init = &(struct clk_init_data){
4039 			.name = "gcc_usb1_mock_utmi_clk",
4040 			.parent_hws = (const struct clk_hw *[]){
4041 					&usb1_mock_utmi_clk_src.clkr.hw },
4042 			.num_parents = 1,
4043 			.flags = CLK_SET_RATE_PARENT,
4044 			.ops = &clk_branch2_ops,
4045 		},
4046 	},
4047 };
4048 
4049 static struct clk_branch gcc_usb1_phy_cfg_ahb_clk = {
4050 	.halt_reg = 0x3f080,
4051 	.clkr = {
4052 		.enable_reg = 0x3f080,
4053 		.enable_mask = BIT(0),
4054 		.hw.init = &(struct clk_init_data){
4055 			.name = "gcc_usb1_phy_cfg_ahb_clk",
4056 			.parent_hws = (const struct clk_hw *[]){
4057 					&pcnoc_bfdcd_clk_src.clkr.hw },
4058 			.num_parents = 1,
4059 			.flags = CLK_SET_RATE_PARENT,
4060 			.ops = &clk_branch2_ops,
4061 		},
4062 	},
4063 };
4064 
4065 static struct clk_branch gcc_usb1_sleep_clk = {
4066 	.halt_reg = 0x3f004,
4067 	.clkr = {
4068 		.enable_reg = 0x3f004,
4069 		.enable_mask = BIT(0),
4070 		.hw.init = &(struct clk_init_data){
4071 			.name = "gcc_usb1_sleep_clk",
4072 			.parent_hws = (const struct clk_hw *[]){
4073 					&gcc_sleep_clk_src.clkr.hw },
4074 			.num_parents = 1,
4075 			.flags = CLK_SET_RATE_PARENT,
4076 			.ops = &clk_branch2_ops,
4077 		},
4078 	},
4079 };
4080 
4081 static struct clk_branch gcc_cmn_12gpll_ahb_clk = {
4082 	.halt_reg = 0x56308,
4083 	.clkr = {
4084 		.enable_reg = 0x56308,
4085 		.enable_mask = BIT(0),
4086 		.hw.init = &(struct clk_init_data){
4087 			.name = "gcc_cmn_12gpll_ahb_clk",
4088 			.parent_hws = (const struct clk_hw *[]){
4089 					&pcnoc_bfdcd_clk_src.clkr.hw },
4090 			.num_parents = 1,
4091 			.flags = CLK_SET_RATE_PARENT,
4092 			.ops = &clk_branch2_ops,
4093 		},
4094 	},
4095 };
4096 
4097 static struct clk_branch gcc_cmn_12gpll_sys_clk = {
4098 	.halt_reg = 0x5630c,
4099 	.clkr = {
4100 		.enable_reg = 0x5630c,
4101 		.enable_mask = BIT(0),
4102 		.hw.init = &(struct clk_init_data){
4103 			.name = "gcc_cmn_12gpll_sys_clk",
4104 			.parent_hws = (const struct clk_hw *[]){
4105 					&gcc_xo_clk_src.clkr.hw },
4106 			.num_parents = 1,
4107 			.flags = CLK_SET_RATE_PARENT,
4108 			.ops = &clk_branch2_ops,
4109 		},
4110 	},
4111 };
4112 
4113 static struct clk_branch gcc_sdcc1_ice_core_clk = {
4114 	.halt_reg = 0x5d014,
4115 	.clkr = {
4116 		.enable_reg = 0x5d014,
4117 		.enable_mask = BIT(0),
4118 		.hw.init = &(struct clk_init_data){
4119 			.name = "gcc_sdcc1_ice_core_clk",
4120 			.parent_hws = (const struct clk_hw *[]){
4121 					&sdcc1_ice_core_clk_src.clkr.hw },
4122 			.num_parents = 1,
4123 			.flags = CLK_SET_RATE_PARENT,
4124 			.ops = &clk_branch2_ops,
4125 		},
4126 	},
4127 };
4128 
4129 static struct clk_branch gcc_dcc_clk = {
4130 	.halt_reg = 0x77004,
4131 	.clkr = {
4132 		.enable_reg = 0x77004,
4133 		.enable_mask = BIT(0),
4134 		.hw.init = &(struct clk_init_data){
4135 			.name = "gcc_dcc_clk",
4136 			.parent_hws = (const struct clk_hw *[]){
4137 					&pcnoc_bfdcd_clk_src.clkr.hw },
4138 			.num_parents = 1,
4139 			.flags = CLK_SET_RATE_PARENT,
4140 			.ops = &clk_branch2_ops,
4141 		},
4142 	},
4143 };
4144 
4145 static const struct alpha_pll_config ubi32_pll_config = {
4146 	.l = 0x3e,
4147 	.alpha = 0x6667,
4148 	.config_ctl_val = 0x240d4828,
4149 	.config_ctl_hi_val = 0x6,
4150 	.main_output_mask = BIT(0),
4151 	.aux_output_mask = BIT(1),
4152 	.pre_div_val = 0x0,
4153 	.pre_div_mask = BIT(12),
4154 	.post_div_val = 0x0,
4155 	.post_div_mask = GENMASK(9, 8),
4156 	.alpha_en_mask = BIT(24),
4157 	.test_ctl_val = 0x1C0000C0,
4158 	.test_ctl_hi_val = 0x4000,
4159 };
4160 
4161 static const struct alpha_pll_config nss_crypto_pll_config = {
4162 	.l = 0x32,
4163 	.alpha = 0x0,
4164 	.alpha_hi = 0x0,
4165 	.config_ctl_val = 0x4001055b,
4166 	.main_output_mask = BIT(0),
4167 	.pre_div_val = 0x0,
4168 	.pre_div_mask = GENMASK(14, 12),
4169 	.post_div_val = 0x1 << 8,
4170 	.post_div_mask = GENMASK(11, 8),
4171 	.vco_mask = GENMASK(21, 20),
4172 	.vco_val = 0x0,
4173 	.alpha_en_mask = BIT(24),
4174 };
4175 
4176 static struct clk_hw *gcc_ipq6018_hws[] = {
4177 	&gpll0_out_main_div2.hw,
4178 	&gcc_xo_div4_clk_src.hw,
4179 	&nss_ppe_cdiv_clk_src.hw,
4180 	&gpll6_out_main_div2.hw,
4181 	&qdss_dap_sync_clk_src.hw,
4182 	&qdss_tsctr_div2_clk_src.hw,
4183 };
4184 
4185 static struct clk_regmap *gcc_ipq6018_clks[] = {
4186 	[GPLL0_MAIN] = &gpll0_main.clkr,
4187 	[GPLL0] = &gpll0.clkr,
4188 	[UBI32_PLL_MAIN] = &ubi32_pll_main.clkr,
4189 	[UBI32_PLL] = &ubi32_pll.clkr,
4190 	[GPLL6_MAIN] = &gpll6_main.clkr,
4191 	[GPLL6] = &gpll6.clkr,
4192 	[GPLL4_MAIN] = &gpll4_main.clkr,
4193 	[GPLL4] = &gpll4.clkr,
4194 	[PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
4195 	[GPLL2_MAIN] = &gpll2_main.clkr,
4196 	[GPLL2] = &gpll2.clkr,
4197 	[NSS_CRYPTO_PLL_MAIN] = &nss_crypto_pll_main.clkr,
4198 	[NSS_CRYPTO_PLL] = &nss_crypto_pll.clkr,
4199 	[QDSS_TSCTR_CLK_SRC] = &qdss_tsctr_clk_src.clkr,
4200 	[QDSS_AT_CLK_SRC] = &qdss_at_clk_src.clkr,
4201 	[NSS_PPE_CLK_SRC] = &nss_ppe_clk_src.clkr,
4202 	[GCC_XO_CLK_SRC] = &gcc_xo_clk_src.clkr,
4203 	[SYSTEM_NOC_BFDCD_CLK_SRC] = &system_noc_bfdcd_clk_src.clkr,
4204 	[SNOC_NSSNOC_BFDCD_CLK_SRC] = &snoc_nssnoc_bfdcd_clk_src.clkr,
4205 	[NSS_CE_CLK_SRC] = &nss_ce_clk_src.clkr,
4206 	[GCC_SLEEP_CLK_SRC] = &gcc_sleep_clk_src.clkr,
4207 	[APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
4208 	[NSS_PORT5_RX_CLK_SRC] = &nss_port5_rx_clk_src.clkr,
4209 	[NSS_PORT5_TX_CLK_SRC] = &nss_port5_tx_clk_src.clkr,
4210 	[UBI32_MEM_NOC_BFDCD_CLK_SRC] = &ubi32_mem_noc_bfdcd_clk_src.clkr,
4211 	[PCIE0_AXI_CLK_SRC] = &pcie0_axi_clk_src.clkr,
4212 	[USB0_MASTER_CLK_SRC] = &usb0_master_clk_src.clkr,
4213 	[APSS_AHB_POSTDIV_CLK_SRC] = &apss_ahb_postdiv_clk_src.clkr,
4214 	[NSS_PORT1_RX_CLK_SRC] = &nss_port1_rx_clk_src.clkr,
4215 	[NSS_PORT1_TX_CLK_SRC] = &nss_port1_tx_clk_src.clkr,
4216 	[NSS_PORT2_RX_CLK_SRC] = &nss_port2_rx_clk_src.clkr,
4217 	[NSS_PORT2_TX_CLK_SRC] = &nss_port2_tx_clk_src.clkr,
4218 	[NSS_PORT3_RX_CLK_SRC] = &nss_port3_rx_clk_src.clkr,
4219 	[NSS_PORT3_TX_CLK_SRC] = &nss_port3_tx_clk_src.clkr,
4220 	[NSS_PORT4_RX_CLK_SRC] = &nss_port4_rx_clk_src.clkr,
4221 	[NSS_PORT4_TX_CLK_SRC] = &nss_port4_tx_clk_src.clkr,
4222 	[NSS_PORT5_RX_DIV_CLK_SRC] = &nss_port5_rx_div_clk_src.clkr,
4223 	[NSS_PORT5_TX_DIV_CLK_SRC] = &nss_port5_tx_div_clk_src.clkr,
4224 	[APSS_AXI_CLK_SRC] = &apss_axi_clk_src.clkr,
4225 	[NSS_CRYPTO_CLK_SRC] = &nss_crypto_clk_src.clkr,
4226 	[NSS_PORT1_RX_DIV_CLK_SRC] = &nss_port1_rx_div_clk_src.clkr,
4227 	[NSS_PORT1_TX_DIV_CLK_SRC] = &nss_port1_tx_div_clk_src.clkr,
4228 	[NSS_PORT2_RX_DIV_CLK_SRC] = &nss_port2_rx_div_clk_src.clkr,
4229 	[NSS_PORT2_TX_DIV_CLK_SRC] = &nss_port2_tx_div_clk_src.clkr,
4230 	[NSS_PORT3_RX_DIV_CLK_SRC] = &nss_port3_rx_div_clk_src.clkr,
4231 	[NSS_PORT3_TX_DIV_CLK_SRC] = &nss_port3_tx_div_clk_src.clkr,
4232 	[NSS_PORT4_RX_DIV_CLK_SRC] = &nss_port4_rx_div_clk_src.clkr,
4233 	[NSS_PORT4_TX_DIV_CLK_SRC] = &nss_port4_tx_div_clk_src.clkr,
4234 	[NSS_UBI0_CLK_SRC] = &nss_ubi0_clk_src.clkr,
4235 	[ADSS_PWM_CLK_SRC] = &adss_pwm_clk_src.clkr,
4236 	[BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
4237 	[BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
4238 	[BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
4239 	[BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
4240 	[BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
4241 	[BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
4242 	[BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
4243 	[BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
4244 	[BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
4245 	[BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
4246 	[BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
4247 	[BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
4248 	[BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
4249 	[BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
4250 	[BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
4251 	[BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr,
4252 	[BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr,
4253 	[BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr,
4254 	[CRYPTO_CLK_SRC] = &crypto_clk_src.clkr,
4255 	[GP1_CLK_SRC] = &gp1_clk_src.clkr,
4256 	[GP2_CLK_SRC] = &gp2_clk_src.clkr,
4257 	[GP3_CLK_SRC] = &gp3_clk_src.clkr,
4258 	[NSS_UBI0_DIV_CLK_SRC] = &nss_ubi0_div_clk_src.clkr,
4259 	[PCIE0_AUX_CLK_SRC] = &pcie0_aux_clk_src.clkr,
4260 	[PCIE0_PIPE_CLK_SRC] = &pcie0_pipe_clk_src.clkr,
4261 	[SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
4262 	[USB0_AUX_CLK_SRC] = &usb0_aux_clk_src.clkr,
4263 	[USB0_MOCK_UTMI_CLK_SRC] = &usb0_mock_utmi_clk_src.clkr,
4264 	[USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr,
4265 	[USB1_MOCK_UTMI_CLK_SRC] = &usb1_mock_utmi_clk_src.clkr,
4266 	[GCC_ADSS_PWM_CLK] = &gcc_adss_pwm_clk.clkr,
4267 	[GCC_APSS_AHB_CLK] = &gcc_apss_ahb_clk.clkr,
4268 	[GCC_APSS_AXI_CLK] = &gcc_apss_axi_clk.clkr,
4269 	[GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
4270 	[GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
4271 	[GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
4272 	[GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
4273 	[GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
4274 	[GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
4275 	[GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
4276 	[GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
4277 	[GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
4278 	[GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
4279 	[GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
4280 	[GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
4281 	[GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
4282 	[GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
4283 	[GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
4284 	[GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr,
4285 	[GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr,
4286 	[GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr,
4287 	[GCC_CRYPTO_AHB_CLK] = &gcc_crypto_ahb_clk.clkr,
4288 	[GCC_CRYPTO_AXI_CLK] = &gcc_crypto_axi_clk.clkr,
4289 	[GCC_CRYPTO_CLK] = &gcc_crypto_clk.clkr,
4290 	[GCC_XO_CLK] = &gcc_xo_clk.clkr,
4291 	[GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
4292 	[GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
4293 	[GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
4294 	[GCC_MDIO_AHB_CLK] = &gcc_mdio_ahb_clk.clkr,
4295 	[GCC_CRYPTO_PPE_CLK] = &gcc_crypto_ppe_clk.clkr,
4296 	[GCC_NSS_CE_APB_CLK] = &gcc_nss_ce_apb_clk.clkr,
4297 	[GCC_NSS_CE_AXI_CLK] = &gcc_nss_ce_axi_clk.clkr,
4298 	[GCC_NSS_CFG_CLK] = &gcc_nss_cfg_clk.clkr,
4299 	[GCC_NSS_CRYPTO_CLK] = &gcc_nss_crypto_clk.clkr,
4300 	[GCC_NSS_CSR_CLK] = &gcc_nss_csr_clk.clkr,
4301 	[GCC_NSS_EDMA_CFG_CLK] = &gcc_nss_edma_cfg_clk.clkr,
4302 	[GCC_NSS_EDMA_CLK] = &gcc_nss_edma_clk.clkr,
4303 	[GCC_NSS_NOC_CLK] = &gcc_nss_noc_clk.clkr,
4304 	[GCC_UBI0_UTCM_CLK] = &gcc_ubi0_utcm_clk.clkr,
4305 	[GCC_SNOC_NSSNOC_CLK] = &gcc_snoc_nssnoc_clk.clkr,
4306 	[GCC_NSS_PORT1_RX_CLK] = &gcc_nss_port1_rx_clk.clkr,
4307 	[GCC_NSS_PORT1_TX_CLK] = &gcc_nss_port1_tx_clk.clkr,
4308 	[GCC_NSS_PORT2_RX_CLK] = &gcc_nss_port2_rx_clk.clkr,
4309 	[GCC_NSS_PORT2_TX_CLK] = &gcc_nss_port2_tx_clk.clkr,
4310 	[GCC_NSS_PORT3_RX_CLK] = &gcc_nss_port3_rx_clk.clkr,
4311 	[GCC_NSS_PORT3_TX_CLK] = &gcc_nss_port3_tx_clk.clkr,
4312 	[GCC_NSS_PORT4_RX_CLK] = &gcc_nss_port4_rx_clk.clkr,
4313 	[GCC_NSS_PORT4_TX_CLK] = &gcc_nss_port4_tx_clk.clkr,
4314 	[GCC_NSS_PORT5_RX_CLK] = &gcc_nss_port5_rx_clk.clkr,
4315 	[GCC_NSS_PORT5_TX_CLK] = &gcc_nss_port5_tx_clk.clkr,
4316 	[GCC_NSS_PPE_CFG_CLK] = &gcc_nss_ppe_cfg_clk.clkr,
4317 	[GCC_NSS_PPE_CLK] = &gcc_nss_ppe_clk.clkr,
4318 	[GCC_NSS_PPE_IPE_CLK] = &gcc_nss_ppe_ipe_clk.clkr,
4319 	[GCC_NSS_PTP_REF_CLK] = &gcc_nss_ptp_ref_clk.clkr,
4320 	[GCC_NSSNOC_CE_APB_CLK] = &gcc_nssnoc_ce_apb_clk.clkr,
4321 	[GCC_NSSNOC_CE_AXI_CLK] = &gcc_nssnoc_ce_axi_clk.clkr,
4322 	[GCC_NSSNOC_CRYPTO_CLK] = &gcc_nssnoc_crypto_clk.clkr,
4323 	[GCC_NSSNOC_PPE_CFG_CLK] = &gcc_nssnoc_ppe_cfg_clk.clkr,
4324 	[GCC_NSSNOC_PPE_CLK] = &gcc_nssnoc_ppe_clk.clkr,
4325 	[GCC_NSSNOC_QOSGEN_REF_CLK] = &gcc_nssnoc_qosgen_ref_clk.clkr,
4326 	[GCC_NSSNOC_SNOC_CLK] = &gcc_nssnoc_snoc_clk.clkr,
4327 	[GCC_NSSNOC_TIMEOUT_REF_CLK] = &gcc_nssnoc_timeout_ref_clk.clkr,
4328 	[GCC_NSSNOC_UBI0_AHB_CLK] = &gcc_nssnoc_ubi0_ahb_clk.clkr,
4329 	[GCC_PORT1_MAC_CLK] = &gcc_port1_mac_clk.clkr,
4330 	[GCC_PORT2_MAC_CLK] = &gcc_port2_mac_clk.clkr,
4331 	[GCC_PORT3_MAC_CLK] = &gcc_port3_mac_clk.clkr,
4332 	[GCC_PORT4_MAC_CLK] = &gcc_port4_mac_clk.clkr,
4333 	[GCC_PORT5_MAC_CLK] = &gcc_port5_mac_clk.clkr,
4334 	[GCC_UBI0_AHB_CLK] = &gcc_ubi0_ahb_clk.clkr,
4335 	[GCC_UBI0_AXI_CLK] = &gcc_ubi0_axi_clk.clkr,
4336 	[GCC_UBI0_NC_AXI_CLK] = &gcc_ubi0_nc_axi_clk.clkr,
4337 	[GCC_UBI0_CORE_CLK] = &gcc_ubi0_core_clk.clkr,
4338 	[GCC_PCIE0_AHB_CLK] = &gcc_pcie0_ahb_clk.clkr,
4339 	[GCC_PCIE0_AUX_CLK] = &gcc_pcie0_aux_clk.clkr,
4340 	[GCC_PCIE0_AXI_M_CLK] = &gcc_pcie0_axi_m_clk.clkr,
4341 	[GCC_PCIE0_AXI_S_CLK] = &gcc_pcie0_axi_s_clk.clkr,
4342 	[GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
4343 	[GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
4344 	[GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
4345 	[GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
4346 	[GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
4347 	[GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,
4348 	[GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
4349 	[GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
4350 	[GCC_UNIPHY0_AHB_CLK] = &gcc_uniphy0_ahb_clk.clkr,
4351 	[GCC_UNIPHY0_PORT1_RX_CLK] = &gcc_uniphy0_port1_rx_clk.clkr,
4352 	[GCC_UNIPHY0_PORT1_TX_CLK] = &gcc_uniphy0_port1_tx_clk.clkr,
4353 	[GCC_UNIPHY0_PORT2_RX_CLK] = &gcc_uniphy0_port2_rx_clk.clkr,
4354 	[GCC_UNIPHY0_PORT2_TX_CLK] = &gcc_uniphy0_port2_tx_clk.clkr,
4355 	[GCC_UNIPHY0_PORT3_RX_CLK] = &gcc_uniphy0_port3_rx_clk.clkr,
4356 	[GCC_UNIPHY0_PORT3_TX_CLK] = &gcc_uniphy0_port3_tx_clk.clkr,
4357 	[GCC_UNIPHY0_PORT4_RX_CLK] = &gcc_uniphy0_port4_rx_clk.clkr,
4358 	[GCC_UNIPHY0_PORT4_TX_CLK] = &gcc_uniphy0_port4_tx_clk.clkr,
4359 	[GCC_UNIPHY0_PORT5_RX_CLK] = &gcc_uniphy0_port5_rx_clk.clkr,
4360 	[GCC_UNIPHY0_PORT5_TX_CLK] = &gcc_uniphy0_port5_tx_clk.clkr,
4361 	[GCC_UNIPHY0_SYS_CLK] = &gcc_uniphy0_sys_clk.clkr,
4362 	[GCC_UNIPHY1_AHB_CLK] = &gcc_uniphy1_ahb_clk.clkr,
4363 	[GCC_UNIPHY1_PORT5_RX_CLK] = &gcc_uniphy1_port5_rx_clk.clkr,
4364 	[GCC_UNIPHY1_PORT5_TX_CLK] = &gcc_uniphy1_port5_tx_clk.clkr,
4365 	[GCC_UNIPHY1_SYS_CLK] = &gcc_uniphy1_sys_clk.clkr,
4366 	[GCC_USB0_AUX_CLK] = &gcc_usb0_aux_clk.clkr,
4367 	[GCC_SYS_NOC_USB0_AXI_CLK] = &gcc_sys_noc_usb0_axi_clk.clkr,
4368 	[GCC_SNOC_BUS_TIMEOUT2_AHB_CLK] = &gcc_snoc_bus_timeout2_ahb_clk.clkr,
4369 	[GCC_USB0_MASTER_CLK] = &gcc_usb0_master_clk.clkr,
4370 	[GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr,
4371 	[GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr,
4372 	[GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr,
4373 	[GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr,
4374 	[GCC_USB1_MASTER_CLK] = &gcc_usb1_master_clk.clkr,
4375 	[GCC_USB1_MOCK_UTMI_CLK] = &gcc_usb1_mock_utmi_clk.clkr,
4376 	[GCC_USB1_PHY_CFG_AHB_CLK] = &gcc_usb1_phy_cfg_ahb_clk.clkr,
4377 	[GCC_USB1_SLEEP_CLK] = &gcc_usb1_sleep_clk.clkr,
4378 	[GCC_CMN_12GPLL_AHB_CLK] = &gcc_cmn_12gpll_ahb_clk.clkr,
4379 	[GCC_CMN_12GPLL_SYS_CLK] = &gcc_cmn_12gpll_sys_clk.clkr,
4380 	[GCC_SDCC1_ICE_CORE_CLK] = &gcc_sdcc1_ice_core_clk.clkr,
4381 	[SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr,
4382 	[GCC_DCC_CLK] = &gcc_dcc_clk.clkr,
4383 	[PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
4384 	[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
4385 	[PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
4386 	[WCSS_AHB_CLK_SRC] = &wcss_ahb_clk_src.clkr,
4387 	[Q6_AXI_CLK_SRC] = &q6_axi_clk_src.clkr,
4388 	[RBCPR_WCSS_CLK_SRC] = &rbcpr_wcss_clk_src.clkr,
4389 	[GCC_LPASS_CORE_AXIM_CLK] = &gcc_lpass_core_axim_clk.clkr,
4390 	[LPASS_CORE_AXIM_CLK_SRC] = &lpass_core_axim_clk_src.clkr,
4391 	[GCC_LPASS_SNOC_CFG_CLK] = &gcc_lpass_snoc_cfg_clk.clkr,
4392 	[LPASS_SNOC_CFG_CLK_SRC] = &lpass_snoc_cfg_clk_src.clkr,
4393 	[GCC_LPASS_Q6_AXIM_CLK] = &gcc_lpass_q6_axim_clk.clkr,
4394 	[LPASS_Q6_AXIM_CLK_SRC] = &lpass_q6_axim_clk_src.clkr,
4395 	[GCC_LPASS_Q6_ATBM_AT_CLK] = &gcc_lpass_q6_atbm_at_clk.clkr,
4396 	[GCC_LPASS_Q6_PCLKDBG_CLK] = &gcc_lpass_q6_pclkdbg_clk.clkr,
4397 	[GCC_LPASS_Q6SS_TSCTR_1TO2_CLK] = &gcc_lpass_q6ss_tsctr_1to2_clk.clkr,
4398 	[GCC_LPASS_Q6SS_TRIG_CLK] = &gcc_lpass_q6ss_trig_clk.clkr,
4399 	[GCC_LPASS_TBU_CLK] = &gcc_lpass_tbu_clk.clkr,
4400 	[GCC_PCNOC_LPASS_CLK] = &gcc_pcnoc_lpass_clk.clkr,
4401 	[GCC_MEM_NOC_UBI32_CLK] = &gcc_mem_noc_ubi32_clk.clkr,
4402 	[GCC_MEM_NOC_LPASS_CLK] = &gcc_mem_noc_lpass_clk.clkr,
4403 	[GCC_SNOC_LPASS_CFG_CLK] = &gcc_snoc_lpass_cfg_clk.clkr,
4404 	[QDSS_STM_CLK_SRC] = &qdss_stm_clk_src.clkr,
4405 	[QDSS_TRACECLKIN_CLK_SRC] = &qdss_traceclkin_clk_src.clkr,
4406 };
4407 
4408 static const struct qcom_reset_map gcc_ipq6018_resets[] = {
4409 	[GCC_BLSP1_BCR] = { 0x01000, 0 },
4410 	[GCC_BLSP1_QUP1_BCR] = { 0x02000, 0 },
4411 	[GCC_BLSP1_UART1_BCR] = { 0x02038, 0 },
4412 	[GCC_BLSP1_QUP2_BCR] = { 0x03008, 0 },
4413 	[GCC_BLSP1_UART2_BCR] = { 0x03028, 0 },
4414 	[GCC_BLSP1_QUP3_BCR] = { 0x04008, 0 },
4415 	[GCC_BLSP1_UART3_BCR] = { 0x04028, 0 },
4416 	[GCC_BLSP1_QUP4_BCR] = { 0x05008, 0 },
4417 	[GCC_BLSP1_UART4_BCR] = { 0x05028, 0 },
4418 	[GCC_BLSP1_QUP5_BCR] = { 0x06008, 0 },
4419 	[GCC_BLSP1_UART5_BCR] = { 0x06028, 0 },
4420 	[GCC_BLSP1_QUP6_BCR] = { 0x07008, 0 },
4421 	[GCC_BLSP1_UART6_BCR] = { 0x07028, 0 },
4422 	[GCC_IMEM_BCR] = { 0x0e000, 0 },
4423 	[GCC_SMMU_BCR] = { 0x12000, 0 },
4424 	[GCC_APSS_TCU_BCR] = { 0x12050, 0 },
4425 	[GCC_SMMU_XPU_BCR] = { 0x12054, 0 },
4426 	[GCC_PCNOC_TBU_BCR] = { 0x12058, 0 },
4427 	[GCC_SMMU_CFG_BCR] = { 0x1208c, 0 },
4428 	[GCC_PRNG_BCR] = { 0x13000, 0 },
4429 	[GCC_BOOT_ROM_BCR] = { 0x13008, 0 },
4430 	[GCC_CRYPTO_BCR] = { 0x16000, 0 },
4431 	[GCC_WCSS_BCR] = { 0x18000, 0 },
4432 	[GCC_WCSS_Q6_BCR] = { 0x18100, 0 },
4433 	[GCC_NSS_BCR] = { 0x19000, 0 },
4434 	[GCC_SEC_CTRL_BCR] = { 0x1a000, 0 },
4435 	[GCC_ADSS_BCR] = { 0x1c000, 0 },
4436 	[GCC_DDRSS_BCR] = { 0x1e000, 0 },
4437 	[GCC_SYSTEM_NOC_BCR] = { 0x26000, 0 },
4438 	[GCC_PCNOC_BCR] = { 0x27018, 0 },
4439 	[GCC_TCSR_BCR] = { 0x28000, 0 },
4440 	[GCC_QDSS_BCR] = { 0x29000, 0 },
4441 	[GCC_DCD_BCR] = { 0x2a000, 0 },
4442 	[GCC_MSG_RAM_BCR] = { 0x2b000, 0 },
4443 	[GCC_MPM_BCR] = { 0x2c000, 0 },
4444 	[GCC_SPDM_BCR] = { 0x2f000, 0 },
4445 	[GCC_RBCPR_BCR] = { 0x33000, 0 },
4446 	[GCC_RBCPR_MX_BCR] = { 0x33014, 0 },
4447 	[GCC_TLMM_BCR] = { 0x34000, 0 },
4448 	[GCC_RBCPR_WCSS_BCR] = { 0x3a000, 0 },
4449 	[GCC_USB0_PHY_BCR] = { 0x3e034, 0 },
4450 	[GCC_USB3PHY_0_PHY_BCR] = { 0x3e03c, 0 },
4451 	[GCC_USB0_BCR] = { 0x3e070, 0 },
4452 	[GCC_USB1_BCR] = { 0x3f070, 0 },
4453 	[GCC_QUSB2_0_PHY_BCR] = { 0x4103c, 0 },
4454 	[GCC_QUSB2_1_PHY_BCR] = { 0x41040, 0 },
4455 	[GCC_SDCC1_BCR] = { 0x42000, 0 },
4456 	[GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x47000, 0 },
4457 	[GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x47008, 0 },
4458 	[GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x47010, 0 },
4459 	[GCC_PCNOC_BUS_TIMEOUT0_BCR] = { 0x48000, 0 },
4460 	[GCC_PCNOC_BUS_TIMEOUT1_BCR] = { 0x48008, 0 },
4461 	[GCC_PCNOC_BUS_TIMEOUT2_BCR] = { 0x48010, 0 },
4462 	[GCC_PCNOC_BUS_TIMEOUT3_BCR] = { 0x48018, 0 },
4463 	[GCC_PCNOC_BUS_TIMEOUT4_BCR] = { 0x48020, 0 },
4464 	[GCC_PCNOC_BUS_TIMEOUT5_BCR] = { 0x48028, 0 },
4465 	[GCC_PCNOC_BUS_TIMEOUT6_BCR] = { 0x48030, 0 },
4466 	[GCC_PCNOC_BUS_TIMEOUT7_BCR] = { 0x48038, 0 },
4467 	[GCC_PCNOC_BUS_TIMEOUT8_BCR] = { 0x48040, 0 },
4468 	[GCC_PCNOC_BUS_TIMEOUT9_BCR] = { 0x48048, 0 },
4469 	[GCC_UNIPHY0_BCR] = { 0x56000, 0 },
4470 	[GCC_UNIPHY1_BCR] = { 0x56100, 0 },
4471 	[GCC_CMN_12GPLL_BCR] = { 0x56300, 0 },
4472 	[GCC_QPIC_BCR] = { 0x57018, 0 },
4473 	[GCC_MDIO_BCR] = { 0x58000, 0 },
4474 	[GCC_WCSS_CORE_TBU_BCR] = { 0x66000, 0 },
4475 	[GCC_WCSS_Q6_TBU_BCR] = { 0x67000, 0 },
4476 	[GCC_USB0_TBU_BCR] = { 0x6a000, 0 },
4477 	[GCC_PCIE0_TBU_BCR] = { 0x6b000, 0 },
4478 	[GCC_NSS_NOC_TBU_BCR] = { 0x6e000, 0 },
4479 	[GCC_PCIE0_BCR] = { 0x75004, 0 },
4480 	[GCC_PCIE0_PHY_BCR] = { 0x75038, 0 },
4481 	[GCC_PCIE0PHY_PHY_BCR] = { 0x7503c, 0 },
4482 	[GCC_PCIE0_LINK_DOWN_BCR] = { 0x75044, 0 },
4483 	[GCC_DCC_BCR] = { 0x77000, 0 },
4484 	[GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR] = { 0x78000, 0 },
4485 	[GCC_SMMU_CATS_BCR] = { 0x7c000, 0 },
4486 	[GCC_UBI0_AXI_ARES] = { 0x68010, 0 },
4487 	[GCC_UBI0_AHB_ARES] = { 0x68010, 1 },
4488 	[GCC_UBI0_NC_AXI_ARES] = { 0x68010, 2 },
4489 	[GCC_UBI0_DBG_ARES] = { 0x68010, 3 },
4490 	[GCC_UBI0_CORE_CLAMP_ENABLE] = { 0x68010, 4 },
4491 	[GCC_UBI0_CLKRST_CLAMP_ENABLE] = { 0x68010, 5 },
4492 	[GCC_UBI0_UTCM_ARES] = { 0x68010, 6 },
4493 	[GCC_UBI0_CORE_ARES] = { 0x68010, 7 },
4494 	[GCC_NSS_CFG_ARES] = { 0x68010, 16 },
4495 	[GCC_NSS_NOC_ARES] = { 0x68010, 18 },
4496 	[GCC_NSS_CRYPTO_ARES] = { 0x68010, 19 },
4497 	[GCC_NSS_CSR_ARES] = { 0x68010, 20 },
4498 	[GCC_NSS_CE_APB_ARES] = { 0x68010, 21 },
4499 	[GCC_NSS_CE_AXI_ARES] = { 0x68010, 22 },
4500 	[GCC_NSSNOC_CE_APB_ARES] = { 0x68010, 23 },
4501 	[GCC_NSSNOC_CE_AXI_ARES] = { 0x68010, 24 },
4502 	[GCC_NSSNOC_UBI0_AHB_ARES] = { 0x68010, 25 },
4503 	[GCC_NSSNOC_SNOC_ARES] = { 0x68010, 27 },
4504 	[GCC_NSSNOC_CRYPTO_ARES] = { 0x68010, 28 },
4505 	[GCC_NSSNOC_ATB_ARES] = { 0x68010, 29 },
4506 	[GCC_NSSNOC_QOSGEN_REF_ARES] = { 0x68010, 30 },
4507 	[GCC_NSSNOC_TIMEOUT_REF_ARES] = { 0x68010, 31 },
4508 	[GCC_PCIE0_PIPE_ARES] = { 0x75040, 0 },
4509 	[GCC_PCIE0_SLEEP_ARES] = { 0x75040, 1 },
4510 	[GCC_PCIE0_CORE_STICKY_ARES] = { 0x75040, 2 },
4511 	[GCC_PCIE0_AXI_MASTER_ARES] = { 0x75040, 3 },
4512 	[GCC_PCIE0_AXI_SLAVE_ARES] = { 0x75040, 4 },
4513 	[GCC_PCIE0_AHB_ARES] = { 0x75040, 5 },
4514 	[GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 },
4515 	[GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 },
4516 	[GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = 0xf0000 },
4517 	[GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = 0x3ff2 },
4518 	[GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
4519 	[GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = 0x32 },
4520 	[GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
4521 	[GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = 0x300000 },
4522 	[GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = 0x1000003 },
4523 	[GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = 0x200000c },
4524 	[GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = 0x4000030 },
4525 	[GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = 0x8000300 },
4526 	[GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = 0x10000c00 },
4527 	[GCC_UNIPHY0_PORT1_ARES] = { .reg = 0x56004, .bitmask = 0x30 },
4528 	[GCC_UNIPHY0_PORT2_ARES] = { .reg = 0x56004, .bitmask = 0xc0 },
4529 	[GCC_UNIPHY0_PORT3_ARES] = { .reg = 0x56004, .bitmask = 0x300 },
4530 	[GCC_UNIPHY0_PORT4_ARES] = { .reg = 0x56004, .bitmask = 0xc00 },
4531 	[GCC_UNIPHY0_PORT5_ARES] = { .reg = 0x56004, .bitmask = 0x3000 },
4532 	[GCC_UNIPHY0_PORT_4_5_RESET] = { .reg = 0x56004, .bitmask = 0x3c02 },
4533 	[GCC_UNIPHY0_PORT_4_RESET] = { .reg = 0x56004, .bitmask = 0xc02 },
4534 	[GCC_LPASS_BCR] = {0x1F000, 0},
4535 	[GCC_UBI32_TBU_BCR] = {0x65000, 0},
4536 	[GCC_LPASS_TBU_BCR] = {0x6C000, 0},
4537 	[GCC_WCSSAON_RESET] = {0x59010, 0},
4538 	[GCC_LPASS_Q6_AXIM_ARES] = {0x1F004, 0},
4539 	[GCC_LPASS_Q6SS_TSCTR_1TO2_ARES] = {0x1F004, 1},
4540 	[GCC_LPASS_Q6SS_TRIG_ARES] = {0x1F004, 2},
4541 	[GCC_LPASS_Q6_ATBM_AT_ARES] = {0x1F004, 3},
4542 	[GCC_LPASS_Q6_PCLKDBG_ARES] = {0x1F004, 4},
4543 	[GCC_LPASS_CORE_AXIM_ARES] = {0x1F004, 5},
4544 	[GCC_LPASS_SNOC_CFG_ARES] = {0x1F004, 6},
4545 	[GCC_WCSS_DBG_ARES] = {0x59008, 0},
4546 	[GCC_WCSS_ECAHB_ARES] = {0x59008, 1},
4547 	[GCC_WCSS_ACMT_ARES] = {0x59008, 2},
4548 	[GCC_WCSS_DBG_BDG_ARES] = {0x59008, 3},
4549 	[GCC_WCSS_AHB_S_ARES] = {0x59008, 4},
4550 	[GCC_WCSS_AXI_M_ARES] = {0x59008, 5},
4551 	[GCC_Q6SS_DBG_ARES] = {0x59110, 0},
4552 	[GCC_Q6_AHB_S_ARES] = {0x59110, 1},
4553 	[GCC_Q6_AHB_ARES] = {0x59110, 2},
4554 	[GCC_Q6_AXIM2_ARES] = {0x59110, 3},
4555 	[GCC_Q6_AXIM_ARES] = {0x59110, 4},
4556 };
4557 
4558 static const struct of_device_id gcc_ipq6018_match_table[] = {
4559 	{ .compatible = "qcom,gcc-ipq6018" },
4560 	{ }
4561 };
4562 MODULE_DEVICE_TABLE(of, gcc_ipq6018_match_table);
4563 
4564 static const struct regmap_config gcc_ipq6018_regmap_config = {
4565 	.reg_bits       = 32,
4566 	.reg_stride     = 4,
4567 	.val_bits       = 32,
4568 	.max_register   = 0x7fffc,
4569 	.fast_io	= true,
4570 };
4571 
4572 static const struct qcom_cc_desc gcc_ipq6018_desc = {
4573 	.config = &gcc_ipq6018_regmap_config,
4574 	.clks = gcc_ipq6018_clks,
4575 	.num_clks = ARRAY_SIZE(gcc_ipq6018_clks),
4576 	.resets = gcc_ipq6018_resets,
4577 	.num_resets = ARRAY_SIZE(gcc_ipq6018_resets),
4578 	.clk_hws = gcc_ipq6018_hws,
4579 	.num_clk_hws = ARRAY_SIZE(gcc_ipq6018_hws),
4580 };
4581 
gcc_ipq6018_probe(struct platform_device * pdev)4582 static int gcc_ipq6018_probe(struct platform_device *pdev)
4583 {
4584 	struct regmap *regmap;
4585 
4586 	regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);
4587 	if (IS_ERR(regmap))
4588 		return PTR_ERR(regmap);
4589 
4590 	/* Disable SW_COLLAPSE for USB0 GDSCR */
4591 	regmap_update_bits(regmap, 0x3e078, BIT(0), 0x0);
4592 	/* Enable SW_OVERRIDE for USB0 GDSCR */
4593 	regmap_update_bits(regmap, 0x3e078, BIT(2), BIT(2));
4594 	/* Disable SW_COLLAPSE for USB1 GDSCR */
4595 	regmap_update_bits(regmap, 0x3f078, BIT(0), 0x0);
4596 	/* Enable SW_OVERRIDE for USB1 GDSCR */
4597 	regmap_update_bits(regmap, 0x3f078, BIT(2), BIT(2));
4598 
4599 	/* SW Workaround for UBI Huyara PLL */
4600 	regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26));
4601 
4602 	clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
4603 
4604 	clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
4605 				&nss_crypto_pll_config);
4606 
4607 	return qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
4608 }
4609 
4610 static struct platform_driver gcc_ipq6018_driver = {
4611 	.probe = gcc_ipq6018_probe,
4612 	.driver = {
4613 		.name   = "qcom,gcc-ipq6018",
4614 		.of_match_table = gcc_ipq6018_match_table,
4615 	},
4616 };
4617 
gcc_ipq6018_init(void)4618 static int __init gcc_ipq6018_init(void)
4619 {
4620 	return platform_driver_register(&gcc_ipq6018_driver);
4621 }
4622 core_initcall(gcc_ipq6018_init);
4623 
gcc_ipq6018_exit(void)4624 static void __exit gcc_ipq6018_exit(void)
4625 {
4626 	platform_driver_unregister(&gcc_ipq6018_driver);
4627 }
4628 module_exit(gcc_ipq6018_exit);
4629 
4630 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ6018 Driver");
4631 MODULE_LICENSE("GPL v2");
4632