1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
6 #include <linux/kernel.h>
7 #include <linux/bitops.h>
9 #include <linux/platform_device.h>
10 #include <linux/module.h>
12 #include <linux/of_device.h>
13 #include <linux/clk-provider.h>
14 #include <linux/regmap.h>
15 #include <linux/reset-controller.h>
17 #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
18 #include <dt-bindings/reset/qcom,mmcc-msm8974.h>
21 #include "clk-regmap.h"
24 #include "clk-branch.h"
45 static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map
[] = {
52 static const char * const mmcc_xo_mmpll0_mmpll1_gpll0
[] = {
59 static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
[] = {
68 static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0
[] = {
77 static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map
[] = {
85 static const char * const mmcc_xo_mmpll0_1_2_gpll0
[] = {
93 static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map
[] = {
101 static const char * const mmcc_xo_mmpll0_1_3_gpll0
[] = {
109 static const struct parent_map mmcc_xo_mmpll0_1_gpll1_0_map
[] = {
117 static const char * const mmcc_xo_mmpll0_1_gpll1_0
[] = {
125 static const struct parent_map mmcc_xo_dsi_hdmi_edp_map
[] = {
134 static const char * const mmcc_xo_dsi_hdmi_edp
[] = {
143 static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map
[] = {
152 static const char * const mmcc_xo_dsi_hdmi_edp_gpll0
[] = {
161 static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map
[] = {
166 { P_DSI0PLL_BYTE
, 1 },
167 { P_DSI1PLL_BYTE
, 2 }
170 static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0
[] = {
179 static struct clk_pll mmpll0
= {
183 .config_reg
= 0x0014,
185 .status_reg
= 0x001c,
187 .clkr
.hw
.init
= &(struct clk_init_data
){
189 .parent_names
= (const char *[]){ "xo" },
195 static struct clk_regmap mmpll0_vote
= {
196 .enable_reg
= 0x0100,
197 .enable_mask
= BIT(0),
198 .hw
.init
= &(struct clk_init_data
){
199 .name
= "mmpll0_vote",
200 .parent_names
= (const char *[]){ "mmpll0" },
202 .ops
= &clk_pll_vote_ops
,
206 static struct clk_pll mmpll1
= {
210 .config_reg
= 0x0050,
212 .status_reg
= 0x005c,
214 .clkr
.hw
.init
= &(struct clk_init_data
){
216 .parent_names
= (const char *[]){ "xo" },
222 static struct clk_regmap mmpll1_vote
= {
223 .enable_reg
= 0x0100,
224 .enable_mask
= BIT(1),
225 .hw
.init
= &(struct clk_init_data
){
226 .name
= "mmpll1_vote",
227 .parent_names
= (const char *[]){ "mmpll1" },
229 .ops
= &clk_pll_vote_ops
,
233 static struct clk_pll mmpll2
= {
237 .config_reg
= 0x4110,
239 .status_reg
= 0x411c,
240 .clkr
.hw
.init
= &(struct clk_init_data
){
242 .parent_names
= (const char *[]){ "xo" },
248 static struct clk_pll mmpll3
= {
252 .config_reg
= 0x0090,
254 .status_reg
= 0x009c,
256 .clkr
.hw
.init
= &(struct clk_init_data
){
258 .parent_names
= (const char *[]){ "xo" },
264 static struct clk_rcg2 mmss_ahb_clk_src
= {
267 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
268 .clkr
.hw
.init
= &(struct clk_init_data
){
269 .name
= "mmss_ahb_clk_src",
270 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
272 .ops
= &clk_rcg2_ops
,
276 static struct freq_tbl ftbl_mmss_axi_clk
[] = {
277 F( 19200000, P_XO
, 1, 0, 0),
278 F( 37500000, P_GPLL0
, 16, 0, 0),
279 F( 50000000, P_GPLL0
, 12, 0, 0),
280 F( 75000000, P_GPLL0
, 8, 0, 0),
281 F(100000000, P_GPLL0
, 6, 0, 0),
282 F(150000000, P_GPLL0
, 4, 0, 0),
283 F(291750000, P_MMPLL1
, 4, 0, 0),
284 F(400000000, P_MMPLL0
, 2, 0, 0),
285 F(466800000, P_MMPLL1
, 2.5, 0, 0),
288 static struct clk_rcg2 mmss_axi_clk_src
= {
291 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
292 .freq_tbl
= ftbl_mmss_axi_clk
,
293 .clkr
.hw
.init
= &(struct clk_init_data
){
294 .name
= "mmss_axi_clk_src",
295 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
297 .ops
= &clk_rcg2_ops
,
301 static struct freq_tbl ftbl_ocmemnoc_clk
[] = {
302 F( 19200000, P_XO
, 1, 0, 0),
303 F( 37500000, P_GPLL0
, 16, 0, 0),
304 F( 50000000, P_GPLL0
, 12, 0, 0),
305 F( 75000000, P_GPLL0
, 8, 0, 0),
306 F(100000000, P_GPLL0
, 6, 0, 0),
307 F(150000000, P_GPLL0
, 4, 0, 0),
308 F(291750000, P_MMPLL1
, 4, 0, 0),
309 F(400000000, P_MMPLL0
, 2, 0, 0),
312 static struct clk_rcg2 ocmemnoc_clk_src
= {
315 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
316 .freq_tbl
= ftbl_ocmemnoc_clk
,
317 .clkr
.hw
.init
= &(struct clk_init_data
){
318 .name
= "ocmemnoc_clk_src",
319 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
321 .ops
= &clk_rcg2_ops
,
325 static struct freq_tbl ftbl_camss_csi0_3_clk
[] = {
326 F(100000000, P_GPLL0
, 6, 0, 0),
327 F(200000000, P_MMPLL0
, 4, 0, 0),
331 static struct clk_rcg2 csi0_clk_src
= {
334 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
335 .freq_tbl
= ftbl_camss_csi0_3_clk
,
336 .clkr
.hw
.init
= &(struct clk_init_data
){
337 .name
= "csi0_clk_src",
338 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
340 .ops
= &clk_rcg2_ops
,
344 static struct clk_rcg2 csi1_clk_src
= {
347 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
348 .freq_tbl
= ftbl_camss_csi0_3_clk
,
349 .clkr
.hw
.init
= &(struct clk_init_data
){
350 .name
= "csi1_clk_src",
351 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
353 .ops
= &clk_rcg2_ops
,
357 static struct clk_rcg2 csi2_clk_src
= {
360 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
361 .freq_tbl
= ftbl_camss_csi0_3_clk
,
362 .clkr
.hw
.init
= &(struct clk_init_data
){
363 .name
= "csi2_clk_src",
364 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
366 .ops
= &clk_rcg2_ops
,
370 static struct clk_rcg2 csi3_clk_src
= {
373 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
374 .freq_tbl
= ftbl_camss_csi0_3_clk
,
375 .clkr
.hw
.init
= &(struct clk_init_data
){
376 .name
= "csi3_clk_src",
377 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
379 .ops
= &clk_rcg2_ops
,
383 static struct freq_tbl ftbl_camss_vfe_vfe0_1_clk
[] = {
384 F(37500000, P_GPLL0
, 16, 0, 0),
385 F(50000000, P_GPLL0
, 12, 0, 0),
386 F(60000000, P_GPLL0
, 10, 0, 0),
387 F(80000000, P_GPLL0
, 7.5, 0, 0),
388 F(100000000, P_GPLL0
, 6, 0, 0),
389 F(109090000, P_GPLL0
, 5.5, 0, 0),
390 F(133330000, P_GPLL0
, 4.5, 0, 0),
391 F(200000000, P_GPLL0
, 3, 0, 0),
392 F(228570000, P_MMPLL0
, 3.5, 0, 0),
393 F(266670000, P_MMPLL0
, 3, 0, 0),
394 F(320000000, P_MMPLL0
, 2.5, 0, 0),
395 F(400000000, P_MMPLL0
, 2, 0, 0),
396 F(465000000, P_MMPLL3
, 2, 0, 0),
400 static struct clk_rcg2 vfe0_clk_src
= {
403 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
404 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
405 .clkr
.hw
.init
= &(struct clk_init_data
){
406 .name
= "vfe0_clk_src",
407 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
409 .ops
= &clk_rcg2_ops
,
413 static struct clk_rcg2 vfe1_clk_src
= {
416 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
417 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
418 .clkr
.hw
.init
= &(struct clk_init_data
){
419 .name
= "vfe1_clk_src",
420 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
422 .ops
= &clk_rcg2_ops
,
426 static struct freq_tbl ftbl_mdss_mdp_clk
[] = {
427 F(37500000, P_GPLL0
, 16, 0, 0),
428 F(60000000, P_GPLL0
, 10, 0, 0),
429 F(75000000, P_GPLL0
, 8, 0, 0),
430 F(85710000, P_GPLL0
, 7, 0, 0),
431 F(100000000, P_GPLL0
, 6, 0, 0),
432 F(133330000, P_MMPLL0
, 6, 0, 0),
433 F(160000000, P_MMPLL0
, 5, 0, 0),
434 F(200000000, P_MMPLL0
, 4, 0, 0),
435 F(228570000, P_MMPLL0
, 3.5, 0, 0),
436 F(240000000, P_GPLL0
, 2.5, 0, 0),
437 F(266670000, P_MMPLL0
, 3, 0, 0),
438 F(320000000, P_MMPLL0
, 2.5, 0, 0),
442 static struct clk_rcg2 mdp_clk_src
= {
445 .parent_map
= mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
,
446 .freq_tbl
= ftbl_mdss_mdp_clk
,
447 .clkr
.hw
.init
= &(struct clk_init_data
){
448 .name
= "mdp_clk_src",
449 .parent_names
= mmcc_xo_mmpll0_dsi_hdmi_gpll0
,
451 .ops
= &clk_rcg2_ops
,
455 static struct clk_rcg2 gfx3d_clk_src
= {
458 .parent_map
= mmcc_xo_mmpll0_1_2_gpll0_map
,
459 .clkr
.hw
.init
= &(struct clk_init_data
){
460 .name
= "gfx3d_clk_src",
461 .parent_names
= mmcc_xo_mmpll0_1_2_gpll0
,
463 .ops
= &clk_rcg2_ops
,
467 static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk
[] = {
468 F(75000000, P_GPLL0
, 8, 0, 0),
469 F(133330000, P_GPLL0
, 4.5, 0, 0),
470 F(200000000, P_GPLL0
, 3, 0, 0),
471 F(228570000, P_MMPLL0
, 3.5, 0, 0),
472 F(266670000, P_MMPLL0
, 3, 0, 0),
473 F(320000000, P_MMPLL0
, 2.5, 0, 0),
477 static struct clk_rcg2 jpeg0_clk_src
= {
480 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
481 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
482 .clkr
.hw
.init
= &(struct clk_init_data
){
483 .name
= "jpeg0_clk_src",
484 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
486 .ops
= &clk_rcg2_ops
,
490 static struct clk_rcg2 jpeg1_clk_src
= {
493 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
494 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
495 .clkr
.hw
.init
= &(struct clk_init_data
){
496 .name
= "jpeg1_clk_src",
497 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
499 .ops
= &clk_rcg2_ops
,
503 static struct clk_rcg2 jpeg2_clk_src
= {
506 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
507 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
508 .clkr
.hw
.init
= &(struct clk_init_data
){
509 .name
= "jpeg2_clk_src",
510 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
512 .ops
= &clk_rcg2_ops
,
516 static struct clk_rcg2 pclk0_clk_src
= {
520 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
521 .clkr
.hw
.init
= &(struct clk_init_data
){
522 .name
= "pclk0_clk_src",
523 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
525 .ops
= &clk_pixel_ops
,
526 .flags
= CLK_SET_RATE_PARENT
,
530 static struct clk_rcg2 pclk1_clk_src
= {
534 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
535 .clkr
.hw
.init
= &(struct clk_init_data
){
536 .name
= "pclk1_clk_src",
537 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
539 .ops
= &clk_pixel_ops
,
540 .flags
= CLK_SET_RATE_PARENT
,
544 static struct freq_tbl ftbl_venus0_vcodec0_clk
[] = {
545 F(50000000, P_GPLL0
, 12, 0, 0),
546 F(100000000, P_GPLL0
, 6, 0, 0),
547 F(133330000, P_MMPLL0
, 6, 0, 0),
548 F(200000000, P_MMPLL0
, 4, 0, 0),
549 F(266670000, P_MMPLL0
, 3, 0, 0),
550 F(465000000, P_MMPLL3
, 2, 0, 0),
554 static struct clk_rcg2 vcodec0_clk_src
= {
558 .parent_map
= mmcc_xo_mmpll0_1_3_gpll0_map
,
559 .freq_tbl
= ftbl_venus0_vcodec0_clk
,
560 .clkr
.hw
.init
= &(struct clk_init_data
){
561 .name
= "vcodec0_clk_src",
562 .parent_names
= mmcc_xo_mmpll0_1_3_gpll0
,
564 .ops
= &clk_rcg2_ops
,
568 static struct freq_tbl ftbl_camss_cci_cci_clk
[] = {
569 F(19200000, P_XO
, 1, 0, 0),
573 static struct clk_rcg2 cci_clk_src
= {
576 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
577 .freq_tbl
= ftbl_camss_cci_cci_clk
,
578 .clkr
.hw
.init
= &(struct clk_init_data
){
579 .name
= "cci_clk_src",
580 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
582 .ops
= &clk_rcg2_ops
,
586 static struct freq_tbl ftbl_camss_gp0_1_clk
[] = {
587 F(10000, P_XO
, 16, 1, 120),
588 F(24000, P_XO
, 16, 1, 50),
589 F(6000000, P_GPLL0
, 10, 1, 10),
590 F(12000000, P_GPLL0
, 10, 1, 5),
591 F(13000000, P_GPLL0
, 4, 13, 150),
592 F(24000000, P_GPLL0
, 5, 1, 5),
596 static struct clk_rcg2 camss_gp0_clk_src
= {
600 .parent_map
= mmcc_xo_mmpll0_1_gpll1_0_map
,
601 .freq_tbl
= ftbl_camss_gp0_1_clk
,
602 .clkr
.hw
.init
= &(struct clk_init_data
){
603 .name
= "camss_gp0_clk_src",
604 .parent_names
= mmcc_xo_mmpll0_1_gpll1_0
,
606 .ops
= &clk_rcg2_ops
,
610 static struct clk_rcg2 camss_gp1_clk_src
= {
614 .parent_map
= mmcc_xo_mmpll0_1_gpll1_0_map
,
615 .freq_tbl
= ftbl_camss_gp0_1_clk
,
616 .clkr
.hw
.init
= &(struct clk_init_data
){
617 .name
= "camss_gp1_clk_src",
618 .parent_names
= mmcc_xo_mmpll0_1_gpll1_0
,
620 .ops
= &clk_rcg2_ops
,
624 static struct freq_tbl ftbl_camss_mclk0_3_clk
[] = {
625 F(4800000, P_XO
, 4, 0, 0),
626 F(6000000, P_GPLL0
, 10, 1, 10),
627 F(8000000, P_GPLL0
, 15, 1, 5),
628 F(9600000, P_XO
, 2, 0, 0),
629 F(16000000, P_GPLL0
, 12.5, 1, 3),
630 F(19200000, P_XO
, 1, 0, 0),
631 F(24000000, P_GPLL0
, 5, 1, 5),
632 F(32000000, P_MMPLL0
, 5, 1, 5),
633 F(48000000, P_GPLL0
, 12.5, 0, 0),
634 F(64000000, P_MMPLL0
, 12.5, 0, 0),
635 F(66670000, P_GPLL0
, 9, 0, 0),
639 static struct clk_rcg2 mclk0_clk_src
= {
642 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
643 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
644 .clkr
.hw
.init
= &(struct clk_init_data
){
645 .name
= "mclk0_clk_src",
646 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
648 .ops
= &clk_rcg2_ops
,
652 static struct clk_rcg2 mclk1_clk_src
= {
655 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
656 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
657 .clkr
.hw
.init
= &(struct clk_init_data
){
658 .name
= "mclk1_clk_src",
659 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
661 .ops
= &clk_rcg2_ops
,
665 static struct clk_rcg2 mclk2_clk_src
= {
668 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
669 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
670 .clkr
.hw
.init
= &(struct clk_init_data
){
671 .name
= "mclk2_clk_src",
672 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
674 .ops
= &clk_rcg2_ops
,
678 static struct clk_rcg2 mclk3_clk_src
= {
681 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
682 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
683 .clkr
.hw
.init
= &(struct clk_init_data
){
684 .name
= "mclk3_clk_src",
685 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
687 .ops
= &clk_rcg2_ops
,
691 static struct freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk
[] = {
692 F(100000000, P_GPLL0
, 6, 0, 0),
693 F(200000000, P_MMPLL0
, 4, 0, 0),
697 static struct clk_rcg2 csi0phytimer_clk_src
= {
700 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
701 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
702 .clkr
.hw
.init
= &(struct clk_init_data
){
703 .name
= "csi0phytimer_clk_src",
704 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
706 .ops
= &clk_rcg2_ops
,
710 static struct clk_rcg2 csi1phytimer_clk_src
= {
713 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
714 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
715 .clkr
.hw
.init
= &(struct clk_init_data
){
716 .name
= "csi1phytimer_clk_src",
717 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
719 .ops
= &clk_rcg2_ops
,
723 static struct clk_rcg2 csi2phytimer_clk_src
= {
726 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
727 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
728 .clkr
.hw
.init
= &(struct clk_init_data
){
729 .name
= "csi2phytimer_clk_src",
730 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
732 .ops
= &clk_rcg2_ops
,
736 static struct freq_tbl ftbl_camss_vfe_cpp_clk
[] = {
737 F(133330000, P_GPLL0
, 4.5, 0, 0),
738 F(266670000, P_MMPLL0
, 3, 0, 0),
739 F(320000000, P_MMPLL0
, 2.5, 0, 0),
740 F(400000000, P_MMPLL0
, 2, 0, 0),
741 F(465000000, P_MMPLL3
, 2, 0, 0),
745 static struct clk_rcg2 cpp_clk_src
= {
748 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
749 .freq_tbl
= ftbl_camss_vfe_cpp_clk
,
750 .clkr
.hw
.init
= &(struct clk_init_data
){
751 .name
= "cpp_clk_src",
752 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
754 .ops
= &clk_rcg2_ops
,
758 static struct freq_tbl byte_freq_tbl
[] = {
759 { .src
= P_DSI0PLL_BYTE
},
763 static struct clk_rcg2 byte0_clk_src
= {
766 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
767 .freq_tbl
= byte_freq_tbl
,
768 .clkr
.hw
.init
= &(struct clk_init_data
){
769 .name
= "byte0_clk_src",
770 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
772 .ops
= &clk_byte2_ops
,
773 .flags
= CLK_SET_RATE_PARENT
,
777 static struct clk_rcg2 byte1_clk_src
= {
780 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
781 .freq_tbl
= byte_freq_tbl
,
782 .clkr
.hw
.init
= &(struct clk_init_data
){
783 .name
= "byte1_clk_src",
784 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
786 .ops
= &clk_byte2_ops
,
787 .flags
= CLK_SET_RATE_PARENT
,
791 static struct freq_tbl ftbl_mdss_edpaux_clk
[] = {
792 F(19200000, P_XO
, 1, 0, 0),
796 static struct clk_rcg2 edpaux_clk_src
= {
799 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
800 .freq_tbl
= ftbl_mdss_edpaux_clk
,
801 .clkr
.hw
.init
= &(struct clk_init_data
){
802 .name
= "edpaux_clk_src",
803 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
805 .ops
= &clk_rcg2_ops
,
809 static struct freq_tbl ftbl_mdss_edplink_clk
[] = {
810 F(135000000, P_EDPLINK
, 2, 0, 0),
811 F(270000000, P_EDPLINK
, 11, 0, 0),
815 static struct clk_rcg2 edplink_clk_src
= {
818 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
819 .freq_tbl
= ftbl_mdss_edplink_clk
,
820 .clkr
.hw
.init
= &(struct clk_init_data
){
821 .name
= "edplink_clk_src",
822 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
824 .ops
= &clk_rcg2_ops
,
825 .flags
= CLK_SET_RATE_PARENT
,
829 static struct freq_tbl edp_pixel_freq_tbl
[] = {
834 static struct clk_rcg2 edppixel_clk_src
= {
838 .parent_map
= mmcc_xo_dsi_hdmi_edp_map
,
839 .freq_tbl
= edp_pixel_freq_tbl
,
840 .clkr
.hw
.init
= &(struct clk_init_data
){
841 .name
= "edppixel_clk_src",
842 .parent_names
= mmcc_xo_dsi_hdmi_edp
,
844 .ops
= &clk_edp_pixel_ops
,
848 static struct freq_tbl ftbl_mdss_esc0_1_clk
[] = {
849 F(19200000, P_XO
, 1, 0, 0),
853 static struct clk_rcg2 esc0_clk_src
= {
856 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
857 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
858 .clkr
.hw
.init
= &(struct clk_init_data
){
859 .name
= "esc0_clk_src",
860 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
862 .ops
= &clk_rcg2_ops
,
866 static struct clk_rcg2 esc1_clk_src
= {
869 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
870 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
871 .clkr
.hw
.init
= &(struct clk_init_data
){
872 .name
= "esc1_clk_src",
873 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
875 .ops
= &clk_rcg2_ops
,
879 static struct freq_tbl extpclk_freq_tbl
[] = {
880 { .src
= P_HDMIPLL
},
884 static struct clk_rcg2 extpclk_clk_src
= {
887 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
888 .freq_tbl
= extpclk_freq_tbl
,
889 .clkr
.hw
.init
= &(struct clk_init_data
){
890 .name
= "extpclk_clk_src",
891 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
893 .ops
= &clk_byte_ops
,
894 .flags
= CLK_SET_RATE_PARENT
,
898 static struct freq_tbl ftbl_mdss_hdmi_clk
[] = {
899 F(19200000, P_XO
, 1, 0, 0),
903 static struct clk_rcg2 hdmi_clk_src
= {
906 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
907 .freq_tbl
= ftbl_mdss_hdmi_clk
,
908 .clkr
.hw
.init
= &(struct clk_init_data
){
909 .name
= "hdmi_clk_src",
910 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
912 .ops
= &clk_rcg2_ops
,
916 static struct freq_tbl ftbl_mdss_vsync_clk
[] = {
917 F(19200000, P_XO
, 1, 0, 0),
921 static struct clk_rcg2 vsync_clk_src
= {
924 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
925 .freq_tbl
= ftbl_mdss_vsync_clk
,
926 .clkr
.hw
.init
= &(struct clk_init_data
){
927 .name
= "vsync_clk_src",
928 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
930 .ops
= &clk_rcg2_ops
,
934 static struct clk_branch camss_cci_cci_ahb_clk
= {
937 .enable_reg
= 0x3348,
938 .enable_mask
= BIT(0),
939 .hw
.init
= &(struct clk_init_data
){
940 .name
= "camss_cci_cci_ahb_clk",
941 .parent_names
= (const char *[]){
945 .ops
= &clk_branch2_ops
,
950 static struct clk_branch camss_cci_cci_clk
= {
953 .enable_reg
= 0x3344,
954 .enable_mask
= BIT(0),
955 .hw
.init
= &(struct clk_init_data
){
956 .name
= "camss_cci_cci_clk",
957 .parent_names
= (const char *[]){
961 .flags
= CLK_SET_RATE_PARENT
,
962 .ops
= &clk_branch2_ops
,
967 static struct clk_branch camss_csi0_ahb_clk
= {
970 .enable_reg
= 0x30bc,
971 .enable_mask
= BIT(0),
972 .hw
.init
= &(struct clk_init_data
){
973 .name
= "camss_csi0_ahb_clk",
974 .parent_names
= (const char *[]){
978 .ops
= &clk_branch2_ops
,
983 static struct clk_branch camss_csi0_clk
= {
986 .enable_reg
= 0x30b4,
987 .enable_mask
= BIT(0),
988 .hw
.init
= &(struct clk_init_data
){
989 .name
= "camss_csi0_clk",
990 .parent_names
= (const char *[]){
994 .flags
= CLK_SET_RATE_PARENT
,
995 .ops
= &clk_branch2_ops
,
1000 static struct clk_branch camss_csi0phy_clk
= {
1003 .enable_reg
= 0x30c4,
1004 .enable_mask
= BIT(0),
1005 .hw
.init
= &(struct clk_init_data
){
1006 .name
= "camss_csi0phy_clk",
1007 .parent_names
= (const char *[]){
1011 .flags
= CLK_SET_RATE_PARENT
,
1012 .ops
= &clk_branch2_ops
,
1017 static struct clk_branch camss_csi0pix_clk
= {
1020 .enable_reg
= 0x30e4,
1021 .enable_mask
= BIT(0),
1022 .hw
.init
= &(struct clk_init_data
){
1023 .name
= "camss_csi0pix_clk",
1024 .parent_names
= (const char *[]){
1028 .flags
= CLK_SET_RATE_PARENT
,
1029 .ops
= &clk_branch2_ops
,
1034 static struct clk_branch camss_csi0rdi_clk
= {
1037 .enable_reg
= 0x30d4,
1038 .enable_mask
= BIT(0),
1039 .hw
.init
= &(struct clk_init_data
){
1040 .name
= "camss_csi0rdi_clk",
1041 .parent_names
= (const char *[]){
1045 .flags
= CLK_SET_RATE_PARENT
,
1046 .ops
= &clk_branch2_ops
,
1051 static struct clk_branch camss_csi1_ahb_clk
= {
1054 .enable_reg
= 0x3128,
1055 .enable_mask
= BIT(0),
1056 .hw
.init
= &(struct clk_init_data
){
1057 .name
= "camss_csi1_ahb_clk",
1058 .parent_names
= (const char *[]){
1062 .ops
= &clk_branch2_ops
,
1067 static struct clk_branch camss_csi1_clk
= {
1070 .enable_reg
= 0x3124,
1071 .enable_mask
= BIT(0),
1072 .hw
.init
= &(struct clk_init_data
){
1073 .name
= "camss_csi1_clk",
1074 .parent_names
= (const char *[]){
1078 .flags
= CLK_SET_RATE_PARENT
,
1079 .ops
= &clk_branch2_ops
,
1084 static struct clk_branch camss_csi1phy_clk
= {
1087 .enable_reg
= 0x3134,
1088 .enable_mask
= BIT(0),
1089 .hw
.init
= &(struct clk_init_data
){
1090 .name
= "camss_csi1phy_clk",
1091 .parent_names
= (const char *[]){
1095 .flags
= CLK_SET_RATE_PARENT
,
1096 .ops
= &clk_branch2_ops
,
1101 static struct clk_branch camss_csi1pix_clk
= {
1104 .enable_reg
= 0x3154,
1105 .enable_mask
= BIT(0),
1106 .hw
.init
= &(struct clk_init_data
){
1107 .name
= "camss_csi1pix_clk",
1108 .parent_names
= (const char *[]){
1112 .flags
= CLK_SET_RATE_PARENT
,
1113 .ops
= &clk_branch2_ops
,
1118 static struct clk_branch camss_csi1rdi_clk
= {
1121 .enable_reg
= 0x3144,
1122 .enable_mask
= BIT(0),
1123 .hw
.init
= &(struct clk_init_data
){
1124 .name
= "camss_csi1rdi_clk",
1125 .parent_names
= (const char *[]){
1129 .flags
= CLK_SET_RATE_PARENT
,
1130 .ops
= &clk_branch2_ops
,
1135 static struct clk_branch camss_csi2_ahb_clk
= {
1138 .enable_reg
= 0x3188,
1139 .enable_mask
= BIT(0),
1140 .hw
.init
= &(struct clk_init_data
){
1141 .name
= "camss_csi2_ahb_clk",
1142 .parent_names
= (const char *[]){
1146 .ops
= &clk_branch2_ops
,
1151 static struct clk_branch camss_csi2_clk
= {
1154 .enable_reg
= 0x3184,
1155 .enable_mask
= BIT(0),
1156 .hw
.init
= &(struct clk_init_data
){
1157 .name
= "camss_csi2_clk",
1158 .parent_names
= (const char *[]){
1162 .flags
= CLK_SET_RATE_PARENT
,
1163 .ops
= &clk_branch2_ops
,
1168 static struct clk_branch camss_csi2phy_clk
= {
1171 .enable_reg
= 0x3194,
1172 .enable_mask
= BIT(0),
1173 .hw
.init
= &(struct clk_init_data
){
1174 .name
= "camss_csi2phy_clk",
1175 .parent_names
= (const char *[]){
1179 .flags
= CLK_SET_RATE_PARENT
,
1180 .ops
= &clk_branch2_ops
,
1185 static struct clk_branch camss_csi2pix_clk
= {
1188 .enable_reg
= 0x31b4,
1189 .enable_mask
= BIT(0),
1190 .hw
.init
= &(struct clk_init_data
){
1191 .name
= "camss_csi2pix_clk",
1192 .parent_names
= (const char *[]){
1196 .flags
= CLK_SET_RATE_PARENT
,
1197 .ops
= &clk_branch2_ops
,
1202 static struct clk_branch camss_csi2rdi_clk
= {
1205 .enable_reg
= 0x31a4,
1206 .enable_mask
= BIT(0),
1207 .hw
.init
= &(struct clk_init_data
){
1208 .name
= "camss_csi2rdi_clk",
1209 .parent_names
= (const char *[]){
1213 .flags
= CLK_SET_RATE_PARENT
,
1214 .ops
= &clk_branch2_ops
,
1219 static struct clk_branch camss_csi3_ahb_clk
= {
1222 .enable_reg
= 0x31e8,
1223 .enable_mask
= BIT(0),
1224 .hw
.init
= &(struct clk_init_data
){
1225 .name
= "camss_csi3_ahb_clk",
1226 .parent_names
= (const char *[]){
1230 .ops
= &clk_branch2_ops
,
1235 static struct clk_branch camss_csi3_clk
= {
1238 .enable_reg
= 0x31e4,
1239 .enable_mask
= BIT(0),
1240 .hw
.init
= &(struct clk_init_data
){
1241 .name
= "camss_csi3_clk",
1242 .parent_names
= (const char *[]){
1246 .flags
= CLK_SET_RATE_PARENT
,
1247 .ops
= &clk_branch2_ops
,
1252 static struct clk_branch camss_csi3phy_clk
= {
1255 .enable_reg
= 0x31f4,
1256 .enable_mask
= BIT(0),
1257 .hw
.init
= &(struct clk_init_data
){
1258 .name
= "camss_csi3phy_clk",
1259 .parent_names
= (const char *[]){
1263 .flags
= CLK_SET_RATE_PARENT
,
1264 .ops
= &clk_branch2_ops
,
1269 static struct clk_branch camss_csi3pix_clk
= {
1272 .enable_reg
= 0x3214,
1273 .enable_mask
= BIT(0),
1274 .hw
.init
= &(struct clk_init_data
){
1275 .name
= "camss_csi3pix_clk",
1276 .parent_names
= (const char *[]){
1280 .flags
= CLK_SET_RATE_PARENT
,
1281 .ops
= &clk_branch2_ops
,
1286 static struct clk_branch camss_csi3rdi_clk
= {
1289 .enable_reg
= 0x3204,
1290 .enable_mask
= BIT(0),
1291 .hw
.init
= &(struct clk_init_data
){
1292 .name
= "camss_csi3rdi_clk",
1293 .parent_names
= (const char *[]){
1297 .flags
= CLK_SET_RATE_PARENT
,
1298 .ops
= &clk_branch2_ops
,
1303 static struct clk_branch camss_csi_vfe0_clk
= {
1306 .enable_reg
= 0x3704,
1307 .enable_mask
= BIT(0),
1308 .hw
.init
= &(struct clk_init_data
){
1309 .name
= "camss_csi_vfe0_clk",
1310 .parent_names
= (const char *[]){
1314 .flags
= CLK_SET_RATE_PARENT
,
1315 .ops
= &clk_branch2_ops
,
1320 static struct clk_branch camss_csi_vfe1_clk
= {
1323 .enable_reg
= 0x3714,
1324 .enable_mask
= BIT(0),
1325 .hw
.init
= &(struct clk_init_data
){
1326 .name
= "camss_csi_vfe1_clk",
1327 .parent_names
= (const char *[]){
1331 .flags
= CLK_SET_RATE_PARENT
,
1332 .ops
= &clk_branch2_ops
,
1337 static struct clk_branch camss_gp0_clk
= {
1340 .enable_reg
= 0x3444,
1341 .enable_mask
= BIT(0),
1342 .hw
.init
= &(struct clk_init_data
){
1343 .name
= "camss_gp0_clk",
1344 .parent_names
= (const char *[]){
1345 "camss_gp0_clk_src",
1348 .flags
= CLK_SET_RATE_PARENT
,
1349 .ops
= &clk_branch2_ops
,
1354 static struct clk_branch camss_gp1_clk
= {
1357 .enable_reg
= 0x3474,
1358 .enable_mask
= BIT(0),
1359 .hw
.init
= &(struct clk_init_data
){
1360 .name
= "camss_gp1_clk",
1361 .parent_names
= (const char *[]){
1362 "camss_gp1_clk_src",
1365 .flags
= CLK_SET_RATE_PARENT
,
1366 .ops
= &clk_branch2_ops
,
1371 static struct clk_branch camss_ispif_ahb_clk
= {
1374 .enable_reg
= 0x3224,
1375 .enable_mask
= BIT(0),
1376 .hw
.init
= &(struct clk_init_data
){
1377 .name
= "camss_ispif_ahb_clk",
1378 .parent_names
= (const char *[]){
1382 .ops
= &clk_branch2_ops
,
1387 static struct clk_branch camss_jpeg_jpeg0_clk
= {
1390 .enable_reg
= 0x35a8,
1391 .enable_mask
= BIT(0),
1392 .hw
.init
= &(struct clk_init_data
){
1393 .name
= "camss_jpeg_jpeg0_clk",
1394 .parent_names
= (const char *[]){
1398 .flags
= CLK_SET_RATE_PARENT
,
1399 .ops
= &clk_branch2_ops
,
1404 static struct clk_branch camss_jpeg_jpeg1_clk
= {
1407 .enable_reg
= 0x35ac,
1408 .enable_mask
= BIT(0),
1409 .hw
.init
= &(struct clk_init_data
){
1410 .name
= "camss_jpeg_jpeg1_clk",
1411 .parent_names
= (const char *[]){
1415 .flags
= CLK_SET_RATE_PARENT
,
1416 .ops
= &clk_branch2_ops
,
1421 static struct clk_branch camss_jpeg_jpeg2_clk
= {
1424 .enable_reg
= 0x35b0,
1425 .enable_mask
= BIT(0),
1426 .hw
.init
= &(struct clk_init_data
){
1427 .name
= "camss_jpeg_jpeg2_clk",
1428 .parent_names
= (const char *[]){
1432 .flags
= CLK_SET_RATE_PARENT
,
1433 .ops
= &clk_branch2_ops
,
1438 static struct clk_branch camss_jpeg_jpeg_ahb_clk
= {
1441 .enable_reg
= 0x35b4,
1442 .enable_mask
= BIT(0),
1443 .hw
.init
= &(struct clk_init_data
){
1444 .name
= "camss_jpeg_jpeg_ahb_clk",
1445 .parent_names
= (const char *[]){
1449 .ops
= &clk_branch2_ops
,
1454 static struct clk_branch camss_jpeg_jpeg_axi_clk
= {
1457 .enable_reg
= 0x35b8,
1458 .enable_mask
= BIT(0),
1459 .hw
.init
= &(struct clk_init_data
){
1460 .name
= "camss_jpeg_jpeg_axi_clk",
1461 .parent_names
= (const char *[]){
1465 .ops
= &clk_branch2_ops
,
1470 static struct clk_branch camss_jpeg_jpeg_ocmemnoc_clk
= {
1473 .enable_reg
= 0x35bc,
1474 .enable_mask
= BIT(0),
1475 .hw
.init
= &(struct clk_init_data
){
1476 .name
= "camss_jpeg_jpeg_ocmemnoc_clk",
1477 .parent_names
= (const char *[]){
1481 .flags
= CLK_SET_RATE_PARENT
,
1482 .ops
= &clk_branch2_ops
,
1487 static struct clk_branch camss_mclk0_clk
= {
1490 .enable_reg
= 0x3384,
1491 .enable_mask
= BIT(0),
1492 .hw
.init
= &(struct clk_init_data
){
1493 .name
= "camss_mclk0_clk",
1494 .parent_names
= (const char *[]){
1498 .flags
= CLK_SET_RATE_PARENT
,
1499 .ops
= &clk_branch2_ops
,
1504 static struct clk_branch camss_mclk1_clk
= {
1507 .enable_reg
= 0x33b4,
1508 .enable_mask
= BIT(0),
1509 .hw
.init
= &(struct clk_init_data
){
1510 .name
= "camss_mclk1_clk",
1511 .parent_names
= (const char *[]){
1515 .flags
= CLK_SET_RATE_PARENT
,
1516 .ops
= &clk_branch2_ops
,
1521 static struct clk_branch camss_mclk2_clk
= {
1524 .enable_reg
= 0x33e4,
1525 .enable_mask
= BIT(0),
1526 .hw
.init
= &(struct clk_init_data
){
1527 .name
= "camss_mclk2_clk",
1528 .parent_names
= (const char *[]){
1532 .flags
= CLK_SET_RATE_PARENT
,
1533 .ops
= &clk_branch2_ops
,
1538 static struct clk_branch camss_mclk3_clk
= {
1541 .enable_reg
= 0x3414,
1542 .enable_mask
= BIT(0),
1543 .hw
.init
= &(struct clk_init_data
){
1544 .name
= "camss_mclk3_clk",
1545 .parent_names
= (const char *[]){
1549 .flags
= CLK_SET_RATE_PARENT
,
1550 .ops
= &clk_branch2_ops
,
1555 static struct clk_branch camss_micro_ahb_clk
= {
1558 .enable_reg
= 0x3494,
1559 .enable_mask
= BIT(0),
1560 .hw
.init
= &(struct clk_init_data
){
1561 .name
= "camss_micro_ahb_clk",
1562 .parent_names
= (const char *[]){
1566 .ops
= &clk_branch2_ops
,
1571 static struct clk_branch camss_phy0_csi0phytimer_clk
= {
1574 .enable_reg
= 0x3024,
1575 .enable_mask
= BIT(0),
1576 .hw
.init
= &(struct clk_init_data
){
1577 .name
= "camss_phy0_csi0phytimer_clk",
1578 .parent_names
= (const char *[]){
1579 "csi0phytimer_clk_src",
1582 .flags
= CLK_SET_RATE_PARENT
,
1583 .ops
= &clk_branch2_ops
,
1588 static struct clk_branch camss_phy1_csi1phytimer_clk
= {
1591 .enable_reg
= 0x3054,
1592 .enable_mask
= BIT(0),
1593 .hw
.init
= &(struct clk_init_data
){
1594 .name
= "camss_phy1_csi1phytimer_clk",
1595 .parent_names
= (const char *[]){
1596 "csi1phytimer_clk_src",
1599 .flags
= CLK_SET_RATE_PARENT
,
1600 .ops
= &clk_branch2_ops
,
1605 static struct clk_branch camss_phy2_csi2phytimer_clk
= {
1608 .enable_reg
= 0x3084,
1609 .enable_mask
= BIT(0),
1610 .hw
.init
= &(struct clk_init_data
){
1611 .name
= "camss_phy2_csi2phytimer_clk",
1612 .parent_names
= (const char *[]){
1613 "csi2phytimer_clk_src",
1616 .flags
= CLK_SET_RATE_PARENT
,
1617 .ops
= &clk_branch2_ops
,
1622 static struct clk_branch camss_top_ahb_clk
= {
1625 .enable_reg
= 0x3484,
1626 .enable_mask
= BIT(0),
1627 .hw
.init
= &(struct clk_init_data
){
1628 .name
= "camss_top_ahb_clk",
1629 .parent_names
= (const char *[]){
1633 .ops
= &clk_branch2_ops
,
1638 static struct clk_branch camss_vfe_cpp_ahb_clk
= {
1641 .enable_reg
= 0x36b4,
1642 .enable_mask
= BIT(0),
1643 .hw
.init
= &(struct clk_init_data
){
1644 .name
= "camss_vfe_cpp_ahb_clk",
1645 .parent_names
= (const char *[]){
1649 .ops
= &clk_branch2_ops
,
1654 static struct clk_branch camss_vfe_cpp_clk
= {
1657 .enable_reg
= 0x36b0,
1658 .enable_mask
= BIT(0),
1659 .hw
.init
= &(struct clk_init_data
){
1660 .name
= "camss_vfe_cpp_clk",
1661 .parent_names
= (const char *[]){
1665 .flags
= CLK_SET_RATE_PARENT
,
1666 .ops
= &clk_branch2_ops
,
1671 static struct clk_branch camss_vfe_vfe0_clk
= {
1674 .enable_reg
= 0x36a8,
1675 .enable_mask
= BIT(0),
1676 .hw
.init
= &(struct clk_init_data
){
1677 .name
= "camss_vfe_vfe0_clk",
1678 .parent_names
= (const char *[]){
1682 .flags
= CLK_SET_RATE_PARENT
,
1683 .ops
= &clk_branch2_ops
,
1688 static struct clk_branch camss_vfe_vfe1_clk
= {
1691 .enable_reg
= 0x36ac,
1692 .enable_mask
= BIT(0),
1693 .hw
.init
= &(struct clk_init_data
){
1694 .name
= "camss_vfe_vfe1_clk",
1695 .parent_names
= (const char *[]){
1699 .flags
= CLK_SET_RATE_PARENT
,
1700 .ops
= &clk_branch2_ops
,
1705 static struct clk_branch camss_vfe_vfe_ahb_clk
= {
1708 .enable_reg
= 0x36b8,
1709 .enable_mask
= BIT(0),
1710 .hw
.init
= &(struct clk_init_data
){
1711 .name
= "camss_vfe_vfe_ahb_clk",
1712 .parent_names
= (const char *[]){
1716 .ops
= &clk_branch2_ops
,
1721 static struct clk_branch camss_vfe_vfe_axi_clk
= {
1724 .enable_reg
= 0x36bc,
1725 .enable_mask
= BIT(0),
1726 .hw
.init
= &(struct clk_init_data
){
1727 .name
= "camss_vfe_vfe_axi_clk",
1728 .parent_names
= (const char *[]){
1732 .ops
= &clk_branch2_ops
,
1737 static struct clk_branch camss_vfe_vfe_ocmemnoc_clk
= {
1740 .enable_reg
= 0x36c0,
1741 .enable_mask
= BIT(0),
1742 .hw
.init
= &(struct clk_init_data
){
1743 .name
= "camss_vfe_vfe_ocmemnoc_clk",
1744 .parent_names
= (const char *[]){
1748 .flags
= CLK_SET_RATE_PARENT
,
1749 .ops
= &clk_branch2_ops
,
1754 static struct clk_branch mdss_ahb_clk
= {
1757 .enable_reg
= 0x2308,
1758 .enable_mask
= BIT(0),
1759 .hw
.init
= &(struct clk_init_data
){
1760 .name
= "mdss_ahb_clk",
1761 .parent_names
= (const char *[]){
1765 .ops
= &clk_branch2_ops
,
1770 static struct clk_branch mdss_axi_clk
= {
1773 .enable_reg
= 0x2310,
1774 .enable_mask
= BIT(0),
1775 .hw
.init
= &(struct clk_init_data
){
1776 .name
= "mdss_axi_clk",
1777 .parent_names
= (const char *[]){
1781 .flags
= CLK_SET_RATE_PARENT
,
1782 .ops
= &clk_branch2_ops
,
1787 static struct clk_branch mdss_byte0_clk
= {
1790 .enable_reg
= 0x233c,
1791 .enable_mask
= BIT(0),
1792 .hw
.init
= &(struct clk_init_data
){
1793 .name
= "mdss_byte0_clk",
1794 .parent_names
= (const char *[]){
1798 .flags
= CLK_SET_RATE_PARENT
,
1799 .ops
= &clk_branch2_ops
,
1804 static struct clk_branch mdss_byte1_clk
= {
1807 .enable_reg
= 0x2340,
1808 .enable_mask
= BIT(0),
1809 .hw
.init
= &(struct clk_init_data
){
1810 .name
= "mdss_byte1_clk",
1811 .parent_names
= (const char *[]){
1815 .flags
= CLK_SET_RATE_PARENT
,
1816 .ops
= &clk_branch2_ops
,
1821 static struct clk_branch mdss_edpaux_clk
= {
1824 .enable_reg
= 0x2334,
1825 .enable_mask
= BIT(0),
1826 .hw
.init
= &(struct clk_init_data
){
1827 .name
= "mdss_edpaux_clk",
1828 .parent_names
= (const char *[]){
1832 .flags
= CLK_SET_RATE_PARENT
,
1833 .ops
= &clk_branch2_ops
,
1838 static struct clk_branch mdss_edplink_clk
= {
1841 .enable_reg
= 0x2330,
1842 .enable_mask
= BIT(0),
1843 .hw
.init
= &(struct clk_init_data
){
1844 .name
= "mdss_edplink_clk",
1845 .parent_names
= (const char *[]){
1849 .flags
= CLK_SET_RATE_PARENT
,
1850 .ops
= &clk_branch2_ops
,
1855 static struct clk_branch mdss_edppixel_clk
= {
1858 .enable_reg
= 0x232c,
1859 .enable_mask
= BIT(0),
1860 .hw
.init
= &(struct clk_init_data
){
1861 .name
= "mdss_edppixel_clk",
1862 .parent_names
= (const char *[]){
1866 .flags
= CLK_SET_RATE_PARENT
,
1867 .ops
= &clk_branch2_ops
,
1872 static struct clk_branch mdss_esc0_clk
= {
1875 .enable_reg
= 0x2344,
1876 .enable_mask
= BIT(0),
1877 .hw
.init
= &(struct clk_init_data
){
1878 .name
= "mdss_esc0_clk",
1879 .parent_names
= (const char *[]){
1883 .flags
= CLK_SET_RATE_PARENT
,
1884 .ops
= &clk_branch2_ops
,
1889 static struct clk_branch mdss_esc1_clk
= {
1892 .enable_reg
= 0x2348,
1893 .enable_mask
= BIT(0),
1894 .hw
.init
= &(struct clk_init_data
){
1895 .name
= "mdss_esc1_clk",
1896 .parent_names
= (const char *[]){
1900 .flags
= CLK_SET_RATE_PARENT
,
1901 .ops
= &clk_branch2_ops
,
1906 static struct clk_branch mdss_extpclk_clk
= {
1909 .enable_reg
= 0x2324,
1910 .enable_mask
= BIT(0),
1911 .hw
.init
= &(struct clk_init_data
){
1912 .name
= "mdss_extpclk_clk",
1913 .parent_names
= (const char *[]){
1917 .flags
= CLK_SET_RATE_PARENT
,
1918 .ops
= &clk_branch2_ops
,
1923 static struct clk_branch mdss_hdmi_ahb_clk
= {
1926 .enable_reg
= 0x230c,
1927 .enable_mask
= BIT(0),
1928 .hw
.init
= &(struct clk_init_data
){
1929 .name
= "mdss_hdmi_ahb_clk",
1930 .parent_names
= (const char *[]){
1934 .ops
= &clk_branch2_ops
,
1939 static struct clk_branch mdss_hdmi_clk
= {
1942 .enable_reg
= 0x2338,
1943 .enable_mask
= BIT(0),
1944 .hw
.init
= &(struct clk_init_data
){
1945 .name
= "mdss_hdmi_clk",
1946 .parent_names
= (const char *[]){
1950 .flags
= CLK_SET_RATE_PARENT
,
1951 .ops
= &clk_branch2_ops
,
1956 static struct clk_branch mdss_mdp_clk
= {
1959 .enable_reg
= 0x231c,
1960 .enable_mask
= BIT(0),
1961 .hw
.init
= &(struct clk_init_data
){
1962 .name
= "mdss_mdp_clk",
1963 .parent_names
= (const char *[]){
1967 .flags
= CLK_SET_RATE_PARENT
,
1968 .ops
= &clk_branch2_ops
,
1973 static struct clk_branch mdss_mdp_lut_clk
= {
1976 .enable_reg
= 0x2320,
1977 .enable_mask
= BIT(0),
1978 .hw
.init
= &(struct clk_init_data
){
1979 .name
= "mdss_mdp_lut_clk",
1980 .parent_names
= (const char *[]){
1984 .flags
= CLK_SET_RATE_PARENT
,
1985 .ops
= &clk_branch2_ops
,
1990 static struct clk_branch mdss_pclk0_clk
= {
1993 .enable_reg
= 0x2314,
1994 .enable_mask
= BIT(0),
1995 .hw
.init
= &(struct clk_init_data
){
1996 .name
= "mdss_pclk0_clk",
1997 .parent_names
= (const char *[]){
2001 .flags
= CLK_SET_RATE_PARENT
,
2002 .ops
= &clk_branch2_ops
,
2007 static struct clk_branch mdss_pclk1_clk
= {
2010 .enable_reg
= 0x2318,
2011 .enable_mask
= BIT(0),
2012 .hw
.init
= &(struct clk_init_data
){
2013 .name
= "mdss_pclk1_clk",
2014 .parent_names
= (const char *[]){
2018 .flags
= CLK_SET_RATE_PARENT
,
2019 .ops
= &clk_branch2_ops
,
2024 static struct clk_branch mdss_vsync_clk
= {
2027 .enable_reg
= 0x2328,
2028 .enable_mask
= BIT(0),
2029 .hw
.init
= &(struct clk_init_data
){
2030 .name
= "mdss_vsync_clk",
2031 .parent_names
= (const char *[]){
2035 .flags
= CLK_SET_RATE_PARENT
,
2036 .ops
= &clk_branch2_ops
,
2041 static struct clk_branch mmss_misc_ahb_clk
= {
2044 .enable_reg
= 0x502c,
2045 .enable_mask
= BIT(0),
2046 .hw
.init
= &(struct clk_init_data
){
2047 .name
= "mmss_misc_ahb_clk",
2048 .parent_names
= (const char *[]){
2052 .ops
= &clk_branch2_ops
,
2057 static struct clk_branch mmss_mmssnoc_ahb_clk
= {
2060 .enable_reg
= 0x5024,
2061 .enable_mask
= BIT(0),
2062 .hw
.init
= &(struct clk_init_data
){
2063 .name
= "mmss_mmssnoc_ahb_clk",
2064 .parent_names
= (const char *[]){
2068 .ops
= &clk_branch2_ops
,
2069 .flags
= CLK_IGNORE_UNUSED
,
2074 static struct clk_branch mmss_mmssnoc_bto_ahb_clk
= {
2077 .enable_reg
= 0x5028,
2078 .enable_mask
= BIT(0),
2079 .hw
.init
= &(struct clk_init_data
){
2080 .name
= "mmss_mmssnoc_bto_ahb_clk",
2081 .parent_names
= (const char *[]){
2085 .ops
= &clk_branch2_ops
,
2086 .flags
= CLK_IGNORE_UNUSED
,
2091 static struct clk_branch mmss_mmssnoc_axi_clk
= {
2094 .enable_reg
= 0x506c,
2095 .enable_mask
= BIT(0),
2096 .hw
.init
= &(struct clk_init_data
){
2097 .name
= "mmss_mmssnoc_axi_clk",
2098 .parent_names
= (const char *[]){
2102 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2103 .ops
= &clk_branch2_ops
,
2108 static struct clk_branch mmss_s0_axi_clk
= {
2111 .enable_reg
= 0x5064,
2112 .enable_mask
= BIT(0),
2113 .hw
.init
= &(struct clk_init_data
){
2114 .name
= "mmss_s0_axi_clk",
2115 .parent_names
= (const char *[]){
2119 .ops
= &clk_branch2_ops
,
2120 .flags
= CLK_IGNORE_UNUSED
,
2125 static struct clk_branch ocmemcx_ahb_clk
= {
2128 .enable_reg
= 0x405c,
2129 .enable_mask
= BIT(0),
2130 .hw
.init
= &(struct clk_init_data
){
2131 .name
= "ocmemcx_ahb_clk",
2132 .parent_names
= (const char *[]){
2136 .ops
= &clk_branch2_ops
,
2141 static struct clk_branch ocmemcx_ocmemnoc_clk
= {
2144 .enable_reg
= 0x4058,
2145 .enable_mask
= BIT(0),
2146 .hw
.init
= &(struct clk_init_data
){
2147 .name
= "ocmemcx_ocmemnoc_clk",
2148 .parent_names
= (const char *[]){
2152 .flags
= CLK_SET_RATE_PARENT
,
2153 .ops
= &clk_branch2_ops
,
2158 static struct clk_branch oxili_ocmemgx_clk
= {
2161 .enable_reg
= 0x402c,
2162 .enable_mask
= BIT(0),
2163 .hw
.init
= &(struct clk_init_data
){
2164 .name
= "oxili_ocmemgx_clk",
2165 .parent_names
= (const char *[]){
2169 .flags
= CLK_SET_RATE_PARENT
,
2170 .ops
= &clk_branch2_ops
,
2175 static struct clk_branch ocmemnoc_clk
= {
2178 .enable_reg
= 0x50b4,
2179 .enable_mask
= BIT(0),
2180 .hw
.init
= &(struct clk_init_data
){
2181 .name
= "ocmemnoc_clk",
2182 .parent_names
= (const char *[]){
2186 .flags
= CLK_SET_RATE_PARENT
,
2187 .ops
= &clk_branch2_ops
,
2192 static struct clk_branch oxili_gfx3d_clk
= {
2195 .enable_reg
= 0x4028,
2196 .enable_mask
= BIT(0),
2197 .hw
.init
= &(struct clk_init_data
){
2198 .name
= "oxili_gfx3d_clk",
2199 .parent_names
= (const char *[]){
2203 .flags
= CLK_SET_RATE_PARENT
,
2204 .ops
= &clk_branch2_ops
,
2209 static struct clk_branch oxilicx_ahb_clk
= {
2212 .enable_reg
= 0x403c,
2213 .enable_mask
= BIT(0),
2214 .hw
.init
= &(struct clk_init_data
){
2215 .name
= "oxilicx_ahb_clk",
2216 .parent_names
= (const char *[]){
2220 .ops
= &clk_branch2_ops
,
2225 static struct clk_branch oxilicx_axi_clk
= {
2228 .enable_reg
= 0x4038,
2229 .enable_mask
= BIT(0),
2230 .hw
.init
= &(struct clk_init_data
){
2231 .name
= "oxilicx_axi_clk",
2232 .parent_names
= (const char *[]){
2236 .ops
= &clk_branch2_ops
,
2241 static struct clk_branch venus0_ahb_clk
= {
2244 .enable_reg
= 0x1030,
2245 .enable_mask
= BIT(0),
2246 .hw
.init
= &(struct clk_init_data
){
2247 .name
= "venus0_ahb_clk",
2248 .parent_names
= (const char *[]){
2252 .ops
= &clk_branch2_ops
,
2257 static struct clk_branch venus0_axi_clk
= {
2260 .enable_reg
= 0x1034,
2261 .enable_mask
= BIT(0),
2262 .hw
.init
= &(struct clk_init_data
){
2263 .name
= "venus0_axi_clk",
2264 .parent_names
= (const char *[]){
2268 .ops
= &clk_branch2_ops
,
2273 static struct clk_branch venus0_ocmemnoc_clk
= {
2276 .enable_reg
= 0x1038,
2277 .enable_mask
= BIT(0),
2278 .hw
.init
= &(struct clk_init_data
){
2279 .name
= "venus0_ocmemnoc_clk",
2280 .parent_names
= (const char *[]){
2284 .flags
= CLK_SET_RATE_PARENT
,
2285 .ops
= &clk_branch2_ops
,
2290 static struct clk_branch venus0_vcodec0_clk
= {
2293 .enable_reg
= 0x1028,
2294 .enable_mask
= BIT(0),
2295 .hw
.init
= &(struct clk_init_data
){
2296 .name
= "venus0_vcodec0_clk",
2297 .parent_names
= (const char *[]){
2301 .flags
= CLK_SET_RATE_PARENT
,
2302 .ops
= &clk_branch2_ops
,
2307 static const struct pll_config mmpll1_config
= {
2312 .vco_mask
= 0x3 << 20,
2314 .pre_div_mask
= 0x7 << 12,
2315 .post_div_val
= 0x0,
2316 .post_div_mask
= 0x3 << 8,
2317 .mn_ena_mask
= BIT(24),
2318 .main_output_mask
= BIT(0),
2321 static struct pll_config mmpll3_config
= {
2326 .vco_mask
= 0x3 << 20,
2328 .pre_div_mask
= 0x7 << 12,
2329 .post_div_val
= 0x0,
2330 .post_div_mask
= 0x3 << 8,
2331 .mn_ena_mask
= BIT(24),
2332 .main_output_mask
= BIT(0),
2333 .aux_output_mask
= BIT(1),
2336 static struct gdsc venus0_gdsc
= {
2338 .cxcs
= (unsigned int []){ 0x1028 },
2340 .resets
= (unsigned int []){ VENUS0_RESET
},
2345 .pwrsts
= PWRSTS_ON
,
2348 static struct gdsc mdss_gdsc
= {
2350 .cxcs
= (unsigned int []){ 0x231c, 0x2320 },
2355 .pwrsts
= PWRSTS_RET_ON
,
2358 static struct gdsc camss_jpeg_gdsc
= {
2360 .cxcs
= (unsigned int []){ 0x35a8, 0x35ac, 0x35b0 },
2363 .name
= "camss_jpeg",
2365 .pwrsts
= PWRSTS_OFF_ON
,
2368 static struct gdsc camss_vfe_gdsc
= {
2370 .cxcs
= (unsigned int []){ 0x36a8, 0x36ac, 0x3704, 0x3714, 0x36b0 },
2373 .name
= "camss_vfe",
2375 .pwrsts
= PWRSTS_OFF_ON
,
2378 static struct gdsc oxili_gdsc
= {
2380 .cxcs
= (unsigned int []){ 0x4028 },
2385 .pwrsts
= PWRSTS_OFF_ON
,
2388 static struct gdsc oxilicx_gdsc
= {
2393 .parent
= &oxili_gdsc
.pd
,
2394 .pwrsts
= PWRSTS_OFF_ON
,
2397 static struct clk_regmap
*mmcc_msm8974_clocks
[] = {
2398 [MMSS_AHB_CLK_SRC
] = &mmss_ahb_clk_src
.clkr
,
2399 [MMSS_AXI_CLK_SRC
] = &mmss_axi_clk_src
.clkr
,
2400 [OCMEMNOC_CLK_SRC
] = &ocmemnoc_clk_src
.clkr
,
2401 [MMPLL0
] = &mmpll0
.clkr
,
2402 [MMPLL0_VOTE
] = &mmpll0_vote
,
2403 [MMPLL1
] = &mmpll1
.clkr
,
2404 [MMPLL1_VOTE
] = &mmpll1_vote
,
2405 [MMPLL2
] = &mmpll2
.clkr
,
2406 [MMPLL3
] = &mmpll3
.clkr
,
2407 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
2408 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
2409 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
2410 [CSI3_CLK_SRC
] = &csi3_clk_src
.clkr
,
2411 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
2412 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
2413 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
2414 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
2415 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
2416 [JPEG1_CLK_SRC
] = &jpeg1_clk_src
.clkr
,
2417 [JPEG2_CLK_SRC
] = &jpeg2_clk_src
.clkr
,
2418 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
2419 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
2420 [VCODEC0_CLK_SRC
] = &vcodec0_clk_src
.clkr
,
2421 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
2422 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
2423 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
2424 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
2425 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
2426 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
2427 [MCLK3_CLK_SRC
] = &mclk3_clk_src
.clkr
,
2428 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
2429 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
2430 [CSI2PHYTIMER_CLK_SRC
] = &csi2phytimer_clk_src
.clkr
,
2431 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
2432 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
2433 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
2434 [EDPAUX_CLK_SRC
] = &edpaux_clk_src
.clkr
,
2435 [EDPLINK_CLK_SRC
] = &edplink_clk_src
.clkr
,
2436 [EDPPIXEL_CLK_SRC
] = &edppixel_clk_src
.clkr
,
2437 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
2438 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
2439 [EXTPCLK_CLK_SRC
] = &extpclk_clk_src
.clkr
,
2440 [HDMI_CLK_SRC
] = &hdmi_clk_src
.clkr
,
2441 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
2442 [CAMSS_CCI_CCI_AHB_CLK
] = &camss_cci_cci_ahb_clk
.clkr
,
2443 [CAMSS_CCI_CCI_CLK
] = &camss_cci_cci_clk
.clkr
,
2444 [CAMSS_CSI0_AHB_CLK
] = &camss_csi0_ahb_clk
.clkr
,
2445 [CAMSS_CSI0_CLK
] = &camss_csi0_clk
.clkr
,
2446 [CAMSS_CSI0PHY_CLK
] = &camss_csi0phy_clk
.clkr
,
2447 [CAMSS_CSI0PIX_CLK
] = &camss_csi0pix_clk
.clkr
,
2448 [CAMSS_CSI0RDI_CLK
] = &camss_csi0rdi_clk
.clkr
,
2449 [CAMSS_CSI1_AHB_CLK
] = &camss_csi1_ahb_clk
.clkr
,
2450 [CAMSS_CSI1_CLK
] = &camss_csi1_clk
.clkr
,
2451 [CAMSS_CSI1PHY_CLK
] = &camss_csi1phy_clk
.clkr
,
2452 [CAMSS_CSI1PIX_CLK
] = &camss_csi1pix_clk
.clkr
,
2453 [CAMSS_CSI1RDI_CLK
] = &camss_csi1rdi_clk
.clkr
,
2454 [CAMSS_CSI2_AHB_CLK
] = &camss_csi2_ahb_clk
.clkr
,
2455 [CAMSS_CSI2_CLK
] = &camss_csi2_clk
.clkr
,
2456 [CAMSS_CSI2PHY_CLK
] = &camss_csi2phy_clk
.clkr
,
2457 [CAMSS_CSI2PIX_CLK
] = &camss_csi2pix_clk
.clkr
,
2458 [CAMSS_CSI2RDI_CLK
] = &camss_csi2rdi_clk
.clkr
,
2459 [CAMSS_CSI3_AHB_CLK
] = &camss_csi3_ahb_clk
.clkr
,
2460 [CAMSS_CSI3_CLK
] = &camss_csi3_clk
.clkr
,
2461 [CAMSS_CSI3PHY_CLK
] = &camss_csi3phy_clk
.clkr
,
2462 [CAMSS_CSI3PIX_CLK
] = &camss_csi3pix_clk
.clkr
,
2463 [CAMSS_CSI3RDI_CLK
] = &camss_csi3rdi_clk
.clkr
,
2464 [CAMSS_CSI_VFE0_CLK
] = &camss_csi_vfe0_clk
.clkr
,
2465 [CAMSS_CSI_VFE1_CLK
] = &camss_csi_vfe1_clk
.clkr
,
2466 [CAMSS_GP0_CLK
] = &camss_gp0_clk
.clkr
,
2467 [CAMSS_GP1_CLK
] = &camss_gp1_clk
.clkr
,
2468 [CAMSS_ISPIF_AHB_CLK
] = &camss_ispif_ahb_clk
.clkr
,
2469 [CAMSS_JPEG_JPEG0_CLK
] = &camss_jpeg_jpeg0_clk
.clkr
,
2470 [CAMSS_JPEG_JPEG1_CLK
] = &camss_jpeg_jpeg1_clk
.clkr
,
2471 [CAMSS_JPEG_JPEG2_CLK
] = &camss_jpeg_jpeg2_clk
.clkr
,
2472 [CAMSS_JPEG_JPEG_AHB_CLK
] = &camss_jpeg_jpeg_ahb_clk
.clkr
,
2473 [CAMSS_JPEG_JPEG_AXI_CLK
] = &camss_jpeg_jpeg_axi_clk
.clkr
,
2474 [CAMSS_JPEG_JPEG_OCMEMNOC_CLK
] = &camss_jpeg_jpeg_ocmemnoc_clk
.clkr
,
2475 [CAMSS_MCLK0_CLK
] = &camss_mclk0_clk
.clkr
,
2476 [CAMSS_MCLK1_CLK
] = &camss_mclk1_clk
.clkr
,
2477 [CAMSS_MCLK2_CLK
] = &camss_mclk2_clk
.clkr
,
2478 [CAMSS_MCLK3_CLK
] = &camss_mclk3_clk
.clkr
,
2479 [CAMSS_MICRO_AHB_CLK
] = &camss_micro_ahb_clk
.clkr
,
2480 [CAMSS_PHY0_CSI0PHYTIMER_CLK
] = &camss_phy0_csi0phytimer_clk
.clkr
,
2481 [CAMSS_PHY1_CSI1PHYTIMER_CLK
] = &camss_phy1_csi1phytimer_clk
.clkr
,
2482 [CAMSS_PHY2_CSI2PHYTIMER_CLK
] = &camss_phy2_csi2phytimer_clk
.clkr
,
2483 [CAMSS_TOP_AHB_CLK
] = &camss_top_ahb_clk
.clkr
,
2484 [CAMSS_VFE_CPP_AHB_CLK
] = &camss_vfe_cpp_ahb_clk
.clkr
,
2485 [CAMSS_VFE_CPP_CLK
] = &camss_vfe_cpp_clk
.clkr
,
2486 [CAMSS_VFE_VFE0_CLK
] = &camss_vfe_vfe0_clk
.clkr
,
2487 [CAMSS_VFE_VFE1_CLK
] = &camss_vfe_vfe1_clk
.clkr
,
2488 [CAMSS_VFE_VFE_AHB_CLK
] = &camss_vfe_vfe_ahb_clk
.clkr
,
2489 [CAMSS_VFE_VFE_AXI_CLK
] = &camss_vfe_vfe_axi_clk
.clkr
,
2490 [CAMSS_VFE_VFE_OCMEMNOC_CLK
] = &camss_vfe_vfe_ocmemnoc_clk
.clkr
,
2491 [MDSS_AHB_CLK
] = &mdss_ahb_clk
.clkr
,
2492 [MDSS_AXI_CLK
] = &mdss_axi_clk
.clkr
,
2493 [MDSS_BYTE0_CLK
] = &mdss_byte0_clk
.clkr
,
2494 [MDSS_BYTE1_CLK
] = &mdss_byte1_clk
.clkr
,
2495 [MDSS_EDPAUX_CLK
] = &mdss_edpaux_clk
.clkr
,
2496 [MDSS_EDPLINK_CLK
] = &mdss_edplink_clk
.clkr
,
2497 [MDSS_EDPPIXEL_CLK
] = &mdss_edppixel_clk
.clkr
,
2498 [MDSS_ESC0_CLK
] = &mdss_esc0_clk
.clkr
,
2499 [MDSS_ESC1_CLK
] = &mdss_esc1_clk
.clkr
,
2500 [MDSS_EXTPCLK_CLK
] = &mdss_extpclk_clk
.clkr
,
2501 [MDSS_HDMI_AHB_CLK
] = &mdss_hdmi_ahb_clk
.clkr
,
2502 [MDSS_HDMI_CLK
] = &mdss_hdmi_clk
.clkr
,
2503 [MDSS_MDP_CLK
] = &mdss_mdp_clk
.clkr
,
2504 [MDSS_MDP_LUT_CLK
] = &mdss_mdp_lut_clk
.clkr
,
2505 [MDSS_PCLK0_CLK
] = &mdss_pclk0_clk
.clkr
,
2506 [MDSS_PCLK1_CLK
] = &mdss_pclk1_clk
.clkr
,
2507 [MDSS_VSYNC_CLK
] = &mdss_vsync_clk
.clkr
,
2508 [MMSS_MISC_AHB_CLK
] = &mmss_misc_ahb_clk
.clkr
,
2509 [MMSS_MMSSNOC_AHB_CLK
] = &mmss_mmssnoc_ahb_clk
.clkr
,
2510 [MMSS_MMSSNOC_BTO_AHB_CLK
] = &mmss_mmssnoc_bto_ahb_clk
.clkr
,
2511 [MMSS_MMSSNOC_AXI_CLK
] = &mmss_mmssnoc_axi_clk
.clkr
,
2512 [MMSS_S0_AXI_CLK
] = &mmss_s0_axi_clk
.clkr
,
2513 [OCMEMCX_AHB_CLK
] = &ocmemcx_ahb_clk
.clkr
,
2514 [OCMEMCX_OCMEMNOC_CLK
] = &ocmemcx_ocmemnoc_clk
.clkr
,
2515 [OXILI_OCMEMGX_CLK
] = &oxili_ocmemgx_clk
.clkr
,
2516 [OCMEMNOC_CLK
] = &ocmemnoc_clk
.clkr
,
2517 [OXILI_GFX3D_CLK
] = &oxili_gfx3d_clk
.clkr
,
2518 [OXILICX_AHB_CLK
] = &oxilicx_ahb_clk
.clkr
,
2519 [OXILICX_AXI_CLK
] = &oxilicx_axi_clk
.clkr
,
2520 [VENUS0_AHB_CLK
] = &venus0_ahb_clk
.clkr
,
2521 [VENUS0_AXI_CLK
] = &venus0_axi_clk
.clkr
,
2522 [VENUS0_OCMEMNOC_CLK
] = &venus0_ocmemnoc_clk
.clkr
,
2523 [VENUS0_VCODEC0_CLK
] = &venus0_vcodec0_clk
.clkr
,
2526 static const struct qcom_reset_map mmcc_msm8974_resets
[] = {
2527 [SPDM_RESET
] = { 0x0200 },
2528 [SPDM_RM_RESET
] = { 0x0300 },
2529 [VENUS0_RESET
] = { 0x1020 },
2530 [MDSS_RESET
] = { 0x2300 },
2531 [CAMSS_PHY0_RESET
] = { 0x3020 },
2532 [CAMSS_PHY1_RESET
] = { 0x3050 },
2533 [CAMSS_PHY2_RESET
] = { 0x3080 },
2534 [CAMSS_CSI0_RESET
] = { 0x30b0 },
2535 [CAMSS_CSI0PHY_RESET
] = { 0x30c0 },
2536 [CAMSS_CSI0RDI_RESET
] = { 0x30d0 },
2537 [CAMSS_CSI0PIX_RESET
] = { 0x30e0 },
2538 [CAMSS_CSI1_RESET
] = { 0x3120 },
2539 [CAMSS_CSI1PHY_RESET
] = { 0x3130 },
2540 [CAMSS_CSI1RDI_RESET
] = { 0x3140 },
2541 [CAMSS_CSI1PIX_RESET
] = { 0x3150 },
2542 [CAMSS_CSI2_RESET
] = { 0x3180 },
2543 [CAMSS_CSI2PHY_RESET
] = { 0x3190 },
2544 [CAMSS_CSI2RDI_RESET
] = { 0x31a0 },
2545 [CAMSS_CSI2PIX_RESET
] = { 0x31b0 },
2546 [CAMSS_CSI3_RESET
] = { 0x31e0 },
2547 [CAMSS_CSI3PHY_RESET
] = { 0x31f0 },
2548 [CAMSS_CSI3RDI_RESET
] = { 0x3200 },
2549 [CAMSS_CSI3PIX_RESET
] = { 0x3210 },
2550 [CAMSS_ISPIF_RESET
] = { 0x3220 },
2551 [CAMSS_CCI_RESET
] = { 0x3340 },
2552 [CAMSS_MCLK0_RESET
] = { 0x3380 },
2553 [CAMSS_MCLK1_RESET
] = { 0x33b0 },
2554 [CAMSS_MCLK2_RESET
] = { 0x33e0 },
2555 [CAMSS_MCLK3_RESET
] = { 0x3410 },
2556 [CAMSS_GP0_RESET
] = { 0x3440 },
2557 [CAMSS_GP1_RESET
] = { 0x3470 },
2558 [CAMSS_TOP_RESET
] = { 0x3480 },
2559 [CAMSS_MICRO_RESET
] = { 0x3490 },
2560 [CAMSS_JPEG_RESET
] = { 0x35a0 },
2561 [CAMSS_VFE_RESET
] = { 0x36a0 },
2562 [CAMSS_CSI_VFE0_RESET
] = { 0x3700 },
2563 [CAMSS_CSI_VFE1_RESET
] = { 0x3710 },
2564 [OXILI_RESET
] = { 0x4020 },
2565 [OXILICX_RESET
] = { 0x4030 },
2566 [OCMEMCX_RESET
] = { 0x4050 },
2567 [MMSS_RBCRP_RESET
] = { 0x4080 },
2568 [MMSSNOCAHB_RESET
] = { 0x5020 },
2569 [MMSSNOCAXI_RESET
] = { 0x5060 },
2570 [OCMEMNOC_RESET
] = { 0x50b0 },
2573 static struct gdsc
*mmcc_msm8974_gdscs
[] = {
2574 [VENUS0_GDSC
] = &venus0_gdsc
,
2575 [MDSS_GDSC
] = &mdss_gdsc
,
2576 [CAMSS_JPEG_GDSC
] = &camss_jpeg_gdsc
,
2577 [CAMSS_VFE_GDSC
] = &camss_vfe_gdsc
,
2578 [OXILI_GDSC
] = &oxili_gdsc
,
2579 [OXILICX_GDSC
] = &oxilicx_gdsc
,
2582 static const struct regmap_config mmcc_msm8974_regmap_config
= {
2586 .max_register
= 0x5104,
2590 static const struct qcom_cc_desc mmcc_msm8974_desc
= {
2591 .config
= &mmcc_msm8974_regmap_config
,
2592 .clks
= mmcc_msm8974_clocks
,
2593 .num_clks
= ARRAY_SIZE(mmcc_msm8974_clocks
),
2594 .resets
= mmcc_msm8974_resets
,
2595 .num_resets
= ARRAY_SIZE(mmcc_msm8974_resets
),
2596 .gdscs
= mmcc_msm8974_gdscs
,
2597 .num_gdscs
= ARRAY_SIZE(mmcc_msm8974_gdscs
),
2600 static const struct of_device_id mmcc_msm8974_match_table
[] = {
2601 { .compatible
= "qcom,mmcc-msm8974" },
2604 MODULE_DEVICE_TABLE(of
, mmcc_msm8974_match_table
);
2606 static int mmcc_msm8974_probe(struct platform_device
*pdev
)
2608 struct regmap
*regmap
;
2610 regmap
= qcom_cc_map(pdev
, &mmcc_msm8974_desc
);
2612 return PTR_ERR(regmap
);
2614 clk_pll_configure_sr_hpm_lp(&mmpll1
, regmap
, &mmpll1_config
, true);
2615 clk_pll_configure_sr_hpm_lp(&mmpll3
, regmap
, &mmpll3_config
, false);
2617 return qcom_cc_really_probe(pdev
, &mmcc_msm8974_desc
, regmap
);
2620 static struct platform_driver mmcc_msm8974_driver
= {
2621 .probe
= mmcc_msm8974_probe
,
2623 .name
= "mmcc-msm8974",
2624 .of_match_table
= mmcc_msm8974_match_table
,
2627 module_platform_driver(mmcc_msm8974_driver
);
2629 MODULE_DESCRIPTION("QCOM MMCC MSM8974 Driver");
2630 MODULE_LICENSE("GPL v2");
2631 MODULE_ALIAS("platform:mmcc-msm8974");