xref: /linux/drivers/clk/qcom/gpucc-eliza.c (revision 10089c1832c993a2dcc689f2ddc934440390561f)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4  */
5 
6 #include <linux/clk-provider.h>
7 #include <linux/module.h>
8 #include <linux/platform_device.h>
9 #include <linux/regmap.h>
10 
11 #include <dt-bindings/clock/qcom,eliza-gpucc.h>
12 
13 #include "clk-alpha-pll.h"
14 #include "clk-branch.h"
15 #include "clk-pll.h"
16 #include "clk-rcg.h"
17 #include "clk-regmap.h"
18 #include "clk-regmap-divider.h"
19 #include "clk-regmap-mux.h"
20 #include "common.h"
21 #include "gdsc.h"
22 #include "reset.h"
23 
24 enum {
25 	DT_BI_TCXO,
26 	DT_GPLL0_OUT_MAIN,
27 	DT_GPLL0_OUT_MAIN_DIV,
28 };
29 
30 enum {
31 	P_BI_TCXO,
32 	P_BI_TCXO_AO,
33 	P_GPLL0_OUT_MAIN,
34 	P_GPLL0_OUT_MAIN_DIV,
35 	P_GPU_CC_PLL0_OUT_MAIN,
36 	P_GPU_CC_PLL1_OUT_MAIN,
37 };
38 
39 static const struct pll_vco lucid_ole_vco[] = {
40 	{ 249600000, 2300000000, 0 },
41 };
42 
43 /* 518.0 MHz Configuration */
44 static const struct alpha_pll_config gpu_cc_pll0_config = {
45 	.l = 0x1a,
46 	.alpha = 0xfaaa,
47 	.config_ctl_val = 0x20485699,
48 	.config_ctl_hi_val = 0x00182261,
49 	.config_ctl_hi1_val = 0x82aa299c,
50 	.test_ctl_val = 0x00000000,
51 	.test_ctl_hi_val = 0x00000003,
52 	.test_ctl_hi1_val = 0x00009000,
53 	.test_ctl_hi2_val = 0x00000034,
54 	.user_ctl_val = 0x00000000,
55 	.user_ctl_hi_val = 0x00000005,
56 };
57 
58 static struct clk_alpha_pll gpu_cc_pll0 = {
59 	.offset = 0x0,
60 	.config = &gpu_cc_pll0_config,
61 	.vco_table = lucid_ole_vco,
62 	.num_vco = ARRAY_SIZE(lucid_ole_vco),
63 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
64 	.clkr = {
65 		.hw.init = &(const struct clk_init_data) {
66 			.name = "gpu_cc_pll0",
67 			.parent_data = &(const struct clk_parent_data) {
68 				.index = DT_BI_TCXO,
69 			},
70 			.num_parents = 1,
71 			.ops = &clk_alpha_pll_lucid_evo_ops,
72 		},
73 	},
74 };
75 
76 /* 440.0 MHz Configuration */
77 static const struct alpha_pll_config gpu_cc_pll1_config = {
78 	.l = 0x16,
79 	.alpha = 0xeaaa,
80 	.config_ctl_val = 0x20485699,
81 	.config_ctl_hi_val = 0x00182261,
82 	.config_ctl_hi1_val = 0x82aa299c,
83 	.test_ctl_val = 0x00000000,
84 	.test_ctl_hi_val = 0x00000003,
85 	.test_ctl_hi1_val = 0x00009000,
86 	.test_ctl_hi2_val = 0x00000034,
87 	.user_ctl_val = 0x00000000,
88 	.user_ctl_hi_val = 0x00000005,
89 };
90 
91 static struct clk_alpha_pll gpu_cc_pll1 = {
92 	.offset = 0x1000,
93 	.config = &gpu_cc_pll1_config,
94 	.vco_table = lucid_ole_vco,
95 	.num_vco = ARRAY_SIZE(lucid_ole_vco),
96 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_LUCID_OLE],
97 	.clkr = {
98 		.hw.init = &(const struct clk_init_data) {
99 			.name = "gpu_cc_pll1",
100 			.parent_data = &(const struct clk_parent_data) {
101 				.index = DT_BI_TCXO,
102 			},
103 			.num_parents = 1,
104 			.ops = &clk_alpha_pll_lucid_evo_ops,
105 		},
106 	},
107 };
108 
109 static const struct parent_map gpu_cc_parent_map_0[] = {
110 	{ P_BI_TCXO, 0 },
111 	{ P_GPLL0_OUT_MAIN, 5 },
112 	{ P_GPLL0_OUT_MAIN_DIV, 6 },
113 };
114 
115 static const struct clk_parent_data gpu_cc_parent_data_0[] = {
116 	{ .index = DT_BI_TCXO },
117 	{ .index = DT_GPLL0_OUT_MAIN },
118 	{ .index = DT_GPLL0_OUT_MAIN_DIV },
119 };
120 
121 static const struct parent_map gpu_cc_parent_map_1[] = {
122 	{ P_BI_TCXO, 0 },
123 	{ P_GPU_CC_PLL0_OUT_MAIN, 1 },
124 	{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
125 	{ P_GPLL0_OUT_MAIN, 5 },
126 	{ P_GPLL0_OUT_MAIN_DIV, 6 },
127 };
128 
129 static const struct clk_parent_data gpu_cc_parent_data_1[] = {
130 	{ .index = DT_BI_TCXO },
131 	{ .hw = &gpu_cc_pll0.clkr.hw },
132 	{ .hw = &gpu_cc_pll1.clkr.hw },
133 	{ .index = DT_GPLL0_OUT_MAIN },
134 	{ .index = DT_GPLL0_OUT_MAIN_DIV },
135 };
136 
137 static const struct parent_map gpu_cc_parent_map_2[] = {
138 	{ P_BI_TCXO, 0 },
139 	{ P_GPU_CC_PLL1_OUT_MAIN, 3 },
140 	{ P_GPLL0_OUT_MAIN, 5 },
141 	{ P_GPLL0_OUT_MAIN_DIV, 6 },
142 };
143 
144 static const struct clk_parent_data gpu_cc_parent_data_2[] = {
145 	{ .index = DT_BI_TCXO },
146 	{ .hw = &gpu_cc_pll1.clkr.hw },
147 	{ .index = DT_GPLL0_OUT_MAIN },
148 	{ .index = DT_GPLL0_OUT_MAIN_DIV },
149 };
150 
151 static const struct parent_map gpu_cc_parent_map_3[] = {
152 	{ P_BI_TCXO, 0 },
153 };
154 
155 static const struct clk_parent_data gpu_cc_parent_data_3[] = {
156 	{ .index = DT_BI_TCXO },
157 };
158 
159 static const struct freq_tbl ftbl_gpu_cc_ff_clk_src[] = {
160 	F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0),
161 	{ }
162 };
163 
164 static struct clk_rcg2 gpu_cc_ff_clk_src = {
165 	.cmd_rcgr = 0x94b8,
166 	.mnd_width = 0,
167 	.hid_width = 5,
168 	.parent_map = gpu_cc_parent_map_0,
169 	.freq_tbl = ftbl_gpu_cc_ff_clk_src,
170 	.hw_clk_ctrl = true,
171 	.clkr.hw.init = &(const struct clk_init_data) {
172 		.name = "gpu_cc_ff_clk_src",
173 		.parent_data = gpu_cc_parent_data_0,
174 		.num_parents = ARRAY_SIZE(gpu_cc_parent_data_0),
175 		.flags = CLK_SET_RATE_PARENT,
176 		.ops = &clk_rcg2_shared_ops,
177 	},
178 };
179 
180 static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
181 	F(220000000, P_GPU_CC_PLL1_OUT_MAIN, 2, 0, 0),
182 	F(550000000, P_GPU_CC_PLL1_OUT_MAIN, 2, 0, 0),
183 	{ }
184 };
185 
186 static struct clk_rcg2 gpu_cc_gmu_clk_src = {
187 	.cmd_rcgr = 0x935c,
188 	.mnd_width = 0,
189 	.hid_width = 5,
190 	.parent_map = gpu_cc_parent_map_1,
191 	.freq_tbl = ftbl_gpu_cc_gmu_clk_src,
192 	.hw_clk_ctrl = true,
193 	.clkr.hw.init = &(const struct clk_init_data) {
194 		.name = "gpu_cc_gmu_clk_src",
195 		.parent_data = gpu_cc_parent_data_1,
196 		.num_parents = ARRAY_SIZE(gpu_cc_parent_data_1),
197 		.flags = CLK_SET_RATE_PARENT,
198 		.ops = &clk_rcg2_shared_ops,
199 	},
200 };
201 
202 static struct clk_rcg2 gpu_cc_hub_clk_src = {
203 	.cmd_rcgr = 0x9430,
204 	.mnd_width = 0,
205 	.hid_width = 5,
206 	.parent_map = gpu_cc_parent_map_2,
207 	.freq_tbl = ftbl_gpu_cc_ff_clk_src,
208 	.hw_clk_ctrl = true,
209 	.clkr.hw.init = &(const struct clk_init_data) {
210 		.name = "gpu_cc_hub_clk_src",
211 		.parent_data = gpu_cc_parent_data_2,
212 		.num_parents = ARRAY_SIZE(gpu_cc_parent_data_2),
213 		.flags = CLK_SET_RATE_PARENT,
214 		.ops = &clk_rcg2_shared_ops,
215 	},
216 };
217 
218 static const struct freq_tbl ftbl_gpu_cc_xo_clk_src[] = {
219 	F(19200000, P_BI_TCXO, 1, 0, 0),
220 	{ }
221 };
222 
223 static struct clk_rcg2 gpu_cc_xo_clk_src = {
224 	.cmd_rcgr = 0x9010,
225 	.mnd_width = 0,
226 	.hid_width = 5,
227 	.parent_map = gpu_cc_parent_map_3,
228 	.freq_tbl = ftbl_gpu_cc_xo_clk_src,
229 	.hw_clk_ctrl = true,
230 	.clkr.hw.init = &(const struct clk_init_data) {
231 		.name = "gpu_cc_xo_clk_src",
232 		.parent_data = gpu_cc_parent_data_3,
233 		.num_parents = ARRAY_SIZE(gpu_cc_parent_data_3),
234 		.ops = &clk_rcg2_shared_ops,
235 	},
236 };
237 
238 static struct clk_regmap_div gpu_cc_xo_div_clk_src = {
239 	.reg = 0x9050,
240 	.shift = 0,
241 	.width = 4,
242 	.clkr.hw.init = &(const struct clk_init_data) {
243 		.name = "gpu_cc_xo_div_clk_src",
244 		.parent_hws = (const struct clk_hw*[]) {
245 			&gpu_cc_xo_clk_src.clkr.hw,
246 		},
247 		.num_parents = 1,
248 		.ops = &clk_regmap_div_ro_ops,
249 	},
250 };
251 
252 static struct clk_branch gpu_cc_ahb_clk = {
253 	.halt_reg = 0x914c,
254 	.halt_check = BRANCH_HALT_DELAY,
255 	.clkr = {
256 		.enable_reg = 0x914c,
257 		.enable_mask = BIT(0),
258 		.hw.init = &(const struct clk_init_data) {
259 			.name = "gpu_cc_ahb_clk",
260 			.parent_hws = (const struct clk_hw*[]) {
261 				&gpu_cc_hub_clk_src.clkr.hw,
262 			},
263 			.num_parents = 1,
264 			.flags = CLK_SET_RATE_PARENT,
265 			.ops = &clk_branch2_ops,
266 		},
267 	},
268 };
269 
270 static struct clk_branch gpu_cc_crc_ahb_clk = {
271 	.halt_reg = 0x9150,
272 	.halt_check = BRANCH_HALT_VOTED,
273 	.clkr = {
274 		.enable_reg = 0x9150,
275 		.enable_mask = BIT(0),
276 		.hw.init = &(const struct clk_init_data) {
277 			.name = "gpu_cc_crc_ahb_clk",
278 			.parent_hws = (const struct clk_hw*[]) {
279 				&gpu_cc_hub_clk_src.clkr.hw,
280 			},
281 			.num_parents = 1,
282 			.flags = CLK_SET_RATE_PARENT,
283 			.ops = &clk_branch2_ops,
284 		},
285 	},
286 };
287 
288 static struct clk_branch gpu_cc_cx_accu_shift_clk = {
289 	.halt_reg = 0x9480,
290 	.halt_check = BRANCH_HALT_VOTED,
291 	.clkr = {
292 		.enable_reg = 0x9480,
293 		.enable_mask = BIT(0),
294 		.hw.init = &(const struct clk_init_data) {
295 			.name = "gpu_cc_cx_accu_shift_clk",
296 			.parent_hws = (const struct clk_hw*[]) {
297 				&gpu_cc_xo_clk_src.clkr.hw,
298 			},
299 			.num_parents = 1,
300 			.flags = CLK_SET_RATE_PARENT,
301 			.ops = &clk_branch2_ops,
302 		},
303 	},
304 };
305 
306 static struct clk_branch gpu_cc_cx_ff_clk = {
307 	.halt_reg = 0x9184,
308 	.halt_check = BRANCH_HALT,
309 	.clkr = {
310 		.enable_reg = 0x9184,
311 		.enable_mask = BIT(0),
312 		.hw.init = &(const struct clk_init_data) {
313 			.name = "gpu_cc_cx_ff_clk",
314 			.parent_hws = (const struct clk_hw*[]) {
315 				&gpu_cc_ff_clk_src.clkr.hw,
316 			},
317 			.num_parents = 1,
318 			.flags = CLK_SET_RATE_PARENT,
319 			.ops = &clk_branch2_ops,
320 		},
321 	},
322 };
323 
324 static struct clk_branch gpu_cc_cx_gmu_clk = {
325 	.halt_reg = 0x916c,
326 	.halt_check = BRANCH_HALT_VOTED,
327 	.clkr = {
328 		.enable_reg = 0x916c,
329 		.enable_mask = BIT(0),
330 		.hw.init = &(const struct clk_init_data) {
331 			.name = "gpu_cc_cx_gmu_clk",
332 			.parent_hws = (const struct clk_hw*[]) {
333 				&gpu_cc_gmu_clk_src.clkr.hw,
334 			},
335 			.num_parents = 1,
336 			.flags = CLK_SET_RATE_PARENT,
337 			.ops = &clk_branch2_aon_ops,
338 		},
339 	},
340 };
341 
342 static struct clk_branch gpu_cc_cxo_clk = {
343 	.halt_reg = 0x917c,
344 	.halt_check = BRANCH_HALT,
345 	.clkr = {
346 		.enable_reg = 0x917c,
347 		.enable_mask = BIT(0),
348 		.hw.init = &(const struct clk_init_data) {
349 			.name = "gpu_cc_cxo_clk",
350 			.parent_hws = (const struct clk_hw*[]) {
351 				&gpu_cc_xo_clk_src.clkr.hw,
352 			},
353 			.num_parents = 1,
354 			.flags = CLK_SET_RATE_PARENT,
355 			.ops = &clk_branch2_ops,
356 		},
357 	},
358 };
359 
360 static struct clk_branch gpu_cc_freq_measure_clk = {
361 	.halt_reg = 0x9008,
362 	.halt_check = BRANCH_HALT,
363 	.clkr = {
364 		.enable_reg = 0x9008,
365 		.enable_mask = BIT(0),
366 		.hw.init = &(const struct clk_init_data) {
367 			.name = "gpu_cc_freq_measure_clk",
368 			.parent_hws = (const struct clk_hw*[]) {
369 				&gpu_cc_xo_div_clk_src.clkr.hw,
370 			},
371 			.num_parents = 1,
372 			.flags = CLK_SET_RATE_PARENT,
373 			.ops = &clk_branch2_ops,
374 		},
375 	},
376 };
377 
378 static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = {
379 	.halt_reg = 0x7000,
380 	.halt_check = BRANCH_HALT_VOTED,
381 	.clkr = {
382 		.enable_reg = 0x7000,
383 		.enable_mask = BIT(0),
384 		.hw.init = &(const struct clk_init_data) {
385 			.name = "gpu_cc_hlos1_vote_gpu_smmu_clk",
386 			.ops = &clk_branch2_ops,
387 		},
388 	},
389 };
390 
391 static struct clk_branch gpu_cc_hub_aon_clk = {
392 	.halt_reg = 0x942c,
393 	.halt_check = BRANCH_HALT,
394 	.clkr = {
395 		.enable_reg = 0x942c,
396 		.enable_mask = BIT(0),
397 		.hw.init = &(const struct clk_init_data) {
398 			.name = "gpu_cc_hub_aon_clk",
399 			.parent_hws = (const struct clk_hw*[]) {
400 				&gpu_cc_hub_clk_src.clkr.hw,
401 			},
402 			.num_parents = 1,
403 			.flags = CLK_SET_RATE_PARENT,
404 			.ops = &clk_branch2_aon_ops,
405 		},
406 	},
407 };
408 
409 static struct clk_branch gpu_cc_hub_cx_int_clk = {
410 	.halt_reg = 0x9180,
411 	.halt_check = BRANCH_HALT_VOTED,
412 	.clkr = {
413 		.enable_reg = 0x9180,
414 		.enable_mask = BIT(0),
415 		.hw.init = &(const struct clk_init_data) {
416 			.name = "gpu_cc_hub_cx_int_clk",
417 			.parent_hws = (const struct clk_hw*[]) {
418 				&gpu_cc_hub_clk_src.clkr.hw,
419 			},
420 			.num_parents = 1,
421 			.flags = CLK_SET_RATE_PARENT,
422 			.ops = &clk_branch2_aon_ops,
423 		},
424 	},
425 };
426 
427 static struct clk_branch gpu_cc_memnoc_gfx_clk = {
428 	.halt_reg = 0x9188,
429 	.halt_check = BRANCH_HALT_VOTED,
430 	.clkr = {
431 		.enable_reg = 0x9188,
432 		.enable_mask = BIT(0),
433 		.hw.init = &(const struct clk_init_data) {
434 			.name = "gpu_cc_memnoc_gfx_clk",
435 			.ops = &clk_branch2_ops,
436 		},
437 	},
438 };
439 
440 static struct clk_branch gpu_cc_mnd1x_0_gfx3d_clk = {
441 	.halt_reg = 0x92cc,
442 	.halt_check = BRANCH_HALT,
443 	.clkr = {
444 		.enable_reg = 0x92cc,
445 		.enable_mask = BIT(0),
446 		.hw.init = &(const struct clk_init_data) {
447 			.name = "gpu_cc_mnd1x_0_gfx3d_clk",
448 			.ops = &clk_branch2_ops,
449 		},
450 	},
451 };
452 
453 static struct clk_branch gpu_cc_mnd1x_1_gfx3d_clk = {
454 	.halt_reg = 0x92d0,
455 	.halt_check = BRANCH_HALT,
456 	.clkr = {
457 		.enable_reg = 0x92d0,
458 		.enable_mask = BIT(0),
459 		.hw.init = &(const struct clk_init_data) {
460 			.name = "gpu_cc_mnd1x_1_gfx3d_clk",
461 			.ops = &clk_branch2_ops,
462 		},
463 	},
464 };
465 
466 static struct clk_branch gpu_cc_sleep_clk = {
467 	.halt_reg = 0x9164,
468 	.halt_check = BRANCH_HALT_VOTED,
469 	.clkr = {
470 		.enable_reg = 0x9164,
471 		.enable_mask = BIT(0),
472 		.hw.init = &(const struct clk_init_data) {
473 			.name = "gpu_cc_sleep_clk",
474 			.ops = &clk_branch2_ops,
475 		},
476 	},
477 };
478 
479 static struct gdsc gpu_cc_cx_gdsc = {
480 	.gdscr = 0x9110,
481 	.gds_hw_ctrl = 0x9124,
482 	.en_rest_wait_val = 0x2,
483 	.en_few_wait_val = 0x2,
484 	.clk_dis_wait_val = 0x8,
485 	.pd = {
486 		.name = "gpu_cc_cx_gdsc",
487 	},
488 	.pwrsts = PWRSTS_OFF_ON,
489 	.flags = VOTABLE | RETAIN_FF_ENABLE,
490 };
491 
492 static struct gdsc gpu_cc_gx_gdsc = {
493 	.gdscr = 0x905c,
494 	.en_rest_wait_val = 0x2,
495 	.en_few_wait_val = 0x2,
496 	.clk_dis_wait_val = 0xf,
497 	.pd = {
498 		.name = "gpu_cc_gx_gdsc",
499 		.power_on = gdsc_gx_do_nothing_enable,
500 	},
501 	.pwrsts = PWRSTS_OFF_ON,
502 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
503 };
504 
505 static struct clk_regmap *gpu_cc_eliza_clocks[] = {
506 	[GPU_CC_AHB_CLK] = &gpu_cc_ahb_clk.clkr,
507 	[GPU_CC_CRC_AHB_CLK] = &gpu_cc_crc_ahb_clk.clkr,
508 	[GPU_CC_CX_ACCU_SHIFT_CLK] = &gpu_cc_cx_accu_shift_clk.clkr,
509 	[GPU_CC_CX_FF_CLK] = &gpu_cc_cx_ff_clk.clkr,
510 	[GPU_CC_CX_GMU_CLK] = &gpu_cc_cx_gmu_clk.clkr,
511 	[GPU_CC_CXO_CLK] = &gpu_cc_cxo_clk.clkr,
512 	[GPU_CC_FF_CLK_SRC] = &gpu_cc_ff_clk_src.clkr,
513 	[GPU_CC_FREQ_MEASURE_CLK] = &gpu_cc_freq_measure_clk.clkr,
514 	[GPU_CC_GMU_CLK_SRC] = &gpu_cc_gmu_clk_src.clkr,
515 	[GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK] = &gpu_cc_hlos1_vote_gpu_smmu_clk.clkr,
516 	[GPU_CC_HUB_AON_CLK] = &gpu_cc_hub_aon_clk.clkr,
517 	[GPU_CC_HUB_CLK_SRC] = &gpu_cc_hub_clk_src.clkr,
518 	[GPU_CC_HUB_CX_INT_CLK] = &gpu_cc_hub_cx_int_clk.clkr,
519 	[GPU_CC_MEMNOC_GFX_CLK] = &gpu_cc_memnoc_gfx_clk.clkr,
520 	[GPU_CC_MND1X_0_GFX3D_CLK] = &gpu_cc_mnd1x_0_gfx3d_clk.clkr,
521 	[GPU_CC_MND1X_1_GFX3D_CLK] = &gpu_cc_mnd1x_1_gfx3d_clk.clkr,
522 	[GPU_CC_PLL0] = &gpu_cc_pll0.clkr,
523 	[GPU_CC_PLL1] = &gpu_cc_pll1.clkr,
524 	[GPU_CC_SLEEP_CLK] = &gpu_cc_sleep_clk.clkr,
525 	[GPU_CC_XO_CLK_SRC] = &gpu_cc_xo_clk_src.clkr,
526 	[GPU_CC_XO_DIV_CLK_SRC] = &gpu_cc_xo_div_clk_src.clkr,
527 };
528 
529 static struct gdsc *gpu_cc_eliza_gdscs[] = {
530 	[GPU_CC_CX_GDSC] = &gpu_cc_cx_gdsc,
531 	[GPU_CC_GX_GDSC] = &gpu_cc_gx_gdsc,
532 };
533 
534 static const struct qcom_reset_map gpu_cc_eliza_resets[] = {
535 	[GPU_CC_ACD_BCR] = { 0x939c },
536 	[GPU_CC_CB_BCR] = { 0x93e4 },
537 	[GPU_CC_CX_BCR] = { 0x910c },
538 	[GPU_CC_FAST_HUB_BCR] = { 0x9428 },
539 	[GPU_CC_FF_BCR] = { 0x94b4 },
540 	[GPU_CC_GFX3D_AON_BCR] = { 0x91dc },
541 	[GPU_CC_GMU_BCR] = { 0x9358 },
542 	[GPU_CC_GX_BCR] = { 0x9058 },
543 	[GPU_CC_RBCPR_BCR] = { 0x9224 },
544 	[GPU_CC_XO_BCR] = { 0x9000 },
545 };
546 
547 static struct clk_alpha_pll *gpu_cc_eliza_plls[] = {
548 	&gpu_cc_pll0,
549 	&gpu_cc_pll1,
550 };
551 
552 static const u32 gpu_cc_eliza_critical_cbcrs[] = {
553 	0x9004, /* GPU_CC_CXO_AON_CLK */
554 	0x900c, /* GPU_CC_DEMET_CLK */
555 };
556 
557 static const struct regmap_config gpu_cc_eliza_regmap_config = {
558 	.reg_bits = 32,
559 	.reg_stride = 4,
560 	.val_bits = 32,
561 	.max_register = 0x9988,
562 	.fast_io = true,
563 };
564 
565 static const struct qcom_cc_driver_data gpu_cc_eliza_driver_data = {
566 	.alpha_plls = gpu_cc_eliza_plls,
567 	.num_alpha_plls = ARRAY_SIZE(gpu_cc_eliza_plls),
568 	.clk_cbcrs = gpu_cc_eliza_critical_cbcrs,
569 	.num_clk_cbcrs = ARRAY_SIZE(gpu_cc_eliza_critical_cbcrs),
570 };
571 
572 static const struct qcom_cc_desc gpu_cc_eliza_desc = {
573 	.config = &gpu_cc_eliza_regmap_config,
574 	.clks = gpu_cc_eliza_clocks,
575 	.num_clks = ARRAY_SIZE(gpu_cc_eliza_clocks),
576 	.resets = gpu_cc_eliza_resets,
577 	.num_resets = ARRAY_SIZE(gpu_cc_eliza_resets),
578 	.gdscs = gpu_cc_eliza_gdscs,
579 	.num_gdscs = ARRAY_SIZE(gpu_cc_eliza_gdscs),
580 	.use_rpm = true,
581 	.driver_data = &gpu_cc_eliza_driver_data,
582 };
583 
584 static const struct of_device_id gpu_cc_eliza_match_table[] = {
585 	{ .compatible = "qcom,eliza-gpucc" },
586 	{ }
587 };
588 MODULE_DEVICE_TABLE(of, gpu_cc_eliza_match_table);
589 
590 static int gpu_cc_eliza_probe(struct platform_device *pdev)
591 {
592 	return qcom_cc_probe(pdev, &gpu_cc_eliza_desc);
593 }
594 
595 static struct platform_driver gpu_cc_eliza_driver = {
596 	.probe = gpu_cc_eliza_probe,
597 	.driver = {
598 		.name = "gpucc-eliza",
599 		.of_match_table = gpu_cc_eliza_match_table,
600 	},
601 };
602 
603 module_platform_driver(gpu_cc_eliza_driver);
604 
605 MODULE_DESCRIPTION("QTI GPUCC Eliza Driver");
606 MODULE_LICENSE("GPL");
607