interconnect: qcom: Add support for SM8550
Subsystems (3)
v3 cover interconnect: qcom: Add support for SM8550
This patchset adds interconnect support for SM8550.
The v2 of this patchset is here:
https://lore.kernel.org/all/[email protected]/
To: Andy Gross <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Georgi Djakov <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Abel Vesa <[email protected]>
To: Neil Armstrong <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Abel Vesa (2):
dt-bindings: interconnect: Add Qualcomm SM8550
interconnect: qcom: Add SM8550 interconnect provider driver
.../interconnect/qcom,sm8550-rpmh.yaml | 139 + drivers/interconnect/qcom/Kconfig | 9 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/sm8550.c | 2319 +++++++++++++++++ drivers/interconnect/qcom/sm8550.h | 178 ++ .../interconnect/qcom,sm8550-rpmh.h | 190 ++ 6 files changed, 2837 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml create mode 100644 drivers/interconnect/qcom/sm8550.c create mode 100644 drivers/interconnect/qcom/sm8550.h create mode 100644 include/dt-bindings/interconnect/qcom,sm8550-rpmh.h
Signature · 1 line
2.34.1
PATCH v3 1/2 dt-bindings: interconnect: Add Qualcomm SM8550
The Qualcomm SM8550 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.
---
Changes since v2:
* Added Neil and I as maintainers in the binding doc, as Krzysztof suggested
* Added top-level reg property witg maxItem 1
* Fixed the if clause for reg property, like Krzysztof suggested
* Added top-level clocks, along with dedicated if clause for clocks property for required/false, like Krzysztof suggested
* Kept only clk_virt and aggre1 examples and dropped the rest
* Renamed both header and bindings like the compatible
* Squashed the bindings schema patch in the one with the header
.../interconnect/qcom,sm8550-rpmh.yaml | 139 +++++++++++++ .../interconnect/qcom,sm8550-rpmh.h | 190 ++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml create mode 100644 include/dt-bindings/interconnect/qcom,sm8550-rpmh.h
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml new file +139 -0
@@ -0,0 +1,139 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interconnect/qcom,sm8550-rpmh.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm RPMh Network-On-Chip Interconnect on SM8550 + +maintainers: + - Abel Vesa <[email protected]> + - Neil Armstrong <[email protected]> + +description: | + RPMh 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: + compatible: + enum: + - qcom,sm8550-aggre1-noc + - qcom,sm8550-aggre2-noc + - qcom,sm8550-clk-virt + - qcom,sm8550-cnoc-main + - qcom,sm8550-config-noc + - qcom,sm8550-gem-noc + - qcom,sm8550-lpass-ag-noc + - qcom,sm8550-lpass-lpiaon-noc + - qcom,sm8550-lpass-lpicx-noc + - qcom,sm8550-mc-virt + - qcom,sm8550-mmss-noc + - qcom,sm8550-nsp-noc + - qcom,sm8550-pcie-anoc + - qcom,sm8550-system-noc + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + +allOf: + - $ref: qcom,rpmh-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-clk-virt + - qcom,sm8550-mc-virt + then: + properties: + reg: false + else: + required: + - reg + + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-pcie-anoc + then: + properties: + clocks: + items: + - description: aggre-NOC PCIe AXI clock + - description: cfg-NOC PCIe a-NOC AHB clock + + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-aggre1-noc + then: + properties: + clocks: + items: + - description: aggre UFS PHY AXI clock + - description: aggre USB3 PRIM AXI clock + + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-aggre2-noc + then: + properties: + clocks: + items: + - description: RPMH CC IPA clock + + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-aggre1-noc + - qcom,sm8550-aggre2-noc + - qcom,sm8550-pcie-anoc + then: + required: + - clocks + else: + properties: + clocks: false + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,sm8550-gcc.h> + #include <dt-bindings/interconnect/qcom,sm8550-rpmh.h> + #include <dt-bindings/clock/qcom,rpmh.h> + + clk_virt: interconnect-0 { + compatible = "qcom,sm8550-clk-virt"; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>; + }; + + aggre1_noc: interconnect@16e0000 { + compatible = "qcom,sm8550-aggre1-noc"; + reg = <0x016e0000 0x14400>; + #interconnect-cells = <2>; + clocks = <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, + <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>; + qcom,bcm-voters = <&apps_bcm_voter>; + };
include/dt-bindings/interconnect/qcom,sm8550-rpmh.h new file +190 -0
190 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] dt-bindings: interconnect: Add Qualcomm SM8550
Quoted 21 lines · Abel Vesa
The Qualcomm SM8550 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.
Signed-off-by Abel Vesa <[email protected]>---
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml new file +15
-0+ - if: + properties: + compatible: + contains: + enum: + - qcom,sm8550-aggre1-noc + - qcom,sm8550-aggre2-noc + - qcom,sm8550-pcie-anoc + then: + required: + - clocks + else: + properties: + clocks: false +
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml line 124
Quoted 10 lines
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml new file +10
-0+required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,sm8550-gcc.h> + #include <dt-bindings/interconnect/qcom,sm8550-rpmh.h> + #include <dt-bindings/clock/qcom,rpmh.h>
Keep headers sorted.... but actually these two look like not used. If you want to mention the header for interconnect IDs, you can add it in top level descritpion.
Quoted 5 lines
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml new file +5
-0+ + clk_virt: interconnect-0 { + compatible = "qcom,sm8550-clk-virt"; + #interconnect-cells = <2>; + qcom,bcm-voters = <&apps_bcm_voter>;
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml line 139
Quoted 10 lines
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml new file +10
-0+ }; + + aggre1_noc: interconnect@16e0000 { + compatible = "qcom,sm8550-aggre1-noc"; + reg = <0x016e0000 0x14400>; + #interconnect-cells = <2>; + clocks = <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, + <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>; + qcom,bcm-voters = <&apps_bcm_voter>; + };
Your DTS example is oddly indented. I missed it during previous review. DTS examples go either with 2 or 4 spaces.
Best regards,
Krzysztof
Rob Herring
maintainerRe: [PATCH v3 1/2] dt-bindings: interconnect: Add Qualcomm SM8550
In reply to Abel VesaQuoted 17 lines · Abel Vesa
The Qualcomm SM8550 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand.
Signed-off-by Abel Vesa <[email protected]>---
Changes since v2:
* Added Neil and I as maintainers in the binding doc, as Krzysztof suggested
* Added top-level reg property witg maxItem 1
* Fixed the if clause for reg property, like Krzysztof suggested
* Added top-level clocks, along with dedicated if clause for clocks property for required/false, like Krzysztof suggested
* Kept onlyclk_virtand aggre1 examples and dropped the rest
* Renamed both header and bindings like the compatible
* Squashed the bindings schema patch in the one with the header
Quoted 6 lines
.../interconnect/qcom,sm8550-rpmh.yaml | 139 +++++++++++++ .../interconnect/qcom,sm8550-rpmh.h | 190 ++++++++++++++++++ 2 files changed, 329 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml create mode 100644 include/dt-bindings/interconnect/qcom,sm8550-rpmh.h
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.example.dts:18:18: fatal error: dt-bindings/clock/qcom,sm8550-gcc.h: No such file or directory
18 | #include <dt-bindings/clock/qcom,sm8550-gcc.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1492: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command.
PATCH v3 2/2 interconnect: qcom: Add SM8550 interconnect provider driver
In reply to Abel VesaAdd driver for the Qualcomm interconnect buses found in SM8550 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.
--- drivers/interconnect/qcom/Kconfig | 9 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/sm8550.c | 2319 ++++++++++++++++++++++++++++ drivers/interconnect/qcom/sm8550.h | 178 +++ 4 files changed, 2508 insertions(+) create mode 100644 drivers/interconnect/qcom/sm8550.c create mode 100644 drivers/interconnect/qcom/sm8550.h
drivers/interconnect/qcom/Kconfig +9 -0
@@ -200,5 +200,14 @@ config INTERCONNECT_QCOM_SM8450 This is a driver for the Qualcomm Network-on-Chip on SM8450-based platforms. +config INTERCONNECT_QCOM_SM8550 + tristate "Qualcomm SM8550 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 SM8550-based + platforms. + config INTERCONNECT_QCOM_SMD_RPM tristate
drivers/interconnect/qcom/Makefile +2 -0
@@ -25,6 +25,7 @@ qnoc-sm8150-objs := sm8150.o qnoc-sm8250-objs := sm8250.o qnoc-sm8350-objs := sm8350.o qnoc-sm8450-objs := sm8450.o +qnoc-sm8550-objs := sm8550.o icc-smd-rpm-objs := smd-rpm.o icc-rpm.o obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
@@ -49,4 +50,5 @@ 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_SM8550) += qnoc-sm8550.o obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
drivers/interconnect/qcom/sm8550.c new file +2319 -0
2,319 lines not on this page · raw message
drivers/interconnect/qcom/sm8550.h new file +178 -0
178 lines not on this page · raw message
Signature · 1 line
2.34.1