1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
7 #include <linux/device.h>
8 #include <linux/interconnect.h>
9 #include <linux/interconnect-provider.h>
10 #include <linux/module.h>
11 #include <linux/of_platform.h>
12 #include <dt-bindings/interconnect/qcom,sm8750-rpmh.h>
14 #include "bcm-voter.h"
17 #define SM8750_MASTER_GPU_TCU 0
18 #define SM8750_MASTER_SYS_TCU 1
19 #define SM8750_MASTER_APPSS_PROC 2
20 #define SM8750_MASTER_LLCC 3
21 #define SM8750_MASTER_QDSS_BAM 4
22 #define SM8750_MASTER_QSPI_0 5
23 #define SM8750_MASTER_QUP_1 6
24 #define SM8750_MASTER_QUP_2 7
25 #define SM8750_MASTER_A1NOC_SNOC 8
26 #define SM8750_MASTER_A2NOC_SNOC 9
27 #define SM8750_MASTER_CAMNOC_HF 10
28 #define SM8750_MASTER_CAMNOC_NRT_ICP_SF 11
29 #define SM8750_MASTER_CAMNOC_RT_CDM_SF 12
30 #define SM8750_MASTER_CAMNOC_SF 13
31 #define SM8750_MASTER_GEM_NOC_CNOC 14
32 #define SM8750_MASTER_GEM_NOC_PCIE_SNOC 15
33 #define SM8750_MASTER_GFX3D 16
34 #define SM8750_MASTER_LPASS_GEM_NOC 17
35 #define SM8750_MASTER_LPASS_LPINOC 18
36 #define SM8750_MASTER_LPIAON_NOC 19
37 #define SM8750_MASTER_LPASS_PROC 20
38 #define SM8750_MASTER_MDP 21
39 #define SM8750_MASTER_MSS_PROC 22
40 #define SM8750_MASTER_MNOC_HF_MEM_NOC 23
41 #define SM8750_MASTER_MNOC_SF_MEM_NOC 24
42 #define SM8750_MASTER_CDSP_PROC 25
43 #define SM8750_MASTER_COMPUTE_NOC 26
44 #define SM8750_MASTER_ANOC_PCIE_GEM_NOC 27
45 #define SM8750_MASTER_SNOC_SF_MEM_NOC 28
46 #define SM8750_MASTER_UBWC_P 29
47 #define SM8750_MASTER_CDSP_HCP 30
48 #define SM8750_MASTER_VIDEO_CV_PROC 31
49 #define SM8750_MASTER_VIDEO_EVA 32
50 #define SM8750_MASTER_VIDEO_MVP 33
51 #define SM8750_MASTER_VIDEO_V_PROC 34
52 #define SM8750_MASTER_CNOC_CFG 35
53 #define SM8750_MASTER_CNOC_MNOC_CFG 36
54 #define SM8750_MASTER_PCIE_ANOC_CFG 37
55 #define SM8750_MASTER_QUP_CORE_0 38
56 #define SM8750_MASTER_QUP_CORE_1 39
57 #define SM8750_MASTER_QUP_CORE_2 40
58 #define SM8750_MASTER_CRYPTO 41
59 #define SM8750_MASTER_IPA 42
60 #define SM8750_MASTER_QUP_3 43
61 #define SM8750_MASTER_SOCCP_AGGR_NOC 44
62 #define SM8750_MASTER_SP 45
63 #define SM8750_MASTER_GIC 46
64 #define SM8750_MASTER_PCIE_0 47
65 #define SM8750_MASTER_QDSS_ETR 48
66 #define SM8750_MASTER_QDSS_ETR_1 49
67 #define SM8750_MASTER_SDCC_2 50
68 #define SM8750_MASTER_SDCC_4 51
69 #define SM8750_MASTER_UFS_MEM 52
70 #define SM8750_MASTER_USB3_0 53
71 #define SM8750_SLAVE_UBWC_P 54
72 #define SM8750_SLAVE_EBI1 55
73 #define SM8750_SLAVE_AHB2PHY_SOUTH 56
74 #define SM8750_SLAVE_AHB2PHY_NORTH 57
75 #define SM8750_SLAVE_AOSS 58
76 #define SM8750_SLAVE_CAMERA_CFG 59
77 #define SM8750_SLAVE_CLK_CTL 60
78 #define SM8750_SLAVE_CRYPTO_0_CFG 61
79 #define SM8750_SLAVE_DISPLAY_CFG 62
80 #define SM8750_SLAVE_EVA_CFG 63
81 #define SM8750_SLAVE_GFX3D_CFG 64
82 #define SM8750_SLAVE_I2C 65
83 #define SM8750_SLAVE_I3C_IBI0_CFG 66
84 #define SM8750_SLAVE_I3C_IBI1_CFG 67
85 #define SM8750_SLAVE_IMEM_CFG 68
86 #define SM8750_SLAVE_IPA_CFG 69
87 #define SM8750_SLAVE_IPC_ROUTER_CFG 70
88 #define SM8750_SLAVE_CNOC_MSS 71
89 #define SM8750_SLAVE_PCIE_CFG 72
90 #define SM8750_SLAVE_PRNG 73
91 #define SM8750_SLAVE_QDSS_CFG 74
92 #define SM8750_SLAVE_QSPI_0 75
93 #define SM8750_SLAVE_QUP_3 76
94 #define SM8750_SLAVE_QUP_1 77
95 #define SM8750_SLAVE_QUP_2 78
96 #define SM8750_SLAVE_SDCC_2 79
97 #define SM8750_SLAVE_SDCC_4 80
98 #define SM8750_SLAVE_SOCCP 81
99 #define SM8750_SLAVE_SPSS_CFG 82
100 #define SM8750_SLAVE_TCSR 83
101 #define SM8750_SLAVE_TLMM 84
102 #define SM8750_SLAVE_TME_CFG 85
103 #define SM8750_SLAVE_UFS_MEM_CFG 86
104 #define SM8750_SLAVE_USB3_0 87
105 #define SM8750_SLAVE_VENUS_CFG 88
106 #define SM8750_SLAVE_VSENSE_CTRL_CFG 89
107 #define SM8750_SLAVE_A1NOC_SNOC 90
108 #define SM8750_SLAVE_A2NOC_SNOC 91
109 #define SM8750_SLAVE_APPSS 92
110 #define SM8750_SLAVE_GEM_NOC_CNOC 93
111 #define SM8750_SLAVE_SNOC_GEM_NOC_SF 94
112 #define SM8750_SLAVE_LLCC 95
113 #define SM8750_SLAVE_LPASS_GEM_NOC 96
114 #define SM8750_SLAVE_LPIAON_NOC_LPASS_AG_NOC 97
115 #define SM8750_SLAVE_LPICX_NOC_LPIAON_NOC 98
116 #define SM8750_SLAVE_MNOC_HF_MEM_NOC 99
117 #define SM8750_SLAVE_MNOC_SF_MEM_NOC 100
118 #define SM8750_SLAVE_CDSP_MEM_NOC 101
119 #define SM8750_SLAVE_MEM_NOC_PCIE_SNOC 102
120 #define SM8750_SLAVE_ANOC_PCIE_GEM_NOC 103
121 #define SM8750_SLAVE_CNOC_CFG 104
122 #define SM8750_SLAVE_DDRSS_CFG 105
123 #define SM8750_SLAVE_CNOC_MNOC_CFG 106
124 #define SM8750_SLAVE_PCIE_ANOC_CFG 107
125 #define SM8750_SLAVE_QUP_CORE_0 108
126 #define SM8750_SLAVE_QUP_CORE_1 109
127 #define SM8750_SLAVE_QUP_CORE_2 110
128 #define SM8750_SLAVE_BOOT_IMEM 111
129 #define SM8750_SLAVE_IMEM 112
130 #define SM8750_SLAVE_BOOT_IMEM_2 113
131 #define SM8750_SLAVE_SERVICE_CNOC 114
132 #define SM8750_SLAVE_SERVICE_MNOC 115
133 #define SM8750_SLAVE_SERVICE_PCIE_ANOC 116
134 #define SM8750_SLAVE_PCIE_0 117
135 #define SM8750_SLAVE_QDSS_STM 118
136 #define SM8750_SLAVE_TCU 119
138 static struct qcom_icc_node qhm_qspi = {
140 .id = SM8750_MASTER_QSPI_0,
144 .links = { SM8750_SLAVE_A1NOC_SNOC },
147 static struct qcom_icc_node qhm_qup1 = {
149 .id = SM8750_MASTER_QUP_1,
153 .links = { SM8750_SLAVE_A1NOC_SNOC },
156 static struct qcom_icc_node qxm_qup02 = {
158 .id = SM8750_MASTER_QUP_3,
162 .links = { SM8750_SLAVE_A1NOC_SNOC },
165 static struct qcom_icc_node xm_sdc4 = {
167 .id = SM8750_MASTER_SDCC_4,
171 .links = { SM8750_SLAVE_A1NOC_SNOC },
174 static struct qcom_icc_node xm_ufs_mem = {
175 .name = "xm_ufs_mem",
176 .id = SM8750_MASTER_UFS_MEM,
180 .links = { SM8750_SLAVE_A1NOC_SNOC },
183 static struct qcom_icc_node xm_usb3_0 = {
185 .id = SM8750_MASTER_USB3_0,
189 .links = { SM8750_SLAVE_A1NOC_SNOC },
192 static struct qcom_icc_node qhm_qdss_bam = {
193 .name = "qhm_qdss_bam",
194 .id = SM8750_MASTER_QDSS_BAM,
198 .links = { SM8750_SLAVE_A2NOC_SNOC },
201 static struct qcom_icc_node qhm_qup2 = {
203 .id = SM8750_MASTER_QUP_2,
207 .links = { SM8750_SLAVE_A2NOC_SNOC },
210 static struct qcom_icc_node qxm_crypto = {
211 .name = "qxm_crypto",
212 .id = SM8750_MASTER_CRYPTO,
216 .links = { SM8750_SLAVE_A2NOC_SNOC },
219 static struct qcom_icc_node qxm_ipa = {
221 .id = SM8750_MASTER_IPA,
225 .links = { SM8750_SLAVE_A2NOC_SNOC },
228 static struct qcom_icc_node qxm_soccp = {
230 .id = SM8750_MASTER_SOCCP_AGGR_NOC,
234 .links = { SM8750_SLAVE_A2NOC_SNOC },
237 static struct qcom_icc_node qxm_sp = {
239 .id = SM8750_MASTER_SP,
243 .links = { SM8750_SLAVE_A2NOC_SNOC },
246 static struct qcom_icc_node xm_qdss_etr_0 = {
247 .name = "xm_qdss_etr_0",
248 .id = SM8750_MASTER_QDSS_ETR,
252 .links = { SM8750_SLAVE_A2NOC_SNOC },
255 static struct qcom_icc_node xm_qdss_etr_1 = {
256 .name = "xm_qdss_etr_1",
257 .id = SM8750_MASTER_QDSS_ETR_1,
261 .links = { SM8750_SLAVE_A2NOC_SNOC },
264 static struct qcom_icc_node xm_sdc2 = {
266 .id = SM8750_MASTER_SDCC_2,
270 .links = { SM8750_SLAVE_A2NOC_SNOC },
273 static struct qcom_icc_node qup0_core_master = {
274 .name = "qup0_core_master",
275 .id = SM8750_MASTER_QUP_CORE_0,
279 .links = { SM8750_SLAVE_QUP_CORE_0 },
282 static struct qcom_icc_node qup1_core_master = {
283 .name = "qup1_core_master",
284 .id = SM8750_MASTER_QUP_CORE_1,
288 .links = { SM8750_SLAVE_QUP_CORE_1 },
291 static struct qcom_icc_node qup2_core_master = {
292 .name = "qup2_core_master",
293 .id = SM8750_MASTER_QUP_CORE_2,
297 .links = { SM8750_SLAVE_QUP_CORE_2 },
300 static struct qcom_icc_node qsm_cfg = {
302 .id = SM8750_MASTER_CNOC_CFG,
306 .links = { SM8750_SLAVE_AHB2PHY_SOUTH, SM8750_SLAVE_AHB2PHY_NORTH,
307 SM8750_SLAVE_CAMERA_CFG, SM8750_SLAVE_CLK_CTL,
308 SM8750_SLAVE_CRYPTO_0_CFG, SM8750_SLAVE_DISPLAY_CFG,
309 SM8750_SLAVE_EVA_CFG, SM8750_SLAVE_GFX3D_CFG,
310 SM8750_SLAVE_I2C, SM8750_SLAVE_I3C_IBI0_CFG,
311 SM8750_SLAVE_I3C_IBI1_CFG, SM8750_SLAVE_IMEM_CFG,
312 SM8750_SLAVE_CNOC_MSS, SM8750_SLAVE_PCIE_CFG,
313 SM8750_SLAVE_PRNG, SM8750_SLAVE_QDSS_CFG,
314 SM8750_SLAVE_QSPI_0, SM8750_SLAVE_QUP_3,
315 SM8750_SLAVE_QUP_1, SM8750_SLAVE_QUP_2,
316 SM8750_SLAVE_SDCC_2, SM8750_SLAVE_SDCC_4,
317 SM8750_SLAVE_SPSS_CFG, SM8750_SLAVE_TCSR,
318 SM8750_SLAVE_TLMM, SM8750_SLAVE_UFS_MEM_CFG,
319 SM8750_SLAVE_USB3_0, SM8750_SLAVE_VENUS_CFG,
320 SM8750_SLAVE_VSENSE_CTRL_CFG, SM8750_SLAVE_CNOC_MNOC_CFG,
321 SM8750_SLAVE_PCIE_ANOC_CFG, SM8750_SLAVE_QDSS_STM,
325 static struct qcom_icc_node qnm_gemnoc_cnoc = {
326 .name = "qnm_gemnoc_cnoc",
327 .id = SM8750_MASTER_GEM_NOC_CNOC,
331 .links = { SM8750_SLAVE_AOSS, SM8750_SLAVE_IPA_CFG,
332 SM8750_SLAVE_IPC_ROUTER_CFG, SM8750_SLAVE_SOCCP,
333 SM8750_SLAVE_TME_CFG, SM8750_SLAVE_APPSS,
334 SM8750_SLAVE_CNOC_CFG, SM8750_SLAVE_DDRSS_CFG,
335 SM8750_SLAVE_BOOT_IMEM, SM8750_SLAVE_IMEM,
336 SM8750_SLAVE_BOOT_IMEM_2, SM8750_SLAVE_SERVICE_CNOC },
339 static struct qcom_icc_node qnm_gemnoc_pcie = {
340 .name = "qnm_gemnoc_pcie",
341 .id = SM8750_MASTER_GEM_NOC_PCIE_SNOC,
345 .links = { SM8750_SLAVE_PCIE_0 },
348 static struct qcom_icc_node alm_gpu_tcu = {
349 .name = "alm_gpu_tcu",
350 .id = SM8750_MASTER_GPU_TCU,
354 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
357 static struct qcom_icc_node alm_sys_tcu = {
358 .name = "alm_sys_tcu",
359 .id = SM8750_MASTER_SYS_TCU,
363 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
366 static struct qcom_icc_node chm_apps = {
368 .id = SM8750_MASTER_APPSS_PROC,
372 .links = { SM8750_SLAVE_UBWC_P, SM8750_SLAVE_GEM_NOC_CNOC,
373 SM8750_SLAVE_LLCC, SM8750_SLAVE_MEM_NOC_PCIE_SNOC },
376 static struct qcom_icc_node qnm_gpu = {
378 .id = SM8750_MASTER_GFX3D,
382 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
385 static struct qcom_icc_node qnm_lpass_gemnoc = {
386 .name = "qnm_lpass_gemnoc",
387 .id = SM8750_MASTER_LPASS_GEM_NOC,
391 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC,
392 SM8750_SLAVE_MEM_NOC_PCIE_SNOC },
395 static struct qcom_icc_node qnm_mdsp = {
397 .id = SM8750_MASTER_MSS_PROC,
401 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC,
402 SM8750_SLAVE_MEM_NOC_PCIE_SNOC },
405 static struct qcom_icc_node qnm_mnoc_hf = {
406 .name = "qnm_mnoc_hf",
407 .id = SM8750_MASTER_MNOC_HF_MEM_NOC,
411 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
414 static struct qcom_icc_node qnm_mnoc_sf = {
415 .name = "qnm_mnoc_sf",
416 .id = SM8750_MASTER_MNOC_SF_MEM_NOC,
420 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
423 static struct qcom_icc_node qnm_nsp_gemnoc = {
424 .name = "qnm_nsp_gemnoc",
425 .id = SM8750_MASTER_COMPUTE_NOC,
429 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC,
430 SM8750_SLAVE_MEM_NOC_PCIE_SNOC },
433 static struct qcom_icc_node qnm_pcie = {
435 .id = SM8750_MASTER_ANOC_PCIE_GEM_NOC,
439 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC },
442 static struct qcom_icc_node qnm_snoc_sf = {
443 .name = "qnm_snoc_sf",
444 .id = SM8750_MASTER_SNOC_SF_MEM_NOC,
448 .links = { SM8750_SLAVE_GEM_NOC_CNOC, SM8750_SLAVE_LLCC,
449 SM8750_SLAVE_MEM_NOC_PCIE_SNOC },
452 static struct qcom_icc_node qnm_ubwc_p = {
453 .name = "qnm_ubwc_p",
454 .id = SM8750_MASTER_UBWC_P,
458 .links = { SM8750_SLAVE_LLCC },
461 static struct qcom_icc_node xm_gic = {
463 .id = SM8750_MASTER_GIC,
467 .links = { SM8750_SLAVE_LLCC },
470 static struct qcom_icc_node qnm_lpiaon_noc = {
471 .name = "qnm_lpiaon_noc",
472 .id = SM8750_MASTER_LPIAON_NOC,
476 .links = { SM8750_SLAVE_LPASS_GEM_NOC },
479 static struct qcom_icc_node qnm_lpass_lpinoc = {
480 .name = "qnm_lpass_lpinoc",
481 .id = SM8750_MASTER_LPASS_LPINOC,
485 .links = { SM8750_SLAVE_LPIAON_NOC_LPASS_AG_NOC },
488 static struct qcom_icc_node qnm_lpinoc_dsp_qns4m = {
489 .name = "qnm_lpinoc_dsp_qns4m",
490 .id = SM8750_MASTER_LPASS_PROC,
494 .links = { SM8750_SLAVE_LPICX_NOC_LPIAON_NOC },
497 static struct qcom_icc_node llcc_mc = {
499 .id = SM8750_MASTER_LLCC,
503 .links = { SM8750_SLAVE_EBI1 },
506 static struct qcom_icc_node qnm_camnoc_hf = {
507 .name = "qnm_camnoc_hf",
508 .id = SM8750_MASTER_CAMNOC_HF,
512 .links = { SM8750_SLAVE_MNOC_HF_MEM_NOC },
515 static struct qcom_icc_node qnm_camnoc_nrt_icp_sf = {
516 .name = "qnm_camnoc_nrt_icp_sf",
517 .id = SM8750_MASTER_CAMNOC_NRT_ICP_SF,
521 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
524 static struct qcom_icc_node qnm_camnoc_rt_cdm_sf = {
525 .name = "qnm_camnoc_rt_cdm_sf",
526 .id = SM8750_MASTER_CAMNOC_RT_CDM_SF,
530 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
533 static struct qcom_icc_node qnm_camnoc_sf = {
534 .name = "qnm_camnoc_sf",
535 .id = SM8750_MASTER_CAMNOC_SF,
539 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
542 static struct qcom_icc_node qnm_mdp = {
544 .id = SM8750_MASTER_MDP,
548 .links = { SM8750_SLAVE_MNOC_HF_MEM_NOC },
551 static struct qcom_icc_node qnm_vapss_hcp = {
552 .name = "qnm_vapss_hcp",
553 .id = SM8750_MASTER_CDSP_HCP,
557 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
560 static struct qcom_icc_node qnm_video_cv_cpu = {
561 .name = "qnm_video_cv_cpu",
562 .id = SM8750_MASTER_VIDEO_CV_PROC,
566 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
569 static struct qcom_icc_node qnm_video_eva = {
570 .name = "qnm_video_eva",
571 .id = SM8750_MASTER_VIDEO_EVA,
575 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
578 static struct qcom_icc_node qnm_video_mvp = {
579 .name = "qnm_video_mvp",
580 .id = SM8750_MASTER_VIDEO_MVP,
584 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
587 static struct qcom_icc_node qnm_video_v_cpu = {
588 .name = "qnm_video_v_cpu",
589 .id = SM8750_MASTER_VIDEO_V_PROC,
593 .links = { SM8750_SLAVE_MNOC_SF_MEM_NOC },
596 static struct qcom_icc_node qsm_mnoc_cfg = {
597 .name = "qsm_mnoc_cfg",
598 .id = SM8750_MASTER_CNOC_MNOC_CFG,
602 .links = { SM8750_SLAVE_SERVICE_MNOC },
605 static struct qcom_icc_node qnm_nsp = {
607 .id = SM8750_MASTER_CDSP_PROC,
611 .links = { SM8750_SLAVE_CDSP_MEM_NOC },
614 static struct qcom_icc_node qsm_pcie_anoc_cfg = {
615 .name = "qsm_pcie_anoc_cfg",
616 .id = SM8750_MASTER_PCIE_ANOC_CFG,
620 .links = { SM8750_SLAVE_SERVICE_PCIE_ANOC },
623 static struct qcom_icc_node xm_pcie3 = {
625 .id = SM8750_MASTER_PCIE_0,
629 .links = { SM8750_SLAVE_ANOC_PCIE_GEM_NOC },
632 static struct qcom_icc_node qnm_aggre1_noc = {
633 .name = "qnm_aggre1_noc",
634 .id = SM8750_MASTER_A1NOC_SNOC,
638 .links = { SM8750_SLAVE_SNOC_GEM_NOC_SF },
641 static struct qcom_icc_node qnm_aggre2_noc = {
642 .name = "qnm_aggre2_noc",
643 .id = SM8750_MASTER_A2NOC_SNOC,
647 .links = { SM8750_SLAVE_SNOC_GEM_NOC_SF },
650 static struct qcom_icc_node qns_a1noc_snoc = {
651 .name = "qns_a1noc_snoc",
652 .id = SM8750_SLAVE_A1NOC_SNOC,
656 .links = { SM8750_MASTER_A1NOC_SNOC },
659 static struct qcom_icc_node qns_a2noc_snoc = {
660 .name = "qns_a2noc_snoc",
661 .id = SM8750_SLAVE_A2NOC_SNOC,
665 .links = { SM8750_MASTER_A2NOC_SNOC },
668 static struct qcom_icc_node qup0_core_slave = {
669 .name = "qup0_core_slave",
670 .id = SM8750_SLAVE_QUP_CORE_0,
676 static struct qcom_icc_node qup1_core_slave = {
677 .name = "qup1_core_slave",
678 .id = SM8750_SLAVE_QUP_CORE_1,
684 static struct qcom_icc_node qup2_core_slave = {
685 .name = "qup2_core_slave",
686 .id = SM8750_SLAVE_QUP_CORE_2,
692 static struct qcom_icc_node qhs_ahb2phy0 = {
693 .name = "qhs_ahb2phy0",
694 .id = SM8750_SLAVE_AHB2PHY_SOUTH,
700 static struct qcom_icc_node qhs_ahb2phy1 = {
701 .name = "qhs_ahb2phy1",
702 .id = SM8750_SLAVE_AHB2PHY_NORTH,
708 static struct qcom_icc_node qhs_camera_cfg = {
709 .name = "qhs_camera_cfg",
710 .id = SM8750_SLAVE_CAMERA_CFG,
716 static struct qcom_icc_node qhs_clk_ctl = {
717 .name = "qhs_clk_ctl",
718 .id = SM8750_SLAVE_CLK_CTL,
724 static struct qcom_icc_node qhs_crypto0_cfg = {
725 .name = "qhs_crypto0_cfg",
726 .id = SM8750_SLAVE_CRYPTO_0_CFG,
732 static struct qcom_icc_node qhs_display_cfg = {
733 .name = "qhs_display_cfg",
734 .id = SM8750_SLAVE_DISPLAY_CFG,
740 static struct qcom_icc_node qhs_eva_cfg = {
741 .name = "qhs_eva_cfg",
742 .id = SM8750_SLAVE_EVA_CFG,
748 static struct qcom_icc_node qhs_gpuss_cfg = {
749 .name = "qhs_gpuss_cfg",
750 .id = SM8750_SLAVE_GFX3D_CFG,
756 static struct qcom_icc_node qhs_i2c = {
758 .id = SM8750_SLAVE_I2C,
764 static struct qcom_icc_node qhs_i3c_ibi0_cfg = {
765 .name = "qhs_i3c_ibi0_cfg",
766 .id = SM8750_SLAVE_I3C_IBI0_CFG,
772 static struct qcom_icc_node qhs_i3c_ibi1_cfg = {
773 .name = "qhs_i3c_ibi1_cfg",
774 .id = SM8750_SLAVE_I3C_IBI1_CFG,
780 static struct qcom_icc_node qhs_imem_cfg = {
781 .name = "qhs_imem_cfg",
782 .id = SM8750_SLAVE_IMEM_CFG,
788 static struct qcom_icc_node qhs_mss_cfg = {
789 .name = "qhs_mss_cfg",
790 .id = SM8750_SLAVE_CNOC_MSS,
796 static struct qcom_icc_node qhs_pcie_cfg = {
797 .name = "qhs_pcie_cfg",
798 .id = SM8750_SLAVE_PCIE_CFG,
804 static struct qcom_icc_node qhs_prng = {
806 .id = SM8750_SLAVE_PRNG,
812 static struct qcom_icc_node qhs_qdss_cfg = {
813 .name = "qhs_qdss_cfg",
814 .id = SM8750_SLAVE_QDSS_CFG,
820 static struct qcom_icc_node qhs_qspi = {
822 .id = SM8750_SLAVE_QSPI_0,
828 static struct qcom_icc_node qhs_qup02 = {
830 .id = SM8750_SLAVE_QUP_3,
836 static struct qcom_icc_node qhs_qup1 = {
838 .id = SM8750_SLAVE_QUP_1,
844 static struct qcom_icc_node qhs_qup2 = {
846 .id = SM8750_SLAVE_QUP_2,
852 static struct qcom_icc_node qhs_sdc2 = {
854 .id = SM8750_SLAVE_SDCC_2,
860 static struct qcom_icc_node qhs_sdc4 = {
862 .id = SM8750_SLAVE_SDCC_4,
868 static struct qcom_icc_node qhs_spss_cfg = {
869 .name = "qhs_spss_cfg",
870 .id = SM8750_SLAVE_SPSS_CFG,
876 static struct qcom_icc_node qhs_tcsr = {
878 .id = SM8750_SLAVE_TCSR,
884 static struct qcom_icc_node qhs_tlmm = {
886 .id = SM8750_SLAVE_TLMM,
892 static struct qcom_icc_node qhs_ufs_mem_cfg = {
893 .name = "qhs_ufs_mem_cfg",
894 .id = SM8750_SLAVE_UFS_MEM_CFG,
900 static struct qcom_icc_node qhs_usb3_0 = {
901 .name = "qhs_usb3_0",
902 .id = SM8750_SLAVE_USB3_0,
908 static struct qcom_icc_node qhs_venus_cfg = {
909 .name = "qhs_venus_cfg",
910 .id = SM8750_SLAVE_VENUS_CFG,
916 static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
917 .name = "qhs_vsense_ctrl_cfg",
918 .id = SM8750_SLAVE_VSENSE_CTRL_CFG,
924 static struct qcom_icc_node qss_mnoc_cfg = {
925 .name = "qss_mnoc_cfg",
926 .id = SM8750_SLAVE_CNOC_MNOC_CFG,
930 .links = { SM8750_MASTER_CNOC_MNOC_CFG },
933 static struct qcom_icc_node qss_pcie_anoc_cfg = {
934 .name = "qss_pcie_anoc_cfg",
935 .id = SM8750_SLAVE_PCIE_ANOC_CFG,
939 .links = { SM8750_MASTER_PCIE_ANOC_CFG },
942 static struct qcom_icc_node xs_qdss_stm = {
943 .name = "xs_qdss_stm",
944 .id = SM8750_SLAVE_QDSS_STM,
950 static struct qcom_icc_node xs_sys_tcu_cfg = {
951 .name = "xs_sys_tcu_cfg",
952 .id = SM8750_SLAVE_TCU,
958 static struct qcom_icc_node qhs_aoss = {
960 .id = SM8750_SLAVE_AOSS,
966 static struct qcom_icc_node qhs_ipa = {
968 .id = SM8750_SLAVE_IPA_CFG,
974 static struct qcom_icc_node qhs_ipc_router = {
975 .name = "qhs_ipc_router",
976 .id = SM8750_SLAVE_IPC_ROUTER_CFG,
982 static struct qcom_icc_node qhs_soccp = {
984 .id = SM8750_SLAVE_SOCCP,
990 static struct qcom_icc_node qhs_tme_cfg = {
991 .name = "qhs_tme_cfg",
992 .id = SM8750_SLAVE_TME_CFG,
998 static struct qcom_icc_node qns_apss = {
1000 .id = SM8750_SLAVE_APPSS,
1006 static struct qcom_icc_node qss_cfg = {
1008 .id = SM8750_SLAVE_CNOC_CFG,
1012 .links = { SM8750_MASTER_CNOC_CFG },
1015 static struct qcom_icc_node qss_ddrss_cfg = {
1016 .name = "qss_ddrss_cfg",
1017 .id = SM8750_SLAVE_DDRSS_CFG,
1023 static struct qcom_icc_node qxs_boot_imem = {
1024 .name = "qxs_boot_imem",
1025 .id = SM8750_SLAVE_BOOT_IMEM,
1031 static struct qcom_icc_node qxs_imem = {
1033 .id = SM8750_SLAVE_IMEM,
1039 static struct qcom_icc_node qxs_modem_boot_imem = {
1040 .name = "qxs_modem_boot_imem",
1041 .id = SM8750_SLAVE_BOOT_IMEM_2,
1047 static struct qcom_icc_node srvc_cnoc_main = {
1048 .name = "srvc_cnoc_main",
1049 .id = SM8750_SLAVE_SERVICE_CNOC,
1055 static struct qcom_icc_node xs_pcie = {
1057 .id = SM8750_SLAVE_PCIE_0,
1063 static struct qcom_icc_node chs_ubwc_p = {
1064 .name = "chs_ubwc_p",
1065 .id = SM8750_SLAVE_UBWC_P,
1071 static struct qcom_icc_node qns_gem_noc_cnoc = {
1072 .name = "qns_gem_noc_cnoc",
1073 .id = SM8750_SLAVE_GEM_NOC_CNOC,
1077 .links = { SM8750_MASTER_GEM_NOC_CNOC },
1080 static struct qcom_icc_node qns_llcc = {
1082 .id = SM8750_SLAVE_LLCC,
1086 .links = { SM8750_MASTER_LLCC },
1089 static struct qcom_icc_node qns_pcie = {
1091 .id = SM8750_SLAVE_MEM_NOC_PCIE_SNOC,
1095 .links = { SM8750_MASTER_GEM_NOC_PCIE_SNOC },
1098 static struct qcom_icc_node qns_lpass_ag_noc_gemnoc = {
1099 .name = "qns_lpass_ag_noc_gemnoc",
1100 .id = SM8750_SLAVE_LPASS_GEM_NOC,
1104 .links = { SM8750_MASTER_LPASS_GEM_NOC },
1107 static struct qcom_icc_node qns_lpass_aggnoc = {
1108 .name = "qns_lpass_aggnoc",
1109 .id = SM8750_SLAVE_LPIAON_NOC_LPASS_AG_NOC,
1113 .links = { SM8750_MASTER_LPIAON_NOC },
1116 static struct qcom_icc_node qns_lpi_aon_noc = {
1117 .name = "qns_lpi_aon_noc",
1118 .id = SM8750_SLAVE_LPICX_NOC_LPIAON_NOC,
1122 .links = { SM8750_MASTER_LPASS_LPINOC },
1125 static struct qcom_icc_node ebi = {
1127 .id = SM8750_SLAVE_EBI1,
1133 static struct qcom_icc_node qns_mem_noc_hf = {
1134 .name = "qns_mem_noc_hf",
1135 .id = SM8750_SLAVE_MNOC_HF_MEM_NOC,
1139 .links = { SM8750_MASTER_MNOC_HF_MEM_NOC },
1142 static struct qcom_icc_node qns_mem_noc_sf = {
1143 .name = "qns_mem_noc_sf",
1144 .id = SM8750_SLAVE_MNOC_SF_MEM_NOC,
1148 .links = { SM8750_MASTER_MNOC_SF_MEM_NOC },
1151 static struct qcom_icc_node srvc_mnoc = {
1152 .name = "srvc_mnoc",
1153 .id = SM8750_SLAVE_SERVICE_MNOC,
1159 static struct qcom_icc_node qns_nsp_gemnoc = {
1160 .name = "qns_nsp_gemnoc",
1161 .id = SM8750_SLAVE_CDSP_MEM_NOC,
1165 .links = { SM8750_MASTER_COMPUTE_NOC },
1168 static struct qcom_icc_node qns_pcie_mem_noc = {
1169 .name = "qns_pcie_mem_noc",
1170 .id = SM8750_SLAVE_ANOC_PCIE_GEM_NOC,
1174 .links = { SM8750_MASTER_ANOC_PCIE_GEM_NOC },
1177 static struct qcom_icc_node srvc_pcie_aggre_noc = {
1178 .name = "srvc_pcie_aggre_noc",
1179 .id = SM8750_SLAVE_SERVICE_PCIE_ANOC,
1185 static struct qcom_icc_node qns_gemnoc_sf = {
1186 .name = "qns_gemnoc_sf",
1187 .id = SM8750_SLAVE_SNOC_GEM_NOC_SF,
1191 .links = { SM8750_MASTER_SNOC_SF_MEM_NOC },
1194 static struct qcom_icc_bcm bcm_acv = {
1196 .enable_mask = BIT(0),
1201 static struct qcom_icc_bcm bcm_ce0 = {
1204 .nodes = { &qxm_crypto },
1207 static struct qcom_icc_bcm bcm_cn0 = {
1209 .enable_mask = BIT(0),
1212 .nodes = { &qsm_cfg, &qhs_ahb2phy0,
1213 &qhs_ahb2phy1, &qhs_camera_cfg,
1214 &qhs_clk_ctl, &qhs_crypto0_cfg,
1215 &qhs_eva_cfg, &qhs_gpuss_cfg,
1216 &qhs_i3c_ibi0_cfg, &qhs_i3c_ibi1_cfg,
1217 &qhs_imem_cfg, &qhs_mss_cfg,
1218 &qhs_pcie_cfg, &qhs_prng,
1219 &qhs_qdss_cfg, &qhs_qspi,
1220 &qhs_sdc2, &qhs_sdc4,
1221 &qhs_spss_cfg, &qhs_tcsr,
1222 &qhs_tlmm, &qhs_ufs_mem_cfg,
1223 &qhs_usb3_0, &qhs_venus_cfg,
1224 &qhs_vsense_ctrl_cfg, &qss_mnoc_cfg,
1225 &qss_pcie_anoc_cfg, &xs_qdss_stm,
1226 &xs_sys_tcu_cfg, &qnm_gemnoc_cnoc,
1227 &qnm_gemnoc_pcie, &qhs_aoss,
1228 &qhs_ipa, &qhs_ipc_router,
1229 &qhs_soccp, &qhs_tme_cfg,
1230 &qns_apss, &qss_cfg,
1231 &qss_ddrss_cfg, &qxs_boot_imem,
1232 &qxs_imem, &qxs_modem_boot_imem,
1233 &srvc_cnoc_main, &xs_pcie },
1236 static struct qcom_icc_bcm bcm_cn1 = {
1239 .nodes = { &qhs_display_cfg, &qhs_i2c,
1240 &qhs_qup02, &qhs_qup1,
1244 static struct qcom_icc_bcm bcm_co0 = {
1246 .enable_mask = BIT(0),
1248 .nodes = { &qnm_nsp, &qns_nsp_gemnoc },
1251 static struct qcom_icc_bcm bcm_lp0 = {
1254 .nodes = { &qnm_lpass_lpinoc, &qns_lpass_aggnoc },
1257 static struct qcom_icc_bcm bcm_mc0 = {
1264 static struct qcom_icc_bcm bcm_mm0 = {
1267 .nodes = { &qns_mem_noc_hf },
1270 static struct qcom_icc_bcm bcm_mm1 = {
1272 .enable_mask = BIT(0),
1274 .nodes = { &qnm_camnoc_hf, &qnm_camnoc_nrt_icp_sf,
1275 &qnm_camnoc_rt_cdm_sf, &qnm_camnoc_sf,
1276 &qnm_vapss_hcp, &qnm_video_cv_cpu,
1277 &qnm_video_mvp, &qnm_video_v_cpu,
1281 static struct qcom_icc_bcm bcm_qup0 = {
1286 .nodes = { &qup0_core_slave },
1289 static struct qcom_icc_bcm bcm_qup1 = {
1294 .nodes = { &qup1_core_slave },
1297 static struct qcom_icc_bcm bcm_qup2 = {
1302 .nodes = { &qup2_core_slave },
1305 static struct qcom_icc_bcm bcm_sh0 = {
1309 .nodes = { &qns_llcc },
1312 static struct qcom_icc_bcm bcm_sh1 = {
1314 .enable_mask = BIT(0),
1316 .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
1317 &chm_apps, &qnm_gpu,
1318 &qnm_mdsp, &qnm_mnoc_hf,
1319 &qnm_mnoc_sf, &qnm_nsp_gemnoc,
1320 &qnm_pcie, &qnm_snoc_sf,
1321 &xm_gic, &chs_ubwc_p,
1322 &qns_gem_noc_cnoc, &qns_pcie },
1325 static struct qcom_icc_bcm bcm_sn0 = {
1329 .nodes = { &qns_gemnoc_sf },
1332 static struct qcom_icc_bcm bcm_sn2 = {
1335 .nodes = { &qnm_aggre1_noc },
1338 static struct qcom_icc_bcm bcm_sn3 = {
1341 .nodes = { &qnm_aggre2_noc },
1344 static struct qcom_icc_bcm bcm_sn4 = {
1347 .nodes = { &qns_pcie_mem_noc },
1350 static struct qcom_icc_bcm bcm_ubw0 = {
1353 .nodes = { &qnm_ubwc_p },
1356 static struct qcom_icc_node * const aggre1_noc_nodes[] = {
1357 [MASTER_QSPI_0] = &qhm_qspi,
1358 [MASTER_QUP_1] = &qhm_qup1,
1359 [MASTER_QUP_3] = &qxm_qup02,
1360 [MASTER_SDCC_4] = &xm_sdc4,
1361 [MASTER_UFS_MEM] = &xm_ufs_mem,
1362 [MASTER_USB3_0] = &xm_usb3_0,
1363 [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
1366 static const struct qcom_icc_desc sm8750_aggre1_noc = {
1367 .nodes = aggre1_noc_nodes,
1368 .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
1371 static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
1375 static struct qcom_icc_node * const aggre2_noc_nodes[] = {
1376 [MASTER_QDSS_BAM] = &qhm_qdss_bam,
1377 [MASTER_QUP_2] = &qhm_qup2,
1378 [MASTER_CRYPTO] = &qxm_crypto,
1379 [MASTER_IPA] = &qxm_ipa,
1380 [MASTER_SOCCP_AGGR_NOC] = &qxm_soccp,
1381 [MASTER_SP] = &qxm_sp,
1382 [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
1383 [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
1384 [MASTER_SDCC_2] = &xm_sdc2,
1385 [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
1388 static const struct qcom_icc_desc sm8750_aggre2_noc = {
1389 .nodes = aggre2_noc_nodes,
1390 .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
1391 .bcms = aggre2_noc_bcms,
1392 .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
1395 static struct qcom_icc_bcm * const clk_virt_bcms[] = {
1401 static struct qcom_icc_node * const clk_virt_nodes[] = {
1402 [MASTER_QUP_CORE_0] = &qup0_core_master,
1403 [MASTER_QUP_CORE_1] = &qup1_core_master,
1404 [MASTER_QUP_CORE_2] = &qup2_core_master,
1405 [SLAVE_QUP_CORE_0] = &qup0_core_slave,
1406 [SLAVE_QUP_CORE_1] = &qup1_core_slave,
1407 [SLAVE_QUP_CORE_2] = &qup2_core_slave,
1410 static const struct qcom_icc_desc sm8750_clk_virt = {
1411 .nodes = clk_virt_nodes,
1412 .num_nodes = ARRAY_SIZE(clk_virt_nodes),
1413 .bcms = clk_virt_bcms,
1414 .num_bcms = ARRAY_SIZE(clk_virt_bcms),
1417 static struct qcom_icc_bcm * const config_noc_bcms[] = {
1422 static struct qcom_icc_node * const config_noc_nodes[] = {
1423 [MASTER_CNOC_CFG] = &qsm_cfg,
1424 [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
1425 [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
1426 [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
1427 [SLAVE_CLK_CTL] = &qhs_clk_ctl,
1428 [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
1429 [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
1430 [SLAVE_EVA_CFG] = &qhs_eva_cfg,
1431 [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
1432 [SLAVE_I2C] = &qhs_i2c,
1433 [SLAVE_I3C_IBI0_CFG] = &qhs_i3c_ibi0_cfg,
1434 [SLAVE_I3C_IBI1_CFG] = &qhs_i3c_ibi1_cfg,
1435 [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
1436 [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
1437 [SLAVE_PCIE_CFG] = &qhs_pcie_cfg,
1438 [SLAVE_PRNG] = &qhs_prng,
1439 [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
1440 [SLAVE_QSPI_0] = &qhs_qspi,
1441 [SLAVE_QUP_3] = &qhs_qup02,
1442 [SLAVE_QUP_1] = &qhs_qup1,
1443 [SLAVE_QUP_2] = &qhs_qup2,
1444 [SLAVE_SDCC_2] = &qhs_sdc2,
1445 [SLAVE_SDCC_4] = &qhs_sdc4,
1446 [SLAVE_SPSS_CFG] = &qhs_spss_cfg,
1447 [SLAVE_TCSR] = &qhs_tcsr,
1448 [SLAVE_TLMM] = &qhs_tlmm,
1449 [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
1450 [SLAVE_USB3_0] = &qhs_usb3_0,
1451 [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
1452 [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
1453 [SLAVE_CNOC_MNOC_CFG] = &qss_mnoc_cfg,
1454 [SLAVE_PCIE_ANOC_CFG] = &qss_pcie_anoc_cfg,
1455 [SLAVE_QDSS_STM] = &xs_qdss_stm,
1456 [SLAVE_TCU] = &xs_sys_tcu_cfg,
1459 static const struct qcom_icc_desc sm8750_config_noc = {
1460 .nodes = config_noc_nodes,
1461 .num_nodes = ARRAY_SIZE(config_noc_nodes),
1462 .bcms = config_noc_bcms,
1463 .num_bcms = ARRAY_SIZE(config_noc_bcms),
1466 static struct qcom_icc_bcm * const cnoc_main_bcms[] = {
1470 static struct qcom_icc_node * const cnoc_main_nodes[] = {
1471 [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
1472 [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
1473 [SLAVE_AOSS] = &qhs_aoss,
1474 [SLAVE_IPA_CFG] = &qhs_ipa,
1475 [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
1476 [SLAVE_SOCCP] = &qhs_soccp,
1477 [SLAVE_TME_CFG] = &qhs_tme_cfg,
1478 [SLAVE_APPSS] = &qns_apss,
1479 [SLAVE_CNOC_CFG] = &qss_cfg,
1480 [SLAVE_DDRSS_CFG] = &qss_ddrss_cfg,
1481 [SLAVE_BOOT_IMEM] = &qxs_boot_imem,
1482 [SLAVE_IMEM] = &qxs_imem,
1483 [SLAVE_BOOT_IMEM_2] = &qxs_modem_boot_imem,
1484 [SLAVE_SERVICE_CNOC] = &srvc_cnoc_main,
1485 [SLAVE_PCIE_0] = &xs_pcie,
1488 static const struct qcom_icc_desc sm8750_cnoc_main = {
1489 .nodes = cnoc_main_nodes,
1490 .num_nodes = ARRAY_SIZE(cnoc_main_nodes),
1491 .bcms = cnoc_main_bcms,
1492 .num_bcms = ARRAY_SIZE(cnoc_main_bcms),
1495 static struct qcom_icc_bcm * const gem_noc_bcms[] = {
1501 static struct qcom_icc_node * const gem_noc_nodes[] = {
1502 [MASTER_GPU_TCU] = &alm_gpu_tcu,
1503 [MASTER_SYS_TCU] = &alm_sys_tcu,
1504 [MASTER_APPSS_PROC] = &chm_apps,
1505 [MASTER_GFX3D] = &qnm_gpu,
1506 [MASTER_LPASS_GEM_NOC] = &qnm_lpass_gemnoc,
1507 [MASTER_MSS_PROC] = &qnm_mdsp,
1508 [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
1509 [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
1510 [MASTER_COMPUTE_NOC] = &qnm_nsp_gemnoc,
1511 [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
1512 [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
1513 [MASTER_UBWC_P] = &qnm_ubwc_p,
1514 [MASTER_GIC] = &xm_gic,
1515 [SLAVE_UBWC_P] = &chs_ubwc_p,
1516 [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
1517 [SLAVE_LLCC] = &qns_llcc,
1518 [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
1521 static const struct qcom_icc_desc sm8750_gem_noc = {
1522 .nodes = gem_noc_nodes,
1523 .num_nodes = ARRAY_SIZE(gem_noc_nodes),
1524 .bcms = gem_noc_bcms,
1525 .num_bcms = ARRAY_SIZE(gem_noc_bcms),
1528 static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
1529 [MASTER_LPIAON_NOC] = &qnm_lpiaon_noc,
1530 [SLAVE_LPASS_GEM_NOC] = &qns_lpass_ag_noc_gemnoc,
1533 static const struct qcom_icc_desc sm8750_lpass_ag_noc = {
1534 .nodes = lpass_ag_noc_nodes,
1535 .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
1538 static struct qcom_icc_bcm * const lpass_lpiaon_noc_bcms[] = {
1542 static struct qcom_icc_node * const lpass_lpiaon_noc_nodes[] = {
1543 [MASTER_LPASS_LPINOC] = &qnm_lpass_lpinoc,
1544 [SLAVE_LPIAON_NOC_LPASS_AG_NOC] = &qns_lpass_aggnoc,
1547 static const struct qcom_icc_desc sm8750_lpass_lpiaon_noc = {
1548 .nodes = lpass_lpiaon_noc_nodes,
1549 .num_nodes = ARRAY_SIZE(lpass_lpiaon_noc_nodes),
1550 .bcms = lpass_lpiaon_noc_bcms,
1551 .num_bcms = ARRAY_SIZE(lpass_lpiaon_noc_bcms),
1554 static struct qcom_icc_node * const lpass_lpicx_noc_nodes[] = {
1555 [MASTER_LPASS_PROC] = &qnm_lpinoc_dsp_qns4m,
1556 [SLAVE_LPICX_NOC_LPIAON_NOC] = &qns_lpi_aon_noc,
1559 static const struct qcom_icc_desc sm8750_lpass_lpicx_noc = {
1560 .nodes = lpass_lpicx_noc_nodes,
1561 .num_nodes = ARRAY_SIZE(lpass_lpicx_noc_nodes),
1564 static struct qcom_icc_bcm * const mc_virt_bcms[] = {
1569 static struct qcom_icc_node * const mc_virt_nodes[] = {
1570 [MASTER_LLCC] = &llcc_mc,
1571 [SLAVE_EBI1] = &ebi,
1574 static const struct qcom_icc_desc sm8750_mc_virt = {
1575 .nodes = mc_virt_nodes,
1576 .num_nodes = ARRAY_SIZE(mc_virt_nodes),
1577 .bcms = mc_virt_bcms,
1578 .num_bcms = ARRAY_SIZE(mc_virt_bcms),
1581 static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
1586 static struct qcom_icc_node * const mmss_noc_nodes[] = {
1587 [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
1588 [MASTER_CAMNOC_NRT_ICP_SF] = &qnm_camnoc_nrt_icp_sf,
1589 [MASTER_CAMNOC_RT_CDM_SF] = &qnm_camnoc_rt_cdm_sf,
1590 [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
1591 [MASTER_MDP] = &qnm_mdp,
1592 [MASTER_CDSP_HCP] = &qnm_vapss_hcp,
1593 [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
1594 [MASTER_VIDEO_EVA] = &qnm_video_eva,
1595 [MASTER_VIDEO_MVP] = &qnm_video_mvp,
1596 [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
1597 [MASTER_CNOC_MNOC_CFG] = &qsm_mnoc_cfg,
1598 [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
1599 [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
1600 [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
1603 static const struct qcom_icc_desc sm8750_mmss_noc = {
1604 .nodes = mmss_noc_nodes,
1605 .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
1606 .bcms = mmss_noc_bcms,
1607 .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
1610 static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
1614 static struct qcom_icc_node * const nsp_noc_nodes[] = {
1615 [MASTER_CDSP_PROC] = &qnm_nsp,
1616 [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
1619 static const struct qcom_icc_desc sm8750_nsp_noc = {
1620 .nodes = nsp_noc_nodes,
1621 .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
1622 .bcms = nsp_noc_bcms,
1623 .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
1626 static struct qcom_icc_bcm * const pcie_anoc_bcms[] = {
1630 static struct qcom_icc_node * const pcie_anoc_nodes[] = {
1631 [MASTER_PCIE_ANOC_CFG] = &qsm_pcie_anoc_cfg,
1632 [MASTER_PCIE_0] = &xm_pcie3,
1633 [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
1634 [SLAVE_SERVICE_PCIE_ANOC] = &srvc_pcie_aggre_noc,
1637 static const struct qcom_icc_desc sm8750_pcie_anoc = {
1638 .nodes = pcie_anoc_nodes,
1639 .num_nodes = ARRAY_SIZE(pcie_anoc_nodes),
1640 .bcms = pcie_anoc_bcms,
1641 .num_bcms = ARRAY_SIZE(pcie_anoc_bcms),
1644 static struct qcom_icc_bcm * const system_noc_bcms[] = {
1650 static struct qcom_icc_node * const system_noc_nodes[] = {
1651 [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
1652 [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
1653 [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
1656 static const struct qcom_icc_desc sm8750_system_noc = {
1657 .nodes = system_noc_nodes,
1658 .num_nodes = ARRAY_SIZE(system_noc_nodes),
1659 .bcms = system_noc_bcms,
1660 .num_bcms = ARRAY_SIZE(system_noc_bcms),
1663 static const struct of_device_id qnoc_of_match[] = {
1664 { .compatible = "qcom,sm8750-aggre1-noc", .data = &sm8750_aggre1_noc},
1665 { .compatible = "qcom,sm8750-aggre2-noc", .data = &sm8750_aggre2_noc},
1666 { .compatible = "qcom,sm8750-clk-virt", .data = &sm8750_clk_virt},
1667 { .compatible = "qcom,sm8750-config-noc", .data = &sm8750_config_noc},
1668 { .compatible = "qcom,sm8750-cnoc-main", .data = &sm8750_cnoc_main},
1669 { .compatible = "qcom,sm8750-gem-noc", .data = &sm8750_gem_noc},
1670 { .compatible = "qcom,sm8750-lpass-ag-noc", .data = &sm8750_lpass_ag_noc},
1671 { .compatible = "qcom,sm8750-lpass-lpiaon-noc", .data = &sm8750_lpass_lpiaon_noc},
1672 { .compatible = "qcom,sm8750-lpass-lpicx-noc", .data = &sm8750_lpass_lpicx_noc},
1673 { .compatible = "qcom,sm8750-mc-virt", .data = &sm8750_mc_virt},
1674 { .compatible = "qcom,sm8750-mmss-noc", .data = &sm8750_mmss_noc},
1675 { .compatible = "qcom,sm8750-nsp-noc", .data = &sm8750_nsp_noc},
1676 { .compatible = "qcom,sm8750-pcie-anoc", .data = &sm8750_pcie_anoc},
1677 { .compatible = "qcom,sm8750-system-noc", .data = &sm8750_system_noc},
1680 MODULE_DEVICE_TABLE(of, qnoc_of_match);
1682 static struct platform_driver qnoc_driver = {
1683 .probe = qcom_icc_rpmh_probe,
1684 .remove = qcom_icc_rpmh_remove,
1686 .name = "qnoc-sm8750",
1687 .of_match_table = qnoc_of_match,
1688 .sync_state = icc_sync_state,
1692 static int __init qnoc_driver_init(void)
1694 return platform_driver_register(&qnoc_driver);
1696 core_initcall(qnoc_driver_init);
1698 static void __exit qnoc_driver_exit(void)
1700 platform_driver_unregister(&qnoc_driver);
1702 module_exit(qnoc_driver_exit);
1704 MODULE_DESCRIPTION("SM8750 NoC driver");
1705 MODULE_LICENSE("GPL");