1 // SPDX-License-Identifier: GPL-2.0+
3 * Amlogic Meson-G12A Clock Controller Driver
5 * Copyright (c) 2016 Baylibre SAS.
6 * Author: Michael Turquette <mturquette@baylibre.com>
8 * Copyright (c) 2018 Amlogic, inc.
9 * Author: Qiufang Dai <qiufang.dai@amlogic.com>
10 * Author: Jian Hu <jian.hu@amlogic.com>
13 #include <linux/clk-provider.h>
14 #include <linux/init.h>
15 #include <linux/of_device.h>
16 #include <linux/platform_device.h>
17 #include <linux/clk.h>
18 #include <linux/module.h>
22 #include "clk-regmap.h"
23 #include "clk-cpu-dyndiv.h"
24 #include "vid-pll-div.h"
25 #include "meson-eeclk.h"
28 static DEFINE_SPINLOCK(meson_clk_lock
);
30 static struct clk_regmap g12a_fixed_pll_dco
= {
31 .data
= &(struct meson_clk_pll_data
){
33 .reg_off
= HHI_FIX_PLL_CNTL0
,
38 .reg_off
= HHI_FIX_PLL_CNTL0
,
43 .reg_off
= HHI_FIX_PLL_CNTL0
,
48 .reg_off
= HHI_FIX_PLL_CNTL1
,
53 .reg_off
= HHI_FIX_PLL_CNTL0
,
58 .reg_off
= HHI_FIX_PLL_CNTL0
,
63 .hw
.init
= &(struct clk_init_data
){
64 .name
= "fixed_pll_dco",
65 .ops
= &meson_clk_pll_ro_ops
,
66 .parent_data
= &(const struct clk_parent_data
) {
73 static struct clk_regmap g12a_fixed_pll
= {
74 .data
= &(struct clk_regmap_div_data
){
75 .offset
= HHI_FIX_PLL_CNTL0
,
78 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
80 .hw
.init
= &(struct clk_init_data
){
82 .ops
= &clk_regmap_divider_ro_ops
,
83 .parent_hws
= (const struct clk_hw
*[]) {
84 &g12a_fixed_pll_dco
.hw
88 * This clock won't ever change at runtime so
89 * CLK_SET_RATE_PARENT is not required
94 static const struct pll_mult_range g12a_sys_pll_mult_range
= {
99 static struct clk_regmap g12a_sys_pll_dco
= {
100 .data
= &(struct meson_clk_pll_data
){
102 .reg_off
= HHI_SYS_PLL_CNTL0
,
107 .reg_off
= HHI_SYS_PLL_CNTL0
,
112 .reg_off
= HHI_SYS_PLL_CNTL0
,
117 .reg_off
= HHI_SYS_PLL_CNTL0
,
122 .reg_off
= HHI_SYS_PLL_CNTL0
,
126 .range
= &g12a_sys_pll_mult_range
,
128 .hw
.init
= &(struct clk_init_data
){
129 .name
= "sys_pll_dco",
130 .ops
= &meson_clk_pll_ops
,
131 .parent_data
= &(const struct clk_parent_data
) {
135 /* This clock feeds the CPU, avoid disabling it */
136 .flags
= CLK_IS_CRITICAL
,
140 static struct clk_regmap g12a_sys_pll
= {
141 .data
= &(struct clk_regmap_div_data
){
142 .offset
= HHI_SYS_PLL_CNTL0
,
145 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
147 .hw
.init
= &(struct clk_init_data
){
149 .ops
= &clk_regmap_divider_ops
,
150 .parent_hws
= (const struct clk_hw
*[]) {
154 .flags
= CLK_SET_RATE_PARENT
,
158 static struct clk_regmap g12b_sys1_pll_dco
= {
159 .data
= &(struct meson_clk_pll_data
){
161 .reg_off
= HHI_SYS1_PLL_CNTL0
,
166 .reg_off
= HHI_SYS1_PLL_CNTL0
,
171 .reg_off
= HHI_SYS1_PLL_CNTL0
,
176 .reg_off
= HHI_SYS1_PLL_CNTL0
,
181 .reg_off
= HHI_SYS1_PLL_CNTL0
,
185 .range
= &g12a_sys_pll_mult_range
,
187 .hw
.init
= &(struct clk_init_data
){
188 .name
= "sys1_pll_dco",
189 .ops
= &meson_clk_pll_ops
,
190 .parent_data
= &(const struct clk_parent_data
) {
194 /* This clock feeds the CPU, avoid disabling it */
195 .flags
= CLK_IS_CRITICAL
,
199 static struct clk_regmap g12b_sys1_pll
= {
200 .data
= &(struct clk_regmap_div_data
){
201 .offset
= HHI_SYS1_PLL_CNTL0
,
204 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
206 .hw
.init
= &(struct clk_init_data
){
208 .ops
= &clk_regmap_divider_ops
,
209 .parent_hws
= (const struct clk_hw
*[]) {
210 &g12b_sys1_pll_dco
.hw
213 .flags
= CLK_SET_RATE_PARENT
,
217 static struct clk_regmap g12a_sys_pll_div16_en
= {
218 .data
= &(struct clk_regmap_gate_data
){
219 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
222 .hw
.init
= &(struct clk_init_data
) {
223 .name
= "sys_pll_div16_en",
224 .ops
= &clk_regmap_gate_ro_ops
,
225 .parent_hws
= (const struct clk_hw
*[]) { &g12a_sys_pll
.hw
},
228 * This clock is used to debug the sys_pll range
229 * Linux should not change it at runtime
234 static struct clk_regmap g12b_sys1_pll_div16_en
= {
235 .data
= &(struct clk_regmap_gate_data
){
236 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
239 .hw
.init
= &(struct clk_init_data
) {
240 .name
= "sys1_pll_div16_en",
241 .ops
= &clk_regmap_gate_ro_ops
,
242 .parent_hws
= (const struct clk_hw
*[]) {
247 * This clock is used to debug the sys_pll range
248 * Linux should not change it at runtime
253 static struct clk_fixed_factor g12a_sys_pll_div16
= {
256 .hw
.init
= &(struct clk_init_data
){
257 .name
= "sys_pll_div16",
258 .ops
= &clk_fixed_factor_ops
,
259 .parent_hws
= (const struct clk_hw
*[]) {
260 &g12a_sys_pll_div16_en
.hw
266 static struct clk_fixed_factor g12b_sys1_pll_div16
= {
269 .hw
.init
= &(struct clk_init_data
){
270 .name
= "sys1_pll_div16",
271 .ops
= &clk_fixed_factor_ops
,
272 .parent_hws
= (const struct clk_hw
*[]) {
273 &g12b_sys1_pll_div16_en
.hw
279 static struct clk_fixed_factor g12a_fclk_div2_div
= {
282 .hw
.init
= &(struct clk_init_data
){
283 .name
= "fclk_div2_div",
284 .ops
= &clk_fixed_factor_ops
,
285 .parent_hws
= (const struct clk_hw
*[]) { &g12a_fixed_pll
.hw
},
290 static struct clk_regmap g12a_fclk_div2
= {
291 .data
= &(struct clk_regmap_gate_data
){
292 .offset
= HHI_FIX_PLL_CNTL1
,
295 .hw
.init
= &(struct clk_init_data
){
297 .ops
= &clk_regmap_gate_ops
,
298 .parent_hws
= (const struct clk_hw
*[]) {
299 &g12a_fclk_div2_div
.hw
303 * Similar to fclk_div3, it seems that this clock is used by
304 * the resident firmware and is required by the platform to
306 * Until the following condition are met, we need this clock to
307 * be marked as critical:
308 * a) Mark the clock used by a firmware resource, if possible
309 * b) CCF has a clock hand-off mechanism to make the sure the
310 * clock stays on until the proper driver comes along
312 .flags
= CLK_IS_CRITICAL
,
316 static struct clk_fixed_factor g12a_fclk_div3_div
= {
319 .hw
.init
= &(struct clk_init_data
){
320 .name
= "fclk_div3_div",
321 .ops
= &clk_fixed_factor_ops
,
322 .parent_hws
= (const struct clk_hw
*[]) { &g12a_fixed_pll
.hw
},
327 static struct clk_regmap g12a_fclk_div3
= {
328 .data
= &(struct clk_regmap_gate_data
){
329 .offset
= HHI_FIX_PLL_CNTL1
,
332 .hw
.init
= &(struct clk_init_data
){
334 .ops
= &clk_regmap_gate_ops
,
335 .parent_hws
= (const struct clk_hw
*[]) {
336 &g12a_fclk_div3_div
.hw
340 * This clock is used by the resident firmware and is required
341 * by the platform to operate correctly.
342 * Until the following condition are met, we need this clock to
343 * be marked as critical:
344 * a) Mark the clock used by a firmware resource, if possible
345 * b) CCF has a clock hand-off mechanism to make the sure the
346 * clock stays on until the proper driver comes along
348 .flags
= CLK_IS_CRITICAL
,
352 /* Datasheet names this field as "premux0" */
353 static struct clk_regmap g12a_cpu_clk_premux0
= {
354 .data
= &(struct clk_regmap_mux_data
){
355 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
358 .flags
= CLK_MUX_ROUND_CLOSEST
,
360 .hw
.init
= &(struct clk_init_data
){
361 .name
= "cpu_clk_dyn0_sel",
362 .ops
= &clk_regmap_mux_ops
,
363 .parent_data
= (const struct clk_parent_data
[]) {
364 { .fw_name
= "xtal", },
365 { .hw
= &g12a_fclk_div2
.hw
},
366 { .hw
= &g12a_fclk_div3
.hw
},
369 .flags
= CLK_SET_RATE_PARENT
,
373 /* Datasheet names this field as "premux1" */
374 static struct clk_regmap g12a_cpu_clk_premux1
= {
375 .data
= &(struct clk_regmap_mux_data
){
376 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
380 .hw
.init
= &(struct clk_init_data
){
381 .name
= "cpu_clk_dyn1_sel",
382 .ops
= &clk_regmap_mux_ops
,
383 .parent_data
= (const struct clk_parent_data
[]) {
384 { .fw_name
= "xtal", },
385 { .hw
= &g12a_fclk_div2
.hw
},
386 { .hw
= &g12a_fclk_div3
.hw
},
389 /* This sub-tree is used a parking clock */
390 .flags
= CLK_SET_RATE_NO_REPARENT
394 /* Datasheet names this field as "mux0_divn_tcnt" */
395 static struct clk_regmap g12a_cpu_clk_mux0_div
= {
396 .data
= &(struct meson_clk_cpu_dyndiv_data
){
398 .reg_off
= HHI_SYS_CPU_CLK_CNTL0
,
403 .reg_off
= HHI_SYS_CPU_CLK_CNTL0
,
408 .hw
.init
= &(struct clk_init_data
){
409 .name
= "cpu_clk_dyn0_div",
410 .ops
= &meson_clk_cpu_dyndiv_ops
,
411 .parent_hws
= (const struct clk_hw
*[]) {
412 &g12a_cpu_clk_premux0
.hw
415 .flags
= CLK_SET_RATE_PARENT
,
419 /* Datasheet names this field as "postmux0" */
420 static struct clk_regmap g12a_cpu_clk_postmux0
= {
421 .data
= &(struct clk_regmap_mux_data
){
422 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
425 .flags
= CLK_MUX_ROUND_CLOSEST
,
427 .hw
.init
= &(struct clk_init_data
){
428 .name
= "cpu_clk_dyn0",
429 .ops
= &clk_regmap_mux_ops
,
430 .parent_hws
= (const struct clk_hw
*[]) {
431 &g12a_cpu_clk_premux0
.hw
,
432 &g12a_cpu_clk_mux0_div
.hw
,
435 .flags
= CLK_SET_RATE_PARENT
,
439 /* Datasheet names this field as "Mux1_divn_tcnt" */
440 static struct clk_regmap g12a_cpu_clk_mux1_div
= {
441 .data
= &(struct clk_regmap_div_data
){
442 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
446 .hw
.init
= &(struct clk_init_data
){
447 .name
= "cpu_clk_dyn1_div",
448 .ops
= &clk_regmap_divider_ro_ops
,
449 .parent_hws
= (const struct clk_hw
*[]) {
450 &g12a_cpu_clk_premux1
.hw
456 /* Datasheet names this field as "postmux1" */
457 static struct clk_regmap g12a_cpu_clk_postmux1
= {
458 .data
= &(struct clk_regmap_mux_data
){
459 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
463 .hw
.init
= &(struct clk_init_data
){
464 .name
= "cpu_clk_dyn1",
465 .ops
= &clk_regmap_mux_ops
,
466 .parent_hws
= (const struct clk_hw
*[]) {
467 &g12a_cpu_clk_premux1
.hw
,
468 &g12a_cpu_clk_mux1_div
.hw
,
471 /* This sub-tree is used a parking clock */
472 .flags
= CLK_SET_RATE_NO_REPARENT
,
476 /* Datasheet names this field as "Final_dyn_mux_sel" */
477 static struct clk_regmap g12a_cpu_clk_dyn
= {
478 .data
= &(struct clk_regmap_mux_data
){
479 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
482 .flags
= CLK_MUX_ROUND_CLOSEST
,
484 .hw
.init
= &(struct clk_init_data
){
485 .name
= "cpu_clk_dyn",
486 .ops
= &clk_regmap_mux_ops
,
487 .parent_hws
= (const struct clk_hw
*[]) {
488 &g12a_cpu_clk_postmux0
.hw
,
489 &g12a_cpu_clk_postmux1
.hw
,
492 .flags
= CLK_SET_RATE_PARENT
,
496 /* Datasheet names this field as "Final_mux_sel" */
497 static struct clk_regmap g12a_cpu_clk
= {
498 .data
= &(struct clk_regmap_mux_data
){
499 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
502 .flags
= CLK_MUX_ROUND_CLOSEST
,
504 .hw
.init
= &(struct clk_init_data
){
506 .ops
= &clk_regmap_mux_ops
,
507 .parent_hws
= (const struct clk_hw
*[]) {
508 &g12a_cpu_clk_dyn
.hw
,
512 .flags
= CLK_SET_RATE_PARENT
,
516 /* Datasheet names this field as "Final_mux_sel" */
517 static struct clk_regmap g12b_cpu_clk
= {
518 .data
= &(struct clk_regmap_mux_data
){
519 .offset
= HHI_SYS_CPU_CLK_CNTL0
,
522 .flags
= CLK_MUX_ROUND_CLOSEST
,
524 .hw
.init
= &(struct clk_init_data
){
526 .ops
= &clk_regmap_mux_ops
,
527 .parent_hws
= (const struct clk_hw
*[]) {
528 &g12a_cpu_clk_dyn
.hw
,
532 .flags
= CLK_SET_RATE_PARENT
,
536 /* Datasheet names this field as "premux0" */
537 static struct clk_regmap g12b_cpub_clk_premux0
= {
538 .data
= &(struct clk_regmap_mux_data
){
539 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
542 .flags
= CLK_MUX_ROUND_CLOSEST
,
544 .hw
.init
= &(struct clk_init_data
){
545 .name
= "cpub_clk_dyn0_sel",
546 .ops
= &clk_regmap_mux_ops
,
547 .parent_data
= (const struct clk_parent_data
[]) {
548 { .fw_name
= "xtal", },
549 { .hw
= &g12a_fclk_div2
.hw
},
550 { .hw
= &g12a_fclk_div3
.hw
},
553 .flags
= CLK_SET_RATE_PARENT
,
557 /* Datasheet names this field as "mux0_divn_tcnt" */
558 static struct clk_regmap g12b_cpub_clk_mux0_div
= {
559 .data
= &(struct meson_clk_cpu_dyndiv_data
){
561 .reg_off
= HHI_SYS_CPUB_CLK_CNTL
,
566 .reg_off
= HHI_SYS_CPUB_CLK_CNTL
,
571 .hw
.init
= &(struct clk_init_data
){
572 .name
= "cpub_clk_dyn0_div",
573 .ops
= &meson_clk_cpu_dyndiv_ops
,
574 .parent_hws
= (const struct clk_hw
*[]) {
575 &g12b_cpub_clk_premux0
.hw
578 .flags
= CLK_SET_RATE_PARENT
,
582 /* Datasheet names this field as "postmux0" */
583 static struct clk_regmap g12b_cpub_clk_postmux0
= {
584 .data
= &(struct clk_regmap_mux_data
){
585 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
588 .flags
= CLK_MUX_ROUND_CLOSEST
,
590 .hw
.init
= &(struct clk_init_data
){
591 .name
= "cpub_clk_dyn0",
592 .ops
= &clk_regmap_mux_ops
,
593 .parent_hws
= (const struct clk_hw
*[]) {
594 &g12b_cpub_clk_premux0
.hw
,
595 &g12b_cpub_clk_mux0_div
.hw
598 .flags
= CLK_SET_RATE_PARENT
,
602 /* Datasheet names this field as "premux1" */
603 static struct clk_regmap g12b_cpub_clk_premux1
= {
604 .data
= &(struct clk_regmap_mux_data
){
605 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
609 .hw
.init
= &(struct clk_init_data
){
610 .name
= "cpub_clk_dyn1_sel",
611 .ops
= &clk_regmap_mux_ops
,
612 .parent_data
= (const struct clk_parent_data
[]) {
613 { .fw_name
= "xtal", },
614 { .hw
= &g12a_fclk_div2
.hw
},
615 { .hw
= &g12a_fclk_div3
.hw
},
618 /* This sub-tree is used a parking clock */
619 .flags
= CLK_SET_RATE_NO_REPARENT
,
623 /* Datasheet names this field as "Mux1_divn_tcnt" */
624 static struct clk_regmap g12b_cpub_clk_mux1_div
= {
625 .data
= &(struct clk_regmap_div_data
){
626 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
630 .hw
.init
= &(struct clk_init_data
){
631 .name
= "cpub_clk_dyn1_div",
632 .ops
= &clk_regmap_divider_ro_ops
,
633 .parent_hws
= (const struct clk_hw
*[]) {
634 &g12b_cpub_clk_premux1
.hw
640 /* Datasheet names this field as "postmux1" */
641 static struct clk_regmap g12b_cpub_clk_postmux1
= {
642 .data
= &(struct clk_regmap_mux_data
){
643 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
647 .hw
.init
= &(struct clk_init_data
){
648 .name
= "cpub_clk_dyn1",
649 .ops
= &clk_regmap_mux_ops
,
650 .parent_hws
= (const struct clk_hw
*[]) {
651 &g12b_cpub_clk_premux1
.hw
,
652 &g12b_cpub_clk_mux1_div
.hw
655 /* This sub-tree is used a parking clock */
656 .flags
= CLK_SET_RATE_NO_REPARENT
,
660 /* Datasheet names this field as "Final_dyn_mux_sel" */
661 static struct clk_regmap g12b_cpub_clk_dyn
= {
662 .data
= &(struct clk_regmap_mux_data
){
663 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
666 .flags
= CLK_MUX_ROUND_CLOSEST
,
668 .hw
.init
= &(struct clk_init_data
){
669 .name
= "cpub_clk_dyn",
670 .ops
= &clk_regmap_mux_ops
,
671 .parent_hws
= (const struct clk_hw
*[]) {
672 &g12b_cpub_clk_postmux0
.hw
,
673 &g12b_cpub_clk_postmux1
.hw
676 .flags
= CLK_SET_RATE_PARENT
,
680 /* Datasheet names this field as "Final_mux_sel" */
681 static struct clk_regmap g12b_cpub_clk
= {
682 .data
= &(struct clk_regmap_mux_data
){
683 .offset
= HHI_SYS_CPUB_CLK_CNTL
,
686 .flags
= CLK_MUX_ROUND_CLOSEST
,
688 .hw
.init
= &(struct clk_init_data
){
690 .ops
= &clk_regmap_mux_ops
,
691 .parent_hws
= (const struct clk_hw
*[]) {
692 &g12b_cpub_clk_dyn
.hw
,
696 .flags
= CLK_SET_RATE_PARENT
,
700 static struct clk_regmap sm1_gp1_pll
;
702 /* Datasheet names this field as "premux0" */
703 static struct clk_regmap sm1_dsu_clk_premux0
= {
704 .data
= &(struct clk_regmap_mux_data
){
705 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
709 .hw
.init
= &(struct clk_init_data
){
710 .name
= "dsu_clk_dyn0_sel",
711 .ops
= &clk_regmap_mux_ro_ops
,
712 .parent_data
= (const struct clk_parent_data
[]) {
713 { .fw_name
= "xtal", },
714 { .hw
= &g12a_fclk_div2
.hw
},
715 { .hw
= &g12a_fclk_div3
.hw
},
716 { .hw
= &sm1_gp1_pll
.hw
},
722 /* Datasheet names this field as "premux1" */
723 static struct clk_regmap sm1_dsu_clk_premux1
= {
724 .data
= &(struct clk_regmap_mux_data
){
725 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
729 .hw
.init
= &(struct clk_init_data
){
730 .name
= "dsu_clk_dyn1_sel",
731 .ops
= &clk_regmap_mux_ro_ops
,
732 .parent_data
= (const struct clk_parent_data
[]) {
733 { .fw_name
= "xtal", },
734 { .hw
= &g12a_fclk_div2
.hw
},
735 { .hw
= &g12a_fclk_div3
.hw
},
736 { .hw
= &sm1_gp1_pll
.hw
},
742 /* Datasheet names this field as "Mux0_divn_tcnt" */
743 static struct clk_regmap sm1_dsu_clk_mux0_div
= {
744 .data
= &(struct clk_regmap_div_data
){
745 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
749 .hw
.init
= &(struct clk_init_data
){
750 .name
= "dsu_clk_dyn0_div",
751 .ops
= &clk_regmap_divider_ro_ops
,
752 .parent_hws
= (const struct clk_hw
*[]) {
753 &sm1_dsu_clk_premux0
.hw
759 /* Datasheet names this field as "postmux0" */
760 static struct clk_regmap sm1_dsu_clk_postmux0
= {
761 .data
= &(struct clk_regmap_mux_data
){
762 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
766 .hw
.init
= &(struct clk_init_data
){
767 .name
= "dsu_clk_dyn0",
768 .ops
= &clk_regmap_mux_ro_ops
,
769 .parent_hws
= (const struct clk_hw
*[]) {
770 &sm1_dsu_clk_premux0
.hw
,
771 &sm1_dsu_clk_mux0_div
.hw
,
777 /* Datasheet names this field as "Mux1_divn_tcnt" */
778 static struct clk_regmap sm1_dsu_clk_mux1_div
= {
779 .data
= &(struct clk_regmap_div_data
){
780 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
784 .hw
.init
= &(struct clk_init_data
){
785 .name
= "dsu_clk_dyn1_div",
786 .ops
= &clk_regmap_divider_ro_ops
,
787 .parent_hws
= (const struct clk_hw
*[]) {
788 &sm1_dsu_clk_premux1
.hw
794 /* Datasheet names this field as "postmux1" */
795 static struct clk_regmap sm1_dsu_clk_postmux1
= {
796 .data
= &(struct clk_regmap_mux_data
){
797 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
801 .hw
.init
= &(struct clk_init_data
){
802 .name
= "dsu_clk_dyn1",
803 .ops
= &clk_regmap_mux_ro_ops
,
804 .parent_hws
= (const struct clk_hw
*[]) {
805 &sm1_dsu_clk_premux1
.hw
,
806 &sm1_dsu_clk_mux1_div
.hw
,
812 /* Datasheet names this field as "Final_dyn_mux_sel" */
813 static struct clk_regmap sm1_dsu_clk_dyn
= {
814 .data
= &(struct clk_regmap_mux_data
){
815 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
819 .hw
.init
= &(struct clk_init_data
){
820 .name
= "dsu_clk_dyn",
821 .ops
= &clk_regmap_mux_ro_ops
,
822 .parent_hws
= (const struct clk_hw
*[]) {
823 &sm1_dsu_clk_postmux0
.hw
,
824 &sm1_dsu_clk_postmux1
.hw
,
830 /* Datasheet names this field as "Final_mux_sel" */
831 static struct clk_regmap sm1_dsu_final_clk
= {
832 .data
= &(struct clk_regmap_mux_data
){
833 .offset
= HHI_SYS_CPU_CLK_CNTL5
,
837 .hw
.init
= &(struct clk_init_data
){
838 .name
= "dsu_clk_final",
839 .ops
= &clk_regmap_mux_ro_ops
,
840 .parent_hws
= (const struct clk_hw
*[]) {
848 /* Datasheet names this field as "Cpu_clk_sync_mux_sel" bit 0 */
849 static struct clk_regmap sm1_cpu1_clk
= {
850 .data
= &(struct clk_regmap_mux_data
){
851 .offset
= HHI_SYS_CPU_CLK_CNTL6
,
855 .hw
.init
= &(struct clk_init_data
){
857 .ops
= &clk_regmap_mux_ro_ops
,
858 .parent_hws
= (const struct clk_hw
*[]) {
860 /* This CPU also have a dedicated clock tree */
866 /* Datasheet names this field as "Cpu_clk_sync_mux_sel" bit 1 */
867 static struct clk_regmap sm1_cpu2_clk
= {
868 .data
= &(struct clk_regmap_mux_data
){
869 .offset
= HHI_SYS_CPU_CLK_CNTL6
,
873 .hw
.init
= &(struct clk_init_data
){
875 .ops
= &clk_regmap_mux_ro_ops
,
876 .parent_hws
= (const struct clk_hw
*[]) {
878 /* This CPU also have a dedicated clock tree */
884 /* Datasheet names this field as "Cpu_clk_sync_mux_sel" bit 2 */
885 static struct clk_regmap sm1_cpu3_clk
= {
886 .data
= &(struct clk_regmap_mux_data
){
887 .offset
= HHI_SYS_CPU_CLK_CNTL6
,
891 .hw
.init
= &(struct clk_init_data
){
893 .ops
= &clk_regmap_mux_ro_ops
,
894 .parent_hws
= (const struct clk_hw
*[]) {
896 /* This CPU also have a dedicated clock tree */
902 /* Datasheet names this field as "Cpu_clk_sync_mux_sel" bit 4 */
903 static struct clk_regmap sm1_dsu_clk
= {
904 .data
= &(struct clk_regmap_mux_data
){
905 .offset
= HHI_SYS_CPU_CLK_CNTL6
,
909 .hw
.init
= &(struct clk_init_data
){
911 .ops
= &clk_regmap_mux_ro_ops
,
912 .parent_hws
= (const struct clk_hw
*[]) {
914 &sm1_dsu_final_clk
.hw
,
920 static int g12a_cpu_clk_mux_notifier_cb(struct notifier_block
*nb
,
921 unsigned long event
, void *data
)
923 if (event
== POST_RATE_CHANGE
|| event
== PRE_RATE_CHANGE
) {
924 /* Wait for clock propagation before/after changing the mux */
932 static struct notifier_block g12a_cpu_clk_mux_nb
= {
933 .notifier_call
= g12a_cpu_clk_mux_notifier_cb
,
936 struct g12a_cpu_clk_postmux_nb_data
{
937 struct notifier_block nb
;
939 struct clk_hw
*cpu_clk_dyn
;
940 struct clk_hw
*cpu_clk_postmux0
;
941 struct clk_hw
*cpu_clk_postmux1
;
942 struct clk_hw
*cpu_clk_premux1
;
945 static int g12a_cpu_clk_postmux_notifier_cb(struct notifier_block
*nb
,
946 unsigned long event
, void *data
)
948 struct g12a_cpu_clk_postmux_nb_data
*nb_data
=
949 container_of(nb
, struct g12a_cpu_clk_postmux_nb_data
, nb
);
952 case PRE_RATE_CHANGE
:
954 * This notifier means cpu_clk_postmux0 clock will be changed
955 * to feed cpu_clk, this is the current path :
958 * \- cpu_clk_postmux0
959 * \- cpu_clk_muxX_div
961 * \- fclk_div3 or fclk_div2
964 * \- fclk_div3 or fclk_div2
967 /* Setup cpu_clk_premux1 to xtal */
968 clk_hw_set_parent(nb_data
->cpu_clk_premux1
,
971 /* Setup cpu_clk_postmux1 to bypass divider */
972 clk_hw_set_parent(nb_data
->cpu_clk_postmux1
,
973 nb_data
->cpu_clk_premux1
);
975 /* Switch to parking clk on cpu_clk_postmux1 */
976 clk_hw_set_parent(nb_data
->cpu_clk_dyn
,
977 nb_data
->cpu_clk_postmux1
);
980 * Now, cpu_clk is 24MHz in the current path :
983 * \- cpu_clk_postmux1
992 case POST_RATE_CHANGE
:
994 * The cpu_clk_postmux0 has ben updated, now switch back
995 * cpu_clk_dyn to cpu_clk_postmux0 and take the changes
999 /* Configure cpu_clk_dyn back to cpu_clk_postmux0 */
1000 clk_hw_set_parent(nb_data
->cpu_clk_dyn
,
1001 nb_data
->cpu_clk_postmux0
);
1007 * \- cpu_clk_postmux0
1008 * \- cpu_clk_muxX_div
1009 * \- cpu_clk_premux0
1010 * \- fclk_div3 or fclk_div2
1012 * \- cpu_clk_premux0
1013 * \- fclk_div3 or fclk_div2
1025 static struct g12a_cpu_clk_postmux_nb_data g12a_cpu_clk_postmux0_nb_data
= {
1026 .cpu_clk_dyn
= &g12a_cpu_clk_dyn
.hw
,
1027 .cpu_clk_postmux0
= &g12a_cpu_clk_postmux0
.hw
,
1028 .cpu_clk_postmux1
= &g12a_cpu_clk_postmux1
.hw
,
1029 .cpu_clk_premux1
= &g12a_cpu_clk_premux1
.hw
,
1030 .nb
.notifier_call
= g12a_cpu_clk_postmux_notifier_cb
,
1033 static struct g12a_cpu_clk_postmux_nb_data g12b_cpub_clk_postmux0_nb_data
= {
1034 .cpu_clk_dyn
= &g12b_cpub_clk_dyn
.hw
,
1035 .cpu_clk_postmux0
= &g12b_cpub_clk_postmux0
.hw
,
1036 .cpu_clk_postmux1
= &g12b_cpub_clk_postmux1
.hw
,
1037 .cpu_clk_premux1
= &g12b_cpub_clk_premux1
.hw
,
1038 .nb
.notifier_call
= g12a_cpu_clk_postmux_notifier_cb
,
1041 struct g12a_sys_pll_nb_data
{
1042 struct notifier_block nb
;
1043 struct clk_hw
*sys_pll
;
1044 struct clk_hw
*cpu_clk
;
1045 struct clk_hw
*cpu_clk_dyn
;
1048 static int g12a_sys_pll_notifier_cb(struct notifier_block
*nb
,
1049 unsigned long event
, void *data
)
1051 struct g12a_sys_pll_nb_data
*nb_data
=
1052 container_of(nb
, struct g12a_sys_pll_nb_data
, nb
);
1055 case PRE_RATE_CHANGE
:
1057 * This notifier means sys_pll clock will be changed
1058 * to feed cpu_clk, this the current path :
1064 /* Configure cpu_clk to use cpu_clk_dyn */
1065 clk_hw_set_parent(nb_data
->cpu_clk
,
1066 nb_data
->cpu_clk_dyn
);
1069 * Now, cpu_clk uses the dyn path
1073 * \- cpu_clk_dynX_sel
1074 * \- cpu_clk_dynX_div
1075 * \- xtal/fclk_div2/fclk_div3
1076 * \- xtal/fclk_div2/fclk_div3
1083 case POST_RATE_CHANGE
:
1085 * The sys_pll has ben updated, now switch back cpu_clk to
1089 /* Configure cpu_clk to use sys_pll */
1090 clk_hw_set_parent(nb_data
->cpu_clk
,
1108 static struct g12a_sys_pll_nb_data g12a_sys_pll_nb_data
= {
1109 .sys_pll
= &g12a_sys_pll
.hw
,
1110 .cpu_clk
= &g12a_cpu_clk
.hw
,
1111 .cpu_clk_dyn
= &g12a_cpu_clk_dyn
.hw
,
1112 .nb
.notifier_call
= g12a_sys_pll_notifier_cb
,
1115 /* G12B first CPU cluster uses sys1_pll */
1116 static struct g12a_sys_pll_nb_data g12b_cpu_clk_sys1_pll_nb_data
= {
1117 .sys_pll
= &g12b_sys1_pll
.hw
,
1118 .cpu_clk
= &g12b_cpu_clk
.hw
,
1119 .cpu_clk_dyn
= &g12a_cpu_clk_dyn
.hw
,
1120 .nb
.notifier_call
= g12a_sys_pll_notifier_cb
,
1123 /* G12B second CPU cluster uses sys_pll */
1124 static struct g12a_sys_pll_nb_data g12b_cpub_clk_sys_pll_nb_data
= {
1125 .sys_pll
= &g12a_sys_pll
.hw
,
1126 .cpu_clk
= &g12b_cpub_clk
.hw
,
1127 .cpu_clk_dyn
= &g12b_cpub_clk_dyn
.hw
,
1128 .nb
.notifier_call
= g12a_sys_pll_notifier_cb
,
1131 static struct clk_regmap g12a_cpu_clk_div16_en
= {
1132 .data
= &(struct clk_regmap_gate_data
){
1133 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1136 .hw
.init
= &(struct clk_init_data
) {
1137 .name
= "cpu_clk_div16_en",
1138 .ops
= &clk_regmap_gate_ro_ops
,
1139 .parent_hws
= (const struct clk_hw
*[]) {
1144 * This clock is used to debug the cpu_clk range
1145 * Linux should not change it at runtime
1150 static struct clk_regmap g12b_cpub_clk_div16_en
= {
1151 .data
= &(struct clk_regmap_gate_data
){
1152 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1155 .hw
.init
= &(struct clk_init_data
) {
1156 .name
= "cpub_clk_div16_en",
1157 .ops
= &clk_regmap_gate_ro_ops
,
1158 .parent_hws
= (const struct clk_hw
*[]) {
1163 * This clock is used to debug the cpu_clk range
1164 * Linux should not change it at runtime
1169 static struct clk_fixed_factor g12a_cpu_clk_div16
= {
1172 .hw
.init
= &(struct clk_init_data
){
1173 .name
= "cpu_clk_div16",
1174 .ops
= &clk_fixed_factor_ops
,
1175 .parent_hws
= (const struct clk_hw
*[]) {
1176 &g12a_cpu_clk_div16_en
.hw
1182 static struct clk_fixed_factor g12b_cpub_clk_div16
= {
1185 .hw
.init
= &(struct clk_init_data
){
1186 .name
= "cpub_clk_div16",
1187 .ops
= &clk_fixed_factor_ops
,
1188 .parent_hws
= (const struct clk_hw
*[]) {
1189 &g12b_cpub_clk_div16_en
.hw
1195 static struct clk_regmap g12a_cpu_clk_apb_div
= {
1196 .data
= &(struct clk_regmap_div_data
){
1197 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1200 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
1202 .hw
.init
= &(struct clk_init_data
){
1203 .name
= "cpu_clk_apb_div",
1204 .ops
= &clk_regmap_divider_ro_ops
,
1205 .parent_hws
= (const struct clk_hw
*[]) { &g12a_cpu_clk
.hw
},
1210 static struct clk_regmap g12a_cpu_clk_apb
= {
1211 .data
= &(struct clk_regmap_gate_data
){
1212 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1215 .hw
.init
= &(struct clk_init_data
) {
1216 .name
= "cpu_clk_apb",
1217 .ops
= &clk_regmap_gate_ro_ops
,
1218 .parent_hws
= (const struct clk_hw
*[]) {
1219 &g12a_cpu_clk_apb_div
.hw
1223 * This clock is set by the ROM monitor code,
1224 * Linux should not change it at runtime
1229 static struct clk_regmap g12a_cpu_clk_atb_div
= {
1230 .data
= &(struct clk_regmap_div_data
){
1231 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1234 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
1236 .hw
.init
= &(struct clk_init_data
){
1237 .name
= "cpu_clk_atb_div",
1238 .ops
= &clk_regmap_divider_ro_ops
,
1239 .parent_hws
= (const struct clk_hw
*[]) { &g12a_cpu_clk
.hw
},
1244 static struct clk_regmap g12a_cpu_clk_atb
= {
1245 .data
= &(struct clk_regmap_gate_data
){
1246 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1249 .hw
.init
= &(struct clk_init_data
) {
1250 .name
= "cpu_clk_atb",
1251 .ops
= &clk_regmap_gate_ro_ops
,
1252 .parent_hws
= (const struct clk_hw
*[]) {
1253 &g12a_cpu_clk_atb_div
.hw
1257 * This clock is set by the ROM monitor code,
1258 * Linux should not change it at runtime
1263 static struct clk_regmap g12a_cpu_clk_axi_div
= {
1264 .data
= &(struct clk_regmap_div_data
){
1265 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1268 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
1270 .hw
.init
= &(struct clk_init_data
){
1271 .name
= "cpu_clk_axi_div",
1272 .ops
= &clk_regmap_divider_ro_ops
,
1273 .parent_hws
= (const struct clk_hw
*[]) { &g12a_cpu_clk
.hw
},
1278 static struct clk_regmap g12a_cpu_clk_axi
= {
1279 .data
= &(struct clk_regmap_gate_data
){
1280 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1283 .hw
.init
= &(struct clk_init_data
) {
1284 .name
= "cpu_clk_axi",
1285 .ops
= &clk_regmap_gate_ro_ops
,
1286 .parent_hws
= (const struct clk_hw
*[]) {
1287 &g12a_cpu_clk_axi_div
.hw
1291 * This clock is set by the ROM monitor code,
1292 * Linux should not change it at runtime
1297 static struct clk_regmap g12a_cpu_clk_trace_div
= {
1298 .data
= &(struct clk_regmap_div_data
){
1299 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1302 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
1304 .hw
.init
= &(struct clk_init_data
){
1305 .name
= "cpu_clk_trace_div",
1306 .ops
= &clk_regmap_divider_ro_ops
,
1307 .parent_data
= &(const struct clk_parent_data
) {
1310 * G12A and G12B have different cpu_clks (with
1311 * different struct clk_hw). We fallback to the global
1312 * naming string mechanism so cpu_clk_trace_div picks
1313 * up the appropriate one.
1322 static struct clk_regmap g12a_cpu_clk_trace
= {
1323 .data
= &(struct clk_regmap_gate_data
){
1324 .offset
= HHI_SYS_CPU_CLK_CNTL1
,
1327 .hw
.init
= &(struct clk_init_data
) {
1328 .name
= "cpu_clk_trace",
1329 .ops
= &clk_regmap_gate_ro_ops
,
1330 .parent_hws
= (const struct clk_hw
*[]) {
1331 &g12a_cpu_clk_trace_div
.hw
1335 * This clock is set by the ROM monitor code,
1336 * Linux should not change it at runtime
1341 static struct clk_fixed_factor g12b_cpub_clk_div2
= {
1344 .hw
.init
= &(struct clk_init_data
){
1345 .name
= "cpub_clk_div2",
1346 .ops
= &clk_fixed_factor_ops
,
1347 .parent_hws
= (const struct clk_hw
*[]) {
1354 static struct clk_fixed_factor g12b_cpub_clk_div3
= {
1357 .hw
.init
= &(struct clk_init_data
){
1358 .name
= "cpub_clk_div3",
1359 .ops
= &clk_fixed_factor_ops
,
1360 .parent_hws
= (const struct clk_hw
*[]) {
1367 static struct clk_fixed_factor g12b_cpub_clk_div4
= {
1370 .hw
.init
= &(struct clk_init_data
){
1371 .name
= "cpub_clk_div4",
1372 .ops
= &clk_fixed_factor_ops
,
1373 .parent_hws
= (const struct clk_hw
*[]) {
1380 static struct clk_fixed_factor g12b_cpub_clk_div5
= {
1383 .hw
.init
= &(struct clk_init_data
){
1384 .name
= "cpub_clk_div5",
1385 .ops
= &clk_fixed_factor_ops
,
1386 .parent_hws
= (const struct clk_hw
*[]) {
1393 static struct clk_fixed_factor g12b_cpub_clk_div6
= {
1396 .hw
.init
= &(struct clk_init_data
){
1397 .name
= "cpub_clk_div6",
1398 .ops
= &clk_fixed_factor_ops
,
1399 .parent_hws
= (const struct clk_hw
*[]) {
1406 static struct clk_fixed_factor g12b_cpub_clk_div7
= {
1409 .hw
.init
= &(struct clk_init_data
){
1410 .name
= "cpub_clk_div7",
1411 .ops
= &clk_fixed_factor_ops
,
1412 .parent_hws
= (const struct clk_hw
*[]) {
1419 static struct clk_fixed_factor g12b_cpub_clk_div8
= {
1422 .hw
.init
= &(struct clk_init_data
){
1423 .name
= "cpub_clk_div8",
1424 .ops
= &clk_fixed_factor_ops
,
1425 .parent_hws
= (const struct clk_hw
*[]) {
1432 static u32 mux_table_cpub
[] = { 1, 2, 3, 4, 5, 6, 7 };
1433 static struct clk_regmap g12b_cpub_clk_apb_sel
= {
1434 .data
= &(struct clk_regmap_mux_data
){
1435 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1438 .table
= mux_table_cpub
,
1440 .hw
.init
= &(struct clk_init_data
){
1441 .name
= "cpub_clk_apb_sel",
1442 .ops
= &clk_regmap_mux_ro_ops
,
1443 .parent_hws
= (const struct clk_hw
*[]) {
1444 &g12b_cpub_clk_div2
.hw
,
1445 &g12b_cpub_clk_div3
.hw
,
1446 &g12b_cpub_clk_div4
.hw
,
1447 &g12b_cpub_clk_div5
.hw
,
1448 &g12b_cpub_clk_div6
.hw
,
1449 &g12b_cpub_clk_div7
.hw
,
1450 &g12b_cpub_clk_div8
.hw
1456 static struct clk_regmap g12b_cpub_clk_apb
= {
1457 .data
= &(struct clk_regmap_gate_data
){
1458 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1460 .flags
= CLK_GATE_SET_TO_DISABLE
,
1462 .hw
.init
= &(struct clk_init_data
) {
1463 .name
= "cpub_clk_apb",
1464 .ops
= &clk_regmap_gate_ro_ops
,
1465 .parent_hws
= (const struct clk_hw
*[]) {
1466 &g12b_cpub_clk_apb_sel
.hw
1470 * This clock is set by the ROM monitor code,
1471 * Linux should not change it at runtime
1476 static struct clk_regmap g12b_cpub_clk_atb_sel
= {
1477 .data
= &(struct clk_regmap_mux_data
){
1478 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1481 .table
= mux_table_cpub
,
1483 .hw
.init
= &(struct clk_init_data
){
1484 .name
= "cpub_clk_atb_sel",
1485 .ops
= &clk_regmap_mux_ro_ops
,
1486 .parent_hws
= (const struct clk_hw
*[]) {
1487 &g12b_cpub_clk_div2
.hw
,
1488 &g12b_cpub_clk_div3
.hw
,
1489 &g12b_cpub_clk_div4
.hw
,
1490 &g12b_cpub_clk_div5
.hw
,
1491 &g12b_cpub_clk_div6
.hw
,
1492 &g12b_cpub_clk_div7
.hw
,
1493 &g12b_cpub_clk_div8
.hw
1499 static struct clk_regmap g12b_cpub_clk_atb
= {
1500 .data
= &(struct clk_regmap_gate_data
){
1501 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1503 .flags
= CLK_GATE_SET_TO_DISABLE
,
1505 .hw
.init
= &(struct clk_init_data
) {
1506 .name
= "cpub_clk_atb",
1507 .ops
= &clk_regmap_gate_ro_ops
,
1508 .parent_hws
= (const struct clk_hw
*[]) {
1509 &g12b_cpub_clk_atb_sel
.hw
1513 * This clock is set by the ROM monitor code,
1514 * Linux should not change it at runtime
1519 static struct clk_regmap g12b_cpub_clk_axi_sel
= {
1520 .data
= &(struct clk_regmap_mux_data
){
1521 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1524 .table
= mux_table_cpub
,
1526 .hw
.init
= &(struct clk_init_data
){
1527 .name
= "cpub_clk_axi_sel",
1528 .ops
= &clk_regmap_mux_ro_ops
,
1529 .parent_hws
= (const struct clk_hw
*[]) {
1530 &g12b_cpub_clk_div2
.hw
,
1531 &g12b_cpub_clk_div3
.hw
,
1532 &g12b_cpub_clk_div4
.hw
,
1533 &g12b_cpub_clk_div5
.hw
,
1534 &g12b_cpub_clk_div6
.hw
,
1535 &g12b_cpub_clk_div7
.hw
,
1536 &g12b_cpub_clk_div8
.hw
1542 static struct clk_regmap g12b_cpub_clk_axi
= {
1543 .data
= &(struct clk_regmap_gate_data
){
1544 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1546 .flags
= CLK_GATE_SET_TO_DISABLE
,
1548 .hw
.init
= &(struct clk_init_data
) {
1549 .name
= "cpub_clk_axi",
1550 .ops
= &clk_regmap_gate_ro_ops
,
1551 .parent_hws
= (const struct clk_hw
*[]) {
1552 &g12b_cpub_clk_axi_sel
.hw
1556 * This clock is set by the ROM monitor code,
1557 * Linux should not change it at runtime
1562 static struct clk_regmap g12b_cpub_clk_trace_sel
= {
1563 .data
= &(struct clk_regmap_mux_data
){
1564 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1567 .table
= mux_table_cpub
,
1569 .hw
.init
= &(struct clk_init_data
){
1570 .name
= "cpub_clk_trace_sel",
1571 .ops
= &clk_regmap_mux_ro_ops
,
1572 .parent_hws
= (const struct clk_hw
*[]) {
1573 &g12b_cpub_clk_div2
.hw
,
1574 &g12b_cpub_clk_div3
.hw
,
1575 &g12b_cpub_clk_div4
.hw
,
1576 &g12b_cpub_clk_div5
.hw
,
1577 &g12b_cpub_clk_div6
.hw
,
1578 &g12b_cpub_clk_div7
.hw
,
1579 &g12b_cpub_clk_div8
.hw
1585 static struct clk_regmap g12b_cpub_clk_trace
= {
1586 .data
= &(struct clk_regmap_gate_data
){
1587 .offset
= HHI_SYS_CPUB_CLK_CNTL1
,
1589 .flags
= CLK_GATE_SET_TO_DISABLE
,
1591 .hw
.init
= &(struct clk_init_data
) {
1592 .name
= "cpub_clk_trace",
1593 .ops
= &clk_regmap_gate_ro_ops
,
1594 .parent_hws
= (const struct clk_hw
*[]) {
1595 &g12b_cpub_clk_trace_sel
.hw
1599 * This clock is set by the ROM monitor code,
1600 * Linux should not change it at runtime
1605 static const struct pll_mult_range g12a_gp0_pll_mult_range
= {
1611 * Internal gp0 pll emulation configuration parameters
1613 static const struct reg_sequence g12a_gp0_init_regs
[] = {
1614 { .reg
= HHI_GP0_PLL_CNTL1
, .def
= 0x00000000 },
1615 { .reg
= HHI_GP0_PLL_CNTL2
, .def
= 0x00000000 },
1616 { .reg
= HHI_GP0_PLL_CNTL3
, .def
= 0x48681c00 },
1617 { .reg
= HHI_GP0_PLL_CNTL4
, .def
= 0x33771290 },
1618 { .reg
= HHI_GP0_PLL_CNTL5
, .def
= 0x39272000 },
1619 { .reg
= HHI_GP0_PLL_CNTL6
, .def
= 0x56540000 },
1622 static struct clk_regmap g12a_gp0_pll_dco
= {
1623 .data
= &(struct meson_clk_pll_data
){
1625 .reg_off
= HHI_GP0_PLL_CNTL0
,
1630 .reg_off
= HHI_GP0_PLL_CNTL0
,
1635 .reg_off
= HHI_GP0_PLL_CNTL0
,
1640 .reg_off
= HHI_GP0_PLL_CNTL1
,
1645 .reg_off
= HHI_GP0_PLL_CNTL0
,
1650 .reg_off
= HHI_GP0_PLL_CNTL0
,
1654 .range
= &g12a_gp0_pll_mult_range
,
1655 .init_regs
= g12a_gp0_init_regs
,
1656 .init_count
= ARRAY_SIZE(g12a_gp0_init_regs
),
1658 .hw
.init
= &(struct clk_init_data
){
1659 .name
= "gp0_pll_dco",
1660 .ops
= &meson_clk_pll_ops
,
1661 .parent_data
= &(const struct clk_parent_data
) {
1668 static struct clk_regmap g12a_gp0_pll
= {
1669 .data
= &(struct clk_regmap_div_data
){
1670 .offset
= HHI_GP0_PLL_CNTL0
,
1673 .flags
= (CLK_DIVIDER_POWER_OF_TWO
|
1674 CLK_DIVIDER_ROUND_CLOSEST
),
1676 .hw
.init
= &(struct clk_init_data
){
1678 .ops
= &clk_regmap_divider_ops
,
1679 .parent_hws
= (const struct clk_hw
*[]) {
1680 &g12a_gp0_pll_dco
.hw
1683 .flags
= CLK_SET_RATE_PARENT
,
1687 static struct clk_regmap sm1_gp1_pll_dco
= {
1688 .data
= &(struct meson_clk_pll_data
){
1690 .reg_off
= HHI_GP1_PLL_CNTL0
,
1695 .reg_off
= HHI_GP1_PLL_CNTL0
,
1700 .reg_off
= HHI_GP1_PLL_CNTL0
,
1705 .reg_off
= HHI_GP1_PLL_CNTL1
,
1710 .reg_off
= HHI_GP1_PLL_CNTL0
,
1715 .reg_off
= HHI_GP1_PLL_CNTL0
,
1720 .hw
.init
= &(struct clk_init_data
){
1721 .name
= "gp1_pll_dco",
1722 .ops
= &meson_clk_pll_ro_ops
,
1723 .parent_data
= &(const struct clk_parent_data
) {
1727 /* This clock feeds the DSU, avoid disabling it */
1728 .flags
= CLK_IS_CRITICAL
,
1732 static struct clk_regmap sm1_gp1_pll
= {
1733 .data
= &(struct clk_regmap_div_data
){
1734 .offset
= HHI_GP1_PLL_CNTL0
,
1737 .flags
= (CLK_DIVIDER_POWER_OF_TWO
|
1738 CLK_DIVIDER_ROUND_CLOSEST
),
1740 .hw
.init
= &(struct clk_init_data
){
1742 .ops
= &clk_regmap_divider_ro_ops
,
1743 .parent_hws
= (const struct clk_hw
*[]) {
1751 * Internal hifi pll emulation configuration parameters
1753 static const struct reg_sequence g12a_hifi_init_regs
[] = {
1754 { .reg
= HHI_HIFI_PLL_CNTL1
, .def
= 0x00000000 },
1755 { .reg
= HHI_HIFI_PLL_CNTL2
, .def
= 0x00000000 },
1756 { .reg
= HHI_HIFI_PLL_CNTL3
, .def
= 0x6a285c00 },
1757 { .reg
= HHI_HIFI_PLL_CNTL4
, .def
= 0x65771290 },
1758 { .reg
= HHI_HIFI_PLL_CNTL5
, .def
= 0x39272000 },
1759 { .reg
= HHI_HIFI_PLL_CNTL6
, .def
= 0x56540000 },
1762 static struct clk_regmap g12a_hifi_pll_dco
= {
1763 .data
= &(struct meson_clk_pll_data
){
1765 .reg_off
= HHI_HIFI_PLL_CNTL0
,
1770 .reg_off
= HHI_HIFI_PLL_CNTL0
,
1775 .reg_off
= HHI_HIFI_PLL_CNTL0
,
1780 .reg_off
= HHI_HIFI_PLL_CNTL1
,
1785 .reg_off
= HHI_HIFI_PLL_CNTL0
,
1790 .reg_off
= HHI_HIFI_PLL_CNTL0
,
1794 .range
= &g12a_gp0_pll_mult_range
,
1795 .init_regs
= g12a_hifi_init_regs
,
1796 .init_count
= ARRAY_SIZE(g12a_hifi_init_regs
),
1797 .flags
= CLK_MESON_PLL_ROUND_CLOSEST
,
1799 .hw
.init
= &(struct clk_init_data
){
1800 .name
= "hifi_pll_dco",
1801 .ops
= &meson_clk_pll_ops
,
1802 .parent_data
= &(const struct clk_parent_data
) {
1809 static struct clk_regmap g12a_hifi_pll
= {
1810 .data
= &(struct clk_regmap_div_data
){
1811 .offset
= HHI_HIFI_PLL_CNTL0
,
1814 .flags
= (CLK_DIVIDER_POWER_OF_TWO
|
1815 CLK_DIVIDER_ROUND_CLOSEST
),
1817 .hw
.init
= &(struct clk_init_data
){
1819 .ops
= &clk_regmap_divider_ops
,
1820 .parent_hws
= (const struct clk_hw
*[]) {
1821 &g12a_hifi_pll_dco
.hw
1824 .flags
= CLK_SET_RATE_PARENT
,
1829 * The Meson G12A PCIE PLL is fined tuned to deliver a very precise
1830 * 100MHz reference clock for the PCIe Analog PHY, and thus requires
1831 * a strict register sequence to enable the PLL.
1833 static const struct reg_sequence g12a_pcie_pll_init_regs
[] = {
1834 { .reg
= HHI_PCIE_PLL_CNTL0
, .def
= 0x20090496 },
1835 { .reg
= HHI_PCIE_PLL_CNTL0
, .def
= 0x30090496 },
1836 { .reg
= HHI_PCIE_PLL_CNTL1
, .def
= 0x00000000 },
1837 { .reg
= HHI_PCIE_PLL_CNTL2
, .def
= 0x00001100 },
1838 { .reg
= HHI_PCIE_PLL_CNTL3
, .def
= 0x10058e00 },
1839 { .reg
= HHI_PCIE_PLL_CNTL4
, .def
= 0x000100c0 },
1840 { .reg
= HHI_PCIE_PLL_CNTL5
, .def
= 0x68000048 },
1841 { .reg
= HHI_PCIE_PLL_CNTL5
, .def
= 0x68000068, .delay_us
= 20 },
1842 { .reg
= HHI_PCIE_PLL_CNTL4
, .def
= 0x008100c0, .delay_us
= 10 },
1843 { .reg
= HHI_PCIE_PLL_CNTL0
, .def
= 0x34090496 },
1844 { .reg
= HHI_PCIE_PLL_CNTL0
, .def
= 0x14090496, .delay_us
= 10 },
1845 { .reg
= HHI_PCIE_PLL_CNTL2
, .def
= 0x00001000 },
1848 /* Keep a single entry table for recalc/round_rate() ops */
1849 static const struct pll_params_table g12a_pcie_pll_table
[] = {
1854 static struct clk_regmap g12a_pcie_pll_dco
= {
1855 .data
= &(struct meson_clk_pll_data
){
1857 .reg_off
= HHI_PCIE_PLL_CNTL0
,
1862 .reg_off
= HHI_PCIE_PLL_CNTL0
,
1867 .reg_off
= HHI_PCIE_PLL_CNTL0
,
1872 .reg_off
= HHI_PCIE_PLL_CNTL1
,
1877 .reg_off
= HHI_PCIE_PLL_CNTL0
,
1882 .reg_off
= HHI_PCIE_PLL_CNTL0
,
1886 .table
= g12a_pcie_pll_table
,
1887 .init_regs
= g12a_pcie_pll_init_regs
,
1888 .init_count
= ARRAY_SIZE(g12a_pcie_pll_init_regs
),
1890 .hw
.init
= &(struct clk_init_data
){
1891 .name
= "pcie_pll_dco",
1892 .ops
= &meson_clk_pcie_pll_ops
,
1893 .parent_data
= &(const struct clk_parent_data
) {
1900 static struct clk_fixed_factor g12a_pcie_pll_dco_div2
= {
1903 .hw
.init
= &(struct clk_init_data
){
1904 .name
= "pcie_pll_dco_div2",
1905 .ops
= &clk_fixed_factor_ops
,
1906 .parent_hws
= (const struct clk_hw
*[]) {
1907 &g12a_pcie_pll_dco
.hw
1910 .flags
= CLK_SET_RATE_PARENT
,
1914 static struct clk_regmap g12a_pcie_pll_od
= {
1915 .data
= &(struct clk_regmap_div_data
){
1916 .offset
= HHI_PCIE_PLL_CNTL0
,
1919 .flags
= CLK_DIVIDER_ROUND_CLOSEST
|
1920 CLK_DIVIDER_ONE_BASED
|
1921 CLK_DIVIDER_ALLOW_ZERO
,
1923 .hw
.init
= &(struct clk_init_data
){
1924 .name
= "pcie_pll_od",
1925 .ops
= &clk_regmap_divider_ops
,
1926 .parent_hws
= (const struct clk_hw
*[]) {
1927 &g12a_pcie_pll_dco_div2
.hw
1930 .flags
= CLK_SET_RATE_PARENT
,
1934 static struct clk_fixed_factor g12a_pcie_pll
= {
1937 .hw
.init
= &(struct clk_init_data
){
1938 .name
= "pcie_pll_pll",
1939 .ops
= &clk_fixed_factor_ops
,
1940 .parent_hws
= (const struct clk_hw
*[]) {
1941 &g12a_pcie_pll_od
.hw
1944 .flags
= CLK_SET_RATE_PARENT
,
1948 static struct clk_regmap g12a_hdmi_pll_dco
= {
1949 .data
= &(struct meson_clk_pll_data
){
1951 .reg_off
= HHI_HDMI_PLL_CNTL0
,
1956 .reg_off
= HHI_HDMI_PLL_CNTL0
,
1961 .reg_off
= HHI_HDMI_PLL_CNTL0
,
1966 .reg_off
= HHI_HDMI_PLL_CNTL1
,
1971 .reg_off
= HHI_HDMI_PLL_CNTL0
,
1976 .reg_off
= HHI_HDMI_PLL_CNTL0
,
1981 .hw
.init
= &(struct clk_init_data
){
1982 .name
= "hdmi_pll_dco",
1983 .ops
= &meson_clk_pll_ro_ops
,
1984 .parent_data
= &(const struct clk_parent_data
) {
1989 * Display directly handle hdmi pll registers ATM, we need
1990 * NOCACHE to keep our view of the clock as accurate as possible
1992 .flags
= CLK_GET_RATE_NOCACHE
,
1996 static struct clk_regmap g12a_hdmi_pll_od
= {
1997 .data
= &(struct clk_regmap_div_data
){
1998 .offset
= HHI_HDMI_PLL_CNTL0
,
2001 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
2003 .hw
.init
= &(struct clk_init_data
){
2004 .name
= "hdmi_pll_od",
2005 .ops
= &clk_regmap_divider_ro_ops
,
2006 .parent_hws
= (const struct clk_hw
*[]) {
2007 &g12a_hdmi_pll_dco
.hw
2010 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
2014 static struct clk_regmap g12a_hdmi_pll_od2
= {
2015 .data
= &(struct clk_regmap_div_data
){
2016 .offset
= HHI_HDMI_PLL_CNTL0
,
2019 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
2021 .hw
.init
= &(struct clk_init_data
){
2022 .name
= "hdmi_pll_od2",
2023 .ops
= &clk_regmap_divider_ro_ops
,
2024 .parent_hws
= (const struct clk_hw
*[]) {
2025 &g12a_hdmi_pll_od
.hw
2028 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
2032 static struct clk_regmap g12a_hdmi_pll
= {
2033 .data
= &(struct clk_regmap_div_data
){
2034 .offset
= HHI_HDMI_PLL_CNTL0
,
2037 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
2039 .hw
.init
= &(struct clk_init_data
){
2041 .ops
= &clk_regmap_divider_ro_ops
,
2042 .parent_hws
= (const struct clk_hw
*[]) {
2043 &g12a_hdmi_pll_od2
.hw
2046 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
2050 static struct clk_fixed_factor g12a_fclk_div4_div
= {
2053 .hw
.init
= &(struct clk_init_data
){
2054 .name
= "fclk_div4_div",
2055 .ops
= &clk_fixed_factor_ops
,
2056 .parent_hws
= (const struct clk_hw
*[]) { &g12a_fixed_pll
.hw
},
2061 static struct clk_regmap g12a_fclk_div4
= {
2062 .data
= &(struct clk_regmap_gate_data
){
2063 .offset
= HHI_FIX_PLL_CNTL1
,
2066 .hw
.init
= &(struct clk_init_data
){
2067 .name
= "fclk_div4",
2068 .ops
= &clk_regmap_gate_ops
,
2069 .parent_hws
= (const struct clk_hw
*[]) {
2070 &g12a_fclk_div4_div
.hw
2076 static struct clk_fixed_factor g12a_fclk_div5_div
= {
2079 .hw
.init
= &(struct clk_init_data
){
2080 .name
= "fclk_div5_div",
2081 .ops
= &clk_fixed_factor_ops
,
2082 .parent_hws
= (const struct clk_hw
*[]) { &g12a_fixed_pll
.hw
},
2087 static struct clk_regmap g12a_fclk_div5
= {
2088 .data
= &(struct clk_regmap_gate_data
){
2089 .offset
= HHI_FIX_PLL_CNTL1
,
2092 .hw
.init
= &(struct clk_init_data
){
2093 .name
= "fclk_div5",
2094 .ops
= &clk_regmap_gate_ops
,
2095 .parent_hws
= (const struct clk_hw
*[]) {
2096 &g12a_fclk_div5_div
.hw
2102 static struct clk_fixed_factor g12a_fclk_div7_div
= {
2105 .hw
.init
= &(struct clk_init_data
){
2106 .name
= "fclk_div7_div",
2107 .ops
= &clk_fixed_factor_ops
,
2108 .parent_hws
= (const struct clk_hw
*[]) { &g12a_fixed_pll
.hw
},
2113 static struct clk_regmap g12a_fclk_div7
= {
2114 .data
= &(struct clk_regmap_gate_data
){
2115 .offset
= HHI_FIX_PLL_CNTL1
,
2118 .hw
.init
= &(struct clk_init_data
){
2119 .name
= "fclk_div7",
2120 .ops
= &clk_regmap_gate_ops
,
2121 .parent_hws
= (const struct clk_hw
*[]) {
2122 &g12a_fclk_div7_div
.hw
2128 static struct clk_fixed_factor g12a_fclk_div2p5_div
= {
2131 .hw
.init
= &(struct clk_init_data
){
2132 .name
= "fclk_div2p5_div",
2133 .ops
= &clk_fixed_factor_ops
,
2134 .parent_hws
= (const struct clk_hw
*[]) {
2135 &g12a_fixed_pll_dco
.hw
2141 static struct clk_regmap g12a_fclk_div2p5
= {
2142 .data
= &(struct clk_regmap_gate_data
){
2143 .offset
= HHI_FIX_PLL_CNTL1
,
2146 .hw
.init
= &(struct clk_init_data
){
2147 .name
= "fclk_div2p5",
2148 .ops
= &clk_regmap_gate_ops
,
2149 .parent_hws
= (const struct clk_hw
*[]) {
2150 &g12a_fclk_div2p5_div
.hw
2156 static struct clk_fixed_factor g12a_mpll_50m_div
= {
2159 .hw
.init
= &(struct clk_init_data
){
2160 .name
= "mpll_50m_div",
2161 .ops
= &clk_fixed_factor_ops
,
2162 .parent_hws
= (const struct clk_hw
*[]) {
2163 &g12a_fixed_pll_dco
.hw
2169 static struct clk_regmap g12a_mpll_50m
= {
2170 .data
= &(struct clk_regmap_mux_data
){
2171 .offset
= HHI_FIX_PLL_CNTL3
,
2175 .hw
.init
= &(struct clk_init_data
){
2177 .ops
= &clk_regmap_mux_ro_ops
,
2178 .parent_data
= (const struct clk_parent_data
[]) {
2179 { .fw_name
= "xtal", },
2180 { .hw
= &g12a_mpll_50m_div
.hw
},
2186 static struct clk_fixed_factor g12a_mpll_prediv
= {
2189 .hw
.init
= &(struct clk_init_data
){
2190 .name
= "mpll_prediv",
2191 .ops
= &clk_fixed_factor_ops
,
2192 .parent_hws
= (const struct clk_hw
*[]) {
2193 &g12a_fixed_pll_dco
.hw
2199 static const struct reg_sequence g12a_mpll0_init_regs
[] = {
2200 { .reg
= HHI_MPLL_CNTL2
, .def
= 0x40000033 },
2203 static struct clk_regmap g12a_mpll0_div
= {
2204 .data
= &(struct meson_clk_mpll_data
){
2206 .reg_off
= HHI_MPLL_CNTL1
,
2211 .reg_off
= HHI_MPLL_CNTL1
,
2216 .reg_off
= HHI_MPLL_CNTL1
,
2221 .reg_off
= HHI_MPLL_CNTL1
,
2225 .lock
= &meson_clk_lock
,
2226 .init_regs
= g12a_mpll0_init_regs
,
2227 .init_count
= ARRAY_SIZE(g12a_mpll0_init_regs
),
2229 .hw
.init
= &(struct clk_init_data
){
2230 .name
= "mpll0_div",
2231 .ops
= &meson_clk_mpll_ops
,
2232 .parent_hws
= (const struct clk_hw
*[]) {
2233 &g12a_mpll_prediv
.hw
2239 static struct clk_regmap g12a_mpll0
= {
2240 .data
= &(struct clk_regmap_gate_data
){
2241 .offset
= HHI_MPLL_CNTL1
,
2244 .hw
.init
= &(struct clk_init_data
){
2246 .ops
= &clk_regmap_gate_ops
,
2247 .parent_hws
= (const struct clk_hw
*[]) { &g12a_mpll0_div
.hw
},
2249 .flags
= CLK_SET_RATE_PARENT
,
2253 static const struct reg_sequence g12a_mpll1_init_regs
[] = {
2254 { .reg
= HHI_MPLL_CNTL4
, .def
= 0x40000033 },
2257 static struct clk_regmap g12a_mpll1_div
= {
2258 .data
= &(struct meson_clk_mpll_data
){
2260 .reg_off
= HHI_MPLL_CNTL3
,
2265 .reg_off
= HHI_MPLL_CNTL3
,
2270 .reg_off
= HHI_MPLL_CNTL3
,
2275 .reg_off
= HHI_MPLL_CNTL3
,
2279 .lock
= &meson_clk_lock
,
2280 .init_regs
= g12a_mpll1_init_regs
,
2281 .init_count
= ARRAY_SIZE(g12a_mpll1_init_regs
),
2283 .hw
.init
= &(struct clk_init_data
){
2284 .name
= "mpll1_div",
2285 .ops
= &meson_clk_mpll_ops
,
2286 .parent_hws
= (const struct clk_hw
*[]) {
2287 &g12a_mpll_prediv
.hw
2293 static struct clk_regmap g12a_mpll1
= {
2294 .data
= &(struct clk_regmap_gate_data
){
2295 .offset
= HHI_MPLL_CNTL3
,
2298 .hw
.init
= &(struct clk_init_data
){
2300 .ops
= &clk_regmap_gate_ops
,
2301 .parent_hws
= (const struct clk_hw
*[]) { &g12a_mpll1_div
.hw
},
2303 .flags
= CLK_SET_RATE_PARENT
,
2307 static const struct reg_sequence g12a_mpll2_init_regs
[] = {
2308 { .reg
= HHI_MPLL_CNTL6
, .def
= 0x40000033 },
2311 static struct clk_regmap g12a_mpll2_div
= {
2312 .data
= &(struct meson_clk_mpll_data
){
2314 .reg_off
= HHI_MPLL_CNTL5
,
2319 .reg_off
= HHI_MPLL_CNTL5
,
2324 .reg_off
= HHI_MPLL_CNTL5
,
2329 .reg_off
= HHI_MPLL_CNTL5
,
2333 .lock
= &meson_clk_lock
,
2334 .init_regs
= g12a_mpll2_init_regs
,
2335 .init_count
= ARRAY_SIZE(g12a_mpll2_init_regs
),
2337 .hw
.init
= &(struct clk_init_data
){
2338 .name
= "mpll2_div",
2339 .ops
= &meson_clk_mpll_ops
,
2340 .parent_hws
= (const struct clk_hw
*[]) {
2341 &g12a_mpll_prediv
.hw
2347 static struct clk_regmap g12a_mpll2
= {
2348 .data
= &(struct clk_regmap_gate_data
){
2349 .offset
= HHI_MPLL_CNTL5
,
2352 .hw
.init
= &(struct clk_init_data
){
2354 .ops
= &clk_regmap_gate_ops
,
2355 .parent_hws
= (const struct clk_hw
*[]) { &g12a_mpll2_div
.hw
},
2357 .flags
= CLK_SET_RATE_PARENT
,
2361 static const struct reg_sequence g12a_mpll3_init_regs
[] = {
2362 { .reg
= HHI_MPLL_CNTL8
, .def
= 0x40000033 },
2365 static struct clk_regmap g12a_mpll3_div
= {
2366 .data
= &(struct meson_clk_mpll_data
){
2368 .reg_off
= HHI_MPLL_CNTL7
,
2373 .reg_off
= HHI_MPLL_CNTL7
,
2378 .reg_off
= HHI_MPLL_CNTL7
,
2383 .reg_off
= HHI_MPLL_CNTL7
,
2387 .lock
= &meson_clk_lock
,
2388 .init_regs
= g12a_mpll3_init_regs
,
2389 .init_count
= ARRAY_SIZE(g12a_mpll3_init_regs
),
2391 .hw
.init
= &(struct clk_init_data
){
2392 .name
= "mpll3_div",
2393 .ops
= &meson_clk_mpll_ops
,
2394 .parent_hws
= (const struct clk_hw
*[]) {
2395 &g12a_mpll_prediv
.hw
2401 static struct clk_regmap g12a_mpll3
= {
2402 .data
= &(struct clk_regmap_gate_data
){
2403 .offset
= HHI_MPLL_CNTL7
,
2406 .hw
.init
= &(struct clk_init_data
){
2408 .ops
= &clk_regmap_gate_ops
,
2409 .parent_hws
= (const struct clk_hw
*[]) { &g12a_mpll3_div
.hw
},
2411 .flags
= CLK_SET_RATE_PARENT
,
2415 static u32 mux_table_clk81
[] = { 0, 2, 3, 4, 5, 6, 7 };
2416 static const struct clk_parent_data clk81_parent_data
[] = {
2417 { .fw_name
= "xtal", },
2418 { .hw
= &g12a_fclk_div7
.hw
},
2419 { .hw
= &g12a_mpll1
.hw
},
2420 { .hw
= &g12a_mpll2
.hw
},
2421 { .hw
= &g12a_fclk_div4
.hw
},
2422 { .hw
= &g12a_fclk_div3
.hw
},
2423 { .hw
= &g12a_fclk_div5
.hw
},
2426 static struct clk_regmap g12a_mpeg_clk_sel
= {
2427 .data
= &(struct clk_regmap_mux_data
){
2428 .offset
= HHI_MPEG_CLK_CNTL
,
2431 .table
= mux_table_clk81
,
2433 .hw
.init
= &(struct clk_init_data
){
2434 .name
= "mpeg_clk_sel",
2435 .ops
= &clk_regmap_mux_ro_ops
,
2436 .parent_data
= clk81_parent_data
,
2437 .num_parents
= ARRAY_SIZE(clk81_parent_data
),
2441 static struct clk_regmap g12a_mpeg_clk_div
= {
2442 .data
= &(struct clk_regmap_div_data
){
2443 .offset
= HHI_MPEG_CLK_CNTL
,
2447 .hw
.init
= &(struct clk_init_data
){
2448 .name
= "mpeg_clk_div",
2449 .ops
= &clk_regmap_divider_ops
,
2450 .parent_hws
= (const struct clk_hw
*[]) {
2451 &g12a_mpeg_clk_sel
.hw
2454 .flags
= CLK_SET_RATE_PARENT
,
2458 static struct clk_regmap g12a_clk81
= {
2459 .data
= &(struct clk_regmap_gate_data
){
2460 .offset
= HHI_MPEG_CLK_CNTL
,
2463 .hw
.init
= &(struct clk_init_data
){
2465 .ops
= &clk_regmap_gate_ops
,
2466 .parent_hws
= (const struct clk_hw
*[]) {
2467 &g12a_mpeg_clk_div
.hw
2470 .flags
= (CLK_SET_RATE_PARENT
| CLK_IS_CRITICAL
),
2474 static const struct clk_parent_data g12a_sd_emmc_clk0_parent_data
[] = {
2475 { .fw_name
= "xtal", },
2476 { .hw
= &g12a_fclk_div2
.hw
},
2477 { .hw
= &g12a_fclk_div3
.hw
},
2478 { .hw
= &g12a_fclk_div5
.hw
},
2479 { .hw
= &g12a_fclk_div7
.hw
},
2481 * Following these parent clocks, we should also have had mpll2, mpll3
2482 * and gp0_pll but these clocks are too precious to be used here. All
2483 * the necessary rates for MMC and NAND operation can be acheived using
2484 * g12a_ee_core or fclk_div clocks
2489 static struct clk_regmap g12a_sd_emmc_a_clk0_sel
= {
2490 .data
= &(struct clk_regmap_mux_data
){
2491 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2495 .hw
.init
= &(struct clk_init_data
) {
2496 .name
= "sd_emmc_a_clk0_sel",
2497 .ops
= &clk_regmap_mux_ops
,
2498 .parent_data
= g12a_sd_emmc_clk0_parent_data
,
2499 .num_parents
= ARRAY_SIZE(g12a_sd_emmc_clk0_parent_data
),
2500 .flags
= CLK_SET_RATE_PARENT
,
2504 static struct clk_regmap g12a_sd_emmc_a_clk0_div
= {
2505 .data
= &(struct clk_regmap_div_data
){
2506 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2510 .hw
.init
= &(struct clk_init_data
) {
2511 .name
= "sd_emmc_a_clk0_div",
2512 .ops
= &clk_regmap_divider_ops
,
2513 .parent_hws
= (const struct clk_hw
*[]) {
2514 &g12a_sd_emmc_a_clk0_sel
.hw
2517 .flags
= CLK_SET_RATE_PARENT
,
2521 static struct clk_regmap g12a_sd_emmc_a_clk0
= {
2522 .data
= &(struct clk_regmap_gate_data
){
2523 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2526 .hw
.init
= &(struct clk_init_data
){
2527 .name
= "sd_emmc_a_clk0",
2528 .ops
= &clk_regmap_gate_ops
,
2529 .parent_hws
= (const struct clk_hw
*[]) {
2530 &g12a_sd_emmc_a_clk0_div
.hw
2533 .flags
= CLK_SET_RATE_PARENT
,
2538 static struct clk_regmap g12a_sd_emmc_b_clk0_sel
= {
2539 .data
= &(struct clk_regmap_mux_data
){
2540 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2544 .hw
.init
= &(struct clk_init_data
) {
2545 .name
= "sd_emmc_b_clk0_sel",
2546 .ops
= &clk_regmap_mux_ops
,
2547 .parent_data
= g12a_sd_emmc_clk0_parent_data
,
2548 .num_parents
= ARRAY_SIZE(g12a_sd_emmc_clk0_parent_data
),
2549 .flags
= CLK_SET_RATE_PARENT
,
2553 static struct clk_regmap g12a_sd_emmc_b_clk0_div
= {
2554 .data
= &(struct clk_regmap_div_data
){
2555 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2559 .hw
.init
= &(struct clk_init_data
) {
2560 .name
= "sd_emmc_b_clk0_div",
2561 .ops
= &clk_regmap_divider_ops
,
2562 .parent_hws
= (const struct clk_hw
*[]) {
2563 &g12a_sd_emmc_b_clk0_sel
.hw
2566 .flags
= CLK_SET_RATE_PARENT
,
2570 static struct clk_regmap g12a_sd_emmc_b_clk0
= {
2571 .data
= &(struct clk_regmap_gate_data
){
2572 .offset
= HHI_SD_EMMC_CLK_CNTL
,
2575 .hw
.init
= &(struct clk_init_data
){
2576 .name
= "sd_emmc_b_clk0",
2577 .ops
= &clk_regmap_gate_ops
,
2578 .parent_hws
= (const struct clk_hw
*[]) {
2579 &g12a_sd_emmc_b_clk0_div
.hw
2582 .flags
= CLK_SET_RATE_PARENT
,
2586 /* EMMC/NAND clock */
2587 static struct clk_regmap g12a_sd_emmc_c_clk0_sel
= {
2588 .data
= &(struct clk_regmap_mux_data
){
2589 .offset
= HHI_NAND_CLK_CNTL
,
2593 .hw
.init
= &(struct clk_init_data
) {
2594 .name
= "sd_emmc_c_clk0_sel",
2595 .ops
= &clk_regmap_mux_ops
,
2596 .parent_data
= g12a_sd_emmc_clk0_parent_data
,
2597 .num_parents
= ARRAY_SIZE(g12a_sd_emmc_clk0_parent_data
),
2598 .flags
= CLK_SET_RATE_PARENT
,
2602 static struct clk_regmap g12a_sd_emmc_c_clk0_div
= {
2603 .data
= &(struct clk_regmap_div_data
){
2604 .offset
= HHI_NAND_CLK_CNTL
,
2608 .hw
.init
= &(struct clk_init_data
) {
2609 .name
= "sd_emmc_c_clk0_div",
2610 .ops
= &clk_regmap_divider_ops
,
2611 .parent_hws
= (const struct clk_hw
*[]) {
2612 &g12a_sd_emmc_c_clk0_sel
.hw
2615 .flags
= CLK_SET_RATE_PARENT
,
2619 static struct clk_regmap g12a_sd_emmc_c_clk0
= {
2620 .data
= &(struct clk_regmap_gate_data
){
2621 .offset
= HHI_NAND_CLK_CNTL
,
2624 .hw
.init
= &(struct clk_init_data
){
2625 .name
= "sd_emmc_c_clk0",
2626 .ops
= &clk_regmap_gate_ops
,
2627 .parent_hws
= (const struct clk_hw
*[]) {
2628 &g12a_sd_emmc_c_clk0_div
.hw
2631 .flags
= CLK_SET_RATE_PARENT
,
2637 static struct clk_regmap g12a_vid_pll_div
= {
2638 .data
= &(struct meson_vid_pll_div_data
){
2640 .reg_off
= HHI_VID_PLL_CLK_DIV
,
2645 .reg_off
= HHI_VID_PLL_CLK_DIV
,
2650 .hw
.init
= &(struct clk_init_data
) {
2651 .name
= "vid_pll_div",
2652 .ops
= &meson_vid_pll_div_ro_ops
,
2653 .parent_hws
= (const struct clk_hw
*[]) { &g12a_hdmi_pll
.hw
},
2655 .flags
= CLK_SET_RATE_PARENT
| CLK_GET_RATE_NOCACHE
,
2659 static const struct clk_hw
*g12a_vid_pll_parent_hws
[] = {
2660 &g12a_vid_pll_div
.hw
,
2664 static struct clk_regmap g12a_vid_pll_sel
= {
2665 .data
= &(struct clk_regmap_mux_data
){
2666 .offset
= HHI_VID_PLL_CLK_DIV
,
2670 .hw
.init
= &(struct clk_init_data
){
2671 .name
= "vid_pll_sel",
2672 .ops
= &clk_regmap_mux_ops
,
2674 * bit 18 selects from 2 possible parents:
2675 * vid_pll_div or hdmi_pll
2677 .parent_hws
= g12a_vid_pll_parent_hws
,
2678 .num_parents
= ARRAY_SIZE(g12a_vid_pll_parent_hws
),
2679 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2683 static struct clk_regmap g12a_vid_pll
= {
2684 .data
= &(struct clk_regmap_gate_data
){
2685 .offset
= HHI_VID_PLL_CLK_DIV
,
2688 .hw
.init
= &(struct clk_init_data
) {
2690 .ops
= &clk_regmap_gate_ops
,
2691 .parent_hws
= (const struct clk_hw
*[]) {
2692 &g12a_vid_pll_sel
.hw
2695 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2701 static const struct clk_hw
*g12a_vpu_parent_hws
[] = {
2712 static struct clk_regmap g12a_vpu_0_sel
= {
2713 .data
= &(struct clk_regmap_mux_data
){
2714 .offset
= HHI_VPU_CLK_CNTL
,
2718 .hw
.init
= &(struct clk_init_data
){
2719 .name
= "vpu_0_sel",
2720 .ops
= &clk_regmap_mux_ops
,
2721 .parent_hws
= g12a_vpu_parent_hws
,
2722 .num_parents
= ARRAY_SIZE(g12a_vpu_parent_hws
),
2723 .flags
= CLK_SET_RATE_NO_REPARENT
,
2727 static struct clk_regmap g12a_vpu_0_div
= {
2728 .data
= &(struct clk_regmap_div_data
){
2729 .offset
= HHI_VPU_CLK_CNTL
,
2733 .hw
.init
= &(struct clk_init_data
){
2734 .name
= "vpu_0_div",
2735 .ops
= &clk_regmap_divider_ops
,
2736 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vpu_0_sel
.hw
},
2738 .flags
= CLK_SET_RATE_PARENT
,
2742 static struct clk_regmap g12a_vpu_0
= {
2743 .data
= &(struct clk_regmap_gate_data
){
2744 .offset
= HHI_VPU_CLK_CNTL
,
2747 .hw
.init
= &(struct clk_init_data
) {
2749 .ops
= &clk_regmap_gate_ops
,
2750 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vpu_0_div
.hw
},
2752 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2756 static struct clk_regmap g12a_vpu_1_sel
= {
2757 .data
= &(struct clk_regmap_mux_data
){
2758 .offset
= HHI_VPU_CLK_CNTL
,
2762 .hw
.init
= &(struct clk_init_data
){
2763 .name
= "vpu_1_sel",
2764 .ops
= &clk_regmap_mux_ops
,
2765 .parent_hws
= g12a_vpu_parent_hws
,
2766 .num_parents
= ARRAY_SIZE(g12a_vpu_parent_hws
),
2767 .flags
= CLK_SET_RATE_NO_REPARENT
,
2771 static struct clk_regmap g12a_vpu_1_div
= {
2772 .data
= &(struct clk_regmap_div_data
){
2773 .offset
= HHI_VPU_CLK_CNTL
,
2777 .hw
.init
= &(struct clk_init_data
){
2778 .name
= "vpu_1_div",
2779 .ops
= &clk_regmap_divider_ops
,
2780 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vpu_1_sel
.hw
},
2782 .flags
= CLK_SET_RATE_PARENT
,
2786 static struct clk_regmap g12a_vpu_1
= {
2787 .data
= &(struct clk_regmap_gate_data
){
2788 .offset
= HHI_VPU_CLK_CNTL
,
2791 .hw
.init
= &(struct clk_init_data
) {
2793 .ops
= &clk_regmap_gate_ops
,
2794 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vpu_1_div
.hw
},
2796 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2800 static struct clk_regmap g12a_vpu
= {
2801 .data
= &(struct clk_regmap_mux_data
){
2802 .offset
= HHI_VPU_CLK_CNTL
,
2806 .hw
.init
= &(struct clk_init_data
){
2808 .ops
= &clk_regmap_mux_ops
,
2810 * bit 31 selects from 2 possible parents:
2813 .parent_hws
= (const struct clk_hw
*[]) {
2818 .flags
= CLK_SET_RATE_NO_REPARENT
,
2824 static const struct clk_hw
*g12a_vdec_parent_hws
[] = {
2825 &g12a_fclk_div2p5
.hw
,
2834 static struct clk_regmap g12a_vdec_1_sel
= {
2835 .data
= &(struct clk_regmap_mux_data
){
2836 .offset
= HHI_VDEC_CLK_CNTL
,
2839 .flags
= CLK_MUX_ROUND_CLOSEST
,
2841 .hw
.init
= &(struct clk_init_data
){
2842 .name
= "vdec_1_sel",
2843 .ops
= &clk_regmap_mux_ops
,
2844 .parent_hws
= g12a_vdec_parent_hws
,
2845 .num_parents
= ARRAY_SIZE(g12a_vdec_parent_hws
),
2846 .flags
= CLK_SET_RATE_PARENT
,
2850 static struct clk_regmap g12a_vdec_1_div
= {
2851 .data
= &(struct clk_regmap_div_data
){
2852 .offset
= HHI_VDEC_CLK_CNTL
,
2855 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
2857 .hw
.init
= &(struct clk_init_data
){
2858 .name
= "vdec_1_div",
2859 .ops
= &clk_regmap_divider_ops
,
2860 .parent_hws
= (const struct clk_hw
*[]) {
2864 .flags
= CLK_SET_RATE_PARENT
,
2868 static struct clk_regmap g12a_vdec_1
= {
2869 .data
= &(struct clk_regmap_gate_data
){
2870 .offset
= HHI_VDEC_CLK_CNTL
,
2873 .hw
.init
= &(struct clk_init_data
) {
2875 .ops
= &clk_regmap_gate_ops
,
2876 .parent_hws
= (const struct clk_hw
*[]) {
2880 .flags
= CLK_SET_RATE_PARENT
,
2884 static struct clk_regmap g12a_vdec_hevcf_sel
= {
2885 .data
= &(struct clk_regmap_mux_data
){
2886 .offset
= HHI_VDEC2_CLK_CNTL
,
2889 .flags
= CLK_MUX_ROUND_CLOSEST
,
2891 .hw
.init
= &(struct clk_init_data
){
2892 .name
= "vdec_hevcf_sel",
2893 .ops
= &clk_regmap_mux_ops
,
2894 .parent_hws
= g12a_vdec_parent_hws
,
2895 .num_parents
= ARRAY_SIZE(g12a_vdec_parent_hws
),
2896 .flags
= CLK_SET_RATE_PARENT
,
2900 static struct clk_regmap g12a_vdec_hevcf_div
= {
2901 .data
= &(struct clk_regmap_div_data
){
2902 .offset
= HHI_VDEC2_CLK_CNTL
,
2905 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
2907 .hw
.init
= &(struct clk_init_data
){
2908 .name
= "vdec_hevcf_div",
2909 .ops
= &clk_regmap_divider_ops
,
2910 .parent_hws
= (const struct clk_hw
*[]) {
2911 &g12a_vdec_hevcf_sel
.hw
2914 .flags
= CLK_SET_RATE_PARENT
,
2918 static struct clk_regmap g12a_vdec_hevcf
= {
2919 .data
= &(struct clk_regmap_gate_data
){
2920 .offset
= HHI_VDEC2_CLK_CNTL
,
2923 .hw
.init
= &(struct clk_init_data
) {
2924 .name
= "vdec_hevcf",
2925 .ops
= &clk_regmap_gate_ops
,
2926 .parent_hws
= (const struct clk_hw
*[]) {
2927 &g12a_vdec_hevcf_div
.hw
2930 .flags
= CLK_SET_RATE_PARENT
,
2934 static struct clk_regmap g12a_vdec_hevc_sel
= {
2935 .data
= &(struct clk_regmap_mux_data
){
2936 .offset
= HHI_VDEC2_CLK_CNTL
,
2939 .flags
= CLK_MUX_ROUND_CLOSEST
,
2941 .hw
.init
= &(struct clk_init_data
){
2942 .name
= "vdec_hevc_sel",
2943 .ops
= &clk_regmap_mux_ops
,
2944 .parent_hws
= g12a_vdec_parent_hws
,
2945 .num_parents
= ARRAY_SIZE(g12a_vdec_parent_hws
),
2946 .flags
= CLK_SET_RATE_PARENT
,
2950 static struct clk_regmap g12a_vdec_hevc_div
= {
2951 .data
= &(struct clk_regmap_div_data
){
2952 .offset
= HHI_VDEC2_CLK_CNTL
,
2955 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
2957 .hw
.init
= &(struct clk_init_data
){
2958 .name
= "vdec_hevc_div",
2959 .ops
= &clk_regmap_divider_ops
,
2960 .parent_hws
= (const struct clk_hw
*[]) {
2961 &g12a_vdec_hevc_sel
.hw
2964 .flags
= CLK_SET_RATE_PARENT
,
2968 static struct clk_regmap g12a_vdec_hevc
= {
2969 .data
= &(struct clk_regmap_gate_data
){
2970 .offset
= HHI_VDEC2_CLK_CNTL
,
2973 .hw
.init
= &(struct clk_init_data
) {
2974 .name
= "vdec_hevc",
2975 .ops
= &clk_regmap_gate_ops
,
2976 .parent_hws
= (const struct clk_hw
*[]) {
2977 &g12a_vdec_hevc_div
.hw
2980 .flags
= CLK_SET_RATE_PARENT
,
2986 static const struct clk_hw
*g12a_vapb_parent_hws
[] = {
2994 &g12a_fclk_div2p5
.hw
,
2997 static struct clk_regmap g12a_vapb_0_sel
= {
2998 .data
= &(struct clk_regmap_mux_data
){
2999 .offset
= HHI_VAPBCLK_CNTL
,
3003 .hw
.init
= &(struct clk_init_data
){
3004 .name
= "vapb_0_sel",
3005 .ops
= &clk_regmap_mux_ops
,
3006 .parent_hws
= g12a_vapb_parent_hws
,
3007 .num_parents
= ARRAY_SIZE(g12a_vapb_parent_hws
),
3008 .flags
= CLK_SET_RATE_NO_REPARENT
,
3012 static struct clk_regmap g12a_vapb_0_div
= {
3013 .data
= &(struct clk_regmap_div_data
){
3014 .offset
= HHI_VAPBCLK_CNTL
,
3018 .hw
.init
= &(struct clk_init_data
){
3019 .name
= "vapb_0_div",
3020 .ops
= &clk_regmap_divider_ops
,
3021 .parent_hws
= (const struct clk_hw
*[]) {
3025 .flags
= CLK_SET_RATE_PARENT
,
3029 static struct clk_regmap g12a_vapb_0
= {
3030 .data
= &(struct clk_regmap_gate_data
){
3031 .offset
= HHI_VAPBCLK_CNTL
,
3034 .hw
.init
= &(struct clk_init_data
) {
3036 .ops
= &clk_regmap_gate_ops
,
3037 .parent_hws
= (const struct clk_hw
*[]) {
3041 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3045 static struct clk_regmap g12a_vapb_1_sel
= {
3046 .data
= &(struct clk_regmap_mux_data
){
3047 .offset
= HHI_VAPBCLK_CNTL
,
3051 .hw
.init
= &(struct clk_init_data
){
3052 .name
= "vapb_1_sel",
3053 .ops
= &clk_regmap_mux_ops
,
3054 .parent_hws
= g12a_vapb_parent_hws
,
3055 .num_parents
= ARRAY_SIZE(g12a_vapb_parent_hws
),
3056 .flags
= CLK_SET_RATE_NO_REPARENT
,
3060 static struct clk_regmap g12a_vapb_1_div
= {
3061 .data
= &(struct clk_regmap_div_data
){
3062 .offset
= HHI_VAPBCLK_CNTL
,
3066 .hw
.init
= &(struct clk_init_data
){
3067 .name
= "vapb_1_div",
3068 .ops
= &clk_regmap_divider_ops
,
3069 .parent_hws
= (const struct clk_hw
*[]) {
3073 .flags
= CLK_SET_RATE_PARENT
,
3077 static struct clk_regmap g12a_vapb_1
= {
3078 .data
= &(struct clk_regmap_gate_data
){
3079 .offset
= HHI_VAPBCLK_CNTL
,
3082 .hw
.init
= &(struct clk_init_data
) {
3084 .ops
= &clk_regmap_gate_ops
,
3085 .parent_hws
= (const struct clk_hw
*[]) {
3089 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3093 static struct clk_regmap g12a_vapb_sel
= {
3094 .data
= &(struct clk_regmap_mux_data
){
3095 .offset
= HHI_VAPBCLK_CNTL
,
3099 .hw
.init
= &(struct clk_init_data
){
3101 .ops
= &clk_regmap_mux_ops
,
3103 * bit 31 selects from 2 possible parents:
3106 .parent_hws
= (const struct clk_hw
*[]) {
3111 .flags
= CLK_SET_RATE_NO_REPARENT
,
3115 static struct clk_regmap g12a_vapb
= {
3116 .data
= &(struct clk_regmap_gate_data
){
3117 .offset
= HHI_VAPBCLK_CNTL
,
3120 .hw
.init
= &(struct clk_init_data
) {
3122 .ops
= &clk_regmap_gate_ops
,
3123 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vapb_sel
.hw
},
3125 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3129 static const struct clk_hw
*g12a_vclk_parent_hws
[] = {
3140 static struct clk_regmap g12a_vclk_sel
= {
3141 .data
= &(struct clk_regmap_mux_data
){
3142 .offset
= HHI_VID_CLK_CNTL
,
3146 .hw
.init
= &(struct clk_init_data
){
3148 .ops
= &clk_regmap_mux_ops
,
3149 .parent_hws
= g12a_vclk_parent_hws
,
3150 .num_parents
= ARRAY_SIZE(g12a_vclk_parent_hws
),
3151 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3155 static struct clk_regmap g12a_vclk2_sel
= {
3156 .data
= &(struct clk_regmap_mux_data
){
3157 .offset
= HHI_VIID_CLK_CNTL
,
3161 .hw
.init
= &(struct clk_init_data
){
3162 .name
= "vclk2_sel",
3163 .ops
= &clk_regmap_mux_ops
,
3164 .parent_hws
= g12a_vclk_parent_hws
,
3165 .num_parents
= ARRAY_SIZE(g12a_vclk_parent_hws
),
3166 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3170 static struct clk_regmap g12a_vclk_input
= {
3171 .data
= &(struct clk_regmap_gate_data
){
3172 .offset
= HHI_VID_CLK_DIV
,
3175 .hw
.init
= &(struct clk_init_data
) {
3176 .name
= "vclk_input",
3177 .ops
= &clk_regmap_gate_ops
,
3178 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk_sel
.hw
},
3180 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3184 static struct clk_regmap g12a_vclk2_input
= {
3185 .data
= &(struct clk_regmap_gate_data
){
3186 .offset
= HHI_VIID_CLK_DIV
,
3189 .hw
.init
= &(struct clk_init_data
) {
3190 .name
= "vclk2_input",
3191 .ops
= &clk_regmap_gate_ops
,
3192 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2_sel
.hw
},
3194 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3198 static struct clk_regmap g12a_vclk_div
= {
3199 .data
= &(struct clk_regmap_div_data
){
3200 .offset
= HHI_VID_CLK_DIV
,
3204 .hw
.init
= &(struct clk_init_data
){
3206 .ops
= &clk_regmap_divider_ops
,
3207 .parent_hws
= (const struct clk_hw
*[]) {
3211 .flags
= CLK_GET_RATE_NOCACHE
,
3215 static struct clk_regmap g12a_vclk2_div
= {
3216 .data
= &(struct clk_regmap_div_data
){
3217 .offset
= HHI_VIID_CLK_DIV
,
3221 .hw
.init
= &(struct clk_init_data
){
3222 .name
= "vclk2_div",
3223 .ops
= &clk_regmap_divider_ops
,
3224 .parent_hws
= (const struct clk_hw
*[]) {
3225 &g12a_vclk2_input
.hw
3228 .flags
= CLK_GET_RATE_NOCACHE
,
3232 static struct clk_regmap g12a_vclk
= {
3233 .data
= &(struct clk_regmap_gate_data
){
3234 .offset
= HHI_VID_CLK_CNTL
,
3237 .hw
.init
= &(struct clk_init_data
) {
3239 .ops
= &clk_regmap_gate_ops
,
3240 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk_div
.hw
},
3242 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3246 static struct clk_regmap g12a_vclk2
= {
3247 .data
= &(struct clk_regmap_gate_data
){
3248 .offset
= HHI_VIID_CLK_CNTL
,
3251 .hw
.init
= &(struct clk_init_data
) {
3253 .ops
= &clk_regmap_gate_ops
,
3254 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2_div
.hw
},
3256 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3260 static struct clk_regmap g12a_vclk_div1
= {
3261 .data
= &(struct clk_regmap_gate_data
){
3262 .offset
= HHI_VID_CLK_CNTL
,
3265 .hw
.init
= &(struct clk_init_data
) {
3266 .name
= "vclk_div1",
3267 .ops
= &clk_regmap_gate_ops
,
3268 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk
.hw
},
3270 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3274 static struct clk_regmap g12a_vclk_div2_en
= {
3275 .data
= &(struct clk_regmap_gate_data
){
3276 .offset
= HHI_VID_CLK_CNTL
,
3279 .hw
.init
= &(struct clk_init_data
) {
3280 .name
= "vclk_div2_en",
3281 .ops
= &clk_regmap_gate_ops
,
3282 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk
.hw
},
3284 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3288 static struct clk_regmap g12a_vclk_div4_en
= {
3289 .data
= &(struct clk_regmap_gate_data
){
3290 .offset
= HHI_VID_CLK_CNTL
,
3293 .hw
.init
= &(struct clk_init_data
) {
3294 .name
= "vclk_div4_en",
3295 .ops
= &clk_regmap_gate_ops
,
3296 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk
.hw
},
3298 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3302 static struct clk_regmap g12a_vclk_div6_en
= {
3303 .data
= &(struct clk_regmap_gate_data
){
3304 .offset
= HHI_VID_CLK_CNTL
,
3307 .hw
.init
= &(struct clk_init_data
) {
3308 .name
= "vclk_div6_en",
3309 .ops
= &clk_regmap_gate_ops
,
3310 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk
.hw
},
3312 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3316 static struct clk_regmap g12a_vclk_div12_en
= {
3317 .data
= &(struct clk_regmap_gate_data
){
3318 .offset
= HHI_VID_CLK_CNTL
,
3321 .hw
.init
= &(struct clk_init_data
) {
3322 .name
= "vclk_div12_en",
3323 .ops
= &clk_regmap_gate_ops
,
3324 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk
.hw
},
3326 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3330 static struct clk_regmap g12a_vclk2_div1
= {
3331 .data
= &(struct clk_regmap_gate_data
){
3332 .offset
= HHI_VIID_CLK_CNTL
,
3335 .hw
.init
= &(struct clk_init_data
) {
3336 .name
= "vclk2_div1",
3337 .ops
= &clk_regmap_gate_ops
,
3338 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2
.hw
},
3340 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3344 static struct clk_regmap g12a_vclk2_div2_en
= {
3345 .data
= &(struct clk_regmap_gate_data
){
3346 .offset
= HHI_VIID_CLK_CNTL
,
3349 .hw
.init
= &(struct clk_init_data
) {
3350 .name
= "vclk2_div2_en",
3351 .ops
= &clk_regmap_gate_ops
,
3352 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2
.hw
},
3354 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3358 static struct clk_regmap g12a_vclk2_div4_en
= {
3359 .data
= &(struct clk_regmap_gate_data
){
3360 .offset
= HHI_VIID_CLK_CNTL
,
3363 .hw
.init
= &(struct clk_init_data
) {
3364 .name
= "vclk2_div4_en",
3365 .ops
= &clk_regmap_gate_ops
,
3366 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2
.hw
},
3368 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3372 static struct clk_regmap g12a_vclk2_div6_en
= {
3373 .data
= &(struct clk_regmap_gate_data
){
3374 .offset
= HHI_VIID_CLK_CNTL
,
3377 .hw
.init
= &(struct clk_init_data
) {
3378 .name
= "vclk2_div6_en",
3379 .ops
= &clk_regmap_gate_ops
,
3380 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2
.hw
},
3382 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3386 static struct clk_regmap g12a_vclk2_div12_en
= {
3387 .data
= &(struct clk_regmap_gate_data
){
3388 .offset
= HHI_VIID_CLK_CNTL
,
3391 .hw
.init
= &(struct clk_init_data
) {
3392 .name
= "vclk2_div12_en",
3393 .ops
= &clk_regmap_gate_ops
,
3394 .parent_hws
= (const struct clk_hw
*[]) { &g12a_vclk2
.hw
},
3396 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3400 static struct clk_fixed_factor g12a_vclk_div2
= {
3403 .hw
.init
= &(struct clk_init_data
){
3404 .name
= "vclk_div2",
3405 .ops
= &clk_fixed_factor_ops
,
3406 .parent_hws
= (const struct clk_hw
*[]) {
3407 &g12a_vclk_div2_en
.hw
3413 static struct clk_fixed_factor g12a_vclk_div4
= {
3416 .hw
.init
= &(struct clk_init_data
){
3417 .name
= "vclk_div4",
3418 .ops
= &clk_fixed_factor_ops
,
3419 .parent_hws
= (const struct clk_hw
*[]) {
3420 &g12a_vclk_div4_en
.hw
3426 static struct clk_fixed_factor g12a_vclk_div6
= {
3429 .hw
.init
= &(struct clk_init_data
){
3430 .name
= "vclk_div6",
3431 .ops
= &clk_fixed_factor_ops
,
3432 .parent_hws
= (const struct clk_hw
*[]) {
3433 &g12a_vclk_div6_en
.hw
3439 static struct clk_fixed_factor g12a_vclk_div12
= {
3442 .hw
.init
= &(struct clk_init_data
){
3443 .name
= "vclk_div12",
3444 .ops
= &clk_fixed_factor_ops
,
3445 .parent_hws
= (const struct clk_hw
*[]) {
3446 &g12a_vclk_div12_en
.hw
3452 static struct clk_fixed_factor g12a_vclk2_div2
= {
3455 .hw
.init
= &(struct clk_init_data
){
3456 .name
= "vclk2_div2",
3457 .ops
= &clk_fixed_factor_ops
,
3458 .parent_hws
= (const struct clk_hw
*[]) {
3459 &g12a_vclk2_div2_en
.hw
3465 static struct clk_fixed_factor g12a_vclk2_div4
= {
3468 .hw
.init
= &(struct clk_init_data
){
3469 .name
= "vclk2_div4",
3470 .ops
= &clk_fixed_factor_ops
,
3471 .parent_hws
= (const struct clk_hw
*[]) {
3472 &g12a_vclk2_div4_en
.hw
3478 static struct clk_fixed_factor g12a_vclk2_div6
= {
3481 .hw
.init
= &(struct clk_init_data
){
3482 .name
= "vclk2_div6",
3483 .ops
= &clk_fixed_factor_ops
,
3484 .parent_hws
= (const struct clk_hw
*[]) {
3485 &g12a_vclk2_div6_en
.hw
3491 static struct clk_fixed_factor g12a_vclk2_div12
= {
3494 .hw
.init
= &(struct clk_init_data
){
3495 .name
= "vclk2_div12",
3496 .ops
= &clk_fixed_factor_ops
,
3497 .parent_hws
= (const struct clk_hw
*[]) {
3498 &g12a_vclk2_div12_en
.hw
3504 static u32 mux_table_cts_sel
[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
3505 static const struct clk_hw
*g12a_cts_parent_hws
[] = {
3510 &g12a_vclk_div12
.hw
,
3511 &g12a_vclk2_div1
.hw
,
3512 &g12a_vclk2_div2
.hw
,
3513 &g12a_vclk2_div4
.hw
,
3514 &g12a_vclk2_div6
.hw
,
3515 &g12a_vclk2_div12
.hw
,
3518 static struct clk_regmap g12a_cts_enci_sel
= {
3519 .data
= &(struct clk_regmap_mux_data
){
3520 .offset
= HHI_VID_CLK_DIV
,
3523 .table
= mux_table_cts_sel
,
3525 .hw
.init
= &(struct clk_init_data
){
3526 .name
= "cts_enci_sel",
3527 .ops
= &clk_regmap_mux_ops
,
3528 .parent_hws
= g12a_cts_parent_hws
,
3529 .num_parents
= ARRAY_SIZE(g12a_cts_parent_hws
),
3530 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3534 static struct clk_regmap g12a_cts_encp_sel
= {
3535 .data
= &(struct clk_regmap_mux_data
){
3536 .offset
= HHI_VID_CLK_DIV
,
3539 .table
= mux_table_cts_sel
,
3541 .hw
.init
= &(struct clk_init_data
){
3542 .name
= "cts_encp_sel",
3543 .ops
= &clk_regmap_mux_ops
,
3544 .parent_hws
= g12a_cts_parent_hws
,
3545 .num_parents
= ARRAY_SIZE(g12a_cts_parent_hws
),
3546 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3550 static struct clk_regmap g12a_cts_vdac_sel
= {
3551 .data
= &(struct clk_regmap_mux_data
){
3552 .offset
= HHI_VIID_CLK_DIV
,
3555 .table
= mux_table_cts_sel
,
3557 .hw
.init
= &(struct clk_init_data
){
3558 .name
= "cts_vdac_sel",
3559 .ops
= &clk_regmap_mux_ops
,
3560 .parent_hws
= g12a_cts_parent_hws
,
3561 .num_parents
= ARRAY_SIZE(g12a_cts_parent_hws
),
3562 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3566 /* TOFIX: add support for cts_tcon */
3567 static u32 mux_table_hdmi_tx_sel
[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
3568 static const struct clk_hw
*g12a_cts_hdmi_tx_parent_hws
[] = {
3573 &g12a_vclk_div12
.hw
,
3574 &g12a_vclk2_div1
.hw
,
3575 &g12a_vclk2_div2
.hw
,
3576 &g12a_vclk2_div4
.hw
,
3577 &g12a_vclk2_div6
.hw
,
3578 &g12a_vclk2_div12
.hw
,
3581 static struct clk_regmap g12a_hdmi_tx_sel
= {
3582 .data
= &(struct clk_regmap_mux_data
){
3583 .offset
= HHI_HDMI_CLK_CNTL
,
3586 .table
= mux_table_hdmi_tx_sel
,
3588 .hw
.init
= &(struct clk_init_data
){
3589 .name
= "hdmi_tx_sel",
3590 .ops
= &clk_regmap_mux_ops
,
3591 .parent_hws
= g12a_cts_hdmi_tx_parent_hws
,
3592 .num_parents
= ARRAY_SIZE(g12a_cts_hdmi_tx_parent_hws
),
3593 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3597 static struct clk_regmap g12a_cts_enci
= {
3598 .data
= &(struct clk_regmap_gate_data
){
3599 .offset
= HHI_VID_CLK_CNTL2
,
3602 .hw
.init
= &(struct clk_init_data
) {
3604 .ops
= &clk_regmap_gate_ops
,
3605 .parent_hws
= (const struct clk_hw
*[]) {
3606 &g12a_cts_enci_sel
.hw
3609 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3613 static struct clk_regmap g12a_cts_encp
= {
3614 .data
= &(struct clk_regmap_gate_data
){
3615 .offset
= HHI_VID_CLK_CNTL2
,
3618 .hw
.init
= &(struct clk_init_data
) {
3620 .ops
= &clk_regmap_gate_ops
,
3621 .parent_hws
= (const struct clk_hw
*[]) {
3622 &g12a_cts_encp_sel
.hw
3625 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3629 static struct clk_regmap g12a_cts_vdac
= {
3630 .data
= &(struct clk_regmap_gate_data
){
3631 .offset
= HHI_VID_CLK_CNTL2
,
3634 .hw
.init
= &(struct clk_init_data
) {
3636 .ops
= &clk_regmap_gate_ops
,
3637 .parent_hws
= (const struct clk_hw
*[]) {
3638 &g12a_cts_vdac_sel
.hw
3641 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3645 static struct clk_regmap g12a_hdmi_tx
= {
3646 .data
= &(struct clk_regmap_gate_data
){
3647 .offset
= HHI_VID_CLK_CNTL2
,
3650 .hw
.init
= &(struct clk_init_data
) {
3652 .ops
= &clk_regmap_gate_ops
,
3653 .parent_hws
= (const struct clk_hw
*[]) {
3654 &g12a_hdmi_tx_sel
.hw
3657 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3661 /* MIPI DSI Host Clocks */
3663 static const struct clk_hw
*g12a_mipi_dsi_pxclk_parent_hws
[] = {
3669 &g12a_fclk_div2p5
.hw
,
3674 static struct clk_regmap g12a_mipi_dsi_pxclk_sel
= {
3675 .data
= &(struct clk_regmap_mux_data
){
3676 .offset
= HHI_MIPIDSI_PHY_CLK_CNTL
,
3679 .flags
= CLK_MUX_ROUND_CLOSEST
,
3681 .hw
.init
= &(struct clk_init_data
){
3682 .name
= "mipi_dsi_pxclk_sel",
3683 .ops
= &clk_regmap_mux_ops
,
3684 .parent_hws
= g12a_mipi_dsi_pxclk_parent_hws
,
3685 .num_parents
= ARRAY_SIZE(g12a_mipi_dsi_pxclk_parent_hws
),
3686 .flags
= CLK_SET_RATE_NO_REPARENT
,
3690 static struct clk_regmap g12a_mipi_dsi_pxclk_div
= {
3691 .data
= &(struct clk_regmap_div_data
){
3692 .offset
= HHI_MIPIDSI_PHY_CLK_CNTL
,
3696 .hw
.init
= &(struct clk_init_data
){
3697 .name
= "mipi_dsi_pxclk_div",
3698 .ops
= &clk_regmap_divider_ops
,
3699 .parent_hws
= (const struct clk_hw
*[]) {
3700 &g12a_mipi_dsi_pxclk_sel
.hw
3703 .flags
= CLK_SET_RATE_PARENT
,
3707 static struct clk_regmap g12a_mipi_dsi_pxclk
= {
3708 .data
= &(struct clk_regmap_gate_data
){
3709 .offset
= HHI_MIPIDSI_PHY_CLK_CNTL
,
3712 .hw
.init
= &(struct clk_init_data
) {
3713 .name
= "mipi_dsi_pxclk",
3714 .ops
= &clk_regmap_gate_ops
,
3715 .parent_hws
= (const struct clk_hw
*[]) {
3716 &g12a_mipi_dsi_pxclk_div
.hw
3719 .flags
= CLK_SET_RATE_PARENT
,
3725 static const struct clk_parent_data g12a_hdmi_parent_data
[] = {
3726 { .fw_name
= "xtal", },
3727 { .hw
= &g12a_fclk_div4
.hw
},
3728 { .hw
= &g12a_fclk_div3
.hw
},
3729 { .hw
= &g12a_fclk_div5
.hw
},
3732 static struct clk_regmap g12a_hdmi_sel
= {
3733 .data
= &(struct clk_regmap_mux_data
){
3734 .offset
= HHI_HDMI_CLK_CNTL
,
3737 .flags
= CLK_MUX_ROUND_CLOSEST
,
3739 .hw
.init
= &(struct clk_init_data
){
3741 .ops
= &clk_regmap_mux_ops
,
3742 .parent_data
= g12a_hdmi_parent_data
,
3743 .num_parents
= ARRAY_SIZE(g12a_hdmi_parent_data
),
3744 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
3748 static struct clk_regmap g12a_hdmi_div
= {
3749 .data
= &(struct clk_regmap_div_data
){
3750 .offset
= HHI_HDMI_CLK_CNTL
,
3754 .hw
.init
= &(struct clk_init_data
){
3756 .ops
= &clk_regmap_divider_ops
,
3757 .parent_hws
= (const struct clk_hw
*[]) { &g12a_hdmi_sel
.hw
},
3759 .flags
= CLK_GET_RATE_NOCACHE
,
3763 static struct clk_regmap g12a_hdmi
= {
3764 .data
= &(struct clk_regmap_gate_data
){
3765 .offset
= HHI_HDMI_CLK_CNTL
,
3768 .hw
.init
= &(struct clk_init_data
) {
3770 .ops
= &clk_regmap_gate_ops
,
3771 .parent_hws
= (const struct clk_hw
*[]) { &g12a_hdmi_div
.hw
},
3773 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
3778 * The MALI IP is clocked by two identical clocks (mali_0 and mali_1)
3779 * muxed by a glitch-free switch. The CCF can manage this glitch-free
3780 * mux because it does top-to-bottom updates the each clock tree and
3781 * switches to the "inactive" one when CLK_SET_RATE_GATE is set.
3783 static const struct clk_parent_data g12a_mali_0_1_parent_data
[] = {
3784 { .fw_name
= "xtal", },
3785 { .hw
= &g12a_gp0_pll
.hw
},
3786 { .hw
= &g12a_hifi_pll
.hw
},
3787 { .hw
= &g12a_fclk_div2p5
.hw
},
3788 { .hw
= &g12a_fclk_div3
.hw
},
3789 { .hw
= &g12a_fclk_div4
.hw
},
3790 { .hw
= &g12a_fclk_div5
.hw
},
3791 { .hw
= &g12a_fclk_div7
.hw
},
3794 static struct clk_regmap g12a_mali_0_sel
= {
3795 .data
= &(struct clk_regmap_mux_data
){
3796 .offset
= HHI_MALI_CLK_CNTL
,
3800 .hw
.init
= &(struct clk_init_data
){
3801 .name
= "mali_0_sel",
3802 .ops
= &clk_regmap_mux_ops
,
3803 .parent_data
= g12a_mali_0_1_parent_data
,
3806 * Don't request the parent to change the rate because
3807 * all GPU frequencies can be derived from the fclk_*
3808 * clocks and one special GP0_PLL setting. This is
3809 * important because we need the MPLL clocks for audio.
3815 static struct clk_regmap g12a_mali_0_div
= {
3816 .data
= &(struct clk_regmap_div_data
){
3817 .offset
= HHI_MALI_CLK_CNTL
,
3821 .hw
.init
= &(struct clk_init_data
){
3822 .name
= "mali_0_div",
3823 .ops
= &clk_regmap_divider_ops
,
3824 .parent_hws
= (const struct clk_hw
*[]) {
3828 .flags
= CLK_SET_RATE_PARENT
,
3832 static struct clk_regmap g12a_mali_0
= {
3833 .data
= &(struct clk_regmap_gate_data
){
3834 .offset
= HHI_MALI_CLK_CNTL
,
3837 .hw
.init
= &(struct clk_init_data
){
3839 .ops
= &clk_regmap_gate_ops
,
3840 .parent_hws
= (const struct clk_hw
*[]) {
3844 .flags
= CLK_SET_RATE_GATE
| CLK_SET_RATE_PARENT
,
3848 static struct clk_regmap g12a_mali_1_sel
= {
3849 .data
= &(struct clk_regmap_mux_data
){
3850 .offset
= HHI_MALI_CLK_CNTL
,
3854 .hw
.init
= &(struct clk_init_data
){
3855 .name
= "mali_1_sel",
3856 .ops
= &clk_regmap_mux_ops
,
3857 .parent_data
= g12a_mali_0_1_parent_data
,
3860 * Don't request the parent to change the rate because
3861 * all GPU frequencies can be derived from the fclk_*
3862 * clocks and one special GP0_PLL setting. This is
3863 * important because we need the MPLL clocks for audio.
3869 static struct clk_regmap g12a_mali_1_div
= {
3870 .data
= &(struct clk_regmap_div_data
){
3871 .offset
= HHI_MALI_CLK_CNTL
,
3875 .hw
.init
= &(struct clk_init_data
){
3876 .name
= "mali_1_div",
3877 .ops
= &clk_regmap_divider_ops
,
3878 .parent_hws
= (const struct clk_hw
*[]) {
3882 .flags
= CLK_SET_RATE_PARENT
,
3886 static struct clk_regmap g12a_mali_1
= {
3887 .data
= &(struct clk_regmap_gate_data
){
3888 .offset
= HHI_MALI_CLK_CNTL
,
3891 .hw
.init
= &(struct clk_init_data
){
3893 .ops
= &clk_regmap_gate_ops
,
3894 .parent_hws
= (const struct clk_hw
*[]) {
3898 .flags
= CLK_SET_RATE_GATE
| CLK_SET_RATE_PARENT
,
3902 static const struct clk_hw
*g12a_mali_parent_hws
[] = {
3907 static struct clk_regmap g12a_mali
= {
3908 .data
= &(struct clk_regmap_mux_data
){
3909 .offset
= HHI_MALI_CLK_CNTL
,
3913 .hw
.init
= &(struct clk_init_data
){
3915 .ops
= &clk_regmap_mux_ops
,
3916 .parent_hws
= g12a_mali_parent_hws
,
3918 .flags
= CLK_SET_RATE_PARENT
,
3922 static struct clk_regmap g12a_ts_div
= {
3923 .data
= &(struct clk_regmap_div_data
){
3924 .offset
= HHI_TS_CLK_CNTL
,
3928 .hw
.init
= &(struct clk_init_data
){
3930 .ops
= &clk_regmap_divider_ro_ops
,
3931 .parent_data
= &(const struct clk_parent_data
) {
3938 static struct clk_regmap g12a_ts
= {
3939 .data
= &(struct clk_regmap_gate_data
){
3940 .offset
= HHI_TS_CLK_CNTL
,
3943 .hw
.init
= &(struct clk_init_data
){
3945 .ops
= &clk_regmap_gate_ops
,
3946 .parent_hws
= (const struct clk_hw
*[]) {
3953 /* SPICC SCLK source clock */
3955 static const struct clk_parent_data spicc_sclk_parent_data
[] = {
3956 { .fw_name
= "xtal", },
3957 { .hw
= &g12a_clk81
.hw
},
3958 { .hw
= &g12a_fclk_div4
.hw
},
3959 { .hw
= &g12a_fclk_div3
.hw
},
3960 { .hw
= &g12a_fclk_div5
.hw
},
3961 { .hw
= &g12a_fclk_div7
.hw
},
3964 static struct clk_regmap g12a_spicc0_sclk_sel
= {
3965 .data
= &(struct clk_regmap_mux_data
){
3966 .offset
= HHI_SPICC_CLK_CNTL
,
3970 .hw
.init
= &(struct clk_init_data
){
3971 .name
= "spicc0_sclk_sel",
3972 .ops
= &clk_regmap_mux_ops
,
3973 .parent_data
= spicc_sclk_parent_data
,
3974 .num_parents
= ARRAY_SIZE(spicc_sclk_parent_data
),
3978 static struct clk_regmap g12a_spicc0_sclk_div
= {
3979 .data
= &(struct clk_regmap_div_data
){
3980 .offset
= HHI_SPICC_CLK_CNTL
,
3984 .hw
.init
= &(struct clk_init_data
){
3985 .name
= "spicc0_sclk_div",
3986 .ops
= &clk_regmap_divider_ops
,
3987 .parent_hws
= (const struct clk_hw
*[]) {
3988 &g12a_spicc0_sclk_sel
.hw
3991 .flags
= CLK_SET_RATE_PARENT
,
3995 static struct clk_regmap g12a_spicc0_sclk
= {
3996 .data
= &(struct clk_regmap_gate_data
){
3997 .offset
= HHI_SPICC_CLK_CNTL
,
4000 .hw
.init
= &(struct clk_init_data
){
4001 .name
= "spicc0_sclk",
4002 .ops
= &clk_regmap_gate_ops
,
4003 .parent_hws
= (const struct clk_hw
*[]) {
4004 &g12a_spicc0_sclk_div
.hw
4007 .flags
= CLK_SET_RATE_PARENT
,
4011 static struct clk_regmap g12a_spicc1_sclk_sel
= {
4012 .data
= &(struct clk_regmap_mux_data
){
4013 .offset
= HHI_SPICC_CLK_CNTL
,
4017 .hw
.init
= &(struct clk_init_data
){
4018 .name
= "spicc1_sclk_sel",
4019 .ops
= &clk_regmap_mux_ops
,
4020 .parent_data
= spicc_sclk_parent_data
,
4021 .num_parents
= ARRAY_SIZE(spicc_sclk_parent_data
),
4025 static struct clk_regmap g12a_spicc1_sclk_div
= {
4026 .data
= &(struct clk_regmap_div_data
){
4027 .offset
= HHI_SPICC_CLK_CNTL
,
4031 .hw
.init
= &(struct clk_init_data
){
4032 .name
= "spicc1_sclk_div",
4033 .ops
= &clk_regmap_divider_ops
,
4034 .parent_hws
= (const struct clk_hw
*[]) {
4035 &g12a_spicc1_sclk_sel
.hw
4038 .flags
= CLK_SET_RATE_PARENT
,
4042 static struct clk_regmap g12a_spicc1_sclk
= {
4043 .data
= &(struct clk_regmap_gate_data
){
4044 .offset
= HHI_SPICC_CLK_CNTL
,
4047 .hw
.init
= &(struct clk_init_data
){
4048 .name
= "spicc1_sclk",
4049 .ops
= &clk_regmap_gate_ops
,
4050 .parent_hws
= (const struct clk_hw
*[]) {
4051 &g12a_spicc1_sclk_div
.hw
4054 .flags
= CLK_SET_RATE_PARENT
,
4058 /* Neural Network Accelerator source clock */
4060 static const struct clk_parent_data nna_clk_parent_data
[] = {
4061 { .fw_name
= "xtal", },
4062 { .hw
= &g12a_gp0_pll
.hw
, },
4063 { .hw
= &g12a_hifi_pll
.hw
, },
4064 { .hw
= &g12a_fclk_div2p5
.hw
, },
4065 { .hw
= &g12a_fclk_div3
.hw
, },
4066 { .hw
= &g12a_fclk_div4
.hw
, },
4067 { .hw
= &g12a_fclk_div5
.hw
, },
4068 { .hw
= &g12a_fclk_div7
.hw
},
4071 static struct clk_regmap sm1_nna_axi_clk_sel
= {
4072 .data
= &(struct clk_regmap_mux_data
){
4073 .offset
= HHI_NNA_CLK_CNTL
,
4077 .hw
.init
= &(struct clk_init_data
){
4078 .name
= "nna_axi_clk_sel",
4079 .ops
= &clk_regmap_mux_ops
,
4080 .parent_data
= nna_clk_parent_data
,
4081 .num_parents
= ARRAY_SIZE(nna_clk_parent_data
),
4085 static struct clk_regmap sm1_nna_axi_clk_div
= {
4086 .data
= &(struct clk_regmap_div_data
){
4087 .offset
= HHI_NNA_CLK_CNTL
,
4091 .hw
.init
= &(struct clk_init_data
){
4092 .name
= "nna_axi_clk_div",
4093 .ops
= &clk_regmap_divider_ops
,
4094 .parent_hws
= (const struct clk_hw
*[]) {
4095 &sm1_nna_axi_clk_sel
.hw
4098 .flags
= CLK_SET_RATE_PARENT
,
4102 static struct clk_regmap sm1_nna_axi_clk
= {
4103 .data
= &(struct clk_regmap_gate_data
){
4104 .offset
= HHI_NNA_CLK_CNTL
,
4107 .hw
.init
= &(struct clk_init_data
){
4108 .name
= "nna_axi_clk",
4109 .ops
= &clk_regmap_gate_ops
,
4110 .parent_hws
= (const struct clk_hw
*[]) {
4111 &sm1_nna_axi_clk_div
.hw
4114 .flags
= CLK_SET_RATE_PARENT
,
4118 static struct clk_regmap sm1_nna_core_clk_sel
= {
4119 .data
= &(struct clk_regmap_mux_data
){
4120 .offset
= HHI_NNA_CLK_CNTL
,
4124 .hw
.init
= &(struct clk_init_data
){
4125 .name
= "nna_core_clk_sel",
4126 .ops
= &clk_regmap_mux_ops
,
4127 .parent_data
= nna_clk_parent_data
,
4128 .num_parents
= ARRAY_SIZE(nna_clk_parent_data
),
4132 static struct clk_regmap sm1_nna_core_clk_div
= {
4133 .data
= &(struct clk_regmap_div_data
){
4134 .offset
= HHI_NNA_CLK_CNTL
,
4138 .hw
.init
= &(struct clk_init_data
){
4139 .name
= "nna_core_clk_div",
4140 .ops
= &clk_regmap_divider_ops
,
4141 .parent_hws
= (const struct clk_hw
*[]) {
4142 &sm1_nna_core_clk_sel
.hw
4145 .flags
= CLK_SET_RATE_PARENT
,
4149 static struct clk_regmap sm1_nna_core_clk
= {
4150 .data
= &(struct clk_regmap_gate_data
){
4151 .offset
= HHI_NNA_CLK_CNTL
,
4154 .hw
.init
= &(struct clk_init_data
){
4155 .name
= "nna_core_clk",
4156 .ops
= &clk_regmap_gate_ops
,
4157 .parent_hws
= (const struct clk_hw
*[]) {
4158 &sm1_nna_core_clk_div
.hw
4161 .flags
= CLK_SET_RATE_PARENT
,
4165 #define MESON_GATE(_name, _reg, _bit) \
4166 MESON_PCLK(_name, _reg, _bit, &g12a_clk81.hw)
4168 #define MESON_GATE_RO(_name, _reg, _bit) \
4169 MESON_PCLK_RO(_name, _reg, _bit, &g12a_clk81.hw)
4171 /* Everything Else (EE) domain gates */
4172 static MESON_GATE(g12a_ddr
, HHI_GCLK_MPEG0
, 0);
4173 static MESON_GATE(g12a_dos
, HHI_GCLK_MPEG0
, 1);
4174 static MESON_GATE(g12a_audio_locker
, HHI_GCLK_MPEG0
, 2);
4175 static MESON_GATE(g12a_mipi_dsi_host
, HHI_GCLK_MPEG0
, 3);
4176 static MESON_GATE(g12a_eth_phy
, HHI_GCLK_MPEG0
, 4);
4177 static MESON_GATE(g12a_isa
, HHI_GCLK_MPEG0
, 5);
4178 static MESON_GATE(g12a_pl301
, HHI_GCLK_MPEG0
, 6);
4179 static MESON_GATE(g12a_periphs
, HHI_GCLK_MPEG0
, 7);
4180 static MESON_GATE(g12a_spicc_0
, HHI_GCLK_MPEG0
, 8);
4181 static MESON_GATE(g12a_i2c
, HHI_GCLK_MPEG0
, 9);
4182 static MESON_GATE(g12a_sana
, HHI_GCLK_MPEG0
, 10);
4183 static MESON_GATE(g12a_sd
, HHI_GCLK_MPEG0
, 11);
4184 static MESON_GATE(g12a_rng0
, HHI_GCLK_MPEG0
, 12);
4185 static MESON_GATE(g12a_uart0
, HHI_GCLK_MPEG0
, 13);
4186 static MESON_GATE(g12a_spicc_1
, HHI_GCLK_MPEG0
, 14);
4187 static MESON_GATE(g12a_hiu_reg
, HHI_GCLK_MPEG0
, 19);
4188 static MESON_GATE(g12a_mipi_dsi_phy
, HHI_GCLK_MPEG0
, 20);
4189 static MESON_GATE(g12a_assist_misc
, HHI_GCLK_MPEG0
, 23);
4190 static MESON_GATE(g12a_emmc_a
, HHI_GCLK_MPEG0
, 4);
4191 static MESON_GATE(g12a_emmc_b
, HHI_GCLK_MPEG0
, 25);
4192 static MESON_GATE(g12a_emmc_c
, HHI_GCLK_MPEG0
, 26);
4193 static MESON_GATE(g12a_audio_codec
, HHI_GCLK_MPEG0
, 28);
4195 static MESON_GATE(g12a_audio
, HHI_GCLK_MPEG1
, 0);
4196 static MESON_GATE(g12a_eth_core
, HHI_GCLK_MPEG1
, 3);
4197 static MESON_GATE(g12a_demux
, HHI_GCLK_MPEG1
, 4);
4198 static MESON_GATE(g12a_audio_ififo
, HHI_GCLK_MPEG1
, 11);
4199 static MESON_GATE(g12a_adc
, HHI_GCLK_MPEG1
, 13);
4200 static MESON_GATE(g12a_uart1
, HHI_GCLK_MPEG1
, 16);
4201 static MESON_GATE(g12a_g2d
, HHI_GCLK_MPEG1
, 20);
4202 static MESON_GATE(g12a_reset
, HHI_GCLK_MPEG1
, 23);
4203 static MESON_GATE(g12a_pcie_comb
, HHI_GCLK_MPEG1
, 24);
4204 static MESON_GATE(g12a_parser
, HHI_GCLK_MPEG1
, 25);
4205 static MESON_GATE(g12a_usb_general
, HHI_GCLK_MPEG1
, 26);
4206 static MESON_GATE(g12a_pcie_phy
, HHI_GCLK_MPEG1
, 27);
4207 static MESON_GATE(g12a_ahb_arb0
, HHI_GCLK_MPEG1
, 29);
4209 static MESON_GATE(g12a_ahb_data_bus
, HHI_GCLK_MPEG2
, 1);
4210 static MESON_GATE(g12a_ahb_ctrl_bus
, HHI_GCLK_MPEG2
, 2);
4211 static MESON_GATE(g12a_htx_hdcp22
, HHI_GCLK_MPEG2
, 3);
4212 static MESON_GATE(g12a_htx_pclk
, HHI_GCLK_MPEG2
, 4);
4213 static MESON_GATE(g12a_bt656
, HHI_GCLK_MPEG2
, 6);
4214 static MESON_GATE(g12a_usb1_to_ddr
, HHI_GCLK_MPEG2
, 8);
4215 static MESON_GATE(g12a_mmc_pclk
, HHI_GCLK_MPEG2
, 11);
4216 static MESON_GATE(g12a_uart2
, HHI_GCLK_MPEG2
, 15);
4217 static MESON_GATE(g12a_vpu_intr
, HHI_GCLK_MPEG2
, 25);
4218 static MESON_GATE(g12a_gic
, HHI_GCLK_MPEG2
, 30);
4220 static MESON_GATE(g12a_vclk2_venci0
, HHI_GCLK_OTHER
, 1);
4221 static MESON_GATE(g12a_vclk2_venci1
, HHI_GCLK_OTHER
, 2);
4222 static MESON_GATE(g12a_vclk2_vencp0
, HHI_GCLK_OTHER
, 3);
4223 static MESON_GATE(g12a_vclk2_vencp1
, HHI_GCLK_OTHER
, 4);
4224 static MESON_GATE(g12a_vclk2_venct0
, HHI_GCLK_OTHER
, 5);
4225 static MESON_GATE(g12a_vclk2_venct1
, HHI_GCLK_OTHER
, 6);
4226 static MESON_GATE(g12a_vclk2_other
, HHI_GCLK_OTHER
, 7);
4227 static MESON_GATE(g12a_vclk2_enci
, HHI_GCLK_OTHER
, 8);
4228 static MESON_GATE(g12a_vclk2_encp
, HHI_GCLK_OTHER
, 9);
4229 static MESON_GATE(g12a_dac_clk
, HHI_GCLK_OTHER
, 10);
4230 static MESON_GATE(g12a_aoclk_gate
, HHI_GCLK_OTHER
, 14);
4231 static MESON_GATE(g12a_iec958_gate
, HHI_GCLK_OTHER
, 16);
4232 static MESON_GATE(g12a_enc480p
, HHI_GCLK_OTHER
, 20);
4233 static MESON_GATE(g12a_rng1
, HHI_GCLK_OTHER
, 21);
4234 static MESON_GATE(g12a_vclk2_enct
, HHI_GCLK_OTHER
, 22);
4235 static MESON_GATE(g12a_vclk2_encl
, HHI_GCLK_OTHER
, 23);
4236 static MESON_GATE(g12a_vclk2_venclmmc
, HHI_GCLK_OTHER
, 24);
4237 static MESON_GATE(g12a_vclk2_vencl
, HHI_GCLK_OTHER
, 25);
4238 static MESON_GATE(g12a_vclk2_other1
, HHI_GCLK_OTHER
, 26);
4240 static MESON_GATE_RO(g12a_dma
, HHI_GCLK_OTHER2
, 0);
4241 static MESON_GATE_RO(g12a_efuse
, HHI_GCLK_OTHER2
, 1);
4242 static MESON_GATE_RO(g12a_rom_boot
, HHI_GCLK_OTHER2
, 2);
4243 static MESON_GATE_RO(g12a_reset_sec
, HHI_GCLK_OTHER2
, 3);
4244 static MESON_GATE_RO(g12a_sec_ahb_apb3
, HHI_GCLK_OTHER2
, 4);
4246 /* Array of all clocks provided by this provider */
4247 static struct clk_hw_onecell_data g12a_hw_onecell_data
= {
4249 [CLKID_SYS_PLL
] = &g12a_sys_pll
.hw
,
4250 [CLKID_FIXED_PLL
] = &g12a_fixed_pll
.hw
,
4251 [CLKID_FCLK_DIV2
] = &g12a_fclk_div2
.hw
,
4252 [CLKID_FCLK_DIV3
] = &g12a_fclk_div3
.hw
,
4253 [CLKID_FCLK_DIV4
] = &g12a_fclk_div4
.hw
,
4254 [CLKID_FCLK_DIV5
] = &g12a_fclk_div5
.hw
,
4255 [CLKID_FCLK_DIV7
] = &g12a_fclk_div7
.hw
,
4256 [CLKID_FCLK_DIV2P5
] = &g12a_fclk_div2p5
.hw
,
4257 [CLKID_GP0_PLL
] = &g12a_gp0_pll
.hw
,
4258 [CLKID_MPEG_SEL
] = &g12a_mpeg_clk_sel
.hw
,
4259 [CLKID_MPEG_DIV
] = &g12a_mpeg_clk_div
.hw
,
4260 [CLKID_CLK81
] = &g12a_clk81
.hw
,
4261 [CLKID_MPLL0
] = &g12a_mpll0
.hw
,
4262 [CLKID_MPLL1
] = &g12a_mpll1
.hw
,
4263 [CLKID_MPLL2
] = &g12a_mpll2
.hw
,
4264 [CLKID_MPLL3
] = &g12a_mpll3
.hw
,
4265 [CLKID_DDR
] = &g12a_ddr
.hw
,
4266 [CLKID_DOS
] = &g12a_dos
.hw
,
4267 [CLKID_AUDIO_LOCKER
] = &g12a_audio_locker
.hw
,
4268 [CLKID_MIPI_DSI_HOST
] = &g12a_mipi_dsi_host
.hw
,
4269 [CLKID_ETH_PHY
] = &g12a_eth_phy
.hw
,
4270 [CLKID_ISA
] = &g12a_isa
.hw
,
4271 [CLKID_PL301
] = &g12a_pl301
.hw
,
4272 [CLKID_PERIPHS
] = &g12a_periphs
.hw
,
4273 [CLKID_SPICC0
] = &g12a_spicc_0
.hw
,
4274 [CLKID_I2C
] = &g12a_i2c
.hw
,
4275 [CLKID_SANA
] = &g12a_sana
.hw
,
4276 [CLKID_SD
] = &g12a_sd
.hw
,
4277 [CLKID_RNG0
] = &g12a_rng0
.hw
,
4278 [CLKID_UART0
] = &g12a_uart0
.hw
,
4279 [CLKID_SPICC1
] = &g12a_spicc_1
.hw
,
4280 [CLKID_HIU_IFACE
] = &g12a_hiu_reg
.hw
,
4281 [CLKID_MIPI_DSI_PHY
] = &g12a_mipi_dsi_phy
.hw
,
4282 [CLKID_ASSIST_MISC
] = &g12a_assist_misc
.hw
,
4283 [CLKID_SD_EMMC_A
] = &g12a_emmc_a
.hw
,
4284 [CLKID_SD_EMMC_B
] = &g12a_emmc_b
.hw
,
4285 [CLKID_SD_EMMC_C
] = &g12a_emmc_c
.hw
,
4286 [CLKID_AUDIO_CODEC
] = &g12a_audio_codec
.hw
,
4287 [CLKID_AUDIO
] = &g12a_audio
.hw
,
4288 [CLKID_ETH
] = &g12a_eth_core
.hw
,
4289 [CLKID_DEMUX
] = &g12a_demux
.hw
,
4290 [CLKID_AUDIO_IFIFO
] = &g12a_audio_ififo
.hw
,
4291 [CLKID_ADC
] = &g12a_adc
.hw
,
4292 [CLKID_UART1
] = &g12a_uart1
.hw
,
4293 [CLKID_G2D
] = &g12a_g2d
.hw
,
4294 [CLKID_RESET
] = &g12a_reset
.hw
,
4295 [CLKID_PCIE_COMB
] = &g12a_pcie_comb
.hw
,
4296 [CLKID_PARSER
] = &g12a_parser
.hw
,
4297 [CLKID_USB
] = &g12a_usb_general
.hw
,
4298 [CLKID_PCIE_PHY
] = &g12a_pcie_phy
.hw
,
4299 [CLKID_AHB_ARB0
] = &g12a_ahb_arb0
.hw
,
4300 [CLKID_AHB_DATA_BUS
] = &g12a_ahb_data_bus
.hw
,
4301 [CLKID_AHB_CTRL_BUS
] = &g12a_ahb_ctrl_bus
.hw
,
4302 [CLKID_HTX_HDCP22
] = &g12a_htx_hdcp22
.hw
,
4303 [CLKID_HTX_PCLK
] = &g12a_htx_pclk
.hw
,
4304 [CLKID_BT656
] = &g12a_bt656
.hw
,
4305 [CLKID_USB1_DDR_BRIDGE
] = &g12a_usb1_to_ddr
.hw
,
4306 [CLKID_MMC_PCLK
] = &g12a_mmc_pclk
.hw
,
4307 [CLKID_UART2
] = &g12a_uart2
.hw
,
4308 [CLKID_VPU_INTR
] = &g12a_vpu_intr
.hw
,
4309 [CLKID_GIC
] = &g12a_gic
.hw
,
4310 [CLKID_SD_EMMC_A_CLK0_SEL
] = &g12a_sd_emmc_a_clk0_sel
.hw
,
4311 [CLKID_SD_EMMC_A_CLK0_DIV
] = &g12a_sd_emmc_a_clk0_div
.hw
,
4312 [CLKID_SD_EMMC_A_CLK0
] = &g12a_sd_emmc_a_clk0
.hw
,
4313 [CLKID_SD_EMMC_B_CLK0_SEL
] = &g12a_sd_emmc_b_clk0_sel
.hw
,
4314 [CLKID_SD_EMMC_B_CLK0_DIV
] = &g12a_sd_emmc_b_clk0_div
.hw
,
4315 [CLKID_SD_EMMC_B_CLK0
] = &g12a_sd_emmc_b_clk0
.hw
,
4316 [CLKID_SD_EMMC_C_CLK0_SEL
] = &g12a_sd_emmc_c_clk0_sel
.hw
,
4317 [CLKID_SD_EMMC_C_CLK0_DIV
] = &g12a_sd_emmc_c_clk0_div
.hw
,
4318 [CLKID_SD_EMMC_C_CLK0
] = &g12a_sd_emmc_c_clk0
.hw
,
4319 [CLKID_MPLL0_DIV
] = &g12a_mpll0_div
.hw
,
4320 [CLKID_MPLL1_DIV
] = &g12a_mpll1_div
.hw
,
4321 [CLKID_MPLL2_DIV
] = &g12a_mpll2_div
.hw
,
4322 [CLKID_MPLL3_DIV
] = &g12a_mpll3_div
.hw
,
4323 [CLKID_FCLK_DIV2_DIV
] = &g12a_fclk_div2_div
.hw
,
4324 [CLKID_FCLK_DIV3_DIV
] = &g12a_fclk_div3_div
.hw
,
4325 [CLKID_FCLK_DIV4_DIV
] = &g12a_fclk_div4_div
.hw
,
4326 [CLKID_FCLK_DIV5_DIV
] = &g12a_fclk_div5_div
.hw
,
4327 [CLKID_FCLK_DIV7_DIV
] = &g12a_fclk_div7_div
.hw
,
4328 [CLKID_FCLK_DIV2P5_DIV
] = &g12a_fclk_div2p5_div
.hw
,
4329 [CLKID_HIFI_PLL
] = &g12a_hifi_pll
.hw
,
4330 [CLKID_VCLK2_VENCI0
] = &g12a_vclk2_venci0
.hw
,
4331 [CLKID_VCLK2_VENCI1
] = &g12a_vclk2_venci1
.hw
,
4332 [CLKID_VCLK2_VENCP0
] = &g12a_vclk2_vencp0
.hw
,
4333 [CLKID_VCLK2_VENCP1
] = &g12a_vclk2_vencp1
.hw
,
4334 [CLKID_VCLK2_VENCT0
] = &g12a_vclk2_venct0
.hw
,
4335 [CLKID_VCLK2_VENCT1
] = &g12a_vclk2_venct1
.hw
,
4336 [CLKID_VCLK2_OTHER
] = &g12a_vclk2_other
.hw
,
4337 [CLKID_VCLK2_ENCI
] = &g12a_vclk2_enci
.hw
,
4338 [CLKID_VCLK2_ENCP
] = &g12a_vclk2_encp
.hw
,
4339 [CLKID_DAC_CLK
] = &g12a_dac_clk
.hw
,
4340 [CLKID_AOCLK
] = &g12a_aoclk_gate
.hw
,
4341 [CLKID_IEC958
] = &g12a_iec958_gate
.hw
,
4342 [CLKID_ENC480P
] = &g12a_enc480p
.hw
,
4343 [CLKID_RNG1
] = &g12a_rng1
.hw
,
4344 [CLKID_VCLK2_ENCT
] = &g12a_vclk2_enct
.hw
,
4345 [CLKID_VCLK2_ENCL
] = &g12a_vclk2_encl
.hw
,
4346 [CLKID_VCLK2_VENCLMMC
] = &g12a_vclk2_venclmmc
.hw
,
4347 [CLKID_VCLK2_VENCL
] = &g12a_vclk2_vencl
.hw
,
4348 [CLKID_VCLK2_OTHER1
] = &g12a_vclk2_other1
.hw
,
4349 [CLKID_FIXED_PLL_DCO
] = &g12a_fixed_pll_dco
.hw
,
4350 [CLKID_SYS_PLL_DCO
] = &g12a_sys_pll_dco
.hw
,
4351 [CLKID_GP0_PLL_DCO
] = &g12a_gp0_pll_dco
.hw
,
4352 [CLKID_HIFI_PLL_DCO
] = &g12a_hifi_pll_dco
.hw
,
4353 [CLKID_DMA
] = &g12a_dma
.hw
,
4354 [CLKID_EFUSE
] = &g12a_efuse
.hw
,
4355 [CLKID_ROM_BOOT
] = &g12a_rom_boot
.hw
,
4356 [CLKID_RESET_SEC
] = &g12a_reset_sec
.hw
,
4357 [CLKID_SEC_AHB_APB3
] = &g12a_sec_ahb_apb3
.hw
,
4358 [CLKID_MPLL_PREDIV
] = &g12a_mpll_prediv
.hw
,
4359 [CLKID_VPU_0_SEL
] = &g12a_vpu_0_sel
.hw
,
4360 [CLKID_VPU_0_DIV
] = &g12a_vpu_0_div
.hw
,
4361 [CLKID_VPU_0
] = &g12a_vpu_0
.hw
,
4362 [CLKID_VPU_1_SEL
] = &g12a_vpu_1_sel
.hw
,
4363 [CLKID_VPU_1_DIV
] = &g12a_vpu_1_div
.hw
,
4364 [CLKID_VPU_1
] = &g12a_vpu_1
.hw
,
4365 [CLKID_VPU
] = &g12a_vpu
.hw
,
4366 [CLKID_VAPB_0_SEL
] = &g12a_vapb_0_sel
.hw
,
4367 [CLKID_VAPB_0_DIV
] = &g12a_vapb_0_div
.hw
,
4368 [CLKID_VAPB_0
] = &g12a_vapb_0
.hw
,
4369 [CLKID_VAPB_1_SEL
] = &g12a_vapb_1_sel
.hw
,
4370 [CLKID_VAPB_1_DIV
] = &g12a_vapb_1_div
.hw
,
4371 [CLKID_VAPB_1
] = &g12a_vapb_1
.hw
,
4372 [CLKID_VAPB_SEL
] = &g12a_vapb_sel
.hw
,
4373 [CLKID_VAPB
] = &g12a_vapb
.hw
,
4374 [CLKID_HDMI_PLL_DCO
] = &g12a_hdmi_pll_dco
.hw
,
4375 [CLKID_HDMI_PLL_OD
] = &g12a_hdmi_pll_od
.hw
,
4376 [CLKID_HDMI_PLL_OD2
] = &g12a_hdmi_pll_od2
.hw
,
4377 [CLKID_HDMI_PLL
] = &g12a_hdmi_pll
.hw
,
4378 [CLKID_VID_PLL
] = &g12a_vid_pll_div
.hw
,
4379 [CLKID_VID_PLL_SEL
] = &g12a_vid_pll_sel
.hw
,
4380 [CLKID_VID_PLL_DIV
] = &g12a_vid_pll
.hw
,
4381 [CLKID_VCLK_SEL
] = &g12a_vclk_sel
.hw
,
4382 [CLKID_VCLK2_SEL
] = &g12a_vclk2_sel
.hw
,
4383 [CLKID_VCLK_INPUT
] = &g12a_vclk_input
.hw
,
4384 [CLKID_VCLK2_INPUT
] = &g12a_vclk2_input
.hw
,
4385 [CLKID_VCLK_DIV
] = &g12a_vclk_div
.hw
,
4386 [CLKID_VCLK2_DIV
] = &g12a_vclk2_div
.hw
,
4387 [CLKID_VCLK
] = &g12a_vclk
.hw
,
4388 [CLKID_VCLK2
] = &g12a_vclk2
.hw
,
4389 [CLKID_VCLK_DIV1
] = &g12a_vclk_div1
.hw
,
4390 [CLKID_VCLK_DIV2_EN
] = &g12a_vclk_div2_en
.hw
,
4391 [CLKID_VCLK_DIV4_EN
] = &g12a_vclk_div4_en
.hw
,
4392 [CLKID_VCLK_DIV6_EN
] = &g12a_vclk_div6_en
.hw
,
4393 [CLKID_VCLK_DIV12_EN
] = &g12a_vclk_div12_en
.hw
,
4394 [CLKID_VCLK2_DIV1
] = &g12a_vclk2_div1
.hw
,
4395 [CLKID_VCLK2_DIV2_EN
] = &g12a_vclk2_div2_en
.hw
,
4396 [CLKID_VCLK2_DIV4_EN
] = &g12a_vclk2_div4_en
.hw
,
4397 [CLKID_VCLK2_DIV6_EN
] = &g12a_vclk2_div6_en
.hw
,
4398 [CLKID_VCLK2_DIV12_EN
] = &g12a_vclk2_div12_en
.hw
,
4399 [CLKID_VCLK_DIV2
] = &g12a_vclk_div2
.hw
,
4400 [CLKID_VCLK_DIV4
] = &g12a_vclk_div4
.hw
,
4401 [CLKID_VCLK_DIV6
] = &g12a_vclk_div6
.hw
,
4402 [CLKID_VCLK_DIV12
] = &g12a_vclk_div12
.hw
,
4403 [CLKID_VCLK2_DIV2
] = &g12a_vclk2_div2
.hw
,
4404 [CLKID_VCLK2_DIV4
] = &g12a_vclk2_div4
.hw
,
4405 [CLKID_VCLK2_DIV6
] = &g12a_vclk2_div6
.hw
,
4406 [CLKID_VCLK2_DIV12
] = &g12a_vclk2_div12
.hw
,
4407 [CLKID_CTS_ENCI_SEL
] = &g12a_cts_enci_sel
.hw
,
4408 [CLKID_CTS_ENCP_SEL
] = &g12a_cts_encp_sel
.hw
,
4409 [CLKID_CTS_VDAC_SEL
] = &g12a_cts_vdac_sel
.hw
,
4410 [CLKID_HDMI_TX_SEL
] = &g12a_hdmi_tx_sel
.hw
,
4411 [CLKID_CTS_ENCI
] = &g12a_cts_enci
.hw
,
4412 [CLKID_CTS_ENCP
] = &g12a_cts_encp
.hw
,
4413 [CLKID_CTS_VDAC
] = &g12a_cts_vdac
.hw
,
4414 [CLKID_HDMI_TX
] = &g12a_hdmi_tx
.hw
,
4415 [CLKID_HDMI_SEL
] = &g12a_hdmi_sel
.hw
,
4416 [CLKID_HDMI_DIV
] = &g12a_hdmi_div
.hw
,
4417 [CLKID_HDMI
] = &g12a_hdmi
.hw
,
4418 [CLKID_MALI_0_SEL
] = &g12a_mali_0_sel
.hw
,
4419 [CLKID_MALI_0_DIV
] = &g12a_mali_0_div
.hw
,
4420 [CLKID_MALI_0
] = &g12a_mali_0
.hw
,
4421 [CLKID_MALI_1_SEL
] = &g12a_mali_1_sel
.hw
,
4422 [CLKID_MALI_1_DIV
] = &g12a_mali_1_div
.hw
,
4423 [CLKID_MALI_1
] = &g12a_mali_1
.hw
,
4424 [CLKID_MALI
] = &g12a_mali
.hw
,
4425 [CLKID_MPLL_50M_DIV
] = &g12a_mpll_50m_div
.hw
,
4426 [CLKID_MPLL_50M
] = &g12a_mpll_50m
.hw
,
4427 [CLKID_SYS_PLL_DIV16_EN
] = &g12a_sys_pll_div16_en
.hw
,
4428 [CLKID_SYS_PLL_DIV16
] = &g12a_sys_pll_div16
.hw
,
4429 [CLKID_CPU_CLK_DYN0_SEL
] = &g12a_cpu_clk_premux0
.hw
,
4430 [CLKID_CPU_CLK_DYN0_DIV
] = &g12a_cpu_clk_mux0_div
.hw
,
4431 [CLKID_CPU_CLK_DYN0
] = &g12a_cpu_clk_postmux0
.hw
,
4432 [CLKID_CPU_CLK_DYN1_SEL
] = &g12a_cpu_clk_premux1
.hw
,
4433 [CLKID_CPU_CLK_DYN1_DIV
] = &g12a_cpu_clk_mux1_div
.hw
,
4434 [CLKID_CPU_CLK_DYN1
] = &g12a_cpu_clk_postmux1
.hw
,
4435 [CLKID_CPU_CLK_DYN
] = &g12a_cpu_clk_dyn
.hw
,
4436 [CLKID_CPU_CLK
] = &g12a_cpu_clk
.hw
,
4437 [CLKID_CPU_CLK_DIV16_EN
] = &g12a_cpu_clk_div16_en
.hw
,
4438 [CLKID_CPU_CLK_DIV16
] = &g12a_cpu_clk_div16
.hw
,
4439 [CLKID_CPU_CLK_APB_DIV
] = &g12a_cpu_clk_apb_div
.hw
,
4440 [CLKID_CPU_CLK_APB
] = &g12a_cpu_clk_apb
.hw
,
4441 [CLKID_CPU_CLK_ATB_DIV
] = &g12a_cpu_clk_atb_div
.hw
,
4442 [CLKID_CPU_CLK_ATB
] = &g12a_cpu_clk_atb
.hw
,
4443 [CLKID_CPU_CLK_AXI_DIV
] = &g12a_cpu_clk_axi_div
.hw
,
4444 [CLKID_CPU_CLK_AXI
] = &g12a_cpu_clk_axi
.hw
,
4445 [CLKID_CPU_CLK_TRACE_DIV
] = &g12a_cpu_clk_trace_div
.hw
,
4446 [CLKID_CPU_CLK_TRACE
] = &g12a_cpu_clk_trace
.hw
,
4447 [CLKID_PCIE_PLL_DCO
] = &g12a_pcie_pll_dco
.hw
,
4448 [CLKID_PCIE_PLL_DCO_DIV2
] = &g12a_pcie_pll_dco_div2
.hw
,
4449 [CLKID_PCIE_PLL_OD
] = &g12a_pcie_pll_od
.hw
,
4450 [CLKID_PCIE_PLL
] = &g12a_pcie_pll
.hw
,
4451 [CLKID_VDEC_1_SEL
] = &g12a_vdec_1_sel
.hw
,
4452 [CLKID_VDEC_1_DIV
] = &g12a_vdec_1_div
.hw
,
4453 [CLKID_VDEC_1
] = &g12a_vdec_1
.hw
,
4454 [CLKID_VDEC_HEVC_SEL
] = &g12a_vdec_hevc_sel
.hw
,
4455 [CLKID_VDEC_HEVC_DIV
] = &g12a_vdec_hevc_div
.hw
,
4456 [CLKID_VDEC_HEVC
] = &g12a_vdec_hevc
.hw
,
4457 [CLKID_VDEC_HEVCF_SEL
] = &g12a_vdec_hevcf_sel
.hw
,
4458 [CLKID_VDEC_HEVCF_DIV
] = &g12a_vdec_hevcf_div
.hw
,
4459 [CLKID_VDEC_HEVCF
] = &g12a_vdec_hevcf
.hw
,
4460 [CLKID_TS_DIV
] = &g12a_ts_div
.hw
,
4461 [CLKID_TS
] = &g12a_ts
.hw
,
4462 [CLKID_SPICC0_SCLK_SEL
] = &g12a_spicc0_sclk_sel
.hw
,
4463 [CLKID_SPICC0_SCLK_DIV
] = &g12a_spicc0_sclk_div
.hw
,
4464 [CLKID_SPICC0_SCLK
] = &g12a_spicc0_sclk
.hw
,
4465 [CLKID_SPICC1_SCLK_SEL
] = &g12a_spicc1_sclk_sel
.hw
,
4466 [CLKID_SPICC1_SCLK_DIV
] = &g12a_spicc1_sclk_div
.hw
,
4467 [CLKID_SPICC1_SCLK
] = &g12a_spicc1_sclk
.hw
,
4468 [CLKID_MIPI_DSI_PXCLK_SEL
] = &g12a_mipi_dsi_pxclk_sel
.hw
,
4469 [CLKID_MIPI_DSI_PXCLK_DIV
] = &g12a_mipi_dsi_pxclk_div
.hw
,
4470 [CLKID_MIPI_DSI_PXCLK
] = &g12a_mipi_dsi_pxclk
.hw
,
4476 static struct clk_hw_onecell_data g12b_hw_onecell_data
= {
4478 [CLKID_SYS_PLL
] = &g12a_sys_pll
.hw
,
4479 [CLKID_FIXED_PLL
] = &g12a_fixed_pll
.hw
,
4480 [CLKID_FCLK_DIV2
] = &g12a_fclk_div2
.hw
,
4481 [CLKID_FCLK_DIV3
] = &g12a_fclk_div3
.hw
,
4482 [CLKID_FCLK_DIV4
] = &g12a_fclk_div4
.hw
,
4483 [CLKID_FCLK_DIV5
] = &g12a_fclk_div5
.hw
,
4484 [CLKID_FCLK_DIV7
] = &g12a_fclk_div7
.hw
,
4485 [CLKID_FCLK_DIV2P5
] = &g12a_fclk_div2p5
.hw
,
4486 [CLKID_GP0_PLL
] = &g12a_gp0_pll
.hw
,
4487 [CLKID_MPEG_SEL
] = &g12a_mpeg_clk_sel
.hw
,
4488 [CLKID_MPEG_DIV
] = &g12a_mpeg_clk_div
.hw
,
4489 [CLKID_CLK81
] = &g12a_clk81
.hw
,
4490 [CLKID_MPLL0
] = &g12a_mpll0
.hw
,
4491 [CLKID_MPLL1
] = &g12a_mpll1
.hw
,
4492 [CLKID_MPLL2
] = &g12a_mpll2
.hw
,
4493 [CLKID_MPLL3
] = &g12a_mpll3
.hw
,
4494 [CLKID_DDR
] = &g12a_ddr
.hw
,
4495 [CLKID_DOS
] = &g12a_dos
.hw
,
4496 [CLKID_AUDIO_LOCKER
] = &g12a_audio_locker
.hw
,
4497 [CLKID_MIPI_DSI_HOST
] = &g12a_mipi_dsi_host
.hw
,
4498 [CLKID_ETH_PHY
] = &g12a_eth_phy
.hw
,
4499 [CLKID_ISA
] = &g12a_isa
.hw
,
4500 [CLKID_PL301
] = &g12a_pl301
.hw
,
4501 [CLKID_PERIPHS
] = &g12a_periphs
.hw
,
4502 [CLKID_SPICC0
] = &g12a_spicc_0
.hw
,
4503 [CLKID_I2C
] = &g12a_i2c
.hw
,
4504 [CLKID_SANA
] = &g12a_sana
.hw
,
4505 [CLKID_SD
] = &g12a_sd
.hw
,
4506 [CLKID_RNG0
] = &g12a_rng0
.hw
,
4507 [CLKID_UART0
] = &g12a_uart0
.hw
,
4508 [CLKID_SPICC1
] = &g12a_spicc_1
.hw
,
4509 [CLKID_HIU_IFACE
] = &g12a_hiu_reg
.hw
,
4510 [CLKID_MIPI_DSI_PHY
] = &g12a_mipi_dsi_phy
.hw
,
4511 [CLKID_ASSIST_MISC
] = &g12a_assist_misc
.hw
,
4512 [CLKID_SD_EMMC_A
] = &g12a_emmc_a
.hw
,
4513 [CLKID_SD_EMMC_B
] = &g12a_emmc_b
.hw
,
4514 [CLKID_SD_EMMC_C
] = &g12a_emmc_c
.hw
,
4515 [CLKID_AUDIO_CODEC
] = &g12a_audio_codec
.hw
,
4516 [CLKID_AUDIO
] = &g12a_audio
.hw
,
4517 [CLKID_ETH
] = &g12a_eth_core
.hw
,
4518 [CLKID_DEMUX
] = &g12a_demux
.hw
,
4519 [CLKID_AUDIO_IFIFO
] = &g12a_audio_ififo
.hw
,
4520 [CLKID_ADC
] = &g12a_adc
.hw
,
4521 [CLKID_UART1
] = &g12a_uart1
.hw
,
4522 [CLKID_G2D
] = &g12a_g2d
.hw
,
4523 [CLKID_RESET
] = &g12a_reset
.hw
,
4524 [CLKID_PCIE_COMB
] = &g12a_pcie_comb
.hw
,
4525 [CLKID_PARSER
] = &g12a_parser
.hw
,
4526 [CLKID_USB
] = &g12a_usb_general
.hw
,
4527 [CLKID_PCIE_PHY
] = &g12a_pcie_phy
.hw
,
4528 [CLKID_AHB_ARB0
] = &g12a_ahb_arb0
.hw
,
4529 [CLKID_AHB_DATA_BUS
] = &g12a_ahb_data_bus
.hw
,
4530 [CLKID_AHB_CTRL_BUS
] = &g12a_ahb_ctrl_bus
.hw
,
4531 [CLKID_HTX_HDCP22
] = &g12a_htx_hdcp22
.hw
,
4532 [CLKID_HTX_PCLK
] = &g12a_htx_pclk
.hw
,
4533 [CLKID_BT656
] = &g12a_bt656
.hw
,
4534 [CLKID_USB1_DDR_BRIDGE
] = &g12a_usb1_to_ddr
.hw
,
4535 [CLKID_MMC_PCLK
] = &g12a_mmc_pclk
.hw
,
4536 [CLKID_UART2
] = &g12a_uart2
.hw
,
4537 [CLKID_VPU_INTR
] = &g12a_vpu_intr
.hw
,
4538 [CLKID_GIC
] = &g12a_gic
.hw
,
4539 [CLKID_SD_EMMC_A_CLK0_SEL
] = &g12a_sd_emmc_a_clk0_sel
.hw
,
4540 [CLKID_SD_EMMC_A_CLK0_DIV
] = &g12a_sd_emmc_a_clk0_div
.hw
,
4541 [CLKID_SD_EMMC_A_CLK0
] = &g12a_sd_emmc_a_clk0
.hw
,
4542 [CLKID_SD_EMMC_B_CLK0_SEL
] = &g12a_sd_emmc_b_clk0_sel
.hw
,
4543 [CLKID_SD_EMMC_B_CLK0_DIV
] = &g12a_sd_emmc_b_clk0_div
.hw
,
4544 [CLKID_SD_EMMC_B_CLK0
] = &g12a_sd_emmc_b_clk0
.hw
,
4545 [CLKID_SD_EMMC_C_CLK0_SEL
] = &g12a_sd_emmc_c_clk0_sel
.hw
,
4546 [CLKID_SD_EMMC_C_CLK0_DIV
] = &g12a_sd_emmc_c_clk0_div
.hw
,
4547 [CLKID_SD_EMMC_C_CLK0
] = &g12a_sd_emmc_c_clk0
.hw
,
4548 [CLKID_MPLL0_DIV
] = &g12a_mpll0_div
.hw
,
4549 [CLKID_MPLL1_DIV
] = &g12a_mpll1_div
.hw
,
4550 [CLKID_MPLL2_DIV
] = &g12a_mpll2_div
.hw
,
4551 [CLKID_MPLL3_DIV
] = &g12a_mpll3_div
.hw
,
4552 [CLKID_FCLK_DIV2_DIV
] = &g12a_fclk_div2_div
.hw
,
4553 [CLKID_FCLK_DIV3_DIV
] = &g12a_fclk_div3_div
.hw
,
4554 [CLKID_FCLK_DIV4_DIV
] = &g12a_fclk_div4_div
.hw
,
4555 [CLKID_FCLK_DIV5_DIV
] = &g12a_fclk_div5_div
.hw
,
4556 [CLKID_FCLK_DIV7_DIV
] = &g12a_fclk_div7_div
.hw
,
4557 [CLKID_FCLK_DIV2P5_DIV
] = &g12a_fclk_div2p5_div
.hw
,
4558 [CLKID_HIFI_PLL
] = &g12a_hifi_pll
.hw
,
4559 [CLKID_VCLK2_VENCI0
] = &g12a_vclk2_venci0
.hw
,
4560 [CLKID_VCLK2_VENCI1
] = &g12a_vclk2_venci1
.hw
,
4561 [CLKID_VCLK2_VENCP0
] = &g12a_vclk2_vencp0
.hw
,
4562 [CLKID_VCLK2_VENCP1
] = &g12a_vclk2_vencp1
.hw
,
4563 [CLKID_VCLK2_VENCT0
] = &g12a_vclk2_venct0
.hw
,
4564 [CLKID_VCLK2_VENCT1
] = &g12a_vclk2_venct1
.hw
,
4565 [CLKID_VCLK2_OTHER
] = &g12a_vclk2_other
.hw
,
4566 [CLKID_VCLK2_ENCI
] = &g12a_vclk2_enci
.hw
,
4567 [CLKID_VCLK2_ENCP
] = &g12a_vclk2_encp
.hw
,
4568 [CLKID_DAC_CLK
] = &g12a_dac_clk
.hw
,
4569 [CLKID_AOCLK
] = &g12a_aoclk_gate
.hw
,
4570 [CLKID_IEC958
] = &g12a_iec958_gate
.hw
,
4571 [CLKID_ENC480P
] = &g12a_enc480p
.hw
,
4572 [CLKID_RNG1
] = &g12a_rng1
.hw
,
4573 [CLKID_VCLK2_ENCT
] = &g12a_vclk2_enct
.hw
,
4574 [CLKID_VCLK2_ENCL
] = &g12a_vclk2_encl
.hw
,
4575 [CLKID_VCLK2_VENCLMMC
] = &g12a_vclk2_venclmmc
.hw
,
4576 [CLKID_VCLK2_VENCL
] = &g12a_vclk2_vencl
.hw
,
4577 [CLKID_VCLK2_OTHER1
] = &g12a_vclk2_other1
.hw
,
4578 [CLKID_FIXED_PLL_DCO
] = &g12a_fixed_pll_dco
.hw
,
4579 [CLKID_SYS_PLL_DCO
] = &g12a_sys_pll_dco
.hw
,
4580 [CLKID_GP0_PLL_DCO
] = &g12a_gp0_pll_dco
.hw
,
4581 [CLKID_HIFI_PLL_DCO
] = &g12a_hifi_pll_dco
.hw
,
4582 [CLKID_DMA
] = &g12a_dma
.hw
,
4583 [CLKID_EFUSE
] = &g12a_efuse
.hw
,
4584 [CLKID_ROM_BOOT
] = &g12a_rom_boot
.hw
,
4585 [CLKID_RESET_SEC
] = &g12a_reset_sec
.hw
,
4586 [CLKID_SEC_AHB_APB3
] = &g12a_sec_ahb_apb3
.hw
,
4587 [CLKID_MPLL_PREDIV
] = &g12a_mpll_prediv
.hw
,
4588 [CLKID_VPU_0_SEL
] = &g12a_vpu_0_sel
.hw
,
4589 [CLKID_VPU_0_DIV
] = &g12a_vpu_0_div
.hw
,
4590 [CLKID_VPU_0
] = &g12a_vpu_0
.hw
,
4591 [CLKID_VPU_1_SEL
] = &g12a_vpu_1_sel
.hw
,
4592 [CLKID_VPU_1_DIV
] = &g12a_vpu_1_div
.hw
,
4593 [CLKID_VPU_1
] = &g12a_vpu_1
.hw
,
4594 [CLKID_VPU
] = &g12a_vpu
.hw
,
4595 [CLKID_VAPB_0_SEL
] = &g12a_vapb_0_sel
.hw
,
4596 [CLKID_VAPB_0_DIV
] = &g12a_vapb_0_div
.hw
,
4597 [CLKID_VAPB_0
] = &g12a_vapb_0
.hw
,
4598 [CLKID_VAPB_1_SEL
] = &g12a_vapb_1_sel
.hw
,
4599 [CLKID_VAPB_1_DIV
] = &g12a_vapb_1_div
.hw
,
4600 [CLKID_VAPB_1
] = &g12a_vapb_1
.hw
,
4601 [CLKID_VAPB_SEL
] = &g12a_vapb_sel
.hw
,
4602 [CLKID_VAPB
] = &g12a_vapb
.hw
,
4603 [CLKID_HDMI_PLL_DCO
] = &g12a_hdmi_pll_dco
.hw
,
4604 [CLKID_HDMI_PLL_OD
] = &g12a_hdmi_pll_od
.hw
,
4605 [CLKID_HDMI_PLL_OD2
] = &g12a_hdmi_pll_od2
.hw
,
4606 [CLKID_HDMI_PLL
] = &g12a_hdmi_pll
.hw
,
4607 [CLKID_VID_PLL
] = &g12a_vid_pll_div
.hw
,
4608 [CLKID_VID_PLL_SEL
] = &g12a_vid_pll_sel
.hw
,
4609 [CLKID_VID_PLL_DIV
] = &g12a_vid_pll
.hw
,
4610 [CLKID_VCLK_SEL
] = &g12a_vclk_sel
.hw
,
4611 [CLKID_VCLK2_SEL
] = &g12a_vclk2_sel
.hw
,
4612 [CLKID_VCLK_INPUT
] = &g12a_vclk_input
.hw
,
4613 [CLKID_VCLK2_INPUT
] = &g12a_vclk2_input
.hw
,
4614 [CLKID_VCLK_DIV
] = &g12a_vclk_div
.hw
,
4615 [CLKID_VCLK2_DIV
] = &g12a_vclk2_div
.hw
,
4616 [CLKID_VCLK
] = &g12a_vclk
.hw
,
4617 [CLKID_VCLK2
] = &g12a_vclk2
.hw
,
4618 [CLKID_VCLK_DIV1
] = &g12a_vclk_div1
.hw
,
4619 [CLKID_VCLK_DIV2_EN
] = &g12a_vclk_div2_en
.hw
,
4620 [CLKID_VCLK_DIV4_EN
] = &g12a_vclk_div4_en
.hw
,
4621 [CLKID_VCLK_DIV6_EN
] = &g12a_vclk_div6_en
.hw
,
4622 [CLKID_VCLK_DIV12_EN
] = &g12a_vclk_div12_en
.hw
,
4623 [CLKID_VCLK2_DIV1
] = &g12a_vclk2_div1
.hw
,
4624 [CLKID_VCLK2_DIV2_EN
] = &g12a_vclk2_div2_en
.hw
,
4625 [CLKID_VCLK2_DIV4_EN
] = &g12a_vclk2_div4_en
.hw
,
4626 [CLKID_VCLK2_DIV6_EN
] = &g12a_vclk2_div6_en
.hw
,
4627 [CLKID_VCLK2_DIV12_EN
] = &g12a_vclk2_div12_en
.hw
,
4628 [CLKID_VCLK_DIV2
] = &g12a_vclk_div2
.hw
,
4629 [CLKID_VCLK_DIV4
] = &g12a_vclk_div4
.hw
,
4630 [CLKID_VCLK_DIV6
] = &g12a_vclk_div6
.hw
,
4631 [CLKID_VCLK_DIV12
] = &g12a_vclk_div12
.hw
,
4632 [CLKID_VCLK2_DIV2
] = &g12a_vclk2_div2
.hw
,
4633 [CLKID_VCLK2_DIV4
] = &g12a_vclk2_div4
.hw
,
4634 [CLKID_VCLK2_DIV6
] = &g12a_vclk2_div6
.hw
,
4635 [CLKID_VCLK2_DIV12
] = &g12a_vclk2_div12
.hw
,
4636 [CLKID_CTS_ENCI_SEL
] = &g12a_cts_enci_sel
.hw
,
4637 [CLKID_CTS_ENCP_SEL
] = &g12a_cts_encp_sel
.hw
,
4638 [CLKID_CTS_VDAC_SEL
] = &g12a_cts_vdac_sel
.hw
,
4639 [CLKID_HDMI_TX_SEL
] = &g12a_hdmi_tx_sel
.hw
,
4640 [CLKID_CTS_ENCI
] = &g12a_cts_enci
.hw
,
4641 [CLKID_CTS_ENCP
] = &g12a_cts_encp
.hw
,
4642 [CLKID_CTS_VDAC
] = &g12a_cts_vdac
.hw
,
4643 [CLKID_HDMI_TX
] = &g12a_hdmi_tx
.hw
,
4644 [CLKID_HDMI_SEL
] = &g12a_hdmi_sel
.hw
,
4645 [CLKID_HDMI_DIV
] = &g12a_hdmi_div
.hw
,
4646 [CLKID_HDMI
] = &g12a_hdmi
.hw
,
4647 [CLKID_MALI_0_SEL
] = &g12a_mali_0_sel
.hw
,
4648 [CLKID_MALI_0_DIV
] = &g12a_mali_0_div
.hw
,
4649 [CLKID_MALI_0
] = &g12a_mali_0
.hw
,
4650 [CLKID_MALI_1_SEL
] = &g12a_mali_1_sel
.hw
,
4651 [CLKID_MALI_1_DIV
] = &g12a_mali_1_div
.hw
,
4652 [CLKID_MALI_1
] = &g12a_mali_1
.hw
,
4653 [CLKID_MALI
] = &g12a_mali
.hw
,
4654 [CLKID_MPLL_50M_DIV
] = &g12a_mpll_50m_div
.hw
,
4655 [CLKID_MPLL_50M
] = &g12a_mpll_50m
.hw
,
4656 [CLKID_SYS_PLL_DIV16_EN
] = &g12a_sys_pll_div16_en
.hw
,
4657 [CLKID_SYS_PLL_DIV16
] = &g12a_sys_pll_div16
.hw
,
4658 [CLKID_CPU_CLK_DYN0_SEL
] = &g12a_cpu_clk_premux0
.hw
,
4659 [CLKID_CPU_CLK_DYN0_DIV
] = &g12a_cpu_clk_mux0_div
.hw
,
4660 [CLKID_CPU_CLK_DYN0
] = &g12a_cpu_clk_postmux0
.hw
,
4661 [CLKID_CPU_CLK_DYN1_SEL
] = &g12a_cpu_clk_premux1
.hw
,
4662 [CLKID_CPU_CLK_DYN1_DIV
] = &g12a_cpu_clk_mux1_div
.hw
,
4663 [CLKID_CPU_CLK_DYN1
] = &g12a_cpu_clk_postmux1
.hw
,
4664 [CLKID_CPU_CLK_DYN
] = &g12a_cpu_clk_dyn
.hw
,
4665 [CLKID_CPU_CLK
] = &g12b_cpu_clk
.hw
,
4666 [CLKID_CPU_CLK_DIV16_EN
] = &g12a_cpu_clk_div16_en
.hw
,
4667 [CLKID_CPU_CLK_DIV16
] = &g12a_cpu_clk_div16
.hw
,
4668 [CLKID_CPU_CLK_APB_DIV
] = &g12a_cpu_clk_apb_div
.hw
,
4669 [CLKID_CPU_CLK_APB
] = &g12a_cpu_clk_apb
.hw
,
4670 [CLKID_CPU_CLK_ATB_DIV
] = &g12a_cpu_clk_atb_div
.hw
,
4671 [CLKID_CPU_CLK_ATB
] = &g12a_cpu_clk_atb
.hw
,
4672 [CLKID_CPU_CLK_AXI_DIV
] = &g12a_cpu_clk_axi_div
.hw
,
4673 [CLKID_CPU_CLK_AXI
] = &g12a_cpu_clk_axi
.hw
,
4674 [CLKID_CPU_CLK_TRACE_DIV
] = &g12a_cpu_clk_trace_div
.hw
,
4675 [CLKID_CPU_CLK_TRACE
] = &g12a_cpu_clk_trace
.hw
,
4676 [CLKID_PCIE_PLL_DCO
] = &g12a_pcie_pll_dco
.hw
,
4677 [CLKID_PCIE_PLL_DCO_DIV2
] = &g12a_pcie_pll_dco_div2
.hw
,
4678 [CLKID_PCIE_PLL_OD
] = &g12a_pcie_pll_od
.hw
,
4679 [CLKID_PCIE_PLL
] = &g12a_pcie_pll
.hw
,
4680 [CLKID_VDEC_1_SEL
] = &g12a_vdec_1_sel
.hw
,
4681 [CLKID_VDEC_1_DIV
] = &g12a_vdec_1_div
.hw
,
4682 [CLKID_VDEC_1
] = &g12a_vdec_1
.hw
,
4683 [CLKID_VDEC_HEVC_SEL
] = &g12a_vdec_hevc_sel
.hw
,
4684 [CLKID_VDEC_HEVC_DIV
] = &g12a_vdec_hevc_div
.hw
,
4685 [CLKID_VDEC_HEVC
] = &g12a_vdec_hevc
.hw
,
4686 [CLKID_VDEC_HEVCF_SEL
] = &g12a_vdec_hevcf_sel
.hw
,
4687 [CLKID_VDEC_HEVCF_DIV
] = &g12a_vdec_hevcf_div
.hw
,
4688 [CLKID_VDEC_HEVCF
] = &g12a_vdec_hevcf
.hw
,
4689 [CLKID_TS_DIV
] = &g12a_ts_div
.hw
,
4690 [CLKID_TS
] = &g12a_ts
.hw
,
4691 [CLKID_SYS1_PLL_DCO
] = &g12b_sys1_pll_dco
.hw
,
4692 [CLKID_SYS1_PLL
] = &g12b_sys1_pll
.hw
,
4693 [CLKID_SYS1_PLL_DIV16_EN
] = &g12b_sys1_pll_div16_en
.hw
,
4694 [CLKID_SYS1_PLL_DIV16
] = &g12b_sys1_pll_div16
.hw
,
4695 [CLKID_CPUB_CLK_DYN0_SEL
] = &g12b_cpub_clk_premux0
.hw
,
4696 [CLKID_CPUB_CLK_DYN0_DIV
] = &g12b_cpub_clk_mux0_div
.hw
,
4697 [CLKID_CPUB_CLK_DYN0
] = &g12b_cpub_clk_postmux0
.hw
,
4698 [CLKID_CPUB_CLK_DYN1_SEL
] = &g12b_cpub_clk_premux1
.hw
,
4699 [CLKID_CPUB_CLK_DYN1_DIV
] = &g12b_cpub_clk_mux1_div
.hw
,
4700 [CLKID_CPUB_CLK_DYN1
] = &g12b_cpub_clk_postmux1
.hw
,
4701 [CLKID_CPUB_CLK_DYN
] = &g12b_cpub_clk_dyn
.hw
,
4702 [CLKID_CPUB_CLK
] = &g12b_cpub_clk
.hw
,
4703 [CLKID_CPUB_CLK_DIV16_EN
] = &g12b_cpub_clk_div16_en
.hw
,
4704 [CLKID_CPUB_CLK_DIV16
] = &g12b_cpub_clk_div16
.hw
,
4705 [CLKID_CPUB_CLK_DIV2
] = &g12b_cpub_clk_div2
.hw
,
4706 [CLKID_CPUB_CLK_DIV3
] = &g12b_cpub_clk_div3
.hw
,
4707 [CLKID_CPUB_CLK_DIV4
] = &g12b_cpub_clk_div4
.hw
,
4708 [CLKID_CPUB_CLK_DIV5
] = &g12b_cpub_clk_div5
.hw
,
4709 [CLKID_CPUB_CLK_DIV6
] = &g12b_cpub_clk_div6
.hw
,
4710 [CLKID_CPUB_CLK_DIV7
] = &g12b_cpub_clk_div7
.hw
,
4711 [CLKID_CPUB_CLK_DIV8
] = &g12b_cpub_clk_div8
.hw
,
4712 [CLKID_CPUB_CLK_APB_SEL
] = &g12b_cpub_clk_apb_sel
.hw
,
4713 [CLKID_CPUB_CLK_APB
] = &g12b_cpub_clk_apb
.hw
,
4714 [CLKID_CPUB_CLK_ATB_SEL
] = &g12b_cpub_clk_atb_sel
.hw
,
4715 [CLKID_CPUB_CLK_ATB
] = &g12b_cpub_clk_atb
.hw
,
4716 [CLKID_CPUB_CLK_AXI_SEL
] = &g12b_cpub_clk_axi_sel
.hw
,
4717 [CLKID_CPUB_CLK_AXI
] = &g12b_cpub_clk_axi
.hw
,
4718 [CLKID_CPUB_CLK_TRACE_SEL
] = &g12b_cpub_clk_trace_sel
.hw
,
4719 [CLKID_CPUB_CLK_TRACE
] = &g12b_cpub_clk_trace
.hw
,
4720 [CLKID_SPICC0_SCLK_SEL
] = &g12a_spicc0_sclk_sel
.hw
,
4721 [CLKID_SPICC0_SCLK_DIV
] = &g12a_spicc0_sclk_div
.hw
,
4722 [CLKID_SPICC0_SCLK
] = &g12a_spicc0_sclk
.hw
,
4723 [CLKID_SPICC1_SCLK_SEL
] = &g12a_spicc1_sclk_sel
.hw
,
4724 [CLKID_SPICC1_SCLK_DIV
] = &g12a_spicc1_sclk_div
.hw
,
4725 [CLKID_SPICC1_SCLK
] = &g12a_spicc1_sclk
.hw
,
4726 [CLKID_MIPI_DSI_PXCLK_SEL
] = &g12a_mipi_dsi_pxclk_sel
.hw
,
4727 [CLKID_MIPI_DSI_PXCLK_DIV
] = &g12a_mipi_dsi_pxclk_div
.hw
,
4728 [CLKID_MIPI_DSI_PXCLK
] = &g12a_mipi_dsi_pxclk
.hw
,
4734 static struct clk_hw_onecell_data sm1_hw_onecell_data
= {
4736 [CLKID_SYS_PLL
] = &g12a_sys_pll
.hw
,
4737 [CLKID_FIXED_PLL
] = &g12a_fixed_pll
.hw
,
4738 [CLKID_FCLK_DIV2
] = &g12a_fclk_div2
.hw
,
4739 [CLKID_FCLK_DIV3
] = &g12a_fclk_div3
.hw
,
4740 [CLKID_FCLK_DIV4
] = &g12a_fclk_div4
.hw
,
4741 [CLKID_FCLK_DIV5
] = &g12a_fclk_div5
.hw
,
4742 [CLKID_FCLK_DIV7
] = &g12a_fclk_div7
.hw
,
4743 [CLKID_FCLK_DIV2P5
] = &g12a_fclk_div2p5
.hw
,
4744 [CLKID_GP0_PLL
] = &g12a_gp0_pll
.hw
,
4745 [CLKID_MPEG_SEL
] = &g12a_mpeg_clk_sel
.hw
,
4746 [CLKID_MPEG_DIV
] = &g12a_mpeg_clk_div
.hw
,
4747 [CLKID_CLK81
] = &g12a_clk81
.hw
,
4748 [CLKID_MPLL0
] = &g12a_mpll0
.hw
,
4749 [CLKID_MPLL1
] = &g12a_mpll1
.hw
,
4750 [CLKID_MPLL2
] = &g12a_mpll2
.hw
,
4751 [CLKID_MPLL3
] = &g12a_mpll3
.hw
,
4752 [CLKID_DDR
] = &g12a_ddr
.hw
,
4753 [CLKID_DOS
] = &g12a_dos
.hw
,
4754 [CLKID_AUDIO_LOCKER
] = &g12a_audio_locker
.hw
,
4755 [CLKID_MIPI_DSI_HOST
] = &g12a_mipi_dsi_host
.hw
,
4756 [CLKID_ETH_PHY
] = &g12a_eth_phy
.hw
,
4757 [CLKID_ISA
] = &g12a_isa
.hw
,
4758 [CLKID_PL301
] = &g12a_pl301
.hw
,
4759 [CLKID_PERIPHS
] = &g12a_periphs
.hw
,
4760 [CLKID_SPICC0
] = &g12a_spicc_0
.hw
,
4761 [CLKID_I2C
] = &g12a_i2c
.hw
,
4762 [CLKID_SANA
] = &g12a_sana
.hw
,
4763 [CLKID_SD
] = &g12a_sd
.hw
,
4764 [CLKID_RNG0
] = &g12a_rng0
.hw
,
4765 [CLKID_UART0
] = &g12a_uart0
.hw
,
4766 [CLKID_SPICC1
] = &g12a_spicc_1
.hw
,
4767 [CLKID_HIU_IFACE
] = &g12a_hiu_reg
.hw
,
4768 [CLKID_MIPI_DSI_PHY
] = &g12a_mipi_dsi_phy
.hw
,
4769 [CLKID_ASSIST_MISC
] = &g12a_assist_misc
.hw
,
4770 [CLKID_SD_EMMC_A
] = &g12a_emmc_a
.hw
,
4771 [CLKID_SD_EMMC_B
] = &g12a_emmc_b
.hw
,
4772 [CLKID_SD_EMMC_C
] = &g12a_emmc_c
.hw
,
4773 [CLKID_AUDIO_CODEC
] = &g12a_audio_codec
.hw
,
4774 [CLKID_AUDIO
] = &g12a_audio
.hw
,
4775 [CLKID_ETH
] = &g12a_eth_core
.hw
,
4776 [CLKID_DEMUX
] = &g12a_demux
.hw
,
4777 [CLKID_AUDIO_IFIFO
] = &g12a_audio_ififo
.hw
,
4778 [CLKID_ADC
] = &g12a_adc
.hw
,
4779 [CLKID_UART1
] = &g12a_uart1
.hw
,
4780 [CLKID_G2D
] = &g12a_g2d
.hw
,
4781 [CLKID_RESET
] = &g12a_reset
.hw
,
4782 [CLKID_PCIE_COMB
] = &g12a_pcie_comb
.hw
,
4783 [CLKID_PARSER
] = &g12a_parser
.hw
,
4784 [CLKID_USB
] = &g12a_usb_general
.hw
,
4785 [CLKID_PCIE_PHY
] = &g12a_pcie_phy
.hw
,
4786 [CLKID_AHB_ARB0
] = &g12a_ahb_arb0
.hw
,
4787 [CLKID_AHB_DATA_BUS
] = &g12a_ahb_data_bus
.hw
,
4788 [CLKID_AHB_CTRL_BUS
] = &g12a_ahb_ctrl_bus
.hw
,
4789 [CLKID_HTX_HDCP22
] = &g12a_htx_hdcp22
.hw
,
4790 [CLKID_HTX_PCLK
] = &g12a_htx_pclk
.hw
,
4791 [CLKID_BT656
] = &g12a_bt656
.hw
,
4792 [CLKID_USB1_DDR_BRIDGE
] = &g12a_usb1_to_ddr
.hw
,
4793 [CLKID_MMC_PCLK
] = &g12a_mmc_pclk
.hw
,
4794 [CLKID_UART2
] = &g12a_uart2
.hw
,
4795 [CLKID_VPU_INTR
] = &g12a_vpu_intr
.hw
,
4796 [CLKID_GIC
] = &g12a_gic
.hw
,
4797 [CLKID_SD_EMMC_A_CLK0_SEL
] = &g12a_sd_emmc_a_clk0_sel
.hw
,
4798 [CLKID_SD_EMMC_A_CLK0_DIV
] = &g12a_sd_emmc_a_clk0_div
.hw
,
4799 [CLKID_SD_EMMC_A_CLK0
] = &g12a_sd_emmc_a_clk0
.hw
,
4800 [CLKID_SD_EMMC_B_CLK0_SEL
] = &g12a_sd_emmc_b_clk0_sel
.hw
,
4801 [CLKID_SD_EMMC_B_CLK0_DIV
] = &g12a_sd_emmc_b_clk0_div
.hw
,
4802 [CLKID_SD_EMMC_B_CLK0
] = &g12a_sd_emmc_b_clk0
.hw
,
4803 [CLKID_SD_EMMC_C_CLK0_SEL
] = &g12a_sd_emmc_c_clk0_sel
.hw
,
4804 [CLKID_SD_EMMC_C_CLK0_DIV
] = &g12a_sd_emmc_c_clk0_div
.hw
,
4805 [CLKID_SD_EMMC_C_CLK0
] = &g12a_sd_emmc_c_clk0
.hw
,
4806 [CLKID_MPLL0_DIV
] = &g12a_mpll0_div
.hw
,
4807 [CLKID_MPLL1_DIV
] = &g12a_mpll1_div
.hw
,
4808 [CLKID_MPLL2_DIV
] = &g12a_mpll2_div
.hw
,
4809 [CLKID_MPLL3_DIV
] = &g12a_mpll3_div
.hw
,
4810 [CLKID_FCLK_DIV2_DIV
] = &g12a_fclk_div2_div
.hw
,
4811 [CLKID_FCLK_DIV3_DIV
] = &g12a_fclk_div3_div
.hw
,
4812 [CLKID_FCLK_DIV4_DIV
] = &g12a_fclk_div4_div
.hw
,
4813 [CLKID_FCLK_DIV5_DIV
] = &g12a_fclk_div5_div
.hw
,
4814 [CLKID_FCLK_DIV7_DIV
] = &g12a_fclk_div7_div
.hw
,
4815 [CLKID_FCLK_DIV2P5_DIV
] = &g12a_fclk_div2p5_div
.hw
,
4816 [CLKID_HIFI_PLL
] = &g12a_hifi_pll
.hw
,
4817 [CLKID_VCLK2_VENCI0
] = &g12a_vclk2_venci0
.hw
,
4818 [CLKID_VCLK2_VENCI1
] = &g12a_vclk2_venci1
.hw
,
4819 [CLKID_VCLK2_VENCP0
] = &g12a_vclk2_vencp0
.hw
,
4820 [CLKID_VCLK2_VENCP1
] = &g12a_vclk2_vencp1
.hw
,
4821 [CLKID_VCLK2_VENCT0
] = &g12a_vclk2_venct0
.hw
,
4822 [CLKID_VCLK2_VENCT1
] = &g12a_vclk2_venct1
.hw
,
4823 [CLKID_VCLK2_OTHER
] = &g12a_vclk2_other
.hw
,
4824 [CLKID_VCLK2_ENCI
] = &g12a_vclk2_enci
.hw
,
4825 [CLKID_VCLK2_ENCP
] = &g12a_vclk2_encp
.hw
,
4826 [CLKID_DAC_CLK
] = &g12a_dac_clk
.hw
,
4827 [CLKID_AOCLK
] = &g12a_aoclk_gate
.hw
,
4828 [CLKID_IEC958
] = &g12a_iec958_gate
.hw
,
4829 [CLKID_ENC480P
] = &g12a_enc480p
.hw
,
4830 [CLKID_RNG1
] = &g12a_rng1
.hw
,
4831 [CLKID_VCLK2_ENCT
] = &g12a_vclk2_enct
.hw
,
4832 [CLKID_VCLK2_ENCL
] = &g12a_vclk2_encl
.hw
,
4833 [CLKID_VCLK2_VENCLMMC
] = &g12a_vclk2_venclmmc
.hw
,
4834 [CLKID_VCLK2_VENCL
] = &g12a_vclk2_vencl
.hw
,
4835 [CLKID_VCLK2_OTHER1
] = &g12a_vclk2_other1
.hw
,
4836 [CLKID_FIXED_PLL_DCO
] = &g12a_fixed_pll_dco
.hw
,
4837 [CLKID_SYS_PLL_DCO
] = &g12a_sys_pll_dco
.hw
,
4838 [CLKID_GP0_PLL_DCO
] = &g12a_gp0_pll_dco
.hw
,
4839 [CLKID_HIFI_PLL_DCO
] = &g12a_hifi_pll_dco
.hw
,
4840 [CLKID_DMA
] = &g12a_dma
.hw
,
4841 [CLKID_EFUSE
] = &g12a_efuse
.hw
,
4842 [CLKID_ROM_BOOT
] = &g12a_rom_boot
.hw
,
4843 [CLKID_RESET_SEC
] = &g12a_reset_sec
.hw
,
4844 [CLKID_SEC_AHB_APB3
] = &g12a_sec_ahb_apb3
.hw
,
4845 [CLKID_MPLL_PREDIV
] = &g12a_mpll_prediv
.hw
,
4846 [CLKID_VPU_0_SEL
] = &g12a_vpu_0_sel
.hw
,
4847 [CLKID_VPU_0_DIV
] = &g12a_vpu_0_div
.hw
,
4848 [CLKID_VPU_0
] = &g12a_vpu_0
.hw
,
4849 [CLKID_VPU_1_SEL
] = &g12a_vpu_1_sel
.hw
,
4850 [CLKID_VPU_1_DIV
] = &g12a_vpu_1_div
.hw
,
4851 [CLKID_VPU_1
] = &g12a_vpu_1
.hw
,
4852 [CLKID_VPU
] = &g12a_vpu
.hw
,
4853 [CLKID_VAPB_0_SEL
] = &g12a_vapb_0_sel
.hw
,
4854 [CLKID_VAPB_0_DIV
] = &g12a_vapb_0_div
.hw
,
4855 [CLKID_VAPB_0
] = &g12a_vapb_0
.hw
,
4856 [CLKID_VAPB_1_SEL
] = &g12a_vapb_1_sel
.hw
,
4857 [CLKID_VAPB_1_DIV
] = &g12a_vapb_1_div
.hw
,
4858 [CLKID_VAPB_1
] = &g12a_vapb_1
.hw
,
4859 [CLKID_VAPB_SEL
] = &g12a_vapb_sel
.hw
,
4860 [CLKID_VAPB
] = &g12a_vapb
.hw
,
4861 [CLKID_HDMI_PLL_DCO
] = &g12a_hdmi_pll_dco
.hw
,
4862 [CLKID_HDMI_PLL_OD
] = &g12a_hdmi_pll_od
.hw
,
4863 [CLKID_HDMI_PLL_OD2
] = &g12a_hdmi_pll_od2
.hw
,
4864 [CLKID_HDMI_PLL
] = &g12a_hdmi_pll
.hw
,
4865 [CLKID_VID_PLL
] = &g12a_vid_pll_div
.hw
,
4866 [CLKID_VID_PLL_SEL
] = &g12a_vid_pll_sel
.hw
,
4867 [CLKID_VID_PLL_DIV
] = &g12a_vid_pll
.hw
,
4868 [CLKID_VCLK_SEL
] = &g12a_vclk_sel
.hw
,
4869 [CLKID_VCLK2_SEL
] = &g12a_vclk2_sel
.hw
,
4870 [CLKID_VCLK_INPUT
] = &g12a_vclk_input
.hw
,
4871 [CLKID_VCLK2_INPUT
] = &g12a_vclk2_input
.hw
,
4872 [CLKID_VCLK_DIV
] = &g12a_vclk_div
.hw
,
4873 [CLKID_VCLK2_DIV
] = &g12a_vclk2_div
.hw
,
4874 [CLKID_VCLK
] = &g12a_vclk
.hw
,
4875 [CLKID_VCLK2
] = &g12a_vclk2
.hw
,
4876 [CLKID_VCLK_DIV1
] = &g12a_vclk_div1
.hw
,
4877 [CLKID_VCLK_DIV2_EN
] = &g12a_vclk_div2_en
.hw
,
4878 [CLKID_VCLK_DIV4_EN
] = &g12a_vclk_div4_en
.hw
,
4879 [CLKID_VCLK_DIV6_EN
] = &g12a_vclk_div6_en
.hw
,
4880 [CLKID_VCLK_DIV12_EN
] = &g12a_vclk_div12_en
.hw
,
4881 [CLKID_VCLK2_DIV1
] = &g12a_vclk2_div1
.hw
,
4882 [CLKID_VCLK2_DIV2_EN
] = &g12a_vclk2_div2_en
.hw
,
4883 [CLKID_VCLK2_DIV4_EN
] = &g12a_vclk2_div4_en
.hw
,
4884 [CLKID_VCLK2_DIV6_EN
] = &g12a_vclk2_div6_en
.hw
,
4885 [CLKID_VCLK2_DIV12_EN
] = &g12a_vclk2_div12_en
.hw
,
4886 [CLKID_VCLK_DIV2
] = &g12a_vclk_div2
.hw
,
4887 [CLKID_VCLK_DIV4
] = &g12a_vclk_div4
.hw
,
4888 [CLKID_VCLK_DIV6
] = &g12a_vclk_div6
.hw
,
4889 [CLKID_VCLK_DIV12
] = &g12a_vclk_div12
.hw
,
4890 [CLKID_VCLK2_DIV2
] = &g12a_vclk2_div2
.hw
,
4891 [CLKID_VCLK2_DIV4
] = &g12a_vclk2_div4
.hw
,
4892 [CLKID_VCLK2_DIV6
] = &g12a_vclk2_div6
.hw
,
4893 [CLKID_VCLK2_DIV12
] = &g12a_vclk2_div12
.hw
,
4894 [CLKID_CTS_ENCI_SEL
] = &g12a_cts_enci_sel
.hw
,
4895 [CLKID_CTS_ENCP_SEL
] = &g12a_cts_encp_sel
.hw
,
4896 [CLKID_CTS_VDAC_SEL
] = &g12a_cts_vdac_sel
.hw
,
4897 [CLKID_HDMI_TX_SEL
] = &g12a_hdmi_tx_sel
.hw
,
4898 [CLKID_CTS_ENCI
] = &g12a_cts_enci
.hw
,
4899 [CLKID_CTS_ENCP
] = &g12a_cts_encp
.hw
,
4900 [CLKID_CTS_VDAC
] = &g12a_cts_vdac
.hw
,
4901 [CLKID_HDMI_TX
] = &g12a_hdmi_tx
.hw
,
4902 [CLKID_HDMI_SEL
] = &g12a_hdmi_sel
.hw
,
4903 [CLKID_HDMI_DIV
] = &g12a_hdmi_div
.hw
,
4904 [CLKID_HDMI
] = &g12a_hdmi
.hw
,
4905 [CLKID_MALI_0_SEL
] = &g12a_mali_0_sel
.hw
,
4906 [CLKID_MALI_0_DIV
] = &g12a_mali_0_div
.hw
,
4907 [CLKID_MALI_0
] = &g12a_mali_0
.hw
,
4908 [CLKID_MALI_1_SEL
] = &g12a_mali_1_sel
.hw
,
4909 [CLKID_MALI_1_DIV
] = &g12a_mali_1_div
.hw
,
4910 [CLKID_MALI_1
] = &g12a_mali_1
.hw
,
4911 [CLKID_MALI
] = &g12a_mali
.hw
,
4912 [CLKID_MPLL_50M_DIV
] = &g12a_mpll_50m_div
.hw
,
4913 [CLKID_MPLL_50M
] = &g12a_mpll_50m
.hw
,
4914 [CLKID_SYS_PLL_DIV16_EN
] = &g12a_sys_pll_div16_en
.hw
,
4915 [CLKID_SYS_PLL_DIV16
] = &g12a_sys_pll_div16
.hw
,
4916 [CLKID_CPU_CLK_DYN0_SEL
] = &g12a_cpu_clk_premux0
.hw
,
4917 [CLKID_CPU_CLK_DYN0_DIV
] = &g12a_cpu_clk_mux0_div
.hw
,
4918 [CLKID_CPU_CLK_DYN0
] = &g12a_cpu_clk_postmux0
.hw
,
4919 [CLKID_CPU_CLK_DYN1_SEL
] = &g12a_cpu_clk_premux1
.hw
,
4920 [CLKID_CPU_CLK_DYN1_DIV
] = &g12a_cpu_clk_mux1_div
.hw
,
4921 [CLKID_CPU_CLK_DYN1
] = &g12a_cpu_clk_postmux1
.hw
,
4922 [CLKID_CPU_CLK_DYN
] = &g12a_cpu_clk_dyn
.hw
,
4923 [CLKID_CPU_CLK
] = &g12a_cpu_clk
.hw
,
4924 [CLKID_CPU_CLK_DIV16_EN
] = &g12a_cpu_clk_div16_en
.hw
,
4925 [CLKID_CPU_CLK_DIV16
] = &g12a_cpu_clk_div16
.hw
,
4926 [CLKID_CPU_CLK_APB_DIV
] = &g12a_cpu_clk_apb_div
.hw
,
4927 [CLKID_CPU_CLK_APB
] = &g12a_cpu_clk_apb
.hw
,
4928 [CLKID_CPU_CLK_ATB_DIV
] = &g12a_cpu_clk_atb_div
.hw
,
4929 [CLKID_CPU_CLK_ATB
] = &g12a_cpu_clk_atb
.hw
,
4930 [CLKID_CPU_CLK_AXI_DIV
] = &g12a_cpu_clk_axi_div
.hw
,
4931 [CLKID_CPU_CLK_AXI
] = &g12a_cpu_clk_axi
.hw
,
4932 [CLKID_CPU_CLK_TRACE_DIV
] = &g12a_cpu_clk_trace_div
.hw
,
4933 [CLKID_CPU_CLK_TRACE
] = &g12a_cpu_clk_trace
.hw
,
4934 [CLKID_PCIE_PLL_DCO
] = &g12a_pcie_pll_dco
.hw
,
4935 [CLKID_PCIE_PLL_DCO_DIV2
] = &g12a_pcie_pll_dco_div2
.hw
,
4936 [CLKID_PCIE_PLL_OD
] = &g12a_pcie_pll_od
.hw
,
4937 [CLKID_PCIE_PLL
] = &g12a_pcie_pll
.hw
,
4938 [CLKID_VDEC_1_SEL
] = &g12a_vdec_1_sel
.hw
,
4939 [CLKID_VDEC_1_DIV
] = &g12a_vdec_1_div
.hw
,
4940 [CLKID_VDEC_1
] = &g12a_vdec_1
.hw
,
4941 [CLKID_VDEC_HEVC_SEL
] = &g12a_vdec_hevc_sel
.hw
,
4942 [CLKID_VDEC_HEVC_DIV
] = &g12a_vdec_hevc_div
.hw
,
4943 [CLKID_VDEC_HEVC
] = &g12a_vdec_hevc
.hw
,
4944 [CLKID_VDEC_HEVCF_SEL
] = &g12a_vdec_hevcf_sel
.hw
,
4945 [CLKID_VDEC_HEVCF_DIV
] = &g12a_vdec_hevcf_div
.hw
,
4946 [CLKID_VDEC_HEVCF
] = &g12a_vdec_hevcf
.hw
,
4947 [CLKID_TS_DIV
] = &g12a_ts_div
.hw
,
4948 [CLKID_TS
] = &g12a_ts
.hw
,
4949 [CLKID_GP1_PLL_DCO
] = &sm1_gp1_pll_dco
.hw
,
4950 [CLKID_GP1_PLL
] = &sm1_gp1_pll
.hw
,
4951 [CLKID_DSU_CLK_DYN0_SEL
] = &sm1_dsu_clk_premux0
.hw
,
4952 [CLKID_DSU_CLK_DYN0_DIV
] = &sm1_dsu_clk_premux1
.hw
,
4953 [CLKID_DSU_CLK_DYN0
] = &sm1_dsu_clk_mux0_div
.hw
,
4954 [CLKID_DSU_CLK_DYN1_SEL
] = &sm1_dsu_clk_postmux0
.hw
,
4955 [CLKID_DSU_CLK_DYN1_DIV
] = &sm1_dsu_clk_mux1_div
.hw
,
4956 [CLKID_DSU_CLK_DYN1
] = &sm1_dsu_clk_postmux1
.hw
,
4957 [CLKID_DSU_CLK_DYN
] = &sm1_dsu_clk_dyn
.hw
,
4958 [CLKID_DSU_CLK_FINAL
] = &sm1_dsu_final_clk
.hw
,
4959 [CLKID_DSU_CLK
] = &sm1_dsu_clk
.hw
,
4960 [CLKID_CPU1_CLK
] = &sm1_cpu1_clk
.hw
,
4961 [CLKID_CPU2_CLK
] = &sm1_cpu2_clk
.hw
,
4962 [CLKID_CPU3_CLK
] = &sm1_cpu3_clk
.hw
,
4963 [CLKID_SPICC0_SCLK_SEL
] = &g12a_spicc0_sclk_sel
.hw
,
4964 [CLKID_SPICC0_SCLK_DIV
] = &g12a_spicc0_sclk_div
.hw
,
4965 [CLKID_SPICC0_SCLK
] = &g12a_spicc0_sclk
.hw
,
4966 [CLKID_SPICC1_SCLK_SEL
] = &g12a_spicc1_sclk_sel
.hw
,
4967 [CLKID_SPICC1_SCLK_DIV
] = &g12a_spicc1_sclk_div
.hw
,
4968 [CLKID_SPICC1_SCLK
] = &g12a_spicc1_sclk
.hw
,
4969 [CLKID_NNA_AXI_CLK_SEL
] = &sm1_nna_axi_clk_sel
.hw
,
4970 [CLKID_NNA_AXI_CLK_DIV
] = &sm1_nna_axi_clk_div
.hw
,
4971 [CLKID_NNA_AXI_CLK
] = &sm1_nna_axi_clk
.hw
,
4972 [CLKID_NNA_CORE_CLK_SEL
] = &sm1_nna_core_clk_sel
.hw
,
4973 [CLKID_NNA_CORE_CLK_DIV
] = &sm1_nna_core_clk_div
.hw
,
4974 [CLKID_NNA_CORE_CLK
] = &sm1_nna_core_clk
.hw
,
4975 [CLKID_MIPI_DSI_PXCLK_SEL
] = &g12a_mipi_dsi_pxclk_sel
.hw
,
4976 [CLKID_MIPI_DSI_PXCLK_DIV
] = &g12a_mipi_dsi_pxclk_div
.hw
,
4977 [CLKID_MIPI_DSI_PXCLK
] = &g12a_mipi_dsi_pxclk
.hw
,
4983 /* Convenience table to populate regmap in .probe */
4984 static struct clk_regmap
*const g12a_clk_regmaps
[] = {
4989 &g12a_mipi_dsi_host
,
5031 &g12a_sd_emmc_a_clk0
,
5032 &g12a_sd_emmc_b_clk0
,
5033 &g12a_sd_emmc_c_clk0
,
5035 &g12a_sd_emmc_a_clk0_div
,
5036 &g12a_sd_emmc_b_clk0_div
,
5037 &g12a_sd_emmc_c_clk0_div
,
5039 &g12a_sd_emmc_a_clk0_sel
,
5040 &g12a_sd_emmc_b_clk0_sel
,
5041 &g12a_sd_emmc_c_clk0_sel
,
5070 &g12a_vclk2_venclmmc
,
5073 &g12a_fixed_pll_dco
,
5122 &g12a_vclk_div12_en
,
5124 &g12a_vclk2_div2_en
,
5125 &g12a_vclk2_div4_en
,
5126 &g12a_vclk2_div6_en
,
5127 &g12a_vclk2_div12_en
,
5147 &g12a_sys_pll_div16_en
,
5148 &g12a_cpu_clk_premux0
,
5149 &g12a_cpu_clk_mux0_div
,
5150 &g12a_cpu_clk_postmux0
,
5151 &g12a_cpu_clk_premux1
,
5152 &g12a_cpu_clk_mux1_div
,
5153 &g12a_cpu_clk_postmux1
,
5156 &g12a_cpu_clk_div16_en
,
5157 &g12a_cpu_clk_apb_div
,
5159 &g12a_cpu_clk_atb_div
,
5161 &g12a_cpu_clk_axi_div
,
5163 &g12a_cpu_clk_trace_div
,
5164 &g12a_cpu_clk_trace
,
5170 &g12a_vdec_hevc_sel
,
5171 &g12a_vdec_hevc_div
,
5173 &g12a_vdec_hevcf_sel
,
5174 &g12a_vdec_hevcf_div
,
5181 &g12b_sys1_pll_div16_en
,
5182 &g12b_cpub_clk_premux0
,
5183 &g12b_cpub_clk_mux0_div
,
5184 &g12b_cpub_clk_postmux0
,
5185 &g12b_cpub_clk_premux1
,
5186 &g12b_cpub_clk_mux1_div
,
5187 &g12b_cpub_clk_postmux1
,
5190 &g12b_cpub_clk_div16_en
,
5191 &g12b_cpub_clk_apb_sel
,
5193 &g12b_cpub_clk_atb_sel
,
5195 &g12b_cpub_clk_axi_sel
,
5197 &g12b_cpub_clk_trace_sel
,
5198 &g12b_cpub_clk_trace
,
5201 &sm1_dsu_clk_premux0
,
5202 &sm1_dsu_clk_premux1
,
5203 &sm1_dsu_clk_mux0_div
,
5204 &sm1_dsu_clk_postmux0
,
5205 &sm1_dsu_clk_mux1_div
,
5206 &sm1_dsu_clk_postmux1
,
5213 &g12a_spicc0_sclk_sel
,
5214 &g12a_spicc0_sclk_div
,
5216 &g12a_spicc1_sclk_sel
,
5217 &g12a_spicc1_sclk_div
,
5219 &sm1_nna_axi_clk_sel
,
5220 &sm1_nna_axi_clk_div
,
5222 &sm1_nna_core_clk_sel
,
5223 &sm1_nna_core_clk_div
,
5225 &g12a_mipi_dsi_pxclk_sel
,
5226 &g12a_mipi_dsi_pxclk_div
,
5227 &g12a_mipi_dsi_pxclk
,
5230 static const struct reg_sequence g12a_init_regs
[] = {
5231 { .reg
= HHI_MPLL_CNTL0
, .def
= 0x00000543 },
5234 #define DVFS_CON_ID "dvfs"
5236 static int meson_g12a_dvfs_setup_common(struct device
*dev
,
5237 struct clk_hw
**hws
)
5239 struct clk
*notifier_clk
;
5240 struct clk_hw
*xtal
;
5243 xtal
= clk_hw_get_parent_by_index(hws
[CLKID_CPU_CLK_DYN1_SEL
], 0);
5245 /* Setup clock notifier for cpu_clk_postmux0 */
5246 g12a_cpu_clk_postmux0_nb_data
.xtal
= xtal
;
5247 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12a_cpu_clk_postmux0
.hw
,
5249 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5250 &g12a_cpu_clk_postmux0_nb_data
.nb
);
5252 dev_err(dev
, "failed to register the cpu_clk_postmux0 notifier\n");
5256 /* Setup clock notifier for cpu_clk_dyn mux */
5257 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12a_cpu_clk_dyn
.hw
,
5259 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5260 &g12a_cpu_clk_mux_nb
);
5262 dev_err(dev
, "failed to register the cpu_clk_dyn notifier\n");
5269 static int meson_g12b_dvfs_setup(struct platform_device
*pdev
)
5271 struct clk_hw
**hws
= g12b_hw_onecell_data
.hws
;
5272 struct device
*dev
= &pdev
->dev
;
5273 struct clk
*notifier_clk
;
5274 struct clk_hw
*xtal
;
5277 ret
= meson_g12a_dvfs_setup_common(dev
, hws
);
5281 xtal
= clk_hw_get_parent_by_index(hws
[CLKID_CPU_CLK_DYN1_SEL
], 0);
5283 /* Setup clock notifier for cpu_clk mux */
5284 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12b_cpu_clk
.hw
,
5286 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5287 &g12a_cpu_clk_mux_nb
);
5289 dev_err(dev
, "failed to register the cpu_clk notifier\n");
5293 /* Setup clock notifier for sys1_pll */
5294 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12b_sys1_pll
.hw
,
5296 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5297 &g12b_cpu_clk_sys1_pll_nb_data
.nb
);
5299 dev_err(dev
, "failed to register the sys1_pll notifier\n");
5303 /* Add notifiers for the second CPU cluster */
5305 /* Setup clock notifier for cpub_clk_postmux0 */
5306 g12b_cpub_clk_postmux0_nb_data
.xtal
= xtal
;
5307 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12b_cpub_clk_postmux0
.hw
,
5309 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5310 &g12b_cpub_clk_postmux0_nb_data
.nb
);
5312 dev_err(dev
, "failed to register the cpub_clk_postmux0 notifier\n");
5316 /* Setup clock notifier for cpub_clk_dyn mux */
5317 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12b_cpub_clk_dyn
.hw
, "dvfs");
5318 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5319 &g12a_cpu_clk_mux_nb
);
5321 dev_err(dev
, "failed to register the cpub_clk_dyn notifier\n");
5325 /* Setup clock notifier for cpub_clk mux */
5326 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12b_cpub_clk
.hw
, DVFS_CON_ID
);
5327 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5328 &g12a_cpu_clk_mux_nb
);
5330 dev_err(dev
, "failed to register the cpub_clk notifier\n");
5334 /* Setup clock notifier for sys_pll */
5335 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12a_sys_pll
.hw
, DVFS_CON_ID
);
5336 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5337 &g12b_cpub_clk_sys_pll_nb_data
.nb
);
5339 dev_err(dev
, "failed to register the sys_pll notifier\n");
5346 static int meson_g12a_dvfs_setup(struct platform_device
*pdev
)
5348 struct clk_hw
**hws
= g12a_hw_onecell_data
.hws
;
5349 struct device
*dev
= &pdev
->dev
;
5350 struct clk
*notifier_clk
;
5353 ret
= meson_g12a_dvfs_setup_common(dev
, hws
);
5357 /* Setup clock notifier for cpu_clk mux */
5358 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12a_cpu_clk
.hw
, DVFS_CON_ID
);
5359 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5360 &g12a_cpu_clk_mux_nb
);
5362 dev_err(dev
, "failed to register the cpu_clk notifier\n");
5366 /* Setup clock notifier for sys_pll */
5367 notifier_clk
= devm_clk_hw_get_clk(dev
, &g12a_sys_pll
.hw
, DVFS_CON_ID
);
5368 ret
= devm_clk_notifier_register(dev
, notifier_clk
,
5369 &g12a_sys_pll_nb_data
.nb
);
5371 dev_err(dev
, "failed to register the sys_pll notifier\n");
5378 struct meson_g12a_data
{
5379 const struct meson_eeclkc_data eeclkc_data
;
5380 int (*dvfs_setup
)(struct platform_device
*pdev
);
5383 static int meson_g12a_probe(struct platform_device
*pdev
)
5385 const struct meson_eeclkc_data
*eeclkc_data
;
5386 const struct meson_g12a_data
*g12a_data
;
5389 eeclkc_data
= of_device_get_match_data(&pdev
->dev
);
5393 ret
= meson_eeclkc_probe(pdev
);
5397 g12a_data
= container_of(eeclkc_data
, struct meson_g12a_data
,
5400 if (g12a_data
->dvfs_setup
)
5401 return g12a_data
->dvfs_setup(pdev
);
5406 static const struct meson_g12a_data g12a_clkc_data
= {
5408 .regmap_clks
= g12a_clk_regmaps
,
5409 .regmap_clk_num
= ARRAY_SIZE(g12a_clk_regmaps
),
5410 .hw_onecell_data
= &g12a_hw_onecell_data
,
5411 .init_regs
= g12a_init_regs
,
5412 .init_count
= ARRAY_SIZE(g12a_init_regs
),
5414 .dvfs_setup
= meson_g12a_dvfs_setup
,
5417 static const struct meson_g12a_data g12b_clkc_data
= {
5419 .regmap_clks
= g12a_clk_regmaps
,
5420 .regmap_clk_num
= ARRAY_SIZE(g12a_clk_regmaps
),
5421 .hw_onecell_data
= &g12b_hw_onecell_data
,
5423 .dvfs_setup
= meson_g12b_dvfs_setup
,
5426 static const struct meson_g12a_data sm1_clkc_data
= {
5428 .regmap_clks
= g12a_clk_regmaps
,
5429 .regmap_clk_num
= ARRAY_SIZE(g12a_clk_regmaps
),
5430 .hw_onecell_data
= &sm1_hw_onecell_data
,
5432 .dvfs_setup
= meson_g12a_dvfs_setup
,
5435 static const struct of_device_id clkc_match_table
[] = {
5437 .compatible
= "amlogic,g12a-clkc",
5438 .data
= &g12a_clkc_data
.eeclkc_data
5441 .compatible
= "amlogic,g12b-clkc",
5442 .data
= &g12b_clkc_data
.eeclkc_data
5445 .compatible
= "amlogic,sm1-clkc",
5446 .data
= &sm1_clkc_data
.eeclkc_data
5450 MODULE_DEVICE_TABLE(of
, clkc_match_table
);
5452 static struct platform_driver g12a_driver
= {
5453 .probe
= meson_g12a_probe
,
5455 .name
= "g12a-clkc",
5456 .of_match_table
= clkc_match_table
,
5460 module_platform_driver(g12a_driver
);
5461 MODULE_LICENSE("GPL v2");