-
Notifications
You must be signed in to change notification settings - Fork 66
/
pci-bus.yaml
153 lines (127 loc) · 3.32 KB
/
pci-bus.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# SPDX-License-Identifier: (GPL2.0-only OR BSD-2-Clause)
# Copyright 2018 Linaro Ltd.
%YAML 1.2
---
$id: http://devicetree.org/schemas/pci/pci-bus.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: PCI bus schema
description: |
Common properties for PCI host bridge nodes and PCI bus structure.
PCI bus bridges have standardized Device Tree bindings:
PCI Bus Binding to: IEEE Std 1275-1994
http://www.devicetree.org/open-firmware/bindings/pci/pci2_1.pdf
And for the interrupt mapping part:
Open Firmware Recommended Practice: Interrupt Mapping
http://www.devicetree.org/open-firmware/practice/imap/imap0_9d.pdf
maintainers:
- Rob Herring <robh@kernel.org>
properties:
$nodename:
pattern: "^pcie?@"
ranges:
oneOf:
- $ref: "/schemas/types.yaml#/definitions/flag"
- minItems: 1
maxItems: 32 # Should be enough
items:
minItems: 5
maxItems: 7
additionalItems: true
items:
- enum:
- 0x01000000
- 0x02000000
- 0x03000000
- 0x42000000
- 0x43000000
dma-ranges:
oneOf:
- type: boolean
- minItems: 1
maxItems: 32 # Should be enough
items:
minItems: 5
maxItems: 7
additionalItems: true
items:
- enum:
- 0x02000000
- 0x03000000
- 0x42000000
- 0x43000000
"#address-cells":
const: 3
"#size-cells":
const: 2
device_type:
const: pci
bus-range:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2
maxItems: 2
items:
maximum: 255
"#interrupt-cells":
const: 1
interrupt-map: true
# minItems: 1
# maxItems: 88 # 22 IDSEL x 4 IRQs
# items:
# minItems: 6 # 3 addr cells, 1 PCI IRQ cell, 1 phandle, 1+ parent addr and IRQ cells
# maxItems: 16
interrupt-map-mask:
items:
- description: PCI high address cell
minimum: 0
maximum: 0xf800
- description: PCI mid address cell
const: 0
- description: PCI low address cell
const: 0
- description: PCI IRQ cell
minimum: 0
maximum: 7
linux,pci-domain:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
max-link-speed:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
enum: [ 1, 2, 3, 4 ]
reset-gpios:
description: GPIO controlled connection to PERST# signal
maxItems: 1
supports-clkreq:
type: boolean
aspm-no-l0s:
description: Disables ASPM L0s capability
type: boolean
vendor-id:
description: The PCI vendor ID
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
device-id:
description: The PCI device ID
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@1?[0-9a-f](,[0-7])?$":
type: object
properties:
compatible:
contains:
pattern: "^(pci[0-9a-f]{3,4},[0-9a-f]{1,4}|pciclass[0-9a-f]{4,6})$"
reg:
items:
minItems: 5
maxItems: 5
minItems: 1
maxItems: 6 # Up to 6 BARs
required:
- reg
required:
- device_type
- ranges
- "#address-cells"
- "#size-cells"