Skip to content

Commit cde2f92

Browse files
konradybcioGeorgi Djakov
authored andcommitted
interconnect: qcom: sm8250: Fix QUP0 nodes
The QUP0 BCM relates to some internal property of the QUPs, and should be configured independently of the path to the QUP. In line with other platforms expose QUP_CORE endpoints in order allow this configuration. Fixes: 6df5b34 ("interconnect: qcom: Add SM8250 interconnect provider driver") Signed-off-by: Konrad Dybcio <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent ddd6c5b commit cde2f92

File tree

2 files changed

+77
-3
lines changed

2 files changed

+77
-3
lines changed

drivers/interconnect/qcom/sm8250.c

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,54 @@ DEFINE_QNODE(xs_pcie_modem, SM8250_SLAVE_PCIE_2, 1, 8);
164164
DEFINE_QNODE(xs_qdss_stm, SM8250_SLAVE_QDSS_STM, 1, 4);
165165
DEFINE_QNODE(xs_sys_tcu_cfg, SM8250_SLAVE_TCU, 1, 8);
166166

167+
static struct qcom_icc_node qup0_core_master = {
168+
.name = "qup0_core_master",
169+
.id = SM8250_MASTER_QUP_CORE_0,
170+
.channels = 1,
171+
.buswidth = 4,
172+
.num_links = 1,
173+
.links = { SM8250_SLAVE_QUP_CORE_0 },
174+
};
175+
176+
static struct qcom_icc_node qup1_core_master = {
177+
.name = "qup1_core_master",
178+
.id = SM8250_MASTER_QUP_CORE_1,
179+
.channels = 1,
180+
.buswidth = 4,
181+
.num_links = 1,
182+
.links = { SM8250_SLAVE_QUP_CORE_1 },
183+
};
184+
185+
static struct qcom_icc_node qup2_core_master = {
186+
.name = "qup2_core_master",
187+
.id = SM8250_MASTER_QUP_CORE_2,
188+
.channels = 1,
189+
.buswidth = 4,
190+
.num_links = 1,
191+
.links = { SM8250_SLAVE_QUP_CORE_2 },
192+
};
193+
194+
static struct qcom_icc_node qup0_core_slave = {
195+
.name = "qup0_core_slave",
196+
.id = SM8250_SLAVE_QUP_CORE_0,
197+
.channels = 1,
198+
.buswidth = 4,
199+
};
200+
201+
static struct qcom_icc_node qup1_core_slave = {
202+
.name = "qup1_core_slave",
203+
.id = SM8250_SLAVE_QUP_CORE_1,
204+
.channels = 1,
205+
.buswidth = 4,
206+
};
207+
208+
static struct qcom_icc_node qup2_core_slave = {
209+
.name = "qup2_core_slave",
210+
.id = SM8250_SLAVE_QUP_CORE_2,
211+
.channels = 1,
212+
.buswidth = 4,
213+
};
214+
167215
DEFINE_QBCM(bcm_acv, "ACV", false, &ebi);
168216
DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
169217
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
@@ -172,7 +220,7 @@ DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
172220
DEFINE_QBCM(bcm_mm1, "MM1", false, &qnm_camnoc_hf, &qxm_mdp0, &qxm_mdp1);
173221
DEFINE_QBCM(bcm_sh2, "SH2", false, &alm_gpu_tcu, &alm_sys_tcu);
174222
DEFINE_QBCM(bcm_mm2, "MM2", false, &qns_mem_noc_sf);
175-
DEFINE_QBCM(bcm_qup0, "QUP0", false, &qhm_qup1, &qhm_qup2, &qhm_qup0);
223+
DEFINE_QBCM(bcm_qup0, "QUP0", false, &qup0_core_master, &qup1_core_master, &qup2_core_master);
176224
DEFINE_QBCM(bcm_sh3, "SH3", false, &qnm_cmpnoc);
177225
DEFINE_QBCM(bcm_mm3, "MM3", false, &qnm_camnoc_icp, &qnm_camnoc_sf, &qnm_video0, &qnm_video1, &qnm_video_cvp);
178226
DEFINE_QBCM(bcm_sh4, "SH4", false, &chm_apps);
@@ -193,7 +241,6 @@ DEFINE_QBCM(bcm_sn11, "SN11", false, &qnm_gemnoc);
193241
DEFINE_QBCM(bcm_sn12, "SN12", false, &qns_pcie_modem_mem_noc, &qns_pcie_mem_noc);
194242

195243
static struct qcom_icc_bcm * const aggre1_noc_bcms[] = {
196-
&bcm_qup0,
197244
&bcm_sn12,
198245
};
199246

@@ -222,10 +269,29 @@ static const struct qcom_icc_desc sm8250_aggre1_noc = {
222269

223270
static struct qcom_icc_bcm * const aggre2_noc_bcms[] = {
224271
&bcm_ce0,
225-
&bcm_qup0,
226272
&bcm_sn12,
227273
};
228274

275+
static struct qcom_icc_bcm * const qup_virt_bcms[] = {
276+
&bcm_qup0,
277+
};
278+
279+
static struct qcom_icc_node *qup_virt_nodes[] = {
280+
[MASTER_QUP_CORE_0] = &qup0_core_master,
281+
[MASTER_QUP_CORE_1] = &qup1_core_master,
282+
[MASTER_QUP_CORE_2] = &qup2_core_master,
283+
[SLAVE_QUP_CORE_0] = &qup0_core_slave,
284+
[SLAVE_QUP_CORE_1] = &qup1_core_slave,
285+
[SLAVE_QUP_CORE_2] = &qup2_core_slave,
286+
};
287+
288+
static const struct qcom_icc_desc sm8250_qup_virt = {
289+
.nodes = qup_virt_nodes,
290+
.num_nodes = ARRAY_SIZE(qup_virt_nodes),
291+
.bcms = qup_virt_bcms,
292+
.num_bcms = ARRAY_SIZE(qup_virt_bcms),
293+
};
294+
229295
static struct qcom_icc_node * const aggre2_noc_nodes[] = {
230296
[MASTER_A2NOC_CFG] = &qhm_a2noc_cfg,
231297
[MASTER_QDSS_BAM] = &qhm_qdss_bam,
@@ -518,6 +584,8 @@ static const struct of_device_id qnoc_of_match[] = {
518584
.data = &sm8250_mmss_noc},
519585
{ .compatible = "qcom,sm8250-npu-noc",
520586
.data = &sm8250_npu_noc},
587+
{ .compatible = "qcom,sm8250-qup-virt",
588+
.data = &sm8250_qup_virt },
521589
{ .compatible = "qcom,sm8250-system-noc",
522590
.data = &sm8250_system_noc},
523591
{ }

drivers/interconnect/qcom/sm8250.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,11 @@
158158
#define SM8250_SLAVE_VSENSE_CTRL_CFG 147
159159
#define SM8250_SNOC_CNOC_MAS 148
160160
#define SM8250_SNOC_CNOC_SLV 149
161+
#define SM8250_MASTER_QUP_CORE_0 150
162+
#define SM8250_MASTER_QUP_CORE_1 151
163+
#define SM8250_MASTER_QUP_CORE_2 152
164+
#define SM8250_SLAVE_QUP_CORE_0 153
165+
#define SM8250_SLAVE_QUP_CORE_1 154
166+
#define SM8250_SLAVE_QUP_CORE_2 155
161167

162168
#endif

0 commit comments

Comments
 (0)