Skip to contentSkip to conversation

Add SM8150 and SM8250 interconnect drivers

PATCH Superseded Jonathan Marek 3 participants 13 messages Jul 1, 2020 – Jul 13, 2020

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add SM8150 and SM8250 interconnect drivers

Most of this is generated from downstream dts using a script.

There are a couple things I'm not sure about:
* When to set keepalive in DEFINE_QBCM macro (set to all false)
* Address/size for the reg fields - the "display" nodes have the same address as the non-"display" nodes. For the size I just used 0x1000. reg field is unused by the upstream driver so isn't a problem functionally.

Jonathan Marek (6):
dt-bindings: interconnect: Add Qualcomm SM8150 DT bindings
dt-bindings: interconnect: Add Qualcomm SM8250 DT bindings
interconnect: qcom: Add SM8150 interconnect provider driver
interconnect: qcom: Add SM8250 interconnect provider driver
arm64: dts: qcom: sm8150: add interconnect nodes
arm64: dts: qcom: sm8250: add interconnect nodes

 .../bindings/interconnect/qcom,sm8150.yaml    |  86 ++
 .../bindings/interconnect/qcom,sm8250.yaml    |  86 ++
 arch/arm64/boot/dts/qcom/sm8150.dtsi          | 118 +++
 arch/arm64/boot/dts/qcom/sm8250.dtsi          | 118 +++
 drivers/interconnect/qcom/Kconfig             |  20 +
 drivers/interconnect/qcom/Makefile            |   4 +
 drivers/interconnect/qcom/sm8150.c            | 719 +++++++++++++++++
 drivers/interconnect/qcom/sm8150.h            | 163 ++++
 drivers/interconnect/qcom/sm8250.c            | 733 ++++++++++++++++++
 drivers/interconnect/qcom/sm8250.h            | 173 +++++
 .../dt-bindings/interconnect/qcom,sm8150.h    | 176 +++++
 .../dt-bindings/interconnect/qcom,sm8250.h    | 186 +++++
 12 files changed, 2582 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml
 create mode 100644 drivers/interconnect/qcom/sm8150.c
 create mode 100644 drivers/interconnect/qcom/sm8150.h
 create mode 100644 drivers/interconnect/qcom/sm8250.c
 create mode 100644 drivers/interconnect/qcom/sm8250.h
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8150.h
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8250.h
Signature · 1 line
2.26.1
#1 lore raw

PATCH 1/6 dt-bindings: interconnect: Add Qualcomm SM8150 DT bindings

The Qualcomm SM8150 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.

