1a3b539feSMark Kettenis# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2a3b539feSMark Kettenis%YAML 1.2 3a3b539feSMark Kettenis--- 4a3b539feSMark Kettenis$id: http://devicetree.org/schemas/pci/apple,pcie.yaml# 5a3b539feSMark Kettenis$schema: http://devicetree.org/meta-schemas/core.yaml# 6a3b539feSMark Kettenis 7a3b539feSMark Kettenistitle: Apple PCIe host controller 8a3b539feSMark Kettenis 9a3b539feSMark Kettenismaintainers: 10a3b539feSMark Kettenis - Mark Kettenis <kettenis@openbsd.org> 11a3b539feSMark Kettenis 12a3b539feSMark Kettenisdescription: | 13a3b539feSMark Kettenis The Apple PCIe host controller is a PCIe host controller with 14a3b539feSMark Kettenis multiple root ports present in Apple ARM SoC platforms, including 15a3b539feSMark Kettenis various iPhone and iPad devices and the "Apple Silicon" Macs. 16a3b539feSMark Kettenis The controller incorporates Synopsys DesigWare PCIe logic to 17a3b539feSMark Kettenis implements its root ports. But the ATU found on most DesignWare 18a3b539feSMark Kettenis PCIe host bridges is absent. 19a3b539feSMark Kettenis 20a3b539feSMark Kettenis All root ports share a single ECAM space, but separate GPIOs are 21a3b539feSMark Kettenis used to take the PCI devices on those ports out of reset. Therefore 22a3b539feSMark Kettenis the standard "reset-gpios" and "max-link-speed" properties appear on 23a3b539feSMark Kettenis the child nodes that represent the PCI bridges that correspond to 24a3b539feSMark Kettenis the individual root ports. 25a3b539feSMark Kettenis 26a3b539feSMark Kettenis MSIs are handled by the PCIe controller and translated into regular 27a3b539feSMark Kettenis interrupts. A range of 32 MSIs is provided. These 32 MSIs can be 28a3b539feSMark Kettenis distributed over the root ports as the OS sees fit by programming 29a3b539feSMark Kettenis the PCIe controller's port registers. 30a3b539feSMark Kettenis 31a3b539feSMark Kettenisproperties: 32a3b539feSMark Kettenis compatible: 33a3b539feSMark Kettenis items: 3442c2366aSHector Martin - enum: 3542c2366aSHector Martin - apple,t8103-pcie 36*869c942fSJanne Grunau - apple,t8112-pcie 3742c2366aSHector Martin - apple,t6000-pcie 38a3b539feSMark Kettenis - const: apple,pcie 39a3b539feSMark Kettenis 40a3b539feSMark Kettenis reg: 41a3b539feSMark Kettenis minItems: 3 4242c2366aSHector Martin maxItems: 6 43a3b539feSMark Kettenis 44a3b539feSMark Kettenis reg-names: 45a3b539feSMark Kettenis minItems: 3 46a3b539feSMark Kettenis items: 47a3b539feSMark Kettenis - const: config 48a3b539feSMark Kettenis - const: rc 49a3b539feSMark Kettenis - const: port0 50a3b539feSMark Kettenis - const: port1 51a3b539feSMark Kettenis - const: port2 5242c2366aSHector Martin - const: port3 53a3b539feSMark Kettenis 54a3b539feSMark Kettenis ranges: 55a3b539feSMark Kettenis minItems: 2 56a3b539feSMark Kettenis maxItems: 2 57a3b539feSMark Kettenis 58a3b539feSMark Kettenis interrupts: 59a3b539feSMark Kettenis description: 60a3b539feSMark Kettenis Interrupt specifiers, one for each root port. 61a3b539feSMark Kettenis minItems: 1 6242c2366aSHector Martin maxItems: 4 63a3b539feSMark Kettenis 64a3b539feSMark Kettenis msi-parent: true 65a3b539feSMark Kettenis 66a3b539feSMark Kettenis msi-ranges: 67a3b539feSMark Kettenis maxItems: 1 68a3b539feSMark Kettenis 69a3b539feSMark Kettenis iommu-map: true 70a3b539feSMark Kettenis iommu-map-mask: true 71a3b539feSMark Kettenis 72fe3f70eeSRob Herring power-domains: 73fe3f70eeSRob Herring maxItems: 1 74fe3f70eeSRob Herring 75a3b539feSMark Kettenisrequired: 76a3b539feSMark Kettenis - compatible 77a3b539feSMark Kettenis - reg 78a3b539feSMark Kettenis - reg-names 79a3b539feSMark Kettenis - bus-range 80a3b539feSMark Kettenis - interrupts 81a3b539feSMark Kettenis - msi-controller 82a3b539feSMark Kettenis - msi-parent 83a3b539feSMark Kettenis - msi-ranges 84a3b539feSMark Kettenis 85a3b539feSMark KettenisunevaluatedProperties: false 86a3b539feSMark Kettenis 8742c2366aSHector MartinallOf: 8842c2366aSHector Martin - $ref: /schemas/pci/pci-bus.yaml# 8942c2366aSHector Martin - $ref: /schemas/interrupt-controller/msi-controller.yaml# 9042c2366aSHector Martin - if: 9142c2366aSHector Martin properties: 9242c2366aSHector Martin compatible: 9342c2366aSHector Martin contains: 9442c2366aSHector Martin const: apple,t8103-pcie 9542c2366aSHector Martin then: 9642c2366aSHector Martin properties: 9742c2366aSHector Martin reg: 9842c2366aSHector Martin maxItems: 5 9942c2366aSHector Martin interrupts: 10042c2366aSHector Martin maxItems: 3 10142c2366aSHector Martin 102a3b539feSMark Kettenisexamples: 103a3b539feSMark Kettenis - | 104a3b539feSMark Kettenis #include <dt-bindings/interrupt-controller/apple-aic.h> 105a3b539feSMark Kettenis 106a3b539feSMark Kettenis soc { 107a3b539feSMark Kettenis #address-cells = <2>; 108a3b539feSMark Kettenis #size-cells = <2>; 109a3b539feSMark Kettenis 110a3b539feSMark Kettenis pcie0: pcie@690000000 { 111a3b539feSMark Kettenis compatible = "apple,t8103-pcie", "apple,pcie"; 112a3b539feSMark Kettenis device_type = "pci"; 113a3b539feSMark Kettenis 114a3b539feSMark Kettenis reg = <0x6 0x90000000 0x0 0x1000000>, 115a3b539feSMark Kettenis <0x6 0x80000000 0x0 0x100000>, 116a3b539feSMark Kettenis <0x6 0x81000000 0x0 0x4000>, 117a3b539feSMark Kettenis <0x6 0x82000000 0x0 0x4000>, 118a3b539feSMark Kettenis <0x6 0x83000000 0x0 0x4000>; 119a3b539feSMark Kettenis reg-names = "config", "rc", "port0", "port1", "port2"; 120a3b539feSMark Kettenis 121a3b539feSMark Kettenis interrupt-parent = <&aic>; 122a3b539feSMark Kettenis interrupts = <AIC_IRQ 695 IRQ_TYPE_LEVEL_HIGH>, 123a3b539feSMark Kettenis <AIC_IRQ 698 IRQ_TYPE_LEVEL_HIGH>, 124a3b539feSMark Kettenis <AIC_IRQ 701 IRQ_TYPE_LEVEL_HIGH>; 125a3b539feSMark Kettenis 126a3b539feSMark Kettenis msi-controller; 127a3b539feSMark Kettenis msi-parent = <&pcie0>; 128a3b539feSMark Kettenis msi-ranges = <&aic AIC_IRQ 704 IRQ_TYPE_EDGE_RISING 32>; 129a3b539feSMark Kettenis 130a3b539feSMark Kettenis iommu-map = <0x100 &dart0 1 1>, 131a3b539feSMark Kettenis <0x200 &dart1 1 1>, 132a3b539feSMark Kettenis <0x300 &dart2 1 1>; 133a3b539feSMark Kettenis iommu-map-mask = <0xff00>; 134a3b539feSMark Kettenis 135a3b539feSMark Kettenis bus-range = <0 3>; 136a3b539feSMark Kettenis #address-cells = <3>; 137a3b539feSMark Kettenis #size-cells = <2>; 138a3b539feSMark Kettenis ranges = <0x43000000 0x6 0xa0000000 0x6 0xa0000000 0x0 0x20000000>, 139a3b539feSMark Kettenis <0x02000000 0x0 0xc0000000 0x6 0xc0000000 0x0 0x40000000>; 140a3b539feSMark Kettenis 141fe3f70eeSRob Herring power-domains = <&ps_apcie_gp>; 142a3b539feSMark Kettenis pinctrl-0 = <&pcie_pins>; 143a3b539feSMark Kettenis pinctrl-names = "default"; 144a3b539feSMark Kettenis 145a3b539feSMark Kettenis pci@0,0 { 146a3b539feSMark Kettenis device_type = "pci"; 147a3b539feSMark Kettenis reg = <0x0 0x0 0x0 0x0 0x0>; 148a3b539feSMark Kettenis reset-gpios = <&pinctrl_ap 152 0>; 149a3b539feSMark Kettenis 150a3b539feSMark Kettenis #address-cells = <3>; 151a3b539feSMark Kettenis #size-cells = <2>; 152a3b539feSMark Kettenis ranges; 153a3b539feSMark Kettenis }; 154a3b539feSMark Kettenis 155a3b539feSMark Kettenis pci@1,0 { 156a3b539feSMark Kettenis device_type = "pci"; 157a3b539feSMark Kettenis reg = <0x800 0x0 0x0 0x0 0x0>; 158a3b539feSMark Kettenis reset-gpios = <&pinctrl_ap 153 0>; 159a3b539feSMark Kettenis 160a3b539feSMark Kettenis #address-cells = <3>; 161a3b539feSMark Kettenis #size-cells = <2>; 162a3b539feSMark Kettenis ranges; 163a3b539feSMark Kettenis }; 164a3b539feSMark Kettenis 165a3b539feSMark Kettenis pci@2,0 { 166a3b539feSMark Kettenis device_type = "pci"; 167a3b539feSMark Kettenis reg = <0x1000 0x0 0x0 0x0 0x0>; 168a3b539feSMark Kettenis reset-gpios = <&pinctrl_ap 33 0>; 169a3b539feSMark Kettenis 170a3b539feSMark Kettenis #address-cells = <3>; 171a3b539feSMark Kettenis #size-cells = <2>; 172a3b539feSMark Kettenis ranges; 173a3b539feSMark Kettenis }; 174a3b539feSMark Kettenis }; 175a3b539feSMark Kettenis }; 176