Skip to content

Commit 4635e2a

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 7d0a66e commit 4635e2a

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
@@ -82,6 +82,27 @@ properties:
8282
power-domains:
8383
maxItems: 1
8484

85+
patternProperties:
86+
"^pci@":
87+
$ref: /schemas/pci/pci-bus.yaml#
88+
type: object
89+
description: A single PCI root port
90+
91+
properties:
92+
reg:
93+
maxItems: 1
94+
95+
pwren-gpios:
96+
description: Optional GPIO to power on the device
97+
maxItems: 1
98+
99+
required:
100+
- reset-gpios
101+
- interrupt-controller
102+
- "#interrupt-cells"
103+
- interrupt-map-mask
104+
- interrupt-map
105+
85106
required:
86107
- compatible
87108
- reg
@@ -161,34 +182,58 @@ examples:
161182
pinctrl-0 = <&pcie_pins>;
162183
pinctrl-names = "default";
163184
164-
pci@0,0 {
185+
port00: pci@0,0 {
165186
device_type = "pci";
166187
reg = <0x0 0x0 0x0 0x0 0x0>;
167188
reset-gpios = <&pinctrl_ap 152 0>;
168189
169190
#address-cells = <3>;
170191
#size-cells = <2>;
171192
ranges;
193+
194+
interrupt-controller;
195+
#interrupt-cells = <1>;
196+
interrupt-map-mask = <0 0 0 7>;
197+
interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
198+
<0 0 0 2 &port00 0 0 0 1>,
199+
<0 0 0 3 &port00 0 0 0 2>,
200+
<0 0 0 4 &port00 0 0 0 3>;
172201
};
173202
174-
pci@1,0 {
203+
port01: pci@1,0 {
175204
device_type = "pci";
176205
reg = <0x800 0x0 0x0 0x0 0x0>;
177206
reset-gpios = <&pinctrl_ap 153 0>;
178207
179208
#address-cells = <3>;
180209
#size-cells = <2>;
181210
ranges;
211+
212+
interrupt-controller;
213+
#interrupt-cells = <1>;
214+
interrupt-map-mask = <0 0 0 7>;
215+
interrupt-map = <0 0 0 1 &port01 0 0 0 0>,
216+
<0 0 0 2 &port01 0 0 0 1>,
217+
<0 0 0 3 &port01 0 0 0 2>,
218+
<0 0 0 4 &port01 0 0 0 3>;
182219
};
183220
184-
pci@2,0 {
221+
port02: pci@2,0 {
185222
device_type = "pci";
186223
reg = <0x1000 0x0 0x0 0x0 0x0>;
187224
reset-gpios = <&pinctrl_ap 33 0>;
188225
189226
#address-cells = <3>;
190227
#size-cells = <2>;
191228
ranges;
229+
230+
interrupt-controller;
231+
#interrupt-cells = <1>;
232+
interrupt-map-mask = <0 0 0 7>;
233+
interrupt-map = <0 0 0 1 &port02 0 0 0 0>,
234+
<0 0 0 2 &port02 0 0 0 1>,
235+
<0 0 0 3 &port02 0 0 0 2>,
236+
<0 0 0 4 &port02 0 0 0 3>;
192237
};
193238
};
194239
};

0 commit comments

Comments
 (0)