xref: /linux/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml (revision 1a34340ad6a4bcb0ec215d69d0f1e66e000e406e)
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:
1084cc13eedSSerge Semin            - description: See native 'elbi/app' CSR region for details.
1094cc13eedSSerge Semin              enum: [ apb, mgmt, link, ulreg, appl ]
1104cc13eedSSerge Semin            - description: See native 'atu' CSR region for details.
1114cc13eedSSerge Semin              enum: [ atu_dma ]
1124cc13eedSSerge Semin            - description: Syscon-related CSR regions.
1134cc13eedSSerge Semin              enum: [ smu, mpu ]
114c7020e1bSLinus Torvalds            - description: Tegra234 aperture
115c7020e1bSLinus Torvalds              enum: [ ecam ]
116*1a34340aSThippeswamy Havalige            - description: AMD MDB PCIe SLCR region
117*1a34340aSThippeswamy Havalige              const: slcr
1184cc13eedSSerge Semin    allOf:
1194cc13eedSSerge Semin      - contains:
1204cc13eedSSerge Semin          const: dbi
1214cc13eedSSerge Semin      - contains:
1224cc13eedSSerge Semin          const: config
12342694f9fSMauro Carvalho Chehab
12435486813SSerge Semin  interrupts:
12535486813SSerge Semin    description:
12635486813SSerge Semin      DWC PCIe Root Port/Complex specific IRQ signals. At least MSI interrupt
12735486813SSerge Semin      signal is supposed to be specified for the host controller.
12835486813SSerge Semin    minItems: 1
12935486813SSerge Semin    maxItems: 26
13042694f9fSMauro Carvalho Chehab
13135486813SSerge Semin  interrupt-names:
13235486813SSerge Semin    minItems: 1
13335486813SSerge Semin    maxItems: 26
13435486813SSerge Semin    items:
13535486813SSerge Semin      oneOf:
13635486813SSerge Semin        - description:
13735486813SSerge Semin            Controller request to read or write virtual product data
13835486813SSerge Semin            from/to the VPD capability registers.
13935486813SSerge Semin          const: vpd
14035486813SSerge Semin        - description:
14135486813SSerge Semin            Link Equalization Request flag is set in the Link Status 2
14235486813SSerge Semin            register (applicable if the corresponding IRQ is enabled in
14335486813SSerge Semin            the Link Control 3 register).
14435486813SSerge Semin          const: l_eq
14535486813SSerge Semin        - description:
14635486813SSerge Semin            Indicates that the eDMA Tx/Rx transfer is complete or that an
14735486813SSerge Semin            error has occurred on the corresponding channel. eDMA can have
14835486813SSerge Semin            eight Tx (Write) and Rx (Read) eDMA channels thus supporting up
14935486813SSerge Semin            to 16 IRQ signals all together. Write eDMA channels shall go
15035486813SSerge Semin            first in the ordered row as per default edma_int[*] bus setup.
15135486813SSerge Semin          pattern: '^dma([0-9]|1[0-5])?$'
15235486813SSerge Semin        - description:
15335486813SSerge Semin            PCIe protocol correctable error or a Data Path protection
15435486813SSerge Semin            correctable error is detected by the automotive/safety
15535486813SSerge Semin            feature.
15635486813SSerge Semin          const: sft_ce
15735486813SSerge Semin        - description:
15835486813SSerge Semin            Indicates that the internal safety mechanism has detected an
15935486813SSerge Semin            uncorrectable error.
16035486813SSerge Semin          const: sft_ue
16135486813SSerge Semin        - description:
16235486813SSerge Semin            Application-specific IRQ raised depending on the vendor-specific
16335486813SSerge Semin            events basis.
16435486813SSerge Semin          const: app
16535486813SSerge Semin        - description:
16635486813SSerge Semin            DSP AXI MSI Interrupt detected. It gets de-asserted when there is
16735486813SSerge Semin            no more MSI interrupt pending. The interrupt is relevant to the
16835486813SSerge Semin            iMSI-RX - Integrated MSI Receiver (AXI bridge).
16935486813SSerge Semin          const: msi
17035486813SSerge Semin        - description:
17135486813SSerge Semin            Legacy A/B/C/D interrupt signal. Basically it's triggered by
17235486813SSerge Semin            receiving a Assert_INT{A,B,C,D}/Desassert_INT{A,B,C,D} message
17335486813SSerge Semin            from the downstream device.
17435486813SSerge Semin          pattern: "^int(a|b|c|d)$"
17535486813SSerge Semin        - description:
17635486813SSerge Semin            Error condition detected and a flag is set in the Root Error Status
17735486813SSerge Semin            register of the AER capability. It's asserted when the RC
17835486813SSerge Semin            internally generated an error or an error message is received by
17935486813SSerge Semin            the RC.
18035486813SSerge Semin          const: aer
18135486813SSerge Semin        - description:
18235486813SSerge Semin            PME message is received by the port. That means having the PME
18335486813SSerge Semin            status bit set in the Root Status register (the event is
18435486813SSerge Semin            supposed to be unmasked in the Root Control register).
18535486813SSerge Semin          const: pme
18635486813SSerge Semin        - description:
18735486813SSerge Semin            Hot-plug event is detected. That is a bit has been set in the
18835486813SSerge Semin            Slot Status register and the corresponding event is enabled in
18935486813SSerge Semin            the Slot Control register.
19035486813SSerge Semin          const: hp
19135486813SSerge Semin        - description:
19235486813SSerge Semin            Link Autonomous Bandwidth Status flag has been set in the Link
19335486813SSerge Semin            Status register (the event is supposed to be unmasked in the
19435486813SSerge Semin            Link Control register).
19535486813SSerge Semin          const: bw_au
19635486813SSerge Semin        - description:
19735486813SSerge Semin            Bandwidth Management Status flag has been set in the Link
19835486813SSerge Semin            Status register (the event is supposed to be unmasked in the
19935486813SSerge Semin            Link Control register).
20035486813SSerge Semin          const: bw_mg
20135486813SSerge Semin        - description:
202591d3833SSebastian Reichel            Combined Legacy A/B/C/D interrupt signal. See "^int(a|b|c|d)$" for
203591d3833SSebastian Reichel            details.
204591d3833SSebastian Reichel          const: legacy
205591d3833SSebastian Reichel        - description:
20635486813SSerge Semin            Vendor-specific IRQ names. Consider using the generic names above
20735486813SSerge Semin            for new bindings.
20835486813SSerge Semin          oneOf:
20935486813SSerge Semin            - description: See native "app" IRQ for details
210591d3833SSebastian Reichel              enum: [ intr, sys, pmc, msg, err ]
21142694f9fSMauro Carvalho Chehab
212b92225b0SRob HerringadditionalProperties: true
21342694f9fSMauro Carvalho Chehab
21442694f9fSMauro Carvalho Chehabrequired:
215f133396eSSerge Semin  - compatible
21642694f9fSMauro Carvalho Chehab  - reg
21742694f9fSMauro Carvalho Chehab  - reg-names
21842694f9fSMauro Carvalho Chehab
21942694f9fSMauro Carvalho Chehabexamples:
22042694f9fSMauro Carvalho Chehab  - |
22142694f9fSMauro Carvalho Chehab    pcie@dfc00000 {
22242694f9fSMauro Carvalho Chehab      compatible = "snps,dw-pcie";
223b9fe9985SSerge Semin      device_type = "pci";
22442694f9fSMauro Carvalho Chehab      reg = <0xdfc00000 0x0001000>, /* IP registers */
22542694f9fSMauro Carvalho Chehab            <0xd0000000 0x0002000>; /* Configuration space */
22642694f9fSMauro Carvalho Chehab      reg-names = "dbi", "config";
22742694f9fSMauro Carvalho Chehab      #address-cells = <3>;
22842694f9fSMauro Carvalho Chehab      #size-cells = <2>;
22942694f9fSMauro Carvalho Chehab      ranges = <0x81000000 0 0x00000000 0xde000000 0 0x00010000>,
23042694f9fSMauro Carvalho Chehab               <0x82000000 0 0xd0400000 0xd0400000 0 0x0d000000>;
231b9fe9985SSerge Semin      bus-range = <0x0 0xff>;
232b9fe9985SSerge Semin
23342694f9fSMauro Carvalho Chehab      interrupts = <25>, <24>;
23435486813SSerge Semin      interrupt-names = "msi", "hp";
235b9fe9985SSerge Semin
236b9fe9985SSerge Semin      reset-gpios = <&port0 0 1>;
237b9fe9985SSerge Semin
23887559636SSerge Semin      phys = <&pcie_phy>;
23987559636SSerge Semin      phy-names = "pcie";
24087559636SSerge Semin
24142694f9fSMauro Carvalho Chehab      num-lanes = <1>;
242eaa9d886SSerge Semin      max-link-speed = <3>;
24342694f9fSMauro Carvalho Chehab    };
244