Skip to content

Commit 7a18695

Browse files
committed
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 <[email protected]>
1 parent 457391b commit 7a18695

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
@@ -71,6 +71,27 @@ properties:
7171
power-domains:
7272
maxItems: 1
7373

74+
patternProperties:
75+
"^pci@":
76+
$ref: /schemas/pci/pci-bus.yaml#
77+
type: object
78+
description: A single PCI root port
79+
80+
properties:
81+
reg:
82+
maxItems: 1
83+
84+
pwren-gpios:
85+
description: Optional GPIO to power on the device
86+
maxItems: 1
87+
88+
required:
89+
- reset-gpios
90+
- interrupt-controller
91+
- "#interrupt-cells"
92+
- interrupt-map-mask
93+
- interrupt-map
94+
7495
required:
7596
- compatible
7697
- reg
@@ -141,34 +162,58 @@ examples:
141162
pinctrl-0 = <&pcie_pins>;
142163
pinctrl-names = "default";
143164
144-
pci@0,0 {
165+
port00: pci@0,0 {
145166
device_type = "pci";
146167
reg = <0x0 0x0 0x0 0x0 0x0>;
147168
reset-gpios = <&pinctrl_ap 152 0>;
148169
149170
#address-cells = <3>;
150171
#size-cells = <2>;
151172
ranges;
173+
174+
interrupt-controller;
175+
#interrupt-cells = <1>;
176+
interrupt-map-mask = <0 0 0 7>;
177+
interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
178+
<0 0 0 2 &port00 0 0 0 1>,
179+
<0 0 0 3 &port00 0 0 0 2>,
180+
<0 0 0 4 &port00 0 0 0 3>;
152181
};
153182
154-
pci@1,0 {
183+
port01: pci@1,0 {
155184
device_type = "pci";
156185
reg = <0x800 0x0 0x0 0x0 0x0>;
157186
reset-gpios = <&pinctrl_ap 153 0>;
158187
159188
#address-cells = <3>;
160189
#size-cells = <2>;
161190
ranges;
191+
192+
interrupt-controller;
193+
#interrupt-cells = <1>;
194+
interrupt-map-mask = <0 0 0 7>;
195+
interrupt-map = <0 0 0 1 &port01 0 0 0 0>,
196+
<0 0 0 2 &port01 0 0 0 1>,
197+
<0 0 0 3 &port01 0 0 0 2>,
198+
<0 0 0 4 &port01 0 0 0 3>;
162199
};
163200
164-
pci@2,0 {
201+
port02: pci@2,0 {
165202
device_type = "pci";
166203
reg = <0x1000 0x0 0x0 0x0 0x0>;
167204
reset-gpios = <&pinctrl_ap 33 0>;
168205
169206
#address-cells = <3>;
170207
#size-cells = <2>;
171208
ranges;
209+
210+
interrupt-controller;
211+
#interrupt-cells = <1>;
212+
interrupt-map-mask = <0 0 0 7>;
213+
interrupt-map = <0 0 0 1 &port02 0 0 0 0>,
214+
<0 0 0 2 &port02 0 0 0 1>,
215+
<0 0 0 3 &port02 0 0 0 2>,
216+
<0 0 0 4 &port02 0 0 0 3>;
172217
};
173218
};
174219
};

0 commit comments

Comments
 (0)