# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/qcom,coresight-itnoc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Interconnect Trace Network On Chip - ITNOC

maintainers:
  - Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>

description:
  The Interconnect TNOC is a CoreSight graph link that forwards trace data
  from a subsystem to the Aggregator TNOC. Compared to Aggregator TNOC, it
  does not have aggregation and ATID functionality.

properties:
  $nodename:
    pattern: "^itnoc(@[0-9a-f]+)?$"

  compatible:
    const: qcom,coresight-itnoc

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: apb

  in-ports:
    $ref: /schemas/graph.yaml#/properties/ports

    patternProperties:
      '^port(@[0-9a-f]{1,2})?$':
        description: Input connections from CoreSight Trace Bus
        $ref: /schemas/graph.yaml#/properties/port

  out-ports:
    $ref: /schemas/graph.yaml#/properties/ports
    additionalProperties: false

    properties:
      port:
        description: out connections to aggregator TNOC
        $ref: /schemas/graph.yaml#/properties/port

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - in-ports
  - out-ports

additionalProperties: false

examples:
  - |
    itnoc@109ac000 {
        compatible = "qcom,coresight-itnoc";
        reg = <0x109ac000 0x1000>;

        clocks = <&aoss_qmp>;
        clock-names = "apb";

        in-ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                tn_ic_in_tpdm_dcc: endpoint {
                    remote-endpoint = <&tpdm_dcc_out_tn_ic>;
                };
            };
        };

        out-ports {
            port {
                tn_ic_out_tnoc_aggr: endpoint {
                    /* to Aggregator TNOC input */
                    remote-endpoint = <&tn_ag_in_tn_ic>;
                };
            };
        };
    };
...
