This series adds interconnect support for the various NoCs found on
sm6350.
A more special modification is allowing child NoC devices, like done for
rpm-based qcm2290 which was already merged, but now for rpmh-based
interconnect.
See also downstream dts:
https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.81/qcom/lagoon-bus.dtsi
Luca Weiss (5):
interconnect: qcom: icc-rpmh: Support child NoC device probe
dt-bindings: interconnect: qcom: Split out rpmh-common bindings
dt-bindings: interconnect: Add Qualcomm SM6350 NoC support
interconnect: qcom: Add SM6350 driver support
arm64: dts: qcom: sm6350: Add interconnect support
.../interconnect/qcom,rpmh-common.yaml | 43 ++
.../bindings/interconnect/qcom,rpmh.yaml | 22 +-
.../interconnect/qcom,sm6350-rpmh.yaml | 82 +++
arch/arm64/boot/dts/qcom/sm6350.dtsi | 109 ++++
drivers/interconnect/qcom/Kconfig | 9 +
drivers/interconnect/qcom/Makefile | 2 +
drivers/interconnect/qcom/icc-rpmh.c | 4 +
drivers/interconnect/qcom/sm6350.c | 493 ++++++++++++++++++
drivers/interconnect/qcom/sm6350.h | 139 +++++
.../dt-bindings/interconnect/qcom,sm6350.h | 148 ++++++
10 files changed, 1034 insertions(+), 17 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm6350-rpmh.yaml
create mode 100644 drivers/interconnect/qcom/sm6350.c
create mode 100644 drivers/interconnect/qcom/sm6350.h
create mode 100644 include/dt-bindings/interconnect/qcom,sm6350.h
--
2.36.1
In preparation for the platforms, split out common definitions used in
rpmh-based interconnects.
Signed-off-by: Luca Weiss <[email protected]>
---
Changes since v2:
* Reorganize patches so order is more logical
* Replace bouncing maintainer email with Bjorn
* maxItems: 2 for qcom,bcm-voters and qcom,bcm-voter-names
* Remove | from some descriptions
.../interconnect/qcom,rpmh-common.yaml | 43 +++++++++++++++++++
.../bindings/interconnect/qcom,rpmh.yaml | 22 +++-------
2 files changed, 48 insertions(+), 17 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
new file mode 100644
index 000000000000..e962e8dc9a61
--- /dev/null
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interconnect/qcom,rpmh-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPMh Network-On-Chip Interconnect
+
+maintainers:
+ - Georgi Djakov <[email protected]>
+ - Bjorn Andersson <[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:
+ '#interconnect-cells':
+ enum: [ 1, 2 ]
+
+ qcom,bcm-voters:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ maxItems: 1
+ maxItems: 2
+ description:
+ List of phandles to qcom,bcm-voter nodes that are required by
+ this interconnect to send RPMh commands.
+
+ qcom,bcm-voter-names:
+ description:
+ Names for each of the qcom,bcm-voters specified.
+ maxItems: 2
+
+required:
+ - '#interconnect-cells'
+ - qcom,bcm-voters
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
index fae3363fed02..e822dc099339 100644
--- a/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
+++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml
@@ -18,6 +18,9 @@ description: |
least one RPMh device child node pertaining to their RSC and each provider
can map to multiple RPMh resources.
+allOf:
+ - $ref: qcom,rpmh-common.yaml#
+
properties:
reg:
maxItems: 1
@@ -131,28 +134,13 @@ properties:
- qcom,sm8450-pcie-anoc
- qcom,sm8450-system-noc
- '#interconnect-cells':
- enum: [ 1, 2 ]
-
- qcom,bcm-voters:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- items:
- maxItems: 1
- description: |
- List of phandles to qcom,bcm-voter nodes that are required by
- this interconnect to send RPMh commands.
-
- qcom,bcm-voter-names:
- description: |
- Names for each of the qcom,bcm-voters specified.
+ '#interconnect-cells': true
required:
- compatible
- reg
- - '#interconnect-cells'
- - qcom,bcm-voters
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.36.1
As per e39bf2972c6e ("interconnect: icc-rpm: Support child NoC device
probe") also update the rpmh interconnect driver to support probing NoCs
that are modelled as child devices of a different NoC.
As the driver doesn't yet use the 'reg' property, no change is done for
that.
Downstream DT reference:
https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.56/qcom/lagoon-bus.dtsi
Signed-off-by: Luca Weiss <[email protected]>
---
Changes since v2:
* none
drivers/interconnect/qcom/icc-rpmh.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c
index 3c40076eb5fb..8acc8e67a332 100644
--- a/drivers/interconnect/qcom/icc-rpmh.c
+++ b/drivers/interconnect/qcom/icc-rpmh.c
@@ -258,6 +258,10 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
data->num_nodes = num_nodes;
platform_set_drvdata(pdev, qp);
+ /* Populate child NoC devices if any */
+ if (of_get_child_count(dev->of_node) > 0)
+ return of_platform_populate(dev->of_node, NULL, NULL, dev);
+
return 0;
err:
icc_nodes_remove(provider);
--
2.36.1
On 25/05/2022 16:43, Luca Weiss wrote:
> In preparation for the platforms, split out common definitions used in
> rpmh-based interconnects.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Changes since v2:
> * Reorganize patches so order is more logical
> * Replace bouncing maintainer email with Bjorn
> * maxItems: 2 for qcom,bcm-voters and qcom,bcm-voter-names
> * Remove | from some descriptions
>
> .../interconnect/qcom,rpmh-common.yaml | 43 +++++++++++++++++++
> .../bindings/interconnect/qcom,rpmh.yaml | 22 +++-------
> 2 files changed, 48 insertions(+), 17 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
>
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
> new file mode 100644
> index 000000000000..e962e8dc9a61
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interconnect/qcom,rpmh-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm RPMh Network-On-Chip Interconnect
> +
> +maintainers:
> + - Georgi Djakov <[email protected]>
> + - Bjorn Andersson <[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:
> + '#interconnect-cells':
> + enum: [ 1, 2 ]
> +
> + qcom,bcm-voters:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + items:
> + maxItems: 1
> + maxItems: 2
> + description:
> + List of phandles to qcom,bcm-voter nodes that are required by
> + this interconnect to send RPMh commands.
> +
> + qcom,bcm-voter-names:
> + description:
> + Names for each of the qcom,bcm-voters specified.
> + maxItems: 2
Property above has maxItems before description, so let's make it
consistent (also above).
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
Hi all,
On Wed May 25, 2022 at 4:43 PM CEST, Luca Weiss wrote:
> This series adds interconnect support for the various NoCs found on
> sm6350.
>
> A more special modification is allowing child NoC devices, like done for
> rpm-based qcm2290 which was already merged, but now for rpmh-based
> interconnect.
any feedback on the two interconnect patches and the dts patch?
Georgi? Bjorn?
Thanks Krzysztof for the dt-binding review!
Regards
Luca
>
> See also downstream dts:
> https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.81/qcom/lagoon-bus.dtsi
>
> Luca Weiss (5):
> interconnect: qcom: icc-rpmh: Support child NoC device probe
> dt-bindings: interconnect: qcom: Split out rpmh-common bindings
> dt-bindings: interconnect: Add Qualcomm SM6350 NoC support
> interconnect: qcom: Add SM6350 driver support
> arm64: dts: qcom: sm6350: Add interconnect support
>
> .../interconnect/qcom,rpmh-common.yaml | 43 ++
> .../bindings/interconnect/qcom,rpmh.yaml | 22 +-
> .../interconnect/qcom,sm6350-rpmh.yaml | 82 +++
> arch/arm64/boot/dts/qcom/sm6350.dtsi | 109 ++++
> drivers/interconnect/qcom/Kconfig | 9 +
> drivers/interconnect/qcom/Makefile | 2 +
> drivers/interconnect/qcom/icc-rpmh.c | 4 +
> drivers/interconnect/qcom/sm6350.c | 493 ++++++++++++++++++
> drivers/interconnect/qcom/sm6350.h | 139 +++++
> .../dt-bindings/interconnect/qcom,sm6350.h | 148 ++++++
> 10 files changed, 1034 insertions(+), 17 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,rpmh-common.yaml
> create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sm6350-rpmh.yaml
> create mode 100644 drivers/interconnect/qcom/sm6350.c
> create mode 100644 drivers/interconnect/qcom/sm6350.h
> create mode 100644 include/dt-bindings/interconnect/qcom,sm6350.h
>
> --
> 2.36.1
On 15.07.22 16:34, Luca Weiss wrote:
> Hi all,
>
> On Wed May 25, 2022 at 4:43 PM CEST, Luca Weiss wrote:
>> This series adds interconnect support for the various NoCs found on
>> sm6350.
>>
>> A more special modification is allowing child NoC devices, like done for
>> rpm-based qcm2290 which was already merged, but now for rpmh-based
>> interconnect.
>
> any feedback on the two interconnect patches and the dts patch?
> Georgi? Bjorn?
I merged the interconnect patches.
Thanks,
Georgi
On Wed, 25 May 2022 16:43:56 +0200, Luca Weiss wrote:
> This series adds interconnect support for the various NoCs found on
> sm6350.
>
> A more special modification is allowing child NoC devices, like done for
> rpm-based qcm2290 which was already merged, but now for rpmh-based
> interconnect.
>
> [...]
Applied, thanks!
[5/5] arm64: dts: qcom: sm6350: Add interconnect support
commit: 38c5c4fe17014130dee4f85e663c5d919655801e
Best regards,
--
Bjorn Andersson <[email protected]>