From nobody Wed Nov 25 17:40:04 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.47.186.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795621585; b=xei4teS9rpREi99MXP79jRYvD+7RSj/1eQltHLztbGH6xwOsE6Hqte9whDLxarItDjIy NBL0zf77IJz2nuxST2ZXez9GY/nqTweYyzMuoiD0YEYW/lZGuq7+UbGrGAhW9LtOAgwLT dvrFXLTy2TZkv02LC4jP9AWfiOsQJJTNKhvkrQmblVzegwhae9bxsXLxmEqz2Pzt9EOvU YUfgpFG9uBuf1TfF4+A5YzK8s74g9zdllAeYM54iBtVyscvgzoYpqAW4+qaIcYkd3PniV nV6g844svwQTEuJDUpF/0+QpnA4E2z97arIbmeaFPvDGsPVsEIevNI2po7VQ/zADuwg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795621585; h=DMARC-Filter:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=drBy3hL6KwxHBhNonmFa34I0uyR+LFO1bY6d8UYU1NI=; b=yLg85TE/mTPgQ0BxqvYz9pvGw46Le0gVr58KYqlG7w8liF6cZElwOwfG9YCthCwir45o 3aByLDi+bxkJVUcooioYxBBdH5rd7fnTVgmQf1Efcs3jCT3fywGRpkQm0yzAMnJuZpg3f 5O4QIo+wDwwL8HzEzjs6doBK9xwAQAzpfrWCDGQc+MgbS7EDVPP2rnNGcPupruYpKRxD0 x88n6WW45j7R3JEStwD/DtHiJ4ZtklXFIzkM+W8B9TJ200HJRhrqglq1wJpQjy0CV35oY 5LxZfCN8q/Cq4RvnCFil5mOlROoCVUhbLvwuDVhxttpsuiiAqGicA8jaFH0ryn531fQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=krgm.moe; spf=pass smtp.mailfrom=krgm.moe; arc=none smtp.remote-ip=103.47.186.116 Received: from krgm.moe (krgm.moe [103.47.186.116]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 084DF606A327; Wed, 25 Nov 2026 15:46:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 084DF606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=krgm.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=krgm.moe Received: from yuno-laptop.local (unknown [103.47.186.116]) by krgm.moe (Postfix) with ESMTPSA id 4DB28859; Wed, 25 Nov 2026 21:16:22 +0530 (IST) From: SignKirigami Date: Wed, 25 Nov 2026 23:45:47 +0800 Subject: [PATCH v3 1/2] dt-bindings: interconnect: Add Qualcomm Netrani RPMh interconnect X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261125-netrani-interconnect-v2-v3-1-1136e2cc6e3e@krgm.moe> References: <20261125-netrani-interconnect-v2-v3-0-1136e2cc6e3e@krgm.moe> In-Reply-To: <20261125-netrani-interconnect-v2-v3-0-1136e2cc6e3e@krgm.moe> To: Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , SignKirigami Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.15.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7668; i=prcups@krgm.moe; h=from:subject:message-id; bh=rqSdbwdG7muDa+HRQnpOeBGd01qZ7LvI9VtwR7gxD3I=; b=owEBCQL2/ZANAwAIAUNLJdlxtMKiAcsmYgBrBwLKZkLSGrUkIeR3lANK8sX/+JMerYEYQItEP gL+gqfxOjOJAc8EAAEIADkWIQQKI/ZJLAWGn9r1JLZDSyXZcbTCogUCawcCyhsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQQ0sl2XG0wqLs5wv/VaG4EjKPNgkR09n5YrKcR6IbcG4fFQB 1+7gj8rTiu+fy4Wqh/0EPdwncX5BJF1Q15slVjlNpX7BOG8Vrud8PpIRZdCyik37iLyJK/Gh2Uj lgKPkXRo9OyVOVx6+a9t7XA/6YwukNQVUsEsNBhwbuTzeOqtJ2UEn02QU7kT5QZ2UYS9hnmYShO FqDh5vW4CD1GndiQhRRGTESFaqZsO/gNE5Y44m580H1M6t8Tv2W9Kw8l0EoDDvpADBWZdFD9l49 ZDZN7IfuLhTc06HHT3u1Eb7tkK5qKfFHFWWMXt/nfiRz6u3kZTLVdcZpBBZdDv5VcUEtL0tyANB 6PVSMXEwvFn5GBb83FzR6ByvEe+m4UQ3rlmiZNYjvz+5ujjiNOgBC4+jJictJ/4LTrta3EqxuS9 hZGNp7dhGKOjse9D8wQEeLrQ+A15t6fX6oz+Y2QCb9F1RrIl0P+H9aTwITKUpsaY43f5CpM3Ndb vXqlhaEAo17Hk171yU0yN4qUzoZ+f2Y X-Developer-Key: i=prcups@krgm.moe; a=openpgp; fpr=0A23F6492C05869FDAF524B6434B25D971B4C2A2 Document the twelve Netrani RPMh interconnect provider compatibles and add the interconnect port-ID header used by future DTS consumers. The master and slave IDs in that header form part of the devicetree ABI. Signed-off-by: SignKirigami --- .../bindings/interconnect/qcom,netrani-rpmh.yaml | 77 ++++++++++ .../dt-bindings/interconnect/qcom,netrani-rpmh.h | 169 +++++++++++++++++= ++++ 2 files changed, 246 insertions(+) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,netrani-rp= mh.yaml b/Documentation/devicetree/bindings/interconnect/qcom,netrani-rpmh.= yaml new file mode 100644 index 000000000..8857d2a67 --- /dev/null +++ b/Documentation/devicetree/bindings/interconnect/qcom,netrani-rpmh.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interconnect/qcom,netrani-rpmh.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm RPMh Network-On-Chip Interconnect on Netrani + +maintainers: + - SignKirigami + +description: | + RPMh interconnect providers support system bandwidth requirements through + RPMh hardware accelerators known as Bus Clock Manager (BCM). The provide= r is + able to communicate with the BCM through the Resource State Coordinator = (RSC) + associated with each execution environment. Provider nodes must point to= at + least one RPMh device child node pertaining to their RSC and each provid= er + can map to multiple RPMh resources. + + See also: include/dt-bindings/interconnect/qcom,netrani-rpmh.h + +properties: + compatible: + enum: + - qcom,netrani-aggre1-noc + - qcom,netrani-aggre2-noc + - qcom,netrani-clk-virt + - qcom,netrani-cnoc2 + - qcom,netrani-cnoc3 + - qcom,netrani-gem-noc + - qcom,netrani-lpass-ag-noc + - qcom,netrani-mc-virt + - qcom,netrani-mmss-noc + - qcom,netrani-nsp-noc + - qcom,netrani-pcie-anoc + - qcom,netrani-system-noc + + reg: + maxItems: 1 + +required: + - compatible + +allOf: + - $ref: qcom,rpmh-common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - qcom,netrani-clk-virt + - qcom,netrani-mc-virt + then: + properties: + reg: false + else: + required: + - reg + +unevaluatedProperties: false + +examples: + - | + interconnect-0 { + compatible =3D "qcom,netrani-clk-virt"; + #interconnect-cells =3D <1>; + qcom,bcm-voters =3D <&apps_bcm_voter>; + }; + + interconnect@16e0000 { + compatible =3D "qcom,netrani-aggre1-noc"; + reg =3D <0x016e0000 0x1c080>; + #interconnect-cells =3D <1>; + qcom,bcm-voters =3D <&apps_bcm_voter>; + }; +... diff --git a/include/dt-bindings/interconnect/qcom,netrani-rpmh.h b/include= /dt-bindings/interconnect/qcom,netrani-rpmh.h new file mode 100644 index 000000000..d13573792 --- /dev/null +++ b/include/dt-bindings/interconnect/qcom,netrani-rpmh.h @@ -0,0 +1,169 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_NETRANI_RPMH_H +#define __DT_BINDINGS_INTERCONNECT_QCOM_NETRANI_RPMH_H + +/* AGGRE1 NOC */ +#define MASTER_QSPI_0 0 +#define MASTER_QUP_0 1 +#define MASTER_A1NOC_CFG 2 +#define MASTER_SDCC_1 3 +#define MASTER_UFS_MEM 4 +#define MASTER_USB3_0 5 +#define SLAVE_A1NOC_SNOC 6 +#define SLAVE_SERVICE_A1NOC 7 + +/* AGGRE2 NOC */ +#define MASTER_QDSS_BAM 0 +#define MASTER_QUP_1 1 +#define MASTER_A2NOC_CFG 2 +#define MASTER_CNOC_A2NOC 3 +#define MASTER_CRYPTO 4 +#define MASTER_IPA 5 +#define MASTER_QDSS_ETR 6 +#define MASTER_QDSS_ETR_1 7 +#define MASTER_SDCC_2 8 +#define SLAVE_A2NOC_SNOC 9 +#define SLAVE_SERVICE_A2NOC 10 + +/* CLK VIRT */ +#define MASTER_QUP_CORE_0 0 +#define MASTER_QUP_CORE_1 1 +#define SLAVE_QUP_CORE_0 2 +#define SLAVE_QUP_CORE_1 3 + +/* CNOC2 */ +#define MASTER_CNOC3_CNOC2 0 +#define MASTER_QDSS_DAP 1 +#define SLAVE_AHB2PHY_SOUTH 2 +#define SLAVE_AHB2PHY_NORTH 3 +#define SLAVE_ANOC_THROTTLE_CFG 4 +#define SLAVE_CAMERA_CFG 5 +#define SLAVE_CLK_CTL 6 +#define SLAVE_RBCPR_CX_CFG 7 +#define SLAVE_RBCPR_MX_CFG 8 +#define SLAVE_CRYPTO_0_CFG 9 +#define SLAVE_CX_RDPM 10 +#define SLAVE_DISPLAY_CFG 11 +#define SLAVE_GFX3D_CFG 12 +#define SLAVE_IMEM_CFG 13 +#define SLAVE_IPA_CFG 14 +#define SLAVE_IPC_ROUTER_CFG 15 +#define SLAVE_LPASS 16 +#define SLAVE_CNOC_MSS 17 +#define SLAVE_MX_RDPM 18 +#define SLAVE_PCIE_0_CFG 19 +#define SLAVE_PDM 20 +#define SLAVE_PIMEM_CFG 21 +#define SLAVE_PMU_WRAPPER_CFG 22 +#define SLAVE_PRNG 23 +#define SLAVE_QSPI_0 24 +#define SLAVE_QUP_0 25 +#define SLAVE_QUP_1 26 +#define SLAVE_SDC1 27 +#define SLAVE_SDCC_2 28 +#define SLAVE_TCSR 29 +#define SLAVE_TLMM 30 +#define SLAVE_UFS_MEM_CFG 31 +#define SLAVE_USB3_0 32 +#define SLAVE_VENUS_CFG 33 +#define SLAVE_VSENSE_CTRL_CFG 34 +#define SLAVE_A1NOC_CFG 35 +#define SLAVE_A2NOC_CFG 36 +#define SLAVE_CNOC2_CNOC3 37 +#define SLAVE_CNOC_MNOC_CFG 38 +#define SLAVE_PCIE_ANOC_CFG 39 +#define SLAVE_SNOC_CFG 40 + +/* CNOC3 */ +#define MASTER_CNOC2_CNOC3 0 +#define MASTER_GEM_NOC_CNOC 1 +#define MASTER_GEM_NOC_PCIE_SNOC 2 +#define SLAVE_AOSS 3 +#define SLAVE_APPSS 4 +#define SLAVE_CDSP_CFG 5 +#define SLAVE_QDSS_CFG 6 +#define SLAVE_TME_CFG 7 +#define SLAVE_WLAN 8 +#define SLAVE_CNOC3_CNOC2 9 +#define SLAVE_CNOC_A2NOC 10 +#define SLAVE_BOOT_IMEM 11 +#define SLAVE_IMEM 12 +#define SLAVE_PIMEM 13 +#define SLAVE_PCIE_0 14 +#define SLAVE_QDSS_STM 15 +#define SLAVE_TCU 16 + +/* GEM NOC */ +#define MASTER_GPU_TCU 0 +#define MASTER_SYS_TCU 1 +#define MASTER_APPSS_PROC 2 +#define MASTER_GFX3D 3 +#define MASTER_MSS_PROC 4 +#define MASTER_MNOC_HF_MEM_NOC 5 +#define MASTER_MNOC_SF_MEM_NOC 6 +#define MASTER_COMPUTE_NOC 7 +#define MASTER_ANOC_PCIE_GEM_NOC 8 +#define MASTER_SNOC_GC_MEM_NOC 9 +#define MASTER_SNOC_SF_MEM_NOC 10 +#define MASTER_WLAN_Q6 11 +#define SLAVE_GEM_NOC_CNOC 12 +#define SLAVE_LLCC 13 +#define SLAVE_MEM_NOC_PCIE_SNOC 14 + +/* LPASS AG NOC */ +#define MASTER_CNOC_LPASS_AG_NOC 0 +#define MASTER_LPASS_PROC 1 +#define SLAVE_LPASS_CORE_CFG 2 +#define SLAVE_LPASS_LPI_CFG 3 +#define SLAVE_LPASS_MPU_CFG 4 +#define SLAVE_LPASS_TOP_CFG 5 +#define SLAVE_LPASS_SNOC 6 +#define SLAVE_SERVICES_LPASS_AML_NOC 7 +#define SLAVE_SERVICE_LPASS_AG_NOC 8 + +/* MC VIRT */ +#define MASTER_LLCC 0 +#define SLAVE_EBI1 1 + +/* MMSS NOC */ +#define MASTER_CAMNOC_HF 0 +#define MASTER_CAMNOC_ICP 1 +#define MASTER_CAMNOC_SF 2 +#define MASTER_MDP 3 +#define MASTER_CNOC_MNOC_CFG 4 +#define MASTER_VIDEO_P0 5 +#define MASTER_VIDEO_PROC 6 +#define SLAVE_MNOC_HF_MEM_NOC 7 +#define SLAVE_MNOC_SF_MEM_NOC 8 +#define SLAVE_SERVICE_MNOC 9 + +/* NSP NOC */ +#define MASTER_CDSP_NOC_CFG 0 +#define MASTER_CDSP_PROC 1 +#define SLAVE_CDSP_MEM_NOC 2 +#define SLAVE_SERVICE_NSP_NOC 3 + +/* PCIE ANOC */ +#define MASTER_PCIE_ANOC_CFG 0 +#define MASTER_PCIE_0 1 +#define SLAVE_ANOC_PCIE_GEM_NOC 2 +#define SLAVE_SERVICE_PCIE_ANOC 3 + +/* SYSTEM NOC */ +#define MASTER_GIC_AHB 0 +#define MASTER_A1NOC_SNOC 1 +#define MASTER_A2NOC_SNOC 2 +#define MASTER_LPASS_ANOC 3 +#define MASTER_SNOC_CFG 4 +#define MASTER_PIMEM 5 +#define MASTER_TME 6 +#define MASTER_GIC 7 +#define SLAVE_SNOC_GEM_NOC_GC 8 +#define SLAVE_SNOC_GEM_NOC_SF 9 +#define SLAVE_SERVICE_SNOC 10 + +#endif --=20 2.56.0 From nobody Wed Nov 25 17:40:04 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.47.186.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795621589; b=5e8u0vOgttSv5xtsbJUIn4gwOYEDeF3mo9znBeFzPyC4Nr6hHUQvAhCGhS4aUQ8/fagc CCGooPx7ZXNqP9XbUgQ/njBAxrHq+mbCUShMDQ6d8rzg7YwQ6c8Bqry2c/lBbh3MUtZIo hCR3R+k/eS3TjzAOx+KFBrrMs5nzLDiAliYk+EOT2/3cfDfe15vD/rXuN4zKT9X1rN95A jcq3HPi2o5SppgkqUrp7mCzrgKbRKng7dVsP7if2GrSR/Kt6x8+NGbMOEM/IHWYPLuO3k 3Vz8cDTJC9LuQgBSlxkgle62E2zKLp+54Na/8TstYA0CEH1NOiH/mR8+hL598DHP2og== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795621589; h=DMARC-Filter:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=dq6nagz/QuApzbGs2O+pgRGcdVq234qNTN09ohjFfqY=; b=rNq4gjNUP53wTbihQ6PdNwPYT5rrhsk6jeLlJsWhH5peqVhyeeXHABnrk3iJrlipxhHj UVGCBLHwS7NjgASJq14JKM+0C16AFW7t6drmenddo9T0YNTLShI2WZr+Z/1yQ65cWgxoM 2/6VXFEeH7wv+OPH/LqD26AgRvyutCDeHEfLuXru1PH+S1O+FEVVry6mD+VR58KefrdaI yDtBsCfVW8lq4pRHFLiZpw0tCfRdsAN28Z8941biN3Y79yLR6hVPM5CfTjCe93f0HVDzj H169R0/uOHxifnButYeIb9YQKEFWE2Eqn9CW9h1DDwgoGUPpWrh/dUKaazPWHo8N8RQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=krgm.moe; spf=pass smtp.mailfrom=krgm.moe; arc=none smtp.remote-ip=103.47.186.116 Received: from krgm.moe (krgm.moe [103.47.186.116]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7E36606A336; Wed, 25 Nov 2026 15:46:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B7E36606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=krgm.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=krgm.moe Received: from yuno-laptop.local (unknown [103.47.186.116]) by krgm.moe (Postfix) with ESMTPSA id 9B40D779B; Wed, 25 Nov 2026 21:16:25 +0530 (IST) From: SignKirigami Date: Wed, 25 Nov 2026 23:45:48 +0800 Subject: [PATCH v3 2/2] interconnect: qcom: Add Netrani RPMh interconnect support X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261125-netrani-interconnect-v2-v3-2-1136e2cc6e3e@krgm.moe> References: <20261125-netrani-interconnect-v2-v3-0-1136e2cc6e3e@krgm.moe> In-Reply-To: <20261125-netrani-interconnect-v2-v3-0-1136e2cc6e3e@krgm.moe> To: Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , SignKirigami Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.15.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=47326; i=prcups@krgm.moe; h=from:subject:message-id; bh=nEvkuA1DiS4l4uk736atcnVynWr1Be7Gae6npOgU8i8=; b=owEBCQL2/ZANAwAIAUNLJdlxtMKiAcsmYgBrBwLKx5Bfuy1ZzhGnVI6Cu3Dda5162C4gbsydl H3HSFRdpXaJAc8EAAEIADkWIQQKI/ZJLAWGn9r1JLZDSyXZcbTCogUCawcCyhsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQQ0sl2XG0wqKfgAwAr/EFwEaMybiCyd/5W+IAd72/MXlOaII d1y0XQe+KTVcJj4aHnoFdVFwDy3aQXUG8n8I/yIu8JRi2F3cgTIxQeG8GGhlPoJerOP0pBiTN04 k1XhdIYLqkPHizFP+DCMLSm64mGb7eUwXtKHPFv6ZPSKdmmixx0UcMLMy9MMeQkdGFLVX0V6DLa 5rRpduLGA0IeCyAt+WVGq7LZ/brKK/WEDqfh+g8JMc5W/fjOBIGH9YOhrH2eeIdPEZv+YRwtn+d y58aCNF9dUIm4HaUmJafjZWpS+GWwPO9pXg1EB7ftwlolnvp0z2m+bR/FqBBJyUlD1XqkQI4qZn cpFmwhccLnAFyf/5hs3uidPVIRLlL+MOYUUeGxGbd9tNfhq8/46wiNv4F0cIn45u6dTEXZLUNAm pH3cGsZhXy8UOya7NkS4VS375+adRrWN9su9IhAOkvI+SKhxeckN0fJmK127y13QGGmfju8Bxr+ Mw8NvJ5yumGXFGHYB6XurzoW6MKVypB X-Developer-Key: i=prcups@krgm.moe; a=openpgp; fpr=0A23F6492C05869FDAF524B6434B25D971B4C2A2 Add a driver for the twelve Netrani RPMh interconnect providers described by the previous binding patch. The provider tables define the bus topology and BCM mappings used to send aggregate bandwidth votes through the applications RSC. Signed-off-by: SignKirigami --- drivers/interconnect/qcom/Kconfig | 13 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/netrani.c | 1723 +++++++++++++++++++++++++++++++= ++++ 3 files changed, 1738 insertions(+) diff --git a/drivers/interconnect/qcom/Kconfig b/drivers/interconnect/qcom/= Kconfig index 7f3a977e8..73b4e8285 100644 --- a/drivers/interconnect/qcom/Kconfig +++ b/drivers/interconnect/qcom/Kconfig @@ -158,6 +158,19 @@ config INTERCONNECT_QCOM_MSM8996 This is a driver for the Qualcomm Network-on-Chip on msm8996-based platforms. =20 +config INTERCONNECT_QCOM_NETRANI + tristate "Qualcomm Netrani interconnect driver" + depends on INTERCONNECT_QCOM_RPMH_POSSIBLE + depends on ARM64 || COMPILE_TEST + select INTERCONNECT_QCOM_RPMH + select INTERCONNECT_QCOM_BCM_VOTER + default ARCH_QCOM + help + Support for the RPMh interconnect fabrics on Qualcomm Netrani. + This driver describes the paths between bus masters and memory + and applies bandwidth votes through RPMh as clients request them. + Enable it for peripherals that use these interconnect paths. + config INTERCONNECT_QCOM_NORD tristate "Qualcomm Nord interconnect driver" depends on INTERCONNECT_QCOM_RPMH_POSSIBLE diff --git a/drivers/interconnect/qcom/Makefile b/drivers/interconnect/qcom= /Makefile index a71478aaf..6dc241cbd 100644 --- a/drivers/interconnect/qcom/Makefile +++ b/drivers/interconnect/qcom/Makefile @@ -19,6 +19,7 @@ qnoc-msm8953-objs :=3D msm8953.o qnoc-msm8974-objs :=3D msm8974.o qnoc-msm8976-objs :=3D msm8976.o qnoc-msm8996-objs :=3D msm8996.o +qnoc-netrani-objs :=3D netrani.o qnoc-nord-objs :=3D nord.o icc-osm-l3-objs :=3D osm-l3.o qnoc-qcm2290-objs :=3D qcm2290.o @@ -69,6 +70,7 @@ obj-$(CONFIG_INTERCONNECT_QCOM_MSM8953) +=3D qnoc-msm8953= .o obj-$(CONFIG_INTERCONNECT_QCOM_MSM8974) +=3D qnoc-msm8974.o obj-$(CONFIG_INTERCONNECT_QCOM_MSM8976) +=3D qnoc-msm8976.o obj-$(CONFIG_INTERCONNECT_QCOM_MSM8996) +=3D qnoc-msm8996.o +obj-$(CONFIG_INTERCONNECT_QCOM_NETRANI) +=3D qnoc-netrani.o obj-$(CONFIG_INTERCONNECT_QCOM_NORD) +=3D qnoc-nord.o obj-$(CONFIG_INTERCONNECT_QCOM_OSM_L3) +=3D icc-osm-l3.o obj-$(CONFIG_INTERCONNECT_QCOM_QCM2290) +=3D qnoc-qcm2290.o diff --git a/drivers/interconnect/qcom/netrani.c b/drivers/interconnect/qco= m/netrani.c new file mode 100644 index 000000000..b77f32429 --- /dev/null +++ b/drivers/interconnect/qcom/netrani.c @@ -0,0 +1,1723 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "bcm-voter.h" +#include "icc-common.h" +#include "icc-rpmh.h" + +static struct qcom_icc_node qhm_qspi; +static struct qcom_icc_node qhm_qup0; +static struct qcom_icc_node qnm_a1noc_cfg; +static struct qcom_icc_node xm_sdc1; +static struct qcom_icc_node xm_ufs_mem; +static struct qcom_icc_node xm_usb3_0; +static struct qcom_icc_node qhm_qdss_bam; +static struct qcom_icc_node qhm_qup1; +static struct qcom_icc_node qnm_a2noc_cfg; +static struct qcom_icc_node qnm_cnoc_datapath; +static struct qcom_icc_node qxm_crypto; +static struct qcom_icc_node qxm_ipa; +static struct qcom_icc_node xm_qdss_etr_0; +static struct qcom_icc_node xm_qdss_etr_1; +static struct qcom_icc_node xm_sdc2; +static struct qcom_icc_node qup0_core_master; +static struct qcom_icc_node qup1_core_master; +static struct qcom_icc_node qnm_cnoc3_cnoc2; +static struct qcom_icc_node xm_qdss_dap; +static struct qcom_icc_node qnm_cnoc2_cnoc3; +static struct qcom_icc_node qnm_gemnoc_cnoc; +static struct qcom_icc_node qnm_gemnoc_pcie; +static struct qcom_icc_node alm_gpu_tcu; +static struct qcom_icc_node alm_sys_tcu; +static struct qcom_icc_node chm_apps; +static struct qcom_icc_node qnm_gpu; +static struct qcom_icc_node qnm_mdsp; +static struct qcom_icc_node qnm_mnoc_hf; +static struct qcom_icc_node qnm_mnoc_sf; +static struct qcom_icc_node qnm_nsp_gemnoc; +static struct qcom_icc_node qnm_pcie; +static struct qcom_icc_node qnm_snoc_gc; +static struct qcom_icc_node qnm_snoc_sf; +static struct qcom_icc_node qxm_wlan_q6; +static struct qcom_icc_node qhm_config_noc; +static struct qcom_icc_node qxm_lpass_dsp; +static struct qcom_icc_node llcc_mc; +static struct qcom_icc_node qnm_camnoc_hf; +static struct qcom_icc_node qnm_camnoc_icp; +static struct qcom_icc_node qnm_camnoc_sf; +static struct qcom_icc_node qnm_mdp; +static struct qcom_icc_node qnm_mnoc_cfg; +static struct qcom_icc_node qnm_video0; +static struct qcom_icc_node qnm_video_cpu; +static struct qcom_icc_node qhm_nsp_noc_config; +static struct qcom_icc_node qxm_nsp; +static struct qcom_icc_node qnm_pcie_anoc_cfg; +static struct qcom_icc_node xm_pcie3_0; +static struct qcom_icc_node qhm_gic; +static struct qcom_icc_node qnm_aggre1_noc; +static struct qcom_icc_node qnm_aggre2_noc; +static struct qcom_icc_node qnm_lpass_noc; +static struct qcom_icc_node qnm_snoc_cfg; +static struct qcom_icc_node qxm_pimem; +static struct qcom_icc_node qxm_tme; +static struct qcom_icc_node xm_gic; +static struct qcom_icc_node qns_a1noc_snoc; +static struct qcom_icc_node srvc_aggre1_noc; +static struct qcom_icc_node qns_a2noc_snoc; +static struct qcom_icc_node srvc_aggre2_noc; +static struct qcom_icc_node qup0_core_slave; +static struct qcom_icc_node qup1_core_slave; +static struct qcom_icc_node qhs_ahb2phy0; +static struct qcom_icc_node qhs_ahb2phy1; +static struct qcom_icc_node qhs_anoc_throttle_cfg; +static struct qcom_icc_node qhs_camera_cfg; +static struct qcom_icc_node qhs_clk_ctl; +static struct qcom_icc_node qhs_cpr_cx; +static struct qcom_icc_node qhs_cpr_mx; +static struct qcom_icc_node qhs_crypto0_cfg; +static struct qcom_icc_node qhs_cx_rdpm; +static struct qcom_icc_node qhs_display_cfg; +static struct qcom_icc_node qhs_gpuss_cfg; +static struct qcom_icc_node qhs_imem_cfg; +static struct qcom_icc_node qhs_ipa; +static struct qcom_icc_node qhs_ipc_router; +static struct qcom_icc_node qhs_lpass_cfg; +static struct qcom_icc_node qhs_mss_cfg; +static struct qcom_icc_node qhs_mx_rdpm; +static struct qcom_icc_node qhs_pcie0_cfg; +static struct qcom_icc_node qhs_pdm; +static struct qcom_icc_node qhs_pimem_cfg; +static struct qcom_icc_node qhs_pmu_wrapper_cfg; +static struct qcom_icc_node qhs_prng; +static struct qcom_icc_node qhs_qspi; +static struct qcom_icc_node qhs_qup0; +static struct qcom_icc_node qhs_qup1; +static struct qcom_icc_node qhs_sdc1; +static struct qcom_icc_node qhs_sdc2; +static struct qcom_icc_node qhs_tcsr; +static struct qcom_icc_node qhs_tlmm; +static struct qcom_icc_node qhs_ufs_mem_cfg; +static struct qcom_icc_node qhs_usb3_0; +static struct qcom_icc_node qhs_venus_cfg; +static struct qcom_icc_node qhs_vsense_ctrl_cfg; +static struct qcom_icc_node qns_a1_noc_cfg; +static struct qcom_icc_node qns_a2_noc_cfg; +static struct qcom_icc_node qns_cnoc2_cnoc3; +static struct qcom_icc_node qns_mnoc_cfg; +static struct qcom_icc_node qns_pcie_anoc_cfg; +static struct qcom_icc_node qns_snoc_cfg; +static struct qcom_icc_node qhs_aoss; +static struct qcom_icc_node qhs_apss; +static struct qcom_icc_node qhs_compute_cfg; +static struct qcom_icc_node qhs_qdss_cfg; +static struct qcom_icc_node qhs_tme_cfg; +static struct qcom_icc_node qhs_wcss; +static struct qcom_icc_node qns_cnoc3_cnoc2; +static struct qcom_icc_node qns_cnoc_a2noc; +static struct qcom_icc_node qxs_boot_imem; +static struct qcom_icc_node qxs_imem; +static struct qcom_icc_node qxs_pimem; +static struct qcom_icc_node xs_pcie_0; +static struct qcom_icc_node xs_qdss_stm; +static struct qcom_icc_node xs_sys_tcu_cfg; +static struct qcom_icc_node qns_gem_noc_cnoc; +static struct qcom_icc_node qns_llcc; +static struct qcom_icc_node qns_pcie; +static struct qcom_icc_node qhs_lpass_core; +static struct qcom_icc_node qhs_lpass_lpi; +static struct qcom_icc_node qhs_lpass_mpu; +static struct qcom_icc_node qhs_lpass_top; +static struct qcom_icc_node qns_sysnoc; +static struct qcom_icc_node srvc_niu_aml_noc; +static struct qcom_icc_node srvc_niu_lpass_agnoc; +static struct qcom_icc_node ebi; +static struct qcom_icc_node qns_mem_noc_hf; +static struct qcom_icc_node qns_mem_noc_sf; +static struct qcom_icc_node srvc_mnoc; +static struct qcom_icc_node qns_nsp_gemnoc; +static struct qcom_icc_node service_nsp_noc; +static struct qcom_icc_node qns_pcie_mem_noc; +static struct qcom_icc_node srvc_pcie_aggre_noc; +static struct qcom_icc_node qns_gemnoc_gc; +static struct qcom_icc_node qns_gemnoc_sf; +static struct qcom_icc_node srvc_snoc; + +static struct qcom_icc_node qhm_qspi =3D { + .name =3D "qhm_qspi", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qns_a1noc_snoc }, +}; + +static struct qcom_icc_node qhm_qup0 =3D { + .name =3D "qhm_qup0", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qns_a1noc_snoc }, +}; + +static struct qcom_icc_node qnm_a1noc_cfg =3D { + .name =3D "qnm_a1noc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &srvc_aggre1_noc }, +}; + +static struct qcom_icc_node xm_sdc1 =3D { + .name =3D "xm_sdc1", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a1noc_snoc }, +}; + +static struct qcom_icc_node xm_ufs_mem =3D { + .name =3D "xm_ufs_mem", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a1noc_snoc }, +}; + +static struct qcom_icc_node xm_usb3_0 =3D { + .name =3D "xm_usb3_0", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a1noc_snoc }, +}; + +static struct qcom_icc_node qhm_qdss_bam =3D { + .name =3D "qhm_qdss_bam", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node qhm_qup1 =3D { + .name =3D "qhm_qup1", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node qnm_a2noc_cfg =3D { + .name =3D "qnm_a2noc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &srvc_aggre2_noc }, +}; + +static struct qcom_icc_node qnm_cnoc_datapath =3D { + .name =3D "qnm_cnoc_datapath", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node qxm_crypto =3D { + .name =3D "qxm_crypto", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node qxm_ipa =3D { + .name =3D "qxm_ipa", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node xm_qdss_etr_0 =3D { + .name =3D "xm_qdss_etr_0", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node xm_qdss_etr_1 =3D { + .name =3D "xm_qdss_etr_1", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node xm_sdc2 =3D { + .name =3D "xm_sdc2", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_a2noc_snoc }, +}; + +static struct qcom_icc_node qup0_core_master =3D { + .name =3D "qup0_core_master", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qup0_core_slave }, +}; + +static struct qcom_icc_node qup1_core_master =3D { + .name =3D "qup1_core_master", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qup1_core_slave }, +}; + +static struct qcom_icc_node qnm_cnoc3_cnoc2 =3D { + .name =3D "qnm_cnoc3_cnoc2", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 38, + .link_nodes =3D { + &qhs_ahb2phy0, &qhs_ahb2phy1, &qhs_anoc_throttle_cfg, &qhs_camera_cfg, + &qhs_clk_ctl, &qhs_cpr_cx, &qhs_cpr_mx, &qhs_crypto0_cfg, + &qhs_cx_rdpm, &qhs_display_cfg, &qhs_gpuss_cfg, &qhs_imem_cfg, + &qhs_ipa, &qhs_ipc_router, &qhs_lpass_cfg, &qhs_mss_cfg, + &qhs_mx_rdpm, &qhs_pcie0_cfg, &qhs_pdm, &qhs_pimem_cfg, + &qhs_pmu_wrapper_cfg, &qhs_prng, &qhs_qspi, &qhs_qup0, + &qhs_qup1, &qhs_sdc1, &qhs_sdc2, &qhs_tcsr, + &qhs_tlmm, &qhs_ufs_mem_cfg, &qhs_usb3_0, &qhs_venus_cfg, + &qhs_vsense_ctrl_cfg, &qns_a1_noc_cfg, &qns_a2_noc_cfg, &qns_mnoc_cfg, + &qns_pcie_anoc_cfg, &qns_snoc_cfg, + }, +}; + +static struct qcom_icc_node xm_qdss_dap =3D { + .name =3D "xm_qdss_dap", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 39, + .link_nodes =3D { + &qhs_ahb2phy0, &qhs_ahb2phy1, &qhs_anoc_throttle_cfg, &qhs_camera_cfg, + &qhs_clk_ctl, &qhs_cpr_cx, &qhs_cpr_mx, &qhs_crypto0_cfg, + &qhs_cx_rdpm, &qhs_display_cfg, &qhs_gpuss_cfg, &qhs_imem_cfg, + &qhs_ipa, &qhs_ipc_router, &qhs_lpass_cfg, &qhs_mss_cfg, + &qhs_mx_rdpm, &qhs_pcie0_cfg, &qhs_pdm, &qhs_pimem_cfg, + &qhs_pmu_wrapper_cfg, &qhs_prng, &qhs_qspi, &qhs_qup0, + &qhs_qup1, &qhs_sdc1, &qhs_sdc2, &qhs_tcsr, + &qhs_tlmm, &qhs_ufs_mem_cfg, &qhs_usb3_0, &qhs_venus_cfg, + &qhs_vsense_ctrl_cfg, &qns_a1_noc_cfg, &qns_a2_noc_cfg, &qns_cnoc2_cnoc= 3, + &qns_mnoc_cfg, &qns_pcie_anoc_cfg, &qns_snoc_cfg, + }, +}; + +static struct qcom_icc_node qnm_cnoc2_cnoc3 =3D { + .name =3D "qnm_cnoc2_cnoc3", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 12, + .link_nodes =3D { + &qhs_aoss, &qhs_apss, &qhs_compute_cfg, &qhs_qdss_cfg, + &qhs_tme_cfg, &qhs_wcss, &qns_cnoc_a2noc, &qxs_boot_imem, + &qxs_imem, &qxs_pimem, &xs_qdss_stm, &xs_sys_tcu_cfg, + }, +}; + +static struct qcom_icc_node qnm_gemnoc_cnoc =3D { + .name =3D "qnm_gemnoc_cnoc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 12, + .link_nodes =3D { + &qhs_aoss, &qhs_apss, &qhs_compute_cfg, &qhs_qdss_cfg, + &qhs_tme_cfg, &qhs_wcss, &qns_cnoc3_cnoc2, &qxs_boot_imem, + &qxs_imem, &qxs_pimem, &xs_qdss_stm, &xs_sys_tcu_cfg, + }, +}; + +static struct qcom_icc_node qnm_gemnoc_pcie =3D { + .name =3D "qnm_gemnoc_pcie", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &xs_pcie_0 }, +}; + +static struct qcom_icc_node alm_gpu_tcu =3D { + .name =3D "alm_gpu_tcu", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node alm_sys_tcu =3D { + .name =3D "alm_sys_tcu", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node chm_apps =3D { + .name =3D "chm_apps", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 3, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc, &qns_pcie }, +}; + +static struct qcom_icc_node qnm_gpu =3D { + .name =3D "qnm_gpu", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node qnm_mdsp =3D { + .name =3D "qnm_mdsp", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 3, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc, &qns_pcie }, +}; + +static struct qcom_icc_node qnm_mnoc_hf =3D { + .name =3D "qnm_mnoc_hf", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_llcc }, +}; + +static struct qcom_icc_node qnm_mnoc_sf =3D { + .name =3D "qnm_mnoc_sf", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node qnm_nsp_gemnoc =3D { + .name =3D "qnm_nsp_gemnoc", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node qnm_pcie =3D { + .name =3D "qnm_pcie", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 2, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc }, +}; + +static struct qcom_icc_node qnm_snoc_gc =3D { + .name =3D "qnm_snoc_gc", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_llcc }, +}; + +static struct qcom_icc_node qnm_snoc_sf =3D { + .name =3D "qnm_snoc_sf", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 3, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc, &qns_pcie }, +}; + +static struct qcom_icc_node qxm_wlan_q6 =3D { + .name =3D "qxm_wlan_q6", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 3, + .link_nodes =3D { &qns_gem_noc_cnoc, &qns_llcc, &qns_pcie }, +}; + +static struct qcom_icc_node qhm_config_noc =3D { + .name =3D "qhm_config_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 6, + .link_nodes =3D { + &qhs_lpass_core, &qhs_lpass_lpi, &qhs_lpass_mpu, &qhs_lpass_top, + &srvc_niu_aml_noc, &srvc_niu_lpass_agnoc, + }, +}; + +static struct qcom_icc_node qxm_lpass_dsp =3D { + .name =3D "qxm_lpass_dsp", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 4, + .link_nodes =3D { &qhs_lpass_top, &qns_sysnoc, &srvc_niu_aml_noc, &srvc_n= iu_lpass_agnoc }, +}; + +static struct qcom_icc_node llcc_mc =3D { + .name =3D "llcc_mc", + .channels =3D 2, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &ebi }, +}; + +static struct qcom_icc_node qnm_camnoc_hf =3D { + .name =3D "qnm_camnoc_hf", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_hf }, +}; + +static struct qcom_icc_node qnm_camnoc_icp =3D { + .name =3D "qnm_camnoc_icp", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_sf }, +}; + +static struct qcom_icc_node qnm_camnoc_sf =3D { + .name =3D "qnm_camnoc_sf", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_sf }, +}; + +static struct qcom_icc_node qnm_mdp =3D { + .name =3D "qnm_mdp", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_hf }, +}; + +static struct qcom_icc_node qnm_mnoc_cfg =3D { + .name =3D "qnm_mnoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &srvc_mnoc }, +}; + +static struct qcom_icc_node qnm_video0 =3D { + .name =3D "qnm_video0", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_sf }, +}; + +static struct qcom_icc_node qnm_video_cpu =3D { + .name =3D "qnm_video_cpu", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_mem_noc_sf }, +}; + +static struct qcom_icc_node qhm_nsp_noc_config =3D { + .name =3D "qhm_nsp_noc_config", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &service_nsp_noc }, +}; + +static struct qcom_icc_node qxm_nsp =3D { + .name =3D "qxm_nsp", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qns_nsp_gemnoc }, +}; + +static struct qcom_icc_node qnm_pcie_anoc_cfg =3D { + .name =3D "qnm_pcie_anoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &srvc_pcie_aggre_noc }, +}; + +static struct qcom_icc_node xm_pcie3_0 =3D { + .name =3D "xm_pcie3_0", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_pcie_mem_noc }, +}; + +static struct qcom_icc_node qhm_gic =3D { + .name =3D "qhm_gic", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_node qnm_aggre1_noc =3D { + .name =3D "qnm_aggre1_noc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_node qnm_aggre2_noc =3D { + .name =3D "qnm_aggre2_noc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_node qnm_lpass_noc =3D { + .name =3D "qnm_lpass_noc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_node qnm_snoc_cfg =3D { + .name =3D "qnm_snoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &srvc_snoc }, +}; + +static struct qcom_icc_node qxm_pimem =3D { + .name =3D "qxm_pimem", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_gc }, +}; + +static struct qcom_icc_node qxm_tme =3D { + .name =3D "qxm_tme", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_node xm_gic =3D { + .name =3D "xm_gic", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qns_gemnoc_gc }, +}; + +static struct qcom_icc_node qns_a1noc_snoc =3D { + .name =3D "qns_a1noc_snoc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qnm_aggre1_noc }, +}; + +static struct qcom_icc_node srvc_aggre1_noc =3D { + .name =3D "srvc_aggre1_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_a2noc_snoc =3D { + .name =3D "qns_a2noc_snoc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qnm_aggre2_noc }, +}; + +static struct qcom_icc_node srvc_aggre2_noc =3D { + .name =3D "srvc_aggre2_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qup0_core_slave =3D { + .name =3D "qup0_core_slave", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qup1_core_slave =3D { + .name =3D "qup1_core_slave", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_ahb2phy0 =3D { + .name =3D "qhs_ahb2phy0", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_ahb2phy1 =3D { + .name =3D "qhs_ahb2phy1", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_anoc_throttle_cfg =3D { + .name =3D "qhs_anoc_throttle_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_camera_cfg =3D { + .name =3D "qhs_camera_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_clk_ctl =3D { + .name =3D "qhs_clk_ctl", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_cpr_cx =3D { + .name =3D "qhs_cpr_cx", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_cpr_mx =3D { + .name =3D "qhs_cpr_mx", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_crypto0_cfg =3D { + .name =3D "qhs_crypto0_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_cx_rdpm =3D { + .name =3D "qhs_cx_rdpm", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_display_cfg =3D { + .name =3D "qhs_display_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_gpuss_cfg =3D { + .name =3D "qhs_gpuss_cfg", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_imem_cfg =3D { + .name =3D "qhs_imem_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_ipa =3D { + .name =3D "qhs_ipa", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_ipc_router =3D { + .name =3D "qhs_ipc_router", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_lpass_cfg =3D { + .name =3D "qhs_lpass_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qhm_config_noc }, +}; + +static struct qcom_icc_node qhs_mss_cfg =3D { + .name =3D "qhs_mss_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_mx_rdpm =3D { + .name =3D "qhs_mx_rdpm", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_pcie0_cfg =3D { + .name =3D "qhs_pcie0_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_pdm =3D { + .name =3D "qhs_pdm", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_pimem_cfg =3D { + .name =3D "qhs_pimem_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_pmu_wrapper_cfg =3D { + .name =3D "qhs_pmu_wrapper_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_prng =3D { + .name =3D "qhs_prng", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_qspi =3D { + .name =3D "qhs_qspi", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_qup0 =3D { + .name =3D "qhs_qup0", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_qup1 =3D { + .name =3D "qhs_qup1", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_sdc1 =3D { + .name =3D "qhs_sdc1", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_sdc2 =3D { + .name =3D "qhs_sdc2", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_tcsr =3D { + .name =3D "qhs_tcsr", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_tlmm =3D { + .name =3D "qhs_tlmm", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_ufs_mem_cfg =3D { + .name =3D "qhs_ufs_mem_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_usb3_0 =3D { + .name =3D "qhs_usb3_0", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_venus_cfg =3D { + .name =3D "qhs_venus_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_vsense_ctrl_cfg =3D { + .name =3D "qhs_vsense_ctrl_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_a1_noc_cfg =3D { + .name =3D "qns_a1_noc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qnm_a1noc_cfg }, +}; + +static struct qcom_icc_node qns_a2_noc_cfg =3D { + .name =3D "qns_a2_noc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qnm_a2noc_cfg }, +}; + +static struct qcom_icc_node qns_cnoc2_cnoc3 =3D { + .name =3D "qns_cnoc2_cnoc3", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_cnoc2_cnoc3 }, +}; + +static struct qcom_icc_node qns_mnoc_cfg =3D { + .name =3D "qns_mnoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qnm_mnoc_cfg }, +}; + +static struct qcom_icc_node qns_pcie_anoc_cfg =3D { + .name =3D "qns_pcie_anoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qnm_pcie_anoc_cfg }, +}; + +static struct qcom_icc_node qns_snoc_cfg =3D { + .name =3D "qns_snoc_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qnm_snoc_cfg }, +}; + +static struct qcom_icc_node qhs_aoss =3D { + .name =3D "qhs_aoss", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_apss =3D { + .name =3D "qhs_apss", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_compute_cfg =3D { + .name =3D "qhs_compute_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 1, + .link_nodes =3D { &qhm_nsp_noc_config }, +}; + +static struct qcom_icc_node qhs_qdss_cfg =3D { + .name =3D "qhs_qdss_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_tme_cfg =3D { + .name =3D "qhs_tme_cfg", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_wcss =3D { + .name =3D "qhs_wcss", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_cnoc3_cnoc2 =3D { + .name =3D "qns_cnoc3_cnoc2", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_cnoc3_cnoc2 }, +}; + +static struct qcom_icc_node qns_cnoc_a2noc =3D { + .name =3D "qns_cnoc_a2noc", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_cnoc_datapath }, +}; + +static struct qcom_icc_node qxs_boot_imem =3D { + .name =3D "qxs_boot_imem", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node qxs_imem =3D { + .name =3D "qxs_imem", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node qxs_pimem =3D { + .name =3D "qxs_pimem", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node xs_pcie_0 =3D { + .name =3D "xs_pcie_0", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node xs_qdss_stm =3D { + .name =3D "xs_qdss_stm", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node xs_sys_tcu_cfg =3D { + .name =3D "xs_sys_tcu_cfg", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_gem_noc_cnoc =3D { + .name =3D "qns_gem_noc_cnoc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qnm_gemnoc_cnoc }, +}; + +static struct qcom_icc_node qns_llcc =3D { + .name =3D "qns_llcc", + .channels =3D 2, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &llcc_mc }, +}; + +static struct qcom_icc_node qns_pcie =3D { + .name =3D "qns_pcie", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_gemnoc_pcie }, +}; + +static struct qcom_icc_node qhs_lpass_core =3D { + .name =3D "qhs_lpass_core", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_lpass_lpi =3D { + .name =3D "qhs_lpass_lpi", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_lpass_mpu =3D { + .name =3D "qhs_lpass_mpu", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qhs_lpass_top =3D { + .name =3D "qhs_lpass_top", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_sysnoc =3D { + .name =3D "qns_sysnoc", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qnm_lpass_noc }, +}; + +static struct qcom_icc_node srvc_niu_aml_noc =3D { + .name =3D "srvc_niu_aml_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node srvc_niu_lpass_agnoc =3D { + .name =3D "srvc_niu_lpass_agnoc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node ebi =3D { + .name =3D "ebi", + .channels =3D 2, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_mem_noc_hf =3D { + .name =3D "qns_mem_noc_hf", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qnm_mnoc_hf }, +}; + +static struct qcom_icc_node qns_mem_noc_sf =3D { + .name =3D "qns_mem_noc_sf", + .channels =3D 1, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qnm_mnoc_sf }, +}; + +static struct qcom_icc_node srvc_mnoc =3D { + .name =3D "srvc_mnoc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_nsp_gemnoc =3D { + .name =3D "qns_nsp_gemnoc", + .channels =3D 2, + .buswidth =3D 32, + .num_links =3D 1, + .link_nodes =3D { &qnm_nsp_gemnoc }, +}; + +static struct qcom_icc_node service_nsp_noc =3D { + .name =3D "service_nsp_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_pcie_mem_noc =3D { + .name =3D "qns_pcie_mem_noc", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_pcie }, +}; + +static struct qcom_icc_node srvc_pcie_aggre_noc =3D { + .name =3D "srvc_pcie_aggre_noc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_node qns_gemnoc_gc =3D { + .name =3D "qns_gemnoc_gc", + .channels =3D 1, + .buswidth =3D 8, + .num_links =3D 1, + .link_nodes =3D { &qnm_snoc_gc }, +}; + +static struct qcom_icc_node qns_gemnoc_sf =3D { + .name =3D "qns_gemnoc_sf", + .channels =3D 1, + .buswidth =3D 16, + .num_links =3D 1, + .link_nodes =3D { &qnm_snoc_sf }, +}; + +static struct qcom_icc_node srvc_snoc =3D { + .name =3D "srvc_snoc", + .channels =3D 1, + .buswidth =3D 4, + .num_links =3D 0, +}; + +static struct qcom_icc_bcm bcm_acv =3D { + .name =3D "ACV", + .enable_mask =3D 0x8, + .num_nodes =3D 1, + .nodes =3D { &ebi }, +}; + +static struct qcom_icc_bcm bcm_ce0 =3D { + .name =3D "CE0", + .num_nodes =3D 1, + .nodes =3D { &qxm_crypto }, +}; + +static struct qcom_icc_bcm bcm_cn0 =3D { + .name =3D "CN0", + .enable_mask =3D 0x1, + .keepalive =3D true, + .num_nodes =3D 58, + .nodes =3D { &qnm_cnoc3_cnoc2, &xm_qdss_dap, + &qhs_ahb2phy0, &qhs_ahb2phy1, + &qhs_anoc_throttle_cfg, &qhs_camera_cfg, + &qhs_clk_ctl, &qhs_cpr_cx, + &qhs_cpr_mx, &qhs_crypto0_cfg, + &qhs_cx_rdpm, &qhs_display_cfg, + &qhs_gpuss_cfg, &qhs_imem_cfg, + &qhs_ipa, &qhs_ipc_router, + &qhs_lpass_cfg, &qhs_mss_cfg, + &qhs_mx_rdpm, &qhs_pcie0_cfg, + &qhs_pdm, &qhs_pimem_cfg, + &qhs_pmu_wrapper_cfg, &qhs_prng, + &qhs_qspi, &qhs_qup0, + &qhs_qup1, &qhs_sdc1, + &qhs_sdc2, &qhs_tcsr, + &qhs_tlmm, &qhs_ufs_mem_cfg, + &qhs_usb3_0, &qhs_venus_cfg, + &qhs_vsense_ctrl_cfg, &qns_a1_noc_cfg, + &qns_a2_noc_cfg, &qns_cnoc2_cnoc3, + &qns_mnoc_cfg, &qns_pcie_anoc_cfg, + &qns_snoc_cfg, &qnm_cnoc2_cnoc3, + &qnm_gemnoc_cnoc, &qnm_gemnoc_pcie, + &qhs_aoss, &qhs_apss, + &qhs_compute_cfg, &qhs_qdss_cfg, + &qhs_tme_cfg, &qhs_wcss, + &qns_cnoc3_cnoc2, &qns_cnoc_a2noc, + &qxs_boot_imem, &qxs_imem, + &qxs_pimem, &xs_pcie_0, + &xs_qdss_stm, &xs_sys_tcu_cfg }, +}; + +static struct qcom_icc_bcm bcm_co0 =3D { + .name =3D "CO0", + .enable_mask =3D 0x1, + .num_nodes =3D 2, + .nodes =3D { &qxm_nsp, &qns_nsp_gemnoc }, +}; + +static struct qcom_icc_bcm bcm_mc0 =3D { + .name =3D "MC0", + .keepalive =3D true, + .num_nodes =3D 1, + .nodes =3D { &ebi }, +}; + +static struct qcom_icc_bcm bcm_mm0 =3D { + .name =3D "MM0", + .num_nodes =3D 1, + .nodes =3D { &qns_mem_noc_hf }, +}; + +static struct qcom_icc_bcm bcm_mm1 =3D { + .name =3D "MM1", + .enable_mask =3D 0x1, + .num_nodes =3D 8, + .nodes =3D { &qnm_camnoc_hf, &qnm_camnoc_icp, + &qnm_camnoc_sf, &qnm_mdp, + &qnm_mnoc_cfg, &qnm_video0, + &qnm_video_cpu, &qns_mem_noc_sf }, +}; + +static struct qcom_icc_bcm bcm_qup0 =3D { + .name =3D "QUP0", + .keepalive =3D true, + .vote_scale =3D 1, + .num_nodes =3D 1, + .nodes =3D { &qup0_core_slave }, +}; + +static struct qcom_icc_bcm bcm_qup1 =3D { + .name =3D "QUP1", + .keepalive =3D true, + .vote_scale =3D 1, + .num_nodes =3D 1, + .nodes =3D { &qup1_core_slave }, +}; + +static struct qcom_icc_bcm bcm_sh0 =3D { + .name =3D "SH0", + .keepalive =3D true, + .num_nodes =3D 1, + .nodes =3D { &qns_llcc }, +}; + +static struct qcom_icc_bcm bcm_sh1 =3D { + .name =3D "SH1", + .enable_mask =3D 0x1, + .num_nodes =3D 5, + .nodes =3D { &qnm_nsp_gemnoc, &qnm_pcie, + &qnm_snoc_gc, &qns_gem_noc_cnoc, + &qns_pcie }, +}; + +static struct qcom_icc_bcm bcm_sn0 =3D { + .name =3D "SN0", + .keepalive =3D true, + .num_nodes =3D 1, + .nodes =3D { &qns_gemnoc_sf }, +}; + +static struct qcom_icc_bcm bcm_sn1 =3D { + .name =3D "SN1", + .enable_mask =3D 0x1, + .num_nodes =3D 5, + .nodes =3D { &qhm_gic, &qxm_pimem, + &qxm_tme, &xm_gic, + &qns_gemnoc_gc }, +}; + +static struct qcom_icc_bcm bcm_sn2 =3D { + .name =3D "SN2", + .num_nodes =3D 1, + .nodes =3D { &qnm_aggre1_noc }, +}; + +static struct qcom_icc_bcm bcm_sn3 =3D { + .name =3D "SN3", + .num_nodes =3D 1, + .nodes =3D { &qnm_aggre2_noc }, +}; + +static struct qcom_icc_bcm bcm_sn4 =3D { + .name =3D "SN4", + .num_nodes =3D 1, + .nodes =3D { &qnm_lpass_noc }, +}; + +static struct qcom_icc_bcm bcm_sn7 =3D { + .name =3D "SN7", + .num_nodes =3D 1, + .nodes =3D { &qns_pcie_mem_noc }, +}; + +static struct qcom_icc_bcm * const aggre1_noc_bcms[] =3D { +}; + +static struct qcom_icc_node * const aggre1_noc_nodes[] =3D { + [MASTER_QSPI_0] =3D &qhm_qspi, + [MASTER_QUP_0] =3D &qhm_qup0, + [MASTER_A1NOC_CFG] =3D &qnm_a1noc_cfg, + [MASTER_SDCC_1] =3D &xm_sdc1, + [MASTER_UFS_MEM] =3D &xm_ufs_mem, + [MASTER_USB3_0] =3D &xm_usb3_0, + [SLAVE_A1NOC_SNOC] =3D &qns_a1noc_snoc, + [SLAVE_SERVICE_A1NOC] =3D &srvc_aggre1_noc, +}; + +static const struct qcom_icc_desc netrani_aggre1_noc =3D { + .nodes =3D aggre1_noc_nodes, + .num_nodes =3D ARRAY_SIZE(aggre1_noc_nodes), + .bcms =3D aggre1_noc_bcms, + .num_bcms =3D ARRAY_SIZE(aggre1_noc_bcms), +}; + +static struct qcom_icc_bcm * const aggre2_noc_bcms[] =3D { + &bcm_ce0, +}; + +static struct qcom_icc_node * const aggre2_noc_nodes[] =3D { + [MASTER_QDSS_BAM] =3D &qhm_qdss_bam, + [MASTER_QUP_1] =3D &qhm_qup1, + [MASTER_A2NOC_CFG] =3D &qnm_a2noc_cfg, + [MASTER_CNOC_A2NOC] =3D &qnm_cnoc_datapath, + [MASTER_CRYPTO] =3D &qxm_crypto, + [MASTER_IPA] =3D &qxm_ipa, + [MASTER_QDSS_ETR] =3D &xm_qdss_etr_0, + [MASTER_QDSS_ETR_1] =3D &xm_qdss_etr_1, + [MASTER_SDCC_2] =3D &xm_sdc2, + [SLAVE_A2NOC_SNOC] =3D &qns_a2noc_snoc, + [SLAVE_SERVICE_A2NOC] =3D &srvc_aggre2_noc, +}; + +static const struct qcom_icc_desc netrani_aggre2_noc =3D { + .nodes =3D aggre2_noc_nodes, + .num_nodes =3D ARRAY_SIZE(aggre2_noc_nodes), + .bcms =3D aggre2_noc_bcms, + .num_bcms =3D ARRAY_SIZE(aggre2_noc_bcms), +}; + +static struct qcom_icc_bcm * const clk_virt_bcms[] =3D { + &bcm_qup0, + &bcm_qup1, +}; + +static struct qcom_icc_node * const clk_virt_nodes[] =3D { + [MASTER_QUP_CORE_0] =3D &qup0_core_master, + [MASTER_QUP_CORE_1] =3D &qup1_core_master, + [SLAVE_QUP_CORE_0] =3D &qup0_core_slave, + [SLAVE_QUP_CORE_1] =3D &qup1_core_slave, +}; + +static const struct qcom_icc_desc netrani_clk_virt =3D { + .nodes =3D clk_virt_nodes, + .num_nodes =3D ARRAY_SIZE(clk_virt_nodes), + .bcms =3D clk_virt_bcms, + .num_bcms =3D ARRAY_SIZE(clk_virt_bcms), +}; + +static struct qcom_icc_bcm * const cnoc2_bcms[] =3D { + &bcm_cn0, +}; + +static struct qcom_icc_node * const cnoc2_nodes[] =3D { + [MASTER_CNOC3_CNOC2] =3D &qnm_cnoc3_cnoc2, + [MASTER_QDSS_DAP] =3D &xm_qdss_dap, + [SLAVE_AHB2PHY_SOUTH] =3D &qhs_ahb2phy0, + [SLAVE_AHB2PHY_NORTH] =3D &qhs_ahb2phy1, + [SLAVE_ANOC_THROTTLE_CFG] =3D &qhs_anoc_throttle_cfg, + [SLAVE_CAMERA_CFG] =3D &qhs_camera_cfg, + [SLAVE_CLK_CTL] =3D &qhs_clk_ctl, + [SLAVE_RBCPR_CX_CFG] =3D &qhs_cpr_cx, + [SLAVE_RBCPR_MX_CFG] =3D &qhs_cpr_mx, + [SLAVE_CRYPTO_0_CFG] =3D &qhs_crypto0_cfg, + [SLAVE_CX_RDPM] =3D &qhs_cx_rdpm, + [SLAVE_DISPLAY_CFG] =3D &qhs_display_cfg, + [SLAVE_GFX3D_CFG] =3D &qhs_gpuss_cfg, + [SLAVE_IMEM_CFG] =3D &qhs_imem_cfg, + [SLAVE_IPA_CFG] =3D &qhs_ipa, + [SLAVE_IPC_ROUTER_CFG] =3D &qhs_ipc_router, + [SLAVE_LPASS] =3D &qhs_lpass_cfg, + [SLAVE_CNOC_MSS] =3D &qhs_mss_cfg, + [SLAVE_MX_RDPM] =3D &qhs_mx_rdpm, + [SLAVE_PCIE_0_CFG] =3D &qhs_pcie0_cfg, + [SLAVE_PDM] =3D &qhs_pdm, + [SLAVE_PIMEM_CFG] =3D &qhs_pimem_cfg, + [SLAVE_PMU_WRAPPER_CFG] =3D &qhs_pmu_wrapper_cfg, + [SLAVE_PRNG] =3D &qhs_prng, + [SLAVE_QSPI_0] =3D &qhs_qspi, + [SLAVE_QUP_0] =3D &qhs_qup0, + [SLAVE_QUP_1] =3D &qhs_qup1, + [SLAVE_SDC1] =3D &qhs_sdc1, + [SLAVE_SDCC_2] =3D &qhs_sdc2, + [SLAVE_TCSR] =3D &qhs_tcsr, + [SLAVE_TLMM] =3D &qhs_tlmm, + [SLAVE_UFS_MEM_CFG] =3D &qhs_ufs_mem_cfg, + [SLAVE_USB3_0] =3D &qhs_usb3_0, + [SLAVE_VENUS_CFG] =3D &qhs_venus_cfg, + [SLAVE_VSENSE_CTRL_CFG] =3D &qhs_vsense_ctrl_cfg, + [SLAVE_A1NOC_CFG] =3D &qns_a1_noc_cfg, + [SLAVE_A2NOC_CFG] =3D &qns_a2_noc_cfg, + [SLAVE_CNOC2_CNOC3] =3D &qns_cnoc2_cnoc3, + [SLAVE_CNOC_MNOC_CFG] =3D &qns_mnoc_cfg, + [SLAVE_PCIE_ANOC_CFG] =3D &qns_pcie_anoc_cfg, + [SLAVE_SNOC_CFG] =3D &qns_snoc_cfg, +}; + +static const struct qcom_icc_desc netrani_cnoc2 =3D { + .nodes =3D cnoc2_nodes, + .num_nodes =3D ARRAY_SIZE(cnoc2_nodes), + .bcms =3D cnoc2_bcms, + .num_bcms =3D ARRAY_SIZE(cnoc2_bcms), +}; + +static struct qcom_icc_bcm * const cnoc3_bcms[] =3D { + &bcm_cn0, +}; + +static struct qcom_icc_node * const cnoc3_nodes[] =3D { + [MASTER_CNOC2_CNOC3] =3D &qnm_cnoc2_cnoc3, + [MASTER_GEM_NOC_CNOC] =3D &qnm_gemnoc_cnoc, + [MASTER_GEM_NOC_PCIE_SNOC] =3D &qnm_gemnoc_pcie, + [SLAVE_AOSS] =3D &qhs_aoss, + [SLAVE_APPSS] =3D &qhs_apss, + [SLAVE_CDSP_CFG] =3D &qhs_compute_cfg, + [SLAVE_QDSS_CFG] =3D &qhs_qdss_cfg, + [SLAVE_TME_CFG] =3D &qhs_tme_cfg, + [SLAVE_WLAN] =3D &qhs_wcss, + [SLAVE_CNOC3_CNOC2] =3D &qns_cnoc3_cnoc2, + [SLAVE_CNOC_A2NOC] =3D &qns_cnoc_a2noc, + [SLAVE_BOOT_IMEM] =3D &qxs_boot_imem, + [SLAVE_IMEM] =3D &qxs_imem, + [SLAVE_PIMEM] =3D &qxs_pimem, + [SLAVE_PCIE_0] =3D &xs_pcie_0, + [SLAVE_QDSS_STM] =3D &xs_qdss_stm, + [SLAVE_TCU] =3D &xs_sys_tcu_cfg, +}; + +static const struct qcom_icc_desc netrani_cnoc3 =3D { + .nodes =3D cnoc3_nodes, + .num_nodes =3D ARRAY_SIZE(cnoc3_nodes), + .bcms =3D cnoc3_bcms, + .num_bcms =3D ARRAY_SIZE(cnoc3_bcms), +}; + +static struct qcom_icc_bcm * const gem_noc_bcms[] =3D { + &bcm_sh0, + &bcm_sh1, +}; + +static struct qcom_icc_node * const gem_noc_nodes[] =3D { + [MASTER_GPU_TCU] =3D &alm_gpu_tcu, + [MASTER_SYS_TCU] =3D &alm_sys_tcu, + [MASTER_APPSS_PROC] =3D &chm_apps, + [MASTER_GFX3D] =3D &qnm_gpu, + [MASTER_MSS_PROC] =3D &qnm_mdsp, + [MASTER_MNOC_HF_MEM_NOC] =3D &qnm_mnoc_hf, + [MASTER_MNOC_SF_MEM_NOC] =3D &qnm_mnoc_sf, + [MASTER_COMPUTE_NOC] =3D &qnm_nsp_gemnoc, + [MASTER_ANOC_PCIE_GEM_NOC] =3D &qnm_pcie, + [MASTER_SNOC_GC_MEM_NOC] =3D &qnm_snoc_gc, + [MASTER_SNOC_SF_MEM_NOC] =3D &qnm_snoc_sf, + [MASTER_WLAN_Q6] =3D &qxm_wlan_q6, + [SLAVE_GEM_NOC_CNOC] =3D &qns_gem_noc_cnoc, + [SLAVE_LLCC] =3D &qns_llcc, + [SLAVE_MEM_NOC_PCIE_SNOC] =3D &qns_pcie, +}; + +static const struct qcom_icc_desc netrani_gem_noc =3D { + .nodes =3D gem_noc_nodes, + .num_nodes =3D ARRAY_SIZE(gem_noc_nodes), + .bcms =3D gem_noc_bcms, + .num_bcms =3D ARRAY_SIZE(gem_noc_bcms), +}; + +static struct qcom_icc_bcm * const lpass_ag_noc_bcms[] =3D { +}; + +static struct qcom_icc_node * const lpass_ag_noc_nodes[] =3D { + [MASTER_CNOC_LPASS_AG_NOC] =3D &qhm_config_noc, + [MASTER_LPASS_PROC] =3D &qxm_lpass_dsp, + [SLAVE_LPASS_CORE_CFG] =3D &qhs_lpass_core, + [SLAVE_LPASS_LPI_CFG] =3D &qhs_lpass_lpi, + [SLAVE_LPASS_MPU_CFG] =3D &qhs_lpass_mpu, + [SLAVE_LPASS_TOP_CFG] =3D &qhs_lpass_top, + [SLAVE_LPASS_SNOC] =3D &qns_sysnoc, + [SLAVE_SERVICES_LPASS_AML_NOC] =3D &srvc_niu_aml_noc, + [SLAVE_SERVICE_LPASS_AG_NOC] =3D &srvc_niu_lpass_agnoc, +}; + +static const struct qcom_icc_desc netrani_lpass_ag_noc =3D { + .nodes =3D lpass_ag_noc_nodes, + .num_nodes =3D ARRAY_SIZE(lpass_ag_noc_nodes), + .bcms =3D lpass_ag_noc_bcms, + .num_bcms =3D ARRAY_SIZE(lpass_ag_noc_bcms), +}; + +static struct qcom_icc_bcm * const mc_virt_bcms[] =3D { + &bcm_acv, + &bcm_mc0, +}; + +static struct qcom_icc_node * const mc_virt_nodes[] =3D { + [MASTER_LLCC] =3D &llcc_mc, + [SLAVE_EBI1] =3D &ebi, +}; + +static const struct qcom_icc_desc netrani_mc_virt =3D { + .nodes =3D mc_virt_nodes, + .num_nodes =3D ARRAY_SIZE(mc_virt_nodes), + .bcms =3D mc_virt_bcms, + .num_bcms =3D ARRAY_SIZE(mc_virt_bcms), +}; + +static struct qcom_icc_bcm * const mmss_noc_bcms[] =3D { + &bcm_mm0, + &bcm_mm1, +}; + +static struct qcom_icc_node * const mmss_noc_nodes[] =3D { + [MASTER_CAMNOC_HF] =3D &qnm_camnoc_hf, + [MASTER_CAMNOC_ICP] =3D &qnm_camnoc_icp, + [MASTER_CAMNOC_SF] =3D &qnm_camnoc_sf, + [MASTER_MDP] =3D &qnm_mdp, + [MASTER_CNOC_MNOC_CFG] =3D &qnm_mnoc_cfg, + [MASTER_VIDEO_P0] =3D &qnm_video0, + [MASTER_VIDEO_PROC] =3D &qnm_video_cpu, + [SLAVE_MNOC_HF_MEM_NOC] =3D &qns_mem_noc_hf, + [SLAVE_MNOC_SF_MEM_NOC] =3D &qns_mem_noc_sf, + [SLAVE_SERVICE_MNOC] =3D &srvc_mnoc, +}; + +static const struct qcom_icc_desc netrani_mmss_noc =3D { + .nodes =3D mmss_noc_nodes, + .num_nodes =3D ARRAY_SIZE(mmss_noc_nodes), + .bcms =3D mmss_noc_bcms, + .num_bcms =3D ARRAY_SIZE(mmss_noc_bcms), +}; + +static struct qcom_icc_bcm * const nsp_noc_bcms[] =3D { + &bcm_co0, +}; + +static struct qcom_icc_node * const nsp_noc_nodes[] =3D { + [MASTER_CDSP_NOC_CFG] =3D &qhm_nsp_noc_config, + [MASTER_CDSP_PROC] =3D &qxm_nsp, + [SLAVE_CDSP_MEM_NOC] =3D &qns_nsp_gemnoc, + [SLAVE_SERVICE_NSP_NOC] =3D &service_nsp_noc, +}; + +static const struct qcom_icc_desc netrani_nsp_noc =3D { + .nodes =3D nsp_noc_nodes, + .num_nodes =3D ARRAY_SIZE(nsp_noc_nodes), + .bcms =3D nsp_noc_bcms, + .num_bcms =3D ARRAY_SIZE(nsp_noc_bcms), +}; + +static struct qcom_icc_bcm * const pcie_anoc_bcms[] =3D { + &bcm_sn7, +}; + +static struct qcom_icc_node * const pcie_anoc_nodes[] =3D { + [MASTER_PCIE_ANOC_CFG] =3D &qnm_pcie_anoc_cfg, + [MASTER_PCIE_0] =3D &xm_pcie3_0, + [SLAVE_ANOC_PCIE_GEM_NOC] =3D &qns_pcie_mem_noc, + [SLAVE_SERVICE_PCIE_ANOC] =3D &srvc_pcie_aggre_noc, +}; + +static const struct qcom_icc_desc netrani_pcie_anoc =3D { + .nodes =3D pcie_anoc_nodes, + .num_nodes =3D ARRAY_SIZE(pcie_anoc_nodes), + .bcms =3D pcie_anoc_bcms, + .num_bcms =3D ARRAY_SIZE(pcie_anoc_bcms), +}; + +static struct qcom_icc_bcm * const system_noc_bcms[] =3D { + &bcm_sn0, + &bcm_sn1, + &bcm_sn2, + &bcm_sn3, + &bcm_sn4, +}; + +static struct qcom_icc_node * const system_noc_nodes[] =3D { + [MASTER_GIC_AHB] =3D &qhm_gic, + [MASTER_A1NOC_SNOC] =3D &qnm_aggre1_noc, + [MASTER_A2NOC_SNOC] =3D &qnm_aggre2_noc, + [MASTER_LPASS_ANOC] =3D &qnm_lpass_noc, + [MASTER_SNOC_CFG] =3D &qnm_snoc_cfg, + [MASTER_PIMEM] =3D &qxm_pimem, + [MASTER_TME] =3D &qxm_tme, + [MASTER_GIC] =3D &xm_gic, + [SLAVE_SNOC_GEM_NOC_GC] =3D &qns_gemnoc_gc, + [SLAVE_SNOC_GEM_NOC_SF] =3D &qns_gemnoc_sf, + [SLAVE_SERVICE_SNOC] =3D &srvc_snoc, +}; + +static const struct qcom_icc_desc netrani_system_noc =3D { + .nodes =3D system_noc_nodes, + .num_nodes =3D ARRAY_SIZE(system_noc_nodes), + .bcms =3D system_noc_bcms, + .num_bcms =3D ARRAY_SIZE(system_noc_bcms), +}; + +static const struct of_device_id qnoc_of_match[] =3D { + { .compatible =3D "qcom,netrani-aggre1-noc", + .data =3D &netrani_aggre1_noc }, + { .compatible =3D "qcom,netrani-aggre2-noc", + .data =3D &netrani_aggre2_noc }, + { .compatible =3D "qcom,netrani-clk-virt", + .data =3D &netrani_clk_virt }, + { .compatible =3D "qcom,netrani-cnoc2", + .data =3D &netrani_cnoc2 }, + { .compatible =3D "qcom,netrani-cnoc3", + .data =3D &netrani_cnoc3 }, + { .compatible =3D "qcom,netrani-gem-noc", + .data =3D &netrani_gem_noc }, + { .compatible =3D "qcom,netrani-lpass-ag-noc", + .data =3D &netrani_lpass_ag_noc }, + { .compatible =3D "qcom,netrani-mc-virt", + .data =3D &netrani_mc_virt }, + { .compatible =3D "qcom,netrani-mmss-noc", + .data =3D &netrani_mmss_noc }, + { .compatible =3D "qcom,netrani-nsp-noc", + .data =3D &netrani_nsp_noc }, + { .compatible =3D "qcom,netrani-pcie-anoc", + .data =3D &netrani_pcie_anoc }, + { .compatible =3D "qcom,netrani-system-noc", + .data =3D &netrani_system_noc }, + { } +}; +MODULE_DEVICE_TABLE(of, qnoc_of_match); + +static struct platform_driver qnoc_driver =3D { + .probe =3D qcom_icc_rpmh_probe, + .remove =3D qcom_icc_rpmh_remove, + .driver =3D { + .name =3D "qnoc-netrani", + .of_match_table =3D qnoc_of_match, + .sync_state =3D icc_sync_state, + }, +}; +module_platform_driver(qnoc_driver); + +MODULE_DESCRIPTION("Qualcomm Netrani interconnect driver"); +MODULE_LICENSE("GPL"); --=20 2.56.0