1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2016 AmLogic, Inc.
4 * Michael Turquette <mturquette@baylibre.com>
7 #include <linux/clk-provider.h>
8 #include <linux/init.h>
9 #include <linux/of_device.h>
10 #include <linux/platform_device.h>
13 #include "clk-input.h"
14 #include "clk-regmap.h"
17 #include "meson-eeclk.h"
18 #include "vid-pll-div.h"
20 #define IN_PREFIX "ee-in-"
22 static DEFINE_SPINLOCK(meson_clk_lock
);
24 static const struct pll_params_table gxbb_gp0_pll_params_table
[] = {
59 static const struct pll_params_table gxl_gp0_pll_params_table
[] = {
88 static struct clk_regmap gxbb_fixed_pll_dco
= {
89 .data
= &(struct meson_clk_pll_data
){
91 .reg_off
= HHI_MPLL_CNTL
,
96 .reg_off
= HHI_MPLL_CNTL
,
101 .reg_off
= HHI_MPLL_CNTL
,
106 .reg_off
= HHI_MPLL_CNTL2
,
111 .reg_off
= HHI_MPLL_CNTL
,
116 .reg_off
= HHI_MPLL_CNTL
,
121 .hw
.init
= &(struct clk_init_data
){
122 .name
= "fixed_pll_dco",
123 .ops
= &meson_clk_pll_ro_ops
,
124 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
129 static struct clk_regmap gxbb_fixed_pll
= {
130 .data
= &(struct clk_regmap_div_data
){
131 .offset
= HHI_MPLL_CNTL
,
134 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
136 .hw
.init
= &(struct clk_init_data
){
138 .ops
= &clk_regmap_divider_ro_ops
,
139 .parent_names
= (const char *[]){ "fixed_pll_dco" },
142 * This clock won't ever change at runtime so
143 * CLK_SET_RATE_PARENT is not required
148 static struct clk_fixed_factor gxbb_hdmi_pll_pre_mult
= {
151 .hw
.init
= &(struct clk_init_data
){
152 .name
= "hdmi_pll_pre_mult",
153 .ops
= &clk_fixed_factor_ops
,
154 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
159 static struct clk_regmap gxbb_hdmi_pll_dco
= {
160 .data
= &(struct meson_clk_pll_data
){
162 .reg_off
= HHI_HDMI_PLL_CNTL
,
167 .reg_off
= HHI_HDMI_PLL_CNTL
,
172 .reg_off
= HHI_HDMI_PLL_CNTL
,
177 .reg_off
= HHI_HDMI_PLL_CNTL2
,
182 .reg_off
= HHI_HDMI_PLL_CNTL
,
187 .reg_off
= HHI_HDMI_PLL_CNTL
,
192 .hw
.init
= &(struct clk_init_data
){
193 .name
= "hdmi_pll_dco",
194 .ops
= &meson_clk_pll_ro_ops
,
195 .parent_names
= (const char *[]){ "hdmi_pll_pre_mult" },
198 * Display directly handle hdmi pll registers ATM, we need
199 * NOCACHE to keep our view of the clock as accurate as possible
201 .flags
= CLK_GET_RATE_NOCACHE
,
205 static struct clk_regmap gxl_hdmi_pll_dco
= {
206 .data
= &(struct meson_clk_pll_data
){
208 .reg_off
= HHI_HDMI_PLL_CNTL
,
213 .reg_off
= HHI_HDMI_PLL_CNTL
,
218 .reg_off
= HHI_HDMI_PLL_CNTL
,
223 * On gxl, there is a register shift due to
224 * HHI_HDMI_PLL_CNTL1 which does not exist on gxbb,
225 * so we use the HHI_HDMI_PLL_CNTL2 define from GXBB
226 * instead which is defined at the same offset.
229 .reg_off
= HHI_HDMI_PLL_CNTL2
,
234 .reg_off
= HHI_HDMI_PLL_CNTL
,
239 .reg_off
= HHI_HDMI_PLL_CNTL
,
244 .hw
.init
= &(struct clk_init_data
){
245 .name
= "hdmi_pll_dco",
246 .ops
= &meson_clk_pll_ro_ops
,
247 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
250 * Display directly handle hdmi pll registers ATM, we need
251 * NOCACHE to keep our view of the clock as accurate as possible
253 .flags
= CLK_GET_RATE_NOCACHE
,
257 static struct clk_regmap gxbb_hdmi_pll_od
= {
258 .data
= &(struct clk_regmap_div_data
){
259 .offset
= HHI_HDMI_PLL_CNTL2
,
262 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
264 .hw
.init
= &(struct clk_init_data
){
265 .name
= "hdmi_pll_od",
266 .ops
= &clk_regmap_divider_ro_ops
,
267 .parent_names
= (const char *[]){ "hdmi_pll_dco" },
269 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
273 static struct clk_regmap gxbb_hdmi_pll_od2
= {
274 .data
= &(struct clk_regmap_div_data
){
275 .offset
= HHI_HDMI_PLL_CNTL2
,
278 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
280 .hw
.init
= &(struct clk_init_data
){
281 .name
= "hdmi_pll_od2",
282 .ops
= &clk_regmap_divider_ro_ops
,
283 .parent_names
= (const char *[]){ "hdmi_pll_od" },
285 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
289 static struct clk_regmap gxbb_hdmi_pll
= {
290 .data
= &(struct clk_regmap_div_data
){
291 .offset
= HHI_HDMI_PLL_CNTL2
,
294 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
296 .hw
.init
= &(struct clk_init_data
){
298 .ops
= &clk_regmap_divider_ro_ops
,
299 .parent_names
= (const char *[]){ "hdmi_pll_od2" },
301 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
305 static struct clk_regmap gxl_hdmi_pll_od
= {
306 .data
= &(struct clk_regmap_div_data
){
307 .offset
= HHI_HDMI_PLL_CNTL
+ 8,
310 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
312 .hw
.init
= &(struct clk_init_data
){
313 .name
= "hdmi_pll_od",
314 .ops
= &clk_regmap_divider_ro_ops
,
315 .parent_names
= (const char *[]){ "hdmi_pll_dco" },
317 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
321 static struct clk_regmap gxl_hdmi_pll_od2
= {
322 .data
= &(struct clk_regmap_div_data
){
323 .offset
= HHI_HDMI_PLL_CNTL
+ 8,
326 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
328 .hw
.init
= &(struct clk_init_data
){
329 .name
= "hdmi_pll_od2",
330 .ops
= &clk_regmap_divider_ro_ops
,
331 .parent_names
= (const char *[]){ "hdmi_pll_od" },
333 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
337 static struct clk_regmap gxl_hdmi_pll
= {
338 .data
= &(struct clk_regmap_div_data
){
339 .offset
= HHI_HDMI_PLL_CNTL
+ 8,
342 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
344 .hw
.init
= &(struct clk_init_data
){
346 .ops
= &clk_regmap_divider_ro_ops
,
347 .parent_names
= (const char *[]){ "hdmi_pll_od2" },
349 .flags
= CLK_GET_RATE_NOCACHE
| CLK_SET_RATE_PARENT
,
353 static struct clk_regmap gxbb_sys_pll_dco
= {
354 .data
= &(struct meson_clk_pll_data
){
356 .reg_off
= HHI_SYS_PLL_CNTL
,
361 .reg_off
= HHI_SYS_PLL_CNTL
,
366 .reg_off
= HHI_SYS_PLL_CNTL
,
371 .reg_off
= HHI_SYS_PLL_CNTL
,
376 .reg_off
= HHI_SYS_PLL_CNTL
,
381 .hw
.init
= &(struct clk_init_data
){
382 .name
= "sys_pll_dco",
383 .ops
= &meson_clk_pll_ro_ops
,
384 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
389 static struct clk_regmap gxbb_sys_pll
= {
390 .data
= &(struct clk_regmap_div_data
){
391 .offset
= HHI_SYS_PLL_CNTL
,
394 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
396 .hw
.init
= &(struct clk_init_data
){
398 .ops
= &clk_regmap_divider_ro_ops
,
399 .parent_names
= (const char *[]){ "sys_pll_dco" },
401 .flags
= CLK_SET_RATE_PARENT
,
405 static const struct reg_sequence gxbb_gp0_init_regs
[] = {
406 { .reg
= HHI_GP0_PLL_CNTL2
, .def
= 0x69c80000 },
407 { .reg
= HHI_GP0_PLL_CNTL3
, .def
= 0x0a5590c4 },
408 { .reg
= HHI_GP0_PLL_CNTL4
, .def
= 0x0000500d },
411 static struct clk_regmap gxbb_gp0_pll_dco
= {
412 .data
= &(struct meson_clk_pll_data
){
414 .reg_off
= HHI_GP0_PLL_CNTL
,
419 .reg_off
= HHI_GP0_PLL_CNTL
,
424 .reg_off
= HHI_GP0_PLL_CNTL
,
429 .reg_off
= HHI_GP0_PLL_CNTL
,
434 .reg_off
= HHI_GP0_PLL_CNTL
,
438 .table
= gxbb_gp0_pll_params_table
,
439 .init_regs
= gxbb_gp0_init_regs
,
440 .init_count
= ARRAY_SIZE(gxbb_gp0_init_regs
),
442 .hw
.init
= &(struct clk_init_data
){
443 .name
= "gp0_pll_dco",
444 .ops
= &meson_clk_pll_ops
,
445 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
450 static const struct reg_sequence gxl_gp0_init_regs
[] = {
451 { .reg
= HHI_GP0_PLL_CNTL1
, .def
= 0xc084b000 },
452 { .reg
= HHI_GP0_PLL_CNTL2
, .def
= 0xb75020be },
453 { .reg
= HHI_GP0_PLL_CNTL3
, .def
= 0x0a59a288 },
454 { .reg
= HHI_GP0_PLL_CNTL4
, .def
= 0xc000004d },
455 { .reg
= HHI_GP0_PLL_CNTL5
, .def
= 0x00078000 },
458 static struct clk_regmap gxl_gp0_pll_dco
= {
459 .data
= &(struct meson_clk_pll_data
){
461 .reg_off
= HHI_GP0_PLL_CNTL
,
466 .reg_off
= HHI_GP0_PLL_CNTL
,
471 .reg_off
= HHI_GP0_PLL_CNTL
,
476 .reg_off
= HHI_GP0_PLL_CNTL1
,
481 .reg_off
= HHI_GP0_PLL_CNTL
,
486 .reg_off
= HHI_GP0_PLL_CNTL
,
490 .table
= gxl_gp0_pll_params_table
,
491 .init_regs
= gxl_gp0_init_regs
,
492 .init_count
= ARRAY_SIZE(gxl_gp0_init_regs
),
494 .hw
.init
= &(struct clk_init_data
){
495 .name
= "gp0_pll_dco",
496 .ops
= &meson_clk_pll_ops
,
497 .parent_names
= (const char *[]){ IN_PREFIX
"xtal" },
502 static struct clk_regmap gxbb_gp0_pll
= {
503 .data
= &(struct clk_regmap_div_data
){
504 .offset
= HHI_GP0_PLL_CNTL
,
507 .flags
= CLK_DIVIDER_POWER_OF_TWO
,
509 .hw
.init
= &(struct clk_init_data
){
511 .ops
= &clk_regmap_divider_ops
,
512 .parent_names
= (const char *[]){ "gp0_pll_dco" },
514 .flags
= CLK_SET_RATE_PARENT
,
518 static struct clk_fixed_factor gxbb_fclk_div2_div
= {
521 .hw
.init
= &(struct clk_init_data
){
522 .name
= "fclk_div2_div",
523 .ops
= &clk_fixed_factor_ops
,
524 .parent_names
= (const char *[]){ "fixed_pll" },
529 static struct clk_regmap gxbb_fclk_div2
= {
530 .data
= &(struct clk_regmap_gate_data
){
531 .offset
= HHI_MPLL_CNTL6
,
534 .hw
.init
= &(struct clk_init_data
){
536 .ops
= &clk_regmap_gate_ops
,
537 .parent_names
= (const char *[]){ "fclk_div2_div" },
539 .flags
= CLK_IS_CRITICAL
,
543 static struct clk_fixed_factor gxbb_fclk_div3_div
= {
546 .hw
.init
= &(struct clk_init_data
){
547 .name
= "fclk_div3_div",
548 .ops
= &clk_fixed_factor_ops
,
549 .parent_names
= (const char *[]){ "fixed_pll" },
554 static struct clk_regmap gxbb_fclk_div3
= {
555 .data
= &(struct clk_regmap_gate_data
){
556 .offset
= HHI_MPLL_CNTL6
,
559 .hw
.init
= &(struct clk_init_data
){
561 .ops
= &clk_regmap_gate_ops
,
562 .parent_names
= (const char *[]){ "fclk_div3_div" },
566 * This clock, as fdiv2, is used by the SCPI FW and is required
567 * by the platform to operate correctly.
568 * Until the following condition are met, we need this clock to
569 * be marked as critical:
570 * a) The SCPI generic driver claims and enable all the clocks
572 * b) CCF has a clock hand-off mechanism to make the sure the
573 * clock stays on until the proper driver comes along
575 .flags
= CLK_IS_CRITICAL
,
579 static struct clk_fixed_factor gxbb_fclk_div4_div
= {
582 .hw
.init
= &(struct clk_init_data
){
583 .name
= "fclk_div4_div",
584 .ops
= &clk_fixed_factor_ops
,
585 .parent_names
= (const char *[]){ "fixed_pll" },
590 static struct clk_regmap gxbb_fclk_div4
= {
591 .data
= &(struct clk_regmap_gate_data
){
592 .offset
= HHI_MPLL_CNTL6
,
595 .hw
.init
= &(struct clk_init_data
){
597 .ops
= &clk_regmap_gate_ops
,
598 .parent_names
= (const char *[]){ "fclk_div4_div" },
603 static struct clk_fixed_factor gxbb_fclk_div5_div
= {
606 .hw
.init
= &(struct clk_init_data
){
607 .name
= "fclk_div5_div",
608 .ops
= &clk_fixed_factor_ops
,
609 .parent_names
= (const char *[]){ "fixed_pll" },
614 static struct clk_regmap gxbb_fclk_div5
= {
615 .data
= &(struct clk_regmap_gate_data
){
616 .offset
= HHI_MPLL_CNTL6
,
619 .hw
.init
= &(struct clk_init_data
){
621 .ops
= &clk_regmap_gate_ops
,
622 .parent_names
= (const char *[]){ "fclk_div5_div" },
627 static struct clk_fixed_factor gxbb_fclk_div7_div
= {
630 .hw
.init
= &(struct clk_init_data
){
631 .name
= "fclk_div7_div",
632 .ops
= &clk_fixed_factor_ops
,
633 .parent_names
= (const char *[]){ "fixed_pll" },
638 static struct clk_regmap gxbb_fclk_div7
= {
639 .data
= &(struct clk_regmap_gate_data
){
640 .offset
= HHI_MPLL_CNTL6
,
643 .hw
.init
= &(struct clk_init_data
){
645 .ops
= &clk_regmap_gate_ops
,
646 .parent_names
= (const char *[]){ "fclk_div7_div" },
651 static struct clk_regmap gxbb_mpll_prediv
= {
652 .data
= &(struct clk_regmap_div_data
){
653 .offset
= HHI_MPLL_CNTL5
,
657 .hw
.init
= &(struct clk_init_data
){
658 .name
= "mpll_prediv",
659 .ops
= &clk_regmap_divider_ro_ops
,
660 .parent_names
= (const char *[]){ "fixed_pll" },
665 static struct clk_regmap gxbb_mpll0_div
= {
666 .data
= &(struct meson_clk_mpll_data
){
668 .reg_off
= HHI_MPLL_CNTL7
,
673 .reg_off
= HHI_MPLL_CNTL7
,
678 .reg_off
= HHI_MPLL_CNTL7
,
682 .lock
= &meson_clk_lock
,
684 .hw
.init
= &(struct clk_init_data
){
686 .ops
= &meson_clk_mpll_ops
,
687 .parent_names
= (const char *[]){ "mpll_prediv" },
692 static struct clk_regmap gxbb_mpll0
= {
693 .data
= &(struct clk_regmap_gate_data
){
694 .offset
= HHI_MPLL_CNTL7
,
697 .hw
.init
= &(struct clk_init_data
){
699 .ops
= &clk_regmap_gate_ops
,
700 .parent_names
= (const char *[]){ "mpll0_div" },
702 .flags
= CLK_SET_RATE_PARENT
,
706 static struct clk_regmap gxbb_mpll1_div
= {
707 .data
= &(struct meson_clk_mpll_data
){
709 .reg_off
= HHI_MPLL_CNTL8
,
714 .reg_off
= HHI_MPLL_CNTL8
,
719 .reg_off
= HHI_MPLL_CNTL8
,
723 .lock
= &meson_clk_lock
,
725 .hw
.init
= &(struct clk_init_data
){
727 .ops
= &meson_clk_mpll_ops
,
728 .parent_names
= (const char *[]){ "mpll_prediv" },
733 static struct clk_regmap gxbb_mpll1
= {
734 .data
= &(struct clk_regmap_gate_data
){
735 .offset
= HHI_MPLL_CNTL8
,
738 .hw
.init
= &(struct clk_init_data
){
740 .ops
= &clk_regmap_gate_ops
,
741 .parent_names
= (const char *[]){ "mpll1_div" },
743 .flags
= CLK_SET_RATE_PARENT
,
747 static struct clk_regmap gxbb_mpll2_div
= {
748 .data
= &(struct meson_clk_mpll_data
){
750 .reg_off
= HHI_MPLL_CNTL9
,
755 .reg_off
= HHI_MPLL_CNTL9
,
760 .reg_off
= HHI_MPLL_CNTL9
,
764 .lock
= &meson_clk_lock
,
766 .hw
.init
= &(struct clk_init_data
){
768 .ops
= &meson_clk_mpll_ops
,
769 .parent_names
= (const char *[]){ "mpll_prediv" },
774 static struct clk_regmap gxbb_mpll2
= {
775 .data
= &(struct clk_regmap_gate_data
){
776 .offset
= HHI_MPLL_CNTL9
,
779 .hw
.init
= &(struct clk_init_data
){
781 .ops
= &clk_regmap_gate_ops
,
782 .parent_names
= (const char *[]){ "mpll2_div" },
784 .flags
= CLK_SET_RATE_PARENT
,
788 static u32 mux_table_clk81
[] = { 0, 2, 3, 4, 5, 6, 7 };
789 static const char * const clk81_parent_names
[] = {
790 IN_PREFIX
"xtal", "fclk_div7", "mpll1", "mpll2", "fclk_div4",
791 "fclk_div3", "fclk_div5"
794 static struct clk_regmap gxbb_mpeg_clk_sel
= {
795 .data
= &(struct clk_regmap_mux_data
){
796 .offset
= HHI_MPEG_CLK_CNTL
,
799 .table
= mux_table_clk81
,
801 .hw
.init
= &(struct clk_init_data
){
802 .name
= "mpeg_clk_sel",
803 .ops
= &clk_regmap_mux_ro_ops
,
805 * bits 14:12 selects from 8 possible parents:
806 * xtal, 1'b0 (wtf), fclk_div7, mpll_clkout1, mpll_clkout2,
807 * fclk_div4, fclk_div3, fclk_div5
809 .parent_names
= clk81_parent_names
,
810 .num_parents
= ARRAY_SIZE(clk81_parent_names
),
814 static struct clk_regmap gxbb_mpeg_clk_div
= {
815 .data
= &(struct clk_regmap_div_data
){
816 .offset
= HHI_MPEG_CLK_CNTL
,
820 .hw
.init
= &(struct clk_init_data
){
821 .name
= "mpeg_clk_div",
822 .ops
= &clk_regmap_divider_ro_ops
,
823 .parent_names
= (const char *[]){ "mpeg_clk_sel" },
828 /* the mother of dragons gates */
829 static struct clk_regmap gxbb_clk81
= {
830 .data
= &(struct clk_regmap_gate_data
){
831 .offset
= HHI_MPEG_CLK_CNTL
,
834 .hw
.init
= &(struct clk_init_data
){
836 .ops
= &clk_regmap_gate_ops
,
837 .parent_names
= (const char *[]){ "mpeg_clk_div" },
839 .flags
= CLK_IS_CRITICAL
,
843 static struct clk_regmap gxbb_sar_adc_clk_sel
= {
844 .data
= &(struct clk_regmap_mux_data
){
845 .offset
= HHI_SAR_CLK_CNTL
,
849 .hw
.init
= &(struct clk_init_data
){
850 .name
= "sar_adc_clk_sel",
851 .ops
= &clk_regmap_mux_ops
,
852 /* NOTE: The datasheet doesn't list the parents for bit 10 */
853 .parent_names
= (const char *[]){ IN_PREFIX
"xtal", "clk81", },
858 static struct clk_regmap gxbb_sar_adc_clk_div
= {
859 .data
= &(struct clk_regmap_div_data
){
860 .offset
= HHI_SAR_CLK_CNTL
,
864 .hw
.init
= &(struct clk_init_data
){
865 .name
= "sar_adc_clk_div",
866 .ops
= &clk_regmap_divider_ops
,
867 .parent_names
= (const char *[]){ "sar_adc_clk_sel" },
872 static struct clk_regmap gxbb_sar_adc_clk
= {
873 .data
= &(struct clk_regmap_gate_data
){
874 .offset
= HHI_SAR_CLK_CNTL
,
877 .hw
.init
= &(struct clk_init_data
){
878 .name
= "sar_adc_clk",
879 .ops
= &clk_regmap_gate_ops
,
880 .parent_names
= (const char *[]){ "sar_adc_clk_div" },
882 .flags
= CLK_SET_RATE_PARENT
,
887 * The MALI IP is clocked by two identical clocks (mali_0 and mali_1)
888 * muxed by a glitch-free switch.
891 static const char * const gxbb_mali_0_1_parent_names
[] = {
892 IN_PREFIX
"xtal", "gp0_pll", "mpll2", "mpll1", "fclk_div7",
893 "fclk_div4", "fclk_div3", "fclk_div5"
896 static struct clk_regmap gxbb_mali_0_sel
= {
897 .data
= &(struct clk_regmap_mux_data
){
898 .offset
= HHI_MALI_CLK_CNTL
,
902 .hw
.init
= &(struct clk_init_data
){
903 .name
= "mali_0_sel",
904 .ops
= &clk_regmap_mux_ops
,
906 * bits 10:9 selects from 8 possible parents:
907 * xtal, gp0_pll, mpll2, mpll1, fclk_div7,
908 * fclk_div4, fclk_div3, fclk_div5
910 .parent_names
= gxbb_mali_0_1_parent_names
,
912 .flags
= CLK_SET_RATE_NO_REPARENT
,
916 static struct clk_regmap gxbb_mali_0_div
= {
917 .data
= &(struct clk_regmap_div_data
){
918 .offset
= HHI_MALI_CLK_CNTL
,
922 .hw
.init
= &(struct clk_init_data
){
923 .name
= "mali_0_div",
924 .ops
= &clk_regmap_divider_ops
,
925 .parent_names
= (const char *[]){ "mali_0_sel" },
927 .flags
= CLK_SET_RATE_NO_REPARENT
,
931 static struct clk_regmap gxbb_mali_0
= {
932 .data
= &(struct clk_regmap_gate_data
){
933 .offset
= HHI_MALI_CLK_CNTL
,
936 .hw
.init
= &(struct clk_init_data
){
938 .ops
= &clk_regmap_gate_ops
,
939 .parent_names
= (const char *[]){ "mali_0_div" },
941 .flags
= CLK_SET_RATE_PARENT
,
945 static struct clk_regmap gxbb_mali_1_sel
= {
946 .data
= &(struct clk_regmap_mux_data
){
947 .offset
= HHI_MALI_CLK_CNTL
,
951 .hw
.init
= &(struct clk_init_data
){
952 .name
= "mali_1_sel",
953 .ops
= &clk_regmap_mux_ops
,
955 * bits 10:9 selects from 8 possible parents:
956 * xtal, gp0_pll, mpll2, mpll1, fclk_div7,
957 * fclk_div4, fclk_div3, fclk_div5
959 .parent_names
= gxbb_mali_0_1_parent_names
,
961 .flags
= CLK_SET_RATE_NO_REPARENT
,
965 static struct clk_regmap gxbb_mali_1_div
= {
966 .data
= &(struct clk_regmap_div_data
){
967 .offset
= HHI_MALI_CLK_CNTL
,
971 .hw
.init
= &(struct clk_init_data
){
972 .name
= "mali_1_div",
973 .ops
= &clk_regmap_divider_ops
,
974 .parent_names
= (const char *[]){ "mali_1_sel" },
976 .flags
= CLK_SET_RATE_NO_REPARENT
,
980 static struct clk_regmap gxbb_mali_1
= {
981 .data
= &(struct clk_regmap_gate_data
){
982 .offset
= HHI_MALI_CLK_CNTL
,
985 .hw
.init
= &(struct clk_init_data
){
987 .ops
= &clk_regmap_gate_ops
,
988 .parent_names
= (const char *[]){ "mali_1_div" },
990 .flags
= CLK_SET_RATE_PARENT
,
994 static const char * const gxbb_mali_parent_names
[] = {
998 static struct clk_regmap gxbb_mali
= {
999 .data
= &(struct clk_regmap_mux_data
){
1000 .offset
= HHI_MALI_CLK_CNTL
,
1004 .hw
.init
= &(struct clk_init_data
){
1006 .ops
= &clk_regmap_mux_ops
,
1007 .parent_names
= gxbb_mali_parent_names
,
1009 .flags
= CLK_SET_RATE_NO_REPARENT
,
1013 static struct clk_regmap gxbb_cts_amclk_sel
= {
1014 .data
= &(struct clk_regmap_mux_data
){
1015 .offset
= HHI_AUD_CLK_CNTL
,
1018 .table
= (u32
[]){ 1, 2, 3 },
1019 .flags
= CLK_MUX_ROUND_CLOSEST
,
1021 .hw
.init
= &(struct clk_init_data
){
1022 .name
= "cts_amclk_sel",
1023 .ops
= &clk_regmap_mux_ops
,
1024 .parent_names
= (const char *[]){ "mpll0", "mpll1", "mpll2" },
1029 static struct clk_regmap gxbb_cts_amclk_div
= {
1030 .data
= &(struct clk_regmap_div_data
) {
1031 .offset
= HHI_AUD_CLK_CNTL
,
1034 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
1036 .hw
.init
= &(struct clk_init_data
){
1037 .name
= "cts_amclk_div",
1038 .ops
= &clk_regmap_divider_ops
,
1039 .parent_names
= (const char *[]){ "cts_amclk_sel" },
1041 .flags
= CLK_SET_RATE_PARENT
,
1045 static struct clk_regmap gxbb_cts_amclk
= {
1046 .data
= &(struct clk_regmap_gate_data
){
1047 .offset
= HHI_AUD_CLK_CNTL
,
1050 .hw
.init
= &(struct clk_init_data
){
1051 .name
= "cts_amclk",
1052 .ops
= &clk_regmap_gate_ops
,
1053 .parent_names
= (const char *[]){ "cts_amclk_div" },
1055 .flags
= CLK_SET_RATE_PARENT
,
1059 static struct clk_regmap gxbb_cts_mclk_i958_sel
= {
1060 .data
= &(struct clk_regmap_mux_data
){
1061 .offset
= HHI_AUD_CLK_CNTL2
,
1064 .table
= (u32
[]){ 1, 2, 3 },
1065 .flags
= CLK_MUX_ROUND_CLOSEST
,
1067 .hw
.init
= &(struct clk_init_data
) {
1068 .name
= "cts_mclk_i958_sel",
1069 .ops
= &clk_regmap_mux_ops
,
1070 .parent_names
= (const char *[]){ "mpll0", "mpll1", "mpll2" },
1075 static struct clk_regmap gxbb_cts_mclk_i958_div
= {
1076 .data
= &(struct clk_regmap_div_data
){
1077 .offset
= HHI_AUD_CLK_CNTL2
,
1080 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
1082 .hw
.init
= &(struct clk_init_data
) {
1083 .name
= "cts_mclk_i958_div",
1084 .ops
= &clk_regmap_divider_ops
,
1085 .parent_names
= (const char *[]){ "cts_mclk_i958_sel" },
1087 .flags
= CLK_SET_RATE_PARENT
,
1091 static struct clk_regmap gxbb_cts_mclk_i958
= {
1092 .data
= &(struct clk_regmap_gate_data
){
1093 .offset
= HHI_AUD_CLK_CNTL2
,
1096 .hw
.init
= &(struct clk_init_data
){
1097 .name
= "cts_mclk_i958",
1098 .ops
= &clk_regmap_gate_ops
,
1099 .parent_names
= (const char *[]){ "cts_mclk_i958_div" },
1101 .flags
= CLK_SET_RATE_PARENT
,
1105 static struct clk_regmap gxbb_cts_i958
= {
1106 .data
= &(struct clk_regmap_mux_data
){
1107 .offset
= HHI_AUD_CLK_CNTL2
,
1111 .hw
.init
= &(struct clk_init_data
){
1113 .ops
= &clk_regmap_mux_ops
,
1114 .parent_names
= (const char *[]){ "cts_amclk", "cts_mclk_i958" },
1117 *The parent is specific to origin of the audio data. Let the
1118 * consumer choose the appropriate parent
1120 .flags
= CLK_SET_RATE_PARENT
| CLK_SET_RATE_NO_REPARENT
,
1124 static struct clk_regmap gxbb_32k_clk_div
= {
1125 .data
= &(struct clk_regmap_div_data
){
1126 .offset
= HHI_32K_CLK_CNTL
,
1130 .hw
.init
= &(struct clk_init_data
){
1131 .name
= "32k_clk_div",
1132 .ops
= &clk_regmap_divider_ops
,
1133 .parent_names
= (const char *[]){ "32k_clk_sel" },
1135 .flags
= CLK_SET_RATE_PARENT
| CLK_DIVIDER_ROUND_CLOSEST
,
1139 static struct clk_regmap gxbb_32k_clk
= {
1140 .data
= &(struct clk_regmap_gate_data
){
1141 .offset
= HHI_32K_CLK_CNTL
,
1144 .hw
.init
= &(struct clk_init_data
){
1146 .ops
= &clk_regmap_gate_ops
,
1147 .parent_names
= (const char *[]){ "32k_clk_div" },
1149 .flags
= CLK_SET_RATE_PARENT
,
1153 static const char * const gxbb_32k_clk_parent_names
[] = {
1154 IN_PREFIX
"xtal", "cts_slow_oscin", "fclk_div3", "fclk_div5"
1157 static struct clk_regmap gxbb_32k_clk_sel
= {
1158 .data
= &(struct clk_regmap_mux_data
){
1159 .offset
= HHI_32K_CLK_CNTL
,
1163 .hw
.init
= &(struct clk_init_data
){
1164 .name
= "32k_clk_sel",
1165 .ops
= &clk_regmap_mux_ops
,
1166 .parent_names
= gxbb_32k_clk_parent_names
,
1168 .flags
= CLK_SET_RATE_PARENT
,
1172 static const char * const gxbb_sd_emmc_clk0_parent_names
[] = {
1173 IN_PREFIX
"xtal", "fclk_div2", "fclk_div3", "fclk_div5", "fclk_div7",
1176 * Following these parent clocks, we should also have had mpll2, mpll3
1177 * and gp0_pll but these clocks are too precious to be used here. All
1178 * the necessary rates for MMC and NAND operation can be acheived using
1179 * xtal or fclk_div clocks
1184 static struct clk_regmap gxbb_sd_emmc_a_clk0_sel
= {
1185 .data
= &(struct clk_regmap_mux_data
){
1186 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1190 .hw
.init
= &(struct clk_init_data
) {
1191 .name
= "sd_emmc_a_clk0_sel",
1192 .ops
= &clk_regmap_mux_ops
,
1193 .parent_names
= gxbb_sd_emmc_clk0_parent_names
,
1194 .num_parents
= ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_names
),
1195 .flags
= CLK_SET_RATE_PARENT
,
1199 static struct clk_regmap gxbb_sd_emmc_a_clk0_div
= {
1200 .data
= &(struct clk_regmap_div_data
){
1201 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1204 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
1206 .hw
.init
= &(struct clk_init_data
) {
1207 .name
= "sd_emmc_a_clk0_div",
1208 .ops
= &clk_regmap_divider_ops
,
1209 .parent_names
= (const char *[]){ "sd_emmc_a_clk0_sel" },
1211 .flags
= CLK_SET_RATE_PARENT
,
1215 static struct clk_regmap gxbb_sd_emmc_a_clk0
= {
1216 .data
= &(struct clk_regmap_gate_data
){
1217 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1220 .hw
.init
= &(struct clk_init_data
){
1221 .name
= "sd_emmc_a_clk0",
1222 .ops
= &clk_regmap_gate_ops
,
1223 .parent_names
= (const char *[]){ "sd_emmc_a_clk0_div" },
1225 .flags
= CLK_SET_RATE_PARENT
,
1230 static struct clk_regmap gxbb_sd_emmc_b_clk0_sel
= {
1231 .data
= &(struct clk_regmap_mux_data
){
1232 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1236 .hw
.init
= &(struct clk_init_data
) {
1237 .name
= "sd_emmc_b_clk0_sel",
1238 .ops
= &clk_regmap_mux_ops
,
1239 .parent_names
= gxbb_sd_emmc_clk0_parent_names
,
1240 .num_parents
= ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_names
),
1241 .flags
= CLK_SET_RATE_PARENT
,
1245 static struct clk_regmap gxbb_sd_emmc_b_clk0_div
= {
1246 .data
= &(struct clk_regmap_div_data
){
1247 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1250 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
1252 .hw
.init
= &(struct clk_init_data
) {
1253 .name
= "sd_emmc_b_clk0_div",
1254 .ops
= &clk_regmap_divider_ops
,
1255 .parent_names
= (const char *[]){ "sd_emmc_b_clk0_sel" },
1257 .flags
= CLK_SET_RATE_PARENT
,
1261 static struct clk_regmap gxbb_sd_emmc_b_clk0
= {
1262 .data
= &(struct clk_regmap_gate_data
){
1263 .offset
= HHI_SD_EMMC_CLK_CNTL
,
1266 .hw
.init
= &(struct clk_init_data
){
1267 .name
= "sd_emmc_b_clk0",
1268 .ops
= &clk_regmap_gate_ops
,
1269 .parent_names
= (const char *[]){ "sd_emmc_b_clk0_div" },
1271 .flags
= CLK_SET_RATE_PARENT
,
1275 /* EMMC/NAND clock */
1276 static struct clk_regmap gxbb_sd_emmc_c_clk0_sel
= {
1277 .data
= &(struct clk_regmap_mux_data
){
1278 .offset
= HHI_NAND_CLK_CNTL
,
1282 .hw
.init
= &(struct clk_init_data
) {
1283 .name
= "sd_emmc_c_clk0_sel",
1284 .ops
= &clk_regmap_mux_ops
,
1285 .parent_names
= gxbb_sd_emmc_clk0_parent_names
,
1286 .num_parents
= ARRAY_SIZE(gxbb_sd_emmc_clk0_parent_names
),
1287 .flags
= CLK_SET_RATE_PARENT
,
1291 static struct clk_regmap gxbb_sd_emmc_c_clk0_div
= {
1292 .data
= &(struct clk_regmap_div_data
){
1293 .offset
= HHI_NAND_CLK_CNTL
,
1296 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
1298 .hw
.init
= &(struct clk_init_data
) {
1299 .name
= "sd_emmc_c_clk0_div",
1300 .ops
= &clk_regmap_divider_ops
,
1301 .parent_names
= (const char *[]){ "sd_emmc_c_clk0_sel" },
1303 .flags
= CLK_SET_RATE_PARENT
,
1307 static struct clk_regmap gxbb_sd_emmc_c_clk0
= {
1308 .data
= &(struct clk_regmap_gate_data
){
1309 .offset
= HHI_NAND_CLK_CNTL
,
1312 .hw
.init
= &(struct clk_init_data
){
1313 .name
= "sd_emmc_c_clk0",
1314 .ops
= &clk_regmap_gate_ops
,
1315 .parent_names
= (const char *[]){ "sd_emmc_c_clk0_div" },
1317 .flags
= CLK_SET_RATE_PARENT
,
1323 static const char * const gxbb_vpu_parent_names
[] = {
1324 "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
1327 static struct clk_regmap gxbb_vpu_0_sel
= {
1328 .data
= &(struct clk_regmap_mux_data
){
1329 .offset
= HHI_VPU_CLK_CNTL
,
1333 .hw
.init
= &(struct clk_init_data
){
1334 .name
= "vpu_0_sel",
1335 .ops
= &clk_regmap_mux_ops
,
1337 * bits 9:10 selects from 4 possible parents:
1338 * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
1340 .parent_names
= gxbb_vpu_parent_names
,
1341 .num_parents
= ARRAY_SIZE(gxbb_vpu_parent_names
),
1342 .flags
= CLK_SET_RATE_NO_REPARENT
,
1346 static struct clk_regmap gxbb_vpu_0_div
= {
1347 .data
= &(struct clk_regmap_div_data
){
1348 .offset
= HHI_VPU_CLK_CNTL
,
1352 .hw
.init
= &(struct clk_init_data
){
1353 .name
= "vpu_0_div",
1354 .ops
= &clk_regmap_divider_ops
,
1355 .parent_names
= (const char *[]){ "vpu_0_sel" },
1357 .flags
= CLK_SET_RATE_PARENT
,
1361 static struct clk_regmap gxbb_vpu_0
= {
1362 .data
= &(struct clk_regmap_gate_data
){
1363 .offset
= HHI_VPU_CLK_CNTL
,
1366 .hw
.init
= &(struct clk_init_data
) {
1368 .ops
= &clk_regmap_gate_ops
,
1369 .parent_names
= (const char *[]){ "vpu_0_div" },
1371 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1375 static struct clk_regmap gxbb_vpu_1_sel
= {
1376 .data
= &(struct clk_regmap_mux_data
){
1377 .offset
= HHI_VPU_CLK_CNTL
,
1381 .hw
.init
= &(struct clk_init_data
){
1382 .name
= "vpu_1_sel",
1383 .ops
= &clk_regmap_mux_ops
,
1385 * bits 25:26 selects from 4 possible parents:
1386 * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
1388 .parent_names
= gxbb_vpu_parent_names
,
1389 .num_parents
= ARRAY_SIZE(gxbb_vpu_parent_names
),
1390 .flags
= CLK_SET_RATE_NO_REPARENT
,
1394 static struct clk_regmap gxbb_vpu_1_div
= {
1395 .data
= &(struct clk_regmap_div_data
){
1396 .offset
= HHI_VPU_CLK_CNTL
,
1400 .hw
.init
= &(struct clk_init_data
){
1401 .name
= "vpu_1_div",
1402 .ops
= &clk_regmap_divider_ops
,
1403 .parent_names
= (const char *[]){ "vpu_1_sel" },
1405 .flags
= CLK_SET_RATE_PARENT
,
1409 static struct clk_regmap gxbb_vpu_1
= {
1410 .data
= &(struct clk_regmap_gate_data
){
1411 .offset
= HHI_VPU_CLK_CNTL
,
1414 .hw
.init
= &(struct clk_init_data
) {
1416 .ops
= &clk_regmap_gate_ops
,
1417 .parent_names
= (const char *[]){ "vpu_1_div" },
1419 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1423 static struct clk_regmap gxbb_vpu
= {
1424 .data
= &(struct clk_regmap_mux_data
){
1425 .offset
= HHI_VPU_CLK_CNTL
,
1429 .hw
.init
= &(struct clk_init_data
){
1431 .ops
= &clk_regmap_mux_ops
,
1433 * bit 31 selects from 2 possible parents:
1436 .parent_names
= (const char *[]){ "vpu_0", "vpu_1" },
1438 .flags
= CLK_SET_RATE_NO_REPARENT
,
1444 static const char * const gxbb_vapb_parent_names
[] = {
1445 "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
1448 static struct clk_regmap gxbb_vapb_0_sel
= {
1449 .data
= &(struct clk_regmap_mux_data
){
1450 .offset
= HHI_VAPBCLK_CNTL
,
1454 .hw
.init
= &(struct clk_init_data
){
1455 .name
= "vapb_0_sel",
1456 .ops
= &clk_regmap_mux_ops
,
1458 * bits 9:10 selects from 4 possible parents:
1459 * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
1461 .parent_names
= gxbb_vapb_parent_names
,
1462 .num_parents
= ARRAY_SIZE(gxbb_vapb_parent_names
),
1463 .flags
= CLK_SET_RATE_NO_REPARENT
,
1467 static struct clk_regmap gxbb_vapb_0_div
= {
1468 .data
= &(struct clk_regmap_div_data
){
1469 .offset
= HHI_VAPBCLK_CNTL
,
1473 .hw
.init
= &(struct clk_init_data
){
1474 .name
= "vapb_0_div",
1475 .ops
= &clk_regmap_divider_ops
,
1476 .parent_names
= (const char *[]){ "vapb_0_sel" },
1478 .flags
= CLK_SET_RATE_PARENT
,
1482 static struct clk_regmap gxbb_vapb_0
= {
1483 .data
= &(struct clk_regmap_gate_data
){
1484 .offset
= HHI_VAPBCLK_CNTL
,
1487 .hw
.init
= &(struct clk_init_data
) {
1489 .ops
= &clk_regmap_gate_ops
,
1490 .parent_names
= (const char *[]){ "vapb_0_div" },
1492 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1496 static struct clk_regmap gxbb_vapb_1_sel
= {
1497 .data
= &(struct clk_regmap_mux_data
){
1498 .offset
= HHI_VAPBCLK_CNTL
,
1502 .hw
.init
= &(struct clk_init_data
){
1503 .name
= "vapb_1_sel",
1504 .ops
= &clk_regmap_mux_ops
,
1506 * bits 25:26 selects from 4 possible parents:
1507 * fclk_div4, fclk_div3, fclk_div5, fclk_div7,
1509 .parent_names
= gxbb_vapb_parent_names
,
1510 .num_parents
= ARRAY_SIZE(gxbb_vapb_parent_names
),
1511 .flags
= CLK_SET_RATE_NO_REPARENT
,
1515 static struct clk_regmap gxbb_vapb_1_div
= {
1516 .data
= &(struct clk_regmap_div_data
){
1517 .offset
= HHI_VAPBCLK_CNTL
,
1521 .hw
.init
= &(struct clk_init_data
){
1522 .name
= "vapb_1_div",
1523 .ops
= &clk_regmap_divider_ops
,
1524 .parent_names
= (const char *[]){ "vapb_1_sel" },
1526 .flags
= CLK_SET_RATE_PARENT
,
1530 static struct clk_regmap gxbb_vapb_1
= {
1531 .data
= &(struct clk_regmap_gate_data
){
1532 .offset
= HHI_VAPBCLK_CNTL
,
1535 .hw
.init
= &(struct clk_init_data
) {
1537 .ops
= &clk_regmap_gate_ops
,
1538 .parent_names
= (const char *[]){ "vapb_1_div" },
1540 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1544 static struct clk_regmap gxbb_vapb_sel
= {
1545 .data
= &(struct clk_regmap_mux_data
){
1546 .offset
= HHI_VAPBCLK_CNTL
,
1550 .hw
.init
= &(struct clk_init_data
){
1552 .ops
= &clk_regmap_mux_ops
,
1554 * bit 31 selects from 2 possible parents:
1557 .parent_names
= (const char *[]){ "vapb_0", "vapb_1" },
1559 .flags
= CLK_SET_RATE_NO_REPARENT
,
1563 static struct clk_regmap gxbb_vapb
= {
1564 .data
= &(struct clk_regmap_gate_data
){
1565 .offset
= HHI_VAPBCLK_CNTL
,
1568 .hw
.init
= &(struct clk_init_data
) {
1570 .ops
= &clk_regmap_gate_ops
,
1571 .parent_names
= (const char *[]){ "vapb_sel" },
1573 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1579 static struct clk_regmap gxbb_vid_pll_div
= {
1580 .data
= &(struct meson_vid_pll_div_data
){
1582 .reg_off
= HHI_VID_PLL_CLK_DIV
,
1587 .reg_off
= HHI_VID_PLL_CLK_DIV
,
1592 .hw
.init
= &(struct clk_init_data
) {
1593 .name
= "vid_pll_div",
1594 .ops
= &meson_vid_pll_div_ro_ops
,
1595 .parent_names
= (const char *[]){ "hdmi_pll" },
1597 .flags
= CLK_SET_RATE_PARENT
| CLK_GET_RATE_NOCACHE
,
1601 static const char * const gxbb_vid_pll_parent_names
[] = { "vid_pll_div", "hdmi_pll" };
1603 static struct clk_regmap gxbb_vid_pll_sel
= {
1604 .data
= &(struct clk_regmap_mux_data
){
1605 .offset
= HHI_VID_PLL_CLK_DIV
,
1609 .hw
.init
= &(struct clk_init_data
){
1610 .name
= "vid_pll_sel",
1611 .ops
= &clk_regmap_mux_ops
,
1613 * bit 18 selects from 2 possible parents:
1614 * vid_pll_div or hdmi_pll
1616 .parent_names
= gxbb_vid_pll_parent_names
,
1617 .num_parents
= ARRAY_SIZE(gxbb_vid_pll_parent_names
),
1618 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
1622 static struct clk_regmap gxbb_vid_pll
= {
1623 .data
= &(struct clk_regmap_gate_data
){
1624 .offset
= HHI_VID_PLL_CLK_DIV
,
1627 .hw
.init
= &(struct clk_init_data
) {
1629 .ops
= &clk_regmap_gate_ops
,
1630 .parent_names
= (const char *[]){ "vid_pll_sel" },
1632 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1636 static const char * const gxbb_vclk_parent_names
[] = {
1637 "vid_pll", "fclk_div4", "fclk_div3", "fclk_div5", "vid_pll",
1638 "fclk_div7", "mpll1",
1641 static struct clk_regmap gxbb_vclk_sel
= {
1642 .data
= &(struct clk_regmap_mux_data
){
1643 .offset
= HHI_VID_CLK_CNTL
,
1647 .hw
.init
= &(struct clk_init_data
){
1649 .ops
= &clk_regmap_mux_ops
,
1651 * bits 16:18 selects from 8 possible parents:
1652 * vid_pll, fclk_div4, fclk_div3, fclk_div5,
1653 * vid_pll, fclk_div7, mp1
1655 .parent_names
= gxbb_vclk_parent_names
,
1656 .num_parents
= ARRAY_SIZE(gxbb_vclk_parent_names
),
1657 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
1661 static struct clk_regmap gxbb_vclk2_sel
= {
1662 .data
= &(struct clk_regmap_mux_data
){
1663 .offset
= HHI_VIID_CLK_CNTL
,
1667 .hw
.init
= &(struct clk_init_data
){
1668 .name
= "vclk2_sel",
1669 .ops
= &clk_regmap_mux_ops
,
1671 * bits 16:18 selects from 8 possible parents:
1672 * vid_pll, fclk_div4, fclk_div3, fclk_div5,
1673 * vid_pll, fclk_div7, mp1
1675 .parent_names
= gxbb_vclk_parent_names
,
1676 .num_parents
= ARRAY_SIZE(gxbb_vclk_parent_names
),
1677 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
1681 static struct clk_regmap gxbb_vclk_input
= {
1682 .data
= &(struct clk_regmap_gate_data
){
1683 .offset
= HHI_VID_CLK_DIV
,
1686 .hw
.init
= &(struct clk_init_data
) {
1687 .name
= "vclk_input",
1688 .ops
= &clk_regmap_gate_ops
,
1689 .parent_names
= (const char *[]){ "vclk_sel" },
1691 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1695 static struct clk_regmap gxbb_vclk2_input
= {
1696 .data
= &(struct clk_regmap_gate_data
){
1697 .offset
= HHI_VIID_CLK_DIV
,
1700 .hw
.init
= &(struct clk_init_data
) {
1701 .name
= "vclk2_input",
1702 .ops
= &clk_regmap_gate_ops
,
1703 .parent_names
= (const char *[]){ "vclk2_sel" },
1705 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1709 static struct clk_regmap gxbb_vclk_div
= {
1710 .data
= &(struct clk_regmap_div_data
){
1711 .offset
= HHI_VID_CLK_DIV
,
1715 .hw
.init
= &(struct clk_init_data
){
1717 .ops
= &clk_regmap_divider_ops
,
1718 .parent_names
= (const char *[]){ "vclk_input" },
1720 .flags
= CLK_GET_RATE_NOCACHE
,
1724 static struct clk_regmap gxbb_vclk2_div
= {
1725 .data
= &(struct clk_regmap_div_data
){
1726 .offset
= HHI_VIID_CLK_DIV
,
1730 .hw
.init
= &(struct clk_init_data
){
1731 .name
= "vclk2_div",
1732 .ops
= &clk_regmap_divider_ops
,
1733 .parent_names
= (const char *[]){ "vclk2_input" },
1735 .flags
= CLK_GET_RATE_NOCACHE
,
1739 static struct clk_regmap gxbb_vclk
= {
1740 .data
= &(struct clk_regmap_gate_data
){
1741 .offset
= HHI_VID_CLK_CNTL
,
1744 .hw
.init
= &(struct clk_init_data
) {
1746 .ops
= &clk_regmap_gate_ops
,
1747 .parent_names
= (const char *[]){ "vclk_div" },
1749 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1753 static struct clk_regmap gxbb_vclk2
= {
1754 .data
= &(struct clk_regmap_gate_data
){
1755 .offset
= HHI_VIID_CLK_CNTL
,
1758 .hw
.init
= &(struct clk_init_data
) {
1760 .ops
= &clk_regmap_gate_ops
,
1761 .parent_names
= (const char *[]){ "vclk2_div" },
1763 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1767 static struct clk_regmap gxbb_vclk_div1
= {
1768 .data
= &(struct clk_regmap_gate_data
){
1769 .offset
= HHI_VID_CLK_CNTL
,
1772 .hw
.init
= &(struct clk_init_data
) {
1773 .name
= "vclk_div1",
1774 .ops
= &clk_regmap_gate_ops
,
1775 .parent_names
= (const char *[]){ "vclk" },
1777 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1781 static struct clk_regmap gxbb_vclk_div2_en
= {
1782 .data
= &(struct clk_regmap_gate_data
){
1783 .offset
= HHI_VID_CLK_CNTL
,
1786 .hw
.init
= &(struct clk_init_data
) {
1787 .name
= "vclk_div2_en",
1788 .ops
= &clk_regmap_gate_ops
,
1789 .parent_names
= (const char *[]){ "vclk" },
1791 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1795 static struct clk_regmap gxbb_vclk_div4_en
= {
1796 .data
= &(struct clk_regmap_gate_data
){
1797 .offset
= HHI_VID_CLK_CNTL
,
1800 .hw
.init
= &(struct clk_init_data
) {
1801 .name
= "vclk_div4_en",
1802 .ops
= &clk_regmap_gate_ops
,
1803 .parent_names
= (const char *[]){ "vclk" },
1805 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1809 static struct clk_regmap gxbb_vclk_div6_en
= {
1810 .data
= &(struct clk_regmap_gate_data
){
1811 .offset
= HHI_VID_CLK_CNTL
,
1814 .hw
.init
= &(struct clk_init_data
) {
1815 .name
= "vclk_div6_en",
1816 .ops
= &clk_regmap_gate_ops
,
1817 .parent_names
= (const char *[]){ "vclk" },
1819 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1823 static struct clk_regmap gxbb_vclk_div12_en
= {
1824 .data
= &(struct clk_regmap_gate_data
){
1825 .offset
= HHI_VID_CLK_CNTL
,
1828 .hw
.init
= &(struct clk_init_data
) {
1829 .name
= "vclk_div12_en",
1830 .ops
= &clk_regmap_gate_ops
,
1831 .parent_names
= (const char *[]){ "vclk" },
1833 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1837 static struct clk_regmap gxbb_vclk2_div1
= {
1838 .data
= &(struct clk_regmap_gate_data
){
1839 .offset
= HHI_VIID_CLK_CNTL
,
1842 .hw
.init
= &(struct clk_init_data
) {
1843 .name
= "vclk2_div1",
1844 .ops
= &clk_regmap_gate_ops
,
1845 .parent_names
= (const char *[]){ "vclk2" },
1847 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1851 static struct clk_regmap gxbb_vclk2_div2_en
= {
1852 .data
= &(struct clk_regmap_gate_data
){
1853 .offset
= HHI_VIID_CLK_CNTL
,
1856 .hw
.init
= &(struct clk_init_data
) {
1857 .name
= "vclk2_div2_en",
1858 .ops
= &clk_regmap_gate_ops
,
1859 .parent_names
= (const char *[]){ "vclk2" },
1861 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1865 static struct clk_regmap gxbb_vclk2_div4_en
= {
1866 .data
= &(struct clk_regmap_gate_data
){
1867 .offset
= HHI_VIID_CLK_CNTL
,
1870 .hw
.init
= &(struct clk_init_data
) {
1871 .name
= "vclk2_div4_en",
1872 .ops
= &clk_regmap_gate_ops
,
1873 .parent_names
= (const char *[]){ "vclk2" },
1875 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1879 static struct clk_regmap gxbb_vclk2_div6_en
= {
1880 .data
= &(struct clk_regmap_gate_data
){
1881 .offset
= HHI_VIID_CLK_CNTL
,
1884 .hw
.init
= &(struct clk_init_data
) {
1885 .name
= "vclk2_div6_en",
1886 .ops
= &clk_regmap_gate_ops
,
1887 .parent_names
= (const char *[]){ "vclk2" },
1889 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1893 static struct clk_regmap gxbb_vclk2_div12_en
= {
1894 .data
= &(struct clk_regmap_gate_data
){
1895 .offset
= HHI_VIID_CLK_CNTL
,
1898 .hw
.init
= &(struct clk_init_data
) {
1899 .name
= "vclk2_div12_en",
1900 .ops
= &clk_regmap_gate_ops
,
1901 .parent_names
= (const char *[]){ "vclk2" },
1903 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
1907 static struct clk_fixed_factor gxbb_vclk_div2
= {
1910 .hw
.init
= &(struct clk_init_data
){
1911 .name
= "vclk_div2",
1912 .ops
= &clk_fixed_factor_ops
,
1913 .parent_names
= (const char *[]){ "vclk_div2_en" },
1918 static struct clk_fixed_factor gxbb_vclk_div4
= {
1921 .hw
.init
= &(struct clk_init_data
){
1922 .name
= "vclk_div4",
1923 .ops
= &clk_fixed_factor_ops
,
1924 .parent_names
= (const char *[]){ "vclk_div4_en" },
1929 static struct clk_fixed_factor gxbb_vclk_div6
= {
1932 .hw
.init
= &(struct clk_init_data
){
1933 .name
= "vclk_div6",
1934 .ops
= &clk_fixed_factor_ops
,
1935 .parent_names
= (const char *[]){ "vclk_div6_en" },
1940 static struct clk_fixed_factor gxbb_vclk_div12
= {
1943 .hw
.init
= &(struct clk_init_data
){
1944 .name
= "vclk_div12",
1945 .ops
= &clk_fixed_factor_ops
,
1946 .parent_names
= (const char *[]){ "vclk_div12_en" },
1951 static struct clk_fixed_factor gxbb_vclk2_div2
= {
1954 .hw
.init
= &(struct clk_init_data
){
1955 .name
= "vclk2_div2",
1956 .ops
= &clk_fixed_factor_ops
,
1957 .parent_names
= (const char *[]){ "vclk2_div2_en" },
1962 static struct clk_fixed_factor gxbb_vclk2_div4
= {
1965 .hw
.init
= &(struct clk_init_data
){
1966 .name
= "vclk2_div4",
1967 .ops
= &clk_fixed_factor_ops
,
1968 .parent_names
= (const char *[]){ "vclk2_div4_en" },
1973 static struct clk_fixed_factor gxbb_vclk2_div6
= {
1976 .hw
.init
= &(struct clk_init_data
){
1977 .name
= "vclk2_div6",
1978 .ops
= &clk_fixed_factor_ops
,
1979 .parent_names
= (const char *[]){ "vclk2_div6_en" },
1984 static struct clk_fixed_factor gxbb_vclk2_div12
= {
1987 .hw
.init
= &(struct clk_init_data
){
1988 .name
= "vclk2_div12",
1989 .ops
= &clk_fixed_factor_ops
,
1990 .parent_names
= (const char *[]){ "vclk2_div12_en" },
1995 static u32 mux_table_cts_sel
[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
1996 static const char * const gxbb_cts_parent_names
[] = {
1997 "vclk_div1", "vclk_div2", "vclk_div4", "vclk_div6",
1998 "vclk_div12", "vclk2_div1", "vclk2_div2", "vclk2_div4",
1999 "vclk2_div6", "vclk2_div12"
2002 static struct clk_regmap gxbb_cts_enci_sel
= {
2003 .data
= &(struct clk_regmap_mux_data
){
2004 .offset
= HHI_VID_CLK_DIV
,
2007 .table
= mux_table_cts_sel
,
2009 .hw
.init
= &(struct clk_init_data
){
2010 .name
= "cts_enci_sel",
2011 .ops
= &clk_regmap_mux_ops
,
2012 .parent_names
= gxbb_cts_parent_names
,
2013 .num_parents
= ARRAY_SIZE(gxbb_cts_parent_names
),
2014 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2018 static struct clk_regmap gxbb_cts_encp_sel
= {
2019 .data
= &(struct clk_regmap_mux_data
){
2020 .offset
= HHI_VID_CLK_DIV
,
2023 .table
= mux_table_cts_sel
,
2025 .hw
.init
= &(struct clk_init_data
){
2026 .name
= "cts_encp_sel",
2027 .ops
= &clk_regmap_mux_ops
,
2028 .parent_names
= gxbb_cts_parent_names
,
2029 .num_parents
= ARRAY_SIZE(gxbb_cts_parent_names
),
2030 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2034 static struct clk_regmap gxbb_cts_vdac_sel
= {
2035 .data
= &(struct clk_regmap_mux_data
){
2036 .offset
= HHI_VIID_CLK_DIV
,
2039 .table
= mux_table_cts_sel
,
2041 .hw
.init
= &(struct clk_init_data
){
2042 .name
= "cts_vdac_sel",
2043 .ops
= &clk_regmap_mux_ops
,
2044 .parent_names
= gxbb_cts_parent_names
,
2045 .num_parents
= ARRAY_SIZE(gxbb_cts_parent_names
),
2046 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2050 /* TOFIX: add support for cts_tcon */
2051 static u32 mux_table_hdmi_tx_sel
[] = { 0, 1, 2, 3, 4, 8, 9, 10, 11, 12 };
2052 static const char * const gxbb_cts_hdmi_tx_parent_names
[] = {
2053 "vclk_div1", "vclk_div2", "vclk_div4", "vclk_div6",
2054 "vclk_div12", "vclk2_div1", "vclk2_div2", "vclk2_div4",
2055 "vclk2_div6", "vclk2_div12"
2058 static struct clk_regmap gxbb_hdmi_tx_sel
= {
2059 .data
= &(struct clk_regmap_mux_data
){
2060 .offset
= HHI_HDMI_CLK_CNTL
,
2063 .table
= mux_table_hdmi_tx_sel
,
2065 .hw
.init
= &(struct clk_init_data
){
2066 .name
= "hdmi_tx_sel",
2067 .ops
= &clk_regmap_mux_ops
,
2069 * bits 31:28 selects from 12 possible parents:
2070 * vclk_div1, vclk_div2, vclk_div4, vclk_div6, vclk_div12
2071 * vclk2_div1, vclk2_div2, vclk2_div4, vclk2_div6, vclk2_div12,
2074 .parent_names
= gxbb_cts_hdmi_tx_parent_names
,
2075 .num_parents
= ARRAY_SIZE(gxbb_cts_hdmi_tx_parent_names
),
2076 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2080 static struct clk_regmap gxbb_cts_enci
= {
2081 .data
= &(struct clk_regmap_gate_data
){
2082 .offset
= HHI_VID_CLK_CNTL2
,
2085 .hw
.init
= &(struct clk_init_data
) {
2087 .ops
= &clk_regmap_gate_ops
,
2088 .parent_names
= (const char *[]){ "cts_enci_sel" },
2090 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2094 static struct clk_regmap gxbb_cts_encp
= {
2095 .data
= &(struct clk_regmap_gate_data
){
2096 .offset
= HHI_VID_CLK_CNTL2
,
2099 .hw
.init
= &(struct clk_init_data
) {
2101 .ops
= &clk_regmap_gate_ops
,
2102 .parent_names
= (const char *[]){ "cts_encp_sel" },
2104 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2108 static struct clk_regmap gxbb_cts_vdac
= {
2109 .data
= &(struct clk_regmap_gate_data
){
2110 .offset
= HHI_VID_CLK_CNTL2
,
2113 .hw
.init
= &(struct clk_init_data
) {
2115 .ops
= &clk_regmap_gate_ops
,
2116 .parent_names
= (const char *[]){ "cts_vdac_sel" },
2118 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2122 static struct clk_regmap gxbb_hdmi_tx
= {
2123 .data
= &(struct clk_regmap_gate_data
){
2124 .offset
= HHI_VID_CLK_CNTL2
,
2127 .hw
.init
= &(struct clk_init_data
) {
2129 .ops
= &clk_regmap_gate_ops
,
2130 .parent_names
= (const char *[]){ "hdmi_tx_sel" },
2132 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2138 static const char * const gxbb_hdmi_parent_names
[] = {
2139 IN_PREFIX
"xtal", "fclk_div4", "fclk_div3", "fclk_div5"
2142 static struct clk_regmap gxbb_hdmi_sel
= {
2143 .data
= &(struct clk_regmap_mux_data
){
2144 .offset
= HHI_HDMI_CLK_CNTL
,
2147 .flags
= CLK_MUX_ROUND_CLOSEST
,
2149 .hw
.init
= &(struct clk_init_data
){
2151 .ops
= &clk_regmap_mux_ops
,
2152 .parent_names
= gxbb_hdmi_parent_names
,
2153 .num_parents
= ARRAY_SIZE(gxbb_hdmi_parent_names
),
2154 .flags
= CLK_SET_RATE_NO_REPARENT
| CLK_GET_RATE_NOCACHE
,
2158 static struct clk_regmap gxbb_hdmi_div
= {
2159 .data
= &(struct clk_regmap_div_data
){
2160 .offset
= HHI_HDMI_CLK_CNTL
,
2164 .hw
.init
= &(struct clk_init_data
){
2166 .ops
= &clk_regmap_divider_ops
,
2167 .parent_names
= (const char *[]){ "hdmi_sel" },
2169 .flags
= CLK_GET_RATE_NOCACHE
,
2173 static struct clk_regmap gxbb_hdmi
= {
2174 .data
= &(struct clk_regmap_gate_data
){
2175 .offset
= HHI_HDMI_CLK_CNTL
,
2178 .hw
.init
= &(struct clk_init_data
) {
2180 .ops
= &clk_regmap_gate_ops
,
2181 .parent_names
= (const char *[]){ "hdmi_div" },
2183 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2189 static const char * const gxbb_vdec_parent_names
[] = {
2190 "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7"
2193 static struct clk_regmap gxbb_vdec_1_sel
= {
2194 .data
= &(struct clk_regmap_mux_data
){
2195 .offset
= HHI_VDEC_CLK_CNTL
,
2198 .flags
= CLK_MUX_ROUND_CLOSEST
,
2200 .hw
.init
= &(struct clk_init_data
){
2201 .name
= "vdec_1_sel",
2202 .ops
= &clk_regmap_mux_ops
,
2203 .parent_names
= gxbb_vdec_parent_names
,
2204 .num_parents
= ARRAY_SIZE(gxbb_vdec_parent_names
),
2205 .flags
= CLK_SET_RATE_PARENT
,
2209 static struct clk_regmap gxbb_vdec_1_div
= {
2210 .data
= &(struct clk_regmap_div_data
){
2211 .offset
= HHI_VDEC_CLK_CNTL
,
2214 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
2216 .hw
.init
= &(struct clk_init_data
){
2217 .name
= "vdec_1_div",
2218 .ops
= &clk_regmap_divider_ops
,
2219 .parent_names
= (const char *[]){ "vdec_1_sel" },
2221 .flags
= CLK_SET_RATE_PARENT
,
2225 static struct clk_regmap gxbb_vdec_1
= {
2226 .data
= &(struct clk_regmap_gate_data
){
2227 .offset
= HHI_VDEC_CLK_CNTL
,
2230 .hw
.init
= &(struct clk_init_data
) {
2232 .ops
= &clk_regmap_gate_ops
,
2233 .parent_names
= (const char *[]){ "vdec_1_div" },
2235 .flags
= CLK_SET_RATE_PARENT
,
2239 static struct clk_regmap gxbb_vdec_hevc_sel
= {
2240 .data
= &(struct clk_regmap_mux_data
){
2241 .offset
= HHI_VDEC2_CLK_CNTL
,
2244 .flags
= CLK_MUX_ROUND_CLOSEST
,
2246 .hw
.init
= &(struct clk_init_data
){
2247 .name
= "vdec_hevc_sel",
2248 .ops
= &clk_regmap_mux_ops
,
2249 .parent_names
= gxbb_vdec_parent_names
,
2250 .num_parents
= ARRAY_SIZE(gxbb_vdec_parent_names
),
2251 .flags
= CLK_SET_RATE_PARENT
,
2255 static struct clk_regmap gxbb_vdec_hevc_div
= {
2256 .data
= &(struct clk_regmap_div_data
){
2257 .offset
= HHI_VDEC2_CLK_CNTL
,
2260 .flags
= CLK_DIVIDER_ROUND_CLOSEST
,
2262 .hw
.init
= &(struct clk_init_data
){
2263 .name
= "vdec_hevc_div",
2264 .ops
= &clk_regmap_divider_ops
,
2265 .parent_names
= (const char *[]){ "vdec_hevc_sel" },
2267 .flags
= CLK_SET_RATE_PARENT
,
2271 static struct clk_regmap gxbb_vdec_hevc
= {
2272 .data
= &(struct clk_regmap_gate_data
){
2273 .offset
= HHI_VDEC2_CLK_CNTL
,
2276 .hw
.init
= &(struct clk_init_data
) {
2277 .name
= "vdec_hevc",
2278 .ops
= &clk_regmap_gate_ops
,
2279 .parent_names
= (const char *[]){ "vdec_hevc_div" },
2281 .flags
= CLK_SET_RATE_PARENT
,
2285 static u32 mux_table_gen_clk
[] = { 0, 4, 5, 6, 7, 8,
2286 9, 10, 11, 13, 14, };
2287 static const char * const gen_clk_parent_names
[] = {
2288 IN_PREFIX
"xtal", "vdec_1", "vdec_hevc", "mpll0", "mpll1", "mpll2",
2289 "fclk_div4", "fclk_div3", "fclk_div5", "fclk_div7", "gp0_pll",
2292 static struct clk_regmap gxbb_gen_clk_sel
= {
2293 .data
= &(struct clk_regmap_mux_data
){
2294 .offset
= HHI_GEN_CLK_CNTL
,
2297 .table
= mux_table_gen_clk
,
2299 .hw
.init
= &(struct clk_init_data
){
2300 .name
= "gen_clk_sel",
2301 .ops
= &clk_regmap_mux_ops
,
2303 * bits 15:12 selects from 14 possible parents:
2304 * xtal, [rtc_oscin_i], [sys_cpu_div16], [ddr_dpll_pt],
2305 * vid_pll, vid2_pll (hevc), mpll0, mpll1, mpll2, fdiv4,
2306 * fdiv3, fdiv5, [cts_msr_clk], fdiv7, gp0_pll
2308 .parent_names
= gen_clk_parent_names
,
2309 .num_parents
= ARRAY_SIZE(gen_clk_parent_names
),
2313 static struct clk_regmap gxbb_gen_clk_div
= {
2314 .data
= &(struct clk_regmap_div_data
){
2315 .offset
= HHI_GEN_CLK_CNTL
,
2319 .hw
.init
= &(struct clk_init_data
){
2320 .name
= "gen_clk_div",
2321 .ops
= &clk_regmap_divider_ops
,
2322 .parent_names
= (const char *[]){ "gen_clk_sel" },
2324 .flags
= CLK_SET_RATE_PARENT
,
2328 static struct clk_regmap gxbb_gen_clk
= {
2329 .data
= &(struct clk_regmap_gate_data
){
2330 .offset
= HHI_GEN_CLK_CNTL
,
2333 .hw
.init
= &(struct clk_init_data
){
2335 .ops
= &clk_regmap_gate_ops
,
2336 .parent_names
= (const char *[]){ "gen_clk_div" },
2338 .flags
= CLK_SET_RATE_PARENT
,
2342 /* Everything Else (EE) domain gates */
2343 static MESON_GATE(gxbb_ddr
, HHI_GCLK_MPEG0
, 0);
2344 static MESON_GATE(gxbb_dos
, HHI_GCLK_MPEG0
, 1);
2345 static MESON_GATE(gxbb_isa
, HHI_GCLK_MPEG0
, 5);
2346 static MESON_GATE(gxbb_pl301
, HHI_GCLK_MPEG0
, 6);
2347 static MESON_GATE(gxbb_periphs
, HHI_GCLK_MPEG0
, 7);
2348 static MESON_GATE(gxbb_spicc
, HHI_GCLK_MPEG0
, 8);
2349 static MESON_GATE(gxbb_i2c
, HHI_GCLK_MPEG0
, 9);
2350 static MESON_GATE(gxbb_sana
, HHI_GCLK_MPEG0
, 10);
2351 static MESON_GATE(gxbb_smart_card
, HHI_GCLK_MPEG0
, 11);
2352 static MESON_GATE(gxbb_rng0
, HHI_GCLK_MPEG0
, 12);
2353 static MESON_GATE(gxbb_uart0
, HHI_GCLK_MPEG0
, 13);
2354 static MESON_GATE(gxbb_sdhc
, HHI_GCLK_MPEG0
, 14);
2355 static MESON_GATE(gxbb_stream
, HHI_GCLK_MPEG0
, 15);
2356 static MESON_GATE(gxbb_async_fifo
, HHI_GCLK_MPEG0
, 16);
2357 static MESON_GATE(gxbb_sdio
, HHI_GCLK_MPEG0
, 17);
2358 static MESON_GATE(gxbb_abuf
, HHI_GCLK_MPEG0
, 18);
2359 static MESON_GATE(gxbb_hiu_iface
, HHI_GCLK_MPEG0
, 19);
2360 static MESON_GATE(gxbb_assist_misc
, HHI_GCLK_MPEG0
, 23);
2361 static MESON_GATE(gxbb_emmc_a
, HHI_GCLK_MPEG0
, 24);
2362 static MESON_GATE(gxbb_emmc_b
, HHI_GCLK_MPEG0
, 25);
2363 static MESON_GATE(gxbb_emmc_c
, HHI_GCLK_MPEG0
, 26);
2364 static MESON_GATE(gxbb_spi
, HHI_GCLK_MPEG0
, 30);
2366 static MESON_GATE(gxbb_i2s_spdif
, HHI_GCLK_MPEG1
, 2);
2367 static MESON_GATE(gxbb_eth
, HHI_GCLK_MPEG1
, 3);
2368 static MESON_GATE(gxbb_demux
, HHI_GCLK_MPEG1
, 4);
2369 static MESON_GATE(gxbb_aiu_glue
, HHI_GCLK_MPEG1
, 6);
2370 static MESON_GATE(gxbb_iec958
, HHI_GCLK_MPEG1
, 7);
2371 static MESON_GATE(gxbb_i2s_out
, HHI_GCLK_MPEG1
, 8);
2372 static MESON_GATE(gxbb_amclk
, HHI_GCLK_MPEG1
, 9);
2373 static MESON_GATE(gxbb_aififo2
, HHI_GCLK_MPEG1
, 10);
2374 static MESON_GATE(gxbb_mixer
, HHI_GCLK_MPEG1
, 11);
2375 static MESON_GATE(gxbb_mixer_iface
, HHI_GCLK_MPEG1
, 12);
2376 static MESON_GATE(gxbb_adc
, HHI_GCLK_MPEG1
, 13);
2377 static MESON_GATE(gxbb_blkmv
, HHI_GCLK_MPEG1
, 14);
2378 static MESON_GATE(gxbb_aiu
, HHI_GCLK_MPEG1
, 15);
2379 static MESON_GATE(gxbb_uart1
, HHI_GCLK_MPEG1
, 16);
2380 static MESON_GATE(gxbb_g2d
, HHI_GCLK_MPEG1
, 20);
2381 static MESON_GATE(gxbb_usb0
, HHI_GCLK_MPEG1
, 21);
2382 static MESON_GATE(gxbb_usb1
, HHI_GCLK_MPEG1
, 22);
2383 static MESON_GATE(gxbb_reset
, HHI_GCLK_MPEG1
, 23);
2384 static MESON_GATE(gxbb_nand
, HHI_GCLK_MPEG1
, 24);
2385 static MESON_GATE(gxbb_dos_parser
, HHI_GCLK_MPEG1
, 25);
2386 static MESON_GATE(gxbb_usb
, HHI_GCLK_MPEG1
, 26);
2387 static MESON_GATE(gxbb_vdin1
, HHI_GCLK_MPEG1
, 28);
2388 static MESON_GATE(gxbb_ahb_arb0
, HHI_GCLK_MPEG1
, 29);
2389 static MESON_GATE(gxbb_efuse
, HHI_GCLK_MPEG1
, 30);
2390 static MESON_GATE(gxbb_boot_rom
, HHI_GCLK_MPEG1
, 31);
2392 static MESON_GATE(gxbb_ahb_data_bus
, HHI_GCLK_MPEG2
, 1);
2393 static MESON_GATE(gxbb_ahb_ctrl_bus
, HHI_GCLK_MPEG2
, 2);
2394 static MESON_GATE(gxbb_hdmi_intr_sync
, HHI_GCLK_MPEG2
, 3);
2395 static MESON_GATE(gxbb_hdmi_pclk
, HHI_GCLK_MPEG2
, 4);
2396 static MESON_GATE(gxbb_usb1_ddr_bridge
, HHI_GCLK_MPEG2
, 8);
2397 static MESON_GATE(gxbb_usb0_ddr_bridge
, HHI_GCLK_MPEG2
, 9);
2398 static MESON_GATE(gxbb_mmc_pclk
, HHI_GCLK_MPEG2
, 11);
2399 static MESON_GATE(gxbb_dvin
, HHI_GCLK_MPEG2
, 12);
2400 static MESON_GATE(gxbb_uart2
, HHI_GCLK_MPEG2
, 15);
2401 static MESON_GATE(gxbb_sar_adc
, HHI_GCLK_MPEG2
, 22);
2402 static MESON_GATE(gxbb_vpu_intr
, HHI_GCLK_MPEG2
, 25);
2403 static MESON_GATE(gxbb_sec_ahb_ahb3_bridge
, HHI_GCLK_MPEG2
, 26);
2404 static MESON_GATE(gxbb_clk81_a53
, HHI_GCLK_MPEG2
, 29);
2406 static MESON_GATE(gxbb_vclk2_venci0
, HHI_GCLK_OTHER
, 1);
2407 static MESON_GATE(gxbb_vclk2_venci1
, HHI_GCLK_OTHER
, 2);
2408 static MESON_GATE(gxbb_vclk2_vencp0
, HHI_GCLK_OTHER
, 3);
2409 static MESON_GATE(gxbb_vclk2_vencp1
, HHI_GCLK_OTHER
, 4);
2410 static MESON_GATE(gxbb_gclk_venci_int0
, HHI_GCLK_OTHER
, 8);
2411 static MESON_GATE(gxbb_gclk_vencp_int
, HHI_GCLK_OTHER
, 9);
2412 static MESON_GATE(gxbb_dac_clk
, HHI_GCLK_OTHER
, 10);
2413 static MESON_GATE(gxbb_aoclk_gate
, HHI_GCLK_OTHER
, 14);
2414 static MESON_GATE(gxbb_iec958_gate
, HHI_GCLK_OTHER
, 16);
2415 static MESON_GATE(gxbb_enc480p
, HHI_GCLK_OTHER
, 20);
2416 static MESON_GATE(gxbb_rng1
, HHI_GCLK_OTHER
, 21);
2417 static MESON_GATE(gxbb_gclk_venci_int1
, HHI_GCLK_OTHER
, 22);
2418 static MESON_GATE(gxbb_vclk2_venclmcc
, HHI_GCLK_OTHER
, 24);
2419 static MESON_GATE(gxbb_vclk2_vencl
, HHI_GCLK_OTHER
, 25);
2420 static MESON_GATE(gxbb_vclk_other
, HHI_GCLK_OTHER
, 26);
2421 static MESON_GATE(gxbb_edp
, HHI_GCLK_OTHER
, 31);
2423 /* Always On (AO) domain gates */
2425 static MESON_GATE(gxbb_ao_media_cpu
, HHI_GCLK_AO
, 0);
2426 static MESON_GATE(gxbb_ao_ahb_sram
, HHI_GCLK_AO
, 1);
2427 static MESON_GATE(gxbb_ao_ahb_bus
, HHI_GCLK_AO
, 2);
2428 static MESON_GATE(gxbb_ao_iface
, HHI_GCLK_AO
, 3);
2429 static MESON_GATE(gxbb_ao_i2c
, HHI_GCLK_AO
, 4);
2431 /* Array of all clocks provided by this provider */
2433 static struct clk_hw_onecell_data gxbb_hw_onecell_data
= {
2435 [CLKID_SYS_PLL
] = &gxbb_sys_pll
.hw
,
2436 [CLKID_HDMI_PLL
] = &gxbb_hdmi_pll
.hw
,
2437 [CLKID_FIXED_PLL
] = &gxbb_fixed_pll
.hw
,
2438 [CLKID_FCLK_DIV2
] = &gxbb_fclk_div2
.hw
,
2439 [CLKID_FCLK_DIV3
] = &gxbb_fclk_div3
.hw
,
2440 [CLKID_FCLK_DIV4
] = &gxbb_fclk_div4
.hw
,
2441 [CLKID_FCLK_DIV5
] = &gxbb_fclk_div5
.hw
,
2442 [CLKID_FCLK_DIV7
] = &gxbb_fclk_div7
.hw
,
2443 [CLKID_GP0_PLL
] = &gxbb_gp0_pll
.hw
,
2444 [CLKID_MPEG_SEL
] = &gxbb_mpeg_clk_sel
.hw
,
2445 [CLKID_MPEG_DIV
] = &gxbb_mpeg_clk_div
.hw
,
2446 [CLKID_CLK81
] = &gxbb_clk81
.hw
,
2447 [CLKID_MPLL0
] = &gxbb_mpll0
.hw
,
2448 [CLKID_MPLL1
] = &gxbb_mpll1
.hw
,
2449 [CLKID_MPLL2
] = &gxbb_mpll2
.hw
,
2450 [CLKID_DDR
] = &gxbb_ddr
.hw
,
2451 [CLKID_DOS
] = &gxbb_dos
.hw
,
2452 [CLKID_ISA
] = &gxbb_isa
.hw
,
2453 [CLKID_PL301
] = &gxbb_pl301
.hw
,
2454 [CLKID_PERIPHS
] = &gxbb_periphs
.hw
,
2455 [CLKID_SPICC
] = &gxbb_spicc
.hw
,
2456 [CLKID_I2C
] = &gxbb_i2c
.hw
,
2457 [CLKID_SAR_ADC
] = &gxbb_sar_adc
.hw
,
2458 [CLKID_SMART_CARD
] = &gxbb_smart_card
.hw
,
2459 [CLKID_RNG0
] = &gxbb_rng0
.hw
,
2460 [CLKID_UART0
] = &gxbb_uart0
.hw
,
2461 [CLKID_SDHC
] = &gxbb_sdhc
.hw
,
2462 [CLKID_STREAM
] = &gxbb_stream
.hw
,
2463 [CLKID_ASYNC_FIFO
] = &gxbb_async_fifo
.hw
,
2464 [CLKID_SDIO
] = &gxbb_sdio
.hw
,
2465 [CLKID_ABUF
] = &gxbb_abuf
.hw
,
2466 [CLKID_HIU_IFACE
] = &gxbb_hiu_iface
.hw
,
2467 [CLKID_ASSIST_MISC
] = &gxbb_assist_misc
.hw
,
2468 [CLKID_SPI
] = &gxbb_spi
.hw
,
2469 [CLKID_I2S_SPDIF
] = &gxbb_i2s_spdif
.hw
,
2470 [CLKID_ETH
] = &gxbb_eth
.hw
,
2471 [CLKID_DEMUX
] = &gxbb_demux
.hw
,
2472 [CLKID_AIU_GLUE
] = &gxbb_aiu_glue
.hw
,
2473 [CLKID_IEC958
] = &gxbb_iec958
.hw
,
2474 [CLKID_I2S_OUT
] = &gxbb_i2s_out
.hw
,
2475 [CLKID_AMCLK
] = &gxbb_amclk
.hw
,
2476 [CLKID_AIFIFO2
] = &gxbb_aififo2
.hw
,
2477 [CLKID_MIXER
] = &gxbb_mixer
.hw
,
2478 [CLKID_MIXER_IFACE
] = &gxbb_mixer_iface
.hw
,
2479 [CLKID_ADC
] = &gxbb_adc
.hw
,
2480 [CLKID_BLKMV
] = &gxbb_blkmv
.hw
,
2481 [CLKID_AIU
] = &gxbb_aiu
.hw
,
2482 [CLKID_UART1
] = &gxbb_uart1
.hw
,
2483 [CLKID_G2D
] = &gxbb_g2d
.hw
,
2484 [CLKID_USB0
] = &gxbb_usb0
.hw
,
2485 [CLKID_USB1
] = &gxbb_usb1
.hw
,
2486 [CLKID_RESET
] = &gxbb_reset
.hw
,
2487 [CLKID_NAND
] = &gxbb_nand
.hw
,
2488 [CLKID_DOS_PARSER
] = &gxbb_dos_parser
.hw
,
2489 [CLKID_USB
] = &gxbb_usb
.hw
,
2490 [CLKID_VDIN1
] = &gxbb_vdin1
.hw
,
2491 [CLKID_AHB_ARB0
] = &gxbb_ahb_arb0
.hw
,
2492 [CLKID_EFUSE
] = &gxbb_efuse
.hw
,
2493 [CLKID_BOOT_ROM
] = &gxbb_boot_rom
.hw
,
2494 [CLKID_AHB_DATA_BUS
] = &gxbb_ahb_data_bus
.hw
,
2495 [CLKID_AHB_CTRL_BUS
] = &gxbb_ahb_ctrl_bus
.hw
,
2496 [CLKID_HDMI_INTR_SYNC
] = &gxbb_hdmi_intr_sync
.hw
,
2497 [CLKID_HDMI_PCLK
] = &gxbb_hdmi_pclk
.hw
,
2498 [CLKID_USB1_DDR_BRIDGE
] = &gxbb_usb1_ddr_bridge
.hw
,
2499 [CLKID_USB0_DDR_BRIDGE
] = &gxbb_usb0_ddr_bridge
.hw
,
2500 [CLKID_MMC_PCLK
] = &gxbb_mmc_pclk
.hw
,
2501 [CLKID_DVIN
] = &gxbb_dvin
.hw
,
2502 [CLKID_UART2
] = &gxbb_uart2
.hw
,
2503 [CLKID_SANA
] = &gxbb_sana
.hw
,
2504 [CLKID_VPU_INTR
] = &gxbb_vpu_intr
.hw
,
2505 [CLKID_SEC_AHB_AHB3_BRIDGE
] = &gxbb_sec_ahb_ahb3_bridge
.hw
,
2506 [CLKID_CLK81_A53
] = &gxbb_clk81_a53
.hw
,
2507 [CLKID_VCLK2_VENCI0
] = &gxbb_vclk2_venci0
.hw
,
2508 [CLKID_VCLK2_VENCI1
] = &gxbb_vclk2_venci1
.hw
,
2509 [CLKID_VCLK2_VENCP0
] = &gxbb_vclk2_vencp0
.hw
,
2510 [CLKID_VCLK2_VENCP1
] = &gxbb_vclk2_vencp1
.hw
,
2511 [CLKID_GCLK_VENCI_INT0
] = &gxbb_gclk_venci_int0
.hw
,
2512 [CLKID_GCLK_VENCI_INT
] = &gxbb_gclk_vencp_int
.hw
,
2513 [CLKID_DAC_CLK
] = &gxbb_dac_clk
.hw
,
2514 [CLKID_AOCLK_GATE
] = &gxbb_aoclk_gate
.hw
,
2515 [CLKID_IEC958_GATE
] = &gxbb_iec958_gate
.hw
,
2516 [CLKID_ENC480P
] = &gxbb_enc480p
.hw
,
2517 [CLKID_RNG1
] = &gxbb_rng1
.hw
,
2518 [CLKID_GCLK_VENCI_INT1
] = &gxbb_gclk_venci_int1
.hw
,
2519 [CLKID_VCLK2_VENCLMCC
] = &gxbb_vclk2_venclmcc
.hw
,
2520 [CLKID_VCLK2_VENCL
] = &gxbb_vclk2_vencl
.hw
,
2521 [CLKID_VCLK_OTHER
] = &gxbb_vclk_other
.hw
,
2522 [CLKID_EDP
] = &gxbb_edp
.hw
,
2523 [CLKID_AO_MEDIA_CPU
] = &gxbb_ao_media_cpu
.hw
,
2524 [CLKID_AO_AHB_SRAM
] = &gxbb_ao_ahb_sram
.hw
,
2525 [CLKID_AO_AHB_BUS
] = &gxbb_ao_ahb_bus
.hw
,
2526 [CLKID_AO_IFACE
] = &gxbb_ao_iface
.hw
,
2527 [CLKID_AO_I2C
] = &gxbb_ao_i2c
.hw
,
2528 [CLKID_SD_EMMC_A
] = &gxbb_emmc_a
.hw
,
2529 [CLKID_SD_EMMC_B
] = &gxbb_emmc_b
.hw
,
2530 [CLKID_SD_EMMC_C
] = &gxbb_emmc_c
.hw
,
2531 [CLKID_SAR_ADC_CLK
] = &gxbb_sar_adc_clk
.hw
,
2532 [CLKID_SAR_ADC_SEL
] = &gxbb_sar_adc_clk_sel
.hw
,
2533 [CLKID_SAR_ADC_DIV
] = &gxbb_sar_adc_clk_div
.hw
,
2534 [CLKID_MALI_0_SEL
] = &gxbb_mali_0_sel
.hw
,
2535 [CLKID_MALI_0_DIV
] = &gxbb_mali_0_div
.hw
,
2536 [CLKID_MALI_0
] = &gxbb_mali_0
.hw
,
2537 [CLKID_MALI_1_SEL
] = &gxbb_mali_1_sel
.hw
,
2538 [CLKID_MALI_1_DIV
] = &gxbb_mali_1_div
.hw
,
2539 [CLKID_MALI_1
] = &gxbb_mali_1
.hw
,
2540 [CLKID_MALI
] = &gxbb_mali
.hw
,
2541 [CLKID_CTS_AMCLK
] = &gxbb_cts_amclk
.hw
,
2542 [CLKID_CTS_AMCLK_SEL
] = &gxbb_cts_amclk_sel
.hw
,
2543 [CLKID_CTS_AMCLK_DIV
] = &gxbb_cts_amclk_div
.hw
,
2544 [CLKID_CTS_MCLK_I958
] = &gxbb_cts_mclk_i958
.hw
,
2545 [CLKID_CTS_MCLK_I958_SEL
] = &gxbb_cts_mclk_i958_sel
.hw
,
2546 [CLKID_CTS_MCLK_I958_DIV
] = &gxbb_cts_mclk_i958_div
.hw
,
2547 [CLKID_CTS_I958
] = &gxbb_cts_i958
.hw
,
2548 [CLKID_32K_CLK
] = &gxbb_32k_clk
.hw
,
2549 [CLKID_32K_CLK_SEL
] = &gxbb_32k_clk_sel
.hw
,
2550 [CLKID_32K_CLK_DIV
] = &gxbb_32k_clk_div
.hw
,
2551 [CLKID_SD_EMMC_A_CLK0_SEL
] = &gxbb_sd_emmc_a_clk0_sel
.hw
,
2552 [CLKID_SD_EMMC_A_CLK0_DIV
] = &gxbb_sd_emmc_a_clk0_div
.hw
,
2553 [CLKID_SD_EMMC_A_CLK0
] = &gxbb_sd_emmc_a_clk0
.hw
,
2554 [CLKID_SD_EMMC_B_CLK0_SEL
] = &gxbb_sd_emmc_b_clk0_sel
.hw
,
2555 [CLKID_SD_EMMC_B_CLK0_DIV
] = &gxbb_sd_emmc_b_clk0_div
.hw
,
2556 [CLKID_SD_EMMC_B_CLK0
] = &gxbb_sd_emmc_b_clk0
.hw
,
2557 [CLKID_SD_EMMC_C_CLK0_SEL
] = &gxbb_sd_emmc_c_clk0_sel
.hw
,
2558 [CLKID_SD_EMMC_C_CLK0_DIV
] = &gxbb_sd_emmc_c_clk0_div
.hw
,
2559 [CLKID_SD_EMMC_C_CLK0
] = &gxbb_sd_emmc_c_clk0
.hw
,
2560 [CLKID_VPU_0_SEL
] = &gxbb_vpu_0_sel
.hw
,
2561 [CLKID_VPU_0_DIV
] = &gxbb_vpu_0_div
.hw
,
2562 [CLKID_VPU_0
] = &gxbb_vpu_0
.hw
,
2563 [CLKID_VPU_1_SEL
] = &gxbb_vpu_1_sel
.hw
,
2564 [CLKID_VPU_1_DIV
] = &gxbb_vpu_1_div
.hw
,
2565 [CLKID_VPU_1
] = &gxbb_vpu_1
.hw
,
2566 [CLKID_VPU
] = &gxbb_vpu
.hw
,
2567 [CLKID_VAPB_0_SEL
] = &gxbb_vapb_0_sel
.hw
,
2568 [CLKID_VAPB_0_DIV
] = &gxbb_vapb_0_div
.hw
,
2569 [CLKID_VAPB_0
] = &gxbb_vapb_0
.hw
,
2570 [CLKID_VAPB_1_SEL
] = &gxbb_vapb_1_sel
.hw
,
2571 [CLKID_VAPB_1_DIV
] = &gxbb_vapb_1_div
.hw
,
2572 [CLKID_VAPB_1
] = &gxbb_vapb_1
.hw
,
2573 [CLKID_VAPB_SEL
] = &gxbb_vapb_sel
.hw
,
2574 [CLKID_VAPB
] = &gxbb_vapb
.hw
,
2575 [CLKID_HDMI_PLL_PRE_MULT
] = &gxbb_hdmi_pll_pre_mult
.hw
,
2576 [CLKID_MPLL0_DIV
] = &gxbb_mpll0_div
.hw
,
2577 [CLKID_MPLL1_DIV
] = &gxbb_mpll1_div
.hw
,
2578 [CLKID_MPLL2_DIV
] = &gxbb_mpll2_div
.hw
,
2579 [CLKID_MPLL_PREDIV
] = &gxbb_mpll_prediv
.hw
,
2580 [CLKID_FCLK_DIV2_DIV
] = &gxbb_fclk_div2_div
.hw
,
2581 [CLKID_FCLK_DIV3_DIV
] = &gxbb_fclk_div3_div
.hw
,
2582 [CLKID_FCLK_DIV4_DIV
] = &gxbb_fclk_div4_div
.hw
,
2583 [CLKID_FCLK_DIV5_DIV
] = &gxbb_fclk_div5_div
.hw
,
2584 [CLKID_FCLK_DIV7_DIV
] = &gxbb_fclk_div7_div
.hw
,
2585 [CLKID_VDEC_1_SEL
] = &gxbb_vdec_1_sel
.hw
,
2586 [CLKID_VDEC_1_DIV
] = &gxbb_vdec_1_div
.hw
,
2587 [CLKID_VDEC_1
] = &gxbb_vdec_1
.hw
,
2588 [CLKID_VDEC_HEVC_SEL
] = &gxbb_vdec_hevc_sel
.hw
,
2589 [CLKID_VDEC_HEVC_DIV
] = &gxbb_vdec_hevc_div
.hw
,
2590 [CLKID_VDEC_HEVC
] = &gxbb_vdec_hevc
.hw
,
2591 [CLKID_GEN_CLK_SEL
] = &gxbb_gen_clk_sel
.hw
,
2592 [CLKID_GEN_CLK_DIV
] = &gxbb_gen_clk_div
.hw
,
2593 [CLKID_GEN_CLK
] = &gxbb_gen_clk
.hw
,
2594 [CLKID_FIXED_PLL_DCO
] = &gxbb_fixed_pll_dco
.hw
,
2595 [CLKID_HDMI_PLL_DCO
] = &gxbb_hdmi_pll_dco
.hw
,
2596 [CLKID_HDMI_PLL_OD
] = &gxbb_hdmi_pll_od
.hw
,
2597 [CLKID_HDMI_PLL_OD2
] = &gxbb_hdmi_pll_od2
.hw
,
2598 [CLKID_SYS_PLL_DCO
] = &gxbb_sys_pll_dco
.hw
,
2599 [CLKID_GP0_PLL_DCO
] = &gxbb_gp0_pll_dco
.hw
,
2600 [CLKID_VID_PLL_DIV
] = &gxbb_vid_pll_div
.hw
,
2601 [CLKID_VID_PLL_SEL
] = &gxbb_vid_pll_sel
.hw
,
2602 [CLKID_VID_PLL
] = &gxbb_vid_pll
.hw
,
2603 [CLKID_VCLK_SEL
] = &gxbb_vclk_sel
.hw
,
2604 [CLKID_VCLK2_SEL
] = &gxbb_vclk2_sel
.hw
,
2605 [CLKID_VCLK_INPUT
] = &gxbb_vclk_input
.hw
,
2606 [CLKID_VCLK2_INPUT
] = &gxbb_vclk2_input
.hw
,
2607 [CLKID_VCLK_DIV
] = &gxbb_vclk_div
.hw
,
2608 [CLKID_VCLK2_DIV
] = &gxbb_vclk2_div
.hw
,
2609 [CLKID_VCLK
] = &gxbb_vclk
.hw
,
2610 [CLKID_VCLK2
] = &gxbb_vclk2
.hw
,
2611 [CLKID_VCLK_DIV1
] = &gxbb_vclk_div1
.hw
,
2612 [CLKID_VCLK_DIV2_EN
] = &gxbb_vclk_div2_en
.hw
,
2613 [CLKID_VCLK_DIV2
] = &gxbb_vclk_div2
.hw
,
2614 [CLKID_VCLK_DIV4_EN
] = &gxbb_vclk_div4_en
.hw
,
2615 [CLKID_VCLK_DIV4
] = &gxbb_vclk_div4
.hw
,
2616 [CLKID_VCLK_DIV6_EN
] = &gxbb_vclk_div6_en
.hw
,
2617 [CLKID_VCLK_DIV6
] = &gxbb_vclk_div6
.hw
,
2618 [CLKID_VCLK_DIV12_EN
] = &gxbb_vclk_div12_en
.hw
,
2619 [CLKID_VCLK_DIV12
] = &gxbb_vclk_div12
.hw
,
2620 [CLKID_VCLK2_DIV1
] = &gxbb_vclk2_div1
.hw
,
2621 [CLKID_VCLK2_DIV2_EN
] = &gxbb_vclk2_div2_en
.hw
,
2622 [CLKID_VCLK2_DIV2
] = &gxbb_vclk2_div2
.hw
,
2623 [CLKID_VCLK2_DIV4_EN
] = &gxbb_vclk2_div4_en
.hw
,
2624 [CLKID_VCLK2_DIV4
] = &gxbb_vclk2_div4
.hw
,
2625 [CLKID_VCLK2_DIV6_EN
] = &gxbb_vclk2_div6_en
.hw
,
2626 [CLKID_VCLK2_DIV6
] = &gxbb_vclk2_div6
.hw
,
2627 [CLKID_VCLK2_DIV12_EN
] = &gxbb_vclk2_div12_en
.hw
,
2628 [CLKID_VCLK2_DIV12
] = &gxbb_vclk2_div12
.hw
,
2629 [CLKID_CTS_ENCI_SEL
] = &gxbb_cts_enci_sel
.hw
,
2630 [CLKID_CTS_ENCP_SEL
] = &gxbb_cts_encp_sel
.hw
,
2631 [CLKID_CTS_VDAC_SEL
] = &gxbb_cts_vdac_sel
.hw
,
2632 [CLKID_HDMI_TX_SEL
] = &gxbb_hdmi_tx_sel
.hw
,
2633 [CLKID_CTS_ENCI
] = &gxbb_cts_enci
.hw
,
2634 [CLKID_CTS_ENCP
] = &gxbb_cts_encp
.hw
,
2635 [CLKID_CTS_VDAC
] = &gxbb_cts_vdac
.hw
,
2636 [CLKID_HDMI_TX
] = &gxbb_hdmi_tx
.hw
,
2637 [CLKID_HDMI_SEL
] = &gxbb_hdmi_sel
.hw
,
2638 [CLKID_HDMI_DIV
] = &gxbb_hdmi_div
.hw
,
2639 [CLKID_HDMI
] = &gxbb_hdmi
.hw
,
2645 static struct clk_hw_onecell_data gxl_hw_onecell_data
= {
2647 [CLKID_SYS_PLL
] = &gxbb_sys_pll
.hw
,
2648 [CLKID_HDMI_PLL
] = &gxl_hdmi_pll
.hw
,
2649 [CLKID_FIXED_PLL
] = &gxbb_fixed_pll
.hw
,
2650 [CLKID_FCLK_DIV2
] = &gxbb_fclk_div2
.hw
,
2651 [CLKID_FCLK_DIV3
] = &gxbb_fclk_div3
.hw
,
2652 [CLKID_FCLK_DIV4
] = &gxbb_fclk_div4
.hw
,
2653 [CLKID_FCLK_DIV5
] = &gxbb_fclk_div5
.hw
,
2654 [CLKID_FCLK_DIV7
] = &gxbb_fclk_div7
.hw
,
2655 [CLKID_GP0_PLL
] = &gxbb_gp0_pll
.hw
,
2656 [CLKID_MPEG_SEL
] = &gxbb_mpeg_clk_sel
.hw
,
2657 [CLKID_MPEG_DIV
] = &gxbb_mpeg_clk_div
.hw
,
2658 [CLKID_CLK81
] = &gxbb_clk81
.hw
,
2659 [CLKID_MPLL0
] = &gxbb_mpll0
.hw
,
2660 [CLKID_MPLL1
] = &gxbb_mpll1
.hw
,
2661 [CLKID_MPLL2
] = &gxbb_mpll2
.hw
,
2662 [CLKID_DDR
] = &gxbb_ddr
.hw
,
2663 [CLKID_DOS
] = &gxbb_dos
.hw
,
2664 [CLKID_ISA
] = &gxbb_isa
.hw
,
2665 [CLKID_PL301
] = &gxbb_pl301
.hw
,
2666 [CLKID_PERIPHS
] = &gxbb_periphs
.hw
,
2667 [CLKID_SPICC
] = &gxbb_spicc
.hw
,
2668 [CLKID_I2C
] = &gxbb_i2c
.hw
,
2669 [CLKID_SAR_ADC
] = &gxbb_sar_adc
.hw
,
2670 [CLKID_SMART_CARD
] = &gxbb_smart_card
.hw
,
2671 [CLKID_RNG0
] = &gxbb_rng0
.hw
,
2672 [CLKID_UART0
] = &gxbb_uart0
.hw
,
2673 [CLKID_SDHC
] = &gxbb_sdhc
.hw
,
2674 [CLKID_STREAM
] = &gxbb_stream
.hw
,
2675 [CLKID_ASYNC_FIFO
] = &gxbb_async_fifo
.hw
,
2676 [CLKID_SDIO
] = &gxbb_sdio
.hw
,
2677 [CLKID_ABUF
] = &gxbb_abuf
.hw
,
2678 [CLKID_HIU_IFACE
] = &gxbb_hiu_iface
.hw
,
2679 [CLKID_ASSIST_MISC
] = &gxbb_assist_misc
.hw
,
2680 [CLKID_SPI
] = &gxbb_spi
.hw
,
2681 [CLKID_I2S_SPDIF
] = &gxbb_i2s_spdif
.hw
,
2682 [CLKID_ETH
] = &gxbb_eth
.hw
,
2683 [CLKID_DEMUX
] = &gxbb_demux
.hw
,
2684 [CLKID_AIU_GLUE
] = &gxbb_aiu_glue
.hw
,
2685 [CLKID_IEC958
] = &gxbb_iec958
.hw
,
2686 [CLKID_I2S_OUT
] = &gxbb_i2s_out
.hw
,
2687 [CLKID_AMCLK
] = &gxbb_amclk
.hw
,
2688 [CLKID_AIFIFO2
] = &gxbb_aififo2
.hw
,
2689 [CLKID_MIXER
] = &gxbb_mixer
.hw
,
2690 [CLKID_MIXER_IFACE
] = &gxbb_mixer_iface
.hw
,
2691 [CLKID_ADC
] = &gxbb_adc
.hw
,
2692 [CLKID_BLKMV
] = &gxbb_blkmv
.hw
,
2693 [CLKID_AIU
] = &gxbb_aiu
.hw
,
2694 [CLKID_UART1
] = &gxbb_uart1
.hw
,
2695 [CLKID_G2D
] = &gxbb_g2d
.hw
,
2696 [CLKID_USB0
] = &gxbb_usb0
.hw
,
2697 [CLKID_USB1
] = &gxbb_usb1
.hw
,
2698 [CLKID_RESET
] = &gxbb_reset
.hw
,
2699 [CLKID_NAND
] = &gxbb_nand
.hw
,
2700 [CLKID_DOS_PARSER
] = &gxbb_dos_parser
.hw
,
2701 [CLKID_USB
] = &gxbb_usb
.hw
,
2702 [CLKID_VDIN1
] = &gxbb_vdin1
.hw
,
2703 [CLKID_AHB_ARB0
] = &gxbb_ahb_arb0
.hw
,
2704 [CLKID_EFUSE
] = &gxbb_efuse
.hw
,
2705 [CLKID_BOOT_ROM
] = &gxbb_boot_rom
.hw
,
2706 [CLKID_AHB_DATA_BUS
] = &gxbb_ahb_data_bus
.hw
,
2707 [CLKID_AHB_CTRL_BUS
] = &gxbb_ahb_ctrl_bus
.hw
,
2708 [CLKID_HDMI_INTR_SYNC
] = &gxbb_hdmi_intr_sync
.hw
,
2709 [CLKID_HDMI_PCLK
] = &gxbb_hdmi_pclk
.hw
,
2710 [CLKID_USB1_DDR_BRIDGE
] = &gxbb_usb1_ddr_bridge
.hw
,
2711 [CLKID_USB0_DDR_BRIDGE
] = &gxbb_usb0_ddr_bridge
.hw
,
2712 [CLKID_MMC_PCLK
] = &gxbb_mmc_pclk
.hw
,
2713 [CLKID_DVIN
] = &gxbb_dvin
.hw
,
2714 [CLKID_UART2
] = &gxbb_uart2
.hw
,
2715 [CLKID_SANA
] = &gxbb_sana
.hw
,
2716 [CLKID_VPU_INTR
] = &gxbb_vpu_intr
.hw
,
2717 [CLKID_SEC_AHB_AHB3_BRIDGE
] = &gxbb_sec_ahb_ahb3_bridge
.hw
,
2718 [CLKID_CLK81_A53
] = &gxbb_clk81_a53
.hw
,
2719 [CLKID_VCLK2_VENCI0
] = &gxbb_vclk2_venci0
.hw
,
2720 [CLKID_VCLK2_VENCI1
] = &gxbb_vclk2_venci1
.hw
,
2721 [CLKID_VCLK2_VENCP0
] = &gxbb_vclk2_vencp0
.hw
,
2722 [CLKID_VCLK2_VENCP1
] = &gxbb_vclk2_vencp1
.hw
,
2723 [CLKID_GCLK_VENCI_INT0
] = &gxbb_gclk_venci_int0
.hw
,
2724 [CLKID_GCLK_VENCI_INT
] = &gxbb_gclk_vencp_int
.hw
,
2725 [CLKID_DAC_CLK
] = &gxbb_dac_clk
.hw
,
2726 [CLKID_AOCLK_GATE
] = &gxbb_aoclk_gate
.hw
,
2727 [CLKID_IEC958_GATE
] = &gxbb_iec958_gate
.hw
,
2728 [CLKID_ENC480P
] = &gxbb_enc480p
.hw
,
2729 [CLKID_RNG1
] = &gxbb_rng1
.hw
,
2730 [CLKID_GCLK_VENCI_INT1
] = &gxbb_gclk_venci_int1
.hw
,
2731 [CLKID_VCLK2_VENCLMCC
] = &gxbb_vclk2_venclmcc
.hw
,
2732 [CLKID_VCLK2_VENCL
] = &gxbb_vclk2_vencl
.hw
,
2733 [CLKID_VCLK_OTHER
] = &gxbb_vclk_other
.hw
,
2734 [CLKID_EDP
] = &gxbb_edp
.hw
,
2735 [CLKID_AO_MEDIA_CPU
] = &gxbb_ao_media_cpu
.hw
,
2736 [CLKID_AO_AHB_SRAM
] = &gxbb_ao_ahb_sram
.hw
,
2737 [CLKID_AO_AHB_BUS
] = &gxbb_ao_ahb_bus
.hw
,
2738 [CLKID_AO_IFACE
] = &gxbb_ao_iface
.hw
,
2739 [CLKID_AO_I2C
] = &gxbb_ao_i2c
.hw
,
2740 [CLKID_SD_EMMC_A
] = &gxbb_emmc_a
.hw
,
2741 [CLKID_SD_EMMC_B
] = &gxbb_emmc_b
.hw
,
2742 [CLKID_SD_EMMC_C
] = &gxbb_emmc_c
.hw
,
2743 [CLKID_SAR_ADC_CLK
] = &gxbb_sar_adc_clk
.hw
,
2744 [CLKID_SAR_ADC_SEL
] = &gxbb_sar_adc_clk_sel
.hw
,
2745 [CLKID_SAR_ADC_DIV
] = &gxbb_sar_adc_clk_div
.hw
,
2746 [CLKID_MALI_0_SEL
] = &gxbb_mali_0_sel
.hw
,
2747 [CLKID_MALI_0_DIV
] = &gxbb_mali_0_div
.hw
,
2748 [CLKID_MALI_0
] = &gxbb_mali_0
.hw
,
2749 [CLKID_MALI_1_SEL
] = &gxbb_mali_1_sel
.hw
,
2750 [CLKID_MALI_1_DIV
] = &gxbb_mali_1_div
.hw
,
2751 [CLKID_MALI_1
] = &gxbb_mali_1
.hw
,
2752 [CLKID_MALI
] = &gxbb_mali
.hw
,
2753 [CLKID_CTS_AMCLK
] = &gxbb_cts_amclk
.hw
,
2754 [CLKID_CTS_AMCLK_SEL
] = &gxbb_cts_amclk_sel
.hw
,
2755 [CLKID_CTS_AMCLK_DIV
] = &gxbb_cts_amclk_div
.hw
,
2756 [CLKID_CTS_MCLK_I958
] = &gxbb_cts_mclk_i958
.hw
,
2757 [CLKID_CTS_MCLK_I958_SEL
] = &gxbb_cts_mclk_i958_sel
.hw
,
2758 [CLKID_CTS_MCLK_I958_DIV
] = &gxbb_cts_mclk_i958_div
.hw
,
2759 [CLKID_CTS_I958
] = &gxbb_cts_i958
.hw
,
2760 [CLKID_32K_CLK
] = &gxbb_32k_clk
.hw
,
2761 [CLKID_32K_CLK_SEL
] = &gxbb_32k_clk_sel
.hw
,
2762 [CLKID_32K_CLK_DIV
] = &gxbb_32k_clk_div
.hw
,
2763 [CLKID_SD_EMMC_A_CLK0_SEL
] = &gxbb_sd_emmc_a_clk0_sel
.hw
,
2764 [CLKID_SD_EMMC_A_CLK0_DIV
] = &gxbb_sd_emmc_a_clk0_div
.hw
,
2765 [CLKID_SD_EMMC_A_CLK0
] = &gxbb_sd_emmc_a_clk0
.hw
,
2766 [CLKID_SD_EMMC_B_CLK0_SEL
] = &gxbb_sd_emmc_b_clk0_sel
.hw
,
2767 [CLKID_SD_EMMC_B_CLK0_DIV
] = &gxbb_sd_emmc_b_clk0_div
.hw
,
2768 [CLKID_SD_EMMC_B_CLK0
] = &gxbb_sd_emmc_b_clk0
.hw
,
2769 [CLKID_SD_EMMC_C_CLK0_SEL
] = &gxbb_sd_emmc_c_clk0_sel
.hw
,
2770 [CLKID_SD_EMMC_C_CLK0_DIV
] = &gxbb_sd_emmc_c_clk0_div
.hw
,
2771 [CLKID_SD_EMMC_C_CLK0
] = &gxbb_sd_emmc_c_clk0
.hw
,
2772 [CLKID_VPU_0_SEL
] = &gxbb_vpu_0_sel
.hw
,
2773 [CLKID_VPU_0_DIV
] = &gxbb_vpu_0_div
.hw
,
2774 [CLKID_VPU_0
] = &gxbb_vpu_0
.hw
,
2775 [CLKID_VPU_1_SEL
] = &gxbb_vpu_1_sel
.hw
,
2776 [CLKID_VPU_1_DIV
] = &gxbb_vpu_1_div
.hw
,
2777 [CLKID_VPU_1
] = &gxbb_vpu_1
.hw
,
2778 [CLKID_VPU
] = &gxbb_vpu
.hw
,
2779 [CLKID_VAPB_0_SEL
] = &gxbb_vapb_0_sel
.hw
,
2780 [CLKID_VAPB_0_DIV
] = &gxbb_vapb_0_div
.hw
,
2781 [CLKID_VAPB_0
] = &gxbb_vapb_0
.hw
,
2782 [CLKID_VAPB_1_SEL
] = &gxbb_vapb_1_sel
.hw
,
2783 [CLKID_VAPB_1_DIV
] = &gxbb_vapb_1_div
.hw
,
2784 [CLKID_VAPB_1
] = &gxbb_vapb_1
.hw
,
2785 [CLKID_VAPB_SEL
] = &gxbb_vapb_sel
.hw
,
2786 [CLKID_VAPB
] = &gxbb_vapb
.hw
,
2787 [CLKID_MPLL0_DIV
] = &gxbb_mpll0_div
.hw
,
2788 [CLKID_MPLL1_DIV
] = &gxbb_mpll1_div
.hw
,
2789 [CLKID_MPLL2_DIV
] = &gxbb_mpll2_div
.hw
,
2790 [CLKID_MPLL_PREDIV
] = &gxbb_mpll_prediv
.hw
,
2791 [CLKID_FCLK_DIV2_DIV
] = &gxbb_fclk_div2_div
.hw
,
2792 [CLKID_FCLK_DIV3_DIV
] = &gxbb_fclk_div3_div
.hw
,
2793 [CLKID_FCLK_DIV4_DIV
] = &gxbb_fclk_div4_div
.hw
,
2794 [CLKID_FCLK_DIV5_DIV
] = &gxbb_fclk_div5_div
.hw
,
2795 [CLKID_FCLK_DIV7_DIV
] = &gxbb_fclk_div7_div
.hw
,
2796 [CLKID_VDEC_1_SEL
] = &gxbb_vdec_1_sel
.hw
,
2797 [CLKID_VDEC_1_DIV
] = &gxbb_vdec_1_div
.hw
,
2798 [CLKID_VDEC_1
] = &gxbb_vdec_1
.hw
,
2799 [CLKID_VDEC_HEVC_SEL
] = &gxbb_vdec_hevc_sel
.hw
,
2800 [CLKID_VDEC_HEVC_DIV
] = &gxbb_vdec_hevc_div
.hw
,
2801 [CLKID_VDEC_HEVC
] = &gxbb_vdec_hevc
.hw
,
2802 [CLKID_GEN_CLK_SEL
] = &gxbb_gen_clk_sel
.hw
,
2803 [CLKID_GEN_CLK_DIV
] = &gxbb_gen_clk_div
.hw
,
2804 [CLKID_GEN_CLK
] = &gxbb_gen_clk
.hw
,
2805 [CLKID_FIXED_PLL_DCO
] = &gxbb_fixed_pll_dco
.hw
,
2806 [CLKID_HDMI_PLL_DCO
] = &gxl_hdmi_pll_dco
.hw
,
2807 [CLKID_HDMI_PLL_OD
] = &gxl_hdmi_pll_od
.hw
,
2808 [CLKID_HDMI_PLL_OD2
] = &gxl_hdmi_pll_od2
.hw
,
2809 [CLKID_SYS_PLL_DCO
] = &gxbb_sys_pll_dco
.hw
,
2810 [CLKID_GP0_PLL_DCO
] = &gxl_gp0_pll_dco
.hw
,
2811 [CLKID_VID_PLL_DIV
] = &gxbb_vid_pll_div
.hw
,
2812 [CLKID_VID_PLL_SEL
] = &gxbb_vid_pll_sel
.hw
,
2813 [CLKID_VID_PLL
] = &gxbb_vid_pll
.hw
,
2814 [CLKID_VCLK_SEL
] = &gxbb_vclk_sel
.hw
,
2815 [CLKID_VCLK2_SEL
] = &gxbb_vclk2_sel
.hw
,
2816 [CLKID_VCLK_INPUT
] = &gxbb_vclk_input
.hw
,
2817 [CLKID_VCLK2_INPUT
] = &gxbb_vclk2_input
.hw
,
2818 [CLKID_VCLK_DIV
] = &gxbb_vclk_div
.hw
,
2819 [CLKID_VCLK2_DIV
] = &gxbb_vclk2_div
.hw
,
2820 [CLKID_VCLK
] = &gxbb_vclk
.hw
,
2821 [CLKID_VCLK2
] = &gxbb_vclk2
.hw
,
2822 [CLKID_VCLK_DIV1
] = &gxbb_vclk_div1
.hw
,
2823 [CLKID_VCLK_DIV2_EN
] = &gxbb_vclk_div2_en
.hw
,
2824 [CLKID_VCLK_DIV2
] = &gxbb_vclk_div2
.hw
,
2825 [CLKID_VCLK_DIV4_EN
] = &gxbb_vclk_div4_en
.hw
,
2826 [CLKID_VCLK_DIV4
] = &gxbb_vclk_div4
.hw
,
2827 [CLKID_VCLK_DIV6_EN
] = &gxbb_vclk_div6_en
.hw
,
2828 [CLKID_VCLK_DIV6
] = &gxbb_vclk_div6
.hw
,
2829 [CLKID_VCLK_DIV12_EN
] = &gxbb_vclk_div12_en
.hw
,
2830 [CLKID_VCLK_DIV12
] = &gxbb_vclk_div12
.hw
,
2831 [CLKID_VCLK2_DIV1
] = &gxbb_vclk2_div1
.hw
,
2832 [CLKID_VCLK2_DIV2_EN
] = &gxbb_vclk2_div2_en
.hw
,
2833 [CLKID_VCLK2_DIV2
] = &gxbb_vclk2_div2
.hw
,
2834 [CLKID_VCLK2_DIV4_EN
] = &gxbb_vclk2_div4_en
.hw
,
2835 [CLKID_VCLK2_DIV4
] = &gxbb_vclk2_div4
.hw
,
2836 [CLKID_VCLK2_DIV6_EN
] = &gxbb_vclk2_div6_en
.hw
,
2837 [CLKID_VCLK2_DIV6
] = &gxbb_vclk2_div6
.hw
,
2838 [CLKID_VCLK2_DIV12_EN
] = &gxbb_vclk2_div12_en
.hw
,
2839 [CLKID_VCLK2_DIV12
] = &gxbb_vclk2_div12
.hw
,
2840 [CLKID_CTS_ENCI_SEL
] = &gxbb_cts_enci_sel
.hw
,
2841 [CLKID_CTS_ENCP_SEL
] = &gxbb_cts_encp_sel
.hw
,
2842 [CLKID_CTS_VDAC_SEL
] = &gxbb_cts_vdac_sel
.hw
,
2843 [CLKID_HDMI_TX_SEL
] = &gxbb_hdmi_tx_sel
.hw
,
2844 [CLKID_CTS_ENCI
] = &gxbb_cts_enci
.hw
,
2845 [CLKID_CTS_ENCP
] = &gxbb_cts_encp
.hw
,
2846 [CLKID_CTS_VDAC
] = &gxbb_cts_vdac
.hw
,
2847 [CLKID_HDMI_TX
] = &gxbb_hdmi_tx
.hw
,
2848 [CLKID_HDMI_SEL
] = &gxbb_hdmi_sel
.hw
,
2849 [CLKID_HDMI_DIV
] = &gxbb_hdmi_div
.hw
,
2850 [CLKID_HDMI
] = &gxbb_hdmi
.hw
,
2856 static struct clk_regmap
*const gxbb_clk_regmaps
[] = {
2904 &gxbb_hdmi_intr_sync
,
2906 &gxbb_usb1_ddr_bridge
,
2907 &gxbb_usb0_ddr_bridge
,
2913 &gxbb_sec_ahb_ahb3_bridge
,
2919 &gxbb_gclk_venci_int0
,
2920 &gxbb_gclk_vencp_int
,
2926 &gxbb_gclk_venci_int1
,
2927 &gxbb_vclk2_venclmcc
,
2943 &gxbb_cts_mclk_i958
,
2945 &gxbb_sd_emmc_a_clk0
,
2946 &gxbb_sd_emmc_b_clk0
,
2947 &gxbb_sd_emmc_c_clk0
,
2954 &gxbb_sar_adc_clk_div
,
2957 &gxbb_cts_mclk_i958_div
,
2959 &gxbb_sd_emmc_a_clk0_div
,
2960 &gxbb_sd_emmc_b_clk0_div
,
2961 &gxbb_sd_emmc_c_clk0_div
,
2967 &gxbb_sar_adc_clk_sel
,
2971 &gxbb_cts_amclk_sel
,
2972 &gxbb_cts_mclk_i958_sel
,
2975 &gxbb_sd_emmc_a_clk0_sel
,
2976 &gxbb_sd_emmc_b_clk0_sel
,
2977 &gxbb_sd_emmc_c_clk0_sel
,
2990 &gxbb_cts_amclk_div
,
3002 &gxbb_vdec_hevc_sel
,
3003 &gxbb_vdec_hevc_div
,
3008 &gxbb_fixed_pll_dco
,
3022 &gxbb_vclk_div12_en
,
3028 &gxbb_vclk2_div2_en
,
3029 &gxbb_vclk2_div4_en
,
3030 &gxbb_vclk2_div6_en
,
3031 &gxbb_vclk2_div12_en
,
3050 static struct clk_regmap
*const gxl_clk_regmaps
[] = {
3098 &gxbb_hdmi_intr_sync
,
3100 &gxbb_usb1_ddr_bridge
,
3101 &gxbb_usb0_ddr_bridge
,
3107 &gxbb_sec_ahb_ahb3_bridge
,
3113 &gxbb_gclk_venci_int0
,
3114 &gxbb_gclk_vencp_int
,
3120 &gxbb_gclk_venci_int1
,
3121 &gxbb_vclk2_venclmcc
,
3137 &gxbb_cts_mclk_i958
,
3139 &gxbb_sd_emmc_a_clk0
,
3140 &gxbb_sd_emmc_b_clk0
,
3141 &gxbb_sd_emmc_c_clk0
,
3148 &gxbb_sar_adc_clk_div
,
3151 &gxbb_cts_mclk_i958_div
,
3153 &gxbb_sd_emmc_a_clk0_div
,
3154 &gxbb_sd_emmc_b_clk0_div
,
3155 &gxbb_sd_emmc_c_clk0_div
,
3161 &gxbb_sar_adc_clk_sel
,
3165 &gxbb_cts_amclk_sel
,
3166 &gxbb_cts_mclk_i958_sel
,
3169 &gxbb_sd_emmc_a_clk0_sel
,
3170 &gxbb_sd_emmc_b_clk0_sel
,
3171 &gxbb_sd_emmc_c_clk0_sel
,
3184 &gxbb_cts_amclk_div
,
3196 &gxbb_vdec_hevc_sel
,
3197 &gxbb_vdec_hevc_div
,
3202 &gxbb_fixed_pll_dco
,
3216 &gxbb_vclk_div12_en
,
3222 &gxbb_vclk2_div2_en
,
3223 &gxbb_vclk2_div4_en
,
3224 &gxbb_vclk2_div6_en
,
3225 &gxbb_vclk2_div12_en
,
3244 static const struct meson_eeclkc_data gxbb_clkc_data
= {
3245 .regmap_clks
= gxbb_clk_regmaps
,
3246 .regmap_clk_num
= ARRAY_SIZE(gxbb_clk_regmaps
),
3247 .hw_onecell_data
= &gxbb_hw_onecell_data
,
3250 static const struct meson_eeclkc_data gxl_clkc_data
= {
3251 .regmap_clks
= gxl_clk_regmaps
,
3252 .regmap_clk_num
= ARRAY_SIZE(gxl_clk_regmaps
),
3253 .hw_onecell_data
= &gxl_hw_onecell_data
,
3256 static const struct of_device_id clkc_match_table
[] = {
3257 { .compatible
= "amlogic,gxbb-clkc", .data
= &gxbb_clkc_data
},
3258 { .compatible
= "amlogic,gxl-clkc", .data
= &gxl_clkc_data
},
3262 static struct platform_driver gxbb_driver
= {
3263 .probe
= meson_eeclkc_probe
,
3265 .name
= "gxbb-clkc",
3266 .of_match_table
= clkc_match_table
,
3270 builtin_platform_driver(gxbb_driver
);