1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020 Linaro Ltd
5 * With reference of msm8916 interconnect driver of Georgi Djakov.
9 #include <linux/device.h>
10 #include <linux/interconnect-provider.h>
12 #include <linux/module.h>
13 #include <linux/platform_device.h>
14 #include <linux/regmap.h>
15 #include <linux/of_device.h>
17 #include <dt-bindings/interconnect/qcom,msm8939.h>
23 MSM8939_BIMC_SNOC_MAS = 1,
24 MSM8939_BIMC_SNOC_SLV,
25 MSM8939_MASTER_AMPSS_M0,
27 MSM8939_MASTER_BLSP_1,
29 MSM8939_MASTER_GRAPHICS_3D,
31 MSM8939_MASTER_MDP_PORT0,
32 MSM8939_MASTER_MDP_PORT1,
34 MSM8939_MASTER_CRYPTO_CORE0,
35 MSM8939_MASTER_SDCC_1,
36 MSM8939_MASTER_SDCC_2,
37 MSM8939_MASTER_QDSS_BAM,
38 MSM8939_MASTER_QDSS_ETR,
39 MSM8939_MASTER_SNOC_CFG,
42 MSM8939_MASTER_USB_HS1,
43 MSM8939_MASTER_USB_HS2,
45 MSM8939_MASTER_VIDEO_P0,
46 MSM8939_SNOC_MM_INT_0,
47 MSM8939_SNOC_MM_INT_1,
48 MSM8939_SNOC_MM_INT_2,
60 MSM8939_PNOC_SNOC_MAS,
61 MSM8939_PNOC_SNOC_SLV,
62 MSM8939_SNOC_QDSS_INT,
63 MSM8939_SLAVE_AMPSS_L2,
66 MSM8939_SLAVE_BIMC_CFG,
68 MSM8939_SLAVE_BOOT_ROM,
69 MSM8939_SLAVE_CAMERA_CFG,
70 MSM8939_SLAVE_CATS_128,
71 MSM8939_SLAVE_OCMEM_64,
72 MSM8939_SLAVE_CLK_CTL,
73 MSM8939_SLAVE_CRYPTO_0_CFG,
74 MSM8939_SLAVE_DEHR_CFG,
75 MSM8939_SLAVE_DISPLAY_CFG,
76 MSM8939_SLAVE_EBI_CH0,
77 MSM8939_SLAVE_GRAPHICS_3D_CFG,
78 MSM8939_SLAVE_IMEM_CFG,
81 MSM8939_SLAVE_MSG_RAM,
84 MSM8939_SLAVE_PMIC_ARB,
85 MSM8939_SLAVE_PNOC_CFG,
87 MSM8939_SLAVE_QDSS_CFG,
88 MSM8939_SLAVE_QDSS_STM,
89 MSM8939_SLAVE_RBCPR_CFG,
92 MSM8939_SLAVE_SECURITY,
93 MSM8939_SLAVE_SNOC_CFG,
95 MSM8939_SLAVE_SRVC_SNOC,
98 MSM8939_SLAVE_USB_HS1,
99 MSM8939_SLAVE_USB_HS2,
100 MSM8939_SLAVE_VENUS_CFG,
101 MSM8939_SNOC_BIMC_0_MAS,
102 MSM8939_SNOC_BIMC_0_SLV,
103 MSM8939_SNOC_BIMC_1_MAS,
104 MSM8939_SNOC_BIMC_1_SLV,
105 MSM8939_SNOC_BIMC_2_MAS,
106 MSM8939_SNOC_BIMC_2_SLV,
109 MSM8939_SNOC_INT_BIMC,
110 MSM8939_SNOC_PNOC_MAS,
111 MSM8939_SNOC_PNOC_SLV,
114 static const u16 bimc_snoc_mas_links[] = {
115 MSM8939_BIMC_SNOC_SLV
118 static struct qcom_icc_node bimc_snoc_mas = {
119 .name = "bimc_snoc_mas",
120 .id = MSM8939_BIMC_SNOC_MAS,
124 .qos.ap_owned = true,
125 .qos.qos_mode = NOC_QOS_MODE_INVALID,
126 .num_links = ARRAY_SIZE(bimc_snoc_mas_links),
127 .links = bimc_snoc_mas_links,
130 static const u16 bimc_snoc_slv_links[] = {
135 static struct qcom_icc_node bimc_snoc_slv = {
136 .name = "bimc_snoc_slv",
137 .id = MSM8939_BIMC_SNOC_SLV,
141 .num_links = ARRAY_SIZE(bimc_snoc_slv_links),
142 .links = bimc_snoc_slv_links,
145 static const u16 mas_apss_links[] = {
146 MSM8939_SLAVE_EBI_CH0,
147 MSM8939_BIMC_SNOC_MAS,
148 MSM8939_SLAVE_AMPSS_L2
151 static struct qcom_icc_node mas_apss = {
153 .id = MSM8939_MASTER_AMPSS_M0,
157 .qos.ap_owned = true,
158 .qos.qos_mode = NOC_QOS_MODE_FIXED,
162 .num_links = ARRAY_SIZE(mas_apss_links),
163 .links = mas_apss_links,
166 static const u16 mas_audio_links[] = {
170 static struct qcom_icc_node mas_audio = {
172 .id = MSM8939_MASTER_LPASS,
176 .num_links = ARRAY_SIZE(mas_audio_links),
177 .links = mas_audio_links,
180 static const u16 mas_blsp_1_links[] = {
184 static struct qcom_icc_node mas_blsp_1 = {
185 .name = "mas_blsp_1",
186 .id = MSM8939_MASTER_BLSP_1,
190 .num_links = ARRAY_SIZE(mas_blsp_1_links),
191 .links = mas_blsp_1_links,
194 static const u16 mas_dehr_links[] = {
198 static struct qcom_icc_node mas_dehr = {
200 .id = MSM8939_MASTER_DEHR,
204 .num_links = ARRAY_SIZE(mas_dehr_links),
205 .links = mas_dehr_links,
208 static const u16 mas_gfx_links[] = {
209 MSM8939_SLAVE_EBI_CH0,
210 MSM8939_BIMC_SNOC_MAS,
211 MSM8939_SLAVE_AMPSS_L2
214 static struct qcom_icc_node mas_gfx = {
216 .id = MSM8939_MASTER_GRAPHICS_3D,
220 .qos.ap_owned = true,
221 .qos.qos_mode = NOC_QOS_MODE_FIXED,
225 .num_links = ARRAY_SIZE(mas_gfx_links),
226 .links = mas_gfx_links,
229 static const u16 mas_jpeg_links[] = {
230 MSM8939_SNOC_MM_INT_0,
231 MSM8939_SNOC_MM_INT_2
234 static struct qcom_icc_node mas_jpeg = {
236 .id = MSM8939_MASTER_JPEG,
240 .qos.ap_owned = true,
241 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
245 .num_links = ARRAY_SIZE(mas_jpeg_links),
246 .links = mas_jpeg_links,
249 static const u16 mas_mdp0_links[] = {
250 MSM8939_SNOC_MM_INT_1,
251 MSM8939_SNOC_MM_INT_2
254 static struct qcom_icc_node mas_mdp0 = {
256 .id = MSM8939_MASTER_MDP_PORT0,
260 .qos.ap_owned = true,
261 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
265 .num_links = ARRAY_SIZE(mas_mdp0_links),
266 .links = mas_mdp0_links,
269 static const u16 mas_mdp1_links[] = {
270 MSM8939_SNOC_MM_INT_0,
271 MSM8939_SNOC_MM_INT_2
274 static struct qcom_icc_node mas_mdp1 = {
276 .id = MSM8939_MASTER_MDP_PORT1,
280 .qos.ap_owned = true,
281 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
285 .num_links = ARRAY_SIZE(mas_mdp1_links),
286 .links = mas_mdp1_links,
289 static const u16 mas_cpp_links[] = {
290 MSM8939_SNOC_MM_INT_0,
291 MSM8939_SNOC_MM_INT_2
294 static struct qcom_icc_node mas_cpp = {
296 .id = MSM8939_MASTER_CPP,
300 .qos.ap_owned = true,
301 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
305 .num_links = ARRAY_SIZE(mas_cpp_links),
306 .links = mas_cpp_links,
309 static const u16 mas_pcnoc_crypto_0_links[] = {
313 static struct qcom_icc_node mas_pcnoc_crypto_0 = {
314 .name = "mas_pcnoc_crypto_0",
315 .id = MSM8939_MASTER_CRYPTO_CORE0,
319 .num_links = ARRAY_SIZE(mas_pcnoc_crypto_0_links),
320 .links = mas_pcnoc_crypto_0_links,
323 static const u16 mas_pcnoc_sdcc_1_links[] = {
327 static struct qcom_icc_node mas_pcnoc_sdcc_1 = {
328 .name = "mas_pcnoc_sdcc_1",
329 .id = MSM8939_MASTER_SDCC_1,
333 .num_links = ARRAY_SIZE(mas_pcnoc_sdcc_1_links),
334 .links = mas_pcnoc_sdcc_1_links,
337 static const u16 mas_pcnoc_sdcc_2_links[] = {
341 static struct qcom_icc_node mas_pcnoc_sdcc_2 = {
342 .name = "mas_pcnoc_sdcc_2",
343 .id = MSM8939_MASTER_SDCC_2,
347 .num_links = ARRAY_SIZE(mas_pcnoc_sdcc_2_links),
348 .links = mas_pcnoc_sdcc_2_links,
351 static const u16 mas_qdss_bam_links[] = {
352 MSM8939_SNOC_QDSS_INT
355 static struct qcom_icc_node mas_qdss_bam = {
356 .name = "mas_qdss_bam",
357 .id = MSM8939_MASTER_QDSS_BAM,
361 .qos.ap_owned = true,
362 .qos.qos_mode = NOC_QOS_MODE_FIXED,
366 .num_links = ARRAY_SIZE(mas_qdss_bam_links),
367 .links = mas_qdss_bam_links,
370 static const u16 mas_qdss_etr_links[] = {
371 MSM8939_SNOC_QDSS_INT
374 static struct qcom_icc_node mas_qdss_etr = {
375 .name = "mas_qdss_etr",
376 .id = MSM8939_MASTER_QDSS_ETR,
380 .qos.ap_owned = true,
381 .qos.qos_mode = NOC_QOS_MODE_FIXED,
385 .num_links = ARRAY_SIZE(mas_qdss_etr_links),
386 .links = mas_qdss_etr_links,
389 static const u16 mas_snoc_cfg_links[] = {
390 MSM8939_SLAVE_SRVC_SNOC
393 static struct qcom_icc_node mas_snoc_cfg = {
394 .name = "mas_snoc_cfg",
395 .id = MSM8939_MASTER_SNOC_CFG,
399 .num_links = ARRAY_SIZE(mas_snoc_cfg_links),
400 .links = mas_snoc_cfg_links,
403 static const u16 mas_spdm_links[] = {
407 static struct qcom_icc_node mas_spdm = {
409 .id = MSM8939_MASTER_SPDM,
413 .num_links = ARRAY_SIZE(mas_spdm_links),
414 .links = mas_spdm_links,
417 static const u16 mas_tcu0_links[] = {
418 MSM8939_SLAVE_EBI_CH0,
419 MSM8939_BIMC_SNOC_MAS,
420 MSM8939_SLAVE_AMPSS_L2
423 static struct qcom_icc_node mas_tcu0 = {
425 .id = MSM8939_MASTER_TCU0,
429 .qos.ap_owned = true,
430 .qos.qos_mode = NOC_QOS_MODE_FIXED,
434 .num_links = ARRAY_SIZE(mas_tcu0_links),
435 .links = mas_tcu0_links,
438 static const u16 mas_usb_hs1_links[] = {
442 static struct qcom_icc_node mas_usb_hs1 = {
443 .name = "mas_usb_hs1",
444 .id = MSM8939_MASTER_USB_HS1,
448 .num_links = ARRAY_SIZE(mas_usb_hs1_links),
449 .links = mas_usb_hs1_links,
452 static const u16 mas_usb_hs2_links[] = {
456 static struct qcom_icc_node mas_usb_hs2 = {
457 .name = "mas_usb_hs2",
458 .id = MSM8939_MASTER_USB_HS2,
462 .num_links = ARRAY_SIZE(mas_usb_hs2_links),
463 .links = mas_usb_hs2_links,
466 static const u16 mas_vfe_links[] = {
467 MSM8939_SNOC_MM_INT_1,
468 MSM8939_SNOC_MM_INT_2
471 static struct qcom_icc_node mas_vfe = {
473 .id = MSM8939_MASTER_VFE,
477 .qos.ap_owned = true,
478 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
482 .num_links = ARRAY_SIZE(mas_vfe_links),
483 .links = mas_vfe_links,
486 static const u16 mas_video_links[] = {
487 MSM8939_SNOC_MM_INT_0,
488 MSM8939_SNOC_MM_INT_2
491 static struct qcom_icc_node mas_video = {
493 .id = MSM8939_MASTER_VIDEO_P0,
497 .qos.ap_owned = true,
498 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
502 .num_links = ARRAY_SIZE(mas_video_links),
503 .links = mas_video_links,
506 static const u16 mm_int_0_links[] = {
507 MSM8939_SNOC_BIMC_2_MAS
510 static struct qcom_icc_node mm_int_0 = {
512 .id = MSM8939_SNOC_MM_INT_0,
516 .qos.ap_owned = true,
517 .qos.qos_mode = NOC_QOS_MODE_INVALID,
518 .num_links = ARRAY_SIZE(mm_int_0_links),
519 .links = mm_int_0_links,
522 static const u16 mm_int_1_links[] = {
523 MSM8939_SNOC_BIMC_1_MAS
526 static struct qcom_icc_node mm_int_1 = {
528 .id = MSM8939_SNOC_MM_INT_1,
532 .qos.ap_owned = true,
533 .qos.qos_mode = NOC_QOS_MODE_INVALID,
534 .num_links = ARRAY_SIZE(mm_int_1_links),
535 .links = mm_int_1_links,
538 static const u16 mm_int_2_links[] = {
542 static struct qcom_icc_node mm_int_2 = {
544 .id = MSM8939_SNOC_MM_INT_2,
548 .qos.ap_owned = true,
549 .qos.qos_mode = NOC_QOS_MODE_INVALID,
550 .num_links = ARRAY_SIZE(mm_int_2_links),
551 .links = mm_int_2_links,
554 static const u16 pcnoc_int_0_links[] = {
555 MSM8939_PNOC_SNOC_MAS,
565 static struct qcom_icc_node pcnoc_int_0 = {
566 .name = "pcnoc_int_0",
567 .id = MSM8939_PNOC_INT_0,
571 .num_links = ARRAY_SIZE(pcnoc_int_0_links),
572 .links = pcnoc_int_0_links,
575 static const u16 pcnoc_int_1_links[] = {
576 MSM8939_PNOC_SNOC_MAS
579 static struct qcom_icc_node pcnoc_int_1 = {
580 .name = "pcnoc_int_1",
581 .id = MSM8939_PNOC_INT_1,
585 .num_links = ARRAY_SIZE(pcnoc_int_1_links),
586 .links = pcnoc_int_1_links,
589 static const u16 pcnoc_m_0_links[] = {
593 static struct qcom_icc_node pcnoc_m_0 = {
595 .id = MSM8939_PNOC_MAS_0,
599 .num_links = ARRAY_SIZE(pcnoc_m_0_links),
600 .links = pcnoc_m_0_links,
603 static const u16 pcnoc_m_1_links[] = {
604 MSM8939_PNOC_SNOC_MAS
607 static struct qcom_icc_node pcnoc_m_1 = {
609 .id = MSM8939_PNOC_MAS_1,
613 .num_links = ARRAY_SIZE(pcnoc_m_1_links),
614 .links = pcnoc_m_1_links,
617 static const u16 pcnoc_s_0_links[] = {
618 MSM8939_SLAVE_CLK_CTL,
621 MSM8939_SLAVE_SECURITY,
625 static struct qcom_icc_node pcnoc_s_0 = {
627 .id = MSM8939_PNOC_SLV_0,
631 .num_links = ARRAY_SIZE(pcnoc_s_0_links),
632 .links = pcnoc_s_0_links,
635 static const u16 pcnoc_s_1_links[] = {
636 MSM8939_SLAVE_IMEM_CFG,
637 MSM8939_SLAVE_CRYPTO_0_CFG,
638 MSM8939_SLAVE_MSG_RAM,
643 static struct qcom_icc_node pcnoc_s_1 = {
645 .id = MSM8939_PNOC_SLV_1,
649 .num_links = ARRAY_SIZE(pcnoc_s_1_links),
650 .links = pcnoc_s_1_links,
653 static const u16 pcnoc_s_2_links[] = {
655 MSM8939_SLAVE_BOOT_ROM,
656 MSM8939_SLAVE_BIMC_CFG,
657 MSM8939_SLAVE_PNOC_CFG,
658 MSM8939_SLAVE_PMIC_ARB
661 static struct qcom_icc_node pcnoc_s_2 = {
663 .id = MSM8939_PNOC_SLV_2,
667 .num_links = ARRAY_SIZE(pcnoc_s_2_links),
668 .links = pcnoc_s_2_links,
671 static const u16 pcnoc_s_3_links[] = {
673 MSM8939_SLAVE_SNOC_CFG,
674 MSM8939_SLAVE_RBCPR_CFG,
675 MSM8939_SLAVE_QDSS_CFG,
676 MSM8939_SLAVE_DEHR_CFG
679 static struct qcom_icc_node pcnoc_s_3 = {
681 .id = MSM8939_PNOC_SLV_3,
685 .num_links = ARRAY_SIZE(pcnoc_s_3_links),
686 .links = pcnoc_s_3_links,
689 static const u16 pcnoc_s_4_links[] = {
690 MSM8939_SLAVE_VENUS_CFG,
691 MSM8939_SLAVE_CAMERA_CFG,
692 MSM8939_SLAVE_DISPLAY_CFG
695 static struct qcom_icc_node pcnoc_s_4 = {
697 .id = MSM8939_PNOC_SLV_4,
701 .num_links = ARRAY_SIZE(pcnoc_s_4_links),
702 .links = pcnoc_s_4_links,
705 static const u16 pcnoc_s_8_links[] = {
706 MSM8939_SLAVE_USB_HS1,
707 MSM8939_SLAVE_SDCC_1,
711 static struct qcom_icc_node pcnoc_s_8 = {
713 .id = MSM8939_PNOC_SLV_8,
717 .num_links = ARRAY_SIZE(pcnoc_s_8_links),
718 .links = pcnoc_s_8_links,
721 static const u16 pcnoc_s_9_links[] = {
722 MSM8939_SLAVE_SDCC_2,
724 MSM8939_SLAVE_USB_HS2
727 static struct qcom_icc_node pcnoc_s_9 = {
729 .id = MSM8939_PNOC_SLV_9,
733 .num_links = ARRAY_SIZE(pcnoc_s_9_links),
734 .links = pcnoc_s_9_links,
737 static const u16 pcnoc_snoc_mas_links[] = {
738 MSM8939_PNOC_SNOC_SLV
741 static struct qcom_icc_node pcnoc_snoc_mas = {
742 .name = "pcnoc_snoc_mas",
743 .id = MSM8939_PNOC_SNOC_MAS,
747 .num_links = ARRAY_SIZE(pcnoc_snoc_mas_links),
748 .links = pcnoc_snoc_mas_links,
751 static const u16 pcnoc_snoc_slv_links[] = {
753 MSM8939_SNOC_INT_BIMC,
757 static struct qcom_icc_node pcnoc_snoc_slv = {
758 .name = "pcnoc_snoc_slv",
759 .id = MSM8939_PNOC_SNOC_SLV,
763 .num_links = ARRAY_SIZE(pcnoc_snoc_slv_links),
764 .links = pcnoc_snoc_slv_links,
767 static const u16 qdss_int_links[] = {
769 MSM8939_SNOC_INT_BIMC
772 static struct qcom_icc_node qdss_int = {
774 .id = MSM8939_SNOC_QDSS_INT,
778 .qos.ap_owned = true,
779 .qos.qos_mode = NOC_QOS_MODE_INVALID,
780 .num_links = ARRAY_SIZE(qdss_int_links),
781 .links = qdss_int_links,
784 static struct qcom_icc_node slv_apps_l2 = {
785 .name = "slv_apps_l2",
786 .id = MSM8939_SLAVE_AMPSS_L2,
792 static struct qcom_icc_node slv_apss = {
794 .id = MSM8939_SLAVE_APSS,
800 static struct qcom_icc_node slv_audio = {
802 .id = MSM8939_SLAVE_LPASS,
808 static struct qcom_icc_node slv_bimc_cfg = {
809 .name = "slv_bimc_cfg",
810 .id = MSM8939_SLAVE_BIMC_CFG,
816 static struct qcom_icc_node slv_blsp_1 = {
817 .name = "slv_blsp_1",
818 .id = MSM8939_SLAVE_BLSP_1,
824 static struct qcom_icc_node slv_boot_rom = {
825 .name = "slv_boot_rom",
826 .id = MSM8939_SLAVE_BOOT_ROM,
832 static struct qcom_icc_node slv_camera_cfg = {
833 .name = "slv_camera_cfg",
834 .id = MSM8939_SLAVE_CAMERA_CFG,
840 static struct qcom_icc_node slv_cats_0 = {
841 .name = "slv_cats_0",
842 .id = MSM8939_SLAVE_CATS_128,
848 static struct qcom_icc_node slv_cats_1 = {
849 .name = "slv_cats_1",
850 .id = MSM8939_SLAVE_OCMEM_64,
856 static struct qcom_icc_node slv_clk_ctl = {
857 .name = "slv_clk_ctl",
858 .id = MSM8939_SLAVE_CLK_CTL,
864 static struct qcom_icc_node slv_crypto_0_cfg = {
865 .name = "slv_crypto_0_cfg",
866 .id = MSM8939_SLAVE_CRYPTO_0_CFG,
872 static struct qcom_icc_node slv_dehr_cfg = {
873 .name = "slv_dehr_cfg",
874 .id = MSM8939_SLAVE_DEHR_CFG,
880 static struct qcom_icc_node slv_display_cfg = {
881 .name = "slv_display_cfg",
882 .id = MSM8939_SLAVE_DISPLAY_CFG,
888 static struct qcom_icc_node slv_ebi_ch0 = {
889 .name = "slv_ebi_ch0",
890 .id = MSM8939_SLAVE_EBI_CH0,
896 static struct qcom_icc_node slv_gfx_cfg = {
897 .name = "slv_gfx_cfg",
898 .id = MSM8939_SLAVE_GRAPHICS_3D_CFG,
904 static struct qcom_icc_node slv_imem_cfg = {
905 .name = "slv_imem_cfg",
906 .id = MSM8939_SLAVE_IMEM_CFG,
912 static struct qcom_icc_node slv_imem = {
914 .id = MSM8939_SLAVE_IMEM,
920 static struct qcom_icc_node slv_mpm = {
922 .id = MSM8939_SLAVE_MPM,
928 static struct qcom_icc_node slv_msg_ram = {
929 .name = "slv_msg_ram",
930 .id = MSM8939_SLAVE_MSG_RAM,
936 static struct qcom_icc_node slv_mss = {
938 .id = MSM8939_SLAVE_MSS,
944 static struct qcom_icc_node slv_pdm = {
946 .id = MSM8939_SLAVE_PDM,
952 static struct qcom_icc_node slv_pmic_arb = {
953 .name = "slv_pmic_arb",
954 .id = MSM8939_SLAVE_PMIC_ARB,
960 static struct qcom_icc_node slv_pcnoc_cfg = {
961 .name = "slv_pcnoc_cfg",
962 .id = MSM8939_SLAVE_PNOC_CFG,
968 static struct qcom_icc_node slv_prng = {
970 .id = MSM8939_SLAVE_PRNG,
976 static struct qcom_icc_node slv_qdss_cfg = {
977 .name = "slv_qdss_cfg",
978 .id = MSM8939_SLAVE_QDSS_CFG,
984 static struct qcom_icc_node slv_qdss_stm = {
985 .name = "slv_qdss_stm",
986 .id = MSM8939_SLAVE_QDSS_STM,
992 static struct qcom_icc_node slv_rbcpr_cfg = {
993 .name = "slv_rbcpr_cfg",
994 .id = MSM8939_SLAVE_RBCPR_CFG,
1000 static struct qcom_icc_node slv_sdcc_1 = {
1001 .name = "slv_sdcc_1",
1002 .id = MSM8939_SLAVE_SDCC_1,
1008 static struct qcom_icc_node slv_sdcc_2 = {
1009 .name = "slv_sdcc_2",
1010 .id = MSM8939_SLAVE_SDCC_2,
1016 static struct qcom_icc_node slv_security = {
1017 .name = "slv_security",
1018 .id = MSM8939_SLAVE_SECURITY,
1024 static struct qcom_icc_node slv_snoc_cfg = {
1025 .name = "slv_snoc_cfg",
1026 .id = MSM8939_SLAVE_SNOC_CFG,
1032 static struct qcom_icc_node slv_spdm = {
1034 .id = MSM8939_SLAVE_SPDM,
1040 static struct qcom_icc_node slv_srvc_snoc = {
1041 .name = "slv_srvc_snoc",
1042 .id = MSM8939_SLAVE_SRVC_SNOC,
1048 static struct qcom_icc_node slv_tcsr = {
1050 .id = MSM8939_SLAVE_TCSR,
1056 static struct qcom_icc_node slv_tlmm = {
1058 .id = MSM8939_SLAVE_TLMM,
1064 static struct qcom_icc_node slv_usb_hs1 = {
1065 .name = "slv_usb_hs1",
1066 .id = MSM8939_SLAVE_USB_HS1,
1072 static struct qcom_icc_node slv_usb_hs2 = {
1073 .name = "slv_usb_hs2",
1074 .id = MSM8939_SLAVE_USB_HS2,
1080 static struct qcom_icc_node slv_venus_cfg = {
1081 .name = "slv_venus_cfg",
1082 .id = MSM8939_SLAVE_VENUS_CFG,
1088 static const u16 snoc_bimc_0_mas_links[] = {
1089 MSM8939_SNOC_BIMC_0_SLV
1092 static struct qcom_icc_node snoc_bimc_0_mas = {
1093 .name = "snoc_bimc_0_mas",
1094 .id = MSM8939_SNOC_BIMC_0_MAS,
1098 .qos.ap_owned = true,
1099 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1100 .num_links = ARRAY_SIZE(snoc_bimc_0_mas_links),
1101 .links = snoc_bimc_0_mas_links,
1104 static const u16 snoc_bimc_0_slv_links[] = {
1105 MSM8939_SLAVE_EBI_CH0
1108 static struct qcom_icc_node snoc_bimc_0_slv = {
1109 .name = "snoc_bimc_0_slv",
1110 .id = MSM8939_SNOC_BIMC_0_SLV,
1114 .qos.ap_owned = true,
1115 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1116 .num_links = ARRAY_SIZE(snoc_bimc_0_slv_links),
1117 .links = snoc_bimc_0_slv_links,
1120 static const u16 snoc_bimc_1_mas_links[] = {
1121 MSM8939_SNOC_BIMC_1_SLV
1124 static struct qcom_icc_node snoc_bimc_1_mas = {
1125 .name = "snoc_bimc_1_mas",
1126 .id = MSM8939_SNOC_BIMC_1_MAS,
1130 .num_links = ARRAY_SIZE(snoc_bimc_1_mas_links),
1131 .links = snoc_bimc_1_mas_links,
1134 static const u16 snoc_bimc_1_slv_links[] = {
1135 MSM8939_SLAVE_EBI_CH0
1138 static struct qcom_icc_node snoc_bimc_1_slv = {
1139 .name = "snoc_bimc_1_slv",
1140 .id = MSM8939_SNOC_BIMC_1_SLV,
1144 .num_links = ARRAY_SIZE(snoc_bimc_1_slv_links),
1145 .links = snoc_bimc_1_slv_links,
1148 static const u16 snoc_bimc_2_mas_links[] = {
1149 MSM8939_SNOC_BIMC_2_SLV
1152 static struct qcom_icc_node snoc_bimc_2_mas = {
1153 .name = "snoc_bimc_2_mas",
1154 .id = MSM8939_SNOC_BIMC_2_MAS,
1158 .qos.ap_owned = true,
1159 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1160 .num_links = ARRAY_SIZE(snoc_bimc_2_mas_links),
1161 .links = snoc_bimc_2_mas_links,
1164 static const u16 snoc_bimc_2_slv_links[] = {
1165 MSM8939_SLAVE_EBI_CH0
1168 static struct qcom_icc_node snoc_bimc_2_slv = {
1169 .name = "snoc_bimc_2_slv",
1170 .id = MSM8939_SNOC_BIMC_2_SLV,
1174 .qos.ap_owned = true,
1175 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1176 .num_links = ARRAY_SIZE(snoc_bimc_2_slv_links),
1177 .links = snoc_bimc_2_slv_links,
1180 static const u16 snoc_int_0_links[] = {
1181 MSM8939_SLAVE_QDSS_STM,
1183 MSM8939_SNOC_PNOC_MAS
1186 static struct qcom_icc_node snoc_int_0 = {
1187 .name = "snoc_int_0",
1188 .id = MSM8939_SNOC_INT_0,
1192 .num_links = ARRAY_SIZE(snoc_int_0_links),
1193 .links = snoc_int_0_links,
1196 static const u16 snoc_int_1_links[] = {
1198 MSM8939_SLAVE_CATS_128,
1199 MSM8939_SLAVE_OCMEM_64
1202 static struct qcom_icc_node snoc_int_1 = {
1203 .name = "snoc_int_1",
1204 .id = MSM8939_SNOC_INT_1,
1208 .num_links = ARRAY_SIZE(snoc_int_1_links),
1209 .links = snoc_int_1_links,
1212 static const u16 snoc_int_bimc_links[] = {
1213 MSM8939_SNOC_BIMC_1_MAS
1216 static struct qcom_icc_node snoc_int_bimc = {
1217 .name = "snoc_int_bimc",
1218 .id = MSM8939_SNOC_INT_BIMC,
1222 .num_links = ARRAY_SIZE(snoc_int_bimc_links),
1223 .links = snoc_int_bimc_links,
1226 static const u16 snoc_pcnoc_mas_links[] = {
1227 MSM8939_SNOC_PNOC_SLV
1230 static struct qcom_icc_node snoc_pcnoc_mas = {
1231 .name = "snoc_pcnoc_mas",
1232 .id = MSM8939_SNOC_PNOC_MAS,
1236 .num_links = ARRAY_SIZE(snoc_pcnoc_mas_links),
1237 .links = snoc_pcnoc_mas_links,
1240 static const u16 snoc_pcnoc_slv_links[] = {
1244 static struct qcom_icc_node snoc_pcnoc_slv = {
1245 .name = "snoc_pcnoc_slv",
1246 .id = MSM8939_SNOC_PNOC_SLV,
1250 .num_links = ARRAY_SIZE(snoc_pcnoc_slv_links),
1251 .links = snoc_pcnoc_slv_links,
1254 static struct qcom_icc_node * const msm8939_snoc_nodes[] = {
1255 [BIMC_SNOC_SLV] = &bimc_snoc_slv,
1256 [MASTER_QDSS_BAM] = &mas_qdss_bam,
1257 [MASTER_QDSS_ETR] = &mas_qdss_etr,
1258 [MASTER_SNOC_CFG] = &mas_snoc_cfg,
1259 [PCNOC_SNOC_SLV] = &pcnoc_snoc_slv,
1260 [SLAVE_APSS] = &slv_apss,
1261 [SLAVE_CATS_128] = &slv_cats_0,
1262 [SLAVE_OCMEM_64] = &slv_cats_1,
1263 [SLAVE_IMEM] = &slv_imem,
1264 [SLAVE_QDSS_STM] = &slv_qdss_stm,
1265 [SLAVE_SRVC_SNOC] = &slv_srvc_snoc,
1266 [SNOC_BIMC_0_MAS] = &snoc_bimc_0_mas,
1267 [SNOC_BIMC_1_MAS] = &snoc_bimc_1_mas,
1268 [SNOC_BIMC_2_MAS] = &snoc_bimc_2_mas,
1269 [SNOC_INT_0] = &snoc_int_0,
1270 [SNOC_INT_1] = &snoc_int_1,
1271 [SNOC_INT_BIMC] = &snoc_int_bimc,
1272 [SNOC_PCNOC_MAS] = &snoc_pcnoc_mas,
1273 [SNOC_QDSS_INT] = &qdss_int,
1276 static const struct regmap_config msm8939_snoc_regmap_config = {
1280 .max_register = 0x14080,
1284 static const struct qcom_icc_desc msm8939_snoc = {
1285 .type = QCOM_ICC_NOC,
1286 .nodes = msm8939_snoc_nodes,
1287 .num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
1288 .regmap_cfg = &msm8939_snoc_regmap_config,
1289 .qos_offset = 0x7000,
1292 static struct qcom_icc_node * const msm8939_snoc_mm_nodes[] = {
1293 [MASTER_VIDEO_P0] = &mas_video,
1294 [MASTER_JPEG] = &mas_jpeg,
1295 [MASTER_VFE] = &mas_vfe,
1296 [MASTER_MDP_PORT0] = &mas_mdp0,
1297 [MASTER_MDP_PORT1] = &mas_mdp1,
1298 [MASTER_CPP] = &mas_cpp,
1299 [SNOC_MM_INT_0] = &mm_int_0,
1300 [SNOC_MM_INT_1] = &mm_int_1,
1301 [SNOC_MM_INT_2] = &mm_int_2,
1304 static const struct qcom_icc_desc msm8939_snoc_mm = {
1305 .type = QCOM_ICC_NOC,
1306 .nodes = msm8939_snoc_mm_nodes,
1307 .num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
1308 .regmap_cfg = &msm8939_snoc_regmap_config,
1309 .qos_offset = 0x7000,
1312 static struct qcom_icc_node * const msm8939_bimc_nodes[] = {
1313 [BIMC_SNOC_MAS] = &bimc_snoc_mas,
1314 [MASTER_AMPSS_M0] = &mas_apss,
1315 [MASTER_GRAPHICS_3D] = &mas_gfx,
1316 [MASTER_TCU0] = &mas_tcu0,
1317 [SLAVE_AMPSS_L2] = &slv_apps_l2,
1318 [SLAVE_EBI_CH0] = &slv_ebi_ch0,
1319 [SNOC_BIMC_0_SLV] = &snoc_bimc_0_slv,
1320 [SNOC_BIMC_1_SLV] = &snoc_bimc_1_slv,
1321 [SNOC_BIMC_2_SLV] = &snoc_bimc_2_slv,
1324 static const struct regmap_config msm8939_bimc_regmap_config = {
1328 .max_register = 0x62000,
1332 static const struct qcom_icc_desc msm8939_bimc = {
1333 .type = QCOM_ICC_BIMC,
1334 .nodes = msm8939_bimc_nodes,
1335 .num_nodes = ARRAY_SIZE(msm8939_bimc_nodes),
1336 .regmap_cfg = &msm8939_bimc_regmap_config,
1337 .qos_offset = 0x8000,
1340 static struct qcom_icc_node * const msm8939_pcnoc_nodes[] = {
1341 [MASTER_BLSP_1] = &mas_blsp_1,
1342 [MASTER_DEHR] = &mas_dehr,
1343 [MASTER_LPASS] = &mas_audio,
1344 [MASTER_CRYPTO_CORE0] = &mas_pcnoc_crypto_0,
1345 [MASTER_SDCC_1] = &mas_pcnoc_sdcc_1,
1346 [MASTER_SDCC_2] = &mas_pcnoc_sdcc_2,
1347 [MASTER_SPDM] = &mas_spdm,
1348 [MASTER_USB_HS1] = &mas_usb_hs1,
1349 [MASTER_USB_HS2] = &mas_usb_hs2,
1350 [PCNOC_INT_0] = &pcnoc_int_0,
1351 [PCNOC_INT_1] = &pcnoc_int_1,
1352 [PCNOC_MAS_0] = &pcnoc_m_0,
1353 [PCNOC_MAS_1] = &pcnoc_m_1,
1354 [PCNOC_SLV_0] = &pcnoc_s_0,
1355 [PCNOC_SLV_1] = &pcnoc_s_1,
1356 [PCNOC_SLV_2] = &pcnoc_s_2,
1357 [PCNOC_SLV_3] = &pcnoc_s_3,
1358 [PCNOC_SLV_4] = &pcnoc_s_4,
1359 [PCNOC_SLV_8] = &pcnoc_s_8,
1360 [PCNOC_SLV_9] = &pcnoc_s_9,
1361 [PCNOC_SNOC_MAS] = &pcnoc_snoc_mas,
1362 [SLAVE_BIMC_CFG] = &slv_bimc_cfg,
1363 [SLAVE_BLSP_1] = &slv_blsp_1,
1364 [SLAVE_BOOT_ROM] = &slv_boot_rom,
1365 [SLAVE_CAMERA_CFG] = &slv_camera_cfg,
1366 [SLAVE_CLK_CTL] = &slv_clk_ctl,
1367 [SLAVE_CRYPTO_0_CFG] = &slv_crypto_0_cfg,
1368 [SLAVE_DEHR_CFG] = &slv_dehr_cfg,
1369 [SLAVE_DISPLAY_CFG] = &slv_display_cfg,
1370 [SLAVE_GRAPHICS_3D_CFG] = &slv_gfx_cfg,
1371 [SLAVE_IMEM_CFG] = &slv_imem_cfg,
1372 [SLAVE_LPASS] = &slv_audio,
1373 [SLAVE_MPM] = &slv_mpm,
1374 [SLAVE_MSG_RAM] = &slv_msg_ram,
1375 [SLAVE_MSS] = &slv_mss,
1376 [SLAVE_PDM] = &slv_pdm,
1377 [SLAVE_PMIC_ARB] = &slv_pmic_arb,
1378 [SLAVE_PCNOC_CFG] = &slv_pcnoc_cfg,
1379 [SLAVE_PRNG] = &slv_prng,
1380 [SLAVE_QDSS_CFG] = &slv_qdss_cfg,
1381 [SLAVE_RBCPR_CFG] = &slv_rbcpr_cfg,
1382 [SLAVE_SDCC_1] = &slv_sdcc_1,
1383 [SLAVE_SDCC_2] = &slv_sdcc_2,
1384 [SLAVE_SECURITY] = &slv_security,
1385 [SLAVE_SNOC_CFG] = &slv_snoc_cfg,
1386 [SLAVE_SPDM] = &slv_spdm,
1387 [SLAVE_TCSR] = &slv_tcsr,
1388 [SLAVE_TLMM] = &slv_tlmm,
1389 [SLAVE_USB_HS1] = &slv_usb_hs1,
1390 [SLAVE_USB_HS2] = &slv_usb_hs2,
1391 [SLAVE_VENUS_CFG] = &slv_venus_cfg,
1392 [SNOC_PCNOC_SLV] = &snoc_pcnoc_slv,
1395 static const struct regmap_config msm8939_pcnoc_regmap_config = {
1399 .max_register = 0x11000,
1403 static const struct qcom_icc_desc msm8939_pcnoc = {
1404 .type = QCOM_ICC_NOC,
1405 .nodes = msm8939_pcnoc_nodes,
1406 .num_nodes = ARRAY_SIZE(msm8939_pcnoc_nodes),
1407 .regmap_cfg = &msm8939_pcnoc_regmap_config,
1408 .qos_offset = 0x7000,
1411 static const struct of_device_id msm8939_noc_of_match[] = {
1412 { .compatible = "qcom,msm8939-bimc", .data = &msm8939_bimc },
1413 { .compatible = "qcom,msm8939-pcnoc", .data = &msm8939_pcnoc },
1414 { .compatible = "qcom,msm8939-snoc", .data = &msm8939_snoc },
1415 { .compatible = "qcom,msm8939-snoc-mm", .data = &msm8939_snoc_mm },
1418 MODULE_DEVICE_TABLE(of, msm8939_noc_of_match);
1420 static struct platform_driver msm8939_noc_driver = {
1421 .probe = qnoc_probe,
1422 .remove = qnoc_remove,
1424 .name = "qnoc-msm8939",
1425 .of_match_table = msm8939_noc_of_match,
1426 .sync_state = icc_sync_state,
1429 module_platform_driver(msm8939_noc_driver);
1431 MODULE_DESCRIPTION("Qualcomm MSM8939 NoC driver");
1432 MODULE_LICENSE("GPL v2");