xref: /linux/Documentation/devicetree/bindings/pci/baikal,bt1-pcie.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1*ce27c4e6SSerge Semin# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*ce27c4e6SSerge Semin%YAML 1.2
3*ce27c4e6SSerge Semin---
4*ce27c4e6SSerge Semin$id: http://devicetree.org/schemas/pci/baikal,bt1-pcie.yaml#
5*ce27c4e6SSerge Semin$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ce27c4e6SSerge Semin
7*ce27c4e6SSerge Semintitle: Baikal-T1 PCIe Root Port Controller
8*ce27c4e6SSerge Semin
9*ce27c4e6SSerge Seminmaintainers:
10*ce27c4e6SSerge Semin  - Serge Semin <fancer.lancer@gmail.com>
11*ce27c4e6SSerge Semin
12*ce27c4e6SSerge Semindescription:
13*ce27c4e6SSerge Semin  Embedded into Baikal-T1 SoC Root Complex controller with a single port
14*ce27c4e6SSerge Semin  activated. It's based on the DWC RC PCIe v4.60a IP-core, which is configured
15*ce27c4e6SSerge Semin  to have just a single Root Port function and is capable of establishing the
16*ce27c4e6SSerge Semin  link up to Gen.3 speed on x4 lanes. It doesn't have embedded clock and reset
17*ce27c4e6SSerge Semin  control module, so the proper interface initialization is supposed to be
18*ce27c4e6SSerge Semin  performed by software. There four in- and four outbound iATU regions
19*ce27c4e6SSerge Semin  which can be used to emit all required TLP types on the PCIe bus.
20*ce27c4e6SSerge Semin
21*ce27c4e6SSerge SeminallOf:
22*ce27c4e6SSerge Semin  - $ref: /schemas/pci/snps,dw-pcie.yaml#
23*ce27c4e6SSerge Semin
24*ce27c4e6SSerge Seminproperties:
25*ce27c4e6SSerge Semin  compatible:
26*ce27c4e6SSerge Semin    const: baikal,bt1-pcie
27*ce27c4e6SSerge Semin
28*ce27c4e6SSerge Semin  reg:
29*ce27c4e6SSerge Semin    description:
30*ce27c4e6SSerge Semin      DBI, DBI2 and at least 4KB outbound iATU-capable region for the
31*ce27c4e6SSerge Semin      peripheral devices CFG-space access.
32*ce27c4e6SSerge Semin    maxItems: 3
33*ce27c4e6SSerge Semin
34*ce27c4e6SSerge Semin  reg-names:
35*ce27c4e6SSerge Semin    items:
36*ce27c4e6SSerge Semin      - const: dbi
37*ce27c4e6SSerge Semin      - const: dbi2
38*ce27c4e6SSerge Semin      - const: config
39*ce27c4e6SSerge Semin
40*ce27c4e6SSerge Semin  interrupts:
41*ce27c4e6SSerge Semin    description:
42*ce27c4e6SSerge Semin      MSI, AER, PME, Hot-plug, Link Bandwidth Management, Link Equalization
43*ce27c4e6SSerge Semin      request and eight Read/Write eDMA IRQ lines are available.
44*ce27c4e6SSerge Semin    maxItems: 14
45*ce27c4e6SSerge Semin
46*ce27c4e6SSerge Semin  interrupt-names:
47*ce27c4e6SSerge Semin    items:
48*ce27c4e6SSerge Semin      - const: dma0
49*ce27c4e6SSerge Semin      - const: dma1
50*ce27c4e6SSerge Semin      - const: dma2
51*ce27c4e6SSerge Semin      - const: dma3
52*ce27c4e6SSerge Semin      - const: dma4
53*ce27c4e6SSerge Semin      - const: dma5
54*ce27c4e6SSerge Semin      - const: dma6
55*ce27c4e6SSerge Semin      - const: dma7
56*ce27c4e6SSerge Semin      - const: msi
57*ce27c4e6SSerge Semin      - const: aer
58*ce27c4e6SSerge Semin      - const: pme
59*ce27c4e6SSerge Semin      - const: hp
60*ce27c4e6SSerge Semin      - const: bw_mg
61*ce27c4e6SSerge Semin      - const: l_eq
62*ce27c4e6SSerge Semin
63*ce27c4e6SSerge Semin  clocks:
64*ce27c4e6SSerge Semin    description:
65*ce27c4e6SSerge Semin      DBI (attached to the APB bus), AXI-bus master and slave interfaces
66*ce27c4e6SSerge Semin      are fed up by the dedicated application clocks. A common reference
67*ce27c4e6SSerge Semin      clock signal is supposed to be attached to the corresponding Ref-pad
68*ce27c4e6SSerge Semin      of the SoC. It will be redistributed amongst the controller core
69*ce27c4e6SSerge Semin      sub-modules (pipe, core, aux, etc).
70*ce27c4e6SSerge Semin    maxItems: 4
71*ce27c4e6SSerge Semin
72*ce27c4e6SSerge Semin  clock-names:
73*ce27c4e6SSerge Semin    items:
74*ce27c4e6SSerge Semin      - const: dbi
75*ce27c4e6SSerge Semin      - const: mstr
76*ce27c4e6SSerge Semin      - const: slv
77*ce27c4e6SSerge Semin      - const: ref
78*ce27c4e6SSerge Semin
79*ce27c4e6SSerge Semin  resets:
80*ce27c4e6SSerge Semin    description:
81*ce27c4e6SSerge Semin      A comprehensive controller reset logic is supposed to be implemented
82*ce27c4e6SSerge Semin      by software, so almost all the possible application and core reset
83*ce27c4e6SSerge Semin      signals are exposed via the system CCU module.
84*ce27c4e6SSerge Semin    maxItems: 9
85*ce27c4e6SSerge Semin
86*ce27c4e6SSerge Semin  reset-names:
87*ce27c4e6SSerge Semin    items:
88*ce27c4e6SSerge Semin      - const: mstr
89*ce27c4e6SSerge Semin      - const: slv
90*ce27c4e6SSerge Semin      - const: pwr
91*ce27c4e6SSerge Semin      - const: hot
92*ce27c4e6SSerge Semin      - const: phy
93*ce27c4e6SSerge Semin      - const: core
94*ce27c4e6SSerge Semin      - const: pipe
95*ce27c4e6SSerge Semin      - const: sticky
96*ce27c4e6SSerge Semin      - const: non-sticky
97*ce27c4e6SSerge Semin
98*ce27c4e6SSerge Semin  baikal,bt1-syscon:
99*ce27c4e6SSerge Semin    $ref: /schemas/types.yaml#/definitions/phandle
100*ce27c4e6SSerge Semin    description:
101*ce27c4e6SSerge Semin      Phandle to the Baikal-T1 System Controller DT node. It's required to
102*ce27c4e6SSerge Semin      access some additional PM, Reset-related and LTSSM signals.
103*ce27c4e6SSerge Semin
104*ce27c4e6SSerge Semin  num-lanes:
105*ce27c4e6SSerge Semin    maximum: 4
106*ce27c4e6SSerge Semin
107*ce27c4e6SSerge Semin  max-link-speed:
108*ce27c4e6SSerge Semin    maximum: 3
109*ce27c4e6SSerge Semin
110*ce27c4e6SSerge Seminrequired:
111*ce27c4e6SSerge Semin  - compatible
112*ce27c4e6SSerge Semin  - reg
113*ce27c4e6SSerge Semin  - reg-names
114*ce27c4e6SSerge Semin  - interrupts
115*ce27c4e6SSerge Semin  - interrupt-names
116*ce27c4e6SSerge Semin
117*ce27c4e6SSerge SeminunevaluatedProperties: false
118*ce27c4e6SSerge Semin
119*ce27c4e6SSerge Seminexamples:
120*ce27c4e6SSerge Semin  - |
121*ce27c4e6SSerge Semin    #include <dt-bindings/interrupt-controller/mips-gic.h>
122*ce27c4e6SSerge Semin    #include <dt-bindings/gpio/gpio.h>
123*ce27c4e6SSerge Semin
124*ce27c4e6SSerge Semin    pcie@1f052000 {
125*ce27c4e6SSerge Semin      compatible = "baikal,bt1-pcie";
126*ce27c4e6SSerge Semin      device_type = "pci";
127*ce27c4e6SSerge Semin      reg = <0x1f052000 0x1000>, <0x1f053000 0x1000>, <0x1bdbf000 0x1000>;
128*ce27c4e6SSerge Semin      reg-names = "dbi", "dbi2", "config";
129*ce27c4e6SSerge Semin      #address-cells = <3>;
130*ce27c4e6SSerge Semin      #size-cells = <2>;
131*ce27c4e6SSerge Semin      ranges = <0x81000000 0 0x00000000 0x1bdb0000 0 0x00008000>,
132*ce27c4e6SSerge Semin               <0x82000000 0 0x20000000 0x08000000 0 0x13db0000>;
133*ce27c4e6SSerge Semin      bus-range = <0x0 0xff>;
134*ce27c4e6SSerge Semin
135*ce27c4e6SSerge Semin      interrupts = <GIC_SHARED 80 IRQ_TYPE_LEVEL_HIGH>,
136*ce27c4e6SSerge Semin                   <GIC_SHARED 81 IRQ_TYPE_LEVEL_HIGH>,
137*ce27c4e6SSerge Semin                   <GIC_SHARED 82 IRQ_TYPE_LEVEL_HIGH>,
138*ce27c4e6SSerge Semin                   <GIC_SHARED 83 IRQ_TYPE_LEVEL_HIGH>,
139*ce27c4e6SSerge Semin                   <GIC_SHARED 84 IRQ_TYPE_LEVEL_HIGH>,
140*ce27c4e6SSerge Semin                   <GIC_SHARED 85 IRQ_TYPE_LEVEL_HIGH>,
141*ce27c4e6SSerge Semin                   <GIC_SHARED 86 IRQ_TYPE_LEVEL_HIGH>,
142*ce27c4e6SSerge Semin                   <GIC_SHARED 87 IRQ_TYPE_LEVEL_HIGH>,
143*ce27c4e6SSerge Semin                   <GIC_SHARED 88 IRQ_TYPE_LEVEL_HIGH>,
144*ce27c4e6SSerge Semin                   <GIC_SHARED 89 IRQ_TYPE_LEVEL_HIGH>,
145*ce27c4e6SSerge Semin                   <GIC_SHARED 90 IRQ_TYPE_LEVEL_HIGH>,
146*ce27c4e6SSerge Semin                   <GIC_SHARED 91 IRQ_TYPE_LEVEL_HIGH>,
147*ce27c4e6SSerge Semin                   <GIC_SHARED 92 IRQ_TYPE_LEVEL_HIGH>,
148*ce27c4e6SSerge Semin                   <GIC_SHARED 93 IRQ_TYPE_LEVEL_HIGH>;
149*ce27c4e6SSerge Semin      interrupt-names = "dma0", "dma1", "dma2", "dma3",
150*ce27c4e6SSerge Semin                        "dma4", "dma5", "dma6", "dma7",
151*ce27c4e6SSerge Semin                        "msi", "aer", "pme", "hp", "bw_mg",
152*ce27c4e6SSerge Semin                        "l_eq";
153*ce27c4e6SSerge Semin
154*ce27c4e6SSerge Semin      clocks = <&ccu_sys 1>, <&ccu_axi 6>, <&ccu_axi 7>, <&clk_pcie>;
155*ce27c4e6SSerge Semin      clock-names = "dbi", "mstr", "slv", "ref";
156*ce27c4e6SSerge Semin
157*ce27c4e6SSerge Semin      resets = <&ccu_axi 6>, <&ccu_axi 7>, <&ccu_sys 7>, <&ccu_sys 10>,
158*ce27c4e6SSerge Semin               <&ccu_sys 4>, <&ccu_sys 6>, <&ccu_sys 5>, <&ccu_sys 8>,
159*ce27c4e6SSerge Semin               <&ccu_sys 9>;
160*ce27c4e6SSerge Semin      reset-names = "mstr", "slv", "pwr", "hot", "phy", "core", "pipe",
161*ce27c4e6SSerge Semin                    "sticky", "non-sticky";
162*ce27c4e6SSerge Semin
163*ce27c4e6SSerge Semin      reset-gpios = <&port0 0 GPIO_ACTIVE_LOW>;
164*ce27c4e6SSerge Semin
165*ce27c4e6SSerge Semin      num-lanes = <4>;
166*ce27c4e6SSerge Semin      max-link-speed = <3>;
167*ce27c4e6SSerge Semin    };
168*ce27c4e6SSerge Semin...
169