Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

interconnect: msm8916: add support for AP-owned nodes

Port support for AP-owned nodes from the downstream device tree.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Link: https://lore.kernel.org/r/20210903232421.1384199-8-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>

authored by

Dmitry Baryshkov and committed by
Georgi Djakov
cbf91c87 6b9bbedd

+100
+100
drivers/interconnect/qcom/msm8916.c
··· 10 10 #include <linux/io.h> 11 11 #include <linux/module.h> 12 12 #include <linux/platform_device.h> 13 + #include <linux/regmap.h> 13 14 #include <linux/of_device.h> 14 15 15 16 #include <dt-bindings/interconnect/qcom,msm8916.h> ··· 116 115 .buswidth = 8, 117 116 .mas_rpm_id = -1, 118 117 .slv_rpm_id = -1, 118 + .qos.ap_owned = true, 119 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 119 120 .num_links = ARRAY_SIZE(bimc_snoc_mas_links), 120 121 .links = bimc_snoc_mas_links, 121 122 }; ··· 133 130 .buswidth = 8, 134 131 .mas_rpm_id = -1, 135 132 .slv_rpm_id = -1, 133 + .qos.ap_owned = true, 134 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 136 135 .num_links = ARRAY_SIZE(bimc_snoc_slv_links), 137 136 .links = bimc_snoc_slv_links, 138 137 }; ··· 151 146 .buswidth = 8, 152 147 .mas_rpm_id = -1, 153 148 .slv_rpm_id = -1, 149 + .qos.ap_owned = true, 150 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 151 + .qos.areq_prio = 0, 152 + .qos.prio_level = 0, 153 + .qos.qos_port = 0, 154 154 .num_links = ARRAY_SIZE(mas_apss_links), 155 155 .links = mas_apss_links, 156 156 }; ··· 214 204 .buswidth = 8, 215 205 .mas_rpm_id = -1, 216 206 .slv_rpm_id = -1, 207 + .qos.ap_owned = true, 208 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 209 + .qos.areq_prio = 0, 210 + .qos.prio_level = 0, 211 + .qos.qos_port = 2, 217 212 .num_links = ARRAY_SIZE(mas_gfx_links), 218 213 .links = mas_gfx_links, 219 214 }; ··· 234 219 .buswidth = 16, 235 220 .mas_rpm_id = -1, 236 221 .slv_rpm_id = -1, 222 + .qos.ap_owned = true, 223 + .qos.qos_mode = NOC_QOS_MODE_BYPASS, 224 + .qos.areq_prio = 0, 225 + .qos.prio_level = 0, 226 + .qos.qos_port = 6, 237 227 .num_links = ARRAY_SIZE(mas_jpeg_links), 238 228 .links = mas_jpeg_links, 239 229 }; ··· 254 234 .buswidth = 16, 255 235 .mas_rpm_id = -1, 256 236 .slv_rpm_id = -1, 237 + .qos.ap_owned = true, 238 + .qos.qos_mode = NOC_QOS_MODE_BYPASS, 239 + .qos.areq_prio = 0, 240 + .qos.prio_level = 0, 241 + .qos.qos_port = 7, 257 242 .num_links = ARRAY_SIZE(mas_mdp_links), 258 243 .links = mas_mdp_links, 259 244 }; ··· 315 290 .buswidth = 8, 316 291 .mas_rpm_id = -1, 317 292 .slv_rpm_id = -1, 293 + .qos.ap_owned = true, 294 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 295 + .qos.areq_prio = 1, 296 + .qos.prio_level = 1, 297 + .qos.qos_port = 11, 318 298 .num_links = ARRAY_SIZE(mas_qdss_bam_links), 319 299 .links = mas_qdss_bam_links, 320 300 }; ··· 334 304 .buswidth = 8, 335 305 .mas_rpm_id = -1, 336 306 .slv_rpm_id = -1, 307 + .qos.ap_owned = true, 308 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 309 + .qos.areq_prio = 1, 310 + .qos.prio_level = 1, 311 + .qos.qos_port = 10, 337 312 .num_links = ARRAY_SIZE(mas_qdss_etr_links), 338 313 .links = mas_qdss_etr_links, 339 314 }; ··· 383 348 .buswidth = 8, 384 349 .mas_rpm_id = -1, 385 350 .slv_rpm_id = -1, 351 + .qos.ap_owned = true, 352 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 353 + .qos.areq_prio = 2, 354 + .qos.prio_level = 2, 355 + .qos.qos_port = 5, 386 356 .num_links = ARRAY_SIZE(mas_tcu0_links), 387 357 .links = mas_tcu0_links, 388 358 }; ··· 404 364 .buswidth = 8, 405 365 .mas_rpm_id = -1, 406 366 .slv_rpm_id = -1, 367 + .qos.ap_owned = true, 368 + .qos.qos_mode = NOC_QOS_MODE_FIXED, 369 + .qos.areq_prio = 2, 370 + .qos.prio_level = 2, 371 + .qos.qos_port = 6, 407 372 .num_links = ARRAY_SIZE(mas_tcu1_links), 408 373 .links = mas_tcu1_links, 409 374 }; ··· 438 393 .buswidth = 16, 439 394 .mas_rpm_id = -1, 440 395 .slv_rpm_id = -1, 396 + .qos.ap_owned = true, 397 + .qos.qos_mode = NOC_QOS_MODE_BYPASS, 398 + .qos.areq_prio = 0, 399 + .qos.prio_level = 0, 400 + .qos.qos_port = 9, 441 401 .num_links = ARRAY_SIZE(mas_vfe_links), 442 402 .links = mas_vfe_links, 443 403 }; ··· 458 408 .buswidth = 16, 459 409 .mas_rpm_id = -1, 460 410 .slv_rpm_id = -1, 411 + .qos.ap_owned = true, 412 + .qos.qos_mode = NOC_QOS_MODE_BYPASS, 413 + .qos.areq_prio = 0, 414 + .qos.prio_level = 0, 415 + .qos.qos_port = 8, 461 416 .num_links = ARRAY_SIZE(mas_video_links), 462 417 .links = mas_video_links, 463 418 }; ··· 477 422 .buswidth = 16, 478 423 .mas_rpm_id = -1, 479 424 .slv_rpm_id = -1, 425 + .qos.ap_owned = true, 426 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 480 427 .num_links = ARRAY_SIZE(mm_int_0_links), 481 428 .links = mm_int_0_links, 482 429 }; ··· 493 436 .buswidth = 16, 494 437 .mas_rpm_id = -1, 495 438 .slv_rpm_id = -1, 439 + .qos.ap_owned = true, 440 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 496 441 .num_links = ARRAY_SIZE(mm_int_1_links), 497 442 .links = mm_int_1_links, 498 443 }; ··· 509 450 .buswidth = 16, 510 451 .mas_rpm_id = -1, 511 452 .slv_rpm_id = -1, 453 + .qos.ap_owned = true, 454 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 512 455 .num_links = ARRAY_SIZE(mm_int_2_links), 513 456 .links = mm_int_2_links, 514 457 }; ··· 525 464 .buswidth = 16, 526 465 .mas_rpm_id = -1, 527 466 .slv_rpm_id = -1, 467 + .qos.ap_owned = true, 468 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 528 469 .num_links = ARRAY_SIZE(mm_int_bimc_links), 529 470 .links = mm_int_bimc_links, 530 471 }; ··· 755 692 .buswidth = 8, 756 693 .mas_rpm_id = -1, 757 694 .slv_rpm_id = -1, 695 + .qos.ap_owned = true, 696 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 758 697 .num_links = ARRAY_SIZE(qdss_int_links), 759 698 .links = qdss_int_links, 760 699 }; ··· 1095 1030 .buswidth = 16, 1096 1031 .mas_rpm_id = -1, 1097 1032 .slv_rpm_id = -1, 1033 + .qos.ap_owned = true, 1034 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 1098 1035 .num_links = ARRAY_SIZE(snoc_bimc_1_mas_links), 1099 1036 .links = snoc_bimc_1_mas_links, 1100 1037 }; ··· 1111 1044 .buswidth = 8, 1112 1045 .mas_rpm_id = -1, 1113 1046 .slv_rpm_id = -1, 1047 + .qos.ap_owned = true, 1048 + .qos.qos_mode = NOC_QOS_MODE_INVALID, 1114 1049 .num_links = ARRAY_SIZE(snoc_bimc_1_slv_links), 1115 1050 .links = snoc_bimc_1_slv_links, 1116 1051 }; ··· 1220 1151 [SNOC_QDSS_INT] = &qdss_int, 1221 1152 }; 1222 1153 1154 + static const struct regmap_config msm8916_snoc_regmap_config = { 1155 + .reg_bits = 32, 1156 + .reg_stride = 4, 1157 + .val_bits = 32, 1158 + .max_register = 0x14000, 1159 + .fast_io = true, 1160 + }; 1161 + 1223 1162 static struct qcom_icc_desc msm8916_snoc = { 1224 1163 .nodes = msm8916_snoc_nodes, 1225 1164 .num_nodes = ARRAY_SIZE(msm8916_snoc_nodes), 1165 + .regmap_cfg = &msm8916_snoc_regmap_config, 1166 + .qos_offset = 0x7000, 1226 1167 }; 1227 1168 1228 1169 static struct qcom_icc_node *msm8916_bimc_nodes[] = { ··· 1247 1168 [SNOC_BIMC_1_SLV] = &snoc_bimc_1_slv, 1248 1169 }; 1249 1170 1171 + static const struct regmap_config msm8916_bimc_regmap_config = { 1172 + .reg_bits = 32, 1173 + .reg_stride = 4, 1174 + .val_bits = 32, 1175 + .max_register = 0x62000, 1176 + .fast_io = true, 1177 + }; 1178 + 1250 1179 static struct qcom_icc_desc msm8916_bimc = { 1251 1180 .nodes = msm8916_bimc_nodes, 1252 1181 .num_nodes = ARRAY_SIZE(msm8916_bimc_nodes), 1182 + .is_bimc_node = true, 1183 + .regmap_cfg = &msm8916_bimc_regmap_config, 1184 + .qos_offset = 0x8000, 1253 1185 }; 1254 1186 1255 1187 static struct qcom_icc_node *msm8916_pcnoc_nodes[] = { ··· 1316 1226 [SNOC_PCNOC_SLV] = &snoc_pcnoc_slv, 1317 1227 }; 1318 1228 1229 + static const struct regmap_config msm8916_pcnoc_regmap_config = { 1230 + .reg_bits = 32, 1231 + .reg_stride = 4, 1232 + .val_bits = 32, 1233 + .max_register = 0x11000, 1234 + .fast_io = true, 1235 + }; 1236 + 1319 1237 static struct qcom_icc_desc msm8916_pcnoc = { 1320 1238 .nodes = msm8916_pcnoc_nodes, 1321 1239 .num_nodes = ARRAY_SIZE(msm8916_pcnoc_nodes), 1240 + .regmap_cfg = &msm8916_pcnoc_regmap_config, 1241 + .qos_offset = 0x7000, 1322 1242 }; 1323 1243 1324 1244 static const struct of_device_id msm8916_noc_of_match[] = {