1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
3%YAML 1.2
4---
5$id: "http://devicetree.org/schemas/pci/ti,j721e-pci-host.yaml#"
6$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8title: TI J721E PCI Host (PCIe Wrapper)
9
10maintainers:
11  - Kishon Vijay Abraham I <kishon@ti.com>
12
13allOf:
14  - $ref: "cdns-pcie-host.yaml#"
15
16properties:
17  compatible:
18    oneOf:
19      - const: ti,j721e-pcie-host
20      - description: PCIe controller in AM64
21        items:
22          - const: ti,am64-pcie-host
23          - const: ti,j721e-pcie-host
24      - description: PCIe controller in J7200
25        items:
26          - const: ti,j7200-pcie-host
27          - const: ti,j721e-pcie-host
28
29  reg:
30    maxItems: 4
31
32  reg-names:
33    items:
34      - const: intd_cfg
35      - const: user_cfg
36      - const: reg
37      - const: cfg
38
39  ti,syscon-pcie-ctrl:
40    $ref: /schemas/types.yaml#/definitions/phandle-array
41    items:
42      - items:
43          - description: Phandle to the SYSCON entry
44          - description: pcie_ctrl register offset within SYSCON
45    description: Specifier for configuring PCIe mode and link speed.
46
47  power-domains:
48    maxItems: 1
49
50  clocks:
51    minItems: 1
52    maxItems: 2
53    description: |+
54      clock-specifier to represent input to the PCIe for 1 item.
55      2nd item if present represents reference clock to the connector.
56
57  clock-names:
58    minItems: 1
59    items:
60      - const: fck
61      - const: pcie_refclk
62
63  dma-coherent: true
64
65  vendor-id:
66    const: 0x104c
67
68  device-id:
69    oneOf:
70      - items:
71          - const: 0xb00d
72      - items:
73          - const: 0xb00f
74      - items:
75          - const: 0xb010
76      - items:
77          - const: 0xb013
78
79  msi-map: true
80
81  interrupts:
82    maxItems: 1
83
84  interrupt-names:
85    items:
86      - const: link_state
87
88  interrupt-controller:
89    type: object
90    additionalProperties: false
91
92    properties:
93      interrupt-controller: true
94
95      '#interrupt-cells':
96        const: 1
97
98      interrupts:
99        maxItems: 1
100
101required:
102  - compatible
103  - reg
104  - reg-names
105  - ti,syscon-pcie-ctrl
106  - max-link-speed
107  - num-lanes
108  - power-domains
109  - clocks
110  - clock-names
111  - vendor-id
112  - device-id
113  - msi-map
114  - dma-ranges
115  - ranges
116  - reset-gpios
117  - phys
118  - phy-names
119
120unevaluatedProperties: false
121
122examples:
123  - |
124    #include <dt-bindings/soc/ti,sci_pm_domain.h>
125    #include <dt-bindings/gpio/gpio.h>
126
127    bus {
128        #address-cells = <2>;
129        #size-cells = <2>;
130
131        pcie0_rc: pcie@2900000 {
132            compatible = "ti,j721e-pcie-host";
133            reg = <0x00 0x02900000 0x00 0x1000>,
134                  <0x00 0x02907000 0x00 0x400>,
135                  <0x00 0x0d000000 0x00 0x00800000>,
136                  <0x00 0x10000000 0x00 0x00001000>;
137            reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
138            ti,syscon-pcie-ctrl = <&pcie0_ctrl 0x4070>;
139            max-link-speed = <3>;
140            num-lanes = <2>;
141            power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
142            clocks = <&k3_clks 239 1>;
143            clock-names = "fck";
144            device_type = "pci";
145            #address-cells = <3>;
146            #size-cells = <2>;
147            bus-range = <0x0 0xf>;
148            vendor-id = <0x104c>;
149            device-id = <0xb00d>;
150            msi-map = <0x0 &gic_its 0x0 0x10000>;
151            dma-coherent;
152            reset-gpios = <&exp1 6 GPIO_ACTIVE_HIGH>;
153            phys = <&serdes0_pcie_link>;
154            phy-names = "pcie-phy";
155            ranges = <0x01000000 0x0 0x10001000  0x00 0x10001000  0x0 0x0010000>,
156                     <0x02000000 0x0 0x10011000  0x00 0x10011000  0x0 0x7fef000>;
157            dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
158        };
159    };
160