1057646a5SSerge Semin# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2057646a5SSerge Semin%YAML 1.2
3057646a5SSerge Semin---
4057646a5SSerge Semin$id: http://devicetree.org/schemas/pci/snps,dw-pcie-common.yaml#
5057646a5SSerge Semin$schema: http://devicetree.org/meta-schemas/core.yaml#
6057646a5SSerge Semin
7057646a5SSerge Semintitle: Synopsys DWC PCIe RP/EP controller
8057646a5SSerge Semin
9057646a5SSerge Seminmaintainers:
10057646a5SSerge Semin  - Jingoo Han <jingoohan1@gmail.com>
11057646a5SSerge Semin  - Gustavo Pimentel <gustavo.pimentel@synopsys.com>
12057646a5SSerge Semin
13057646a5SSerge Semindescription:
14057646a5SSerge Semin  Generic Synopsys DesignWare PCIe Root Port and Endpoint controller
15057646a5SSerge Semin  properties.
16057646a5SSerge Semin
17057646a5SSerge Seminselect: false
18057646a5SSerge Semin
19057646a5SSerge Seminproperties:
204cc13eedSSerge Semin  reg:
214cc13eedSSerge Semin    description:
224cc13eedSSerge Semin      DWC PCIe CSR space is normally accessed over the dedicated Data Bus
234cc13eedSSerge Semin      Interface - DBI. In accordance with the reference manual the register
244cc13eedSSerge Semin      configuration space belongs to the Configuration-Dependent Module (CDM)
254cc13eedSSerge Semin      and is split up into several sub-parts Standard PCIe configuration
264cc13eedSSerge Semin      space, Port Logic Registers (PL), Shadow Config-space Registers,
274cc13eedSSerge Semin      iATU/eDMA registers. The particular sub-space is selected by the
284cc13eedSSerge Semin      CDM/ELBI (dbi_cs) and CS2 (dbi_cs2) signals (selector bits). Such
294cc13eedSSerge Semin      configuration provides a flexible interface for the system engineers to
304cc13eedSSerge Semin      either map the particular space at a desired MMIO address or just leave
314cc13eedSSerge Semin      them in a contiguous memory space if pure Native or AXI Bridge DBI access
324cc13eedSSerge Semin      is selected. Note the PCIe CFG-space, PL and Shadow registers are
334cc13eedSSerge Semin      specific for each activated function, while the rest of the sub-spaces
344cc13eedSSerge Semin      are common for all of them (if there are more than one).
354cc13eedSSerge Semin    minItems: 2
364cc13eedSSerge Semin    maxItems: 6
374cc13eedSSerge Semin
384cc13eedSSerge Semin  reg-names:
394cc13eedSSerge Semin    minItems: 2
404cc13eedSSerge Semin    maxItems: 6
414cc13eedSSerge Semin
4235486813SSerge Semin  interrupts:
4335486813SSerge Semin    description:
4435486813SSerge Semin      There are two main sub-blocks which are normally capable of
4535486813SSerge Semin      generating interrupts. It's System Information Interface and MSI
4635486813SSerge Semin      interface. While the former one has some common for the Host and
4735486813SSerge Semin      Endpoint controllers IRQ-signals, the later interface is obviously
4835486813SSerge Semin      Root Complex specific since it's responsible for the incoming MSI
4935486813SSerge Semin      messages signalling. The System Information IRQ signals are mainly
5035486813SSerge Semin      responsible for reporting the generic PCIe hierarchy and Root
5135486813SSerge Semin      Complex events like VPD IO request, general AER, PME, Hot-plug, link
5235486813SSerge Semin      bandwidth change, link equalization request, INTx asserted/deasserted
5335486813SSerge Semin      Message detection, embedded DMA Tx/Rx/Error.
5435486813SSerge Semin    minItems: 1
5535486813SSerge Semin    maxItems: 26
5635486813SSerge Semin
5735486813SSerge Semin  interrupt-names:
5835486813SSerge Semin    minItems: 1
5935486813SSerge Semin    maxItems: 26
6035486813SSerge Semin
61*bd9504afSSerge Semin  clocks:
62*bd9504afSSerge Semin    description:
63*bd9504afSSerge Semin      DWC PCIe reference manual explicitly defines a set of the clocks required
64*bd9504afSSerge Semin      to get the controller working correctly. In general all of them can
65*bd9504afSSerge Semin      be divided into two groups':' application and core clocks. Note the
66*bd9504afSSerge Semin      platforms may have some of the clock sources unspecified in case if the
67*bd9504afSSerge Semin      corresponding domains are fed up from a common clock source.
68*bd9504afSSerge Semin    minItems: 1
69*bd9504afSSerge Semin    maxItems: 7
70*bd9504afSSerge Semin
71*bd9504afSSerge Semin  clock-names:
72*bd9504afSSerge Semin    minItems: 1
73*bd9504afSSerge Semin    maxItems: 7
74*bd9504afSSerge Semin    items:
75*bd9504afSSerge Semin      oneOf:
76*bd9504afSSerge Semin        - description:
77*bd9504afSSerge Semin            Data Bus Interface (DBI) clock. Clock signal for the AXI-bus
78*bd9504afSSerge Semin            interface of the Configuration-Dependent Module, which is
79*bd9504afSSerge Semin            basically the set of the controller CSRs.
80*bd9504afSSerge Semin          const: dbi
81*bd9504afSSerge Semin        - description:
82*bd9504afSSerge Semin            Application AXI-bus Master interface clock. Basically this is
83*bd9504afSSerge Semin            a clock for the controller DMA interface (PCI-to-CPU).
84*bd9504afSSerge Semin          const: mstr
85*bd9504afSSerge Semin        - description:
86*bd9504afSSerge Semin            Application AXI-bus Slave interface clock. This is a clock for
87*bd9504afSSerge Semin            the CPU-to-PCI memory IO interface.
88*bd9504afSSerge Semin          const: slv
89*bd9504afSSerge Semin        - description:
90*bd9504afSSerge Semin            Controller Core-PCS PIPE interface clock. It's normally
91*bd9504afSSerge Semin            supplied by an external PCS-PHY.
92*bd9504afSSerge Semin          const: pipe
93*bd9504afSSerge Semin        - description:
94*bd9504afSSerge Semin            Controller Primary clock. It's assumed that all controller input
95*bd9504afSSerge Semin            signals (except resets) are synchronous to this clock.
96*bd9504afSSerge Semin          const: core
97*bd9504afSSerge Semin        - description:
98*bd9504afSSerge Semin            Auxiliary clock for the controller PMC domain. The controller
99*bd9504afSSerge Semin            partitioning implies having some parts to operate with this
100*bd9504afSSerge Semin            clock in some power management states.
101*bd9504afSSerge Semin          const: aux
102*bd9504afSSerge Semin        - description:
103*bd9504afSSerge Semin            Generic reference clock. In case if there are several
104*bd9504afSSerge Semin            interfaces fed up with a common clock source it's advisable to
105*bd9504afSSerge Semin            define it with this name (for instance pipe, core and aux can
106*bd9504afSSerge Semin            be connected to a single source of the periodic signal).
107*bd9504afSSerge Semin          const: ref
108*bd9504afSSerge Semin        - description:
109*bd9504afSSerge Semin            Clock for the PHY registers interface. Originally this is
110*bd9504afSSerge Semin            a PHY-viewport-based interface, but some platform may have
111*bd9504afSSerge Semin            specifically designed one.
112*bd9504afSSerge Semin          const: phy_reg
113*bd9504afSSerge Semin        - description:
114*bd9504afSSerge Semin            Vendor-specific clock names. Consider using the generic names
115*bd9504afSSerge Semin            above for new bindings.
116*bd9504afSSerge Semin          oneOf:
117*bd9504afSSerge Semin            - description: See native 'dbi' clock for details
118*bd9504afSSerge Semin              enum: [ pcie, pcie_apb_sys, aclk_dbi ]
119*bd9504afSSerge Semin            - description: See native 'mstr/slv' clock for details
120*bd9504afSSerge Semin              enum: [ pcie_bus, pcie_inbound_axi, pcie_aclk, aclk_mst, aclk_slv ]
121*bd9504afSSerge Semin            - description: See native 'pipe' clock for details
122*bd9504afSSerge Semin              enum: [ pcie_phy, pcie_phy_ref, link ]
123*bd9504afSSerge Semin            - description: See native 'aux' clock for details
124*bd9504afSSerge Semin              enum: [ pcie_aux ]
125*bd9504afSSerge Semin            - description: See native 'ref' clock for details.
126*bd9504afSSerge Semin              enum: [ gio ]
127*bd9504afSSerge Semin            - description: See nativs 'phy_reg' clock for details
128*bd9504afSSerge Semin              enum: [ pcie_apb_phy, pclk ]
129*bd9504afSSerge Semin
130*bd9504afSSerge Semin  resets:
131*bd9504afSSerge Semin    description:
132*bd9504afSSerge Semin      DWC PCIe reference manual explicitly defines a set of the reset
133*bd9504afSSerge Semin      signals required to be de-asserted to properly activate the controller
134*bd9504afSSerge Semin      sub-parts. All of these signals can be divided into two sub-groups':'
135*bd9504afSSerge Semin      application and core resets with respect to the main sub-domains they
136*bd9504afSSerge Semin      are supposed to reset. Note the platforms may have some of these signals
137*bd9504afSSerge Semin      unspecified in case if they are automatically handled or aggregated into
138*bd9504afSSerge Semin      a comprehensive control module.
139*bd9504afSSerge Semin    minItems: 1
140*bd9504afSSerge Semin    maxItems: 10
141*bd9504afSSerge Semin
142*bd9504afSSerge Semin  reset-names:
143*bd9504afSSerge Semin    minItems: 1
144*bd9504afSSerge Semin    maxItems: 10
145*bd9504afSSerge Semin    items:
146*bd9504afSSerge Semin      oneOf:
147*bd9504afSSerge Semin        - description: Data Bus Interface (DBI) domain reset
148*bd9504afSSerge Semin          const: dbi
149*bd9504afSSerge Semin        - description: AXI-bus Master interface reset
150*bd9504afSSerge Semin          const: mstr
151*bd9504afSSerge Semin        - description: AXI-bus Slave interface reset
152*bd9504afSSerge Semin          const: slv
153*bd9504afSSerge Semin        - description: Application-dependent interface reset
154*bd9504afSSerge Semin          const: app
155*bd9504afSSerge Semin        - description: Controller Non-sticky CSR flags reset
156*bd9504afSSerge Semin          const: non-sticky
157*bd9504afSSerge Semin        - description: Controller sticky CSR flags reset
158*bd9504afSSerge Semin          const: sticky
159*bd9504afSSerge Semin        - description: PIPE-interface (Core-PCS) logic reset
160*bd9504afSSerge Semin          const: pipe
161*bd9504afSSerge Semin        - description:
162*bd9504afSSerge Semin            Controller primary reset (resets everything except PMC module)
163*bd9504afSSerge Semin          const: core
164*bd9504afSSerge Semin        - description: PCS/PHY block reset
165*bd9504afSSerge Semin          const: phy
166*bd9504afSSerge Semin        - description: PMC hot reset signal
167*bd9504afSSerge Semin          const: hot
168*bd9504afSSerge Semin        - description: Cold reset signal
169*bd9504afSSerge Semin          const: pwr
170*bd9504afSSerge Semin        - description:
171*bd9504afSSerge Semin            Vendor-specific reset names. Consider using the generic names
172*bd9504afSSerge Semin            above for new bindings.
173*bd9504afSSerge Semin          oneOf:
174*bd9504afSSerge Semin            - description: See native 'app' reset for details
175*bd9504afSSerge Semin              enum: [ apps, gio, apb ]
176*bd9504afSSerge Semin            - description: See native 'phy' reset for details
177*bd9504afSSerge Semin              enum: [ pciephy, link ]
178*bd9504afSSerge Semin            - description: See native 'pwr' reset for details
179*bd9504afSSerge Semin              enum: [ turnoff ]
180*bd9504afSSerge Semin
18187559636SSerge Semin  phys:
18287559636SSerge Semin    description:
18387559636SSerge Semin      There can be up to the number of possible lanes PHYs specified placed in
18487559636SSerge Semin      the phandle array in the line-based order. Obviously each the specified
18587559636SSerge Semin      PHYs are supposed to be able to work in the PCIe mode with a speed
18687559636SSerge Semin      implied by the DWC PCIe controller they are attached to.
18787559636SSerge Semin    minItems: 1
18887559636SSerge Semin    maxItems: 16
18987559636SSerge Semin
19087559636SSerge Semin  phy-names:
19187559636SSerge Semin    minItems: 1
19287559636SSerge Semin    maxItems: 16
19387559636SSerge Semin    oneOf:
19487559636SSerge Semin      - description: Generic PHY names
19587559636SSerge Semin        items:
19687559636SSerge Semin          pattern: '^pcie[0-9]+$'
19787559636SSerge Semin      - description:
19887559636SSerge Semin          Vendor-specific PHY names. Consider using the generic
19987559636SSerge Semin          names above for new bindings.
20087559636SSerge Semin        items:
20187559636SSerge Semin          oneOf:
20287559636SSerge Semin            - pattern: '^pcie(-?phy[0-9]*)?$'
20387559636SSerge Semin            - pattern: '^p2u-[0-7]$'
20487559636SSerge Semin
205057646a5SSerge Semin  reset-gpio:
206057646a5SSerge Semin    deprecated: true
207057646a5SSerge Semin    description:
208057646a5SSerge Semin      Reference to the GPIO-controlled PERST# signal. It is used to reset all
209057646a5SSerge Semin      the peripheral devices available on the PCIe bus.
210057646a5SSerge Semin    maxItems: 1
211057646a5SSerge Semin
212057646a5SSerge Semin  reset-gpios:
213057646a5SSerge Semin    description:
214057646a5SSerge Semin      Reference to the GPIO-controlled PERST# signal. It is used to reset all
215057646a5SSerge Semin      the peripheral devices available on the PCIe bus.
216057646a5SSerge Semin    maxItems: 1
217057646a5SSerge Semin
218eaa9d886SSerge Semin  max-link-speed:
219eaa9d886SSerge Semin    maximum: 5
220eaa9d886SSerge Semin
221057646a5SSerge Semin  num-lanes:
222057646a5SSerge Semin    description:
223057646a5SSerge Semin      Number of PCIe link lanes to use. Can be omitted if the already brought
224057646a5SSerge Semin      up link is supposed to be preserved.
225057646a5SSerge Semin    maximum: 16
226057646a5SSerge Semin
227057646a5SSerge Semin  num-ob-windows:
228057646a5SSerge Semin    $ref: /schemas/types.yaml#/definitions/uint32
229057646a5SSerge Semin    deprecated: true
230057646a5SSerge Semin    description:
231057646a5SSerge Semin      Number of outbound address translation windows. This parameter can be
232057646a5SSerge Semin      auto-detected based on the iATU memory writability. So there is no
233057646a5SSerge Semin      point in having a dedicated DT-property for it.
234057646a5SSerge Semin    maximum: 256
235057646a5SSerge Semin
236057646a5SSerge Semin  num-ib-windows:
237057646a5SSerge Semin    $ref: /schemas/types.yaml#/definitions/uint32
238057646a5SSerge Semin    deprecated: true
239057646a5SSerge Semin    description:
240057646a5SSerge Semin      Number of inbound address translation windows. In the same way as
241057646a5SSerge Semin      for the outbound AT windows, this parameter can be auto-detected based
242057646a5SSerge Semin      on the iATU memory writability. There is no point having a dedicated
243057646a5SSerge Semin      DT-property for it either.
244057646a5SSerge Semin    maximum: 256
245057646a5SSerge Semin
246057646a5SSerge Semin  num-viewport:
247057646a5SSerge Semin    $ref: /schemas/types.yaml#/definitions/uint32
248057646a5SSerge Semin    deprecated: true
249057646a5SSerge Semin    description:
250057646a5SSerge Semin      Number of outbound view ports configured in hardware. It's the same as
251057646a5SSerge Semin      the number of outbound AT windows.
252057646a5SSerge Semin    maximum: 256
253057646a5SSerge Semin
254057646a5SSerge Semin  snps,enable-cdm-check:
255057646a5SSerge Semin    $ref: /schemas/types.yaml#/definitions/flag
256057646a5SSerge Semin    description:
257057646a5SSerge Semin      Enable automatic checking of CDM (Configuration Dependent Module)
258057646a5SSerge Semin      registers for data corruption. CDM registers include standard PCIe
259057646a5SSerge Semin      configuration space registers, Port Logic registers, DMA and iATU
260057646a5SSerge Semin      registers. This feature has been available since DWC PCIe v4.80a.
261057646a5SSerge Semin
262057646a5SSerge SeminadditionalProperties: true
263057646a5SSerge Semin
264057646a5SSerge Semin...
265