2 * Copyright (c) 2013, 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/bitops.h>
16 #include <linux/err.h>
17 #include <linux/platform_device.h>
18 #include <linux/module.h>
20 #include <linux/of_device.h>
21 #include <linux/clk-provider.h>
22 #include <linux/regmap.h>
23 #include <linux/reset-controller.h>
25 #include <dt-bindings/clock/qcom,mmcc-msm8974.h>
26 #include <dt-bindings/reset/qcom,mmcc-msm8974.h>
29 #include "clk-regmap.h"
32 #include "clk-branch.h"
53 static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map
[] = {
60 static const char * const mmcc_xo_mmpll0_mmpll1_gpll0
[] = {
67 static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
[] = {
76 static const char * const mmcc_xo_mmpll0_dsi_hdmi_gpll0
[] = {
85 static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map
[] = {
93 static const char * const mmcc_xo_mmpll0_1_2_gpll0
[] = {
101 static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map
[] = {
109 static const char * const mmcc_xo_mmpll0_1_3_gpll0
[] = {
117 static const struct parent_map mmcc_xo_mmpll0_1_gpll1_0_map
[] = {
125 static const char * const mmcc_xo_mmpll0_1_gpll1_0
[] = {
133 static const struct parent_map mmcc_xo_dsi_hdmi_edp_map
[] = {
142 static const char * const mmcc_xo_dsi_hdmi_edp
[] = {
151 static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map
[] = {
160 static const char * const mmcc_xo_dsi_hdmi_edp_gpll0
[] = {
169 static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map
[] = {
174 { P_DSI0PLL_BYTE
, 1 },
175 { P_DSI1PLL_BYTE
, 2 }
178 static const char * const mmcc_xo_dsibyte_hdmi_edp_gpll0
[] = {
187 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
189 static struct clk_pll mmpll0
= {
193 .config_reg
= 0x0014,
195 .status_reg
= 0x001c,
197 .clkr
.hw
.init
= &(struct clk_init_data
){
199 .parent_names
= (const char *[]){ "xo" },
205 static struct clk_regmap mmpll0_vote
= {
206 .enable_reg
= 0x0100,
207 .enable_mask
= BIT(0),
208 .hw
.init
= &(struct clk_init_data
){
209 .name
= "mmpll0_vote",
210 .parent_names
= (const char *[]){ "mmpll0" },
212 .ops
= &clk_pll_vote_ops
,
216 static struct clk_pll mmpll1
= {
220 .config_reg
= 0x0050,
222 .status_reg
= 0x005c,
224 .clkr
.hw
.init
= &(struct clk_init_data
){
226 .parent_names
= (const char *[]){ "xo" },
232 static struct clk_regmap mmpll1_vote
= {
233 .enable_reg
= 0x0100,
234 .enable_mask
= BIT(1),
235 .hw
.init
= &(struct clk_init_data
){
236 .name
= "mmpll1_vote",
237 .parent_names
= (const char *[]){ "mmpll1" },
239 .ops
= &clk_pll_vote_ops
,
243 static struct clk_pll mmpll2
= {
247 .config_reg
= 0x4110,
249 .status_reg
= 0x411c,
250 .clkr
.hw
.init
= &(struct clk_init_data
){
252 .parent_names
= (const char *[]){ "xo" },
258 static struct clk_pll mmpll3
= {
262 .config_reg
= 0x0090,
264 .status_reg
= 0x009c,
266 .clkr
.hw
.init
= &(struct clk_init_data
){
268 .parent_names
= (const char *[]){ "xo" },
274 static struct clk_rcg2 mmss_ahb_clk_src
= {
277 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
278 .clkr
.hw
.init
= &(struct clk_init_data
){
279 .name
= "mmss_ahb_clk_src",
280 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
282 .ops
= &clk_rcg2_ops
,
286 static struct freq_tbl ftbl_mmss_axi_clk
[] = {
287 F( 19200000, P_XO
, 1, 0, 0),
288 F( 37500000, P_GPLL0
, 16, 0, 0),
289 F( 50000000, P_GPLL0
, 12, 0, 0),
290 F( 75000000, P_GPLL0
, 8, 0, 0),
291 F(100000000, P_GPLL0
, 6, 0, 0),
292 F(150000000, P_GPLL0
, 4, 0, 0),
293 F(291750000, P_MMPLL1
, 4, 0, 0),
294 F(400000000, P_MMPLL0
, 2, 0, 0),
295 F(466800000, P_MMPLL1
, 2.5, 0, 0),
298 static struct clk_rcg2 mmss_axi_clk_src
= {
301 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
302 .freq_tbl
= ftbl_mmss_axi_clk
,
303 .clkr
.hw
.init
= &(struct clk_init_data
){
304 .name
= "mmss_axi_clk_src",
305 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
307 .ops
= &clk_rcg2_ops
,
311 static struct freq_tbl ftbl_ocmemnoc_clk
[] = {
312 F( 19200000, P_XO
, 1, 0, 0),
313 F( 37500000, P_GPLL0
, 16, 0, 0),
314 F( 50000000, P_GPLL0
, 12, 0, 0),
315 F( 75000000, P_GPLL0
, 8, 0, 0),
316 F(100000000, P_GPLL0
, 6, 0, 0),
317 F(150000000, P_GPLL0
, 4, 0, 0),
318 F(291750000, P_MMPLL1
, 4, 0, 0),
319 F(400000000, P_MMPLL0
, 2, 0, 0),
322 static struct clk_rcg2 ocmemnoc_clk_src
= {
325 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
326 .freq_tbl
= ftbl_ocmemnoc_clk
,
327 .clkr
.hw
.init
= &(struct clk_init_data
){
328 .name
= "ocmemnoc_clk_src",
329 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
331 .ops
= &clk_rcg2_ops
,
335 static struct freq_tbl ftbl_camss_csi0_3_clk
[] = {
336 F(100000000, P_GPLL0
, 6, 0, 0),
337 F(200000000, P_MMPLL0
, 4, 0, 0),
341 static struct clk_rcg2 csi0_clk_src
= {
344 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
345 .freq_tbl
= ftbl_camss_csi0_3_clk
,
346 .clkr
.hw
.init
= &(struct clk_init_data
){
347 .name
= "csi0_clk_src",
348 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
350 .ops
= &clk_rcg2_ops
,
354 static struct clk_rcg2 csi1_clk_src
= {
357 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
358 .freq_tbl
= ftbl_camss_csi0_3_clk
,
359 .clkr
.hw
.init
= &(struct clk_init_data
){
360 .name
= "csi1_clk_src",
361 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
363 .ops
= &clk_rcg2_ops
,
367 static struct clk_rcg2 csi2_clk_src
= {
370 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
371 .freq_tbl
= ftbl_camss_csi0_3_clk
,
372 .clkr
.hw
.init
= &(struct clk_init_data
){
373 .name
= "csi2_clk_src",
374 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
376 .ops
= &clk_rcg2_ops
,
380 static struct clk_rcg2 csi3_clk_src
= {
383 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
384 .freq_tbl
= ftbl_camss_csi0_3_clk
,
385 .clkr
.hw
.init
= &(struct clk_init_data
){
386 .name
= "csi3_clk_src",
387 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
389 .ops
= &clk_rcg2_ops
,
393 static struct freq_tbl ftbl_camss_vfe_vfe0_1_clk
[] = {
394 F(37500000, P_GPLL0
, 16, 0, 0),
395 F(50000000, P_GPLL0
, 12, 0, 0),
396 F(60000000, P_GPLL0
, 10, 0, 0),
397 F(80000000, P_GPLL0
, 7.5, 0, 0),
398 F(100000000, P_GPLL0
, 6, 0, 0),
399 F(109090000, P_GPLL0
, 5.5, 0, 0),
400 F(133330000, P_GPLL0
, 4.5, 0, 0),
401 F(200000000, P_GPLL0
, 3, 0, 0),
402 F(228570000, P_MMPLL0
, 3.5, 0, 0),
403 F(266670000, P_MMPLL0
, 3, 0, 0),
404 F(320000000, P_MMPLL0
, 2.5, 0, 0),
405 F(400000000, P_MMPLL0
, 2, 0, 0),
406 F(465000000, P_MMPLL3
, 2, 0, 0),
410 static struct clk_rcg2 vfe0_clk_src
= {
413 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
414 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
415 .clkr
.hw
.init
= &(struct clk_init_data
){
416 .name
= "vfe0_clk_src",
417 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
419 .ops
= &clk_rcg2_ops
,
423 static struct clk_rcg2 vfe1_clk_src
= {
426 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
427 .freq_tbl
= ftbl_camss_vfe_vfe0_1_clk
,
428 .clkr
.hw
.init
= &(struct clk_init_data
){
429 .name
= "vfe1_clk_src",
430 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
432 .ops
= &clk_rcg2_ops
,
436 static struct freq_tbl ftbl_mdss_mdp_clk
[] = {
437 F(37500000, P_GPLL0
, 16, 0, 0),
438 F(60000000, P_GPLL0
, 10, 0, 0),
439 F(75000000, P_GPLL0
, 8, 0, 0),
440 F(85710000, P_GPLL0
, 7, 0, 0),
441 F(100000000, P_GPLL0
, 6, 0, 0),
442 F(133330000, P_MMPLL0
, 6, 0, 0),
443 F(160000000, P_MMPLL0
, 5, 0, 0),
444 F(200000000, P_MMPLL0
, 4, 0, 0),
445 F(228570000, P_MMPLL0
, 3.5, 0, 0),
446 F(240000000, P_GPLL0
, 2.5, 0, 0),
447 F(266670000, P_MMPLL0
, 3, 0, 0),
448 F(320000000, P_MMPLL0
, 2.5, 0, 0),
452 static struct clk_rcg2 mdp_clk_src
= {
455 .parent_map
= mmcc_xo_mmpll0_dsi_hdmi_gpll0_map
,
456 .freq_tbl
= ftbl_mdss_mdp_clk
,
457 .clkr
.hw
.init
= &(struct clk_init_data
){
458 .name
= "mdp_clk_src",
459 .parent_names
= mmcc_xo_mmpll0_dsi_hdmi_gpll0
,
461 .ops
= &clk_rcg2_ops
,
465 static struct clk_rcg2 gfx3d_clk_src
= {
468 .parent_map
= mmcc_xo_mmpll0_1_2_gpll0_map
,
469 .clkr
.hw
.init
= &(struct clk_init_data
){
470 .name
= "gfx3d_clk_src",
471 .parent_names
= mmcc_xo_mmpll0_1_2_gpll0
,
473 .ops
= &clk_rcg2_ops
,
477 static struct freq_tbl ftbl_camss_jpeg_jpeg0_2_clk
[] = {
478 F(75000000, P_GPLL0
, 8, 0, 0),
479 F(133330000, P_GPLL0
, 4.5, 0, 0),
480 F(200000000, P_GPLL0
, 3, 0, 0),
481 F(228570000, P_MMPLL0
, 3.5, 0, 0),
482 F(266670000, P_MMPLL0
, 3, 0, 0),
483 F(320000000, P_MMPLL0
, 2.5, 0, 0),
487 static struct clk_rcg2 jpeg0_clk_src
= {
490 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
491 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
492 .clkr
.hw
.init
= &(struct clk_init_data
){
493 .name
= "jpeg0_clk_src",
494 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
496 .ops
= &clk_rcg2_ops
,
500 static struct clk_rcg2 jpeg1_clk_src
= {
503 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
504 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
505 .clkr
.hw
.init
= &(struct clk_init_data
){
506 .name
= "jpeg1_clk_src",
507 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
509 .ops
= &clk_rcg2_ops
,
513 static struct clk_rcg2 jpeg2_clk_src
= {
516 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
517 .freq_tbl
= ftbl_camss_jpeg_jpeg0_2_clk
,
518 .clkr
.hw
.init
= &(struct clk_init_data
){
519 .name
= "jpeg2_clk_src",
520 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
522 .ops
= &clk_rcg2_ops
,
526 static struct clk_rcg2 pclk0_clk_src
= {
530 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
531 .clkr
.hw
.init
= &(struct clk_init_data
){
532 .name
= "pclk0_clk_src",
533 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
535 .ops
= &clk_pixel_ops
,
536 .flags
= CLK_SET_RATE_PARENT
,
540 static struct clk_rcg2 pclk1_clk_src
= {
544 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
545 .clkr
.hw
.init
= &(struct clk_init_data
){
546 .name
= "pclk1_clk_src",
547 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
549 .ops
= &clk_pixel_ops
,
550 .flags
= CLK_SET_RATE_PARENT
,
554 static struct freq_tbl ftbl_venus0_vcodec0_clk
[] = {
555 F(50000000, P_GPLL0
, 12, 0, 0),
556 F(100000000, P_GPLL0
, 6, 0, 0),
557 F(133330000, P_MMPLL0
, 6, 0, 0),
558 F(200000000, P_MMPLL0
, 4, 0, 0),
559 F(266670000, P_MMPLL0
, 3, 0, 0),
560 F(465000000, P_MMPLL3
, 2, 0, 0),
564 static struct clk_rcg2 vcodec0_clk_src
= {
568 .parent_map
= mmcc_xo_mmpll0_1_3_gpll0_map
,
569 .freq_tbl
= ftbl_venus0_vcodec0_clk
,
570 .clkr
.hw
.init
= &(struct clk_init_data
){
571 .name
= "vcodec0_clk_src",
572 .parent_names
= mmcc_xo_mmpll0_1_3_gpll0
,
574 .ops
= &clk_rcg2_ops
,
578 static struct freq_tbl ftbl_camss_cci_cci_clk
[] = {
579 F(19200000, P_XO
, 1, 0, 0),
583 static struct clk_rcg2 cci_clk_src
= {
586 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
587 .freq_tbl
= ftbl_camss_cci_cci_clk
,
588 .clkr
.hw
.init
= &(struct clk_init_data
){
589 .name
= "cci_clk_src",
590 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
592 .ops
= &clk_rcg2_ops
,
596 static struct freq_tbl ftbl_camss_gp0_1_clk
[] = {
597 F(10000, P_XO
, 16, 1, 120),
598 F(24000, P_XO
, 16, 1, 50),
599 F(6000000, P_GPLL0
, 10, 1, 10),
600 F(12000000, P_GPLL0
, 10, 1, 5),
601 F(13000000, P_GPLL0
, 4, 13, 150),
602 F(24000000, P_GPLL0
, 5, 1, 5),
606 static struct clk_rcg2 camss_gp0_clk_src
= {
610 .parent_map
= mmcc_xo_mmpll0_1_gpll1_0_map
,
611 .freq_tbl
= ftbl_camss_gp0_1_clk
,
612 .clkr
.hw
.init
= &(struct clk_init_data
){
613 .name
= "camss_gp0_clk_src",
614 .parent_names
= mmcc_xo_mmpll0_1_gpll1_0
,
616 .ops
= &clk_rcg2_ops
,
620 static struct clk_rcg2 camss_gp1_clk_src
= {
624 .parent_map
= mmcc_xo_mmpll0_1_gpll1_0_map
,
625 .freq_tbl
= ftbl_camss_gp0_1_clk
,
626 .clkr
.hw
.init
= &(struct clk_init_data
){
627 .name
= "camss_gp1_clk_src",
628 .parent_names
= mmcc_xo_mmpll0_1_gpll1_0
,
630 .ops
= &clk_rcg2_ops
,
634 static struct freq_tbl ftbl_camss_mclk0_3_clk
[] = {
635 F(4800000, P_XO
, 4, 0, 0),
636 F(6000000, P_GPLL0
, 10, 1, 10),
637 F(8000000, P_GPLL0
, 15, 1, 5),
638 F(9600000, P_XO
, 2, 0, 0),
639 F(16000000, P_GPLL0
, 12.5, 1, 3),
640 F(19200000, P_XO
, 1, 0, 0),
641 F(24000000, P_GPLL0
, 5, 1, 5),
642 F(32000000, P_MMPLL0
, 5, 1, 5),
643 F(48000000, P_GPLL0
, 12.5, 0, 0),
644 F(64000000, P_MMPLL0
, 12.5, 0, 0),
645 F(66670000, P_GPLL0
, 9, 0, 0),
649 static struct clk_rcg2 mclk0_clk_src
= {
652 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
653 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
654 .clkr
.hw
.init
= &(struct clk_init_data
){
655 .name
= "mclk0_clk_src",
656 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
658 .ops
= &clk_rcg2_ops
,
662 static struct clk_rcg2 mclk1_clk_src
= {
665 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
666 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
667 .clkr
.hw
.init
= &(struct clk_init_data
){
668 .name
= "mclk1_clk_src",
669 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
671 .ops
= &clk_rcg2_ops
,
675 static struct clk_rcg2 mclk2_clk_src
= {
678 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
679 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
680 .clkr
.hw
.init
= &(struct clk_init_data
){
681 .name
= "mclk2_clk_src",
682 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
684 .ops
= &clk_rcg2_ops
,
688 static struct clk_rcg2 mclk3_clk_src
= {
691 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
692 .freq_tbl
= ftbl_camss_mclk0_3_clk
,
693 .clkr
.hw
.init
= &(struct clk_init_data
){
694 .name
= "mclk3_clk_src",
695 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
697 .ops
= &clk_rcg2_ops
,
701 static struct freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk
[] = {
702 F(100000000, P_GPLL0
, 6, 0, 0),
703 F(200000000, P_MMPLL0
, 4, 0, 0),
707 static struct clk_rcg2 csi0phytimer_clk_src
= {
710 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
711 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
712 .clkr
.hw
.init
= &(struct clk_init_data
){
713 .name
= "csi0phytimer_clk_src",
714 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
716 .ops
= &clk_rcg2_ops
,
720 static struct clk_rcg2 csi1phytimer_clk_src
= {
723 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
724 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
725 .clkr
.hw
.init
= &(struct clk_init_data
){
726 .name
= "csi1phytimer_clk_src",
727 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
729 .ops
= &clk_rcg2_ops
,
733 static struct clk_rcg2 csi2phytimer_clk_src
= {
736 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
737 .freq_tbl
= ftbl_camss_phy0_2_csi0_2phytimer_clk
,
738 .clkr
.hw
.init
= &(struct clk_init_data
){
739 .name
= "csi2phytimer_clk_src",
740 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
742 .ops
= &clk_rcg2_ops
,
746 static struct freq_tbl ftbl_camss_vfe_cpp_clk
[] = {
747 F(133330000, P_GPLL0
, 4.5, 0, 0),
748 F(266670000, P_MMPLL0
, 3, 0, 0),
749 F(320000000, P_MMPLL0
, 2.5, 0, 0),
750 F(400000000, P_MMPLL0
, 2, 0, 0),
751 F(465000000, P_MMPLL3
, 2, 0, 0),
755 static struct clk_rcg2 cpp_clk_src
= {
758 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
759 .freq_tbl
= ftbl_camss_vfe_cpp_clk
,
760 .clkr
.hw
.init
= &(struct clk_init_data
){
761 .name
= "cpp_clk_src",
762 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
764 .ops
= &clk_rcg2_ops
,
768 static struct freq_tbl byte_freq_tbl
[] = {
769 { .src
= P_DSI0PLL_BYTE
},
773 static struct clk_rcg2 byte0_clk_src
= {
776 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
777 .freq_tbl
= byte_freq_tbl
,
778 .clkr
.hw
.init
= &(struct clk_init_data
){
779 .name
= "byte0_clk_src",
780 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
782 .ops
= &clk_byte2_ops
,
783 .flags
= CLK_SET_RATE_PARENT
,
787 static struct clk_rcg2 byte1_clk_src
= {
790 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
791 .freq_tbl
= byte_freq_tbl
,
792 .clkr
.hw
.init
= &(struct clk_init_data
){
793 .name
= "byte1_clk_src",
794 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
796 .ops
= &clk_byte2_ops
,
797 .flags
= CLK_SET_RATE_PARENT
,
801 static struct freq_tbl ftbl_mdss_edpaux_clk
[] = {
802 F(19200000, P_XO
, 1, 0, 0),
806 static struct clk_rcg2 edpaux_clk_src
= {
809 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
810 .freq_tbl
= ftbl_mdss_edpaux_clk
,
811 .clkr
.hw
.init
= &(struct clk_init_data
){
812 .name
= "edpaux_clk_src",
813 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
815 .ops
= &clk_rcg2_ops
,
819 static struct freq_tbl ftbl_mdss_edplink_clk
[] = {
820 F(135000000, P_EDPLINK
, 2, 0, 0),
821 F(270000000, P_EDPLINK
, 11, 0, 0),
825 static struct clk_rcg2 edplink_clk_src
= {
828 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
829 .freq_tbl
= ftbl_mdss_edplink_clk
,
830 .clkr
.hw
.init
= &(struct clk_init_data
){
831 .name
= "edplink_clk_src",
832 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
834 .ops
= &clk_rcg2_ops
,
835 .flags
= CLK_SET_RATE_PARENT
,
839 static struct freq_tbl edp_pixel_freq_tbl
[] = {
844 static struct clk_rcg2 edppixel_clk_src
= {
848 .parent_map
= mmcc_xo_dsi_hdmi_edp_map
,
849 .freq_tbl
= edp_pixel_freq_tbl
,
850 .clkr
.hw
.init
= &(struct clk_init_data
){
851 .name
= "edppixel_clk_src",
852 .parent_names
= mmcc_xo_dsi_hdmi_edp
,
854 .ops
= &clk_edp_pixel_ops
,
858 static struct freq_tbl ftbl_mdss_esc0_1_clk
[] = {
859 F(19200000, P_XO
, 1, 0, 0),
863 static struct clk_rcg2 esc0_clk_src
= {
866 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
867 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
868 .clkr
.hw
.init
= &(struct clk_init_data
){
869 .name
= "esc0_clk_src",
870 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
872 .ops
= &clk_rcg2_ops
,
876 static struct clk_rcg2 esc1_clk_src
= {
879 .parent_map
= mmcc_xo_dsibyte_hdmi_edp_gpll0_map
,
880 .freq_tbl
= ftbl_mdss_esc0_1_clk
,
881 .clkr
.hw
.init
= &(struct clk_init_data
){
882 .name
= "esc1_clk_src",
883 .parent_names
= mmcc_xo_dsibyte_hdmi_edp_gpll0
,
885 .ops
= &clk_rcg2_ops
,
889 static struct freq_tbl extpclk_freq_tbl
[] = {
890 { .src
= P_HDMIPLL
},
894 static struct clk_rcg2 extpclk_clk_src
= {
897 .parent_map
= mmcc_xo_dsi_hdmi_edp_gpll0_map
,
898 .freq_tbl
= extpclk_freq_tbl
,
899 .clkr
.hw
.init
= &(struct clk_init_data
){
900 .name
= "extpclk_clk_src",
901 .parent_names
= mmcc_xo_dsi_hdmi_edp_gpll0
,
903 .ops
= &clk_byte_ops
,
904 .flags
= CLK_SET_RATE_PARENT
,
908 static struct freq_tbl ftbl_mdss_hdmi_clk
[] = {
909 F(19200000, P_XO
, 1, 0, 0),
913 static struct clk_rcg2 hdmi_clk_src
= {
916 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
917 .freq_tbl
= ftbl_mdss_hdmi_clk
,
918 .clkr
.hw
.init
= &(struct clk_init_data
){
919 .name
= "hdmi_clk_src",
920 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
922 .ops
= &clk_rcg2_ops
,
926 static struct freq_tbl ftbl_mdss_vsync_clk
[] = {
927 F(19200000, P_XO
, 1, 0, 0),
931 static struct clk_rcg2 vsync_clk_src
= {
934 .parent_map
= mmcc_xo_mmpll0_mmpll1_gpll0_map
,
935 .freq_tbl
= ftbl_mdss_vsync_clk
,
936 .clkr
.hw
.init
= &(struct clk_init_data
){
937 .name
= "vsync_clk_src",
938 .parent_names
= mmcc_xo_mmpll0_mmpll1_gpll0
,
940 .ops
= &clk_rcg2_ops
,
944 static struct clk_branch camss_cci_cci_ahb_clk
= {
947 .enable_reg
= 0x3348,
948 .enable_mask
= BIT(0),
949 .hw
.init
= &(struct clk_init_data
){
950 .name
= "camss_cci_cci_ahb_clk",
951 .parent_names
= (const char *[]){
955 .ops
= &clk_branch2_ops
,
960 static struct clk_branch camss_cci_cci_clk
= {
963 .enable_reg
= 0x3344,
964 .enable_mask
= BIT(0),
965 .hw
.init
= &(struct clk_init_data
){
966 .name
= "camss_cci_cci_clk",
967 .parent_names
= (const char *[]){
971 .flags
= CLK_SET_RATE_PARENT
,
972 .ops
= &clk_branch2_ops
,
977 static struct clk_branch camss_csi0_ahb_clk
= {
980 .enable_reg
= 0x30bc,
981 .enable_mask
= BIT(0),
982 .hw
.init
= &(struct clk_init_data
){
983 .name
= "camss_csi0_ahb_clk",
984 .parent_names
= (const char *[]){
988 .ops
= &clk_branch2_ops
,
993 static struct clk_branch camss_csi0_clk
= {
996 .enable_reg
= 0x30b4,
997 .enable_mask
= BIT(0),
998 .hw
.init
= &(struct clk_init_data
){
999 .name
= "camss_csi0_clk",
1000 .parent_names
= (const char *[]){
1004 .flags
= CLK_SET_RATE_PARENT
,
1005 .ops
= &clk_branch2_ops
,
1010 static struct clk_branch camss_csi0phy_clk
= {
1013 .enable_reg
= 0x30c4,
1014 .enable_mask
= BIT(0),
1015 .hw
.init
= &(struct clk_init_data
){
1016 .name
= "camss_csi0phy_clk",
1017 .parent_names
= (const char *[]){
1021 .flags
= CLK_SET_RATE_PARENT
,
1022 .ops
= &clk_branch2_ops
,
1027 static struct clk_branch camss_csi0pix_clk
= {
1030 .enable_reg
= 0x30e4,
1031 .enable_mask
= BIT(0),
1032 .hw
.init
= &(struct clk_init_data
){
1033 .name
= "camss_csi0pix_clk",
1034 .parent_names
= (const char *[]){
1038 .flags
= CLK_SET_RATE_PARENT
,
1039 .ops
= &clk_branch2_ops
,
1044 static struct clk_branch camss_csi0rdi_clk
= {
1047 .enable_reg
= 0x30d4,
1048 .enable_mask
= BIT(0),
1049 .hw
.init
= &(struct clk_init_data
){
1050 .name
= "camss_csi0rdi_clk",
1051 .parent_names
= (const char *[]){
1055 .flags
= CLK_SET_RATE_PARENT
,
1056 .ops
= &clk_branch2_ops
,
1061 static struct clk_branch camss_csi1_ahb_clk
= {
1064 .enable_reg
= 0x3128,
1065 .enable_mask
= BIT(0),
1066 .hw
.init
= &(struct clk_init_data
){
1067 .name
= "camss_csi1_ahb_clk",
1068 .parent_names
= (const char *[]){
1072 .ops
= &clk_branch2_ops
,
1077 static struct clk_branch camss_csi1_clk
= {
1080 .enable_reg
= 0x3124,
1081 .enable_mask
= BIT(0),
1082 .hw
.init
= &(struct clk_init_data
){
1083 .name
= "camss_csi1_clk",
1084 .parent_names
= (const char *[]){
1088 .flags
= CLK_SET_RATE_PARENT
,
1089 .ops
= &clk_branch2_ops
,
1094 static struct clk_branch camss_csi1phy_clk
= {
1097 .enable_reg
= 0x3134,
1098 .enable_mask
= BIT(0),
1099 .hw
.init
= &(struct clk_init_data
){
1100 .name
= "camss_csi1phy_clk",
1101 .parent_names
= (const char *[]){
1105 .flags
= CLK_SET_RATE_PARENT
,
1106 .ops
= &clk_branch2_ops
,
1111 static struct clk_branch camss_csi1pix_clk
= {
1114 .enable_reg
= 0x3154,
1115 .enable_mask
= BIT(0),
1116 .hw
.init
= &(struct clk_init_data
){
1117 .name
= "camss_csi1pix_clk",
1118 .parent_names
= (const char *[]){
1122 .flags
= CLK_SET_RATE_PARENT
,
1123 .ops
= &clk_branch2_ops
,
1128 static struct clk_branch camss_csi1rdi_clk
= {
1131 .enable_reg
= 0x3144,
1132 .enable_mask
= BIT(0),
1133 .hw
.init
= &(struct clk_init_data
){
1134 .name
= "camss_csi1rdi_clk",
1135 .parent_names
= (const char *[]){
1139 .flags
= CLK_SET_RATE_PARENT
,
1140 .ops
= &clk_branch2_ops
,
1145 static struct clk_branch camss_csi2_ahb_clk
= {
1148 .enable_reg
= 0x3188,
1149 .enable_mask
= BIT(0),
1150 .hw
.init
= &(struct clk_init_data
){
1151 .name
= "camss_csi2_ahb_clk",
1152 .parent_names
= (const char *[]){
1156 .ops
= &clk_branch2_ops
,
1161 static struct clk_branch camss_csi2_clk
= {
1164 .enable_reg
= 0x3184,
1165 .enable_mask
= BIT(0),
1166 .hw
.init
= &(struct clk_init_data
){
1167 .name
= "camss_csi2_clk",
1168 .parent_names
= (const char *[]){
1172 .flags
= CLK_SET_RATE_PARENT
,
1173 .ops
= &clk_branch2_ops
,
1178 static struct clk_branch camss_csi2phy_clk
= {
1181 .enable_reg
= 0x3194,
1182 .enable_mask
= BIT(0),
1183 .hw
.init
= &(struct clk_init_data
){
1184 .name
= "camss_csi2phy_clk",
1185 .parent_names
= (const char *[]){
1189 .flags
= CLK_SET_RATE_PARENT
,
1190 .ops
= &clk_branch2_ops
,
1195 static struct clk_branch camss_csi2pix_clk
= {
1198 .enable_reg
= 0x31b4,
1199 .enable_mask
= BIT(0),
1200 .hw
.init
= &(struct clk_init_data
){
1201 .name
= "camss_csi2pix_clk",
1202 .parent_names
= (const char *[]){
1206 .flags
= CLK_SET_RATE_PARENT
,
1207 .ops
= &clk_branch2_ops
,
1212 static struct clk_branch camss_csi2rdi_clk
= {
1215 .enable_reg
= 0x31a4,
1216 .enable_mask
= BIT(0),
1217 .hw
.init
= &(struct clk_init_data
){
1218 .name
= "camss_csi2rdi_clk",
1219 .parent_names
= (const char *[]){
1223 .flags
= CLK_SET_RATE_PARENT
,
1224 .ops
= &clk_branch2_ops
,
1229 static struct clk_branch camss_csi3_ahb_clk
= {
1232 .enable_reg
= 0x31e8,
1233 .enable_mask
= BIT(0),
1234 .hw
.init
= &(struct clk_init_data
){
1235 .name
= "camss_csi3_ahb_clk",
1236 .parent_names
= (const char *[]){
1240 .ops
= &clk_branch2_ops
,
1245 static struct clk_branch camss_csi3_clk
= {
1248 .enable_reg
= 0x31e4,
1249 .enable_mask
= BIT(0),
1250 .hw
.init
= &(struct clk_init_data
){
1251 .name
= "camss_csi3_clk",
1252 .parent_names
= (const char *[]){
1256 .flags
= CLK_SET_RATE_PARENT
,
1257 .ops
= &clk_branch2_ops
,
1262 static struct clk_branch camss_csi3phy_clk
= {
1265 .enable_reg
= 0x31f4,
1266 .enable_mask
= BIT(0),
1267 .hw
.init
= &(struct clk_init_data
){
1268 .name
= "camss_csi3phy_clk",
1269 .parent_names
= (const char *[]){
1273 .flags
= CLK_SET_RATE_PARENT
,
1274 .ops
= &clk_branch2_ops
,
1279 static struct clk_branch camss_csi3pix_clk
= {
1282 .enable_reg
= 0x3214,
1283 .enable_mask
= BIT(0),
1284 .hw
.init
= &(struct clk_init_data
){
1285 .name
= "camss_csi3pix_clk",
1286 .parent_names
= (const char *[]){
1290 .flags
= CLK_SET_RATE_PARENT
,
1291 .ops
= &clk_branch2_ops
,
1296 static struct clk_branch camss_csi3rdi_clk
= {
1299 .enable_reg
= 0x3204,
1300 .enable_mask
= BIT(0),
1301 .hw
.init
= &(struct clk_init_data
){
1302 .name
= "camss_csi3rdi_clk",
1303 .parent_names
= (const char *[]){
1307 .flags
= CLK_SET_RATE_PARENT
,
1308 .ops
= &clk_branch2_ops
,
1313 static struct clk_branch camss_csi_vfe0_clk
= {
1316 .enable_reg
= 0x3704,
1317 .enable_mask
= BIT(0),
1318 .hw
.init
= &(struct clk_init_data
){
1319 .name
= "camss_csi_vfe0_clk",
1320 .parent_names
= (const char *[]){
1324 .flags
= CLK_SET_RATE_PARENT
,
1325 .ops
= &clk_branch2_ops
,
1330 static struct clk_branch camss_csi_vfe1_clk
= {
1333 .enable_reg
= 0x3714,
1334 .enable_mask
= BIT(0),
1335 .hw
.init
= &(struct clk_init_data
){
1336 .name
= "camss_csi_vfe1_clk",
1337 .parent_names
= (const char *[]){
1341 .flags
= CLK_SET_RATE_PARENT
,
1342 .ops
= &clk_branch2_ops
,
1347 static struct clk_branch camss_gp0_clk
= {
1350 .enable_reg
= 0x3444,
1351 .enable_mask
= BIT(0),
1352 .hw
.init
= &(struct clk_init_data
){
1353 .name
= "camss_gp0_clk",
1354 .parent_names
= (const char *[]){
1355 "camss_gp0_clk_src",
1358 .flags
= CLK_SET_RATE_PARENT
,
1359 .ops
= &clk_branch2_ops
,
1364 static struct clk_branch camss_gp1_clk
= {
1367 .enable_reg
= 0x3474,
1368 .enable_mask
= BIT(0),
1369 .hw
.init
= &(struct clk_init_data
){
1370 .name
= "camss_gp1_clk",
1371 .parent_names
= (const char *[]){
1372 "camss_gp1_clk_src",
1375 .flags
= CLK_SET_RATE_PARENT
,
1376 .ops
= &clk_branch2_ops
,
1381 static struct clk_branch camss_ispif_ahb_clk
= {
1384 .enable_reg
= 0x3224,
1385 .enable_mask
= BIT(0),
1386 .hw
.init
= &(struct clk_init_data
){
1387 .name
= "camss_ispif_ahb_clk",
1388 .parent_names
= (const char *[]){
1392 .ops
= &clk_branch2_ops
,
1397 static struct clk_branch camss_jpeg_jpeg0_clk
= {
1400 .enable_reg
= 0x35a8,
1401 .enable_mask
= BIT(0),
1402 .hw
.init
= &(struct clk_init_data
){
1403 .name
= "camss_jpeg_jpeg0_clk",
1404 .parent_names
= (const char *[]){
1408 .flags
= CLK_SET_RATE_PARENT
,
1409 .ops
= &clk_branch2_ops
,
1414 static struct clk_branch camss_jpeg_jpeg1_clk
= {
1417 .enable_reg
= 0x35ac,
1418 .enable_mask
= BIT(0),
1419 .hw
.init
= &(struct clk_init_data
){
1420 .name
= "camss_jpeg_jpeg1_clk",
1421 .parent_names
= (const char *[]){
1425 .flags
= CLK_SET_RATE_PARENT
,
1426 .ops
= &clk_branch2_ops
,
1431 static struct clk_branch camss_jpeg_jpeg2_clk
= {
1434 .enable_reg
= 0x35b0,
1435 .enable_mask
= BIT(0),
1436 .hw
.init
= &(struct clk_init_data
){
1437 .name
= "camss_jpeg_jpeg2_clk",
1438 .parent_names
= (const char *[]){
1442 .flags
= CLK_SET_RATE_PARENT
,
1443 .ops
= &clk_branch2_ops
,
1448 static struct clk_branch camss_jpeg_jpeg_ahb_clk
= {
1451 .enable_reg
= 0x35b4,
1452 .enable_mask
= BIT(0),
1453 .hw
.init
= &(struct clk_init_data
){
1454 .name
= "camss_jpeg_jpeg_ahb_clk",
1455 .parent_names
= (const char *[]){
1459 .ops
= &clk_branch2_ops
,
1464 static struct clk_branch camss_jpeg_jpeg_axi_clk
= {
1467 .enable_reg
= 0x35b8,
1468 .enable_mask
= BIT(0),
1469 .hw
.init
= &(struct clk_init_data
){
1470 .name
= "camss_jpeg_jpeg_axi_clk",
1471 .parent_names
= (const char *[]){
1475 .ops
= &clk_branch2_ops
,
1480 static struct clk_branch camss_jpeg_jpeg_ocmemnoc_clk
= {
1483 .enable_reg
= 0x35bc,
1484 .enable_mask
= BIT(0),
1485 .hw
.init
= &(struct clk_init_data
){
1486 .name
= "camss_jpeg_jpeg_ocmemnoc_clk",
1487 .parent_names
= (const char *[]){
1491 .flags
= CLK_SET_RATE_PARENT
,
1492 .ops
= &clk_branch2_ops
,
1497 static struct clk_branch camss_mclk0_clk
= {
1500 .enable_reg
= 0x3384,
1501 .enable_mask
= BIT(0),
1502 .hw
.init
= &(struct clk_init_data
){
1503 .name
= "camss_mclk0_clk",
1504 .parent_names
= (const char *[]){
1508 .flags
= CLK_SET_RATE_PARENT
,
1509 .ops
= &clk_branch2_ops
,
1514 static struct clk_branch camss_mclk1_clk
= {
1517 .enable_reg
= 0x33b4,
1518 .enable_mask
= BIT(0),
1519 .hw
.init
= &(struct clk_init_data
){
1520 .name
= "camss_mclk1_clk",
1521 .parent_names
= (const char *[]){
1525 .flags
= CLK_SET_RATE_PARENT
,
1526 .ops
= &clk_branch2_ops
,
1531 static struct clk_branch camss_mclk2_clk
= {
1534 .enable_reg
= 0x33e4,
1535 .enable_mask
= BIT(0),
1536 .hw
.init
= &(struct clk_init_data
){
1537 .name
= "camss_mclk2_clk",
1538 .parent_names
= (const char *[]){
1542 .flags
= CLK_SET_RATE_PARENT
,
1543 .ops
= &clk_branch2_ops
,
1548 static struct clk_branch camss_mclk3_clk
= {
1551 .enable_reg
= 0x3414,
1552 .enable_mask
= BIT(0),
1553 .hw
.init
= &(struct clk_init_data
){
1554 .name
= "camss_mclk3_clk",
1555 .parent_names
= (const char *[]){
1559 .flags
= CLK_SET_RATE_PARENT
,
1560 .ops
= &clk_branch2_ops
,
1565 static struct clk_branch camss_micro_ahb_clk
= {
1568 .enable_reg
= 0x3494,
1569 .enable_mask
= BIT(0),
1570 .hw
.init
= &(struct clk_init_data
){
1571 .name
= "camss_micro_ahb_clk",
1572 .parent_names
= (const char *[]){
1576 .ops
= &clk_branch2_ops
,
1581 static struct clk_branch camss_phy0_csi0phytimer_clk
= {
1584 .enable_reg
= 0x3024,
1585 .enable_mask
= BIT(0),
1586 .hw
.init
= &(struct clk_init_data
){
1587 .name
= "camss_phy0_csi0phytimer_clk",
1588 .parent_names
= (const char *[]){
1589 "csi0phytimer_clk_src",
1592 .flags
= CLK_SET_RATE_PARENT
,
1593 .ops
= &clk_branch2_ops
,
1598 static struct clk_branch camss_phy1_csi1phytimer_clk
= {
1601 .enable_reg
= 0x3054,
1602 .enable_mask
= BIT(0),
1603 .hw
.init
= &(struct clk_init_data
){
1604 .name
= "camss_phy1_csi1phytimer_clk",
1605 .parent_names
= (const char *[]){
1606 "csi1phytimer_clk_src",
1609 .flags
= CLK_SET_RATE_PARENT
,
1610 .ops
= &clk_branch2_ops
,
1615 static struct clk_branch camss_phy2_csi2phytimer_clk
= {
1618 .enable_reg
= 0x3084,
1619 .enable_mask
= BIT(0),
1620 .hw
.init
= &(struct clk_init_data
){
1621 .name
= "camss_phy2_csi2phytimer_clk",
1622 .parent_names
= (const char *[]){
1623 "csi2phytimer_clk_src",
1626 .flags
= CLK_SET_RATE_PARENT
,
1627 .ops
= &clk_branch2_ops
,
1632 static struct clk_branch camss_top_ahb_clk
= {
1635 .enable_reg
= 0x3484,
1636 .enable_mask
= BIT(0),
1637 .hw
.init
= &(struct clk_init_data
){
1638 .name
= "camss_top_ahb_clk",
1639 .parent_names
= (const char *[]){
1643 .ops
= &clk_branch2_ops
,
1648 static struct clk_branch camss_vfe_cpp_ahb_clk
= {
1651 .enable_reg
= 0x36b4,
1652 .enable_mask
= BIT(0),
1653 .hw
.init
= &(struct clk_init_data
){
1654 .name
= "camss_vfe_cpp_ahb_clk",
1655 .parent_names
= (const char *[]){
1659 .ops
= &clk_branch2_ops
,
1664 static struct clk_branch camss_vfe_cpp_clk
= {
1667 .enable_reg
= 0x36b0,
1668 .enable_mask
= BIT(0),
1669 .hw
.init
= &(struct clk_init_data
){
1670 .name
= "camss_vfe_cpp_clk",
1671 .parent_names
= (const char *[]){
1675 .flags
= CLK_SET_RATE_PARENT
,
1676 .ops
= &clk_branch2_ops
,
1681 static struct clk_branch camss_vfe_vfe0_clk
= {
1684 .enable_reg
= 0x36a8,
1685 .enable_mask
= BIT(0),
1686 .hw
.init
= &(struct clk_init_data
){
1687 .name
= "camss_vfe_vfe0_clk",
1688 .parent_names
= (const char *[]){
1692 .flags
= CLK_SET_RATE_PARENT
,
1693 .ops
= &clk_branch2_ops
,
1698 static struct clk_branch camss_vfe_vfe1_clk
= {
1701 .enable_reg
= 0x36ac,
1702 .enable_mask
= BIT(0),
1703 .hw
.init
= &(struct clk_init_data
){
1704 .name
= "camss_vfe_vfe1_clk",
1705 .parent_names
= (const char *[]){
1709 .flags
= CLK_SET_RATE_PARENT
,
1710 .ops
= &clk_branch2_ops
,
1715 static struct clk_branch camss_vfe_vfe_ahb_clk
= {
1718 .enable_reg
= 0x36b8,
1719 .enable_mask
= BIT(0),
1720 .hw
.init
= &(struct clk_init_data
){
1721 .name
= "camss_vfe_vfe_ahb_clk",
1722 .parent_names
= (const char *[]){
1726 .ops
= &clk_branch2_ops
,
1731 static struct clk_branch camss_vfe_vfe_axi_clk
= {
1734 .enable_reg
= 0x36bc,
1735 .enable_mask
= BIT(0),
1736 .hw
.init
= &(struct clk_init_data
){
1737 .name
= "camss_vfe_vfe_axi_clk",
1738 .parent_names
= (const char *[]){
1742 .ops
= &clk_branch2_ops
,
1747 static struct clk_branch camss_vfe_vfe_ocmemnoc_clk
= {
1750 .enable_reg
= 0x36c0,
1751 .enable_mask
= BIT(0),
1752 .hw
.init
= &(struct clk_init_data
){
1753 .name
= "camss_vfe_vfe_ocmemnoc_clk",
1754 .parent_names
= (const char *[]){
1758 .flags
= CLK_SET_RATE_PARENT
,
1759 .ops
= &clk_branch2_ops
,
1764 static struct clk_branch mdss_ahb_clk
= {
1767 .enable_reg
= 0x2308,
1768 .enable_mask
= BIT(0),
1769 .hw
.init
= &(struct clk_init_data
){
1770 .name
= "mdss_ahb_clk",
1771 .parent_names
= (const char *[]){
1775 .ops
= &clk_branch2_ops
,
1780 static struct clk_branch mdss_axi_clk
= {
1783 .enable_reg
= 0x2310,
1784 .enable_mask
= BIT(0),
1785 .hw
.init
= &(struct clk_init_data
){
1786 .name
= "mdss_axi_clk",
1787 .parent_names
= (const char *[]){
1791 .flags
= CLK_SET_RATE_PARENT
,
1792 .ops
= &clk_branch2_ops
,
1797 static struct clk_branch mdss_byte0_clk
= {
1800 .enable_reg
= 0x233c,
1801 .enable_mask
= BIT(0),
1802 .hw
.init
= &(struct clk_init_data
){
1803 .name
= "mdss_byte0_clk",
1804 .parent_names
= (const char *[]){
1808 .flags
= CLK_SET_RATE_PARENT
,
1809 .ops
= &clk_branch2_ops
,
1814 static struct clk_branch mdss_byte1_clk
= {
1817 .enable_reg
= 0x2340,
1818 .enable_mask
= BIT(0),
1819 .hw
.init
= &(struct clk_init_data
){
1820 .name
= "mdss_byte1_clk",
1821 .parent_names
= (const char *[]){
1825 .flags
= CLK_SET_RATE_PARENT
,
1826 .ops
= &clk_branch2_ops
,
1831 static struct clk_branch mdss_edpaux_clk
= {
1834 .enable_reg
= 0x2334,
1835 .enable_mask
= BIT(0),
1836 .hw
.init
= &(struct clk_init_data
){
1837 .name
= "mdss_edpaux_clk",
1838 .parent_names
= (const char *[]){
1842 .flags
= CLK_SET_RATE_PARENT
,
1843 .ops
= &clk_branch2_ops
,
1848 static struct clk_branch mdss_edplink_clk
= {
1851 .enable_reg
= 0x2330,
1852 .enable_mask
= BIT(0),
1853 .hw
.init
= &(struct clk_init_data
){
1854 .name
= "mdss_edplink_clk",
1855 .parent_names
= (const char *[]){
1859 .flags
= CLK_SET_RATE_PARENT
,
1860 .ops
= &clk_branch2_ops
,
1865 static struct clk_branch mdss_edppixel_clk
= {
1868 .enable_reg
= 0x232c,
1869 .enable_mask
= BIT(0),
1870 .hw
.init
= &(struct clk_init_data
){
1871 .name
= "mdss_edppixel_clk",
1872 .parent_names
= (const char *[]){
1876 .flags
= CLK_SET_RATE_PARENT
,
1877 .ops
= &clk_branch2_ops
,
1882 static struct clk_branch mdss_esc0_clk
= {
1885 .enable_reg
= 0x2344,
1886 .enable_mask
= BIT(0),
1887 .hw
.init
= &(struct clk_init_data
){
1888 .name
= "mdss_esc0_clk",
1889 .parent_names
= (const char *[]){
1893 .flags
= CLK_SET_RATE_PARENT
,
1894 .ops
= &clk_branch2_ops
,
1899 static struct clk_branch mdss_esc1_clk
= {
1902 .enable_reg
= 0x2348,
1903 .enable_mask
= BIT(0),
1904 .hw
.init
= &(struct clk_init_data
){
1905 .name
= "mdss_esc1_clk",
1906 .parent_names
= (const char *[]){
1910 .flags
= CLK_SET_RATE_PARENT
,
1911 .ops
= &clk_branch2_ops
,
1916 static struct clk_branch mdss_extpclk_clk
= {
1919 .enable_reg
= 0x2324,
1920 .enable_mask
= BIT(0),
1921 .hw
.init
= &(struct clk_init_data
){
1922 .name
= "mdss_extpclk_clk",
1923 .parent_names
= (const char *[]){
1927 .flags
= CLK_SET_RATE_PARENT
,
1928 .ops
= &clk_branch2_ops
,
1933 static struct clk_branch mdss_hdmi_ahb_clk
= {
1936 .enable_reg
= 0x230c,
1937 .enable_mask
= BIT(0),
1938 .hw
.init
= &(struct clk_init_data
){
1939 .name
= "mdss_hdmi_ahb_clk",
1940 .parent_names
= (const char *[]){
1944 .ops
= &clk_branch2_ops
,
1949 static struct clk_branch mdss_hdmi_clk
= {
1952 .enable_reg
= 0x2338,
1953 .enable_mask
= BIT(0),
1954 .hw
.init
= &(struct clk_init_data
){
1955 .name
= "mdss_hdmi_clk",
1956 .parent_names
= (const char *[]){
1960 .flags
= CLK_SET_RATE_PARENT
,
1961 .ops
= &clk_branch2_ops
,
1966 static struct clk_branch mdss_mdp_clk
= {
1969 .enable_reg
= 0x231c,
1970 .enable_mask
= BIT(0),
1971 .hw
.init
= &(struct clk_init_data
){
1972 .name
= "mdss_mdp_clk",
1973 .parent_names
= (const char *[]){
1977 .flags
= CLK_SET_RATE_PARENT
,
1978 .ops
= &clk_branch2_ops
,
1983 static struct clk_branch mdss_mdp_lut_clk
= {
1986 .enable_reg
= 0x2320,
1987 .enable_mask
= BIT(0),
1988 .hw
.init
= &(struct clk_init_data
){
1989 .name
= "mdss_mdp_lut_clk",
1990 .parent_names
= (const char *[]){
1994 .flags
= CLK_SET_RATE_PARENT
,
1995 .ops
= &clk_branch2_ops
,
2000 static struct clk_branch mdss_pclk0_clk
= {
2003 .enable_reg
= 0x2314,
2004 .enable_mask
= BIT(0),
2005 .hw
.init
= &(struct clk_init_data
){
2006 .name
= "mdss_pclk0_clk",
2007 .parent_names
= (const char *[]){
2011 .flags
= CLK_SET_RATE_PARENT
,
2012 .ops
= &clk_branch2_ops
,
2017 static struct clk_branch mdss_pclk1_clk
= {
2020 .enable_reg
= 0x2318,
2021 .enable_mask
= BIT(0),
2022 .hw
.init
= &(struct clk_init_data
){
2023 .name
= "mdss_pclk1_clk",
2024 .parent_names
= (const char *[]){
2028 .flags
= CLK_SET_RATE_PARENT
,
2029 .ops
= &clk_branch2_ops
,
2034 static struct clk_branch mdss_vsync_clk
= {
2037 .enable_reg
= 0x2328,
2038 .enable_mask
= BIT(0),
2039 .hw
.init
= &(struct clk_init_data
){
2040 .name
= "mdss_vsync_clk",
2041 .parent_names
= (const char *[]){
2045 .flags
= CLK_SET_RATE_PARENT
,
2046 .ops
= &clk_branch2_ops
,
2051 static struct clk_branch mmss_misc_ahb_clk
= {
2054 .enable_reg
= 0x502c,
2055 .enable_mask
= BIT(0),
2056 .hw
.init
= &(struct clk_init_data
){
2057 .name
= "mmss_misc_ahb_clk",
2058 .parent_names
= (const char *[]){
2062 .ops
= &clk_branch2_ops
,
2067 static struct clk_branch mmss_mmssnoc_ahb_clk
= {
2070 .enable_reg
= 0x5024,
2071 .enable_mask
= BIT(0),
2072 .hw
.init
= &(struct clk_init_data
){
2073 .name
= "mmss_mmssnoc_ahb_clk",
2074 .parent_names
= (const char *[]){
2078 .ops
= &clk_branch2_ops
,
2079 .flags
= CLK_IGNORE_UNUSED
,
2084 static struct clk_branch mmss_mmssnoc_bto_ahb_clk
= {
2087 .enable_reg
= 0x5028,
2088 .enable_mask
= BIT(0),
2089 .hw
.init
= &(struct clk_init_data
){
2090 .name
= "mmss_mmssnoc_bto_ahb_clk",
2091 .parent_names
= (const char *[]){
2095 .ops
= &clk_branch2_ops
,
2096 .flags
= CLK_IGNORE_UNUSED
,
2101 static struct clk_branch mmss_mmssnoc_axi_clk
= {
2104 .enable_reg
= 0x506c,
2105 .enable_mask
= BIT(0),
2106 .hw
.init
= &(struct clk_init_data
){
2107 .name
= "mmss_mmssnoc_axi_clk",
2108 .parent_names
= (const char *[]){
2112 .flags
= CLK_SET_RATE_PARENT
| CLK_IGNORE_UNUSED
,
2113 .ops
= &clk_branch2_ops
,
2118 static struct clk_branch mmss_s0_axi_clk
= {
2121 .enable_reg
= 0x5064,
2122 .enable_mask
= BIT(0),
2123 .hw
.init
= &(struct clk_init_data
){
2124 .name
= "mmss_s0_axi_clk",
2125 .parent_names
= (const char *[]){
2129 .ops
= &clk_branch2_ops
,
2130 .flags
= CLK_IGNORE_UNUSED
,
2135 static struct clk_branch ocmemcx_ahb_clk
= {
2138 .enable_reg
= 0x405c,
2139 .enable_mask
= BIT(0),
2140 .hw
.init
= &(struct clk_init_data
){
2141 .name
= "ocmemcx_ahb_clk",
2142 .parent_names
= (const char *[]){
2146 .ops
= &clk_branch2_ops
,
2151 static struct clk_branch ocmemcx_ocmemnoc_clk
= {
2154 .enable_reg
= 0x4058,
2155 .enable_mask
= BIT(0),
2156 .hw
.init
= &(struct clk_init_data
){
2157 .name
= "ocmemcx_ocmemnoc_clk",
2158 .parent_names
= (const char *[]){
2162 .flags
= CLK_SET_RATE_PARENT
,
2163 .ops
= &clk_branch2_ops
,
2168 static struct clk_branch oxili_ocmemgx_clk
= {
2171 .enable_reg
= 0x402c,
2172 .enable_mask
= BIT(0),
2173 .hw
.init
= &(struct clk_init_data
){
2174 .name
= "oxili_ocmemgx_clk",
2175 .parent_names
= (const char *[]){
2179 .flags
= CLK_SET_RATE_PARENT
,
2180 .ops
= &clk_branch2_ops
,
2185 static struct clk_branch ocmemnoc_clk
= {
2188 .enable_reg
= 0x50b4,
2189 .enable_mask
= BIT(0),
2190 .hw
.init
= &(struct clk_init_data
){
2191 .name
= "ocmemnoc_clk",
2192 .parent_names
= (const char *[]){
2196 .flags
= CLK_SET_RATE_PARENT
,
2197 .ops
= &clk_branch2_ops
,
2202 static struct clk_branch oxili_gfx3d_clk
= {
2205 .enable_reg
= 0x4028,
2206 .enable_mask
= BIT(0),
2207 .hw
.init
= &(struct clk_init_data
){
2208 .name
= "oxili_gfx3d_clk",
2209 .parent_names
= (const char *[]){
2213 .flags
= CLK_SET_RATE_PARENT
,
2214 .ops
= &clk_branch2_ops
,
2219 static struct clk_branch oxilicx_ahb_clk
= {
2222 .enable_reg
= 0x403c,
2223 .enable_mask
= BIT(0),
2224 .hw
.init
= &(struct clk_init_data
){
2225 .name
= "oxilicx_ahb_clk",
2226 .parent_names
= (const char *[]){
2230 .ops
= &clk_branch2_ops
,
2235 static struct clk_branch oxilicx_axi_clk
= {
2238 .enable_reg
= 0x4038,
2239 .enable_mask
= BIT(0),
2240 .hw
.init
= &(struct clk_init_data
){
2241 .name
= "oxilicx_axi_clk",
2242 .parent_names
= (const char *[]){
2246 .ops
= &clk_branch2_ops
,
2251 static struct clk_branch venus0_ahb_clk
= {
2254 .enable_reg
= 0x1030,
2255 .enable_mask
= BIT(0),
2256 .hw
.init
= &(struct clk_init_data
){
2257 .name
= "venus0_ahb_clk",
2258 .parent_names
= (const char *[]){
2262 .ops
= &clk_branch2_ops
,
2267 static struct clk_branch venus0_axi_clk
= {
2270 .enable_reg
= 0x1034,
2271 .enable_mask
= BIT(0),
2272 .hw
.init
= &(struct clk_init_data
){
2273 .name
= "venus0_axi_clk",
2274 .parent_names
= (const char *[]){
2278 .ops
= &clk_branch2_ops
,
2283 static struct clk_branch venus0_ocmemnoc_clk
= {
2286 .enable_reg
= 0x1038,
2287 .enable_mask
= BIT(0),
2288 .hw
.init
= &(struct clk_init_data
){
2289 .name
= "venus0_ocmemnoc_clk",
2290 .parent_names
= (const char *[]){
2294 .flags
= CLK_SET_RATE_PARENT
,
2295 .ops
= &clk_branch2_ops
,
2300 static struct clk_branch venus0_vcodec0_clk
= {
2303 .enable_reg
= 0x1028,
2304 .enable_mask
= BIT(0),
2305 .hw
.init
= &(struct clk_init_data
){
2306 .name
= "venus0_vcodec0_clk",
2307 .parent_names
= (const char *[]){
2311 .flags
= CLK_SET_RATE_PARENT
,
2312 .ops
= &clk_branch2_ops
,
2317 static const struct pll_config mmpll1_config
= {
2322 .vco_mask
= 0x3 << 20,
2324 .pre_div_mask
= 0x7 << 12,
2325 .post_div_val
= 0x0,
2326 .post_div_mask
= 0x3 << 8,
2327 .mn_ena_mask
= BIT(24),
2328 .main_output_mask
= BIT(0),
2331 static struct pll_config mmpll3_config
= {
2336 .vco_mask
= 0x3 << 20,
2338 .pre_div_mask
= 0x7 << 12,
2339 .post_div_val
= 0x0,
2340 .post_div_mask
= 0x3 << 8,
2341 .mn_ena_mask
= BIT(24),
2342 .main_output_mask
= BIT(0),
2343 .aux_output_mask
= BIT(1),
2346 static struct gdsc venus0_gdsc
= {
2348 .cxcs
= (unsigned int []){ 0x1028 },
2350 .resets
= (unsigned int []){ VENUS0_RESET
},
2355 .pwrsts
= PWRSTS_ON
,
2358 static struct gdsc mdss_gdsc
= {
2360 .cxcs
= (unsigned int []){ 0x231c, 0x2320 },
2365 .pwrsts
= PWRSTS_RET_ON
,
2368 static struct gdsc camss_jpeg_gdsc
= {
2370 .cxcs
= (unsigned int []){ 0x35a8, 0x35ac, 0x35b0 },
2373 .name
= "camss_jpeg",
2375 .pwrsts
= PWRSTS_OFF_ON
,
2378 static struct gdsc camss_vfe_gdsc
= {
2380 .cxcs
= (unsigned int []){ 0x36a8, 0x36ac, 0x3704, 0x3714, 0x36b0 },
2383 .name
= "camss_vfe",
2385 .pwrsts
= PWRSTS_OFF_ON
,
2388 static struct gdsc oxili_gdsc
= {
2390 .cxcs
= (unsigned int []){ 0x4028 },
2395 .pwrsts
= PWRSTS_OFF_ON
,
2398 static struct gdsc oxilicx_gdsc
= {
2403 .parent
= &oxili_gdsc
.pd
,
2404 .pwrsts
= PWRSTS_OFF_ON
,
2407 static struct clk_regmap
*mmcc_msm8974_clocks
[] = {
2408 [MMSS_AHB_CLK_SRC
] = &mmss_ahb_clk_src
.clkr
,
2409 [MMSS_AXI_CLK_SRC
] = &mmss_axi_clk_src
.clkr
,
2410 [OCMEMNOC_CLK_SRC
] = &ocmemnoc_clk_src
.clkr
,
2411 [MMPLL0
] = &mmpll0
.clkr
,
2412 [MMPLL0_VOTE
] = &mmpll0_vote
,
2413 [MMPLL1
] = &mmpll1
.clkr
,
2414 [MMPLL1_VOTE
] = &mmpll1_vote
,
2415 [MMPLL2
] = &mmpll2
.clkr
,
2416 [MMPLL3
] = &mmpll3
.clkr
,
2417 [CSI0_CLK_SRC
] = &csi0_clk_src
.clkr
,
2418 [CSI1_CLK_SRC
] = &csi1_clk_src
.clkr
,
2419 [CSI2_CLK_SRC
] = &csi2_clk_src
.clkr
,
2420 [CSI3_CLK_SRC
] = &csi3_clk_src
.clkr
,
2421 [VFE0_CLK_SRC
] = &vfe0_clk_src
.clkr
,
2422 [VFE1_CLK_SRC
] = &vfe1_clk_src
.clkr
,
2423 [MDP_CLK_SRC
] = &mdp_clk_src
.clkr
,
2424 [GFX3D_CLK_SRC
] = &gfx3d_clk_src
.clkr
,
2425 [JPEG0_CLK_SRC
] = &jpeg0_clk_src
.clkr
,
2426 [JPEG1_CLK_SRC
] = &jpeg1_clk_src
.clkr
,
2427 [JPEG2_CLK_SRC
] = &jpeg2_clk_src
.clkr
,
2428 [PCLK0_CLK_SRC
] = &pclk0_clk_src
.clkr
,
2429 [PCLK1_CLK_SRC
] = &pclk1_clk_src
.clkr
,
2430 [VCODEC0_CLK_SRC
] = &vcodec0_clk_src
.clkr
,
2431 [CCI_CLK_SRC
] = &cci_clk_src
.clkr
,
2432 [CAMSS_GP0_CLK_SRC
] = &camss_gp0_clk_src
.clkr
,
2433 [CAMSS_GP1_CLK_SRC
] = &camss_gp1_clk_src
.clkr
,
2434 [MCLK0_CLK_SRC
] = &mclk0_clk_src
.clkr
,
2435 [MCLK1_CLK_SRC
] = &mclk1_clk_src
.clkr
,
2436 [MCLK2_CLK_SRC
] = &mclk2_clk_src
.clkr
,
2437 [MCLK3_CLK_SRC
] = &mclk3_clk_src
.clkr
,
2438 [CSI0PHYTIMER_CLK_SRC
] = &csi0phytimer_clk_src
.clkr
,
2439 [CSI1PHYTIMER_CLK_SRC
] = &csi1phytimer_clk_src
.clkr
,
2440 [CSI2PHYTIMER_CLK_SRC
] = &csi2phytimer_clk_src
.clkr
,
2441 [CPP_CLK_SRC
] = &cpp_clk_src
.clkr
,
2442 [BYTE0_CLK_SRC
] = &byte0_clk_src
.clkr
,
2443 [BYTE1_CLK_SRC
] = &byte1_clk_src
.clkr
,
2444 [EDPAUX_CLK_SRC
] = &edpaux_clk_src
.clkr
,
2445 [EDPLINK_CLK_SRC
] = &edplink_clk_src
.clkr
,
2446 [EDPPIXEL_CLK_SRC
] = &edppixel_clk_src
.clkr
,
2447 [ESC0_CLK_SRC
] = &esc0_clk_src
.clkr
,
2448 [ESC1_CLK_SRC
] = &esc1_clk_src
.clkr
,
2449 [EXTPCLK_CLK_SRC
] = &extpclk_clk_src
.clkr
,
2450 [HDMI_CLK_SRC
] = &hdmi_clk_src
.clkr
,
2451 [VSYNC_CLK_SRC
] = &vsync_clk_src
.clkr
,
2452 [CAMSS_CCI_CCI_AHB_CLK
] = &camss_cci_cci_ahb_clk
.clkr
,
2453 [CAMSS_CCI_CCI_CLK
] = &camss_cci_cci_clk
.clkr
,
2454 [CAMSS_CSI0_AHB_CLK
] = &camss_csi0_ahb_clk
.clkr
,
2455 [CAMSS_CSI0_CLK
] = &camss_csi0_clk
.clkr
,
2456 [CAMSS_CSI0PHY_CLK
] = &camss_csi0phy_clk
.clkr
,
2457 [CAMSS_CSI0PIX_CLK
] = &camss_csi0pix_clk
.clkr
,
2458 [CAMSS_CSI0RDI_CLK
] = &camss_csi0rdi_clk
.clkr
,
2459 [CAMSS_CSI1_AHB_CLK
] = &camss_csi1_ahb_clk
.clkr
,
2460 [CAMSS_CSI1_CLK
] = &camss_csi1_clk
.clkr
,
2461 [CAMSS_CSI1PHY_CLK
] = &camss_csi1phy_clk
.clkr
,
2462 [CAMSS_CSI1PIX_CLK
] = &camss_csi1pix_clk
.clkr
,
2463 [CAMSS_CSI1RDI_CLK
] = &camss_csi1rdi_clk
.clkr
,
2464 [CAMSS_CSI2_AHB_CLK
] = &camss_csi2_ahb_clk
.clkr
,
2465 [CAMSS_CSI2_CLK
] = &camss_csi2_clk
.clkr
,
2466 [CAMSS_CSI2PHY_CLK
] = &camss_csi2phy_clk
.clkr
,
2467 [CAMSS_CSI2PIX_CLK
] = &camss_csi2pix_clk
.clkr
,
2468 [CAMSS_CSI2RDI_CLK
] = &camss_csi2rdi_clk
.clkr
,
2469 [CAMSS_CSI3_AHB_CLK
] = &camss_csi3_ahb_clk
.clkr
,
2470 [CAMSS_CSI3_CLK
] = &camss_csi3_clk
.clkr
,
2471 [CAMSS_CSI3PHY_CLK
] = &camss_csi3phy_clk
.clkr
,
2472 [CAMSS_CSI3PIX_CLK
] = &camss_csi3pix_clk
.clkr
,
2473 [CAMSS_CSI3RDI_CLK
] = &camss_csi3rdi_clk
.clkr
,
2474 [CAMSS_CSI_VFE0_CLK
] = &camss_csi_vfe0_clk
.clkr
,
2475 [CAMSS_CSI_VFE1_CLK
] = &camss_csi_vfe1_clk
.clkr
,
2476 [CAMSS_GP0_CLK
] = &camss_gp0_clk
.clkr
,
2477 [CAMSS_GP1_CLK
] = &camss_gp1_clk
.clkr
,
2478 [CAMSS_ISPIF_AHB_CLK
] = &camss_ispif_ahb_clk
.clkr
,
2479 [CAMSS_JPEG_JPEG0_CLK
] = &camss_jpeg_jpeg0_clk
.clkr
,
2480 [CAMSS_JPEG_JPEG1_CLK
] = &camss_jpeg_jpeg1_clk
.clkr
,
2481 [CAMSS_JPEG_JPEG2_CLK
] = &camss_jpeg_jpeg2_clk
.clkr
,
2482 [CAMSS_JPEG_JPEG_AHB_CLK
] = &camss_jpeg_jpeg_ahb_clk
.clkr
,
2483 [CAMSS_JPEG_JPEG_AXI_CLK
] = &camss_jpeg_jpeg_axi_clk
.clkr
,
2484 [CAMSS_JPEG_JPEG_OCMEMNOC_CLK
] = &camss_jpeg_jpeg_ocmemnoc_clk
.clkr
,
2485 [CAMSS_MCLK0_CLK
] = &camss_mclk0_clk
.clkr
,
2486 [CAMSS_MCLK1_CLK
] = &camss_mclk1_clk
.clkr
,
2487 [CAMSS_MCLK2_CLK
] = &camss_mclk2_clk
.clkr
,
2488 [CAMSS_MCLK3_CLK
] = &camss_mclk3_clk
.clkr
,
2489 [CAMSS_MICRO_AHB_CLK
] = &camss_micro_ahb_clk
.clkr
,
2490 [CAMSS_PHY0_CSI0PHYTIMER_CLK
] = &camss_phy0_csi0phytimer_clk
.clkr
,
2491 [CAMSS_PHY1_CSI1PHYTIMER_CLK
] = &camss_phy1_csi1phytimer_clk
.clkr
,
2492 [CAMSS_PHY2_CSI2PHYTIMER_CLK
] = &camss_phy2_csi2phytimer_clk
.clkr
,
2493 [CAMSS_TOP_AHB_CLK
] = &camss_top_ahb_clk
.clkr
,
2494 [CAMSS_VFE_CPP_AHB_CLK
] = &camss_vfe_cpp_ahb_clk
.clkr
,
2495 [CAMSS_VFE_CPP_CLK
] = &camss_vfe_cpp_clk
.clkr
,
2496 [CAMSS_VFE_VFE0_CLK
] = &camss_vfe_vfe0_clk
.clkr
,
2497 [CAMSS_VFE_VFE1_CLK
] = &camss_vfe_vfe1_clk
.clkr
,
2498 [CAMSS_VFE_VFE_AHB_CLK
] = &camss_vfe_vfe_ahb_clk
.clkr
,
2499 [CAMSS_VFE_VFE_AXI_CLK
] = &camss_vfe_vfe_axi_clk
.clkr
,
2500 [CAMSS_VFE_VFE_OCMEMNOC_CLK
] = &camss_vfe_vfe_ocmemnoc_clk
.clkr
,
2501 [MDSS_AHB_CLK
] = &mdss_ahb_clk
.clkr
,
2502 [MDSS_AXI_CLK
] = &mdss_axi_clk
.clkr
,
2503 [MDSS_BYTE0_CLK
] = &mdss_byte0_clk
.clkr
,
2504 [MDSS_BYTE1_CLK
] = &mdss_byte1_clk
.clkr
,
2505 [MDSS_EDPAUX_CLK
] = &mdss_edpaux_clk
.clkr
,
2506 [MDSS_EDPLINK_CLK
] = &mdss_edplink_clk
.clkr
,
2507 [MDSS_EDPPIXEL_CLK
] = &mdss_edppixel_clk
.clkr
,
2508 [MDSS_ESC0_CLK
] = &mdss_esc0_clk
.clkr
,
2509 [MDSS_ESC1_CLK
] = &mdss_esc1_clk
.clkr
,
2510 [MDSS_EXTPCLK_CLK
] = &mdss_extpclk_clk
.clkr
,
2511 [MDSS_HDMI_AHB_CLK
] = &mdss_hdmi_ahb_clk
.clkr
,
2512 [MDSS_HDMI_CLK
] = &mdss_hdmi_clk
.clkr
,
2513 [MDSS_MDP_CLK
] = &mdss_mdp_clk
.clkr
,
2514 [MDSS_MDP_LUT_CLK
] = &mdss_mdp_lut_clk
.clkr
,
2515 [MDSS_PCLK0_CLK
] = &mdss_pclk0_clk
.clkr
,
2516 [MDSS_PCLK1_CLK
] = &mdss_pclk1_clk
.clkr
,
2517 [MDSS_VSYNC_CLK
] = &mdss_vsync_clk
.clkr
,
2518 [MMSS_MISC_AHB_CLK
] = &mmss_misc_ahb_clk
.clkr
,
2519 [MMSS_MMSSNOC_AHB_CLK
] = &mmss_mmssnoc_ahb_clk
.clkr
,
2520 [MMSS_MMSSNOC_BTO_AHB_CLK
] = &mmss_mmssnoc_bto_ahb_clk
.clkr
,
2521 [MMSS_MMSSNOC_AXI_CLK
] = &mmss_mmssnoc_axi_clk
.clkr
,
2522 [MMSS_S0_AXI_CLK
] = &mmss_s0_axi_clk
.clkr
,
2523 [OCMEMCX_AHB_CLK
] = &ocmemcx_ahb_clk
.clkr
,
2524 [OCMEMCX_OCMEMNOC_CLK
] = &ocmemcx_ocmemnoc_clk
.clkr
,
2525 [OXILI_OCMEMGX_CLK
] = &oxili_ocmemgx_clk
.clkr
,
2526 [OCMEMNOC_CLK
] = &ocmemnoc_clk
.clkr
,
2527 [OXILI_GFX3D_CLK
] = &oxili_gfx3d_clk
.clkr
,
2528 [OXILICX_AHB_CLK
] = &oxilicx_ahb_clk
.clkr
,
2529 [OXILICX_AXI_CLK
] = &oxilicx_axi_clk
.clkr
,
2530 [VENUS0_AHB_CLK
] = &venus0_ahb_clk
.clkr
,
2531 [VENUS0_AXI_CLK
] = &venus0_axi_clk
.clkr
,
2532 [VENUS0_OCMEMNOC_CLK
] = &venus0_ocmemnoc_clk
.clkr
,
2533 [VENUS0_VCODEC0_CLK
] = &venus0_vcodec0_clk
.clkr
,
2536 static const struct qcom_reset_map mmcc_msm8974_resets
[] = {
2537 [SPDM_RESET
] = { 0x0200 },
2538 [SPDM_RM_RESET
] = { 0x0300 },
2539 [VENUS0_RESET
] = { 0x1020 },
2540 [MDSS_RESET
] = { 0x2300 },
2541 [CAMSS_PHY0_RESET
] = { 0x3020 },
2542 [CAMSS_PHY1_RESET
] = { 0x3050 },
2543 [CAMSS_PHY2_RESET
] = { 0x3080 },
2544 [CAMSS_CSI0_RESET
] = { 0x30b0 },
2545 [CAMSS_CSI0PHY_RESET
] = { 0x30c0 },
2546 [CAMSS_CSI0RDI_RESET
] = { 0x30d0 },
2547 [CAMSS_CSI0PIX_RESET
] = { 0x30e0 },
2548 [CAMSS_CSI1_RESET
] = { 0x3120 },
2549 [CAMSS_CSI1PHY_RESET
] = { 0x3130 },
2550 [CAMSS_CSI1RDI_RESET
] = { 0x3140 },
2551 [CAMSS_CSI1PIX_RESET
] = { 0x3150 },
2552 [CAMSS_CSI2_RESET
] = { 0x3180 },
2553 [CAMSS_CSI2PHY_RESET
] = { 0x3190 },
2554 [CAMSS_CSI2RDI_RESET
] = { 0x31a0 },
2555 [CAMSS_CSI2PIX_RESET
] = { 0x31b0 },
2556 [CAMSS_CSI3_RESET
] = { 0x31e0 },
2557 [CAMSS_CSI3PHY_RESET
] = { 0x31f0 },
2558 [CAMSS_CSI3RDI_RESET
] = { 0x3200 },
2559 [CAMSS_CSI3PIX_RESET
] = { 0x3210 },
2560 [CAMSS_ISPIF_RESET
] = { 0x3220 },
2561 [CAMSS_CCI_RESET
] = { 0x3340 },
2562 [CAMSS_MCLK0_RESET
] = { 0x3380 },
2563 [CAMSS_MCLK1_RESET
] = { 0x33b0 },
2564 [CAMSS_MCLK2_RESET
] = { 0x33e0 },
2565 [CAMSS_MCLK3_RESET
] = { 0x3410 },
2566 [CAMSS_GP0_RESET
] = { 0x3440 },
2567 [CAMSS_GP1_RESET
] = { 0x3470 },
2568 [CAMSS_TOP_RESET
] = { 0x3480 },
2569 [CAMSS_MICRO_RESET
] = { 0x3490 },
2570 [CAMSS_JPEG_RESET
] = { 0x35a0 },
2571 [CAMSS_VFE_RESET
] = { 0x36a0 },
2572 [CAMSS_CSI_VFE0_RESET
] = { 0x3700 },
2573 [CAMSS_CSI_VFE1_RESET
] = { 0x3710 },
2574 [OXILI_RESET
] = { 0x4020 },
2575 [OXILICX_RESET
] = { 0x4030 },
2576 [OCMEMCX_RESET
] = { 0x4050 },
2577 [MMSS_RBCRP_RESET
] = { 0x4080 },
2578 [MMSSNOCAHB_RESET
] = { 0x5020 },
2579 [MMSSNOCAXI_RESET
] = { 0x5060 },
2580 [OCMEMNOC_RESET
] = { 0x50b0 },
2583 static struct gdsc
*mmcc_msm8974_gdscs
[] = {
2584 [VENUS0_GDSC
] = &venus0_gdsc
,
2585 [MDSS_GDSC
] = &mdss_gdsc
,
2586 [CAMSS_JPEG_GDSC
] = &camss_jpeg_gdsc
,
2587 [CAMSS_VFE_GDSC
] = &camss_vfe_gdsc
,
2588 [OXILI_GDSC
] = &oxili_gdsc
,
2589 [OXILICX_GDSC
] = &oxilicx_gdsc
,
2592 static const struct regmap_config mmcc_msm8974_regmap_config
= {
2596 .max_register
= 0x5104,
2600 static const struct qcom_cc_desc mmcc_msm8974_desc
= {
2601 .config
= &mmcc_msm8974_regmap_config
,
2602 .clks
= mmcc_msm8974_clocks
,
2603 .num_clks
= ARRAY_SIZE(mmcc_msm8974_clocks
),
2604 .resets
= mmcc_msm8974_resets
,
2605 .num_resets
= ARRAY_SIZE(mmcc_msm8974_resets
),
2606 .gdscs
= mmcc_msm8974_gdscs
,
2607 .num_gdscs
= ARRAY_SIZE(mmcc_msm8974_gdscs
),
2610 static const struct of_device_id mmcc_msm8974_match_table
[] = {
2611 { .compatible
= "qcom,mmcc-msm8974" },
2614 MODULE_DEVICE_TABLE(of
, mmcc_msm8974_match_table
);
2616 static int mmcc_msm8974_probe(struct platform_device
*pdev
)
2618 struct regmap
*regmap
;
2620 regmap
= qcom_cc_map(pdev
, &mmcc_msm8974_desc
);
2622 return PTR_ERR(regmap
);
2624 clk_pll_configure_sr_hpm_lp(&mmpll1
, regmap
, &mmpll1_config
, true);
2625 clk_pll_configure_sr_hpm_lp(&mmpll3
, regmap
, &mmpll3_config
, false);
2627 return qcom_cc_really_probe(pdev
, &mmcc_msm8974_desc
, regmap
);
2630 static struct platform_driver mmcc_msm8974_driver
= {
2631 .probe
= mmcc_msm8974_probe
,
2633 .name
= "mmcc-msm8974",
2634 .of_match_table
= mmcc_msm8974_match_table
,
2637 module_platform_driver(mmcc_msm8974_driver
);
2639 MODULE_DESCRIPTION("QCOM MMCC MSM8974 Driver");
2640 MODULE_LICENSE("GPL v2");
2641 MODULE_ALIAS("platform:mmcc-msm8974");