Skip to content

Commit ad20204

Browse files
marcanjannau
authored andcommitted
dt-bindings: pci: apple,pcie: Add subnode binding, pwren-gpios property
We weren't properly validating root port subnodes, so let's do that. Then, also add the new `pwren-gpios` property there to handle device power-up. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent ae31e05 commit ad20204

1 file changed

Lines changed: 48 additions & 3 deletions

File tree

Documentation/devicetree/bindings/pci/apple,pcie.yaml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,27 @@ properties:
8181
power-domains:
8282
maxItems: 1
8383

84+
patternProperties:
85+
"^pci@":
86+
$ref: /schemas/pci/pci-bus.yaml#
87+
type: object
88+
description: A single PCI root port
89+
90+
properties:
91+
reg:
92+
maxItems: 1
93+
94+
pwren-gpios:
95+
description: Optional GPIO to power on the device
96+
maxItems: 1
97+
98+
required:
99+
- reset-gpios
100+
- interrupt-controller
101+
- "#interrupt-cells"
102+
- interrupt-map-mask
103+
- interrupt-map
104+
84105
required:
85106
- compatible
86107
- reg
@@ -151,34 +172,58 @@ examples:
151172
pinctrl-0 = <&pcie_pins>;
152173
pinctrl-names = "default";
153174
154-
pci@0,0 {
175+
port00: pci@0,0 {
155176
device_type = "pci";
156177
reg = <0x0 0x0 0x0 0x0 0x0>;
157178
reset-gpios = <&pinctrl_ap 152 0>;
158179
159180
#address-cells = <3>;
160181
#size-cells = <2>;
161182
ranges;
183+
184+
interrupt-controller;
185+
#interrupt-cells = <1>;
186+
interrupt-map-mask = <0 0 0 7>;
187+
interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
188+
<0 0 0 2 &port00 0 0 0 1>,
189+
<0 0 0 3 &port00 0 0 0 2>,
190+
<0 0 0 4 &port00 0 0 0 3>;
162191
};
163192
164-
pci@1,0 {
193+
port01: pci@1,0 {
165194
device_type = "pci";
166195
reg = <0x800 0x0 0x0 0x0 0x0>;
167196
reset-gpios = <&pinctrl_ap 153 0>;
168197
169198
#address-cells = <3>;
170199
#size-cells = <2>;
171200
ranges;
201+
202+
interrupt-controller;
203+
#interrupt-cells = <1>;
204+
interrupt-map-mask = <0 0 0 7>;
205+
interrupt-map = <0 0 0 1 &port01 0 0 0 0>,
206+
<0 0 0 2 &port01 0 0 0 1>,
207+
<0 0 0 3 &port01 0 0 0 2>,
208+
<0 0 0 4 &port01 0 0 0 3>;
172209
};
173210
174-
pci@2,0 {
211+
port02: pci@2,0 {
175212
device_type = "pci";
176213
reg = <0x1000 0x0 0x0 0x0 0x0>;
177214
reset-gpios = <&pinctrl_ap 33 0>;
178215
179216
#address-cells = <3>;
180217
#size-cells = <2>;
181218
ranges;
219+
220+
interrupt-controller;
221+
#interrupt-cells = <1>;
222+
interrupt-map-mask = <0 0 0 7>;
223+
interrupt-map = <0 0 0 1 &port02 0 0 0 0>,
224+
<0 0 0 2 &port02 0 0 0 1>,
225+
<0 0 0 3 &port02 0 0 0 2>,
226+
<0 0 0 4 &port02 0 0 0 3>;
182227
};
183228
};
184229
};

0 commit comments

Comments
 (0)