1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4 * Copyright (c) 2023, Linaro Limited
8 #include <linux/device.h>
9 #include <linux/interconnect.h>
10 #include <linux/interconnect-provider.h>
11 #include <linux/module.h>
12 #include <linux/of_platform.h>
13 #include <dt-bindings/interconnect/qcom,x1e80100-rpmh.h>
15 #include "bcm-voter.h"
16 #include "icc-common.h"
20 static struct qcom_icc_node qhm_qspi = {
22 .id = X1E80100_MASTER_QSPI_0,
26 .links = { X1E80100_SLAVE_A1NOC_SNOC },
29 static struct qcom_icc_node qhm_qup1 = {
31 .id = X1E80100_MASTER_QUP_1,
35 .links = { X1E80100_SLAVE_A1NOC_SNOC },
38 static struct qcom_icc_node xm_sdc4 = {
40 .id = X1E80100_MASTER_SDCC_4,
44 .links = { X1E80100_SLAVE_A1NOC_SNOC },
47 static struct qcom_icc_node xm_ufs_mem = {
49 .id = X1E80100_MASTER_UFS_MEM,
53 .links = { X1E80100_SLAVE_A1NOC_SNOC },
56 static struct qcom_icc_node qhm_qup0 = {
58 .id = X1E80100_MASTER_QUP_0,
62 .links = { X1E80100_SLAVE_A2NOC_SNOC },
65 static struct qcom_icc_node qhm_qup2 = {
67 .id = X1E80100_MASTER_QUP_2,
71 .links = { X1E80100_SLAVE_A2NOC_SNOC },
74 static struct qcom_icc_node qxm_crypto = {
76 .id = X1E80100_MASTER_CRYPTO,
80 .links = { X1E80100_SLAVE_A2NOC_SNOC },
83 static struct qcom_icc_node qxm_sp = {
85 .id = X1E80100_MASTER_SP,
89 .links = { X1E80100_SLAVE_A2NOC_SNOC },
92 static struct qcom_icc_node xm_qdss_etr_0 = {
93 .name = "xm_qdss_etr_0",
94 .id = X1E80100_MASTER_QDSS_ETR,
98 .links = { X1E80100_SLAVE_A2NOC_SNOC },
101 static struct qcom_icc_node xm_qdss_etr_1 = {
102 .name = "xm_qdss_etr_1",
103 .id = X1E80100_MASTER_QDSS_ETR_1,
107 .links = { X1E80100_SLAVE_A2NOC_SNOC },
110 static struct qcom_icc_node xm_sdc2 = {
112 .id = X1E80100_MASTER_SDCC_2,
116 .links = { X1E80100_SLAVE_A2NOC_SNOC },
119 static struct qcom_icc_node ddr_perf_mode_master = {
120 .name = "ddr_perf_mode_master",
121 .id = X1E80100_MASTER_DDR_PERF_MODE,
125 .links = { X1E80100_SLAVE_DDR_PERF_MODE },
128 static struct qcom_icc_node qup0_core_master = {
129 .name = "qup0_core_master",
130 .id = X1E80100_MASTER_QUP_CORE_0,
134 .links = { X1E80100_SLAVE_QUP_CORE_0 },
137 static struct qcom_icc_node qup1_core_master = {
138 .name = "qup1_core_master",
139 .id = X1E80100_MASTER_QUP_CORE_1,
143 .links = { X1E80100_SLAVE_QUP_CORE_1 },
146 static struct qcom_icc_node qup2_core_master = {
147 .name = "qup2_core_master",
148 .id = X1E80100_MASTER_QUP_CORE_2,
152 .links = { X1E80100_SLAVE_QUP_CORE_2 },
155 static struct qcom_icc_node qsm_cfg = {
157 .id = X1E80100_MASTER_CNOC_CFG,
161 .links = { X1E80100_SLAVE_AHB2PHY_SOUTH, X1E80100_SLAVE_AHB2PHY_NORTH,
162 X1E80100_SLAVE_AHB2PHY_2, X1E80100_SLAVE_AV1_ENC_CFG,
163 X1E80100_SLAVE_CAMERA_CFG, X1E80100_SLAVE_CLK_CTL,
164 X1E80100_SLAVE_CRYPTO_0_CFG, X1E80100_SLAVE_DISPLAY_CFG,
165 X1E80100_SLAVE_GFX3D_CFG, X1E80100_SLAVE_IMEM_CFG,
166 X1E80100_SLAVE_IPC_ROUTER_CFG, X1E80100_SLAVE_PCIE_0_CFG,
167 X1E80100_SLAVE_PCIE_1_CFG, X1E80100_SLAVE_PCIE_2_CFG,
168 X1E80100_SLAVE_PCIE_3_CFG, X1E80100_SLAVE_PCIE_4_CFG,
169 X1E80100_SLAVE_PCIE_5_CFG, X1E80100_SLAVE_PCIE_6A_CFG,
170 X1E80100_SLAVE_PCIE_6B_CFG, X1E80100_SLAVE_PCIE_RSC_CFG,
171 X1E80100_SLAVE_PDM, X1E80100_SLAVE_PRNG,
172 X1E80100_SLAVE_QDSS_CFG, X1E80100_SLAVE_QSPI_0,
173 X1E80100_SLAVE_QUP_0, X1E80100_SLAVE_QUP_1,
174 X1E80100_SLAVE_QUP_2, X1E80100_SLAVE_SDCC_2,
175 X1E80100_SLAVE_SDCC_4, X1E80100_SLAVE_SMMUV3_CFG,
176 X1E80100_SLAVE_TCSR, X1E80100_SLAVE_TLMM,
177 X1E80100_SLAVE_UFS_MEM_CFG, X1E80100_SLAVE_USB2,
178 X1E80100_SLAVE_USB3_0, X1E80100_SLAVE_USB3_1,
179 X1E80100_SLAVE_USB3_2, X1E80100_SLAVE_USB3_MP,
180 X1E80100_SLAVE_USB4_0, X1E80100_SLAVE_USB4_1,
181 X1E80100_SLAVE_USB4_2, X1E80100_SLAVE_VENUS_CFG,
182 X1E80100_SLAVE_LPASS_QTB_CFG, X1E80100_SLAVE_CNOC_MNOC_CFG,
183 X1E80100_SLAVE_NSP_QTB_CFG, X1E80100_SLAVE_QDSS_STM,
184 X1E80100_SLAVE_TCU },
187 static struct qcom_icc_node qnm_gemnoc_cnoc = {
188 .name = "qnm_gemnoc_cnoc",
189 .id = X1E80100_MASTER_GEM_NOC_CNOC,
193 .links = { X1E80100_SLAVE_AOSS, X1E80100_SLAVE_TME_CFG,
194 X1E80100_SLAVE_APPSS, X1E80100_SLAVE_CNOC_CFG,
195 X1E80100_SLAVE_BOOT_IMEM, X1E80100_SLAVE_IMEM },
198 static struct qcom_icc_node qnm_gemnoc_pcie = {
199 .name = "qnm_gemnoc_pcie",
200 .id = X1E80100_MASTER_GEM_NOC_PCIE_SNOC,
204 .links = { X1E80100_SLAVE_PCIE_0, X1E80100_SLAVE_PCIE_1,
205 X1E80100_SLAVE_PCIE_2, X1E80100_SLAVE_PCIE_3,
206 X1E80100_SLAVE_PCIE_4, X1E80100_SLAVE_PCIE_5,
207 X1E80100_SLAVE_PCIE_6A, X1E80100_SLAVE_PCIE_6B },
210 static struct qcom_icc_node alm_gpu_tcu = {
211 .name = "alm_gpu_tcu",
212 .id = X1E80100_MASTER_GPU_TCU,
216 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
219 static struct qcom_icc_node alm_pcie_tcu = {
220 .name = "alm_pcie_tcu",
221 .id = X1E80100_MASTER_PCIE_TCU,
225 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
228 static struct qcom_icc_node alm_sys_tcu = {
229 .name = "alm_sys_tcu",
230 .id = X1E80100_MASTER_SYS_TCU,
234 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
237 static struct qcom_icc_node chm_apps = {
239 .id = X1E80100_MASTER_APPSS_PROC,
243 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC,
244 X1E80100_SLAVE_MEM_NOC_PCIE_SNOC },
247 static struct qcom_icc_node qnm_gpu = {
249 .id = X1E80100_MASTER_GFX3D,
253 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
256 static struct qcom_icc_node qnm_lpass = {
258 .id = X1E80100_MASTER_LPASS_GEM_NOC,
262 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC,
263 X1E80100_SLAVE_MEM_NOC_PCIE_SNOC },
266 static struct qcom_icc_node qnm_mnoc_hf = {
267 .name = "qnm_mnoc_hf",
268 .id = X1E80100_MASTER_MNOC_HF_MEM_NOC,
272 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
275 static struct qcom_icc_node qnm_mnoc_sf = {
276 .name = "qnm_mnoc_sf",
277 .id = X1E80100_MASTER_MNOC_SF_MEM_NOC,
281 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
284 static struct qcom_icc_node qnm_nsp_noc = {
285 .name = "qnm_nsp_noc",
286 .id = X1E80100_MASTER_COMPUTE_NOC,
290 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC,
291 X1E80100_SLAVE_MEM_NOC_PCIE_SNOC },
294 static struct qcom_icc_node qnm_pcie = {
296 .id = X1E80100_MASTER_ANOC_PCIE_GEM_NOC,
300 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC },
303 static struct qcom_icc_node qnm_snoc_sf = {
304 .name = "qnm_snoc_sf",
305 .id = X1E80100_MASTER_SNOC_SF_MEM_NOC,
309 .links = { X1E80100_SLAVE_GEM_NOC_CNOC, X1E80100_SLAVE_LLCC,
310 X1E80100_SLAVE_MEM_NOC_PCIE_SNOC },
313 static struct qcom_icc_node xm_gic = {
315 .id = X1E80100_MASTER_GIC2,
319 .links = { X1E80100_SLAVE_LLCC },
322 static struct qcom_icc_node qnm_lpiaon_noc = {
323 .name = "qnm_lpiaon_noc",
324 .id = X1E80100_MASTER_LPIAON_NOC,
328 .links = { X1E80100_SLAVE_LPASS_GEM_NOC },
331 static struct qcom_icc_node qnm_lpass_lpinoc = {
332 .name = "qnm_lpass_lpinoc",
333 .id = X1E80100_MASTER_LPASS_LPINOC,
337 .links = { X1E80100_SLAVE_LPIAON_NOC_LPASS_AG_NOC },
340 static struct qcom_icc_node qxm_lpinoc_dsp_axim = {
341 .name = "qxm_lpinoc_dsp_axim",
342 .id = X1E80100_MASTER_LPASS_PROC,
346 .links = { X1E80100_SLAVE_LPICX_NOC_LPIAON_NOC },
349 static struct qcom_icc_node llcc_mc = {
351 .id = X1E80100_MASTER_LLCC,
355 .links = { X1E80100_SLAVE_EBI1 },
358 static struct qcom_icc_node qnm_av1_enc = {
359 .name = "qnm_av1_enc",
360 .id = X1E80100_MASTER_AV1_ENC,
364 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
367 static struct qcom_icc_node qnm_camnoc_hf = {
368 .name = "qnm_camnoc_hf",
369 .id = X1E80100_MASTER_CAMNOC_HF,
373 .links = { X1E80100_SLAVE_MNOC_HF_MEM_NOC },
376 static struct qcom_icc_node qnm_camnoc_icp = {
377 .name = "qnm_camnoc_icp",
378 .id = X1E80100_MASTER_CAMNOC_ICP,
382 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
385 static struct qcom_icc_node qnm_camnoc_sf = {
386 .name = "qnm_camnoc_sf",
387 .id = X1E80100_MASTER_CAMNOC_SF,
391 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
394 static struct qcom_icc_node qnm_eva = {
396 .id = X1E80100_MASTER_EVA,
400 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
403 static struct qcom_icc_node qnm_mdp = {
405 .id = X1E80100_MASTER_MDP,
409 .links = { X1E80100_SLAVE_MNOC_HF_MEM_NOC },
412 static struct qcom_icc_node qnm_video = {
414 .id = X1E80100_MASTER_VIDEO,
418 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
421 static struct qcom_icc_node qnm_video_cv_cpu = {
422 .name = "qnm_video_cv_cpu",
423 .id = X1E80100_MASTER_VIDEO_CV_PROC,
427 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
430 static struct qcom_icc_node qnm_video_v_cpu = {
431 .name = "qnm_video_v_cpu",
432 .id = X1E80100_MASTER_VIDEO_V_PROC,
436 .links = { X1E80100_SLAVE_MNOC_SF_MEM_NOC },
439 static struct qcom_icc_node qsm_mnoc_cfg = {
440 .name = "qsm_mnoc_cfg",
441 .id = X1E80100_MASTER_CNOC_MNOC_CFG,
445 .links = { X1E80100_SLAVE_SERVICE_MNOC },
448 static struct qcom_icc_node qxm_nsp = {
450 .id = X1E80100_MASTER_CDSP_PROC,
454 .links = { X1E80100_SLAVE_CDSP_MEM_NOC },
457 static struct qcom_icc_node qnm_pcie_north_gem_noc = {
458 .name = "qnm_pcie_north_gem_noc",
459 .id = X1E80100_MASTER_PCIE_NORTH,
463 .links = { X1E80100_SLAVE_ANOC_PCIE_GEM_NOC },
466 static struct qcom_icc_node qnm_pcie_south_gem_noc = {
467 .name = "qnm_pcie_south_gem_noc",
468 .id = X1E80100_MASTER_PCIE_SOUTH,
472 .links = { X1E80100_SLAVE_ANOC_PCIE_GEM_NOC },
475 static struct qcom_icc_node xm_pcie_3 = {
477 .id = X1E80100_MASTER_PCIE_3,
481 .links = { X1E80100_SLAVE_PCIE_NORTH },
484 static struct qcom_icc_node xm_pcie_4 = {
486 .id = X1E80100_MASTER_PCIE_4,
490 .links = { X1E80100_SLAVE_PCIE_NORTH },
493 static struct qcom_icc_node xm_pcie_5 = {
495 .id = X1E80100_MASTER_PCIE_5,
499 .links = { X1E80100_SLAVE_PCIE_NORTH },
502 static struct qcom_icc_node xm_pcie_0 = {
504 .id = X1E80100_MASTER_PCIE_0,
508 .links = { X1E80100_SLAVE_PCIE_SOUTH },
511 static struct qcom_icc_node xm_pcie_1 = {
513 .id = X1E80100_MASTER_PCIE_1,
517 .links = { X1E80100_SLAVE_PCIE_SOUTH },
520 static struct qcom_icc_node xm_pcie_2 = {
522 .id = X1E80100_MASTER_PCIE_2,
526 .links = { X1E80100_SLAVE_PCIE_SOUTH },
529 static struct qcom_icc_node xm_pcie_6a = {
530 .name = "xm_pcie_6a",
531 .id = X1E80100_MASTER_PCIE_6A,
535 .links = { X1E80100_SLAVE_PCIE_SOUTH },
538 static struct qcom_icc_node xm_pcie_6b = {
539 .name = "xm_pcie_6b",
540 .id = X1E80100_MASTER_PCIE_6B,
544 .links = { X1E80100_SLAVE_PCIE_SOUTH },
547 static struct qcom_icc_node qnm_aggre1_noc = {
548 .name = "qnm_aggre1_noc",
549 .id = X1E80100_MASTER_A1NOC_SNOC,
553 .links = { X1E80100_SLAVE_SNOC_GEM_NOC_SF },
556 static struct qcom_icc_node qnm_aggre2_noc = {
557 .name = "qnm_aggre2_noc",
558 .id = X1E80100_MASTER_A2NOC_SNOC,
562 .links = { X1E80100_SLAVE_SNOC_GEM_NOC_SF },
565 static struct qcom_icc_node qnm_gic = {
567 .id = X1E80100_MASTER_GIC1,
571 .links = { X1E80100_SLAVE_SNOC_GEM_NOC_SF },
574 static struct qcom_icc_node qnm_usb_anoc = {
575 .name = "qnm_usb_anoc",
576 .id = X1E80100_MASTER_USB_NOC_SNOC,
580 .links = { X1E80100_SLAVE_SNOC_GEM_NOC_SF },
583 static struct qcom_icc_node qnm_aggre_usb_north_snoc = {
584 .name = "qnm_aggre_usb_north_snoc",
585 .id = X1E80100_MASTER_AGGRE_USB_NORTH,
589 .links = { X1E80100_SLAVE_USB_NOC_SNOC },
592 static struct qcom_icc_node qnm_aggre_usb_south_snoc = {
593 .name = "qnm_aggre_usb_south_snoc",
594 .id = X1E80100_MASTER_AGGRE_USB_SOUTH,
598 .links = { X1E80100_SLAVE_USB_NOC_SNOC },
601 static struct qcom_icc_node xm_usb2_0 = {
603 .id = X1E80100_MASTER_USB2,
607 .links = { X1E80100_SLAVE_AGGRE_USB_NORTH },
610 static struct qcom_icc_node xm_usb3_mp = {
611 .name = "xm_usb3_mp",
612 .id = X1E80100_MASTER_USB3_MP,
616 .links = { X1E80100_SLAVE_AGGRE_USB_NORTH },
619 static struct qcom_icc_node xm_usb3_0 = {
621 .id = X1E80100_MASTER_USB3_0,
625 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
628 static struct qcom_icc_node xm_usb3_1 = {
630 .id = X1E80100_MASTER_USB3_1,
634 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
637 static struct qcom_icc_node xm_usb3_2 = {
639 .id = X1E80100_MASTER_USB3_2,
643 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
646 static struct qcom_icc_node xm_usb4_0 = {
648 .id = X1E80100_MASTER_USB4_0,
652 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
655 static struct qcom_icc_node xm_usb4_1 = {
657 .id = X1E80100_MASTER_USB4_1,
661 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
664 static struct qcom_icc_node xm_usb4_2 = {
666 .id = X1E80100_MASTER_USB4_2,
670 .links = { X1E80100_SLAVE_AGGRE_USB_SOUTH },
673 static struct qcom_icc_node qns_a1noc_snoc = {
674 .name = "qns_a1noc_snoc",
675 .id = X1E80100_SLAVE_A1NOC_SNOC,
679 .links = { X1E80100_MASTER_A1NOC_SNOC },
682 static struct qcom_icc_node qns_a2noc_snoc = {
683 .name = "qns_a2noc_snoc",
684 .id = X1E80100_SLAVE_A2NOC_SNOC,
688 .links = { X1E80100_MASTER_A2NOC_SNOC },
691 static struct qcom_icc_node ddr_perf_mode_slave = {
692 .name = "ddr_perf_mode_slave",
693 .id = X1E80100_SLAVE_DDR_PERF_MODE,
699 static struct qcom_icc_node qup0_core_slave = {
700 .name = "qup0_core_slave",
701 .id = X1E80100_SLAVE_QUP_CORE_0,
707 static struct qcom_icc_node qup1_core_slave = {
708 .name = "qup1_core_slave",
709 .id = X1E80100_SLAVE_QUP_CORE_1,
715 static struct qcom_icc_node qup2_core_slave = {
716 .name = "qup2_core_slave",
717 .id = X1E80100_SLAVE_QUP_CORE_2,
723 static struct qcom_icc_node qhs_ahb2phy0 = {
724 .name = "qhs_ahb2phy0",
725 .id = X1E80100_SLAVE_AHB2PHY_SOUTH,
731 static struct qcom_icc_node qhs_ahb2phy1 = {
732 .name = "qhs_ahb2phy1",
733 .id = X1E80100_SLAVE_AHB2PHY_NORTH,
739 static struct qcom_icc_node qhs_ahb2phy2 = {
740 .name = "qhs_ahb2phy2",
741 .id = X1E80100_SLAVE_AHB2PHY_2,
747 static struct qcom_icc_node qhs_av1_enc_cfg = {
748 .name = "qhs_av1_enc_cfg",
749 .id = X1E80100_SLAVE_AV1_ENC_CFG,
755 static struct qcom_icc_node qhs_camera_cfg = {
756 .name = "qhs_camera_cfg",
757 .id = X1E80100_SLAVE_CAMERA_CFG,
763 static struct qcom_icc_node qhs_clk_ctl = {
764 .name = "qhs_clk_ctl",
765 .id = X1E80100_SLAVE_CLK_CTL,
771 static struct qcom_icc_node qhs_crypto0_cfg = {
772 .name = "qhs_crypto0_cfg",
773 .id = X1E80100_SLAVE_CRYPTO_0_CFG,
779 static struct qcom_icc_node qhs_display_cfg = {
780 .name = "qhs_display_cfg",
781 .id = X1E80100_SLAVE_DISPLAY_CFG,
787 static struct qcom_icc_node qhs_gpuss_cfg = {
788 .name = "qhs_gpuss_cfg",
789 .id = X1E80100_SLAVE_GFX3D_CFG,
795 static struct qcom_icc_node qhs_imem_cfg = {
796 .name = "qhs_imem_cfg",
797 .id = X1E80100_SLAVE_IMEM_CFG,
803 static struct qcom_icc_node qhs_ipc_router = {
804 .name = "qhs_ipc_router",
805 .id = X1E80100_SLAVE_IPC_ROUTER_CFG,
811 static struct qcom_icc_node qhs_pcie0_cfg = {
812 .name = "qhs_pcie0_cfg",
813 .id = X1E80100_SLAVE_PCIE_0_CFG,
819 static struct qcom_icc_node qhs_pcie1_cfg = {
820 .name = "qhs_pcie1_cfg",
821 .id = X1E80100_SLAVE_PCIE_1_CFG,
827 static struct qcom_icc_node qhs_pcie2_cfg = {
828 .name = "qhs_pcie2_cfg",
829 .id = X1E80100_SLAVE_PCIE_2_CFG,
835 static struct qcom_icc_node qhs_pcie3_cfg = {
836 .name = "qhs_pcie3_cfg",
837 .id = X1E80100_SLAVE_PCIE_3_CFG,
843 static struct qcom_icc_node qhs_pcie4_cfg = {
844 .name = "qhs_pcie4_cfg",
845 .id = X1E80100_SLAVE_PCIE_4_CFG,
851 static struct qcom_icc_node qhs_pcie5_cfg = {
852 .name = "qhs_pcie5_cfg",
853 .id = X1E80100_SLAVE_PCIE_5_CFG,
859 static struct qcom_icc_node qhs_pcie6a_cfg = {
860 .name = "qhs_pcie6a_cfg",
861 .id = X1E80100_SLAVE_PCIE_6A_CFG,
867 static struct qcom_icc_node qhs_pcie6b_cfg = {
868 .name = "qhs_pcie6b_cfg",
869 .id = X1E80100_SLAVE_PCIE_6B_CFG,
875 static struct qcom_icc_node qhs_pcie_rsc_cfg = {
876 .name = "qhs_pcie_rsc_cfg",
877 .id = X1E80100_SLAVE_PCIE_RSC_CFG,
883 static struct qcom_icc_node qhs_pdm = {
885 .id = X1E80100_SLAVE_PDM,
891 static struct qcom_icc_node qhs_prng = {
893 .id = X1E80100_SLAVE_PRNG,
899 static struct qcom_icc_node qhs_qdss_cfg = {
900 .name = "qhs_qdss_cfg",
901 .id = X1E80100_SLAVE_QDSS_CFG,
907 static struct qcom_icc_node qhs_qspi = {
909 .id = X1E80100_SLAVE_QSPI_0,
915 static struct qcom_icc_node qhs_qup0 = {
917 .id = X1E80100_SLAVE_QUP_0,
923 static struct qcom_icc_node qhs_qup1 = {
925 .id = X1E80100_SLAVE_QUP_1,
931 static struct qcom_icc_node qhs_qup2 = {
933 .id = X1E80100_SLAVE_QUP_2,
939 static struct qcom_icc_node qhs_sdc2 = {
941 .id = X1E80100_SLAVE_SDCC_2,
947 static struct qcom_icc_node qhs_sdc4 = {
949 .id = X1E80100_SLAVE_SDCC_4,
955 static struct qcom_icc_node qhs_smmuv3_cfg = {
956 .name = "qhs_smmuv3_cfg",
957 .id = X1E80100_SLAVE_SMMUV3_CFG,
963 static struct qcom_icc_node qhs_tcsr = {
965 .id = X1E80100_SLAVE_TCSR,
971 static struct qcom_icc_node qhs_tlmm = {
973 .id = X1E80100_SLAVE_TLMM,
979 static struct qcom_icc_node qhs_ufs_mem_cfg = {
980 .name = "qhs_ufs_mem_cfg",
981 .id = X1E80100_SLAVE_UFS_MEM_CFG,
987 static struct qcom_icc_node qhs_usb2_0_cfg = {
988 .name = "qhs_usb2_0_cfg",
989 .id = X1E80100_SLAVE_USB2,
995 static struct qcom_icc_node qhs_usb3_0_cfg = {
996 .name = "qhs_usb3_0_cfg",
997 .id = X1E80100_SLAVE_USB3_0,
1003 static struct qcom_icc_node qhs_usb3_1_cfg = {
1004 .name = "qhs_usb3_1_cfg",
1005 .id = X1E80100_SLAVE_USB3_1,
1011 static struct qcom_icc_node qhs_usb3_2_cfg = {
1012 .name = "qhs_usb3_2_cfg",
1013 .id = X1E80100_SLAVE_USB3_2,
1019 static struct qcom_icc_node qhs_usb3_mp_cfg = {
1020 .name = "qhs_usb3_mp_cfg",
1021 .id = X1E80100_SLAVE_USB3_MP,
1027 static struct qcom_icc_node qhs_usb4_0_cfg = {
1028 .name = "qhs_usb4_0_cfg",
1029 .id = X1E80100_SLAVE_USB4_0,
1035 static struct qcom_icc_node qhs_usb4_1_cfg = {
1036 .name = "qhs_usb4_1_cfg",
1037 .id = X1E80100_SLAVE_USB4_1,
1043 static struct qcom_icc_node qhs_usb4_2_cfg = {
1044 .name = "qhs_usb4_2_cfg",
1045 .id = X1E80100_SLAVE_USB4_2,
1051 static struct qcom_icc_node qhs_venus_cfg = {
1052 .name = "qhs_venus_cfg",
1053 .id = X1E80100_SLAVE_VENUS_CFG,
1059 static struct qcom_icc_node qss_lpass_qtb_cfg = {
1060 .name = "qss_lpass_qtb_cfg",
1061 .id = X1E80100_SLAVE_LPASS_QTB_CFG,
1067 static struct qcom_icc_node qss_mnoc_cfg = {
1068 .name = "qss_mnoc_cfg",
1069 .id = X1E80100_SLAVE_CNOC_MNOC_CFG,
1073 .links = { X1E80100_MASTER_CNOC_MNOC_CFG },
1076 static struct qcom_icc_node qss_nsp_qtb_cfg = {
1077 .name = "qss_nsp_qtb_cfg",
1078 .id = X1E80100_SLAVE_NSP_QTB_CFG,
1084 static struct qcom_icc_node xs_qdss_stm = {
1085 .name = "xs_qdss_stm",
1086 .id = X1E80100_SLAVE_QDSS_STM,
1092 static struct qcom_icc_node xs_sys_tcu_cfg = {
1093 .name = "xs_sys_tcu_cfg",
1094 .id = X1E80100_SLAVE_TCU,
1100 static struct qcom_icc_node qhs_aoss = {
1102 .id = X1E80100_SLAVE_AOSS,
1108 static struct qcom_icc_node qhs_tme_cfg = {
1109 .name = "qhs_tme_cfg",
1110 .id = X1E80100_SLAVE_TME_CFG,
1116 static struct qcom_icc_node qns_apss = {
1118 .id = X1E80100_SLAVE_APPSS,
1124 static struct qcom_icc_node qss_cfg = {
1126 .id = X1E80100_SLAVE_CNOC_CFG,
1130 .links = { X1E80100_MASTER_CNOC_CFG },
1133 static struct qcom_icc_node qxs_boot_imem = {
1134 .name = "qxs_boot_imem",
1135 .id = X1E80100_SLAVE_BOOT_IMEM,
1141 static struct qcom_icc_node qxs_imem = {
1143 .id = X1E80100_SLAVE_IMEM,
1149 static struct qcom_icc_node xs_pcie_0 = {
1150 .name = "xs_pcie_0",
1151 .id = X1E80100_SLAVE_PCIE_0,
1157 static struct qcom_icc_node xs_pcie_1 = {
1158 .name = "xs_pcie_1",
1159 .id = X1E80100_SLAVE_PCIE_1,
1165 static struct qcom_icc_node xs_pcie_2 = {
1166 .name = "xs_pcie_2",
1167 .id = X1E80100_SLAVE_PCIE_2,
1173 static struct qcom_icc_node xs_pcie_3 = {
1174 .name = "xs_pcie_3",
1175 .id = X1E80100_SLAVE_PCIE_3,
1181 static struct qcom_icc_node xs_pcie_4 = {
1182 .name = "xs_pcie_4",
1183 .id = X1E80100_SLAVE_PCIE_4,
1189 static struct qcom_icc_node xs_pcie_5 = {
1190 .name = "xs_pcie_5",
1191 .id = X1E80100_SLAVE_PCIE_5,
1197 static struct qcom_icc_node xs_pcie_6a = {
1198 .name = "xs_pcie_6a",
1199 .id = X1E80100_SLAVE_PCIE_6A,
1205 static struct qcom_icc_node xs_pcie_6b = {
1206 .name = "xs_pcie_6b",
1207 .id = X1E80100_SLAVE_PCIE_6B,
1213 static struct qcom_icc_node qns_gem_noc_cnoc = {
1214 .name = "qns_gem_noc_cnoc",
1215 .id = X1E80100_SLAVE_GEM_NOC_CNOC,
1219 .links = { X1E80100_MASTER_GEM_NOC_CNOC },
1222 static struct qcom_icc_node qns_llcc = {
1224 .id = X1E80100_SLAVE_LLCC,
1228 .links = { X1E80100_MASTER_LLCC },
1231 static struct qcom_icc_node qns_pcie = {
1233 .id = X1E80100_SLAVE_MEM_NOC_PCIE_SNOC,
1237 .links = { X1E80100_MASTER_GEM_NOC_PCIE_SNOC },
1240 static struct qcom_icc_node qns_lpass_ag_noc_gemnoc = {
1241 .name = "qns_lpass_ag_noc_gemnoc",
1242 .id = X1E80100_SLAVE_LPASS_GEM_NOC,
1246 .links = { X1E80100_MASTER_LPASS_GEM_NOC },
1249 static struct qcom_icc_node qns_lpass_aggnoc = {
1250 .name = "qns_lpass_aggnoc",
1251 .id = X1E80100_SLAVE_LPIAON_NOC_LPASS_AG_NOC,
1255 .links = { X1E80100_MASTER_LPIAON_NOC },
1258 static struct qcom_icc_node qns_lpi_aon_noc = {
1259 .name = "qns_lpi_aon_noc",
1260 .id = X1E80100_SLAVE_LPICX_NOC_LPIAON_NOC,
1264 .links = { X1E80100_MASTER_LPASS_LPINOC },
1267 static struct qcom_icc_node ebi = {
1269 .id = X1E80100_SLAVE_EBI1,
1275 static struct qcom_icc_node qns_mem_noc_hf = {
1276 .name = "qns_mem_noc_hf",
1277 .id = X1E80100_SLAVE_MNOC_HF_MEM_NOC,
1281 .links = { X1E80100_MASTER_MNOC_HF_MEM_NOC },
1284 static struct qcom_icc_node qns_mem_noc_sf = {
1285 .name = "qns_mem_noc_sf",
1286 .id = X1E80100_SLAVE_MNOC_SF_MEM_NOC,
1290 .links = { X1E80100_MASTER_MNOC_SF_MEM_NOC },
1293 static struct qcom_icc_node srvc_mnoc = {
1294 .name = "srvc_mnoc",
1295 .id = X1E80100_SLAVE_SERVICE_MNOC,
1301 static struct qcom_icc_node qns_nsp_gemnoc = {
1302 .name = "qns_nsp_gemnoc",
1303 .id = X1E80100_SLAVE_CDSP_MEM_NOC,
1307 .links = { X1E80100_MASTER_COMPUTE_NOC },
1310 static struct qcom_icc_node qns_pcie_mem_noc = {
1311 .name = "qns_pcie_mem_noc",
1312 .id = X1E80100_SLAVE_ANOC_PCIE_GEM_NOC,
1316 .links = { X1E80100_MASTER_ANOC_PCIE_GEM_NOC },
1319 static struct qcom_icc_node qns_pcie_north_gem_noc = {
1320 .name = "qns_pcie_north_gem_noc",
1321 .id = X1E80100_SLAVE_PCIE_NORTH,
1325 .links = { X1E80100_MASTER_PCIE_NORTH },
1328 static struct qcom_icc_node qns_pcie_south_gem_noc = {
1329 .name = "qns_pcie_south_gem_noc",
1330 .id = X1E80100_SLAVE_PCIE_SOUTH,
1334 .links = { X1E80100_MASTER_PCIE_SOUTH },
1337 static struct qcom_icc_node qns_gemnoc_sf = {
1338 .name = "qns_gemnoc_sf",
1339 .id = X1E80100_SLAVE_SNOC_GEM_NOC_SF,
1343 .links = { X1E80100_MASTER_SNOC_SF_MEM_NOC },
1346 static struct qcom_icc_node qns_aggre_usb_snoc = {
1347 .name = "qns_aggre_usb_snoc",
1348 .id = X1E80100_SLAVE_USB_NOC_SNOC,
1352 .links = { X1E80100_MASTER_USB_NOC_SNOC },
1355 static struct qcom_icc_node qns_aggre_usb_north_snoc = {
1356 .name = "qns_aggre_usb_north_snoc",
1357 .id = X1E80100_SLAVE_AGGRE_USB_NORTH,
1361 .links = { X1E80100_MASTER_AGGRE_USB_NORTH },
1364 static struct qcom_icc_node qns_aggre_usb_south_snoc = {
1365 .name = "qns_aggre_usb_south_snoc",
1366 .id = X1E80100_SLAVE_AGGRE_USB_SOUTH,
1370 .links = { X1E80100_MASTER_AGGRE_USB_SOUTH },
1373 static struct qcom_icc_bcm bcm_acv = {
1375 .enable_mask = BIT(3),
1380 static struct qcom_icc_bcm bcm_acv_perf = {
1383 .nodes = { &ddr_perf_mode_slave },
1386 static struct qcom_icc_bcm bcm_ce0 = {
1389 .nodes = { &qxm_crypto },
1392 static struct qcom_icc_bcm bcm_cn0 = {
1396 .nodes = { &qsm_cfg, &qhs_ahb2phy0,
1397 &qhs_ahb2phy1, &qhs_ahb2phy2,
1398 &qhs_av1_enc_cfg, &qhs_camera_cfg,
1399 &qhs_clk_ctl, &qhs_crypto0_cfg,
1400 &qhs_gpuss_cfg, &qhs_imem_cfg,
1401 &qhs_ipc_router, &qhs_pcie0_cfg,
1402 &qhs_pcie1_cfg, &qhs_pcie2_cfg,
1403 &qhs_pcie3_cfg, &qhs_pcie4_cfg,
1404 &qhs_pcie5_cfg, &qhs_pcie6a_cfg,
1405 &qhs_pcie6b_cfg, &qhs_pcie_rsc_cfg,
1406 &qhs_pdm, &qhs_prng,
1407 &qhs_qdss_cfg, &qhs_qspi,
1408 &qhs_qup0, &qhs_qup1,
1409 &qhs_qup2, &qhs_sdc2,
1410 &qhs_sdc4, &qhs_smmuv3_cfg,
1411 &qhs_tcsr, &qhs_tlmm,
1412 &qhs_ufs_mem_cfg, &qhs_usb2_0_cfg,
1413 &qhs_usb3_0_cfg, &qhs_usb3_1_cfg,
1414 &qhs_usb3_2_cfg, &qhs_usb3_mp_cfg,
1415 &qhs_usb4_0_cfg, &qhs_usb4_1_cfg,
1416 &qhs_usb4_2_cfg, &qhs_venus_cfg,
1417 &qss_lpass_qtb_cfg, &qss_mnoc_cfg,
1418 &qss_nsp_qtb_cfg, &xs_qdss_stm,
1419 &xs_sys_tcu_cfg, &qnm_gemnoc_cnoc,
1420 &qnm_gemnoc_pcie, &qhs_aoss,
1421 &qhs_tme_cfg, &qns_apss,
1422 &qss_cfg, &qxs_boot_imem,
1423 &qxs_imem, &xs_pcie_0,
1424 &xs_pcie_1, &xs_pcie_2,
1425 &xs_pcie_3, &xs_pcie_4,
1426 &xs_pcie_5, &xs_pcie_6a,
1430 static struct qcom_icc_bcm bcm_cn1 = {
1433 .nodes = { &qhs_display_cfg },
1436 static struct qcom_icc_bcm bcm_co0 = {
1439 .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
1442 static struct qcom_icc_bcm bcm_lp0 = {
1445 .nodes = { &qnm_lpass_lpinoc, &qns_lpass_aggnoc },
1448 static struct qcom_icc_bcm bcm_mc0 = {
1455 static struct qcom_icc_bcm bcm_mm0 = {
1458 .nodes = { &qns_mem_noc_hf },
1461 static struct qcom_icc_bcm bcm_mm1 = {
1464 .nodes = { &qnm_av1_enc, &qnm_camnoc_hf,
1465 &qnm_camnoc_icp, &qnm_camnoc_sf,
1467 &qnm_video, &qnm_video_cv_cpu,
1468 &qnm_video_v_cpu, &qns_mem_noc_sf },
1471 static struct qcom_icc_bcm bcm_pc0 = {
1474 .nodes = { &qns_pcie_mem_noc },
1477 static struct qcom_icc_bcm bcm_qup0 = {
1482 .nodes = { &qup0_core_slave },
1485 static struct qcom_icc_bcm bcm_qup1 = {
1490 .nodes = { &qup1_core_slave },
1493 static struct qcom_icc_bcm bcm_qup2 = {
1498 .nodes = { &qup2_core_slave },
1501 static struct qcom_icc_bcm bcm_sh0 = {
1505 .nodes = { &qns_llcc },
1508 static struct qcom_icc_bcm bcm_sh1 = {
1511 .nodes = { &alm_gpu_tcu, &alm_pcie_tcu,
1512 &alm_sys_tcu, &chm_apps,
1513 &qnm_gpu, &qnm_lpass,
1514 &qnm_mnoc_hf, &qnm_mnoc_sf,
1515 &qnm_nsp_noc, &qnm_pcie,
1516 &xm_gic, &qns_gem_noc_cnoc,
1520 static struct qcom_icc_bcm bcm_sn0 = {
1524 .nodes = { &qns_gemnoc_sf },
1527 static struct qcom_icc_bcm bcm_sn2 = {
1530 .nodes = { &qnm_aggre1_noc },
1533 static struct qcom_icc_bcm bcm_sn3 = {
1536 .nodes = { &qnm_aggre2_noc },
1539 static struct qcom_icc_bcm bcm_sn4 = {
1542 .nodes = { &qnm_usb_anoc },
1545 static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
1548 static struct qcom_icc_node * const aggre1_noc_nodes[] = {
1549 [MASTER_QSPI_0] = &qhm_qspi,
1550 [MASTER_QUP_1] = &qhm_qup1,
1551 [MASTER_SDCC_4] = &xm_sdc4,
1552 [MASTER_UFS_MEM] = &xm_ufs_mem,
1553 [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
1556 static const struct qcom_icc_desc x1e80100_aggre1_noc = {
1557 .nodes = aggre1_noc_nodes,
1558 .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
1559 .bcms = aggre1_noc_bcms,
1560 .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
1563 static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
1567 static struct qcom_icc_node * const aggre2_noc_nodes[] = {
1568 [MASTER_QUP_0] = &qhm_qup0,
1569 [MASTER_QUP_2] = &qhm_qup2,
1570 [MASTER_CRYPTO] = &qxm_crypto,
1571 [MASTER_SP] = &qxm_sp,
1572 [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
1573 [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
1574 [MASTER_SDCC_2] = &xm_sdc2,
1575 [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
1578 static const struct qcom_icc_desc x1e80100_aggre2_noc = {
1579 .nodes = aggre2_noc_nodes,
1580 .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
1581 .bcms = aggre2_noc_bcms,
1582 .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
1585 static struct qcom_icc_bcm * const clk_virt_bcms[] = {
1592 static struct qcom_icc_node * const clk_virt_nodes[] = {
1593 [MASTER_DDR_PERF_MODE] = &ddr_perf_mode_master,
1594 [MASTER_QUP_CORE_0] = &qup0_core_master,
1595 [MASTER_QUP_CORE_1] = &qup1_core_master,
1596 [MASTER_QUP_CORE_2] = &qup2_core_master,
1597 [SLAVE_DDR_PERF_MODE] = &ddr_perf_mode_slave,
1598 [SLAVE_QUP_CORE_0] = &qup0_core_slave,
1599 [SLAVE_QUP_CORE_1] = &qup1_core_slave,
1600 [SLAVE_QUP_CORE_2] = &qup2_core_slave,
1603 static const struct qcom_icc_desc x1e80100_clk_virt = {
1604 .nodes = clk_virt_nodes,
1605 .num_nodes = ARRAY_SIZE(clk_virt_nodes),
1606 .bcms = clk_virt_bcms,
1607 .num_bcms = ARRAY_SIZE(clk_virt_bcms),
1610 static struct qcom_icc_bcm * const cnoc_cfg_bcms[] = {
1615 static struct qcom_icc_node * const cnoc_cfg_nodes[] = {
1616 [MASTER_CNOC_CFG] = &qsm_cfg,
1617 [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
1618 [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
1619 [SLAVE_AHB2PHY_2] = &qhs_ahb2phy2,
1620 [SLAVE_AV1_ENC_CFG] = &qhs_av1_enc_cfg,
1621 [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
1622 [SLAVE_CLK_CTL] = &qhs_clk_ctl,
1623 [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
1624 [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
1625 [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
1626 [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
1627 [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
1628 [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
1629 [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
1630 [SLAVE_PCIE_2_CFG] = &qhs_pcie2_cfg,
1631 [SLAVE_PCIE_3_CFG] = &qhs_pcie3_cfg,
1632 [SLAVE_PCIE_4_CFG] = &qhs_pcie4_cfg,
1633 [SLAVE_PCIE_5_CFG] = &qhs_pcie5_cfg,
1634 [SLAVE_PCIE_6A_CFG] = &qhs_pcie6a_cfg,
1635 [SLAVE_PCIE_6B_CFG] = &qhs_pcie6b_cfg,
1636 [SLAVE_PCIE_RSC_CFG] = &qhs_pcie_rsc_cfg,
1637 [SLAVE_PDM] = &qhs_pdm,
1638 [SLAVE_PRNG] = &qhs_prng,
1639 [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
1640 [SLAVE_QSPI_0] = &qhs_qspi,
1641 [SLAVE_QUP_0] = &qhs_qup0,
1642 [SLAVE_QUP_1] = &qhs_qup1,
1643 [SLAVE_QUP_2] = &qhs_qup2,
1644 [SLAVE_SDCC_2] = &qhs_sdc2,
1645 [SLAVE_SDCC_4] = &qhs_sdc4,
1646 [SLAVE_SMMUV3_CFG] = &qhs_smmuv3_cfg,
1647 [SLAVE_TCSR] = &qhs_tcsr,
1648 [SLAVE_TLMM] = &qhs_tlmm,
1649 [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
1650 [SLAVE_USB2] = &qhs_usb2_0_cfg,
1651 [SLAVE_USB3_0] = &qhs_usb3_0_cfg,
1652 [SLAVE_USB3_1] = &qhs_usb3_1_cfg,
1653 [SLAVE_USB3_2] = &qhs_usb3_2_cfg,
1654 [SLAVE_USB3_MP] = &qhs_usb3_mp_cfg,
1655 [SLAVE_USB4_0] = &qhs_usb4_0_cfg,
1656 [SLAVE_USB4_1] = &qhs_usb4_1_cfg,
1657 [SLAVE_USB4_2] = &qhs_usb4_2_cfg,
1658 [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
1659 [SLAVE_LPASS_QTB_CFG] = &qss_lpass_qtb_cfg,
1660 [SLAVE_CNOC_MNOC_CFG] = &qss_mnoc_cfg,
1661 [SLAVE_NSP_QTB_CFG] = &qss_nsp_qtb_cfg,
1662 [SLAVE_QDSS_STM] = &xs_qdss_stm,
1663 [SLAVE_TCU] = &xs_sys_tcu_cfg,
1666 static const struct qcom_icc_desc x1e80100_cnoc_cfg = {
1667 .nodes = cnoc_cfg_nodes,
1668 .num_nodes = ARRAY_SIZE(cnoc_cfg_nodes),
1669 .bcms = cnoc_cfg_bcms,
1670 .num_bcms = ARRAY_SIZE(cnoc_cfg_bcms),
1673 static struct qcom_icc_bcm * const cnoc_main_bcms[] = {
1677 static struct qcom_icc_node * const cnoc_main_nodes[] = {
1678 [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
1679 [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
1680 [SLAVE_AOSS] = &qhs_aoss,
1681 [SLAVE_TME_CFG] = &qhs_tme_cfg,
1682 [SLAVE_APPSS] = &qns_apss,
1683 [SLAVE_CNOC_CFG] = &qss_cfg,
1684 [SLAVE_BOOT_IMEM] = &qxs_boot_imem,
1685 [SLAVE_IMEM] = &qxs_imem,
1686 [SLAVE_PCIE_0] = &xs_pcie_0,
1687 [SLAVE_PCIE_1] = &xs_pcie_1,
1688 [SLAVE_PCIE_2] = &xs_pcie_2,
1689 [SLAVE_PCIE_3] = &xs_pcie_3,
1690 [SLAVE_PCIE_4] = &xs_pcie_4,
1691 [SLAVE_PCIE_5] = &xs_pcie_5,
1692 [SLAVE_PCIE_6A] = &xs_pcie_6a,
1693 [SLAVE_PCIE_6B] = &xs_pcie_6b,
1696 static const struct qcom_icc_desc x1e80100_cnoc_main = {
1697 .nodes = cnoc_main_nodes,
1698 .num_nodes = ARRAY_SIZE(cnoc_main_nodes),
1699 .bcms = cnoc_main_bcms,
1700 .num_bcms = ARRAY_SIZE(cnoc_main_bcms),
1703 static struct qcom_icc_bcm * const gem_noc_bcms[] = {
1708 static struct qcom_icc_node * const gem_noc_nodes[] = {
1709 [MASTER_GPU_TCU] = &alm_gpu_tcu,
1710 [MASTER_PCIE_TCU] = &alm_pcie_tcu,
1711 [MASTER_SYS_TCU] = &alm_sys_tcu,
1712 [MASTER_APPSS_PROC] = &chm_apps,
1713 [MASTER_GFX3D] = &qnm_gpu,
1714 [MASTER_LPASS_GEM_NOC] = &qnm_lpass,
1715 [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
1716 [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
1717 [MASTER_COMPUTE_NOC] = &qnm_nsp_noc,
1718 [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
1719 [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
1720 [MASTER_GIC2] = &xm_gic,
1721 [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
1722 [SLAVE_LLCC] = &qns_llcc,
1723 [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
1726 static const struct qcom_icc_desc x1e80100_gem_noc = {
1727 .nodes = gem_noc_nodes,
1728 .num_nodes = ARRAY_SIZE(gem_noc_nodes),
1729 .bcms = gem_noc_bcms,
1730 .num_bcms = ARRAY_SIZE(gem_noc_bcms),
1733 static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = {
1736 static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
1737 [MASTER_LPIAON_NOC] = &qnm_lpiaon_noc,
1738 [SLAVE_LPASS_GEM_NOC] = &qns_lpass_ag_noc_gemnoc,
1741 static const struct qcom_icc_desc x1e80100_lpass_ag_noc = {
1742 .nodes = lpass_ag_noc_nodes,
1743 .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
1744 .bcms = lpass_ag_noc_bcms,
1745 .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
1748 static struct qcom_icc_bcm * const lpass_lpiaon_noc_bcms[] = {
1752 static struct qcom_icc_node * const lpass_lpiaon_noc_nodes[] = {
1753 [MASTER_LPASS_LPINOC] = &qnm_lpass_lpinoc,
1754 [SLAVE_LPIAON_NOC_LPASS_AG_NOC] = &qns_lpass_aggnoc,
1757 static const struct qcom_icc_desc x1e80100_lpass_lpiaon_noc = {
1758 .nodes = lpass_lpiaon_noc_nodes,
1759 .num_nodes = ARRAY_SIZE(lpass_lpiaon_noc_nodes),
1760 .bcms = lpass_lpiaon_noc_bcms,
1761 .num_bcms = ARRAY_SIZE(lpass_lpiaon_noc_bcms),
1764 static struct qcom_icc_bcm * const lpass_lpicx_noc_bcms[] = {
1767 static struct qcom_icc_node * const lpass_lpicx_noc_nodes[] = {
1768 [MASTER_LPASS_PROC] = &qxm_lpinoc_dsp_axim,
1769 [SLAVE_LPICX_NOC_LPIAON_NOC] = &qns_lpi_aon_noc,
1772 static const struct qcom_icc_desc x1e80100_lpass_lpicx_noc = {
1773 .nodes = lpass_lpicx_noc_nodes,
1774 .num_nodes = ARRAY_SIZE(lpass_lpicx_noc_nodes),
1775 .bcms = lpass_lpicx_noc_bcms,
1776 .num_bcms = ARRAY_SIZE(lpass_lpicx_noc_bcms),
1779 static struct qcom_icc_bcm * const mc_virt_bcms[] = {
1784 static struct qcom_icc_node * const mc_virt_nodes[] = {
1785 [MASTER_LLCC] = &llcc_mc,
1786 [SLAVE_EBI1] = &ebi,
1789 static const struct qcom_icc_desc x1e80100_mc_virt = {
1790 .nodes = mc_virt_nodes,
1791 .num_nodes = ARRAY_SIZE(mc_virt_nodes),
1792 .bcms = mc_virt_bcms,
1793 .num_bcms = ARRAY_SIZE(mc_virt_bcms),
1796 static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
1801 static struct qcom_icc_node * const mmss_noc_nodes[] = {
1802 [MASTER_AV1_ENC] = &qnm_av1_enc,
1803 [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
1804 [MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
1805 [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
1806 [MASTER_EVA] = &qnm_eva,
1807 [MASTER_MDP] = &qnm_mdp,
1808 [MASTER_VIDEO] = &qnm_video,
1809 [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
1810 [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
1811 [MASTER_CNOC_MNOC_CFG] = &qsm_mnoc_cfg,
1812 [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
1813 [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
1814 [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
1817 static const struct qcom_icc_desc x1e80100_mmss_noc = {
1818 .nodes = mmss_noc_nodes,
1819 .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
1820 .bcms = mmss_noc_bcms,
1821 .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
1824 static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
1828 static struct qcom_icc_node * const nsp_noc_nodes[] = {
1829 [MASTER_CDSP_PROC] = &qxm_nsp,
1830 [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
1833 static const struct qcom_icc_desc x1e80100_nsp_noc = {
1834 .nodes = nsp_noc_nodes,
1835 .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
1836 .bcms = nsp_noc_bcms,
1837 .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
1840 static struct qcom_icc_bcm * const pcie_center_anoc_bcms[] = {
1844 static struct qcom_icc_node * const pcie_center_anoc_nodes[] = {
1845 [MASTER_PCIE_NORTH] = &qnm_pcie_north_gem_noc,
1846 [MASTER_PCIE_SOUTH] = &qnm_pcie_south_gem_noc,
1847 [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
1850 static const struct qcom_icc_desc x1e80100_pcie_center_anoc = {
1851 .nodes = pcie_center_anoc_nodes,
1852 .num_nodes = ARRAY_SIZE(pcie_center_anoc_nodes),
1853 .bcms = pcie_center_anoc_bcms,
1854 .num_bcms = ARRAY_SIZE(pcie_center_anoc_bcms),
1857 static struct qcom_icc_bcm * const pcie_north_anoc_bcms[] = {
1860 static struct qcom_icc_node * const pcie_north_anoc_nodes[] = {
1861 [MASTER_PCIE_3] = &xm_pcie_3,
1862 [MASTER_PCIE_4] = &xm_pcie_4,
1863 [MASTER_PCIE_5] = &xm_pcie_5,
1864 [SLAVE_PCIE_NORTH] = &qns_pcie_north_gem_noc,
1867 static const struct qcom_icc_desc x1e80100_pcie_north_anoc = {
1868 .nodes = pcie_north_anoc_nodes,
1869 .num_nodes = ARRAY_SIZE(pcie_north_anoc_nodes),
1870 .bcms = pcie_north_anoc_bcms,
1871 .num_bcms = ARRAY_SIZE(pcie_north_anoc_bcms),
1874 static struct qcom_icc_bcm * const pcie_south_anoc_bcms[] = {
1877 static struct qcom_icc_node * const pcie_south_anoc_nodes[] = {
1878 [MASTER_PCIE_0] = &xm_pcie_0,
1879 [MASTER_PCIE_1] = &xm_pcie_1,
1880 [MASTER_PCIE_2] = &xm_pcie_2,
1881 [MASTER_PCIE_6A] = &xm_pcie_6a,
1882 [MASTER_PCIE_6B] = &xm_pcie_6b,
1883 [SLAVE_PCIE_SOUTH] = &qns_pcie_south_gem_noc,
1886 static const struct qcom_icc_desc x1e80100_pcie_south_anoc = {
1887 .nodes = pcie_south_anoc_nodes,
1888 .num_nodes = ARRAY_SIZE(pcie_south_anoc_nodes),
1889 .bcms = pcie_south_anoc_bcms,
1890 .num_bcms = ARRAY_SIZE(pcie_south_anoc_bcms),
1893 static struct qcom_icc_bcm * const system_noc_bcms[] = {
1900 static struct qcom_icc_node * const system_noc_nodes[] = {
1901 [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
1902 [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
1903 [MASTER_GIC1] = &qnm_gic,
1904 [MASTER_USB_NOC_SNOC] = &qnm_usb_anoc,
1905 [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
1908 static const struct qcom_icc_desc x1e80100_system_noc = {
1909 .nodes = system_noc_nodes,
1910 .num_nodes = ARRAY_SIZE(system_noc_nodes),
1911 .bcms = system_noc_bcms,
1912 .num_bcms = ARRAY_SIZE(system_noc_bcms),
1915 static struct qcom_icc_bcm * const usb_center_anoc_bcms[] = {
1918 static struct qcom_icc_node * const usb_center_anoc_nodes[] = {
1919 [MASTER_AGGRE_USB_NORTH] = &qnm_aggre_usb_north_snoc,
1920 [MASTER_AGGRE_USB_SOUTH] = &qnm_aggre_usb_south_snoc,
1921 [SLAVE_USB_NOC_SNOC] = &qns_aggre_usb_snoc,
1924 static const struct qcom_icc_desc x1e80100_usb_center_anoc = {
1925 .nodes = usb_center_anoc_nodes,
1926 .num_nodes = ARRAY_SIZE(usb_center_anoc_nodes),
1927 .bcms = usb_center_anoc_bcms,
1928 .num_bcms = ARRAY_SIZE(usb_center_anoc_bcms),
1931 static struct qcom_icc_bcm * const usb_north_anoc_bcms[] = {
1934 static struct qcom_icc_node * const usb_north_anoc_nodes[] = {
1935 [MASTER_USB2] = &xm_usb2_0,
1936 [MASTER_USB3_MP] = &xm_usb3_mp,
1937 [SLAVE_AGGRE_USB_NORTH] = &qns_aggre_usb_north_snoc,
1940 static const struct qcom_icc_desc x1e80100_usb_north_anoc = {
1941 .nodes = usb_north_anoc_nodes,
1942 .num_nodes = ARRAY_SIZE(usb_north_anoc_nodes),
1943 .bcms = usb_north_anoc_bcms,
1944 .num_bcms = ARRAY_SIZE(usb_north_anoc_bcms),
1947 static struct qcom_icc_bcm * const usb_south_anoc_bcms[] = {
1950 static struct qcom_icc_node * const usb_south_anoc_nodes[] = {
1951 [MASTER_USB3_0] = &xm_usb3_0,
1952 [MASTER_USB3_1] = &xm_usb3_1,
1953 [MASTER_USB3_2] = &xm_usb3_2,
1954 [MASTER_USB4_0] = &xm_usb4_0,
1955 [MASTER_USB4_1] = &xm_usb4_1,
1956 [MASTER_USB4_2] = &xm_usb4_2,
1957 [SLAVE_AGGRE_USB_SOUTH] = &qns_aggre_usb_south_snoc,
1960 static const struct qcom_icc_desc x1e80100_usb_south_anoc = {
1961 .nodes = usb_south_anoc_nodes,
1962 .num_nodes = ARRAY_SIZE(usb_south_anoc_nodes),
1963 .bcms = usb_south_anoc_bcms,
1964 .num_bcms = ARRAY_SIZE(usb_south_anoc_bcms),
1967 static const struct of_device_id qnoc_of_match[] = {
1968 { .compatible = "qcom,x1e80100-aggre1-noc", .data = &x1e80100_aggre1_noc},
1969 { .compatible = "qcom,x1e80100-aggre2-noc", .data = &x1e80100_aggre2_noc},
1970 { .compatible = "qcom,x1e80100-clk-virt", .data = &x1e80100_clk_virt},
1971 { .compatible = "qcom,x1e80100-cnoc-cfg", .data = &x1e80100_cnoc_cfg},
1972 { .compatible = "qcom,x1e80100-cnoc-main", .data = &x1e80100_cnoc_main},
1973 { .compatible = "qcom,x1e80100-gem-noc", .data = &x1e80100_gem_noc},
1974 { .compatible = "qcom,x1e80100-lpass-ag-noc", .data = &x1e80100_lpass_ag_noc},
1975 { .compatible = "qcom,x1e80100-lpass-lpiaon-noc", .data = &x1e80100_lpass_lpiaon_noc},
1976 { .compatible = "qcom,x1e80100-lpass-lpicx-noc", .data = &x1e80100_lpass_lpicx_noc},
1977 { .compatible = "qcom,x1e80100-mc-virt", .data = &x1e80100_mc_virt},
1978 { .compatible = "qcom,x1e80100-mmss-noc", .data = &x1e80100_mmss_noc},
1979 { .compatible = "qcom,x1e80100-nsp-noc", .data = &x1e80100_nsp_noc},
1980 { .compatible = "qcom,x1e80100-pcie-center-anoc", .data = &x1e80100_pcie_center_anoc},
1981 { .compatible = "qcom,x1e80100-pcie-north-anoc", .data = &x1e80100_pcie_north_anoc},
1982 { .compatible = "qcom,x1e80100-pcie-south-anoc", .data = &x1e80100_pcie_south_anoc},
1983 { .compatible = "qcom,x1e80100-system-noc", .data = &x1e80100_system_noc},
1984 { .compatible = "qcom,x1e80100-usb-center-anoc", .data = &x1e80100_usb_center_anoc},
1985 { .compatible = "qcom,x1e80100-usb-north-anoc", .data = &x1e80100_usb_north_anoc},
1986 { .compatible = "qcom,x1e80100-usb-south-anoc", .data = &x1e80100_usb_south_anoc},
1989 MODULE_DEVICE_TABLE(of, qnoc_of_match);
1991 static struct platform_driver qnoc_driver = {
1992 .probe = qcom_icc_rpmh_probe,
1993 .remove_new = qcom_icc_rpmh_remove,
1995 .name = "qnoc-x1e80100",
1996 .of_match_table = qnoc_of_match,
1997 .sync_state = icc_sync_state,
2001 static int __init qnoc_driver_init(void)
2003 return platform_driver_register(&qnoc_driver);
2005 core_initcall(qnoc_driver_init);
2007 static void __exit qnoc_driver_exit(void)
2009 platform_driver_unregister(&qnoc_driver);
2011 module_exit(qnoc_driver_exit);
2013 MODULE_DESCRIPTION("x1e80100 NoC driver");
2014 MODULE_LICENSE("GPL");