---
 .../bindings/interconnect/qcom,sm8150.yaml    |  86 +++++++++
 .../dt-bindings/interconnect/qcom,sm8150.h    | 176 ++++++++++++++++++
 2 files changed, 262 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8150.h
Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml new file +86 -0
new file mode 100644
index 000000000000..99fb881bc797
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sm8150.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title:  Qualcomm SM8150 Network-On-Chip Interconnect
+
+maintainers:
+  -
+
+description: |
+   SM8150 interconnect providers support system bandwidth requirements through
+   RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider 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 provider
+   can map to multiple RPMh resources.
+
+properties:
+  reg:
+    maxItems: 1
+
+  compatible:
+    enum:
+      - qcom,sm8150-aggre1-noc
+      - qcom,sm8150-aggre2-noc
+      - qcom,sm8150-camnoc-noc
+      - qcom,sm8150-compute-noc
+      - qcom,sm8150-config-noc
+      - qcom,sm8150-dc-noc
+      - qcom,sm8150-gem-noc
+      - qcom,sm8150-ipa-virt
+      - qcom,sm8150-mc-virt
+      - qcom,sm8150-mmss-noc
+      - qcom,sm8150-system-noc
+      - qcom,sm8150-gem-noc-display
+      - qcom,sm8150-mc-virt-display
+      - qcom,sm8150-mmss-noc-display
+
+  '#interconnect-cells':
+    const: 1
+
+  qcom,bcm-voters:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      List of phandles to qcom,bcm-voter nodes that are required by
+      this interconnect to send RPMh commands.
+
+  qcom,bcm-voter-names:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description: |
+      Names for each of the qcom,bcm-voters specified.
+
+required:
+  - compatible
+  - reg
+  - '#interconnect-cells'
+  - qcom,bcm-voters
+
+additionalProperties: false
+
+examples:
+  - |
+      #include <dt-bindings/interconnect/qcom,sm8150.h>
+
+      config_noc: interconnect@1500000 {
+            compatible = "qcom,sm8150-config-noc";
+            reg = <0x01500000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
+
+      system_noc: interconnect@1629000 {
+            compatible = "qcom,sm8150-system-noc";
+            reg = <0x01629000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
+
+      mmss_noc: interconnect@1749000 {
+            compatible = "qcom,sm8150-mmss-noc";
+            reg = <0x01749000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
include/dt-bindings/interconnect/qcom,sm8150.h new file +176 -0

176 lines not on this page · raw message

Signature · 1 line
2.26.1
maintainer
#2 lore raw

Re: [PATCH 1/6] dt-bindings: interconnect: Add Qualcomm SM8150 DT bindings

Quoted 11 lines · Jonathan Marek

The Qualcomm SM8150 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.

---
 .../bindings/interconnect/qcom,sm8150.yaml    |  86 +++++++++
 .../dt-bindings/interconnect/qcom,sm8150.h    | 176 ++++++++++++++++++
 2 files changed, 262 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8150.h

My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml: maintainers:0: None is not of type 'string' Documentation/devicetree/bindings/Makefile:20: recipe for target 'Documentation/devicetree/bindings/interconnect/qcom,sm8150.example.dts' failed make[1]: *** [Documentation/devicetree/bindings/interconnect/qcom,sm8150.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs.... /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml: ignoring, error in schema: maintainers: 0
warning: no schema found in file: ./Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml: ignoring, error in schema: maintainers: 0
warning: no schema found in file: ./Documentation/devicetree/bindings/interconnect/qcom,sm8150.yaml
Makefile:1347: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1320475

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.

#3 lore raw

PATCH 2/6 dt-bindings: interconnect: Add Qualcomm SM8250 DT bindings

In reply to Jonathan Marek

The Qualcomm SM8250 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.

---
 .../bindings/interconnect/qcom,sm8250.yaml    |  86 ++++++++
 .../dt-bindings/interconnect/qcom,sm8250.h    | 186 ++++++++++++++++++
 2 files changed, 272 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8250.h
Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml new file +86 -0
new file mode 100644
index 000000000000..bc4e2358ad78
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,sm8250.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title:  Qualcomm SM8250 Network-On-Chip Interconnect
+
+maintainers:
+  -
+
+description: |
+   SM8250 interconnect providers support system bandwidth requirements through
+   RPMh hardware accelerators known as Bus Clock Manager (BCM). The provider 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 provider
+   can map to multiple RPMh resources.
+
+properties:
+  reg:
+    maxItems: 1
+
+  compatible:
+    enum:
+      - qcom,sm8250-aggre1-noc
+      - qcom,sm8250-aggre2-noc
+      - qcom,sm8250-compute-noc
+      - qcom,sm8250-config-noc
+      - qcom,sm8250-dc-noc
+      - qcom,sm8250-gem-noc
+      - qcom,sm8250-ipa-virt
+      - qcom,sm8250-mc-virt
+      - qcom,sm8250-mmss-noc
+      - qcom,sm8250-npu-noc
+      - qcom,sm8250-system-noc
+      - qcom,sm8250-gem-noc-display
+      - qcom,sm8250-mc-virt-display
+      - qcom,sm8250-mmss-noc-display
+
+  '#interconnect-cells':
+    const: 1
+
+  qcom,bcm-voters:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      List of phandles to qcom,bcm-voter nodes that are required by
+      this interconnect to send RPMh commands.
+
+  qcom,bcm-voter-names:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description: |
+      Names for each of the qcom,bcm-voters specified.
+
+required:
+  - compatible
+  - reg
+  - '#interconnect-cells'
+  - qcom,bcm-voters
+
+additionalProperties: false
+
+examples:
+  - |
+      #include <dt-bindings/interconnect/qcom,sm8250.h>
+
+      config_noc: interconnect@1500000 {
+            compatible = "qcom,sm8250-config-noc";
+            reg = <0x01500000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
+
+      system_noc: interconnect@1632000 {
+            compatible = "qcom,sm8250-system-noc";
+            reg = <0x01632000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
+
+      mmss_noc: interconnect@174a000 {
+            compatible = "qcom,sm8250-mmss-noc";
+            reg = <0x0174a000 0x1000>;
+            #interconnect-cells = <1>;
+            qcom,bcm-voters = <&apps_bcm_voter>;
+      };
include/dt-bindings/interconnect/qcom,sm8250.h new file +186 -0

186 lines not on this page · raw message

Signature · 1 line
2.26.1
maintainer
#4 lore raw

Re: [PATCH 2/6] dt-bindings: interconnect: Add Qualcomm SM8250 DT bindings

Quoted 2 lines · Jonathan Marek

The Qualcomm SM8250 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.

Again, looks like these 2 could be combined.

Quoted 8 lines
---
 .../bindings/interconnect/qcom,sm8250.yaml    |  86 ++++++++
 .../dt-bindings/interconnect/qcom,sm8250.h    | 186 ++++++++++++++++++
 2 files changed, 272 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8250.h
maintainer
#5 lore raw

Re: [PATCH 2/6] dt-bindings: interconnect: Add Qualcomm SM8250 DT bindings

In reply to Jonathan Marek
Quoted 11 lines · Jonathan Marek

The Qualcomm SM8250 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.

---
 .../bindings/interconnect/qcom,sm8250.yaml    |  86 ++++++++
 .../dt-bindings/interconnect/qcom,sm8250.h    | 186 ++++++++++++++++++
 2 files changed, 272 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8250.h

My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml: maintainers:0: None is not of type 'string' Documentation/devicetree/bindings/Makefile:20: recipe for target 'Documentation/devicetree/bindings/interconnect/qcom,sm8250.example.dts' failed make[1]: *** [Documentation/devicetree/bindings/interconnect/qcom,sm8250.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs.... /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml: ignoring, error in schema: maintainers: 0
warning: no schema found in file: ./Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml: ignoring, error in schema: maintainers: 0
warning: no schema found in file: ./Documentation/devicetree/bindings/interconnect/qcom,sm8250.yaml
Makefile:1347: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1320476

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.

#6 lore raw

PATCH 3/6 interconnect: qcom: Add SM8150 interconnect provider driver

In reply to Jonathan Marek

Add driver for the Qualcomm interconnect buses found in SM8150 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs.

Based on SC7180 driver and generated from downstream dts.

---
 drivers/interconnect/qcom/Kconfig  |  10 +
 drivers/interconnect/qcom/Makefile |   2 +
 drivers/interconnect/qcom/sm8150.c | 719 +++++++++++++++++++++++++++++
 drivers/interconnect/qcom/sm8150.h | 163 +++++++
 4 files changed, 894 insertions(+)
 create mode 100644 drivers/interconnect/qcom/sm8150.c
 create mode 100644 drivers/interconnect/qcom/sm8150.h
drivers/interconnect/qcom/Kconfig +10 -0
index a88f2f07bc27..25486de5a38d 100644
@@ -65,5 +65,15 @@ config INTERCONNECT_QCOM_SDM845
 	  This is a driver for the Qualcomm Network-on-Chip on sdm845-based
 	  platforms.
 
+config INTERCONNECT_QCOM_SM8150
+	tristate "Qualcomm SM8150 interconnect driver"
+	depends on INTERCONNECT_QCOM
+	depends on (QCOM_RPMH && QCOM_COMMAND_DB && OF) || COMPILE_TEST
+	select INTERCONNECT_QCOM_RPMH
+	select INTERCONNECT_QCOM_BCM_VOTER
+	help
+	  This is a driver for the Qualcomm Network-on-Chip on sm8150-based
+	  platforms.
+
 config INTERCONNECT_QCOM_SMD_RPM
 	tristate
drivers/interconnect/qcom/Makefile +2 -0
index 3a047fe6e45a..1702ece67dc5 100644
@@ -8,6 +8,7 @@ qnoc-qcs404-objs			:= qcs404.o
 icc-rpmh-obj				:= icc-rpmh.o
 qnoc-sc7180-objs			:= sc7180.o
 qnoc-sdm845-objs			:= sdm845.o
+qnoc-sm8150-objs			:= sm8150.o
 icc-smd-rpm-objs			:= smd-rpm.o
 
 obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
@@ -18,4 +19,5 @@ obj-$(CONFIG_INTERCONNECT_QCOM_QCS404) += qnoc-qcs404.o
 obj-$(CONFIG_INTERCONNECT_QCOM_RPMH) += icc-rpmh.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SC7180) += qnoc-sc7180.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SDM845) += qnoc-sdm845.o
+obj-$(CONFIG_INTERCONNECT_QCOM_SM8150) += qnoc-sm8150.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
drivers/interconnect/qcom/sm8150.c new file +719 -0

719 lines not on this page · raw message

drivers/interconnect/qcom/sm8150.h new file +163 -0

163 lines not on this page · raw message

Signature · 1 line
2.26.1
#7 lore raw

PATCH 4/6 interconnect: qcom: Add SM8250 interconnect provider driver

In reply to Jonathan Marek

Add driver for the Qualcomm interconnect buses found in SM8250 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs.

Based on SC7180 driver and generated from downstream dts.

---
 drivers/interconnect/qcom/Kconfig  |  10 +
 drivers/interconnect/qcom/Makefile |   2 +
 drivers/interconnect/qcom/sm8250.c | 733 +++++++++++++++++++++++++++++
 drivers/interconnect/qcom/sm8250.h | 173 +++++++
 4 files changed, 918 insertions(+)
 create mode 100644 drivers/interconnect/qcom/sm8250.c
 create mode 100644 drivers/interconnect/qcom/sm8250.h
drivers/interconnect/qcom/Kconfig +10 -0
index 25486de5a38d..a8f93ba265f8 100644
@@ -75,5 +75,15 @@ config INTERCONNECT_QCOM_SM8150
 	  This is a driver for the Qualcomm Network-on-Chip on sm8150-based
 	  platforms.
 
+config INTERCONNECT_QCOM_SM8250
+	tristate "Qualcomm SM8250 interconnect driver"
+	depends on INTERCONNECT_QCOM
+	depends on (QCOM_RPMH && QCOM_COMMAND_DB && OF) || COMPILE_TEST
+	select INTERCONNECT_QCOM_RPMH
+	select INTERCONNECT_QCOM_BCM_VOTER
+	help
+	  This is a driver for the Qualcomm Network-on-Chip on sm8250-based
+	  platforms.
+
 config INTERCONNECT_QCOM_SMD_RPM
 	tristate
drivers/interconnect/qcom/Makefile +2 -0
index 1702ece67dc5..cf628f7990cd 100644
@@ -9,6 +9,7 @@ icc-rpmh-obj				:= icc-rpmh.o
 qnoc-sc7180-objs			:= sc7180.o
 qnoc-sdm845-objs			:= sdm845.o
 qnoc-sm8150-objs			:= sm8150.o
+qnoc-sm8250-objs			:= sm8250.o
 icc-smd-rpm-objs			:= smd-rpm.o
 
 obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
@@ -20,4 +21,5 @@ obj-$(CONFIG_INTERCONNECT_QCOM_RPMH) += icc-rpmh.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SC7180) += qnoc-sc7180.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SDM845) += qnoc-sdm845.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SM8150) += qnoc-sm8150.o
+obj-$(CONFIG_INTERCONNECT_QCOM_SM8250) += qnoc-sm8250.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
drivers/interconnect/qcom/sm8250.c new file +733 -0

733 lines not on this page · raw message

drivers/interconnect/qcom/sm8250.h new file +173 -0

173 lines not on this page · raw message

Signature · 1 line
2.26.1
#8 lore raw

Re: [PATCH 4/6] interconnect: qcom: Add SM8250 interconnect provider driver

Hi Jonathan,

Thanks for posting these patches!

Quoted 9 lines · Jonathan Marek

Add driver for the Qualcomm interconnect buses found in SM8250 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs.

Based on SC7180 driver and generated from downstream dts.

---

[..]

Quoted 21 lines
drivers/interconnect/qcom/sm8250.c new file +21 -0
+
+static const struct of_device_id qnoc_of_match[] = {
+	{ .compatible = "qcom,sm8250-aggre1-noc",
+	  .data = &sm8250_aggre1_noc},
+	{ .compatible = "qcom,sm8250-aggre2-noc",
+	  .data = &sm8250_aggre2_noc},
+	{ .compatible = "qcom,sm8250-compute-noc",
+	  .data = &sm8250_compute_noc},
+	{ .compatible = "qcom,sm8250-config-noc",
+	  .data = &sm8250_config_noc},
+	{ .compatible = "qcom,sm8250-dc-noc",
+	  .data = &sm8250_dc_noc},
+	{ .compatible = "qcom,sm8250-gem-noc",
+	  .data = &sm8250_gem_noc},
+	{ .compatible = "qcom,sm8250-ipa-virt",
+	  .data = &sm8250_ipa_virt},
+	{ .compatible = "qcom,sm8250-mc-virt",
+	  .data = &sm8250_mc_virt},
+	{ .compatible = "qcom,sm8250-mmss-noc",
+	  .data = &sm8250_mmss_noc},
+	{ .compatible = "qcom,sm8250-npu-noc",

drivers/interconnect/qcom/sm8250.c line 718

Quoted 10 lines
drivers/interconnect/qcom/sm8250.c new file +10 -0
+	  .data = &sm8250_npu_noc},
+	{ .compatible = "qcom,sm8250-system-noc",
+	  .data = &sm8250_system_noc},
+	{ .compatible = "qcom,sm8250-gem-noc-display",
+	  .data = &sm8250_gem_noc_display},
+	{ .compatible = "qcom,sm8250-mc-virt-display",
+	  .data = &sm8250_mc_virt_display},
+	{ .compatible = "qcom,sm8250-mmss-noc-display",
+	  .data = &sm8250_mmss_noc_display},
+	{ }

My main concern here are the display RSC nodes. We should not add the nodes for voting on the display RSC, but use the "qcom,bcm-voters" property in DT to list both "hlos" and "disp" as bcm voters for gem-noc, mc-virt and mmss-noc.

Thanks,
Georgi

#9 lore raw

Re: [PATCH 4/6] interconnect: qcom: Add SM8250 interconnect provider driver

Quoted 43 lines · Georgi Djakov

Hi Jonathan,

Thanks for posting these patches!

Quoted 9 lines · Jonathan Marek

Add driver for the Qualcomm interconnect buses found in SM8250 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs.

Based on SC7180 driver and generated from downstream dts.

---

[..]

Quoted 28 lines
drivers/interconnect/qcom/sm8250.c new file +28 -0
+
+static const struct of_device_id qnoc_of_match[] = {
+	{ .compatible = "qcom,sm8250-aggre1-noc",
+	  .data = &sm8250_aggre1_noc},
+	{ .compatible = "qcom,sm8250-aggre2-noc",
+	  .data = &sm8250_aggre2_noc},
+	{ .compatible = "qcom,sm8250-compute-noc",
+	  .data = &sm8250_compute_noc},
+	{ .compatible = "qcom,sm8250-config-noc",
+	  .data = &sm8250_config_noc},
+	{ .compatible = "qcom,sm8250-dc-noc",
+	  .data = &sm8250_dc_noc},
+	{ .compatible = "qcom,sm8250-gem-noc",
+	  .data = &sm8250_gem_noc},
+	{ .compatible = "qcom,sm8250-ipa-virt",
+	  .data = &sm8250_ipa_virt},
+	{ .compatible = "qcom,sm8250-mc-virt",
+	  .data = &sm8250_mc_virt},
+	{ .compatible = "qcom,sm8250-mmss-noc",
+	  .data = &sm8250_mmss_noc},
+	{ .compatible = "qcom,sm8250-npu-noc",
+	  .data = &sm8250_npu_noc},
+	{ .compatible = "qcom,sm8250-system-noc",
+	  .data = &sm8250_system_noc},
+	{ .compatible = "qcom,sm8250-gem-noc-display",
+	  .data = &sm8250_gem_noc_display},
+	{ .compatible = "qcom,sm8250-mc-virt-display",
+	  .data = &sm8250_mc_virt_display},
Quoted 9 lines

drivers/interconnect/qcom/sm8250.c line 718

Quoted 3 lines
drivers/interconnect/qcom/sm8250.c new file +3 -0
+	{ .compatible = "qcom,sm8250-mmss-noc-display",
+	  .data = &sm8250_mmss_noc_display},
+	{ }

My main concern here are the display RSC nodes. We should not add the nodes for voting on the display RSC, but use the "qcom,bcm-voters" property in DT to list both "hlos" and "disp" as bcm voters for gem-noc, mc-virt and mmss-noc.

Would it be OK to just drop the display RSC parts from this series then? Not sure if anything needs it to work, but I'm not using it currently.

Though if you can provide details for a solution, I could implement it (qcom_icc_provider needs to have a list of voters, but I'm not sure how to deal with everything else).

Quoted 3 lines

Thanks,
Georgi

#10 lore raw

Re: [PATCH 4/6] interconnect: qcom: Add SM8250 interconnect provider driver

Quoted 54 lines · Jonathan Marek
Quoted 43 lines · Georgi Djakov

Hi Jonathan,

Thanks for posting these patches!

Quoted 9 lines · Jonathan Marek

Add driver for the Qualcomm interconnect buses found in SM8250 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs.

Based on SC7180 driver and generated from downstream dts.

---

[..]

Quoted 28 lines
drivers/interconnect/qcom/sm8250.c new file +28 -0
+
+static const struct of_device_id qnoc_of_match[] = {
+    { .compatible = "qcom,sm8250-aggre1-noc",
+      .data = &sm8250_aggre1_noc},
+    { .compatible = "qcom,sm8250-aggre2-noc",
+      .data = &sm8250_aggre2_noc},
+    { .compatible = "qcom,sm8250-compute-noc",
+      .data = &sm8250_compute_noc},
+    { .compatible = "qcom,sm8250-config-noc",
+      .data = &sm8250_config_noc},
+    { .compatible = "qcom,sm8250-dc-noc",
+      .data = &sm8250_dc_noc},
+    { .compatible = "qcom,sm8250-gem-noc",
+      .data = &sm8250_gem_noc},
+    { .compatible = "qcom,sm8250-ipa-virt",
+      .data = &sm8250_ipa_virt},
+    { .compatible = "qcom,sm8250-mc-virt",
+      .data = &sm8250_mc_virt},
+    { .compatible = "qcom,sm8250-mmss-noc",
+      .data = &sm8250_mmss_noc},
+    { .compatible = "qcom,sm8250-npu-noc",
+      .data = &sm8250_npu_noc},
+    { .compatible = "qcom,sm8250-system-noc",
+      .data = &sm8250_system_noc},
+    { .compatible = "qcom,sm8250-gem-noc-display",
+      .data = &sm8250_gem_noc_display},
+    { .compatible = "qcom,sm8250-mc-virt-display",
+      .data = &sm8250_mc_virt_display},
Quoted 9 lines
Quoted 3 lines

+    { .compatible = "qcom,sm8250-mmss-noc-display", +      .data = &sm8250_mmss_noc_display},
+    { }

My main concern here are the display RSC nodes. We should not add the nodes for voting on the display RSC, but use the "qcom,bcm-voters" property in DT to list both "hlos" and "disp" as bcm voters for gem-noc, mc-virt and mmss-noc.

Quoted 2 lines

Would it be OK to just drop the display RSC parts from this series then? Not sure if anything needs it to work, but I'm not using it currently.

This would be perfect! Let's start without the display bits. Reviewing and testing the display part would be also a bit tricky for me.

Quoted 3 lines

Though if you can provide details for a solution, I could implement it (qcom_icc_provider needs to have a list of voters, but I'm not sure how to deal with everything else).

Yes, exactly. The idea is to add voters to each qcom_icc_desc and then "get" the voters and commit for each of them. But i think there is a patch for this already, let me check about whether its going upstream anytime soon.

Thanks,
Georgi

#11 lore raw

PATCH 5/6 arm64: dts: qcom: sm8150: add interconnect nodes

In reply to Jonathan Marek

Add the interconnect dts nodes for sm8150.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 118 +++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +118 -0
index 5272e27eca70..747521666700 100644
@@ -11,6 +11,7 @@
 #include <dt-bindings/clock/qcom,rpmh.h>
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
 #include <dt-bindings/clock/qcom,gpucc-sm8150.h>
+#include <dt-bindings/interconnect/qcom,sm8150.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -431,6 +432,75 @@ uart2: serial@a90000 {
 			};
 		};
 
+		dc_noc: interconnect@14e0000 {
+			compatible = "qcom,sm8150-dc-noc";
+			reg = <0 0x014e0000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		config_noc: interconnect@1500000 {
+			compatible = "qcom,sm8150-config-noc";
+			reg = <0 0x01500000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		camnoc_virt: interconnect@1620000 {
+			compatible = "qcom,sm8150-camnoc-virt";
+			reg = <0 0x01620000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		ipa_virt: interconnect-ipa@1620000 {
+			compatible = "qcom,sm8150-ipa-virt";
+			reg = <0 0x01620000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		system_noc: interconnect@1629000 {
+			compatible = "qcom,sm8150-system-noc";
+			reg = <0 0x01629000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		aggre1_noc: interconnect@16e4000 {
+			compatible = "qcom,sm8150-aggre1-noc";
+			reg = <0 0x016e4000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		aggre2_noc: interconnect@1706000 {
+			compatible = "qcom,sm8150-aggre2-noc";
+			reg = <0 0x01706000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		compute_noc: interconnect@1720000 {
+			compatible = "qcom,sm8150-compute-noc";
+			reg = <0 0x01720000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mmss_noc: interconnect@1749000 {
+			compatible = "qcom,sm8150-mmss-noc";
+			reg = <0 0x01749000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mmss_noc_display: interconnect-display@1749000 {
+			compatible = "qcom,sm8150-mmss-noc-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
 		ufs_mem_hc: ufshc@1d84000 {
 			compatible = "qcom,sm8150-ufshc", "qcom,ufshc",
 				     "jedec,ufs-2.0";
@@ -851,6 +921,32 @@ usb_2_ssphy: lane@88eb200 {
 			};
 		};
 
+		mc_virt: interconnect@9680000 {
+			compatible = "qcom,sm8150-mc-virt";
+			reg = <0 0x09680000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mc_virt_display: interconnect-display@9680000 {
+			compatible = "qcom,sm8150-mc-virt-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
+		gem_noc: interconnect@96ab000 {
+			compatible = "qcom,sm8150-gem-noc";
+			reg = <0 0x096ab000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		gem_noc_display: interconnect-display@96ab000 {
+			compatible = "qcom,sm8150-gem-noc-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
 		usb_1: usb@a6f8800 {
 			compatible = "qcom,sm8150-dwc3", "qcom,dwc3";
 			reg = <0 0x0a6f8800 0 0x400>;
@@ -941,6 +1037,24 @@ usb_2_dwc3: dwc3@a800000 {
 			};
 		};
 
+		disp_rsc: rsc@af20000 {
+			label = "display_rsc";
+			compatible = "qcom,rpmh-rsc";
+			reg = <0x0 0xaf20000 0x0 0x10000>;
+			reg-names = "drv-0";
+			interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,tcs-offset = <0x1c00>;
+			qcom,drv-id = <0>;
+			qcom,tcs-config = <SLEEP_TCS   1>,
+					  <WAKE_TCS    1>,
+					  <ACTIVE_TCS  2>,
+					  <CONTROL_TCS 0>;
+
+			disp_bcm_voter: bcm_voter {
+				compatible = "qcom,bcm-voter";
+			};
+		};
+
 		aoss_qmp: power-controller@c300000 {
 			compatible = "qcom,sm8150-aoss-qmp";
 			reg = <0x0 0x0c300000 0x0 0x100000>;
@@ -1249,6 +1363,10 @@ rpmhpd_opp_turbo_l1: opp11 {
 					};
 				};
 			};
+
+			apps_bcm_voter: bcm_voter {
+				compatible = "qcom,bcm-voter";
+			};
 		};
 
 		cpufreq_hw: cpufreq@18323000 {
Signature · 1 line
2.26.1
#12 lore raw

PATCH 6/6 arm64: dts: qcom: sm8250: add interconnect nodes

In reply to Jonathan Marek

Add the interconnect dts nodes for sm8250.

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 118 +++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +118 -0
index c9b38dd88f43..b417523f1f1b 100644
@@ -9,6 +9,7 @@
 #include <dt-bindings/clock/qcom,rpmh.h>
 #include <dt-bindings/power/qcom-rpmpd.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/interconnect/qcom,sm8250.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -310,6 +311,61 @@ uart2: serial@a90000 {
 			};
 		};
 
+		config_noc: interconnect@1500000 {
+			compatible = "qcom,sm8250-config-noc";
+			reg = <0 0x01500000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		ipa_virt: interconnect@1620000 {
+			compatible = "qcom,sm8250-ipa-virt";
+			reg = <0 0x01620000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		system_noc: interconnect@1632000 {
+			compatible = "qcom,sm8250-system-noc";
+			reg = <0 0x01632000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		aggre1_noc: interconnect@16e2000 {
+			compatible = "qcom,sm8250-aggre1-noc";
+			reg = <0 0x016e2000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		aggre2_noc: interconnect@1703000 {
+			compatible = "qcom,sm8250-aggre2-noc";
+			reg = <0 0x01703000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		compute_noc: interconnect@1733000 {
+			compatible = "qcom,sm8250-compute-noc";
+			reg = <0 0x01733000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mmss_noc: interconnect@174a000 {
+			compatible = "qcom,sm8250-mmss-noc";
+			reg = <0 0x0174a000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mmss_noc_display: interconnect-display@174a000 {
+			compatible = "qcom,sm8250-mmss-noc-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
 		ufs_mem_hc: ufshc@1d84000 {
 			compatible = "qcom,sm8250-ufshc", "qcom,ufshc",
 				     "jedec,ufs-2.0";
@@ -620,6 +676,46 @@ usb_2_ssphy: lane@88eb200 {
 			};
 		};
 
+		dc_noc: interconnect@90c0000 {
+			compatible = "qcom,sm8250-dc-noc";
+			reg = <0 0x090c0000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mc_virt: interconnect@9100000 {
+			compatible = "qcom,sm8250-mc-virt";
+			reg = <0 0x09100000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		mc_virt_display: interconnect-display@9100000 {
+			compatible = "qcom,sm8250-mc-virt-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
+		gem_noc: interconnect@9121000 {
+			compatible = "qcom,sm8250-gem-noc";
+			reg = <0 0x09121000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
+		gem_noc_display: interconnect-display@9121000 {
+			compatible = "qcom,sm8250-gem-noc-display";
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&disp_bcm_voter>;
+		};
+
+		npu_noc: interconnect@9990000 {
+			compatible = "qcom,sm8250-npu-noc";
+			reg = <0 0x09990000 0 0x1000>;
+			#interconnect-cells = <1>;
+			qcom,bcm-voters = <&apps_bcm_voter>;
+		};
+
 		usb_1: usb@a6f8800 {
 			compatible = "qcom,sm8250-dwc3", "qcom,dwc3";
 			reg = <0 0x0a6f8800 0 0x400>;
@@ -710,6 +806,24 @@ usb_2_dwc3: dwc3@a800000 {
 			};
 		};
 
+		disp_rsc: rsc@af20000 {
+			label = "disp_rsc";
+			compatible = "qcom,rpmh-rsc";
+			reg = <0x0 0xaf20000 0x0 0x10000>;
+			reg-names = "drv-0";
+			interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,tcs-offset = <0x1c00>;
+			qcom,drv-id = <0>;
+			qcom,tcs-config = <ACTIVE_TCS  0>,
+					  <SLEEP_TCS   1>,
+					  <WAKE_TCS    1>,
+					  <CONTROL_TCS 0>;
+
+			disp_bcm_voter: bcm_voter {
+				compatible = "qcom,bcm-voter";
+			};
+		};
+
 		pdc: interrupt-controller@b220000 {
 			compatible = "qcom,sm8250-pdc", "qcom,pdc";
 			reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x60>;
@@ -997,6 +1111,10 @@ rpmhpd_opp_turbo_l1: opp10 {
 					};
 				};
 			};
+
+			apps_bcm_voter: bcm_voter {
+				compatible = "qcom,bcm-voter";
+			};
 		};
 
 		cpufreq_hw: cpufreq@18591000 {
Signature · 1 line
2.26.1