Skip to contentSkip to conversation

Add interconnect support for SM8450

PATCH Superseded Vinod Koul 3 participants 9 messages Dec 1, 2021 – Dec 8, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

cover Add interconnect support for SM8450

This add device tree binding and driver for interconnect providers found in SM8450 SoC.

Vinod Koul (2):
dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings
interconnect: qcom: Add SM8450 interconnect provider driver

 .../bindings/interconnect/qcom,rpmh.yaml      |   11 +
 drivers/interconnect/qcom/Kconfig             |    9 +
 drivers/interconnect/qcom/Makefile            |    2 +
 drivers/interconnect/qcom/sm8450.c            | 1988 +++++++++++++++++
 drivers/interconnect/qcom/sm8450.h            |  169 ++
 .../dt-bindings/interconnect/qcom,sm8450.h    |  171 ++
 6 files changed, 2350 insertions(+)
 create mode 100644 drivers/interconnect/qcom/sm8450.c
 create mode 100644 drivers/interconnect/qcom/sm8450.h
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8450.h
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/2 dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings

The Qualcomm SM8450 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand

---
 .../bindings/interconnect/qcom,rpmh.yaml      |  11 ++
 .../dt-bindings/interconnect/qcom,sm8450.h    | 171 ++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8450.h
Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml +11 -0
index 3fd1a134162d..cbb24f9bb609 100644
@@ -104,6 +104,17 @@ properties:
       - qcom,sm8350-mmss-noc
       - qcom,sm8350-compute-noc
       - qcom,sm8350-system-noc
+      - qcom,sm8450-aggre1-noc
+      - qcom,sm8450-aggre2-noc
+      - qcom,sm8450-clk-virt
+      - qcom,sm8450-config-noc
+      - qcom,sm8450-gem-noc
+      - qcom,sm8450-lpass-ag-noc
+      - qcom,sm8450-mc-virt
+      - qcom,sm8450-mmss-noc
+      - qcom,sm8450-nsp-noc
+      - qcom,sm8450-pcie-anoc
+      - qcom,sm8450-system-noc
 
   '#interconnect-cells':
     enum: [ 1, 2 ]
include/dt-bindings/interconnect/qcom,sm8450.h new file +171 -0

171 lines not on this page · raw message

Signature · 1 line
2.31.1
maintainer
#2 lore raw

Re: [PATCH 1/2] dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings

Hi Vinod,

Quoted 38 lines · Vinod Koul

The Qualcomm SM8450 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand

---
  .../bindings/interconnect/qcom,rpmh.yaml      |  11 ++
  .../dt-bindings/interconnect/qcom,sm8450.h    | 171 ++++++++++++++++++
  2 files changed, 182 insertions(+)

create mode 100644 include/dt-bindings/interconnect/qcom,sm8450.h

Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml +11 -0
index 3fd1a134162d..cbb24f9bb609 100644
@@ -104,6 +104,17 @@ properties:
        - qcom,sm8350-mmss-noc
        - qcom,sm8350-compute-noc
        - qcom,sm8350-system-noc
+      - qcom,sm8450-aggre1-noc
+      - qcom,sm8450-aggre2-noc
+      - qcom,sm8450-clk-virt
+      - qcom,sm8450-config-noc
+      - qcom,sm8450-gem-noc
+      - qcom,sm8450-lpass-ag-noc
+      - qcom,sm8450-mc-virt
+      - qcom,sm8450-mmss-noc
+      - qcom,sm8450-nsp-noc
+      - qcom,sm8450-pcie-anoc
+      - qcom,sm8450-system-noc
 
    '#interconnect-cells':
      enum: [ 1, 2 ]
include/dt-bindings/interconnect/qcom,sm8450.h new file +0 -0
new file mode 100644
index 000000000000..786fce091c84

include/dt-bindings/interconnect/qcom,sm8450.h line 10

Quoted 10 lines
include/dt-bindings/interconnect/qcom,sm8450.h new file +10 -0
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021, Linaro Limited
+ */
+
+#ifndef __DT_BINDINGS_INTERCONNECT_QCOM_SM8450_H
+#define __DT_BINDINGS_INTERCONNECT_QCOM_SM8450_H
+
+#define MASTER_QSPI_0				1

Why not start from 0?

Thanks,
Georgi

author
#3 lore raw

Re: [PATCH 1/2] dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings

Hi Georgi,

Thanks for quick review

Quoted 4 lines · Georgi Djakov

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+#define MASTER_QSPI_0				1

Why not start from 0?

I have not changed from downstream, was there a reason downstream defined from 1?

Signature · 1 line
~Vinod
maintainer
#4 lore raw

Re: [PATCH 1/2] dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings

In reply to Vinod Koul
Quoted 38 lines · Vinod Koul

