162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/pci/snps,dw-pcie.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: Synopsys DesignWare PCIe interface 862306a36Sopenharmony_ci 962306a36Sopenharmony_cimaintainers: 1062306a36Sopenharmony_ci - Jingoo Han <jingoohan1@gmail.com> 1162306a36Sopenharmony_ci - Gustavo Pimentel <gustavo.pimentel@synopsys.com> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_cidescription: | 1462306a36Sopenharmony_ci Synopsys DesignWare PCIe host controller 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci# Please create a separate DT-schema for your DWC PCIe Root Port controller 1762306a36Sopenharmony_ci# and make sure it's assigned with the vendor-specific compatible string. 1862306a36Sopenharmony_ciselect: 1962306a36Sopenharmony_ci properties: 2062306a36Sopenharmony_ci compatible: 2162306a36Sopenharmony_ci const: snps,dw-pcie 2262306a36Sopenharmony_ci required: 2362306a36Sopenharmony_ci - compatible 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciallOf: 2662306a36Sopenharmony_ci - $ref: /schemas/pci/pci-bus.yaml# 2762306a36Sopenharmony_ci - $ref: /schemas/pci/snps,dw-pcie-common.yaml# 2862306a36Sopenharmony_ci - if: 2962306a36Sopenharmony_ci not: 3062306a36Sopenharmony_ci required: 3162306a36Sopenharmony_ci - msi-map 3262306a36Sopenharmony_ci then: 3362306a36Sopenharmony_ci properties: 3462306a36Sopenharmony_ci interrupt-names: 3562306a36Sopenharmony_ci contains: 3662306a36Sopenharmony_ci const: msi 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciproperties: 3962306a36Sopenharmony_ci reg: 4062306a36Sopenharmony_ci description: 4162306a36Sopenharmony_ci At least DBI reg-space and peripheral devices CFG-space outbound window 4262306a36Sopenharmony_ci are required for the normal controller work. iATU memory IO region is 4362306a36Sopenharmony_ci also required if the space is unrolled (IP-core version >= 4.80a). 4462306a36Sopenharmony_ci minItems: 2 4562306a36Sopenharmony_ci maxItems: 5 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci reg-names: 4862306a36Sopenharmony_ci minItems: 2 4962306a36Sopenharmony_ci maxItems: 5 5062306a36Sopenharmony_ci items: 5162306a36Sopenharmony_ci oneOf: 5262306a36Sopenharmony_ci - description: 5362306a36Sopenharmony_ci Basic DWC PCIe controller configuration-space accessible over 5462306a36Sopenharmony_ci the DBI interface. This memory space is either activated with 5562306a36Sopenharmony_ci CDM/ELBI = 0 and CS2 = 0 or is a contiguous memory region 5662306a36Sopenharmony_ci with all spaces. Note iATU/eDMA CSRs are indirectly accessible 5762306a36Sopenharmony_ci via the PL viewports on the DWC PCIe controllers older than 5862306a36Sopenharmony_ci v4.80a. 5962306a36Sopenharmony_ci const: dbi 6062306a36Sopenharmony_ci - description: 6162306a36Sopenharmony_ci Shadow DWC PCIe config-space registers. This space is selected 6262306a36Sopenharmony_ci by setting CDM/ELBI = 0 and CS2 = 1. This is an intermix of 6362306a36Sopenharmony_ci the PCI-SIG PCIe CFG-space with the shadow registers for some 6462306a36Sopenharmony_ci PCI Header space, PCI Standard and Extended Structures. It's 6562306a36Sopenharmony_ci mainly relevant for the end-point controller configuration, 6662306a36Sopenharmony_ci but still there are some shadow registers available for the 6762306a36Sopenharmony_ci Root Port mode too. 6862306a36Sopenharmony_ci const: dbi2 6962306a36Sopenharmony_ci - description: 7062306a36Sopenharmony_ci External Local Bus registers. It's an application-dependent 7162306a36Sopenharmony_ci registers normally defined by the platform engineers. The space 7262306a36Sopenharmony_ci can be selected by setting CDM/ELBI = 1 and CS2 = 0 wires or can 7362306a36Sopenharmony_ci be accessed over some platform-specific means (for instance 7462306a36Sopenharmony_ci as a part of a system controller). 7562306a36Sopenharmony_ci enum: [ elbi, app ] 7662306a36Sopenharmony_ci - description: 7762306a36Sopenharmony_ci iATU/eDMA registers common for all device functions. It's an 7862306a36Sopenharmony_ci unrolled memory space with the internal Address Translation 7962306a36Sopenharmony_ci Unit and Enhanced DMA, which is selected by setting CDM/ELBI = 1 8062306a36Sopenharmony_ci and CS2 = 1. For IP-core releases prior v4.80a, these registers 8162306a36Sopenharmony_ci have been programmed via an indirect addressing scheme using a 8262306a36Sopenharmony_ci set of viewport CSRs mapped into the PL space. Note iATU is 8362306a36Sopenharmony_ci normally mapped to the 0x0 address of this region, while eDMA 8462306a36Sopenharmony_ci is available at 0x80000 base address. 8562306a36Sopenharmony_ci const: atu 8662306a36Sopenharmony_ci - description: 8762306a36Sopenharmony_ci Platform-specific eDMA registers. Some platforms may have eDMA 8862306a36Sopenharmony_ci CSRs mapped in a non-standard base address. The registers offset 8962306a36Sopenharmony_ci can be changed or the MS/LS-bits of the address can be attached 9062306a36Sopenharmony_ci in an additional RTL block before the MEM-IO transactions reach 9162306a36Sopenharmony_ci the DW PCIe slave interface. 9262306a36Sopenharmony_ci const: dma 9362306a36Sopenharmony_ci - description: 9462306a36Sopenharmony_ci PHY/PCS configuration registers. Some platforms can have the 9562306a36Sopenharmony_ci PCS and PHY CSRs accessible over a dedicated memory mapped 9662306a36Sopenharmony_ci region, but mainly these registers are indirectly accessible 9762306a36Sopenharmony_ci either by means of the embedded PHY viewport schema or by some 9862306a36Sopenharmony_ci platform-specific method. 9962306a36Sopenharmony_ci const: phy 10062306a36Sopenharmony_ci - description: 10162306a36Sopenharmony_ci Outbound iATU-capable memory-region which will be used to access 10262306a36Sopenharmony_ci the peripheral PCIe devices configuration space. 10362306a36Sopenharmony_ci const: config 10462306a36Sopenharmony_ci - description: 10562306a36Sopenharmony_ci Vendor-specific CSR names. Consider using the generic names above 10662306a36Sopenharmony_ci for new bindings. 10762306a36Sopenharmony_ci oneOf: 10862306a36Sopenharmony_ci - description: See native 'elbi/app' CSR region for details. 10962306a36Sopenharmony_ci enum: [ apb, mgmt, link, ulreg, appl ] 11062306a36Sopenharmony_ci - description: See native 'atu' CSR region for details. 11162306a36Sopenharmony_ci enum: [ atu_dma ] 11262306a36Sopenharmony_ci - description: Syscon-related CSR regions. 11362306a36Sopenharmony_ci enum: [ smu, mpu ] 11462306a36Sopenharmony_ci - description: Tegra234 aperture 11562306a36Sopenharmony_ci enum: [ ecam ] 11662306a36Sopenharmony_ci allOf: 11762306a36Sopenharmony_ci - contains: 11862306a36Sopenharmony_ci const: dbi 11962306a36Sopenharmony_ci - contains: 12062306a36Sopenharmony_ci const: config 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci interrupts: 12362306a36Sopenharmony_ci description: 12462306a36Sopenharmony_ci DWC PCIe Root Port/Complex specific IRQ signals. At least MSI interrupt 12562306a36Sopenharmony_ci signal is supposed to be specified for the host controller. 12662306a36Sopenharmony_ci minItems: 1 12762306a36Sopenharmony_ci maxItems: 26 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci interrupt-names: 13062306a36Sopenharmony_ci minItems: 1 13162306a36Sopenharmony_ci maxItems: 26 13262306a36Sopenharmony_ci items: 13362306a36Sopenharmony_ci oneOf: 13462306a36Sopenharmony_ci - description: 13562306a36Sopenharmony_ci Controller request to read or write virtual product data 13662306a36Sopenharmony_ci from/to the VPD capability registers. 13762306a36Sopenharmony_ci const: vpd 13862306a36Sopenharmony_ci - description: 13962306a36Sopenharmony_ci Link Equalization Request flag is set in the Link Status 2 14062306a36Sopenharmony_ci register (applicable if the corresponding IRQ is enabled in 14162306a36Sopenharmony_ci the Link Control 3 register). 14262306a36Sopenharmony_ci const: l_eq 14362306a36Sopenharmony_ci - description: 14462306a36Sopenharmony_ci Indicates that the eDMA Tx/Rx transfer is complete or that an 14562306a36Sopenharmony_ci error has occurred on the corresponding channel. eDMA can have 14662306a36Sopenharmony_ci eight Tx (Write) and Rx (Read) eDMA channels thus supporting up 14762306a36Sopenharmony_ci to 16 IRQ signals all together. Write eDMA channels shall go 14862306a36Sopenharmony_ci first in the ordered row as per default edma_int[*] bus setup. 14962306a36Sopenharmony_ci pattern: '^dma([0-9]|1[0-5])?$' 15062306a36Sopenharmony_ci - description: 15162306a36Sopenharmony_ci PCIe protocol correctable error or a Data Path protection 15262306a36Sopenharmony_ci correctable error is detected by the automotive/safety 15362306a36Sopenharmony_ci feature. 15462306a36Sopenharmony_ci const: sft_ce 15562306a36Sopenharmony_ci - description: 15662306a36Sopenharmony_ci Indicates that the internal safety mechanism has detected an 15762306a36Sopenharmony_ci uncorrectable error. 15862306a36Sopenharmony_ci const: sft_ue 15962306a36Sopenharmony_ci - description: 16062306a36Sopenharmony_ci Application-specific IRQ raised depending on the vendor-specific 16162306a36Sopenharmony_ci events basis. 16262306a36Sopenharmony_ci const: app 16362306a36Sopenharmony_ci - description: 16462306a36Sopenharmony_ci DSP AXI MSI Interrupt detected. It gets de-asserted when there is 16562306a36Sopenharmony_ci no more MSI interrupt pending. The interrupt is relevant to the 16662306a36Sopenharmony_ci iMSI-RX - Integrated MSI Receiver (AXI bridge). 16762306a36Sopenharmony_ci const: msi 16862306a36Sopenharmony_ci - description: 16962306a36Sopenharmony_ci Legacy A/B/C/D interrupt signal. Basically it's triggered by 17062306a36Sopenharmony_ci receiving a Assert_INT{A,B,C,D}/Desassert_INT{A,B,C,D} message 17162306a36Sopenharmony_ci from the downstream device. 17262306a36Sopenharmony_ci pattern: "^int(a|b|c|d)$" 17362306a36Sopenharmony_ci - description: 17462306a36Sopenharmony_ci Error condition detected and a flag is set in the Root Error Status 17562306a36Sopenharmony_ci register of the AER capability. It's asserted when the RC 17662306a36Sopenharmony_ci internally generated an error or an error message is received by 17762306a36Sopenharmony_ci the RC. 17862306a36Sopenharmony_ci const: aer 17962306a36Sopenharmony_ci - description: 18062306a36Sopenharmony_ci PME message is received by the port. That means having the PME 18162306a36Sopenharmony_ci status bit set in the Root Status register (the event is 18262306a36Sopenharmony_ci supposed to be unmasked in the Root Control register). 18362306a36Sopenharmony_ci const: pme 18462306a36Sopenharmony_ci - description: 18562306a36Sopenharmony_ci Hot-plug event is detected. That is a bit has been set in the 18662306a36Sopenharmony_ci Slot Status register and the corresponding event is enabled in 18762306a36Sopenharmony_ci the Slot Control register. 18862306a36Sopenharmony_ci const: hp 18962306a36Sopenharmony_ci - description: 19062306a36Sopenharmony_ci Link Autonomous Bandwidth Status flag has been set in the Link 19162306a36Sopenharmony_ci Status register (the event is supposed to be unmasked in the 19262306a36Sopenharmony_ci Link Control register). 19362306a36Sopenharmony_ci const: bw_au 19462306a36Sopenharmony_ci - description: 19562306a36Sopenharmony_ci Bandwidth Management Status flag has been set in the Link 19662306a36Sopenharmony_ci Status register (the event is supposed to be unmasked in the 19762306a36Sopenharmony_ci Link Control register). 19862306a36Sopenharmony_ci const: bw_mg 19962306a36Sopenharmony_ci - description: 20062306a36Sopenharmony_ci Combined Legacy A/B/C/D interrupt signal. See "^int(a|b|c|d)$" for 20162306a36Sopenharmony_ci details. 20262306a36Sopenharmony_ci const: legacy 20362306a36Sopenharmony_ci - description: 20462306a36Sopenharmony_ci Vendor-specific IRQ names. Consider using the generic names above 20562306a36Sopenharmony_ci for new bindings. 20662306a36Sopenharmony_ci oneOf: 20762306a36Sopenharmony_ci - description: See native "app" IRQ for details 20862306a36Sopenharmony_ci enum: [ intr, sys, pmc, msg, err ] 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ciadditionalProperties: true 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_cirequired: 21362306a36Sopenharmony_ci - compatible 21462306a36Sopenharmony_ci - reg 21562306a36Sopenharmony_ci - reg-names 21662306a36Sopenharmony_ci 21762306a36Sopenharmony_ciexamples: 21862306a36Sopenharmony_ci - | 21962306a36Sopenharmony_ci pcie@dfc00000 { 22062306a36Sopenharmony_ci compatible = "snps,dw-pcie"; 22162306a36Sopenharmony_ci device_type = "pci"; 22262306a36Sopenharmony_ci reg = <0xdfc00000 0x0001000>, /* IP registers */ 22362306a36Sopenharmony_ci <0xd0000000 0x0002000>; /* Configuration space */ 22462306a36Sopenharmony_ci reg-names = "dbi", "config"; 22562306a36Sopenharmony_ci #address-cells = <3>; 22662306a36Sopenharmony_ci #size-cells = <2>; 22762306a36Sopenharmony_ci ranges = <0x81000000 0 0x00000000 0xde000000 0 0x00010000>, 22862306a36Sopenharmony_ci <0x82000000 0 0xd0400000 0xd0400000 0 0x0d000000>; 22962306a36Sopenharmony_ci bus-range = <0x0 0xff>; 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci interrupts = <25>, <24>; 23262306a36Sopenharmony_ci interrupt-names = "msi", "hp"; 23362306a36Sopenharmony_ci #interrupt-cells = <1>; 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci reset-gpios = <&port0 0 1>; 23662306a36Sopenharmony_ci 23762306a36Sopenharmony_ci phys = <&pcie_phy>; 23862306a36Sopenharmony_ci phy-names = "pcie"; 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci num-lanes = <1>; 24162306a36Sopenharmony_ci max-link-speed = <3>; 24262306a36Sopenharmony_ci }; 243