Skip to contentSkip to conversation

Add QCOM SDM845 interconnect provider driver

RFC PATCH New David Dai 1 participant 3 messages Jun 29, 2018

Subsystems (4)
lore
Share & tools
lore

David Dai

author
#0 lore raw

cover Add QCOM SDM845 interconnect provider driver

Hi,

This patch series adds a driver and DT binding using the interconnect (ICC) framework [1] to describe the Qualcomm SDM845 platform's topology of its interconnected buses and internal aggregation nodes known as
Bus Clock Managers(BCM). The SDM845 ICC provider driver would aggregate and satisfy consumer requests accross the SoC by generating commands that communicate with the BCM through the Resource Power Manager (RPMh) driver [2] interface. The SDM845 ICC driver also configures QoS settings specific to each node to ensure clients have proper priority.

The SDM845 interconnect provider has dependencies on the RPMh driver and Command DB driver [3] which are under review.

Changes since v0 [4]:
- Addressed review feedback from Georgi D. and Evan G.
- Removed proposal to modify ICC aggregate callback interface
- Moved BCM aggregation into provider set function
- Added devicetree binding documentation
- Fixed logic in generating TCS command list
- Added keepalive flags for resources that are critical to platform operation
- Added various comments to clarify intent
- Removed unused types and struct definitions

[1]: https://lkml.org/lkml/2018/6/20/453
[2]: https://lkml.org/lkml/2018/5/9/729
[3]: https://lkml.org/lkml/2018/3/14/787
[4]: https://patchwork.kernel.org/patch/10428167/

Summary of the patches:
Patch 1 creates the Qualcomm SDM845 Specific provider driver. Patch 2 Adds dt binding for SDM845 provider

TODO:
* Expand aggregation/provider to handle clients with active only requirements.
* Add Network-on-Chip (NoC) objects to encapsulate logical nodes for QoS.
* Add QoS configuration specific to each NoC.

David Dai (2):
interconnect: qcom: Add sdm845 interconnect provider driver
arm64: dts: sdm845: Add interconnect provider DT nodes

 .../bindings/interconnect/qcom-sdm845.txt          |  22 +
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |   5 +
 drivers/interconnect/qcom/Kconfig                  |   8 +
 drivers/interconnect/qcom/Makefile                 |   1 +
 drivers/interconnect/qcom/qcom-icc-ids.h           | 142 ++++
 drivers/interconnect/qcom/sdm845.c                 | 826 +++++++++++++++++++++
 6 files changed, 1004 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom-sdm845.txt
 create mode 100644 drivers/interconnect/qcom/qcom-icc-ids.h
 create mode 100644 drivers/interconnect/qcom/sdm845.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
author
#1 lore raw

RFC PATCH 1/2 interconnect: qcom: Add sdm845 interconnect provider driver

Introduce Qualcomm SDM845 specific provider driver using the interconnect framework.

Change-Id I716b39068b4a211b8203b2a52d3037a5b84594ea
---
 .../bindings/interconnect/qcom-sdm845.txt          |  22 +
 drivers/interconnect/qcom/Kconfig                  |   8 +
 drivers/interconnect/qcom/Makefile                 |   1 +
 drivers/interconnect/qcom/qcom-icc-ids.h           | 142 ++++
 drivers/interconnect/qcom/sdm845.c                 | 826 +++++++++++++++++++++
 5 files changed, 999 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interconnect/qcom-sdm845.txt
 create mode 100644 drivers/interconnect/qcom/qcom-icc-ids.h
 create mode 100644 drivers/interconnect/qcom/sdm845.c
Documentation/devicetree/bindings/interconnect/qcom-sdm845.txt new file +22 -0
new file mode 100644
index 0000000..6248523
@@ -0,0 +1,22 @@
+Qualcomm SDM845 Network-On-Chip interconnect driver binding
+----------------------------------------------------
+
+SDM845 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 reside within
+an RPMh device node pertaining to their RSC and each provider maps to
+a single RPMh resource.
+
+Required properties :
+- compatible : shall contain only one of the following:
+			"qcom,sdm845-rsc-hlos"
+
+Examples:
+
+apps_rsc: rsc {
+		qnoc: qnoc-rsc-hlos {
+			compatible = "qcom,sdm845-rsc-hlos";
+		};
+};
+
drivers/interconnect/qcom/Kconfig +8 -0
index c858218..2cd3603 100644
@@ -17,3 +17,11 @@ config INTERCONNECT_QCOM_MSM8916
 	help
 	  This is a driver for the Qualcomm Network-on-Chip on msm8916-based
 	  platforms.
+
+config INTERCONNECT_QCOM_SDM845
+	tristate "Qualcomm SDM845 interconnect driver"
+	depends on INTERCONNECT_QCOM
+	depends on (QCOM_RPMH && QCOM_COMMAND_DB && OF) || COMPILE_TEST
+	help
+	  This is a driver for the Qualcomm Network-on-Chip on sdm845-based
+	  platforms.
drivers/interconnect/qcom/Makefile +1 -0
index 53f3380..a0a5056 100644
@@ -2,3 +2,4 @@
 obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += smd-rpm.o
 
 obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += msm8916.o
+obj-$(CONFIG_INTERCONNECT_QCOM_SDM845) += sdm845.o
drivers/interconnect/qcom/qcom-icc-ids.h new file +142 -0

142 lines not on this page · raw message

drivers/interconnect/qcom/sdm845.c new file +826 -0

826 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
author
#2 lore raw

RFC PATCH 2/2 arm64: dts: sdm845: Add interconnect provider DT nodes

In reply to David Dai

Add RSC(Resource State Coordinator) provider dictating network-on-chip interconnect bus performance found on SDM845-based platforms.

Change-Id I58f0bfc3ed484d7b45064dceb94dcfda507e9333
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +5 -0
index 228d502..c2a5309 100644
@@ -1091,6 +1091,11 @@
 
 				pmi8998_bob: bob {};
 			};
+
+			qnoc: qnoc-rsc-hlos{
+				compatible = "qcom,sdm845-rsc-hlos";
+				status = "okay";
+			};
 		};
 
 		intc: interrupt-controller@17a00000 {
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project