xref: /openbmc/linux/drivers/clk/qcom/mmcc-apq8084.c (revision 2cf1c348)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
4  */
5 
6 #include <linux/clk-provider.h>
7 #include <linux/kernel.h>
8 #include <linux/platform_device.h>
9 #include <linux/module.h>
10 #include <linux/regmap.h>
11 #include <linux/reset-controller.h>
12 
13 #include <dt-bindings/clock/qcom,mmcc-apq8084.h>
14 #include <dt-bindings/reset/qcom,mmcc-apq8084.h>
15 
16 #include "common.h"
17 #include "clk-regmap.h"
18 #include "clk-pll.h"
19 #include "clk-rcg.h"
20 #include "clk-branch.h"
21 #include "reset.h"
22 #include "gdsc.h"
23 
24 enum {
25 	P_XO,
26 	P_MMPLL0,
27 	P_EDPLINK,
28 	P_MMPLL1,
29 	P_HDMIPLL,
30 	P_GPLL0,
31 	P_EDPVCO,
32 	P_MMPLL4,
33 	P_DSI0PLL,
34 	P_DSI0PLL_BYTE,
35 	P_MMPLL2,
36 	P_MMPLL3,
37 	P_GPLL1,
38 	P_DSI1PLL,
39 	P_DSI1PLL_BYTE,
40 	P_MMSLEEP,
41 };
42 
43 static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map[] = {
44 	{ P_XO, 0 },
45 	{ P_MMPLL0, 1 },
46 	{ P_MMPLL1, 2 },
47 	{ P_GPLL0, 5 }
48 };
49 
50 static const char * const mmcc_xo_mmpll0_mmpll1_gpll0[] = {
51 	"xo",
52 	"mmpll0_vote",
53 	"mmpll1_vote",
54 	"mmss_gpll0_vote",
55 };
56 
57 static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = {
58 	{ P_XO, 0 },
59 	{ P_MMPLL0, 1 },
60 	{ P_HDMIPLL, 4 },
61 	{ P_GPLL0, 5 },
62 	{ P_DSI0PLL, 2 },
63 	{ P_DSI1PLL, 3 }
64 };
65 
66 static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = {
67 	"xo",
68 	"mmpll0_vote",
69 	"hdmipll",
70 	"mmss_gpll0_vote",
71 	"dsi0pll",
72 	"dsi1pll",
73 };
74 
75 static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map[] = {
76 	{ P_XO, 0 },
77 	{ P_MMPLL0, 1 },
78 	{ P_MMPLL1, 2 },
79 	{ P_GPLL0, 5 },
80 	{ P_MMPLL2, 3 }
81 };
82 
83 static const char * const mmcc_xo_mmpll0_1_2_gpll0[] = {
84 	"xo",
85 	"mmpll0_vote",
86 	"mmpll1_vote",
87 	"mmss_gpll0_vote",
88 	"mmpll2",
89 };
90 
91 static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map[] = {
92 	{ P_XO, 0 },
93 	{ P_MMPLL0, 1 },
94 	{ P_MMPLL1, 2 },
95 	{ P_GPLL0, 5 },
96 	{ P_MMPLL3, 3 }
97 };
98 
99 static const char * const mmcc_xo_mmpll0_1_3_gpll0[] = {
100 	"xo",
101 	"mmpll0_vote",
102 	"mmpll1_vote",
103 	"mmss_gpll0_vote",
104 	"mmpll3",
105 };
106 
107 static const struct parent_map mmcc_xo_dsi_hdmi_edp_map[] = {
108 	{ P_XO, 0 },
109 	{ P_EDPLINK, 4 },
110 	{ P_HDMIPLL, 3 },
111 	{ P_EDPVCO, 5 },
112 	{ P_DSI0PLL, 1 },
113 	{ P_DSI1PLL, 2 }
114 };
115 
116 static const char * const mmcc_xo_dsi_hdmi_edp[] = {
117 	"xo",
118 	"edp_link_clk",
119 	"hdmipll",
120 	"edp_vco_div",
121 	"dsi0pll",
122 	"dsi1pll",
123 };
124 
125 static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map[] = {
126 	{ P_XO, 0 },
127 	{ P_EDPLINK, 4 },
128 	{ P_HDMIPLL, 3 },
129 	{ P_GPLL0, 5 },
130 	{ P_DSI0PLL, 1 },
131 	{ P_DSI1PLL, 2 }
132 };
133 
134 static const char * const mmcc_xo_dsi_hdmi_edp_gpll0[] = {
135 	"xo",
136 	"edp_link_clk",
137 	"hdmipll",
138 	"gpll0_vote",
139 	"dsi0pll",
140 	"dsi1pll",
141 };
142 
143 static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = {
144 	{ P_XO, 0 },
145 	{ P_EDPLINK, 4 },
146 	{ P_HDMIPLL, 3 },
147 	{ P_GPLL0, 5 },
148 	{ P_DSI0PLL_BYTE, 1 },
149 	{ P_DSI1PLL_BYTE, 2 }
150 };
151 
152 static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0[] = {
153 	"xo",
154 	"edp_link_clk",
155 	"hdmipll",
156 	"gpll0_vote",
157 	"dsi0pllbyte",
158 	"dsi1pllbyte",
159 };
160 
161 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll0_map[] = {
162 	{ P_XO, 0 },
163 	{ P_MMPLL0, 1 },
164 	{ P_MMPLL1, 2 },
165 	{ P_GPLL0, 5 },
166 	{ P_MMPLL4, 3 }
167 };
168 
169 static const char * const mmcc_xo_mmpll0_1_4_gpll0[] = {
170 	"xo",
171 	"mmpll0",
172 	"mmpll1",
173 	"mmpll4",
174 	"gpll0",
175 };
176 
177 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_map[] = {
178 	{ P_XO, 0 },
179 	{ P_MMPLL0, 1 },
180 	{ P_MMPLL1, 2 },
181 	{ P_MMPLL4, 3 },
182 	{ P_GPLL0, 5 },
183 	{ P_GPLL1, 4 }
184 };
185 
186 static const char * const mmcc_xo_mmpll0_1_4_gpll1_0[] = {
187 	"xo",
188 	"mmpll0",
189 	"mmpll1",
190 	"mmpll4",
191 	"gpll1",
192 	"gpll0",
193 };
194 
195 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map[] = {
196 	{ P_XO, 0 },
197 	{ P_MMPLL0, 1 },
198 	{ P_MMPLL1, 2 },
199 	{ P_MMPLL4, 3 },
200 	{ P_GPLL0, 5 },
201 	{ P_GPLL1, 4 },
202 	{ P_MMSLEEP, 6 }
203 };
204 
205 static const char * const mmcc_xo_mmpll0_1_4_gpll1_0_sleep[] = {
206 	"xo",
207 	"mmpll0",
208 	"mmpll1",
209 	"mmpll4",
210 	"gpll1",
211 	"gpll0",
212 	"sleep_clk_src",
213 };
214 
215 static struct clk_pll mmpll0 = {
216 	.l_reg = 0x0004,
217 	.m_reg = 0x0008,
218 	.n_reg = 0x000c,
219 	.config_reg = 0x0014,
220 	.mode_reg = 0x0000,
221 	.status_reg = 0x001c,
222 	.status_bit = 17,
223 	.clkr.hw.init = &(struct clk_init_data){
224 		.name = "mmpll0",
225 		.parent_names = (const char *[]){ "xo" },
226 		.num_parents = 1,
227 		.ops = &clk_pll_ops,
228 	},
229 };
230 
231 static struct clk_regmap mmpll0_vote = {
232 	.enable_reg = 0x0100,
233 	.enable_mask = BIT(0),
234 	.hw.init = &(struct clk_init_data){
235 		.name = "mmpll0_vote",
236 		.parent_names = (const char *[]){ "mmpll0" },
237 		.num_parents = 1,
238 		.ops = &clk_pll_vote_ops,
239 	},
240 };
241 
242 static struct clk_pll mmpll1 = {
243 	.l_reg = 0x0044,
244 	.m_reg = 0x0048,
245 	.n_reg = 0x004c,
246 	.config_reg = 0x0050,
247 	.mode_reg = 0x0040,
248 	.status_reg = 0x005c,
249 	.status_bit = 17,
250 	.clkr.hw.init = &(struct clk_init_data){
251 		.name = "mmpll1",
252 		.parent_names = (const char *[]){ "xo" },
253 		.num_parents = 1,
254 		.ops = &clk_pll_ops,
255 	},
256 };
257 
258 static struct clk_regmap mmpll1_vote = {
259 	.enable_reg = 0x0100,
260 	.enable_mask = BIT(1),
261 	.hw.init = &(struct clk_init_data){
262 		.name = "mmpll1_vote",
263 		.parent_names = (const char *[]){ "mmpll1" },
264 		.num_parents = 1,
265 		.ops = &clk_pll_vote_ops,
266 	},
267 };
268 
269 static struct clk_pll mmpll2 = {
270 	.l_reg = 0x4104,
271 	.m_reg = 0x4108,
272 	.n_reg = 0x410c,
273 	.config_reg = 0x4110,
274 	.mode_reg = 0x4100,
275 	.status_reg = 0x411c,
276 	.clkr.hw.init = &(struct clk_init_data){
277 		.name = "mmpll2",
278 		.parent_names = (const char *[]){ "xo" },
279 		.num_parents = 1,
280 		.ops = &clk_pll_ops,
281 	},
282 };
283 
284 static struct clk_pll mmpll3 = {
285 	.l_reg = 0x0084,
286 	.m_reg = 0x0088,
287 	.n_reg = 0x008c,
288 	.config_reg = 0x0090,
289 	.mode_reg = 0x0080,
290 	.status_reg = 0x009c,
291 	.status_bit = 17,
292 	.clkr.hw.init = &(struct clk_init_data){
293 		.name = "mmpll3",
294 		.parent_names = (const char *[]){ "xo" },
295 		.num_parents = 1,
296 		.ops = &clk_pll_ops,
297 	},
298 };
299 
300 static struct clk_pll mmpll4 = {
301 	.l_reg = 0x00a4,
302 	.m_reg = 0x00a8,
303 	.n_reg = 0x00ac,
304 	.config_reg = 0x00b0,
305 	.mode_reg = 0x0080,
306 	.status_reg = 0x00bc,
307 	.clkr.hw.init = &(struct clk_init_data){
308 		.name = "mmpll4",
309 		.parent_names = (const char *[]){ "xo" },
310 		.num_parents = 1,
311 		.ops = &clk_pll_ops,
312 	},
313 };
314 
315 static struct clk_rcg2 mmss_ahb_clk_src = {
316 	.cmd_rcgr = 0x5000,
317 	.hid_width = 5,
318 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
319 	.clkr.hw.init = &(struct clk_init_data){
320 		.name = "mmss_ahb_clk_src",
321 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
322 		.num_parents = 4,
323 		.ops = &clk_rcg2_ops,
324 	},
325 };
326 
327 static struct freq_tbl ftbl_mmss_axi_clk[] = {
328 	F(19200000, P_XO, 1, 0, 0),
329 	F(37500000, P_GPLL0, 16, 0, 0),
330 	F(50000000, P_GPLL0, 12, 0, 0),
331 	F(75000000, P_GPLL0, 8, 0, 0),
332 	F(100000000, P_GPLL0, 6, 0, 0),
333 	F(150000000, P_GPLL0, 4, 0, 0),
334 	F(333430000, P_MMPLL1, 3.5, 0, 0),
335 	F(400000000, P_MMPLL0, 2, 0, 0),
336 	F(466800000, P_MMPLL1, 2.5, 0, 0),
337 };
338 
339 static struct clk_rcg2 mmss_axi_clk_src = {
340 	.cmd_rcgr = 0x5040,
341 	.hid_width = 5,
342 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
343 	.freq_tbl = ftbl_mmss_axi_clk,
344 	.clkr.hw.init = &(struct clk_init_data){
345 		.name = "mmss_axi_clk_src",
346 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
347 		.num_parents = 4,
348 		.ops = &clk_rcg2_ops,
349 	},
350 };
351 
352 static struct freq_tbl ftbl_ocmemnoc_clk[] = {
353 	F(19200000, P_XO, 1, 0, 0),
354 	F(37500000, P_GPLL0, 16, 0, 0),
355 	F(50000000, P_GPLL0, 12, 0, 0),
356 	F(75000000, P_GPLL0, 8, 0, 0),
357 	F(109090000, P_GPLL0, 5.5, 0, 0),
358 	F(150000000, P_GPLL0, 4, 0, 0),
359 	F(228570000, P_MMPLL0, 3.5, 0, 0),
360 	F(320000000, P_MMPLL0, 2.5, 0, 0),
361 };
362 
363 static struct clk_rcg2 ocmemnoc_clk_src = {
364 	.cmd_rcgr = 0x5090,
365 	.hid_width = 5,
366 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
367 	.freq_tbl = ftbl_ocmemnoc_clk,
368 	.clkr.hw.init = &(struct clk_init_data){
369 		.name = "ocmemnoc_clk_src",
370 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
371 		.num_parents = 4,
372 		.ops = &clk_rcg2_ops,
373 	},
374 };
375 
376 static struct freq_tbl ftbl_camss_csi0_3_clk[] = {
377 	F(100000000, P_GPLL0, 6, 0, 0),
378 	F(200000000, P_MMPLL0, 4, 0, 0),
379 	{ }
380 };
381 
382 static struct clk_rcg2 csi0_clk_src = {
383 	.cmd_rcgr = 0x3090,
384 	.hid_width = 5,
385 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
386 	.freq_tbl = ftbl_camss_csi0_3_clk,
387 	.clkr.hw.init = &(struct clk_init_data){
388 		.name = "csi0_clk_src",
389 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
390 		.num_parents = 5,
391 		.ops = &clk_rcg2_ops,
392 	},
393 };
394 
395 static struct clk_rcg2 csi1_clk_src = {
396 	.cmd_rcgr = 0x3100,
397 	.hid_width = 5,
398 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
399 	.freq_tbl = ftbl_camss_csi0_3_clk,
400 	.clkr.hw.init = &(struct clk_init_data){
401 		.name = "csi1_clk_src",
402 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
403 		.num_parents = 5,
404 		.ops = &clk_rcg2_ops,
405 	},
406 };
407 
408 static struct clk_rcg2 csi2_clk_src = {
409 	.cmd_rcgr = 0x3160,
410 	.hid_width = 5,
411 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
412 	.freq_tbl = ftbl_camss_csi0_3_clk,
413 	.clkr.hw.init = &(struct clk_init_data){
414 		.name = "csi2_clk_src",
415 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
416 		.num_parents = 5,
417 		.ops = &clk_rcg2_ops,
418 	},
419 };
420 
421 static struct clk_rcg2 csi3_clk_src = {
422 	.cmd_rcgr = 0x31c0,
423 	.hid_width = 5,
424 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
425 	.freq_tbl = ftbl_camss_csi0_3_clk,
426 	.clkr.hw.init = &(struct clk_init_data){
427 		.name = "csi3_clk_src",
428 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
429 		.num_parents = 5,
430 		.ops = &clk_rcg2_ops,
431 	},
432 };
433 
434 static struct freq_tbl ftbl_camss_vfe_vfe0_1_clk[] = {
435 	F(37500000, P_GPLL0, 16, 0, 0),
436 	F(50000000, P_GPLL0, 12, 0, 0),
437 	F(60000000, P_GPLL0, 10, 0, 0),
438 	F(80000000, P_GPLL0, 7.5, 0, 0),
439 	F(100000000, P_GPLL0, 6, 0, 0),
440 	F(109090000, P_GPLL0, 5.5, 0, 0),
441 	F(133330000, P_GPLL0, 4.5, 0, 0),
442 	F(200000000, P_GPLL0, 3, 0, 0),
443 	F(228570000, P_MMPLL0, 3.5, 0, 0),
444 	F(266670000, P_MMPLL0, 3, 0, 0),
445 	F(320000000, P_MMPLL0, 2.5, 0, 0),
446 	F(465000000, P_MMPLL4, 2, 0, 0),
447 	F(600000000, P_GPLL0, 1, 0, 0),
448 	{ }
449 };
450 
451 static struct clk_rcg2 vfe0_clk_src = {
452 	.cmd_rcgr = 0x3600,
453 	.hid_width = 5,
454 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
455 	.freq_tbl = ftbl_camss_vfe_vfe0_1_clk,
456 	.clkr.hw.init = &(struct clk_init_data){
457 		.name = "vfe0_clk_src",
458 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
459 		.num_parents = 5,
460 		.ops = &clk_rcg2_ops,
461 	},
462 };
463 
464 static struct clk_rcg2 vfe1_clk_src = {
465 	.cmd_rcgr = 0x3620,
466 	.hid_width = 5,
467 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
468 	.freq_tbl = ftbl_camss_vfe_vfe0_1_clk,
469 	.clkr.hw.init = &(struct clk_init_data){
470 		.name = "vfe1_clk_src",
471 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
472 		.num_parents = 5,
473 		.ops = &clk_rcg2_ops,
474 	},
475 };
476 
477 static struct freq_tbl ftbl_mdss_mdp_clk[] = {
478 	F(37500000, P_GPLL0, 16, 0, 0),
479 	F(60000000, P_GPLL0, 10, 0, 0),
480 	F(75000000, P_GPLL0, 8, 0, 0),
481 	F(85710000, P_GPLL0, 7, 0, 0),
482 	F(100000000, P_GPLL0, 6, 0, 0),
483 	F(150000000, P_GPLL0, 4, 0, 0),
484 	F(160000000, P_MMPLL0, 5, 0, 0),
485 	F(200000000, P_MMPLL0, 4, 0, 0),
486 	F(228570000, P_MMPLL0, 3.5, 0, 0),
487 	F(300000000, P_GPLL0, 2, 0, 0),
488 	F(320000000, P_MMPLL0, 2.5, 0, 0),
489 	{ }
490 };
491 
492 static struct clk_rcg2 mdp_clk_src = {
493 	.cmd_rcgr = 0x2040,
494 	.hid_width = 5,
495 	.parent_map = mmcc_xo_mmpll0_dsi_hdmi_gpll0_map,
496 	.freq_tbl = ftbl_mdss_mdp_clk,
497 	.clkr.hw.init = &(struct clk_init_data){
498 		.name = "mdp_clk_src",
499 		.parent_names = mmcc_xo_mmpll0_dsi_hdmi_gpll0,
500 		.num_parents = 6,
501 		.ops = &clk_rcg2_ops,
502 	},
503 };
504 
505 static struct clk_rcg2 gfx3d_clk_src = {
506 	.cmd_rcgr = 0x4000,
507 	.hid_width = 5,
508 	.parent_map = mmcc_xo_mmpll0_1_2_gpll0_map,
509 	.clkr.hw.init = &(struct clk_init_data){
510 		.name = "gfx3d_clk_src",
511 		.parent_names = mmcc_xo_mmpll0_1_2_gpll0,
512 		.num_parents = 5,
513 		.ops = &clk_rcg2_ops,
514 	},
515 };
516 
517 static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = {
518 	F(75000000, P_GPLL0, 8, 0, 0),
519 	F(133330000, P_GPLL0, 4.5, 0, 0),
520 	F(200000000, P_GPLL0, 3, 0, 0),
521 	F(228570000, P_MMPLL0, 3.5, 0, 0),
522 	F(266670000, P_MMPLL0, 3, 0, 0),
523 	F(320000000, P_MMPLL0, 2.5, 0, 0),
524 	{ }
525 };
526 
527 static struct clk_rcg2 jpeg0_clk_src = {
528 	.cmd_rcgr = 0x3500,
529 	.hid_width = 5,
530 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
531 	.freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
532 	.clkr.hw.init = &(struct clk_init_data){
533 		.name = "jpeg0_clk_src",
534 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
535 		.num_parents = 5,
536 		.ops = &clk_rcg2_ops,
537 	},
538 };
539 
540 static struct clk_rcg2 jpeg1_clk_src = {
541 	.cmd_rcgr = 0x3520,
542 	.hid_width = 5,
543 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
544 	.freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
545 	.clkr.hw.init = &(struct clk_init_data){
546 		.name = "jpeg1_clk_src",
547 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
548 		.num_parents = 5,
549 		.ops = &clk_rcg2_ops,
550 	},
551 };
552 
553 static struct clk_rcg2 jpeg2_clk_src = {
554 	.cmd_rcgr = 0x3540,
555 	.hid_width = 5,
556 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
557 	.freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk,
558 	.clkr.hw.init = &(struct clk_init_data){
559 		.name = "jpeg2_clk_src",
560 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
561 		.num_parents = 5,
562 		.ops = &clk_rcg2_ops,
563 	},
564 };
565 
566 static struct clk_rcg2 pclk0_clk_src = {
567 	.cmd_rcgr = 0x2000,
568 	.mnd_width = 8,
569 	.hid_width = 5,
570 	.parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
571 	.clkr.hw.init = &(struct clk_init_data){
572 		.name = "pclk0_clk_src",
573 		.parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
574 		.num_parents = 6,
575 		.ops = &clk_pixel_ops,
576 		.flags = CLK_SET_RATE_PARENT,
577 	},
578 };
579 
580 static struct clk_rcg2 pclk1_clk_src = {
581 	.cmd_rcgr = 0x2020,
582 	.mnd_width = 8,
583 	.hid_width = 5,
584 	.parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
585 	.clkr.hw.init = &(struct clk_init_data){
586 		.name = "pclk1_clk_src",
587 		.parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
588 		.num_parents = 6,
589 		.ops = &clk_pixel_ops,
590 		.flags = CLK_SET_RATE_PARENT,
591 	},
592 };
593 
594 static struct freq_tbl ftbl_venus0_vcodec0_clk[] = {
595 	F(50000000, P_GPLL0, 12, 0, 0),
596 	F(100000000, P_GPLL0, 6, 0, 0),
597 	F(133330000, P_GPLL0, 4.5, 0, 0),
598 	F(200000000, P_MMPLL0, 4, 0, 0),
599 	F(266670000, P_MMPLL0, 3, 0, 0),
600 	F(465000000, P_MMPLL3, 2, 0, 0),
601 	{ }
602 };
603 
604 static struct clk_rcg2 vcodec0_clk_src = {
605 	.cmd_rcgr = 0x1000,
606 	.mnd_width = 8,
607 	.hid_width = 5,
608 	.parent_map = mmcc_xo_mmpll0_1_3_gpll0_map,
609 	.freq_tbl = ftbl_venus0_vcodec0_clk,
610 	.clkr.hw.init = &(struct clk_init_data){
611 		.name = "vcodec0_clk_src",
612 		.parent_names = mmcc_xo_mmpll0_1_3_gpll0,
613 		.num_parents = 5,
614 		.ops = &clk_rcg2_ops,
615 	},
616 };
617 
618 static struct freq_tbl ftbl_avsync_vp_clk[] = {
619 	F(150000000, P_GPLL0, 4, 0, 0),
620 	F(320000000, P_MMPLL0, 2.5, 0, 0),
621 	{ }
622 };
623 
624 static struct clk_rcg2 vp_clk_src = {
625 	.cmd_rcgr = 0x2430,
626 	.hid_width = 5,
627 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
628 	.freq_tbl = ftbl_avsync_vp_clk,
629 	.clkr.hw.init = &(struct clk_init_data){
630 		.name = "vp_clk_src",
631 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
632 		.num_parents = 4,
633 		.ops = &clk_rcg2_ops,
634 	},
635 };
636 
637 static struct freq_tbl ftbl_camss_cci_cci_clk[] = {
638 	F(19200000, P_XO, 1, 0, 0),
639 	{ }
640 };
641 
642 static struct clk_rcg2 cci_clk_src = {
643 	.cmd_rcgr = 0x3300,
644 	.mnd_width = 8,
645 	.hid_width = 5,
646 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map,
647 	.freq_tbl = ftbl_camss_cci_cci_clk,
648 	.clkr.hw.init = &(struct clk_init_data){
649 		.name = "cci_clk_src",
650 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0,
651 		.num_parents = 6,
652 		.ops = &clk_rcg2_ops,
653 	},
654 };
655 
656 static struct freq_tbl ftbl_camss_gp0_1_clk[] = {
657 	F(10000, P_XO, 16, 1, 120),
658 	F(24000, P_XO, 16, 1, 50),
659 	F(6000000, P_GPLL0, 10, 1, 10),
660 	F(12000000, P_GPLL0, 10, 1, 5),
661 	F(13000000, P_GPLL0, 4, 13, 150),
662 	F(24000000, P_GPLL0, 5, 1, 5),
663 	{ }
664 };
665 
666 static struct clk_rcg2 camss_gp0_clk_src = {
667 	.cmd_rcgr = 0x3420,
668 	.mnd_width = 8,
669 	.hid_width = 5,
670 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map,
671 	.freq_tbl = ftbl_camss_gp0_1_clk,
672 	.clkr.hw.init = &(struct clk_init_data){
673 		.name = "camss_gp0_clk_src",
674 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0_sleep,
675 		.num_parents = 7,
676 		.ops = &clk_rcg2_ops,
677 	},
678 };
679 
680 static struct clk_rcg2 camss_gp1_clk_src = {
681 	.cmd_rcgr = 0x3450,
682 	.mnd_width = 8,
683 	.hid_width = 5,
684 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map,
685 	.freq_tbl = ftbl_camss_gp0_1_clk,
686 	.clkr.hw.init = &(struct clk_init_data){
687 		.name = "camss_gp1_clk_src",
688 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0_sleep,
689 		.num_parents = 7,
690 		.ops = &clk_rcg2_ops,
691 	},
692 };
693 
694 static struct freq_tbl ftbl_camss_mclk0_3_clk[] = {
695 	F(4800000, P_XO, 4, 0, 0),
696 	F(6000000, P_GPLL0, 10, 1, 10),
697 	F(8000000, P_GPLL0, 15, 1, 5),
698 	F(9600000, P_XO, 2, 0, 0),
699 	F(16000000, P_MMPLL0, 10, 1, 5),
700 	F(19200000, P_XO, 1, 0, 0),
701 	F(24000000, P_GPLL0, 5, 1, 5),
702 	F(32000000, P_MMPLL0, 5, 1, 5),
703 	F(48000000, P_GPLL0, 12.5, 0, 0),
704 	F(64000000, P_MMPLL0, 12.5, 0, 0),
705 	{ }
706 };
707 
708 static struct clk_rcg2 mclk0_clk_src = {
709 	.cmd_rcgr = 0x3360,
710 	.mnd_width = 8,
711 	.hid_width = 5,
712 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map,
713 	.freq_tbl = ftbl_camss_mclk0_3_clk,
714 	.clkr.hw.init = &(struct clk_init_data){
715 		.name = "mclk0_clk_src",
716 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0,
717 		.num_parents = 6,
718 		.ops = &clk_rcg2_ops,
719 	},
720 };
721 
722 static struct clk_rcg2 mclk1_clk_src = {
723 	.cmd_rcgr = 0x3390,
724 	.mnd_width = 8,
725 	.hid_width = 5,
726 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map,
727 	.freq_tbl = ftbl_camss_mclk0_3_clk,
728 	.clkr.hw.init = &(struct clk_init_data){
729 		.name = "mclk1_clk_src",
730 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0,
731 		.num_parents = 6,
732 		.ops = &clk_rcg2_ops,
733 	},
734 };
735 
736 static struct clk_rcg2 mclk2_clk_src = {
737 	.cmd_rcgr = 0x33c0,
738 	.mnd_width = 8,
739 	.hid_width = 5,
740 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map,
741 	.freq_tbl = ftbl_camss_mclk0_3_clk,
742 	.clkr.hw.init = &(struct clk_init_data){
743 		.name = "mclk2_clk_src",
744 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0,
745 		.num_parents = 6,
746 		.ops = &clk_rcg2_ops,
747 	},
748 };
749 
750 static struct clk_rcg2 mclk3_clk_src = {
751 	.cmd_rcgr = 0x33f0,
752 	.mnd_width = 8,
753 	.hid_width = 5,
754 	.parent_map = mmcc_xo_mmpll0_1_4_gpll1_0_map,
755 	.freq_tbl = ftbl_camss_mclk0_3_clk,
756 	.clkr.hw.init = &(struct clk_init_data){
757 		.name = "mclk3_clk_src",
758 		.parent_names = mmcc_xo_mmpll0_1_4_gpll1_0,
759 		.num_parents = 6,
760 		.ops = &clk_rcg2_ops,
761 	},
762 };
763 
764 static struct freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk[] = {
765 	F(100000000, P_GPLL0, 6, 0, 0),
766 	F(200000000, P_MMPLL0, 4, 0, 0),
767 	{ }
768 };
769 
770 static struct clk_rcg2 csi0phytimer_clk_src = {
771 	.cmd_rcgr = 0x3000,
772 	.hid_width = 5,
773 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
774 	.freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
775 	.clkr.hw.init = &(struct clk_init_data){
776 		.name = "csi0phytimer_clk_src",
777 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
778 		.num_parents = 5,
779 		.ops = &clk_rcg2_ops,
780 	},
781 };
782 
783 static struct clk_rcg2 csi1phytimer_clk_src = {
784 	.cmd_rcgr = 0x3030,
785 	.hid_width = 5,
786 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
787 	.freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
788 	.clkr.hw.init = &(struct clk_init_data){
789 		.name = "csi1phytimer_clk_src",
790 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
791 		.num_parents = 5,
792 		.ops = &clk_rcg2_ops,
793 	},
794 };
795 
796 static struct clk_rcg2 csi2phytimer_clk_src = {
797 	.cmd_rcgr = 0x3060,
798 	.hid_width = 5,
799 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
800 	.freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk,
801 	.clkr.hw.init = &(struct clk_init_data){
802 		.name = "csi2phytimer_clk_src",
803 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
804 		.num_parents = 5,
805 		.ops = &clk_rcg2_ops,
806 	},
807 };
808 
809 static struct freq_tbl ftbl_camss_vfe_cpp_clk[] = {
810 	F(133330000, P_GPLL0, 4.5, 0, 0),
811 	F(266670000, P_MMPLL0, 3, 0, 0),
812 	F(320000000, P_MMPLL0, 2.5, 0, 0),
813 	F(372000000, P_MMPLL4, 2.5, 0, 0),
814 	F(465000000, P_MMPLL4, 2, 0, 0),
815 	F(600000000, P_GPLL0, 1, 0, 0),
816 	{ }
817 };
818 
819 static struct clk_rcg2 cpp_clk_src = {
820 	.cmd_rcgr = 0x3640,
821 	.hid_width = 5,
822 	.parent_map = mmcc_xo_mmpll0_1_4_gpll0_map,
823 	.freq_tbl = ftbl_camss_vfe_cpp_clk,
824 	.clkr.hw.init = &(struct clk_init_data){
825 		.name = "cpp_clk_src",
826 		.parent_names = mmcc_xo_mmpll0_1_4_gpll0,
827 		.num_parents = 5,
828 		.ops = &clk_rcg2_ops,
829 	},
830 };
831 
832 static struct clk_rcg2 byte0_clk_src = {
833 	.cmd_rcgr = 0x2120,
834 	.hid_width = 5,
835 	.parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map,
836 	.clkr.hw.init = &(struct clk_init_data){
837 		.name = "byte0_clk_src",
838 		.parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
839 		.num_parents = 6,
840 		.ops = &clk_byte2_ops,
841 		.flags = CLK_SET_RATE_PARENT,
842 	},
843 };
844 
845 static struct clk_rcg2 byte1_clk_src = {
846 	.cmd_rcgr = 0x2140,
847 	.hid_width = 5,
848 	.parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map,
849 	.clkr.hw.init = &(struct clk_init_data){
850 		.name = "byte1_clk_src",
851 		.parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
852 		.num_parents = 6,
853 		.ops = &clk_byte2_ops,
854 		.flags = CLK_SET_RATE_PARENT,
855 	},
856 };
857 
858 static struct freq_tbl ftbl_mdss_edpaux_clk[] = {
859 	F(19200000, P_XO, 1, 0, 0),
860 	{ }
861 };
862 
863 static struct clk_rcg2 edpaux_clk_src = {
864 	.cmd_rcgr = 0x20e0,
865 	.hid_width = 5,
866 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
867 	.freq_tbl = ftbl_mdss_edpaux_clk,
868 	.clkr.hw.init = &(struct clk_init_data){
869 		.name = "edpaux_clk_src",
870 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
871 		.num_parents = 4,
872 		.ops = &clk_rcg2_ops,
873 	},
874 };
875 
876 static struct freq_tbl ftbl_mdss_edplink_clk[] = {
877 	F(135000000, P_EDPLINK, 2, 0, 0),
878 	F(270000000, P_EDPLINK, 11, 0, 0),
879 	{ }
880 };
881 
882 static struct clk_rcg2 edplink_clk_src = {
883 	.cmd_rcgr = 0x20c0,
884 	.hid_width = 5,
885 	.parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
886 	.freq_tbl = ftbl_mdss_edplink_clk,
887 	.clkr.hw.init = &(struct clk_init_data){
888 		.name = "edplink_clk_src",
889 		.parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
890 		.num_parents = 6,
891 		.ops = &clk_rcg2_ops,
892 		.flags = CLK_SET_RATE_PARENT,
893 	},
894 };
895 
896 static struct freq_tbl edp_pixel_freq_tbl[] = {
897 	{ .src = P_EDPVCO },
898 	{ }
899 };
900 
901 static struct clk_rcg2 edppixel_clk_src = {
902 	.cmd_rcgr = 0x20a0,
903 	.mnd_width = 8,
904 	.hid_width = 5,
905 	.parent_map = mmcc_xo_dsi_hdmi_edp_map,
906 	.freq_tbl = edp_pixel_freq_tbl,
907 	.clkr.hw.init = &(struct clk_init_data){
908 		.name = "edppixel_clk_src",
909 		.parent_names = mmcc_xo_dsi_hdmi_edp,
910 		.num_parents = 6,
911 		.ops = &clk_edp_pixel_ops,
912 	},
913 };
914 
915 static struct freq_tbl ftbl_mdss_esc0_1_clk[] = {
916 	F(19200000, P_XO, 1, 0, 0),
917 	{ }
918 };
919 
920 static struct clk_rcg2 esc0_clk_src = {
921 	.cmd_rcgr = 0x2160,
922 	.hid_width = 5,
923 	.parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map,
924 	.freq_tbl = ftbl_mdss_esc0_1_clk,
925 	.clkr.hw.init = &(struct clk_init_data){
926 		.name = "esc0_clk_src",
927 		.parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
928 		.num_parents = 6,
929 		.ops = &clk_rcg2_ops,
930 	},
931 };
932 
933 static struct clk_rcg2 esc1_clk_src = {
934 	.cmd_rcgr = 0x2180,
935 	.hid_width = 5,
936 	.parent_map = mmcc_xo_dsibyte_hdmi_edp_gpll0_map,
937 	.freq_tbl = ftbl_mdss_esc0_1_clk,
938 	.clkr.hw.init = &(struct clk_init_data){
939 		.name = "esc1_clk_src",
940 		.parent_names = mmcc_xo_dsibyte_hdmi_edp_gpll0,
941 		.num_parents = 6,
942 		.ops = &clk_rcg2_ops,
943 	},
944 };
945 
946 static struct freq_tbl extpclk_freq_tbl[] = {
947 	{ .src = P_HDMIPLL },
948 	{ }
949 };
950 
951 static struct clk_rcg2 extpclk_clk_src = {
952 	.cmd_rcgr = 0x2060,
953 	.hid_width = 5,
954 	.parent_map = mmcc_xo_dsi_hdmi_edp_gpll0_map,
955 	.freq_tbl = extpclk_freq_tbl,
956 	.clkr.hw.init = &(struct clk_init_data){
957 		.name = "extpclk_clk_src",
958 		.parent_names = mmcc_xo_dsi_hdmi_edp_gpll0,
959 		.num_parents = 6,
960 		.ops = &clk_byte_ops,
961 		.flags = CLK_SET_RATE_PARENT,
962 	},
963 };
964 
965 static struct freq_tbl ftbl_mdss_hdmi_clk[] = {
966 	F(19200000, P_XO, 1, 0, 0),
967 	{ }
968 };
969 
970 static struct clk_rcg2 hdmi_clk_src = {
971 	.cmd_rcgr = 0x2100,
972 	.hid_width = 5,
973 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
974 	.freq_tbl = ftbl_mdss_hdmi_clk,
975 	.clkr.hw.init = &(struct clk_init_data){
976 		.name = "hdmi_clk_src",
977 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
978 		.num_parents = 4,
979 		.ops = &clk_rcg2_ops,
980 	},
981 };
982 
983 static struct freq_tbl ftbl_mdss_vsync_clk[] = {
984 	F(19200000, P_XO, 1, 0, 0),
985 	{ }
986 };
987 
988 static struct clk_rcg2 vsync_clk_src = {
989 	.cmd_rcgr = 0x2080,
990 	.hid_width = 5,
991 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
992 	.freq_tbl = ftbl_mdss_vsync_clk,
993 	.clkr.hw.init = &(struct clk_init_data){
994 		.name = "vsync_clk_src",
995 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
996 		.num_parents = 4,
997 		.ops = &clk_rcg2_ops,
998 	},
999 };
1000 
1001 static struct freq_tbl ftbl_mmss_rbcpr_clk[] = {
1002 	F(50000000, P_GPLL0, 12, 0, 0),
1003 	{ }
1004 };
1005 
1006 static struct clk_rcg2 rbcpr_clk_src = {
1007 	.cmd_rcgr = 0x4060,
1008 	.hid_width = 5,
1009 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
1010 	.freq_tbl = ftbl_mmss_rbcpr_clk,
1011 	.clkr.hw.init = &(struct clk_init_data){
1012 		.name = "rbcpr_clk_src",
1013 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
1014 		.num_parents = 4,
1015 		.ops = &clk_rcg2_ops,
1016 	},
1017 };
1018 
1019 static struct freq_tbl ftbl_oxili_rbbmtimer_clk[] = {
1020 	F(19200000, P_XO, 1, 0, 0),
1021 	{ }
1022 };
1023 
1024 static struct clk_rcg2 rbbmtimer_clk_src = {
1025 	.cmd_rcgr = 0x4090,
1026 	.hid_width = 5,
1027 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
1028 	.freq_tbl = ftbl_oxili_rbbmtimer_clk,
1029 	.clkr.hw.init = &(struct clk_init_data){
1030 		.name = "rbbmtimer_clk_src",
1031 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
1032 		.num_parents = 4,
1033 		.ops = &clk_rcg2_ops,
1034 	},
1035 };
1036 
1037 static struct freq_tbl ftbl_vpu_maple_clk[] = {
1038 	F(50000000, P_GPLL0, 12, 0, 0),
1039 	F(100000000, P_GPLL0, 6, 0, 0),
1040 	F(133330000, P_GPLL0, 4.5, 0, 0),
1041 	F(200000000, P_MMPLL0, 4, 0, 0),
1042 	F(266670000, P_MMPLL0, 3, 0, 0),
1043 	F(465000000, P_MMPLL3, 2, 0, 0),
1044 	{ }
1045 };
1046 
1047 static struct clk_rcg2 maple_clk_src = {
1048 	.cmd_rcgr = 0x1320,
1049 	.hid_width = 5,
1050 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
1051 	.freq_tbl = ftbl_vpu_maple_clk,
1052 	.clkr.hw.init = &(struct clk_init_data){
1053 		.name = "maple_clk_src",
1054 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
1055 		.num_parents = 4,
1056 		.ops = &clk_rcg2_ops,
1057 	},
1058 };
1059 
1060 static struct freq_tbl ftbl_vpu_vdp_clk[] = {
1061 	F(50000000, P_GPLL0, 12, 0, 0),
1062 	F(100000000, P_GPLL0, 6, 0, 0),
1063 	F(200000000, P_MMPLL0, 4, 0, 0),
1064 	F(320000000, P_MMPLL0, 2.5, 0, 0),
1065 	F(400000000, P_MMPLL0, 2, 0, 0),
1066 	{ }
1067 };
1068 
1069 static struct clk_rcg2 vdp_clk_src = {
1070 	.cmd_rcgr = 0x1300,
1071 	.hid_width = 5,
1072 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
1073 	.freq_tbl = ftbl_vpu_vdp_clk,
1074 	.clkr.hw.init = &(struct clk_init_data){
1075 		.name = "vdp_clk_src",
1076 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
1077 		.num_parents = 4,
1078 		.ops = &clk_rcg2_ops,
1079 	},
1080 };
1081 
1082 static struct freq_tbl ftbl_vpu_bus_clk[] = {
1083 	F(40000000, P_GPLL0, 15, 0, 0),
1084 	F(80000000, P_MMPLL0, 10, 0, 0),
1085 	{ }
1086 };
1087 
1088 static struct clk_rcg2 vpu_bus_clk_src = {
1089 	.cmd_rcgr = 0x1340,
1090 	.hid_width = 5,
1091 	.parent_map = mmcc_xo_mmpll0_mmpll1_gpll0_map,
1092 	.freq_tbl = ftbl_vpu_bus_clk,
1093 	.clkr.hw.init = &(struct clk_init_data){
1094 		.name = "vpu_bus_clk_src",
1095 		.parent_names = mmcc_xo_mmpll0_mmpll1_gpll0,
1096 		.num_parents = 4,
1097 		.ops = &clk_rcg2_ops,
1098 	},
1099 };
1100 
1101 static struct clk_branch mmss_cxo_clk = {
1102 	.halt_reg = 0x5104,
1103 	.clkr = {
1104 		.enable_reg = 0x5104,
1105 		.enable_mask = BIT(0),
1106 		.hw.init = &(struct clk_init_data){
1107 			.name = "mmss_cxo_clk",
1108 			.parent_names = (const char *[]){ "xo" },
1109 			.num_parents = 1,
1110 			.flags = CLK_SET_RATE_PARENT,
1111 			.ops = &clk_branch2_ops,
1112 		},
1113 	},
1114 };
1115 
1116 static struct clk_branch mmss_sleepclk_clk = {
1117 	.halt_reg = 0x5100,
1118 	.clkr = {
1119 		.enable_reg = 0x5100,
1120 		.enable_mask = BIT(0),
1121 		.hw.init = &(struct clk_init_data){
1122 			.name = "mmss_sleepclk_clk",
1123 			.parent_names = (const char *[]){
1124 				"sleep_clk_src",
1125 			},
1126 			.num_parents = 1,
1127 			.flags = CLK_SET_RATE_PARENT,
1128 			.ops = &clk_branch2_ops,
1129 		},
1130 	},
1131 };
1132 
1133 static struct clk_branch avsync_ahb_clk = {
1134 	.halt_reg = 0x2414,
1135 	.clkr = {
1136 		.enable_reg = 0x2414,
1137 		.enable_mask = BIT(0),
1138 		.hw.init = &(struct clk_init_data){
1139 			.name = "avsync_ahb_clk",
1140 			.parent_names = (const char *[]){
1141 				"mmss_ahb_clk_src",
1142 			},
1143 			.num_parents = 1,
1144 			.flags = CLK_SET_RATE_PARENT,
1145 			.ops = &clk_branch2_ops,
1146 		},
1147 	},
1148 };
1149 
1150 static struct clk_branch avsync_edppixel_clk = {
1151 	.halt_reg = 0x2418,
1152 	.clkr = {
1153 		.enable_reg = 0x2418,
1154 		.enable_mask = BIT(0),
1155 		.hw.init = &(struct clk_init_data){
1156 			.name = "avsync_edppixel_clk",
1157 			.parent_names = (const char *[]){
1158 				"edppixel_clk_src",
1159 			},
1160 			.num_parents = 1,
1161 			.flags = CLK_SET_RATE_PARENT,
1162 			.ops = &clk_branch2_ops,
1163 		},
1164 	},
1165 };
1166 
1167 static struct clk_branch avsync_extpclk_clk = {
1168 	.halt_reg = 0x2410,
1169 	.clkr = {
1170 		.enable_reg = 0x2410,
1171 		.enable_mask = BIT(0),
1172 		.hw.init = &(struct clk_init_data){
1173 			.name = "avsync_extpclk_clk",
1174 			.parent_names = (const char *[]){
1175 				"extpclk_clk_src",
1176 			},
1177 			.num_parents = 1,
1178 			.flags = CLK_SET_RATE_PARENT,
1179 			.ops = &clk_branch2_ops,
1180 		},
1181 	},
1182 };
1183 
1184 static struct clk_branch avsync_pclk0_clk = {
1185 	.halt_reg = 0x241c,
1186 	.clkr = {
1187 		.enable_reg = 0x241c,
1188 		.enable_mask = BIT(0),
1189 		.hw.init = &(struct clk_init_data){
1190 			.name = "avsync_pclk0_clk",
1191 			.parent_names = (const char *[]){
1192 				"pclk0_clk_src",
1193 			},
1194 			.num_parents = 1,
1195 			.flags = CLK_SET_RATE_PARENT,
1196 			.ops = &clk_branch2_ops,
1197 		},
1198 	},
1199 };
1200 
1201 static struct clk_branch avsync_pclk1_clk = {
1202 	.halt_reg = 0x2420,
1203 	.clkr = {
1204 		.enable_reg = 0x2420,
1205 		.enable_mask = BIT(0),
1206 		.hw.init = &(struct clk_init_data){
1207 			.name = "avsync_pclk1_clk",
1208 			.parent_names = (const char *[]){
1209 				"pclk1_clk_src",
1210 			},
1211 			.num_parents = 1,
1212 			.flags = CLK_SET_RATE_PARENT,
1213 			.ops = &clk_branch2_ops,
1214 		},
1215 	},
1216 };
1217 
1218 static struct clk_branch avsync_vp_clk = {
1219 	.halt_reg = 0x2404,
1220 	.clkr = {
1221 		.enable_reg = 0x2404,
1222 		.enable_mask = BIT(0),
1223 		.hw.init = &(struct clk_init_data){
1224 			.name = "avsync_vp_clk",
1225 			.parent_names = (const char *[]){
1226 				"vp_clk_src",
1227 			},
1228 			.num_parents = 1,
1229 			.flags = CLK_SET_RATE_PARENT,
1230 			.ops = &clk_branch2_ops,
1231 		},
1232 	},
1233 };
1234 
1235 static struct clk_branch camss_ahb_clk = {
1236 	.halt_reg = 0x348c,
1237 	.clkr = {
1238 		.enable_reg = 0x348c,
1239 		.enable_mask = BIT(0),
1240 		.hw.init = &(struct clk_init_data){
1241 			.name = "camss_ahb_clk",
1242 			.parent_names = (const char *[]){
1243 				"mmss_ahb_clk_src",
1244 			},
1245 			.num_parents = 1,
1246 			.flags = CLK_SET_RATE_PARENT,
1247 			.ops = &clk_branch2_ops,
1248 		},
1249 	},
1250 };
1251 
1252 static struct clk_branch camss_cci_cci_ahb_clk = {
1253 	.halt_reg = 0x3348,
1254 	.clkr = {
1255 		.enable_reg = 0x3348,
1256 		.enable_mask = BIT(0),
1257 		.hw.init = &(struct clk_init_data){
1258 			.name = "camss_cci_cci_ahb_clk",
1259 			.parent_names = (const char *[]){
1260 				"mmss_ahb_clk_src",
1261 			},
1262 			.num_parents = 1,
1263 			.ops = &clk_branch2_ops,
1264 		},
1265 	},
1266 };
1267 
1268 static struct clk_branch camss_cci_cci_clk = {
1269 	.halt_reg = 0x3344,
1270 	.clkr = {
1271 		.enable_reg = 0x3344,
1272 		.enable_mask = BIT(0),
1273 		.hw.init = &(struct clk_init_data){
1274 			.name = "camss_cci_cci_clk",
1275 			.parent_names = (const char *[]){
1276 				"cci_clk_src",
1277 			},
1278 			.num_parents = 1,
1279 			.flags = CLK_SET_RATE_PARENT,
1280 			.ops = &clk_branch2_ops,
1281 		},
1282 	},
1283 };
1284 
1285 static struct clk_branch camss_csi0_ahb_clk = {
1286 	.halt_reg = 0x30bc,
1287 	.clkr = {
1288 		.enable_reg = 0x30bc,
1289 		.enable_mask = BIT(0),
1290 		.hw.init = &(struct clk_init_data){
1291 			.name = "camss_csi0_ahb_clk",
1292 			.parent_names = (const char *[]){
1293 				"mmss_ahb_clk_src",
1294 			},
1295 			.num_parents = 1,
1296 			.ops = &clk_branch2_ops,
1297 		},
1298 	},
1299 };
1300 
1301 static struct clk_branch camss_csi0_clk = {
1302 	.halt_reg = 0x30b4,
1303 	.clkr = {
1304 		.enable_reg = 0x30b4,
1305 		.enable_mask = BIT(0),
1306 		.hw.init = &(struct clk_init_data){
1307 			.name = "camss_csi0_clk",
1308 			.parent_names = (const char *[]){
1309 				"csi0_clk_src",
1310 			},
1311 			.num_parents = 1,
1312 			.flags = CLK_SET_RATE_PARENT,
1313 			.ops = &clk_branch2_ops,
1314 		},
1315 	},
1316 };
1317 
1318 static struct clk_branch camss_csi0phy_clk = {
1319 	.halt_reg = 0x30c4,
1320 	.clkr = {
1321 		.enable_reg = 0x30c4,
1322 		.enable_mask = BIT(0),
1323 		.hw.init = &(struct clk_init_data){
1324 			.name = "camss_csi0phy_clk",
1325 			.parent_names = (const char *[]){
1326 				"csi0_clk_src",
1327 			},
1328 			.num_parents = 1,
1329 			.flags = CLK_SET_RATE_PARENT,
1330 			.ops = &clk_branch2_ops,
1331 		},
1332 	},
1333 };
1334 
1335 static struct clk_branch camss_csi0pix_clk = {
1336 	.halt_reg = 0x30e4,
1337 	.clkr = {
1338 		.enable_reg = 0x30e4,
1339 		.enable_mask = BIT(0),
1340 		.hw.init = &(struct clk_init_data){
1341 			.name = "camss_csi0pix_clk",
1342 			.parent_names = (const char *[]){
1343 				"csi0_clk_src",
1344 			},
1345 			.num_parents = 1,
1346 			.flags = CLK_SET_RATE_PARENT,
1347 			.ops = &clk_branch2_ops,
1348 		},
1349 	},
1350 };
1351 
1352 static struct clk_branch camss_csi0rdi_clk = {
1353 	.halt_reg = 0x30d4,
1354 	.clkr = {
1355 		.enable_reg = 0x30d4,
1356 		.enable_mask = BIT(0),
1357 		.hw.init = &(struct clk_init_data){
1358 			.name = "camss_csi0rdi_clk",
1359 			.parent_names = (const char *[]){
1360 				"csi0_clk_src",
1361 			},
1362 			.num_parents = 1,
1363 			.flags = CLK_SET_RATE_PARENT,
1364 			.ops = &clk_branch2_ops,
1365 		},
1366 	},
1367 };
1368 
1369 static struct clk_branch camss_csi1_ahb_clk = {
1370 	.halt_reg = 0x3128,
1371 	.clkr = {
1372 		.enable_reg = 0x3128,
1373 		.enable_mask = BIT(0),
1374 		.hw.init = &(struct clk_init_data){
1375 			.name = "camss_csi1_ahb_clk",
1376 			.parent_names = (const char *[]){
1377 				"mmss_ahb_clk_src",
1378 			},
1379 			.num_parents = 1,
1380 			.flags = CLK_SET_RATE_PARENT,
1381 			.ops = &clk_branch2_ops,
1382 		},
1383 	},
1384 };
1385 
1386 static struct clk_branch camss_csi1_clk = {
1387 	.halt_reg = 0x3124,
1388 	.clkr = {
1389 		.enable_reg = 0x3124,
1390 		.enable_mask = BIT(0),
1391 		.hw.init = &(struct clk_init_data){
1392 			.name = "camss_csi1_clk",
1393 			.parent_names = (const char *[]){
1394 				"csi1_clk_src",
1395 			},
1396 			.num_parents = 1,
1397 			.flags = CLK_SET_RATE_PARENT,
1398 			.ops = &clk_branch2_ops,
1399 		},
1400 	},
1401 };
1402 
1403 static struct clk_branch camss_csi1phy_clk = {
1404 	.halt_reg = 0x3134,
1405 	.clkr = {
1406 		.enable_reg = 0x3134,
1407 		.enable_mask = BIT(0),
1408 		.hw.init = &(struct clk_init_data){
1409 			.name = "camss_csi1phy_clk",
1410 			.parent_names = (const char *[]){
1411 				"csi1_clk_src",
1412 			},
1413 			.num_parents = 1,
1414 			.flags = CLK_SET_RATE_PARENT,
1415 			.ops = &clk_branch2_ops,
1416 		},
1417 	},
1418 };
1419 
1420 static struct clk_branch camss_csi1pix_clk = {
1421 	.halt_reg = 0x3154,
1422 	.clkr = {
1423 		.enable_reg = 0x3154,
1424 		.enable_mask = BIT(0),
1425 		.hw.init = &(struct clk_init_data){
1426 			.name = "camss_csi1pix_clk",
1427 			.parent_names = (const char *[]){
1428 				"csi1_clk_src",
1429 			},
1430 			.num_parents = 1,
1431 			.flags = CLK_SET_RATE_PARENT,
1432 			.ops = &clk_branch2_ops,
1433 		},
1434 	},
1435 };
1436 
1437 static struct clk_branch camss_csi1rdi_clk = {
1438 	.halt_reg = 0x3144,
1439 	.clkr = {
1440 		.enable_reg = 0x3144,
1441 		.enable_mask = BIT(0),
1442 		.hw.init = &(struct clk_init_data){
1443 			.name = "camss_csi1rdi_clk",
1444 			.parent_names = (const char *[]){
1445 				"csi1_clk_src",
1446 			},
1447 			.num_parents = 1,
1448 			.flags = CLK_SET_RATE_PARENT,
1449 			.ops = &clk_branch2_ops,
1450 		},
1451 	},
1452 };
1453 
1454 static struct clk_branch camss_csi2_ahb_clk = {
1455 	.halt_reg = 0x3188,
1456 	.clkr = {
1457 		.enable_reg = 0x3188,
1458 		.enable_mask = BIT(0),
1459 		.hw.init = &(struct clk_init_data){
1460 			.name = "camss_csi2_ahb_clk",
1461 			.parent_names = (const char *[]){
1462 				"mmss_ahb_clk_src",
1463 			},
1464 			.num_parents = 1,
1465 			.ops = &clk_branch2_ops,
1466 		},
1467 	},
1468 };
1469 
1470 static struct clk_branch camss_csi2_clk = {
1471 	.halt_reg = 0x3184,
1472 	.clkr = {
1473 		.enable_reg = 0x3184,
1474 		.enable_mask = BIT(0),
1475 		.hw.init = &(struct clk_init_data){
1476 			.name = "camss_csi2_clk",
1477 			.parent_names = (const char *[]){
1478 				"csi2_clk_src",
1479 			},
1480 			.num_parents = 1,
1481 			.flags = CLK_SET_RATE_PARENT,
1482 			.ops = &clk_branch2_ops,
1483 		},
1484 	},
1485 };
1486 
1487 static struct clk_branch camss_csi2phy_clk = {
1488 	.halt_reg = 0x3194,
1489 	.clkr = {
1490 		.enable_reg = 0x3194,
1491 		.enable_mask = BIT(0),
1492 		.hw.init = &(struct clk_init_data){
1493 			.name = "camss_csi2phy_clk",
1494 			.parent_names = (const char *[]){
1495 				"csi2_clk_src",
1496 			},
1497 			.num_parents = 1,
1498 			.flags = CLK_SET_RATE_PARENT,
1499 			.ops = &clk_branch2_ops,
1500 		},
1501 	},
1502 };
1503 
1504 static struct clk_branch camss_csi2pix_clk = {
1505 	.halt_reg = 0x31b4,
1506 	.clkr = {
1507 		.enable_reg = 0x31b4,
1508 		.enable_mask = BIT(0),
1509 		.hw.init = &(struct clk_init_data){
1510 			.name = "camss_csi2pix_clk",
1511 			.parent_names = (const char *[]){
1512 				"csi2_clk_src",
1513 			},
1514 			.num_parents = 1,
1515 			.flags = CLK_SET_RATE_PARENT,
1516 			.ops = &clk_branch2_ops,
1517 		},
1518 	},
1519 };
1520 
1521 static struct clk_branch camss_csi2rdi_clk = {
1522 	.halt_reg = 0x31a4,
1523 	.clkr = {
1524 		.enable_reg = 0x31a4,
1525 		.enable_mask = BIT(0),
1526 		.hw.init = &(struct clk_init_data){
1527 			.name = "camss_csi2rdi_clk",
1528 			.parent_names = (const char *[]){
1529 				"csi2_clk_src",
1530 			},
1531 			.num_parents = 1,
1532 			.flags = CLK_SET_RATE_PARENT,
1533 			.ops = &clk_branch2_ops,
1534 		},
1535 	},
1536 };
1537 
1538 static struct clk_branch camss_csi3_ahb_clk = {
1539 	.halt_reg = 0x31e8,
1540 	.clkr = {
1541 		.enable_reg = 0x31e8,
1542 		.enable_mask = BIT(0),
1543 		.hw.init = &(struct clk_init_data){
1544 			.name = "camss_csi3_ahb_clk",
1545 			.parent_names = (const char *[]){
1546 				"mmss_ahb_clk_src",
1547 			},
1548 			.num_parents = 1,
1549 			.ops = &clk_branch2_ops,
1550 		},
1551 	},
1552 };
1553 
1554 static struct clk_branch camss_csi3_clk = {
1555 	.halt_reg = 0x31e4,
1556 	.clkr = {
1557 		.enable_reg = 0x31e4,
1558 		.enable_mask = BIT(0),
1559 		.hw.init = &(struct clk_init_data){
1560 			.name = "camss_csi3_clk",
1561 			.parent_names = (const char *[]){
1562 				"csi3_clk_src",
1563 			},
1564 			.num_parents = 1,
1565 			.flags = CLK_SET_RATE_PARENT,
1566 			.ops = &clk_branch2_ops,
1567 		},
1568 	},
1569 };
1570 
1571 static struct clk_branch camss_csi3phy_clk = {
1572 	.halt_reg = 0x31f4,
1573 	.clkr = {
1574 		.enable_reg = 0x31f4,
1575 		.enable_mask = BIT(0),
1576 		.hw.init = &(struct clk_init_data){
1577 			.name = "camss_csi3phy_clk",
1578 			.parent_names = (const char *[]){
1579 				"csi3_clk_src",
1580 			},
1581 			.num_parents = 1,
1582 			.flags = CLK_SET_RATE_PARENT,
1583 			.ops = &clk_branch2_ops,
1584 		},
1585 	},
1586 };
1587 
1588 static struct clk_branch camss_csi3pix_clk = {
1589 	.halt_reg = 0x3214,
1590 	.clkr = {
1591 		.enable_reg = 0x3214,
1592 		.enable_mask = BIT(0),
1593 		.hw.init = &(struct clk_init_data){
1594 			.name = "camss_csi3pix_clk",
1595 			.parent_names = (const char *[]){
1596 				"csi3_clk_src",
1597 			},
1598 			.num_parents = 1,
1599 			.flags = CLK_SET_RATE_PARENT,
1600 			.ops = &clk_branch2_ops,
1601 		},
1602 	},
1603 };
1604 
1605 static struct clk_branch camss_csi3rdi_clk = {
1606 	.halt_reg = 0x3204,
1607 	.clkr = {
1608 		.enable_reg = 0x3204,
1609 		.enable_mask = BIT(0),
1610 		.hw.init = &(struct clk_init_data){
1611 			.name = "camss_csi3rdi_clk",
1612 			.parent_names = (const char *[]){
1613 				"csi3_clk_src",
1614 			},
1615 			.num_parents = 1,
1616 			.flags = CLK_SET_RATE_PARENT,
1617 			.ops = &clk_branch2_ops,
1618 		},
1619 	},
1620 };
1621 
1622 static struct clk_branch camss_csi_vfe0_clk = {
1623 	.halt_reg = 0x3704,
1624 	.clkr = {
1625 		.enable_reg = 0x3704,
1626 		.enable_mask = BIT(0),
1627 		.hw.init = &(struct clk_init_data){
1628 			.name = "camss_csi_vfe0_clk",
1629 			.parent_names = (const char *[]){
1630 				"vfe0_clk_src",
1631 			},
1632 			.num_parents = 1,
1633 			.flags = CLK_SET_RATE_PARENT,
1634 			.ops = &clk_branch2_ops,
1635 		},
1636 	},
1637 };
1638 
1639 static struct clk_branch camss_csi_vfe1_clk = {
1640 	.halt_reg = 0x3714,
1641 	.clkr = {
1642 		.enable_reg = 0x3714,
1643 		.enable_mask = BIT(0),
1644 		.hw.init = &(struct clk_init_data){
1645 			.name = "camss_csi_vfe1_clk",
1646 			.parent_names = (const char *[]){
1647 				"vfe1_clk_src",
1648 			},
1649 			.num_parents = 1,
1650 			.flags = CLK_SET_RATE_PARENT,
1651 			.ops = &clk_branch2_ops,
1652 		},
1653 	},
1654 };
1655 
1656 static struct clk_branch camss_gp0_clk = {
1657 	.halt_reg = 0x3444,
1658 	.clkr = {
1659 		.enable_reg = 0x3444,
1660 		.enable_mask = BIT(0),
1661 		.hw.init = &(struct clk_init_data){
1662 			.name = "camss_gp0_clk",
1663 			.parent_names = (const char *[]){
1664 				"camss_gp0_clk_src",
1665 			},
1666 			.num_parents = 1,
1667 			.flags = CLK_SET_RATE_PARENT,
1668 			.ops = &clk_branch2_ops,
1669 		},
1670 	},
1671 };
1672 
1673 static struct clk_branch camss_gp1_clk = {
1674 	.halt_reg = 0x3474,
1675 	.clkr = {
1676 		.enable_reg = 0x3474,
1677 		.enable_mask = BIT(0),
1678 		.hw.init = &(struct clk_init_data){
1679 			.name = "camss_gp1_clk",
1680 			.parent_names = (const char *[]){
1681 				"camss_gp1_clk_src",
1682 			},
1683 			.num_parents = 1,
1684 			.flags = CLK_SET_RATE_PARENT,
1685 			.ops = &clk_branch2_ops,
1686 		},
1687 	},
1688 };
1689 
1690 static struct clk_branch camss_ispif_ahb_clk = {
1691 	.halt_reg = 0x3224,
1692 	.clkr = {
1693 		.enable_reg = 0x3224,
1694 		.enable_mask = BIT(0),
1695 		.hw.init = &(struct clk_init_data){
1696 			.name = "camss_ispif_ahb_clk",
1697 			.parent_names = (const char *[]){
1698 				"mmss_ahb_clk_src",
1699 			},
1700 			.num_parents = 1,
1701 			.flags = CLK_SET_RATE_PARENT,
1702 			.ops = &clk_branch2_ops,
1703 		},
1704 	},
1705 };
1706 
1707 static struct clk_branch camss_jpeg_jpeg0_clk = {
1708 	.halt_reg = 0x35a8,
1709 	.clkr = {
1710 		.enable_reg = 0x35a8,
1711 		.enable_mask = BIT(0),
1712 		.hw.init = &(struct clk_init_data){
1713 			.name = "camss_jpeg_jpeg0_clk",
1714 			.parent_names = (const char *[]){
1715 				"jpeg0_clk_src",
1716 			},
1717 			.num_parents = 1,
1718 			.flags = CLK_SET_RATE_PARENT,
1719 			.ops = &clk_branch2_ops,
1720 		},
1721 	},
1722 };
1723 
1724 static struct clk_branch camss_jpeg_jpeg1_clk = {
1725 	.halt_reg = 0x35ac,
1726 	.clkr = {
1727 		.enable_reg = 0x35ac,
1728 		.enable_mask = BIT(0),
1729 		.hw.init = &(struct clk_init_data){
1730 			.name = "camss_jpeg_jpeg1_clk",
1731 			.parent_names = (const char *[]){
1732 				"jpeg1_clk_src",
1733 			},
1734 			.num_parents = 1,
1735 			.flags = CLK_SET_RATE_PARENT,
1736 			.ops = &clk_branch2_ops,
1737 		},
1738 	},
1739 };
1740 
1741 static struct clk_branch camss_jpeg_jpeg2_clk = {
1742 	.halt_reg = 0x35b0,
1743 	.clkr = {
1744 		.enable_reg = 0x35b0,
1745 		.enable_mask = BIT(0),
1746 		.hw.init = &(struct clk_init_data){
1747 			.name = "camss_jpeg_jpeg2_clk",
1748 			.parent_names = (const char *[]){
1749 				"jpeg2_clk_src",
1750 			},
1751 			.num_parents = 1,
1752 			.flags = CLK_SET_RATE_PARENT,
1753 			.ops = &clk_branch2_ops,
1754 		},
1755 	},
1756 };
1757 
1758 static struct clk_branch camss_jpeg_jpeg_ahb_clk = {
1759 	.halt_reg = 0x35b4,
1760 	.clkr = {
1761 		.enable_reg = 0x35b4,
1762 		.enable_mask = BIT(0),
1763 		.hw.init = &(struct clk_init_data){
1764 			.name = "camss_jpeg_jpeg_ahb_clk",
1765 			.parent_names = (const char *[]){
1766 				"mmss_ahb_clk_src",
1767 			},
1768 			.num_parents = 1,
1769 			.ops = &clk_branch2_ops,
1770 		},
1771 	},
1772 };
1773 
1774 static struct clk_branch camss_jpeg_jpeg_axi_clk = {
1775 	.halt_reg = 0x35b8,
1776 	.clkr = {
1777 		.enable_reg = 0x35b8,
1778 		.enable_mask = BIT(0),
1779 		.hw.init = &(struct clk_init_data){
1780 			.name = "camss_jpeg_jpeg_axi_clk",
1781 			.parent_names = (const char *[]){
1782 				"mmss_axi_clk_src",
1783 			},
1784 			.num_parents = 1,
1785 			.ops = &clk_branch2_ops,
1786 		},
1787 	},
1788 };
1789 
1790 static struct clk_branch camss_mclk0_clk = {
1791 	.halt_reg = 0x3384,
1792 	.clkr = {
1793 		.enable_reg = 0x3384,
1794 		.enable_mask = BIT(0),
1795 		.hw.init = &(struct clk_init_data){
1796 			.name = "camss_mclk0_clk",
1797 			.parent_names = (const char *[]){
1798 				"mclk0_clk_src",
1799 			},
1800 			.num_parents = 1,
1801 			.flags = CLK_SET_RATE_PARENT,
1802 			.ops = &clk_branch2_ops,
1803 		},
1804 	},
1805 };
1806 
1807 static struct clk_branch camss_mclk1_clk = {
1808 	.halt_reg = 0x33b4,
1809 	.clkr = {
1810 		.enable_reg = 0x33b4,
1811 		.enable_mask = BIT(0),
1812 		.hw.init = &(struct clk_init_data){
1813 			.name = "camss_mclk1_clk",
1814 			.parent_names = (const char *[]){
1815 				"mclk1_clk_src",
1816 			},
1817 			.num_parents = 1,
1818 			.flags = CLK_SET_RATE_PARENT,
1819 			.ops = &clk_branch2_ops,
1820 		},
1821 	},
1822 };
1823 
1824 static struct clk_branch camss_mclk2_clk = {
1825 	.halt_reg = 0x33e4,
1826 	.clkr = {
1827 		.enable_reg = 0x33e4,
1828 		.enable_mask = BIT(0),
1829 		.hw.init = &(struct clk_init_data){
1830 			.name = "camss_mclk2_clk",
1831 			.parent_names = (const char *[]){
1832 				"mclk2_clk_src",
1833 			},
1834 			.num_parents = 1,
1835 			.flags = CLK_SET_RATE_PARENT,
1836 			.ops = &clk_branch2_ops,
1837 		},
1838 	},
1839 };
1840 
1841 static struct clk_branch camss_mclk3_clk = {
1842 	.halt_reg = 0x3414,
1843 	.clkr = {
1844 		.enable_reg = 0x3414,
1845 		.enable_mask = BIT(0),
1846 		.hw.init = &(struct clk_init_data){
1847 			.name = "camss_mclk3_clk",
1848 			.parent_names = (const char *[]){
1849 				"mclk3_clk_src",
1850 			},
1851 			.num_parents = 1,
1852 			.flags = CLK_SET_RATE_PARENT,
1853 			.ops = &clk_branch2_ops,
1854 		},
1855 	},
1856 };
1857 
1858 static struct clk_branch camss_micro_ahb_clk = {
1859 	.halt_reg = 0x3494,
1860 	.clkr = {
1861 		.enable_reg = 0x3494,
1862 		.enable_mask = BIT(0),
1863 		.hw.init = &(struct clk_init_data){
1864 			.name = "camss_micro_ahb_clk",
1865 			.parent_names = (const char *[]){
1866 				"mmss_ahb_clk_src",
1867 			},
1868 			.num_parents = 1,
1869 			.ops = &clk_branch2_ops,
1870 		},
1871 	},
1872 };
1873 
1874 static struct clk_branch camss_phy0_csi0phytimer_clk = {
1875 	.halt_reg = 0x3024,
1876 	.clkr = {
1877 		.enable_reg = 0x3024,
1878 		.enable_mask = BIT(0),
1879 		.hw.init = &(struct clk_init_data){
1880 			.name = "camss_phy0_csi0phytimer_clk",
1881 			.parent_names = (const char *[]){
1882 				"csi0phytimer_clk_src",
1883 			},
1884 			.num_parents = 1,
1885 			.flags = CLK_SET_RATE_PARENT,
1886 			.ops = &clk_branch2_ops,
1887 		},
1888 	},
1889 };
1890 
1891 static struct clk_branch camss_phy1_csi1phytimer_clk = {
1892 	.halt_reg = 0x3054,
1893 	.clkr = {
1894 		.enable_reg = 0x3054,
1895 		.enable_mask = BIT(0),
1896 		.hw.init = &(struct clk_init_data){
1897 			.name = "camss_phy1_csi1phytimer_clk",
1898 			.parent_names = (const char *[]){
1899 				"csi1phytimer_clk_src",
1900 			},
1901 			.num_parents = 1,
1902 			.flags = CLK_SET_RATE_PARENT,
1903 			.ops = &clk_branch2_ops,
1904 		},
1905 	},
1906 };
1907 
1908 static struct clk_branch camss_phy2_csi2phytimer_clk = {
1909 	.halt_reg = 0x3084,
1910 	.clkr = {
1911 		.enable_reg = 0x3084,
1912 		.enable_mask = BIT(0),
1913 		.hw.init = &(struct clk_init_data){
1914 			.name = "camss_phy2_csi2phytimer_clk",
1915 			.parent_names = (const char *[]){
1916 				"csi2phytimer_clk_src",
1917 			},
1918 			.num_parents = 1,
1919 			.flags = CLK_SET_RATE_PARENT,
1920 			.ops = &clk_branch2_ops,
1921 		},
1922 	},
1923 };
1924 
1925 static struct clk_branch camss_top_ahb_clk = {
1926 	.halt_reg = 0x3484,
1927 	.clkr = {
1928 		.enable_reg = 0x3484,
1929 		.enable_mask = BIT(0),
1930 		.hw.init = &(struct clk_init_data){
1931 			.name = "camss_top_ahb_clk",
1932 			.parent_names = (const char *[]){
1933 				"mmss_ahb_clk_src",
1934 			},
1935 			.num_parents = 1,
1936 			.flags = CLK_SET_RATE_PARENT,
1937 			.ops = &clk_branch2_ops,
1938 		},
1939 	},
1940 };
1941 
1942 static struct clk_branch camss_vfe_cpp_ahb_clk = {
1943 	.halt_reg = 0x36b4,
1944 	.clkr = {
1945 		.enable_reg = 0x36b4,
1946 		.enable_mask = BIT(0),
1947 		.hw.init = &(struct clk_init_data){
1948 			.name = "camss_vfe_cpp_ahb_clk",
1949 			.parent_names = (const char *[]){
1950 				"mmss_ahb_clk_src",
1951 			},
1952 			.num_parents = 1,
1953 			.flags = CLK_SET_RATE_PARENT,
1954 			.ops = &clk_branch2_ops,
1955 		},
1956 	},
1957 };
1958 
1959 static struct clk_branch camss_vfe_cpp_clk = {
1960 	.halt_reg = 0x36b0,
1961 	.clkr = {
1962 		.enable_reg = 0x36b0,
1963 		.enable_mask = BIT(0),
1964 		.hw.init = &(struct clk_init_data){
1965 			.name = "camss_vfe_cpp_clk",
1966 			.parent_names = (const char *[]){
1967 				"cpp_clk_src",
1968 			},
1969 			.num_parents = 1,
1970 			.flags = CLK_SET_RATE_PARENT,
1971 			.ops = &clk_branch2_ops,
1972 		},
1973 	},
1974 };
1975 
1976 static struct clk_branch camss_vfe_vfe0_clk = {
1977 	.halt_reg = 0x36a8,
1978 	.clkr = {
1979 		.enable_reg = 0x36a8,
1980 		.enable_mask = BIT(0),
1981 		.hw.init = &(struct clk_init_data){
1982 			.name = "camss_vfe_vfe0_clk",
1983 			.parent_names = (const char *[]){
1984 				"vfe0_clk_src",
1985 			},
1986 			.num_parents = 1,
1987 			.flags = CLK_SET_RATE_PARENT,
1988 			.ops = &clk_branch2_ops,
1989 		},
1990 	},
1991 };
1992 
1993 static struct clk_branch camss_vfe_vfe1_clk = {
1994 	.halt_reg = 0x36ac,
1995 	.clkr = {
1996 		.enable_reg = 0x36ac,
1997 		.enable_mask = BIT(0),
1998 		.hw.init = &(struct clk_init_data){
1999 			.name = "camss_vfe_vfe1_clk",
2000 			.parent_names = (const char *[]){
2001 				"vfe1_clk_src",
2002 			},
2003 			.num_parents = 1,
2004 			.flags = CLK_SET_RATE_PARENT,
2005 			.ops = &clk_branch2_ops,
2006 		},
2007 	},
2008 };
2009 
2010 static struct clk_branch camss_vfe_vfe_ahb_clk = {
2011 	.halt_reg = 0x36b8,
2012 	.clkr = {
2013 		.enable_reg = 0x36b8,
2014 		.enable_mask = BIT(0),
2015 		.hw.init = &(struct clk_init_data){
2016 			.name = "camss_vfe_vfe_ahb_clk",
2017 			.parent_names = (const char *[]){
2018 				"mmss_ahb_clk_src",
2019 			},
2020 			.num_parents = 1,
2021 			.flags = CLK_SET_RATE_PARENT,
2022 			.ops = &clk_branch2_ops,
2023 		},
2024 	},
2025 };
2026 
2027 static struct clk_branch camss_vfe_vfe_axi_clk = {
2028 	.halt_reg = 0x36bc,
2029 	.clkr = {
2030 		.enable_reg = 0x36bc,
2031 		.enable_mask = BIT(0),
2032 		.hw.init = &(struct clk_init_data){
2033 			.name = "camss_vfe_vfe_axi_clk",
2034 			.parent_names = (const char *[]){
2035 				"mmss_axi_clk_src",
2036 			},
2037 			.num_parents = 1,
2038 			.flags = CLK_SET_RATE_PARENT,
2039 			.ops = &clk_branch2_ops,
2040 		},
2041 	},
2042 };
2043 
2044 static struct clk_branch mdss_ahb_clk = {
2045 	.halt_reg = 0x2308,
2046 	.clkr = {
2047 		.enable_reg = 0x2308,
2048 		.enable_mask = BIT(0),
2049 		.hw.init = &(struct clk_init_data){
2050 			.name = "mdss_ahb_clk",
2051 			.parent_names = (const char *[]){
2052 				"mmss_ahb_clk_src",
2053 			},
2054 			.num_parents = 1,
2055 			.flags = CLK_SET_RATE_PARENT,
2056 			.ops = &clk_branch2_ops,
2057 		},
2058 	},
2059 };
2060 
2061 static struct clk_branch mdss_axi_clk = {
2062 	.halt_reg = 0x2310,
2063 	.clkr = {
2064 		.enable_reg = 0x2310,
2065 		.enable_mask = BIT(0),
2066 		.hw.init = &(struct clk_init_data){
2067 			.name = "mdss_axi_clk",
2068 			.parent_names = (const char *[]){
2069 				"mmss_axi_clk_src",
2070 			},
2071 			.num_parents = 1,
2072 			.flags = CLK_SET_RATE_PARENT,
2073 			.ops = &clk_branch2_ops,
2074 		},
2075 	},
2076 };
2077 
2078 static struct clk_branch mdss_byte0_clk = {
2079 	.halt_reg = 0x233c,
2080 	.clkr = {
2081 		.enable_reg = 0x233c,
2082 		.enable_mask = BIT(0),
2083 		.hw.init = &(struct clk_init_data){
2084 			.name = "mdss_byte0_clk",
2085 			.parent_names = (const char *[]){
2086 				"byte0_clk_src",
2087 			},
2088 			.num_parents = 1,
2089 			.flags = CLK_SET_RATE_PARENT,
2090 			.ops = &clk_branch2_ops,
2091 		},
2092 	},
2093 };
2094 
2095 static struct clk_branch mdss_byte1_clk = {
2096 	.halt_reg = 0x2340,
2097 	.clkr = {
2098 		.enable_reg = 0x2340,
2099 		.enable_mask = BIT(0),
2100 		.hw.init = &(struct clk_init_data){
2101 			.name = "mdss_byte1_clk",
2102 			.parent_names = (const char *[]){
2103 				"byte1_clk_src",
2104 			},
2105 			.num_parents = 1,
2106 			.flags = CLK_SET_RATE_PARENT,
2107 			.ops = &clk_branch2_ops,
2108 		},
2109 	},
2110 };
2111 
2112 static struct clk_branch mdss_edpaux_clk = {
2113 	.halt_reg = 0x2334,
2114 	.clkr = {
2115 		.enable_reg = 0x2334,
2116 		.enable_mask = BIT(0),
2117 		.hw.init = &(struct clk_init_data){
2118 			.name = "mdss_edpaux_clk",
2119 			.parent_names = (const char *[]){
2120 				"edpaux_clk_src",
2121 			},
2122 			.num_parents = 1,
2123 			.flags = CLK_SET_RATE_PARENT,
2124 			.ops = &clk_branch2_ops,
2125 		},
2126 	},
2127 };
2128 
2129 static struct clk_branch mdss_edplink_clk = {
2130 	.halt_reg = 0x2330,
2131 	.clkr = {
2132 		.enable_reg = 0x2330,
2133 		.enable_mask = BIT(0),
2134 		.hw.init = &(struct clk_init_data){
2135 			.name = "mdss_edplink_clk",
2136 			.parent_names = (const char *[]){
2137 				"edplink_clk_src",
2138 			},
2139 			.num_parents = 1,
2140 			.flags = CLK_SET_RATE_PARENT,
2141 			.ops = &clk_branch2_ops,
2142 		},
2143 	},
2144 };
2145 
2146 static struct clk_branch mdss_edppixel_clk = {
2147 	.halt_reg = 0x232c,
2148 	.clkr = {
2149 		.enable_reg = 0x232c,
2150 		.enable_mask = BIT(0),
2151 		.hw.init = &(struct clk_init_data){
2152 			.name = "mdss_edppixel_clk",
2153 			.parent_names = (const char *[]){
2154 				"edppixel_clk_src",
2155 			},
2156 			.num_parents = 1,
2157 			.flags = CLK_SET_RATE_PARENT,
2158 			.ops = &clk_branch2_ops,
2159 		},
2160 	},
2161 };
2162 
2163 static struct clk_branch mdss_esc0_clk = {
2164 	.halt_reg = 0x2344,
2165 	.clkr = {
2166 		.enable_reg = 0x2344,
2167 		.enable_mask = BIT(0),
2168 		.hw.init = &(struct clk_init_data){
2169 			.name = "mdss_esc0_clk",
2170 			.parent_names = (const char *[]){
2171 				"esc0_clk_src",
2172 			},
2173 			.num_parents = 1,
2174 			.flags = CLK_SET_RATE_PARENT,
2175 			.ops = &clk_branch2_ops,
2176 		},
2177 	},
2178 };
2179 
2180 static struct clk_branch mdss_esc1_clk = {
2181 	.halt_reg = 0x2348,
2182 	.clkr = {
2183 		.enable_reg = 0x2348,
2184 		.enable_mask = BIT(0),
2185 		.hw.init = &(struct clk_init_data){
2186 			.name = "mdss_esc1_clk",
2187 			.parent_names = (const char *[]){
2188 				"esc1_clk_src",
2189 			},
2190 			.num_parents = 1,
2191 			.flags = CLK_SET_RATE_PARENT,
2192 			.ops = &clk_branch2_ops,
2193 		},
2194 	},
2195 };
2196 
2197 static struct clk_branch mdss_extpclk_clk = {
2198 	.halt_reg = 0x2324,
2199 	.clkr = {
2200 		.enable_reg = 0x2324,
2201 		.enable_mask = BIT(0),
2202 		.hw.init = &(struct clk_init_data){
2203 			.name = "mdss_extpclk_clk",
2204 			.parent_names = (const char *[]){
2205 				"extpclk_clk_src",
2206 			},
2207 			.num_parents = 1,
2208 			.flags = CLK_SET_RATE_PARENT,
2209 			.ops = &clk_branch2_ops,
2210 		},
2211 	},
2212 };
2213 
2214 static struct clk_branch mdss_hdmi_ahb_clk = {
2215 	.halt_reg = 0x230c,
2216 	.clkr = {
2217 		.enable_reg = 0x230c,
2218 		.enable_mask = BIT(0),
2219 		.hw.init = &(struct clk_init_data){
2220 			.name = "mdss_hdmi_ahb_clk",
2221 			.parent_names = (const char *[]){
2222 				"mmss_ahb_clk_src",
2223 			},
2224 			.num_parents = 1,
2225 			.flags = CLK_SET_RATE_PARENT,
2226 			.ops = &clk_branch2_ops,
2227 		},
2228 	},
2229 };
2230 
2231 static struct clk_branch mdss_hdmi_clk = {
2232 	.halt_reg = 0x2338,
2233 	.clkr = {
2234 		.enable_reg = 0x2338,
2235 		.enable_mask = BIT(0),
2236 		.hw.init = &(struct clk_init_data){
2237 			.name = "mdss_hdmi_clk",
2238 			.parent_names = (const char *[]){
2239 				"hdmi_clk_src",
2240 			},
2241 			.num_parents = 1,
2242 			.flags = CLK_SET_RATE_PARENT,
2243 			.ops = &clk_branch2_ops,
2244 		},
2245 	},
2246 };
2247 
2248 static struct clk_branch mdss_mdp_clk = {
2249 	.halt_reg = 0x231c,
2250 	.clkr = {
2251 		.enable_reg = 0x231c,
2252 		.enable_mask = BIT(0),
2253 		.hw.init = &(struct clk_init_data){
2254 			.name = "mdss_mdp_clk",
2255 			.parent_names = (const char *[]){
2256 				"mdp_clk_src",
2257 			},
2258 			.num_parents = 1,
2259 			.flags = CLK_SET_RATE_PARENT,
2260 			.ops = &clk_branch2_ops,
2261 		},
2262 	},
2263 };
2264 
2265 static struct clk_branch mdss_mdp_lut_clk = {
2266 	.halt_reg = 0x2320,
2267 	.clkr = {
2268 		.enable_reg = 0x2320,
2269 		.enable_mask = BIT(0),
2270 		.hw.init = &(struct clk_init_data){
2271 			.name = "mdss_mdp_lut_clk",
2272 			.parent_names = (const char *[]){
2273 				"mdp_clk_src",
2274 			},
2275 			.num_parents = 1,
2276 			.flags = CLK_SET_RATE_PARENT,
2277 			.ops = &clk_branch2_ops,
2278 		},
2279 	},
2280 };
2281 
2282 static struct clk_branch mdss_pclk0_clk = {
2283 	.halt_reg = 0x2314,
2284 	.clkr = {
2285 		.enable_reg = 0x2314,
2286 		.enable_mask = BIT(0),
2287 		.hw.init = &(struct clk_init_data){
2288 			.name = "mdss_pclk0_clk",
2289 			.parent_names = (const char *[]){
2290 				"pclk0_clk_src",
2291 			},
2292 			.num_parents = 1,
2293 			.flags = CLK_SET_RATE_PARENT,
2294 			.ops = &clk_branch2_ops,
2295 		},
2296 	},
2297 };
2298 
2299 static struct clk_branch mdss_pclk1_clk = {
2300 	.halt_reg = 0x2318,
2301 	.clkr = {
2302 		.enable_reg = 0x2318,
2303 		.enable_mask = BIT(0),
2304 		.hw.init = &(struct clk_init_data){
2305 			.name = "mdss_pclk1_clk",
2306 			.parent_names = (const char *[]){
2307 				"pclk1_clk_src",
2308 			},
2309 			.num_parents = 1,
2310 			.flags = CLK_SET_RATE_PARENT,
2311 			.ops = &clk_branch2_ops,
2312 		},
2313 	},
2314 };
2315 
2316 static struct clk_branch mdss_vsync_clk = {
2317 	.halt_reg = 0x2328,
2318 	.clkr = {
2319 		.enable_reg = 0x2328,
2320 		.enable_mask = BIT(0),
2321 		.hw.init = &(struct clk_init_data){
2322 			.name = "mdss_vsync_clk",
2323 			.parent_names = (const char *[]){
2324 				"vsync_clk_src",
2325 			},
2326 			.num_parents = 1,
2327 			.flags = CLK_SET_RATE_PARENT,
2328 			.ops = &clk_branch2_ops,
2329 		},
2330 	},
2331 };
2332 
2333 static struct clk_branch mmss_rbcpr_ahb_clk = {
2334 	.halt_reg = 0x4088,
2335 	.clkr = {
2336 		.enable_reg = 0x4088,
2337 		.enable_mask = BIT(0),
2338 		.hw.init = &(struct clk_init_data){
2339 			.name = "mmss_rbcpr_ahb_clk",
2340 			.parent_names = (const char *[]){
2341 				"mmss_ahb_clk_src",
2342 			},
2343 			.num_parents = 1,
2344 			.flags = CLK_SET_RATE_PARENT,
2345 			.ops = &clk_branch2_ops,
2346 		},
2347 	},
2348 };
2349 
2350 static struct clk_branch mmss_rbcpr_clk = {
2351 	.halt_reg = 0x4084,
2352 	.clkr = {
2353 		.enable_reg = 0x4084,
2354 		.enable_mask = BIT(0),
2355 		.hw.init = &(struct clk_init_data){
2356 			.name = "mmss_rbcpr_clk",
2357 			.parent_names = (const char *[]){
2358 				"rbcpr_clk_src",
2359 			},
2360 			.num_parents = 1,
2361 			.flags = CLK_SET_RATE_PARENT,
2362 			.ops = &clk_branch2_ops,
2363 		},
2364 	},
2365 };
2366 
2367 static struct clk_branch mmss_spdm_ahb_clk = {
2368 	.halt_reg = 0x0230,
2369 	.clkr = {
2370 		.enable_reg = 0x0230,
2371 		.enable_mask = BIT(0),
2372 		.hw.init = &(struct clk_init_data){
2373 			.name = "mmss_spdm_ahb_clk",
2374 			.parent_names = (const char *[]){
2375 				"mmss_spdm_ahb_div_clk",
2376 			},
2377 			.num_parents = 1,
2378 			.flags = CLK_SET_RATE_PARENT,
2379 			.ops = &clk_branch2_ops,
2380 		},
2381 	},
2382 };
2383 
2384 static struct clk_branch mmss_spdm_axi_clk = {
2385 	.halt_reg = 0x0210,
2386 	.clkr = {
2387 		.enable_reg = 0x0210,
2388 		.enable_mask = BIT(0),
2389 		.hw.init = &(struct clk_init_data){
2390 			.name = "mmss_spdm_axi_clk",
2391 			.parent_names = (const char *[]){
2392 				"mmss_spdm_axi_div_clk",
2393 			},
2394 			.num_parents = 1,
2395 			.flags = CLK_SET_RATE_PARENT,
2396 			.ops = &clk_branch2_ops,
2397 		},
2398 	},
2399 };
2400 
2401 static struct clk_branch mmss_spdm_csi0_clk = {
2402 	.halt_reg = 0x023c,
2403 	.clkr = {
2404 		.enable_reg = 0x023c,
2405 		.enable_mask = BIT(0),
2406 		.hw.init = &(struct clk_init_data){
2407 			.name = "mmss_spdm_csi0_clk",
2408 			.parent_names = (const char *[]){
2409 				"mmss_spdm_csi0_div_clk",
2410 			},
2411 			.num_parents = 1,
2412 			.flags = CLK_SET_RATE_PARENT,
2413 			.ops = &clk_branch2_ops,
2414 		},
2415 	},
2416 };
2417 
2418 static struct clk_branch mmss_spdm_gfx3d_clk = {
2419 	.halt_reg = 0x022c,
2420 	.clkr = {
2421 		.enable_reg = 0x022c,
2422 		.enable_mask = BIT(0),
2423 		.hw.init = &(struct clk_init_data){
2424 			.name = "mmss_spdm_gfx3d_clk",
2425 			.parent_names = (const char *[]){
2426 				"mmss_spdm_gfx3d_div_clk",
2427 			},
2428 			.num_parents = 1,
2429 			.flags = CLK_SET_RATE_PARENT,
2430 			.ops = &clk_branch2_ops,
2431 		},
2432 	},
2433 };
2434 
2435 static struct clk_branch mmss_spdm_jpeg0_clk = {
2436 	.halt_reg = 0x0204,
2437 	.clkr = {
2438 		.enable_reg = 0x0204,
2439 		.enable_mask = BIT(0),
2440 		.hw.init = &(struct clk_init_data){
2441 			.name = "mmss_spdm_jpeg0_clk",
2442 			.parent_names = (const char *[]){
2443 				"mmss_spdm_jpeg0_div_clk",
2444 			},
2445 			.num_parents = 1,
2446 			.flags = CLK_SET_RATE_PARENT,
2447 			.ops = &clk_branch2_ops,
2448 		},
2449 	},
2450 };
2451 
2452 static struct clk_branch mmss_spdm_jpeg1_clk = {
2453 	.halt_reg = 0x0208,
2454 	.clkr = {
2455 		.enable_reg = 0x0208,
2456 		.enable_mask = BIT(0),
2457 		.hw.init = &(struct clk_init_data){
2458 			.name = "mmss_spdm_jpeg1_clk",
2459 			.parent_names = (const char *[]){
2460 				"mmss_spdm_jpeg1_div_clk",
2461 			},
2462 			.num_parents = 1,
2463 			.flags = CLK_SET_RATE_PARENT,
2464 			.ops = &clk_branch2_ops,
2465 		},
2466 	},
2467 };
2468 
2469 static struct clk_branch mmss_spdm_jpeg2_clk = {
2470 	.halt_reg = 0x0224,
2471 	.clkr = {
2472 		.enable_reg = 0x0224,
2473 		.enable_mask = BIT(0),
2474 		.hw.init = &(struct clk_init_data){
2475 			.name = "mmss_spdm_jpeg2_clk",
2476 			.parent_names = (const char *[]){
2477 				"mmss_spdm_jpeg2_div_clk",
2478 			},
2479 			.num_parents = 1,
2480 			.flags = CLK_SET_RATE_PARENT,
2481 			.ops = &clk_branch2_ops,
2482 		},
2483 	},
2484 };
2485 
2486 static struct clk_branch mmss_spdm_mdp_clk = {
2487 	.halt_reg = 0x020c,
2488 	.clkr = {
2489 		.enable_reg = 0x020c,
2490 		.enable_mask = BIT(0),
2491 		.hw.init = &(struct clk_init_data){
2492 			.name = "mmss_spdm_mdp_clk",
2493 			.parent_names = (const char *[]){
2494 				"mmss_spdm_mdp_div_clk",
2495 			},
2496 			.num_parents = 1,
2497 			.flags = CLK_SET_RATE_PARENT,
2498 			.ops = &clk_branch2_ops,
2499 		},
2500 	},
2501 };
2502 
2503 static struct clk_branch mmss_spdm_pclk0_clk = {
2504 	.halt_reg = 0x0234,
2505 	.clkr = {
2506 		.enable_reg = 0x0234,
2507 		.enable_mask = BIT(0),
2508 		.hw.init = &(struct clk_init_data){
2509 			.name = "mmss_spdm_pclk0_clk",
2510 			.parent_names = (const char *[]){
2511 				"mmss_spdm_pclk0_div_clk",
2512 			},
2513 			.num_parents = 1,
2514 			.flags = CLK_SET_RATE_PARENT,
2515 			.ops = &clk_branch2_ops,
2516 		},
2517 	},
2518 };
2519 
2520 static struct clk_branch mmss_spdm_pclk1_clk = {
2521 	.halt_reg = 0x0228,
2522 	.clkr = {
2523 		.enable_reg = 0x0228,
2524 		.enable_mask = BIT(0),
2525 		.hw.init = &(struct clk_init_data){
2526 			.name = "mmss_spdm_pclk1_clk",
2527 			.parent_names = (const char *[]){
2528 				"mmss_spdm_pclk1_div_clk",
2529 			},
2530 			.num_parents = 1,
2531 			.flags = CLK_SET_RATE_PARENT,
2532 			.ops = &clk_branch2_ops,
2533 		},
2534 	},
2535 };
2536 
2537 static struct clk_branch mmss_spdm_vcodec0_clk = {
2538 	.halt_reg = 0x0214,
2539 	.clkr = {
2540 		.enable_reg = 0x0214,
2541 		.enable_mask = BIT(0),
2542 		.hw.init = &(struct clk_init_data){
2543 			.name = "mmss_spdm_vcodec0_clk",
2544 			.parent_names = (const char *[]){
2545 				"mmss_spdm_vcodec0_div_clk",
2546 			},
2547 			.num_parents = 1,
2548 			.flags = CLK_SET_RATE_PARENT,
2549 			.ops = &clk_branch2_ops,
2550 		},
2551 	},
2552 };
2553 
2554 static struct clk_branch mmss_spdm_vfe0_clk = {
2555 	.halt_reg = 0x0218,
2556 	.clkr = {
2557 		.enable_reg = 0x0218,
2558 		.enable_mask = BIT(0),
2559 		.hw.init = &(struct clk_init_data){
2560 			.name = "mmss_spdm_vfe0_clk",
2561 			.parent_names = (const char *[]){
2562 				"mmss_spdm_vfe0_div_clk",
2563 			},
2564 			.num_parents = 1,
2565 			.flags = CLK_SET_RATE_PARENT,
2566 			.ops = &clk_branch2_ops,
2567 		},
2568 	},
2569 };
2570 
2571 static struct clk_branch mmss_spdm_vfe1_clk = {
2572 	.halt_reg = 0x021c,
2573 	.clkr = {
2574 		.enable_reg = 0x021c,
2575 		.enable_mask = BIT(0),
2576 		.hw.init = &(struct clk_init_data){
2577 			.name = "mmss_spdm_vfe1_clk",
2578 			.parent_names = (const char *[]){
2579 				"mmss_spdm_vfe1_div_clk",
2580 			},
2581 			.num_parents = 1,
2582 			.flags = CLK_SET_RATE_PARENT,
2583 			.ops = &clk_branch2_ops,
2584 		},
2585 	},
2586 };
2587 
2588 static struct clk_branch mmss_spdm_rm_axi_clk = {
2589 	.halt_reg = 0x0304,
2590 	.clkr = {
2591 		.enable_reg = 0x0304,
2592 		.enable_mask = BIT(0),
2593 		.hw.init = &(struct clk_init_data){
2594 			.name = "mmss_spdm_rm_axi_clk",
2595 			.parent_names = (const char *[]){
2596 				"mmss_axi_clk_src",
2597 			},
2598 			.num_parents = 1,
2599 			.flags = CLK_SET_RATE_PARENT,
2600 			.ops = &clk_branch2_ops,
2601 		},
2602 	},
2603 };
2604 
2605 static struct clk_branch mmss_spdm_rm_ocmemnoc_clk = {
2606 	.halt_reg = 0x0308,
2607 	.clkr = {
2608 		.enable_reg = 0x0308,
2609 		.enable_mask = BIT(0),
2610 		.hw.init = &(struct clk_init_data){
2611 			.name = "mmss_spdm_rm_ocmemnoc_clk",
2612 			.parent_names = (const char *[]){
2613 				"ocmemnoc_clk_src",
2614 			},
2615 			.num_parents = 1,
2616 			.flags = CLK_SET_RATE_PARENT,
2617 			.ops = &clk_branch2_ops,
2618 		},
2619 	},
2620 };
2621 
2622 
2623 static struct clk_branch mmss_misc_ahb_clk = {
2624 	.halt_reg = 0x502c,
2625 	.clkr = {
2626 		.enable_reg = 0x502c,
2627 		.enable_mask = BIT(0),
2628 		.hw.init = &(struct clk_init_data){
2629 			.name = "mmss_misc_ahb_clk",
2630 			.parent_names = (const char *[]){
2631 				"mmss_ahb_clk_src",
2632 			},
2633 			.num_parents = 1,
2634 			.flags = CLK_SET_RATE_PARENT,
2635 			.ops = &clk_branch2_ops,
2636 		},
2637 	},
2638 };
2639 
2640 static struct clk_branch mmss_mmssnoc_ahb_clk = {
2641 	.halt_reg = 0x5024,
2642 	.clkr = {
2643 		.enable_reg = 0x5024,
2644 		.enable_mask = BIT(0),
2645 		.hw.init = &(struct clk_init_data){
2646 			.name = "mmss_mmssnoc_ahb_clk",
2647 			.parent_names = (const char *[]){
2648 				"mmss_ahb_clk_src",
2649 			},
2650 			.num_parents = 1,
2651 			.ops = &clk_branch2_ops,
2652 			.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
2653 		},
2654 	},
2655 };
2656 
2657 static struct clk_branch mmss_mmssnoc_bto_ahb_clk = {
2658 	.halt_reg = 0x5028,
2659 	.clkr = {
2660 		.enable_reg = 0x5028,
2661 		.enable_mask = BIT(0),
2662 		.hw.init = &(struct clk_init_data){
2663 			.name = "mmss_mmssnoc_bto_ahb_clk",
2664 			.parent_names = (const char *[]){
2665 				"mmss_ahb_clk_src",
2666 			},
2667 			.num_parents = 1,
2668 			.ops = &clk_branch2_ops,
2669 			.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
2670 		},
2671 	},
2672 };
2673 
2674 static struct clk_branch mmss_mmssnoc_axi_clk = {
2675 	.halt_reg = 0x506c,
2676 	.clkr = {
2677 		.enable_reg = 0x506c,
2678 		.enable_mask = BIT(0),
2679 		.hw.init = &(struct clk_init_data){
2680 			.name = "mmss_mmssnoc_axi_clk",
2681 			.parent_names = (const char *[]){
2682 				"mmss_axi_clk_src",
2683 			},
2684 			.num_parents = 1,
2685 			.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
2686 			.ops = &clk_branch2_ops,
2687 		},
2688 	},
2689 };
2690 
2691 static struct clk_branch mmss_s0_axi_clk = {
2692 	.halt_reg = 0x5064,
2693 	.clkr = {
2694 		.enable_reg = 0x5064,
2695 		.enable_mask = BIT(0),
2696 		.hw.init = &(struct clk_init_data){
2697 			.name = "mmss_s0_axi_clk",
2698 			.parent_names = (const char *[]){
2699 				"mmss_axi_clk_src",
2700 			},
2701 			.num_parents = 1,
2702 			.ops = &clk_branch2_ops,
2703 			.flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
2704 		},
2705 	},
2706 };
2707 
2708 static struct clk_branch ocmemcx_ahb_clk = {
2709 	.halt_reg = 0x405c,
2710 	.clkr = {
2711 		.enable_reg = 0x405c,
2712 		.enable_mask = BIT(0),
2713 		.hw.init = &(struct clk_init_data){
2714 			.name = "ocmemcx_ahb_clk",
2715 			.parent_names = (const char *[]){
2716 				"mmss_ahb_clk_src",
2717 			},
2718 			.num_parents = 1,
2719 			.flags = CLK_SET_RATE_PARENT,
2720 			.ops = &clk_branch2_ops,
2721 		},
2722 	},
2723 };
2724 
2725 static struct clk_branch ocmemcx_ocmemnoc_clk = {
2726 	.halt_reg = 0x4058,
2727 	.clkr = {
2728 		.enable_reg = 0x4058,
2729 		.enable_mask = BIT(0),
2730 		.hw.init = &(struct clk_init_data){
2731 			.name = "ocmemcx_ocmemnoc_clk",
2732 			.parent_names = (const char *[]){
2733 				"ocmemnoc_clk_src",
2734 			},
2735 			.num_parents = 1,
2736 			.flags = CLK_SET_RATE_PARENT,
2737 			.ops = &clk_branch2_ops,
2738 		},
2739 	},
2740 };
2741 
2742 static struct clk_branch oxili_ocmemgx_clk = {
2743 	.halt_reg = 0x402c,
2744 	.clkr = {
2745 		.enable_reg = 0x402c,
2746 		.enable_mask = BIT(0),
2747 		.hw.init = &(struct clk_init_data){
2748 			.name = "oxili_ocmemgx_clk",
2749 			.parent_names = (const char *[]){
2750 				"gfx3d_clk_src",
2751 			},
2752 			.num_parents = 1,
2753 			.flags = CLK_SET_RATE_PARENT,
2754 			.ops = &clk_branch2_ops,
2755 		},
2756 	},
2757 };
2758 
2759 static struct clk_branch oxili_gfx3d_clk = {
2760 	.halt_reg = 0x4028,
2761 	.clkr = {
2762 		.enable_reg = 0x4028,
2763 		.enable_mask = BIT(0),
2764 		.hw.init = &(struct clk_init_data){
2765 			.name = "oxili_gfx3d_clk",
2766 			.parent_names = (const char *[]){
2767 				"gfx3d_clk_src",
2768 			},
2769 			.num_parents = 1,
2770 			.flags = CLK_SET_RATE_PARENT,
2771 			.ops = &clk_branch2_ops,
2772 		},
2773 	},
2774 };
2775 
2776 static struct clk_branch oxili_rbbmtimer_clk = {
2777 	.halt_reg = 0x40b0,
2778 	.clkr = {
2779 		.enable_reg = 0x40b0,
2780 		.enable_mask = BIT(0),
2781 		.hw.init = &(struct clk_init_data){
2782 			.name = "oxili_rbbmtimer_clk",
2783 			.parent_names = (const char *[]){
2784 				"rbbmtimer_clk_src",
2785 			},
2786 			.num_parents = 1,
2787 			.flags = CLK_SET_RATE_PARENT,
2788 			.ops = &clk_branch2_ops,
2789 		},
2790 	},
2791 };
2792 
2793 static struct clk_branch oxilicx_ahb_clk = {
2794 	.halt_reg = 0x403c,
2795 	.clkr = {
2796 		.enable_reg = 0x403c,
2797 		.enable_mask = BIT(0),
2798 		.hw.init = &(struct clk_init_data){
2799 			.name = "oxilicx_ahb_clk",
2800 			.parent_names = (const char *[]){
2801 				"mmss_ahb_clk_src",
2802 			},
2803 			.num_parents = 1,
2804 			.flags = CLK_SET_RATE_PARENT,
2805 			.ops = &clk_branch2_ops,
2806 		},
2807 	},
2808 };
2809 
2810 static struct clk_branch venus0_ahb_clk = {
2811 	.halt_reg = 0x1030,
2812 	.clkr = {
2813 		.enable_reg = 0x1030,
2814 		.enable_mask = BIT(0),
2815 		.hw.init = &(struct clk_init_data){
2816 			.name = "venus0_ahb_clk",
2817 			.parent_names = (const char *[]){
2818 				"mmss_ahb_clk_src",
2819 			},
2820 			.num_parents = 1,
2821 			.flags = CLK_SET_RATE_PARENT,
2822 			.ops = &clk_branch2_ops,
2823 		},
2824 	},
2825 };
2826 
2827 static struct clk_branch venus0_axi_clk = {
2828 	.halt_reg = 0x1034,
2829 	.clkr = {
2830 		.enable_reg = 0x1034,
2831 		.enable_mask = BIT(0),
2832 		.hw.init = &(struct clk_init_data){
2833 			.name = "venus0_axi_clk",
2834 			.parent_names = (const char *[]){
2835 				"mmss_axi_clk_src",
2836 			},
2837 			.num_parents = 1,
2838 			.flags = CLK_SET_RATE_PARENT,
2839 			.ops = &clk_branch2_ops,
2840 		},
2841 	},
2842 };
2843 
2844 static struct clk_branch venus0_core0_vcodec_clk = {
2845 	.halt_reg = 0x1048,
2846 	.clkr = {
2847 		.enable_reg = 0x1048,
2848 		.enable_mask = BIT(0),
2849 		.hw.init = &(struct clk_init_data){
2850 			.name = "venus0_core0_vcodec_clk",
2851 			.parent_names = (const char *[]){
2852 				"vcodec0_clk_src",
2853 			},
2854 			.num_parents = 1,
2855 			.flags = CLK_SET_RATE_PARENT,
2856 			.ops = &clk_branch2_ops,
2857 		},
2858 	},
2859 };
2860 
2861 static struct clk_branch venus0_core1_vcodec_clk = {
2862 	.halt_reg = 0x104c,
2863 	.clkr = {
2864 		.enable_reg = 0x104c,
2865 		.enable_mask = BIT(0),
2866 		.hw.init = &(struct clk_init_data){
2867 			.name = "venus0_core1_vcodec_clk",
2868 			.parent_names = (const char *[]){
2869 				"vcodec0_clk_src",
2870 			},
2871 			.num_parents = 1,
2872 			.flags = CLK_SET_RATE_PARENT,
2873 			.ops = &clk_branch2_ops,
2874 		},
2875 	},
2876 };
2877 
2878 static struct clk_branch venus0_ocmemnoc_clk = {
2879 	.halt_reg = 0x1038,
2880 	.clkr = {
2881 		.enable_reg = 0x1038,
2882 		.enable_mask = BIT(0),
2883 		.hw.init = &(struct clk_init_data){
2884 			.name = "venus0_ocmemnoc_clk",
2885 			.parent_names = (const char *[]){
2886 				"ocmemnoc_clk_src",
2887 			},
2888 			.num_parents = 1,
2889 			.flags = CLK_SET_RATE_PARENT,
2890 			.ops = &clk_branch2_ops,
2891 		},
2892 	},
2893 };
2894 
2895 static struct clk_branch venus0_vcodec0_clk = {
2896 	.halt_reg = 0x1028,
2897 	.clkr = {
2898 		.enable_reg = 0x1028,
2899 		.enable_mask = BIT(0),
2900 		.hw.init = &(struct clk_init_data){
2901 			.name = "venus0_vcodec0_clk",
2902 			.parent_names = (const char *[]){
2903 				"vcodec0_clk_src",
2904 			},
2905 			.num_parents = 1,
2906 			.flags = CLK_SET_RATE_PARENT,
2907 			.ops = &clk_branch2_ops,
2908 		},
2909 	},
2910 };
2911 
2912 static struct clk_branch vpu_ahb_clk = {
2913 	.halt_reg = 0x1430,
2914 	.clkr = {
2915 		.enable_reg = 0x1430,
2916 		.enable_mask = BIT(0),
2917 		.hw.init = &(struct clk_init_data){
2918 			.name = "vpu_ahb_clk",
2919 			.parent_names = (const char *[]){
2920 				"mmss_ahb_clk_src",
2921 			},
2922 			.num_parents = 1,
2923 			.flags = CLK_SET_RATE_PARENT,
2924 			.ops = &clk_branch2_ops,
2925 		},
2926 	},
2927 };
2928 
2929 static struct clk_branch vpu_axi_clk = {
2930 	.halt_reg = 0x143c,
2931 	.clkr = {
2932 		.enable_reg = 0x143c,
2933 		.enable_mask = BIT(0),
2934 		.hw.init = &(struct clk_init_data){
2935 			.name = "vpu_axi_clk",
2936 			.parent_names = (const char *[]){
2937 				"mmss_axi_clk_src",
2938 			},
2939 			.num_parents = 1,
2940 			.flags = CLK_SET_RATE_PARENT,
2941 			.ops = &clk_branch2_ops,
2942 		},
2943 	},
2944 };
2945 
2946 static struct clk_branch vpu_bus_clk = {
2947 	.halt_reg = 0x1440,
2948 	.clkr = {
2949 		.enable_reg = 0x1440,
2950 		.enable_mask = BIT(0),
2951 		.hw.init = &(struct clk_init_data){
2952 			.name = "vpu_bus_clk",
2953 			.parent_names = (const char *[]){
2954 				"vpu_bus_clk_src",
2955 			},
2956 			.num_parents = 1,
2957 			.flags = CLK_SET_RATE_PARENT,
2958 			.ops = &clk_branch2_ops,
2959 		},
2960 	},
2961 };
2962 
2963 static struct clk_branch vpu_cxo_clk = {
2964 	.halt_reg = 0x1434,
2965 	.clkr = {
2966 		.enable_reg = 0x1434,
2967 		.enable_mask = BIT(0),
2968 		.hw.init = &(struct clk_init_data){
2969 			.name = "vpu_cxo_clk",
2970 			.parent_names = (const char *[]){ "xo" },
2971 			.num_parents = 1,
2972 			.flags = CLK_SET_RATE_PARENT,
2973 			.ops = &clk_branch2_ops,
2974 		},
2975 	},
2976 };
2977 
2978 static struct clk_branch vpu_maple_clk = {
2979 	.halt_reg = 0x142c,
2980 	.clkr = {
2981 		.enable_reg = 0x142c,
2982 		.enable_mask = BIT(0),
2983 		.hw.init = &(struct clk_init_data){
2984 			.name = "vpu_maple_clk",
2985 			.parent_names = (const char *[]){
2986 				"maple_clk_src",
2987 			},
2988 			.num_parents = 1,
2989 			.flags = CLK_SET_RATE_PARENT,
2990 			.ops = &clk_branch2_ops,
2991 		},
2992 	},
2993 };
2994 
2995 static struct clk_branch vpu_sleep_clk = {
2996 	.halt_reg = 0x1438,
2997 	.clkr = {
2998 		.enable_reg = 0x1438,
2999 		.enable_mask = BIT(0),
3000 		.hw.init = &(struct clk_init_data){
3001 			.name = "vpu_sleep_clk",
3002 			.parent_names = (const char *[]){
3003 				"sleep_clk_src",
3004 			},
3005 			.num_parents = 1,
3006 			.flags = CLK_SET_RATE_PARENT,
3007 			.ops = &clk_branch2_ops,
3008 		},
3009 	},
3010 };
3011 
3012 static struct clk_branch vpu_vdp_clk = {
3013 	.halt_reg = 0x1428,
3014 	.clkr = {
3015 		.enable_reg = 0x1428,
3016 		.enable_mask = BIT(0),
3017 		.hw.init = &(struct clk_init_data){
3018 			.name = "vpu_vdp_clk",
3019 			.parent_names = (const char *[]){
3020 				"vdp_clk_src",
3021 			},
3022 			.num_parents = 1,
3023 			.flags = CLK_SET_RATE_PARENT,
3024 			.ops = &clk_branch2_ops,
3025 		},
3026 	},
3027 };
3028 
3029 static const struct pll_config mmpll1_config = {
3030 	.l = 60,
3031 	.m = 25,
3032 	.n = 32,
3033 	.vco_val = 0x0,
3034 	.vco_mask = 0x3 << 20,
3035 	.pre_div_val = 0x0,
3036 	.pre_div_mask = 0x7 << 12,
3037 	.post_div_val = 0x0,
3038 	.post_div_mask = 0x3 << 8,
3039 	.mn_ena_mask = BIT(24),
3040 	.main_output_mask = BIT(0),
3041 };
3042 
3043 static const struct pll_config mmpll3_config = {
3044 	.l = 48,
3045 	.m = 7,
3046 	.n = 16,
3047 	.vco_val = 0x0,
3048 	.vco_mask = 0x3 << 20,
3049 	.pre_div_val = 0x0,
3050 	.pre_div_mask = 0x7 << 12,
3051 	.post_div_val = 0x0,
3052 	.post_div_mask = 0x3 << 8,
3053 	.mn_ena_mask = BIT(24),
3054 	.main_output_mask = BIT(0),
3055 	.aux_output_mask = BIT(1),
3056 };
3057 
3058 static struct gdsc venus0_gdsc = {
3059 	.gdscr = 0x1024,
3060 	.pd = {
3061 		.name = "venus0",
3062 	},
3063 	.pwrsts = PWRSTS_OFF_ON,
3064 };
3065 
3066 static struct gdsc venus0_core0_gdsc = {
3067 	.gdscr = 0x1040,
3068 	.pd = {
3069 		.name = "venus0_core0",
3070 	},
3071 	.pwrsts = PWRSTS_OFF_ON,
3072 };
3073 
3074 static struct gdsc venus0_core1_gdsc = {
3075 	.gdscr = 0x1044,
3076 	.pd = {
3077 		.name = "venus0_core1",
3078 	},
3079 	.pwrsts = PWRSTS_OFF_ON,
3080 };
3081 
3082 static struct gdsc mdss_gdsc = {
3083 	.gdscr = 0x2304,
3084 	.cxcs = (unsigned int []){ 0x231c, 0x2320 },
3085 	.cxc_count = 2,
3086 	.pd = {
3087 		.name = "mdss",
3088 	},
3089 	.pwrsts = PWRSTS_OFF_ON,
3090 };
3091 
3092 static struct gdsc camss_jpeg_gdsc = {
3093 	.gdscr = 0x35a4,
3094 	.pd = {
3095 		.name = "camss_jpeg",
3096 	},
3097 	.pwrsts = PWRSTS_OFF_ON,
3098 };
3099 
3100 static struct gdsc camss_vfe_gdsc = {
3101 	.gdscr = 0x36a4,
3102 	.cxcs = (unsigned int []){ 0x36a8, 0x36ac, 0x36b0 },
3103 	.cxc_count = 3,
3104 	.pd = {
3105 		.name = "camss_vfe",
3106 	},
3107 	.pwrsts = PWRSTS_OFF_ON,
3108 };
3109 
3110 static struct gdsc oxili_gdsc = {
3111 	.gdscr = 0x4024,
3112 	.cxcs = (unsigned int []){ 0x4028 },
3113 	.cxc_count = 1,
3114 	.pd = {
3115 		.name = "oxili",
3116 	},
3117 	.pwrsts = PWRSTS_OFF_ON,
3118 };
3119 
3120 static struct gdsc oxilicx_gdsc = {
3121 	.gdscr = 0x4034,
3122 	.pd = {
3123 		.name = "oxilicx",
3124 	},
3125 	.pwrsts = PWRSTS_OFF_ON,
3126 };
3127 
3128 static struct clk_regmap *mmcc_apq8084_clocks[] = {
3129 	[MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr,
3130 	[MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr,
3131 	[MMPLL0] = &mmpll0.clkr,
3132 	[MMPLL0_VOTE] = &mmpll0_vote,
3133 	[MMPLL1] = &mmpll1.clkr,
3134 	[MMPLL1_VOTE] = &mmpll1_vote,
3135 	[MMPLL2] = &mmpll2.clkr,
3136 	[MMPLL3] = &mmpll3.clkr,
3137 	[MMPLL4] = &mmpll4.clkr,
3138 	[CSI0_CLK_SRC] = &csi0_clk_src.clkr,
3139 	[CSI1_CLK_SRC] = &csi1_clk_src.clkr,
3140 	[CSI2_CLK_SRC] = &csi2_clk_src.clkr,
3141 	[CSI3_CLK_SRC] = &csi3_clk_src.clkr,
3142 	[VCODEC0_CLK_SRC] = &vcodec0_clk_src.clkr,
3143 	[VFE0_CLK_SRC] = &vfe0_clk_src.clkr,
3144 	[VFE1_CLK_SRC] = &vfe1_clk_src.clkr,
3145 	[MDP_CLK_SRC] = &mdp_clk_src.clkr,
3146 	[PCLK0_CLK_SRC] = &pclk0_clk_src.clkr,
3147 	[PCLK1_CLK_SRC] = &pclk1_clk_src.clkr,
3148 	[OCMEMNOC_CLK_SRC] = &ocmemnoc_clk_src.clkr,
3149 	[GFX3D_CLK_SRC] = &gfx3d_clk_src.clkr,
3150 	[JPEG0_CLK_SRC] = &jpeg0_clk_src.clkr,
3151 	[JPEG1_CLK_SRC] = &jpeg1_clk_src.clkr,
3152 	[JPEG2_CLK_SRC] = &jpeg2_clk_src.clkr,
3153 	[EDPPIXEL_CLK_SRC] = &edppixel_clk_src.clkr,
3154 	[EXTPCLK_CLK_SRC] = &extpclk_clk_src.clkr,
3155 	[VP_CLK_SRC] = &vp_clk_src.clkr,
3156 	[CCI_CLK_SRC] = &cci_clk_src.clkr,
3157 	[CAMSS_GP0_CLK_SRC] = &camss_gp0_clk_src.clkr,
3158 	[CAMSS_GP1_CLK_SRC] = &camss_gp1_clk_src.clkr,
3159 	[MCLK0_CLK_SRC] = &mclk0_clk_src.clkr,
3160 	[MCLK1_CLK_SRC] = &mclk1_clk_src.clkr,
3161 	[MCLK2_CLK_SRC] = &mclk2_clk_src.clkr,
3162 	[MCLK3_CLK_SRC] = &mclk3_clk_src.clkr,
3163 	[CSI0PHYTIMER_CLK_SRC] = &csi0phytimer_clk_src.clkr,
3164 	[CSI1PHYTIMER_CLK_SRC] = &csi1phytimer_clk_src.clkr,
3165 	[CSI2PHYTIMER_CLK_SRC] = &csi2phytimer_clk_src.clkr,
3166 	[CPP_CLK_SRC] = &cpp_clk_src.clkr,
3167 	[BYTE0_CLK_SRC] = &byte0_clk_src.clkr,
3168 	[BYTE1_CLK_SRC] = &byte1_clk_src.clkr,
3169 	[EDPAUX_CLK_SRC] = &edpaux_clk_src.clkr,
3170 	[EDPLINK_CLK_SRC] = &edplink_clk_src.clkr,
3171 	[ESC0_CLK_SRC] = &esc0_clk_src.clkr,
3172 	[ESC1_CLK_SRC] = &esc1_clk_src.clkr,
3173 	[HDMI_CLK_SRC] = &hdmi_clk_src.clkr,
3174 	[VSYNC_CLK_SRC] = &vsync_clk_src.clkr,
3175 	[MMSS_RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
3176 	[RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr,
3177 	[MAPLE_CLK_SRC] = &maple_clk_src.clkr,
3178 	[VDP_CLK_SRC] = &vdp_clk_src.clkr,
3179 	[VPU_BUS_CLK_SRC] = &vpu_bus_clk_src.clkr,
3180 	[MMSS_CXO_CLK] = &mmss_cxo_clk.clkr,
3181 	[MMSS_SLEEPCLK_CLK] = &mmss_sleepclk_clk.clkr,
3182 	[AVSYNC_AHB_CLK] = &avsync_ahb_clk.clkr,
3183 	[AVSYNC_EDPPIXEL_CLK] = &avsync_edppixel_clk.clkr,
3184 	[AVSYNC_EXTPCLK_CLK] = &avsync_extpclk_clk.clkr,
3185 	[AVSYNC_PCLK0_CLK] = &avsync_pclk0_clk.clkr,
3186 	[AVSYNC_PCLK1_CLK] = &avsync_pclk1_clk.clkr,
3187 	[AVSYNC_VP_CLK] = &avsync_vp_clk.clkr,
3188 	[CAMSS_AHB_CLK] = &camss_ahb_clk.clkr,
3189 	[CAMSS_CCI_CCI_AHB_CLK] = &camss_cci_cci_ahb_clk.clkr,
3190 	[CAMSS_CCI_CCI_CLK] = &camss_cci_cci_clk.clkr,
3191 	[CAMSS_CSI0_AHB_CLK] = &camss_csi0_ahb_clk.clkr,
3192 	[CAMSS_CSI0_CLK] = &camss_csi0_clk.clkr,
3193 	[CAMSS_CSI0PHY_CLK] = &camss_csi0phy_clk.clkr,
3194 	[CAMSS_CSI0PIX_CLK] = &camss_csi0pix_clk.clkr,
3195 	[CAMSS_CSI0RDI_CLK] = &camss_csi0rdi_clk.clkr,
3196 	[CAMSS_CSI1_AHB_CLK] = &camss_csi1_ahb_clk.clkr,
3197 	[CAMSS_CSI1_CLK] = &camss_csi1_clk.clkr,
3198 	[CAMSS_CSI1PHY_CLK] = &camss_csi1phy_clk.clkr,
3199 	[CAMSS_CSI1PIX_CLK] = &camss_csi1pix_clk.clkr,
3200 	[CAMSS_CSI1RDI_CLK] = &camss_csi1rdi_clk.clkr,
3201 	[CAMSS_CSI2_AHB_CLK] = &camss_csi2_ahb_clk.clkr,
3202 	[CAMSS_CSI2_CLK] = &camss_csi2_clk.clkr,
3203 	[CAMSS_CSI2PHY_CLK] = &camss_csi2phy_clk.clkr,
3204 	[CAMSS_CSI2PIX_CLK] = &camss_csi2pix_clk.clkr,
3205 	[CAMSS_CSI2RDI_CLK] = &camss_csi2rdi_clk.clkr,
3206 	[CAMSS_CSI3_AHB_CLK] = &camss_csi3_ahb_clk.clkr,
3207 	[CAMSS_CSI3_CLK] = &camss_csi3_clk.clkr,
3208 	[CAMSS_CSI3PHY_CLK] = &camss_csi3phy_clk.clkr,
3209 	[CAMSS_CSI3PIX_CLK] = &camss_csi3pix_clk.clkr,
3210 	[CAMSS_CSI3RDI_CLK] = &camss_csi3rdi_clk.clkr,
3211 	[CAMSS_CSI_VFE0_CLK] = &camss_csi_vfe0_clk.clkr,
3212 	[CAMSS_CSI_VFE1_CLK] = &camss_csi_vfe1_clk.clkr,
3213 	[CAMSS_GP0_CLK] = &camss_gp0_clk.clkr,
3214 	[CAMSS_GP1_CLK] = &camss_gp1_clk.clkr,
3215 	[CAMSS_ISPIF_AHB_CLK] = &camss_ispif_ahb_clk.clkr,
3216 	[CAMSS_JPEG_JPEG0_CLK] = &camss_jpeg_jpeg0_clk.clkr,
3217 	[CAMSS_JPEG_JPEG1_CLK] = &camss_jpeg_jpeg1_clk.clkr,
3218 	[CAMSS_JPEG_JPEG2_CLK] = &camss_jpeg_jpeg2_clk.clkr,
3219 	[CAMSS_JPEG_JPEG_AHB_CLK] = &camss_jpeg_jpeg_ahb_clk.clkr,
3220 	[CAMSS_JPEG_JPEG_AXI_CLK] = &camss_jpeg_jpeg_axi_clk.clkr,
3221 	[CAMSS_MCLK0_CLK] = &camss_mclk0_clk.clkr,
3222 	[CAMSS_MCLK1_CLK] = &camss_mclk1_clk.clkr,
3223 	[CAMSS_MCLK2_CLK] = &camss_mclk2_clk.clkr,
3224 	[CAMSS_MCLK3_CLK] = &camss_mclk3_clk.clkr,
3225 	[CAMSS_MICRO_AHB_CLK] = &camss_micro_ahb_clk.clkr,
3226 	[CAMSS_PHY0_CSI0PHYTIMER_CLK] = &camss_phy0_csi0phytimer_clk.clkr,
3227 	[CAMSS_PHY1_CSI1PHYTIMER_CLK] = &camss_phy1_csi1phytimer_clk.clkr,
3228 	[CAMSS_PHY2_CSI2PHYTIMER_CLK] = &camss_phy2_csi2phytimer_clk.clkr,
3229 	[CAMSS_TOP_AHB_CLK] = &camss_top_ahb_clk.clkr,
3230 	[CAMSS_VFE_CPP_AHB_CLK] = &camss_vfe_cpp_ahb_clk.clkr,
3231 	[CAMSS_VFE_CPP_CLK] = &camss_vfe_cpp_clk.clkr,
3232 	[CAMSS_VFE_VFE0_CLK] = &camss_vfe_vfe0_clk.clkr,
3233 	[CAMSS_VFE_VFE1_CLK] = &camss_vfe_vfe1_clk.clkr,
3234 	[CAMSS_VFE_VFE_AHB_CLK] = &camss_vfe_vfe_ahb_clk.clkr,
3235 	[CAMSS_VFE_VFE_AXI_CLK] = &camss_vfe_vfe_axi_clk.clkr,
3236 	[MDSS_AHB_CLK] = &mdss_ahb_clk.clkr,
3237 	[MDSS_AXI_CLK] = &mdss_axi_clk.clkr,
3238 	[MDSS_BYTE0_CLK] = &mdss_byte0_clk.clkr,
3239 	[MDSS_BYTE1_CLK] = &mdss_byte1_clk.clkr,
3240 	[MDSS_EDPAUX_CLK] = &mdss_edpaux_clk.clkr,
3241 	[MDSS_EDPLINK_CLK] = &mdss_edplink_clk.clkr,
3242 	[MDSS_EDPPIXEL_CLK] = &mdss_edppixel_clk.clkr,
3243 	[MDSS_ESC0_CLK] = &mdss_esc0_clk.clkr,
3244 	[MDSS_ESC1_CLK] = &mdss_esc1_clk.clkr,
3245 	[MDSS_EXTPCLK_CLK] = &mdss_extpclk_clk.clkr,
3246 	[MDSS_HDMI_AHB_CLK] = &mdss_hdmi_ahb_clk.clkr,
3247 	[MDSS_HDMI_CLK] = &mdss_hdmi_clk.clkr,
3248 	[MDSS_MDP_CLK] = &mdss_mdp_clk.clkr,
3249 	[MDSS_MDP_LUT_CLK] = &mdss_mdp_lut_clk.clkr,
3250 	[MDSS_PCLK0_CLK] = &mdss_pclk0_clk.clkr,
3251 	[MDSS_PCLK1_CLK] = &mdss_pclk1_clk.clkr,
3252 	[MDSS_VSYNC_CLK] = &mdss_vsync_clk.clkr,
3253 	[MMSS_RBCPR_AHB_CLK] = &mmss_rbcpr_ahb_clk.clkr,
3254 	[MMSS_RBCPR_CLK] = &mmss_rbcpr_clk.clkr,
3255 	[MMSS_SPDM_AHB_CLK] = &mmss_spdm_ahb_clk.clkr,
3256 	[MMSS_SPDM_AXI_CLK] = &mmss_spdm_axi_clk.clkr,
3257 	[MMSS_SPDM_CSI0_CLK] = &mmss_spdm_csi0_clk.clkr,
3258 	[MMSS_SPDM_GFX3D_CLK] = &mmss_spdm_gfx3d_clk.clkr,
3259 	[MMSS_SPDM_JPEG0_CLK] = &mmss_spdm_jpeg0_clk.clkr,
3260 	[MMSS_SPDM_JPEG1_CLK] = &mmss_spdm_jpeg1_clk.clkr,
3261 	[MMSS_SPDM_JPEG2_CLK] = &mmss_spdm_jpeg2_clk.clkr,
3262 	[MMSS_SPDM_MDP_CLK] = &mmss_spdm_mdp_clk.clkr,
3263 	[MMSS_SPDM_PCLK0_CLK] = &mmss_spdm_pclk0_clk.clkr,
3264 	[MMSS_SPDM_PCLK1_CLK] = &mmss_spdm_pclk1_clk.clkr,
3265 	[MMSS_SPDM_VCODEC0_CLK] = &mmss_spdm_vcodec0_clk.clkr,
3266 	[MMSS_SPDM_VFE0_CLK] = &mmss_spdm_vfe0_clk.clkr,
3267 	[MMSS_SPDM_VFE1_CLK] = &mmss_spdm_vfe1_clk.clkr,
3268 	[MMSS_SPDM_RM_AXI_CLK] = &mmss_spdm_rm_axi_clk.clkr,
3269 	[MMSS_SPDM_RM_OCMEMNOC_CLK] = &mmss_spdm_rm_ocmemnoc_clk.clkr,
3270 	[MMSS_MISC_AHB_CLK] = &mmss_misc_ahb_clk.clkr,
3271 	[MMSS_MMSSNOC_AHB_CLK] = &mmss_mmssnoc_ahb_clk.clkr,
3272 	[MMSS_MMSSNOC_BTO_AHB_CLK] = &mmss_mmssnoc_bto_ahb_clk.clkr,
3273 	[MMSS_MMSSNOC_AXI_CLK] = &mmss_mmssnoc_axi_clk.clkr,
3274 	[MMSS_S0_AXI_CLK] = &mmss_s0_axi_clk.clkr,
3275 	[OCMEMCX_AHB_CLK] = &ocmemcx_ahb_clk.clkr,
3276 	[OCMEMCX_OCMEMNOC_CLK] = &ocmemcx_ocmemnoc_clk.clkr,
3277 	[OXILI_OCMEMGX_CLK] = &oxili_ocmemgx_clk.clkr,
3278 	[OXILI_GFX3D_CLK] = &oxili_gfx3d_clk.clkr,
3279 	[OXILI_RBBMTIMER_CLK] = &oxili_rbbmtimer_clk.clkr,
3280 	[OXILICX_AHB_CLK] = &oxilicx_ahb_clk.clkr,
3281 	[VENUS0_AHB_CLK] = &venus0_ahb_clk.clkr,
3282 	[VENUS0_AXI_CLK] = &venus0_axi_clk.clkr,
3283 	[VENUS0_CORE0_VCODEC_CLK] = &venus0_core0_vcodec_clk.clkr,
3284 	[VENUS0_CORE1_VCODEC_CLK] = &venus0_core1_vcodec_clk.clkr,
3285 	[VENUS0_OCMEMNOC_CLK] = &venus0_ocmemnoc_clk.clkr,
3286 	[VENUS0_VCODEC0_CLK] = &venus0_vcodec0_clk.clkr,
3287 	[VPU_AHB_CLK] = &vpu_ahb_clk.clkr,
3288 	[VPU_AXI_CLK] = &vpu_axi_clk.clkr,
3289 	[VPU_BUS_CLK] = &vpu_bus_clk.clkr,
3290 	[VPU_CXO_CLK] = &vpu_cxo_clk.clkr,
3291 	[VPU_MAPLE_CLK] = &vpu_maple_clk.clkr,
3292 	[VPU_SLEEP_CLK] = &vpu_sleep_clk.clkr,
3293 	[VPU_VDP_CLK] = &vpu_vdp_clk.clkr,
3294 };
3295 
3296 static const struct qcom_reset_map mmcc_apq8084_resets[] = {
3297 	[MMSS_SPDM_RESET] = { 0x0200 },
3298 	[MMSS_SPDM_RM_RESET] = { 0x0300 },
3299 	[VENUS0_RESET] = { 0x1020 },
3300 	[VPU_RESET] = { 0x1400 },
3301 	[MDSS_RESET] = { 0x2300 },
3302 	[AVSYNC_RESET] = { 0x2400 },
3303 	[CAMSS_PHY0_RESET] = { 0x3020 },
3304 	[CAMSS_PHY1_RESET] = { 0x3050 },
3305 	[CAMSS_PHY2_RESET] = { 0x3080 },
3306 	[CAMSS_CSI0_RESET] = { 0x30b0 },
3307 	[CAMSS_CSI0PHY_RESET] = { 0x30c0 },
3308 	[CAMSS_CSI0RDI_RESET] = { 0x30d0 },
3309 	[CAMSS_CSI0PIX_RESET] = { 0x30e0 },
3310 	[CAMSS_CSI1_RESET] = { 0x3120 },
3311 	[CAMSS_CSI1PHY_RESET] = { 0x3130 },
3312 	[CAMSS_CSI1RDI_RESET] = { 0x3140 },
3313 	[CAMSS_CSI1PIX_RESET] = { 0x3150 },
3314 	[CAMSS_CSI2_RESET] = { 0x3180 },
3315 	[CAMSS_CSI2PHY_RESET] = { 0x3190 },
3316 	[CAMSS_CSI2RDI_RESET] = { 0x31a0 },
3317 	[CAMSS_CSI2PIX_RESET] = { 0x31b0 },
3318 	[CAMSS_CSI3_RESET] = { 0x31e0 },
3319 	[CAMSS_CSI3PHY_RESET] = { 0x31f0 },
3320 	[CAMSS_CSI3RDI_RESET] = { 0x3200 },
3321 	[CAMSS_CSI3PIX_RESET] = { 0x3210 },
3322 	[CAMSS_ISPIF_RESET] = { 0x3220 },
3323 	[CAMSS_CCI_RESET] = { 0x3340 },
3324 	[CAMSS_MCLK0_RESET] = { 0x3380 },
3325 	[CAMSS_MCLK1_RESET] = { 0x33b0 },
3326 	[CAMSS_MCLK2_RESET] = { 0x33e0 },
3327 	[CAMSS_MCLK3_RESET] = { 0x3410 },
3328 	[CAMSS_GP0_RESET] = { 0x3440 },
3329 	[CAMSS_GP1_RESET] = { 0x3470 },
3330 	[CAMSS_TOP_RESET] = { 0x3480 },
3331 	[CAMSS_AHB_RESET] = { 0x3488 },
3332 	[CAMSS_MICRO_RESET] = { 0x3490 },
3333 	[CAMSS_JPEG_RESET] = { 0x35a0 },
3334 	[CAMSS_VFE_RESET] = { 0x36a0 },
3335 	[CAMSS_CSI_VFE0_RESET] = { 0x3700 },
3336 	[CAMSS_CSI_VFE1_RESET] = { 0x3710 },
3337 	[OXILI_RESET] = { 0x4020 },
3338 	[OXILICX_RESET] = { 0x4030 },
3339 	[OCMEMCX_RESET] = { 0x4050 },
3340 	[MMSS_RBCRP_RESET] = { 0x4080 },
3341 	[MMSSNOCAHB_RESET] = { 0x5020 },
3342 	[MMSSNOCAXI_RESET] = { 0x5060 },
3343 };
3344 
3345 static struct gdsc *mmcc_apq8084_gdscs[] = {
3346 	[VENUS0_GDSC] = &venus0_gdsc,
3347 	[VENUS0_CORE0_GDSC] = &venus0_core0_gdsc,
3348 	[VENUS0_CORE1_GDSC] = &venus0_core1_gdsc,
3349 	[MDSS_GDSC] = &mdss_gdsc,
3350 	[CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc,
3351 	[CAMSS_VFE_GDSC] = &camss_vfe_gdsc,
3352 	[OXILI_GDSC] = &oxili_gdsc,
3353 	[OXILICX_GDSC] = &oxilicx_gdsc,
3354 };
3355 
3356 static const struct regmap_config mmcc_apq8084_regmap_config = {
3357 	.reg_bits	= 32,
3358 	.reg_stride	= 4,
3359 	.val_bits	= 32,
3360 	.max_register	= 0x5104,
3361 	.fast_io	= true,
3362 };
3363 
3364 static const struct qcom_cc_desc mmcc_apq8084_desc = {
3365 	.config = &mmcc_apq8084_regmap_config,
3366 	.clks = mmcc_apq8084_clocks,
3367 	.num_clks = ARRAY_SIZE(mmcc_apq8084_clocks),
3368 	.resets = mmcc_apq8084_resets,
3369 	.num_resets = ARRAY_SIZE(mmcc_apq8084_resets),
3370 	.gdscs = mmcc_apq8084_gdscs,
3371 	.num_gdscs = ARRAY_SIZE(mmcc_apq8084_gdscs),
3372 };
3373 
3374 static const struct of_device_id mmcc_apq8084_match_table[] = {
3375 	{ .compatible = "qcom,mmcc-apq8084" },
3376 	{ }
3377 };
3378 MODULE_DEVICE_TABLE(of, mmcc_apq8084_match_table);
3379 
3380 static int mmcc_apq8084_probe(struct platform_device *pdev)
3381 {
3382 	int ret;
3383 	struct regmap *regmap;
3384 
3385 	ret = qcom_cc_probe(pdev, &mmcc_apq8084_desc);
3386 	if (ret)
3387 		return ret;
3388 
3389 	regmap = dev_get_regmap(&pdev->dev, NULL);
3390 	clk_pll_configure_sr_hpm_lp(&mmpll1, regmap, &mmpll1_config, true);
3391 	clk_pll_configure_sr_hpm_lp(&mmpll3, regmap, &mmpll3_config, false);
3392 
3393 	return 0;
3394 }
3395 
3396 static struct platform_driver mmcc_apq8084_driver = {
3397 	.probe		= mmcc_apq8084_probe,
3398 	.driver		= {
3399 		.name	= "mmcc-apq8084",
3400 		.of_match_table = mmcc_apq8084_match_table,
3401 	},
3402 };
3403 module_platform_driver(mmcc_apq8084_driver);
3404 
3405 MODULE_DESCRIPTION("QCOM MMCC APQ8084 Driver");
3406 MODULE_LICENSE("GPL v2");
3407 MODULE_ALIAS("platform:mmcc-apq8084");
3408