Skip to content

Commit 01a1e9d

Browse files
Andrea della Portabjorn-helgaas
authored andcommitted
dt-bindings: PCI: Add common schema for devices accessible through PCI BARs
Common YAML schema for devices that exports internal peripherals through PCI BARs. The BARs are exposed as simple-buses through which the peripherals can be accessed. This is not intended to be used as a standalone binding, but should be included by device specific bindings. Signed-off-by: Andrea della Porta <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> [bhelgaas: fix typo] Signed-off-by: Bjorn Helgaas <[email protected]> Link: https://lore.kernel.org/r/096ab7addb39e498e28ac2526c07157cc9327c42.1742418429.git.andrea.porta@suse.com
1 parent 41df330 commit 01a1e9d

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/pci-ep-bus.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common Properties for PCI MFD EP with Peripherals Addressable from BARs
8+
9+
maintainers:
10+
- A. della Porta <[email protected]>
11+
12+
description:
13+
Define a generic node representing a PCI endpoint which contains several sub-
14+
peripherals. The peripherals can be accessed through one or more BARs.
15+
This common schema is intended to be referenced from device tree bindings and
16+
does not represent a device tree binding by itself.
17+
18+
properties:
19+
'#address-cells':
20+
const: 3
21+
22+
'#size-cells':
23+
const: 2
24+
25+
ranges:
26+
minItems: 1
27+
maxItems: 6
28+
items:
29+
maxItems: 8
30+
additionalItems: true
31+
items:
32+
- maximum: 5 # The BAR number
33+
- const: 0
34+
- const: 0
35+
36+
patternProperties:
37+
'^pci-ep-bus@[0-5]$':
38+
type: object
39+
description:
40+
One node for each BAR used by peripherals contained in the PCI endpoint.
41+
Each node represents a bus on which peripherals are connected.
42+
This allows for some segmentation, e.g., one peripheral is accessible
43+
through BAR0 and another through BAR1, and you don't want the two
44+
peripherals to be able to act on the other BAR. Alternatively, when
45+
different peripherals need to share BARs, you can define only one node
46+
and use a 'ranges' property to map all the used BARs.
47+
48+
additionalProperties: true
49+
50+
properties:
51+
compatible:
52+
const: simple-bus
53+
54+
required:
55+
- compatible
56+
57+
additionalProperties: true
58+
...

0 commit comments

Comments
 (0)