xref: /openbmc/linux/drivers/clk/qcom/gcc-ipq6018.c (revision 54d8c1d3)
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 static const struct clk_parent_data gcc_xo_gpll0_core_pi_sleep_clk[] = {
1560 	{ .fw_name = "xo" },
1561 	{ .hw = &gpll0.clkr.hw },
1562 	{ .fw_name = "sleep_clk" },
1563 };
1564 
1565 static const struct parent_map gcc_xo_gpll0_core_pi_sleep_clk_map[] = {
1566 	{ P_XO, 0 },
1567 	{ P_GPLL0, 2 },
1568 	{ P_PI_SLEEP, 6 },
1569 };
1570 
1571 static struct clk_rcg2 pcie0_aux_clk_src = {
1572 	.cmd_rcgr = 0x75024,
1573 	.freq_tbl = ftbl_pcie_aux_clk_src,
1574 	.mnd_width = 16,
1575 	.hid_width = 5,
1576 	.parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1577 	.clkr.hw.init = &(struct clk_init_data){
1578 		.name = "pcie0_aux_clk_src",
1579 		.parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1580 		.num_parents = 3,
1581 		.ops = &clk_rcg2_ops,
1582 	},
1583 };
1584 
1585 static const struct clk_parent_data gcc_pcie20_phy0_pipe_clk_xo[] = {
1586 	{ .fw_name = "pcie20_phy0_pipe_clk" },
1587 	{ .fw_name = "xo" },
1588 };
1589 
1590 static const struct parent_map gcc_pcie20_phy0_pipe_clk_xo_map[] = {
1591 	{ P_PCIE20_PHY0_PIPE, 0 },
1592 	{ P_XO, 2 },
1593 };
1594 
1595 static struct clk_regmap_mux pcie0_pipe_clk_src = {
1596 	.reg = 0x7501c,
1597 	.shift = 8,
1598 	.width = 2,
1599 	.parent_map = gcc_pcie20_phy0_pipe_clk_xo_map,
1600 	.clkr = {
1601 		.hw.init = &(struct clk_init_data){
1602 			.name = "pcie0_pipe_clk_src",
1603 			.parent_data = gcc_pcie20_phy0_pipe_clk_xo,
1604 			.num_parents = 2,
1605 			.ops = &clk_regmap_mux_closest_ops,
1606 			.flags = CLK_SET_RATE_PARENT,
1607 		},
1608 	},
1609 };
1610 
1611 static const struct freq_tbl ftbl_sdcc_apps_clk_src[] = {
1612 	F(144000, P_XO, 16, 12, 125),
1613 	F(400000, P_XO, 12, 1, 5),
1614 	F(24000000, P_GPLL2, 12, 1, 4),
1615 	F(48000000, P_GPLL2, 12, 1, 2),
1616 	F(96000000, P_GPLL2, 12, 0, 0),
1617 	F(177777778, P_GPLL0, 4.5, 0, 0),
1618 	F(192000000, P_GPLL2, 6, 0, 0),
1619 	F(384000000, P_GPLL2, 3, 0, 0),
1620 	{ }
1621 };
1622 
1623 static const struct clk_parent_data
1624 			gcc_xo_gpll0_gpll2_gpll0_out_main_div2[] = {
1625 	{ .fw_name = "xo" },
1626 	{ .hw = &gpll0.clkr.hw },
1627 	{ .hw = &gpll2.clkr.hw },
1628 	{ .hw = &gpll0_out_main_div2.hw },
1629 };
1630 
1631 static const struct parent_map gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map[] = {
1632 	{ P_XO, 0 },
1633 	{ P_GPLL0, 1 },
1634 	{ P_GPLL2, 2 },
1635 	{ P_GPLL0_DIV2, 4 },
1636 };
1637 
1638 static struct clk_rcg2 sdcc1_apps_clk_src = {
1639 	.cmd_rcgr = 0x42004,
1640 	.freq_tbl = ftbl_sdcc_apps_clk_src,
1641 	.mnd_width = 8,
1642 	.hid_width = 5,
1643 	.parent_map = gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map,
1644 	.clkr.hw.init = &(struct clk_init_data){
1645 		.name = "sdcc1_apps_clk_src",
1646 		.parent_data = gcc_xo_gpll0_gpll2_gpll0_out_main_div2,
1647 		.num_parents = 4,
1648 		.ops = &clk_rcg2_floor_ops,
1649 	},
1650 };
1651 
1652 static const struct freq_tbl ftbl_usb_aux_clk_src[] = {
1653 	F(24000000, P_XO, 1, 0, 0),
1654 	{ }
1655 };
1656 
1657 static struct clk_rcg2 usb0_aux_clk_src = {
1658 	.cmd_rcgr = 0x3e05c,
1659 	.freq_tbl = ftbl_usb_aux_clk_src,
1660 	.mnd_width = 16,
1661 	.hid_width = 5,
1662 	.parent_map = gcc_xo_gpll0_core_pi_sleep_clk_map,
1663 	.clkr.hw.init = &(struct clk_init_data){
1664 		.name = "usb0_aux_clk_src",
1665 		.parent_data = gcc_xo_gpll0_core_pi_sleep_clk,
1666 		.num_parents = 3,
1667 		.ops = &clk_rcg2_ops,
1668 	},
1669 };
1670 
1671 static const struct freq_tbl ftbl_usb_mock_utmi_clk_src[] = {
1672 	F(24000000, P_XO, 1, 0, 0),
1673 	F(60000000, P_GPLL6, 6, 1, 3),
1674 	{ }
1675 };
1676 
1677 static const struct clk_parent_data
1678 			gcc_xo_gpll6_gpll0_gpll0_out_main_div2[] = {
1679 	{ .fw_name = "xo" },
1680 	{ .hw = &gpll6.clkr.hw },
1681 	{ .hw = &gpll0.clkr.hw },
1682 	{ .hw = &gpll0_out_main_div2.hw },
1683 };
1684 
1685 static const struct parent_map gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map[] = {
1686 	{ P_XO, 0 },
1687 	{ P_GPLL6, 1 },
1688 	{ P_GPLL0, 3 },
1689 	{ P_GPLL0_DIV2, 4 },
1690 };
1691 
1692 static struct clk_rcg2 usb0_mock_utmi_clk_src = {
1693 	.cmd_rcgr = 0x3e020,
1694 	.freq_tbl = ftbl_usb_mock_utmi_clk_src,
1695 	.mnd_width = 8,
1696 	.hid_width = 5,
1697 	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1698 	.clkr.hw.init = &(struct clk_init_data){
1699 		.name = "usb0_mock_utmi_clk_src",
1700 		.parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1701 		.num_parents = 4,
1702 		.ops = &clk_rcg2_ops,
1703 	},
1704 };
1705 
1706 static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
1707 	{ .fw_name = "usb3phy_0_cc_pipe_clk" },
1708 	{ .fw_name = "xo" },
1709 };
1710 
1711 static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] = {
1712 	{ P_USB3PHY_0_PIPE, 0 },
1713 	{ P_XO, 2 },
1714 };
1715 
1716 static struct clk_regmap_mux usb0_pipe_clk_src = {
1717 	.reg = 0x3e048,
1718 	.shift = 8,
1719 	.width = 2,
1720 	.parent_map = gcc_usb3phy_0_cc_pipe_clk_xo_map,
1721 	.clkr = {
1722 		.hw.init = &(struct clk_init_data){
1723 			.name = "usb0_pipe_clk_src",
1724 			.parent_data = gcc_usb3phy_0_cc_pipe_clk_xo,
1725 			.num_parents = 2,
1726 			.ops = &clk_regmap_mux_closest_ops,
1727 			.flags = CLK_SET_RATE_PARENT,
1728 		},
1729 	},
1730 };
1731 
1732 static const struct freq_tbl ftbl_sdcc_ice_core_clk_src[] = {
1733 	F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1734 	F(160000000, P_GPLL0, 5, 0, 0),
1735 	F(216000000, P_GPLL6, 5, 0, 0),
1736 	F(308570000, P_GPLL6, 3.5, 0, 0),
1737 };
1738 
1739 static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_div2[] = {
1740 	{ .fw_name = "xo"},
1741 	{ .hw = &gpll0.clkr.hw },
1742 	{ .hw = &gpll6.clkr.hw },
1743 	{ .hw = &gpll0_out_main_div2.hw },
1744 };
1745 
1746 static const struct parent_map gcc_xo_gpll0_gpll6_gpll0_div2_map[] = {
1747 	{ P_XO, 0 },
1748 	{ P_GPLL0, 1 },
1749 	{ P_GPLL6, 2 },
1750 	{ P_GPLL0_DIV2, 4 },
1751 };
1752 
1753 static struct clk_rcg2 sdcc1_ice_core_clk_src = {
1754 	.cmd_rcgr = 0x5d000,
1755 	.freq_tbl = ftbl_sdcc_ice_core_clk_src,
1756 	.mnd_width = 8,
1757 	.hid_width = 5,
1758 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_div2_map,
1759 	.clkr.hw.init = &(struct clk_init_data){
1760 		.name = "sdcc1_ice_core_clk_src",
1761 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_div2,
1762 		.num_parents = 4,
1763 		.ops = &clk_rcg2_ops,
1764 	},
1765 };
1766 
1767 static const struct freq_tbl ftbl_qdss_stm_clk_src[] = {
1768 	F(24000000, P_XO, 1, 0, 0),
1769 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1770 	F(100000000, P_GPLL0, 8, 0, 0),
1771 	F(200000000, P_GPLL0, 4, 0, 0),
1772 	{ }
1773 };
1774 
1775 static struct clk_rcg2 qdss_stm_clk_src = {
1776 	.cmd_rcgr = 0x2902C,
1777 	.freq_tbl = ftbl_qdss_stm_clk_src,
1778 	.hid_width = 5,
1779 	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
1780 	.clkr.hw.init = &(struct clk_init_data){
1781 		.name = "qdss_stm_clk_src",
1782 		.parent_data = gcc_xo_gpll0_gpll0_out_main_div2,
1783 		.num_parents = 3,
1784 		.ops = &clk_rcg2_ops,
1785 	},
1786 };
1787 
1788 static const struct freq_tbl ftbl_qdss_traceclkin_clk_src[] = {
1789 	F(80000000, P_GPLL0_DIV2, 5, 0, 0),
1790 	F(160000000, P_GPLL0, 5, 0, 0),
1791 	F(300000000, P_GPLL4, 4, 0, 0),
1792 	{ }
1793 };
1794 
1795 static const struct clk_parent_data gcc_xo_gpll4_gpll0_gpll0_div2[] = {
1796 	{ .fw_name = "xo" },
1797 	{ .hw = &gpll4.clkr.hw },
1798 	{ .hw = &gpll0.clkr.hw },
1799 	{ .hw = &gpll0_out_main_div2.hw },
1800 };
1801 
1802 static const struct parent_map gcc_xo_gpll4_gpll0_gpll0_div2_map[] = {
1803 	{ P_XO, 0 },
1804 	{ P_GPLL4, 1 },
1805 	{ P_GPLL0, 2 },
1806 	{ P_GPLL0_DIV2, 4 },
1807 };
1808 
1809 static struct clk_rcg2 qdss_traceclkin_clk_src = {
1810 	.cmd_rcgr = 0x29048,
1811 	.freq_tbl = ftbl_qdss_traceclkin_clk_src,
1812 	.hid_width = 5,
1813 	.parent_map = gcc_xo_gpll4_gpll0_gpll0_div2_map,
1814 	.clkr.hw.init = &(struct clk_init_data){
1815 		.name = "qdss_traceclkin_clk_src",
1816 		.parent_data = gcc_xo_gpll4_gpll0_gpll0_div2,
1817 		.num_parents = 4,
1818 		.ops = &clk_rcg2_ops,
1819 	},
1820 };
1821 
1822 static struct clk_rcg2 usb1_mock_utmi_clk_src = {
1823 	.cmd_rcgr = 0x3f020,
1824 	.freq_tbl = ftbl_usb_mock_utmi_clk_src,
1825 	.mnd_width = 8,
1826 	.hid_width = 5,
1827 	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
1828 	.clkr.hw.init = &(struct clk_init_data){
1829 		.name = "usb1_mock_utmi_clk_src",
1830 		.parent_data = gcc_xo_gpll6_gpll0_gpll0_out_main_div2,
1831 		.num_parents = 4,
1832 		.ops = &clk_rcg2_ops,
1833 	},
1834 };
1835 
1836 static struct clk_branch gcc_adss_pwm_clk = {
1837 	.halt_reg = 0x1c020,
1838 	.clkr = {
1839 		.enable_reg = 0x1c020,
1840 		.enable_mask = BIT(0),
1841 		.hw.init = &(struct clk_init_data){
1842 			.name = "gcc_adss_pwm_clk",
1843 			.parent_hws = (const struct clk_hw *[]){
1844 					&adss_pwm_clk_src.clkr.hw },
1845 			.num_parents = 1,
1846 			.flags = CLK_SET_RATE_PARENT,
1847 			.ops = &clk_branch2_ops,
1848 		},
1849 	},
1850 };
1851 
1852 static struct clk_branch gcc_apss_ahb_clk = {
1853 	.halt_reg = 0x4601c,
1854 	.halt_check = BRANCH_HALT_VOTED,
1855 	.clkr = {
1856 		.enable_reg = 0x0b004,
1857 		.enable_mask = BIT(14),
1858 		.hw.init = &(struct clk_init_data){
1859 			.name = "gcc_apss_ahb_clk",
1860 			.parent_hws = (const struct clk_hw *[]){
1861 					&apss_ahb_postdiv_clk_src.clkr.hw },
1862 			.num_parents = 1,
1863 			.flags = CLK_SET_RATE_PARENT,
1864 			.ops = &clk_branch2_ops,
1865 		},
1866 	},
1867 };
1868 
1869 static const struct freq_tbl ftbl_system_noc_bfdcd_clk_src[] = {
1870 	F(24000000, P_XO, 1, 0, 0),
1871 	F(50000000, P_GPLL0_DIV2, 8, 0, 0),
1872 	F(100000000, P_GPLL0, 8, 0, 0),
1873 	F(133333333, P_GPLL0, 6, 0, 0),
1874 	F(160000000, P_GPLL0, 5, 0, 0),
1875 	F(200000000, P_GPLL0, 4, 0, 0),
1876 	F(266666667, P_GPLL0, 3, 0, 0),
1877 	{ }
1878 };
1879 
1880 static struct clk_rcg2 system_noc_bfdcd_clk_src = {
1881 	.cmd_rcgr = 0x26004,
1882 	.freq_tbl = ftbl_system_noc_bfdcd_clk_src,
1883 	.hid_width = 5,
1884 	.parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
1885 	.clkr.hw.init = &(struct clk_init_data){
1886 		.name = "system_noc_bfdcd_clk_src",
1887 		.parent_data = gcc_xo_gpll0_gpll6_gpll0_out_main_div2,
1888 		.num_parents = 4,
1889 		.ops = &clk_rcg2_ops,
1890 	},
1891 };
1892 
1893 static const struct freq_tbl ftbl_ubi32_mem_noc_bfdcd_clk_src[] = {
1894 	F(24000000, P_XO, 1, 0, 0),
1895 	F(307670000, P_BIAS_PLL_NSS_NOC, 1.5, 0, 0),
1896 	F(533333333, P_GPLL0, 1.5, 0, 0),
1897 	{ }
1898 };
1899 
1900 static const struct clk_parent_data
1901 			gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk[] = {
1902 	{ .fw_name = "xo" },
1903 	{ .hw = &gpll0.clkr.hw },
1904 	{ .hw = &gpll2.clkr.hw },
1905 	{ .fw_name = "bias_pll_nss_noc_clk" },
1906 };
1907 
1908 static const struct parent_map gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map[] = {
1909 	{ P_XO, 0 },
1910 	{ P_GPLL0, 1 },
1911 	{ P_GPLL2, 3 },
1912 	{ P_BIAS_PLL_NSS_NOC, 4 },
1913 };
1914 
1915 static struct clk_rcg2 ubi32_mem_noc_bfdcd_clk_src = {
1916 	.cmd_rcgr = 0x68088,
1917 	.freq_tbl = ftbl_ubi32_mem_noc_bfdcd_clk_src,
1918 	.hid_width = 5,
1919 	.parent_map = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map,
1920 	.clkr.hw.init = &(struct clk_init_data){
1921 		.name = "ubi32_mem_noc_bfdcd_clk_src",
1922 		.parent_data = gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk,
1923 		.num_parents = 4,
1924 		.ops = &clk_rcg2_ops,
1925 	},
1926 };
1927 
1928 static struct clk_branch gcc_apss_axi_clk = {
1929 	.halt_reg = 0x46020,
1930 	.halt_check = BRANCH_HALT_VOTED,
1931 	.clkr = {
1932 		.enable_reg = 0x0b004,
1933 		.enable_mask = BIT(13),
1934 		.hw.init = &(struct clk_init_data){
1935 			.name = "gcc_apss_axi_clk",
1936 			.parent_hws = (const struct clk_hw *[]){
1937 					&apss_axi_clk_src.clkr.hw },
1938 			.num_parents = 1,
1939 			.flags = CLK_SET_RATE_PARENT,
1940 			.ops = &clk_branch2_ops,
1941 		},
1942 	},
1943 };
1944 
1945 static struct clk_branch gcc_blsp1_ahb_clk = {
1946 	.halt_reg = 0x01008,
1947 	.halt_check = BRANCH_HALT_VOTED,
1948 	.clkr = {
1949 		.enable_reg = 0x0b004,
1950 		.enable_mask = BIT(10),
1951 		.hw.init = &(struct clk_init_data){
1952 			.name = "gcc_blsp1_ahb_clk",
1953 			.parent_hws = (const struct clk_hw *[]){
1954 					&pcnoc_bfdcd_clk_src.clkr.hw },
1955 			.num_parents = 1,
1956 			.flags = CLK_SET_RATE_PARENT,
1957 			.ops = &clk_branch2_ops,
1958 		},
1959 	},
1960 };
1961 
1962 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk = {
1963 	.halt_reg = 0x02008,
1964 	.clkr = {
1965 		.enable_reg = 0x02008,
1966 		.enable_mask = BIT(0),
1967 		.hw.init = &(struct clk_init_data){
1968 			.name = "gcc_blsp1_qup1_i2c_apps_clk",
1969 			.parent_hws = (const struct clk_hw *[]){
1970 					&blsp1_qup1_i2c_apps_clk_src.clkr.hw },
1971 			.num_parents = 1,
1972 			.flags = CLK_SET_RATE_PARENT,
1973 			.ops = &clk_branch2_ops,
1974 		},
1975 	},
1976 };
1977 
1978 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk = {
1979 	.halt_reg = 0x02004,
1980 	.clkr = {
1981 		.enable_reg = 0x02004,
1982 		.enable_mask = BIT(0),
1983 		.hw.init = &(struct clk_init_data){
1984 			.name = "gcc_blsp1_qup1_spi_apps_clk",
1985 			.parent_hws = (const struct clk_hw *[]){
1986 					&blsp1_qup1_spi_apps_clk_src.clkr.hw },
1987 			.num_parents = 1,
1988 			.flags = CLK_SET_RATE_PARENT,
1989 			.ops = &clk_branch2_ops,
1990 		},
1991 	},
1992 };
1993 
1994 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk = {
1995 	.halt_reg = 0x03010,
1996 	.clkr = {
1997 		.enable_reg = 0x03010,
1998 		.enable_mask = BIT(0),
1999 		.hw.init = &(struct clk_init_data){
2000 			.name = "gcc_blsp1_qup2_i2c_apps_clk",
2001 			.parent_hws = (const struct clk_hw *[]){
2002 					&blsp1_qup2_i2c_apps_clk_src.clkr.hw },
2003 			.num_parents = 1,
2004 			.flags = CLK_SET_RATE_PARENT,
2005 			.ops = &clk_branch2_ops,
2006 		},
2007 	},
2008 };
2009 
2010 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
2011 	.halt_reg = 0x0300c,
2012 	.clkr = {
2013 		.enable_reg = 0x0300c,
2014 		.enable_mask = BIT(0),
2015 		.hw.init = &(struct clk_init_data){
2016 			.name = "gcc_blsp1_qup2_spi_apps_clk",
2017 			.parent_hws = (const struct clk_hw *[]){
2018 					&blsp1_qup2_spi_apps_clk_src.clkr.hw },
2019 			.num_parents = 1,
2020 			.flags = CLK_SET_RATE_PARENT,
2021 			.ops = &clk_branch2_ops,
2022 		},
2023 	},
2024 };
2025 
2026 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk = {
2027 	.halt_reg = 0x04010,
2028 	.clkr = {
2029 		.enable_reg = 0x04010,
2030 		.enable_mask = BIT(0),
2031 		.hw.init = &(struct clk_init_data){
2032 			.name = "gcc_blsp1_qup3_i2c_apps_clk",
2033 			.parent_hws = (const struct clk_hw *[]){
2034 					&blsp1_qup3_i2c_apps_clk_src.clkr.hw },
2035 			.num_parents = 1,
2036 			.flags = CLK_SET_RATE_PARENT,
2037 			.ops = &clk_branch2_ops,
2038 		},
2039 	},
2040 };
2041 
2042 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk = {
2043 	.halt_reg = 0x0400c,
2044 	.clkr = {
2045 		.enable_reg = 0x0400c,
2046 		.enable_mask = BIT(0),
2047 		.hw.init = &(struct clk_init_data){
2048 			.name = "gcc_blsp1_qup3_spi_apps_clk",
2049 			.parent_hws = (const struct clk_hw *[]){
2050 					&blsp1_qup3_spi_apps_clk_src.clkr.hw },
2051 			.num_parents = 1,
2052 			.flags = CLK_SET_RATE_PARENT,
2053 			.ops = &clk_branch2_ops,
2054 		},
2055 	},
2056 };
2057 
2058 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk = {
2059 	.halt_reg = 0x05010,
2060 	.clkr = {
2061 		.enable_reg = 0x05010,
2062 		.enable_mask = BIT(0),
2063 		.hw.init = &(struct clk_init_data){
2064 			.name = "gcc_blsp1_qup4_i2c_apps_clk",
2065 			.parent_hws = (const struct clk_hw *[]){
2066 					&blsp1_qup4_i2c_apps_clk_src.clkr.hw },
2067 			.num_parents = 1,
2068 			.flags = CLK_SET_RATE_PARENT,
2069 			.ops = &clk_branch2_ops,
2070 		},
2071 	},
2072 };
2073 
2074 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk = {
2075 	.halt_reg = 0x0500c,
2076 	.clkr = {
2077 		.enable_reg = 0x0500c,
2078 		.enable_mask = BIT(0),
2079 		.hw.init = &(struct clk_init_data){
2080 			.name = "gcc_blsp1_qup4_spi_apps_clk",
2081 			.parent_hws = (const struct clk_hw *[]){
2082 					&blsp1_qup4_spi_apps_clk_src.clkr.hw },
2083 			.num_parents = 1,
2084 			.flags = CLK_SET_RATE_PARENT,
2085 			.ops = &clk_branch2_ops,
2086 		},
2087 	},
2088 };
2089 
2090 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk = {
2091 	.halt_reg = 0x06010,
2092 	.clkr = {
2093 		.enable_reg = 0x06010,
2094 		.enable_mask = BIT(0),
2095 		.hw.init = &(struct clk_init_data){
2096 			.name = "gcc_blsp1_qup5_i2c_apps_clk",
2097 			.parent_hws = (const struct clk_hw *[]){
2098 					&blsp1_qup5_i2c_apps_clk_src.clkr.hw },
2099 			.num_parents = 1,
2100 			.flags = CLK_SET_RATE_PARENT,
2101 			.ops = &clk_branch2_ops,
2102 		},
2103 	},
2104 };
2105 
2106 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk = {
2107 	.halt_reg = 0x0600c,
2108 	.clkr = {
2109 		.enable_reg = 0x0600c,
2110 		.enable_mask = BIT(0),
2111 		.hw.init = &(struct clk_init_data){
2112 			.name = "gcc_blsp1_qup5_spi_apps_clk",
2113 			.parent_hws = (const struct clk_hw *[]){
2114 					&blsp1_qup5_spi_apps_clk_src.clkr.hw },
2115 			.num_parents = 1,
2116 			.flags = CLK_SET_RATE_PARENT,
2117 			.ops = &clk_branch2_ops,
2118 		},
2119 	},
2120 };
2121 
2122 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
2123 	.halt_reg = 0x0700c,
2124 	.clkr = {
2125 		.enable_reg = 0x0700c,
2126 		.enable_mask = BIT(0),
2127 		.hw.init = &(struct clk_init_data){
2128 			.name = "gcc_blsp1_qup6_spi_apps_clk",
2129 			.parent_hws = (const struct clk_hw *[]){
2130 					&blsp1_qup6_spi_apps_clk_src.clkr.hw },
2131 			.num_parents = 1,
2132 			.flags = CLK_SET_RATE_PARENT,
2133 			.ops = &clk_branch2_ops,
2134 		},
2135 	},
2136 };
2137 
2138 static struct clk_branch gcc_blsp1_uart1_apps_clk = {
2139 	.halt_reg = 0x0203c,
2140 	.clkr = {
2141 		.enable_reg = 0x0203c,
2142 		.enable_mask = BIT(0),
2143 		.hw.init = &(struct clk_init_data){
2144 			.name = "gcc_blsp1_uart1_apps_clk",
2145 			.parent_hws = (const struct clk_hw *[]){
2146 					&blsp1_uart1_apps_clk_src.clkr.hw },
2147 			.num_parents = 1,
2148 			.flags = CLK_SET_RATE_PARENT,
2149 			.ops = &clk_branch2_ops,
2150 		},
2151 	},
2152 };
2153 
2154 static struct clk_branch gcc_blsp1_uart2_apps_clk = {
2155 	.halt_reg = 0x0302c,
2156 	.clkr = {
2157 		.enable_reg = 0x0302c,
2158 		.enable_mask = BIT(0),
2159 		.hw.init = &(struct clk_init_data){
2160 			.name = "gcc_blsp1_uart2_apps_clk",
2161 			.parent_hws = (const struct clk_hw *[]){
2162 					&blsp1_uart2_apps_clk_src.clkr.hw },
2163 			.num_parents = 1,
2164 			.flags = CLK_SET_RATE_PARENT,
2165 			.ops = &clk_branch2_ops,
2166 		},
2167 	},
2168 };
2169 
2170 static struct clk_branch gcc_blsp1_uart3_apps_clk = {
2171 	.halt_reg = 0x0402c,
2172 	.clkr = {
2173 		.enable_reg = 0x0402c,
2174 		.enable_mask = BIT(0),
2175 		.hw.init = &(struct clk_init_data){
2176 			.name = "gcc_blsp1_uart3_apps_clk",
2177 			.parent_hws = (const struct clk_hw *[]){
2178 					&blsp1_uart3_apps_clk_src.clkr.hw },
2179 			.num_parents = 1,
2180 			.flags = CLK_SET_RATE_PARENT,
2181 			.ops = &clk_branch2_ops,
2182 		},
2183 	},
2184 };
2185 
2186 static struct clk_branch gcc_blsp1_uart4_apps_clk = {
2187 	.halt_reg = 0x0502c,
2188 	.clkr = {
2189 		.enable_reg = 0x0502c,
2190 		.enable_mask = BIT(0),
2191 		.hw.init = &(struct clk_init_data){
2192 			.name = "gcc_blsp1_uart4_apps_clk",
2193 			.parent_hws = (const struct clk_hw *[]){
2194 					&blsp1_uart4_apps_clk_src.clkr.hw },
2195 			.num_parents = 1,
2196 			.flags = CLK_SET_RATE_PARENT,
2197 			.ops = &clk_branch2_ops,
2198 		},
2199 	},
2200 };
2201 
2202 static struct clk_branch gcc_blsp1_uart5_apps_clk = {
2203 	.halt_reg = 0x0602c,
2204 	.clkr = {
2205 		.enable_reg = 0x0602c,
2206 		.enable_mask = BIT(0),
2207 		.hw.init = &(struct clk_init_data){
2208 			.name = "gcc_blsp1_uart5_apps_clk",
2209 			.parent_hws = (const struct clk_hw *[]){
2210 					&blsp1_uart5_apps_clk_src.clkr.hw },
2211 			.num_parents = 1,
2212 			.flags = CLK_SET_RATE_PARENT,
2213 			.ops = &clk_branch2_ops,
2214 		},
2215 	},
2216 };
2217 
2218 static struct clk_branch gcc_blsp1_uart6_apps_clk = {
2219 	.halt_reg = 0x0702c,
2220 	.clkr = {
2221 		.enable_reg = 0x0702c,
2222 		.enable_mask = BIT(0),
2223 		.hw.init = &(struct clk_init_data){
2224 			.name = "gcc_blsp1_uart6_apps_clk",
2225 			.parent_hws = (const struct clk_hw *[]){
2226 					&blsp1_uart6_apps_clk_src.clkr.hw },
2227 			.num_parents = 1,
2228 			.flags = CLK_SET_RATE_PARENT,
2229 			.ops = &clk_branch2_ops,
2230 		},
2231 	},
2232 };
2233 
2234 static struct clk_branch gcc_crypto_ahb_clk = {
2235 	.halt_reg = 0x16024,
2236 	.halt_check = BRANCH_HALT_VOTED,
2237 	.clkr = {
2238 		.enable_reg = 0x0b004,
2239 		.enable_mask = BIT(0),
2240 		.hw.init = &(struct clk_init_data){
2241 			.name = "gcc_crypto_ahb_clk",
2242 			.parent_hws = (const struct clk_hw *[]){
2243 					&pcnoc_bfdcd_clk_src.clkr.hw },
2244 			.num_parents = 1,
2245 			.flags = CLK_SET_RATE_PARENT,
2246 			.ops = &clk_branch2_ops,
2247 		},
2248 	},
2249 };
2250 
2251 static struct clk_branch gcc_crypto_axi_clk = {
2252 	.halt_reg = 0x16020,
2253 	.halt_check = BRANCH_HALT_VOTED,
2254 	.clkr = {
2255 		.enable_reg = 0x0b004,
2256 		.enable_mask = BIT(1),
2257 		.hw.init = &(struct clk_init_data){
2258 			.name = "gcc_crypto_axi_clk",
2259 			.parent_hws = (const struct clk_hw *[]){
2260 					&pcnoc_bfdcd_clk_src.clkr.hw },
2261 			.num_parents = 1,
2262 			.flags = CLK_SET_RATE_PARENT,
2263 			.ops = &clk_branch2_ops,
2264 		},
2265 	},
2266 };
2267 
2268 static struct clk_branch gcc_crypto_clk = {
2269 	.halt_reg = 0x1601c,
2270 	.halt_check = BRANCH_HALT_VOTED,
2271 	.clkr = {
2272 		.enable_reg = 0x0b004,
2273 		.enable_mask = BIT(2),
2274 		.hw.init = &(struct clk_init_data){
2275 			.name = "gcc_crypto_clk",
2276 			.parent_hws = (const struct clk_hw *[]){
2277 					&crypto_clk_src.clkr.hw },
2278 			.num_parents = 1,
2279 			.flags = CLK_SET_RATE_PARENT,
2280 			.ops = &clk_branch2_ops,
2281 		},
2282 	},
2283 };
2284 
2285 static struct clk_fixed_factor gpll6_out_main_div2 = {
2286 	.mult = 1,
2287 	.div = 2,
2288 	.hw.init = &(struct clk_init_data){
2289 		.name = "gpll6_out_main_div2",
2290 		.parent_hws = (const struct clk_hw *[]){
2291 				&gpll6_main.clkr.hw },
2292 		.num_parents = 1,
2293 		.ops = &clk_fixed_factor_ops,
2294 		.flags = CLK_SET_RATE_PARENT,
2295 	},
2296 };
2297 
2298 static struct clk_branch gcc_xo_clk = {
2299 	.halt_reg = 0x30030,
2300 	.clkr = {
2301 		.enable_reg = 0x30030,
2302 		.enable_mask = BIT(0),
2303 		.hw.init = &(struct clk_init_data){
2304 			.name = "gcc_xo_clk",
2305 			.parent_hws = (const struct clk_hw *[]){
2306 					&gcc_xo_clk_src.clkr.hw },
2307 			.num_parents = 1,
2308 			.flags = CLK_SET_RATE_PARENT,
2309 			.ops = &clk_branch2_ops,
2310 		},
2311 	},
2312 };
2313 
2314 static struct clk_branch gcc_gp1_clk = {
2315 	.halt_reg = 0x08000,
2316 	.clkr = {
2317 		.enable_reg = 0x08000,
2318 		.enable_mask = BIT(0),
2319 		.hw.init = &(struct clk_init_data){
2320 			.name = "gcc_gp1_clk",
2321 			.parent_hws = (const struct clk_hw *[]){
2322 					&gp1_clk_src.clkr.hw },
2323 			.num_parents = 1,
2324 			.flags = CLK_SET_RATE_PARENT,
2325 			.ops = &clk_branch2_ops,
2326 		},
2327 	},
2328 };
2329 
2330 static struct clk_branch gcc_gp2_clk = {
2331 	.halt_reg = 0x09000,
2332 	.clkr = {
2333 		.enable_reg = 0x09000,
2334 		.enable_mask = BIT(0),
2335 		.hw.init = &(struct clk_init_data){
2336 			.name = "gcc_gp2_clk",
2337 			.parent_hws = (const struct clk_hw *[]){
2338 					&gp2_clk_src.clkr.hw },
2339 			.num_parents = 1,
2340 			.flags = CLK_SET_RATE_PARENT,
2341 			.ops = &clk_branch2_ops,
2342 		},
2343 	},
2344 };
2345 
2346 static struct clk_branch gcc_gp3_clk = {
2347 	.halt_reg = 0x0a000,
2348 	.clkr = {
2349 		.enable_reg = 0x0a000,
2350 		.enable_mask = BIT(0),
2351 		.hw.init = &(struct clk_init_data){
2352 			.name = "gcc_gp3_clk",
2353 			.parent_hws = (const struct clk_hw *[]){
2354 					&gp3_clk_src.clkr.hw },
2355 			.num_parents = 1,
2356 			.flags = CLK_SET_RATE_PARENT,
2357 			.ops = &clk_branch2_ops,
2358 		},
2359 	},
2360 };
2361 
2362 static struct clk_branch gcc_mdio_ahb_clk = {
2363 	.halt_reg = 0x58004,
2364 	.clkr = {
2365 		.enable_reg = 0x58004,
2366 		.enable_mask = BIT(0),
2367 		.hw.init = &(struct clk_init_data){
2368 			.name = "gcc_mdio_ahb_clk",
2369 			.parent_hws = (const struct clk_hw *[]){
2370 					&pcnoc_bfdcd_clk_src.clkr.hw },
2371 			.num_parents = 1,
2372 			.flags = CLK_SET_RATE_PARENT,
2373 			.ops = &clk_branch2_ops,
2374 		},
2375 	},
2376 };
2377 
2378 static struct clk_branch gcc_crypto_ppe_clk = {
2379 	.halt_reg = 0x68310,
2380 	.clkr = {
2381 		.enable_reg = 0x68310,
2382 		.enable_mask = BIT(0),
2383 		.hw.init = &(struct clk_init_data){
2384 			.name = "gcc_crypto_ppe_clk",
2385 			.parent_hws = (const struct clk_hw *[]){
2386 					&nss_ppe_clk_src.clkr.hw },
2387 			.num_parents = 1,
2388 			.flags = CLK_SET_RATE_PARENT,
2389 			.ops = &clk_branch2_ops,
2390 		},
2391 	},
2392 };
2393 
2394 static struct clk_branch gcc_nss_ce_apb_clk = {
2395 	.halt_reg = 0x68174,
2396 	.clkr = {
2397 		.enable_reg = 0x68174,
2398 		.enable_mask = BIT(0),
2399 		.hw.init = &(struct clk_init_data){
2400 			.name = "gcc_nss_ce_apb_clk",
2401 			.parent_hws = (const struct clk_hw *[]){
2402 					&nss_ce_clk_src.clkr.hw },
2403 			.num_parents = 1,
2404 			.flags = CLK_SET_RATE_PARENT,
2405 			.ops = &clk_branch2_ops,
2406 		},
2407 	},
2408 };
2409 
2410 static struct clk_branch gcc_nss_ce_axi_clk = {
2411 	.halt_reg = 0x68170,
2412 	.clkr = {
2413 		.enable_reg = 0x68170,
2414 		.enable_mask = BIT(0),
2415 		.hw.init = &(struct clk_init_data){
2416 			.name = "gcc_nss_ce_axi_clk",
2417 			.parent_hws = (const struct clk_hw *[]){
2418 					&nss_ce_clk_src.clkr.hw },
2419 			.num_parents = 1,
2420 			.flags = CLK_SET_RATE_PARENT,
2421 			.ops = &clk_branch2_ops,
2422 		},
2423 	},
2424 };
2425 
2426 static struct clk_branch gcc_nss_cfg_clk = {
2427 	.halt_reg = 0x68160,
2428 	.clkr = {
2429 		.enable_reg = 0x68160,
2430 		.enable_mask = BIT(0),
2431 		.hw.init = &(struct clk_init_data){
2432 			.name = "gcc_nss_cfg_clk",
2433 			.parent_hws = (const struct clk_hw *[]){
2434 					&pcnoc_bfdcd_clk_src.clkr.hw },
2435 			.num_parents = 1,
2436 			.flags = CLK_SET_RATE_PARENT,
2437 			.ops = &clk_branch2_ops,
2438 		},
2439 	},
2440 };
2441 
2442 static struct clk_branch gcc_nss_crypto_clk = {
2443 	.halt_reg = 0x68164,
2444 	.clkr = {
2445 		.enable_reg = 0x68164,
2446 		.enable_mask = BIT(0),
2447 		.hw.init = &(struct clk_init_data){
2448 			.name = "gcc_nss_crypto_clk",
2449 			.parent_hws = (const struct clk_hw *[]){
2450 					&nss_crypto_clk_src.clkr.hw },
2451 			.num_parents = 1,
2452 			.flags = CLK_SET_RATE_PARENT,
2453 			.ops = &clk_branch2_ops,
2454 		},
2455 	},
2456 };
2457 
2458 static struct clk_branch gcc_nss_csr_clk = {
2459 	.halt_reg = 0x68318,
2460 	.clkr = {
2461 		.enable_reg = 0x68318,
2462 		.enable_mask = BIT(0),
2463 		.hw.init = &(struct clk_init_data){
2464 			.name = "gcc_nss_csr_clk",
2465 			.parent_hws = (const struct clk_hw *[]){
2466 					&nss_ce_clk_src.clkr.hw },
2467 			.num_parents = 1,
2468 			.flags = CLK_SET_RATE_PARENT,
2469 			.ops = &clk_branch2_ops,
2470 		},
2471 	},
2472 };
2473 
2474 static struct clk_branch gcc_nss_edma_cfg_clk = {
2475 	.halt_reg = 0x6819C,
2476 	.clkr = {
2477 		.enable_reg = 0x6819C,
2478 		.enable_mask = BIT(0),
2479 		.hw.init = &(struct clk_init_data){
2480 			.name = "gcc_nss_edma_cfg_clk",
2481 			.parent_hws = (const struct clk_hw *[]){
2482 					&nss_ppe_clk_src.clkr.hw },
2483 			.num_parents = 1,
2484 			.flags = CLK_SET_RATE_PARENT,
2485 			.ops = &clk_branch2_ops,
2486 		},
2487 	},
2488 };
2489 
2490 static struct clk_branch gcc_nss_edma_clk = {
2491 	.halt_reg = 0x68198,
2492 	.clkr = {
2493 		.enable_reg = 0x68198,
2494 		.enable_mask = BIT(0),
2495 		.hw.init = &(struct clk_init_data){
2496 			.name = "gcc_nss_edma_clk",
2497 			.parent_hws = (const struct clk_hw *[]){
2498 					&nss_ppe_clk_src.clkr.hw },
2499 			.num_parents = 1,
2500 			.flags = CLK_SET_RATE_PARENT,
2501 			.ops = &clk_branch2_ops,
2502 		},
2503 	},
2504 };
2505 
2506 static struct clk_branch gcc_nss_noc_clk = {
2507 	.halt_reg = 0x68168,
2508 	.clkr = {
2509 		.enable_reg = 0x68168,
2510 		.enable_mask = BIT(0),
2511 		.hw.init = &(struct clk_init_data){
2512 			.name = "gcc_nss_noc_clk",
2513 			.parent_hws = (const struct clk_hw *[]){
2514 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2515 			.num_parents = 1,
2516 			.flags = CLK_SET_RATE_PARENT,
2517 			.ops = &clk_branch2_ops,
2518 		},
2519 	},
2520 };
2521 
2522 static struct clk_branch gcc_ubi0_utcm_clk = {
2523 	.halt_reg = 0x2606c,
2524 	.clkr = {
2525 		.enable_reg = 0x2606c,
2526 		.enable_mask = BIT(0),
2527 		.hw.init = &(struct clk_init_data){
2528 			.name = "gcc_ubi0_utcm_clk",
2529 			.parent_hws = (const struct clk_hw *[]){
2530 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2531 			.num_parents = 1,
2532 			.flags = CLK_SET_RATE_PARENT,
2533 			.ops = &clk_branch2_ops,
2534 		},
2535 	},
2536 };
2537 
2538 static struct clk_branch gcc_snoc_nssnoc_clk = {
2539 	.halt_reg = 0x26070,
2540 	.clkr = {
2541 		.enable_reg = 0x26070,
2542 		.enable_mask = BIT(0),
2543 		.hw.init = &(struct clk_init_data){
2544 			.name = "gcc_snoc_nssnoc_clk",
2545 			.parent_hws = (const struct clk_hw *[]){
2546 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
2547 			.num_parents = 1,
2548 			.flags = CLK_SET_RATE_PARENT,
2549 			.ops = &clk_branch2_ops,
2550 		},
2551 	},
2552 };
2553 
2554 static const struct freq_tbl ftbl_wcss_ahb_clk_src[] = {
2555 	F(24000000, P_XO, 1, 0, 0),
2556 	F(133333333, P_GPLL0, 6, 0, 0),
2557 	{ }
2558 };
2559 
2560 static const struct freq_tbl ftbl_q6_axi_clk_src[] = {
2561 	F(24000000, P_XO, 1, 0, 0),
2562 	F(400000000, P_GPLL0, 2, 0, 0),
2563 	{ }
2564 };
2565 
2566 static struct clk_rcg2 wcss_ahb_clk_src = {
2567 	.cmd_rcgr = 0x59020,
2568 	.freq_tbl = ftbl_wcss_ahb_clk_src,
2569 	.hid_width = 5,
2570 	.parent_map = gcc_xo_gpll0_map,
2571 	.clkr.hw.init = &(struct clk_init_data){
2572 		.name = "wcss_ahb_clk_src",
2573 		.parent_data = gcc_xo_gpll0,
2574 		.num_parents = 2,
2575 		.ops = &clk_rcg2_ops,
2576 	},
2577 };
2578 
2579 static const struct clk_parent_data gcc_xo_gpll0_gpll2_gpll4_gpll6[] = {
2580 	{ .fw_name = "xo" },
2581 	{ .hw = &gpll0.clkr.hw },
2582 	{ .hw = &gpll2.clkr.hw },
2583 	{ .hw = &gpll4.clkr.hw },
2584 	{ .hw = &gpll6.clkr.hw },
2585 };
2586 
2587 static const struct parent_map gcc_xo_gpll0_gpll2_gpll4_gpll6_map[] = {
2588 	{ P_XO, 0 },
2589 	{ P_GPLL0, 1 },
2590 	{ P_GPLL2, 2 },
2591 	{ P_GPLL4, 3 },
2592 	{ P_GPLL6, 4 },
2593 };
2594 
2595 static struct clk_rcg2 q6_axi_clk_src = {
2596 	.cmd_rcgr = 0x59120,
2597 	.freq_tbl = ftbl_q6_axi_clk_src,
2598 	.hid_width = 5,
2599 	.parent_map = gcc_xo_gpll0_gpll2_gpll4_gpll6_map,
2600 	.clkr.hw.init = &(struct clk_init_data){
2601 		.name = "q6_axi_clk_src",
2602 		.parent_data = gcc_xo_gpll0_gpll2_gpll4_gpll6,
2603 		.num_parents = 5,
2604 		.ops = &clk_rcg2_ops,
2605 	},
2606 };
2607 
2608 static const struct freq_tbl ftbl_lpass_core_axim_clk_src[] = {
2609 	F(24000000, P_XO, 1, 0, 0),
2610 	F(100000000, P_GPLL0, 8, 0, 0),
2611 	{ }
2612 };
2613 
2614 static struct clk_rcg2 lpass_core_axim_clk_src = {
2615 	.cmd_rcgr = 0x1F020,
2616 	.freq_tbl = ftbl_lpass_core_axim_clk_src,
2617 	.hid_width = 5,
2618 	.parent_map = gcc_xo_gpll0_map,
2619 	.clkr.hw.init = &(struct clk_init_data){
2620 		.name = "lpass_core_axim_clk_src",
2621 		.parent_data = gcc_xo_gpll0,
2622 		.num_parents = 2,
2623 		.ops = &clk_rcg2_ops,
2624 	},
2625 };
2626 
2627 static const struct freq_tbl ftbl_lpass_snoc_cfg_clk_src[] = {
2628 	F(24000000, P_XO, 1, 0, 0),
2629 	F(266666667, P_GPLL0, 3, 0, 0),
2630 	{ }
2631 };
2632 
2633 static struct clk_rcg2 lpass_snoc_cfg_clk_src = {
2634 	.cmd_rcgr = 0x1F040,
2635 	.freq_tbl = ftbl_lpass_snoc_cfg_clk_src,
2636 	.hid_width = 5,
2637 	.parent_map = gcc_xo_gpll0_map,
2638 	.clkr.hw.init = &(struct clk_init_data){
2639 		.name = "lpass_snoc_cfg_clk_src",
2640 		.parent_data = gcc_xo_gpll0,
2641 		.num_parents = 2,
2642 		.ops = &clk_rcg2_ops,
2643 	},
2644 };
2645 
2646 static const struct freq_tbl ftbl_lpass_q6_axim_clk_src[] = {
2647 	F(24000000, P_XO, 1, 0, 0),
2648 	F(400000000, P_GPLL0, 2, 0, 0),
2649 	{ }
2650 };
2651 
2652 static struct clk_rcg2 lpass_q6_axim_clk_src = {
2653 	.cmd_rcgr = 0x1F008,
2654 	.freq_tbl = ftbl_lpass_q6_axim_clk_src,
2655 	.hid_width = 5,
2656 	.parent_map = gcc_xo_gpll0_map,
2657 	.clkr.hw.init = &(struct clk_init_data){
2658 		.name = "lpass_q6_axim_clk_src",
2659 		.parent_data = gcc_xo_gpll0,
2660 		.num_parents = 2,
2661 		.ops = &clk_rcg2_ops,
2662 	},
2663 };
2664 
2665 static struct freq_tbl ftbl_rbcpr_wcss_clk_src[] = {
2666 	F(24000000, P_XO, 1, 0, 0),
2667 	F(50000000, P_GPLL0, 16, 0, 0),
2668 	{ }
2669 };
2670 
2671 static struct clk_rcg2 rbcpr_wcss_clk_src = {
2672 	.cmd_rcgr = 0x3a00c,
2673 	.freq_tbl = ftbl_rbcpr_wcss_clk_src,
2674 	.hid_width = 5,
2675 	.parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
2676 	.clkr.hw.init = &(struct clk_init_data){
2677 		.name = "rbcpr_wcss_clk_src",
2678 		.parent_data = gcc_xo_gpll0_out_main_div2_gpll0,
2679 		.num_parents = 3,
2680 		.ops = &clk_rcg2_ops,
2681 	},
2682 };
2683 
2684 static struct clk_branch gcc_lpass_core_axim_clk = {
2685 	.halt_reg = 0x1F028,
2686 	.clkr = {
2687 		.enable_reg = 0x1F028,
2688 		.enable_mask = BIT(0),
2689 		.hw.init = &(struct clk_init_data){
2690 			.name = "gcc_lpass_core_axim_clk",
2691 			.parent_hws = (const struct clk_hw *[]){
2692 					&lpass_core_axim_clk_src.clkr.hw },
2693 			.num_parents = 1,
2694 			.flags = CLK_SET_RATE_PARENT,
2695 			.ops = &clk_branch2_ops,
2696 		},
2697 	},
2698 };
2699 
2700 static struct clk_branch gcc_lpass_snoc_cfg_clk = {
2701 	.halt_reg = 0x1F048,
2702 	.clkr = {
2703 		.enable_reg = 0x1F048,
2704 		.enable_mask = BIT(0),
2705 		.hw.init = &(struct clk_init_data){
2706 			.name = "gcc_lpass_snoc_cfg_clk",
2707 			.parent_hws = (const struct clk_hw *[]){
2708 					&lpass_snoc_cfg_clk_src.clkr.hw },
2709 			.num_parents = 1,
2710 			.flags = CLK_SET_RATE_PARENT,
2711 			.ops = &clk_branch2_ops,
2712 		},
2713 	},
2714 };
2715 
2716 static struct clk_branch gcc_lpass_q6_axim_clk = {
2717 	.halt_reg = 0x1F010,
2718 	.clkr = {
2719 		.enable_reg = 0x1F010,
2720 		.enable_mask = BIT(0),
2721 		.hw.init = &(struct clk_init_data){
2722 			.name = "gcc_lpass_q6_axim_clk",
2723 			.parent_hws = (const struct clk_hw *[]){
2724 					&lpass_q6_axim_clk_src.clkr.hw },
2725 			.num_parents = 1,
2726 			.flags = CLK_SET_RATE_PARENT,
2727 			.ops = &clk_branch2_ops,
2728 		},
2729 	},
2730 };
2731 
2732 static struct clk_branch gcc_lpass_q6_atbm_at_clk = {
2733 	.halt_reg = 0x1F018,
2734 	.clkr = {
2735 		.enable_reg = 0x1F018,
2736 		.enable_mask = BIT(0),
2737 		.hw.init = &(struct clk_init_data){
2738 			.name = "gcc_lpass_q6_atbm_at_clk",
2739 			.parent_hws = (const struct clk_hw *[]){
2740 					&qdss_at_clk_src.clkr.hw },
2741 			.num_parents = 1,
2742 			.flags = CLK_SET_RATE_PARENT,
2743 			.ops = &clk_branch2_ops,
2744 		},
2745 	},
2746 };
2747 
2748 static struct clk_branch gcc_lpass_q6_pclkdbg_clk = {
2749 	.halt_reg = 0x1F01C,
2750 	.clkr = {
2751 		.enable_reg = 0x1F01C,
2752 		.enable_mask = BIT(0),
2753 		.hw.init = &(struct clk_init_data){
2754 			.name = "gcc_lpass_q6_pclkdbg_clk",
2755 			.parent_hws = (const struct clk_hw *[]){
2756 					&qdss_dap_sync_clk_src.hw },
2757 			.num_parents = 1,
2758 			.flags = CLK_SET_RATE_PARENT,
2759 			.ops = &clk_branch2_ops,
2760 		},
2761 	},
2762 };
2763 
2764 static struct clk_branch gcc_lpass_q6ss_tsctr_1to2_clk = {
2765 	.halt_reg = 0x1F014,
2766 	.clkr = {
2767 		.enable_reg = 0x1F014,
2768 		.enable_mask = BIT(0),
2769 		.hw.init = &(struct clk_init_data){
2770 			.name = "gcc_lpass_q6ss_tsctr_1to2_clk",
2771 			.parent_hws = (const struct clk_hw *[]){
2772 					&qdss_tsctr_div2_clk_src.hw },
2773 			.num_parents = 1,
2774 			.flags = CLK_SET_RATE_PARENT,
2775 			.ops = &clk_branch2_ops,
2776 		},
2777 	},
2778 };
2779 
2780 static struct clk_branch gcc_lpass_q6ss_trig_clk = {
2781 	.halt_reg = 0x1F038,
2782 	.clkr = {
2783 		.enable_reg = 0x1F038,
2784 		.enable_mask = BIT(0),
2785 		.hw.init = &(struct clk_init_data){
2786 			.name = "gcc_lpass_q6ss_trig_clk",
2787 			.parent_hws = (const struct clk_hw *[]){
2788 					&qdss_dap_sync_clk_src.hw },
2789 			.num_parents = 1,
2790 			.flags = CLK_SET_RATE_PARENT,
2791 			.ops = &clk_branch2_ops,
2792 		},
2793 	},
2794 };
2795 
2796 static struct clk_branch gcc_lpass_tbu_clk = {
2797 	.halt_reg = 0x12094,
2798 	.clkr = {
2799 		.enable_reg = 0xb00c,
2800 		.enable_mask = BIT(10),
2801 		.hw.init = &(struct clk_init_data){
2802 			.name = "gcc_lpass_tbu_clk",
2803 			.parent_hws = (const struct clk_hw *[]){
2804 					&lpass_q6_axim_clk_src.clkr.hw },
2805 			.num_parents = 1,
2806 			.flags = CLK_SET_RATE_PARENT,
2807 			.ops = &clk_branch2_ops,
2808 		},
2809 	},
2810 };
2811 
2812 static struct clk_branch gcc_pcnoc_lpass_clk = {
2813 	.halt_reg = 0x27020,
2814 	.clkr = {
2815 		.enable_reg = 0x27020,
2816 		.enable_mask = BIT(0),
2817 		.hw.init = &(struct clk_init_data){
2818 			.name = "gcc_pcnoc_lpass_clk",
2819 			.parent_hws = (const struct clk_hw *[]){
2820 					&lpass_core_axim_clk_src.clkr.hw },
2821 			.num_parents = 1,
2822 			.flags = CLK_SET_RATE_PARENT,
2823 			.ops = &clk_branch2_ops,
2824 		},
2825 	},
2826 };
2827 
2828 static struct clk_branch gcc_mem_noc_lpass_clk = {
2829 	.halt_reg = 0x1D044,
2830 	.clkr = {
2831 		.enable_reg = 0x1D044,
2832 		.enable_mask = BIT(0),
2833 		.hw.init = &(struct clk_init_data){
2834 			.name = "gcc_mem_noc_lpass_clk",
2835 			.parent_hws = (const struct clk_hw *[]){
2836 					&lpass_q6_axim_clk_src.clkr.hw },
2837 			.num_parents = 1,
2838 			.flags = CLK_SET_RATE_PARENT,
2839 			.ops = &clk_branch2_ops,
2840 		},
2841 	},
2842 };
2843 
2844 static struct clk_branch gcc_snoc_lpass_cfg_clk = {
2845 	.halt_reg = 0x26074,
2846 	.clkr = {
2847 		.enable_reg = 0x26074,
2848 		.enable_mask = BIT(0),
2849 		.hw.init = &(struct clk_init_data){
2850 			.name = "gcc_snoc_lpass_cfg_clk",
2851 			.parent_hws = (const struct clk_hw *[]){
2852 					&lpass_snoc_cfg_clk_src.clkr.hw },
2853 			.num_parents = 1,
2854 			.flags = CLK_SET_RATE_PARENT,
2855 			.ops = &clk_branch2_ops,
2856 		},
2857 	},
2858 };
2859 
2860 static struct clk_branch gcc_mem_noc_ubi32_clk = {
2861 	.halt_reg = 0x1D03C,
2862 	.clkr = {
2863 		.enable_reg = 0x1D03C,
2864 		.enable_mask = BIT(0),
2865 		.hw.init = &(struct clk_init_data){
2866 			.name = "gcc_mem_noc_ubi32_clk",
2867 			.parent_hws = (const struct clk_hw *[]){
2868 					&ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
2869 			.num_parents = 1,
2870 			.flags = CLK_SET_RATE_PARENT,
2871 			.ops = &clk_branch2_ops,
2872 		},
2873 	},
2874 };
2875 
2876 static struct clk_branch gcc_nss_port1_rx_clk = {
2877 	.halt_reg = 0x68240,
2878 	.clkr = {
2879 		.enable_reg = 0x68240,
2880 		.enable_mask = BIT(0),
2881 		.hw.init = &(struct clk_init_data){
2882 			.name = "gcc_nss_port1_rx_clk",
2883 			.parent_hws = (const struct clk_hw *[]){
2884 					&nss_port1_rx_div_clk_src.clkr.hw },
2885 			.num_parents = 1,
2886 			.flags = CLK_SET_RATE_PARENT,
2887 			.ops = &clk_branch2_ops,
2888 		},
2889 	},
2890 };
2891 
2892 static struct clk_branch gcc_nss_port1_tx_clk = {
2893 	.halt_reg = 0x68244,
2894 	.clkr = {
2895 		.enable_reg = 0x68244,
2896 		.enable_mask = BIT(0),
2897 		.hw.init = &(struct clk_init_data){
2898 			.name = "gcc_nss_port1_tx_clk",
2899 			.parent_hws = (const struct clk_hw *[]){
2900 					&nss_port1_tx_div_clk_src.clkr.hw },
2901 			.num_parents = 1,
2902 			.flags = CLK_SET_RATE_PARENT,
2903 			.ops = &clk_branch2_ops,
2904 		},
2905 	},
2906 };
2907 
2908 static struct clk_branch gcc_nss_port2_rx_clk = {
2909 	.halt_reg = 0x68248,
2910 	.clkr = {
2911 		.enable_reg = 0x68248,
2912 		.enable_mask = BIT(0),
2913 		.hw.init = &(struct clk_init_data){
2914 			.name = "gcc_nss_port2_rx_clk",
2915 			.parent_hws = (const struct clk_hw *[]){
2916 					&nss_port2_rx_div_clk_src.clkr.hw },
2917 			.num_parents = 1,
2918 			.flags = CLK_SET_RATE_PARENT,
2919 			.ops = &clk_branch2_ops,
2920 		},
2921 	},
2922 };
2923 
2924 static struct clk_branch gcc_nss_port2_tx_clk = {
2925 	.halt_reg = 0x6824c,
2926 	.clkr = {
2927 		.enable_reg = 0x6824c,
2928 		.enable_mask = BIT(0),
2929 		.hw.init = &(struct clk_init_data){
2930 			.name = "gcc_nss_port2_tx_clk",
2931 			.parent_hws = (const struct clk_hw *[]){
2932 					&nss_port2_tx_div_clk_src.clkr.hw },
2933 			.num_parents = 1,
2934 			.flags = CLK_SET_RATE_PARENT,
2935 			.ops = &clk_branch2_ops,
2936 		},
2937 	},
2938 };
2939 
2940 static struct clk_branch gcc_nss_port3_rx_clk = {
2941 	.halt_reg = 0x68250,
2942 	.clkr = {
2943 		.enable_reg = 0x68250,
2944 		.enable_mask = BIT(0),
2945 		.hw.init = &(struct clk_init_data){
2946 			.name = "gcc_nss_port3_rx_clk",
2947 			.parent_hws = (const struct clk_hw *[]){
2948 					&nss_port3_rx_div_clk_src.clkr.hw },
2949 			.num_parents = 1,
2950 			.flags = CLK_SET_RATE_PARENT,
2951 			.ops = &clk_branch2_ops,
2952 		},
2953 	},
2954 };
2955 
2956 static struct clk_branch gcc_nss_port3_tx_clk = {
2957 	.halt_reg = 0x68254,
2958 	.clkr = {
2959 		.enable_reg = 0x68254,
2960 		.enable_mask = BIT(0),
2961 		.hw.init = &(struct clk_init_data){
2962 			.name = "gcc_nss_port3_tx_clk",
2963 			.parent_hws = (const struct clk_hw *[]){
2964 					&nss_port3_tx_div_clk_src.clkr.hw },
2965 			.num_parents = 1,
2966 			.flags = CLK_SET_RATE_PARENT,
2967 			.ops = &clk_branch2_ops,
2968 		},
2969 	},
2970 };
2971 
2972 static struct clk_branch gcc_nss_port4_rx_clk = {
2973 	.halt_reg = 0x68258,
2974 	.clkr = {
2975 		.enable_reg = 0x68258,
2976 		.enable_mask = BIT(0),
2977 		.hw.init = &(struct clk_init_data){
2978 			.name = "gcc_nss_port4_rx_clk",
2979 			.parent_hws = (const struct clk_hw *[]){
2980 					&nss_port4_rx_div_clk_src.clkr.hw },
2981 			.num_parents = 1,
2982 			.flags = CLK_SET_RATE_PARENT,
2983 			.ops = &clk_branch2_ops,
2984 		},
2985 	},
2986 };
2987 
2988 static struct clk_branch gcc_nss_port4_tx_clk = {
2989 	.halt_reg = 0x6825c,
2990 	.clkr = {
2991 		.enable_reg = 0x6825c,
2992 		.enable_mask = BIT(0),
2993 		.hw.init = &(struct clk_init_data){
2994 			.name = "gcc_nss_port4_tx_clk",
2995 			.parent_hws = (const struct clk_hw *[]){
2996 					&nss_port4_tx_div_clk_src.clkr.hw },
2997 			.num_parents = 1,
2998 			.flags = CLK_SET_RATE_PARENT,
2999 			.ops = &clk_branch2_ops,
3000 		},
3001 	},
3002 };
3003 
3004 static struct clk_branch gcc_nss_port5_rx_clk = {
3005 	.halt_reg = 0x68260,
3006 	.clkr = {
3007 		.enable_reg = 0x68260,
3008 		.enable_mask = BIT(0),
3009 		.hw.init = &(struct clk_init_data){
3010 			.name = "gcc_nss_port5_rx_clk",
3011 			.parent_hws = (const struct clk_hw *[]){
3012 					&nss_port5_rx_div_clk_src.clkr.hw },
3013 			.num_parents = 1,
3014 			.flags = CLK_SET_RATE_PARENT,
3015 			.ops = &clk_branch2_ops,
3016 		},
3017 	},
3018 };
3019 
3020 static struct clk_branch gcc_nss_port5_tx_clk = {
3021 	.halt_reg = 0x68264,
3022 	.clkr = {
3023 		.enable_reg = 0x68264,
3024 		.enable_mask = BIT(0),
3025 		.hw.init = &(struct clk_init_data){
3026 			.name = "gcc_nss_port5_tx_clk",
3027 			.parent_hws = (const struct clk_hw *[]){
3028 					&nss_port5_tx_div_clk_src.clkr.hw },
3029 			.num_parents = 1,
3030 			.flags = CLK_SET_RATE_PARENT,
3031 			.ops = &clk_branch2_ops,
3032 		},
3033 	},
3034 };
3035 
3036 static struct clk_branch gcc_nss_ppe_cfg_clk = {
3037 	.halt_reg = 0x68194,
3038 	.clkr = {
3039 		.enable_reg = 0x68194,
3040 		.enable_mask = BIT(0),
3041 		.hw.init = &(struct clk_init_data){
3042 			.name = "gcc_nss_ppe_cfg_clk",
3043 			.parent_hws = (const struct clk_hw *[]){
3044 					&nss_ppe_clk_src.clkr.hw },
3045 			.num_parents = 1,
3046 			.flags = CLK_SET_RATE_PARENT,
3047 			.ops = &clk_branch2_ops,
3048 		},
3049 	},
3050 };
3051 
3052 static struct clk_branch gcc_nss_ppe_clk = {
3053 	.halt_reg = 0x68190,
3054 	.clkr = {
3055 		.enable_reg = 0x68190,
3056 		.enable_mask = BIT(0),
3057 		.hw.init = &(struct clk_init_data){
3058 			.name = "gcc_nss_ppe_clk",
3059 			.parent_hws = (const struct clk_hw *[]){
3060 					&nss_ppe_clk_src.clkr.hw },
3061 			.num_parents = 1,
3062 			.flags = CLK_SET_RATE_PARENT,
3063 			.ops = &clk_branch2_ops,
3064 		},
3065 	},
3066 };
3067 
3068 static struct clk_branch gcc_nss_ppe_ipe_clk = {
3069 	.halt_reg = 0x68338,
3070 	.clkr = {
3071 		.enable_reg = 0x68338,
3072 		.enable_mask = BIT(0),
3073 		.hw.init = &(struct clk_init_data){
3074 			.name = "gcc_nss_ppe_ipe_clk",
3075 			.parent_hws = (const struct clk_hw *[]){
3076 					&nss_ppe_clk_src.clkr.hw },
3077 			.num_parents = 1,
3078 			.flags = CLK_SET_RATE_PARENT,
3079 			.ops = &clk_branch2_ops,
3080 		},
3081 	},
3082 };
3083 
3084 static struct clk_branch gcc_nss_ptp_ref_clk = {
3085 	.halt_reg = 0x6816C,
3086 	.clkr = {
3087 		.enable_reg = 0x6816C,
3088 		.enable_mask = BIT(0),
3089 		.hw.init = &(struct clk_init_data){
3090 			.name = "gcc_nss_ptp_ref_clk",
3091 			.parent_hws = (const struct clk_hw *[]){
3092 					&nss_ppe_cdiv_clk_src.hw },
3093 			.num_parents = 1,
3094 			.flags = CLK_SET_RATE_PARENT,
3095 			.ops = &clk_branch2_ops,
3096 		},
3097 	},
3098 };
3099 
3100 static struct clk_branch gcc_nssnoc_ce_apb_clk = {
3101 	.halt_reg = 0x6830C,
3102 	.clkr = {
3103 		.enable_reg = 0x6830C,
3104 		.enable_mask = BIT(0),
3105 		.hw.init = &(struct clk_init_data){
3106 			.name = "gcc_nssnoc_ce_apb_clk",
3107 			.parent_hws = (const struct clk_hw *[]){
3108 					&nss_ce_clk_src.clkr.hw },
3109 			.num_parents = 1,
3110 			.flags = CLK_SET_RATE_PARENT,
3111 			.ops = &clk_branch2_ops,
3112 		},
3113 	},
3114 };
3115 
3116 static struct clk_branch gcc_nssnoc_ce_axi_clk = {
3117 	.halt_reg = 0x68308,
3118 	.clkr = {
3119 		.enable_reg = 0x68308,
3120 		.enable_mask = BIT(0),
3121 		.hw.init = &(struct clk_init_data){
3122 			.name = "gcc_nssnoc_ce_axi_clk",
3123 			.parent_hws = (const struct clk_hw *[]){
3124 					&nss_ce_clk_src.clkr.hw },
3125 			.num_parents = 1,
3126 			.flags = CLK_SET_RATE_PARENT,
3127 			.ops = &clk_branch2_ops,
3128 		},
3129 	},
3130 };
3131 
3132 static struct clk_branch gcc_nssnoc_crypto_clk = {
3133 	.halt_reg = 0x68314,
3134 	.clkr = {
3135 		.enable_reg = 0x68314,
3136 		.enable_mask = BIT(0),
3137 		.hw.init = &(struct clk_init_data){
3138 			.name = "gcc_nssnoc_crypto_clk",
3139 			.parent_hws = (const struct clk_hw *[]){
3140 					&nss_crypto_clk_src.clkr.hw },
3141 			.num_parents = 1,
3142 			.flags = CLK_SET_RATE_PARENT,
3143 			.ops = &clk_branch2_ops,
3144 		},
3145 	},
3146 };
3147 
3148 static struct clk_branch gcc_nssnoc_ppe_cfg_clk = {
3149 	.halt_reg = 0x68304,
3150 	.clkr = {
3151 		.enable_reg = 0x68304,
3152 		.enable_mask = BIT(0),
3153 		.hw.init = &(struct clk_init_data){
3154 			.name = "gcc_nssnoc_ppe_cfg_clk",
3155 			.parent_hws = (const struct clk_hw *[]){
3156 					&nss_ppe_clk_src.clkr.hw },
3157 			.flags = CLK_SET_RATE_PARENT,
3158 			.ops = &clk_branch2_ops,
3159 		},
3160 	},
3161 };
3162 
3163 static struct clk_branch gcc_nssnoc_ppe_clk = {
3164 	.halt_reg = 0x68300,
3165 	.clkr = {
3166 		.enable_reg = 0x68300,
3167 		.enable_mask = BIT(0),
3168 		.hw.init = &(struct clk_init_data){
3169 			.name = "gcc_nssnoc_ppe_clk",
3170 			.parent_hws = (const struct clk_hw *[]){
3171 					&nss_ppe_clk_src.clkr.hw },
3172 			.num_parents = 1,
3173 			.flags = CLK_SET_RATE_PARENT,
3174 			.ops = &clk_branch2_ops,
3175 		},
3176 	},
3177 };
3178 
3179 static struct clk_branch gcc_nssnoc_qosgen_ref_clk = {
3180 	.halt_reg = 0x68180,
3181 	.clkr = {
3182 		.enable_reg = 0x68180,
3183 		.enable_mask = BIT(0),
3184 		.hw.init = &(struct clk_init_data){
3185 			.name = "gcc_nssnoc_qosgen_ref_clk",
3186 			.parent_hws = (const struct clk_hw *[]){
3187 					&gcc_xo_clk_src.clkr.hw },
3188 			.num_parents = 1,
3189 			.flags = CLK_SET_RATE_PARENT,
3190 			.ops = &clk_branch2_ops,
3191 		},
3192 	},
3193 };
3194 
3195 static struct clk_branch gcc_nssnoc_snoc_clk = {
3196 	.halt_reg = 0x68188,
3197 	.clkr = {
3198 		.enable_reg = 0x68188,
3199 		.enable_mask = BIT(0),
3200 		.hw.init = &(struct clk_init_data){
3201 			.name = "gcc_nssnoc_snoc_clk",
3202 			.parent_hws = (const struct clk_hw *[]){
3203 					&system_noc_bfdcd_clk_src.clkr.hw },
3204 			.num_parents = 1,
3205 			.flags = CLK_SET_RATE_PARENT,
3206 			.ops = &clk_branch2_ops,
3207 		},
3208 	},
3209 };
3210 
3211 static struct clk_branch gcc_nssnoc_timeout_ref_clk = {
3212 	.halt_reg = 0x68184,
3213 	.clkr = {
3214 		.enable_reg = 0x68184,
3215 		.enable_mask = BIT(0),
3216 		.hw.init = &(struct clk_init_data){
3217 			.name = "gcc_nssnoc_timeout_ref_clk",
3218 			.parent_hws = (const struct clk_hw *[]){
3219 					&gcc_xo_div4_clk_src.hw },
3220 			.num_parents = 1,
3221 			.flags = CLK_SET_RATE_PARENT,
3222 			.ops = &clk_branch2_ops,
3223 		},
3224 	},
3225 };
3226 
3227 static struct clk_branch gcc_nssnoc_ubi0_ahb_clk = {
3228 	.halt_reg = 0x68270,
3229 	.clkr = {
3230 		.enable_reg = 0x68270,
3231 		.enable_mask = BIT(0),
3232 		.hw.init = &(struct clk_init_data){
3233 			.name = "gcc_nssnoc_ubi0_ahb_clk",
3234 			.parent_hws = (const struct clk_hw *[]){
3235 					&nss_ce_clk_src.clkr.hw },
3236 			.num_parents = 1,
3237 			.flags = CLK_SET_RATE_PARENT,
3238 			.ops = &clk_branch2_ops,
3239 		},
3240 	},
3241 };
3242 
3243 static struct clk_branch gcc_port1_mac_clk = {
3244 	.halt_reg = 0x68320,
3245 	.clkr = {
3246 		.enable_reg = 0x68320,
3247 		.enable_mask = BIT(0),
3248 		.hw.init = &(struct clk_init_data){
3249 			.name = "gcc_port1_mac_clk",
3250 			.parent_hws = (const struct clk_hw *[]){
3251 					&nss_ppe_clk_src.clkr.hw },
3252 			.num_parents = 1,
3253 			.flags = CLK_SET_RATE_PARENT,
3254 			.ops = &clk_branch2_ops,
3255 		},
3256 	},
3257 };
3258 
3259 static struct clk_branch gcc_port2_mac_clk = {
3260 	.halt_reg = 0x68324,
3261 	.clkr = {
3262 		.enable_reg = 0x68324,
3263 		.enable_mask = BIT(0),
3264 		.hw.init = &(struct clk_init_data){
3265 			.name = "gcc_port2_mac_clk",
3266 			.parent_hws = (const struct clk_hw *[]){
3267 					&nss_ppe_clk_src.clkr.hw },
3268 			.num_parents = 1,
3269 			.flags = CLK_SET_RATE_PARENT,
3270 			.ops = &clk_branch2_ops,
3271 		},
3272 	},
3273 };
3274 
3275 static struct clk_branch gcc_port3_mac_clk = {
3276 	.halt_reg = 0x68328,
3277 	.clkr = {
3278 		.enable_reg = 0x68328,
3279 		.enable_mask = BIT(0),
3280 		.hw.init = &(struct clk_init_data){
3281 			.name = "gcc_port3_mac_clk",
3282 			.parent_hws = (const struct clk_hw *[]){
3283 					&nss_ppe_clk_src.clkr.hw },
3284 			.num_parents = 1,
3285 			.flags = CLK_SET_RATE_PARENT,
3286 			.ops = &clk_branch2_ops,
3287 		},
3288 	},
3289 };
3290 
3291 static struct clk_branch gcc_port4_mac_clk = {
3292 	.halt_reg = 0x6832c,
3293 	.clkr = {
3294 		.enable_reg = 0x6832c,
3295 		.enable_mask = BIT(0),
3296 		.hw.init = &(struct clk_init_data){
3297 			.name = "gcc_port4_mac_clk",
3298 			.parent_hws = (const struct clk_hw *[]){
3299 					&nss_ppe_clk_src.clkr.hw },
3300 			.num_parents = 1,
3301 			.flags = CLK_SET_RATE_PARENT,
3302 			.ops = &clk_branch2_ops,
3303 		},
3304 	},
3305 };
3306 
3307 static struct clk_branch gcc_port5_mac_clk = {
3308 	.halt_reg = 0x68330,
3309 	.clkr = {
3310 		.enable_reg = 0x68330,
3311 		.enable_mask = BIT(0),
3312 		.hw.init = &(struct clk_init_data){
3313 			.name = "gcc_port5_mac_clk",
3314 			.parent_hws = (const struct clk_hw *[]){
3315 					&nss_ppe_clk_src.clkr.hw },
3316 			.num_parents = 1,
3317 			.flags = CLK_SET_RATE_PARENT,
3318 			.ops = &clk_branch2_ops,
3319 		},
3320 	},
3321 };
3322 
3323 static struct clk_branch gcc_ubi0_ahb_clk = {
3324 	.halt_reg = 0x6820C,
3325 	.halt_check = BRANCH_HALT_DELAY,
3326 	.clkr = {
3327 		.enable_reg = 0x6820C,
3328 		.enable_mask = BIT(0),
3329 		.hw.init = &(struct clk_init_data){
3330 			.name = "gcc_ubi0_ahb_clk",
3331 			.parent_hws = (const struct clk_hw *[]){
3332 					&nss_ce_clk_src.clkr.hw },
3333 			.num_parents = 1,
3334 			.flags = CLK_SET_RATE_PARENT,
3335 			.ops = &clk_branch2_ops,
3336 		},
3337 	},
3338 };
3339 
3340 static struct clk_branch gcc_ubi0_axi_clk = {
3341 	.halt_reg = 0x68200,
3342 	.halt_check = BRANCH_HALT_DELAY,
3343 	.clkr = {
3344 		.enable_reg = 0x68200,
3345 		.enable_mask = BIT(0),
3346 		.hw.init = &(struct clk_init_data){
3347 			.name = "gcc_ubi0_axi_clk",
3348 			.parent_hws = (const struct clk_hw *[]){
3349 					&ubi32_mem_noc_bfdcd_clk_src.clkr.hw },
3350 			.num_parents = 1,
3351 			.flags = CLK_SET_RATE_PARENT,
3352 			.ops = &clk_branch2_ops,
3353 		},
3354 	},
3355 };
3356 
3357 static struct clk_branch gcc_ubi0_nc_axi_clk = {
3358 	.halt_reg = 0x68204,
3359 	.halt_check = BRANCH_HALT_DELAY,
3360 	.clkr = {
3361 		.enable_reg = 0x68204,
3362 		.enable_mask = BIT(0),
3363 		.hw.init = &(struct clk_init_data){
3364 			.name = "gcc_ubi0_nc_axi_clk",
3365 			.parent_hws = (const struct clk_hw *[]){
3366 					&snoc_nssnoc_bfdcd_clk_src.clkr.hw },
3367 			.num_parents = 1,
3368 			.flags = CLK_SET_RATE_PARENT,
3369 			.ops = &clk_branch2_ops,
3370 		},
3371 	},
3372 };
3373 
3374 static struct clk_branch gcc_ubi0_core_clk = {
3375 	.halt_reg = 0x68210,
3376 	.halt_check = BRANCH_HALT_DELAY,
3377 	.clkr = {
3378 		.enable_reg = 0x68210,
3379 		.enable_mask = BIT(0),
3380 		.hw.init = &(struct clk_init_data){
3381 			.name = "gcc_ubi0_core_clk",
3382 			.parent_hws = (const struct clk_hw *[]){
3383 					&nss_ubi0_div_clk_src.clkr.hw },
3384 			.num_parents = 1,
3385 			.flags = CLK_SET_RATE_PARENT,
3386 			.ops = &clk_branch2_ops,
3387 		},
3388 	},
3389 };
3390 
3391 static struct clk_branch gcc_pcie0_ahb_clk = {
3392 	.halt_reg = 0x75010,
3393 	.clkr = {
3394 		.enable_reg = 0x75010,
3395 		.enable_mask = BIT(0),
3396 		.hw.init = &(struct clk_init_data){
3397 			.name = "gcc_pcie0_ahb_clk",
3398 			.parent_hws = (const struct clk_hw *[]){
3399 					&pcnoc_bfdcd_clk_src.clkr.hw },
3400 			.num_parents = 1,
3401 			.flags = CLK_SET_RATE_PARENT,
3402 			.ops = &clk_branch2_ops,
3403 		},
3404 	},
3405 };
3406 
3407 static struct clk_branch gcc_pcie0_aux_clk = {
3408 	.halt_reg = 0x75014,
3409 	.clkr = {
3410 		.enable_reg = 0x75014,
3411 		.enable_mask = BIT(0),
3412 		.hw.init = &(struct clk_init_data){
3413 			.name = "gcc_pcie0_aux_clk",
3414 			.parent_hws = (const struct clk_hw *[]){
3415 					&pcie0_aux_clk_src.clkr.hw },
3416 			.num_parents = 1,
3417 			.flags = CLK_SET_RATE_PARENT,
3418 			.ops = &clk_branch2_ops,
3419 		},
3420 	},
3421 };
3422 
3423 static struct clk_branch gcc_pcie0_axi_m_clk = {
3424 	.halt_reg = 0x75008,
3425 	.clkr = {
3426 		.enable_reg = 0x75008,
3427 		.enable_mask = BIT(0),
3428 		.hw.init = &(struct clk_init_data){
3429 			.name = "gcc_pcie0_axi_m_clk",
3430 			.parent_hws = (const struct clk_hw *[]){
3431 					&pcie0_axi_clk_src.clkr.hw },
3432 			.num_parents = 1,
3433 			.flags = CLK_SET_RATE_PARENT,
3434 			.ops = &clk_branch2_ops,
3435 		},
3436 	},
3437 };
3438 
3439 static struct clk_branch gcc_pcie0_axi_s_clk = {
3440 	.halt_reg = 0x7500c,
3441 	.clkr = {
3442 		.enable_reg = 0x7500c,
3443 		.enable_mask = BIT(0),
3444 		.hw.init = &(struct clk_init_data){
3445 			.name = "gcc_pcie0_axi_s_clk",
3446 			.parent_hws = (const struct clk_hw *[]){
3447 					&pcie0_axi_clk_src.clkr.hw },
3448 			.num_parents = 1,
3449 			.flags = CLK_SET_RATE_PARENT,
3450 			.ops = &clk_branch2_ops,
3451 		},
3452 	},
3453 };
3454 
3455 static struct clk_branch gcc_sys_noc_pcie0_axi_clk = {
3456 	.halt_reg = 0x26048,
3457 	.clkr = {
3458 		.enable_reg = 0x26048,
3459 		.enable_mask = BIT(0),
3460 		.hw.init = &(struct clk_init_data){
3461 			.name = "gcc_sys_noc_pcie0_axi_clk",
3462 			.parent_hws = (const struct clk_hw *[]){
3463 					&pcie0_axi_clk_src.clkr.hw },
3464 			.num_parents = 1,
3465 			.flags = CLK_SET_RATE_PARENT,
3466 			.ops = &clk_branch2_ops,
3467 		},
3468 	},
3469 };
3470 
3471 static struct clk_branch gcc_pcie0_pipe_clk = {
3472 	.halt_reg = 0x75018,
3473 	.halt_check = BRANCH_HALT_DELAY,
3474 	.clkr = {
3475 		.enable_reg = 0x75018,
3476 		.enable_mask = BIT(0),
3477 		.hw.init = &(struct clk_init_data){
3478 			.name = "gcc_pcie0_pipe_clk",
3479 			.parent_hws = (const struct clk_hw *[]){
3480 					&pcie0_pipe_clk_src.clkr.hw },
3481 			.num_parents = 1,
3482 			.flags = CLK_SET_RATE_PARENT,
3483 			.ops = &clk_branch2_ops,
3484 		},
3485 	},
3486 };
3487 
3488 static struct clk_branch gcc_prng_ahb_clk = {
3489 	.halt_reg = 0x13004,
3490 	.halt_check = BRANCH_HALT_VOTED,
3491 	.clkr = {
3492 		.enable_reg = 0x0b004,
3493 		.enable_mask = BIT(8),
3494 		.hw.init = &(struct clk_init_data){
3495 			.name = "gcc_prng_ahb_clk",
3496 			.parent_hws = (const struct clk_hw *[]){
3497 					&pcnoc_bfdcd_clk_src.clkr.hw },
3498 			.num_parents = 1,
3499 			.flags = CLK_SET_RATE_PARENT,
3500 			.ops = &clk_branch2_ops,
3501 		},
3502 	},
3503 };
3504 
3505 static struct clk_branch gcc_qdss_dap_clk = {
3506 	.halt_reg = 0x29084,
3507 	.clkr = {
3508 		.enable_reg = 0x29084,
3509 		.enable_mask = BIT(0),
3510 		.hw.init = &(struct clk_init_data){
3511 			.name = "gcc_qdss_dap_clk",
3512 			.parent_hws = (const struct clk_hw *[]){
3513 					&qdss_dap_sync_clk_src.hw },
3514 			.num_parents = 1,
3515 			.flags = CLK_SET_RATE_PARENT,
3516 			.ops = &clk_branch2_ops,
3517 		},
3518 	},
3519 };
3520 
3521 static struct clk_branch gcc_qpic_ahb_clk = {
3522 	.halt_reg = 0x57024,
3523 	.clkr = {
3524 		.enable_reg = 0x57024,
3525 		.enable_mask = BIT(0),
3526 		.hw.init = &(struct clk_init_data){
3527 			.name = "gcc_qpic_ahb_clk",
3528 			.parent_hws = (const struct clk_hw *[]){
3529 					&pcnoc_bfdcd_clk_src.clkr.hw },
3530 			.num_parents = 1,
3531 			.flags = CLK_SET_RATE_PARENT,
3532 			.ops = &clk_branch2_ops,
3533 		},
3534 	},
3535 };
3536 
3537 static struct clk_branch gcc_qpic_clk = {
3538 	.halt_reg = 0x57020,
3539 	.clkr = {
3540 		.enable_reg = 0x57020,
3541 		.enable_mask = BIT(0),
3542 		.hw.init = &(struct clk_init_data){
3543 			.name = "gcc_qpic_clk",
3544 			.parent_hws = (const struct clk_hw *[]){
3545 					&pcnoc_bfdcd_clk_src.clkr.hw },
3546 			.num_parents = 1,
3547 			.flags = CLK_SET_RATE_PARENT,
3548 			.ops = &clk_branch2_ops,
3549 		},
3550 	},
3551 };
3552 
3553 static struct clk_branch gcc_sdcc1_ahb_clk = {
3554 	.halt_reg = 0x4201c,
3555 	.clkr = {
3556 		.enable_reg = 0x4201c,
3557 		.enable_mask = BIT(0),
3558 		.hw.init = &(struct clk_init_data){
3559 			.name = "gcc_sdcc1_ahb_clk",
3560 			.parent_hws = (const struct clk_hw *[]){
3561 					&pcnoc_bfdcd_clk_src.clkr.hw },
3562 			.num_parents = 1,
3563 			.flags = CLK_SET_RATE_PARENT,
3564 			.ops = &clk_branch2_ops,
3565 		},
3566 	},
3567 };
3568 
3569 static struct clk_branch gcc_sdcc1_apps_clk = {
3570 	.halt_reg = 0x42018,
3571 	.clkr = {
3572 		.enable_reg = 0x42018,
3573 		.enable_mask = BIT(0),
3574 		.hw.init = &(struct clk_init_data){
3575 			.name = "gcc_sdcc1_apps_clk",
3576 			.parent_hws = (const struct clk_hw *[]){
3577 					&sdcc1_apps_clk_src.clkr.hw },
3578 			.num_parents = 1,
3579 			.flags = CLK_SET_RATE_PARENT,
3580 			.ops = &clk_branch2_ops,
3581 		},
3582 	},
3583 };
3584 
3585 static struct clk_branch gcc_uniphy0_ahb_clk = {
3586 	.halt_reg = 0x56008,
3587 	.clkr = {
3588 		.enable_reg = 0x56008,
3589 		.enable_mask = BIT(0),
3590 		.hw.init = &(struct clk_init_data){
3591 			.name = "gcc_uniphy0_ahb_clk",
3592 			.parent_hws = (const struct clk_hw *[]){
3593 					&pcnoc_bfdcd_clk_src.clkr.hw },
3594 			.num_parents = 1,
3595 			.flags = CLK_SET_RATE_PARENT,
3596 			.ops = &clk_branch2_ops,
3597 		},
3598 	},
3599 };
3600 
3601 static struct clk_branch gcc_uniphy0_port1_rx_clk = {
3602 	.halt_reg = 0x56010,
3603 	.clkr = {
3604 		.enable_reg = 0x56010,
3605 		.enable_mask = BIT(0),
3606 		.hw.init = &(struct clk_init_data){
3607 			.name = "gcc_uniphy0_port1_rx_clk",
3608 			.parent_hws = (const struct clk_hw *[]){
3609 					&nss_port1_rx_div_clk_src.clkr.hw },
3610 			.num_parents = 1,
3611 			.flags = CLK_SET_RATE_PARENT,
3612 			.ops = &clk_branch2_ops,
3613 		},
3614 	},
3615 };
3616 
3617 static struct clk_branch gcc_uniphy0_port1_tx_clk = {
3618 	.halt_reg = 0x56014,
3619 	.clkr = {
3620 		.enable_reg = 0x56014,
3621 		.enable_mask = BIT(0),
3622 		.hw.init = &(struct clk_init_data){
3623 			.name = "gcc_uniphy0_port1_tx_clk",
3624 			.parent_hws = (const struct clk_hw *[]){
3625 					&nss_port1_tx_div_clk_src.clkr.hw },
3626 			.num_parents = 1,
3627 			.flags = CLK_SET_RATE_PARENT,
3628 			.ops = &clk_branch2_ops,
3629 		},
3630 	},
3631 };
3632 
3633 static struct clk_branch gcc_uniphy0_port2_rx_clk = {
3634 	.halt_reg = 0x56018,
3635 	.clkr = {
3636 		.enable_reg = 0x56018,
3637 		.enable_mask = BIT(0),
3638 		.hw.init = &(struct clk_init_data){
3639 			.name = "gcc_uniphy0_port2_rx_clk",
3640 			.parent_hws = (const struct clk_hw *[]){
3641 					&nss_port2_rx_div_clk_src.clkr.hw },
3642 			.num_parents = 1,
3643 			.flags = CLK_SET_RATE_PARENT,
3644 			.ops = &clk_branch2_ops,
3645 		},
3646 	},
3647 };
3648 
3649 static struct clk_branch gcc_uniphy0_port2_tx_clk = {
3650 	.halt_reg = 0x5601c,
3651 	.clkr = {
3652 		.enable_reg = 0x5601c,
3653 		.enable_mask = BIT(0),
3654 		.hw.init = &(struct clk_init_data){
3655 			.name = "gcc_uniphy0_port2_tx_clk",
3656 			.parent_hws = (const struct clk_hw *[]){
3657 					&nss_port2_tx_div_clk_src.clkr.hw },
3658 			.num_parents = 1,
3659 			.flags = CLK_SET_RATE_PARENT,
3660 			.ops = &clk_branch2_ops,
3661 		},
3662 	},
3663 };
3664 
3665 static struct clk_branch gcc_uniphy0_port3_rx_clk = {
3666 	.halt_reg = 0x56020,
3667 	.clkr = {
3668 		.enable_reg = 0x56020,
3669 		.enable_mask = BIT(0),
3670 		.hw.init = &(struct clk_init_data){
3671 			.name = "gcc_uniphy0_port3_rx_clk",
3672 			.parent_hws = (const struct clk_hw *[]){
3673 					&nss_port3_rx_div_clk_src.clkr.hw },
3674 			.num_parents = 1,
3675 			.flags = CLK_SET_RATE_PARENT,
3676 			.ops = &clk_branch2_ops,
3677 		},
3678 	},
3679 };
3680 
3681 static struct clk_branch gcc_uniphy0_port3_tx_clk = {
3682 	.halt_reg = 0x56024,
3683 	.clkr = {
3684 		.enable_reg = 0x56024,
3685 		.enable_mask = BIT(0),
3686 		.hw.init = &(struct clk_init_data){
3687 			.name = "gcc_uniphy0_port3_tx_clk",
3688 			.parent_hws = (const struct clk_hw *[]){
3689 					&nss_port3_tx_div_clk_src.clkr.hw },
3690 			.num_parents = 1,
3691 			.flags = CLK_SET_RATE_PARENT,
3692 			.ops = &clk_branch2_ops,
3693 		},
3694 	},
3695 };
3696 
3697 static struct clk_branch gcc_uniphy0_port4_rx_clk = {
3698 	.halt_reg = 0x56028,
3699 	.clkr = {
3700 		.enable_reg = 0x56028,
3701 		.enable_mask = BIT(0),
3702 		.hw.init = &(struct clk_init_data){
3703 			.name = "gcc_uniphy0_port4_rx_clk",
3704 			.parent_hws = (const struct clk_hw *[]){
3705 					&nss_port4_rx_div_clk_src.clkr.hw },
3706 			.num_parents = 1,
3707 			.flags = CLK_SET_RATE_PARENT,
3708 			.ops = &clk_branch2_ops,
3709 		},
3710 	},
3711 };
3712 
3713 static struct clk_branch gcc_uniphy0_port4_tx_clk = {
3714 	.halt_reg = 0x5602c,
3715 	.clkr = {
3716 		.enable_reg = 0x5602c,
3717 		.enable_mask = BIT(0),
3718 		.hw.init = &(struct clk_init_data){
3719 			.name = "gcc_uniphy0_port4_tx_clk",
3720 			.parent_hws = (const struct clk_hw *[]){
3721 					&nss_port4_tx_div_clk_src.clkr.hw },
3722 			.num_parents = 1,
3723 			.flags = CLK_SET_RATE_PARENT,
3724 			.ops = &clk_branch2_ops,
3725 		},
3726 	},
3727 };
3728 
3729 static struct clk_branch gcc_uniphy0_port5_rx_clk = {
3730 	.halt_reg = 0x56030,
3731 	.clkr = {
3732 		.enable_reg = 0x56030,
3733 		.enable_mask = BIT(0),
3734 		.hw.init = &(struct clk_init_data){
3735 			.name = "gcc_uniphy0_port5_rx_clk",
3736 			.parent_hws = (const struct clk_hw *[]){
3737 					&nss_port5_rx_div_clk_src.clkr.hw },
3738 			.num_parents = 1,
3739 			.flags = CLK_SET_RATE_PARENT,
3740 			.ops = &clk_branch2_ops,
3741 		},
3742 	},
3743 };
3744 
3745 static struct clk_branch gcc_uniphy0_port5_tx_clk = {
3746 	.halt_reg = 0x56034,
3747 	.clkr = {
3748 		.enable_reg = 0x56034,
3749 		.enable_mask = BIT(0),
3750 		.hw.init = &(struct clk_init_data){
3751 			.name = "gcc_uniphy0_port5_tx_clk",
3752 			.parent_hws = (const struct clk_hw *[]){
3753 					&nss_port5_tx_div_clk_src.clkr.hw },
3754 			.num_parents = 1,
3755 			.flags = CLK_SET_RATE_PARENT,
3756 			.ops = &clk_branch2_ops,
3757 		},
3758 	},
3759 };
3760 
3761 static struct clk_branch gcc_uniphy0_sys_clk = {
3762 	.halt_reg = 0x5600C,
3763 	.clkr = {
3764 		.enable_reg = 0x5600C,
3765 		.enable_mask = BIT(0),
3766 		.hw.init = &(struct clk_init_data){
3767 			.name = "gcc_uniphy0_sys_clk",
3768 			.parent_hws = (const struct clk_hw *[]){
3769 					&gcc_xo_clk_src.clkr.hw },
3770 			.num_parents = 1,
3771 			.flags = CLK_SET_RATE_PARENT,
3772 			.ops = &clk_branch2_ops,
3773 		},
3774 	},
3775 };
3776 
3777 static struct clk_branch gcc_uniphy1_ahb_clk = {
3778 	.halt_reg = 0x56108,
3779 	.clkr = {
3780 		.enable_reg = 0x56108,
3781 		.enable_mask = BIT(0),
3782 		.hw.init = &(struct clk_init_data){
3783 			.name = "gcc_uniphy1_ahb_clk",
3784 			.parent_hws = (const struct clk_hw *[]){
3785 					&pcnoc_bfdcd_clk_src.clkr.hw },
3786 			.num_parents = 1,
3787 			.flags = CLK_SET_RATE_PARENT,
3788 			.ops = &clk_branch2_ops,
3789 		},
3790 	},
3791 };
3792 
3793 static struct clk_branch gcc_uniphy1_port5_rx_clk = {
3794 	.halt_reg = 0x56110,
3795 	.clkr = {
3796 		.enable_reg = 0x56110,
3797 		.enable_mask = BIT(0),
3798 		.hw.init = &(struct clk_init_data){
3799 			.name = "gcc_uniphy1_port5_rx_clk",
3800 			.parent_hws = (const struct clk_hw *[]){
3801 					&nss_port5_rx_div_clk_src.clkr.hw },
3802 			.num_parents = 1,
3803 			.flags = CLK_SET_RATE_PARENT,
3804 			.ops = &clk_branch2_ops,
3805 		},
3806 	},
3807 };
3808 
3809 static struct clk_branch gcc_uniphy1_port5_tx_clk = {
3810 	.halt_reg = 0x56114,
3811 	.clkr = {
3812 		.enable_reg = 0x56114,
3813 		.enable_mask = BIT(0),
3814 		.hw.init = &(struct clk_init_data){
3815 			.name = "gcc_uniphy1_port5_tx_clk",
3816 			.parent_hws = (const struct clk_hw *[]){
3817 					&nss_port5_tx_div_clk_src.clkr.hw },
3818 			.num_parents = 1,
3819 			.flags = CLK_SET_RATE_PARENT,
3820 			.ops = &clk_branch2_ops,
3821 		},
3822 	},
3823 };
3824 
3825 static struct clk_branch gcc_uniphy1_sys_clk = {
3826 	.halt_reg = 0x5610C,
3827 	.clkr = {
3828 		.enable_reg = 0x5610C,
3829 		.enable_mask = BIT(0),
3830 		.hw.init = &(struct clk_init_data){
3831 			.name = "gcc_uniphy1_sys_clk",
3832 			.parent_hws = (const struct clk_hw *[]){
3833 					&gcc_xo_clk_src.clkr.hw },
3834 			.num_parents = 1,
3835 			.flags = CLK_SET_RATE_PARENT,
3836 			.ops = &clk_branch2_ops,
3837 		},
3838 	},
3839 };
3840 
3841 static struct clk_branch gcc_usb0_aux_clk = {
3842 	.halt_reg = 0x3e044,
3843 	.clkr = {
3844 		.enable_reg = 0x3e044,
3845 		.enable_mask = BIT(0),
3846 		.hw.init = &(struct clk_init_data){
3847 			.name = "gcc_usb0_aux_clk",
3848 			.parent_hws = (const struct clk_hw *[]){
3849 					&usb0_aux_clk_src.clkr.hw },
3850 			.num_parents = 1,
3851 			.flags = CLK_SET_RATE_PARENT,
3852 			.ops = &clk_branch2_ops,
3853 		},
3854 	},
3855 };
3856 
3857 static struct clk_branch gcc_usb0_master_clk = {
3858 	.halt_reg = 0x3e000,
3859 	.clkr = {
3860 		.enable_reg = 0x3e000,
3861 		.enable_mask = BIT(0),
3862 		.hw.init = &(struct clk_init_data){
3863 			.name = "gcc_usb0_master_clk",
3864 			.parent_hws = (const struct clk_hw *[]){
3865 					&usb0_master_clk_src.clkr.hw },
3866 			.num_parents = 1,
3867 			.flags = CLK_SET_RATE_PARENT,
3868 			.ops = &clk_branch2_ops,
3869 		},
3870 	},
3871 };
3872 
3873 static struct clk_branch gcc_snoc_bus_timeout2_ahb_clk = {
3874 	.halt_reg = 0x47014,
3875 	.clkr = {
3876 		.enable_reg = 0x47014,
3877 		.enable_mask = BIT(0),
3878 		.hw.init = &(struct clk_init_data){
3879 			.name = "gcc_snoc_bus_timeout2_ahb_clk",
3880 			.parent_hws = (const struct clk_hw *[]){
3881 					&usb0_master_clk_src.clkr.hw },
3882 			.num_parents = 1,
3883 			.flags = CLK_SET_RATE_PARENT,
3884 			.ops = &clk_branch2_ops,
3885 		},
3886 	},
3887 };
3888 
3889 static struct clk_rcg2 pcie0_rchng_clk_src = {
3890 	.cmd_rcgr = 0x75070,
3891 	.freq_tbl = ftbl_pcie_rchng_clk_src,
3892 	.hid_width = 5,
3893 	.parent_map = gcc_xo_gpll0_map,
3894 	.clkr.hw.init = &(struct clk_init_data){
3895 		.name = "pcie0_rchng_clk_src",
3896 		.parent_data = gcc_xo_gpll0,
3897 		.num_parents = 2,
3898 		.ops = &clk_rcg2_ops,
3899 	},
3900 };
3901 
3902 static struct clk_branch gcc_pcie0_rchng_clk = {
3903 	.halt_reg = 0x75070,
3904 	.clkr = {
3905 		.enable_reg = 0x75070,
3906 		.enable_mask = BIT(1),
3907 		.hw.init = &(struct clk_init_data){
3908 			.name = "gcc_pcie0_rchng_clk",
3909 			.parent_hws = (const struct clk_hw *[]){
3910 					&pcie0_rchng_clk_src.clkr.hw },
3911 			.num_parents = 1,
3912 			.flags = CLK_SET_RATE_PARENT,
3913 			.ops = &clk_branch2_ops,
3914 		},
3915 	},
3916 };
3917 
3918 static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
3919 	.halt_reg = 0x75048,
3920 	.clkr = {
3921 		.enable_reg = 0x75048,
3922 		.enable_mask = BIT(0),
3923 		.hw.init = &(struct clk_init_data){
3924 			.name = "gcc_pcie0_axi_s_bridge_clk",
3925 			.parent_hws = (const struct clk_hw *[]){
3926 					&pcie0_axi_clk_src.clkr.hw },
3927 			.num_parents = 1,
3928 			.flags = CLK_SET_RATE_PARENT,
3929 			.ops = &clk_branch2_ops,
3930 		},
3931 	},
3932 };
3933 
3934 static struct clk_branch gcc_sys_noc_usb0_axi_clk = {
3935 	.halt_reg = 0x26040,
3936 	.clkr = {
3937 		.enable_reg = 0x26040,
3938 		.enable_mask = BIT(0),
3939 		.hw.init = &(struct clk_init_data){
3940 			.name = "gcc_sys_noc_usb0_axi_clk",
3941 			.parent_hws = (const struct clk_hw *[]){
3942 					&usb0_master_clk_src.clkr.hw },
3943 			.num_parents = 1,
3944 			.flags = CLK_SET_RATE_PARENT,
3945 			.ops = &clk_branch2_ops,
3946 		},
3947 	},
3948 };
3949 
3950 static struct clk_branch gcc_usb0_mock_utmi_clk = {
3951 	.halt_reg = 0x3e008,
3952 	.clkr = {
3953 		.enable_reg = 0x3e008,
3954 		.enable_mask = BIT(0),
3955 		.hw.init = &(struct clk_init_data){
3956 			.name = "gcc_usb0_mock_utmi_clk",
3957 			.parent_hws = (const struct clk_hw *[]){
3958 					&usb0_mock_utmi_clk_src.clkr.hw },
3959 			.num_parents = 1,
3960 			.flags = CLK_SET_RATE_PARENT,
3961 			.ops = &clk_branch2_ops,
3962 		},
3963 	},
3964 };
3965 
3966 static struct clk_branch gcc_usb0_phy_cfg_ahb_clk = {
3967 	.halt_reg = 0x3e080,
3968 	.clkr = {
3969 		.enable_reg = 0x3e080,
3970 		.enable_mask = BIT(0),
3971 		.hw.init = &(struct clk_init_data){
3972 			.name = "gcc_usb0_phy_cfg_ahb_clk",
3973 			.parent_hws = (const struct clk_hw *[]){
3974 					&pcnoc_bfdcd_clk_src.clkr.hw },
3975 			.num_parents = 1,
3976 			.flags = CLK_SET_RATE_PARENT,
3977 			.ops = &clk_branch2_ops,
3978 		},
3979 	},
3980 };
3981 
3982 static struct clk_branch gcc_usb0_pipe_clk = {
3983 	.halt_reg = 0x3e040,
3984 	.halt_check = BRANCH_HALT_DELAY,
3985 	.clkr = {
3986 		.enable_reg = 0x3e040,
3987 		.enable_mask = BIT(0),
3988 		.hw.init = &(struct clk_init_data){
3989 			.name = "gcc_usb0_pipe_clk",
3990 			.parent_hws = (const struct clk_hw *[]){
3991 					&usb0_pipe_clk_src.clkr.hw },
3992 			.num_parents = 1,
3993 			.flags = CLK_SET_RATE_PARENT,
3994 			.ops = &clk_branch2_ops,
3995 		},
3996 	},
3997 };
3998 
3999 static struct clk_branch gcc_usb0_sleep_clk = {
4000 	.halt_reg = 0x3e004,
4001 	.clkr = {
4002 		.enable_reg = 0x3e004,
4003 		.enable_mask = BIT(0),
4004 		.hw.init = &(struct clk_init_data){
4005 			.name = "gcc_usb0_sleep_clk",
4006 			.parent_hws = (const struct clk_hw *[]){
4007 					&gcc_sleep_clk_src.clkr.hw },
4008 			.num_parents = 1,
4009 			.flags = CLK_SET_RATE_PARENT,
4010 			.ops = &clk_branch2_ops,
4011 		},
4012 	},
4013 };
4014 
4015 static struct clk_branch gcc_usb1_master_clk = {
4016 	.halt_reg = 0x3f000,
4017 	.clkr = {
4018 		.enable_reg = 0x3f000,
4019 		.enable_mask = BIT(0),
4020 		.hw.init = &(struct clk_init_data){
4021 			.name = "gcc_usb1_master_clk",
4022 			.parent_hws = (const struct clk_hw *[]){
4023 					&pcnoc_bfdcd_clk_src.clkr.hw },
4024 			.num_parents = 1,
4025 			.flags = CLK_SET_RATE_PARENT,
4026 			.ops = &clk_branch2_ops,
4027 		},
4028 	},
4029 };
4030 
4031 static struct clk_branch gcc_usb1_mock_utmi_clk = {
4032 	.halt_reg = 0x3f008,
4033 	.clkr = {
4034 		.enable_reg = 0x3f008,
4035 		.enable_mask = BIT(0),
4036 		.hw.init = &(struct clk_init_data){
4037 			.name = "gcc_usb1_mock_utmi_clk",
4038 			.parent_hws = (const struct clk_hw *[]){
4039 					&usb1_mock_utmi_clk_src.clkr.hw },
4040 			.num_parents = 1,
4041 			.flags = CLK_SET_RATE_PARENT,
4042 			.ops = &clk_branch2_ops,
4043 		},
4044 	},
4045 };
4046 
4047 static struct clk_branch gcc_usb1_phy_cfg_ahb_clk = {
4048 	.halt_reg = 0x3f080,
4049 	.clkr = {
4050 		.enable_reg = 0x3f080,
4051 		.enable_mask = BIT(0),
4052 		.hw.init = &(struct clk_init_data){
4053 			.name = "gcc_usb1_phy_cfg_ahb_clk",
4054 			.parent_hws = (const struct clk_hw *[]){
4055 					&pcnoc_bfdcd_clk_src.clkr.hw },
4056 			.num_parents = 1,
4057 			.flags = CLK_SET_RATE_PARENT,
4058 			.ops = &clk_branch2_ops,
4059 		},
4060 	},
4061 };
4062 
4063 static struct clk_branch gcc_usb1_sleep_clk = {
4064 	.halt_reg = 0x3f004,
4065 	.clkr = {
4066 		.enable_reg = 0x3f004,
4067 		.enable_mask = BIT(0),
4068 		.hw.init = &(struct clk_init_data){
4069 			.name = "gcc_usb1_sleep_clk",
4070 			.parent_hws = (const struct clk_hw *[]){
4071 					&gcc_sleep_clk_src.clkr.hw },
4072 			.num_parents = 1,
4073 			.flags = CLK_SET_RATE_PARENT,
4074 			.ops = &clk_branch2_ops,
4075 		},
4076 	},
4077 };
4078 
4079 static struct clk_branch gcc_cmn_12gpll_ahb_clk = {
4080 	.halt_reg = 0x56308,
4081 	.clkr = {
4082 		.enable_reg = 0x56308,
4083 		.enable_mask = BIT(0),
4084 		.hw.init = &(struct clk_init_data){
4085 			.name = "gcc_cmn_12gpll_ahb_clk",
4086 			.parent_hws = (const struct clk_hw *[]){
4087 					&pcnoc_bfdcd_clk_src.clkr.hw },
4088 			.num_parents = 1,
4089 			.flags = CLK_SET_RATE_PARENT,
4090 			.ops = &clk_branch2_ops,
4091 		},
4092 	},
4093 };
4094 
4095 static struct clk_branch gcc_cmn_12gpll_sys_clk = {
4096 	.halt_reg = 0x5630c,
4097 	.clkr = {
4098 		.enable_reg = 0x5630c,
4099 		.enable_mask = BIT(0),
4100 		.hw.init = &(struct clk_init_data){
4101 			.name = "gcc_cmn_12gpll_sys_clk",
4102 			.parent_hws = (const struct clk_hw *[]){
4103 					&gcc_xo_clk_src.clkr.hw },
4104 			.num_parents = 1,
4105 			.flags = CLK_SET_RATE_PARENT,
4106 			.ops = &clk_branch2_ops,
4107 		},
4108 	},
4109 };
4110 
4111 static struct clk_branch gcc_sdcc1_ice_core_clk = {
4112 	.halt_reg = 0x5d014,
4113 	.clkr = {
4114 		.enable_reg = 0x5d014,
4115 		.enable_mask = BIT(0),
4116 		.hw.init = &(struct clk_init_data){
4117 			.name = "gcc_sdcc1_ice_core_clk",
4118 			.parent_hws = (const struct clk_hw *[]){
4119 					&sdcc1_ice_core_clk_src.clkr.hw },
4120 			.num_parents = 1,
4121 			.flags = CLK_SET_RATE_PARENT,
4122 			.ops = &clk_branch2_ops,
4123 		},
4124 	},
4125 };
4126 
4127 static struct clk_branch gcc_dcc_clk = {
4128 	.halt_reg = 0x77004,
4129 	.clkr = {
4130 		.enable_reg = 0x77004,
4131 		.enable_mask = BIT(0),
4132 		.hw.init = &(struct clk_init_data){
4133 			.name = "gcc_dcc_clk",
4134 			.parent_hws = (const struct clk_hw *[]){
4135 					&pcnoc_bfdcd_clk_src.clkr.hw },
4136 			.num_parents = 1,
4137 			.flags = CLK_SET_RATE_PARENT,
4138 			.ops = &clk_branch2_ops,
4139 		},
4140 	},
4141 };
4142 
4143 static const struct alpha_pll_config ubi32_pll_config = {
4144 	.l = 0x3e,
4145 	.alpha = 0x6667,
4146 	.config_ctl_val = 0x240d4828,
4147 	.config_ctl_hi_val = 0x6,
4148 	.main_output_mask = BIT(0),
4149 	.aux_output_mask = BIT(1),
4150 	.pre_div_val = 0x0,
4151 	.pre_div_mask = BIT(12),
4152 	.post_div_val = 0x0,
4153 	.post_div_mask = GENMASK(9, 8),
4154 	.alpha_en_mask = BIT(24),
4155 	.test_ctl_val = 0x1C0000C0,
4156 	.test_ctl_hi_val = 0x4000,
4157 };
4158 
4159 static const struct alpha_pll_config nss_crypto_pll_config = {
4160 	.l = 0x32,
4161 	.alpha = 0x0,
4162 	.alpha_hi = 0x0,
4163 	.config_ctl_val = 0x4001055b,
4164 	.main_output_mask = BIT(0),
4165 	.pre_div_val = 0x0,
4166 	.pre_div_mask = GENMASK(14, 12),
4167 	.post_div_val = 0x1 << 8,
4168 	.post_div_mask = GENMASK(11, 8),
4169 	.vco_mask = GENMASK(21, 20),
4170 	.vco_val = 0x0,
4171 	.alpha_en_mask = BIT(24),
4172 };
4173 
4174 static struct clk_hw *gcc_ipq6018_hws[] = {
4175 	&gpll0_out_main_div2.hw,
4176 	&gcc_xo_div4_clk_src.hw,
4177 	&nss_ppe_cdiv_clk_src.hw,
4178 	&gpll6_out_main_div2.hw,
4179 	&qdss_dap_sync_clk_src.hw,
4180 	&qdss_tsctr_div2_clk_src.hw,
4181 };
4182 
4183 static struct clk_regmap *gcc_ipq6018_clks[] = {
4184 	[GPLL0_MAIN] = &gpll0_main.clkr,
4185 	[GPLL0] = &gpll0.clkr,
4186 	[UBI32_PLL_MAIN] = &ubi32_pll_main.clkr,
4187 	[UBI32_PLL] = &ubi32_pll.clkr,
4188 	[GPLL6_MAIN] = &gpll6_main.clkr,
4189 	[GPLL6] = &gpll6.clkr,
4190 	[GPLL4_MAIN] = &gpll4_main.clkr,
4191 	[GPLL4] = &gpll4.clkr,
4192 	[PCNOC_BFDCD_CLK_SRC] = &pcnoc_bfdcd_clk_src.clkr,
4193 	[GPLL2_MAIN] = &gpll2_main.clkr,
4194 	[GPLL2] = &gpll2.clkr,
4195 	[NSS_CRYPTO_PLL_MAIN] = &nss_crypto_pll_main.clkr,
4196 	[NSS_CRYPTO_PLL] = &nss_crypto_pll.clkr,
4197 	[QDSS_TSCTR_CLK_SRC] = &qdss_tsctr_clk_src.clkr,
4198 	[QDSS_AT_CLK_SRC] = &qdss_at_clk_src.clkr,
4199 	[NSS_PPE_CLK_SRC] = &nss_ppe_clk_src.clkr,
4200 	[GCC_XO_CLK_SRC] = &gcc_xo_clk_src.clkr,
4201 	[SYSTEM_NOC_BFDCD_CLK_SRC] = &system_noc_bfdcd_clk_src.clkr,
4202 	[SNOC_NSSNOC_BFDCD_CLK_SRC] = &snoc_nssnoc_bfdcd_clk_src.clkr,
4203 	[NSS_CE_CLK_SRC] = &nss_ce_clk_src.clkr,
4204 	[GCC_SLEEP_CLK_SRC] = &gcc_sleep_clk_src.clkr,
4205 	[APSS_AHB_CLK_SRC] = &apss_ahb_clk_src.clkr,
4206 	[NSS_PORT5_RX_CLK_SRC] = &nss_port5_rx_clk_src.clkr,
4207 	[NSS_PORT5_TX_CLK_SRC] = &nss_port5_tx_clk_src.clkr,
4208 	[UBI32_MEM_NOC_BFDCD_CLK_SRC] = &ubi32_mem_noc_bfdcd_clk_src.clkr,
4209 	[PCIE0_AXI_CLK_SRC] = &pcie0_axi_clk_src.clkr,
4210 	[USB0_MASTER_CLK_SRC] = &usb0_master_clk_src.clkr,
4211 	[APSS_AHB_POSTDIV_CLK_SRC] = &apss_ahb_postdiv_clk_src.clkr,
4212 	[NSS_PORT1_RX_CLK_SRC] = &nss_port1_rx_clk_src.clkr,
4213 	[NSS_PORT1_TX_CLK_SRC] = &nss_port1_tx_clk_src.clkr,
4214 	[NSS_PORT2_RX_CLK_SRC] = &nss_port2_rx_clk_src.clkr,
4215 	[NSS_PORT2_TX_CLK_SRC] = &nss_port2_tx_clk_src.clkr,
4216 	[NSS_PORT3_RX_CLK_SRC] = &nss_port3_rx_clk_src.clkr,
4217 	[NSS_PORT3_TX_CLK_SRC] = &nss_port3_tx_clk_src.clkr,
4218 	[NSS_PORT4_RX_CLK_SRC] = &nss_port4_rx_clk_src.clkr,
4219 	[NSS_PORT4_TX_CLK_SRC] = &nss_port4_tx_clk_src.clkr,
4220 	[NSS_PORT5_RX_DIV_CLK_SRC] = &nss_port5_rx_div_clk_src.clkr,
4221 	[NSS_PORT5_TX_DIV_CLK_SRC] = &nss_port5_tx_div_clk_src.clkr,
4222 	[APSS_AXI_CLK_SRC] = &apss_axi_clk_src.clkr,
4223 	[NSS_CRYPTO_CLK_SRC] = &nss_crypto_clk_src.clkr,
4224 	[NSS_PORT1_RX_DIV_CLK_SRC] = &nss_port1_rx_div_clk_src.clkr,
4225 	[NSS_PORT1_TX_DIV_CLK_SRC] = &nss_port1_tx_div_clk_src.clkr,
4226 	[NSS_PORT2_RX_DIV_CLK_SRC] = &nss_port2_rx_div_clk_src.clkr,
4227 	[NSS_PORT2_TX_DIV_CLK_SRC] = &nss_port2_tx_div_clk_src.clkr,
4228 	[NSS_PORT3_RX_DIV_CLK_SRC] = &nss_port3_rx_div_clk_src.clkr,
4229 	[NSS_PORT3_TX_DIV_CLK_SRC] = &nss_port3_tx_div_clk_src.clkr,
4230 	[NSS_PORT4_RX_DIV_CLK_SRC] = &nss_port4_rx_div_clk_src.clkr,
4231 	[NSS_PORT4_TX_DIV_CLK_SRC] = &nss_port4_tx_div_clk_src.clkr,
4232 	[NSS_UBI0_CLK_SRC] = &nss_ubi0_clk_src.clkr,
4233 	[ADSS_PWM_CLK_SRC] = &adss_pwm_clk_src.clkr,
4234 	[BLSP1_QUP1_I2C_APPS_CLK_SRC] = &blsp1_qup1_i2c_apps_clk_src.clkr,
4235 	[BLSP1_QUP1_SPI_APPS_CLK_SRC] = &blsp1_qup1_spi_apps_clk_src.clkr,
4236 	[BLSP1_QUP2_I2C_APPS_CLK_SRC] = &blsp1_qup2_i2c_apps_clk_src.clkr,
4237 	[BLSP1_QUP2_SPI_APPS_CLK_SRC] = &blsp1_qup2_spi_apps_clk_src.clkr,
4238 	[BLSP1_QUP3_I2C_APPS_CLK_SRC] = &blsp1_qup3_i2c_apps_clk_src.clkr,
4239 	[BLSP1_QUP3_SPI_APPS_CLK_SRC] = &blsp1_qup3_spi_apps_clk_src.clkr,
4240 	[BLSP1_QUP4_I2C_APPS_CLK_SRC] = &blsp1_qup4_i2c_apps_clk_src.clkr,
4241 	[BLSP1_QUP4_SPI_APPS_CLK_SRC] = &blsp1_qup4_spi_apps_clk_src.clkr,
4242 	[BLSP1_QUP5_I2C_APPS_CLK_SRC] = &blsp1_qup5_i2c_apps_clk_src.clkr,
4243 	[BLSP1_QUP5_SPI_APPS_CLK_SRC] = &blsp1_qup5_spi_apps_clk_src.clkr,
4244 	[BLSP1_QUP6_I2C_APPS_CLK_SRC] = &blsp1_qup6_i2c_apps_clk_src.clkr,
4245 	[BLSP1_QUP6_SPI_APPS_CLK_SRC] = &blsp1_qup6_spi_apps_clk_src.clkr,
4246 	[BLSP1_UART1_APPS_CLK_SRC] = &blsp1_uart1_apps_clk_src.clkr,
4247 	[BLSP1_UART2_APPS_CLK_SRC] = &blsp1_uart2_apps_clk_src.clkr,
4248 	[BLSP1_UART3_APPS_CLK_SRC] = &blsp1_uart3_apps_clk_src.clkr,
4249 	[BLSP1_UART4_APPS_CLK_SRC] = &blsp1_uart4_apps_clk_src.clkr,
4250 	[BLSP1_UART5_APPS_CLK_SRC] = &blsp1_uart5_apps_clk_src.clkr,
4251 	[BLSP1_UART6_APPS_CLK_SRC] = &blsp1_uart6_apps_clk_src.clkr,
4252 	[CRYPTO_CLK_SRC] = &crypto_clk_src.clkr,
4253 	[GP1_CLK_SRC] = &gp1_clk_src.clkr,
4254 	[GP2_CLK_SRC] = &gp2_clk_src.clkr,
4255 	[GP3_CLK_SRC] = &gp3_clk_src.clkr,
4256 	[NSS_UBI0_DIV_CLK_SRC] = &nss_ubi0_div_clk_src.clkr,
4257 	[PCIE0_AUX_CLK_SRC] = &pcie0_aux_clk_src.clkr,
4258 	[PCIE0_PIPE_CLK_SRC] = &pcie0_pipe_clk_src.clkr,
4259 	[SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr,
4260 	[USB0_AUX_CLK_SRC] = &usb0_aux_clk_src.clkr,
4261 	[USB0_MOCK_UTMI_CLK_SRC] = &usb0_mock_utmi_clk_src.clkr,
4262 	[USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr,
4263 	[USB1_MOCK_UTMI_CLK_SRC] = &usb1_mock_utmi_clk_src.clkr,
4264 	[GCC_ADSS_PWM_CLK] = &gcc_adss_pwm_clk.clkr,
4265 	[GCC_APSS_AHB_CLK] = &gcc_apss_ahb_clk.clkr,
4266 	[GCC_APSS_AXI_CLK] = &gcc_apss_axi_clk.clkr,
4267 	[GCC_BLSP1_AHB_CLK] = &gcc_blsp1_ahb_clk.clkr,
4268 	[GCC_BLSP1_QUP1_I2C_APPS_CLK] = &gcc_blsp1_qup1_i2c_apps_clk.clkr,
4269 	[GCC_BLSP1_QUP1_SPI_APPS_CLK] = &gcc_blsp1_qup1_spi_apps_clk.clkr,
4270 	[GCC_BLSP1_QUP2_I2C_APPS_CLK] = &gcc_blsp1_qup2_i2c_apps_clk.clkr,
4271 	[GCC_BLSP1_QUP2_SPI_APPS_CLK] = &gcc_blsp1_qup2_spi_apps_clk.clkr,
4272 	[GCC_BLSP1_QUP3_I2C_APPS_CLK] = &gcc_blsp1_qup3_i2c_apps_clk.clkr,
4273 	[GCC_BLSP1_QUP3_SPI_APPS_CLK] = &gcc_blsp1_qup3_spi_apps_clk.clkr,
4274 	[GCC_BLSP1_QUP4_I2C_APPS_CLK] = &gcc_blsp1_qup4_i2c_apps_clk.clkr,
4275 	[GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
4276 	[GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
4277 	[GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
4278 	[GCC_BLSP1_QUP6_SPI_APPS_CLK] = &gcc_blsp1_qup6_spi_apps_clk.clkr,
4279 	[GCC_BLSP1_UART1_APPS_CLK] = &gcc_blsp1_uart1_apps_clk.clkr,
4280 	[GCC_BLSP1_UART2_APPS_CLK] = &gcc_blsp1_uart2_apps_clk.clkr,
4281 	[GCC_BLSP1_UART3_APPS_CLK] = &gcc_blsp1_uart3_apps_clk.clkr,
4282 	[GCC_BLSP1_UART4_APPS_CLK] = &gcc_blsp1_uart4_apps_clk.clkr,
4283 	[GCC_BLSP1_UART5_APPS_CLK] = &gcc_blsp1_uart5_apps_clk.clkr,
4284 	[GCC_BLSP1_UART6_APPS_CLK] = &gcc_blsp1_uart6_apps_clk.clkr,
4285 	[GCC_CRYPTO_AHB_CLK] = &gcc_crypto_ahb_clk.clkr,
4286 	[GCC_CRYPTO_AXI_CLK] = &gcc_crypto_axi_clk.clkr,
4287 	[GCC_CRYPTO_CLK] = &gcc_crypto_clk.clkr,
4288 	[GCC_XO_CLK] = &gcc_xo_clk.clkr,
4289 	[GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
4290 	[GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
4291 	[GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
4292 	[GCC_MDIO_AHB_CLK] = &gcc_mdio_ahb_clk.clkr,
4293 	[GCC_CRYPTO_PPE_CLK] = &gcc_crypto_ppe_clk.clkr,
4294 	[GCC_NSS_CE_APB_CLK] = &gcc_nss_ce_apb_clk.clkr,
4295 	[GCC_NSS_CE_AXI_CLK] = &gcc_nss_ce_axi_clk.clkr,
4296 	[GCC_NSS_CFG_CLK] = &gcc_nss_cfg_clk.clkr,
4297 	[GCC_NSS_CRYPTO_CLK] = &gcc_nss_crypto_clk.clkr,
4298 	[GCC_NSS_CSR_CLK] = &gcc_nss_csr_clk.clkr,
4299 	[GCC_NSS_EDMA_CFG_CLK] = &gcc_nss_edma_cfg_clk.clkr,
4300 	[GCC_NSS_EDMA_CLK] = &gcc_nss_edma_clk.clkr,
4301 	[GCC_NSS_NOC_CLK] = &gcc_nss_noc_clk.clkr,
4302 	[GCC_UBI0_UTCM_CLK] = &gcc_ubi0_utcm_clk.clkr,
4303 	[GCC_SNOC_NSSNOC_CLK] = &gcc_snoc_nssnoc_clk.clkr,
4304 	[GCC_NSS_PORT1_RX_CLK] = &gcc_nss_port1_rx_clk.clkr,
4305 	[GCC_NSS_PORT1_TX_CLK] = &gcc_nss_port1_tx_clk.clkr,
4306 	[GCC_NSS_PORT2_RX_CLK] = &gcc_nss_port2_rx_clk.clkr,
4307 	[GCC_NSS_PORT2_TX_CLK] = &gcc_nss_port2_tx_clk.clkr,
4308 	[GCC_NSS_PORT3_RX_CLK] = &gcc_nss_port3_rx_clk.clkr,
4309 	[GCC_NSS_PORT3_TX_CLK] = &gcc_nss_port3_tx_clk.clkr,
4310 	[GCC_NSS_PORT4_RX_CLK] = &gcc_nss_port4_rx_clk.clkr,
4311 	[GCC_NSS_PORT4_TX_CLK] = &gcc_nss_port4_tx_clk.clkr,
4312 	[GCC_NSS_PORT5_RX_CLK] = &gcc_nss_port5_rx_clk.clkr,
4313 	[GCC_NSS_PORT5_TX_CLK] = &gcc_nss_port5_tx_clk.clkr,
4314 	[GCC_NSS_PPE_CFG_CLK] = &gcc_nss_ppe_cfg_clk.clkr,
4315 	[GCC_NSS_PPE_CLK] = &gcc_nss_ppe_clk.clkr,
4316 	[GCC_NSS_PPE_IPE_CLK] = &gcc_nss_ppe_ipe_clk.clkr,
4317 	[GCC_NSS_PTP_REF_CLK] = &gcc_nss_ptp_ref_clk.clkr,
4318 	[GCC_NSSNOC_CE_APB_CLK] = &gcc_nssnoc_ce_apb_clk.clkr,
4319 	[GCC_NSSNOC_CE_AXI_CLK] = &gcc_nssnoc_ce_axi_clk.clkr,
4320 	[GCC_NSSNOC_CRYPTO_CLK] = &gcc_nssnoc_crypto_clk.clkr,
4321 	[GCC_NSSNOC_PPE_CFG_CLK] = &gcc_nssnoc_ppe_cfg_clk.clkr,
4322 	[GCC_NSSNOC_PPE_CLK] = &gcc_nssnoc_ppe_clk.clkr,
4323 	[GCC_NSSNOC_QOSGEN_REF_CLK] = &gcc_nssnoc_qosgen_ref_clk.clkr,
4324 	[GCC_NSSNOC_SNOC_CLK] = &gcc_nssnoc_snoc_clk.clkr,
4325 	[GCC_NSSNOC_TIMEOUT_REF_CLK] = &gcc_nssnoc_timeout_ref_clk.clkr,
4326 	[GCC_NSSNOC_UBI0_AHB_CLK] = &gcc_nssnoc_ubi0_ahb_clk.clkr,
4327 	[GCC_PORT1_MAC_CLK] = &gcc_port1_mac_clk.clkr,
4328 	[GCC_PORT2_MAC_CLK] = &gcc_port2_mac_clk.clkr,
4329 	[GCC_PORT3_MAC_CLK] = &gcc_port3_mac_clk.clkr,
4330 	[GCC_PORT4_MAC_CLK] = &gcc_port4_mac_clk.clkr,
4331 	[GCC_PORT5_MAC_CLK] = &gcc_port5_mac_clk.clkr,
4332 	[GCC_UBI0_AHB_CLK] = &gcc_ubi0_ahb_clk.clkr,
4333 	[GCC_UBI0_AXI_CLK] = &gcc_ubi0_axi_clk.clkr,
4334 	[GCC_UBI0_NC_AXI_CLK] = &gcc_ubi0_nc_axi_clk.clkr,
4335 	[GCC_UBI0_CORE_CLK] = &gcc_ubi0_core_clk.clkr,
4336 	[GCC_PCIE0_AHB_CLK] = &gcc_pcie0_ahb_clk.clkr,
4337 	[GCC_PCIE0_AUX_CLK] = &gcc_pcie0_aux_clk.clkr,
4338 	[GCC_PCIE0_AXI_M_CLK] = &gcc_pcie0_axi_m_clk.clkr,
4339 	[GCC_PCIE0_AXI_S_CLK] = &gcc_pcie0_axi_s_clk.clkr,
4340 	[GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
4341 	[GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
4342 	[GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
4343 	[GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
4344 	[GCC_QPIC_AHB_CLK] = &gcc_qpic_ahb_clk.clkr,
4345 	[GCC_QPIC_CLK] = &gcc_qpic_clk.clkr,
4346 	[GCC_SDCC1_AHB_CLK] = &gcc_sdcc1_ahb_clk.clkr,
4347 	[GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr,
4348 	[GCC_UNIPHY0_AHB_CLK] = &gcc_uniphy0_ahb_clk.clkr,
4349 	[GCC_UNIPHY0_PORT1_RX_CLK] = &gcc_uniphy0_port1_rx_clk.clkr,
4350 	[GCC_UNIPHY0_PORT1_TX_CLK] = &gcc_uniphy0_port1_tx_clk.clkr,
4351 	[GCC_UNIPHY0_PORT2_RX_CLK] = &gcc_uniphy0_port2_rx_clk.clkr,
4352 	[GCC_UNIPHY0_PORT2_TX_CLK] = &gcc_uniphy0_port2_tx_clk.clkr,
4353 	[GCC_UNIPHY0_PORT3_RX_CLK] = &gcc_uniphy0_port3_rx_clk.clkr,
4354 	[GCC_UNIPHY0_PORT3_TX_CLK] = &gcc_uniphy0_port3_tx_clk.clkr,
4355 	[GCC_UNIPHY0_PORT4_RX_CLK] = &gcc_uniphy0_port4_rx_clk.clkr,
4356 	[GCC_UNIPHY0_PORT4_TX_CLK] = &gcc_uniphy0_port4_tx_clk.clkr,
4357 	[GCC_UNIPHY0_PORT5_RX_CLK] = &gcc_uniphy0_port5_rx_clk.clkr,
4358 	[GCC_UNIPHY0_PORT5_TX_CLK] = &gcc_uniphy0_port5_tx_clk.clkr,
4359 	[GCC_UNIPHY0_SYS_CLK] = &gcc_uniphy0_sys_clk.clkr,
4360 	[GCC_UNIPHY1_AHB_CLK] = &gcc_uniphy1_ahb_clk.clkr,
4361 	[GCC_UNIPHY1_PORT5_RX_CLK] = &gcc_uniphy1_port5_rx_clk.clkr,
4362 	[GCC_UNIPHY1_PORT5_TX_CLK] = &gcc_uniphy1_port5_tx_clk.clkr,
4363 	[GCC_UNIPHY1_SYS_CLK] = &gcc_uniphy1_sys_clk.clkr,
4364 	[GCC_USB0_AUX_CLK] = &gcc_usb0_aux_clk.clkr,
4365 	[GCC_SYS_NOC_USB0_AXI_CLK] = &gcc_sys_noc_usb0_axi_clk.clkr,
4366 	[GCC_SNOC_BUS_TIMEOUT2_AHB_CLK] = &gcc_snoc_bus_timeout2_ahb_clk.clkr,
4367 	[GCC_USB0_MASTER_CLK] = &gcc_usb0_master_clk.clkr,
4368 	[GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr,
4369 	[GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr,
4370 	[GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr,
4371 	[GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr,
4372 	[GCC_USB1_MASTER_CLK] = &gcc_usb1_master_clk.clkr,
4373 	[GCC_USB1_MOCK_UTMI_CLK] = &gcc_usb1_mock_utmi_clk.clkr,
4374 	[GCC_USB1_PHY_CFG_AHB_CLK] = &gcc_usb1_phy_cfg_ahb_clk.clkr,
4375 	[GCC_USB1_SLEEP_CLK] = &gcc_usb1_sleep_clk.clkr,
4376 	[GCC_CMN_12GPLL_AHB_CLK] = &gcc_cmn_12gpll_ahb_clk.clkr,
4377 	[GCC_CMN_12GPLL_SYS_CLK] = &gcc_cmn_12gpll_sys_clk.clkr,
4378 	[GCC_SDCC1_ICE_CORE_CLK] = &gcc_sdcc1_ice_core_clk.clkr,
4379 	[SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr,
4380 	[GCC_DCC_CLK] = &gcc_dcc_clk.clkr,
4381 	[PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
4382 	[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
4383 	[PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
4384 	[WCSS_AHB_CLK_SRC] = &wcss_ahb_clk_src.clkr,
4385 	[Q6_AXI_CLK_SRC] = &q6_axi_clk_src.clkr,
4386 	[RBCPR_WCSS_CLK_SRC] = &rbcpr_wcss_clk_src.clkr,
4387 	[GCC_LPASS_CORE_AXIM_CLK] = &gcc_lpass_core_axim_clk.clkr,
4388 	[LPASS_CORE_AXIM_CLK_SRC] = &lpass_core_axim_clk_src.clkr,
4389 	[GCC_LPASS_SNOC_CFG_CLK] = &gcc_lpass_snoc_cfg_clk.clkr,
4390 	[LPASS_SNOC_CFG_CLK_SRC] = &lpass_snoc_cfg_clk_src.clkr,
4391 	[GCC_LPASS_Q6_AXIM_CLK] = &gcc_lpass_q6_axim_clk.clkr,
4392 	[LPASS_Q6_AXIM_CLK_SRC] = &lpass_q6_axim_clk_src.clkr,
4393 	[GCC_LPASS_Q6_ATBM_AT_CLK] = &gcc_lpass_q6_atbm_at_clk.clkr,
4394 	[GCC_LPASS_Q6_PCLKDBG_CLK] = &gcc_lpass_q6_pclkdbg_clk.clkr,
4395 	[GCC_LPASS_Q6SS_TSCTR_1TO2_CLK] = &gcc_lpass_q6ss_tsctr_1to2_clk.clkr,
4396 	[GCC_LPASS_Q6SS_TRIG_CLK] = &gcc_lpass_q6ss_trig_clk.clkr,
4397 	[GCC_LPASS_TBU_CLK] = &gcc_lpass_tbu_clk.clkr,
4398 	[GCC_PCNOC_LPASS_CLK] = &gcc_pcnoc_lpass_clk.clkr,
4399 	[GCC_MEM_NOC_UBI32_CLK] = &gcc_mem_noc_ubi32_clk.clkr,
4400 	[GCC_MEM_NOC_LPASS_CLK] = &gcc_mem_noc_lpass_clk.clkr,
4401 	[GCC_SNOC_LPASS_CFG_CLK] = &gcc_snoc_lpass_cfg_clk.clkr,
4402 	[QDSS_STM_CLK_SRC] = &qdss_stm_clk_src.clkr,
4403 	[QDSS_TRACECLKIN_CLK_SRC] = &qdss_traceclkin_clk_src.clkr,
4404 };
4405 
4406 static const struct qcom_reset_map gcc_ipq6018_resets[] = {
4407 	[GCC_BLSP1_BCR] = { 0x01000, 0 },
4408 	[GCC_BLSP1_QUP1_BCR] = { 0x02000, 0 },
4409 	[GCC_BLSP1_UART1_BCR] = { 0x02038, 0 },
4410 	[GCC_BLSP1_QUP2_BCR] = { 0x03008, 0 },
4411 	[GCC_BLSP1_UART2_BCR] = { 0x03028, 0 },
4412 	[GCC_BLSP1_QUP3_BCR] = { 0x04008, 0 },
4413 	[GCC_BLSP1_UART3_BCR] = { 0x04028, 0 },
4414 	[GCC_BLSP1_QUP4_BCR] = { 0x05008, 0 },
4415 	[GCC_BLSP1_UART4_BCR] = { 0x05028, 0 },
4416 	[GCC_BLSP1_QUP5_BCR] = { 0x06008, 0 },
4417 	[GCC_BLSP1_UART5_BCR] = { 0x06028, 0 },
4418 	[GCC_BLSP1_QUP6_BCR] = { 0x07008, 0 },
4419 	[GCC_BLSP1_UART6_BCR] = { 0x07028, 0 },
4420 	[GCC_IMEM_BCR] = { 0x0e000, 0 },
4421 	[GCC_SMMU_BCR] = { 0x12000, 0 },
4422 	[GCC_APSS_TCU_BCR] = { 0x12050, 0 },
4423 	[GCC_SMMU_XPU_BCR] = { 0x12054, 0 },
4424 	[GCC_PCNOC_TBU_BCR] = { 0x12058, 0 },
4425 	[GCC_SMMU_CFG_BCR] = { 0x1208c, 0 },
4426 	[GCC_PRNG_BCR] = { 0x13000, 0 },
4427 	[GCC_BOOT_ROM_BCR] = { 0x13008, 0 },
4428 	[GCC_CRYPTO_BCR] = { 0x16000, 0 },
4429 	[GCC_WCSS_BCR] = { 0x18000, 0 },
4430 	[GCC_WCSS_Q6_BCR] = { 0x18100, 0 },
4431 	[GCC_NSS_BCR] = { 0x19000, 0 },
4432 	[GCC_SEC_CTRL_BCR] = { 0x1a000, 0 },
4433 	[GCC_ADSS_BCR] = { 0x1c000, 0 },
4434 	[GCC_DDRSS_BCR] = { 0x1e000, 0 },
4435 	[GCC_SYSTEM_NOC_BCR] = { 0x26000, 0 },
4436 	[GCC_PCNOC_BCR] = { 0x27018, 0 },
4437 	[GCC_TCSR_BCR] = { 0x28000, 0 },
4438 	[GCC_QDSS_BCR] = { 0x29000, 0 },
4439 	[GCC_DCD_BCR] = { 0x2a000, 0 },
4440 	[GCC_MSG_RAM_BCR] = { 0x2b000, 0 },
4441 	[GCC_MPM_BCR] = { 0x2c000, 0 },
4442 	[GCC_SPDM_BCR] = { 0x2f000, 0 },
4443 	[GCC_RBCPR_BCR] = { 0x33000, 0 },
4444 	[GCC_RBCPR_MX_BCR] = { 0x33014, 0 },
4445 	[GCC_TLMM_BCR] = { 0x34000, 0 },
4446 	[GCC_RBCPR_WCSS_BCR] = { 0x3a000, 0 },
4447 	[GCC_USB0_PHY_BCR] = { 0x3e034, 0 },
4448 	[GCC_USB3PHY_0_PHY_BCR] = { 0x3e03c, 0 },
4449 	[GCC_USB0_BCR] = { 0x3e070, 0 },
4450 	[GCC_USB1_BCR] = { 0x3f070, 0 },
4451 	[GCC_QUSB2_0_PHY_BCR] = { 0x4103c, 0 },
4452 	[GCC_QUSB2_1_PHY_BCR] = { 0x41040, 0 },
4453 	[GCC_SDCC1_BCR] = { 0x42000, 0 },
4454 	[GCC_SNOC_BUS_TIMEOUT0_BCR] = { 0x47000, 0 },
4455 	[GCC_SNOC_BUS_TIMEOUT1_BCR] = { 0x47008, 0 },
4456 	[GCC_SNOC_BUS_TIMEOUT2_BCR] = { 0x47010, 0 },
4457 	[GCC_PCNOC_BUS_TIMEOUT0_BCR] = { 0x48000, 0 },
4458 	[GCC_PCNOC_BUS_TIMEOUT1_BCR] = { 0x48008, 0 },
4459 	[GCC_PCNOC_BUS_TIMEOUT2_BCR] = { 0x48010, 0 },
4460 	[GCC_PCNOC_BUS_TIMEOUT3_BCR] = { 0x48018, 0 },
4461 	[GCC_PCNOC_BUS_TIMEOUT4_BCR] = { 0x48020, 0 },
4462 	[GCC_PCNOC_BUS_TIMEOUT5_BCR] = { 0x48028, 0 },
4463 	[GCC_PCNOC_BUS_TIMEOUT6_BCR] = { 0x48030, 0 },
4464 	[GCC_PCNOC_BUS_TIMEOUT7_BCR] = { 0x48038, 0 },
4465 	[GCC_PCNOC_BUS_TIMEOUT8_BCR] = { 0x48040, 0 },
4466 	[GCC_PCNOC_BUS_TIMEOUT9_BCR] = { 0x48048, 0 },
4467 	[GCC_UNIPHY0_BCR] = { 0x56000, 0 },
4468 	[GCC_UNIPHY1_BCR] = { 0x56100, 0 },
4469 	[GCC_CMN_12GPLL_BCR] = { 0x56300, 0 },
4470 	[GCC_QPIC_BCR] = { 0x57018, 0 },
4471 	[GCC_MDIO_BCR] = { 0x58000, 0 },
4472 	[GCC_WCSS_CORE_TBU_BCR] = { 0x66000, 0 },
4473 	[GCC_WCSS_Q6_TBU_BCR] = { 0x67000, 0 },
4474 	[GCC_USB0_TBU_BCR] = { 0x6a000, 0 },
4475 	[GCC_PCIE0_TBU_BCR] = { 0x6b000, 0 },
4476 	[GCC_NSS_NOC_TBU_BCR] = { 0x6e000, 0 },
4477 	[GCC_PCIE0_BCR] = { 0x75004, 0 },
4478 	[GCC_PCIE0_PHY_BCR] = { 0x75038, 0 },
4479 	[GCC_PCIE0PHY_PHY_BCR] = { 0x7503c, 0 },
4480 	[GCC_PCIE0_LINK_DOWN_BCR] = { 0x75044, 0 },
4481 	[GCC_DCC_BCR] = { 0x77000, 0 },
4482 	[GCC_APC0_VOLTAGE_DROOP_DETECTOR_BCR] = { 0x78000, 0 },
4483 	[GCC_SMMU_CATS_BCR] = { 0x7c000, 0 },
4484 	[GCC_UBI0_AXI_ARES] = { 0x68010, 0 },
4485 	[GCC_UBI0_AHB_ARES] = { 0x68010, 1 },
4486 	[GCC_UBI0_NC_AXI_ARES] = { 0x68010, 2 },
4487 	[GCC_UBI0_DBG_ARES] = { 0x68010, 3 },
4488 	[GCC_UBI0_CORE_CLAMP_ENABLE] = { 0x68010, 4 },
4489 	[GCC_UBI0_CLKRST_CLAMP_ENABLE] = { 0x68010, 5 },
4490 	[GCC_UBI0_UTCM_ARES] = { 0x68010, 6 },
4491 	[GCC_UBI0_CORE_ARES] = { 0x68010, 7 },
4492 	[GCC_NSS_CFG_ARES] = { 0x68010, 16 },
4493 	[GCC_NSS_NOC_ARES] = { 0x68010, 18 },
4494 	[GCC_NSS_CRYPTO_ARES] = { 0x68010, 19 },
4495 	[GCC_NSS_CSR_ARES] = { 0x68010, 20 },
4496 	[GCC_NSS_CE_APB_ARES] = { 0x68010, 21 },
4497 	[GCC_NSS_CE_AXI_ARES] = { 0x68010, 22 },
4498 	[GCC_NSSNOC_CE_APB_ARES] = { 0x68010, 23 },
4499 	[GCC_NSSNOC_CE_AXI_ARES] = { 0x68010, 24 },
4500 	[GCC_NSSNOC_UBI0_AHB_ARES] = { 0x68010, 25 },
4501 	[GCC_NSSNOC_SNOC_ARES] = { 0x68010, 27 },
4502 	[GCC_NSSNOC_CRYPTO_ARES] = { 0x68010, 28 },
4503 	[GCC_NSSNOC_ATB_ARES] = { 0x68010, 29 },
4504 	[GCC_NSSNOC_QOSGEN_REF_ARES] = { 0x68010, 30 },
4505 	[GCC_NSSNOC_TIMEOUT_REF_ARES] = { 0x68010, 31 },
4506 	[GCC_PCIE0_PIPE_ARES] = { 0x75040, 0 },
4507 	[GCC_PCIE0_SLEEP_ARES] = { 0x75040, 1 },
4508 	[GCC_PCIE0_CORE_STICKY_ARES] = { 0x75040, 2 },
4509 	[GCC_PCIE0_AXI_MASTER_ARES] = { 0x75040, 3 },
4510 	[GCC_PCIE0_AXI_SLAVE_ARES] = { 0x75040, 4 },
4511 	[GCC_PCIE0_AHB_ARES] = { 0x75040, 5 },
4512 	[GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 },
4513 	[GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 },
4514 	[GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = 0xf0000 },
4515 	[GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = 0x3ff2 },
4516 	[GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 },
4517 	[GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = 0x32 },
4518 	[GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 },
4519 	[GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = 0x300000 },
4520 	[GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = 0x1000003 },
4521 	[GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = 0x200000c },
4522 	[GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = 0x4000030 },
4523 	[GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = 0x8000300 },
4524 	[GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = 0x10000c00 },
4525 	[GCC_UNIPHY0_PORT1_ARES] = { .reg = 0x56004, .bitmask = 0x30 },
4526 	[GCC_UNIPHY0_PORT2_ARES] = { .reg = 0x56004, .bitmask = 0xc0 },
4527 	[GCC_UNIPHY0_PORT3_ARES] = { .reg = 0x56004, .bitmask = 0x300 },
4528 	[GCC_UNIPHY0_PORT4_ARES] = { .reg = 0x56004, .bitmask = 0xc00 },
4529 	[GCC_UNIPHY0_PORT5_ARES] = { .reg = 0x56004, .bitmask = 0x3000 },
4530 	[GCC_UNIPHY0_PORT_4_5_RESET] = { .reg = 0x56004, .bitmask = 0x3c02 },
4531 	[GCC_UNIPHY0_PORT_4_RESET] = { .reg = 0x56004, .bitmask = 0xc02 },
4532 	[GCC_LPASS_BCR] = {0x1F000, 0},
4533 	[GCC_UBI32_TBU_BCR] = {0x65000, 0},
4534 	[GCC_LPASS_TBU_BCR] = {0x6C000, 0},
4535 	[GCC_WCSSAON_RESET] = {0x59010, 0},
4536 	[GCC_LPASS_Q6_AXIM_ARES] = {0x1F004, 0},
4537 	[GCC_LPASS_Q6SS_TSCTR_1TO2_ARES] = {0x1F004, 1},
4538 	[GCC_LPASS_Q6SS_TRIG_ARES] = {0x1F004, 2},
4539 	[GCC_LPASS_Q6_ATBM_AT_ARES] = {0x1F004, 3},
4540 	[GCC_LPASS_Q6_PCLKDBG_ARES] = {0x1F004, 4},
4541 	[GCC_LPASS_CORE_AXIM_ARES] = {0x1F004, 5},
4542 	[GCC_LPASS_SNOC_CFG_ARES] = {0x1F004, 6},
4543 	[GCC_WCSS_DBG_ARES] = {0x59008, 0},
4544 	[GCC_WCSS_ECAHB_ARES] = {0x59008, 1},
4545 	[GCC_WCSS_ACMT_ARES] = {0x59008, 2},
4546 	[GCC_WCSS_DBG_BDG_ARES] = {0x59008, 3},
4547 	[GCC_WCSS_AHB_S_ARES] = {0x59008, 4},
4548 	[GCC_WCSS_AXI_M_ARES] = {0x59008, 5},
4549 	[GCC_Q6SS_DBG_ARES] = {0x59110, 0},
4550 	[GCC_Q6_AHB_S_ARES] = {0x59110, 1},
4551 	[GCC_Q6_AHB_ARES] = {0x59110, 2},
4552 	[GCC_Q6_AXIM2_ARES] = {0x59110, 3},
4553 	[GCC_Q6_AXIM_ARES] = {0x59110, 4},
4554 };
4555 
4556 static const struct of_device_id gcc_ipq6018_match_table[] = {
4557 	{ .compatible = "qcom,gcc-ipq6018" },
4558 	{ }
4559 };
4560 MODULE_DEVICE_TABLE(of, gcc_ipq6018_match_table);
4561 
4562 static const struct regmap_config gcc_ipq6018_regmap_config = {
4563 	.reg_bits       = 32,
4564 	.reg_stride     = 4,
4565 	.val_bits       = 32,
4566 	.max_register   = 0x7fffc,
4567 	.fast_io	= true,
4568 };
4569 
4570 static const struct qcom_cc_desc gcc_ipq6018_desc = {
4571 	.config = &gcc_ipq6018_regmap_config,
4572 	.clks = gcc_ipq6018_clks,
4573 	.num_clks = ARRAY_SIZE(gcc_ipq6018_clks),
4574 	.resets = gcc_ipq6018_resets,
4575 	.num_resets = ARRAY_SIZE(gcc_ipq6018_resets),
4576 	.clk_hws = gcc_ipq6018_hws,
4577 	.num_clk_hws = ARRAY_SIZE(gcc_ipq6018_hws),
4578 };
4579 
4580 static int gcc_ipq6018_probe(struct platform_device *pdev)
4581 {
4582 	struct regmap *regmap;
4583 
4584 	regmap = qcom_cc_map(pdev, &gcc_ipq6018_desc);
4585 	if (IS_ERR(regmap))
4586 		return PTR_ERR(regmap);
4587 
4588 	/* Disable SW_COLLAPSE for USB0 GDSCR */
4589 	regmap_update_bits(regmap, 0x3e078, BIT(0), 0x0);
4590 	/* Enable SW_OVERRIDE for USB0 GDSCR */
4591 	regmap_update_bits(regmap, 0x3e078, BIT(2), BIT(2));
4592 	/* Disable SW_COLLAPSE for USB1 GDSCR */
4593 	regmap_update_bits(regmap, 0x3f078, BIT(0), 0x0);
4594 	/* Enable SW_OVERRIDE for USB1 GDSCR */
4595 	regmap_update_bits(regmap, 0x3f078, BIT(2), BIT(2));
4596 
4597 	/* SW Workaround for UBI Huyara PLL */
4598 	regmap_update_bits(regmap, 0x2501c, BIT(26), BIT(26));
4599 
4600 	clk_alpha_pll_configure(&ubi32_pll_main, regmap, &ubi32_pll_config);
4601 
4602 	clk_alpha_pll_configure(&nss_crypto_pll_main, regmap,
4603 				&nss_crypto_pll_config);
4604 
4605 	return qcom_cc_really_probe(pdev, &gcc_ipq6018_desc, regmap);
4606 }
4607 
4608 static struct platform_driver gcc_ipq6018_driver = {
4609 	.probe = gcc_ipq6018_probe,
4610 	.driver = {
4611 		.name   = "qcom,gcc-ipq6018",
4612 		.of_match_table = gcc_ipq6018_match_table,
4613 	},
4614 };
4615 
4616 static int __init gcc_ipq6018_init(void)
4617 {
4618 	return platform_driver_register(&gcc_ipq6018_driver);
4619 }
4620 core_initcall(gcc_ipq6018_init);
4621 
4622 static void __exit gcc_ipq6018_exit(void)
4623 {
4624 	platform_driver_unregister(&gcc_ipq6018_driver);
4625 }
4626 module_exit(gcc_ipq6018_exit);
4627 
4628 MODULE_DESCRIPTION("Qualcomm Technologies, Inc. GCC IPQ6018 Driver");
4629 MODULE_LICENSE("GPL v2");
4630