1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
5 * Copyright (c) 2023, Linaro Limited
8 #include <dt-bindings/interconnect/qcom,sm6115.h>
9 #include <linux/device.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 <linux/regmap.h>
18 static const char * const snoc_intf_clocks
[] = {
22 "ipa", /* Required by qxm_ipa */
25 static const char * const cnoc_intf_clocks
[] = {
30 SM6115_MASTER_AMPSS_M0
,
31 SM6115_MASTER_ANOC_SNOC
,
32 SM6115_MASTER_BIMC_SNOC
,
33 SM6115_MASTER_CAMNOC_HF
,
34 SM6115_MASTER_CAMNOC_SF
,
35 SM6115_MASTER_CRYPTO_CORE0
,
36 SM6115_MASTER_GRAPHICS_3D
,
38 SM6115_MASTER_MDP_PORT0
,
40 SM6115_MASTER_QDSS_BAM
,
41 SM6115_MASTER_QDSS_DAP
,
42 SM6115_MASTER_QDSS_ETR
,
45 SM6115_MASTER_QUP_CORE_0
,
48 SM6115_MASTER_SNOC_BIMC_NRT
,
49 SM6115_MASTER_SNOC_BIMC_RT
,
50 SM6115_MASTER_SNOC_BIMC
,
51 SM6115_MASTER_SNOC_CFG
,
52 SM6115_MASTER_SNOC_CNOC
,
56 SM6115_MASTER_VIDEO_P0
,
57 SM6115_MASTER_VIDEO_PROC
,
59 SM6115_SLAVE_AHB2PHY_USB
,
60 SM6115_SLAVE_ANOC_SNOC
,
62 SM6115_SLAVE_APSS_THROTTLE_CFG
,
63 SM6115_SLAVE_BIMC_CFG
,
64 SM6115_SLAVE_BIMC_SNOC
,
65 SM6115_SLAVE_BOOT_ROM
,
66 SM6115_SLAVE_CAMERA_CFG
,
67 SM6115_SLAVE_CAMERA_NRT_THROTTLE_CFG
,
68 SM6115_SLAVE_CAMERA_RT_THROTTLE_CFG
,
70 SM6115_SLAVE_CNOC_MSS
,
71 SM6115_SLAVE_CRYPTO_0_CFG
,
73 SM6115_SLAVE_DDR_PHY_CFG
,
74 SM6115_SLAVE_DDR_SS_CFG
,
75 SM6115_SLAVE_DISPLAY_CFG
,
76 SM6115_SLAVE_DISPLAY_THROTTLE_CFG
,
79 SM6115_SLAVE_GPU_THROTTLE_CFG
,
80 SM6115_SLAVE_HWKM_CORE
,
81 SM6115_SLAVE_IMEM_CFG
,
85 SM6115_SLAVE_MDSP_MPU_CFG
,
86 SM6115_SLAVE_MESSAGE_RAM
,
89 SM6115_SLAVE_PIMEM_CFG
,
91 SM6115_SLAVE_PKA_CORE
,
92 SM6115_SLAVE_PMIC_ARB
,
93 SM6115_SLAVE_QDSS_CFG
,
94 SM6115_SLAVE_QDSS_STM
,
96 SM6115_SLAVE_QM_MPU_CFG
,
99 SM6115_SLAVE_QUP_CORE_0
,
100 SM6115_SLAVE_RBCPR_CX_CFG
,
101 SM6115_SLAVE_RBCPR_MX_CFG
,
105 SM6115_SLAVE_SECURITY
,
106 SM6115_SLAVE_SERVICE_CNOC
,
107 SM6115_SLAVE_SERVICE_SNOC
,
108 SM6115_SLAVE_SNOC_BIMC_NRT
,
109 SM6115_SLAVE_SNOC_BIMC_RT
,
110 SM6115_SLAVE_SNOC_BIMC
,
111 SM6115_SLAVE_SNOC_CFG
,
112 SM6115_SLAVE_SNOC_CNOC
,
117 SM6115_SLAVE_VENUS_CFG
,
118 SM6115_SLAVE_VENUS_THROTTLE_CFG
,
119 SM6115_SLAVE_VSENSE_CTRL_CFG
,
122 static const u16 slv_ebi_slv_bimc_snoc_links
[] = {
123 SM6115_SLAVE_EBI_CH0
,
124 SM6115_SLAVE_BIMC_SNOC
,
127 static struct qcom_icc_node apps_proc
= {
129 .id
= SM6115_MASTER_AMPSS_M0
,
133 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
138 .num_links
= ARRAY_SIZE(slv_ebi_slv_bimc_snoc_links
),
139 .links
= slv_ebi_slv_bimc_snoc_links
,
142 static const u16 link_slv_ebi
[] = {
143 SM6115_SLAVE_EBI_CH0
,
146 static struct qcom_icc_node mas_snoc_bimc_rt
= {
147 .name
= "mas_snoc_bimc_rt",
148 .id
= SM6115_MASTER_SNOC_BIMC_RT
,
152 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
157 .num_links
= ARRAY_SIZE(link_slv_ebi
),
158 .links
= link_slv_ebi
,
161 static struct qcom_icc_node mas_snoc_bimc_nrt
= {
162 .name
= "mas_snoc_bimc_nrt",
163 .id
= SM6115_MASTER_SNOC_BIMC_NRT
,
167 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
172 .num_links
= ARRAY_SIZE(link_slv_ebi
),
173 .links
= link_slv_ebi
,
176 static struct qcom_icc_node mas_snoc_bimc
= {
177 .name
= "mas_snoc_bimc",
178 .id
= SM6115_MASTER_SNOC_BIMC
,
182 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
187 .num_links
= ARRAY_SIZE(link_slv_ebi
),
188 .links
= link_slv_ebi
,
191 static struct qcom_icc_node qnm_gpu
= {
193 .id
= SM6115_MASTER_GRAPHICS_3D
,
197 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
202 .num_links
= ARRAY_SIZE(slv_ebi_slv_bimc_snoc_links
),
203 .links
= slv_ebi_slv_bimc_snoc_links
,
206 static struct qcom_icc_node tcu_0
= {
208 .id
= SM6115_MASTER_TCU_0
,
212 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
217 .num_links
= ARRAY_SIZE(slv_ebi_slv_bimc_snoc_links
),
218 .links
= slv_ebi_slv_bimc_snoc_links
,
221 static const u16 qup_core_0_links
[] = {
222 SM6115_SLAVE_QUP_CORE_0
,
225 static struct qcom_icc_node qup0_core_master
= {
226 .name
= "qup0_core_master",
227 .id
= SM6115_MASTER_QUP_CORE_0
,
232 .num_links
= ARRAY_SIZE(qup_core_0_links
),
233 .links
= qup_core_0_links
,
236 static const u16 link_slv_anoc_snoc
[] = {
237 SM6115_SLAVE_ANOC_SNOC
,
240 static struct qcom_icc_node crypto_c0
= {
242 .id
= SM6115_MASTER_CRYPTO_CORE0
,
246 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
250 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
251 .links
= link_slv_anoc_snoc
,
254 static const u16 mas_snoc_cnoc_links
[] = {
255 SM6115_SLAVE_AHB2PHY_USB
,
256 SM6115_SLAVE_APSS_THROTTLE_CFG
,
257 SM6115_SLAVE_BIMC_CFG
,
258 SM6115_SLAVE_BOOT_ROM
,
259 SM6115_SLAVE_CAMERA_CFG
,
260 SM6115_SLAVE_CAMERA_NRT_THROTTLE_CFG
,
261 SM6115_SLAVE_CAMERA_RT_THROTTLE_CFG
,
262 SM6115_SLAVE_CLK_CTL
,
263 SM6115_SLAVE_CNOC_MSS
,
264 SM6115_SLAVE_CRYPTO_0_CFG
,
265 SM6115_SLAVE_DCC_CFG
,
266 SM6115_SLAVE_DDR_PHY_CFG
,
267 SM6115_SLAVE_DDR_SS_CFG
,
268 SM6115_SLAVE_DISPLAY_CFG
,
269 SM6115_SLAVE_DISPLAY_THROTTLE_CFG
,
270 SM6115_SLAVE_GPU_CFG
,
271 SM6115_SLAVE_GPU_THROTTLE_CFG
,
272 SM6115_SLAVE_HWKM_CORE
,
273 SM6115_SLAVE_IMEM_CFG
,
274 SM6115_SLAVE_IPA_CFG
,
277 SM6115_SLAVE_MDSP_MPU_CFG
,
278 SM6115_SLAVE_MESSAGE_RAM
,
280 SM6115_SLAVE_PIMEM_CFG
,
281 SM6115_SLAVE_PKA_CORE
,
282 SM6115_SLAVE_PMIC_ARB
,
283 SM6115_SLAVE_QDSS_CFG
,
285 SM6115_SLAVE_QM_MPU_CFG
,
288 SM6115_SLAVE_RBCPR_CX_CFG
,
289 SM6115_SLAVE_RBCPR_MX_CFG
,
293 SM6115_SLAVE_SECURITY
,
294 SM6115_SLAVE_SERVICE_CNOC
,
295 SM6115_SLAVE_SNOC_CFG
,
299 SM6115_SLAVE_VENUS_CFG
,
300 SM6115_SLAVE_VENUS_THROTTLE_CFG
,
301 SM6115_SLAVE_VSENSE_CTRL_CFG
,
304 static struct qcom_icc_node mas_snoc_cnoc
= {
305 .name
= "mas_snoc_cnoc",
306 .id
= SM6115_MASTER_SNOC_CNOC
,
311 .num_links
= ARRAY_SIZE(mas_snoc_cnoc_links
),
312 .links
= mas_snoc_cnoc_links
,
315 static struct qcom_icc_node xm_dap
= {
317 .id
= SM6115_MASTER_QDSS_DAP
,
322 .num_links
= ARRAY_SIZE(mas_snoc_cnoc_links
),
323 .links
= mas_snoc_cnoc_links
,
326 static const u16 link_slv_snoc_bimc_nrt
[] = {
327 SM6115_SLAVE_SNOC_BIMC_NRT
,
330 static struct qcom_icc_node qnm_camera_nrt
= {
331 .name
= "qnm_camera_nrt",
332 .id
= SM6115_MASTER_CAMNOC_SF
,
336 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
340 .num_links
= ARRAY_SIZE(link_slv_snoc_bimc_nrt
),
341 .links
= link_slv_snoc_bimc_nrt
,
344 static struct qcom_icc_node qxm_venus0
= {
345 .name
= "qxm_venus0",
346 .id
= SM6115_MASTER_VIDEO_P0
,
350 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
352 .qos
.urg_fwd_en
= true,
355 .num_links
= ARRAY_SIZE(link_slv_snoc_bimc_nrt
),
356 .links
= link_slv_snoc_bimc_nrt
,
359 static struct qcom_icc_node qxm_venus_cpu
= {
360 .name
= "qxm_venus_cpu",
361 .id
= SM6115_MASTER_VIDEO_PROC
,
365 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
369 .num_links
= ARRAY_SIZE(link_slv_snoc_bimc_nrt
),
370 .links
= link_slv_snoc_bimc_nrt
,
373 static const u16 link_slv_snoc_bimc_rt
[] = {
374 SM6115_SLAVE_SNOC_BIMC_RT
,
377 static struct qcom_icc_node qnm_camera_rt
= {
378 .name
= "qnm_camera_rt",
379 .id
= SM6115_MASTER_CAMNOC_HF
,
383 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
385 .qos
.urg_fwd_en
= true,
388 .num_links
= ARRAY_SIZE(link_slv_snoc_bimc_rt
),
389 .links
= link_slv_snoc_bimc_rt
,
392 static struct qcom_icc_node qxm_mdp0
= {
394 .id
= SM6115_MASTER_MDP_PORT0
,
398 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
400 .qos
.urg_fwd_en
= true,
403 .num_links
= ARRAY_SIZE(link_slv_snoc_bimc_rt
),
404 .links
= link_slv_snoc_bimc_rt
,
407 static const u16 slv_service_snoc_links
[] = {
408 SM6115_SLAVE_SERVICE_SNOC
,
411 static struct qcom_icc_node qhm_snoc_cfg
= {
412 .name
= "qhm_snoc_cfg",
413 .id
= SM6115_MASTER_SNOC_CFG
,
418 .num_links
= ARRAY_SIZE(slv_service_snoc_links
),
419 .links
= slv_service_snoc_links
,
422 static const u16 mas_tic_links
[] = {
426 SM6115_SLAVE_QDSS_STM
,
428 SM6115_SLAVE_SNOC_BIMC
,
429 SM6115_SLAVE_SNOC_CNOC
,
432 static struct qcom_icc_node qhm_tic
= {
434 .id
= SM6115_MASTER_TIC
,
438 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
442 .num_links
= ARRAY_SIZE(mas_tic_links
),
443 .links
= mas_tic_links
,
446 static struct qcom_icc_node mas_anoc_snoc
= {
447 .name
= "mas_anoc_snoc",
448 .id
= SM6115_MASTER_ANOC_SNOC
,
453 .num_links
= ARRAY_SIZE(mas_tic_links
),
454 .links
= mas_tic_links
,
457 static const u16 mas_bimc_snoc_links
[] = {
459 SM6115_SLAVE_SNOC_CNOC
,
462 SM6115_SLAVE_QDSS_STM
,
466 static struct qcom_icc_node mas_bimc_snoc
= {
467 .name
= "mas_bimc_snoc",
468 .id
= SM6115_MASTER_BIMC_SNOC
,
473 .num_links
= ARRAY_SIZE(mas_bimc_snoc_links
),
474 .links
= mas_bimc_snoc_links
,
477 static const u16 mas_pimem_links
[] = {
479 SM6115_SLAVE_SNOC_BIMC
,
482 static struct qcom_icc_node qxm_pimem
= {
484 .id
= SM6115_MASTER_PIMEM
,
488 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
492 .num_links
= ARRAY_SIZE(mas_pimem_links
),
493 .links
= mas_pimem_links
,
496 static struct qcom_icc_node qhm_qdss_bam
= {
497 .name
= "qhm_qdss_bam",
498 .id
= SM6115_MASTER_QDSS_BAM
,
502 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
506 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
507 .links
= link_slv_anoc_snoc
,
510 static struct qcom_icc_node qhm_qpic
= {
512 .id
= SM6115_MASTER_QPIC
,
517 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
518 .links
= link_slv_anoc_snoc
,
521 static struct qcom_icc_node qhm_qup0
= {
523 .id
= SM6115_MASTER_QUP_0
,
527 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
531 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
532 .links
= link_slv_anoc_snoc
,
535 static struct qcom_icc_node qxm_ipa
= {
537 .id
= SM6115_MASTER_IPA
,
541 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
545 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
546 .links
= link_slv_anoc_snoc
,
549 static struct qcom_icc_node xm_qdss_etr
= {
550 .name
= "xm_qdss_etr",
551 .id
= SM6115_MASTER_QDSS_ETR
,
555 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
559 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
560 .links
= link_slv_anoc_snoc
,
563 static struct qcom_icc_node xm_sdc1
= {
565 .id
= SM6115_MASTER_SDCC_1
,
569 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
573 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
574 .links
= link_slv_anoc_snoc
,
577 static struct qcom_icc_node xm_sdc2
= {
579 .id
= SM6115_MASTER_SDCC_2
,
583 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
587 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
588 .links
= link_slv_anoc_snoc
,
591 static struct qcom_icc_node xm_usb3_0
= {
593 .id
= SM6115_MASTER_USB3
,
597 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
601 .num_links
= ARRAY_SIZE(link_slv_anoc_snoc
),
602 .links
= link_slv_anoc_snoc
,
605 static struct qcom_icc_node ebi
= {
607 .id
= SM6115_SLAVE_EBI_CH0
,
614 static const u16 slv_bimc_snoc_links
[] = {
615 SM6115_MASTER_BIMC_SNOC
,
618 static struct qcom_icc_node slv_bimc_snoc
= {
619 .name
= "slv_bimc_snoc",
620 .id
= SM6115_SLAVE_BIMC_SNOC
,
625 .num_links
= ARRAY_SIZE(slv_bimc_snoc_links
),
626 .links
= slv_bimc_snoc_links
,
629 static struct qcom_icc_node qup0_core_slave
= {
630 .name
= "qup0_core_slave",
631 .id
= SM6115_SLAVE_QUP_CORE_0
,
638 static struct qcom_icc_node qhs_ahb2phy_usb
= {
639 .name
= "qhs_ahb2phy_usb",
640 .id
= SM6115_SLAVE_AHB2PHY_USB
,
647 static struct qcom_icc_node qhs_apss_throttle_cfg
= {
648 .name
= "qhs_apss_throttle_cfg",
649 .id
= SM6115_SLAVE_APSS_THROTTLE_CFG
,
656 static struct qcom_icc_node qhs_bimc_cfg
= {
657 .name
= "qhs_bimc_cfg",
658 .id
= SM6115_SLAVE_BIMC_CFG
,
665 static struct qcom_icc_node qhs_boot_rom
= {
666 .name
= "qhs_boot_rom",
667 .id
= SM6115_SLAVE_BOOT_ROM
,
674 static struct qcom_icc_node qhs_camera_nrt_throttle_cfg
= {
675 .name
= "qhs_camera_nrt_throttle_cfg",
676 .id
= SM6115_SLAVE_CAMERA_NRT_THROTTLE_CFG
,
683 static struct qcom_icc_node qhs_camera_rt_throttle_cfg
= {
684 .name
= "qhs_camera_rt_throttle_cfg",
685 .id
= SM6115_SLAVE_CAMERA_RT_THROTTLE_CFG
,
692 static struct qcom_icc_node qhs_camera_ss_cfg
= {
693 .name
= "qhs_camera_ss_cfg",
694 .id
= SM6115_SLAVE_CAMERA_CFG
,
701 static struct qcom_icc_node qhs_clk_ctl
= {
702 .name
= "qhs_clk_ctl",
703 .id
= SM6115_SLAVE_CLK_CTL
,
710 static struct qcom_icc_node qhs_cpr_cx
= {
711 .name
= "qhs_cpr_cx",
712 .id
= SM6115_SLAVE_RBCPR_CX_CFG
,
719 static struct qcom_icc_node qhs_cpr_mx
= {
720 .name
= "qhs_cpr_mx",
721 .id
= SM6115_SLAVE_RBCPR_MX_CFG
,
728 static struct qcom_icc_node qhs_crypto0_cfg
= {
729 .name
= "qhs_crypto0_cfg",
730 .id
= SM6115_SLAVE_CRYPTO_0_CFG
,
737 static struct qcom_icc_node qhs_dcc_cfg
= {
738 .name
= "qhs_dcc_cfg",
739 .id
= SM6115_SLAVE_DCC_CFG
,
746 static struct qcom_icc_node qhs_ddr_phy_cfg
= {
747 .name
= "qhs_ddr_phy_cfg",
748 .id
= SM6115_SLAVE_DDR_PHY_CFG
,
755 static struct qcom_icc_node qhs_ddr_ss_cfg
= {
756 .name
= "qhs_ddr_ss_cfg",
757 .id
= SM6115_SLAVE_DDR_SS_CFG
,
764 static struct qcom_icc_node qhs_disp_ss_cfg
= {
765 .name
= "qhs_disp_ss_cfg",
766 .id
= SM6115_SLAVE_DISPLAY_CFG
,
773 static struct qcom_icc_node qhs_display_throttle_cfg
= {
774 .name
= "qhs_display_throttle_cfg",
775 .id
= SM6115_SLAVE_DISPLAY_THROTTLE_CFG
,
782 static struct qcom_icc_node qhs_gpu_cfg
= {
783 .name
= "qhs_gpu_cfg",
784 .id
= SM6115_SLAVE_GPU_CFG
,
791 static struct qcom_icc_node qhs_gpu_throttle_cfg
= {
792 .name
= "qhs_gpu_throttle_cfg",
793 .id
= SM6115_SLAVE_GPU_THROTTLE_CFG
,
800 static struct qcom_icc_node qhs_hwkm
= {
802 .id
= SM6115_SLAVE_HWKM_CORE
,
809 static struct qcom_icc_node qhs_imem_cfg
= {
810 .name
= "qhs_imem_cfg",
811 .id
= SM6115_SLAVE_IMEM_CFG
,
818 static struct qcom_icc_node qhs_ipa_cfg
= {
819 .name
= "qhs_ipa_cfg",
820 .id
= SM6115_SLAVE_IPA_CFG
,
827 static struct qcom_icc_node qhs_lpass
= {
829 .id
= SM6115_SLAVE_LPASS
,
836 static struct qcom_icc_node qhs_mapss
= {
838 .id
= SM6115_SLAVE_MAPSS
,
845 static struct qcom_icc_node qhs_mdsp_mpu_cfg
= {
846 .name
= "qhs_mdsp_mpu_cfg",
847 .id
= SM6115_SLAVE_MDSP_MPU_CFG
,
854 static struct qcom_icc_node qhs_mesg_ram
= {
855 .name
= "qhs_mesg_ram",
856 .id
= SM6115_SLAVE_MESSAGE_RAM
,
863 static struct qcom_icc_node qhs_mss
= {
865 .id
= SM6115_SLAVE_CNOC_MSS
,
872 static struct qcom_icc_node qhs_pdm
= {
874 .id
= SM6115_SLAVE_PDM
,
881 static struct qcom_icc_node qhs_pimem_cfg
= {
882 .name
= "qhs_pimem_cfg",
883 .id
= SM6115_SLAVE_PIMEM_CFG
,
890 static struct qcom_icc_node qhs_pka_wrapper
= {
891 .name
= "qhs_pka_wrapper",
892 .id
= SM6115_SLAVE_PKA_CORE
,
899 static struct qcom_icc_node qhs_pmic_arb
= {
900 .name
= "qhs_pmic_arb",
901 .id
= SM6115_SLAVE_PMIC_ARB
,
908 static struct qcom_icc_node qhs_qdss_cfg
= {
909 .name
= "qhs_qdss_cfg",
910 .id
= SM6115_SLAVE_QDSS_CFG
,
917 static struct qcom_icc_node qhs_qm_cfg
= {
918 .name
= "qhs_qm_cfg",
919 .id
= SM6115_SLAVE_QM_CFG
,
926 static struct qcom_icc_node qhs_qm_mpu_cfg
= {
927 .name
= "qhs_qm_mpu_cfg",
928 .id
= SM6115_SLAVE_QM_MPU_CFG
,
935 static struct qcom_icc_node qhs_qpic
= {
937 .id
= SM6115_SLAVE_QPIC
,
944 static struct qcom_icc_node qhs_qup0
= {
946 .id
= SM6115_SLAVE_QUP_0
,
953 static struct qcom_icc_node qhs_rpm
= {
955 .id
= SM6115_SLAVE_RPM
,
962 static struct qcom_icc_node qhs_sdc1
= {
964 .id
= SM6115_SLAVE_SDCC_1
,
971 static struct qcom_icc_node qhs_sdc2
= {
973 .id
= SM6115_SLAVE_SDCC_2
,
980 static struct qcom_icc_node qhs_security
= {
981 .name
= "qhs_security",
982 .id
= SM6115_SLAVE_SECURITY
,
989 static const u16 slv_snoc_cfg_links
[] = {
990 SM6115_MASTER_SNOC_CFG
,
993 static struct qcom_icc_node qhs_snoc_cfg
= {
994 .name
= "qhs_snoc_cfg",
995 .id
= SM6115_SLAVE_SNOC_CFG
,
1000 .num_links
= ARRAY_SIZE(slv_snoc_cfg_links
),
1001 .links
= slv_snoc_cfg_links
,
1004 static struct qcom_icc_node qhs_tcsr
= {
1006 .id
= SM6115_SLAVE_TCSR
,
1013 static struct qcom_icc_node qhs_tlmm
= {
1015 .id
= SM6115_SLAVE_TLMM
,
1022 static struct qcom_icc_node qhs_usb3
= {
1024 .id
= SM6115_SLAVE_USB3
,
1031 static struct qcom_icc_node qhs_venus_cfg
= {
1032 .name
= "qhs_venus_cfg",
1033 .id
= SM6115_SLAVE_VENUS_CFG
,
1040 static struct qcom_icc_node qhs_venus_throttle_cfg
= {
1041 .name
= "qhs_venus_throttle_cfg",
1042 .id
= SM6115_SLAVE_VENUS_THROTTLE_CFG
,
1049 static struct qcom_icc_node qhs_vsense_ctrl_cfg
= {
1050 .name
= "qhs_vsense_ctrl_cfg",
1051 .id
= SM6115_SLAVE_VSENSE_CTRL_CFG
,
1058 static struct qcom_icc_node srvc_cnoc
= {
1059 .name
= "srvc_cnoc",
1060 .id
= SM6115_SLAVE_SERVICE_CNOC
,
1067 static const u16 slv_snoc_bimc_nrt_links
[] = {
1068 SM6115_MASTER_SNOC_BIMC_NRT
,
1071 static struct qcom_icc_node slv_snoc_bimc_nrt
= {
1072 .name
= "slv_snoc_bimc_nrt",
1073 .id
= SM6115_SLAVE_SNOC_BIMC_NRT
,
1078 .num_links
= ARRAY_SIZE(slv_snoc_bimc_nrt_links
),
1079 .links
= slv_snoc_bimc_nrt_links
,
1082 static const u16 slv_snoc_bimc_rt_links
[] = {
1083 SM6115_MASTER_SNOC_BIMC_RT
,
1086 static struct qcom_icc_node slv_snoc_bimc_rt
= {
1087 .name
= "slv_snoc_bimc_rt",
1088 .id
= SM6115_SLAVE_SNOC_BIMC_RT
,
1093 .num_links
= ARRAY_SIZE(slv_snoc_bimc_rt_links
),
1094 .links
= slv_snoc_bimc_rt_links
,
1097 static struct qcom_icc_node qhs_apss
= {
1099 .id
= SM6115_SLAVE_APPSS
,
1106 static const u16 slv_snoc_cnoc_links
[] = {
1107 SM6115_MASTER_SNOC_CNOC
1110 static struct qcom_icc_node slv_snoc_cnoc
= {
1111 .name
= "slv_snoc_cnoc",
1112 .id
= SM6115_SLAVE_SNOC_CNOC
,
1117 .num_links
= ARRAY_SIZE(slv_snoc_cnoc_links
),
1118 .links
= slv_snoc_cnoc_links
,
1121 static struct qcom_icc_node qxs_imem
= {
1123 .id
= SM6115_SLAVE_OCIMEM
,
1130 static struct qcom_icc_node qxs_pimem
= {
1131 .name
= "qxs_pimem",
1132 .id
= SM6115_SLAVE_PIMEM
,
1139 static const u16 slv_snoc_bimc_links
[] = {
1140 SM6115_MASTER_SNOC_BIMC
,
1143 static struct qcom_icc_node slv_snoc_bimc
= {
1144 .name
= "slv_snoc_bimc",
1145 .id
= SM6115_SLAVE_SNOC_BIMC
,
1150 .num_links
= ARRAY_SIZE(slv_snoc_bimc_links
),
1151 .links
= slv_snoc_bimc_links
,
1154 static struct qcom_icc_node srvc_snoc
= {
1155 .name
= "srvc_snoc",
1156 .id
= SM6115_SLAVE_SERVICE_SNOC
,
1163 static struct qcom_icc_node xs_qdss_stm
= {
1164 .name
= "xs_qdss_stm",
1165 .id
= SM6115_SLAVE_QDSS_STM
,
1172 static struct qcom_icc_node xs_sys_tcu_cfg
= {
1173 .name
= "xs_sys_tcu_cfg",
1174 .id
= SM6115_SLAVE_TCU
,
1181 static const u16 slv_anoc_snoc_links
[] = {
1182 SM6115_MASTER_ANOC_SNOC
,
1185 static struct qcom_icc_node slv_anoc_snoc
= {
1186 .name
= "slv_anoc_snoc",
1187 .id
= SM6115_SLAVE_ANOC_SNOC
,
1192 .num_links
= ARRAY_SIZE(slv_anoc_snoc_links
),
1193 .links
= slv_anoc_snoc_links
,
1196 static struct qcom_icc_node
* const bimc_nodes
[] = {
1197 [MASTER_AMPSS_M0
] = &apps_proc
,
1198 [MASTER_SNOC_BIMC_RT
] = &mas_snoc_bimc_rt
,
1199 [MASTER_SNOC_BIMC_NRT
] = &mas_snoc_bimc_nrt
,
1200 [SNOC_BIMC_MAS
] = &mas_snoc_bimc
,
1201 [MASTER_GRAPHICS_3D
] = &qnm_gpu
,
1202 [MASTER_TCU_0
] = &tcu_0
,
1203 [SLAVE_EBI_CH0
] = &ebi
,
1204 [BIMC_SNOC_SLV
] = &slv_bimc_snoc
,
1207 static const struct regmap_config bimc_regmap_config
= {
1211 .max_register
= 0x80000,
1215 static const struct qcom_icc_desc sm6115_bimc
= {
1216 .type
= QCOM_ICC_BIMC
,
1217 .nodes
= bimc_nodes
,
1218 .num_nodes
= ARRAY_SIZE(bimc_nodes
),
1219 .regmap_cfg
= &bimc_regmap_config
,
1220 .bus_clk_desc
= &bimc_clk
,
1222 .qos_offset
= 0x8000,
1226 static struct qcom_icc_node
* const config_noc_nodes
[] = {
1227 [SNOC_CNOC_MAS
] = &mas_snoc_cnoc
,
1228 [MASTER_QDSS_DAP
] = &xm_dap
,
1229 [SLAVE_AHB2PHY_USB
] = &qhs_ahb2phy_usb
,
1230 [SLAVE_APSS_THROTTLE_CFG
] = &qhs_apss_throttle_cfg
,
1231 [SLAVE_BIMC_CFG
] = &qhs_bimc_cfg
,
1232 [SLAVE_BOOT_ROM
] = &qhs_boot_rom
,
1233 [SLAVE_CAMERA_NRT_THROTTLE_CFG
] = &qhs_camera_nrt_throttle_cfg
,
1234 [SLAVE_CAMERA_RT_THROTTLE_CFG
] = &qhs_camera_rt_throttle_cfg
,
1235 [SLAVE_CAMERA_CFG
] = &qhs_camera_ss_cfg
,
1236 [SLAVE_CLK_CTL
] = &qhs_clk_ctl
,
1237 [SLAVE_RBCPR_CX_CFG
] = &qhs_cpr_cx
,
1238 [SLAVE_RBCPR_MX_CFG
] = &qhs_cpr_mx
,
1239 [SLAVE_CRYPTO_0_CFG
] = &qhs_crypto0_cfg
,
1240 [SLAVE_DCC_CFG
] = &qhs_dcc_cfg
,
1241 [SLAVE_DDR_PHY_CFG
] = &qhs_ddr_phy_cfg
,
1242 [SLAVE_DDR_SS_CFG
] = &qhs_ddr_ss_cfg
,
1243 [SLAVE_DISPLAY_CFG
] = &qhs_disp_ss_cfg
,
1244 [SLAVE_DISPLAY_THROTTLE_CFG
] = &qhs_display_throttle_cfg
,
1245 [SLAVE_GPU_CFG
] = &qhs_gpu_cfg
,
1246 [SLAVE_GPU_THROTTLE_CFG
] = &qhs_gpu_throttle_cfg
,
1247 [SLAVE_HWKM_CORE
] = &qhs_hwkm
,
1248 [SLAVE_IMEM_CFG
] = &qhs_imem_cfg
,
1249 [SLAVE_IPA_CFG
] = &qhs_ipa_cfg
,
1250 [SLAVE_LPASS
] = &qhs_lpass
,
1251 [SLAVE_MAPSS
] = &qhs_mapss
,
1252 [SLAVE_MDSP_MPU_CFG
] = &qhs_mdsp_mpu_cfg
,
1253 [SLAVE_MESSAGE_RAM
] = &qhs_mesg_ram
,
1254 [SLAVE_CNOC_MSS
] = &qhs_mss
,
1255 [SLAVE_PDM
] = &qhs_pdm
,
1256 [SLAVE_PIMEM_CFG
] = &qhs_pimem_cfg
,
1257 [SLAVE_PKA_CORE
] = &qhs_pka_wrapper
,
1258 [SLAVE_PMIC_ARB
] = &qhs_pmic_arb
,
1259 [SLAVE_QDSS_CFG
] = &qhs_qdss_cfg
,
1260 [SLAVE_QM_CFG
] = &qhs_qm_cfg
,
1261 [SLAVE_QM_MPU_CFG
] = &qhs_qm_mpu_cfg
,
1262 [SLAVE_QPIC
] = &qhs_qpic
,
1263 [SLAVE_QUP_0
] = &qhs_qup0
,
1264 [SLAVE_RPM
] = &qhs_rpm
,
1265 [SLAVE_SDCC_1
] = &qhs_sdc1
,
1266 [SLAVE_SDCC_2
] = &qhs_sdc2
,
1267 [SLAVE_SECURITY
] = &qhs_security
,
1268 [SLAVE_SNOC_CFG
] = &qhs_snoc_cfg
,
1269 [SLAVE_TCSR
] = &qhs_tcsr
,
1270 [SLAVE_TLMM
] = &qhs_tlmm
,
1271 [SLAVE_USB3
] = &qhs_usb3
,
1272 [SLAVE_VENUS_CFG
] = &qhs_venus_cfg
,
1273 [SLAVE_VENUS_THROTTLE_CFG
] = &qhs_venus_throttle_cfg
,
1274 [SLAVE_VSENSE_CTRL_CFG
] = &qhs_vsense_ctrl_cfg
,
1275 [SLAVE_SERVICE_CNOC
] = &srvc_cnoc
,
1278 static const struct regmap_config cnoc_regmap_config
= {
1282 .max_register
= 0x6200,
1286 static const struct qcom_icc_desc sm6115_config_noc
= {
1287 .type
= QCOM_ICC_QNOC
,
1288 .nodes
= config_noc_nodes
,
1289 .num_nodes
= ARRAY_SIZE(config_noc_nodes
),
1290 .regmap_cfg
= &cnoc_regmap_config
,
1291 .intf_clocks
= cnoc_intf_clocks
,
1292 .num_intf_clocks
= ARRAY_SIZE(cnoc_intf_clocks
),
1293 .bus_clk_desc
= &bus_1_clk
,
1297 static struct qcom_icc_node
* const sys_noc_nodes
[] = {
1298 [MASTER_CRYPTO_CORE0
] = &crypto_c0
,
1299 [MASTER_SNOC_CFG
] = &qhm_snoc_cfg
,
1300 [MASTER_TIC
] = &qhm_tic
,
1301 [MASTER_ANOC_SNOC
] = &mas_anoc_snoc
,
1302 [BIMC_SNOC_MAS
] = &mas_bimc_snoc
,
1303 [MASTER_PIMEM
] = &qxm_pimem
,
1304 [MASTER_QDSS_BAM
] = &qhm_qdss_bam
,
1305 [MASTER_QPIC
] = &qhm_qpic
,
1306 [MASTER_QUP_0
] = &qhm_qup0
,
1307 [MASTER_IPA
] = &qxm_ipa
,
1308 [MASTER_QDSS_ETR
] = &xm_qdss_etr
,
1309 [MASTER_SDCC_1
] = &xm_sdc1
,
1310 [MASTER_SDCC_2
] = &xm_sdc2
,
1311 [MASTER_USB3
] = &xm_usb3_0
,
1312 [SLAVE_APPSS
] = &qhs_apss
,
1313 [SNOC_CNOC_SLV
] = &slv_snoc_cnoc
,
1314 [SLAVE_OCIMEM
] = &qxs_imem
,
1315 [SLAVE_PIMEM
] = &qxs_pimem
,
1316 [SNOC_BIMC_SLV
] = &slv_snoc_bimc
,
1317 [SLAVE_SERVICE_SNOC
] = &srvc_snoc
,
1318 [SLAVE_QDSS_STM
] = &xs_qdss_stm
,
1319 [SLAVE_TCU
] = &xs_sys_tcu_cfg
,
1320 [SLAVE_ANOC_SNOC
] = &slv_anoc_snoc
,
1323 static const struct regmap_config sys_noc_regmap_config
= {
1327 .max_register
= 0x5f080,
1331 static const struct qcom_icc_desc sm6115_sys_noc
= {
1332 .type
= QCOM_ICC_QNOC
,
1333 .nodes
= sys_noc_nodes
,
1334 .num_nodes
= ARRAY_SIZE(sys_noc_nodes
),
1335 .regmap_cfg
= &sys_noc_regmap_config
,
1336 .intf_clocks
= snoc_intf_clocks
,
1337 .num_intf_clocks
= ARRAY_SIZE(snoc_intf_clocks
),
1338 .bus_clk_desc
= &bus_2_clk
,
1339 .qos_offset
= 0x15000,
1343 static struct qcom_icc_node
* const clk_virt_nodes
[] = {
1344 [MASTER_QUP_CORE_0
] = &qup0_core_master
,
1345 [SLAVE_QUP_CORE_0
] = &qup0_core_slave
,
1348 static const struct qcom_icc_desc sm6115_clk_virt
= {
1349 .type
= QCOM_ICC_QNOC
,
1350 .nodes
= clk_virt_nodes
,
1351 .num_nodes
= ARRAY_SIZE(clk_virt_nodes
),
1352 .regmap_cfg
= &sys_noc_regmap_config
,
1353 .bus_clk_desc
= &qup_clk
,
1357 static struct qcom_icc_node
* const mmnrt_virt_nodes
[] = {
1358 [MASTER_CAMNOC_SF
] = &qnm_camera_nrt
,
1359 [MASTER_VIDEO_P0
] = &qxm_venus0
,
1360 [MASTER_VIDEO_PROC
] = &qxm_venus_cpu
,
1361 [SLAVE_SNOC_BIMC_NRT
] = &slv_snoc_bimc_nrt
,
1364 static const struct qcom_icc_desc sm6115_mmnrt_virt
= {
1365 .type
= QCOM_ICC_QNOC
,
1366 .nodes
= mmnrt_virt_nodes
,
1367 .num_nodes
= ARRAY_SIZE(mmnrt_virt_nodes
),
1368 .regmap_cfg
= &sys_noc_regmap_config
,
1369 .bus_clk_desc
= &mmaxi_0_clk
,
1371 .qos_offset
= 0x15000,
1375 static struct qcom_icc_node
* const mmrt_virt_nodes
[] = {
1376 [MASTER_CAMNOC_HF
] = &qnm_camera_rt
,
1377 [MASTER_MDP_PORT0
] = &qxm_mdp0
,
1378 [SLAVE_SNOC_BIMC_RT
] = &slv_snoc_bimc_rt
,
1381 static const struct qcom_icc_desc sm6115_mmrt_virt
= {
1382 .type
= QCOM_ICC_QNOC
,
1383 .nodes
= mmrt_virt_nodes
,
1384 .num_nodes
= ARRAY_SIZE(mmrt_virt_nodes
),
1385 .regmap_cfg
= &sys_noc_regmap_config
,
1386 .bus_clk_desc
= &mmaxi_1_clk
,
1388 .qos_offset
= 0x15000,
1392 static const struct of_device_id qnoc_of_match
[] = {
1393 { .compatible
= "qcom,sm6115-bimc", .data
= &sm6115_bimc
},
1394 { .compatible
= "qcom,sm6115-clk-virt", .data
= &sm6115_clk_virt
},
1395 { .compatible
= "qcom,sm6115-cnoc", .data
= &sm6115_config_noc
},
1396 { .compatible
= "qcom,sm6115-mmrt-virt", .data
= &sm6115_mmrt_virt
},
1397 { .compatible
= "qcom,sm6115-mmnrt-virt", .data
= &sm6115_mmnrt_virt
},
1398 { .compatible
= "qcom,sm6115-snoc", .data
= &sm6115_sys_noc
},
1401 MODULE_DEVICE_TABLE(of
, qnoc_of_match
);
1403 static struct platform_driver qnoc_driver
= {
1404 .probe
= qnoc_probe
,
1405 .remove
= qnoc_remove
,
1407 .name
= "qnoc-sm6115",
1408 .of_match_table
= qnoc_of_match
,
1409 .sync_state
= icc_sync_state
,
1413 static int __init
qnoc_driver_init(void)
1415 return platform_driver_register(&qnoc_driver
);
1417 core_initcall(qnoc_driver_init
);
1419 static void __exit
qnoc_driver_exit(void)
1421 platform_driver_unregister(&qnoc_driver
);
1423 module_exit(qnoc_driver_exit
);
1425 MODULE_DESCRIPTION("SM6115 NoC driver");
1426 MODULE_LICENSE("GPL");