1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2018-2020 Linaro Ltd
4 * Author: Georgi Djakov <georgi.djakov@linaro.org>
7 #include <linux/device.h>
8 #include <linux/interconnect-provider.h>
10 #include <linux/module.h>
12 #include <linux/platform_device.h>
13 #include <linux/regmap.h>
15 #include <dt-bindings/interconnect/qcom,msm8916.h>
20 MSM8916_BIMC_SNOC_MAS
= 1,
21 MSM8916_BIMC_SNOC_SLV
,
22 MSM8916_MASTER_AMPSS_M0
,
24 MSM8916_MASTER_BLSP_1
,
26 MSM8916_MASTER_GRAPHICS_3D
,
28 MSM8916_MASTER_MDP_PORT0
,
29 MSM8916_MASTER_CRYPTO_CORE0
,
30 MSM8916_MASTER_SDCC_1
,
31 MSM8916_MASTER_SDCC_2
,
32 MSM8916_MASTER_QDSS_BAM
,
33 MSM8916_MASTER_QDSS_ETR
,
34 MSM8916_MASTER_SNOC_CFG
,
38 MSM8916_MASTER_USB_HS
,
40 MSM8916_MASTER_VIDEO_P0
,
41 MSM8916_SNOC_MM_INT_0
,
42 MSM8916_SNOC_MM_INT_1
,
43 MSM8916_SNOC_MM_INT_2
,
44 MSM8916_SNOC_MM_INT_BIMC
,
56 MSM8916_PNOC_SNOC_MAS
,
57 MSM8916_PNOC_SNOC_SLV
,
58 MSM8916_SNOC_QDSS_INT
,
59 MSM8916_SLAVE_AMPSS_L2
,
62 MSM8916_SLAVE_BIMC_CFG
,
64 MSM8916_SLAVE_BOOT_ROM
,
65 MSM8916_SLAVE_CAMERA_CFG
,
66 MSM8916_SLAVE_CATS_128
,
67 MSM8916_SLAVE_OCMEM_64
,
68 MSM8916_SLAVE_CLK_CTL
,
69 MSM8916_SLAVE_CRYPTO_0_CFG
,
70 MSM8916_SLAVE_DEHR_CFG
,
71 MSM8916_SLAVE_DISPLAY_CFG
,
72 MSM8916_SLAVE_EBI_CH0
,
73 MSM8916_SLAVE_GRAPHICS_3D_CFG
,
74 MSM8916_SLAVE_IMEM_CFG
,
77 MSM8916_SLAVE_MSG_RAM
,
80 MSM8916_SLAVE_PMIC_ARB
,
81 MSM8916_SLAVE_PNOC_CFG
,
83 MSM8916_SLAVE_QDSS_CFG
,
84 MSM8916_SLAVE_QDSS_STM
,
85 MSM8916_SLAVE_RBCPR_CFG
,
88 MSM8916_SLAVE_SECURITY
,
89 MSM8916_SLAVE_SNOC_CFG
,
91 MSM8916_SLAVE_SRVC_SNOC
,
95 MSM8916_SLAVE_VENUS_CFG
,
96 MSM8916_SNOC_BIMC_0_MAS
,
97 MSM8916_SNOC_BIMC_0_SLV
,
98 MSM8916_SNOC_BIMC_1_MAS
,
99 MSM8916_SNOC_BIMC_1_SLV
,
102 MSM8916_SNOC_INT_BIMC
,
103 MSM8916_SNOC_PNOC_MAS
,
104 MSM8916_SNOC_PNOC_SLV
,
107 static const u16 bimc_snoc_mas_links
[] = {
108 MSM8916_BIMC_SNOC_SLV
111 static struct qcom_icc_node bimc_snoc_mas
= {
112 .name
= "bimc_snoc_mas",
113 .id
= MSM8916_BIMC_SNOC_MAS
,
117 .qos
.ap_owned
= true,
118 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
119 .num_links
= ARRAY_SIZE(bimc_snoc_mas_links
),
120 .links
= bimc_snoc_mas_links
,
123 static const u16 bimc_snoc_slv_links
[] = {
128 static struct qcom_icc_node bimc_snoc_slv
= {
129 .name
= "bimc_snoc_slv",
130 .id
= MSM8916_BIMC_SNOC_SLV
,
134 .qos
.ap_owned
= true,
135 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
136 .num_links
= ARRAY_SIZE(bimc_snoc_slv_links
),
137 .links
= bimc_snoc_slv_links
,
140 static const u16 mas_apss_links
[] = {
141 MSM8916_SLAVE_EBI_CH0
,
142 MSM8916_BIMC_SNOC_MAS
,
143 MSM8916_SLAVE_AMPSS_L2
146 static struct qcom_icc_node mas_apss
= {
148 .id
= MSM8916_MASTER_AMPSS_M0
,
152 .qos
.ap_owned
= true,
153 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
157 .num_links
= ARRAY_SIZE(mas_apss_links
),
158 .links
= mas_apss_links
,
161 static const u16 mas_audio_links
[] = {
165 static struct qcom_icc_node mas_audio
= {
167 .id
= MSM8916_MASTER_LPASS
,
171 .num_links
= ARRAY_SIZE(mas_audio_links
),
172 .links
= mas_audio_links
,
175 static const u16 mas_blsp_1_links
[] = {
179 static struct qcom_icc_node mas_blsp_1
= {
180 .name
= "mas_blsp_1",
181 .id
= MSM8916_MASTER_BLSP_1
,
185 .num_links
= ARRAY_SIZE(mas_blsp_1_links
),
186 .links
= mas_blsp_1_links
,
189 static const u16 mas_dehr_links
[] = {
193 static struct qcom_icc_node mas_dehr
= {
195 .id
= MSM8916_MASTER_DEHR
,
199 .num_links
= ARRAY_SIZE(mas_dehr_links
),
200 .links
= mas_dehr_links
,
203 static const u16 mas_gfx_links
[] = {
204 MSM8916_SLAVE_EBI_CH0
,
205 MSM8916_BIMC_SNOC_MAS
,
206 MSM8916_SLAVE_AMPSS_L2
209 static struct qcom_icc_node mas_gfx
= {
211 .id
= MSM8916_MASTER_GRAPHICS_3D
,
215 .qos
.ap_owned
= true,
216 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
220 .num_links
= ARRAY_SIZE(mas_gfx_links
),
221 .links
= mas_gfx_links
,
224 static const u16 mas_jpeg_links
[] = {
225 MSM8916_SNOC_MM_INT_0
,
226 MSM8916_SNOC_MM_INT_2
229 static struct qcom_icc_node mas_jpeg
= {
231 .id
= MSM8916_MASTER_JPEG
,
235 .qos
.ap_owned
= true,
236 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
240 .num_links
= ARRAY_SIZE(mas_jpeg_links
),
241 .links
= mas_jpeg_links
,
244 static const u16 mas_mdp_links
[] = {
245 MSM8916_SNOC_MM_INT_0
,
246 MSM8916_SNOC_MM_INT_2
249 static struct qcom_icc_node mas_mdp
= {
251 .id
= MSM8916_MASTER_MDP_PORT0
,
255 .qos
.ap_owned
= true,
256 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
260 .num_links
= ARRAY_SIZE(mas_mdp_links
),
261 .links
= mas_mdp_links
,
264 static const u16 mas_pcnoc_crypto_0_links
[] = {
268 static struct qcom_icc_node mas_pcnoc_crypto_0
= {
269 .name
= "mas_pcnoc_crypto_0",
270 .id
= MSM8916_MASTER_CRYPTO_CORE0
,
274 .num_links
= ARRAY_SIZE(mas_pcnoc_crypto_0_links
),
275 .links
= mas_pcnoc_crypto_0_links
,
278 static const u16 mas_pcnoc_sdcc_1_links
[] = {
282 static struct qcom_icc_node mas_pcnoc_sdcc_1
= {
283 .name
= "mas_pcnoc_sdcc_1",
284 .id
= MSM8916_MASTER_SDCC_1
,
288 .num_links
= ARRAY_SIZE(mas_pcnoc_sdcc_1_links
),
289 .links
= mas_pcnoc_sdcc_1_links
,
292 static const u16 mas_pcnoc_sdcc_2_links
[] = {
296 static struct qcom_icc_node mas_pcnoc_sdcc_2
= {
297 .name
= "mas_pcnoc_sdcc_2",
298 .id
= MSM8916_MASTER_SDCC_2
,
302 .num_links
= ARRAY_SIZE(mas_pcnoc_sdcc_2_links
),
303 .links
= mas_pcnoc_sdcc_2_links
,
306 static const u16 mas_qdss_bam_links
[] = {
307 MSM8916_SNOC_QDSS_INT
310 static struct qcom_icc_node mas_qdss_bam
= {
311 .name
= "mas_qdss_bam",
312 .id
= MSM8916_MASTER_QDSS_BAM
,
316 .qos
.ap_owned
= true,
317 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
321 .num_links
= ARRAY_SIZE(mas_qdss_bam_links
),
322 .links
= mas_qdss_bam_links
,
325 static const u16 mas_qdss_etr_links
[] = {
326 MSM8916_SNOC_QDSS_INT
329 static struct qcom_icc_node mas_qdss_etr
= {
330 .name
= "mas_qdss_etr",
331 .id
= MSM8916_MASTER_QDSS_ETR
,
335 .qos
.ap_owned
= true,
336 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
340 .num_links
= ARRAY_SIZE(mas_qdss_etr_links
),
341 .links
= mas_qdss_etr_links
,
344 static const u16 mas_snoc_cfg_links
[] = {
345 MSM8916_SNOC_QDSS_INT
348 static struct qcom_icc_node mas_snoc_cfg
= {
349 .name
= "mas_snoc_cfg",
350 .id
= MSM8916_MASTER_SNOC_CFG
,
354 .num_links
= ARRAY_SIZE(mas_snoc_cfg_links
),
355 .links
= mas_snoc_cfg_links
,
358 static const u16 mas_spdm_links
[] = {
362 static struct qcom_icc_node mas_spdm
= {
364 .id
= MSM8916_MASTER_SPDM
,
368 .num_links
= ARRAY_SIZE(mas_spdm_links
),
369 .links
= mas_spdm_links
,
372 static const u16 mas_tcu0_links
[] = {
373 MSM8916_SLAVE_EBI_CH0
,
374 MSM8916_BIMC_SNOC_MAS
,
375 MSM8916_SLAVE_AMPSS_L2
378 static struct qcom_icc_node mas_tcu0
= {
380 .id
= MSM8916_MASTER_TCU0
,
384 .qos
.ap_owned
= true,
385 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
389 .num_links
= ARRAY_SIZE(mas_tcu0_links
),
390 .links
= mas_tcu0_links
,
393 static const u16 mas_tcu1_links
[] = {
394 MSM8916_SLAVE_EBI_CH0
,
395 MSM8916_BIMC_SNOC_MAS
,
396 MSM8916_SLAVE_AMPSS_L2
399 static struct qcom_icc_node mas_tcu1
= {
401 .id
= MSM8916_MASTER_TCU1
,
405 .qos
.ap_owned
= true,
406 .qos
.qos_mode
= NOC_QOS_MODE_FIXED
,
410 .num_links
= ARRAY_SIZE(mas_tcu1_links
),
411 .links
= mas_tcu1_links
,
414 static const u16 mas_usb_hs_links
[] = {
418 static struct qcom_icc_node mas_usb_hs
= {
419 .name
= "mas_usb_hs",
420 .id
= MSM8916_MASTER_USB_HS
,
424 .num_links
= ARRAY_SIZE(mas_usb_hs_links
),
425 .links
= mas_usb_hs_links
,
428 static const u16 mas_vfe_links
[] = {
429 MSM8916_SNOC_MM_INT_1
,
430 MSM8916_SNOC_MM_INT_2
433 static struct qcom_icc_node mas_vfe
= {
435 .id
= MSM8916_MASTER_VFE
,
439 .qos
.ap_owned
= true,
440 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
444 .num_links
= ARRAY_SIZE(mas_vfe_links
),
445 .links
= mas_vfe_links
,
448 static const u16 mas_video_links
[] = {
449 MSM8916_SNOC_MM_INT_0
,
450 MSM8916_SNOC_MM_INT_2
453 static struct qcom_icc_node mas_video
= {
455 .id
= MSM8916_MASTER_VIDEO_P0
,
459 .qos
.ap_owned
= true,
460 .qos
.qos_mode
= NOC_QOS_MODE_BYPASS
,
464 .num_links
= ARRAY_SIZE(mas_video_links
),
465 .links
= mas_video_links
,
468 static const u16 mm_int_0_links
[] = {
469 MSM8916_SNOC_MM_INT_BIMC
472 static struct qcom_icc_node mm_int_0
= {
474 .id
= MSM8916_SNOC_MM_INT_0
,
478 .qos
.ap_owned
= true,
479 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
480 .num_links
= ARRAY_SIZE(mm_int_0_links
),
481 .links
= mm_int_0_links
,
484 static const u16 mm_int_1_links
[] = {
485 MSM8916_SNOC_MM_INT_BIMC
488 static struct qcom_icc_node mm_int_1
= {
490 .id
= MSM8916_SNOC_MM_INT_1
,
494 .qos
.ap_owned
= true,
495 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
496 .num_links
= ARRAY_SIZE(mm_int_1_links
),
497 .links
= mm_int_1_links
,
500 static const u16 mm_int_2_links
[] = {
504 static struct qcom_icc_node mm_int_2
= {
506 .id
= MSM8916_SNOC_MM_INT_2
,
510 .qos
.ap_owned
= true,
511 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
512 .num_links
= ARRAY_SIZE(mm_int_2_links
),
513 .links
= mm_int_2_links
,
516 static const u16 mm_int_bimc_links
[] = {
517 MSM8916_SNOC_BIMC_1_MAS
520 static struct qcom_icc_node mm_int_bimc
= {
521 .name
= "mm_int_bimc",
522 .id
= MSM8916_SNOC_MM_INT_BIMC
,
526 .qos
.ap_owned
= true,
527 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
528 .num_links
= ARRAY_SIZE(mm_int_bimc_links
),
529 .links
= mm_int_bimc_links
,
532 static const u16 pcnoc_int_0_links
[] = {
533 MSM8916_PNOC_SNOC_MAS
,
543 static struct qcom_icc_node pcnoc_int_0
= {
544 .name
= "pcnoc_int_0",
545 .id
= MSM8916_PNOC_INT_0
,
549 .num_links
= ARRAY_SIZE(pcnoc_int_0_links
),
550 .links
= pcnoc_int_0_links
,
553 static const u16 pcnoc_int_1_links
[] = {
554 MSM8916_PNOC_SNOC_MAS
557 static struct qcom_icc_node pcnoc_int_1
= {
558 .name
= "pcnoc_int_1",
559 .id
= MSM8916_PNOC_INT_1
,
563 .num_links
= ARRAY_SIZE(pcnoc_int_1_links
),
564 .links
= pcnoc_int_1_links
,
567 static const u16 pcnoc_m_0_links
[] = {
571 static struct qcom_icc_node pcnoc_m_0
= {
573 .id
= MSM8916_PNOC_MAS_0
,
577 .num_links
= ARRAY_SIZE(pcnoc_m_0_links
),
578 .links
= pcnoc_m_0_links
,
581 static const u16 pcnoc_m_1_links
[] = {
582 MSM8916_PNOC_SNOC_MAS
585 static struct qcom_icc_node pcnoc_m_1
= {
587 .id
= MSM8916_PNOC_MAS_1
,
591 .num_links
= ARRAY_SIZE(pcnoc_m_1_links
),
592 .links
= pcnoc_m_1_links
,
595 static const u16 pcnoc_s_0_links
[] = {
596 MSM8916_SLAVE_CLK_CTL
,
599 MSM8916_SLAVE_SECURITY
,
603 static struct qcom_icc_node pcnoc_s_0
= {
605 .id
= MSM8916_PNOC_SLV_0
,
609 .num_links
= ARRAY_SIZE(pcnoc_s_0_links
),
610 .links
= pcnoc_s_0_links
,
613 static const u16 pcnoc_s_1_links
[] = {
614 MSM8916_SLAVE_IMEM_CFG
,
615 MSM8916_SLAVE_CRYPTO_0_CFG
,
616 MSM8916_SLAVE_MSG_RAM
,
621 static struct qcom_icc_node pcnoc_s_1
= {
623 .id
= MSM8916_PNOC_SLV_1
,
627 .num_links
= ARRAY_SIZE(pcnoc_s_1_links
),
628 .links
= pcnoc_s_1_links
,
631 static const u16 pcnoc_s_2_links
[] = {
633 MSM8916_SLAVE_BOOT_ROM
,
634 MSM8916_SLAVE_BIMC_CFG
,
635 MSM8916_SLAVE_PNOC_CFG
,
636 MSM8916_SLAVE_PMIC_ARB
639 static struct qcom_icc_node pcnoc_s_2
= {
641 .id
= MSM8916_PNOC_SLV_2
,
645 .num_links
= ARRAY_SIZE(pcnoc_s_2_links
),
646 .links
= pcnoc_s_2_links
,
649 static const u16 pcnoc_s_3_links
[] = {
651 MSM8916_SLAVE_SNOC_CFG
,
652 MSM8916_SLAVE_RBCPR_CFG
,
653 MSM8916_SLAVE_QDSS_CFG
,
654 MSM8916_SLAVE_DEHR_CFG
657 static struct qcom_icc_node pcnoc_s_3
= {
659 .id
= MSM8916_PNOC_SLV_3
,
663 .num_links
= ARRAY_SIZE(pcnoc_s_3_links
),
664 .links
= pcnoc_s_3_links
,
667 static const u16 pcnoc_s_4_links
[] = {
668 MSM8916_SLAVE_VENUS_CFG
,
669 MSM8916_SLAVE_CAMERA_CFG
,
670 MSM8916_SLAVE_DISPLAY_CFG
673 static struct qcom_icc_node pcnoc_s_4
= {
675 .id
= MSM8916_PNOC_SLV_4
,
679 .num_links
= ARRAY_SIZE(pcnoc_s_4_links
),
680 .links
= pcnoc_s_4_links
,
683 static const u16 pcnoc_s_8_links
[] = {
684 MSM8916_SLAVE_USB_HS
,
685 MSM8916_SLAVE_SDCC_1
,
689 static struct qcom_icc_node pcnoc_s_8
= {
691 .id
= MSM8916_PNOC_SLV_8
,
695 .num_links
= ARRAY_SIZE(pcnoc_s_8_links
),
696 .links
= pcnoc_s_8_links
,
699 static const u16 pcnoc_s_9_links
[] = {
700 MSM8916_SLAVE_SDCC_2
,
702 MSM8916_SLAVE_GRAPHICS_3D_CFG
705 static struct qcom_icc_node pcnoc_s_9
= {
707 .id
= MSM8916_PNOC_SLV_9
,
711 .num_links
= ARRAY_SIZE(pcnoc_s_9_links
),
712 .links
= pcnoc_s_9_links
,
715 static const u16 pcnoc_snoc_mas_links
[] = {
716 MSM8916_PNOC_SNOC_SLV
719 static struct qcom_icc_node pcnoc_snoc_mas
= {
720 .name
= "pcnoc_snoc_mas",
721 .id
= MSM8916_PNOC_SNOC_MAS
,
725 .num_links
= ARRAY_SIZE(pcnoc_snoc_mas_links
),
726 .links
= pcnoc_snoc_mas_links
,
729 static const u16 pcnoc_snoc_slv_links
[] = {
731 MSM8916_SNOC_INT_BIMC
,
735 static struct qcom_icc_node pcnoc_snoc_slv
= {
736 .name
= "pcnoc_snoc_slv",
737 .id
= MSM8916_PNOC_SNOC_SLV
,
741 .num_links
= ARRAY_SIZE(pcnoc_snoc_slv_links
),
742 .links
= pcnoc_snoc_slv_links
,
745 static const u16 qdss_int_links
[] = {
747 MSM8916_SNOC_INT_BIMC
750 static struct qcom_icc_node qdss_int
= {
752 .id
= MSM8916_SNOC_QDSS_INT
,
756 .qos
.ap_owned
= true,
757 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
758 .num_links
= ARRAY_SIZE(qdss_int_links
),
759 .links
= qdss_int_links
,
762 static struct qcom_icc_node slv_apps_l2
= {
763 .name
= "slv_apps_l2",
764 .id
= MSM8916_SLAVE_AMPSS_L2
,
770 static struct qcom_icc_node slv_apss
= {
772 .id
= MSM8916_SLAVE_APSS
,
778 static struct qcom_icc_node slv_audio
= {
780 .id
= MSM8916_SLAVE_LPASS
,
786 static struct qcom_icc_node slv_bimc_cfg
= {
787 .name
= "slv_bimc_cfg",
788 .id
= MSM8916_SLAVE_BIMC_CFG
,
794 static struct qcom_icc_node slv_blsp_1
= {
795 .name
= "slv_blsp_1",
796 .id
= MSM8916_SLAVE_BLSP_1
,
802 static struct qcom_icc_node slv_boot_rom
= {
803 .name
= "slv_boot_rom",
804 .id
= MSM8916_SLAVE_BOOT_ROM
,
810 static struct qcom_icc_node slv_camera_cfg
= {
811 .name
= "slv_camera_cfg",
812 .id
= MSM8916_SLAVE_CAMERA_CFG
,
818 static struct qcom_icc_node slv_cats_0
= {
819 .name
= "slv_cats_0",
820 .id
= MSM8916_SLAVE_CATS_128
,
826 static struct qcom_icc_node slv_cats_1
= {
827 .name
= "slv_cats_1",
828 .id
= MSM8916_SLAVE_OCMEM_64
,
834 static struct qcom_icc_node slv_clk_ctl
= {
835 .name
= "slv_clk_ctl",
836 .id
= MSM8916_SLAVE_CLK_CTL
,
842 static struct qcom_icc_node slv_crypto_0_cfg
= {
843 .name
= "slv_crypto_0_cfg",
844 .id
= MSM8916_SLAVE_CRYPTO_0_CFG
,
850 static struct qcom_icc_node slv_dehr_cfg
= {
851 .name
= "slv_dehr_cfg",
852 .id
= MSM8916_SLAVE_DEHR_CFG
,
858 static struct qcom_icc_node slv_display_cfg
= {
859 .name
= "slv_display_cfg",
860 .id
= MSM8916_SLAVE_DISPLAY_CFG
,
866 static struct qcom_icc_node slv_ebi_ch0
= {
867 .name
= "slv_ebi_ch0",
868 .id
= MSM8916_SLAVE_EBI_CH0
,
874 static struct qcom_icc_node slv_gfx_cfg
= {
875 .name
= "slv_gfx_cfg",
876 .id
= MSM8916_SLAVE_GRAPHICS_3D_CFG
,
882 static struct qcom_icc_node slv_imem_cfg
= {
883 .name
= "slv_imem_cfg",
884 .id
= MSM8916_SLAVE_IMEM_CFG
,
890 static struct qcom_icc_node slv_imem
= {
892 .id
= MSM8916_SLAVE_IMEM
,
898 static struct qcom_icc_node slv_mpm
= {
900 .id
= MSM8916_SLAVE_MPM
,
906 static struct qcom_icc_node slv_msg_ram
= {
907 .name
= "slv_msg_ram",
908 .id
= MSM8916_SLAVE_MSG_RAM
,
914 static struct qcom_icc_node slv_mss
= {
916 .id
= MSM8916_SLAVE_MSS
,
922 static struct qcom_icc_node slv_pdm
= {
924 .id
= MSM8916_SLAVE_PDM
,
930 static struct qcom_icc_node slv_pmic_arb
= {
931 .name
= "slv_pmic_arb",
932 .id
= MSM8916_SLAVE_PMIC_ARB
,
938 static struct qcom_icc_node slv_pcnoc_cfg
= {
939 .name
= "slv_pcnoc_cfg",
940 .id
= MSM8916_SLAVE_PNOC_CFG
,
946 static struct qcom_icc_node slv_prng
= {
948 .id
= MSM8916_SLAVE_PRNG
,
954 static struct qcom_icc_node slv_qdss_cfg
= {
955 .name
= "slv_qdss_cfg",
956 .id
= MSM8916_SLAVE_QDSS_CFG
,
962 static struct qcom_icc_node slv_qdss_stm
= {
963 .name
= "slv_qdss_stm",
964 .id
= MSM8916_SLAVE_QDSS_STM
,
970 static struct qcom_icc_node slv_rbcpr_cfg
= {
971 .name
= "slv_rbcpr_cfg",
972 .id
= MSM8916_SLAVE_RBCPR_CFG
,
978 static struct qcom_icc_node slv_sdcc_1
= {
979 .name
= "slv_sdcc_1",
980 .id
= MSM8916_SLAVE_SDCC_1
,
986 static struct qcom_icc_node slv_sdcc_2
= {
987 .name
= "slv_sdcc_2",
988 .id
= MSM8916_SLAVE_SDCC_2
,
994 static struct qcom_icc_node slv_security
= {
995 .name
= "slv_security",
996 .id
= MSM8916_SLAVE_SECURITY
,
1002 static struct qcom_icc_node slv_snoc_cfg
= {
1003 .name
= "slv_snoc_cfg",
1004 .id
= MSM8916_SLAVE_SNOC_CFG
,
1010 static struct qcom_icc_node slv_spdm
= {
1012 .id
= MSM8916_SLAVE_SPDM
,
1018 static struct qcom_icc_node slv_srvc_snoc
= {
1019 .name
= "slv_srvc_snoc",
1020 .id
= MSM8916_SLAVE_SRVC_SNOC
,
1026 static struct qcom_icc_node slv_tcsr
= {
1028 .id
= MSM8916_SLAVE_TCSR
,
1034 static struct qcom_icc_node slv_tlmm
= {
1036 .id
= MSM8916_SLAVE_TLMM
,
1042 static struct qcom_icc_node slv_usb_hs
= {
1043 .name
= "slv_usb_hs",
1044 .id
= MSM8916_SLAVE_USB_HS
,
1050 static struct qcom_icc_node slv_venus_cfg
= {
1051 .name
= "slv_venus_cfg",
1052 .id
= MSM8916_SLAVE_VENUS_CFG
,
1058 static const u16 snoc_bimc_0_mas_links
[] = {
1059 MSM8916_SNOC_BIMC_0_SLV
1062 static struct qcom_icc_node snoc_bimc_0_mas
= {
1063 .name
= "snoc_bimc_0_mas",
1064 .id
= MSM8916_SNOC_BIMC_0_MAS
,
1068 .num_links
= ARRAY_SIZE(snoc_bimc_0_mas_links
),
1069 .links
= snoc_bimc_0_mas_links
,
1072 static const u16 snoc_bimc_0_slv_links
[] = {
1073 MSM8916_SLAVE_EBI_CH0
1076 static struct qcom_icc_node snoc_bimc_0_slv
= {
1077 .name
= "snoc_bimc_0_slv",
1078 .id
= MSM8916_SNOC_BIMC_0_SLV
,
1082 .num_links
= ARRAY_SIZE(snoc_bimc_0_slv_links
),
1083 .links
= snoc_bimc_0_slv_links
,
1086 static const u16 snoc_bimc_1_mas_links
[] = {
1087 MSM8916_SNOC_BIMC_1_SLV
1090 static struct qcom_icc_node snoc_bimc_1_mas
= {
1091 .name
= "snoc_bimc_1_mas",
1092 .id
= MSM8916_SNOC_BIMC_1_MAS
,
1096 .qos
.ap_owned
= true,
1097 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
1098 .num_links
= ARRAY_SIZE(snoc_bimc_1_mas_links
),
1099 .links
= snoc_bimc_1_mas_links
,
1102 static const u16 snoc_bimc_1_slv_links
[] = {
1103 MSM8916_SLAVE_EBI_CH0
1106 static struct qcom_icc_node snoc_bimc_1_slv
= {
1107 .name
= "snoc_bimc_1_slv",
1108 .id
= MSM8916_SNOC_BIMC_1_SLV
,
1112 .qos
.ap_owned
= true,
1113 .qos
.qos_mode
= NOC_QOS_MODE_INVALID
,
1114 .num_links
= ARRAY_SIZE(snoc_bimc_1_slv_links
),
1115 .links
= snoc_bimc_1_slv_links
,
1118 static const u16 snoc_int_0_links
[] = {
1119 MSM8916_SLAVE_QDSS_STM
,
1121 MSM8916_SNOC_PNOC_MAS
1124 static struct qcom_icc_node snoc_int_0
= {
1125 .name
= "snoc_int_0",
1126 .id
= MSM8916_SNOC_INT_0
,
1130 .num_links
= ARRAY_SIZE(snoc_int_0_links
),
1131 .links
= snoc_int_0_links
,
1134 static const u16 snoc_int_1_links
[] = {
1136 MSM8916_SLAVE_CATS_128
,
1137 MSM8916_SLAVE_OCMEM_64
1140 static struct qcom_icc_node snoc_int_1
= {
1141 .name
= "snoc_int_1",
1142 .id
= MSM8916_SNOC_INT_1
,
1146 .num_links
= ARRAY_SIZE(snoc_int_1_links
),
1147 .links
= snoc_int_1_links
,
1150 static const u16 snoc_int_bimc_links
[] = {
1151 MSM8916_SNOC_BIMC_0_MAS
1154 static struct qcom_icc_node snoc_int_bimc
= {
1155 .name
= "snoc_int_bimc",
1156 .id
= MSM8916_SNOC_INT_BIMC
,
1160 .num_links
= ARRAY_SIZE(snoc_int_bimc_links
),
1161 .links
= snoc_int_bimc_links
,
1164 static const u16 snoc_pcnoc_mas_links
[] = {
1165 MSM8916_SNOC_PNOC_SLV
1168 static struct qcom_icc_node snoc_pcnoc_mas
= {
1169 .name
= "snoc_pcnoc_mas",
1170 .id
= MSM8916_SNOC_PNOC_MAS
,
1174 .num_links
= ARRAY_SIZE(snoc_pcnoc_mas_links
),
1175 .links
= snoc_pcnoc_mas_links
,
1178 static const u16 snoc_pcnoc_slv_links
[] = {
1182 static struct qcom_icc_node snoc_pcnoc_slv
= {
1183 .name
= "snoc_pcnoc_slv",
1184 .id
= MSM8916_SNOC_PNOC_SLV
,
1188 .num_links
= ARRAY_SIZE(snoc_pcnoc_slv_links
),
1189 .links
= snoc_pcnoc_slv_links
,
1192 static struct qcom_icc_node
* const msm8916_snoc_nodes
[] = {
1193 [BIMC_SNOC_SLV
] = &bimc_snoc_slv
,
1194 [MASTER_JPEG
] = &mas_jpeg
,
1195 [MASTER_MDP_PORT0
] = &mas_mdp
,
1196 [MASTER_QDSS_BAM
] = &mas_qdss_bam
,
1197 [MASTER_QDSS_ETR
] = &mas_qdss_etr
,
1198 [MASTER_SNOC_CFG
] = &mas_snoc_cfg
,
1199 [MASTER_VFE
] = &mas_vfe
,
1200 [MASTER_VIDEO_P0
] = &mas_video
,
1201 [SNOC_MM_INT_0
] = &mm_int_0
,
1202 [SNOC_MM_INT_1
] = &mm_int_1
,
1203 [SNOC_MM_INT_2
] = &mm_int_2
,
1204 [SNOC_MM_INT_BIMC
] = &mm_int_bimc
,
1205 [PCNOC_SNOC_SLV
] = &pcnoc_snoc_slv
,
1206 [SLAVE_APSS
] = &slv_apss
,
1207 [SLAVE_CATS_128
] = &slv_cats_0
,
1208 [SLAVE_OCMEM_64
] = &slv_cats_1
,
1209 [SLAVE_IMEM
] = &slv_imem
,
1210 [SLAVE_QDSS_STM
] = &slv_qdss_stm
,
1211 [SLAVE_SRVC_SNOC
] = &slv_srvc_snoc
,
1212 [SNOC_BIMC_0_MAS
] = &snoc_bimc_0_mas
,
1213 [SNOC_BIMC_1_MAS
] = &snoc_bimc_1_mas
,
1214 [SNOC_INT_0
] = &snoc_int_0
,
1215 [SNOC_INT_1
] = &snoc_int_1
,
1216 [SNOC_INT_BIMC
] = &snoc_int_bimc
,
1217 [SNOC_PCNOC_MAS
] = &snoc_pcnoc_mas
,
1218 [SNOC_QDSS_INT
] = &qdss_int
,
1221 static const struct regmap_config msm8916_snoc_regmap_config
= {
1225 .max_register
= 0x14000,
1229 static const struct qcom_icc_desc msm8916_snoc
= {
1230 .type
= QCOM_ICC_NOC
,
1231 .nodes
= msm8916_snoc_nodes
,
1232 .num_nodes
= ARRAY_SIZE(msm8916_snoc_nodes
),
1233 .bus_clk_desc
= &bus_1_clk
,
1234 .regmap_cfg
= &msm8916_snoc_regmap_config
,
1235 .qos_offset
= 0x7000,
1238 static struct qcom_icc_node
* const msm8916_bimc_nodes
[] = {
1239 [BIMC_SNOC_MAS
] = &bimc_snoc_mas
,
1240 [MASTER_AMPSS_M0
] = &mas_apss
,
1241 [MASTER_GRAPHICS_3D
] = &mas_gfx
,
1242 [MASTER_TCU0
] = &mas_tcu0
,
1243 [MASTER_TCU1
] = &mas_tcu1
,
1244 [SLAVE_AMPSS_L2
] = &slv_apps_l2
,
1245 [SLAVE_EBI_CH0
] = &slv_ebi_ch0
,
1246 [SNOC_BIMC_0_SLV
] = &snoc_bimc_0_slv
,
1247 [SNOC_BIMC_1_SLV
] = &snoc_bimc_1_slv
,
1250 static const struct regmap_config msm8916_bimc_regmap_config
= {
1254 .max_register
= 0x62000,
1258 static const struct qcom_icc_desc msm8916_bimc
= {
1259 .type
= QCOM_ICC_BIMC
,
1260 .nodes
= msm8916_bimc_nodes
,
1261 .num_nodes
= ARRAY_SIZE(msm8916_bimc_nodes
),
1262 .bus_clk_desc
= &bimc_clk
,
1263 .regmap_cfg
= &msm8916_bimc_regmap_config
,
1264 .qos_offset
= 0x8000,
1267 static struct qcom_icc_node
* const msm8916_pcnoc_nodes
[] = {
1268 [MASTER_BLSP_1
] = &mas_blsp_1
,
1269 [MASTER_DEHR
] = &mas_dehr
,
1270 [MASTER_LPASS
] = &mas_audio
,
1271 [MASTER_CRYPTO_CORE0
] = &mas_pcnoc_crypto_0
,
1272 [MASTER_SDCC_1
] = &mas_pcnoc_sdcc_1
,
1273 [MASTER_SDCC_2
] = &mas_pcnoc_sdcc_2
,
1274 [MASTER_SPDM
] = &mas_spdm
,
1275 [MASTER_USB_HS
] = &mas_usb_hs
,
1276 [PCNOC_INT_0
] = &pcnoc_int_0
,
1277 [PCNOC_INT_1
] = &pcnoc_int_1
,
1278 [PCNOC_MAS_0
] = &pcnoc_m_0
,
1279 [PCNOC_MAS_1
] = &pcnoc_m_1
,
1280 [PCNOC_SLV_0
] = &pcnoc_s_0
,
1281 [PCNOC_SLV_1
] = &pcnoc_s_1
,
1282 [PCNOC_SLV_2
] = &pcnoc_s_2
,
1283 [PCNOC_SLV_3
] = &pcnoc_s_3
,
1284 [PCNOC_SLV_4
] = &pcnoc_s_4
,
1285 [PCNOC_SLV_8
] = &pcnoc_s_8
,
1286 [PCNOC_SLV_9
] = &pcnoc_s_9
,
1287 [PCNOC_SNOC_MAS
] = &pcnoc_snoc_mas
,
1288 [SLAVE_BIMC_CFG
] = &slv_bimc_cfg
,
1289 [SLAVE_BLSP_1
] = &slv_blsp_1
,
1290 [SLAVE_BOOT_ROM
] = &slv_boot_rom
,
1291 [SLAVE_CAMERA_CFG
] = &slv_camera_cfg
,
1292 [SLAVE_CLK_CTL
] = &slv_clk_ctl
,
1293 [SLAVE_CRYPTO_0_CFG
] = &slv_crypto_0_cfg
,
1294 [SLAVE_DEHR_CFG
] = &slv_dehr_cfg
,
1295 [SLAVE_DISPLAY_CFG
] = &slv_display_cfg
,
1296 [SLAVE_GRAPHICS_3D_CFG
] = &slv_gfx_cfg
,
1297 [SLAVE_IMEM_CFG
] = &slv_imem_cfg
,
1298 [SLAVE_LPASS
] = &slv_audio
,
1299 [SLAVE_MPM
] = &slv_mpm
,
1300 [SLAVE_MSG_RAM
] = &slv_msg_ram
,
1301 [SLAVE_MSS
] = &slv_mss
,
1302 [SLAVE_PDM
] = &slv_pdm
,
1303 [SLAVE_PMIC_ARB
] = &slv_pmic_arb
,
1304 [SLAVE_PCNOC_CFG
] = &slv_pcnoc_cfg
,
1305 [SLAVE_PRNG
] = &slv_prng
,
1306 [SLAVE_QDSS_CFG
] = &slv_qdss_cfg
,
1307 [SLAVE_RBCPR_CFG
] = &slv_rbcpr_cfg
,
1308 [SLAVE_SDCC_1
] = &slv_sdcc_1
,
1309 [SLAVE_SDCC_2
] = &slv_sdcc_2
,
1310 [SLAVE_SECURITY
] = &slv_security
,
1311 [SLAVE_SNOC_CFG
] = &slv_snoc_cfg
,
1312 [SLAVE_SPDM
] = &slv_spdm
,
1313 [SLAVE_TCSR
] = &slv_tcsr
,
1314 [SLAVE_TLMM
] = &slv_tlmm
,
1315 [SLAVE_USB_HS
] = &slv_usb_hs
,
1316 [SLAVE_VENUS_CFG
] = &slv_venus_cfg
,
1317 [SNOC_PCNOC_SLV
] = &snoc_pcnoc_slv
,
1320 static const struct regmap_config msm8916_pcnoc_regmap_config
= {
1324 .max_register
= 0x11000,
1328 static const struct qcom_icc_desc msm8916_pcnoc
= {
1329 .type
= QCOM_ICC_NOC
,
1330 .nodes
= msm8916_pcnoc_nodes
,
1331 .num_nodes
= ARRAY_SIZE(msm8916_pcnoc_nodes
),
1332 .bus_clk_desc
= &bus_0_clk
,
1333 .regmap_cfg
= &msm8916_pcnoc_regmap_config
,
1334 .qos_offset
= 0x7000,
1337 static const struct of_device_id msm8916_noc_of_match
[] = {
1338 { .compatible
= "qcom,msm8916-bimc", .data
= &msm8916_bimc
},
1339 { .compatible
= "qcom,msm8916-pcnoc", .data
= &msm8916_pcnoc
},
1340 { .compatible
= "qcom,msm8916-snoc", .data
= &msm8916_snoc
},
1343 MODULE_DEVICE_TABLE(of
, msm8916_noc_of_match
);
1345 static struct platform_driver msm8916_noc_driver
= {
1346 .probe
= qnoc_probe
,
1347 .remove
= qnoc_remove
,
1349 .name
= "qnoc-msm8916",
1350 .of_match_table
= msm8916_noc_of_match
,
1353 module_platform_driver(msm8916_noc_driver
);
1354 MODULE_AUTHOR("Georgi Djakov <georgi.djakov@linaro.org>");
1355 MODULE_DESCRIPTION("Qualcomm MSM8916 NoC driver");
1356 MODULE_LICENSE("GPL v2");