# SPDX-License-Identifier: BSD-2-Clause # Copyright 2018 Linaro Ltd. %YAML 1.2 --- $id: http://devicetree.org/schemas/iommu/iommu.yaml# $schema: http://devicetree.org/meta-schemas/base.yaml# title: IOMMU Consumer Common Properties maintainers: - Rob Herring # always select the core schema select: true properties: iommus: description: > A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device. One entry in the list describes one master interface of the device. When an "iommus" property is specified in a device tree node, the IOMMU will be used for address translation. If a "dma-ranges" property exists in the device's parent node it will be ignored. An exception to this rule is if the referenced IOMMU is disabled, in which case the "dma-ranges" property of the parent shall take effect. Note that merely disabling a device tree node does not guarantee that the IOMMU is really disabled since the hardware may not have a means to turn off translation. But it is invalid in such cases to disable the IOMMU's device tree node in the first place because it would prevent any driver from properly setting up the translations. $ref: /schemas/types.yaml#/definitions/phandle-array pasid-num-bits: description: Some masters support multiple address spaces for DMA, by tagging DMA transactions with an address space identifier. By default, this is 0, which means that the device only has one address space. default: 0 dma-can-stall: type: boolean description: > When present, the master can wait for a transaction to complete for an indefinite amount of time. Upon translation fault some IOMMUs, instead of aborting the translation immediately, may first notify the driver and keep the transaction in flight. This allows the OS to inspect the fault and, for example, make physical pages resident before updating the mappings and completing the transaction. Such IOMMU accepts a limited number of simultaneous stalled transactions before having to either put back-pressure on the master, or abort new faulting transactions. Firmware has to opt-in stalling, because most buses and masters don't support it. In particular it isn't compatible with PCI, where transactions have to complete before a time limit. More generally it won't work in systems and masters that haven't been designed for stalling. For example the OS, in order to handle a stalled transaction, may attempt to retrieve pages from secondary storage in a stalled domain, leading to a deadlock. additionalProperties: true