The Qualcomm SM8450 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand

---
 .../bindings/interconnect/qcom,rpmh.yaml      |  11 ++
 .../dt-bindings/interconnect/qcom,sm8450.h    | 171 ++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8450.h
Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml +11 -0
index 3fd1a134162d..cbb24f9bb609 100644
@@ -104,6 +104,17 @@ properties:
       - qcom,sm8350-mmss-noc
       - qcom,sm8350-compute-noc
       - qcom,sm8350-system-noc
+      - qcom,sm8450-aggre1-noc
+      - qcom,sm8450-aggre2-noc
+      - qcom,sm8450-clk-virt
+      - qcom,sm8450-config-noc
+      - qcom,sm8450-gem-noc
+      - qcom,sm8450-lpass-ag-noc
+      - qcom,sm8450-mc-virt
+      - qcom,sm8450-mmss-noc
+      - qcom,sm8450-nsp-noc
+      - qcom,sm8450-pcie-anoc
+      - qcom,sm8450-system-noc
 
   '#interconnect-cells':
     enum: [ 1, 2 ]
include/dt-bindings/interconnect/qcom,sm8450.h new file +0 -0
new file mode 100644
index 000000000000..786fce091c84

include/dt-bindings/interconnect/qcom,sm8450.h line 1

Quoted 1 line
include/dt-bindings/interconnect/qcom,sm8450.h new file +1 -0
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: GPL-2.0-only */

Dual license.

Can Qualcomm/Linaro please get their licensing in order.

Rob

author
#5 lore raw

Re: [PATCH 1/2] dt-bindings: interconnect: Add Qualcomm SM8450 DT bindings

Quoted 43 lines · Rob Herring
Quoted 38 lines · Vinod Koul

The Qualcomm SM8450 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand

---
 .../bindings/interconnect/qcom,rpmh.yaml      |  11 ++
 .../dt-bindings/interconnect/qcom,sm8450.h    | 171 ++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 include/dt-bindings/interconnect/qcom,sm8450.h
Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml +11 -0
index 3fd1a134162d..cbb24f9bb609 100644
@@ -104,6 +104,17 @@ properties:
       - qcom,sm8350-mmss-noc
       - qcom,sm8350-compute-noc
       - qcom,sm8350-system-noc
+      - qcom,sm8450-aggre1-noc
+      - qcom,sm8450-aggre2-noc
+      - qcom,sm8450-clk-virt
+      - qcom,sm8450-config-noc
+      - qcom,sm8450-gem-noc
+      - qcom,sm8450-lpass-ag-noc
+      - qcom,sm8450-mc-virt
+      - qcom,sm8450-mmss-noc
+      - qcom,sm8450-nsp-noc
+      - qcom,sm8450-pcie-anoc
+      - qcom,sm8450-system-noc
 
   '#interconnect-cells':
     enum: [ 1, 2 ]
include/dt-bindings/interconnect/qcom,sm8450.h new file +0 -0
new file mode 100644
index 000000000000..786fce091c84

include/dt-bindings/interconnect/qcom,sm8450.h line 1

Quoted 1 line
include/dt-bindings/interconnect/qcom,sm8450.h new file +1 -0
@@ -0,0 +1,171 @@
+/* SPDX-License-Identifier: GPL-2.0-only */

Dual license.

Quoted 1 line

Can Qualcomm/Linaro please get their licensing in order.

Yes I will get that fixed, this one should be dual..

Signature · 1 line
~Vinod
author
#6 lore raw

PATCH 2/2 interconnect: qcom: Add SM8450 interconnect provider driver

In reply to Vinod Koul

Add driver for the Qualcomm interconnect buses found in SM8450 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.

This is based on the downstream driver by
Vivek Aknurwar <[email protected]>

---
 drivers/interconnect/qcom/Kconfig  |    9 +
 drivers/interconnect/qcom/Makefile |    2 +
 drivers/interconnect/qcom/sm8450.c | 1988 ++++++++++++++++++++++++++++
 drivers/interconnect/qcom/sm8450.h |  169 +++
 4 files changed, 2168 insertions(+)
 create mode 100644 drivers/interconnect/qcom/sm8450.c
 create mode 100644 drivers/interconnect/qcom/sm8450.h
drivers/interconnect/qcom/Kconfig +9 -0
index daf1e25f6042..e2207f9a1a47 100644
@@ -146,5 +146,14 @@ config INTERCONNECT_QCOM_SM8350
 	  This is a driver for the Qualcomm Network-on-Chip on SM8350-based
 	  platforms.
 
