2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/module.h>
17 #include <linux/regmap.h>
18 #include <linux/reset-controller.h>
20 #include <dt-bindings/clock/qcom,mmcc-apq8084.h>
21 #include <dt-bindings/reset/qcom,mmcc-apq8084.h>
24 #include "clk-regmap.h"
27 #include "clk-branch.h"
50 static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map
[] = {
57 static const char * const mmcc_xo_mmpll0_mmpll1_gpll0
[] = {
64 static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
[] = {
73 static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0
[] = {
82 static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map
[] = {
90 static const char * const mmcc_xo_mmpll0_1_2_gpll0
[] = {
98 static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map
[] = {
106 static const char * const mmcc_xo_mmpll0_1_3_gpll0
[] = {
114 static const struct parent_map mmcc_xo_dsi_hdmi_edp_map
[] = {
123 static const char * const mmcc_xo_dsi_hdmi_edp
[] = {
132 static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map
[] = {
141 static const char * const mmcc_xo_dsi_hdmi_edp_gpll0
[] = {
150 static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map
[] = {
155 { P_DSI0PLL_BYTE
, 1 },
156 { P_DSI1PLL_BYTE
, 2 }
159 static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0
[] = {
168 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll0_map
[] = {
176 static const char * const mmcc_xo_mmpll0_1_4_gpll0
[] = {
184 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_map
[] = {
193 static const char * const mmcc_xo_mmpll0_1_4_gpll1_0
[] = {
202 static const struct parent_map mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map
[] = {
212 static const char * const mmcc_xo_mmpll0_1_4_gpll1_0_sleep
[] = {
222 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
224 static struct clk_pll mmpll0
= {
228 .config_reg
= 0x0014,
230 .status_reg
= 0x001c,
232 .clkr
.hw
.init
= &(struct clk_init_data
){
234 .parent_names
= (const char *[]){ "xo" },
240 static struct clk_regmap mmpll0_vote
= {
241 .enable_reg
= 0x0100,
242 .enable_mask
= BIT(0),
243 .hw
.init
= &(struct clk_init_data
){
244 .name
= "mmpll0_vote",
245 .parent_names
= (const char *[]){ "mmpll0" },
247 .ops
= &clk_pll_vote_ops
,
251 static struct clk_pll mmpll1
= {
255 .config_reg
= 0x0050,
257 .status_reg
= 0x005c,
259 .clkr
.hw
.init
= &(struct clk_init_data
){
261 .parent_names
= (const char *[]){ "xo" },
267 static struct clk_regmap mmpll1_vote
= {
268 .enable_reg
= 0x0100,
269 .enable_mask
= BIT(1),
270 .hw
.init
= &(struct clk_init_data
){
271 .name
= "mmpll1_vote",
272 .parent_names
= (const char *[]){ "mmpll1" },
274 .ops
= &clk_pll_vote_ops
,
278 static struct clk_pll mmpll2
= {
282 .config_reg
= 0x4110,
284 .status_reg
= 0x411c,
285 .clkr
.hw
.init
= &(struct clk_init_data
){
287 .parent_names
= (const char *[]){ "xo" },
293 static struct clk_pll mmpll3
= {
297 .config_reg
= 0x0090,
299 .status_reg
= 0x009c,
301 .clkr
.hw
.init
= &(struct clk_init_data
){
303 .parent_names
= (const char *[]){ "xo" },
309 static struct clk_pll mmpll4
= {
313 .config_reg
= 0x00b0,
315 .status_reg
= 0x00bc,
316 .clkr
.hw
.init
= &(struct clk_init_data
){
318 .parent_names
= (const char *[]){ "xo" },
324 static struct clk_rcg2 mmss_ahb_clk_src
= {
327 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
328 .clkr
.hw
.init
= &(struct clk_init_data
){
329 .name
= "mmss_ahb_clk_src",
330 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
332 .ops
= &clk_rcg2_ops
,
336 static struct freq_tbl ftbl_mmss_axi_clk
[] = {
337 F(19200000, P_XO
, 1, 0, 0),
338 F(37500000, P_GPLL0
, 16, 0, 0),
339 F(50000000, P_GPLL0
, 12, 0, 0),
340 F(75000000, P_GPLL0
, 8, 0, 0),
341 F(100000000, P_GPLL0
, 6, 0, 0),
342 F(150000000, P_GPLL0
, 4, 0, 0),
343 F(333430000, P_MMPLL1
, 3.5, 0, 0),
344 F(400000000, P_MMPLL0
, 2, 0, 0),
345 F(466800000, P_MMPLL1
, 2.5, 0, 0),
348 static struct clk_rcg2 mmss_axi_clk_src
= {
351 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
352 .freq_tbl
= ftbl_mmss_axi_clk
,
353 .clkr
.hw
.init
= &(struct clk_init_data
){
354 .name
= "mmss_axi_clk_src",
355 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
357 .ops
= &clk_rcg2_ops
,
361 static struct freq_tbl ftbl_ocmemnoc_clk
[] = {
362 F(19200000, P_XO
, 1, 0, 0),
363 F(37500000, P_GPLL0
, 16, 0, 0),
364 F(50000000, P_GPLL0
, 12, 0, 0),
365 F(75000000, P_GPLL0
, 8, 0, 0),
366 F(109090000, P_GPLL0
, 5.5, 0, 0),
367 F(150000000, P_GPLL0
, 4, 0, 0),
368 F(228570000, P_MMPLL0
, 3.5, 0, 0),
369 F(320000000, P_MMPLL0
, 2.5, 0, 0),
372 static struct clk_rcg2 ocmemnoc_clk_src
= {
375 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
376 .freq_tbl
= ftbl_ocmemnoc_clk
,
377 .clkr
.hw
.init
= &(struct clk_init_data
){
378 .name
= "ocmemnoc_clk_src",
379 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
381 .ops
= &clk_rcg2_ops
,
385 static struct freq_tbl ftbl_camss_csi0_3_clk
[] = {
386 F(100000000, P_GPLL0
, 6, 0, 0),
387 F(200000000, P_MMPLL0
, 4, 0, 0),
391 static struct clk_rcg2 csi0_clk_src
= {
394 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
395 .freq_tbl
= ftbl_camss_csi0_3_clk
,
396 .clkr
.hw
.init
= &(struct clk_init_data
){
397 .name
= "csi0_clk_src",
398 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
400 .ops
= &clk_rcg2_ops
,
404 static struct clk_rcg2 csi1_clk_src
= {
407 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
408 .freq_tbl
= ftbl_camss_csi0_3_clk
,
409 .clkr
.hw
.init
= &(struct clk_init_data
){
410 .name
= "csi1_clk_src",
411 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
413 .ops
= &clk_rcg2_ops
,
417 static struct clk_rcg2 csi2_clk_src
= {
420 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
421 .freq_tbl
= ftbl_camss_csi0_3_clk
,
422 .clkr
.hw
.init
= &(struct clk_init_data
){
423 .name
= "csi2_clk_src",
424 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
426 .ops
= &clk_rcg2_ops
,
430 static struct clk_rcg2 csi3_clk_src
= {
433 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
434 .freq_tbl
= ftbl_camss_csi0_3_clk
,
435 .clkr
.hw
.init
= &(struct clk_init_data
){
436 .name
= "csi3_clk_src",
437 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
439 .ops
= &clk_rcg2_ops
,
443 static struct freq_tbl ftbl_camss_vfe_vfe0_1_clk
[] = {
444 F(37500000, P_GPLL0
, 16, 0, 0),
445 F(50000000, P_GPLL0
, 12, 0, 0),
446 F(60000000, P_GPLL0
, 10, 0, 0),
447 F(80000000, P_GPLL0
, 7.5, 0, 0),
448 F(100000000, P_GPLL0
, 6, 0, 0),
449 F(109090000, P_GPLL0
, 5.5, 0, 0),
450 F(133330000, P_GPLL0
, 4.5, 0, 0),
451 F(200000000, P_GPLL0
, 3, 0, 0),
452 F(228570000, P_MMPLL0
, 3.5, 0, 0),
453 F(266670000, P_MMPLL0
, 3, 0, 0),
454 F(320000000, P_MMPLL0
, 2.5, 0, 0),
455 F(465000000, P_MMPLL4
, 2, 0, 0),
456 F(600000000, P_GPLL0
, 1, 0, 0),
460 static struct clk_rcg2 vfe0_clk_src
= {
463 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
464 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
465 .clkr
.hw
.init
= &(struct clk_init_data
){
466 .name
= "vfe0_clk_src",
467 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
469 .ops
= &clk_rcg2_ops
,
473 static struct clk_rcg2 vfe1_clk_src
= {
476 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
477 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
478 .clkr
.hw
.init
= &(struct clk_init_data
){
479 .name
= "vfe1_clk_src",
480 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
482 .ops
= &clk_rcg2_ops
,
486 static struct freq_tbl ftbl_mdss_mdp_clk
[] = {
487 F(37500000, P_GPLL0
, 16, 0, 0),
488 F(60000000, P_GPLL0
, 10, 0, 0),
489 F(75000000, P_GPLL0
, 8, 0, 0),
490 F(85710000, P_GPLL0
, 7, 0, 0),
491 F(100000000, P_GPLL0
, 6, 0, 0),
492 F(150000000, P_GPLL0
, 4, 0, 0),
493 F(160000000, P_MMPLL0
, 5, 0, 0),
494 F(200000000, P_MMPLL0
, 4, 0, 0),
495 F(228570000, P_MMPLL0
, 3.5, 0, 0),
496 F(300000000, P_GPLL0
, 2, 0, 0),
497 F(320000000, P_MMPLL0
, 2.5, 0, 0),
501 static struct clk_rcg2 mdp_clk_src
= {
504 .parent_map
= mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
,
505 .freq_tbl
= ftbl_mdss_mdp_clk
,
506 .clkr
.hw
.init
= &(struct clk_init_data
){
507 .name
= "mdp_clk_src",
508 .parent_names
= mmcc_xo_mmpll0_dsi_hdmi_gpll0
,
510 .ops
= &clk_rcg2_ops
,
514 static struct clk_rcg2 gfx3d_clk_src
= {
517 .parent_map
= mmcc_xo_mmpll0_1_2_gpll0_map
,
518 .clkr
.hw
.init
= &(struct clk_init_data
){
519 .name
= "gfx3d_clk_src",
520 .parent_names
= mmcc_xo_mmpll0_1_2_gpll0
,
522 .ops
= &clk_rcg2_ops
,
526 static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk
[] = {
527 F(75000000, P_GPLL0
, 8, 0, 0),
528 F(133330000, P_GPLL0
, 4.5, 0, 0),
529 F(200000000, P_GPLL0
, 3, 0, 0),
530 F(228570000, P_MMPLL0
, 3.5, 0, 0),
531 F(266670000, P_MMPLL0
, 3, 0, 0),
532 F(320000000, P_MMPLL0
, 2.5, 0, 0),
536 static struct clk_rcg2 jpeg0_clk_src
= {
539 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
540 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
541 .clkr
.hw
.init
= &(struct clk_init_data
){
542 .name
= "jpeg0_clk_src",
543 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
545 .ops
= &clk_rcg2_ops
,
549 static struct clk_rcg2 jpeg1_clk_src
= {
552 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
553 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
554 .clkr
.hw
.init
= &(struct clk_init_data
){
555 .name
= "jpeg1_clk_src",
556 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
558 .ops
= &clk_rcg2_ops
,
562 static struct clk_rcg2 jpeg2_clk_src
= {
565 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
566 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
567 .clkr
.hw
.init
= &(struct clk_init_data
){
568 .name
= "jpeg2_clk_src",
569 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
571 .ops
= &clk_rcg2_ops
,
575 static struct clk_rcg2 pclk0_clk_src
= {
579 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
580 .clkr
.hw
.init
= &(struct clk_init_data
){
581 .name
= "pclk0_clk_src",
582 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
584 .ops
= &clk_pixel_ops
,
585 .flags
= CLK_SET_RATE_PARENT
,
589 static struct clk_rcg2 pclk1_clk_src
= {
593 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
594 .clkr
.hw
.init
= &(struct clk_init_data
){
595 .name
= "pclk1_clk_src",
596 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
598 .ops
= &clk_pixel_ops
,
599 .flags
= CLK_SET_RATE_PARENT
,
603 static struct freq_tbl ftbl_venus0_vcodec0_clk
[] = {
604 F(50000000, P_GPLL0
, 12, 0, 0),
605 F(100000000, P_GPLL0
, 6, 0, 0),
606 F(133330000, P_GPLL0
, 4.5, 0, 0),
607 F(200000000, P_MMPLL0
, 4, 0, 0),
608 F(266670000, P_MMPLL0
, 3, 0, 0),
609 F(465000000, P_MMPLL3
, 2, 0, 0),
613 static struct clk_rcg2 vcodec0_clk_src
= {
617 .parent_map
= mmcc_xo_mmpll0_1_3_gpll0_map
,
618 .freq_tbl
= ftbl_venus0_vcodec0_clk
,
619 .clkr
.hw
.init
= &(struct clk_init_data
){
620 .name
= "vcodec0_clk_src",
621 .parent_names
= mmcc_xo_mmpll0_1_3_gpll0
,
623 .ops
= &clk_rcg2_ops
,
627 static struct freq_tbl ftbl_avsync_vp_clk
[] = {
628 F(150000000, P_GPLL0
, 4, 0, 0),
629 F(320000000, P_MMPLL0
, 2.5, 0, 0),
633 static struct clk_rcg2 vp_clk_src
= {
636 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
637 .freq_tbl
= ftbl_avsync_vp_clk
,
638 .clkr
.hw
.init
= &(struct clk_init_data
){
639 .name
= "vp_clk_src",
640 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
642 .ops
= &clk_rcg2_ops
,
646 static struct freq_tbl ftbl_camss_cci_cci_clk
[] = {
647 F(19200000, P_XO
, 1, 0, 0),
651 static struct clk_rcg2 cci_clk_src
= {
655 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_map
,
656 .freq_tbl
= ftbl_camss_cci_cci_clk
,
657 .clkr
.hw
.init
= &(struct clk_init_data
){
658 .name
= "cci_clk_src",
659 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0
,
661 .ops
= &clk_rcg2_ops
,
665 static struct freq_tbl ftbl_camss_gp0_1_clk
[] = {
666 F(10000, P_XO
, 16, 1, 120),
667 F(24000, P_XO
, 16, 1, 50),
668 F(6000000, P_GPLL0
, 10, 1, 10),
669 F(12000000, P_GPLL0
, 10, 1, 5),
670 F(13000000, P_GPLL0
, 4, 13, 150),
671 F(24000000, P_GPLL0
, 5, 1, 5),
675 static struct clk_rcg2 camss_gp0_clk_src
= {
679 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map
,
680 .freq_tbl
= ftbl_camss_gp0_1_clk
,
681 .clkr
.hw
.init
= &(struct clk_init_data
){
682 .name
= "camss_gp0_clk_src",
683 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0_sleep
,
685 .ops
= &clk_rcg2_ops
,
689 static struct clk_rcg2 camss_gp1_clk_src
= {
693 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_sleep_map
,
694 .freq_tbl
= ftbl_camss_gp0_1_clk
,
695 .clkr
.hw
.init
= &(struct clk_init_data
){
696 .name
= "camss_gp1_clk_src",
697 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0_sleep
,
699 .ops
= &clk_rcg2_ops
,
703 static struct freq_tbl ftbl_camss_mclk0_3_clk
[] = {
704 F(4800000, P_XO
, 4, 0, 0),
705 F(6000000, P_GPLL0
, 10, 1, 10),
706 F(8000000, P_GPLL0
, 15, 1, 5),
707 F(9600000, P_XO
, 2, 0, 0),
708 F(16000000, P_MMPLL0
, 10, 1, 5),
709 F(19200000, P_XO
, 1, 0, 0),
710 F(24000000, P_GPLL0
, 5, 1, 5),
711 F(32000000, P_MMPLL0
, 5, 1, 5),
712 F(48000000, P_GPLL0
, 12.5, 0, 0),
713 F(64000000, P_MMPLL0
, 12.5, 0, 0),
717 static struct clk_rcg2 mclk0_clk_src
= {
721 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_map
,
722 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
723 .clkr
.hw
.init
= &(struct clk_init_data
){
724 .name
= "mclk0_clk_src",
725 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0
,
727 .ops
= &clk_rcg2_ops
,
731 static struct clk_rcg2 mclk1_clk_src
= {
735 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_map
,
736 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
737 .clkr
.hw
.init
= &(struct clk_init_data
){
738 .name
= "mclk1_clk_src",
739 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0
,
741 .ops
= &clk_rcg2_ops
,
745 static struct clk_rcg2 mclk2_clk_src
= {
749 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_map
,
750 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
751 .clkr
.hw
.init
= &(struct clk_init_data
){
752 .name
= "mclk2_clk_src",
753 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0
,
755 .ops
= &clk_rcg2_ops
,
759 static struct clk_rcg2 mclk3_clk_src
= {
763 .parent_map
= mmcc_xo_mmpll0_1_4_gpll1_0_map
,
764 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
765 .clkr
.hw
.init
= &(struct clk_init_data
){
766 .name
= "mclk3_clk_src",
767 .parent_names
= mmcc_xo_mmpll0_1_4_gpll1_0
,
769 .ops
= &clk_rcg2_ops
,
773 static struct freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk
[] = {
774 F(100000000, P_GPLL0
, 6, 0, 0),
775 F(200000000, P_MMPLL0
, 4, 0, 0),
779 static struct clk_rcg2 csi0phytimer_clk_src
= {
782 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
783 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
784 .clkr
.hw
.init
= &(struct clk_init_data
){
785 .name
= "csi0phytimer_clk_src",
786 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
788 .ops
= &clk_rcg2_ops
,
792 static struct clk_rcg2 csi1phytimer_clk_src
= {
795 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
796 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
797 .clkr
.hw
.init
= &(struct clk_init_data
){
798 .name
= "csi1phytimer_clk_src",
799 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
801 .ops
= &clk_rcg2_ops
,
805 static struct clk_rcg2 csi2phytimer_clk_src
= {
808 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
809 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
810 .clkr
.hw
.init
= &(struct clk_init_data
){
811 .name
= "csi2phytimer_clk_src",
812 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
814 .ops
= &clk_rcg2_ops
,
818 static struct freq_tbl ftbl_camss_vfe_cpp_clk
[] = {
819 F(133330000, P_GPLL0
, 4.5, 0, 0),
820 F(266670000, P_MMPLL0
, 3, 0, 0),
821 F(320000000, P_MMPLL0
, 2.5, 0, 0),
822 F(372000000, P_MMPLL4
, 2.5, 0, 0),
823 F(465000000, P_MMPLL4
, 2, 0, 0),
824 F(600000000, P_GPLL0
, 1, 0, 0),
828 static struct clk_rcg2 cpp_clk_src
= {
831 .parent_map
= mmcc_xo_mmpll0_1_4_gpll0_map
,
832 .freq_tbl
= ftbl_camss_vfe_cpp_clk
,
833 .clkr
.hw
.init
= &(struct clk_init_data
){
834 .name
= "cpp_clk_src",
835 .parent_names
= mmcc_xo_mmpll0_1_4_gpll0
,
837 .ops
= &clk_rcg2_ops
,
841 static struct clk_rcg2 byte0_clk_src
= {
844 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
845 .clkr
.hw
.init
= &(struct clk_init_data
){
846 .name
= "byte0_clk_src",
847 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
849 .ops
= &clk_byte2_ops
,
850 .flags
= CLK_SET_RATE_PARENT
,
854 static struct clk_rcg2 byte1_clk_src
= {
857 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
858 .clkr
.hw
.init
= &(struct clk_init_data
){
859 .name
= "byte1_clk_src",
860 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
862 .ops
= &clk_byte2_ops
,
863 .flags
= CLK_SET_RATE_PARENT
,
867 static struct freq_tbl ftbl_mdss_edpaux_clk
[] = {
868 F(19200000, P_XO
, 1, 0, 0),
872 static struct clk_rcg2 edpaux_clk_src
= {
875 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
876 .freq_tbl
= ftbl_mdss_edpaux_clk
,
877 .clkr
.hw
.init
= &(struct clk_init_data
){
878 .name
= "edpaux_clk_src",
879 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
881 .ops
= &clk_rcg2_ops
,
885 static struct freq_tbl ftbl_mdss_edplink_clk
[] = {
886 F(135000000, P_EDPLINK
, 2, 0, 0),
887 F(270000000, P_EDPLINK
, 11, 0, 0),
891 static struct clk_rcg2 edplink_clk_src
= {
894 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
895 .freq_tbl
= ftbl_mdss_edplink_clk
,
896 .clkr
.hw
.init
= &(struct clk_init_data
){
897 .name
= "edplink_clk_src",
898 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
900 .ops
= &clk_rcg2_ops
,
901 .flags
= CLK_SET_RATE_PARENT
,
905 static struct freq_tbl edp_pixel_freq_tbl
[] = {
910 static struct clk_rcg2 edppixel_clk_src
= {
914 .parent_map
= mmcc_xo_dsi_hdmi_edp_map
,
915 .freq_tbl
= edp_pixel_freq_tbl
,
916 .clkr
.hw
.init
= &(struct clk_init_data
){
917 .name
= "edppixel_clk_src",
918 .parent_names
= mmcc_xo_dsi_hdmi_edp
,
920 .ops
= &clk_edp_pixel_ops
,
924 static struct freq_tbl ftbl_mdss_esc0_1_clk
[] = {
925 F(19200000, P_XO
, 1, 0, 0),
929 static struct clk_rcg2 esc0_clk_src
= {
932 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
933 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
934 .clkr
.hw
.init
= &(struct clk_init_data
){
935 .name
= "esc0_clk_src",
936 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
938 .ops
= &clk_rcg2_ops
,
942 static struct clk_rcg2 esc1_clk_src
= {
945 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
946 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
947 .clkr
.hw
.init
= &(struct clk_init_data
){
948 .name
= "esc1_clk_src",
949 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
951 .ops
= &clk_rcg2_ops
,
955 static struct freq_tbl extpclk_freq_tbl
[] = {
956 { .src
= P_HDMIPLL
},
960 static struct clk_rcg2 extpclk_clk_src
= {
963 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
964 .freq_tbl
= extpclk_freq_tbl
,
965 .clkr
.hw
.init
= &(struct clk_init_data
){
966 .name
= "extpclk_clk_src",
967 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
969 .ops
= &clk_byte_ops
,
970 .flags
= CLK_SET_RATE_PARENT
,
974 static struct freq_tbl ftbl_mdss_hdmi_clk
[] = {
975 F(19200000, P_XO
, 1, 0, 0),
979 static struct clk_rcg2 hdmi_clk_src
= {
982 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
983 .freq_tbl
= ftbl_mdss_hdmi_clk
,
984 .clkr
.hw
.init
= &(struct clk_init_data
){
985 .name
= "hdmi_clk_src",
986 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
988 .ops
= &clk_rcg2_ops
,
992 static struct freq_tbl ftbl_mdss_vsync_clk
[] = {
993 F(19200000, P_XO
, 1, 0, 0),
997 static struct clk_rcg2 vsync_clk_src
= {
1000 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1001 .freq_tbl
= ftbl_mdss_vsync_clk
,
1002 .clkr
.hw
.init
= &(struct clk_init_data
){
1003 .name
= "vsync_clk_src",
1004 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1006 .ops
= &clk_rcg2_ops
,
1010 static struct freq_tbl ftbl_mmss_rbcpr_clk
[] = {
1011 F(50000000, P_GPLL0
, 12, 0, 0),
1015 static struct clk_rcg2 rbcpr_clk_src
= {
1018 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1019 .freq_tbl
= ftbl_mmss_rbcpr_clk
,
1020 .clkr
.hw
.init
= &(struct clk_init_data
){
1021 .name
= "rbcpr_clk_src",
1022 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1024 .ops
= &clk_rcg2_ops
,
1028 static struct freq_tbl ftbl_oxili_rbbmtimer_clk
[] = {
1029 F(19200000, P_XO
, 1, 0, 0),
1033 static struct clk_rcg2 rbbmtimer_clk_src
= {
1036 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1037 .freq_tbl
= ftbl_oxili_rbbmtimer_clk
,
1038 .clkr
.hw
.init
= &(struct clk_init_data
){
1039 .name
= "rbbmtimer_clk_src",
1040 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1042 .ops
= &clk_rcg2_ops
,
1046 static struct freq_tbl ftbl_vpu_maple_clk
[] = {
1047 F(50000000, P_GPLL0
, 12, 0, 0),
1048 F(100000000, P_GPLL0
, 6, 0, 0),
1049 F(133330000, P_GPLL0
, 4.5, 0, 0),
1050 F(200000000, P_MMPLL0
, 4, 0, 0),
1051 F(266670000, P_MMPLL0
, 3, 0, 0),
1052 F(465000000, P_MMPLL3
, 2, 0, 0),
1056 static struct clk_rcg2 maple_clk_src
= {
1059 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1060 .freq_tbl
= ftbl_vpu_maple_clk
,
1061 .clkr
.hw
.init
= &(struct clk_init_data
){
1062 .name
= "maple_clk_src",
1063 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1065 .ops
= &clk_rcg2_ops
,
1069 static struct freq_tbl ftbl_vpu_vdp_clk
[] = {
1070 F(50000000, P_GPLL0
, 12, 0, 0),
1071 F(100000000, P_GPLL0
, 6, 0, 0),
1072 F(200000000, P_MMPLL0
, 4, 0, 0),
1073 F(320000000, P_MMPLL0
, 2.5, 0, 0),
1074 F(400000000, P_MMPLL0
, 2, 0, 0),
1078 static struct clk_rcg2 vdp_clk_src
= {
1081 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1082 .freq_tbl
= ftbl_vpu_vdp_clk
,
1083 .clkr
.hw
.init
= &(struct clk_init_data
){
1084 .name
= "vdp_clk_src",
1085 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1087 .ops
= &clk_rcg2_ops
,
1091 static struct freq_tbl ftbl_vpu_bus_clk
[] = {
1092 F(40000000, P_GPLL0
, 15, 0, 0),
1093 F(80000000, P_MMPLL0
, 10, 0, 0),
1097 static struct clk_rcg2 vpu_bus_clk_src
= {
1100 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
1101 .freq_tbl
= ftbl_vpu_bus_clk
,
1102 .clkr
.hw
.init
= &(struct clk_init_data
){
1103 .name
= "vpu_bus_clk_src",
1104 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
1106 .ops
= &clk_rcg2_ops
,
1110 static struct clk_branch mmss_cxo_clk
= {
1113 .enable_reg
= 0x5104,
1114 .enable_mask
= BIT(0),
1115 .hw
.init
= &(struct clk_init_data
){
1116 .name
= "mmss_cxo_clk",
1117 .parent_names
= (const char *[]){ "xo" },
1119 .flags
= CLK_SET_RATE_PARENT
,
1120 .ops
= &clk_branch2_ops
,
1125 static struct clk_branch mmss_sleepclk_clk
= {
1128 .enable_reg
= 0x5100,
1129 .enable_mask
= BIT(0),
1130 .hw
.init
= &(struct clk_init_data
){
1131 .name
= "mmss_sleepclk_clk",
1132 .parent_names
= (const char *[]){
1136 .flags
= CLK_SET_RATE_PARENT
,
1137 .ops
= &clk_branch2_ops
,
1142 static struct clk_branch avsync_ahb_clk
= {
1145 .enable_reg
= 0x2414,
1146 .enable_mask
= BIT(0),
1147 .hw
.init
= &(struct clk_init_data
){
1148 .name
= "avsync_ahb_clk",
1149 .parent_names
= (const char *[]){
1153 .flags
= CLK_SET_RATE_PARENT
,
1154 .ops
= &clk_branch2_ops
,
1159 static struct clk_branch avsync_edppixel_clk
= {
1162 .enable_reg
= 0x2418,
1163 .enable_mask
= BIT(0),
1164 .hw
.init
= &(struct clk_init_data
){
1165 .name
= "avsync_edppixel_clk",
1166 .parent_names
= (const char *[]){
1170 .flags
= CLK_SET_RATE_PARENT
,
1171 .ops
= &clk_branch2_ops
,
1176 static struct clk_branch avsync_extpclk_clk
= {
1179 .enable_reg
= 0x2410,
1180 .enable_mask
= BIT(0),
1181 .hw
.init
= &(struct clk_init_data
){
1182 .name
= "avsync_extpclk_clk",
1183 .parent_names
= (const char *[]){
1187 .flags
= CLK_SET_RATE_PARENT
,
1188 .ops
= &clk_branch2_ops
,
1193 static struct clk_branch avsync_pclk0_clk
= {
1196 .enable_reg
= 0x241c,
1197 .enable_mask
= BIT(0),
1198 .hw
.init
= &(struct clk_init_data
){
1199 .name
= "avsync_pclk0_clk",
1200 .parent_names
= (const char *[]){
1204 .flags
= CLK_SET_RATE_PARENT
,
1205 .ops
= &clk_branch2_ops
,
1210 static struct clk_branch avsync_pclk1_clk
= {
1213 .enable_reg
= 0x2420,
1214 .enable_mask
= BIT(0),
1215 .hw
.init
= &(struct clk_init_data
){
1216 .name
= "avsync_pclk1_clk",
1217 .parent_names
= (const char *[]){
1221 .flags
= CLK_SET_RATE_PARENT
,
1222 .ops
= &clk_branch2_ops
,
1227 static struct clk_branch avsync_vp_clk
= {
1230 .enable_reg
= 0x2404,
1231 .enable_mask
= BIT(0),
1232 .hw
.init
= &(struct clk_init_data
){
1233 .name
= "avsync_vp_clk",
1234 .parent_names
= (const char *[]){
1238 .flags
= CLK_SET_RATE_PARENT
,
1239 .ops
= &clk_branch2_ops
,
1244 static struct clk_branch camss_ahb_clk
= {
1247 .enable_reg
= 0x348c,
1248 .enable_mask
= BIT(0),
1249 .hw
.init
= &(struct clk_init_data
){
1250 .name
= "camss_ahb_clk",
1251 .parent_names
= (const char *[]){
1255 .flags
= CLK_SET_RATE_PARENT
,
1256 .ops
= &clk_branch2_ops
,
1261 static struct clk_branch camss_cci_cci_ahb_clk
= {
1264 .enable_reg
= 0x3348,
1265 .enable_mask
= BIT(0),
1266 .hw
.init
= &(struct clk_init_data
){
1267 .name
= "camss_cci_cci_ahb_clk",
1268 .parent_names
= (const char *[]){
1272 .ops
= &clk_branch2_ops
,
1277 static struct clk_branch camss_cci_cci_clk
= {
1280 .enable_reg
= 0x3344,
1281 .enable_mask
= BIT(0),
1282 .hw
.init
= &(struct clk_init_data
){
1283 .name
= "camss_cci_cci_clk",
1284 .parent_names
= (const char *[]){
1288 .flags
= CLK_SET_RATE_PARENT
,
1289 .ops
= &clk_branch2_ops
,
1294 static struct clk_branch camss_csi0_ahb_clk
= {
1297 .enable_reg
= 0x30bc,
1298 .enable_mask
= BIT(0),
1299 .hw
.init
= &(struct clk_init_data
){
1300 .name
= "camss_csi0_ahb_clk",
1301 .parent_names
= (const char *[]){
1305 .ops
= &clk_branch2_ops
,
1310 static struct clk_branch camss_csi0_clk
= {
1313 .enable_reg
= 0x30b4,
1314 .enable_mask
= BIT(0),
1315 .hw
.init
= &(struct clk_init_data
){
1316 .name
= "camss_csi0_clk",
1317 .parent_names
= (const char *[]){
1321 .flags
= CLK_SET_RATE_PARENT
,
1322 .ops
= &clk_branch2_ops
,
1327 static struct clk_branch camss_csi0phy_clk
= {
1330 .enable_reg
= 0x30c4,
1331 .enable_mask
= BIT(0),
1332 .hw
.init
= &(struct clk_init_data
){
1333 .name
= "camss_csi0phy_clk",
1334 .parent_names
= (const char *[]){
1338 .flags
= CLK_SET_RATE_PARENT
,
1339 .ops
= &clk_branch2_ops
,
1344 static struct clk_branch camss_csi0pix_clk
= {
1347 .enable_reg
= 0x30e4,
1348 .enable_mask
= BIT(0),
1349 .hw
.init
= &(struct clk_init_data
){
1350 .name
= "camss_csi0pix_clk",
1351 .parent_names
= (const char *[]){
1355 .flags
= CLK_SET_RATE_PARENT
,
1356 .ops
= &clk_branch2_ops
,
1361 static struct clk_branch camss_csi0rdi_clk
= {
1364 .enable_reg
= 0x30d4,
1365 .enable_mask
= BIT(0),
1366 .hw
.init
= &(struct clk_init_data
){
1367 .name
= "camss_csi0rdi_clk",
1368 .parent_names
= (const char *[]){
1372 .flags
= CLK_SET_RATE_PARENT
,
1373 .ops
= &clk_branch2_ops
,
1378 static struct clk_branch camss_csi1_ahb_clk
= {
1381 .enable_reg
= 0x3128,
1382 .enable_mask
= BIT(0),
1383 .hw
.init
= &(struct clk_init_data
){
1384 .name
= "camss_csi1_ahb_clk",
1385 .parent_names
= (const char *[]){
1389 .flags
= CLK_SET_RATE_PARENT
,
1390 .ops
= &clk_branch2_ops
,
1395 static struct clk_branch camss_csi1_clk
= {
1398 .enable_reg
= 0x3124,
1399 .enable_mask
= BIT(0),
1400 .hw
.init
= &(struct clk_init_data
){
1401 .name
= "camss_csi1_clk",
1402 .parent_names
= (const char *[]){
1406 .flags
= CLK_SET_RATE_PARENT
,
1407 .ops
= &clk_branch2_ops
,
1412 static struct clk_branch camss_csi1phy_clk
= {
1415 .enable_reg
= 0x3134,
1416 .enable_mask
= BIT(0),
1417 .hw
.init
= &(struct clk_init_data
){
1418 .name
= "camss_csi1phy_clk",
1419 .parent_names
= (const char *[]){
1423 .flags
= CLK_SET_RATE_PARENT
,
1424 .ops
= &clk_branch2_ops
,
1429 static struct clk_branch camss_csi1pix_clk
= {
1432 .enable_reg
= 0x3154,
1433 .enable_mask
= BIT(0),
1434 .hw
.init
= &(struct clk_init_data
){
1435 .name
= "camss_csi1pix_clk",
1436 .parent_names
= (const char *[]){
1440 .flags
= CLK_SET_RATE_PARENT
,
1441 .ops
= &clk_branch2_ops
,
1446 static struct clk_branch camss_csi1rdi_clk
= {
1449 .enable_reg
= 0x3144,
1450 .enable_mask
= BIT(0),
1451 .hw
.init
= &(struct clk_init_data
){
1452 .name
= "camss_csi1rdi_clk",
1453 .parent_names
= (const char *[]){
1457 .flags
= CLK_SET_RATE_PARENT
,
1458 .ops
= &clk_branch2_ops
,
1463 static struct clk_branch camss_csi2_ahb_clk
= {
1466 .enable_reg
= 0x3188,
1467 .enable_mask
= BIT(0),
1468 .hw
.init
= &(struct clk_init_data
){
1469 .name
= "camss_csi2_ahb_clk",
1470 .parent_names
= (const char *[]){
1474 .ops
= &clk_branch2_ops
,
1479 static struct clk_branch camss_csi2_clk
= {
1482 .enable_reg
= 0x3184,
1483 .enable_mask
= BIT(0),
1484 .hw
.init
= &(struct clk_init_data
){
1485 .name
= "camss_csi2_clk",
1486 .parent_names
= (const char *[]){
1490 .flags
= CLK_SET_RATE_PARENT
,
1491 .ops
= &clk_branch2_ops
,
1496 static struct clk_branch camss_csi2phy_clk
= {
1499 .enable_reg
= 0x3194,
1500 .enable_mask
= BIT(0),
1501 .hw
.init
= &(struct clk_init_data
){
1502 .name
= "camss_csi2phy_clk",
1503 .parent_names
= (const char *[]){
1507 .flags
= CLK_SET_RATE_PARENT
,
1508 .ops
= &clk_branch2_ops
,
1513 static struct clk_branch camss_csi2pix_clk
= {
1516 .enable_reg
= 0x31b4,
1517 .enable_mask
= BIT(0),
1518 .hw
.init
= &(struct clk_init_data
){
1519 .name
= "camss_csi2pix_clk",
1520 .parent_names
= (const char *[]){
1524 .flags
= CLK_SET_RATE_PARENT
,
1525 .ops
= &clk_branch2_ops
,
1530 static struct clk_branch camss_csi2rdi_clk
= {
1533 .enable_reg
= 0x31a4,
1534 .enable_mask
= BIT(0),
1535 .hw
.init
= &(struct clk_init_data
){
1536 .name
= "camss_csi2rdi_clk",
1537 .parent_names
= (const char *[]){
1541 .flags
= CLK_SET_RATE_PARENT
,
1542 .ops
= &clk_branch2_ops
,
1547 static struct clk_branch camss_csi3_ahb_clk
= {
1550 .enable_reg
= 0x31e8,
1551 .enable_mask
= BIT(0),
1552 .hw
.init
= &(struct clk_init_data
){
1553 .name
= "camss_csi3_ahb_clk",
1554 .parent_names
= (const char *[]){
1558 .ops
= &clk_branch2_ops
,
1563 static struct clk_branch camss_csi3_clk
= {
1566 .enable_reg
= 0x31e4,
1567 .enable_mask
= BIT(0),
1568 .hw
.init
= &(struct clk_init_data
){
1569 .name
= "camss_csi3_clk",
1570 .parent_names
= (const char *[]){
1574 .flags
= CLK_SET_RATE_PARENT
,
1575 .ops
= &clk_branch2_ops
,
1580 static struct clk_branch camss_csi3phy_clk
= {
1583 .enable_reg
= 0x31f4,
1584 .enable_mask
= BIT(0),
1585 .hw
.init
= &(struct clk_init_data
){
1586 .name
= "camss_csi3phy_clk",
1587 .parent_names
= (const char *[]){
1591 .flags
= CLK_SET_RATE_PARENT
,
1592 .ops
= &clk_branch2_ops
,
1597 static struct clk_branch camss_csi3pix_clk
= {
1600 .enable_reg
= 0x3214,
1601 .enable_mask
= BIT(0),
1602 .hw
.init
= &(struct clk_init_data
){
1603 .name
= "camss_csi3pix_clk",
1604 .parent_names
= (const char *[]){
1608 .flags
= CLK_SET_RATE_PARENT
,
1609 .ops
= &clk_branch2_ops
,
1614 static struct clk_branch camss_csi3rdi_clk
= {
1617 .enable_reg
= 0x3204,
1618 .enable_mask
= BIT(0),
1619 .hw
.init
= &(struct clk_init_data
){
1620 .name
= "camss_csi3rdi_clk",
1621 .parent_names
= (const char *[]){
1625 .flags
= CLK_SET_RATE_PARENT
,
1626 .ops
= &clk_branch2_ops
,
1631 static struct clk_branch camss_csi_vfe0_clk
= {
1634 .enable_reg
= 0x3704,
1635 .enable_mask
= BIT(0),
1636 .hw
.init
= &(struct clk_init_data
){
1637 .name
= "camss_csi_vfe0_clk",
1638 .parent_names
= (const char *[]){
1642 .flags
= CLK_SET_RATE_PARENT
,
1643 .ops
= &clk_branch2_ops
,
1648 static struct clk_branch camss_csi_vfe1_clk
= {
1651 .enable_reg
= 0x3714,
1652 .enable_mask
= BIT(0),
1653 .hw
.init
= &(struct clk_init_data
){
1654 .name
= "camss_csi_vfe1_clk",
1655 .parent_names
= (const char *[]){
1659 .flags
= CLK_SET_RATE_PARENT
,
1660 .ops
= &clk_branch2_ops
,
1665 static struct clk_branch camss_gp0_clk
= {
1668 .enable_reg
= 0x3444,
1669 .enable_mask
= BIT(0),
1670 .hw
.init
= &(struct clk_init_data
){
1671 .name
= "camss_gp0_clk",
1672 .parent_names
= (const char *[]){
1673 "camss_gp0_clk_src",
1676 .flags
= CLK_SET_RATE_PARENT
,
1677 .ops
= &clk_branch2_ops
,
1682 static struct clk_branch camss_gp1_clk
= {
1685 .enable_reg
= 0x3474,
1686 .enable_mask
= BIT(0),
1687 .hw
.init
= &(struct clk_init_data
){
1688 .name
= "camss_gp1_clk",
1689 .parent_names
= (const char *[]){
1690 "camss_gp1_clk_src",
1693 .flags
= CLK_SET_RATE_PARENT
,
1694 .ops
= &clk_branch2_ops
,
1699 static struct clk_branch camss_ispif_ahb_clk
= {
1702 .enable_reg
= 0x3224,
1703 .enable_mask
= BIT(0),
1704 .hw
.init
= &(struct clk_init_data
){
1705 .name
= "camss_ispif_ahb_clk",
1706 .parent_names
= (const char *[]){
1710 .flags
= CLK_SET_RATE_PARENT
,
1711 .ops
= &clk_branch2_ops
,
1716 static struct clk_branch camss_jpeg_jpeg0_clk
= {
1719 .enable_reg
= 0x35a8,
1720 .enable_mask
= BIT(0),
1721 .hw
.init
= &(struct clk_init_data
){
1722 .name
= "camss_jpeg_jpeg0_clk",
1723 .parent_names
= (const char *[]){
1727 .flags
= CLK_SET_RATE_PARENT
,
1728 .ops
= &clk_branch2_ops
,
1733 static struct clk_branch camss_jpeg_jpeg1_clk
= {
1736 .enable_reg
= 0x35ac,
1737 .enable_mask
= BIT(0),
1738 .hw
.init
= &(struct clk_init_data
){
1739 .name
= "camss_jpeg_jpeg1_clk",
1740 .parent_names
= (const char *[]){
1744 .flags
= CLK_SET_RATE_PARENT
,
1745 .ops
= &clk_branch2_ops
,
1750 static struct clk_branch camss_jpeg_jpeg2_clk
= {
1753 .enable_reg
= 0x35b0,
1754 .enable_mask
= BIT(0),
1755 .hw
.init
= &(struct clk_init_data
){
1756 .name
= "camss_jpeg_jpeg2_clk",
1757 .parent_names
= (const char *[]){
1761 .flags
= CLK_SET_RATE_PARENT
,
1762 .ops
= &clk_branch2_ops
,
1767 static struct clk_branch camss_jpeg_jpeg_ahb_clk
= {
1770 .enable_reg
= 0x35b4,
1771 .enable_mask
= BIT(0),
1772 .hw
.init
= &(struct clk_init_data
){
1773 .name
= "camss_jpeg_jpeg_ahb_clk",
1774 .parent_names
= (const char *[]){
1778 .ops
= &clk_branch2_ops
,
1783 static struct clk_branch camss_jpeg_jpeg_axi_clk
= {
1786 .enable_reg
= 0x35b8,
1787 .enable_mask
= BIT(0),
1788 .hw
.init
= &(struct clk_init_data
){
1789 .name
= "camss_jpeg_jpeg_axi_clk",
1790 .parent_names
= (const char *[]){
1794 .ops
= &clk_branch2_ops
,
1799 static struct clk_branch camss_mclk0_clk
= {
1802 .enable_reg
= 0x3384,
1803 .enable_mask
= BIT(0),
1804 .hw
.init
= &(struct clk_init_data
){
1805 .name
= "camss_mclk0_clk",
1806 .parent_names
= (const char *[]){
1810 .flags
= CLK_SET_RATE_PARENT
,
1811 .ops
= &clk_branch2_ops
,
1816 static struct clk_branch camss_mclk1_clk
= {
1819 .enable_reg
= 0x33b4,
1820 .enable_mask
= BIT(0),
1821 .hw
.init
= &(struct clk_init_data
){
1822 .name
= "camss_mclk1_clk",
1823 .parent_names
= (const char *[]){
1827 .flags
= CLK_SET_RATE_PARENT
,
1828 .ops
= &clk_branch2_ops
,
1833 static struct clk_branch camss_mclk2_clk
= {
1836 .enable_reg
= 0x33e4,
1837 .enable_mask
= BIT(0),
1838 .hw
.init
= &(struct clk_init_data
){
1839 .name
= "camss_mclk2_clk",
1840 .parent_names
= (const char *[]){
1844 .flags
= CLK_SET_RATE_PARENT
,
1845 .ops
= &clk_branch2_ops
,
1850 static struct clk_branch camss_mclk3_clk
= {
1853 .enable_reg
= 0x3414,
1854 .enable_mask
= BIT(0),
1855 .hw
.init
= &(struct clk_init_data
){
1856 .name
= "camss_mclk3_clk",
1857 .parent_names
= (const char *[]){
1861 .flags
= CLK_SET_RATE_PARENT
,
1862 .ops
= &clk_branch2_ops
,
1867 static struct clk_branch camss_micro_ahb_clk
= {
1870 .enable_reg
= 0x3494,
1871 .enable_mask
= BIT(0),
1872 .hw
.init
= &(struct clk_init_data
){
1873 .name
= "camss_micro_ahb_clk",
1874 .parent_names
= (const char *[]){
1878 .ops
= &clk_branch2_ops
,
1883 static struct clk_branch camss_phy0_csi0phytimer_clk
= {
1886 .enable_reg
= 0x3024,
1887 .enable_mask
= BIT(0),
1888 .hw
.init
= &(struct clk_init_data
){
1889 .name
= "camss_phy0_csi0phytimer_clk",
1890 .parent_names
= (const char *[]){
1891 "csi0phytimer_clk_src",
1894 .flags
= CLK_SET_RATE_PARENT
,
1895 .ops
= &clk_branch2_ops
,
1900 static struct clk_branch camss_phy1_csi1phytimer_clk
= {
1903 .enable_reg
= 0x3054,
1904 .enable_mask
= BIT(0),
1905 .hw
.init
= &(struct clk_init_data
){
1906 .name
= "camss_phy1_csi1phytimer_clk",
1907 .parent_names
= (const char *[]){
1908 "csi1phytimer_clk_src",
1911 .flags
= CLK_SET_RATE_PARENT
,
1912 .ops
= &clk_branch2_ops
,
1917 static struct clk_branch camss_phy2_csi2phytimer_clk
= {
1920 .enable_reg
= 0x3084,
1921 .enable_mask
= BIT(0),
1922 .hw
.init
= &(struct clk_init_data
){
1923 .name
= "camss_phy2_csi2phytimer_clk",
1924 .parent_names
= (const char *[]){
1925 "csi2phytimer_clk_src",
1928 .flags
= CLK_SET_RATE_PARENT
,
1929 .ops
= &clk_branch2_ops
,
1934 static struct clk_branch camss_top_ahb_clk
= {
1937 .enable_reg
= 0x3484,
1938 .enable_mask
= BIT(0),
1939 .hw
.init
= &(struct clk_init_data
){
1940 .name
= "camss_top_ahb_clk",
1941 .parent_names
= (const char *[]){
1945 .flags
= CLK_SET_RATE_PARENT
,
1946 .ops
= &clk_branch2_ops
,
1951 static struct clk_branch camss_vfe_cpp_ahb_clk
= {
1954 .enable_reg
= 0x36b4,
1955 .enable_mask
= BIT(0),
1956 .hw
.init
= &(struct clk_init_data
){
1957 .name
= "camss_vfe_cpp_ahb_clk",
1958 .parent_names
= (const char *[]){
1962 .flags
= CLK_SET_RATE_PARENT
,
1963 .ops
= &clk_branch2_ops
,
1968 static struct clk_branch camss_vfe_cpp_clk
= {
1971 .enable_reg
= 0x36b0,
1972 .enable_mask
= BIT(0),
1973 .hw
.init
= &(struct clk_init_data
){
1974 .name
= "camss_vfe_cpp_clk",
1975 .parent_names
= (const char *[]){
1979 .flags
= CLK_SET_RATE_PARENT
,
1980 .ops
= &clk_branch2_ops
,
1985 static struct clk_branch camss_vfe_vfe0_clk
= {
1988 .enable_reg
= 0x36a8,
1989 .enable_mask
= BIT(0),
1990 .hw
.init
= &(struct clk_init_data
){
1991 .name
= "camss_vfe_vfe0_clk",
1992 .parent_names
= (const char *[]){
1996 .flags
= CLK_SET_RATE_PARENT
,
1997 .ops
= &clk_branch2_ops
,
2002 static struct clk_branch camss_vfe_vfe1_clk
= {
2005 .enable_reg
= 0x36ac,
2006 .enable_mask
= BIT(0),
2007 .hw
.init
= &(struct clk_init_data
){
2008 .name
= "camss_vfe_vfe1_clk",
2009 .parent_names
= (const char *[]){
2013 .flags
= CLK_SET_RATE_PARENT
,
2014 .ops
= &clk_branch2_ops
,
2019 static struct clk_branch camss_vfe_vfe_ahb_clk
= {
2022 .enable_reg
= 0x36b8,
2023 .enable_mask
= BIT(0),
2024 .hw
.init
= &(struct clk_init_data
){
2025 .name
= "camss_vfe_vfe_ahb_clk",
2026 .parent_names
= (const char *[]){
2030 .flags
= CLK_SET_RATE_PARENT
,
2031 .ops
= &clk_branch2_ops
,
2036 static struct clk_branch camss_vfe_vfe_axi_clk
= {
2039 .enable_reg
= 0x36bc,
2040 .enable_mask
= BIT(0),
2041 .hw
.init
= &(struct clk_init_data
){
2042 .name
= "camss_vfe_vfe_axi_clk",
2043 .parent_names
= (const char *[]){
2047 .flags
= CLK_SET_RATE_PARENT
,
2048 .ops
= &clk_branch2_ops
,
2053 static struct clk_branch mdss_ahb_clk
= {
2056 .enable_reg
= 0x2308,
2057 .enable_mask
= BIT(0),
2058 .hw
.init
= &(struct clk_init_data
){
2059 .name
= "mdss_ahb_clk",
2060 .parent_names
= (const char *[]){
2064 .flags
= CLK_SET_RATE_PARENT
,
2065 .ops
= &clk_branch2_ops
,
2070 static struct clk_branch mdss_axi_clk
= {
2073 .enable_reg
= 0x2310,
2074 .enable_mask
= BIT(0),
2075 .hw
.init
= &(struct clk_init_data
){
2076 .name
= "mdss_axi_clk",
2077 .parent_names
= (const char *[]){
2081 .flags
= CLK_SET_RATE_PARENT
,
2082 .ops
= &clk_branch2_ops
,
2087 static struct clk_branch mdss_byte0_clk
= {
2090 .enable_reg
= 0x233c,
2091 .enable_mask
= BIT(0),
2092 .hw
.init
= &(struct clk_init_data
){
2093 .name
= "mdss_byte0_clk",
2094 .parent_names
= (const char *[]){
2098 .flags
= CLK_SET_RATE_PARENT
,
2099 .ops
= &clk_branch2_ops
,
2104 static struct clk_branch mdss_byte1_clk
= {
2107 .enable_reg
= 0x2340,
2108 .enable_mask
= BIT(0),
2109 .hw
.init
= &(struct clk_init_data
){
2110 .name
= "mdss_byte1_clk",
2111 .parent_names
= (const char *[]){
2115 .flags
= CLK_SET_RATE_PARENT
,
2116 .ops
= &clk_branch2_ops
,
2121 static struct clk_branch mdss_edpaux_clk
= {
2124 .enable_reg
= 0x2334,
2125 .enable_mask
= BIT(0),
2126 .hw
.init
= &(struct clk_init_data
){
2127 .name
= "mdss_edpaux_clk",
2128 .parent_names
= (const char *[]){
2132 .flags
= CLK_SET_RATE_PARENT
,
2133 .ops
= &clk_branch2_ops
,
2138 static struct clk_branch mdss_edplink_clk
= {
2141 .enable_reg
= 0x2330,
2142 .enable_mask
= BIT(0),
2143 .hw
.init
= &(struct clk_init_data
){
2144 .name
= "mdss_edplink_clk",
2145 .parent_names
= (const char *[]){
2149 .flags
= CLK_SET_RATE_PARENT
,
2150 .ops
= &clk_branch2_ops
,
2155 static struct clk_branch mdss_edppixel_clk
= {
2158 .enable_reg
= 0x232c,
2159 .enable_mask
= BIT(0),
2160 .hw
.init
= &(struct clk_init_data
){
2161 .name
= "mdss_edppixel_clk",
2162 .parent_names
= (const char *[]){
2166 .flags
= CLK_SET_RATE_PARENT
,
2167 .ops
= &clk_branch2_ops
,
2172 static struct clk_branch mdss_esc0_clk
= {
2175 .enable_reg
= 0x2344,
2176 .enable_mask
= BIT(0),
2177 .hw
.init
= &(struct clk_init_data
){
2178 .name
= "mdss_esc0_clk",
2179 .parent_names
= (const char *[]){
2183 .flags
= CLK_SET_RATE_PARENT
,
2184 .ops
= &clk_branch2_ops
,
2189 static struct clk_branch mdss_esc1_clk
= {
2192 .enable_reg
= 0x2348,
2193 .enable_mask
= BIT(0),
2194 .hw
.init
= &(struct clk_init_data
){
2195 .name
= "mdss_esc1_clk",
2196 .parent_names
= (const char *[]){
2200 .flags
= CLK_SET_RATE_PARENT
,
2201 .ops
= &clk_branch2_ops
,
2206 static struct clk_branch mdss_extpclk_clk
= {
2209 .enable_reg
= 0x2324,
2210 .enable_mask
= BIT(0),
2211 .hw
.init
= &(struct clk_init_data
){
2212 .name
= "mdss_extpclk_clk",
2213 .parent_names
= (const char *[]){
2217 .flags
= CLK_SET_RATE_PARENT
,
2218 .ops
= &clk_branch2_ops
,
2223 static struct clk_branch mdss_hdmi_ahb_clk
= {
2226 .enable_reg
= 0x230c,
2227 .enable_mask
= BIT(0),
2228 .hw
.init
= &(struct clk_init_data
){
2229 .name
= "mdss_hdmi_ahb_clk",
2230 .parent_names
= (const char *[]){
2234 .flags
= CLK_SET_RATE_PARENT
,
2235 .ops
= &clk_branch2_ops
,
2240 static struct clk_branch mdss_hdmi_clk
= {
2243 .enable_reg
= 0x2338,
2244 .enable_mask
= BIT(0),
2245 .hw
.init
= &(struct clk_init_data
){
2246 .name
= "mdss_hdmi_clk",
2247 .parent_names
= (const char *[]){
2251 .flags
= CLK_SET_RATE_PARENT
,
2252 .ops
= &clk_branch2_ops
,
2257 static struct clk_branch mdss_mdp_clk
= {
2260 .enable_reg
= 0x231c,
2261 .enable_mask
= BIT(0),
2262 .hw
.init
= &(struct clk_init_data
){
2263 .name
= "mdss_mdp_clk",
2264 .parent_names
= (const char *[]){
2268 .flags
= CLK_SET_RATE_PARENT
,
2269 .ops
= &clk_branch2_ops
,
2274 static struct clk_branch mdss_mdp_lut_clk
= {
2277 .enable_reg
= 0x2320,
2278 .enable_mask
= BIT(0),
2279 .hw
.init
= &(struct clk_init_data
){
2280 .name
= "mdss_mdp_lut_clk",
2281 .parent_names
= (const char *[]){
2285 .flags
= CLK_SET_RATE_PARENT
,
2286 .ops
= &clk_branch2_ops
,
2291 static struct clk_branch mdss_pclk0_clk
= {
2294 .enable_reg
= 0x2314,
2295 .enable_mask
= BIT(0),
2296 .hw
.init
= &(struct clk_init_data
){
2297 .name
= "mdss_pclk0_clk",
2298 .parent_names
= (const char *[]){
2302 .flags
= CLK_SET_RATE_PARENT
,
2303 .ops
= &clk_branch2_ops
,
2308 static struct clk_branch mdss_pclk1_clk
= {
2311 .enable_reg
= 0x2318,
2312 .enable_mask
= BIT(0),
2313 .hw
.init
= &(struct clk_init_data
){
2314 .name
= "mdss_pclk1_clk",
2315 .parent_names
= (const char *[]){
2319 .flags
= CLK_SET_RATE_PARENT
,
2320 .ops
= &clk_branch2_ops
,
2325 static struct clk_branch mdss_vsync_clk
= {
2328 .enable_reg
= 0x2328,
2329 .enable_mask
= BIT(0),
2330 .hw
.init
= &(struct clk_init_data
){
2331 .name
= "mdss_vsync_clk",
2332 .parent_names
= (const char *[]){
2336 .flags
= CLK_SET_RATE_PARENT
,
2337 .ops
= &clk_branch2_ops
,
2342 static struct clk_branch mmss_rbcpr_ahb_clk
= {
2345 .enable_reg
= 0x4088,
2346 .enable_mask
= BIT(0),
2347 .hw
.init
= &(struct clk_init_data
){
2348 .name
= "mmss_rbcpr_ahb_clk",
2349 .parent_names
= (const char *[]){
2353 .flags
= CLK_SET_RATE_PARENT
,
2354 .ops
= &clk_branch2_ops
,
2359 static struct clk_branch mmss_rbcpr_clk
= {
2362 .enable_reg
= 0x4084,
2363 .enable_mask
= BIT(0),
2364 .hw
.init
= &(struct clk_init_data
){
2365 .name
= "mmss_rbcpr_clk",
2366 .parent_names
= (const char *[]){
2370 .flags
= CLK_SET_RATE_PARENT
,
2371 .ops
= &clk_branch2_ops
,
2376 static struct clk_branch mmss_spdm_ahb_clk
= {
2379 .enable_reg
= 0x0230,
2380 .enable_mask
= BIT(0),
2381 .hw
.init
= &(struct clk_init_data
){
2382 .name
= "mmss_spdm_ahb_clk",
2383 .parent_names
= (const char *[]){
2384 "mmss_spdm_ahb_div_clk",
2387 .flags
= CLK_SET_RATE_PARENT
,
2388 .ops
= &clk_branch2_ops
,
2393 static struct clk_branch mmss_spdm_axi_clk
= {
2396 .enable_reg
= 0x0210,
2397 .enable_mask
= BIT(0),
2398 .hw
.init
= &(struct clk_init_data
){
2399 .name
= "mmss_spdm_axi_clk",
2400 .parent_names
= (const char *[]){
2401 "mmss_spdm_axi_div_clk",
2404 .flags
= CLK_SET_RATE_PARENT
,
2405 .ops
= &clk_branch2_ops
,
2410 static struct clk_branch mmss_spdm_csi0_clk
= {
2413 .enable_reg
= 0x023c,
2414 .enable_mask
= BIT(0),
2415 .hw
.init
= &(struct clk_init_data
){
2416 .name
= "mmss_spdm_csi0_clk",
2417 .parent_names
= (const char *[]){
2418 "mmss_spdm_csi0_div_clk",
2421 .flags
= CLK_SET_RATE_PARENT
,
2422 .ops
= &clk_branch2_ops
,
2427 static struct clk_branch mmss_spdm_gfx3d_clk
= {
2430 .enable_reg
= 0x022c,
2431 .enable_mask
= BIT(0),
2432 .hw
.init
= &(struct clk_init_data
){
2433 .name
= "mmss_spdm_gfx3d_clk",
2434 .parent_names
= (const char *[]){
2435 "mmss_spdm_gfx3d_div_clk",
2438 .flags
= CLK_SET_RATE_PARENT
,
2439 .ops
= &clk_branch2_ops
,
2444 static struct clk_branch mmss_spdm_jpeg0_clk
= {
2447 .enable_reg
= 0x0204,
2448 .enable_mask
= BIT(0),
2449 .hw
.init
= &(struct clk_init_data
){
2450 .name
= "mmss_spdm_jpeg0_clk",
2451 .parent_names
= (const char *[]){
2452 "mmss_spdm_jpeg0_div_clk",
2455 .flags
= CLK_SET_RATE_PARENT
,
2456 .ops
= &clk_branch2_ops
,
2461 static struct clk_branch mmss_spdm_jpeg1_clk
= {
2464 .enable_reg
= 0x0208,
2465 .enable_mask
= BIT(0),
2466 .hw
.init
= &(struct clk_init_data
){
2467 .name
= "mmss_spdm_jpeg1_clk",
2468 .parent_names
= (const char *[]){
2469 "mmss_spdm_jpeg1_div_clk",
2472 .flags
= CLK_SET_RATE_PARENT
,
2473 .ops
= &clk_branch2_ops
,
2478 static struct clk_branch mmss_spdm_jpeg2_clk
= {
2481 .enable_reg
= 0x0224,
2482 .enable_mask
= BIT(0),
2483 .hw
.init
= &(struct clk_init_data
){
2484 .name
= "mmss_spdm_jpeg2_clk",
2485 .parent_names
= (const char *[]){
2486 "mmss_spdm_jpeg2_div_clk",
2489 .flags
= CLK_SET_RATE_PARENT
,
2490 .ops
= &clk_branch2_ops
,
2495 static struct clk_branch mmss_spdm_mdp_clk
= {
2498 .enable_reg
= 0x020c,
2499 .enable_mask
= BIT(0),
2500 .hw
.init
= &(struct clk_init_data
){
2501 .name
= "mmss_spdm_mdp_clk",
2502 .parent_names
= (const char *[]){
2503 "mmss_spdm_mdp_div_clk",
2506 .flags
= CLK_SET_RATE_PARENT
,
2507 .ops
= &clk_branch2_ops
,
2512 static struct clk_branch mmss_spdm_pclk0_clk
= {
2515 .enable_reg
= 0x0234,
2516 .enable_mask
= BIT(0),
2517 .hw
.init
= &(struct clk_init_data
){
2518 .name
= "mmss_spdm_pclk0_clk",
2519 .parent_names
= (const char *[]){
2520 "mmss_spdm_pclk0_div_clk",
2523 .flags
= CLK_SET_RATE_PARENT
,
2524 .ops
= &clk_branch2_ops
,
2529 static struct clk_branch mmss_spdm_pclk1_clk
= {
2532 .enable_reg
= 0x0228,
2533 .enable_mask
= BIT(0),
2534 .hw
.init
= &(struct clk_init_data
){
2535 .name
= "mmss_spdm_pclk1_clk",
2536 .parent_names
= (const char *[]){
2537 "mmss_spdm_pclk1_div_clk",
2540 .flags
= CLK_SET_RATE_PARENT
,
2541 .ops
= &clk_branch2_ops
,
2546 static struct clk_branch mmss_spdm_vcodec0_clk
= {
2549 .enable_reg
= 0x0214,
2550 .enable_mask
= BIT(0),
2551 .hw
.init
= &(struct clk_init_data
){
2552 .name
= "mmss_spdm_vcodec0_clk",
2553 .parent_names
= (const char *[]){
2554 "mmss_spdm_vcodec0_div_clk",
2557 .flags
= CLK_SET_RATE_PARENT
,
2558 .ops
= &clk_branch2_ops
,
2563 static struct clk_branch mmss_spdm_vfe0_clk
= {
2566 .enable_reg
= 0x0218,
2567 .enable_mask
= BIT(0),
2568 .hw
.init
= &(struct clk_init_data
){
2569 .name
= "mmss_spdm_vfe0_clk",
2570 .parent_names
= (const char *[]){
2571 "mmss_spdm_vfe0_div_clk",
2574 .flags
= CLK_SET_RATE_PARENT
,
2575 .ops
= &clk_branch2_ops
,
2580 static struct clk_branch mmss_spdm_vfe1_clk
= {
2583 .enable_reg
= 0x021c,
2584 .enable_mask
= BIT(0),
2585 .hw
.init
= &(struct clk_init_data
){
2586 .name
= "mmss_spdm_vfe1_clk",
2587 .parent_names
= (const char *[]){
2588 "mmss_spdm_vfe1_div_clk",
2591 .flags
= CLK_SET_RATE_PARENT
,
2592 .ops
= &clk_branch2_ops
,
2597 static struct clk_branch mmss_spdm_rm_axi_clk
= {
2600 .enable_reg
= 0x0304,
2601 .enable_mask
= BIT(0),
2602 .hw
.init
= &(struct clk_init_data
){
2603 .name
= "mmss_spdm_rm_axi_clk",
2604 .parent_names
= (const char *[]){
2608 .flags
= CLK_SET_RATE_PARENT
,
2609 .ops
= &clk_branch2_ops
,
2614 static struct clk_branch mmss_spdm_rm_ocmemnoc_clk
= {
2617 .enable_reg
= 0x0308,
2618 .enable_mask
= BIT(0),
2619 .hw
.init
= &(struct clk_init_data
){
2620 .name
= "mmss_spdm_rm_ocmemnoc_clk",
2621 .parent_names
= (const char *[]){
2625 .flags
= CLK_SET_RATE_PARENT
,
2626 .ops
= &clk_branch2_ops
,
2632 static struct clk_branch mmss_misc_ahb_clk
= {
2635 .enable_reg
= 0x502c,
2636 .enable_mask
= BIT(0),
2637 .hw
.init
= &(struct clk_init_data
){
2638 .name
= "mmss_misc_ahb_clk",
2639 .parent_names
= (const char *[]){
2643 .flags
= CLK_SET_RATE_PARENT
,
2644 .ops
= &clk_branch2_ops
,
2649 static struct clk_branch mmss_mmssnoc_ahb_clk
= {
2652 .enable_reg
= 0x5024,
2653 .enable_mask
= BIT(0),
2654 .hw
.init
= &(struct clk_init_data
){
2655 .name
= "mmss_mmssnoc_ahb_clk",
2656 .parent_names
= (const char *[]){
2660 .ops
= &clk_branch2_ops
,
2661 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2666 static struct clk_branch mmss_mmssnoc_bto_ahb_clk
= {
2669 .enable_reg
= 0x5028,
2670 .enable_mask
= BIT(0),
2671 .hw
.init
= &(struct clk_init_data
){
2672 .name
= "mmss_mmssnoc_bto_ahb_clk",
2673 .parent_names
= (const char *[]){
2677 .ops
= &clk_branch2_ops
,
2678 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2683 static struct clk_branch mmss_mmssnoc_axi_clk
= {
2686 .enable_reg
= 0x506c,
2687 .enable_mask
= BIT(0),
2688 .hw
.init
= &(struct clk_init_data
){
2689 .name
= "mmss_mmssnoc_axi_clk",
2690 .parent_names
= (const char *[]){
2694 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2695 .ops
= &clk_branch2_ops
,
2700 static struct clk_branch mmss_s0_axi_clk
= {
2703 .enable_reg
= 0x5064,
2704 .enable_mask
= BIT(0),
2705 .hw
.init
= &(struct clk_init_data
){
2706 .name
= "mmss_s0_axi_clk",
2707 .parent_names
= (const char *[]){
2711 .ops
= &clk_branch2_ops
,
2712 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2717 static struct clk_branch ocmemcx_ahb_clk
= {
2720 .enable_reg
= 0x405c,
2721 .enable_mask
= BIT(0),
2722 .hw
.init
= &(struct clk_init_data
){
2723 .name
= "ocmemcx_ahb_clk",
2724 .parent_names
= (const char *[]){
2728 .flags
= CLK_SET_RATE_PARENT
,
2729 .ops
= &clk_branch2_ops
,
2734 static struct clk_branch ocmemcx_ocmemnoc_clk
= {
2737 .enable_reg
= 0x4058,
2738 .enable_mask
= BIT(0),
2739 .hw
.init
= &(struct clk_init_data
){
2740 .name
= "ocmemcx_ocmemnoc_clk",
2741 .parent_names
= (const char *[]){
2745 .flags
= CLK_SET_RATE_PARENT
,
2746 .ops
= &clk_branch2_ops
,
2751 static struct clk_branch oxili_ocmemgx_clk
= {
2754 .enable_reg
= 0x402c,
2755 .enable_mask
= BIT(0),
2756 .hw
.init
= &(struct clk_init_data
){
2757 .name
= "oxili_ocmemgx_clk",
2758 .parent_names
= (const char *[]){
2762 .flags
= CLK_SET_RATE_PARENT
,
2763 .ops
= &clk_branch2_ops
,
2768 static struct clk_branch oxili_gfx3d_clk
= {
2771 .enable_reg
= 0x4028,
2772 .enable_mask
= BIT(0),
2773 .hw
.init
= &(struct clk_init_data
){
2774 .name
= "oxili_gfx3d_clk",
2775 .parent_names
= (const char *[]){
2779 .flags
= CLK_SET_RATE_PARENT
,
2780 .ops
= &clk_branch2_ops
,
2785 static struct clk_branch oxili_rbbmtimer_clk
= {
2788 .enable_reg
= 0x40b0,
2789 .enable_mask
= BIT(0),
2790 .hw
.init
= &(struct clk_init_data
){
2791 .name
= "oxili_rbbmtimer_clk",
2792 .parent_names
= (const char *[]){
2793 "rbbmtimer_clk_src",
2796 .flags
= CLK_SET_RATE_PARENT
,
2797 .ops
= &clk_branch2_ops
,
2802 static struct clk_branch oxilicx_ahb_clk
= {
2805 .enable_reg
= 0x403c,
2806 .enable_mask
= BIT(0),
2807 .hw
.init
= &(struct clk_init_data
){
2808 .name
= "oxilicx_ahb_clk",
2809 .parent_names
= (const char *[]){
2813 .flags
= CLK_SET_RATE_PARENT
,
2814 .ops
= &clk_branch2_ops
,
2819 static struct clk_branch venus0_ahb_clk
= {
2822 .enable_reg
= 0x1030,
2823 .enable_mask
= BIT(0),
2824 .hw
.init
= &(struct clk_init_data
){
2825 .name
= "venus0_ahb_clk",
2826 .parent_names
= (const char *[]){
2830 .flags
= CLK_SET_RATE_PARENT
,
2831 .ops
= &clk_branch2_ops
,
2836 static struct clk_branch venus0_axi_clk
= {
2839 .enable_reg
= 0x1034,
2840 .enable_mask
= BIT(0),
2841 .hw
.init
= &(struct clk_init_data
){
2842 .name
= "venus0_axi_clk",
2843 .parent_names
= (const char *[]){
2847 .flags
= CLK_SET_RATE_PARENT
,
2848 .ops
= &clk_branch2_ops
,
2853 static struct clk_branch venus0_core0_vcodec_clk
= {
2856 .enable_reg
= 0x1048,
2857 .enable_mask
= BIT(0),
2858 .hw
.init
= &(struct clk_init_data
){
2859 .name
= "venus0_core0_vcodec_clk",
2860 .parent_names
= (const char *[]){
2864 .flags
= CLK_SET_RATE_PARENT
,
2865 .ops
= &clk_branch2_ops
,
2870 static struct clk_branch venus0_core1_vcodec_clk
= {
2873 .enable_reg
= 0x104c,
2874 .enable_mask
= BIT(0),
2875 .hw
.init
= &(struct clk_init_data
){
2876 .name
= "venus0_core1_vcodec_clk",
2877 .parent_names
= (const char *[]){
2881 .flags
= CLK_SET_RATE_PARENT
,
2882 .ops
= &clk_branch2_ops
,
2887 static struct clk_branch venus0_ocmemnoc_clk
= {
2890 .enable_reg
= 0x1038,
2891 .enable_mask
= BIT(0),
2892 .hw
.init
= &(struct clk_init_data
){
2893 .name
= "venus0_ocmemnoc_clk",
2894 .parent_names
= (const char *[]){
2898 .flags
= CLK_SET_RATE_PARENT
,
2899 .ops
= &clk_branch2_ops
,
2904 static struct clk_branch venus0_vcodec0_clk
= {
2907 .enable_reg
= 0x1028,
2908 .enable_mask
= BIT(0),
2909 .hw
.init
= &(struct clk_init_data
){
2910 .name
= "venus0_vcodec0_clk",
2911 .parent_names
= (const char *[]){
2915 .flags
= CLK_SET_RATE_PARENT
,
2916 .ops
= &clk_branch2_ops
,
2921 static struct clk_branch vpu_ahb_clk
= {
2924 .enable_reg
= 0x1430,
2925 .enable_mask
= BIT(0),
2926 .hw
.init
= &(struct clk_init_data
){
2927 .name
= "vpu_ahb_clk",
2928 .parent_names
= (const char *[]){
2932 .flags
= CLK_SET_RATE_PARENT
,
2933 .ops
= &clk_branch2_ops
,
2938 static struct clk_branch vpu_axi_clk
= {
2941 .enable_reg
= 0x143c,
2942 .enable_mask
= BIT(0),
2943 .hw
.init
= &(struct clk_init_data
){
2944 .name
= "vpu_axi_clk",
2945 .parent_names
= (const char *[]){
2949 .flags
= CLK_SET_RATE_PARENT
,
2950 .ops
= &clk_branch2_ops
,
2955 static struct clk_branch vpu_bus_clk
= {
2958 .enable_reg
= 0x1440,
2959 .enable_mask
= BIT(0),
2960 .hw
.init
= &(struct clk_init_data
){
2961 .name
= "vpu_bus_clk",
2962 .parent_names
= (const char *[]){
2966 .flags
= CLK_SET_RATE_PARENT
,
2967 .ops
= &clk_branch2_ops
,
2972 static struct clk_branch vpu_cxo_clk
= {
2975 .enable_reg
= 0x1434,
2976 .enable_mask
= BIT(0),
2977 .hw
.init
= &(struct clk_init_data
){
2978 .name
= "vpu_cxo_clk",
2979 .parent_names
= (const char *[]){ "xo" },
2981 .flags
= CLK_SET_RATE_PARENT
,
2982 .ops
= &clk_branch2_ops
,
2987 static struct clk_branch vpu_maple_clk
= {
2990 .enable_reg
= 0x142c,
2991 .enable_mask
= BIT(0),
2992 .hw
.init
= &(struct clk_init_data
){
2993 .name
= "vpu_maple_clk",
2994 .parent_names
= (const char *[]){
2998 .flags
= CLK_SET_RATE_PARENT
,
2999 .ops
= &clk_branch2_ops
,
3004 static struct clk_branch vpu_sleep_clk
= {
3007 .enable_reg
= 0x1438,
3008 .enable_mask
= BIT(0),
3009 .hw
.init
= &(struct clk_init_data
){
3010 .name
= "vpu_sleep_clk",
3011 .parent_names
= (const char *[]){
3015 .flags
= CLK_SET_RATE_PARENT
,
3016 .ops
= &clk_branch2_ops
,
3021 static struct clk_branch vpu_vdp_clk
= {
3024 .enable_reg
= 0x1428,
3025 .enable_mask
= BIT(0),
3026 .hw
.init
= &(struct clk_init_data
){
3027 .name
= "vpu_vdp_clk",
3028 .parent_names
= (const char *[]){
3032 .flags
= CLK_SET_RATE_PARENT
,
3033 .ops
= &clk_branch2_ops
,
3038 static const struct pll_config mmpll1_config
= {
3043 .vco_mask
= 0x3 << 20,
3045 .pre_div_mask
= 0x7 << 12,
3046 .post_div_val
= 0x0,
3047 .post_div_mask
= 0x3 << 8,
3048 .mn_ena_mask
= BIT(24),
3049 .main_output_mask
= BIT(0),
3052 static const struct pll_config mmpll3_config
= {
3057 .vco_mask
= 0x3 << 20,
3059 .pre_div_mask
= 0x7 << 12,
3060 .post_div_val
= 0x0,
3061 .post_div_mask
= 0x3 << 8,
3062 .mn_ena_mask
= BIT(24),
3063 .main_output_mask
= BIT(0),
3064 .aux_output_mask
= BIT(1),
3067 static struct gdsc venus0_gdsc
= {
3072 .pwrsts
= PWRSTS_OFF_ON
,
3075 static struct gdsc venus0_core0_gdsc
= {
3078 .name
= "venus0_core0",
3080 .pwrsts
= PWRSTS_OFF_ON
,
3083 static struct gdsc venus0_core1_gdsc
= {
3086 .name
= "venus0_core1",
3088 .pwrsts
= PWRSTS_OFF_ON
,
3091 static struct gdsc mdss_gdsc
= {
3093 .cxcs
= (unsigned int []){ 0x231c, 0x2320 },
3098 .pwrsts
= PWRSTS_OFF_ON
,
3101 static struct gdsc camss_jpeg_gdsc
= {
3104 .name
= "camss_jpeg",
3106 .pwrsts
= PWRSTS_OFF_ON
,
3109 static struct gdsc camss_vfe_gdsc
= {
3111 .cxcs
= (unsigned int []){ 0x36a8, 0x36ac, 0x36b0 },
3114 .name
= "camss_vfe",
3116 .pwrsts
= PWRSTS_OFF_ON
,
3119 static struct gdsc oxili_gdsc
= {
3121 .cxcs
= (unsigned int []){ 0x4028 },
3126 .pwrsts
= PWRSTS_OFF_ON
,
3129 static struct gdsc oxilicx_gdsc
= {
3134 .pwrsts
= PWRSTS_OFF_ON
,
3137 static struct clk_regmap
*mmcc_apq8084_clocks
[] = {
3138 [MMSS_AHB_CLK_SRC
] = &mmss_ahb_clk_src
.clkr
,
3139 [MMSS_AXI_CLK_SRC
] = &mmss_axi_clk_src
.clkr
,
3140 [MMPLL0
] = &mmpll0
.clkr
,
3141 [MMPLL0_VOTE
] = &mmpll0_vote
,
3142 [MMPLL1
] = &mmpll1
.clkr
,
3143 [MMPLL1_VOTE
] = &mmpll1_vote
,
3144 [MMPLL2
] = &mmpll2
.clkr
,
3145 [MMPLL3
] = &mmpll3
.clkr
,
3146 [MMPLL4
] = &mmpll4
.clkr
,
3147 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
3148 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
3149 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
3150 [CSI3_CLK_SRC
] = &csi3_clk_src
.clkr
,
3151 [VCODEC0_CLK_SRC
] = &vcodec0_clk_src
.clkr
,
3152 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
3153 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
3154 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
3155 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
3156 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
3157 [OCMEMNOC_CLK_SRC
] = &ocmemnoc_clk_src
.clkr
,
3158 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
3159 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
3160 [JPEG1_CLK_SRC
] = &jpeg1_clk_src
.clkr
,
3161 [JPEG2_CLK_SRC
] = &jpeg2_clk_src
.clkr
,
3162 [EDPPIXEL_CLK_SRC
] = &edppixel_clk_src
.clkr
,
3163 [EXTPCLK_CLK_SRC
] = &extpclk_clk_src
.clkr
,
3164 [VP_CLK_SRC
] = &vp_clk_src
.clkr
,
3165 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
3166 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
3167 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
3168 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
3169 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
3170 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
3171 [MCLK3_CLK_SRC
] = &mclk3_clk_src
.clkr
,
3172 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
3173 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
3174 [CSI2PHYTIMER_CLK_SRC
] = &csi2phytimer_clk_src
.clkr
,
3175 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
3176 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
3177 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
3178 [EDPAUX_CLK_SRC
] = &edpaux_clk_src
.clkr
,
3179 [EDPLINK_CLK_SRC
] = &edplink_clk_src
.clkr
,
3180 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
3181 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
3182 [HDMI_CLK_SRC
] = &hdmi_clk_src
.clkr
,
3183 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
3184 [MMSS_RBCPR_CLK_SRC
] = &rbcpr_clk_src
.clkr
,
3185 [RBBMTIMER_CLK_SRC
] = &rbbmtimer_clk_src
.clkr
,
3186 [MAPLE_CLK_SRC
] = &maple_clk_src
.clkr
,
3187 [VDP_CLK_SRC
] = &vdp_clk_src
.clkr
,
3188 [VPU_BUS_CLK_SRC
] = &vpu_bus_clk_src
.clkr
,
3189 [MMSS_CXO_CLK
] = &mmss_cxo_clk
.clkr
,
3190 [MMSS_SLEEPCLK_CLK
] = &mmss_sleepclk_clk
.clkr
,
3191 [AVSYNC_AHB_CLK
] = &avsync_ahb_clk
.clkr
,
3192 [AVSYNC_EDPPIXEL_CLK
] = &avsync_edppixel_clk
.clkr
,
3193 [AVSYNC_EXTPCLK_CLK
] = &avsync_extpclk_clk
.clkr
,
3194 [AVSYNC_PCLK0_CLK
] = &avsync_pclk0_clk
.clkr
,
3195 [AVSYNC_PCLK1_CLK
] = &avsync_pclk1_clk
.clkr
,
3196 [AVSYNC_VP_CLK
] = &avsync_vp_clk
.clkr
,
3197 [CAMSS_AHB_CLK
] = &camss_ahb_clk
.clkr
,
3198 [CAMSS_CCI_CCI_AHB_CLK
] = &camss_cci_cci_ahb_clk
.clkr
,
3199 [CAMSS_CCI_CCI_CLK
] = &camss_cci_cci_clk
.clkr
,
3200 [CAMSS_CSI0_AHB_CLK
] = &camss_csi0_ahb_clk
.clkr
,
3201 [CAMSS_CSI0_CLK
] = &camss_csi0_clk
.clkr
,
3202 [CAMSS_CSI0PHY_CLK
] = &camss_csi0phy_clk
.clkr
,
3203 [CAMSS_CSI0PIX_CLK
] = &camss_csi0pix_clk
.clkr
,
3204 [CAMSS_CSI0RDI_CLK
] = &camss_csi0rdi_clk
.clkr
,
3205 [CAMSS_CSI1_AHB_CLK
] = &camss_csi1_ahb_clk
.clkr
,
3206 [CAMSS_CSI1_CLK
] = &camss_csi1_clk
.clkr
,
3207 [CAMSS_CSI1PHY_CLK
] = &camss_csi1phy_clk
.clkr
,
3208 [CAMSS_CSI1PIX_CLK
] = &camss_csi1pix_clk
.clkr
,
3209 [CAMSS_CSI1RDI_CLK
] = &camss_csi1rdi_clk
.clkr
,
3210 [CAMSS_CSI2_AHB_CLK
] = &camss_csi2_ahb_clk
.clkr
,
3211 [CAMSS_CSI2_CLK
] = &camss_csi2_clk
.clkr
,
3212 [CAMSS_CSI2PHY_CLK
] = &camss_csi2phy_clk
.clkr
,
3213 [CAMSS_CSI2PIX_CLK
] = &camss_csi2pix_clk
.clkr
,
3214 [CAMSS_CSI2RDI_CLK
] = &camss_csi2rdi_clk
.clkr
,
3215 [CAMSS_CSI3_AHB_CLK
] = &camss_csi3_ahb_clk
.clkr
,
3216 [CAMSS_CSI3_CLK
] = &camss_csi3_clk
.clkr
,
3217 [CAMSS_CSI3PHY_CLK
] = &camss_csi3phy_clk
.clkr
,
3218 [CAMSS_CSI3PIX_CLK
] = &camss_csi3pix_clk
.clkr
,
3219 [CAMSS_CSI3RDI_CLK
] = &camss_csi3rdi_clk
.clkr
,
3220 [CAMSS_CSI_VFE0_CLK
] = &camss_csi_vfe0_clk
.clkr
,
3221 [CAMSS_CSI_VFE1_CLK
] = &camss_csi_vfe1_clk
.clkr
,
3222 [CAMSS_GP0_CLK
] = &camss_gp0_clk
.clkr
,
3223 [CAMSS_GP1_CLK
] = &camss_gp1_clk
.clkr
,
3224 [CAMSS_ISPIF_AHB_CLK
] = &camss_ispif_ahb_clk
.clkr
,
3225 [CAMSS_JPEG_JPEG0_CLK
] = &camss_jpeg_jpeg0_clk
.clkr
,
3226 [CAMSS_JPEG_JPEG1_CLK
] = &camss_jpeg_jpeg1_clk
.clkr
,
3227 [CAMSS_JPEG_JPEG2_CLK
] = &camss_jpeg_jpeg2_clk
.clkr
,
3228 [CAMSS_JPEG_JPEG_AHB_CLK
] = &camss_jpeg_jpeg_ahb_clk
.clkr
,
3229 [CAMSS_JPEG_JPEG_AXI_CLK
] = &camss_jpeg_jpeg_axi_clk
.clkr
,
3230 [CAMSS_MCLK0_CLK
] = &camss_mclk0_clk
.clkr
,
3231 [CAMSS_MCLK1_CLK
] = &camss_mclk1_clk
.clkr
,
3232 [CAMSS_MCLK2_CLK
] = &camss_mclk2_clk
.clkr
,
3233 [CAMSS_MCLK3_CLK
] = &camss_mclk3_clk
.clkr
,
3234 [CAMSS_MICRO_AHB_CLK
] = &camss_micro_ahb_clk
.clkr
,
3235 [CAMSS_PHY0_CSI0PHYTIMER_CLK
] = &camss_phy0_csi0phytimer_clk
.clkr
,
3236 [CAMSS_PHY1_CSI1PHYTIMER_CLK
] = &camss_phy1_csi1phytimer_clk
.clkr
,
3237 [CAMSS_PHY2_CSI2PHYTIMER_CLK
] = &camss_phy2_csi2phytimer_clk
.clkr
,
3238 [CAMSS_TOP_AHB_CLK
] = &camss_top_ahb_clk
.clkr
,
3239 [CAMSS_VFE_CPP_AHB_CLK
] = &camss_vfe_cpp_ahb_clk
.clkr
,
3240 [CAMSS_VFE_CPP_CLK
] = &camss_vfe_cpp_clk
.clkr
,
3241 [CAMSS_VFE_VFE0_CLK
] = &camss_vfe_vfe0_clk
.clkr
,
3242 [CAMSS_VFE_VFE1_CLK
] = &camss_vfe_vfe1_clk
.clkr
,
3243 [CAMSS_VFE_VFE_AHB_CLK
] = &camss_vfe_vfe_ahb_clk
.clkr
,
3244 [CAMSS_VFE_VFE_AXI_CLK
] = &camss_vfe_vfe_axi_clk
.clkr
,
3245 [MDSS_AHB_CLK
] = &mdss_ahb_clk
.clkr
,
3246 [MDSS_AXI_CLK
] = &mdss_axi_clk
.clkr
,
3247 [MDSS_BYTE0_CLK
] = &mdss_byte0_clk
.clkr
,
3248 [MDSS_BYTE1_CLK
] = &mdss_byte1_clk
.clkr
,
3249 [MDSS_EDPAUX_CLK
] = &mdss_edpaux_clk
.clkr
,
3250 [MDSS_EDPLINK_CLK
] = &mdss_edplink_clk
.clkr
,
3251 [MDSS_EDPPIXEL_CLK
] = &mdss_edppixel_clk
.clkr
,
3252 [MDSS_ESC0_CLK
] = &mdss_esc0_clk
.clkr
,
3253 [MDSS_ESC1_CLK
] = &mdss_esc1_clk
.clkr
,
3254 [MDSS_EXTPCLK_CLK
] = &mdss_extpclk_clk
.clkr
,
3255 [MDSS_HDMI_AHB_CLK
] = &mdss_hdmi_ahb_clk
.clkr
,
3256 [MDSS_HDMI_CLK
] = &mdss_hdmi_clk
.clkr
,
3257 [MDSS_MDP_CLK
] = &mdss_mdp_clk
.clkr
,
3258 [MDSS_MDP_LUT_CLK
] = &mdss_mdp_lut_clk
.clkr
,
3259 [MDSS_PCLK0_CLK
] = &mdss_pclk0_clk
.clkr
,
3260 [MDSS_PCLK1_CLK
] = &mdss_pclk1_clk
.clkr
,
3261 [MDSS_VSYNC_CLK
] = &mdss_vsync_clk
.clkr
,
3262 [MMSS_RBCPR_AHB_CLK
] = &mmss_rbcpr_ahb_clk
.clkr
,
3263 [MMSS_RBCPR_CLK
] = &mmss_rbcpr_clk
.clkr
,
3264 [MMSS_SPDM_AHB_CLK
] = &mmss_spdm_ahb_clk
.clkr
,
3265 [MMSS_SPDM_AXI_CLK
] = &mmss_spdm_axi_clk
.clkr
,
3266 [MMSS_SPDM_CSI0_CLK
] = &mmss_spdm_csi0_clk
.clkr
,
3267 [MMSS_SPDM_GFX3D_CLK
] = &mmss_spdm_gfx3d_clk
.clkr
,
3268 [MMSS_SPDM_JPEG0_CLK
] = &mmss_spdm_jpeg0_clk
.clkr
,
3269 [MMSS_SPDM_JPEG1_CLK
] = &mmss_spdm_jpeg1_clk
.clkr
,
3270 [MMSS_SPDM_JPEG2_CLK
] = &mmss_spdm_jpeg2_clk
.clkr
,
3271 [MMSS_SPDM_MDP_CLK
] = &mmss_spdm_mdp_clk
.clkr
,
3272 [MMSS_SPDM_PCLK0_CLK
] = &mmss_spdm_pclk0_clk
.clkr
,
3273 [MMSS_SPDM_PCLK1_CLK
] = &mmss_spdm_pclk1_clk
.clkr
,
3274 [MMSS_SPDM_VCODEC0_CLK
] = &mmss_spdm_vcodec0_clk
.clkr
,
3275 [MMSS_SPDM_VFE0_CLK
] = &mmss_spdm_vfe0_clk
.clkr
,
3276 [MMSS_SPDM_VFE1_CLK
] = &mmss_spdm_vfe1_clk
.clkr
,
3277 [MMSS_SPDM_RM_AXI_CLK
] = &mmss_spdm_rm_axi_clk
.clkr
,
3278 [MMSS_SPDM_RM_OCMEMNOC_CLK
] = &mmss_spdm_rm_ocmemnoc_clk
.clkr
,
3279 [MMSS_MISC_AHB_CLK
] = &mmss_misc_ahb_clk
.clkr
,
3280 [MMSS_MMSSNOC_AHB_CLK
] = &mmss_mmssnoc_ahb_clk
.clkr
,
3281 [MMSS_MMSSNOC_BTO_AHB_CLK
] = &mmss_mmssnoc_bto_ahb_clk
.clkr
,
3282 [MMSS_MMSSNOC_AXI_CLK
] = &mmss_mmssnoc_axi_clk
.clkr
,
3283 [MMSS_S0_AXI_CLK
] = &mmss_s0_axi_clk
.clkr
,
3284 [OCMEMCX_AHB_CLK
] = &ocmemcx_ahb_clk
.clkr
,
3285 [OCMEMCX_OCMEMNOC_CLK
] = &ocmemcx_ocmemnoc_clk
.clkr
,
3286 [OXILI_OCMEMGX_CLK
] = &oxili_ocmemgx_clk
.clkr
,
3287 [OXILI_GFX3D_CLK
] = &oxili_gfx3d_clk
.clkr
,
3288 [OXILI_RBBMTIMER_CLK
] = &oxili_rbbmtimer_clk
.clkr
,
3289 [OXILICX_AHB_CLK
] = &oxilicx_ahb_clk
.clkr
,
3290 [VENUS0_AHB_CLK
] = &venus0_ahb_clk
.clkr
,
3291 [VENUS0_AXI_CLK
] = &venus0_axi_clk
.clkr
,
3292 [VENUS0_CORE0_VCODEC_CLK
] = &venus0_core0_vcodec_clk
.clkr
,
3293 [VENUS0_CORE1_VCODEC_CLK
] = &venus0_core1_vcodec_clk
.clkr
,
3294 [VENUS0_OCMEMNOC_CLK
] = &venus0_ocmemnoc_clk
.clkr
,
3295 [VENUS0_VCODEC0_CLK
] = &venus0_vcodec0_clk
.clkr
,
3296 [VPU_AHB_CLK
] = &vpu_ahb_clk
.clkr
,
3297 [VPU_AXI_CLK
] = &vpu_axi_clk
.clkr
,
3298 [VPU_BUS_CLK
] = &vpu_bus_clk
.clkr
,
3299 [VPU_CXO_CLK
] = &vpu_cxo_clk
.clkr
,
3300 [VPU_MAPLE_CLK
] = &vpu_maple_clk
.clkr
,
3301 [VPU_SLEEP_CLK
] = &vpu_sleep_clk
.clkr
,
3302 [VPU_VDP_CLK
] = &vpu_vdp_clk
.clkr
,
3305 static const struct qcom_reset_map mmcc_apq8084_resets
[] = {
3306 [MMSS_SPDM_RESET
] = { 0x0200 },
3307 [MMSS_SPDM_RM_RESET
] = { 0x0300 },
3308 [VENUS0_RESET
] = { 0x1020 },
3309 [VPU_RESET
] = { 0x1400 },
3310 [MDSS_RESET
] = { 0x2300 },
3311 [AVSYNC_RESET
] = { 0x2400 },
3312 [CAMSS_PHY0_RESET
] = { 0x3020 },
3313 [CAMSS_PHY1_RESET
] = { 0x3050 },
3314 [CAMSS_PHY2_RESET
] = { 0x3080 },
3315 [CAMSS_CSI0_RESET
] = { 0x30b0 },
3316 [CAMSS_CSI0PHY_RESET
] = { 0x30c0 },
3317 [CAMSS_CSI0RDI_RESET
] = { 0x30d0 },
3318 [CAMSS_CSI0PIX_RESET
] = { 0x30e0 },
3319 [CAMSS_CSI1_RESET
] = { 0x3120 },
3320 [CAMSS_CSI1PHY_RESET
] = { 0x3130 },
3321 [CAMSS_CSI1RDI_RESET
] = { 0x3140 },
3322 [CAMSS_CSI1PIX_RESET
] = { 0x3150 },
3323 [CAMSS_CSI2_RESET
] = { 0x3180 },
3324 [CAMSS_CSI2PHY_RESET
] = { 0x3190 },
3325 [CAMSS_CSI2RDI_RESET
] = { 0x31a0 },
3326 [CAMSS_CSI2PIX_RESET
] = { 0x31b0 },
3327 [CAMSS_CSI3_RESET
] = { 0x31e0 },
3328 [CAMSS_CSI3PHY_RESET
] = { 0x31f0 },
3329 [CAMSS_CSI3RDI_RESET
] = { 0x3200 },
3330 [CAMSS_CSI3PIX_RESET
] = { 0x3210 },
3331 [CAMSS_ISPIF_RESET
] = { 0x3220 },
3332 [CAMSS_CCI_RESET
] = { 0x3340 },
3333 [CAMSS_MCLK0_RESET
] = { 0x3380 },
3334 [CAMSS_MCLK1_RESET
] = { 0x33b0 },
3335 [CAMSS_MCLK2_RESET
] = { 0x33e0 },
3336 [CAMSS_MCLK3_RESET
] = { 0x3410 },
3337 [CAMSS_GP0_RESET
] = { 0x3440 },
3338 [CAMSS_GP1_RESET
] = { 0x3470 },
3339 [CAMSS_TOP_RESET
] = { 0x3480 },
3340 [CAMSS_AHB_RESET
] = { 0x3488 },
3341 [CAMSS_MICRO_RESET
] = { 0x3490 },
3342 [CAMSS_JPEG_RESET
] = { 0x35a0 },
3343 [CAMSS_VFE_RESET
] = { 0x36a0 },
3344 [CAMSS_CSI_VFE0_RESET
] = { 0x3700 },
3345 [CAMSS_CSI_VFE1_RESET
] = { 0x3710 },
3346 [OXILI_RESET
] = { 0x4020 },
3347 [OXILICX_RESET
] = { 0x4030 },
3348 [OCMEMCX_RESET
] = { 0x4050 },
3349 [MMSS_RBCRP_RESET
] = { 0x4080 },
3350 [MMSSNOCAHB_RESET
] = { 0x5020 },
3351 [MMSSNOCAXI_RESET
] = { 0x5060 },
3354 static struct gdsc
*mmcc_apq8084_gdscs
[] = {
3355 [VENUS0_GDSC
] = &venus0_gdsc
,
3356 [VENUS0_CORE0_GDSC
] = &venus0_core0_gdsc
,
3357 [VENUS0_CORE1_GDSC
] = &venus0_core1_gdsc
,
3358 [MDSS_GDSC
] = &mdss_gdsc
,
3359 [CAMSS_JPEG_GDSC
] = &camss_jpeg_gdsc
,
3360 [CAMSS_VFE_GDSC
] = &camss_vfe_gdsc
,
3361 [OXILI_GDSC
] = &oxili_gdsc
,
3362 [OXILICX_GDSC
] = &oxilicx_gdsc
,
3365 static const struct regmap_config mmcc_apq8084_regmap_config
= {
3369 .max_register
= 0x5104,
3373 static const struct qcom_cc_desc mmcc_apq8084_desc
= {
3374 .config
= &mmcc_apq8084_regmap_config
,
3375 .clks
= mmcc_apq8084_clocks
,
3376 .num_clks
= ARRAY_SIZE(mmcc_apq8084_clocks
),
3377 .resets
= mmcc_apq8084_resets
,
3378 .num_resets
= ARRAY_SIZE(mmcc_apq8084_resets
),
3379 .gdscs
= mmcc_apq8084_gdscs
,
3380 .num_gdscs
= ARRAY_SIZE(mmcc_apq8084_gdscs
),
3383 static const struct of_device_id mmcc_apq8084_match_table
[] = {
3384 { .compatible
= "qcom,mmcc-apq8084" },
3387 MODULE_DEVICE_TABLE(of
, mmcc_apq8084_match_table
);
3389 static int mmcc_apq8084_probe(struct platform_device
*pdev
)
3392 struct regmap
*regmap
;
3394 ret
= qcom_cc_probe(pdev
, &mmcc_apq8084_desc
);
3398 regmap
= dev_get_regmap(&pdev
->dev
, NULL
);
3399 clk_pll_configure_sr_hpm_lp(&mmpll1
, regmap
, &mmpll1_config
, true);
3400 clk_pll_configure_sr_hpm_lp(&mmpll3
, regmap
, &mmpll3_config
, false);
3405 static struct platform_driver mmcc_apq8084_driver
= {
3406 .probe
= mmcc_apq8084_probe
,
3408 .name
= "mmcc-apq8084",
3409 .of_match_table
= mmcc_apq8084_match_table
,
3412 module_platform_driver(mmcc_apq8084_driver
);
3414 MODULE_DESCRIPTION("QCOM MMCC APQ8084 Driver");
3415 MODULE_LICENSE("GPL v2");
3416 MODULE_ALIAS("platform:mmcc-apq8084");