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