mbox series

[v2,0/7] Update RPM ICC bindings

Message ID 20230721-topic-icc_bindings-v2-0-e33d5acbf3bd@linaro.org
Headers show
Series Update RPM ICC bindings | expand

Message

Konrad Dybcio July 24, 2023, 2:06 p.m. UTC
The recent necessary overhaul [1] of how we represent SMD ICC and RPM
bus clocks changed the way they're connected. The bindings however were
not updated to reflect that. This series tries to address that, while
also making the relevant bindings less convoluted.

Now, instead of referencing RPM SMD bus clocks via clocks=<>, they're
handled internally within the interconnect framework (via direct RPM
calls from there). We still need to allow some "interface" clocks,
which are necessary to access some registers and not managed for us.

[1] https://lore.kernel.org/linux-arm-msm/20230526-topic-smd_icc-v7-0-09c78c175546@linaro.org/

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Keep reg: local to the individual bindings
- Use the rpm-common yaml for child nodes
- Keep msm8916 and qcs404 in the common file
- Keep only meaningful examples
- Fix up some indentation
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230721-topic-icc_bindings-v1-0-93e2bc728fb7@linaro.org

---
Konrad Dybcio (7):
      dt-bindings: interconnect: qcom: Introduce qcom,rpm-common
      dt-bindings: interconnect: qcom: qcm2290: Remove RPM bus clocks
      dt-bindings: interconnect: qcom: Fix and separate out SDM660
      dt-bindings: interconnect: qcom: Fix and separate out MSM8996
      dt-bindings: interconnect: qcom: Fix and separate out MSM8939
      dt-bindings: interconnect: qcom: rpm: Clean up the file
      dt-bindings: interconnect: qcom: rpm: Clean up the example

 .../bindings/interconnect/qcom,msm8939.yaml        |  74 ++++++
 .../bindings/interconnect/qcom,msm8996.yaml        | 126 +++++++++++
 .../bindings/interconnect/qcom,qcm2290.yaml        |  60 +----
 .../bindings/interconnect/qcom,rpm-common.yaml     |  28 +++
 .../devicetree/bindings/interconnect/qcom,rpm.yaml | 250 +--------------------
 .../bindings/interconnect/qcom,sdm660.yaml         | 108 +++++++++
 6 files changed, 352 insertions(+), 294 deletions(-)
---
base-commit: ae867bc97b713121b2a7f5fcac68378a0774739b
change-id: 20230721-topic-icc_bindings-72917016f595

Best regards,

Comments

Rob Herring (Arm) Aug. 11, 2023, 4:48 p.m. UTC | #1
On Mon, Jul 24, 2023 at 04:06:27PM +0200, Konrad Dybcio wrote:
> The current RPM interconnect bindings are messy. Start cleaning them
> up with a common include.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/interconnect/qcom,qcm2290.yaml        | 18 +++++++-------
>  .../bindings/interconnect/qcom,rpm-common.yaml     | 28 ++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> index f65a2fe846de..df89f390a9b0 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcm2290.yaml
> @@ -13,6 +13,9 @@ description: |
>    The Qualcomm QCM2290 interconnect providers support adjusting the
>    bandwidth requirements between the various NoC fabrics.
>  
> +allOf:
> +  - $ref: qcom,rpm-common.yaml#
> +
>  properties:
>    reg:
>      maxItems: 1
> @@ -23,9 +26,6 @@ properties:
>        - qcom,qcm2290-cnoc
>        - qcom,qcm2290-snoc
>  
> -  '#interconnect-cells':
> -    const: 1
> -
>    clock-names:
>      items:
>        - const: bus
> @@ -44,6 +44,9 @@ patternProperties:
>        The interconnect providers do not have a separate QoS register space,
>        but share parent's space.
>  
> +    allOf:
> +      - $ref: qcom,rpm-common.yaml#
> +
>      properties:
>        compatible:
>          enum:
> @@ -51,9 +54,6 @@ patternProperties:
>            - qcom,qcm2290-mmrt-virt
>            - qcom,qcm2290-mmnrt-virt
>  
> -      '#interconnect-cells':
> -        const: 1
> -
>        clock-names:
>          items:
>            - const: bus
> @@ -66,20 +66,18 @@ patternProperties:
>  
>      required:
>        - compatible
> -      - '#interconnect-cells'
>        - clock-names
>        - clocks
>  
> -    additionalProperties: false
> +    unevaluatedProperties: false
>  
>  required:
>    - compatible
>    - reg
> -  - '#interconnect-cells'
>    - clock-names
>    - clocks
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
> new file mode 100644
> index 000000000000..1ea52b091609
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm-common.yaml
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interconnect/qcom,rpm-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm RPMh Network-On-Chip Interconnect
> +
> +maintainers:
> +  - Konrad Dybcio <konradybcio@kernel.org>
> +
> +description:
> +  RPM interconnect providers support for managing system bandwidth requirements
> +  through manual requests based on either predefined values or as indicated by
> +  the bus monitor hardware. Each provider node represents a NoC bus master,
> +  driven by a dedicated clock source.
> +
> +properties:
> +  '#interconnect-cells':
> +    oneOf:
> +      - const: 2
> +      - const: 1
> +        deprecated: true

I think this is kind of questionable for a single property. Do you 
plan to add more properties here? Also, if you add a new user of this 
schema, then it's going to allow the deprecated case when it could just 
start with 2 only.

Rob