mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-23 17:47:28 +08:00
112 lines
3.3 KiB
Diff
112 lines
3.3 KiB
Diff
From abe02ae2854e6679bf9b46ade3b6c6ddc379050f Mon Sep 17 00:00:00 2001
|
|
From: Hector Martin <marcan@marcan.st>
|
|
Date: Mon, 2 May 2022 21:17:41 +0900
|
|
Subject: [PATCH 161/171] 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>
|
|
---
|
|
.../devicetree/bindings/pci/apple,pcie.yaml | 51 +++++++++++++++++--
|
|
1 file changed, 48 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Documentation/devicetree/bindings/pci/apple,pcie.yaml b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
|
|
index aa38680aaaca..156f1777fc96 100644
|
|
--- a/Documentation/devicetree/bindings/pci/apple,pcie.yaml
|
|
+++ b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
|
|
@@ -71,6 +71,27 @@ properties:
|
|
power-domains:
|
|
maxItems: 1
|
|
|
|
+patternProperties:
|
|
+ "^pci@":
|
|
+ $ref: /schemas/pci/pci-bus.yaml#
|
|
+ type: object
|
|
+ description: A single PCI root port
|
|
+
|
|
+ properties:
|
|
+ reg:
|
|
+ maxItems: 1
|
|
+
|
|
+ pwren-gpios:
|
|
+ description: Optional GPIO to power on the device
|
|
+ maxItems: 1
|
|
+
|
|
+ required:
|
|
+ - reset-gpios
|
|
+ - interrupt-controller
|
|
+ - "#interrupt-cells"
|
|
+ - interrupt-map-mask
|
|
+ - interrupt-map
|
|
+
|
|
required:
|
|
- compatible
|
|
- reg
|
|
@@ -141,7 +162,7 @@ examples:
|
|
pinctrl-0 = <&pcie_pins>;
|
|
pinctrl-names = "default";
|
|
|
|
- pci@0,0 {
|
|
+ port00: pci@0,0 {
|
|
device_type = "pci";
|
|
reg = <0x0 0x0 0x0 0x0 0x0>;
|
|
reset-gpios = <&pinctrl_ap 152 0>;
|
|
@@ -149,9 +170,17 @@ examples:
|
|
#address-cells = <3>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
+
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <1>;
|
|
+ interrupt-map-mask = <0 0 0 7>;
|
|
+ interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
|
|
+ <0 0 0 2 &port00 0 0 0 1>,
|
|
+ <0 0 0 3 &port00 0 0 0 2>,
|
|
+ <0 0 0 4 &port00 0 0 0 3>;
|
|
};
|
|
|
|
- pci@1,0 {
|
|
+ port01: pci@1,0 {
|
|
device_type = "pci";
|
|
reg = <0x800 0x0 0x0 0x0 0x0>;
|
|
reset-gpios = <&pinctrl_ap 153 0>;
|
|
@@ -159,9 +188,17 @@ examples:
|
|
#address-cells = <3>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
+
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <1>;
|
|
+ interrupt-map-mask = <0 0 0 7>;
|
|
+ interrupt-map = <0 0 0 1 &port01 0 0 0 0>,
|
|
+ <0 0 0 2 &port01 0 0 0 1>,
|
|
+ <0 0 0 3 &port01 0 0 0 2>,
|
|
+ <0 0 0 4 &port01 0 0 0 3>;
|
|
};
|
|
|
|
- pci@2,0 {
|
|
+ port02: pci@2,0 {
|
|
device_type = "pci";
|
|
reg = <0x1000 0x0 0x0 0x0 0x0>;
|
|
reset-gpios = <&pinctrl_ap 33 0>;
|
|
@@ -169,6 +206,14 @@ examples:
|
|
#address-cells = <3>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
+
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <1>;
|
|
+ interrupt-map-mask = <0 0 0 7>;
|
|
+ interrupt-map = <0 0 0 1 &port02 0 0 0 0>,
|
|
+ <0 0 0 2 &port02 0 0 0 1>,
|
|
+ <0 0 0 3 &port02 0 0 0 2>,
|
|
+ <0 0 0 4 &port02 0 0 0 3>;
|
|
};
|
|
};
|
|
};
|
|
--
|
|
2.34.1
|
|
|