Viresh Kumar ad93f7b371 dt-bindings: virtio: Add binding for virtio devices
Allow virtio device sub-nodes to be added to the virtio mmio or pci
nodes. The compatible property for virtio device must be of the format
"virtio,device<ID>", where ID is virtio device ID in hexadecimal format.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/d8319fd18df7086b12cdcc23193c313893aa071a.1627362340.git.viresh.kumar@linaro.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Rob Herring <robh@kernel.org>
2021-09-05 16:23:08 -04:00

62 lines
1.1 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/virtio/mmio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: virtio memory mapped devices
maintainers:
- Jean-Philippe Brucker <jean-philippe@linaro.org>
description:
See https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio for
more details.
properties:
compatible:
const: virtio,mmio
reg:
maxItems: 1
interrupts:
maxItems: 1
'#iommu-cells':
description: Required when the node corresponds to a virtio-iommu device.
const: 1
iommus:
description: Required for devices making accesses thru an IOMMU.
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties:
type: object
examples:
- |
virtio@3000 {
compatible = "virtio,mmio";
reg = <0x3000 0x100>;
interrupts = <41>;
/* Device has endpoint ID 23 */
iommus = <&viommu 23>;
};
viommu: iommu@3100 {
compatible = "virtio,mmio";
reg = <0x3100 0x100>;
interrupts = <42>;
#iommu-cells = <1>;
};
...