1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021, Linaro Limited
7 #include <linux/device.h>
8 #include <linux/interconnect.h>
9 #include <linux/interconnect-provider.h>
10 #include <linux/module.h>
11 #include <linux/mod_devicetable.h>
12 #include <linux/platform_device.h>
13 #include <linux/property.h>
14 #include <dt-bindings/interconnect/qcom,sm8450.h>
16 #include "bcm-voter.h"
17 #include "icc-common.h"
21 static struct qcom_icc_node qhm_qspi
= {
23 .id
= SM8450_MASTER_QSPI_0
,
27 .links
= { SM8450_SLAVE_A1NOC_SNOC
},
30 static struct qcom_icc_node qhm_qup1
= {
32 .id
= SM8450_MASTER_QUP_1
,
36 .links
= { SM8450_SLAVE_A1NOC_SNOC
},
39 static struct qcom_icc_node qnm_a1noc_cfg
= {
40 .name
= "qnm_a1noc_cfg",
41 .id
= SM8450_MASTER_A1NOC_CFG
,
45 .links
= { SM8450_SLAVE_SERVICE_A1NOC
},
48 static struct qcom_icc_node xm_sdc4
= {
50 .id
= SM8450_MASTER_SDCC_4
,
54 .links
= { SM8450_SLAVE_A1NOC_SNOC
},
57 static struct qcom_icc_node xm_ufs_mem
= {
59 .id
= SM8450_MASTER_UFS_MEM
,
63 .links
= { SM8450_SLAVE_A1NOC_SNOC
},
66 static struct qcom_icc_node xm_usb3_0
= {
68 .id
= SM8450_MASTER_USB3_0
,
72 .links
= { SM8450_SLAVE_A1NOC_SNOC
},
75 static struct qcom_icc_node qhm_qdss_bam
= {
76 .name
= "qhm_qdss_bam",
77 .id
= SM8450_MASTER_QDSS_BAM
,
81 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
84 static struct qcom_icc_node qhm_qup0
= {
86 .id
= SM8450_MASTER_QUP_0
,
90 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
93 static struct qcom_icc_node qhm_qup2
= {
95 .id
= SM8450_MASTER_QUP_2
,
99 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
102 static struct qcom_icc_node qnm_a2noc_cfg
= {
103 .name
= "qnm_a2noc_cfg",
104 .id
= SM8450_MASTER_A2NOC_CFG
,
108 .links
= { SM8450_SLAVE_SERVICE_A2NOC
},
111 static struct qcom_icc_node qxm_crypto
= {
112 .name
= "qxm_crypto",
113 .id
= SM8450_MASTER_CRYPTO
,
117 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
120 static struct qcom_icc_node qxm_ipa
= {
122 .id
= SM8450_MASTER_IPA
,
126 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
129 static struct qcom_icc_node qxm_sensorss_q6
= {
130 .name
= "qxm_sensorss_q6",
131 .id
= SM8450_MASTER_SENSORS_PROC
,
135 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
138 static struct qcom_icc_node qxm_sp
= {
140 .id
= SM8450_MASTER_SP
,
144 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
147 static struct qcom_icc_node xm_qdss_etr_0
= {
148 .name
= "xm_qdss_etr_0",
149 .id
= SM8450_MASTER_QDSS_ETR
,
153 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
156 static struct qcom_icc_node xm_qdss_etr_1
= {
157 .name
= "xm_qdss_etr_1",
158 .id
= SM8450_MASTER_QDSS_ETR_1
,
162 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
165 static struct qcom_icc_node xm_sdc2
= {
167 .id
= SM8450_MASTER_SDCC_2
,
171 .links
= { SM8450_SLAVE_A2NOC_SNOC
},
174 static struct qcom_icc_node qup0_core_master
= {
175 .name
= "qup0_core_master",
176 .id
= SM8450_MASTER_QUP_CORE_0
,
180 .links
= { SM8450_SLAVE_QUP_CORE_0
},
183 static struct qcom_icc_node qup1_core_master
= {
184 .name
= "qup1_core_master",
185 .id
= SM8450_MASTER_QUP_CORE_1
,
189 .links
= { SM8450_SLAVE_QUP_CORE_1
},
192 static struct qcom_icc_node qup2_core_master
= {
193 .name
= "qup2_core_master",
194 .id
= SM8450_MASTER_QUP_CORE_2
,
198 .links
= { SM8450_SLAVE_QUP_CORE_2
},
201 static struct qcom_icc_node qnm_gemnoc_cnoc
= {
202 .name
= "qnm_gemnoc_cnoc",
203 .id
= SM8450_MASTER_GEM_NOC_CNOC
,
207 .links
= { SM8450_SLAVE_AHB2PHY_SOUTH
, SM8450_SLAVE_AHB2PHY_NORTH
,
208 SM8450_SLAVE_AOSS
, SM8450_SLAVE_CAMERA_CFG
,
209 SM8450_SLAVE_CLK_CTL
, SM8450_SLAVE_CDSP_CFG
,
210 SM8450_SLAVE_RBCPR_CX_CFG
, SM8450_SLAVE_RBCPR_MMCX_CFG
,
211 SM8450_SLAVE_RBCPR_MXA_CFG
, SM8450_SLAVE_RBCPR_MXC_CFG
,
212 SM8450_SLAVE_CRYPTO_0_CFG
, SM8450_SLAVE_CX_RDPM
,
213 SM8450_SLAVE_DISPLAY_CFG
, SM8450_SLAVE_GFX3D_CFG
,
214 SM8450_SLAVE_IMEM_CFG
, SM8450_SLAVE_IPA_CFG
,
215 SM8450_SLAVE_IPC_ROUTER_CFG
, SM8450_SLAVE_LPASS
,
216 SM8450_SLAVE_CNOC_MSS
, SM8450_SLAVE_MX_RDPM
,
217 SM8450_SLAVE_PCIE_0_CFG
, SM8450_SLAVE_PCIE_1_CFG
,
218 SM8450_SLAVE_PDM
, SM8450_SLAVE_PIMEM_CFG
,
219 SM8450_SLAVE_PRNG
, SM8450_SLAVE_QDSS_CFG
,
220 SM8450_SLAVE_QSPI_0
, SM8450_SLAVE_QUP_0
,
221 SM8450_SLAVE_QUP_1
, SM8450_SLAVE_QUP_2
,
222 SM8450_SLAVE_SDCC_2
, SM8450_SLAVE_SDCC_4
,
223 SM8450_SLAVE_SPSS_CFG
, SM8450_SLAVE_TCSR
,
224 SM8450_SLAVE_TLMM
, SM8450_SLAVE_TME_CFG
,
225 SM8450_SLAVE_UFS_MEM_CFG
, SM8450_SLAVE_USB3_0
,
226 SM8450_SLAVE_VENUS_CFG
, SM8450_SLAVE_VSENSE_CTRL_CFG
,
227 SM8450_SLAVE_A1NOC_CFG
, SM8450_SLAVE_A2NOC_CFG
,
228 SM8450_SLAVE_DDRSS_CFG
, SM8450_SLAVE_CNOC_MNOC_CFG
,
229 SM8450_SLAVE_PCIE_ANOC_CFG
, SM8450_SLAVE_SNOC_CFG
,
230 SM8450_SLAVE_IMEM
, SM8450_SLAVE_PIMEM
,
231 SM8450_SLAVE_SERVICE_CNOC
, SM8450_SLAVE_QDSS_STM
,
235 static struct qcom_icc_node qnm_gemnoc_pcie
= {
236 .name
= "qnm_gemnoc_pcie",
237 .id
= SM8450_MASTER_GEM_NOC_PCIE_SNOC
,
241 .links
= { SM8450_SLAVE_PCIE_0
, SM8450_SLAVE_PCIE_1
},
244 static struct qcom_icc_node alm_gpu_tcu
= {
245 .name
= "alm_gpu_tcu",
246 .id
= SM8450_MASTER_GPU_TCU
,
250 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
253 static struct qcom_icc_node alm_sys_tcu
= {
254 .name
= "alm_sys_tcu",
255 .id
= SM8450_MASTER_SYS_TCU
,
259 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
262 static struct qcom_icc_node chm_apps
= {
264 .id
= SM8450_MASTER_APPSS_PROC
,
268 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
,
269 SM8450_SLAVE_MEM_NOC_PCIE_SNOC
},
272 static struct qcom_icc_node qnm_gpu
= {
274 .id
= SM8450_MASTER_GFX3D
,
278 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
281 static struct qcom_icc_node qnm_mdsp
= {
283 .id
= SM8450_MASTER_MSS_PROC
,
287 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
,
288 SM8450_SLAVE_MEM_NOC_PCIE_SNOC
},
291 static struct qcom_icc_node qnm_mnoc_hf
= {
292 .name
= "qnm_mnoc_hf",
293 .id
= SM8450_MASTER_MNOC_HF_MEM_NOC
,
297 .links
= { SM8450_SLAVE_LLCC
},
300 static struct qcom_icc_node qnm_mnoc_sf
= {
301 .name
= "qnm_mnoc_sf",
302 .id
= SM8450_MASTER_MNOC_SF_MEM_NOC
,
306 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
309 static struct qcom_icc_node qnm_nsp_gemnoc
= {
310 .name
= "qnm_nsp_gemnoc",
311 .id
= SM8450_MASTER_COMPUTE_NOC
,
315 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
318 static struct qcom_icc_node qnm_pcie
= {
320 .id
= SM8450_MASTER_ANOC_PCIE_GEM_NOC
,
324 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
},
327 static struct qcom_icc_node qnm_snoc_gc
= {
328 .name
= "qnm_snoc_gc",
329 .id
= SM8450_MASTER_SNOC_GC_MEM_NOC
,
333 .links
= { SM8450_SLAVE_LLCC
},
336 static struct qcom_icc_node qnm_snoc_sf
= {
337 .name
= "qnm_snoc_sf",
338 .id
= SM8450_MASTER_SNOC_SF_MEM_NOC
,
342 .links
= { SM8450_SLAVE_GEM_NOC_CNOC
, SM8450_SLAVE_LLCC
,
343 SM8450_SLAVE_MEM_NOC_PCIE_SNOC
},
346 static struct qcom_icc_node qhm_config_noc
= {
347 .name
= "qhm_config_noc",
348 .id
= SM8450_MASTER_CNOC_LPASS_AG_NOC
,
352 .links
= { SM8450_SLAVE_LPASS_CORE_CFG
, SM8450_SLAVE_LPASS_LPI_CFG
,
353 SM8450_SLAVE_LPASS_MPU_CFG
, SM8450_SLAVE_LPASS_TOP_CFG
,
354 SM8450_SLAVE_SERVICES_LPASS_AML_NOC
, SM8450_SLAVE_SERVICE_LPASS_AG_NOC
},
357 static struct qcom_icc_node qxm_lpass_dsp
= {
358 .name
= "qxm_lpass_dsp",
359 .id
= SM8450_MASTER_LPASS_PROC
,
363 .links
= { SM8450_SLAVE_LPASS_TOP_CFG
, SM8450_SLAVE_LPASS_SNOC
,
364 SM8450_SLAVE_SERVICES_LPASS_AML_NOC
, SM8450_SLAVE_SERVICE_LPASS_AG_NOC
},
367 static struct qcom_icc_node llcc_mc
= {
369 .id
= SM8450_MASTER_LLCC
,
373 .links
= { SM8450_SLAVE_EBI1
},
376 static struct qcom_icc_node qnm_camnoc_hf
= {
377 .name
= "qnm_camnoc_hf",
378 .id
= SM8450_MASTER_CAMNOC_HF
,
382 .links
= { SM8450_SLAVE_MNOC_HF_MEM_NOC
},
385 static struct qcom_icc_node qnm_camnoc_icp
= {
386 .name
= "qnm_camnoc_icp",
387 .id
= SM8450_MASTER_CAMNOC_ICP
,
391 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
394 static struct qcom_icc_node qnm_camnoc_sf
= {
395 .name
= "qnm_camnoc_sf",
396 .id
= SM8450_MASTER_CAMNOC_SF
,
400 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
403 static struct qcom_icc_node qnm_mdp
= {
405 .id
= SM8450_MASTER_MDP
,
409 .links
= { SM8450_SLAVE_MNOC_HF_MEM_NOC
},
412 static struct qcom_icc_node qnm_mnoc_cfg
= {
413 .name
= "qnm_mnoc_cfg",
414 .id
= SM8450_MASTER_CNOC_MNOC_CFG
,
418 .links
= { SM8450_SLAVE_SERVICE_MNOC
},
421 static struct qcom_icc_node qnm_rot
= {
423 .id
= SM8450_MASTER_ROTATOR
,
427 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
430 static struct qcom_icc_node qnm_vapss_hcp
= {
431 .name
= "qnm_vapss_hcp",
432 .id
= SM8450_MASTER_CDSP_HCP
,
436 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
439 static struct qcom_icc_node qnm_video
= {
441 .id
= SM8450_MASTER_VIDEO
,
445 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
448 static struct qcom_icc_node qnm_video_cv_cpu
= {
449 .name
= "qnm_video_cv_cpu",
450 .id
= SM8450_MASTER_VIDEO_CV_PROC
,
454 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
457 static struct qcom_icc_node qnm_video_cvp
= {
458 .name
= "qnm_video_cvp",
459 .id
= SM8450_MASTER_VIDEO_PROC
,
463 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
466 static struct qcom_icc_node qnm_video_v_cpu
= {
467 .name
= "qnm_video_v_cpu",
468 .id
= SM8450_MASTER_VIDEO_V_PROC
,
472 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC
},
475 static struct qcom_icc_node qhm_nsp_noc_config
= {
476 .name
= "qhm_nsp_noc_config",
477 .id
= SM8450_MASTER_CDSP_NOC_CFG
,
481 .links
= { SM8450_SLAVE_SERVICE_NSP_NOC
},
484 static struct qcom_icc_node qxm_nsp
= {
486 .id
= SM8450_MASTER_CDSP_PROC
,
490 .links
= { SM8450_SLAVE_CDSP_MEM_NOC
},
493 static struct qcom_icc_node qnm_pcie_anoc_cfg
= {
494 .name
= "qnm_pcie_anoc_cfg",
495 .id
= SM8450_MASTER_PCIE_ANOC_CFG
,
499 .links
= { SM8450_SLAVE_SERVICE_PCIE_ANOC
},
502 static struct qcom_icc_node xm_pcie3_0
= {
503 .name
= "xm_pcie3_0",
504 .id
= SM8450_MASTER_PCIE_0
,
508 .links
= { SM8450_SLAVE_ANOC_PCIE_GEM_NOC
},
511 static struct qcom_icc_node xm_pcie3_1
= {
512 .name
= "xm_pcie3_1",
513 .id
= SM8450_MASTER_PCIE_1
,
517 .links
= { SM8450_SLAVE_ANOC_PCIE_GEM_NOC
},
520 static struct qcom_icc_node qhm_gic
= {
522 .id
= SM8450_MASTER_GIC_AHB
,
526 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_SF
},
529 static struct qcom_icc_node qnm_aggre1_noc
= {
530 .name
= "qnm_aggre1_noc",
531 .id
= SM8450_MASTER_A1NOC_SNOC
,
535 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_SF
},
538 static struct qcom_icc_node qnm_aggre2_noc
= {
539 .name
= "qnm_aggre2_noc",
540 .id
= SM8450_MASTER_A2NOC_SNOC
,
544 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_SF
},
547 static struct qcom_icc_node qnm_lpass_noc
= {
548 .name
= "qnm_lpass_noc",
549 .id
= SM8450_MASTER_LPASS_ANOC
,
553 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_SF
},
556 static struct qcom_icc_node qnm_snoc_cfg
= {
557 .name
= "qnm_snoc_cfg",
558 .id
= SM8450_MASTER_SNOC_CFG
,
562 .links
= { SM8450_SLAVE_SERVICE_SNOC
},
565 static struct qcom_icc_node qxm_pimem
= {
567 .id
= SM8450_MASTER_PIMEM
,
571 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_GC
},
574 static struct qcom_icc_node xm_gic
= {
576 .id
= SM8450_MASTER_GIC
,
580 .links
= { SM8450_SLAVE_SNOC_GEM_NOC_GC
},
583 static struct qcom_icc_node qnm_mnoc_hf_disp
= {
584 .name
= "qnm_mnoc_hf_disp",
585 .id
= SM8450_MASTER_MNOC_HF_MEM_NOC_DISP
,
589 .links
= { SM8450_SLAVE_LLCC_DISP
},
592 static struct qcom_icc_node qnm_mnoc_sf_disp
= {
593 .name
= "qnm_mnoc_sf_disp",
594 .id
= SM8450_MASTER_MNOC_SF_MEM_NOC_DISP
,
598 .links
= { SM8450_SLAVE_LLCC_DISP
},
601 static struct qcom_icc_node qnm_pcie_disp
= {
602 .name
= "qnm_pcie_disp",
603 .id
= SM8450_MASTER_ANOC_PCIE_GEM_NOC_DISP
,
607 .links
= { SM8450_SLAVE_LLCC_DISP
},
610 static struct qcom_icc_node llcc_mc_disp
= {
611 .name
= "llcc_mc_disp",
612 .id
= SM8450_MASTER_LLCC_DISP
,
616 .links
= { SM8450_SLAVE_EBI1_DISP
},
619 static struct qcom_icc_node qnm_mdp_disp
= {
620 .name
= "qnm_mdp_disp",
621 .id
= SM8450_MASTER_MDP_DISP
,
625 .links
= { SM8450_SLAVE_MNOC_HF_MEM_NOC_DISP
},
628 static struct qcom_icc_node qnm_rot_disp
= {
629 .name
= "qnm_rot_disp",
630 .id
= SM8450_MASTER_ROTATOR_DISP
,
634 .links
= { SM8450_SLAVE_MNOC_SF_MEM_NOC_DISP
},
637 static struct qcom_icc_node qns_a1noc_snoc
= {
638 .name
= "qns_a1noc_snoc",
639 .id
= SM8450_SLAVE_A1NOC_SNOC
,
643 .links
= { SM8450_MASTER_A1NOC_SNOC
},
646 static struct qcom_icc_node srvc_aggre1_noc
= {
647 .name
= "srvc_aggre1_noc",
648 .id
= SM8450_SLAVE_SERVICE_A1NOC
,
654 static struct qcom_icc_node qns_a2noc_snoc
= {
655 .name
= "qns_a2noc_snoc",
656 .id
= SM8450_SLAVE_A2NOC_SNOC
,
660 .links
= { SM8450_MASTER_A2NOC_SNOC
},
663 static struct qcom_icc_node srvc_aggre2_noc
= {
664 .name
= "srvc_aggre2_noc",
665 .id
= SM8450_SLAVE_SERVICE_A2NOC
,
671 static struct qcom_icc_node qup0_core_slave
= {
672 .name
= "qup0_core_slave",
673 .id
= SM8450_SLAVE_QUP_CORE_0
,
679 static struct qcom_icc_node qup1_core_slave
= {
680 .name
= "qup1_core_slave",
681 .id
= SM8450_SLAVE_QUP_CORE_1
,
687 static struct qcom_icc_node qup2_core_slave
= {
688 .name
= "qup2_core_slave",
689 .id
= SM8450_SLAVE_QUP_CORE_2
,
695 static struct qcom_icc_node qhs_ahb2phy0
= {
696 .name
= "qhs_ahb2phy0",
697 .id
= SM8450_SLAVE_AHB2PHY_SOUTH
,
703 static struct qcom_icc_node qhs_ahb2phy1
= {
704 .name
= "qhs_ahb2phy1",
705 .id
= SM8450_SLAVE_AHB2PHY_NORTH
,
711 static struct qcom_icc_node qhs_aoss
= {
713 .id
= SM8450_SLAVE_AOSS
,
719 static struct qcom_icc_node qhs_camera_cfg
= {
720 .name
= "qhs_camera_cfg",
721 .id
= SM8450_SLAVE_CAMERA_CFG
,
727 static struct qcom_icc_node qhs_clk_ctl
= {
728 .name
= "qhs_clk_ctl",
729 .id
= SM8450_SLAVE_CLK_CTL
,
735 static struct qcom_icc_node qhs_compute_cfg
= {
736 .name
= "qhs_compute_cfg",
737 .id
= SM8450_SLAVE_CDSP_CFG
,
741 .links
= { MASTER_CDSP_NOC_CFG
},
744 static struct qcom_icc_node qhs_cpr_cx
= {
745 .name
= "qhs_cpr_cx",
746 .id
= SM8450_SLAVE_RBCPR_CX_CFG
,
752 static struct qcom_icc_node qhs_cpr_mmcx
= {
753 .name
= "qhs_cpr_mmcx",
754 .id
= SM8450_SLAVE_RBCPR_MMCX_CFG
,
760 static struct qcom_icc_node qhs_cpr_mxa
= {
761 .name
= "qhs_cpr_mxa",
762 .id
= SM8450_SLAVE_RBCPR_MXA_CFG
,
768 static struct qcom_icc_node qhs_cpr_mxc
= {
769 .name
= "qhs_cpr_mxc",
770 .id
= SM8450_SLAVE_RBCPR_MXC_CFG
,
776 static struct qcom_icc_node qhs_crypto0_cfg
= {
777 .name
= "qhs_crypto0_cfg",
778 .id
= SM8450_SLAVE_CRYPTO_0_CFG
,
784 static struct qcom_icc_node qhs_cx_rdpm
= {
785 .name
= "qhs_cx_rdpm",
786 .id
= SM8450_SLAVE_CX_RDPM
,
792 static struct qcom_icc_node qhs_display_cfg
= {
793 .name
= "qhs_display_cfg",
794 .id
= SM8450_SLAVE_DISPLAY_CFG
,
800 static struct qcom_icc_node qhs_gpuss_cfg
= {
801 .name
= "qhs_gpuss_cfg",
802 .id
= SM8450_SLAVE_GFX3D_CFG
,
808 static struct qcom_icc_node qhs_imem_cfg
= {
809 .name
= "qhs_imem_cfg",
810 .id
= SM8450_SLAVE_IMEM_CFG
,
816 static struct qcom_icc_node qhs_ipa
= {
818 .id
= SM8450_SLAVE_IPA_CFG
,
824 static struct qcom_icc_node qhs_ipc_router
= {
825 .name
= "qhs_ipc_router",
826 .id
= SM8450_SLAVE_IPC_ROUTER_CFG
,
832 static struct qcom_icc_node qhs_lpass_cfg
= {
833 .name
= "qhs_lpass_cfg",
834 .id
= SM8450_SLAVE_LPASS
,
838 .links
= { MASTER_CNOC_LPASS_AG_NOC
},
841 static struct qcom_icc_node qhs_mss_cfg
= {
842 .name
= "qhs_mss_cfg",
843 .id
= SM8450_SLAVE_CNOC_MSS
,
849 static struct qcom_icc_node qhs_mx_rdpm
= {
850 .name
= "qhs_mx_rdpm",
851 .id
= SM8450_SLAVE_MX_RDPM
,
857 static struct qcom_icc_node qhs_pcie0_cfg
= {
858 .name
= "qhs_pcie0_cfg",
859 .id
= SM8450_SLAVE_PCIE_0_CFG
,
865 static struct qcom_icc_node qhs_pcie1_cfg
= {
866 .name
= "qhs_pcie1_cfg",
867 .id
= SM8450_SLAVE_PCIE_1_CFG
,
873 static struct qcom_icc_node qhs_pdm
= {
875 .id
= SM8450_SLAVE_PDM
,
881 static struct qcom_icc_node qhs_pimem_cfg
= {
882 .name
= "qhs_pimem_cfg",
883 .id
= SM8450_SLAVE_PIMEM_CFG
,
889 static struct qcom_icc_node qhs_prng
= {
891 .id
= SM8450_SLAVE_PRNG
,
897 static struct qcom_icc_node qhs_qdss_cfg
= {
898 .name
= "qhs_qdss_cfg",
899 .id
= SM8450_SLAVE_QDSS_CFG
,
905 static struct qcom_icc_node qhs_qspi
= {
907 .id
= SM8450_SLAVE_QSPI_0
,
913 static struct qcom_icc_node qhs_qup0
= {
915 .id
= SM8450_SLAVE_QUP_0
,
921 static struct qcom_icc_node qhs_qup1
= {
923 .id
= SM8450_SLAVE_QUP_1
,
929 static struct qcom_icc_node qhs_qup2
= {
931 .id
= SM8450_SLAVE_QUP_2
,
937 static struct qcom_icc_node qhs_sdc2
= {
939 .id
= SM8450_SLAVE_SDCC_2
,
945 static struct qcom_icc_node qhs_sdc4
= {
947 .id
= SM8450_SLAVE_SDCC_4
,
953 static struct qcom_icc_node qhs_spss_cfg
= {
954 .name
= "qhs_spss_cfg",
955 .id
= SM8450_SLAVE_SPSS_CFG
,
961 static struct qcom_icc_node qhs_tcsr
= {
963 .id
= SM8450_SLAVE_TCSR
,
969 static struct qcom_icc_node qhs_tlmm
= {
971 .id
= SM8450_SLAVE_TLMM
,
977 static struct qcom_icc_node qhs_tme_cfg
= {
978 .name
= "qhs_tme_cfg",
979 .id
= SM8450_SLAVE_TME_CFG
,
985 static struct qcom_icc_node qhs_ufs_mem_cfg
= {
986 .name
= "qhs_ufs_mem_cfg",
987 .id
= SM8450_SLAVE_UFS_MEM_CFG
,
993 static struct qcom_icc_node qhs_usb3_0
= {
994 .name
= "qhs_usb3_0",
995 .id
= SM8450_SLAVE_USB3_0
,
1001 static struct qcom_icc_node qhs_venus_cfg
= {
1002 .name
= "qhs_venus_cfg",
1003 .id
= SM8450_SLAVE_VENUS_CFG
,
1009 static struct qcom_icc_node qhs_vsense_ctrl_cfg
= {
1010 .name
= "qhs_vsense_ctrl_cfg",
1011 .id
= SM8450_SLAVE_VSENSE_CTRL_CFG
,
1017 static struct qcom_icc_node qns_a1_noc_cfg
= {
1018 .name
= "qns_a1_noc_cfg",
1019 .id
= SM8450_SLAVE_A1NOC_CFG
,
1023 .links
= { SM8450_MASTER_A1NOC_CFG
},
1026 static struct qcom_icc_node qns_a2_noc_cfg
= {
1027 .name
= "qns_a2_noc_cfg",
1028 .id
= SM8450_SLAVE_A2NOC_CFG
,
1032 .links
= { SM8450_MASTER_A2NOC_CFG
},
1035 static struct qcom_icc_node qns_ddrss_cfg
= {
1036 .name
= "qns_ddrss_cfg",
1037 .id
= SM8450_SLAVE_DDRSS_CFG
,
1041 //FIXME where is link
1044 static struct qcom_icc_node qns_mnoc_cfg
= {
1045 .name
= "qns_mnoc_cfg",
1046 .id
= SM8450_SLAVE_CNOC_MNOC_CFG
,
1050 .links
= { SM8450_MASTER_CNOC_MNOC_CFG
},
1053 static struct qcom_icc_node qns_pcie_anoc_cfg
= {
1054 .name
= "qns_pcie_anoc_cfg",
1055 .id
= SM8450_SLAVE_PCIE_ANOC_CFG
,
1059 .links
= { SM8450_MASTER_PCIE_ANOC_CFG
},
1062 static struct qcom_icc_node qns_snoc_cfg
= {
1063 .name
= "qns_snoc_cfg",
1064 .id
= SM8450_SLAVE_SNOC_CFG
,
1068 .links
= { SM8450_MASTER_SNOC_CFG
},
1071 static struct qcom_icc_node qxs_imem
= {
1073 .id
= SM8450_SLAVE_IMEM
,
1079 static struct qcom_icc_node qxs_pimem
= {
1080 .name
= "qxs_pimem",
1081 .id
= SM8450_SLAVE_PIMEM
,
1087 static struct qcom_icc_node srvc_cnoc
= {
1088 .name
= "srvc_cnoc",
1089 .id
= SM8450_SLAVE_SERVICE_CNOC
,
1095 static struct qcom_icc_node xs_pcie_0
= {
1096 .name
= "xs_pcie_0",
1097 .id
= SM8450_SLAVE_PCIE_0
,
1103 static struct qcom_icc_node xs_pcie_1
= {
1104 .name
= "xs_pcie_1",
1105 .id
= SM8450_SLAVE_PCIE_1
,
1111 static struct qcom_icc_node xs_qdss_stm
= {
1112 .name
= "xs_qdss_stm",
1113 .id
= SM8450_SLAVE_QDSS_STM
,
1119 static struct qcom_icc_node xs_sys_tcu_cfg
= {
1120 .name
= "xs_sys_tcu_cfg",
1121 .id
= SM8450_SLAVE_TCU
,
1127 static struct qcom_icc_node qns_gem_noc_cnoc
= {
1128 .name
= "qns_gem_noc_cnoc",
1129 .id
= SM8450_SLAVE_GEM_NOC_CNOC
,
1133 .links
= { SM8450_MASTER_GEM_NOC_CNOC
},
1136 static struct qcom_icc_node qns_llcc
= {
1138 .id
= SM8450_SLAVE_LLCC
,
1142 .links
= { SM8450_MASTER_LLCC
},
1145 static struct qcom_icc_node qns_pcie
= {
1147 .id
= SM8450_SLAVE_MEM_NOC_PCIE_SNOC
,
1151 .links
= { SM8450_MASTER_GEM_NOC_PCIE_SNOC
},
1154 static struct qcom_icc_node qhs_lpass_core
= {
1155 .name
= "qhs_lpass_core",
1156 .id
= SM8450_SLAVE_LPASS_CORE_CFG
,
1162 static struct qcom_icc_node qhs_lpass_lpi
= {
1163 .name
= "qhs_lpass_lpi",
1164 .id
= SM8450_SLAVE_LPASS_LPI_CFG
,
1170 static struct qcom_icc_node qhs_lpass_mpu
= {
1171 .name
= "qhs_lpass_mpu",
1172 .id
= SM8450_SLAVE_LPASS_MPU_CFG
,
1178 static struct qcom_icc_node qhs_lpass_top
= {
1179 .name
= "qhs_lpass_top",
1180 .id
= SM8450_SLAVE_LPASS_TOP_CFG
,
1186 static struct qcom_icc_node qns_sysnoc
= {
1187 .name
= "qns_sysnoc",
1188 .id
= SM8450_SLAVE_LPASS_SNOC
,
1192 .links
= { SM8450_MASTER_LPASS_ANOC
},
1195 static struct qcom_icc_node srvc_niu_aml_noc
= {
1196 .name
= "srvc_niu_aml_noc",
1197 .id
= SM8450_SLAVE_SERVICES_LPASS_AML_NOC
,
1203 static struct qcom_icc_node srvc_niu_lpass_agnoc
= {
1204 .name
= "srvc_niu_lpass_agnoc",
1205 .id
= SM8450_SLAVE_SERVICE_LPASS_AG_NOC
,
1211 static struct qcom_icc_node ebi
= {
1213 .id
= SM8450_SLAVE_EBI1
,
1219 static struct qcom_icc_node qns_mem_noc_hf
= {
1220 .name
= "qns_mem_noc_hf",
1221 .id
= SM8450_SLAVE_MNOC_HF_MEM_NOC
,
1225 .links
= { SM8450_MASTER_MNOC_HF_MEM_NOC
},
1228 static struct qcom_icc_node qns_mem_noc_sf
= {
1229 .name
= "qns_mem_noc_sf",
1230 .id
= SM8450_SLAVE_MNOC_SF_MEM_NOC
,
1234 .links
= { SM8450_MASTER_MNOC_SF_MEM_NOC
},
1237 static struct qcom_icc_node srvc_mnoc
= {
1238 .name
= "srvc_mnoc",
1239 .id
= SM8450_SLAVE_SERVICE_MNOC
,
1245 static struct qcom_icc_node qns_nsp_gemnoc
= {
1246 .name
= "qns_nsp_gemnoc",
1247 .id
= SM8450_SLAVE_CDSP_MEM_NOC
,
1251 .links
= { SM8450_MASTER_COMPUTE_NOC
},
1254 static struct qcom_icc_node service_nsp_noc
= {
1255 .name
= "service_nsp_noc",
1256 .id
= SM8450_SLAVE_SERVICE_NSP_NOC
,
1262 static struct qcom_icc_node qns_pcie_mem_noc
= {
1263 .name
= "qns_pcie_mem_noc",
1264 .id
= SM8450_SLAVE_ANOC_PCIE_GEM_NOC
,
1268 .links
= { SM8450_MASTER_ANOC_PCIE_GEM_NOC
},
1271 static struct qcom_icc_node srvc_pcie_aggre_noc
= {
1272 .name
= "srvc_pcie_aggre_noc",
1273 .id
= SM8450_SLAVE_SERVICE_PCIE_ANOC
,
1279 static struct qcom_icc_node qns_gemnoc_gc
= {
1280 .name
= "qns_gemnoc_gc",
1281 .id
= SM8450_SLAVE_SNOC_GEM_NOC_GC
,
1285 .links
= { SM8450_MASTER_SNOC_GC_MEM_NOC
},
1288 static struct qcom_icc_node qns_gemnoc_sf
= {
1289 .name
= "qns_gemnoc_sf",
1290 .id
= SM8450_SLAVE_SNOC_GEM_NOC_SF
,
1294 .links
= { SM8450_MASTER_SNOC_SF_MEM_NOC
},
1297 static struct qcom_icc_node srvc_snoc
= {
1298 .name
= "srvc_snoc",
1299 .id
= SM8450_SLAVE_SERVICE_SNOC
,
1305 static struct qcom_icc_node qns_llcc_disp
= {
1306 .name
= "qns_llcc_disp",
1307 .id
= SM8450_SLAVE_LLCC_DISP
,
1311 .links
= { SM8450_MASTER_LLCC_DISP
},
1314 static struct qcom_icc_node ebi_disp
= {
1316 .id
= SM8450_SLAVE_EBI1_DISP
,
1322 static struct qcom_icc_node qns_mem_noc_hf_disp
= {
1323 .name
= "qns_mem_noc_hf_disp",
1324 .id
= SM8450_SLAVE_MNOC_HF_MEM_NOC_DISP
,
1328 .links
= { SM8450_MASTER_MNOC_HF_MEM_NOC_DISP
},
1331 static struct qcom_icc_node qns_mem_noc_sf_disp
= {
1332 .name
= "qns_mem_noc_sf_disp",
1333 .id
= SM8450_SLAVE_MNOC_SF_MEM_NOC_DISP
,
1337 .links
= { SM8450_MASTER_MNOC_SF_MEM_NOC_DISP
},
1340 static struct qcom_icc_bcm bcm_acv
= {
1347 static struct qcom_icc_bcm bcm_ce0
= {
1350 .nodes
= { &qxm_crypto
},
1353 static struct qcom_icc_bcm bcm_cn0
= {
1358 .nodes
= { &qnm_gemnoc_cnoc
, &qnm_gemnoc_pcie
,
1359 &qhs_ahb2phy0
, &qhs_ahb2phy1
,
1360 &qhs_aoss
, &qhs_camera_cfg
,
1361 &qhs_clk_ctl
, &qhs_compute_cfg
,
1362 &qhs_cpr_cx
, &qhs_cpr_mmcx
,
1363 &qhs_cpr_mxa
, &qhs_cpr_mxc
,
1364 &qhs_crypto0_cfg
, &qhs_cx_rdpm
,
1365 &qhs_display_cfg
, &qhs_gpuss_cfg
,
1366 &qhs_imem_cfg
, &qhs_ipa
,
1367 &qhs_ipc_router
, &qhs_lpass_cfg
,
1368 &qhs_mss_cfg
, &qhs_mx_rdpm
,
1369 &qhs_pcie0_cfg
, &qhs_pcie1_cfg
,
1370 &qhs_pdm
, &qhs_pimem_cfg
,
1371 &qhs_prng
, &qhs_qdss_cfg
,
1372 &qhs_qspi
, &qhs_qup0
,
1373 &qhs_qup1
, &qhs_qup2
,
1374 &qhs_sdc2
, &qhs_sdc4
,
1375 &qhs_spss_cfg
, &qhs_tcsr
,
1376 &qhs_tlmm
, &qhs_tme_cfg
,
1377 &qhs_ufs_mem_cfg
, &qhs_usb3_0
,
1378 &qhs_venus_cfg
, &qhs_vsense_ctrl_cfg
,
1379 &qns_a1_noc_cfg
, &qns_a2_noc_cfg
,
1380 &qns_ddrss_cfg
, &qns_mnoc_cfg
,
1381 &qns_pcie_anoc_cfg
, &qns_snoc_cfg
,
1382 &qxs_imem
, &qxs_pimem
,
1383 &srvc_cnoc
, &xs_pcie_0
,
1384 &xs_pcie_1
, &xs_qdss_stm
,
1388 static struct qcom_icc_bcm bcm_co0
= {
1392 .nodes
= { &qxm_nsp
, &qns_nsp_gemnoc
},
1395 static struct qcom_icc_bcm bcm_mc0
= {
1402 static struct qcom_icc_bcm bcm_mm0
= {
1406 .nodes
= { &qns_mem_noc_hf
},
1409 static struct qcom_icc_bcm bcm_mm1
= {
1413 .nodes
= { &qnm_camnoc_hf
, &qnm_camnoc_icp
,
1414 &qnm_camnoc_sf
, &qnm_mdp
,
1415 &qnm_mnoc_cfg
, &qnm_rot
,
1416 &qnm_vapss_hcp
, &qnm_video
,
1417 &qnm_video_cv_cpu
, &qnm_video_cvp
,
1418 &qnm_video_v_cpu
, &qns_mem_noc_sf
},
1421 static struct qcom_icc_bcm bcm_qup0
= {
1426 .nodes
= { &qup0_core_slave
},
1429 static struct qcom_icc_bcm bcm_qup1
= {
1434 .nodes
= { &qup1_core_slave
},
1437 static struct qcom_icc_bcm bcm_qup2
= {
1442 .nodes
= { &qup2_core_slave
},
1445 static struct qcom_icc_bcm bcm_sh0
= {
1449 .nodes
= { &qns_llcc
},
1452 static struct qcom_icc_bcm bcm_sh1
= {
1456 .nodes
= { &alm_gpu_tcu
, &alm_sys_tcu
,
1457 &qnm_nsp_gemnoc
, &qnm_pcie
,
1458 &qnm_snoc_gc
, &qns_gem_noc_cnoc
,
1462 static struct qcom_icc_bcm bcm_sn0
= {
1466 .nodes
= { &qns_gemnoc_sf
},
1469 static struct qcom_icc_bcm bcm_sn1
= {
1473 .nodes
= { &qhm_gic
, &qxm_pimem
,
1474 &xm_gic
, &qns_gemnoc_gc
},
1477 static struct qcom_icc_bcm bcm_sn2
= {
1480 .nodes
= { &qnm_aggre1_noc
},
1483 static struct qcom_icc_bcm bcm_sn3
= {
1486 .nodes
= { &qnm_aggre2_noc
},
1489 static struct qcom_icc_bcm bcm_sn4
= {
1492 .nodes
= { &qnm_lpass_noc
},
1495 static struct qcom_icc_bcm bcm_sn7
= {
1498 .nodes
= { &qns_pcie_mem_noc
},
1501 static struct qcom_icc_bcm bcm_acv_disp
= {
1505 .nodes
= { &ebi_disp
},
1508 static struct qcom_icc_bcm bcm_mc0_disp
= {
1511 .nodes
= { &ebi_disp
},
1514 static struct qcom_icc_bcm bcm_mm0_disp
= {
1517 .nodes
= { &qns_mem_noc_hf_disp
},
1520 static struct qcom_icc_bcm bcm_mm1_disp
= {
1524 .nodes
= { &qnm_mdp_disp
, &qnm_rot_disp
,
1525 &qns_mem_noc_sf_disp
},
1528 static struct qcom_icc_bcm bcm_sh0_disp
= {
1531 .nodes
= { &qns_llcc_disp
},
1534 static struct qcom_icc_bcm bcm_sh1_disp
= {
1538 .nodes
= { &qnm_pcie_disp
},
1541 static struct qcom_icc_bcm
* const aggre1_noc_bcms
[] = {
1544 static struct qcom_icc_node
* const aggre1_noc_nodes
[] = {
1545 [MASTER_QSPI_0
] = &qhm_qspi
,
1546 [MASTER_QUP_1
] = &qhm_qup1
,
1547 [MASTER_A1NOC_CFG
] = &qnm_a1noc_cfg
,
1548 [MASTER_SDCC_4
] = &xm_sdc4
,
1549 [MASTER_UFS_MEM
] = &xm_ufs_mem
,
1550 [MASTER_USB3_0
] = &xm_usb3_0
,
1551 [SLAVE_A1NOC_SNOC
] = &qns_a1noc_snoc
,
1552 [SLAVE_SERVICE_A1NOC
] = &srvc_aggre1_noc
,
1555 static const struct qcom_icc_desc sm8450_aggre1_noc
= {
1556 .nodes
= aggre1_noc_nodes
,
1557 .num_nodes
= ARRAY_SIZE(aggre1_noc_nodes
),
1558 .bcms
= aggre1_noc_bcms
,
1559 .num_bcms
= ARRAY_SIZE(aggre1_noc_bcms
),
1562 static struct qcom_icc_bcm
* const aggre2_noc_bcms
[] = {
1566 static struct qcom_icc_node
* const aggre2_noc_nodes
[] = {
1567 [MASTER_QDSS_BAM
] = &qhm_qdss_bam
,
1568 [MASTER_QUP_0
] = &qhm_qup0
,
1569 [MASTER_QUP_2
] = &qhm_qup2
,
1570 [MASTER_A2NOC_CFG
] = &qnm_a2noc_cfg
,
1571 [MASTER_CRYPTO
] = &qxm_crypto
,
1572 [MASTER_IPA
] = &qxm_ipa
,
1573 [MASTER_SENSORS_PROC
] = &qxm_sensorss_q6
,
1574 [MASTER_SP
] = &qxm_sp
,
1575 [MASTER_QDSS_ETR
] = &xm_qdss_etr_0
,
1576 [MASTER_QDSS_ETR_1
] = &xm_qdss_etr_1
,
1577 [MASTER_SDCC_2
] = &xm_sdc2
,
1578 [SLAVE_A2NOC_SNOC
] = &qns_a2noc_snoc
,
1579 [SLAVE_SERVICE_A2NOC
] = &srvc_aggre2_noc
,
1582 static const struct qcom_icc_desc sm8450_aggre2_noc
= {
1583 .nodes
= aggre2_noc_nodes
,
1584 .num_nodes
= ARRAY_SIZE(aggre2_noc_nodes
),
1585 .bcms
= aggre2_noc_bcms
,
1586 .num_bcms
= ARRAY_SIZE(aggre2_noc_bcms
),
1589 static struct qcom_icc_bcm
* const clk_virt_bcms
[] = {
1595 static struct qcom_icc_node
* const clk_virt_nodes
[] = {
1596 [MASTER_QUP_CORE_0
] = &qup0_core_master
,
1597 [MASTER_QUP_CORE_1
] = &qup1_core_master
,
1598 [MASTER_QUP_CORE_2
] = &qup2_core_master
,
1599 [SLAVE_QUP_CORE_0
] = &qup0_core_slave
,
1600 [SLAVE_QUP_CORE_1
] = &qup1_core_slave
,
1601 [SLAVE_QUP_CORE_2
] = &qup2_core_slave
,
1604 static const struct qcom_icc_desc sm8450_clk_virt
= {
1605 .nodes
= clk_virt_nodes
,
1606 .num_nodes
= ARRAY_SIZE(clk_virt_nodes
),
1607 .bcms
= clk_virt_bcms
,
1608 .num_bcms
= ARRAY_SIZE(clk_virt_bcms
),
1611 static struct qcom_icc_bcm
* const config_noc_bcms
[] = {
1615 static struct qcom_icc_node
* const config_noc_nodes
[] = {
1616 [MASTER_GEM_NOC_CNOC
] = &qnm_gemnoc_cnoc
,
1617 [MASTER_GEM_NOC_PCIE_SNOC
] = &qnm_gemnoc_pcie
,
1618 [SLAVE_AHB2PHY_SOUTH
] = &qhs_ahb2phy0
,
1619 [SLAVE_AHB2PHY_NORTH
] = &qhs_ahb2phy1
,
1620 [SLAVE_AOSS
] = &qhs_aoss
,
1621 [SLAVE_CAMERA_CFG
] = &qhs_camera_cfg
,
1622 [SLAVE_CLK_CTL
] = &qhs_clk_ctl
,
1623 [SLAVE_CDSP_CFG
] = &qhs_compute_cfg
,
1624 [SLAVE_RBCPR_CX_CFG
] = &qhs_cpr_cx
,
1625 [SLAVE_RBCPR_MMCX_CFG
] = &qhs_cpr_mmcx
,
1626 [SLAVE_RBCPR_MXA_CFG
] = &qhs_cpr_mxa
,
1627 [SLAVE_RBCPR_MXC_CFG
] = &qhs_cpr_mxc
,
1628 [SLAVE_CRYPTO_0_CFG
] = &qhs_crypto0_cfg
,
1629 [SLAVE_CX_RDPM
] = &qhs_cx_rdpm
,
1630 [SLAVE_DISPLAY_CFG
] = &qhs_display_cfg
,
1631 [SLAVE_GFX3D_CFG
] = &qhs_gpuss_cfg
,
1632 [SLAVE_IMEM_CFG
] = &qhs_imem_cfg
,
1633 [SLAVE_IPA_CFG
] = &qhs_ipa
,
1634 [SLAVE_IPC_ROUTER_CFG
] = &qhs_ipc_router
,
1635 [SLAVE_LPASS
] = &qhs_lpass_cfg
,
1636 [SLAVE_CNOC_MSS
] = &qhs_mss_cfg
,
1637 [SLAVE_MX_RDPM
] = &qhs_mx_rdpm
,
1638 [SLAVE_PCIE_0_CFG
] = &qhs_pcie0_cfg
,
1639 [SLAVE_PCIE_1_CFG
] = &qhs_pcie1_cfg
,
1640 [SLAVE_PDM
] = &qhs_pdm
,
1641 [SLAVE_PIMEM_CFG
] = &qhs_pimem_cfg
,
1642 [SLAVE_PRNG
] = &qhs_prng
,
1643 [SLAVE_QDSS_CFG
] = &qhs_qdss_cfg
,
1644 [SLAVE_QSPI_0
] = &qhs_qspi
,
1645 [SLAVE_QUP_0
] = &qhs_qup0
,
1646 [SLAVE_QUP_1
] = &qhs_qup1
,
1647 [SLAVE_QUP_2
] = &qhs_qup2
,
1648 [SLAVE_SDCC_2
] = &qhs_sdc2
,
1649 [SLAVE_SDCC_4
] = &qhs_sdc4
,
1650 [SLAVE_SPSS_CFG
] = &qhs_spss_cfg
,
1651 [SLAVE_TCSR
] = &qhs_tcsr
,
1652 [SLAVE_TLMM
] = &qhs_tlmm
,
1653 [SLAVE_TME_CFG
] = &qhs_tme_cfg
,
1654 [SLAVE_UFS_MEM_CFG
] = &qhs_ufs_mem_cfg
,
1655 [SLAVE_USB3_0
] = &qhs_usb3_0
,
1656 [SLAVE_VENUS_CFG
] = &qhs_venus_cfg
,
1657 [SLAVE_VSENSE_CTRL_CFG
] = &qhs_vsense_ctrl_cfg
,
1658 [SLAVE_A1NOC_CFG
] = &qns_a1_noc_cfg
,
1659 [SLAVE_A2NOC_CFG
] = &qns_a2_noc_cfg
,
1660 [SLAVE_DDRSS_CFG
] = &qns_ddrss_cfg
,
1661 [SLAVE_CNOC_MNOC_CFG
] = &qns_mnoc_cfg
,
1662 [SLAVE_PCIE_ANOC_CFG
] = &qns_pcie_anoc_cfg
,
1663 [SLAVE_SNOC_CFG
] = &qns_snoc_cfg
,
1664 [SLAVE_IMEM
] = &qxs_imem
,
1665 [SLAVE_PIMEM
] = &qxs_pimem
,
1666 [SLAVE_SERVICE_CNOC
] = &srvc_cnoc
,
1667 [SLAVE_PCIE_0
] = &xs_pcie_0
,
1668 [SLAVE_PCIE_1
] = &xs_pcie_1
,
1669 [SLAVE_QDSS_STM
] = &xs_qdss_stm
,
1670 [SLAVE_TCU
] = &xs_sys_tcu_cfg
,
1673 static const struct qcom_icc_desc sm8450_config_noc
= {
1674 .nodes
= config_noc_nodes
,
1675 .num_nodes
= ARRAY_SIZE(config_noc_nodes
),
1676 .bcms
= config_noc_bcms
,
1677 .num_bcms
= ARRAY_SIZE(config_noc_bcms
),
1680 static struct qcom_icc_bcm
* const gem_noc_bcms
[] = {
1687 static struct qcom_icc_node
* const gem_noc_nodes
[] = {
1688 [MASTER_GPU_TCU
] = &alm_gpu_tcu
,
1689 [MASTER_SYS_TCU
] = &alm_sys_tcu
,
1690 [MASTER_APPSS_PROC
] = &chm_apps
,
1691 [MASTER_GFX3D
] = &qnm_gpu
,
1692 [MASTER_MSS_PROC
] = &qnm_mdsp
,
1693 [MASTER_MNOC_HF_MEM_NOC
] = &qnm_mnoc_hf
,
1694 [MASTER_MNOC_SF_MEM_NOC
] = &qnm_mnoc_sf
,
1695 [MASTER_COMPUTE_NOC
] = &qnm_nsp_gemnoc
,
1696 [MASTER_ANOC_PCIE_GEM_NOC
] = &qnm_pcie
,
1697 [MASTER_SNOC_GC_MEM_NOC
] = &qnm_snoc_gc
,
1698 [MASTER_SNOC_SF_MEM_NOC
] = &qnm_snoc_sf
,
1699 [SLAVE_GEM_NOC_CNOC
] = &qns_gem_noc_cnoc
,
1700 [SLAVE_LLCC
] = &qns_llcc
,
1701 [SLAVE_MEM_NOC_PCIE_SNOC
] = &qns_pcie
,
1702 [MASTER_MNOC_HF_MEM_NOC_DISP
] = &qnm_mnoc_hf_disp
,
1703 [MASTER_MNOC_SF_MEM_NOC_DISP
] = &qnm_mnoc_sf_disp
,
1704 [MASTER_ANOC_PCIE_GEM_NOC_DISP
] = &qnm_pcie_disp
,
1705 [SLAVE_LLCC_DISP
] = &qns_llcc_disp
,
1708 static const struct qcom_icc_desc sm8450_gem_noc
= {
1709 .nodes
= gem_noc_nodes
,
1710 .num_nodes
= ARRAY_SIZE(gem_noc_nodes
),
1711 .bcms
= gem_noc_bcms
,
1712 .num_bcms
= ARRAY_SIZE(gem_noc_bcms
),
1715 static struct qcom_icc_bcm
* const lpass_ag_noc_bcms
[] = {
1718 static struct qcom_icc_node
* const lpass_ag_noc_nodes
[] = {
1719 [MASTER_CNOC_LPASS_AG_NOC
] = &qhm_config_noc
,
1720 [MASTER_LPASS_PROC
] = &qxm_lpass_dsp
,
1721 [SLAVE_LPASS_CORE_CFG
] = &qhs_lpass_core
,
1722 [SLAVE_LPASS_LPI_CFG
] = &qhs_lpass_lpi
,
1723 [SLAVE_LPASS_MPU_CFG
] = &qhs_lpass_mpu
,
1724 [SLAVE_LPASS_TOP_CFG
] = &qhs_lpass_top
,
1725 [SLAVE_LPASS_SNOC
] = &qns_sysnoc
,
1726 [SLAVE_SERVICES_LPASS_AML_NOC
] = &srvc_niu_aml_noc
,
1727 [SLAVE_SERVICE_LPASS_AG_NOC
] = &srvc_niu_lpass_agnoc
,
1730 static const struct qcom_icc_desc sm8450_lpass_ag_noc
= {
1731 .nodes
= lpass_ag_noc_nodes
,
1732 .num_nodes
= ARRAY_SIZE(lpass_ag_noc_nodes
),
1733 .bcms
= lpass_ag_noc_bcms
,
1734 .num_bcms
= ARRAY_SIZE(lpass_ag_noc_bcms
),
1737 static struct qcom_icc_bcm
* const mc_virt_bcms
[] = {
1744 static struct qcom_icc_node
* const mc_virt_nodes
[] = {
1745 [MASTER_LLCC
] = &llcc_mc
,
1746 [SLAVE_EBI1
] = &ebi
,
1747 [MASTER_LLCC_DISP
] = &llcc_mc_disp
,
1748 [SLAVE_EBI1_DISP
] = &ebi_disp
,
1751 static const struct qcom_icc_desc sm8450_mc_virt
= {
1752 .nodes
= mc_virt_nodes
,
1753 .num_nodes
= ARRAY_SIZE(mc_virt_nodes
),
1754 .bcms
= mc_virt_bcms
,
1755 .num_bcms
= ARRAY_SIZE(mc_virt_bcms
),
1758 static struct qcom_icc_bcm
* const mmss_noc_bcms
[] = {
1765 static struct qcom_icc_node
* const mmss_noc_nodes
[] = {
1766 [MASTER_CAMNOC_HF
] = &qnm_camnoc_hf
,
1767 [MASTER_CAMNOC_ICP
] = &qnm_camnoc_icp
,
1768 [MASTER_CAMNOC_SF
] = &qnm_camnoc_sf
,
1769 [MASTER_MDP
] = &qnm_mdp
,
1770 [MASTER_CNOC_MNOC_CFG
] = &qnm_mnoc_cfg
,
1771 [MASTER_ROTATOR
] = &qnm_rot
,
1772 [MASTER_CDSP_HCP
] = &qnm_vapss_hcp
,
1773 [MASTER_VIDEO
] = &qnm_video
,
1774 [MASTER_VIDEO_CV_PROC
] = &qnm_video_cv_cpu
,
1775 [MASTER_VIDEO_PROC
] = &qnm_video_cvp
,
1776 [MASTER_VIDEO_V_PROC
] = &qnm_video_v_cpu
,
1777 [SLAVE_MNOC_HF_MEM_NOC
] = &qns_mem_noc_hf
,
1778 [SLAVE_MNOC_SF_MEM_NOC
] = &qns_mem_noc_sf
,
1779 [SLAVE_SERVICE_MNOC
] = &srvc_mnoc
,
1780 [MASTER_MDP_DISP
] = &qnm_mdp_disp
,
1781 [MASTER_ROTATOR_DISP
] = &qnm_rot_disp
,
1782 [SLAVE_MNOC_HF_MEM_NOC_DISP
] = &qns_mem_noc_hf_disp
,
1783 [SLAVE_MNOC_SF_MEM_NOC_DISP
] = &qns_mem_noc_sf_disp
,
1786 static const struct qcom_icc_desc sm8450_mmss_noc
= {
1787 .nodes
= mmss_noc_nodes
,
1788 .num_nodes
= ARRAY_SIZE(mmss_noc_nodes
),
1789 .bcms
= mmss_noc_bcms
,
1790 .num_bcms
= ARRAY_SIZE(mmss_noc_bcms
),
1793 static struct qcom_icc_bcm
* const nsp_noc_bcms
[] = {
1797 static struct qcom_icc_node
* const nsp_noc_nodes
[] = {
1798 [MASTER_CDSP_NOC_CFG
] = &qhm_nsp_noc_config
,
1799 [MASTER_CDSP_PROC
] = &qxm_nsp
,
1800 [SLAVE_CDSP_MEM_NOC
] = &qns_nsp_gemnoc
,
1801 [SLAVE_SERVICE_NSP_NOC
] = &service_nsp_noc
,
1804 static const struct qcom_icc_desc sm8450_nsp_noc
= {
1805 .nodes
= nsp_noc_nodes
,
1806 .num_nodes
= ARRAY_SIZE(nsp_noc_nodes
),
1807 .bcms
= nsp_noc_bcms
,
1808 .num_bcms
= ARRAY_SIZE(nsp_noc_bcms
),
1811 static struct qcom_icc_bcm
* const pcie_anoc_bcms
[] = {
1815 static struct qcom_icc_node
* const pcie_anoc_nodes
[] = {
1816 [MASTER_PCIE_ANOC_CFG
] = &qnm_pcie_anoc_cfg
,
1817 [MASTER_PCIE_0
] = &xm_pcie3_0
,
1818 [MASTER_PCIE_1
] = &xm_pcie3_1
,
1819 [SLAVE_ANOC_PCIE_GEM_NOC
] = &qns_pcie_mem_noc
,
1820 [SLAVE_SERVICE_PCIE_ANOC
] = &srvc_pcie_aggre_noc
,
1823 static const struct qcom_icc_desc sm8450_pcie_anoc
= {
1824 .nodes
= pcie_anoc_nodes
,
1825 .num_nodes
= ARRAY_SIZE(pcie_anoc_nodes
),
1826 .bcms
= pcie_anoc_bcms
,
1827 .num_bcms
= ARRAY_SIZE(pcie_anoc_bcms
),
1830 static struct qcom_icc_bcm
* const system_noc_bcms
[] = {
1838 static struct qcom_icc_node
* const system_noc_nodes
[] = {
1839 [MASTER_GIC_AHB
] = &qhm_gic
,
1840 [MASTER_A1NOC_SNOC
] = &qnm_aggre1_noc
,
1841 [MASTER_A2NOC_SNOC
] = &qnm_aggre2_noc
,
1842 [MASTER_LPASS_ANOC
] = &qnm_lpass_noc
,
1843 [MASTER_SNOC_CFG
] = &qnm_snoc_cfg
,
1844 [MASTER_PIMEM
] = &qxm_pimem
,
1845 [MASTER_GIC
] = &xm_gic
,
1846 [SLAVE_SNOC_GEM_NOC_GC
] = &qns_gemnoc_gc
,
1847 [SLAVE_SNOC_GEM_NOC_SF
] = &qns_gemnoc_sf
,
1848 [SLAVE_SERVICE_SNOC
] = &srvc_snoc
,
1851 static const struct qcom_icc_desc sm8450_system_noc
= {
1852 .nodes
= system_noc_nodes
,
1853 .num_nodes
= ARRAY_SIZE(system_noc_nodes
),
1854 .bcms
= system_noc_bcms
,
1855 .num_bcms
= ARRAY_SIZE(system_noc_bcms
),
1858 static const struct of_device_id qnoc_of_match
[] = {
1859 { .compatible
= "qcom,sm8450-aggre1-noc",
1860 .data
= &sm8450_aggre1_noc
},
1861 { .compatible
= "qcom,sm8450-aggre2-noc",
1862 .data
= &sm8450_aggre2_noc
},
1863 { .compatible
= "qcom,sm8450-clk-virt",
1864 .data
= &sm8450_clk_virt
},
1865 { .compatible
= "qcom,sm8450-config-noc",
1866 .data
= &sm8450_config_noc
},
1867 { .compatible
= "qcom,sm8450-gem-noc",
1868 .data
= &sm8450_gem_noc
},
1869 { .compatible
= "qcom,sm8450-lpass-ag-noc",
1870 .data
= &sm8450_lpass_ag_noc
},
1871 { .compatible
= "qcom,sm8450-mc-virt",
1872 .data
= &sm8450_mc_virt
},
1873 { .compatible
= "qcom,sm8450-mmss-noc",
1874 .data
= &sm8450_mmss_noc
},
1875 { .compatible
= "qcom,sm8450-nsp-noc",
1876 .data
= &sm8450_nsp_noc
},
1877 { .compatible
= "qcom,sm8450-pcie-anoc",
1878 .data
= &sm8450_pcie_anoc
},
1879 { .compatible
= "qcom,sm8450-system-noc",
1880 .data
= &sm8450_system_noc
},
1883 MODULE_DEVICE_TABLE(of
, qnoc_of_match
);
1885 static struct platform_driver qnoc_driver
= {
1886 .probe
= qcom_icc_rpmh_probe
,
1887 .remove
= qcom_icc_rpmh_remove
,
1889 .name
= "qnoc-sm8450",
1890 .of_match_table
= qnoc_of_match
,
1891 .sync_state
= icc_sync_state
,
1895 static int __init
qnoc_driver_init(void)
1897 return platform_driver_register(&qnoc_driver
);
1899 core_initcall(qnoc_driver_init
);
1901 static void __exit
qnoc_driver_exit(void)
1903 platform_driver_unregister(&qnoc_driver
);
1905 module_exit(qnoc_driver_exit
);
1907 MODULE_DESCRIPTION("sm8450 NoC driver");
1908 MODULE_LICENSE("GPL v2");