1 // SPDX-License-Identifier: GPL-2.0
4 #include <linux/interconnect-provider.h>
5 #include <linux/mod_devicetable.h>
6 #include <linux/module.h>
7 #include <linux/of_device.h>
8 #include <linux/platform_device.h>
9 #include <linux/regmap.h>
11 #include <dt-bindings/interconnect/qcom,msm8953.h>
16 MSM8953_MASTER_AMPSS_M0 = 1,
17 MSM8953_MASTER_GRAPHICS_3D,
18 MSM8953_SNOC_BIMC_0_MAS,
19 MSM8953_SNOC_BIMC_2_MAS,
20 MSM8953_SNOC_BIMC_1_MAS,
22 MSM8953_SLAVE_EBI_CH0,
23 MSM8953_BIMC_SNOC_SLV,
25 MSM8953_MASTER_BLSP_1,
26 MSM8953_MASTER_BLSP_2,
28 MSM8953_MASTER_CRYPTO_CORE0,
29 MSM8953_MASTER_SDCC_1,
30 MSM8953_MASTER_SDCC_2,
31 MSM8953_SNOC_PNOC_MAS,
45 MSM8953_SLAVE_SPDM_WRAPPER,
48 MSM8953_SLAVE_SNOC_CFG,
50 MSM8953_SLAVE_MESSAGE_RAM,
54 MSM8953_SLAVE_CAMERA_CFG,
55 MSM8953_SLAVE_DISPLAY_CFG,
56 MSM8953_SLAVE_VENUS_CFG,
57 MSM8953_SLAVE_GRAPHICS_3D_CFG,
60 MSM8953_SLAVE_CRYPTO_0_CFG,
61 MSM8953_SLAVE_PMIC_ARB,
63 MSM8953_SLAVE_IPA_CFG,
65 MSM8953_PNOC_SNOC_SLV,
66 MSM8953_MASTER_QDSS_BAM,
67 MSM8953_BIMC_SNOC_MAS,
68 MSM8953_PNOC_SNOC_MAS,
70 MSM8953_MASTER_QDSS_ETR,
71 MSM8953_SNOC_QDSS_INT,
77 MSM8953_SNOC_BIMC_1_SLV,
79 MSM8953_SNOC_PNOC_SLV,
80 MSM8953_SLAVE_QDSS_STM,
81 MSM8953_SLAVE_OCMEM_64,
84 MSM8953_MASTER_MDP_PORT0,
85 MSM8953_MASTER_VIDEO_P0,
89 MSM8953_SNOC_BIMC_0_SLV,
90 MSM8953_SNOC_BIMC_2_SLV,
91 MSM8953_SLAVE_CATS_128,
94 static const u16 mas_apps_proc_links[] = {
95 MSM8953_SLAVE_EBI_CH0,
99 static struct qcom_icc_node mas_apps_proc = {
100 .name = "mas_apps_proc",
101 .id = MSM8953_MASTER_AMPSS_M0,
103 .qos.ap_owned = true,
104 .qos.qos_mode = NOC_QOS_MODE_FIXED,
108 .num_links = ARRAY_SIZE(mas_apps_proc_links),
109 .links = mas_apps_proc_links,
112 static const u16 mas_oxili_links[] = {
113 MSM8953_SLAVE_EBI_CH0,
114 MSM8953_BIMC_SNOC_SLV
117 static struct qcom_icc_node mas_oxili = {
119 .id = MSM8953_MASTER_GRAPHICS_3D,
121 .qos.ap_owned = true,
122 .qos.qos_mode = NOC_QOS_MODE_FIXED,
126 .num_links = ARRAY_SIZE(mas_oxili_links),
127 .links = mas_oxili_links,
130 static const u16 mas_snoc_bimc_0_links[] = {
131 MSM8953_SLAVE_EBI_CH0,
132 MSM8953_BIMC_SNOC_SLV
135 static struct qcom_icc_node mas_snoc_bimc_0 = {
136 .name = "mas_snoc_bimc_0",
137 .id = MSM8953_SNOC_BIMC_0_MAS,
139 .qos.ap_owned = true,
140 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
144 .num_links = ARRAY_SIZE(mas_snoc_bimc_0_links),
145 .links = mas_snoc_bimc_0_links,
148 static const u16 mas_snoc_bimc_2_links[] = {
149 MSM8953_SLAVE_EBI_CH0,
150 MSM8953_BIMC_SNOC_SLV
153 static struct qcom_icc_node mas_snoc_bimc_2 = {
154 .name = "mas_snoc_bimc_2",
155 .id = MSM8953_SNOC_BIMC_2_MAS,
157 .qos.ap_owned = true,
158 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
162 .num_links = ARRAY_SIZE(mas_snoc_bimc_2_links),
163 .links = mas_snoc_bimc_2_links,
166 static const u16 mas_snoc_bimc_1_links[] = {
167 MSM8953_SLAVE_EBI_CH0
170 static struct qcom_icc_node mas_snoc_bimc_1 = {
171 .name = "mas_snoc_bimc_1",
172 .id = MSM8953_SNOC_BIMC_1_MAS,
176 .num_links = ARRAY_SIZE(mas_snoc_bimc_1_links),
177 .links = mas_snoc_bimc_1_links,
180 static const u16 mas_tcu_0_links[] = {
181 MSM8953_SLAVE_EBI_CH0,
182 MSM8953_BIMC_SNOC_SLV
185 static struct qcom_icc_node mas_tcu_0 = {
187 .id = MSM8953_MASTER_TCU_0,
189 .qos.ap_owned = true,
190 .qos.qos_mode = NOC_QOS_MODE_FIXED,
194 .num_links = ARRAY_SIZE(mas_tcu_0_links),
195 .links = mas_tcu_0_links,
198 static struct qcom_icc_node slv_ebi = {
200 .id = MSM8953_SLAVE_EBI_CH0,
206 static const u16 slv_bimc_snoc_links[] = {
207 MSM8953_BIMC_SNOC_MAS
210 static struct qcom_icc_node slv_bimc_snoc = {
211 .name = "slv_bimc_snoc",
212 .id = MSM8953_BIMC_SNOC_SLV,
216 .num_links = ARRAY_SIZE(slv_bimc_snoc_links),
217 .links = slv_bimc_snoc_links,
220 static const u16 mas_spdm_links[] = {
224 static struct qcom_icc_node mas_spdm = {
226 .id = MSM8953_MASTER_SPDM,
228 .qos.ap_owned = true,
229 .qos.qos_mode = NOC_QOS_MODE_INVALID,
233 .num_links = ARRAY_SIZE(mas_spdm_links),
234 .links = mas_spdm_links,
237 static const u16 mas_blsp_1_links[] = {
241 static struct qcom_icc_node mas_blsp_1 = {
242 .name = "mas_blsp_1",
243 .id = MSM8953_MASTER_BLSP_1,
247 .num_links = ARRAY_SIZE(mas_blsp_1_links),
248 .links = mas_blsp_1_links,
251 static const u16 mas_blsp_2_links[] = {
255 static struct qcom_icc_node mas_blsp_2 = {
256 .name = "mas_blsp_2",
257 .id = MSM8953_MASTER_BLSP_2,
261 .num_links = ARRAY_SIZE(mas_blsp_2_links),
262 .links = mas_blsp_2_links,
265 static const u16 mas_usb3_links[] = {
269 static struct qcom_icc_node mas_usb3 = {
271 .id = MSM8953_MASTER_USB3,
273 .qos.ap_owned = true,
274 .qos.qos_mode = NOC_QOS_MODE_FIXED,
278 .num_links = ARRAY_SIZE(mas_usb3_links),
279 .links = mas_usb3_links,
282 static const u16 mas_crypto_links[] = {
286 static struct qcom_icc_node mas_crypto = {
287 .name = "mas_crypto",
288 .id = MSM8953_MASTER_CRYPTO_CORE0,
290 .qos.ap_owned = true,
291 .qos.qos_mode = NOC_QOS_MODE_FIXED,
295 .num_links = ARRAY_SIZE(mas_crypto_links),
296 .links = mas_crypto_links,
299 static const u16 mas_sdcc_1_links[] = {
303 static struct qcom_icc_node mas_sdcc_1 = {
304 .name = "mas_sdcc_1",
305 .id = MSM8953_MASTER_SDCC_1,
309 .num_links = ARRAY_SIZE(mas_sdcc_1_links),
310 .links = mas_sdcc_1_links,
313 static const u16 mas_sdcc_2_links[] = {
317 static struct qcom_icc_node mas_sdcc_2 = {
318 .name = "mas_sdcc_2",
319 .id = MSM8953_MASTER_SDCC_2,
323 .num_links = ARRAY_SIZE(mas_sdcc_2_links),
324 .links = mas_sdcc_2_links,
327 static const u16 mas_snoc_pcnoc_links[] = {
331 static struct qcom_icc_node mas_snoc_pcnoc = {
332 .name = "mas_snoc_pcnoc",
333 .id = MSM8953_SNOC_PNOC_MAS,
337 .num_links = ARRAY_SIZE(mas_snoc_pcnoc_links),
338 .links = mas_snoc_pcnoc_links,
341 static const u16 pcnoc_m_0_links[] = {
345 static struct qcom_icc_node pcnoc_m_0 = {
347 .id = MSM8953_PNOC_M_0,
349 .qos.ap_owned = true,
350 .qos.qos_mode = NOC_QOS_MODE_FIXED,
354 .num_links = ARRAY_SIZE(pcnoc_m_0_links),
355 .links = pcnoc_m_0_links,
358 static const u16 pcnoc_m_1_links[] = {
362 static struct qcom_icc_node pcnoc_m_1 = {
364 .id = MSM8953_PNOC_M_1,
368 .num_links = ARRAY_SIZE(pcnoc_m_1_links),
369 .links = pcnoc_m_1_links,
372 static const u16 pcnoc_int_1_links[] = {
374 MSM8953_PNOC_SNOC_SLV
377 static struct qcom_icc_node pcnoc_int_1 = {
378 .name = "pcnoc_int_1",
379 .id = MSM8953_PNOC_INT_1,
383 .num_links = ARRAY_SIZE(pcnoc_int_1_links),
384 .links = pcnoc_int_1_links,
387 static const u16 pcnoc_int_2_links[] = {
397 MSM8953_SLAVE_GRAPHICS_3D_CFG,
401 static struct qcom_icc_node pcnoc_int_2 = {
402 .name = "pcnoc_int_2",
403 .id = MSM8953_PNOC_INT_2,
407 .num_links = ARRAY_SIZE(pcnoc_int_2_links),
408 .links = pcnoc_int_2_links,
411 static const u16 pcnoc_s_0_links[] = {
413 MSM8953_SLAVE_SPDM_WRAPPER
416 static struct qcom_icc_node pcnoc_s_0 = {
418 .id = MSM8953_PNOC_SLV_0,
422 .num_links = ARRAY_SIZE(pcnoc_s_0_links),
423 .links = pcnoc_s_0_links,
426 static const u16 pcnoc_s_1_links[] = {
430 static struct qcom_icc_node pcnoc_s_1 = {
432 .id = MSM8953_PNOC_SLV_1,
436 .num_links = ARRAY_SIZE(pcnoc_s_1_links),
437 .links = pcnoc_s_1_links,
440 static const u16 pcnoc_s_2_links[] = {
441 MSM8953_SLAVE_SNOC_CFG
444 static struct qcom_icc_node pcnoc_s_2 = {
446 .id = MSM8953_PNOC_SLV_2,
450 .num_links = ARRAY_SIZE(pcnoc_s_2_links),
451 .links = pcnoc_s_2_links,
454 static const u16 pcnoc_s_3_links[] = {
457 MSM8953_SLAVE_BLSP_1,
458 MSM8953_SLAVE_BLSP_2,
459 MSM8953_SLAVE_MESSAGE_RAM
462 static struct qcom_icc_node pcnoc_s_3 = {
464 .id = MSM8953_PNOC_SLV_3,
468 .num_links = ARRAY_SIZE(pcnoc_s_3_links),
469 .links = pcnoc_s_3_links,
472 static const u16 pcnoc_s_4_links[] = {
473 MSM8953_SLAVE_CAMERA_CFG,
474 MSM8953_SLAVE_DISPLAY_CFG,
475 MSM8953_SLAVE_VENUS_CFG
478 static struct qcom_icc_node pcnoc_s_4 = {
480 .id = MSM8953_PNOC_SLV_4,
482 .qos.ap_owned = true,
483 .qos.qos_mode = NOC_QOS_MODE_INVALID,
487 .num_links = ARRAY_SIZE(pcnoc_s_4_links),
488 .links = pcnoc_s_4_links,
491 static const u16 pcnoc_s_6_links[] = {
492 MSM8953_SLAVE_CRYPTO_0_CFG,
493 MSM8953_SLAVE_SDCC_2,
497 static struct qcom_icc_node pcnoc_s_6 = {
499 .id = MSM8953_PNOC_SLV_6,
503 .num_links = ARRAY_SIZE(pcnoc_s_6_links),
504 .links = pcnoc_s_6_links,
507 static const u16 pcnoc_s_7_links[] = {
508 MSM8953_SLAVE_PMIC_ARB
511 static struct qcom_icc_node pcnoc_s_7 = {
513 .id = MSM8953_PNOC_SLV_7,
517 .num_links = ARRAY_SIZE(pcnoc_s_7_links),
518 .links = pcnoc_s_7_links,
521 static const u16 pcnoc_s_8_links[] = {
525 static struct qcom_icc_node pcnoc_s_8 = {
527 .id = MSM8953_PNOC_SLV_8,
529 .qos.ap_owned = true,
530 .qos.qos_mode = NOC_QOS_MODE_INVALID,
534 .num_links = ARRAY_SIZE(pcnoc_s_8_links),
535 .links = pcnoc_s_8_links,
538 static const u16 pcnoc_s_9_links[] = {
539 MSM8953_SLAVE_IPA_CFG
542 static struct qcom_icc_node pcnoc_s_9 = {
544 .id = MSM8953_PNOC_SLV_9,
546 .qos.ap_owned = true,
547 .qos.qos_mode = NOC_QOS_MODE_INVALID,
551 .num_links = ARRAY_SIZE(pcnoc_s_9_links),
552 .links = pcnoc_s_9_links,
555 static struct qcom_icc_node slv_spdm = {
557 .id = MSM8953_SLAVE_SPDM_WRAPPER,
559 .qos.ap_owned = true,
560 .qos.qos_mode = NOC_QOS_MODE_INVALID,
566 static struct qcom_icc_node slv_pdm = {
568 .id = MSM8953_SLAVE_PDM,
574 static struct qcom_icc_node slv_tcsr = {
576 .id = MSM8953_SLAVE_TCSR,
582 static struct qcom_icc_node slv_snoc_cfg = {
583 .name = "slv_snoc_cfg",
584 .id = MSM8953_SLAVE_SNOC_CFG,
590 static struct qcom_icc_node slv_tlmm = {
592 .id = MSM8953_SLAVE_TLMM,
598 static struct qcom_icc_node slv_message_ram = {
599 .name = "slv_message_ram",
600 .id = MSM8953_SLAVE_MESSAGE_RAM,
606 static struct qcom_icc_node slv_blsp_1 = {
607 .name = "slv_blsp_1",
608 .id = MSM8953_SLAVE_BLSP_1,
614 static struct qcom_icc_node slv_blsp_2 = {
615 .name = "slv_blsp_2",
616 .id = MSM8953_SLAVE_BLSP_2,
622 static struct qcom_icc_node slv_prng = {
624 .id = MSM8953_SLAVE_PRNG,
630 static struct qcom_icc_node slv_camera_ss_cfg = {
631 .name = "slv_camera_ss_cfg",
632 .id = MSM8953_SLAVE_CAMERA_CFG,
634 .qos.ap_owned = true,
635 .qos.qos_mode = NOC_QOS_MODE_INVALID,
641 static struct qcom_icc_node slv_disp_ss_cfg = {
642 .name = "slv_disp_ss_cfg",
643 .id = MSM8953_SLAVE_DISPLAY_CFG,
645 .qos.ap_owned = true,
646 .qos.qos_mode = NOC_QOS_MODE_INVALID,
652 static struct qcom_icc_node slv_venus_cfg = {
653 .name = "slv_venus_cfg",
654 .id = MSM8953_SLAVE_VENUS_CFG,
656 .qos.ap_owned = true,
657 .qos.qos_mode = NOC_QOS_MODE_INVALID,
663 static struct qcom_icc_node slv_gpu_cfg = {
664 .name = "slv_gpu_cfg",
665 .id = MSM8953_SLAVE_GRAPHICS_3D_CFG,
667 .qos.ap_owned = true,
668 .qos.qos_mode = NOC_QOS_MODE_INVALID,
674 static struct qcom_icc_node slv_sdcc_1 = {
675 .name = "slv_sdcc_1",
676 .id = MSM8953_SLAVE_SDCC_1,
682 static struct qcom_icc_node slv_sdcc_2 = {
683 .name = "slv_sdcc_2",
684 .id = MSM8953_SLAVE_SDCC_2,
690 static struct qcom_icc_node slv_crypto_0_cfg = {
691 .name = "slv_crypto_0_cfg",
692 .id = MSM8953_SLAVE_CRYPTO_0_CFG,
694 .qos.ap_owned = true,
695 .qos.qos_mode = NOC_QOS_MODE_INVALID,
701 static struct qcom_icc_node slv_pmic_arb = {
702 .name = "slv_pmic_arb",
703 .id = MSM8953_SLAVE_PMIC_ARB,
709 static struct qcom_icc_node slv_usb3 = {
711 .id = MSM8953_SLAVE_USB3,
713 .qos.ap_owned = true,
714 .qos.qos_mode = NOC_QOS_MODE_INVALID,
720 static struct qcom_icc_node slv_ipa_cfg = {
721 .name = "slv_ipa_cfg",
722 .id = MSM8953_SLAVE_IPA_CFG,
724 .qos.ap_owned = true,
725 .qos.qos_mode = NOC_QOS_MODE_INVALID,
731 static struct qcom_icc_node slv_tcu = {
733 .id = MSM8953_SLAVE_TCU,
735 .qos.ap_owned = true,
736 .qos.qos_mode = NOC_QOS_MODE_INVALID,
742 static const u16 slv_pcnoc_snoc_links[] = {
743 MSM8953_PNOC_SNOC_MAS
746 static struct qcom_icc_node slv_pcnoc_snoc = {
747 .name = "slv_pcnoc_snoc",
748 .id = MSM8953_PNOC_SNOC_SLV,
752 .num_links = ARRAY_SIZE(slv_pcnoc_snoc_links),
753 .links = slv_pcnoc_snoc_links,
756 static const u16 mas_qdss_bam_links[] = {
757 MSM8953_SNOC_QDSS_INT
760 static struct qcom_icc_node mas_qdss_bam = {
761 .name = "mas_qdss_bam",
762 .id = MSM8953_MASTER_QDSS_BAM,
764 .qos.ap_owned = true,
765 .qos.qos_mode = NOC_QOS_MODE_FIXED,
769 .num_links = ARRAY_SIZE(mas_qdss_bam_links),
770 .links = mas_qdss_bam_links,
773 static const u16 mas_bimc_snoc_links[] = {
779 static struct qcom_icc_node mas_bimc_snoc = {
780 .name = "mas_bimc_snoc",
781 .id = MSM8953_BIMC_SNOC_MAS,
785 .num_links = ARRAY_SIZE(mas_bimc_snoc_links),
786 .links = mas_bimc_snoc_links,
789 static const u16 mas_pcnoc_snoc_links[] = {
792 MSM8953_SNOC_BIMC_1_SLV
795 static struct qcom_icc_node mas_pcnoc_snoc = {
796 .name = "mas_pcnoc_snoc",
797 .id = MSM8953_PNOC_SNOC_MAS,
801 .num_links = ARRAY_SIZE(mas_pcnoc_snoc_links),
802 .links = mas_pcnoc_snoc_links,
805 static const u16 mas_ipa_links[] = {
808 MSM8953_SNOC_BIMC_1_SLV
811 static struct qcom_icc_node mas_ipa = {
813 .id = MSM8953_MASTER_IPA,
815 .qos.ap_owned = true,
816 .qos.qos_mode = NOC_QOS_MODE_FIXED,
820 .num_links = ARRAY_SIZE(mas_ipa_links),
821 .links = mas_ipa_links,
824 static const u16 mas_qdss_etr_links[] = {
825 MSM8953_SNOC_QDSS_INT
828 static struct qcom_icc_node mas_qdss_etr = {
829 .name = "mas_qdss_etr",
830 .id = MSM8953_MASTER_QDSS_ETR,
832 .qos.ap_owned = true,
833 .qos.qos_mode = NOC_QOS_MODE_FIXED,
837 .num_links = ARRAY_SIZE(mas_qdss_etr_links),
838 .links = mas_qdss_etr_links,
841 static const u16 qdss_int_links[] = {
843 MSM8953_SNOC_BIMC_1_SLV
846 static struct qcom_icc_node qdss_int = {
848 .id = MSM8953_SNOC_QDSS_INT,
850 .qos.ap_owned = true,
851 .qos.qos_mode = NOC_QOS_MODE_INVALID,
855 .num_links = ARRAY_SIZE(qdss_int_links),
856 .links = qdss_int_links,
859 static const u16 snoc_int_0_links[] = {
865 static struct qcom_icc_node snoc_int_0 = {
866 .name = "snoc_int_0",
867 .id = MSM8953_SNOC_INT_0,
869 .qos.ap_owned = true,
870 .qos.qos_mode = NOC_QOS_MODE_INVALID,
874 .num_links = ARRAY_SIZE(snoc_int_0_links),
875 .links = snoc_int_0_links,
878 static const u16 snoc_int_1_links[] = {
879 MSM8953_SLAVE_QDSS_STM,
880 MSM8953_SLAVE_OCIMEM,
881 MSM8953_SNOC_PNOC_SLV
884 static struct qcom_icc_node snoc_int_1 = {
885 .name = "snoc_int_1",
886 .id = MSM8953_SNOC_INT_1,
890 .num_links = ARRAY_SIZE(snoc_int_1_links),
891 .links = snoc_int_1_links,
894 static const u16 snoc_int_2_links[] = {
895 MSM8953_SLAVE_CATS_128,
896 MSM8953_SLAVE_OCMEM_64
899 static struct qcom_icc_node snoc_int_2 = {
900 .name = "snoc_int_2",
901 .id = MSM8953_SNOC_INT_2,
903 .qos.ap_owned = true,
904 .qos.qos_mode = NOC_QOS_MODE_INVALID,
908 .num_links = ARRAY_SIZE(snoc_int_2_links),
909 .links = snoc_int_2_links,
912 static struct qcom_icc_node slv_kpss_ahb = {
913 .name = "slv_kpss_ahb",
914 .id = MSM8953_SLAVE_APPSS,
916 .qos.ap_owned = true,
917 .qos.qos_mode = NOC_QOS_MODE_INVALID,
923 static struct qcom_icc_node slv_wcss = {
925 .id = MSM8953_SLAVE_WCSS,
927 .qos.ap_owned = true,
928 .qos.qos_mode = NOC_QOS_MODE_INVALID,
934 static const u16 slv_snoc_bimc_1_links[] = {
935 MSM8953_SNOC_BIMC_1_MAS
938 static struct qcom_icc_node slv_snoc_bimc_1 = {
939 .name = "slv_snoc_bimc_1",
940 .id = MSM8953_SNOC_BIMC_1_SLV,
944 .num_links = ARRAY_SIZE(slv_snoc_bimc_1_links),
945 .links = slv_snoc_bimc_1_links,
948 static struct qcom_icc_node slv_imem = {
950 .id = MSM8953_SLAVE_OCIMEM,
956 static const u16 slv_snoc_pcnoc_links[] = {
957 MSM8953_SNOC_PNOC_MAS
960 static struct qcom_icc_node slv_snoc_pcnoc = {
961 .name = "slv_snoc_pcnoc",
962 .id = MSM8953_SNOC_PNOC_SLV,
966 .num_links = ARRAY_SIZE(slv_snoc_pcnoc_links),
967 .links = slv_snoc_pcnoc_links,
970 static struct qcom_icc_node slv_qdss_stm = {
971 .name = "slv_qdss_stm",
972 .id = MSM8953_SLAVE_QDSS_STM,
978 static struct qcom_icc_node slv_cats_1 = {
979 .name = "slv_cats_1",
980 .id = MSM8953_SLAVE_OCMEM_64,
982 .qos.ap_owned = true,
983 .qos.qos_mode = NOC_QOS_MODE_INVALID,
989 static struct qcom_icc_node slv_lpass = {
991 .id = MSM8953_SLAVE_LPASS,
993 .qos.ap_owned = true,
994 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1000 static const u16 mas_jpeg_links[] = {
1001 MSM8953_SNOC_BIMC_2_SLV
1004 static struct qcom_icc_node mas_jpeg = {
1006 .id = MSM8953_MASTER_JPEG,
1008 .qos.ap_owned = true,
1009 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1010 .qos.prio_level = 0,
1013 .num_links = ARRAY_SIZE(mas_jpeg_links),
1014 .links = mas_jpeg_links,
1017 static const u16 mas_mdp_links[] = {
1018 MSM8953_SNOC_BIMC_0_SLV
1021 static struct qcom_icc_node mas_mdp = {
1023 .id = MSM8953_MASTER_MDP_PORT0,
1025 .qos.ap_owned = true,
1026 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1027 .qos.prio_level = 0,
1030 .num_links = ARRAY_SIZE(mas_mdp_links),
1031 .links = mas_mdp_links,
1034 static const u16 mas_venus_links[] = {
1035 MSM8953_SNOC_BIMC_2_SLV
1038 static struct qcom_icc_node mas_venus = {
1039 .name = "mas_venus",
1040 .id = MSM8953_MASTER_VIDEO_P0,
1042 .qos.ap_owned = true,
1043 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1044 .qos.prio_level = 0,
1047 .num_links = ARRAY_SIZE(mas_venus_links),
1048 .links = mas_venus_links,
1051 static const u16 mas_vfe0_links[] = {
1052 MSM8953_SNOC_BIMC_0_SLV
1055 static struct qcom_icc_node mas_vfe0 = {
1057 .id = MSM8953_MASTER_VFE,
1059 .qos.ap_owned = true,
1060 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1061 .qos.prio_level = 0,
1064 .num_links = ARRAY_SIZE(mas_vfe0_links),
1065 .links = mas_vfe0_links,
1068 static const u16 mas_vfe1_links[] = {
1069 MSM8953_SNOC_BIMC_0_SLV
1072 static struct qcom_icc_node mas_vfe1 = {
1074 .id = MSM8953_MASTER_VFE1,
1076 .qos.ap_owned = true,
1077 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1078 .qos.prio_level = 0,
1081 .num_links = ARRAY_SIZE(mas_vfe1_links),
1082 .links = mas_vfe1_links,
1085 static const u16 mas_cpp_links[] = {
1086 MSM8953_SNOC_BIMC_2_SLV
1089 static struct qcom_icc_node mas_cpp = {
1091 .id = MSM8953_MASTER_CPP,
1093 .qos.ap_owned = true,
1094 .qos.qos_mode = NOC_QOS_MODE_BYPASS,
1095 .qos.prio_level = 0,
1098 .num_links = ARRAY_SIZE(mas_cpp_links),
1099 .links = mas_cpp_links,
1102 static const u16 slv_snoc_bimc_0_links[] = {
1103 MSM8953_SNOC_BIMC_0_MAS
1106 static struct qcom_icc_node slv_snoc_bimc_0 = {
1107 .name = "slv_snoc_bimc_0",
1108 .id = MSM8953_SNOC_BIMC_0_SLV,
1110 .qos.ap_owned = true,
1111 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1112 .qos.prio_level = 0,
1115 .num_links = ARRAY_SIZE(slv_snoc_bimc_0_links),
1116 .links = slv_snoc_bimc_0_links,
1119 static const u16 slv_snoc_bimc_2_links[] = {
1120 MSM8953_SNOC_BIMC_2_MAS
1123 static struct qcom_icc_node slv_snoc_bimc_2 = {
1124 .name = "slv_snoc_bimc_2",
1125 .id = MSM8953_SNOC_BIMC_2_SLV,
1127 .qos.ap_owned = true,
1128 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1129 .qos.prio_level = 0,
1132 .num_links = ARRAY_SIZE(slv_snoc_bimc_2_links),
1133 .links = slv_snoc_bimc_2_links,
1136 static struct qcom_icc_node slv_cats_0 = {
1137 .name = "slv_cats_0",
1138 .id = MSM8953_SLAVE_CATS_128,
1140 .qos.ap_owned = true,
1141 .qos.qos_mode = NOC_QOS_MODE_INVALID,
1142 .qos.prio_level = 0,
1147 static struct qcom_icc_node * const msm8953_bimc_nodes[] = {
1148 [MAS_APPS_PROC] = &mas_apps_proc,
1149 [MAS_OXILI] = &mas_oxili,
1150 [MAS_SNOC_BIMC_0] = &mas_snoc_bimc_0,
1151 [MAS_SNOC_BIMC_2] = &mas_snoc_bimc_2,
1152 [MAS_SNOC_BIMC_1] = &mas_snoc_bimc_1,
1153 [MAS_TCU_0] = &mas_tcu_0,
1154 [SLV_EBI] = &slv_ebi,
1155 [SLV_BIMC_SNOC] = &slv_bimc_snoc,
1158 static const struct regmap_config msm8953_bimc_regmap_config = {
1160 .max_register = 0x5a000,
1166 static const struct qcom_icc_desc msm8953_bimc = {
1167 .type = QCOM_ICC_BIMC,
1168 .bus_clk_desc = &bimc_clk,
1169 .nodes = msm8953_bimc_nodes,
1170 .num_nodes = ARRAY_SIZE(msm8953_bimc_nodes),
1171 .qos_offset = 0x8000,
1173 .regmap_cfg = &msm8953_bimc_regmap_config
1176 static struct qcom_icc_node * const msm8953_pcnoc_nodes[] = {
1177 [MAS_SPDM] = &mas_spdm,
1178 [MAS_BLSP_1] = &mas_blsp_1,
1179 [MAS_BLSP_2] = &mas_blsp_2,
1180 [MAS_USB3] = &mas_usb3,
1181 [MAS_CRYPTO] = &mas_crypto,
1182 [MAS_SDCC_1] = &mas_sdcc_1,
1183 [MAS_SDCC_2] = &mas_sdcc_2,
1184 [MAS_SNOC_PCNOC] = &mas_snoc_pcnoc,
1185 [PCNOC_M_0] = &pcnoc_m_0,
1186 [PCNOC_M_1] = &pcnoc_m_1,
1187 [PCNOC_INT_1] = &pcnoc_int_1,
1188 [PCNOC_INT_2] = &pcnoc_int_2,
1189 [PCNOC_S_0] = &pcnoc_s_0,
1190 [PCNOC_S_1] = &pcnoc_s_1,
1191 [PCNOC_S_2] = &pcnoc_s_2,
1192 [PCNOC_S_3] = &pcnoc_s_3,
1193 [PCNOC_S_4] = &pcnoc_s_4,
1194 [PCNOC_S_6] = &pcnoc_s_6,
1195 [PCNOC_S_7] = &pcnoc_s_7,
1196 [PCNOC_S_8] = &pcnoc_s_8,
1197 [PCNOC_S_9] = &pcnoc_s_9,
1198 [SLV_SPDM] = &slv_spdm,
1199 [SLV_PDM] = &slv_pdm,
1200 [SLV_TCSR] = &slv_tcsr,
1201 [SLV_SNOC_CFG] = &slv_snoc_cfg,
1202 [SLV_TLMM] = &slv_tlmm,
1203 [SLV_MESSAGE_RAM] = &slv_message_ram,
1204 [SLV_BLSP_1] = &slv_blsp_1,
1205 [SLV_BLSP_2] = &slv_blsp_2,
1206 [SLV_PRNG] = &slv_prng,
1207 [SLV_CAMERA_SS_CFG] = &slv_camera_ss_cfg,
1208 [SLV_DISP_SS_CFG] = &slv_disp_ss_cfg,
1209 [SLV_VENUS_CFG] = &slv_venus_cfg,
1210 [SLV_GPU_CFG] = &slv_gpu_cfg,
1211 [SLV_SDCC_1] = &slv_sdcc_1,
1212 [SLV_SDCC_2] = &slv_sdcc_2,
1213 [SLV_CRYPTO_0_CFG] = &slv_crypto_0_cfg,
1214 [SLV_PMIC_ARB] = &slv_pmic_arb,
1215 [SLV_USB3] = &slv_usb3,
1216 [SLV_IPA_CFG] = &slv_ipa_cfg,
1217 [SLV_TCU] = &slv_tcu,
1218 [SLV_PCNOC_SNOC] = &slv_pcnoc_snoc,
1221 static const char * const msm8953_pcnoc_intf_clocks[] = {
1225 static const struct regmap_config msm8953_pcnoc_regmap_config = {
1227 .max_register = 0x12080,
1233 static const struct qcom_icc_desc msm8953_pcnoc = {
1234 .type = QCOM_ICC_NOC,
1235 .bus_clk_desc = &bus_0_clk,
1236 .intf_clocks = msm8953_pcnoc_intf_clocks,
1237 .num_intf_clocks = ARRAY_SIZE(msm8953_pcnoc_intf_clocks),
1238 .nodes = msm8953_pcnoc_nodes,
1239 .num_nodes = ARRAY_SIZE(msm8953_pcnoc_nodes),
1240 .qos_offset = 0x7000,
1241 .regmap_cfg = &msm8953_pcnoc_regmap_config,
1244 static struct qcom_icc_node * const msm8953_snoc_nodes[] = {
1245 [MAS_QDSS_BAM] = &mas_qdss_bam,
1246 [MAS_BIMC_SNOC] = &mas_bimc_snoc,
1247 [MAS_PCNOC_SNOC] = &mas_pcnoc_snoc,
1248 [MAS_IPA] = &mas_ipa,
1249 [MAS_QDSS_ETR] = &mas_qdss_etr,
1250 [QDSS_INT] = &qdss_int,
1251 [SNOC_INT_0] = &snoc_int_0,
1252 [SNOC_INT_1] = &snoc_int_1,
1253 [SNOC_INT_2] = &snoc_int_2,
1254 [SLV_KPSS_AHB] = &slv_kpss_ahb,
1255 [SLV_WCSS] = &slv_wcss,
1256 [SLV_SNOC_BIMC_1] = &slv_snoc_bimc_1,
1257 [SLV_IMEM] = &slv_imem,
1258 [SLV_SNOC_PCNOC] = &slv_snoc_pcnoc,
1259 [SLV_QDSS_STM] = &slv_qdss_stm,
1260 [SLV_CATS_1] = &slv_cats_1,
1261 [SLV_LPASS] = &slv_lpass,
1264 static const struct regmap_config msm8953_snoc_regmap_config = {
1266 .max_register = 0x16080,
1272 static const struct qcom_icc_desc msm8953_snoc = {
1273 .type = QCOM_ICC_NOC,
1274 .bus_clk_desc = &bus_1_clk,
1275 .nodes = msm8953_snoc_nodes,
1276 .num_nodes = ARRAY_SIZE(msm8953_snoc_nodes),
1277 .qos_offset = 0x7000,
1278 .regmap_cfg = &msm8953_snoc_regmap_config,
1281 static struct qcom_icc_node * const msm8953_snoc_mm_nodes[] = {
1282 [MAS_JPEG] = &mas_jpeg,
1283 [MAS_MDP] = &mas_mdp,
1284 [MAS_VENUS] = &mas_venus,
1285 [MAS_VFE0] = &mas_vfe0,
1286 [MAS_VFE1] = &mas_vfe1,
1287 [MAS_CPP] = &mas_cpp,
1288 [SLV_SNOC_BIMC_0] = &slv_snoc_bimc_0,
1289 [SLV_SNOC_BIMC_2] = &slv_snoc_bimc_2,
1290 [SLV_CATS_0] = &slv_cats_0,
1293 static const struct qcom_icc_desc msm8953_snoc_mm = {
1294 .type = QCOM_ICC_NOC,
1295 .bus_clk_desc = &bus_2_clk,
1296 .nodes = msm8953_snoc_mm_nodes,
1297 .num_nodes = ARRAY_SIZE(msm8953_snoc_mm_nodes),
1298 .qos_offset = 0x7000,
1300 .regmap_cfg = &msm8953_snoc_regmap_config,
1303 static const struct of_device_id msm8953_noc_of_match[] = {
1304 { .compatible = "qcom,msm8953-bimc", .data = &msm8953_bimc },
1305 { .compatible = "qcom,msm8953-pcnoc", .data = &msm8953_pcnoc },
1306 { .compatible = "qcom,msm8953-snoc", .data = &msm8953_snoc },
1307 { .compatible = "qcom,msm8953-snoc-mm", .data = &msm8953_snoc_mm },
1311 static struct platform_driver msm8953_noc_driver = {
1312 .probe = qnoc_probe,
1313 .remove = qnoc_remove,
1315 .name = "qnoc-msm8953",
1316 .of_match_table = msm8953_noc_of_match,
1320 module_platform_driver(msm8953_noc_driver);
1321 MODULE_DEVICE_TABLE(of, msm8953_noc_of_match);
1322 MODULE_DESCRIPTION("Qualcomm MSM8953 NoC driver");
1323 MODULE_LICENSE("GPL");