0001
0002
0003
0004
0005
0006
0007 #include <linux/device.h>
0008 #include <linux/interconnect.h>
0009 #include <linux/interconnect-provider.h>
0010 #include <linux/module.h>
0011 #include <linux/of_platform.h>
0012 #include <dt-bindings/interconnect/qcom,sm8450.h>
0013
0014 #include "bcm-voter.h"
0015 #include "icc-common.h"
0016 #include "icc-rpmh.h"
0017 #include "sm8450.h"
0018
0019 static struct qcom_icc_node qhm_qspi = {
0020 .name = "qhm_qspi",
0021 .id = SM8450_MASTER_QSPI_0,
0022 .channels = 1,
0023 .buswidth = 4,
0024 .num_links = 1,
0025 .links = { SM8450_SLAVE_A1NOC_SNOC },
0026 };
0027
0028 static struct qcom_icc_node qhm_qup1 = {
0029 .name = "qhm_qup1",
0030 .id = SM8450_MASTER_QUP_1,
0031 .channels = 1,
0032 .buswidth = 4,
0033 .num_links = 1,
0034 .links = { SM8450_SLAVE_A1NOC_SNOC },
0035 };
0036
0037 static struct qcom_icc_node qnm_a1noc_cfg = {
0038 .name = "qnm_a1noc_cfg",
0039 .id = SM8450_MASTER_A1NOC_CFG,
0040 .channels = 1,
0041 .buswidth = 4,
0042 .num_links = 1,
0043 .links = { SM8450_SLAVE_SERVICE_A1NOC },
0044 };
0045
0046 static struct qcom_icc_node xm_sdc4 = {
0047 .name = "xm_sdc4",
0048 .id = SM8450_MASTER_SDCC_4,
0049 .channels = 1,
0050 .buswidth = 8,
0051 .num_links = 1,
0052 .links = { SM8450_SLAVE_A1NOC_SNOC },
0053 };
0054
0055 static struct qcom_icc_node xm_ufs_mem = {
0056 .name = "xm_ufs_mem",
0057 .id = SM8450_MASTER_UFS_MEM,
0058 .channels = 1,
0059 .buswidth = 8,
0060 .num_links = 1,
0061 .links = { SM8450_SLAVE_A1NOC_SNOC },
0062 };
0063
0064 static struct qcom_icc_node xm_usb3_0 = {
0065 .name = "xm_usb3_0",
0066 .id = SM8450_MASTER_USB3_0,
0067 .channels = 1,
0068 .buswidth = 8,
0069 .num_links = 1,
0070 .links = { SM8450_SLAVE_A1NOC_SNOC },
0071 };
0072
0073 static struct qcom_icc_node qhm_qdss_bam = {
0074 .name = "qhm_qdss_bam",
0075 .id = SM8450_MASTER_QDSS_BAM,
0076 .channels = 1,
0077 .buswidth = 4,
0078 .num_links = 1,
0079 .links = { SM8450_SLAVE_A2NOC_SNOC },
0080 };
0081
0082 static struct qcom_icc_node qhm_qup0 = {
0083 .name = "qhm_qup0",
0084 .id = SM8450_MASTER_QUP_0,
0085 .channels = 1,
0086 .buswidth = 4,
0087 .num_links = 1,
0088 .links = { SM8450_SLAVE_A2NOC_SNOC },
0089 };
0090
0091 static struct qcom_icc_node qhm_qup2 = {
0092 .name = "qhm_qup2",
0093 .id = SM8450_MASTER_QUP_2,
0094 .channels = 1,
0095 .buswidth = 4,
0096 .num_links = 1,
0097 .links = { SM8450_SLAVE_A2NOC_SNOC },
0098 };
0099
0100 static struct qcom_icc_node qnm_a2noc_cfg = {
0101 .name = "qnm_a2noc_cfg",
0102 .id = SM8450_MASTER_A2NOC_CFG,
0103 .channels = 1,
0104 .buswidth = 4,
0105 .num_links = 1,
0106 .links = { SM8450_SLAVE_SERVICE_A2NOC },
0107 };
0108
0109 static struct qcom_icc_node qxm_crypto = {
0110 .name = "qxm_crypto",
0111 .id = SM8450_MASTER_CRYPTO,
0112 .channels = 1,
0113 .buswidth = 8,
0114 .num_links = 1,
0115 .links = { SM8450_SLAVE_A2NOC_SNOC },
0116 };
0117
0118 static struct qcom_icc_node qxm_ipa = {
0119 .name = "qxm_ipa",
0120 .id = SM8450_MASTER_IPA,
0121 .channels = 1,
0122 .buswidth = 8,
0123 .num_links = 1,
0124 .links = { SM8450_SLAVE_A2NOC_SNOC },
0125 };
0126
0127 static struct qcom_icc_node qxm_sensorss_q6 = {
0128 .name = "qxm_sensorss_q6",
0129 .id = SM8450_MASTER_SENSORS_PROC,
0130 .channels = 1,
0131 .buswidth = 8,
0132 .num_links = 1,
0133 .links = { SM8450_SLAVE_A2NOC_SNOC },
0134 };
0135
0136 static struct qcom_icc_node qxm_sp = {
0137 .name = "qxm_sp",
0138 .id = SM8450_MASTER_SP,
0139 .channels = 1,
0140 .buswidth = 8,
0141 .num_links = 1,
0142 .links = { SM8450_SLAVE_A2NOC_SNOC },
0143 };
0144
0145 static struct qcom_icc_node xm_qdss_etr_0 = {
0146 .name = "xm_qdss_etr_0",
0147 .id = SM8450_MASTER_QDSS_ETR,
0148 .channels = 1,
0149 .buswidth = 8,
0150 .num_links = 1,
0151 .links = { SM8450_SLAVE_A2NOC_SNOC },
0152 };
0153
0154 static struct qcom_icc_node xm_qdss_etr_1 = {
0155 .name = "xm_qdss_etr_1",
0156 .id = SM8450_MASTER_QDSS_ETR_1,
0157 .channels = 1,
0158 .buswidth = 8,
0159 .num_links = 1,
0160 .links = { SM8450_SLAVE_A2NOC_SNOC },
0161 };
0162
0163 static struct qcom_icc_node xm_sdc2 = {
0164 .name = "xm_sdc2",
0165 .id = SM8450_MASTER_SDCC_2,
0166 .channels = 1,
0167 .buswidth = 8,
0168 .num_links = 1,
0169 .links = { SM8450_SLAVE_A2NOC_SNOC },
0170 };
0171
0172 static struct qcom_icc_node qup0_core_master = {
0173 .name = "qup0_core_master",
0174 .id = SM8450_MASTER_QUP_CORE_0,
0175 .channels = 1,
0176 .buswidth = 4,
0177 .num_links = 1,
0178 .links = { SM8450_SLAVE_QUP_CORE_0 },
0179 };
0180
0181 static struct qcom_icc_node qup1_core_master = {
0182 .name = "qup1_core_master",
0183 .id = SM8450_MASTER_QUP_CORE_1,
0184 .channels = 1,
0185 .buswidth = 4,
0186 .num_links = 1,
0187 .links = { SM8450_SLAVE_QUP_CORE_1 },
0188 };
0189
0190 static struct qcom_icc_node qup2_core_master = {
0191 .name = "qup2_core_master",
0192 .id = SM8450_MASTER_QUP_CORE_2,
0193 .channels = 1,
0194 .buswidth = 4,
0195 .num_links = 1,
0196 .links = { SM8450_SLAVE_QUP_CORE_2 },
0197 };
0198
0199 static struct qcom_icc_node qnm_gemnoc_cnoc = {
0200 .name = "qnm_gemnoc_cnoc",
0201 .id = SM8450_MASTER_GEM_NOC_CNOC,
0202 .channels = 1,
0203 .buswidth = 16,
0204 .num_links = 51,
0205 .links = { SM8450_SLAVE_AHB2PHY_SOUTH, SM8450_SLAVE_AHB2PHY_NORTH,
0206 SM8450_SLAVE_AOSS, SM8450_SLAVE_CAMERA_CFG,
0207 SM8450_SLAVE_CLK_CTL, SM8450_SLAVE_CDSP_CFG,
0208 SM8450_SLAVE_RBCPR_CX_CFG, SM8450_SLAVE_RBCPR_MMCX_CFG,
0209 SM8450_SLAVE_RBCPR_MXA_CFG, SM8450_SLAVE_RBCPR_MXC_CFG,
0210 SM8450_SLAVE_CRYPTO_0_CFG, SM8450_SLAVE_CX_RDPM,
0211 SM8450_SLAVE_DISPLAY_CFG, SM8450_SLAVE_GFX3D_CFG,
0212 SM8450_SLAVE_IMEM_CFG, SM8450_SLAVE_IPA_CFG,
0213 SM8450_SLAVE_IPC_ROUTER_CFG, SM8450_SLAVE_LPASS,
0214 SM8450_SLAVE_CNOC_MSS, SM8450_SLAVE_MX_RDPM,
0215 SM8450_SLAVE_PCIE_0_CFG, SM8450_SLAVE_PCIE_1_CFG,
0216 SM8450_SLAVE_PDM, SM8450_SLAVE_PIMEM_CFG,
0217 SM8450_SLAVE_PRNG, SM8450_SLAVE_QDSS_CFG,
0218 SM8450_SLAVE_QSPI_0, SM8450_SLAVE_QUP_0,
0219 SM8450_SLAVE_QUP_1, SM8450_SLAVE_QUP_2,
0220 SM8450_SLAVE_SDCC_2, SM8450_SLAVE_SDCC_4,
0221 SM8450_SLAVE_SPSS_CFG, SM8450_SLAVE_TCSR,
0222 SM8450_SLAVE_TLMM, SM8450_SLAVE_TME_CFG,
0223 SM8450_SLAVE_UFS_MEM_CFG, SM8450_SLAVE_USB3_0,
0224 SM8450_SLAVE_VENUS_CFG, SM8450_SLAVE_VSENSE_CTRL_CFG,
0225 SM8450_SLAVE_A1NOC_CFG, SM8450_SLAVE_A2NOC_CFG,
0226 SM8450_SLAVE_DDRSS_CFG, SM8450_SLAVE_CNOC_MNOC_CFG,
0227 SM8450_SLAVE_PCIE_ANOC_CFG, SM8450_SLAVE_SNOC_CFG,
0228 SM8450_SLAVE_IMEM, SM8450_SLAVE_PIMEM,
0229 SM8450_SLAVE_SERVICE_CNOC, SM8450_SLAVE_QDSS_STM,
0230 SM8450_SLAVE_TCU },
0231 };
0232
0233 static struct qcom_icc_node qnm_gemnoc_pcie = {
0234 .name = "qnm_gemnoc_pcie",
0235 .id = SM8450_MASTER_GEM_NOC_PCIE_SNOC,
0236 .channels = 1,
0237 .buswidth = 8,
0238 .num_links = 2,
0239 .links = { SM8450_SLAVE_PCIE_0, SM8450_SLAVE_PCIE_1 },
0240 };
0241
0242 static struct qcom_icc_node alm_gpu_tcu = {
0243 .name = "alm_gpu_tcu",
0244 .id = SM8450_MASTER_GPU_TCU,
0245 .channels = 1,
0246 .buswidth = 8,
0247 .num_links = 2,
0248 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0249 };
0250
0251 static struct qcom_icc_node alm_sys_tcu = {
0252 .name = "alm_sys_tcu",
0253 .id = SM8450_MASTER_SYS_TCU,
0254 .channels = 1,
0255 .buswidth = 8,
0256 .num_links = 2,
0257 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0258 };
0259
0260 static struct qcom_icc_node chm_apps = {
0261 .name = "chm_apps",
0262 .id = SM8450_MASTER_APPSS_PROC,
0263 .channels = 3,
0264 .buswidth = 32,
0265 .num_links = 3,
0266 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC,
0267 SM8450_SLAVE_MEM_NOC_PCIE_SNOC },
0268 };
0269
0270 static struct qcom_icc_node qnm_gpu = {
0271 .name = "qnm_gpu",
0272 .id = SM8450_MASTER_GFX3D,
0273 .channels = 2,
0274 .buswidth = 32,
0275 .num_links = 2,
0276 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0277 };
0278
0279 static struct qcom_icc_node qnm_mdsp = {
0280 .name = "qnm_mdsp",
0281 .id = SM8450_MASTER_MSS_PROC,
0282 .channels = 1,
0283 .buswidth = 16,
0284 .num_links = 3,
0285 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC,
0286 SM8450_SLAVE_MEM_NOC_PCIE_SNOC },
0287 };
0288
0289 static struct qcom_icc_node qnm_mnoc_hf = {
0290 .name = "qnm_mnoc_hf",
0291 .id = SM8450_MASTER_MNOC_HF_MEM_NOC,
0292 .channels = 2,
0293 .buswidth = 32,
0294 .num_links = 1,
0295 .links = { SM8450_SLAVE_LLCC },
0296 };
0297
0298 static struct qcom_icc_node qnm_mnoc_sf = {
0299 .name = "qnm_mnoc_sf",
0300 .id = SM8450_MASTER_MNOC_SF_MEM_NOC,
0301 .channels = 2,
0302 .buswidth = 32,
0303 .num_links = 2,
0304 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0305 };
0306
0307 static struct qcom_icc_node qnm_nsp_gemnoc = {
0308 .name = "qnm_nsp_gemnoc",
0309 .id = SM8450_MASTER_COMPUTE_NOC,
0310 .channels = 2,
0311 .buswidth = 32,
0312 .num_links = 2,
0313 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0314 };
0315
0316 static struct qcom_icc_node qnm_pcie = {
0317 .name = "qnm_pcie",
0318 .id = SM8450_MASTER_ANOC_PCIE_GEM_NOC,
0319 .channels = 1,
0320 .buswidth = 16,
0321 .num_links = 2,
0322 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC },
0323 };
0324
0325 static struct qcom_icc_node qnm_snoc_gc = {
0326 .name = "qnm_snoc_gc",
0327 .id = SM8450_MASTER_SNOC_GC_MEM_NOC,
0328 .channels = 1,
0329 .buswidth = 8,
0330 .num_links = 1,
0331 .links = { SM8450_SLAVE_LLCC },
0332 };
0333
0334 static struct qcom_icc_node qnm_snoc_sf = {
0335 .name = "qnm_snoc_sf",
0336 .id = SM8450_MASTER_SNOC_SF_MEM_NOC,
0337 .channels = 1,
0338 .buswidth = 16,
0339 .num_links = 3,
0340 .links = { SM8450_SLAVE_GEM_NOC_CNOC, SM8450_SLAVE_LLCC,
0341 SM8450_SLAVE_MEM_NOC_PCIE_SNOC },
0342 };
0343
0344 static struct qcom_icc_node qhm_config_noc = {
0345 .name = "qhm_config_noc",
0346 .id = SM8450_MASTER_CNOC_LPASS_AG_NOC,
0347 .channels = 1,
0348 .buswidth = 4,
0349 .num_links = 6,
0350 .links = { SM8450_SLAVE_LPASS_CORE_CFG, SM8450_SLAVE_LPASS_LPI_CFG,
0351 SM8450_SLAVE_LPASS_MPU_CFG, SM8450_SLAVE_LPASS_TOP_CFG,
0352 SM8450_SLAVE_SERVICES_LPASS_AML_NOC, SM8450_SLAVE_SERVICE_LPASS_AG_NOC },
0353 };
0354
0355 static struct qcom_icc_node qxm_lpass_dsp = {
0356 .name = "qxm_lpass_dsp",
0357 .id = SM8450_MASTER_LPASS_PROC,
0358 .channels = 1,
0359 .buswidth = 8,
0360 .num_links = 4,
0361 .links = { SM8450_SLAVE_LPASS_TOP_CFG, SM8450_SLAVE_LPASS_SNOC,
0362 SM8450_SLAVE_SERVICES_LPASS_AML_NOC, SM8450_SLAVE_SERVICE_LPASS_AG_NOC },
0363 };
0364
0365 static struct qcom_icc_node llcc_mc = {
0366 .name = "llcc_mc",
0367 .id = SM8450_MASTER_LLCC,
0368 .channels = 4,
0369 .buswidth = 4,
0370 .num_links = 1,
0371 .links = { SM8450_SLAVE_EBI1 },
0372 };
0373
0374 static struct qcom_icc_node qnm_camnoc_hf = {
0375 .name = "qnm_camnoc_hf",
0376 .id = SM8450_MASTER_CAMNOC_HF,
0377 .channels = 2,
0378 .buswidth = 32,
0379 .num_links = 1,
0380 .links = { SM8450_SLAVE_MNOC_HF_MEM_NOC },
0381 };
0382
0383 static struct qcom_icc_node qnm_camnoc_icp = {
0384 .name = "qnm_camnoc_icp",
0385 .id = SM8450_MASTER_CAMNOC_ICP,
0386 .channels = 1,
0387 .buswidth = 8,
0388 .num_links = 1,
0389 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0390 };
0391
0392 static struct qcom_icc_node qnm_camnoc_sf = {
0393 .name = "qnm_camnoc_sf",
0394 .id = SM8450_MASTER_CAMNOC_SF,
0395 .channels = 2,
0396 .buswidth = 32,
0397 .num_links = 1,
0398 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0399 };
0400
0401 static struct qcom_icc_node qnm_mdp = {
0402 .name = "qnm_mdp",
0403 .id = SM8450_MASTER_MDP,
0404 .channels = 2,
0405 .buswidth = 32,
0406 .num_links = 1,
0407 .links = { SM8450_SLAVE_MNOC_HF_MEM_NOC },
0408 };
0409
0410 static struct qcom_icc_node qnm_mnoc_cfg = {
0411 .name = "qnm_mnoc_cfg",
0412 .id = SM8450_MASTER_CNOC_MNOC_CFG,
0413 .channels = 1,
0414 .buswidth = 4,
0415 .num_links = 1,
0416 .links = { SM8450_SLAVE_SERVICE_MNOC },
0417 };
0418
0419 static struct qcom_icc_node qnm_rot = {
0420 .name = "qnm_rot",
0421 .id = SM8450_MASTER_ROTATOR,
0422 .channels = 1,
0423 .buswidth = 32,
0424 .num_links = 1,
0425 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0426 };
0427
0428 static struct qcom_icc_node qnm_vapss_hcp = {
0429 .name = "qnm_vapss_hcp",
0430 .id = SM8450_MASTER_CDSP_HCP,
0431 .channels = 1,
0432 .buswidth = 32,
0433 .num_links = 1,
0434 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0435 };
0436
0437 static struct qcom_icc_node qnm_video = {
0438 .name = "qnm_video",
0439 .id = SM8450_MASTER_VIDEO,
0440 .channels = 2,
0441 .buswidth = 32,
0442 .num_links = 1,
0443 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0444 };
0445
0446 static struct qcom_icc_node qnm_video_cv_cpu = {
0447 .name = "qnm_video_cv_cpu",
0448 .id = SM8450_MASTER_VIDEO_CV_PROC,
0449 .channels = 1,
0450 .buswidth = 8,
0451 .num_links = 1,
0452 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0453 };
0454
0455 static struct qcom_icc_node qnm_video_cvp = {
0456 .name = "qnm_video_cvp",
0457 .id = SM8450_MASTER_VIDEO_PROC,
0458 .channels = 1,
0459 .buswidth = 32,
0460 .num_links = 1,
0461 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0462 };
0463
0464 static struct qcom_icc_node qnm_video_v_cpu = {
0465 .name = "qnm_video_v_cpu",
0466 .id = SM8450_MASTER_VIDEO_V_PROC,
0467 .channels = 1,
0468 .buswidth = 8,
0469 .num_links = 1,
0470 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC },
0471 };
0472
0473 static struct qcom_icc_node qhm_nsp_noc_config = {
0474 .name = "qhm_nsp_noc_config",
0475 .id = SM8450_MASTER_CDSP_NOC_CFG,
0476 .channels = 1,
0477 .buswidth = 4,
0478 .num_links = 1,
0479 .links = { SM8450_SLAVE_SERVICE_NSP_NOC },
0480 };
0481
0482 static struct qcom_icc_node qxm_nsp = {
0483 .name = "qxm_nsp",
0484 .id = SM8450_MASTER_CDSP_PROC,
0485 .channels = 2,
0486 .buswidth = 32,
0487 .num_links = 1,
0488 .links = { SM8450_SLAVE_CDSP_MEM_NOC },
0489 };
0490
0491 static struct qcom_icc_node qnm_pcie_anoc_cfg = {
0492 .name = "qnm_pcie_anoc_cfg",
0493 .id = SM8450_MASTER_PCIE_ANOC_CFG,
0494 .channels = 1,
0495 .buswidth = 4,
0496 .num_links = 1,
0497 .links = { SM8450_SLAVE_SERVICE_PCIE_ANOC },
0498 };
0499
0500 static struct qcom_icc_node xm_pcie3_0 = {
0501 .name = "xm_pcie3_0",
0502 .id = SM8450_MASTER_PCIE_0,
0503 .channels = 1,
0504 .buswidth = 8,
0505 .num_links = 1,
0506 .links = { SM8450_SLAVE_ANOC_PCIE_GEM_NOC },
0507 };
0508
0509 static struct qcom_icc_node xm_pcie3_1 = {
0510 .name = "xm_pcie3_1",
0511 .id = SM8450_MASTER_PCIE_1,
0512 .channels = 1,
0513 .buswidth = 8,
0514 .num_links = 1,
0515 .links = { SM8450_SLAVE_ANOC_PCIE_GEM_NOC },
0516 };
0517
0518 static struct qcom_icc_node qhm_gic = {
0519 .name = "qhm_gic",
0520 .id = SM8450_MASTER_GIC_AHB,
0521 .channels = 1,
0522 .buswidth = 4,
0523 .num_links = 1,
0524 .links = { SM8450_SLAVE_SNOC_GEM_NOC_SF },
0525 };
0526
0527 static struct qcom_icc_node qnm_aggre1_noc = {
0528 .name = "qnm_aggre1_noc",
0529 .id = SM8450_MASTER_A1NOC_SNOC,
0530 .channels = 1,
0531 .buswidth = 16,
0532 .num_links = 1,
0533 .links = { SM8450_SLAVE_SNOC_GEM_NOC_SF },
0534 };
0535
0536 static struct qcom_icc_node qnm_aggre2_noc = {
0537 .name = "qnm_aggre2_noc",
0538 .id = SM8450_MASTER_A2NOC_SNOC,
0539 .channels = 1,
0540 .buswidth = 16,
0541 .num_links = 1,
0542 .links = { SM8450_SLAVE_SNOC_GEM_NOC_SF },
0543 };
0544
0545 static struct qcom_icc_node qnm_lpass_noc = {
0546 .name = "qnm_lpass_noc",
0547 .id = SM8450_MASTER_LPASS_ANOC,
0548 .channels = 1,
0549 .buswidth = 16,
0550 .num_links = 1,
0551 .links = { SM8450_SLAVE_SNOC_GEM_NOC_SF },
0552 };
0553
0554 static struct qcom_icc_node qnm_snoc_cfg = {
0555 .name = "qnm_snoc_cfg",
0556 .id = SM8450_MASTER_SNOC_CFG,
0557 .channels = 1,
0558 .buswidth = 4,
0559 .num_links = 1,
0560 .links = { SM8450_SLAVE_SERVICE_SNOC },
0561 };
0562
0563 static struct qcom_icc_node qxm_pimem = {
0564 .name = "qxm_pimem",
0565 .id = SM8450_MASTER_PIMEM,
0566 .channels = 1,
0567 .buswidth = 8,
0568 .num_links = 1,
0569 .links = { SM8450_SLAVE_SNOC_GEM_NOC_GC },
0570 };
0571
0572 static struct qcom_icc_node xm_gic = {
0573 .name = "xm_gic",
0574 .id = SM8450_MASTER_GIC,
0575 .channels = 1,
0576 .buswidth = 8,
0577 .num_links = 1,
0578 .links = { SM8450_SLAVE_SNOC_GEM_NOC_GC },
0579 };
0580
0581 static struct qcom_icc_node qnm_mnoc_hf_disp = {
0582 .name = "qnm_mnoc_hf_disp",
0583 .id = SM8450_MASTER_MNOC_HF_MEM_NOC_DISP,
0584 .channels = 2,
0585 .buswidth = 32,
0586 .num_links = 1,
0587 .links = { SM8450_SLAVE_LLCC_DISP },
0588 };
0589
0590 static struct qcom_icc_node qnm_mnoc_sf_disp = {
0591 .name = "qnm_mnoc_sf_disp",
0592 .id = SM8450_MASTER_MNOC_SF_MEM_NOC_DISP,
0593 .channels = 2,
0594 .buswidth = 32,
0595 .num_links = 1,
0596 .links = { SM8450_SLAVE_LLCC_DISP },
0597 };
0598
0599 static struct qcom_icc_node qnm_pcie_disp = {
0600 .name = "qnm_pcie_disp",
0601 .id = SM8450_MASTER_ANOC_PCIE_GEM_NOC_DISP,
0602 .channels = 1,
0603 .buswidth = 16,
0604 .num_links = 1,
0605 .links = { SM8450_SLAVE_LLCC_DISP },
0606 };
0607
0608 static struct qcom_icc_node llcc_mc_disp = {
0609 .name = "llcc_mc_disp",
0610 .id = SM8450_MASTER_LLCC_DISP,
0611 .channels = 4,
0612 .buswidth = 4,
0613 .num_links = 1,
0614 .links = { SM8450_SLAVE_EBI1_DISP },
0615 };
0616
0617 static struct qcom_icc_node qnm_mdp_disp = {
0618 .name = "qnm_mdp_disp",
0619 .id = SM8450_MASTER_MDP_DISP,
0620 .channels = 2,
0621 .buswidth = 32,
0622 .num_links = 1,
0623 .links = { SM8450_SLAVE_MNOC_HF_MEM_NOC_DISP },
0624 };
0625
0626 static struct qcom_icc_node qnm_rot_disp = {
0627 .name = "qnm_rot_disp",
0628 .id = SM8450_MASTER_ROTATOR_DISP,
0629 .channels = 1,
0630 .buswidth = 32,
0631 .num_links = 1,
0632 .links = { SM8450_SLAVE_MNOC_SF_MEM_NOC_DISP },
0633 };
0634
0635 static struct qcom_icc_node qns_a1noc_snoc = {
0636 .name = "qns_a1noc_snoc",
0637 .id = SM8450_SLAVE_A1NOC_SNOC,
0638 .channels = 1,
0639 .buswidth = 16,
0640 .num_links = 1,
0641 .links = { SM8450_MASTER_A1NOC_SNOC },
0642 };
0643
0644 static struct qcom_icc_node srvc_aggre1_noc = {
0645 .name = "srvc_aggre1_noc",
0646 .id = SM8450_SLAVE_SERVICE_A1NOC,
0647 .channels = 1,
0648 .buswidth = 4,
0649 .num_links = 0,
0650 };
0651
0652 static struct qcom_icc_node qns_a2noc_snoc = {
0653 .name = "qns_a2noc_snoc",
0654 .id = SM8450_SLAVE_A2NOC_SNOC,
0655 .channels = 1,
0656 .buswidth = 16,
0657 .num_links = 1,
0658 .links = { SM8450_MASTER_A2NOC_SNOC },
0659 };
0660
0661 static struct qcom_icc_node srvc_aggre2_noc = {
0662 .name = "srvc_aggre2_noc",
0663 .id = SM8450_SLAVE_SERVICE_A2NOC,
0664 .channels = 1,
0665 .buswidth = 4,
0666 .num_links = 0,
0667 };
0668
0669 static struct qcom_icc_node qup0_core_slave = {
0670 .name = "qup0_core_slave",
0671 .id = SM8450_SLAVE_QUP_CORE_0,
0672 .channels = 1,
0673 .buswidth = 4,
0674 .num_links = 0,
0675 };
0676
0677 static struct qcom_icc_node qup1_core_slave = {
0678 .name = "qup1_core_slave",
0679 .id = SM8450_SLAVE_QUP_CORE_1,
0680 .channels = 1,
0681 .buswidth = 4,
0682 .num_links = 0,
0683 };
0684
0685 static struct qcom_icc_node qup2_core_slave = {
0686 .name = "qup2_core_slave",
0687 .id = SM8450_SLAVE_QUP_CORE_2,
0688 .channels = 1,
0689 .buswidth = 4,
0690 .num_links = 0,
0691 };
0692
0693 static struct qcom_icc_node qhs_ahb2phy0 = {
0694 .name = "qhs_ahb2phy0",
0695 .id = SM8450_SLAVE_AHB2PHY_SOUTH,
0696 .channels = 1,
0697 .buswidth = 4,
0698 .num_links = 0,
0699 };
0700
0701 static struct qcom_icc_node qhs_ahb2phy1 = {
0702 .name = "qhs_ahb2phy1",
0703 .id = SM8450_SLAVE_AHB2PHY_NORTH,
0704 .channels = 1,
0705 .buswidth = 4,
0706 .num_links = 0,
0707 };
0708
0709 static struct qcom_icc_node qhs_aoss = {
0710 .name = "qhs_aoss",
0711 .id = SM8450_SLAVE_AOSS,
0712 .channels = 1,
0713 .buswidth = 4,
0714 .num_links = 0,
0715 };
0716
0717 static struct qcom_icc_node qhs_camera_cfg = {
0718 .name = "qhs_camera_cfg",
0719 .id = SM8450_SLAVE_CAMERA_CFG,
0720 .channels = 1,
0721 .buswidth = 4,
0722 .num_links = 0,
0723 };
0724
0725 static struct qcom_icc_node qhs_clk_ctl = {
0726 .name = "qhs_clk_ctl",
0727 .id = SM8450_SLAVE_CLK_CTL,
0728 .channels = 1,
0729 .buswidth = 4,
0730 .num_links = 0,
0731 };
0732
0733 static struct qcom_icc_node qhs_compute_cfg = {
0734 .name = "qhs_compute_cfg",
0735 .id = SM8450_SLAVE_CDSP_CFG,
0736 .channels = 1,
0737 .buswidth = 4,
0738 .num_links = 1,
0739 .links = { MASTER_CDSP_NOC_CFG },
0740 };
0741
0742 static struct qcom_icc_node qhs_cpr_cx = {
0743 .name = "qhs_cpr_cx",
0744 .id = SM8450_SLAVE_RBCPR_CX_CFG,
0745 .channels = 1,
0746 .buswidth = 4,
0747 .num_links = 0,
0748 };
0749
0750 static struct qcom_icc_node qhs_cpr_mmcx = {
0751 .name = "qhs_cpr_mmcx",
0752 .id = SM8450_SLAVE_RBCPR_MMCX_CFG,
0753 .channels = 1,
0754 .buswidth = 4,
0755 .num_links = 0,
0756 };
0757
0758 static struct qcom_icc_node qhs_cpr_mxa = {
0759 .name = "qhs_cpr_mxa",
0760 .id = SM8450_SLAVE_RBCPR_MXA_CFG,
0761 .channels = 1,
0762 .buswidth = 4,
0763 .num_links = 0,
0764 };
0765
0766 static struct qcom_icc_node qhs_cpr_mxc = {
0767 .name = "qhs_cpr_mxc",
0768 .id = SM8450_SLAVE_RBCPR_MXC_CFG,
0769 .channels = 1,
0770 .buswidth = 4,
0771 .num_links = 0,
0772 };
0773
0774 static struct qcom_icc_node qhs_crypto0_cfg = {
0775 .name = "qhs_crypto0_cfg",
0776 .id = SM8450_SLAVE_CRYPTO_0_CFG,
0777 .channels = 1,
0778 .buswidth = 4,
0779 .num_links = 0,
0780 };
0781
0782 static struct qcom_icc_node qhs_cx_rdpm = {
0783 .name = "qhs_cx_rdpm",
0784 .id = SM8450_SLAVE_CX_RDPM,
0785 .channels = 1,
0786 .buswidth = 4,
0787 .num_links = 0,
0788 };
0789
0790 static struct qcom_icc_node qhs_display_cfg = {
0791 .name = "qhs_display_cfg",
0792 .id = SM8450_SLAVE_DISPLAY_CFG,
0793 .channels = 1,
0794 .buswidth = 4,
0795 .num_links = 0,
0796 };
0797
0798 static struct qcom_icc_node qhs_gpuss_cfg = {
0799 .name = "qhs_gpuss_cfg",
0800 .id = SM8450_SLAVE_GFX3D_CFG,
0801 .channels = 1,
0802 .buswidth = 8,
0803 .num_links = 0,
0804 };
0805
0806 static struct qcom_icc_node qhs_imem_cfg = {
0807 .name = "qhs_imem_cfg",
0808 .id = SM8450_SLAVE_IMEM_CFG,
0809 .channels = 1,
0810 .buswidth = 4,
0811 .num_links = 0,
0812 };
0813
0814 static struct qcom_icc_node qhs_ipa = {
0815 .name = "qhs_ipa",
0816 .id = SM8450_SLAVE_IPA_CFG,
0817 .channels = 1,
0818 .buswidth = 4,
0819 .num_links = 0,
0820 };
0821
0822 static struct qcom_icc_node qhs_ipc_router = {
0823 .name = "qhs_ipc_router",
0824 .id = SM8450_SLAVE_IPC_ROUTER_CFG,
0825 .channels = 1,
0826 .buswidth = 4,
0827 .num_links = 0,
0828 };
0829
0830 static struct qcom_icc_node qhs_lpass_cfg = {
0831 .name = "qhs_lpass_cfg",
0832 .id = SM8450_SLAVE_LPASS,
0833 .channels = 1,
0834 .buswidth = 4,
0835 .num_links = 1,
0836 .links = { MASTER_CNOC_LPASS_AG_NOC },
0837 };
0838
0839 static struct qcom_icc_node qhs_mss_cfg = {
0840 .name = "qhs_mss_cfg",
0841 .id = SM8450_SLAVE_CNOC_MSS,
0842 .channels = 1,
0843 .buswidth = 4,
0844 .num_links = 0,
0845 };
0846
0847 static struct qcom_icc_node qhs_mx_rdpm = {
0848 .name = "qhs_mx_rdpm",
0849 .id = SM8450_SLAVE_MX_RDPM,
0850 .channels = 1,
0851 .buswidth = 4,
0852 .num_links = 0,
0853 };
0854
0855 static struct qcom_icc_node qhs_pcie0_cfg = {
0856 .name = "qhs_pcie0_cfg",
0857 .id = SM8450_SLAVE_PCIE_0_CFG,
0858 .channels = 1,
0859 .buswidth = 4,
0860 .num_links = 0,
0861 };
0862
0863 static struct qcom_icc_node qhs_pcie1_cfg = {
0864 .name = "qhs_pcie1_cfg",
0865 .id = SM8450_SLAVE_PCIE_1_CFG,
0866 .channels = 1,
0867 .buswidth = 4,
0868 .num_links = 0,
0869 };
0870
0871 static struct qcom_icc_node qhs_pdm = {
0872 .name = "qhs_pdm",
0873 .id = SM8450_SLAVE_PDM,
0874 .channels = 1,
0875 .buswidth = 4,
0876 .num_links = 0,
0877 };
0878
0879 static struct qcom_icc_node qhs_pimem_cfg = {
0880 .name = "qhs_pimem_cfg",
0881 .id = SM8450_SLAVE_PIMEM_CFG,
0882 .channels = 1,
0883 .buswidth = 4,
0884 .num_links = 0,
0885 };
0886
0887 static struct qcom_icc_node qhs_prng = {
0888 .name = "qhs_prng",
0889 .id = SM8450_SLAVE_PRNG,
0890 .channels = 1,
0891 .buswidth = 4,
0892 .num_links = 0,
0893 };
0894
0895 static struct qcom_icc_node qhs_qdss_cfg = {
0896 .name = "qhs_qdss_cfg",
0897 .id = SM8450_SLAVE_QDSS_CFG,
0898 .channels = 1,
0899 .buswidth = 4,
0900 .num_links = 0,
0901 };
0902
0903 static struct qcom_icc_node qhs_qspi = {
0904 .name = "qhs_qspi",
0905 .id = SM8450_SLAVE_QSPI_0,
0906 .channels = 1,
0907 .buswidth = 4,
0908 .num_links = 0,
0909 };
0910
0911 static struct qcom_icc_node qhs_qup0 = {
0912 .name = "qhs_qup0",
0913 .id = SM8450_SLAVE_QUP_0,
0914 .channels = 1,
0915 .buswidth = 4,
0916 .num_links = 0,
0917 };
0918
0919 static struct qcom_icc_node qhs_qup1 = {
0920 .name = "qhs_qup1",
0921 .id = SM8450_SLAVE_QUP_1,
0922 .channels = 1,
0923 .buswidth = 4,
0924 .num_links = 0,
0925 };
0926
0927 static struct qcom_icc_node qhs_qup2 = {
0928 .name = "qhs_qup2",
0929 .id = SM8450_SLAVE_QUP_2,
0930 .channels = 1,
0931 .buswidth = 4,
0932 .num_links = 0,
0933 };
0934
0935 static struct qcom_icc_node qhs_sdc2 = {
0936 .name = "qhs_sdc2",
0937 .id = SM8450_SLAVE_SDCC_2,
0938 .channels = 1,
0939 .buswidth = 4,
0940 .num_links = 0,
0941 };
0942
0943 static struct qcom_icc_node qhs_sdc4 = {
0944 .name = "qhs_sdc4",
0945 .id = SM8450_SLAVE_SDCC_4,
0946 .channels = 1,
0947 .buswidth = 4,
0948 .num_links = 0,
0949 };
0950
0951 static struct qcom_icc_node qhs_spss_cfg = {
0952 .name = "qhs_spss_cfg",
0953 .id = SM8450_SLAVE_SPSS_CFG,
0954 .channels = 1,
0955 .buswidth = 4,
0956 .num_links = 0,
0957 };
0958
0959 static struct qcom_icc_node qhs_tcsr = {
0960 .name = "qhs_tcsr",
0961 .id = SM8450_SLAVE_TCSR,
0962 .channels = 1,
0963 .buswidth = 4,
0964 .num_links = 0,
0965 };
0966
0967 static struct qcom_icc_node qhs_tlmm = {
0968 .name = "qhs_tlmm",
0969 .id = SM8450_SLAVE_TLMM,
0970 .channels = 1,
0971 .buswidth = 4,
0972 .num_links = 0,
0973 };
0974
0975 static struct qcom_icc_node qhs_tme_cfg = {
0976 .name = "qhs_tme_cfg",
0977 .id = SM8450_SLAVE_TME_CFG,
0978 .channels = 1,
0979 .buswidth = 4,
0980 .num_links = 0,
0981 };
0982
0983 static struct qcom_icc_node qhs_ufs_mem_cfg = {
0984 .name = "qhs_ufs_mem_cfg",
0985 .id = SM8450_SLAVE_UFS_MEM_CFG,
0986 .channels = 1,
0987 .buswidth = 4,
0988 .num_links = 0,
0989 };
0990
0991 static struct qcom_icc_node qhs_usb3_0 = {
0992 .name = "qhs_usb3_0",
0993 .id = SM8450_SLAVE_USB3_0,
0994 .channels = 1,
0995 .buswidth = 4,
0996 .num_links = 0,
0997 };
0998
0999 static struct qcom_icc_node qhs_venus_cfg = {
1000 .name = "qhs_venus_cfg",
1001 .id = SM8450_SLAVE_VENUS_CFG,
1002 .channels = 1,
1003 .buswidth = 4,
1004 .num_links = 0,
1005 };
1006
1007 static struct qcom_icc_node qhs_vsense_ctrl_cfg = {
1008 .name = "qhs_vsense_ctrl_cfg",
1009 .id = SM8450_SLAVE_VSENSE_CTRL_CFG,
1010 .channels = 1,
1011 .buswidth = 4,
1012 .num_links = 0,
1013 };
1014
1015 static struct qcom_icc_node qns_a1_noc_cfg = {
1016 .name = "qns_a1_noc_cfg",
1017 .id = SM8450_SLAVE_A1NOC_CFG,
1018 .channels = 1,
1019 .buswidth = 4,
1020 .num_links = 1,
1021 .links = { SM8450_MASTER_A1NOC_CFG },
1022 };
1023
1024 static struct qcom_icc_node qns_a2_noc_cfg = {
1025 .name = "qns_a2_noc_cfg",
1026 .id = SM8450_SLAVE_A2NOC_CFG,
1027 .channels = 1,
1028 .buswidth = 4,
1029 .num_links = 1,
1030 .links = { SM8450_MASTER_A2NOC_CFG },
1031 };
1032
1033 static struct qcom_icc_node qns_ddrss_cfg = {
1034 .name = "qns_ddrss_cfg",
1035 .id = SM8450_SLAVE_DDRSS_CFG,
1036 .channels = 1,
1037 .buswidth = 4,
1038 .num_links = 1,
1039
1040 };
1041
1042 static struct qcom_icc_node qns_mnoc_cfg = {
1043 .name = "qns_mnoc_cfg",
1044 .id = SM8450_SLAVE_CNOC_MNOC_CFG,
1045 .channels = 1,
1046 .buswidth = 4,
1047 .num_links = 1,
1048 .links = { SM8450_MASTER_CNOC_MNOC_CFG },
1049 };
1050
1051 static struct qcom_icc_node qns_pcie_anoc_cfg = {
1052 .name = "qns_pcie_anoc_cfg",
1053 .id = SM8450_SLAVE_PCIE_ANOC_CFG,
1054 .channels = 1,
1055 .buswidth = 4,
1056 .num_links = 1,
1057 .links = { SM8450_MASTER_PCIE_ANOC_CFG },
1058 };
1059
1060 static struct qcom_icc_node qns_snoc_cfg = {
1061 .name = "qns_snoc_cfg",
1062 .id = SM8450_SLAVE_SNOC_CFG,
1063 .channels = 1,
1064 .buswidth = 4,
1065 .num_links = 1,
1066 .links = { SM8450_MASTER_SNOC_CFG },
1067 };
1068
1069 static struct qcom_icc_node qxs_imem = {
1070 .name = "qxs_imem",
1071 .id = SM8450_SLAVE_IMEM,
1072 .channels = 1,
1073 .buswidth = 8,
1074 .num_links = 0,
1075 };
1076
1077 static struct qcom_icc_node qxs_pimem = {
1078 .name = "qxs_pimem",
1079 .id = SM8450_SLAVE_PIMEM,
1080 .channels = 1,
1081 .buswidth = 8,
1082 .num_links = 0,
1083 };
1084
1085 static struct qcom_icc_node srvc_cnoc = {
1086 .name = "srvc_cnoc",
1087 .id = SM8450_SLAVE_SERVICE_CNOC,
1088 .channels = 1,
1089 .buswidth = 4,
1090 .num_links = 0,
1091 };
1092
1093 static struct qcom_icc_node xs_pcie_0 = {
1094 .name = "xs_pcie_0",
1095 .id = SM8450_SLAVE_PCIE_0,
1096 .channels = 1,
1097 .buswidth = 8,
1098 .num_links = 0,
1099 };
1100
1101 static struct qcom_icc_node xs_pcie_1 = {
1102 .name = "xs_pcie_1",
1103 .id = SM8450_SLAVE_PCIE_1,
1104 .channels = 1,
1105 .buswidth = 8,
1106 .num_links = 0,
1107 };
1108
1109 static struct qcom_icc_node xs_qdss_stm = {
1110 .name = "xs_qdss_stm",
1111 .id = SM8450_SLAVE_QDSS_STM,
1112 .channels = 1,
1113 .buswidth = 4,
1114 .num_links = 0,
1115 };
1116
1117 static struct qcom_icc_node xs_sys_tcu_cfg = {
1118 .name = "xs_sys_tcu_cfg",
1119 .id = SM8450_SLAVE_TCU,
1120 .channels = 1,
1121 .buswidth = 8,
1122 .num_links = 0,
1123 };
1124
1125 static struct qcom_icc_node qns_gem_noc_cnoc = {
1126 .name = "qns_gem_noc_cnoc",
1127 .id = SM8450_SLAVE_GEM_NOC_CNOC,
1128 .channels = 1,
1129 .buswidth = 16,
1130 .num_links = 1,
1131 .links = { SM8450_MASTER_GEM_NOC_CNOC },
1132 };
1133
1134 static struct qcom_icc_node qns_llcc = {
1135 .name = "qns_llcc",
1136 .id = SM8450_SLAVE_LLCC,
1137 .channels = 4,
1138 .buswidth = 16,
1139 .num_links = 1,
1140 .links = { SM8450_MASTER_LLCC },
1141 };
1142
1143 static struct qcom_icc_node qns_pcie = {
1144 .name = "qns_pcie",
1145 .id = SM8450_SLAVE_MEM_NOC_PCIE_SNOC,
1146 .channels = 1,
1147 .buswidth = 8,
1148 .num_links = 1,
1149 .links = { SM8450_MASTER_GEM_NOC_PCIE_SNOC },
1150 };
1151
1152 static struct qcom_icc_node qhs_lpass_core = {
1153 .name = "qhs_lpass_core",
1154 .id = SM8450_SLAVE_LPASS_CORE_CFG,
1155 .channels = 1,
1156 .buswidth = 4,
1157 .num_links = 0,
1158 };
1159
1160 static struct qcom_icc_node qhs_lpass_lpi = {
1161 .name = "qhs_lpass_lpi",
1162 .id = SM8450_SLAVE_LPASS_LPI_CFG,
1163 .channels = 1,
1164 .buswidth = 4,
1165 .num_links = 0,
1166 };
1167
1168 static struct qcom_icc_node qhs_lpass_mpu = {
1169 .name = "qhs_lpass_mpu",
1170 .id = SM8450_SLAVE_LPASS_MPU_CFG,
1171 .channels = 1,
1172 .buswidth = 4,
1173 .num_links = 0,
1174 };
1175
1176 static struct qcom_icc_node qhs_lpass_top = {
1177 .name = "qhs_lpass_top",
1178 .id = SM8450_SLAVE_LPASS_TOP_CFG,
1179 .channels = 1,
1180 .buswidth = 4,
1181 .num_links = 0,
1182 };
1183
1184 static struct qcom_icc_node qns_sysnoc = {
1185 .name = "qns_sysnoc",
1186 .id = SM8450_SLAVE_LPASS_SNOC,
1187 .channels = 1,
1188 .buswidth = 16,
1189 .num_links = 1,
1190 .links = { SM8450_MASTER_LPASS_ANOC },
1191 };
1192
1193 static struct qcom_icc_node srvc_niu_aml_noc = {
1194 .name = "srvc_niu_aml_noc",
1195 .id = SM8450_SLAVE_SERVICES_LPASS_AML_NOC,
1196 .channels = 1,
1197 .buswidth = 4,
1198 .num_links = 0,
1199 };
1200
1201 static struct qcom_icc_node srvc_niu_lpass_agnoc = {
1202 .name = "srvc_niu_lpass_agnoc",
1203 .id = SM8450_SLAVE_SERVICE_LPASS_AG_NOC,
1204 .channels = 1,
1205 .buswidth = 4,
1206 .num_links = 0,
1207 };
1208
1209 static struct qcom_icc_node ebi = {
1210 .name = "ebi",
1211 .id = SM8450_SLAVE_EBI1,
1212 .channels = 4,
1213 .buswidth = 4,
1214 .num_links = 0,
1215 };
1216
1217 static struct qcom_icc_node qns_mem_noc_hf = {
1218 .name = "qns_mem_noc_hf",
1219 .id = SM8450_SLAVE_MNOC_HF_MEM_NOC,
1220 .channels = 2,
1221 .buswidth = 32,
1222 .num_links = 1,
1223 .links = { SM8450_MASTER_MNOC_HF_MEM_NOC },
1224 };
1225
1226 static struct qcom_icc_node qns_mem_noc_sf = {
1227 .name = "qns_mem_noc_sf",
1228 .id = SM8450_SLAVE_MNOC_SF_MEM_NOC,
1229 .channels = 2,
1230 .buswidth = 32,
1231 .num_links = 1,
1232 .links = { SM8450_MASTER_MNOC_SF_MEM_NOC },
1233 };
1234
1235 static struct qcom_icc_node srvc_mnoc = {
1236 .name = "srvc_mnoc",
1237 .id = SM8450_SLAVE_SERVICE_MNOC,
1238 .channels = 1,
1239 .buswidth = 4,
1240 .num_links = 0,
1241 };
1242
1243 static struct qcom_icc_node qns_nsp_gemnoc = {
1244 .name = "qns_nsp_gemnoc",
1245 .id = SM8450_SLAVE_CDSP_MEM_NOC,
1246 .channels = 2,
1247 .buswidth = 32,
1248 .num_links = 1,
1249 .links = { SM8450_MASTER_COMPUTE_NOC },
1250 };
1251
1252 static struct qcom_icc_node service_nsp_noc = {
1253 .name = "service_nsp_noc",
1254 .id = SM8450_SLAVE_SERVICE_NSP_NOC,
1255 .channels = 1,
1256 .buswidth = 4,
1257 .num_links = 0,
1258 };
1259
1260 static struct qcom_icc_node qns_pcie_mem_noc = {
1261 .name = "qns_pcie_mem_noc",
1262 .id = SM8450_SLAVE_ANOC_PCIE_GEM_NOC,
1263 .channels = 1,
1264 .buswidth = 16,
1265 .num_links = 1,
1266 .links = { SM8450_MASTER_ANOC_PCIE_GEM_NOC },
1267 };
1268
1269 static struct qcom_icc_node srvc_pcie_aggre_noc = {
1270 .name = "srvc_pcie_aggre_noc",
1271 .id = SM8450_SLAVE_SERVICE_PCIE_ANOC,
1272 .channels = 1,
1273 .buswidth = 4,
1274 .num_links = 0,
1275 };
1276
1277 static struct qcom_icc_node qns_gemnoc_gc = {
1278 .name = "qns_gemnoc_gc",
1279 .id = SM8450_SLAVE_SNOC_GEM_NOC_GC,
1280 .channels = 1,
1281 .buswidth = 8,
1282 .num_links = 1,
1283 .links = { SM8450_MASTER_SNOC_GC_MEM_NOC },
1284 };
1285
1286 static struct qcom_icc_node qns_gemnoc_sf = {
1287 .name = "qns_gemnoc_sf",
1288 .id = SM8450_SLAVE_SNOC_GEM_NOC_SF,
1289 .channels = 1,
1290 .buswidth = 16,
1291 .num_links = 1,
1292 .links = { SM8450_MASTER_SNOC_SF_MEM_NOC },
1293 };
1294
1295 static struct qcom_icc_node srvc_snoc = {
1296 .name = "srvc_snoc",
1297 .id = SM8450_SLAVE_SERVICE_SNOC,
1298 .channels = 1,
1299 .buswidth = 4,
1300 .num_links = 0,
1301 };
1302
1303 static struct qcom_icc_node qns_llcc_disp = {
1304 .name = "qns_llcc_disp",
1305 .id = SM8450_SLAVE_LLCC_DISP,
1306 .channels = 4,
1307 .buswidth = 16,
1308 .num_links = 1,
1309 .links = { SM8450_MASTER_LLCC_DISP },
1310 };
1311
1312 static struct qcom_icc_node ebi_disp = {
1313 .name = "ebi_disp",
1314 .id = SM8450_SLAVE_EBI1_DISP,
1315 .channels = 4,
1316 .buswidth = 4,
1317 .num_links = 0,
1318 };
1319
1320 static struct qcom_icc_node qns_mem_noc_hf_disp = {
1321 .name = "qns_mem_noc_hf_disp",
1322 .id = SM8450_SLAVE_MNOC_HF_MEM_NOC_DISP,
1323 .channels = 2,
1324 .buswidth = 32,
1325 .num_links = 1,
1326 .links = { SM8450_MASTER_MNOC_HF_MEM_NOC_DISP },
1327 };
1328
1329 static struct qcom_icc_node qns_mem_noc_sf_disp = {
1330 .name = "qns_mem_noc_sf_disp",
1331 .id = SM8450_SLAVE_MNOC_SF_MEM_NOC_DISP,
1332 .channels = 2,
1333 .buswidth = 32,
1334 .num_links = 1,
1335 .links = { SM8450_MASTER_MNOC_SF_MEM_NOC_DISP },
1336 };
1337
1338 static struct qcom_icc_bcm bcm_acv = {
1339 .name = "ACV",
1340 .num_nodes = 1,
1341 .nodes = { &ebi },
1342 };
1343
1344 static struct qcom_icc_bcm bcm_ce0 = {
1345 .name = "CE0",
1346 .num_nodes = 1,
1347 .nodes = { &qxm_crypto },
1348 };
1349
1350 static struct qcom_icc_bcm bcm_cn0 = {
1351 .name = "CN0",
1352 .keepalive = true,
1353 .num_nodes = 55,
1354 .nodes = { &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie,
1355 &qhs_ahb2phy0, &qhs_ahb2phy1,
1356 &qhs_aoss, &qhs_camera_cfg,
1357 &qhs_clk_ctl, &qhs_compute_cfg,
1358 &qhs_cpr_cx, &qhs_cpr_mmcx,
1359 &qhs_cpr_mxa, &qhs_cpr_mxc,
1360 &qhs_crypto0_cfg, &qhs_cx_rdpm,
1361 &qhs_display_cfg, &qhs_gpuss_cfg,
1362 &qhs_imem_cfg, &qhs_ipa,
1363 &qhs_ipc_router, &qhs_lpass_cfg,
1364 &qhs_mss_cfg, &qhs_mx_rdpm,
1365 &qhs_pcie0_cfg, &qhs_pcie1_cfg,
1366 &qhs_pdm, &qhs_pimem_cfg,
1367 &qhs_prng, &qhs_qdss_cfg,
1368 &qhs_qspi, &qhs_qup0,
1369 &qhs_qup1, &qhs_qup2,
1370 &qhs_sdc2, &qhs_sdc4,
1371 &qhs_spss_cfg, &qhs_tcsr,
1372 &qhs_tlmm, &qhs_tme_cfg,
1373 &qhs_ufs_mem_cfg, &qhs_usb3_0,
1374 &qhs_venus_cfg, &qhs_vsense_ctrl_cfg,
1375 &qns_a1_noc_cfg, &qns_a2_noc_cfg,
1376 &qns_ddrss_cfg, &qns_mnoc_cfg,
1377 &qns_pcie_anoc_cfg, &qns_snoc_cfg,
1378 &qxs_imem, &qxs_pimem,
1379 &srvc_cnoc, &xs_pcie_0,
1380 &xs_pcie_1, &xs_qdss_stm,
1381 &xs_sys_tcu_cfg },
1382 };
1383
1384 static struct qcom_icc_bcm bcm_co0 = {
1385 .name = "CO0",
1386 .num_nodes = 2,
1387 .nodes = { &qxm_nsp, &qns_nsp_gemnoc },
1388 };
1389
1390 static struct qcom_icc_bcm bcm_mc0 = {
1391 .name = "MC0",
1392 .keepalive = true,
1393 .num_nodes = 1,
1394 .nodes = { &ebi },
1395 };
1396
1397 static struct qcom_icc_bcm bcm_mm0 = {
1398 .name = "MM0",
1399 .keepalive = true,
1400 .num_nodes = 1,
1401 .nodes = { &qns_mem_noc_hf },
1402 };
1403
1404 static struct qcom_icc_bcm bcm_mm1 = {
1405 .name = "MM1",
1406 .num_nodes = 12,
1407 .nodes = { &qnm_camnoc_hf, &qnm_camnoc_icp,
1408 &qnm_camnoc_sf, &qnm_mdp,
1409 &qnm_mnoc_cfg, &qnm_rot,
1410 &qnm_vapss_hcp, &qnm_video,
1411 &qnm_video_cv_cpu, &qnm_video_cvp,
1412 &qnm_video_v_cpu, &qns_mem_noc_sf },
1413 };
1414
1415 static struct qcom_icc_bcm bcm_qup0 = {
1416 .name = "QUP0",
1417 .keepalive = true,
1418 .vote_scale = 1,
1419 .num_nodes = 1,
1420 .nodes = { &qup0_core_slave },
1421 };
1422
1423 static struct qcom_icc_bcm bcm_qup1 = {
1424 .name = "QUP1",
1425 .keepalive = true,
1426 .vote_scale = 1,
1427 .num_nodes = 1,
1428 .nodes = { &qup1_core_slave },
1429 };
1430
1431 static struct qcom_icc_bcm bcm_qup2 = {
1432 .name = "QUP2",
1433 .keepalive = true,
1434 .vote_scale = 1,
1435 .num_nodes = 1,
1436 .nodes = { &qup2_core_slave },
1437 };
1438
1439 static struct qcom_icc_bcm bcm_sh0 = {
1440 .name = "SH0",
1441 .keepalive = true,
1442 .num_nodes = 1,
1443 .nodes = { &qns_llcc },
1444 };
1445
1446 static struct qcom_icc_bcm bcm_sh1 = {
1447 .name = "SH1",
1448 .num_nodes = 7,
1449 .nodes = { &alm_gpu_tcu, &alm_sys_tcu,
1450 &qnm_nsp_gemnoc, &qnm_pcie,
1451 &qnm_snoc_gc, &qns_gem_noc_cnoc,
1452 &qns_pcie },
1453 };
1454
1455 static struct qcom_icc_bcm bcm_sn0 = {
1456 .name = "SN0",
1457 .keepalive = true,
1458 .num_nodes = 1,
1459 .nodes = { &qns_gemnoc_sf },
1460 };
1461
1462 static struct qcom_icc_bcm bcm_sn1 = {
1463 .name = "SN1",
1464 .num_nodes = 4,
1465 .nodes = { &qhm_gic, &qxm_pimem,
1466 &xm_gic, &qns_gemnoc_gc },
1467 };
1468
1469 static struct qcom_icc_bcm bcm_sn2 = {
1470 .name = "SN2",
1471 .num_nodes = 1,
1472 .nodes = { &qnm_aggre1_noc },
1473 };
1474
1475 static struct qcom_icc_bcm bcm_sn3 = {
1476 .name = "SN3",
1477 .num_nodes = 1,
1478 .nodes = { &qnm_aggre2_noc },
1479 };
1480
1481 static struct qcom_icc_bcm bcm_sn4 = {
1482 .name = "SN4",
1483 .num_nodes = 1,
1484 .nodes = { &qnm_lpass_noc },
1485 };
1486
1487 static struct qcom_icc_bcm bcm_sn7 = {
1488 .name = "SN7",
1489 .num_nodes = 1,
1490 .nodes = { &qns_pcie_mem_noc },
1491 };
1492
1493 static struct qcom_icc_bcm bcm_acv_disp = {
1494 .name = "ACV",
1495 .num_nodes = 1,
1496 .nodes = { &ebi_disp },
1497 };
1498
1499 static struct qcom_icc_bcm bcm_mc0_disp = {
1500 .name = "MC0",
1501 .num_nodes = 1,
1502 .nodes = { &ebi_disp },
1503 };
1504
1505 static struct qcom_icc_bcm bcm_mm0_disp = {
1506 .name = "MM0",
1507 .num_nodes = 1,
1508 .nodes = { &qns_mem_noc_hf_disp },
1509 };
1510
1511 static struct qcom_icc_bcm bcm_mm1_disp = {
1512 .name = "MM1",
1513 .num_nodes = 3,
1514 .nodes = { &qnm_mdp_disp, &qnm_rot_disp,
1515 &qns_mem_noc_sf_disp },
1516 };
1517
1518 static struct qcom_icc_bcm bcm_sh0_disp = {
1519 .name = "SH0",
1520 .num_nodes = 1,
1521 .nodes = { &qns_llcc_disp },
1522 };
1523
1524 static struct qcom_icc_bcm bcm_sh1_disp = {
1525 .name = "SH1",
1526 .num_nodes = 1,
1527 .nodes = { &qnm_pcie_disp },
1528 };
1529
1530 static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
1531 };
1532
1533 static struct qcom_icc_node * const aggre1_noc_nodes[] = {
1534 [MASTER_QSPI_0] = &qhm_qspi,
1535 [MASTER_QUP_1] = &qhm_qup1,
1536 [MASTER_A1NOC_CFG] = &qnm_a1noc_cfg,
1537 [MASTER_SDCC_4] = &xm_sdc4,
1538 [MASTER_UFS_MEM] = &xm_ufs_mem,
1539 [MASTER_USB3_0] = &xm_usb3_0,
1540 [SLAVE_A1NOC_SNOC] = &qns_a1noc_snoc,
1541 [SLAVE_SERVICE_A1NOC] = &srvc_aggre1_noc,
1542 };
1543
1544 static const struct qcom_icc_desc sm8450_aggre1_noc = {
1545 .nodes = aggre1_noc_nodes,
1546 .num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
1547 .bcms = aggre1_noc_bcms,
1548 .num_bcms = ARRAY_SIZE(aggre1_noc_bcms),
1549 };
1550
1551 static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
1552 &bcm_ce0,
1553 };
1554
1555 static struct qcom_icc_node * const aggre2_noc_nodes[] = {
1556 [MASTER_QDSS_BAM] = &qhm_qdss_bam,
1557 [MASTER_QUP_0] = &qhm_qup0,
1558 [MASTER_QUP_2] = &qhm_qup2,
1559 [MASTER_A2NOC_CFG] = &qnm_a2noc_cfg,
1560 [MASTER_CRYPTO] = &qxm_crypto,
1561 [MASTER_IPA] = &qxm_ipa,
1562 [MASTER_SENSORS_PROC] = &qxm_sensorss_q6,
1563 [MASTER_SP] = &qxm_sp,
1564 [MASTER_QDSS_ETR] = &xm_qdss_etr_0,
1565 [MASTER_QDSS_ETR_1] = &xm_qdss_etr_1,
1566 [MASTER_SDCC_2] = &xm_sdc2,
1567 [SLAVE_A2NOC_SNOC] = &qns_a2noc_snoc,
1568 [SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
1569 };
1570
1571 static const struct qcom_icc_desc sm8450_aggre2_noc = {
1572 .nodes = aggre2_noc_nodes,
1573 .num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
1574 .bcms = aggre2_noc_bcms,
1575 .num_bcms = ARRAY_SIZE(aggre2_noc_bcms),
1576 };
1577
1578 static struct qcom_icc_bcm * const clk_virt_bcms[] = {
1579 &bcm_qup0,
1580 &bcm_qup1,
1581 &bcm_qup2,
1582 };
1583
1584 static struct qcom_icc_node * const clk_virt_nodes[] = {
1585 [MASTER_QUP_CORE_0] = &qup0_core_master,
1586 [MASTER_QUP_CORE_1] = &qup1_core_master,
1587 [MASTER_QUP_CORE_2] = &qup2_core_master,
1588 [SLAVE_QUP_CORE_0] = &qup0_core_slave,
1589 [SLAVE_QUP_CORE_1] = &qup1_core_slave,
1590 [SLAVE_QUP_CORE_2] = &qup2_core_slave,
1591 };
1592
1593 static const struct qcom_icc_desc sm8450_clk_virt = {
1594 .nodes = clk_virt_nodes,
1595 .num_nodes = ARRAY_SIZE(clk_virt_nodes),
1596 .bcms = clk_virt_bcms,
1597 .num_bcms = ARRAY_SIZE(clk_virt_bcms),
1598 };
1599
1600 static struct qcom_icc_bcm * const config_noc_bcms[] = {
1601 &bcm_cn0,
1602 };
1603
1604 static struct qcom_icc_node * const config_noc_nodes[] = {
1605 [MASTER_GEM_NOC_CNOC] = &qnm_gemnoc_cnoc,
1606 [MASTER_GEM_NOC_PCIE_SNOC] = &qnm_gemnoc_pcie,
1607 [SLAVE_AHB2PHY_SOUTH] = &qhs_ahb2phy0,
1608 [SLAVE_AHB2PHY_NORTH] = &qhs_ahb2phy1,
1609 [SLAVE_AOSS] = &qhs_aoss,
1610 [SLAVE_CAMERA_CFG] = &qhs_camera_cfg,
1611 [SLAVE_CLK_CTL] = &qhs_clk_ctl,
1612 [SLAVE_CDSP_CFG] = &qhs_compute_cfg,
1613 [SLAVE_RBCPR_CX_CFG] = &qhs_cpr_cx,
1614 [SLAVE_RBCPR_MMCX_CFG] = &qhs_cpr_mmcx,
1615 [SLAVE_RBCPR_MXA_CFG] = &qhs_cpr_mxa,
1616 [SLAVE_RBCPR_MXC_CFG] = &qhs_cpr_mxc,
1617 [SLAVE_CRYPTO_0_CFG] = &qhs_crypto0_cfg,
1618 [SLAVE_CX_RDPM] = &qhs_cx_rdpm,
1619 [SLAVE_DISPLAY_CFG] = &qhs_display_cfg,
1620 [SLAVE_GFX3D_CFG] = &qhs_gpuss_cfg,
1621 [SLAVE_IMEM_CFG] = &qhs_imem_cfg,
1622 [SLAVE_IPA_CFG] = &qhs_ipa,
1623 [SLAVE_IPC_ROUTER_CFG] = &qhs_ipc_router,
1624 [SLAVE_LPASS] = &qhs_lpass_cfg,
1625 [SLAVE_CNOC_MSS] = &qhs_mss_cfg,
1626 [SLAVE_MX_RDPM] = &qhs_mx_rdpm,
1627 [SLAVE_PCIE_0_CFG] = &qhs_pcie0_cfg,
1628 [SLAVE_PCIE_1_CFG] = &qhs_pcie1_cfg,
1629 [SLAVE_PDM] = &qhs_pdm,
1630 [SLAVE_PIMEM_CFG] = &qhs_pimem_cfg,
1631 [SLAVE_PRNG] = &qhs_prng,
1632 [SLAVE_QDSS_CFG] = &qhs_qdss_cfg,
1633 [SLAVE_QSPI_0] = &qhs_qspi,
1634 [SLAVE_QUP_0] = &qhs_qup0,
1635 [SLAVE_QUP_1] = &qhs_qup1,
1636 [SLAVE_QUP_2] = &qhs_qup2,
1637 [SLAVE_SDCC_2] = &qhs_sdc2,
1638 [SLAVE_SDCC_4] = &qhs_sdc4,
1639 [SLAVE_SPSS_CFG] = &qhs_spss_cfg,
1640 [SLAVE_TCSR] = &qhs_tcsr,
1641 [SLAVE_TLMM] = &qhs_tlmm,
1642 [SLAVE_TME_CFG] = &qhs_tme_cfg,
1643 [SLAVE_UFS_MEM_CFG] = &qhs_ufs_mem_cfg,
1644 [SLAVE_USB3_0] = &qhs_usb3_0,
1645 [SLAVE_VENUS_CFG] = &qhs_venus_cfg,
1646 [SLAVE_VSENSE_CTRL_CFG] = &qhs_vsense_ctrl_cfg,
1647 [SLAVE_A1NOC_CFG] = &qns_a1_noc_cfg,
1648 [SLAVE_A2NOC_CFG] = &qns_a2_noc_cfg,
1649 [SLAVE_DDRSS_CFG] = &qns_ddrss_cfg,
1650 [SLAVE_CNOC_MNOC_CFG] = &qns_mnoc_cfg,
1651 [SLAVE_PCIE_ANOC_CFG] = &qns_pcie_anoc_cfg,
1652 [SLAVE_SNOC_CFG] = &qns_snoc_cfg,
1653 [SLAVE_IMEM] = &qxs_imem,
1654 [SLAVE_PIMEM] = &qxs_pimem,
1655 [SLAVE_SERVICE_CNOC] = &srvc_cnoc,
1656 [SLAVE_PCIE_0] = &xs_pcie_0,
1657 [SLAVE_PCIE_1] = &xs_pcie_1,
1658 [SLAVE_QDSS_STM] = &xs_qdss_stm,
1659 [SLAVE_TCU] = &xs_sys_tcu_cfg,
1660 };
1661
1662 static const struct qcom_icc_desc sm8450_config_noc = {
1663 .nodes = config_noc_nodes,
1664 .num_nodes = ARRAY_SIZE(config_noc_nodes),
1665 .bcms = config_noc_bcms,
1666 .num_bcms = ARRAY_SIZE(config_noc_bcms),
1667 };
1668
1669 static struct qcom_icc_bcm * const gem_noc_bcms[] = {
1670 &bcm_sh0,
1671 &bcm_sh1,
1672 &bcm_sh0_disp,
1673 &bcm_sh1_disp,
1674 };
1675
1676 static struct qcom_icc_node * const gem_noc_nodes[] = {
1677 [MASTER_GPU_TCU] = &alm_gpu_tcu,
1678 [MASTER_SYS_TCU] = &alm_sys_tcu,
1679 [MASTER_APPSS_PROC] = &chm_apps,
1680 [MASTER_GFX3D] = &qnm_gpu,
1681 [MASTER_MSS_PROC] = &qnm_mdsp,
1682 [MASTER_MNOC_HF_MEM_NOC] = &qnm_mnoc_hf,
1683 [MASTER_MNOC_SF_MEM_NOC] = &qnm_mnoc_sf,
1684 [MASTER_COMPUTE_NOC] = &qnm_nsp_gemnoc,
1685 [MASTER_ANOC_PCIE_GEM_NOC] = &qnm_pcie,
1686 [MASTER_SNOC_GC_MEM_NOC] = &qnm_snoc_gc,
1687 [MASTER_SNOC_SF_MEM_NOC] = &qnm_snoc_sf,
1688 [SLAVE_GEM_NOC_CNOC] = &qns_gem_noc_cnoc,
1689 [SLAVE_LLCC] = &qns_llcc,
1690 [SLAVE_MEM_NOC_PCIE_SNOC] = &qns_pcie,
1691 [MASTER_MNOC_HF_MEM_NOC_DISP] = &qnm_mnoc_hf_disp,
1692 [MASTER_MNOC_SF_MEM_NOC_DISP] = &qnm_mnoc_sf_disp,
1693 [MASTER_ANOC_PCIE_GEM_NOC_DISP] = &qnm_pcie_disp,
1694 [SLAVE_LLCC_DISP] = &qns_llcc_disp,
1695 };
1696
1697 static const struct qcom_icc_desc sm8450_gem_noc = {
1698 .nodes = gem_noc_nodes,
1699 .num_nodes = ARRAY_SIZE(gem_noc_nodes),
1700 .bcms = gem_noc_bcms,
1701 .num_bcms = ARRAY_SIZE(gem_noc_bcms),
1702 };
1703
1704 static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] = {
1705 };
1706
1707 static struct qcom_icc_node * const lpass_ag_noc_nodes[] = {
1708 [MASTER_CNOC_LPASS_AG_NOC] = &qhm_config_noc,
1709 [MASTER_LPASS_PROC] = &qxm_lpass_dsp,
1710 [SLAVE_LPASS_CORE_CFG] = &qhs_lpass_core,
1711 [SLAVE_LPASS_LPI_CFG] = &qhs_lpass_lpi,
1712 [SLAVE_LPASS_MPU_CFG] = &qhs_lpass_mpu,
1713 [SLAVE_LPASS_TOP_CFG] = &qhs_lpass_top,
1714 [SLAVE_LPASS_SNOC] = &qns_sysnoc,
1715 [SLAVE_SERVICES_LPASS_AML_NOC] = &srvc_niu_aml_noc,
1716 [SLAVE_SERVICE_LPASS_AG_NOC] = &srvc_niu_lpass_agnoc,
1717 };
1718
1719 static const struct qcom_icc_desc sm8450_lpass_ag_noc = {
1720 .nodes = lpass_ag_noc_nodes,
1721 .num_nodes = ARRAY_SIZE(lpass_ag_noc_nodes),
1722 .bcms = lpass_ag_noc_bcms,
1723 .num_bcms = ARRAY_SIZE(lpass_ag_noc_bcms),
1724 };
1725
1726 static struct qcom_icc_bcm * const mc_virt_bcms[] = {
1727 &bcm_acv,
1728 &bcm_mc0,
1729 &bcm_acv_disp,
1730 &bcm_mc0_disp,
1731 };
1732
1733 static struct qcom_icc_node * const mc_virt_nodes[] = {
1734 [MASTER_LLCC] = &llcc_mc,
1735 [SLAVE_EBI1] = &ebi,
1736 [MASTER_LLCC_DISP] = &llcc_mc_disp,
1737 [SLAVE_EBI1_DISP] = &ebi_disp,
1738 };
1739
1740 static const struct qcom_icc_desc sm8450_mc_virt = {
1741 .nodes = mc_virt_nodes,
1742 .num_nodes = ARRAY_SIZE(mc_virt_nodes),
1743 .bcms = mc_virt_bcms,
1744 .num_bcms = ARRAY_SIZE(mc_virt_bcms),
1745 };
1746
1747 static struct qcom_icc_bcm * const mmss_noc_bcms[] = {
1748 &bcm_mm0,
1749 &bcm_mm1,
1750 &bcm_mm0_disp,
1751 &bcm_mm1_disp,
1752 };
1753
1754 static struct qcom_icc_node * const mmss_noc_nodes[] = {
1755 [MASTER_CAMNOC_HF] = &qnm_camnoc_hf,
1756 [MASTER_CAMNOC_ICP] = &qnm_camnoc_icp,
1757 [MASTER_CAMNOC_SF] = &qnm_camnoc_sf,
1758 [MASTER_MDP] = &qnm_mdp,
1759 [MASTER_CNOC_MNOC_CFG] = &qnm_mnoc_cfg,
1760 [MASTER_ROTATOR] = &qnm_rot,
1761 [MASTER_CDSP_HCP] = &qnm_vapss_hcp,
1762 [MASTER_VIDEO] = &qnm_video,
1763 [MASTER_VIDEO_CV_PROC] = &qnm_video_cv_cpu,
1764 [MASTER_VIDEO_PROC] = &qnm_video_cvp,
1765 [MASTER_VIDEO_V_PROC] = &qnm_video_v_cpu,
1766 [SLAVE_MNOC_HF_MEM_NOC] = &qns_mem_noc_hf,
1767 [SLAVE_MNOC_SF_MEM_NOC] = &qns_mem_noc_sf,
1768 [SLAVE_SERVICE_MNOC] = &srvc_mnoc,
1769 [MASTER_MDP_DISP] = &qnm_mdp_disp,
1770 [MASTER_ROTATOR_DISP] = &qnm_rot_disp,
1771 [SLAVE_MNOC_HF_MEM_NOC_DISP] = &qns_mem_noc_hf_disp,
1772 [SLAVE_MNOC_SF_MEM_NOC_DISP] = &qns_mem_noc_sf_disp,
1773 };
1774
1775 static const struct qcom_icc_desc sm8450_mmss_noc = {
1776 .nodes = mmss_noc_nodes,
1777 .num_nodes = ARRAY_SIZE(mmss_noc_nodes),
1778 .bcms = mmss_noc_bcms,
1779 .num_bcms = ARRAY_SIZE(mmss_noc_bcms),
1780 };
1781
1782 static struct qcom_icc_bcm * const nsp_noc_bcms[] = {
1783 &bcm_co0,
1784 };
1785
1786 static struct qcom_icc_node * const nsp_noc_nodes[] = {
1787 [MASTER_CDSP_NOC_CFG] = &qhm_nsp_noc_config,
1788 [MASTER_CDSP_PROC] = &qxm_nsp,
1789 [SLAVE_CDSP_MEM_NOC] = &qns_nsp_gemnoc,
1790 [SLAVE_SERVICE_NSP_NOC] = &service_nsp_noc,
1791 };
1792
1793 static const struct qcom_icc_desc sm8450_nsp_noc = {
1794 .nodes = nsp_noc_nodes,
1795 .num_nodes = ARRAY_SIZE(nsp_noc_nodes),
1796 .bcms = nsp_noc_bcms,
1797 .num_bcms = ARRAY_SIZE(nsp_noc_bcms),
1798 };
1799
1800 static struct qcom_icc_bcm * const pcie_anoc_bcms[] = {
1801 &bcm_sn7,
1802 };
1803
1804 static struct qcom_icc_node * const pcie_anoc_nodes[] = {
1805 [MASTER_PCIE_ANOC_CFG] = &qnm_pcie_anoc_cfg,
1806 [MASTER_PCIE_0] = &xm_pcie3_0,
1807 [MASTER_PCIE_1] = &xm_pcie3_1,
1808 [SLAVE_ANOC_PCIE_GEM_NOC] = &qns_pcie_mem_noc,
1809 [SLAVE_SERVICE_PCIE_ANOC] = &srvc_pcie_aggre_noc,
1810 };
1811
1812 static const struct qcom_icc_desc sm8450_pcie_anoc = {
1813 .nodes = pcie_anoc_nodes,
1814 .num_nodes = ARRAY_SIZE(pcie_anoc_nodes),
1815 .bcms = pcie_anoc_bcms,
1816 .num_bcms = ARRAY_SIZE(pcie_anoc_bcms),
1817 };
1818
1819 static struct qcom_icc_bcm * const system_noc_bcms[] = {
1820 &bcm_sn0,
1821 &bcm_sn1,
1822 &bcm_sn2,
1823 &bcm_sn3,
1824 &bcm_sn4,
1825 };
1826
1827 static struct qcom_icc_node * const system_noc_nodes[] = {
1828 [MASTER_GIC_AHB] = &qhm_gic,
1829 [MASTER_A1NOC_SNOC] = &qnm_aggre1_noc,
1830 [MASTER_A2NOC_SNOC] = &qnm_aggre2_noc,
1831 [MASTER_LPASS_ANOC] = &qnm_lpass_noc,
1832 [MASTER_SNOC_CFG] = &qnm_snoc_cfg,
1833 [MASTER_PIMEM] = &qxm_pimem,
1834 [MASTER_GIC] = &xm_gic,
1835 [SLAVE_SNOC_GEM_NOC_GC] = &qns_gemnoc_gc,
1836 [SLAVE_SNOC_GEM_NOC_SF] = &qns_gemnoc_sf,
1837 [SLAVE_SERVICE_SNOC] = &srvc_snoc,
1838 };
1839
1840 static const struct qcom_icc_desc sm8450_system_noc = {
1841 .nodes = system_noc_nodes,
1842 .num_nodes = ARRAY_SIZE(system_noc_nodes),
1843 .bcms = system_noc_bcms,
1844 .num_bcms = ARRAY_SIZE(system_noc_bcms),
1845 };
1846
1847 static int qnoc_probe(struct platform_device *pdev)
1848 {
1849 const struct qcom_icc_desc *desc;
1850 struct icc_onecell_data *data;
1851 struct icc_provider *provider;
1852 struct qcom_icc_node * const *qnodes;
1853 struct qcom_icc_provider *qp;
1854 struct icc_node *node;
1855 size_t num_nodes, i;
1856 int ret;
1857
1858 desc = device_get_match_data(&pdev->dev);
1859 if (!desc)
1860 return -EINVAL;
1861
1862 qnodes = desc->nodes;
1863 num_nodes = desc->num_nodes;
1864
1865 qp = devm_kzalloc(&pdev->dev, sizeof(*qp), GFP_KERNEL);
1866 if (!qp)
1867 return -ENOMEM;
1868
1869 data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL);
1870 if (!data)
1871 return -ENOMEM;
1872
1873 provider = &qp->provider;
1874 provider->dev = &pdev->dev;
1875 provider->set = qcom_icc_set;
1876 provider->pre_aggregate = qcom_icc_pre_aggregate;
1877 provider->aggregate = qcom_icc_aggregate;
1878 provider->xlate_extended = qcom_icc_xlate_extended;
1879 INIT_LIST_HEAD(&provider->nodes);
1880 provider->data = data;
1881
1882 qp->dev = &pdev->dev;
1883 qp->bcms = desc->bcms;
1884 qp->num_bcms = desc->num_bcms;
1885
1886 qp->voter = of_bcm_voter_get(qp->dev, NULL);
1887 if (IS_ERR(qp->voter))
1888 return PTR_ERR(qp->voter);
1889
1890 ret = icc_provider_add(provider);
1891 if (ret) {
1892 dev_err(&pdev->dev, "error adding interconnect provider\n");
1893 return ret;
1894 }
1895
1896 for (i = 0; i < qp->num_bcms; i++)
1897 qcom_icc_bcm_init(qp->bcms[i], &pdev->dev);
1898
1899 for (i = 0; i < num_nodes; i++) {
1900 size_t j;
1901
1902 if (!qnodes[i])
1903 continue;
1904
1905 node = icc_node_create(qnodes[i]->id);
1906 if (IS_ERR(node)) {
1907 ret = PTR_ERR(node);
1908 goto err;
1909 }
1910
1911 node->name = qnodes[i]->name;
1912 node->data = qnodes[i];
1913 icc_node_add(node, provider);
1914
1915 for (j = 0; j < qnodes[i]->num_links; j++)
1916 icc_link_create(node, qnodes[i]->links[j]);
1917
1918 data->nodes[i] = node;
1919 }
1920 data->num_nodes = num_nodes;
1921
1922 platform_set_drvdata(pdev, qp);
1923
1924 return 0;
1925 err:
1926 icc_nodes_remove(provider);
1927 icc_provider_del(provider);
1928 return ret;
1929 }
1930
1931 static int qnoc_remove(struct platform_device *pdev)
1932 {
1933 struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
1934
1935 icc_nodes_remove(&qp->provider);
1936 return icc_provider_del(&qp->provider);
1937 }
1938
1939 static const struct of_device_id qnoc_of_match[] = {
1940 { .compatible = "qcom,sm8450-aggre1-noc",
1941 .data = &sm8450_aggre1_noc},
1942 { .compatible = "qcom,sm8450-aggre2-noc",
1943 .data = &sm8450_aggre2_noc},
1944 { .compatible = "qcom,sm8450-clk-virt",
1945 .data = &sm8450_clk_virt},
1946 { .compatible = "qcom,sm8450-config-noc",
1947 .data = &sm8450_config_noc},
1948 { .compatible = "qcom,sm8450-gem-noc",
1949 .data = &sm8450_gem_noc},
1950 { .compatible = "qcom,sm8450-lpass-ag-noc",
1951 .data = &sm8450_lpass_ag_noc},
1952 { .compatible = "qcom,sm8450-mc-virt",
1953 .data = &sm8450_mc_virt},
1954 { .compatible = "qcom,sm8450-mmss-noc",
1955 .data = &sm8450_mmss_noc},
1956 { .compatible = "qcom,sm8450-nsp-noc",
1957 .data = &sm8450_nsp_noc},
1958 { .compatible = "qcom,sm8450-pcie-anoc",
1959 .data = &sm8450_pcie_anoc},
1960 { .compatible = "qcom,sm8450-system-noc",
1961 .data = &sm8450_system_noc},
1962 { }
1963 };
1964 MODULE_DEVICE_TABLE(of, qnoc_of_match);
1965
1966 static struct platform_driver qnoc_driver = {
1967 .probe = qnoc_probe,
1968 .remove = qnoc_remove,
1969 .driver = {
1970 .name = "qnoc-sm8450",
1971 .of_match_table = qnoc_of_match,
1972 },
1973 };
1974
1975 static int __init qnoc_driver_init(void)
1976 {
1977 return platform_driver_register(&qnoc_driver);
1978 }
1979 core_initcall(qnoc_driver_init);
1980
1981 static void __exit qnoc_driver_exit(void)
1982 {
1983 platform_driver_unregister(&qnoc_driver);
1984 }
1985 module_exit(qnoc_driver_exit);
1986
1987 MODULE_DESCRIPTION("sm8450 NoC driver");
1988 MODULE_LICENSE("GPL v2");