# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/net/qrtr-gunyah.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: QRTR Gunyah Transport Configuration

maintainers:
  - Chris Lew
  - Lei Han <quic_leihan@quicinc.com>

description: |
  Configuration properties for the qrtr Gunyah Transport. This configuration is
  to instantiate a transport for IPC Router protocol communication between
  virtual machines on top of the Gunyah hypervisor.

properties:
  compatible:
    const: qcom,qrtr-gunyah

  qcom,master:
    type: boolean
    description: Specify if this device is on the primary virtual machine.

  gunyah-label:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    maxItems: 1
    description: The label qrtr should request interrupts with from the gunyah
                 doorbell driver.

  shared-buffer:
    $ref: '/schemas/types.yaml#/definitions/phandle'
    maxItems: 1
    description: phandle reference to a reserved memory region for sharing
                 between vms.

required:
  - compatible
  - gunyah-label
  - shared-buffer

additionalProperties: false

examples:
  - |
    qrtr_shbuf: qrtr-shmem {
        no-map;
        reg = <0x0 0xd7ef7000 0x0 0x9000>;
    };

    qrtr-gunyah {
        compatible = "qcom,qrtr-gunyah";
        qcom,master;
        gunyah-label = <0>;
        shared-buffer = <&qrtr_shbuf>;
    };
