1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
8 #include <linux/device.h>
9 #include <linux/interconnect.h>
10 #include <linux/interconnect-provider.h>
11 #include <linux/mod_devicetable.h>
12 #include <linux/module.h>
13 #include <linux/platform_device.h>
14 #include <dt-bindings/interconnect/qcom,sc7280.h>
16 #include "bcm-voter.h"
20 static struct qcom_icc_node qhm_qspi = {
22 .id = SC7280_MASTER_QSPI_0,
25 .qosbox = &(const struct qcom_icc_qosbox) {
27 .port_offsets = { 0x7000 },
32 .links = { SC7280_SLAVE_A1NOC_SNOC },
35 static struct qcom_icc_node qhm_qup0 = {
37 .id = SC7280_MASTER_QUP_0,
40 .qosbox = &(const struct qcom_icc_qosbox) {
42 .port_offsets = { 0x11000 },
47 .links = { SC7280_SLAVE_A1NOC_SNOC },
50 static struct qcom_icc_node qhm_qup1 = {
52 .id = SC7280_MASTER_QUP_1,
55 .qosbox = &(const struct qcom_icc_qosbox) {
57 .port_offsets = { 0x8000 },
62 .links = { SC7280_SLAVE_A1NOC_SNOC },
65 static struct qcom_icc_node qnm_a1noc_cfg = {
66 .name = "qnm_a1noc_cfg",
67 .id = SC7280_MASTER_A1NOC_CFG,
71 .links = { SC7280_SLAVE_SERVICE_A1NOC },
74 static struct qcom_icc_node xm_sdc1 = {
76 .id = SC7280_MASTER_SDCC_1,
79 .qosbox = &(const struct qcom_icc_qosbox) {
81 .port_offsets = { 0xc000 },
86 .links = { SC7280_SLAVE_A1NOC_SNOC },
89 static struct qcom_icc_node xm_sdc2 = {
91 .id = SC7280_MASTER_SDCC_2,
94 .qosbox = &(const struct qcom_icc_qosbox) {
96 .port_offsets = { 0xe000 },
101 .links = { SC7280_SLAVE_A1NOC_SNOC },
104 static struct qcom_icc_node xm_sdc4 = {
106 .id = SC7280_MASTER_SDCC_4,
109 .qosbox = &(const struct qcom_icc_qosbox) {
111 .port_offsets = { 0x9000 },
116 .links = { SC7280_SLAVE_A1NOC_SNOC },
119 static struct qcom_icc_node xm_ufs_mem = {
120 .name = "xm_ufs_mem",
121 .id = SC7280_MASTER_UFS_MEM,
124 .qosbox = &(const struct qcom_icc_qosbox) {
126 .port_offsets = { 0xa000 },
131 .links = { SC7280_SLAVE_A1NOC_SNOC },
134 static struct qcom_icc_node xm_usb2 = {
136 .id = SC7280_MASTER_USB2,
140 .links = { SC7280_SLAVE_A1NOC_SNOC },
143 static struct qcom_icc_node xm_usb3_0 = {
145 .id = SC7280_MASTER_USB3_0,
148 .qosbox = &(const struct qcom_icc_qosbox) {
150 .port_offsets = { 0xb000 },
155 .links = { SC7280_SLAVE_A1NOC_SNOC },
158 static struct qcom_icc_node qhm_qdss_bam = {
159 .name = "qhm_qdss_bam",
160 .id = SC7280_MASTER_QDSS_BAM,
163 .qosbox = &(const struct qcom_icc_qosbox) {
165 .port_offsets = { 0x18000 },
170 .links = { SC7280_SLAVE_A2NOC_SNOC },
173 static struct qcom_icc_node qnm_a2noc_cfg = {
174 .name = "qnm_a2noc_cfg",
175 .id = SC7280_MASTER_A2NOC_CFG,
179 .links = { SC7280_SLAVE_SERVICE_A2NOC },
182 static struct qcom_icc_node qnm_cnoc_datapath = {
183 .name = "qnm_cnoc_datapath",
184 .id = SC7280_MASTER_CNOC_A2NOC,
187 .qosbox = &(const struct qcom_icc_qosbox) {
189 .port_offsets = { 0x1c000 },
194 .links = { SC7280_SLAVE_A2NOC_SNOC },
197 static struct qcom_icc_node qxm_crypto = {
198 .name = "qxm_crypto",
199 .id = SC7280_MASTER_CRYPTO,
202 .qosbox = &(const struct qcom_icc_qosbox) {
204 .port_offsets = { 0x1d000 },
209 .links = { SC7280_SLAVE_A2NOC_SNOC },
212 static struct qcom_icc_node qxm_ipa = {
214 .id = SC7280_MASTER_IPA,
217 .qosbox = &(const struct qcom_icc_qosbox) {
219 .port_offsets = { 0x10000 },
224 .links = { SC7280_SLAVE_A2NOC_SNOC },
227 static struct qcom_icc_node xm_pcie3_0 = {
228 .name = "xm_pcie3_0",
229 .id = SC7280_MASTER_PCIE_0,
233 .links = { SC7280_SLAVE_ANOC_PCIE_GEM_NOC },
236 static struct qcom_icc_node xm_pcie3_1 = {
237 .name = "xm_pcie3_1",
238 .id = SC7280_MASTER_PCIE_1,
241 .links = { SC7280_SLAVE_ANOC_PCIE_GEM_NOC },
244 static struct qcom_icc_node xm_qdss_etr = {
245 .name = "xm_qdss_etr",
246 .id = SC7280_MASTER_QDSS_ETR,
249 .qosbox = &(const struct qcom_icc_qosbox) {
251 .port_offsets = { 0x15000 },
256 .links = { SC7280_SLAVE_A2NOC_SNOC },
259 static struct qcom_icc_node qup0_core_master = {
260 .name = "qup0_core_master",
261 .id = SC7280_MASTER_QUP_CORE_0,
265 .links = { SC7280_SLAVE_QUP_CORE_0 },
268 static struct qcom_icc_node qup1_core_master = {
269 .name = "qup1_core_master",
270 .id = SC7280_MASTER_QUP_CORE_1,
274 .links = { SC7280_SLAVE_QUP_CORE_1 },
277 static struct qcom_icc_node qnm_cnoc3_cnoc2 = {
278 .name = "qnm_cnoc3_cnoc2",
279 .id = SC7280_MASTER_CNOC3_CNOC2,
283 .links = { SC7280_SLAVE_AHB2PHY_SOUTH, SC7280_SLAVE_AHB2PHY_NORTH,
284 SC7280_SLAVE_CAMERA_CFG, SC7280_SLAVE_CLK_CTL,
285 SC7280_SLAVE_CDSP_CFG, SC7280_SLAVE_RBCPR_CX_CFG,
286 SC7280_SLAVE_RBCPR_MX_CFG, SC7280_SLAVE_CRYPTO_0_CFG,
287 SC7280_SLAVE_CX_RDPM, SC7280_SLAVE_DCC_CFG,
288 SC7280_SLAVE_DISPLAY_CFG, SC7280_SLAVE_GFX3D_CFG,
289 SC7280_SLAVE_HWKM, SC7280_SLAVE_IMEM_CFG,
290 SC7280_SLAVE_IPA_CFG, SC7280_SLAVE_IPC_ROUTER_CFG,
291 SC7280_SLAVE_LPASS, SC7280_SLAVE_CNOC_MSS,
292 SC7280_SLAVE_MX_RDPM, SC7280_SLAVE_PCIE_0_CFG,
293 SC7280_SLAVE_PCIE_1_CFG, SC7280_SLAVE_PDM,
294 SC7280_SLAVE_PIMEM_CFG, SC7280_SLAVE_PKA_WRAPPER_CFG,
295 SC7280_SLAVE_PMU_WRAPPER_CFG, SC7280_SLAVE_QDSS_CFG,
296 SC7280_SLAVE_QSPI_0, SC7280_SLAVE_QUP_0,
297 SC7280_SLAVE_QUP_1, SC7280_SLAVE_SDCC_1,
298 SC7280_SLAVE_SDCC_2, SC7280_SLAVE_SDCC_4,
299 SC7280_SLAVE_SECURITY, SC7280_SLAVE_TCSR,
300 SC7280_SLAVE_TLMM, SC7280_SLAVE_UFS_MEM_CFG,
301 SC7280_SLAVE_USB2, SC7280_SLAVE_USB3_0,
302 SC7280_SLAVE_VENUS_CFG, SC7280_SLAVE_VSENSE_CTRL_CFG,
303 SC7280_SLAVE_A1NOC_CFG, SC7280_SLAVE_A2NOC_CFG,
304 SC7280_SLAVE_CNOC_MNOC_CFG, SC7280_SLAVE_SNOC_CFG },
307 static struct qcom_icc_node xm_qdss_dap = {
308 .name = "xm_qdss_dap",
309 .id = SC7280_MASTER_QDSS_DAP,
313 .links = { SC7280_SLAVE_AHB2PHY_SOUTH, SC7280_SLAVE_AHB2PHY_NORTH,
314 SC7280_SLAVE_CAMERA_CFG, SC7280_SLAVE_CLK_CTL,
315 SC7280_SLAVE_CDSP_CFG, SC7280_SLAVE_RBCPR_CX_CFG,
316 SC7280_SLAVE_RBCPR_MX_CFG, SC7280_SLAVE_CRYPTO_0_CFG,
317 SC7280_SLAVE_CX_RDPM, SC7280_SLAVE_DCC_CFG,
318 SC7280_SLAVE_DISPLAY_CFG, SC7280_SLAVE_GFX3D_CFG,
319 SC7280_SLAVE_HWKM, SC7280_SLAVE_IMEM_CFG,
320 SC7280_SLAVE_IPA_CFG, SC7280_SLAVE_IPC_ROUTER_CFG,
321 SC7280_SLAVE_LPASS, SC7280_SLAVE_CNOC_MSS,
322 SC7280_SLAVE_MX_RDPM, SC7280_SLAVE_PCIE_0_CFG,
323 SC7280_SLAVE_PCIE_1_CFG, SC7280_SLAVE_PDM,
324 SC7280_SLAVE_PIMEM_CFG, SC7280_SLAVE_PKA_WRAPPER_CFG,
325 SC7280_SLAVE_PMU_WRAPPER_CFG, SC7280_SLAVE_QDSS_CFG,
326 SC7280_SLAVE_QSPI_0, SC7280_SLAVE_QUP_0,
327 SC7280_SLAVE_QUP_1, SC7280_SLAVE_SDCC_1,
328 SC7280_SLAVE_SDCC_2, SC7280_SLAVE_SDCC_4,
329 SC7280_SLAVE_SECURITY, SC7280_SLAVE_TCSR,
330 SC7280_SLAVE_TLMM, SC7280_SLAVE_UFS_MEM_CFG,
331 SC7280_SLAVE_USB2, SC7280_SLAVE_USB3_0,
332 SC7280_SLAVE_VENUS_CFG, SC7280_SLAVE_VSENSE_CTRL_CFG,
333 SC7280_SLAVE_A1NOC_CFG, SC7280_SLAVE_A2NOC_CFG,
334 SC7280_SLAVE_CNOC2_CNOC3, SC7280_SLAVE_CNOC_MNOC_CFG,
335 SC7280_SLAVE_SNOC_CFG },
338 static struct qcom_icc_node qnm_cnoc2_cnoc3 = {
339 .name = "qnm_cnoc2_cnoc3",
340 .id = SC7280_MASTER_CNOC2_CNOC3,
344 .links = { SC7280_SLAVE_AOSS, SC7280_SLAVE_APPSS,
345 SC7280_SLAVE_CNOC_A2NOC, SC7280_SLAVE_DDRSS_CFG,
346 SC7280_SLAVE_BOOT_IMEM, SC7280_SLAVE_IMEM,
347 SC7280_SLAVE_PIMEM, SC7280_SLAVE_QDSS_STM,
351 static struct qcom_icc_node qnm_gemnoc_cnoc = {
352 .name = "qnm_gemnoc_cnoc",
353 .id = SC7280_MASTER_GEM_NOC_CNOC,
357 .links = { SC7280_SLAVE_AOSS, SC7280_SLAVE_APPSS,
358 SC7280_SLAVE_CNOC3_CNOC2, SC7280_SLAVE_DDRSS_CFG,
359 SC7280_SLAVE_BOOT_IMEM, SC7280_SLAVE_IMEM,
360 SC7280_SLAVE_PIMEM, SC7280_SLAVE_QDSS_STM,
364 static struct qcom_icc_node qnm_gemnoc_pcie = {
365 .name = "qnm_gemnoc_pcie",
366 .id = SC7280_MASTER_GEM_NOC_PCIE_SNOC,
370 .links = { SC7280_SLAVE_PCIE_0, SC7280_SLAVE_PCIE_1 },
373 static struct qcom_icc_node qnm_cnoc_dc_noc = {
374 .name = "qnm_cnoc_dc_noc",
375 .id = SC7280_MASTER_CNOC_DC_NOC,
379 .links = { SC7280_SLAVE_LLCC_CFG, SC7280_SLAVE_GEM_NOC_CFG },
382 static struct qcom_icc_node alm_gpu_tcu = {
383 .name = "alm_gpu_tcu",
384 .id = SC7280_MASTER_GPU_TCU,
387 .qosbox = &(const struct qcom_icc_qosbox) {
389 .port_offsets = { 0xd7000 },
394 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
397 static struct qcom_icc_node alm_sys_tcu = {
398 .name = "alm_sys_tcu",
399 .id = SC7280_MASTER_SYS_TCU,
402 .qosbox = &(const struct qcom_icc_qosbox) {
404 .port_offsets = { 0xd6000 },
409 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
412 static struct qcom_icc_node chm_apps = {
414 .id = SC7280_MASTER_APPSS_PROC,
418 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC,
419 SC7280_SLAVE_MEM_NOC_PCIE_SNOC },
422 static struct qcom_icc_node qnm_cmpnoc = {
423 .name = "qnm_cmpnoc",
424 .id = SC7280_MASTER_COMPUTE_NOC,
427 .qosbox = &(const struct qcom_icc_qosbox) {
429 .port_offsets = { 0x21000, 0x61000 },
434 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
437 static struct qcom_icc_node qnm_gemnoc_cfg = {
438 .name = "qnm_gemnoc_cfg",
439 .id = SC7280_MASTER_GEM_NOC_CFG,
443 .links = { SC7280_SLAVE_MSS_PROC_MS_MPU_CFG, SC7280_SLAVE_MCDMA_MS_MPU_CFG,
444 SC7280_SLAVE_SERVICE_GEM_NOC_1, SC7280_SLAVE_SERVICE_GEM_NOC_2,
445 SC7280_SLAVE_SERVICE_GEM_NOC },
448 static struct qcom_icc_node qnm_gpu = {
450 .id = SC7280_MASTER_GFX3D,
453 .qosbox = &(const struct qcom_icc_qosbox) {
455 .port_offsets = { 0x22000, 0x62000 },
460 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
463 static struct qcom_icc_node qnm_mnoc_hf = {
464 .name = "qnm_mnoc_hf",
465 .id = SC7280_MASTER_MNOC_HF_MEM_NOC,
468 .qosbox = &(const struct qcom_icc_qosbox) {
470 .port_offsets = { 0x23000, 0x63000 },
475 .links = { SC7280_SLAVE_LLCC },
478 static struct qcom_icc_node qnm_mnoc_sf = {
479 .name = "qnm_mnoc_sf",
480 .id = SC7280_MASTER_MNOC_SF_MEM_NOC,
483 .qosbox = &(const struct qcom_icc_qosbox) {
485 .port_offsets = { 0xcf000 },
490 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
493 static struct qcom_icc_node qnm_pcie = {
495 .id = SC7280_MASTER_ANOC_PCIE_GEM_NOC,
499 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC },
502 static struct qcom_icc_node qnm_snoc_gc = {
503 .name = "qnm_snoc_gc",
504 .id = SC7280_MASTER_SNOC_GC_MEM_NOC,
507 .qosbox = &(const struct qcom_icc_qosbox) {
509 .port_offsets = { 0xd3000 },
514 .links = { SC7280_SLAVE_LLCC },
517 static struct qcom_icc_node qnm_snoc_sf = {
518 .name = "qnm_snoc_sf",
519 .id = SC7280_MASTER_SNOC_SF_MEM_NOC,
522 .qosbox = &(const struct qcom_icc_qosbox) {
524 .port_offsets = { 0xd4000 },
529 .links = { SC7280_SLAVE_GEM_NOC_CNOC, SC7280_SLAVE_LLCC,
530 SC7280_SLAVE_MEM_NOC_PCIE_SNOC },
533 static struct qcom_icc_node qhm_config_noc = {
534 .name = "qhm_config_noc",
535 .id = SC7280_MASTER_CNOC_LPASS_AG_NOC,
539 .links = { SC7280_SLAVE_LPASS_CORE_CFG, SC7280_SLAVE_LPASS_LPI_CFG,
540 SC7280_SLAVE_LPASS_MPU_CFG, SC7280_SLAVE_LPASS_TOP_CFG,
541 SC7280_SLAVE_SERVICES_LPASS_AML_NOC, SC7280_SLAVE_SERVICE_LPASS_AG_NOC },
544 static struct qcom_icc_node llcc_mc = {
546 .id = SC7280_MASTER_LLCC,
550 .links = { SC7280_SLAVE_EBI1 },
553 static struct qcom_icc_node qnm_mnoc_cfg = {
554 .name = "qnm_mnoc_cfg",
555 .id = SC7280_MASTER_CNOC_MNOC_CFG,
559 .links = { SC7280_SLAVE_SERVICE_MNOC },
562 static struct qcom_icc_node qnm_video0 = {
563 .name = "qnm_video0",
564 .id = SC7280_MASTER_VIDEO_P0,
567 .qosbox = &(const struct qcom_icc_qosbox) {
569 .port_offsets = { 0x14000 },
574 .links = { SC7280_SLAVE_MNOC_SF_MEM_NOC },
577 static struct qcom_icc_node qnm_video_cpu = {
578 .name = "qnm_video_cpu",
579 .id = SC7280_MASTER_VIDEO_PROC,
582 .qosbox = &(const struct qcom_icc_qosbox) {
584 .port_offsets = { 0x15000 },
589 .links = { SC7280_SLAVE_MNOC_SF_MEM_NOC },
592 static struct qcom_icc_node qxm_camnoc_hf = {
593 .name = "qxm_camnoc_hf",
594 .id = SC7280_MASTER_CAMNOC_HF,
597 .qosbox = &(const struct qcom_icc_qosbox) {
599 .port_offsets = { 0x10000, 0x10180 },
604 .links = { SC7280_SLAVE_MNOC_HF_MEM_NOC },
607 static struct qcom_icc_node qxm_camnoc_icp = {
608 .name = "qxm_camnoc_icp",
609 .id = SC7280_MASTER_CAMNOC_ICP,
612 .qosbox = &(const struct qcom_icc_qosbox) {
614 .port_offsets = { 0x11000 },
619 .links = { SC7280_SLAVE_MNOC_SF_MEM_NOC },
622 static struct qcom_icc_node qxm_camnoc_sf = {
623 .name = "qxm_camnoc_sf",
624 .id = SC7280_MASTER_CAMNOC_SF,
627 .qosbox = &(const struct qcom_icc_qosbox) {
629 .port_offsets = { 0x12000 },
634 .links = { SC7280_SLAVE_MNOC_SF_MEM_NOC },
637 static struct qcom_icc_node qxm_mdp0 = {
639 .id = SC7280_MASTER_MDP0,
642 .qosbox = &(const struct qcom_icc_qosbox) {
644 .port_offsets = { 0x16000 },
649 .links = { SC7280_SLAVE_MNOC_HF_MEM_NOC },
652 static struct qcom_icc_node qhm_nsp_noc_config = {
653 .name = "qhm_nsp_noc_config",
654 .id = SC7280_MASTER_CDSP_NOC_CFG,
658 .links = { SC7280_SLAVE_SERVICE_NSP_NOC },
661 static struct qcom_icc_node qxm_nsp = {
663 .id = SC7280_MASTER_CDSP_PROC,
667 .links = { SC7280_SLAVE_CDSP_MEM_NOC },
670 static struct qcom_icc_node qnm_aggre1_noc = {
671 .name = "qnm_aggre1_noc",
672 .id = SC7280_MASTER_A1NOC_SNOC,
676 .links = { SC7280_SLAVE_SNOC_GEM_NOC_SF },
679 static struct qcom_icc_node qnm_aggre2_noc = {
680 .name = "qnm_aggre2_noc",
681 .id = SC7280_MASTER_A2NOC_SNOC,
685 .links = { SC7280_SLAVE_SNOC_GEM_NOC_SF },
688 static struct qcom_icc_node qnm_snoc_cfg = {
689 .name = "qnm_snoc_cfg",
690 .id = SC7280_MASTER_SNOC_CFG,
694 .links = { SC7280_SLAVE_SERVICE_SNOC },
697 static struct qcom_icc_node qxm_pimem = {
699 .id = SC7280_MASTER_PIMEM,
702 .qosbox = &(const struct qcom_icc_qosbox) {
704 .port_offsets = { 0x8000 },
709 .links = { SC7280_SLAVE_SNOC_GEM_NOC_GC },
712 static struct qcom_icc_node xm_gic = {
714 .id = SC7280_MASTER_GIC,
717 .qosbox = &(const struct qcom_icc_qosbox) {
719 .port_offsets = { 0xa000 },
724 .links = { SC7280_SLAVE_SNOC_GEM_NOC_GC },
727 static struct qcom_icc_node qns_a1noc_snoc = {
728 .name = "qns_a1noc_snoc",
729 .id = SC7280_SLAVE_A1NOC_SNOC,
733 .links = { SC7280_MASTER_A1NOC_SNOC },
736 static struct qcom_icc_node srvc_aggre1_noc = {
737 .name = "srvc_aggre1_noc",
738 .id = SC7280_SLAVE_SERVICE_A1NOC,
744 static struct qcom_icc_node qns_a2noc_snoc = {
745 .name = "qns_a2noc_snoc",
746 .id = SC7280_SLAVE_A2NOC_SNOC,
750 .links = { SC7280_MASTER_A2NOC_SNOC },
753 static struct qcom_icc_node qns_pcie_mem_noc = {
754 .name = "qns_pcie_mem_noc",
755 .id = SC7280_SLAVE_ANOC_PCIE_GEM_NOC,
759 .links = { SC7280_MASTER_ANOC_PCIE_GEM_NOC },
762 static struct qcom_icc_node srvc_aggre2_noc = {
763 .name = "srvc_aggre2_noc",
764 .id = SC7280_SLAVE_SERVICE_A2NOC,
770 static struct qcom_icc_node qup0_core_slave = {
771 .name = "qup0_core_slave",
772 .id = SC7280_SLAVE_QUP_CORE_0,
778 static struct qcom_icc_node qup1_core_slave = {
779 .name = "qup1_core_slave",
780 .id = SC7280_SLAVE_QUP_CORE_1,
786 static struct qcom_icc_node qhs_ahb2phy0 = {
787 .name = "qhs_ahb2phy0",
788 .id = SC7280_SLAVE_AHB2PHY_SOUTH,
794 static struct qcom_icc_node qhs_ahb2phy1 = {
795 .name = "qhs_ahb2phy1",
796 .id = SC7280_SLAVE_AHB2PHY_NORTH,
802 static struct qcom_icc_node qhs_camera_cfg = {
803 .name = "qhs_camera_cfg",
804 .id = SC7280_SLAVE_CAMERA_CFG,
810 static struct qcom_icc_node qhs_clk_ctl = {
811 .name = "qhs_clk_ctl",
812 .id = SC7280_SLAVE_CLK_CTL,
818 static struct qcom_icc_node qhs_compute_cfg = {
819 .name = "qhs_compute_cfg",
820 .id = SC7280_SLAVE_CDSP_CFG,
824 .links = { SC7280_MASTER_CDSP_NOC_CFG },
827 static struct qcom_icc_node qhs_cpr_cx = {
828 .name = "qhs_cpr_cx",
829 .id = SC7280_SLAVE_RBCPR_CX_CFG,
835 static struct qcom_icc_node qhs_cpr_mx = {
836 .name = "qhs_cpr_mx",
837 .id = SC7280_SLAVE_RBCPR_MX_CFG,
843 static struct qcom_icc_node qhs_crypto0_cfg = {
844 .name = "qhs_crypto0_cfg",
845 .id = SC7280_SLAVE_CRYPTO_0_CFG,
851 static struct qcom_icc_node qhs_cx_rdpm = {
852 .name = "qhs_cx_rdpm",
853 .id = SC7280_SLAVE_CX_RDPM,
859 static struct qcom_icc_node qhs_dcc_cfg = {
860 .name = "qhs_dcc_cfg",
861 .id = SC7280_SLAVE_DCC_CFG,
867 static struct qcom_icc_node qhs_display_cfg = {
868 .name = "qhs_display_cfg",
869 .id = SC7280_SLAVE_DISPLAY_CFG,
875 static struct qcom_icc_node qhs_gpuss_cfg = {
876 .name = "qhs_gpuss_cfg",
877 .id = SC7280_SLAVE_GFX3D_CFG,
883 static struct qcom_icc_node qhs_hwkm = {
885 .id = SC7280_SLAVE_HWKM,
891 static struct qcom_icc_node qhs_imem_cfg = {
892 .name = "qhs_imem_cfg",
893 .id = SC7280_SLAVE_IMEM_CFG,
899 static struct qcom_icc_node qhs_ipa = {
901 .id = SC7280_SLAVE_IPA_CFG,
907 static struct qcom_icc_node qhs_ipc_router = {
908 .name = "qhs_ipc_router",
909 .id = SC7280_SLAVE_IPC_ROUTER_CFG,
915 static struct qcom_icc_node qhs_lpass_cfg = {
916 .name = "qhs_lpass_cfg",
917 .id = SC7280_SLAVE_LPASS,
921 .links = { SC7280_MASTER_CNOC_LPASS_AG_NOC },
924 static struct qcom_icc_node qhs_mss_cfg = {
925 .name = "qhs_mss_cfg",
926 .id = SC7280_SLAVE_CNOC_MSS,
932 static struct qcom_icc_node qhs_mx_rdpm = {
933 .name = "qhs_mx_rdpm",
934 .id = SC7280_SLAVE_MX_RDPM,
940 static struct qcom_icc_node qhs_pcie0_cfg = {
941 .name = "qhs_pcie0_cfg",
942 .id = SC7280_SLAVE_PCIE_0_CFG,
948 static struct qcom_icc_node qhs_pcie1_cfg = {
949 .name = "qhs_pcie1_cfg",
950 .id = SC7280_SLAVE_PCIE_1_CFG,
956 static struct qcom_icc_node qhs_pdm = {
958 .id = SC7280_SLAVE_PDM,
964 static struct qcom_icc_node qhs_pimem_cfg = {
965 .name = "qhs_pimem_cfg",
966 .id = SC7280_SLAVE_PIMEM_CFG,
972 static struct qcom_icc_node qhs_pka_wrapper_cfg = {
973 .name = "qhs_pka_wrapper_cfg",
974 .id = SC7280_SLAVE_PKA_WRAPPER_CFG,
980 static struct qcom_icc_node qhs_pmu_wrapper_cfg = {
981 .name = "qhs_pmu_wrapper_cfg",
982 .id = SC7280_SLAVE_PMU_WRAPPER_CFG,
988 static struct qcom_icc_node qhs_qdss_cfg = {
989 .name = "qhs_qdss_cfg",
990 .id = SC7280_SLAVE_QDSS_CFG,
996 static struct qcom_icc_node qhs_qspi = {
998 .id = SC7280_SLAVE_QSPI_0,
1004 static struct qcom_icc_node qhs_qup0 = {
1006 .id = SC7280_SLAVE_QUP_0,
1012 static struct qcom_icc_node qhs_qup1 = {
1014 .id = SC7280_SLAVE_QUP_1,
1020 static struct qcom_icc_node qhs_sdc1 = {
1022 .id = SC7280_SLAVE_SDCC_1,
1028 static struct qcom_icc_node qhs_sdc2 = {
1030 .id = SC7280_SLAVE_SDCC_2,
1036 static struct qcom_icc_node qhs_sdc4 = {
1038 .id = SC7280_SLAVE_SDCC_4,
1044 static struct qcom_icc_node qhs_security = {
1045 .name = "qhs_security",
1046 .id = SC7280_SLAVE_SECURITY,
1052 static struct qcom_icc_node qhs_tcsr = {
1054 .id = SC7280_SLAVE_TCSR,
1060 static struct qcom_icc_node qhs_tlmm = {
1062 .id = SC7280_SLAVE_TLMM,
1068 static struct qcom_icc_node qhs_ufs_mem_cfg = {
1069 .name = "qhs_ufs_mem_cfg",
1070 .id = SC7280_SLAVE_UFS_MEM_CFG,
1076 static struct qcom_icc_node qhs_usb2 = {
1078 .id = SC7280_SLAVE_USB2,
1084 static struct qcom_icc_node qhs_usb3_0 = {
1085 .name = "qhs_usb3_0",
1086 .id = SC7280_SLAVE_USB3_0,
1092 static struct qcom_icc_node qhs_venus_cfg = {
1093 .name = "qhs_venus_cfg",
1094 .id = SC7280_SLAVE_VENUS_CFG,
1100 static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
1101 .name = "qhs_vsense_ctrl_cfg",
1102 .id = SC7280_SLAVE_VSENSE_CTRL_CFG,
1108 static struct qcom_icc_node qns_a1_noc_cfg = {
1109 .name = "qns_a1_noc_cfg",
1110 .id = SC7280_SLAVE_A1NOC_CFG,
1114 .links = { SC7280_MASTER_A1NOC_CFG },
1117 static struct qcom_icc_node qns_a2_noc_cfg = {
1118 .name = "qns_a2_noc_cfg",
1119 .id = SC7280_SLAVE_A2NOC_CFG,
1123 .links = { SC7280_MASTER_A2NOC_CFG },
1126 static struct qcom_icc_node qns_cnoc2_cnoc3 = {
1127 .name = "qns_cnoc2_cnoc3",
1128 .id = SC7280_SLAVE_CNOC2_CNOC3,
1132 .links = { SC7280_MASTER_CNOC2_CNOC3 },
1135 static struct qcom_icc_node qns_mnoc_cfg = {
1136 .name = "qns_mnoc_cfg",
1137 .id = SC7280_SLAVE_CNOC_MNOC_CFG,
1141 .links = { SC7280_MASTER_CNOC_MNOC_CFG },
1144 static struct qcom_icc_node qns_snoc_cfg = {
1145 .name = "qns_snoc_cfg",
1146 .id = SC7280_SLAVE_SNOC_CFG,
1150 .links = { SC7280_MASTER_SNOC_CFG },
1153 static struct qcom_icc_node qhs_aoss = {
1155 .id = SC7280_SLAVE_AOSS,
1161 static struct qcom_icc_node qhs_apss = {
1163 .id = SC7280_SLAVE_APPSS,
1169 static struct qcom_icc_node qns_cnoc3_cnoc2 = {
1170 .name = "qns_cnoc3_cnoc2",
1171 .id = SC7280_SLAVE_CNOC3_CNOC2,
1175 .links = { SC7280_MASTER_CNOC3_CNOC2 },
1178 static struct qcom_icc_node qns_cnoc_a2noc = {
1179 .name = "qns_cnoc_a2noc",
1180 .id = SC7280_SLAVE_CNOC_A2NOC,
1184 .links = { SC7280_MASTER_CNOC_A2NOC },
1187 static struct qcom_icc_node qns_ddrss_cfg = {
1188 .name = "qns_ddrss_cfg",
1189 .id = SC7280_SLAVE_DDRSS_CFG,
1193 .links = { SC7280_MASTER_CNOC_DC_NOC },
1196 static struct qcom_icc_node qxs_boot_imem = {
1197 .name = "qxs_boot_imem",
1198 .id = SC7280_SLAVE_BOOT_IMEM,
1204 static struct qcom_icc_node qxs_imem = {
1206 .id = SC7280_SLAVE_IMEM,
1212 static struct qcom_icc_node qxs_pimem = {
1213 .name = "qxs_pimem",
1214 .id = SC7280_SLAVE_PIMEM,
1220 static struct qcom_icc_node xs_pcie_0 = {
1221 .name = "xs_pcie_0",
1222 .id = SC7280_SLAVE_PCIE_0,
1228 static struct qcom_icc_node xs_pcie_1 = {
1229 .name = "xs_pcie_1",
1230 .id = SC7280_SLAVE_PCIE_1,
1236 static struct qcom_icc_node xs_qdss_stm = {
1237 .name = "xs_qdss_stm",
1238 .id = SC7280_SLAVE_QDSS_STM,
1244 static struct qcom_icc_node xs_sys_tcu_cfg = {
1245 .name = "xs_sys_tcu_cfg",
1246 .id = SC7280_SLAVE_TCU,
1252 static struct qcom_icc_node qhs_llcc = {
1254 .id = SC7280_SLAVE_LLCC_CFG,
1260 static struct qcom_icc_node qns_gemnoc = {
1261 .name = "qns_gemnoc",
1262 .id = SC7280_SLAVE_GEM_NOC_CFG,
1266 .links = { SC7280_MASTER_GEM_NOC_CFG },
1269 static struct qcom_icc_node qhs_mdsp_ms_mpu_cfg = {
1270 .name = "qhs_mdsp_ms_mpu_cfg",
1271 .id = SC7280_SLAVE_MSS_PROC_MS_MPU_CFG,
1277 static struct qcom_icc_node qhs_modem_ms_mpu_cfg = {
1278 .name = "qhs_modem_ms_mpu_cfg",
1279 .id = SC7280_SLAVE_MCDMA_MS_MPU_CFG,
1285 static struct qcom_icc_node qns_gem_noc_cnoc = {
1286 .name = "qns_gem_noc_cnoc",
1287 .id = SC7280_SLAVE_GEM_NOC_CNOC,
1291 .links = { SC7280_MASTER_GEM_NOC_CNOC },
1294 static struct qcom_icc_node qns_llcc = {
1296 .id = SC7280_SLAVE_LLCC,
1300 .links = { SC7280_MASTER_LLCC },
1303 static struct qcom_icc_node qns_pcie = {
1305 .id = SC7280_SLAVE_MEM_NOC_PCIE_SNOC,
1309 .links = { SC7280_MASTER_GEM_NOC_PCIE_SNOC },
1312 static struct qcom_icc_node srvc_even_gemnoc = {
1313 .name = "srvc_even_gemnoc",
1314 .id = SC7280_SLAVE_SERVICE_GEM_NOC_1,
1320 static struct qcom_icc_node srvc_odd_gemnoc = {
1321 .name = "srvc_odd_gemnoc",
1322 .id = SC7280_SLAVE_SERVICE_GEM_NOC_2,
1328 static struct qcom_icc_node srvc_sys_gemnoc = {
1329 .name = "srvc_sys_gemnoc",
1330 .id = SC7280_SLAVE_SERVICE_GEM_NOC,
1336 static struct qcom_icc_node qhs_lpass_core = {
1337 .name = "qhs_lpass_core",
1338 .id = SC7280_SLAVE_LPASS_CORE_CFG,
1344 static struct qcom_icc_node qhs_lpass_lpi = {
1345 .name = "qhs_lpass_lpi",
1346 .id = SC7280_SLAVE_LPASS_LPI_CFG,
1352 static struct qcom_icc_node qhs_lpass_mpu = {
1353 .name = "qhs_lpass_mpu",
1354 .id = SC7280_SLAVE_LPASS_MPU_CFG,
1360 static struct qcom_icc_node qhs_lpass_top = {
1361 .name = "qhs_lpass_top",
1362 .id = SC7280_SLAVE_LPASS_TOP_CFG,
1368 static struct qcom_icc_node srvc_niu_aml_noc = {
1369 .name = "srvc_niu_aml_noc",
1370 .id = SC7280_SLAVE_SERVICES_LPASS_AML_NOC,
1376 static struct qcom_icc_node srvc_niu_lpass_agnoc = {
1377 .name = "srvc_niu_lpass_agnoc",
1378 .id = SC7280_SLAVE_SERVICE_LPASS_AG_NOC,
1384 static struct qcom_icc_node ebi = {
1386 .id = SC7280_SLAVE_EBI1,
1392 static struct qcom_icc_node qns_mem_noc_hf = {
1393 .name = "qns_mem_noc_hf",
1394 .id = SC7280_SLAVE_MNOC_HF_MEM_NOC,
1398 .links = { SC7280_MASTER_MNOC_HF_MEM_NOC },
1401 static struct qcom_icc_node qns_mem_noc_sf = {
1402 .name = "qns_mem_noc_sf",
1403 .id = SC7280_SLAVE_MNOC_SF_MEM_NOC,
1407 .links = { SC7280_MASTER_MNOC_SF_MEM_NOC },
1410 static struct qcom_icc_node srvc_mnoc = {
1411 .name = "srvc_mnoc",
1412 .id = SC7280_SLAVE_SERVICE_MNOC,
1418 static struct qcom_icc_node qns_nsp_gemnoc = {
1419 .name = "qns_nsp_gemnoc",
1420 .id = SC7280_SLAVE_CDSP_MEM_NOC,
1424 .links = { SC7280_MASTER_COMPUTE_NOC },
1427 static struct qcom_icc_node service_nsp_noc = {
1428 .name = "service_nsp_noc",
1429 .id = SC7280_SLAVE_SERVICE_NSP_NOC,
1435 static struct qcom_icc_node qns_gemnoc_gc = {
1436 .name = "qns_gemnoc_gc",
1437 .id = SC7280_SLAVE_SNOC_GEM_NOC_GC,
1441 .links = { SC7280_MASTER_SNOC_GC_MEM_NOC },
1444 static struct qcom_icc_node qns_gemnoc_sf = {
1445 .name = "qns_gemnoc_sf",
1446 .id = SC7280_SLAVE_SNOC_GEM_NOC_SF,
1450 .links = { SC7280_MASTER_SNOC_SF_MEM_NOC },
1453 static struct qcom_icc_node srvc_snoc = {
1454 .name = "srvc_snoc",
1455 .id = SC7280_SLAVE_SERVICE_SNOC,
1461 static struct qcom_icc_bcm bcm_acv = {
1463 .enable_mask = BIT(3),
1468 static struct qcom_icc_bcm bcm_ce0 = {
1471 .nodes = { &qxm_crypto },
1474 static struct qcom_icc_bcm bcm_cn0 = {
1478 .nodes = { &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie },
1481 static struct qcom_icc_bcm bcm_cn1 = {
1484 .nodes = { &qnm_cnoc3_cnoc2, &xm_qdss_dap,
1485 &qhs_ahb2phy0, &qhs_ahb2phy1,
1486 &qhs_camera_cfg, &qhs_clk_ctl,
1487 &qhs_compute_cfg, &qhs_cpr_cx,
1488 &qhs_cpr_mx, &qhs_crypto0_cfg,
1489 &qhs_cx_rdpm, &qhs_dcc_cfg,
1490 &qhs_display_cfg, &qhs_gpuss_cfg,
1491 &qhs_hwkm, &qhs_imem_cfg,
1492 &qhs_ipa, &qhs_ipc_router,
1493 &qhs_mss_cfg, &qhs_mx_rdpm,
1494 &qhs_pcie0_cfg, &qhs_pcie1_cfg,
1495 &qhs_pimem_cfg, &qhs_pka_wrapper_cfg,
1496 &qhs_pmu_wrapper_cfg, &qhs_qdss_cfg,
1497 &qhs_qup0, &qhs_qup1,
1498 &qhs_security, &qhs_tcsr,
1499 &qhs_tlmm, &qhs_ufs_mem_cfg, &qhs_usb2,
1500 &qhs_usb3_0, &qhs_venus_cfg,
1501 &qhs_vsense_ctrl_cfg, &qns_a1_noc_cfg,
1502 &qns_a2_noc_cfg, &qns_cnoc2_cnoc3,
1503 &qns_mnoc_cfg, &qns_snoc_cfg,
1504 &qnm_cnoc2_cnoc3, &qhs_aoss,
1505 &qhs_apss, &qns_cnoc3_cnoc2,
1506 &qns_cnoc_a2noc, &qns_ddrss_cfg },
1509 static struct qcom_icc_bcm bcm_cn2 = {
1512 .nodes = { &qhs_lpass_cfg, &qhs_pdm,
1513 &qhs_qspi, &qhs_sdc1,
1514 &qhs_sdc2, &qhs_sdc4 },
1517 static struct qcom_icc_bcm bcm_co0 = {
1520 .nodes = { &qns_nsp_gemnoc },
1523 static struct qcom_icc_bcm bcm_co3 = {
1526 .nodes = { &qxm_nsp },
1529 static struct qcom_icc_bcm bcm_mc0 = {
1536 static struct qcom_icc_bcm bcm_mm0 = {
1540 .nodes = { &qns_mem_noc_hf },
1543 static struct qcom_icc_bcm bcm_mm1 = {
1546 .nodes = { &qxm_camnoc_hf, &qxm_mdp0 },
1549 static struct qcom_icc_bcm bcm_mm4 = {
1552 .nodes = { &qns_mem_noc_sf },
1555 static struct qcom_icc_bcm bcm_mm5 = {
1558 .nodes = { &qnm_video0, &qxm_camnoc_icp,
1562 static struct qcom_icc_bcm bcm_qup0 = {
1566 .nodes = { &qup0_core_slave },
1569 static struct qcom_icc_bcm bcm_qup1 = {
1573 .nodes = { &qup1_core_slave },
1576 static struct qcom_icc_bcm bcm_sh0 = {
1580 .nodes = { &qns_llcc },
1583 static struct qcom_icc_bcm bcm_sh2 = {
1586 .nodes = { &alm_gpu_tcu, &alm_sys_tcu },
1589 static struct qcom_icc_bcm bcm_sh3 = {
1592 .nodes = { &qnm_cmpnoc },
1595 static struct qcom_icc_bcm bcm_sh4 = {
1598 .nodes = { &chm_apps },
1601 static struct qcom_icc_bcm bcm_sn0 = {
1605 .nodes = { &qns_gemnoc_sf },
1608 static struct qcom_icc_bcm bcm_sn2 = {
1611 .nodes = { &qns_gemnoc_gc },
1614 static struct qcom_icc_bcm bcm_sn3 = {
1617 .nodes = { &qxs_pimem },
1620 static struct qcom_icc_bcm bcm_sn4 = {
1623 .nodes = { &xs_qdss_stm },
1626 static struct qcom_icc_bcm bcm_sn5 = {
1629 .nodes = { &xm_pcie3_0 },
1632 static struct qcom_icc_bcm bcm_sn6 = {
1635 .nodes = { &xm_pcie3_1 },
1638 static struct qcom_icc_bcm bcm_sn7 = {
1641 .nodes = { &qnm_aggre1_noc },
1644 static struct qcom_icc_bcm bcm_sn8 = {
1647 .nodes = { &qnm_aggre2_noc },
1650 static struct qcom_icc_bcm bcm_sn14 = {
1653 .nodes = { &qns_pcie_mem_noc },
1656 static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
1662 static struct qcom_icc_node * const aggre1_noc_nodes[] = {
1663 [MASTER_QSPI_0] = &qhm_qspi,
1664 [MASTER_QUP_0] = &qhm_qup0,
1665 [MASTER_QUP_1] = &qhm_qup1,
1666 [MASTER_A1NOC_CFG] = &qnm_a1noc_cfg,
1667 [MASTER_PCIE_0] = &xm_pcie3_0,
1668 [MASTER_PCIE_1] = &xm_pcie3_1,
1669 [MASTER_SDCC_1] = &xm_sdc1,
1670 [MASTER_SDCC_2] = &xm_sdc2,
1671 [MASTER_SDCC_4] = &xm_sdc4,
1672 [MASTER_UFS_MEM] = &xm_ufs_mem,
1673 [MASTER_USB2] = &xm_usb2,
1674 [MASTER_USB3_0] = &xm_usb3_0,
1675 [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
1676 [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
1677 [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc,
1680 static const struct regmap_config sc7280_aggre1_noc_regmap_config = {
1684 .max_register = 0x1c080,
1688 static const struct qcom_icc_desc sc7280_aggre1_noc = {
1689 .config = &sc7280_aggre1_noc_regmap_config,
1690 .nodes = aggre1_noc_nodes,
1691 .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
1692 .bcms = aggre1_noc_bcms,
1693 .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
1694 .qos_requires_clocks = true,
1697 static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
1701 static const struct regmap_config sc7280_aggre2_noc_regmap_config = {
1705 .max_register = 0x2b080,
1709 static struct qcom_icc_node * const aggre2_noc_nodes[] = {
1710 [MASTER_QDSS_BAM] = &qhm_qdss_bam,
1711 [MASTER_A2NOC_CFG] = &qnm_a2noc_cfg,
1712 [MASTER_CNOC_A2NOC] = &qnm_cnoc_datapath,
1713 [MASTER_CRYPTO] = &qxm_crypto,
1714 [MASTER_IPA] = &qxm_ipa,
1715 [MASTER_QDSS_ETR] = &xm_qdss_etr,
1716 [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
1717 [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
1720 static const struct qcom_icc_desc sc7280_aggre2_noc = {
1721 .config = &sc7280_aggre2_noc_regmap_config,
1722 .nodes = aggre2_noc_nodes,
1723 .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
1724 .bcms = aggre2_noc_bcms,
1725 .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
1726 .qos_requires_clocks = true,
1729 static struct qcom_icc_bcm * const clk_virt_bcms[] = {
1734 static struct qcom_icc_node * const clk_virt_nodes[] = {
1735 [MASTER_QUP_CORE_0] = &qup0_core_master,
1736 [MASTER_QUP_CORE_1] = &qup1_core_master,
1737 [SLAVE_QUP_CORE_0] = &qup0_core_slave,
1738 [SLAVE_QUP_CORE_1] = &qup1_core_slave,
1741 static const struct qcom_icc_desc sc7280_clk_virt = {
1742 .nodes = clk_virt_nodes,
1743 .num_nodes = ARRAY_SIZE(clk_virt_nodes),
1744 .bcms = clk_virt_bcms,
1745 .num_bcms = ARRAY_SIZE(clk_virt_bcms),
1748 static struct qcom_icc_bcm * const cnoc2_bcms[] = {
1753 static struct qcom_icc_node * const cnoc2_nodes[] = {
1754 [MASTER_CNOC3_CNOC2] = &qnm_cnoc3_cnoc2,
1755 [MASTER_QDSS_DAP] = &xm_qdss_dap,
1756 [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
1757 [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
1758 [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
1759 [SLAVE_CLK_CTL] = &qhs_clk_ctl,
1760 [SLAVE_CDSP_CFG] = &qhs_compute_cfg,
1761 [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
1762 [SLAVE_RBCPR_MX_CFG] = &qhs_cpr_mx,
1763 [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
1764 [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
1765 [SLAVE_DCC_CFG] = &qhs_dcc_cfg,
1766 [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
1767 [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
1768 [SLAVE_HWKM] = &qhs_hwkm,
1769 [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
1770 [SLAVE_IPA_CFG] = &qhs_ipa,
1771 [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
1772 [SLAVE_LPASS] = &qhs_lpass_cfg,
1773 [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
1774 [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
1775 [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
1776 [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
1777 [SLAVE_PDM] = &qhs_pdm,
1778 [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
1779 [SLAVE_PKA_WRAPPER_CFG] = &qhs_pka_wrapper_cfg,
1780 [SLAVE_PMU_WRAPPER_CFG] = &qhs_pmu_wrapper_cfg,
1781 [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
1782 [SLAVE_QSPI_0] = &qhs_qspi,
1783 [SLAVE_QUP_0] = &qhs_qup0,
1784 [SLAVE_QUP_1] = &qhs_qup1,
1785 [SLAVE_SDCC_1] = &qhs_sdc1,
1786 [SLAVE_SDCC_2] = &qhs_sdc2,
1787 [SLAVE_SDCC_4] = &qhs_sdc4,
1788 [SLAVE_SECURITY] = &qhs_security,
1789 [SLAVE_TCSR] = &qhs_tcsr,
1790 [SLAVE_TLMM] = &qhs_tlmm,
1791 [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
1792 [SLAVE_USB2] = &qhs_usb2,
1793 [SLAVE_USB3_0] = &qhs_usb3_0,
1794 [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
1795 [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
1796 [SLAVE_A1NOC_CFG] = &qns_a1_noc_cfg,
1797 [SLAVE_A2NOC_CFG] = &qns_a2_noc_cfg,
1798 [SLAVE_CNOC2_CNOC3] = &qns_cnoc2_cnoc3,
1799 [SLAVE_CNOC_MNOC_CFG] = &qns_mnoc_cfg,
1800 [SLAVE_SNOC_CFG] = &qns_snoc_cfg,
1803 static const struct regmap_config sc7280_cnoc2_regmap_config = {
1807 .max_register = 0x1000,
1811 static const struct qcom_icc_desc sc7280_cnoc2 = {
1812 .config = &sc7280_cnoc2_regmap_config,
1813 .nodes = cnoc2_nodes,
1814 .num_nodes = ARRAY_SIZE(cnoc2_nodes),
1816 .num_bcms = ARRAY_SIZE(cnoc2_bcms),
1819 static struct qcom_icc_bcm * const cnoc3_bcms[] = {
1826 static struct qcom_icc_node * const cnoc3_nodes[] = {
1827 [MASTER_CNOC2_CNOC3] = &qnm_cnoc2_cnoc3,
1828 [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
1829 [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
1830 [SLAVE_AOSS] = &qhs_aoss,
1831 [SLAVE_APPSS] = &qhs_apss,
1832 [SLAVE_CNOC3_CNOC2] = &qns_cnoc3_cnoc2,
1833 [SLAVE_CNOC_A2NOC] = &qns_cnoc_a2noc,
1834 [SLAVE_DDRSS_CFG] = &qns_ddrss_cfg,
1835 [SLAVE_BOOT_IMEM] = &qxs_boot_imem,
1836 [SLAVE_IMEM] = &qxs_imem,
1837 [SLAVE_PIMEM] = &qxs_pimem,
1838 [SLAVE_PCIE_0] = &xs_pcie_0,
1839 [SLAVE_PCIE_1] = &xs_pcie_1,
1840 [SLAVE_QDSS_STM] = &xs_qdss_stm,
1841 [SLAVE_TCU] = &xs_sys_tcu_cfg,
1844 static const struct regmap_config sc7280_cnoc3_regmap_config = {
1848 .max_register = 0x1000,
1852 static const struct qcom_icc_desc sc7280_cnoc3 = {
1853 .config = &sc7280_cnoc3_regmap_config,
1854 .nodes = cnoc3_nodes,
1855 .num_nodes = ARRAY_SIZE(cnoc3_nodes),
1857 .num_bcms = ARRAY_SIZE(cnoc3_bcms),
1860 static struct qcom_icc_bcm * const dc_noc_bcms[] = {
1863 static struct qcom_icc_node * const dc_noc_nodes[] = {
1864 [MASTER_CNOC_DC_NOC] = &qnm_cnoc_dc_noc,
1865 [SLAVE_LLCC_CFG] = &qhs_llcc,
1866 [SLAVE_GEM_NOC_CFG] = &qns_gemnoc,
1869 static const struct regmap_config sc7280_dc_noc_regmap_config = {
1873 .max_register = 0x5080,
1877 static const struct qcom_icc_desc sc7280_dc_noc = {
1878 .config = &sc7280_dc_noc_regmap_config,
1879 .nodes = dc_noc_nodes,
1880 .num_nodes = ARRAY_SIZE(dc_noc_nodes),
1881 .bcms = dc_noc_bcms,
1882 .num_bcms = ARRAY_SIZE(dc_noc_bcms),
1885 static struct qcom_icc_bcm * const gem_noc_bcms[] = {
1892 static struct qcom_icc_node * const gem_noc_nodes[] = {
1893 [MASTER_GPU_TCU] = &alm_gpu_tcu,
1894 [MASTER_SYS_TCU] = &alm_sys_tcu,
1895 [MASTER_APPSS_PROC] = &chm_apps,
1896 [MASTER_COMPUTE_NOC] = &qnm_cmpnoc,
1897 [MASTER_GEM_NOC_CFG] = &qnm_gemnoc_cfg,
1898 [MASTER_GFX3D] = &qnm_gpu,
1899 [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
1900 [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
1901 [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
1902 [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
1903 [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
1904 [SLAVE_MSS_PROC_MS_MPU_CFG] = &qhs_mdsp_ms_mpu_cfg,
1905 [SLAVE_MCDMA_MS_MPU_CFG] = &qhs_modem_ms_mpu_cfg,
1906 [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
1907 [SLAVE_LLCC] = &qns_llcc,
1908 [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
1909 [SLAVE_SERVICE_GEM_NOC_1] = &srvc_even_gemnoc,
1910 [SLAVE_SERVICE_GEM_NOC_2] = &srvc_odd_gemnoc,
1911 [SLAVE_SERVICE_GEM_NOC] = &srvc_sys_gemnoc,
1914 static const struct regmap_config sc7280_gem_noc_regmap_config = {
1918 .max_register = 0xe2200,
1922 static const struct qcom_icc_desc sc7280_gem_noc = {
1923 .config = &sc7280_gem_noc_regmap_config,
1924 .nodes = gem_noc_nodes,
1925 .num_nodes = ARRAY_SIZE(gem_noc_nodes),
1926 .bcms = gem_noc_bcms,
1927 .num_bcms = ARRAY_SIZE(gem_noc_bcms),
1930 static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = {
1933 static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
1934 [MASTER_CNOC_LPASS_AG_NOC] = &qhm_config_noc,
1935 [SLAVE_LPASS_CORE_CFG] = &qhs_lpass_core,
1936 [SLAVE_LPASS_LPI_CFG] = &qhs_lpass_lpi,
1937 [SLAVE_LPASS_MPU_CFG] = &qhs_lpass_mpu,
1938 [SLAVE_LPASS_TOP_CFG] = &qhs_lpass_top,
1939 [SLAVE_SERVICES_LPASS_AML_NOC] = &srvc_niu_aml_noc,
1940 [SLAVE_SERVICE_LPASS_AG_NOC] = &srvc_niu_lpass_agnoc,
1943 static const struct regmap_config sc7280_lpass_ag_noc_regmap_config = {
1947 .max_register = 0xf080,
1951 static const struct qcom_icc_desc sc7280_lpass_ag_noc = {
1952 .config = &sc7280_lpass_ag_noc_regmap_config,
1953 .nodes = lpass_ag_noc_nodes,
1954 .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
1955 .bcms = lpass_ag_noc_bcms,
1956 .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
1959 static struct qcom_icc_bcm * const mc_virt_bcms[] = {
1964 static struct qcom_icc_node * const mc_virt_nodes[] = {
1965 [MASTER_LLCC] = &llcc_mc,
1966 [SLAVE_EBI1] = &ebi,
1969 static const struct regmap_config sc7280_mc_virt_regmap_config = {
1973 .max_register = 0x4,
1977 static const struct qcom_icc_desc sc7280_mc_virt = {
1978 .config = &sc7280_mc_virt_regmap_config,
1979 .nodes = mc_virt_nodes,
1980 .num_nodes = ARRAY_SIZE(mc_virt_nodes),
1981 .bcms = mc_virt_bcms,
1982 .num_bcms = ARRAY_SIZE(mc_virt_bcms),
1985 static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
1992 static struct qcom_icc_node * const mmss_noc_nodes[] = {
1993 [MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
1994 [MASTER_VIDEO_P0] = &qnm_video0,
1995 [MASTER_VIDEO_PROC] = &qnm_video_cpu,
1996 [MASTER_CAMNOC_HF] = &qxm_camnoc_hf,
1997 [MASTER_CAMNOC_ICP] = &qxm_camnoc_icp,
1998 [MASTER_CAMNOC_SF] = &qxm_camnoc_sf,
1999 [MASTER_MDP0] = &qxm_mdp0,
2000 [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
2001 [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
2002 [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
2005 static const struct regmap_config sc7280_mmss_noc_regmap_config = {
2009 .max_register = 0x1e080,
2013 static const struct qcom_icc_desc sc7280_mmss_noc = {
2014 .config = &sc7280_mmss_noc_regmap_config,
2015 .nodes = mmss_noc_nodes,
2016 .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
2017 .bcms = mmss_noc_bcms,
2018 .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
2021 static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
2026 static struct qcom_icc_node * const nsp_noc_nodes[] = {
2027 [MASTER_CDSP_NOC_CFG] = &qhm_nsp_noc_config,
2028 [MASTER_CDSP_PROC] = &qxm_nsp,
2029 [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
2030 [SLAVE_SERVICE_NSP_NOC] = &service_nsp_noc,
2033 static const struct regmap_config sc7280_nsp_noc_regmap_config = {
2037 .max_register = 0x10000,
2041 static const struct qcom_icc_desc sc7280_nsp_noc = {
2042 .config = &sc7280_nsp_noc_regmap_config,
2043 .nodes = nsp_noc_nodes,
2044 .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
2045 .bcms = nsp_noc_bcms,
2046 .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
2049 static struct qcom_icc_bcm * const system_noc_bcms[] = {
2056 static struct qcom_icc_node * const system_noc_nodes[] = {
2057 [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
2058 [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
2059 [MASTER_SNOC_CFG] = &qnm_snoc_cfg,
2060 [MASTER_PIMEM] = &qxm_pimem,
2061 [MASTER_GIC] = &xm_gic,
2062 [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
2063 [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
2064 [SLAVE_SERVICE_SNOC] = &srvc_snoc,
2067 static const struct regmap_config sc7280_system_noc_regmap_config = {
2071 .max_register = 0x15480,
2075 static const struct qcom_icc_desc sc7280_system_noc = {
2076 .config = &sc7280_system_noc_regmap_config,
2077 .nodes = system_noc_nodes,
2078 .num_nodes = ARRAY_SIZE(system_noc_nodes),
2079 .bcms = system_noc_bcms,
2080 .num_bcms = ARRAY_SIZE(system_noc_bcms),
2083 static const struct of_device_id qnoc_of_match[] = {
2084 { .compatible = "qcom,sc7280-aggre1-noc",
2085 .data = &sc7280_aggre1_noc},
2086 { .compatible = "qcom,sc7280-aggre2-noc",
2087 .data = &sc7280_aggre2_noc},
2088 { .compatible = "qcom,sc7280-clk-virt",
2089 .data = &sc7280_clk_virt},
2090 { .compatible = "qcom,sc7280-cnoc2",
2091 .data = &sc7280_cnoc2},
2092 { .compatible = "qcom,sc7280-cnoc3",
2093 .data = &sc7280_cnoc3},
2094 { .compatible = "qcom,sc7280-dc-noc",
2095 .data = &sc7280_dc_noc},
2096 { .compatible = "qcom,sc7280-gem-noc",
2097 .data = &sc7280_gem_noc},
2098 { .compatible = "qcom,sc7280-lpass-ag-noc",
2099 .data = &sc7280_lpass_ag_noc},
2100 { .compatible = "qcom,sc7280-mc-virt",
2101 .data = &sc7280_mc_virt},
2102 { .compatible = "qcom,sc7280-mmss-noc",
2103 .data = &sc7280_mmss_noc},
2104 { .compatible = "qcom,sc7280-nsp-noc",
2105 .data = &sc7280_nsp_noc},
2106 { .compatible = "qcom,sc7280-system-noc",
2107 .data = &sc7280_system_noc},
2110 MODULE_DEVICE_TABLE(of, qnoc_of_match);
2112 static struct platform_driver qnoc_driver = {
2113 .probe = qcom_icc_rpmh_probe,
2114 .remove = qcom_icc_rpmh_remove,
2116 .name = "qnoc-sc7280",
2117 .of_match_table = qnoc_of_match,
2118 .sync_state = icc_sync_state,
2121 module_platform_driver(qnoc_driver);
2123 MODULE_DESCRIPTION("SC7280 NoC driver");
2124 MODULE_LICENSE("GPL v2");