+config INTERCONNECT_QCOM_SM8450
+	tristate "Qualcomm SM8450 interconnect driver"
+	depends on INTERCONNECT_QCOM_RPMH_POSSIBLE
+	select INTERCONNECT_QCOM_RPMH
+	select INTERCONNECT_QCOM_BCM_VOTER
+	help
+	  This is a driver for the Qualcomm Network-on-Chip on SM8450-based
+	  platforms.
+
 config INTERCONNECT_QCOM_SMD_RPM
 	tristate
drivers/interconnect/qcom/Makefile +2 -0
index 69300b1d48ef..180046d532df 100644
@@ -16,6 +16,7 @@ qnoc-sdx55-objs				:= sdx55.o
 qnoc-sm8150-objs			:= sm8150.o
 qnoc-sm8250-objs			:= sm8250.o
 qnoc-sm8350-objs			:= sm8350.o
+qnoc-sm8450-objs			:= sm8450.o
 icc-smd-rpm-objs			:= smd-rpm.o icc-rpm.o
 
 obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
@@ -34,4 +35,5 @@ obj-$(CONFIG_INTERCONNECT_QCOM_SDX55) += qnoc-sdx55.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SM8150) += qnoc-sm8150.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SM8250) += qnoc-sm8250.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SM8350) += qnoc-sm8350.o
+obj-$(CONFIG_INTERCONNECT_QCOM_SM8450) += qnoc-sm8450.o
 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
drivers/interconnect/qcom/sm8450.c new file +1988 -0

1,988 lines not on this page · raw message

drivers/interconnect/qcom/sm8450.h new file +169 -0

169 lines not on this page · raw message

Signature · 1 line
2.31.1
maintainer
#7 lore raw

Re: [PATCH 2/2] interconnect: qcom: Add SM8450 interconnect provider driver

Hi Vinod,

Thanks for working on this!

Quoted 7 lines · Vinod Koul

Add driver for the Qualcomm interconnect buses found in SM8450 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.

This is based on the downstream driver by
Vivek Aknurwar <[email protected]>

Maybe CC him too.

Quoted 10 lines
---
  drivers/interconnect/qcom/Kconfig  |    9 +
  drivers/interconnect/qcom/Makefile |    2 +
  drivers/interconnect/qcom/sm8450.c | 1988 ++++++++++++++++++++++++++++
  drivers/interconnect/qcom/sm8450.h |  169 +++
  4 files changed, 2168 insertions(+)

create mode 100644 drivers/interconnect/qcom/sm8450.c create mode 100644 drivers/interconnect/qcom/sm8450.h

[..]

drivers/interconnect/qcom/sm8450.c line 1971

Quoted 7 lines
drivers/interconnect/qcom/sm8450.c new file +7 -0
+static struct platform_driver qnoc_driver = {
+	.probe = qnoc_probe,
+	.remove = qnoc_remove,
+	.driver = {
+		.name = "qnoc-sm8450",
+		.of_match_table = qnoc_of_match,
+		.sync_state = icc_sync_state,

We should set this callback only after we enable the client drivers to request bandwidth. Otherwise some path might get disabled because of no users. I would suggest to add sync_state after we describe the paths in DT.

Thanks,
Georgi

author
#8 lore raw

Re: [PATCH 2/2] interconnect: qcom: Add SM8450 interconnect provider driver

Quoted 10 lines · Georgi Djakov

Hi Vinod,

Thanks for working on this!

Quoted 5 lines · Vinod Koul

Add driver for the Qualcomm interconnect buses found in SM8450 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.

Quoted 4 lines
Quoted 2 lines

This is based on the downstream driver by
Vivek Aknurwar <[email protected]>

Maybe CC him too.

Will do

Quoted 11 lines
Quoted 10 lines
---
  drivers/interconnect/qcom/Kconfig  |    9 +
  drivers/interconnect/qcom/Makefile |    2 +
  drivers/interconnect/qcom/sm8450.c | 1988 ++++++++++++++++++++++++++++
  drivers/interconnect/qcom/sm8450.h |  169 +++
  4 files changed, 2168 insertions(+)

create mode 100644 drivers/interconnect/qcom/sm8450.c create mode 100644 drivers/interconnect/qcom/sm8450.h

[..]

Quoted 12 lines

drivers/interconnect/qcom/sm8450.c line 1971

Quoted 7 lines
drivers/interconnect/qcom/sm8450.c new file +7 -0
+static struct platform_driver qnoc_driver = {
+	.probe = qnoc_probe,
+	.remove = qnoc_remove,
+	.driver = {
+		.name = "qnoc-sm8450",
+		.of_match_table = qnoc_of_match,
+		.sync_state = icc_sync_state,

We should set this callback only after we enable the client drivers to request bandwidth. Otherwise some path might get disabled because of no users. I would suggest to add sync_state after we describe the paths in DT.

Okay thanks for the suggestion. yeah we have only few paths described. I will keep this as a separate patch and send few months down the line :)

Signature · 1 line
~Vinod