1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2018-2020 Linaro Ltd
4  * Author: Georgi Djakov <georgi.djakov@linaro.org>
5  */
6 
7 #include <linux/clk.h>
8 #include <linux/device.h>
9 #include <linux/interconnect-provider.h>
10 #include <linux/io.h>
11 #include <linux/module.h>
12 #include <linux/platform_device.h>
13 #include <linux/of_device.h>
14 
15 #include <dt-bindings/interconnect/qcom,msm8916.h>
16 
17 #include "smd-rpm.h"
18 #include "icc-rpm.h"
19 
20 enum {
21 	MSM8916_BIMC_SNOC_MAS = 1,
22 	MSM8916_BIMC_SNOC_SLV,
23 	MSM8916_MASTER_AMPSS_M0,
24 	MSM8916_MASTER_LPASS,
25 	MSM8916_MASTER_BLSP_1,
26 	MSM8916_MASTER_DEHR,
27 	MSM8916_MASTER_GRAPHICS_3D,
28 	MSM8916_MASTER_JPEG,
29 	MSM8916_MASTER_MDP_PORT0,
30 	MSM8916_MASTER_CRYPTO_CORE0,
31 	MSM8916_MASTER_SDCC_1,
32 	MSM8916_MASTER_SDCC_2,
33 	MSM8916_MASTER_QDSS_BAM,
34 	MSM8916_MASTER_QDSS_ETR,
35 	MSM8916_MASTER_SNOC_CFG,
36 	MSM8916_MASTER_SPDM,
37 	MSM8916_MASTER_TCU0,
38 	MSM8916_MASTER_TCU1,
39 	MSM8916_MASTER_USB_HS,
40 	MSM8916_MASTER_VFE,
41 	MSM8916_MASTER_VIDEO_P0,
42 	MSM8916_SNOC_MM_INT_0,
43 	MSM8916_SNOC_MM_INT_1,
44 	MSM8916_SNOC_MM_INT_2,
45 	MSM8916_SNOC_MM_INT_BIMC,
46 	MSM8916_PNOC_INT_0,
47 	MSM8916_PNOC_INT_1,
48 	MSM8916_PNOC_MAS_0,
49 	MSM8916_PNOC_MAS_1,
50 	MSM8916_PNOC_SLV_0,
51 	MSM8916_PNOC_SLV_1,
52 	MSM8916_PNOC_SLV_2,
53 	MSM8916_PNOC_SLV_3,
54 	MSM8916_PNOC_SLV_4,
55 	MSM8916_PNOC_SLV_8,
56 	MSM8916_PNOC_SLV_9,
57 	MSM8916_PNOC_SNOC_MAS,
58 	MSM8916_PNOC_SNOC_SLV,
59 	MSM8916_SNOC_QDSS_INT,
60 	MSM8916_SLAVE_AMPSS_L2,
61 	MSM8916_SLAVE_APSS,
62 	MSM8916_SLAVE_LPASS,
63 	MSM8916_SLAVE_BIMC_CFG,
64 	MSM8916_SLAVE_BLSP_1,
65 	MSM8916_SLAVE_BOOT_ROM,
66 	MSM8916_SLAVE_CAMERA_CFG,
67 	MSM8916_SLAVE_CATS_128,
68 	MSM8916_SLAVE_OCMEM_64,
69 	MSM8916_SLAVE_CLK_CTL,
70 	MSM8916_SLAVE_CRYPTO_0_CFG,
71 	MSM8916_SLAVE_DEHR_CFG,
72 	MSM8916_SLAVE_DISPLAY_CFG,
73 	MSM8916_SLAVE_EBI_CH0,
74 	MSM8916_SLAVE_GRAPHICS_3D_CFG,
75 	MSM8916_SLAVE_IMEM_CFG,
76 	MSM8916_SLAVE_IMEM,
77 	MSM8916_SLAVE_MPM,
78 	MSM8916_SLAVE_MSG_RAM,
79 	MSM8916_SLAVE_MSS,
80 	MSM8916_SLAVE_PDM,
81 	MSM8916_SLAVE_PMIC_ARB,
82 	MSM8916_SLAVE_PNOC_CFG,
83 	MSM8916_SLAVE_PRNG,
84 	MSM8916_SLAVE_QDSS_CFG,
85 	MSM8916_SLAVE_QDSS_STM,
86 	MSM8916_SLAVE_RBCPR_CFG,
87 	MSM8916_SLAVE_SDCC_1,
88 	MSM8916_SLAVE_SDCC_2,
89 	MSM8916_SLAVE_SECURITY,
90 	MSM8916_SLAVE_SNOC_CFG,
91 	MSM8916_SLAVE_SPDM,
92 	MSM8916_SLAVE_SRVC_SNOC,
93 	MSM8916_SLAVE_TCSR,
94 	MSM8916_SLAVE_TLMM,
95 	MSM8916_SLAVE_USB_HS,
96 	MSM8916_SLAVE_VENUS_CFG,
97 	MSM8916_SNOC_BIMC_0_MAS,
98 	MSM8916_SNOC_BIMC_0_SLV,
99 	MSM8916_SNOC_BIMC_1_MAS,
100 	MSM8916_SNOC_BIMC_1_SLV,
101 	MSM8916_SNOC_INT_0,
102 	MSM8916_SNOC_INT_1,
103 	MSM8916_SNOC_INT_BIMC,
104 	MSM8916_SNOC_PNOC_MAS,
105 	MSM8916_SNOC_PNOC_SLV,
106 };
107 
108 static const struct clk_bulk_data msm8916_bus_clocks[] = {
109 	{ .id = "bus" },
110 	{ .id = "bus_a" },
111 };
112 
113 DEFINE_QNODE(bimc_snoc_mas, MSM8916_BIMC_SNOC_MAS, 8, -1, -1, MSM8916_BIMC_SNOC_SLV);
114 DEFINE_QNODE(bimc_snoc_slv, MSM8916_BIMC_SNOC_SLV, 8, -1, -1, MSM8916_SNOC_INT_0, MSM8916_SNOC_INT_1);
115 DEFINE_QNODE(mas_apss, MSM8916_MASTER_AMPSS_M0, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
116 DEFINE_QNODE(mas_audio, MSM8916_MASTER_LPASS, 4, -1, -1, MSM8916_PNOC_MAS_0);
117 DEFINE_QNODE(mas_blsp_1, MSM8916_MASTER_BLSP_1, 4, -1, -1, MSM8916_PNOC_MAS_1);
118 DEFINE_QNODE(mas_dehr, MSM8916_MASTER_DEHR, 4, -1, -1, MSM8916_PNOC_MAS_0);
119 DEFINE_QNODE(mas_gfx, MSM8916_MASTER_GRAPHICS_3D, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
120 DEFINE_QNODE(mas_jpeg, MSM8916_MASTER_JPEG, 16, -1, -1, MSM8916_SNOC_MM_INT_0, MSM8916_SNOC_MM_INT_2);
121 DEFINE_QNODE(mas_mdp, MSM8916_MASTER_MDP_PORT0, 16, -1, -1, MSM8916_SNOC_MM_INT_0, MSM8916_SNOC_MM_INT_2);
122 DEFINE_QNODE(mas_pcnoc_crypto_0, MSM8916_MASTER_CRYPTO_CORE0, 8, -1, -1, MSM8916_PNOC_INT_1);
123 DEFINE_QNODE(mas_pcnoc_sdcc_1, MSM8916_MASTER_SDCC_1, 8, -1, -1, MSM8916_PNOC_INT_1);
124 DEFINE_QNODE(mas_pcnoc_sdcc_2, MSM8916_MASTER_SDCC_2, 8, -1, -1, MSM8916_PNOC_INT_1);
125 DEFINE_QNODE(mas_qdss_bam, MSM8916_MASTER_QDSS_BAM, 8, -1, -1, MSM8916_SNOC_QDSS_INT);
126 DEFINE_QNODE(mas_qdss_etr, MSM8916_MASTER_QDSS_ETR, 8, -1, -1, MSM8916_SNOC_QDSS_INT);
127 DEFINE_QNODE(mas_snoc_cfg, MSM8916_MASTER_SNOC_CFG, 4, -1, -1, MSM8916_SNOC_QDSS_INT);
128 DEFINE_QNODE(mas_spdm, MSM8916_MASTER_SPDM, 4, -1, -1, MSM8916_PNOC_MAS_0);
129 DEFINE_QNODE(mas_tcu0, MSM8916_MASTER_TCU0, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
130 DEFINE_QNODE(mas_tcu1, MSM8916_MASTER_TCU1, 8, -1, -1, MSM8916_SLAVE_EBI_CH0, MSM8916_BIMC_SNOC_MAS, MSM8916_SLAVE_AMPSS_L2);
131 DEFINE_QNODE(mas_usb_hs, MSM8916_MASTER_USB_HS, 4, -1, -1, MSM8916_PNOC_MAS_1);
132 DEFINE_QNODE(mas_vfe, MSM8916_MASTER_VFE, 16, -1, -1, MSM8916_SNOC_MM_INT_1, MSM8916_SNOC_MM_INT_2);
133 DEFINE_QNODE(mas_video, MSM8916_MASTER_VIDEO_P0, 16, -1, -1, MSM8916_SNOC_MM_INT_0, MSM8916_SNOC_MM_INT_2);
134 DEFINE_QNODE(mm_int_0, MSM8916_SNOC_MM_INT_0, 16, -1, -1, MSM8916_SNOC_MM_INT_BIMC);
135 DEFINE_QNODE(mm_int_1, MSM8916_SNOC_MM_INT_1, 16, -1, -1, MSM8916_SNOC_MM_INT_BIMC);
136 DEFINE_QNODE(mm_int_2, MSM8916_SNOC_MM_INT_2, 16, -1, -1, MSM8916_SNOC_INT_0);
137 DEFINE_QNODE(mm_int_bimc, MSM8916_SNOC_MM_INT_BIMC, 16, -1, -1, MSM8916_SNOC_BIMC_1_MAS);
138 DEFINE_QNODE(pcnoc_int_0, MSM8916_PNOC_INT_0, 8, -1, -1, MSM8916_PNOC_SNOC_MAS, MSM8916_PNOC_SLV_0, MSM8916_PNOC_SLV_1, MSM8916_PNOC_SLV_2, MSM8916_PNOC_SLV_3, MSM8916_PNOC_SLV_4, MSM8916_PNOC_SLV_8, MSM8916_PNOC_SLV_9);
139 DEFINE_QNODE(pcnoc_int_1, MSM8916_PNOC_INT_1, 8, -1, -1, MSM8916_PNOC_SNOC_MAS);
140 DEFINE_QNODE(pcnoc_m_0, MSM8916_PNOC_MAS_0, 8, -1, -1, MSM8916_PNOC_INT_0);
141 DEFINE_QNODE(pcnoc_m_1, MSM8916_PNOC_MAS_1, 8, -1, -1, MSM8916_PNOC_SNOC_MAS);
142 DEFINE_QNODE(pcnoc_s_0, MSM8916_PNOC_SLV_0, 4, -1, -1, MSM8916_SLAVE_CLK_CTL, MSM8916_SLAVE_TLMM, MSM8916_SLAVE_TCSR, MSM8916_SLAVE_SECURITY, MSM8916_SLAVE_MSS);
143 DEFINE_QNODE(pcnoc_s_1, MSM8916_PNOC_SLV_1, 4, -1, -1, MSM8916_SLAVE_IMEM_CFG, MSM8916_SLAVE_CRYPTO_0_CFG, MSM8916_SLAVE_MSG_RAM, MSM8916_SLAVE_PDM, MSM8916_SLAVE_PRNG);
144 DEFINE_QNODE(pcnoc_s_2, MSM8916_PNOC_SLV_2, 4, -1, -1, MSM8916_SLAVE_SPDM, MSM8916_SLAVE_BOOT_ROM, MSM8916_SLAVE_BIMC_CFG, MSM8916_SLAVE_PNOC_CFG, MSM8916_SLAVE_PMIC_ARB);
145 DEFINE_QNODE(pcnoc_s_3, MSM8916_PNOC_SLV_3, 4, -1, -1, MSM8916_SLAVE_MPM, MSM8916_SLAVE_SNOC_CFG, MSM8916_SLAVE_RBCPR_CFG, MSM8916_SLAVE_QDSS_CFG, MSM8916_SLAVE_DEHR_CFG);
146 DEFINE_QNODE(pcnoc_s_4, MSM8916_PNOC_SLV_4, 4, -1, -1, MSM8916_SLAVE_VENUS_CFG, MSM8916_SLAVE_CAMERA_CFG, MSM8916_SLAVE_DISPLAY_CFG);
147 DEFINE_QNODE(pcnoc_s_8, MSM8916_PNOC_SLV_8, 4, -1, -1, MSM8916_SLAVE_USB_HS, MSM8916_SLAVE_SDCC_1, MSM8916_SLAVE_BLSP_1);
148 DEFINE_QNODE(pcnoc_s_9, MSM8916_PNOC_SLV_9, 4, -1, -1, MSM8916_SLAVE_SDCC_2, MSM8916_SLAVE_LPASS, MSM8916_SLAVE_GRAPHICS_3D_CFG);
149 DEFINE_QNODE(pcnoc_snoc_mas, MSM8916_PNOC_SNOC_MAS, 8, 29, -1, MSM8916_PNOC_SNOC_SLV);
150 DEFINE_QNODE(pcnoc_snoc_slv, MSM8916_PNOC_SNOC_SLV, 8, -1, 45, MSM8916_SNOC_INT_0, MSM8916_SNOC_INT_BIMC, MSM8916_SNOC_INT_1);
151 DEFINE_QNODE(qdss_int, MSM8916_SNOC_QDSS_INT, 8, -1, -1, MSM8916_SNOC_INT_0, MSM8916_SNOC_INT_BIMC);
152 DEFINE_QNODE(slv_apps_l2, MSM8916_SLAVE_AMPSS_L2, 8, -1, -1, 0);
153 DEFINE_QNODE(slv_apss, MSM8916_SLAVE_APSS, 4, -1, -1, 0);
154 DEFINE_QNODE(slv_audio, MSM8916_SLAVE_LPASS, 4, -1, -1, 0);
155 DEFINE_QNODE(slv_bimc_cfg, MSM8916_SLAVE_BIMC_CFG, 4, -1, -1, 0);
156 DEFINE_QNODE(slv_blsp_1, MSM8916_SLAVE_BLSP_1, 4, -1, -1, 0);
157 DEFINE_QNODE(slv_boot_rom, MSM8916_SLAVE_BOOT_ROM, 4, -1, -1, 0);
158 DEFINE_QNODE(slv_camera_cfg, MSM8916_SLAVE_CAMERA_CFG, 4, -1, -1, 0);
159 DEFINE_QNODE(slv_cats_0, MSM8916_SLAVE_CATS_128, 16, -1, -1, 0);
160 DEFINE_QNODE(slv_cats_1, MSM8916_SLAVE_OCMEM_64, 8, -1, -1, 0);
161 DEFINE_QNODE(slv_clk_ctl, MSM8916_SLAVE_CLK_CTL, 4, -1, -1, 0);
162 DEFINE_QNODE(slv_crypto_0_cfg, MSM8916_SLAVE_CRYPTO_0_CFG, 4, -1, -1, 0);
163 DEFINE_QNODE(slv_dehr_cfg, MSM8916_SLAVE_DEHR_CFG, 4, -1, -1, 0);
164 DEFINE_QNODE(slv_display_cfg, MSM8916_SLAVE_DISPLAY_CFG, 4, -1, -1, 0);
165 DEFINE_QNODE(slv_ebi_ch0, MSM8916_SLAVE_EBI_CH0, 8, -1, 0, 0);
166 DEFINE_QNODE(slv_gfx_cfg, MSM8916_SLAVE_GRAPHICS_3D_CFG, 4, -1, -1, 0);
167 DEFINE_QNODE(slv_imem_cfg, MSM8916_SLAVE_IMEM_CFG, 4, -1, -1, 0);
168 DEFINE_QNODE(slv_imem, MSM8916_SLAVE_IMEM, 8, -1, 26, 0);
169 DEFINE_QNODE(slv_mpm, MSM8916_SLAVE_MPM, 4, -1, -1, 0);
170 DEFINE_QNODE(slv_msg_ram, MSM8916_SLAVE_MSG_RAM, 4, -1, -1, 0);
171 DEFINE_QNODE(slv_mss, MSM8916_SLAVE_MSS, 4, -1, -1, 0);
172 DEFINE_QNODE(slv_pdm, MSM8916_SLAVE_PDM, 4, -1, -1, 0);
173 DEFINE_QNODE(slv_pmic_arb, MSM8916_SLAVE_PMIC_ARB, 4, -1, -1, 0);
174 DEFINE_QNODE(slv_pcnoc_cfg, MSM8916_SLAVE_PNOC_CFG, 4, -1, -1, 0);
175 DEFINE_QNODE(slv_prng, MSM8916_SLAVE_PRNG, 4, -1, -1, 0);
176 DEFINE_QNODE(slv_qdss_cfg, MSM8916_SLAVE_QDSS_CFG, 4, -1, -1, 0);
177 DEFINE_QNODE(slv_qdss_stm, MSM8916_SLAVE_QDSS_STM, 4, -1, 30, 0);
178 DEFINE_QNODE(slv_rbcpr_cfg, MSM8916_SLAVE_RBCPR_CFG, 4, -1, -1, 0);
179 DEFINE_QNODE(slv_sdcc_1, MSM8916_SLAVE_SDCC_1, 4, -1, -1, 0);
180 DEFINE_QNODE(slv_sdcc_2, MSM8916_SLAVE_SDCC_2, 4, -1, -1, 0);
181 DEFINE_QNODE(slv_security, MSM8916_SLAVE_SECURITY, 4, -1, -1, 0);
182 DEFINE_QNODE(slv_snoc_cfg, MSM8916_SLAVE_SNOC_CFG, 4, -1, -1, 0);
183 DEFINE_QNODE(slv_spdm, MSM8916_SLAVE_SPDM, 4, -1, -1, 0);
184 DEFINE_QNODE(slv_srvc_snoc, MSM8916_SLAVE_SRVC_SNOC, 8, -1, -1, 0);
185 DEFINE_QNODE(slv_tcsr, MSM8916_SLAVE_TCSR, 4, -1, -1, 0);
186 DEFINE_QNODE(slv_tlmm, MSM8916_SLAVE_TLMM, 4, -1, -1, 0);
187 DEFINE_QNODE(slv_usb_hs, MSM8916_SLAVE_USB_HS, 4, -1, -1, 0);
188 DEFINE_QNODE(slv_venus_cfg, MSM8916_SLAVE_VENUS_CFG, 4, -1, -1, 0);
189 DEFINE_QNODE(snoc_bimc_0_mas, MSM8916_SNOC_BIMC_0_MAS, 8, 3, -1, MSM8916_SNOC_BIMC_0_SLV);
190 DEFINE_QNODE(snoc_bimc_0_slv, MSM8916_SNOC_BIMC_0_SLV, 8, -1, 24, MSM8916_SLAVE_EBI_CH0);
191 DEFINE_QNODE(snoc_bimc_1_mas, MSM8916_SNOC_BIMC_1_MAS, 16, -1, -1, MSM8916_SNOC_BIMC_1_SLV);
192 DEFINE_QNODE(snoc_bimc_1_slv, MSM8916_SNOC_BIMC_1_SLV, 8, -1, -1, MSM8916_SLAVE_EBI_CH0);
193 DEFINE_QNODE(snoc_int_0, MSM8916_SNOC_INT_0, 8, 99, 130, MSM8916_SLAVE_QDSS_STM, MSM8916_SLAVE_IMEM, MSM8916_SNOC_PNOC_MAS);
194 DEFINE_QNODE(snoc_int_1, MSM8916_SNOC_INT_1, 8, -1, -1, MSM8916_SLAVE_APSS, MSM8916_SLAVE_CATS_128, MSM8916_SLAVE_OCMEM_64);
195 DEFINE_QNODE(snoc_int_bimc, MSM8916_SNOC_INT_BIMC, 8, 101, 132, MSM8916_SNOC_BIMC_0_MAS);
196 DEFINE_QNODE(snoc_pcnoc_mas, MSM8916_SNOC_PNOC_MAS, 8, -1, -1, MSM8916_SNOC_PNOC_SLV);
197 DEFINE_QNODE(snoc_pcnoc_slv, MSM8916_SNOC_PNOC_SLV, 8, -1, -1, MSM8916_PNOC_INT_0);
198 
199 static struct qcom_icc_node *msm8916_snoc_nodes[] = {
200 	[BIMC_SNOC_SLV] = &bimc_snoc_slv,
201 	[MASTER_JPEG] = &mas_jpeg,
202 	[MASTER_MDP_PORT0] = &mas_mdp,
203 	[MASTER_QDSS_BAM] = &mas_qdss_bam,
204 	[MASTER_QDSS_ETR] = &mas_qdss_etr,
205 	[MASTER_SNOC_CFG] = &mas_snoc_cfg,
206 	[MASTER_VFE] = &mas_vfe,
207 	[MASTER_VIDEO_P0] = &mas_video,
208 	[SNOC_MM_INT_0] = &mm_int_0,
209 	[SNOC_MM_INT_1] = &mm_int_1,
210 	[SNOC_MM_INT_2] = &mm_int_2,
211 	[SNOC_MM_INT_BIMC] = &mm_int_bimc,
212 	[PCNOC_SNOC_SLV] = &pcnoc_snoc_slv,
213 	[SLAVE_APSS] = &slv_apss,
214 	[SLAVE_CATS_128] = &slv_cats_0,
215 	[SLAVE_OCMEM_64] = &slv_cats_1,
216 	[SLAVE_IMEM] = &slv_imem,
217 	[SLAVE_QDSS_STM] = &slv_qdss_stm,
218 	[SLAVE_SRVC_SNOC] = &slv_srvc_snoc,
219 	[SNOC_BIMC_0_MAS] = &snoc_bimc_0_mas,
220 	[SNOC_BIMC_1_MAS] = &snoc_bimc_1_mas,
221 	[SNOC_INT_0] = &snoc_int_0,
222 	[SNOC_INT_1] = &snoc_int_1,
223 	[SNOC_INT_BIMC] = &snoc_int_bimc,
224 	[SNOC_PCNOC_MAS] = &snoc_pcnoc_mas,
225 	[SNOC_QDSS_INT] = &qdss_int,
226 };
227 
228 static struct qcom_icc_desc msm8916_snoc = {
229 	.nodes = msm8916_snoc_nodes,
230 	.num_nodes = ARRAY_SIZE(msm8916_snoc_nodes),
231 };
232 
233 static struct qcom_icc_node *msm8916_bimc_nodes[] = {
234 	[BIMC_SNOC_MAS] = &bimc_snoc_mas,
235 	[MASTER_AMPSS_M0] = &mas_apss,
236 	[MASTER_GRAPHICS_3D] = &mas_gfx,
237 	[MASTER_TCU0] = &mas_tcu0,
238 	[MASTER_TCU1] = &mas_tcu1,
239 	[SLAVE_AMPSS_L2] = &slv_apps_l2,
240 	[SLAVE_EBI_CH0] = &slv_ebi_ch0,
241 	[SNOC_BIMC_0_SLV] = &snoc_bimc_0_slv,
242 	[SNOC_BIMC_1_SLV] = &snoc_bimc_1_slv,
243 };
244 
245 static struct qcom_icc_desc msm8916_bimc = {
246 	.nodes = msm8916_bimc_nodes,
247 	.num_nodes = ARRAY_SIZE(msm8916_bimc_nodes),
248 };
249 
250 static struct qcom_icc_node *msm8916_pcnoc_nodes[] = {
251 	[MASTER_BLSP_1] = &mas_blsp_1,
252 	[MASTER_DEHR] = &mas_dehr,
253 	[MASTER_LPASS] = &mas_audio,
254 	[MASTER_CRYPTO_CORE0] = &mas_pcnoc_crypto_0,
255 	[MASTER_SDCC_1] = &mas_pcnoc_sdcc_1,
256 	[MASTER_SDCC_2] = &mas_pcnoc_sdcc_2,
257 	[MASTER_SPDM] = &mas_spdm,
258 	[MASTER_USB_HS] = &mas_usb_hs,
259 	[PCNOC_INT_0] = &pcnoc_int_0,
260 	[PCNOC_INT_1] = &pcnoc_int_1,
261 	[PCNOC_MAS_0] = &pcnoc_m_0,
262 	[PCNOC_MAS_1] = &pcnoc_m_1,
263 	[PCNOC_SLV_0] = &pcnoc_s_0,
264 	[PCNOC_SLV_1] = &pcnoc_s_1,
265 	[PCNOC_SLV_2] = &pcnoc_s_2,
266 	[PCNOC_SLV_3] = &pcnoc_s_3,
267 	[PCNOC_SLV_4] = &pcnoc_s_4,
268 	[PCNOC_SLV_8] = &pcnoc_s_8,
269 	[PCNOC_SLV_9] = &pcnoc_s_9,
270 	[PCNOC_SNOC_MAS] = &pcnoc_snoc_mas,
271 	[SLAVE_BIMC_CFG] = &slv_bimc_cfg,
272 	[SLAVE_BLSP_1] = &slv_blsp_1,
273 	[SLAVE_BOOT_ROM] = &slv_boot_rom,
274 	[SLAVE_CAMERA_CFG] = &slv_camera_cfg,
275 	[SLAVE_CLK_CTL] = &slv_clk_ctl,
276 	[SLAVE_CRYPTO_0_CFG] = &slv_crypto_0_cfg,
277 	[SLAVE_DEHR_CFG] = &slv_dehr_cfg,
278 	[SLAVE_DISPLAY_CFG] = &slv_display_cfg,
279 	[SLAVE_GRAPHICS_3D_CFG] = &slv_gfx_cfg,
280 	[SLAVE_IMEM_CFG] = &slv_imem_cfg,
281 	[SLAVE_LPASS] = &slv_audio,
282 	[SLAVE_MPM] = &slv_mpm,
283 	[SLAVE_MSG_RAM] = &slv_msg_ram,
284 	[SLAVE_MSS] = &slv_mss,
285 	[SLAVE_PDM] = &slv_pdm,
286 	[SLAVE_PMIC_ARB] = &slv_pmic_arb,
287 	[SLAVE_PCNOC_CFG] = &slv_pcnoc_cfg,
288 	[SLAVE_PRNG] = &slv_prng,
289 	[SLAVE_QDSS_CFG] = &slv_qdss_cfg,
290 	[SLAVE_RBCPR_CFG] = &slv_rbcpr_cfg,
291 	[SLAVE_SDCC_1] = &slv_sdcc_1,
292 	[SLAVE_SDCC_2] = &slv_sdcc_2,
293 	[SLAVE_SECURITY] = &slv_security,
294 	[SLAVE_SNOC_CFG] = &slv_snoc_cfg,
295 	[SLAVE_SPDM] = &slv_spdm,
296 	[SLAVE_TCSR] = &slv_tcsr,
297 	[SLAVE_TLMM] = &slv_tlmm,
298 	[SLAVE_USB_HS] = &slv_usb_hs,
299 	[SLAVE_VENUS_CFG] = &slv_venus_cfg,
300 	[SNOC_PCNOC_SLV] = &snoc_pcnoc_slv,
301 };
302 
303 static struct qcom_icc_desc msm8916_pcnoc = {
304 	.nodes = msm8916_pcnoc_nodes,
305 	.num_nodes = ARRAY_SIZE(msm8916_pcnoc_nodes),
306 };
307 
308 static int msm8916_qnoc_probe(struct platform_device *pdev)
309 {
310 	return qnoc_probe(pdev, sizeof(msm8916_bus_clocks),
311 			  ARRAY_SIZE(msm8916_bus_clocks), msm8916_bus_clocks);
312 }
313 
314 static const struct of_device_id msm8916_noc_of_match[] = {
315 	{ .compatible = "qcom,msm8916-bimc", .data = &msm8916_bimc },
316 	{ .compatible = "qcom,msm8916-pcnoc", .data = &msm8916_pcnoc },
317 	{ .compatible = "qcom,msm8916-snoc", .data = &msm8916_snoc },
318 	{ }
319 };
320 MODULE_DEVICE_TABLE(of, msm8916_noc_of_match);
321 
322 static struct platform_driver msm8916_noc_driver = {
323 	.probe = msm8916_qnoc_probe,
324 	.remove = qnoc_remove,
325 	.driver = {
326 		.name = "qnoc-msm8916",
327 		.of_match_table = msm8916_noc_of_match,
328 	},
329 };
330 module_platform_driver(msm8916_noc_driver);
331 MODULE_AUTHOR("Georgi Djakov <georgi.djakov@linaro.org>");
332 MODULE_DESCRIPTION("Qualcomm MSM8916 NoC driver");
333 MODULE_LICENSE("GPL v2");
334