142694f9fSMauro Carvalho Chehab# SPDX-License-Identifier: GPL-2.0 242694f9fSMauro Carvalho Chehab%YAML 1.2 342694f9fSMauro Carvalho Chehab--- 442694f9fSMauro Carvalho Chehab$id: http://devicetree.org/schemas/pci/snps,dw-pcie.yaml# 542694f9fSMauro Carvalho Chehab$schema: http://devicetree.org/meta-schemas/core.yaml# 642694f9fSMauro Carvalho Chehab 742694f9fSMauro Carvalho Chehabtitle: Synopsys DesignWare PCIe interface 842694f9fSMauro Carvalho Chehab 942694f9fSMauro Carvalho Chehabmaintainers: 1042694f9fSMauro Carvalho Chehab - Jingoo Han <jingoohan1@gmail.com> 1142694f9fSMauro Carvalho Chehab - Gustavo Pimentel <gustavo.pimentel@synopsys.com> 1242694f9fSMauro Carvalho Chehab 1342694f9fSMauro Carvalho Chehabdescription: | 1442694f9fSMauro Carvalho Chehab Synopsys DesignWare PCIe host controller 1542694f9fSMauro Carvalho Chehab 16f133396eSSerge Semin# Please create a separate DT-schema for your DWC PCIe Root Port controller 17f133396eSSerge Semin# and make sure it's assigned with the vendor-specific compatible string. 18f133396eSSerge Seminselect: 1942694f9fSMauro Carvalho Chehab properties: 2042694f9fSMauro Carvalho Chehab compatible: 21f133396eSSerge Semin const: snps,dw-pcie 22f133396eSSerge Semin required: 23f133396eSSerge Semin - compatible 2442694f9fSMauro Carvalho Chehab 2542694f9fSMauro Carvalho ChehaballOf: 265db62b7dSKrzysztof Kozlowski - $ref: /schemas/pci/pci-host-bridge.yaml# 27057646a5SSerge Semin - $ref: /schemas/pci/snps,dw-pcie-common.yaml# 2884a7d0e5SSebastian Reichel - if: 2984a7d0e5SSebastian Reichel not: 3084a7d0e5SSebastian Reichel required: 3184a7d0e5SSebastian Reichel - msi-map 3284a7d0e5SSebastian Reichel then: 3384a7d0e5SSebastian Reichel properties: 3484a7d0e5SSebastian Reichel interrupt-names: 3584a7d0e5SSebastian Reichel contains: 3684a7d0e5SSebastian Reichel const: msi 3742694f9fSMauro Carvalho Chehab 3842694f9fSMauro Carvalho Chehabproperties: 3942694f9fSMauro Carvalho Chehab reg: 404cc13eedSSerge Semin description: 414cc13eedSSerge Semin At least DBI reg-space and peripheral devices CFG-space outbound window 424cc13eedSSerge Semin are required for the normal controller work. iATU memory IO region is 434cc13eedSSerge Semin also required if the space is unrolled (IP-core version >= 4.80a). 4442694f9fSMauro Carvalho Chehab minItems: 2 459197bf4bSYoshihiro Shimoda maxItems: 7 4642694f9fSMauro Carvalho Chehab 4742694f9fSMauro Carvalho Chehab reg-names: 4842694f9fSMauro Carvalho Chehab minItems: 2 499197bf4bSYoshihiro Shimoda maxItems: 7 5042694f9fSMauro Carvalho Chehab items: 514cc13eedSSerge Semin oneOf: 524cc13eedSSerge Semin - description: 534cc13eedSSerge Semin Basic DWC PCIe controller configuration-space accessible over 544cc13eedSSerge Semin the DBI interface. This memory space is either activated with 554cc13eedSSerge Semin CDM/ELBI = 0 and CS2 = 0 or is a contiguous memory region 564cc13eedSSerge Semin with all spaces. Note iATU/eDMA CSRs are indirectly accessible 574cc13eedSSerge Semin via the PL viewports on the DWC PCIe controllers older than 584cc13eedSSerge Semin v4.80a. 594cc13eedSSerge Semin const: dbi 604cc13eedSSerge Semin - description: 614cc13eedSSerge Semin Shadow DWC PCIe config-space registers. This space is selected 624cc13eedSSerge Semin by setting CDM/ELBI = 0 and CS2 = 1. This is an intermix of 634cc13eedSSerge Semin the PCI-SIG PCIe CFG-space with the shadow registers for some 644cc13eedSSerge Semin PCI Header space, PCI Standard and Extended Structures. It's 654cc13eedSSerge Semin mainly relevant for the end-point controller configuration, 664cc13eedSSerge Semin but still there are some shadow registers available for the 674cc13eedSSerge Semin Root Port mode too. 684cc13eedSSerge Semin const: dbi2 694cc13eedSSerge Semin - description: 704cc13eedSSerge Semin External Local Bus registers. It's an application-dependent 714cc13eedSSerge Semin registers normally defined by the platform engineers. The space 724cc13eedSSerge Semin can be selected by setting CDM/ELBI = 1 and CS2 = 0 wires or can 734cc13eedSSerge Semin be accessed over some platform-specific means (for instance 744cc13eedSSerge Semin as a part of a system controller). 754cc13eedSSerge Semin enum: [ elbi, app ] 764cc13eedSSerge Semin - description: 774cc13eedSSerge Semin iATU/eDMA registers common for all device functions. It's an 784cc13eedSSerge Semin unrolled memory space with the internal Address Translation 794cc13eedSSerge Semin Unit and Enhanced DMA, which is selected by setting CDM/ELBI = 1 804cc13eedSSerge Semin and CS2 = 1. For IP-core releases prior v4.80a, these registers 814cc13eedSSerge Semin have been programmed via an indirect addressing scheme using a 824cc13eedSSerge Semin set of viewport CSRs mapped into the PL space. Note iATU is 834cc13eedSSerge Semin normally mapped to the 0x0 address of this region, while eDMA 844cc13eedSSerge Semin is available at 0x80000 base address. 854cc13eedSSerge Semin const: atu 864cc13eedSSerge Semin - description: 874cc13eedSSerge Semin Platform-specific eDMA registers. Some platforms may have eDMA 884cc13eedSSerge Semin CSRs mapped in a non-standard base address. The registers offset 894cc13eedSSerge Semin can be changed or the MS/LS-bits of the address can be attached 904cc13eedSSerge Semin in an additional RTL block before the MEM-IO transactions reach 914cc13eedSSerge Semin the DW PCIe slave interface. 924cc13eedSSerge Semin const: dma 934cc13eedSSerge Semin - description: 944cc13eedSSerge Semin PHY/PCS configuration registers. Some platforms can have the 954cc13eedSSerge Semin PCS and PHY CSRs accessible over a dedicated memory mapped 964cc13eedSSerge Semin region, but mainly these registers are indirectly accessible 974cc13eedSSerge Semin either by means of the embedded PHY viewport schema or by some 984cc13eedSSerge Semin platform-specific method. 994cc13eedSSerge Semin const: phy 1004cc13eedSSerge Semin - description: 1014cc13eedSSerge Semin Outbound iATU-capable memory-region which will be used to access 1024cc13eedSSerge Semin the peripheral PCIe devices configuration space. 1034cc13eedSSerge Semin const: config 1044cc13eedSSerge Semin - description: 1054cc13eedSSerge Semin Vendor-specific CSR names. Consider using the generic names above 1064cc13eedSSerge Semin for new bindings. 1074cc13eedSSerge Semin oneOf: 108096d05bfSRob Herring (Arm) - description: See native 'dbi' CSR region for details. 109096d05bfSRob Herring (Arm) enum: [ ctrl ] 1104cc13eedSSerge Semin - description: See native 'elbi/app' CSR region for details. 111*bf9d32f2SRob Herring (Arm) enum: [ apb, mgmt, link, ulreg, appl, controller ] 1124cc13eedSSerge Semin - description: See native 'atu' CSR region for details. 1134cc13eedSSerge Semin enum: [ atu_dma ] 1144cc13eedSSerge Semin - description: Syscon-related CSR regions. 1154cc13eedSSerge Semin enum: [ smu, mpu ] 116c7020e1bSLinus Torvalds - description: Tegra234 aperture 117c7020e1bSLinus Torvalds enum: [ ecam ] 1181a34340aSThippeswamy Havalige - description: AMD MDB PCIe SLCR region 1191a34340aSThippeswamy Havalige const: slcr 1204cc13eedSSerge Semin allOf: 1214cc13eedSSerge Semin - contains: 122096d05bfSRob Herring (Arm) enum: [ dbi, ctrl ] 1234cc13eedSSerge Semin - contains: 1244cc13eedSSerge Semin const: config 12542694f9fSMauro Carvalho Chehab 12635486813SSerge Semin interrupts: 12735486813SSerge Semin description: 12835486813SSerge Semin DWC PCIe Root Port/Complex specific IRQ signals. At least MSI interrupt 12935486813SSerge Semin signal is supposed to be specified for the host controller. 13035486813SSerge Semin minItems: 1 13135486813SSerge Semin maxItems: 26 13242694f9fSMauro Carvalho Chehab 13335486813SSerge Semin interrupt-names: 13435486813SSerge Semin minItems: 1 13535486813SSerge Semin maxItems: 26 13635486813SSerge Semin items: 13735486813SSerge Semin oneOf: 13835486813SSerge Semin - description: 13935486813SSerge Semin Controller request to read or write virtual product data 14035486813SSerge Semin from/to the VPD capability registers. 14135486813SSerge Semin const: vpd 14235486813SSerge Semin - description: 14335486813SSerge Semin Link Equalization Request flag is set in the Link Status 2 14435486813SSerge Semin register (applicable if the corresponding IRQ is enabled in 14535486813SSerge Semin the Link Control 3 register). 14635486813SSerge Semin const: l_eq 14735486813SSerge Semin - description: 14835486813SSerge Semin Indicates that the eDMA Tx/Rx transfer is complete or that an 14935486813SSerge Semin error has occurred on the corresponding channel. eDMA can have 15035486813SSerge Semin eight Tx (Write) and Rx (Read) eDMA channels thus supporting up 15135486813SSerge Semin to 16 IRQ signals all together. Write eDMA channels shall go 15235486813SSerge Semin first in the ordered row as per default edma_int[*] bus setup. 15335486813SSerge Semin pattern: '^dma([0-9]|1[0-5])?$' 15435486813SSerge Semin - description: 15535486813SSerge Semin PCIe protocol correctable error or a Data Path protection 15635486813SSerge Semin correctable error is detected by the automotive/safety 15735486813SSerge Semin feature. 15835486813SSerge Semin const: sft_ce 15935486813SSerge Semin - description: 16035486813SSerge Semin Indicates that the internal safety mechanism has detected an 16135486813SSerge Semin uncorrectable error. 16235486813SSerge Semin const: sft_ue 16335486813SSerge Semin - description: 16435486813SSerge Semin Application-specific IRQ raised depending on the vendor-specific 16535486813SSerge Semin events basis. 16635486813SSerge Semin const: app 16735486813SSerge Semin - description: 16835486813SSerge Semin DSP AXI MSI Interrupt detected. It gets de-asserted when there is 16935486813SSerge Semin no more MSI interrupt pending. The interrupt is relevant to the 17035486813SSerge Semin iMSI-RX - Integrated MSI Receiver (AXI bridge). 17135486813SSerge Semin const: msi 17235486813SSerge Semin - description: 17335486813SSerge Semin Legacy A/B/C/D interrupt signal. Basically it's triggered by 17435486813SSerge Semin receiving a Assert_INT{A,B,C,D}/Desassert_INT{A,B,C,D} message 17535486813SSerge Semin from the downstream device. 17635486813SSerge Semin pattern: "^int(a|b|c|d)$" 17735486813SSerge Semin - description: 17835486813SSerge Semin Error condition detected and a flag is set in the Root Error Status 17935486813SSerge Semin register of the AER capability. It's asserted when the RC 18035486813SSerge Semin internally generated an error or an error message is received by 18135486813SSerge Semin the RC. 18235486813SSerge Semin const: aer 18335486813SSerge Semin - description: 18435486813SSerge Semin PME message is received by the port. That means having the PME 18535486813SSerge Semin status bit set in the Root Status register (the event is 18635486813SSerge Semin supposed to be unmasked in the Root Control register). 18735486813SSerge Semin const: pme 18835486813SSerge Semin - description: 18935486813SSerge Semin Hot-plug event is detected. That is a bit has been set in the 19035486813SSerge Semin Slot Status register and the corresponding event is enabled in 19135486813SSerge Semin the Slot Control register. 19235486813SSerge Semin const: hp 19335486813SSerge Semin - description: 19435486813SSerge Semin Link Autonomous Bandwidth Status flag has been set in the Link 19535486813SSerge Semin Status register (the event is supposed to be unmasked in the 19635486813SSerge Semin Link Control register). 19735486813SSerge Semin const: bw_au 19835486813SSerge Semin - description: 19935486813SSerge Semin Bandwidth Management Status flag has been set in the Link 20035486813SSerge Semin Status register (the event is supposed to be unmasked in the 20135486813SSerge Semin Link Control register). 20235486813SSerge Semin const: bw_mg 20335486813SSerge Semin - description: 204591d3833SSebastian Reichel Combined Legacy A/B/C/D interrupt signal. See "^int(a|b|c|d)$" for 205591d3833SSebastian Reichel details. 206591d3833SSebastian Reichel const: legacy 207591d3833SSebastian Reichel - description: 20835486813SSerge Semin Vendor-specific IRQ names. Consider using the generic names above 20935486813SSerge Semin for new bindings. 21035486813SSerge Semin oneOf: 21135486813SSerge Semin - description: See native "app" IRQ for details 212591d3833SSebastian Reichel enum: [ intr, sys, pmc, msg, err ] 21342694f9fSMauro Carvalho Chehab 214b92225b0SRob HerringadditionalProperties: true 21542694f9fSMauro Carvalho Chehab 21642694f9fSMauro Carvalho Chehabrequired: 217f133396eSSerge Semin - compatible 21842694f9fSMauro Carvalho Chehab - reg 21942694f9fSMauro Carvalho Chehab - reg-names 22042694f9fSMauro Carvalho Chehab 22142694f9fSMauro Carvalho Chehabexamples: 22242694f9fSMauro Carvalho Chehab - | 22342694f9fSMauro Carvalho Chehab pcie@dfc00000 { 22442694f9fSMauro Carvalho Chehab compatible = "snps,dw-pcie"; 225b9fe9985SSerge Semin device_type = "pci"; 22642694f9fSMauro Carvalho Chehab reg = <0xdfc00000 0x0001000>, /* IP registers */ 22742694f9fSMauro Carvalho Chehab <0xd0000000 0x0002000>; /* Configuration space */ 22842694f9fSMauro Carvalho Chehab reg-names = "dbi", "config"; 22942694f9fSMauro Carvalho Chehab #address-cells = <3>; 23042694f9fSMauro Carvalho Chehab #size-cells = <2>; 23142694f9fSMauro Carvalho Chehab ranges = <0x81000000 0 0x00000000 0xde000000 0 0x00010000>, 23242694f9fSMauro Carvalho Chehab <0x82000000 0 0xd0400000 0xd0400000 0 0x0d000000>; 233b9fe9985SSerge Semin bus-range = <0x0 0xff>; 234b9fe9985SSerge Semin 23542694f9fSMauro Carvalho Chehab interrupts = <25>, <24>; 23635486813SSerge Semin interrupt-names = "msi", "hp"; 237b9fe9985SSerge Semin 238b9fe9985SSerge Semin reset-gpios = <&port0 0 1>; 239b9fe9985SSerge Semin 24087559636SSerge Semin phys = <&pcie_phy>; 24187559636SSerge Semin phy-names = "pcie"; 24287559636SSerge Semin 24342694f9fSMauro Carvalho Chehab num-lanes = <1>; 244eaa9d886SSerge Semin max-link-speed = <3>; 24542694f9fSMauro Carvalho Chehab }; 246