|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/pci/aspeed,ast2600-pcie.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: ASPEED PCIe Root Complex Controller |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Jacky Chou <jacky_chou@aspeedtech.com> |
| 11 | + |
| 12 | +description: |
| 13 | + The ASPEED PCIe Root Complex controller provides PCI Express Root Complex |
| 14 | + functionality for ASPEED SoCs, such as the AST2600 and AST2700. |
| 15 | + This controller enables connectivity to PCIe endpoint devices, supporting |
| 16 | + memory and I/O windows, MSI and legacy interrupts, and integration with |
| 17 | + the SoC's clock, reset, and pinctrl subsystems. On AST2600, the PCIe Root |
| 18 | + Port device number is always 8. |
| 19 | + |
| 20 | +properties: |
| 21 | + compatible: |
| 22 | + enum: |
| 23 | + - aspeed,ast2600-pcie |
| 24 | + - aspeed,ast2700-pcie |
| 25 | + |
| 26 | + reg: |
| 27 | + maxItems: 1 |
| 28 | + |
| 29 | + ranges: |
| 30 | + minItems: 2 |
| 31 | + maxItems: 2 |
| 32 | + |
| 33 | + interrupts: |
| 34 | + maxItems: 1 |
| 35 | + description: IntX and MSI interrupt |
| 36 | + |
| 37 | + resets: |
| 38 | + items: |
| 39 | + - description: PCIe controller reset |
| 40 | + |
| 41 | + reset-names: |
| 42 | + items: |
| 43 | + - const: h2x |
| 44 | + |
| 45 | + aspeed,ahbc: |
| 46 | + $ref: /schemas/types.yaml#/definitions/phandle |
| 47 | + description: |
| 48 | + Phandle to the ASPEED AHB Controller (AHBC) syscon node. |
| 49 | + This reference is used by the PCIe controller to access |
| 50 | + system-level configuration registers related to the AHB bus. |
| 51 | + To enable AHB access for the PCIe controller. |
| 52 | + |
| 53 | + aspeed,pciecfg: |
| 54 | + $ref: /schemas/types.yaml#/definitions/phandle |
| 55 | + description: |
| 56 | + Phandle to the ASPEED PCIe configuration syscon node. |
| 57 | + This reference allows the PCIe controller to access |
| 58 | + SoC-specific PCIe configuration registers. There are the others |
| 59 | + functions such PCIe RC and PCIe EP will use this common register |
| 60 | + to configure the SoC interfaces. |
| 61 | + |
| 62 | + legacy-interrupt-controller: |
| 63 | + description: Interrupt controller node for handling INTx. |
| 64 | + type: object |
| 65 | + properties: |
| 66 | + '#address-cells': |
| 67 | + const: 0 |
| 68 | + '#interrupt-cells': |
| 69 | + const: 1 |
| 70 | + interrupt-controller: true |
| 71 | + |
| 72 | + required: |
| 73 | + - '#address-cells' |
| 74 | + - '#interrupt-cells' |
| 75 | + - interrupt-controller |
| 76 | + |
| 77 | + additionalProperties: false |
| 78 | + |
| 79 | +allOf: |
| 80 | + - $ref: /schemas/pci/pci-host-bridge.yaml# |
| 81 | + - $ref: /schemas/interrupt-controller/msi-controller.yaml# |
| 82 | + - if: |
| 83 | + properties: |
| 84 | + compatible: |
| 85 | + contains: |
| 86 | + const: aspeed,ast2600-pcie |
| 87 | + then: |
| 88 | + required: |
| 89 | + - aspeed,ahbc |
| 90 | + else: |
| 91 | + properties: |
| 92 | + aspeed,ahbc: false |
| 93 | + - if: |
| 94 | + properties: |
| 95 | + compatible: |
| 96 | + contains: |
| 97 | + const: aspeed,ast2700-pcie |
| 98 | + then: |
| 99 | + required: |
| 100 | + - aspeed,pciecfg |
| 101 | + else: |
| 102 | + properties: |
| 103 | + aspeed,pciecfg: false |
| 104 | + |
| 105 | +required: |
| 106 | + - reg |
| 107 | + - interrupts |
| 108 | + - bus-range |
| 109 | + - ranges |
| 110 | + - resets |
| 111 | + - reset-names |
| 112 | + - msi-controller |
| 113 | + - interrupt-map-mask |
| 114 | + - interrupt-map |
| 115 | + - legacy-interrupt-controller |
| 116 | + |
| 117 | +unevaluatedProperties: false |
| 118 | + |
| 119 | +examples: |
| 120 | + - | |
| 121 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 122 | + #include <dt-bindings/clock/ast2600-clock.h> |
| 123 | +
|
| 124 | + pcie0: pcie@1e770000 { |
| 125 | + compatible = "aspeed,ast2600-pcie"; |
| 126 | + device_type = "pci"; |
| 127 | + reg = <0x1e770000 0x100>; |
| 128 | + #address-cells = <3>; |
| 129 | + #size-cells = <2>; |
| 130 | + interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; |
| 131 | + bus-range = <0x00 0xff>; |
| 132 | +
|
| 133 | + ranges = <0x01000000 0x0 0x00018000 0x00018000 0x0 0x00008000 |
| 134 | + 0x02000000 0x0 0x60000000 0x60000000 0x0 0x20000000>; |
| 135 | +
|
| 136 | + resets = <&syscon ASPEED_RESET_H2X>; |
| 137 | + reset-names = "h2x"; |
| 138 | + pinctrl-0 = <&pinctrl_pcierc1_default>; |
| 139 | + pinctrl-names = "default"; |
| 140 | +
|
| 141 | + #interrupt-cells = <1>; |
| 142 | + msi-controller; |
| 143 | +
|
| 144 | + aspeed,ahbc = <&ahbc>; |
| 145 | +
|
| 146 | + interrupt-map-mask = <0 0 0 7>; |
| 147 | + interrupt-map = <0 0 0 1 &pcie_intc0 0>, |
| 148 | + <0 0 0 2 &pcie_intc0 1>, |
| 149 | + <0 0 0 3 &pcie_intc0 2>, |
| 150 | + <0 0 0 4 &pcie_intc0 3>; |
| 151 | + legacy-interrupt-controller { |
| 152 | + interrupt-controller; |
| 153 | + #address-cells = <0>; |
| 154 | + #interrupt-cells = <1>; |
| 155 | + }; |
| 156 | +
|
| 157 | + pcie@8,0 { |
| 158 | + reg = <0x804000 0 0 0 0>; |
| 159 | + #address-cells = <3>; |
| 160 | + #size-cells = <2>; |
| 161 | + device_type = "pci"; |
| 162 | + resets = <&syscon ASPEED_RESET_PCIE_RC_O>; |
| 163 | + reset-names = "perst"; |
| 164 | + clocks = <&syscon ASPEED_CLK_GATE_BCLK>; |
| 165 | + phys = <&pcie_phy1>; |
| 166 | + ranges; |
| 167 | + }; |
| 168 | + }; |
0 commit comments