PCI Endpoint Controller

Schema identifier ($id): "http://devicetree.org/schemas/pci/pci-ep.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Common properties for PCI Endpoint Controller Nodes.

Maintainers (maintainers): "Kishon Vijay Abraham I <kishon@kernel.org>", "Manivannan Sadhasivam <mani@kernel.org>"

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^pcie-ep@"

iommu-map — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

Array item rules (items) #

Array item rules (items)

Item 1

Device ID (see msi-map) base

Maximum value (maximum): 524287

Item 2

phandle to IOMMU

Item 3

IOMMU specifier base (currently always 1 cell)

Item 4

Number of Device IDs

Maximum value (maximum): 524288

iommu-map-mask — not listed as required here #

A mask to be applied to each Device ID prior to being mapped to an IOMMU specifier per the iommu-map property.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Maximum value (maximum): 524287

max-functions — not listed as required here #

Maximum number of functions that can be configured

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8

Minimum value (minimum): 1

Default value (default): 1

Maximum value (maximum): 255

max-virtual-functions — not listed as required here #

Array representing the number of virtual functions corresponding to each physical function

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 255

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 1, 2, 3, 4, 5, 6

msi-map — not listed as required here #

Maps a Device ID to an MSI and associated MSI specifier data.

A PCI Endpoint (EP) can use MSI as a doorbell function. This is achieved by mapping the MSI controller's address into PCI BAR<n>. The PCI Root Complex can write to this BAR<n>, triggering the EP to generate IRQ. This notifies the EP-side driver of an event, eliminating the need for the driver to continuously poll for status changes.

However, the EP cannot rely on Requester ID (RID) because the RID is determined by the PCI topology of the host system. Since the EP may be connected to different PCI hosts, the RID can vary between systems and is therefore not a reliable identifier.

Each EP can support up to 8 physical functions and up to 65,536 virtual
functions. To uniquely identify each child device, a device ID is defined
as
   - Bits [2:0] for the function number (func)
   - Bits [18:3] for the virtual function index (vfunc)

The resulting device ID is computed as:

  (func & 0x7) | (vfunc << 3)

The property is an arbitrary number of tuples of (device-id-base, msi, msi-base,length).

Any Device ID id in the interval [id-base, id-base + length) is associated with the listed MSI, with the MSI specifier (id - id-base + msi-base).

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

Array item rules (items) #

Array item rules (items)

Item 1

The Device ID base matched by the entry

Maximum value (maximum): 524287

Item 2

phandle to msi-controller node

Item 3

(optional) The msi-specifier produced for the first Device ID matched by the entry. Currently, msi-specifier is 0 or 1 cells.

Item 4

The length of consecutive Device IDs following the Device ID base

Maximum value (maximum): 524288

msi-map-mask — not listed as required here #

A mask to be applied to each Device ID prior to being mapped to an msi-specifier per the msi-map property.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Maximum value (maximum): 524287

num-lanes — not listed as required here #

maximum number of lanes

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Minimum value (minimum): 1

Default value (default): 1

Maximum value (maximum): 16

linux,pci-domain — not listed as required here #

If present this property assigns a fixed PCI domain number to a PCI Endpoint Controller, otherwise an unstable (across boots) unique number will be assigned. It is required to either not set this property at all or set it for all PCI endpoint controllers in the system, otherwise potentially conflicting domain numbers may be assigned to endpoint controllers. The domain number for each endpoint controller in the system must be unique.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Required in this object (required): "compatible"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page