# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interconnect/qcom,msm8953.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm MSM8953 Network-On-Chip interconnect

maintainers:
  - Barnabas Czeman <barnabas.czeman@mainlining.org>

description: |
  The Qualcomm MSM8953 interconnect providers support adjusting the
  bandwidth requirements between the various NoC fabrics.

  See also: include/dt-bindings/interconnect/qcom,msm8953.h

properties:
  compatible:
    enum:
      - qcom,msm8953-bimc
      - qcom,msm8953-pcnoc
      - qcom,msm8953-snoc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    maxItems: 1

  '#interconnect-cells':
    const: 2

patternProperties:
  '^interconnect-[a-z0-9\-]+$':
    type: object
    $ref: qcom,rpm-common.yaml#
    unevaluatedProperties: false
    description:
      The interconnect providers do not have a separate QoS register space,
      but share parent's space.

    properties:
      compatible:
        const: qcom,msm8953-snoc-mm

    required:
      - compatible
      - '#interconnect-cells'

required:
  - compatible
  - reg
  - '#interconnect-cells'

allOf:
  - $ref: qcom,rpm-common.yaml#
  - if:
      properties:
        compatible:
          const: qcom,msm8953-pcnoc

    then:
      properties:
        clocks:
          items:
            - description: PCNOC USB3 AXI Clock.

        clock-names:
          const: pcnoc_usb3_axi

      required:
        - clocks
        - clock-names
    else:
      properties:
        clocks: false
        clock-names: false

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/qcom,gcc-msm8953.h>

    interconnect@580000 {
        compatible = "qcom,msm8953-snoc";
        reg = <0x580000 0x16080>;

        #interconnect-cells = <2>;

        interconnect-snoc {
            compatible = "qcom,msm8953-snoc-mm";

            #interconnect-cells = <2>;
        };
    };
