1354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pci/snps,dw-pcie-ep.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7354d7675SEmmanuel Vadottitle: Synopsys DesignWare PCIe endpoint interface 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 10354d7675SEmmanuel Vadot - Jingoo Han <jingoohan1@gmail.com> 11354d7675SEmmanuel Vadot - Gustavo Pimentel <gustavo.pimentel@synopsys.com> 12354d7675SEmmanuel Vadot 13354d7675SEmmanuel Vadotdescription: | 14354d7675SEmmanuel Vadot Synopsys DesignWare PCIe host controller endpoint 15354d7675SEmmanuel Vadot 168bab661aSEmmanuel Vadot# Please create a separate DT-schema for your DWC PCIe Endpoint controller 178bab661aSEmmanuel Vadot# and make sure it's assigned with the vendor-specific compatible string. 188bab661aSEmmanuel Vadotselect: 19354d7675SEmmanuel Vadot properties: 20354d7675SEmmanuel Vadot compatible: 218bab661aSEmmanuel Vadot const: snps,dw-pcie-ep 228bab661aSEmmanuel Vadot required: 238bab661aSEmmanuel Vadot - compatible 24354d7675SEmmanuel Vadot 258bab661aSEmmanuel VadotallOf: 268bab661aSEmmanuel Vadot - $ref: /schemas/pci/pci-ep.yaml# 278bab661aSEmmanuel Vadot - $ref: /schemas/pci/snps,dw-pcie-common.yaml# 288bab661aSEmmanuel Vadot 298bab661aSEmmanuel Vadotproperties: 30354d7675SEmmanuel Vadot reg: 318bab661aSEmmanuel Vadot description: 328bab661aSEmmanuel Vadot DBI, DBI2 reg-spaces and outbound memory window are required for the 338bab661aSEmmanuel Vadot normal controller functioning. iATU memory IO region is also required 348bab661aSEmmanuel Vadot if the space is unrolled (IP-core version >= 4.80a). 35354d7675SEmmanuel Vadot minItems: 2 3684943d6fSEmmanuel Vadot maxItems: 7 37354d7675SEmmanuel Vadot 38354d7675SEmmanuel Vadot reg-names: 39354d7675SEmmanuel Vadot minItems: 2 4084943d6fSEmmanuel Vadot maxItems: 7 41354d7675SEmmanuel Vadot items: 428bab661aSEmmanuel Vadot oneOf: 438bab661aSEmmanuel Vadot - description: 448bab661aSEmmanuel Vadot Basic DWC PCIe controller configuration-space accessible over 458bab661aSEmmanuel Vadot the DBI interface. This memory space is either activated with 468bab661aSEmmanuel Vadot CDM/ELBI = 0 and CS2 = 0 or is a contiguous memory region 478bab661aSEmmanuel Vadot with all spaces. Note iATU/eDMA CSRs are indirectly accessible 488bab661aSEmmanuel Vadot via the PL viewports on the DWC PCIe controllers older than 498bab661aSEmmanuel Vadot v4.80a. 508bab661aSEmmanuel Vadot const: dbi 518bab661aSEmmanuel Vadot - description: 528bab661aSEmmanuel Vadot Shadow DWC PCIe config-space registers. This space is selected 538bab661aSEmmanuel Vadot by setting CDM/ELBI = 0 and CS2 = 1. This is an intermix of 548bab661aSEmmanuel Vadot the PCI-SIG PCIe CFG-space with the shadow registers for some 558bab661aSEmmanuel Vadot PCI Header space, PCI Standard and Extended Structures. It's 568bab661aSEmmanuel Vadot mainly relevant for the end-point controller configuration, 578bab661aSEmmanuel Vadot but still there are some shadow registers available for the 588bab661aSEmmanuel Vadot Root Port mode too. 598bab661aSEmmanuel Vadot const: dbi2 608bab661aSEmmanuel Vadot - description: 618bab661aSEmmanuel Vadot External Local Bus registers. It's an application-dependent 628bab661aSEmmanuel Vadot registers normally defined by the platform engineers. The space 638bab661aSEmmanuel Vadot can be selected by setting CDM/ELBI = 1 and CS2 = 0 wires or can 648bab661aSEmmanuel Vadot be accessed over some platform-specific means (for instance 658bab661aSEmmanuel Vadot as a part of a system controller). 668bab661aSEmmanuel Vadot enum: [ elbi, app ] 678bab661aSEmmanuel Vadot - description: 688bab661aSEmmanuel Vadot iATU/eDMA registers common for all device functions. It's an 698bab661aSEmmanuel Vadot unrolled memory space with the internal Address Translation 708bab661aSEmmanuel Vadot Unit and Enhanced DMA, which is selected by setting CDM/ELBI = 1 718bab661aSEmmanuel Vadot and CS2 = 1. For IP-core releases prior v4.80a, these registers 728bab661aSEmmanuel Vadot have been programmed via an indirect addressing scheme using a 738bab661aSEmmanuel Vadot set of viewport CSRs mapped into the PL space. Note iATU is 748bab661aSEmmanuel Vadot normally mapped to the 0x0 address of this region, while eDMA 758bab661aSEmmanuel Vadot is available at 0x80000 base address. 768bab661aSEmmanuel Vadot const: atu 778bab661aSEmmanuel Vadot - description: 788bab661aSEmmanuel Vadot Platform-specific eDMA registers. Some platforms may have eDMA 798bab661aSEmmanuel Vadot CSRs mapped in a non-standard base address. The registers offset 808bab661aSEmmanuel Vadot can be changed or the MS/LS-bits of the address can be attached 818bab661aSEmmanuel Vadot in an additional RTL block before the MEM-IO transactions reach 828bab661aSEmmanuel Vadot the DW PCIe slave interface. 838bab661aSEmmanuel Vadot const: dma 848bab661aSEmmanuel Vadot - description: 858bab661aSEmmanuel Vadot PHY/PCS configuration registers. Some platforms can have the 868bab661aSEmmanuel Vadot PCS and PHY CSRs accessible over a dedicated memory mapped 878bab661aSEmmanuel Vadot region, but mainly these registers are indirectly accessible 888bab661aSEmmanuel Vadot either by means of the embedded PHY viewport schema or by some 898bab661aSEmmanuel Vadot platform-specific method. 908bab661aSEmmanuel Vadot const: phy 918bab661aSEmmanuel Vadot - description: 928bab661aSEmmanuel Vadot Outbound iATU-capable memory-region which will be used to 938bab661aSEmmanuel Vadot generate various application-specific traffic on the PCIe bus 948bab661aSEmmanuel Vadot hierarchy. It's usage scenario depends on the endpoint 958bab661aSEmmanuel Vadot functionality, for instance it can be used to create MSI(X) 968bab661aSEmmanuel Vadot messages. 978bab661aSEmmanuel Vadot const: addr_space 988bab661aSEmmanuel Vadot - description: 998bab661aSEmmanuel Vadot Vendor-specific CSR names. Consider using the generic names above 1008bab661aSEmmanuel Vadot for new bindings. 1018bab661aSEmmanuel Vadot oneOf: 1028bab661aSEmmanuel Vadot - description: See native 'elbi/app' CSR region for details. 103*0e8011faSEmmanuel Vadot enum: [ apb, link, appl ] 1048bab661aSEmmanuel Vadot - description: See native 'atu' CSR region for details. 1058bab661aSEmmanuel Vadot enum: [ atu_dma ] 1068bab661aSEmmanuel Vadot allOf: 1078bab661aSEmmanuel Vadot - contains: 1088bab661aSEmmanuel Vadot const: dbi 1098bab661aSEmmanuel Vadot - contains: 1108bab661aSEmmanuel Vadot const: addr_space 111354d7675SEmmanuel Vadot 1128bab661aSEmmanuel Vadot interrupts: 1138bab661aSEmmanuel Vadot description: 1148bab661aSEmmanuel Vadot There is no mandatory IRQ signals for the normal controller functioning, 1158bab661aSEmmanuel Vadot but in addition to the native set the platforms may have a link- or 1168bab661aSEmmanuel Vadot PM-related IRQs specified. 1178bab661aSEmmanuel Vadot minItems: 1 1188bab661aSEmmanuel Vadot maxItems: 20 119354d7675SEmmanuel Vadot 1208bab661aSEmmanuel Vadot interrupt-names: 1218bab661aSEmmanuel Vadot minItems: 1 1228bab661aSEmmanuel Vadot maxItems: 20 1238bab661aSEmmanuel Vadot items: 1248bab661aSEmmanuel Vadot oneOf: 1258bab661aSEmmanuel Vadot - description: 1268bab661aSEmmanuel Vadot Controller request to read or write virtual product data 1278bab661aSEmmanuel Vadot from/to the VPD capability registers. 1288bab661aSEmmanuel Vadot const: vpd 1298bab661aSEmmanuel Vadot - description: 1308bab661aSEmmanuel Vadot Link Equalization Request flag is set in the Link Status 2 1318bab661aSEmmanuel Vadot register (applicable if the corresponding IRQ is enabled in 1328bab661aSEmmanuel Vadot the Link Control 3 register). 1338bab661aSEmmanuel Vadot const: l_eq 1348bab661aSEmmanuel Vadot - description: 1358bab661aSEmmanuel Vadot Indicates that the eDMA Tx/Rx transfer is complete or that an 1368bab661aSEmmanuel Vadot error has occurred on the corresponding channel. eDMA can have 1378bab661aSEmmanuel Vadot eight Tx (Write) and Rx (Read) eDMA channels thus supporting up 1388bab661aSEmmanuel Vadot to 16 IRQ signals all together. Write eDMA channels shall go 1398bab661aSEmmanuel Vadot first in the ordered row as per default edma_int[*] bus setup. 1408bab661aSEmmanuel Vadot pattern: '^dma([0-9]|1[0-5])?$' 1418bab661aSEmmanuel Vadot - description: 1428bab661aSEmmanuel Vadot PCIe protocol correctable error or a Data Path protection 1438bab661aSEmmanuel Vadot correctable error is detected by the automotive/safety 1448bab661aSEmmanuel Vadot feature. 1458bab661aSEmmanuel Vadot const: sft_ce 1468bab661aSEmmanuel Vadot - description: 1478bab661aSEmmanuel Vadot Indicates that the internal safety mechanism has detected an 1488bab661aSEmmanuel Vadot uncorrectable error. 1498bab661aSEmmanuel Vadot const: sft_ue 1508bab661aSEmmanuel Vadot - description: 1518bab661aSEmmanuel Vadot Application-specific IRQ raised depending on the vendor-specific 1528bab661aSEmmanuel Vadot events basis. 1538bab661aSEmmanuel Vadot const: app 1548bab661aSEmmanuel Vadot - description: 155*0e8011faSEmmanuel Vadot Interrupts triggered when the controller itself (in Endpoint mode) 156*0e8011faSEmmanuel Vadot has sent an Assert_INT{A,B,C,D}/Desassert_INT{A,B,C,D} message to 157*0e8011faSEmmanuel Vadot the upstream device. 158*0e8011faSEmmanuel Vadot pattern: "^tx_int(a|b|c|d)$" 159*0e8011faSEmmanuel Vadot - description: 160*0e8011faSEmmanuel Vadot Combined interrupt signal raised when the controller has sent an 161*0e8011faSEmmanuel Vadot Assert_INT{A,B,C,D} message. See "^tx_int(a|b|c|d)$" for details. 162*0e8011faSEmmanuel Vadot const: legacy 163*0e8011faSEmmanuel Vadot - description: 1648bab661aSEmmanuel Vadot Vendor-specific IRQ names. Consider using the generic names above 1658bab661aSEmmanuel Vadot for new bindings. 1668bab661aSEmmanuel Vadot oneOf: 1678bab661aSEmmanuel Vadot - description: See native "app" IRQ for details 168*0e8011faSEmmanuel Vadot enum: [ intr, sys, pmc, msg, err ] 169354d7675SEmmanuel Vadot 1708bab661aSEmmanuel Vadot max-functions: 1718bab661aSEmmanuel Vadot maximum: 32 172354d7675SEmmanuel Vadot 173354d7675SEmmanuel Vadotrequired: 1748bab661aSEmmanuel Vadot - compatible 175354d7675SEmmanuel Vadot - reg 176354d7675SEmmanuel Vadot - reg-names 177354d7675SEmmanuel Vadot 178e67e8565SEmmanuel VadotadditionalProperties: true 179354d7675SEmmanuel Vadot 180354d7675SEmmanuel Vadotexamples: 181354d7675SEmmanuel Vadot - | 182354d7675SEmmanuel Vadot pcie-ep@dfd00000 { 183354d7675SEmmanuel Vadot compatible = "snps,dw-pcie-ep"; 184354d7675SEmmanuel Vadot reg = <0xdfc00000 0x0001000>, /* IP registers 1 */ 185354d7675SEmmanuel Vadot <0xdfc01000 0x0001000>, /* IP registers 2 */ 186354d7675SEmmanuel Vadot <0xd0000000 0x2000000>; /* Configuration space */ 187354d7675SEmmanuel Vadot reg-names = "dbi", "dbi2", "addr_space"; 1888bab661aSEmmanuel Vadot 1898bab661aSEmmanuel Vadot interrupts = <23>, <24>; 1908bab661aSEmmanuel Vadot interrupt-names = "dma0", "dma1"; 1918bab661aSEmmanuel Vadot 1928bab661aSEmmanuel Vadot clocks = <&sys_clk 12>, <&sys_clk 24>; 1938bab661aSEmmanuel Vadot clock-names = "dbi", "ref"; 1948bab661aSEmmanuel Vadot 1958bab661aSEmmanuel Vadot resets = <&sys_rst 12>, <&sys_rst 24>; 1968bab661aSEmmanuel Vadot reset-names = "dbi", "phy"; 1978bab661aSEmmanuel Vadot 1988bab661aSEmmanuel Vadot phys = <&pcie_phy0>, <&pcie_phy1>, <&pcie_phy2>, <&pcie_phy3>; 1998bab661aSEmmanuel Vadot phy-names = "pcie0", "pcie1", "pcie2", "pcie3"; 2008bab661aSEmmanuel Vadot 2018bab661aSEmmanuel Vadot max-link-speed = <3>; 2028bab661aSEmmanuel Vadot max-functions = /bits/ 8 <4>; 203354d7675SEmmanuel Vadot }; 204