xref: /freebsd/sys/contrib/device-tree/Bindings/pci/rockchip,rk3399-pcie.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/pci/rockchip,rk3399-pcie.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: Rockchip AXI PCIe Root Port Bridge Host
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Shawn Lin <shawn.lin@rock-chips.com>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel VadotallOf:
13*cb7aa33aSEmmanuel Vadot  - $ref: /schemas/pci/pci-bus.yaml#
14*cb7aa33aSEmmanuel Vadot  - $ref: rockchip,rk3399-pcie-common.yaml#
15*cb7aa33aSEmmanuel Vadot
16*cb7aa33aSEmmanuel Vadotproperties:
17*cb7aa33aSEmmanuel Vadot  compatible:
18*cb7aa33aSEmmanuel Vadot    const: rockchip,rk3399-pcie
19*cb7aa33aSEmmanuel Vadot
20*cb7aa33aSEmmanuel Vadot  reg: true
21*cb7aa33aSEmmanuel Vadot
22*cb7aa33aSEmmanuel Vadot  reg-names:
23*cb7aa33aSEmmanuel Vadot    items:
24*cb7aa33aSEmmanuel Vadot      - const: axi-base
25*cb7aa33aSEmmanuel Vadot      - const: apb-base
26*cb7aa33aSEmmanuel Vadot
27*cb7aa33aSEmmanuel Vadot  interrupts:
28*cb7aa33aSEmmanuel Vadot    maxItems: 3
29*cb7aa33aSEmmanuel Vadot
30*cb7aa33aSEmmanuel Vadot  interrupt-names:
31*cb7aa33aSEmmanuel Vadot    items:
32*cb7aa33aSEmmanuel Vadot      - const: sys
33*cb7aa33aSEmmanuel Vadot      - const: legacy
34*cb7aa33aSEmmanuel Vadot      - const: client
35*cb7aa33aSEmmanuel Vadot
36*cb7aa33aSEmmanuel Vadot  aspm-no-l0s:
37*cb7aa33aSEmmanuel Vadot    description: This property is needed if using 24MHz OSC for RC's PHY.
38*cb7aa33aSEmmanuel Vadot
39*cb7aa33aSEmmanuel Vadot  ep-gpios:
40*cb7aa33aSEmmanuel Vadot    description: pre-reset GPIO
41*cb7aa33aSEmmanuel Vadot
42*cb7aa33aSEmmanuel Vadot  vpcie12v-supply:
43*cb7aa33aSEmmanuel Vadot    description: The 12v regulator to use for PCIe.
44*cb7aa33aSEmmanuel Vadot
45*cb7aa33aSEmmanuel Vadot  vpcie3v3-supply:
46*cb7aa33aSEmmanuel Vadot    description: The 3.3v regulator to use for PCIe.
47*cb7aa33aSEmmanuel Vadot
48*cb7aa33aSEmmanuel Vadot  vpcie1v8-supply:
49*cb7aa33aSEmmanuel Vadot    description: The 1.8v regulator to use for PCIe.
50*cb7aa33aSEmmanuel Vadot
51*cb7aa33aSEmmanuel Vadot  vpcie0v9-supply:
52*cb7aa33aSEmmanuel Vadot    description: The 0.9v regulator to use for PCIe.
53*cb7aa33aSEmmanuel Vadot
54*cb7aa33aSEmmanuel Vadot  interrupt-controller:
55*cb7aa33aSEmmanuel Vadot    type: object
56*cb7aa33aSEmmanuel Vadot    additionalProperties: false
57*cb7aa33aSEmmanuel Vadot
58*cb7aa33aSEmmanuel Vadot    properties:
59*cb7aa33aSEmmanuel Vadot      '#address-cells':
60*cb7aa33aSEmmanuel Vadot        const: 0
61*cb7aa33aSEmmanuel Vadot
62*cb7aa33aSEmmanuel Vadot      '#interrupt-cells':
63*cb7aa33aSEmmanuel Vadot        const: 1
64*cb7aa33aSEmmanuel Vadot
65*cb7aa33aSEmmanuel Vadot      interrupt-controller: true
66*cb7aa33aSEmmanuel Vadot
67*cb7aa33aSEmmanuel Vadotrequired:
68*cb7aa33aSEmmanuel Vadot  - ranges
69*cb7aa33aSEmmanuel Vadot  - "#interrupt-cells"
70*cb7aa33aSEmmanuel Vadot  - interrupts
71*cb7aa33aSEmmanuel Vadot  - interrupt-controller
72*cb7aa33aSEmmanuel Vadot  - interrupt-map
73*cb7aa33aSEmmanuel Vadot  - interrupt-map-mask
74*cb7aa33aSEmmanuel Vadot  - msi-map
75*cb7aa33aSEmmanuel Vadot
76*cb7aa33aSEmmanuel VadotunevaluatedProperties: false
77*cb7aa33aSEmmanuel Vadot
78*cb7aa33aSEmmanuel Vadotexamples:
79*cb7aa33aSEmmanuel Vadot  - |
80*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
81*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
82*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/clock/rk3399-cru.h>
83*cb7aa33aSEmmanuel Vadot
84*cb7aa33aSEmmanuel Vadot    bus {
85*cb7aa33aSEmmanuel Vadot        #address-cells = <2>;
86*cb7aa33aSEmmanuel Vadot        #size-cells = <2>;
87*cb7aa33aSEmmanuel Vadot
88*cb7aa33aSEmmanuel Vadot        pcie@f8000000 {
89*cb7aa33aSEmmanuel Vadot            compatible = "rockchip,rk3399-pcie";
90*cb7aa33aSEmmanuel Vadot            device_type = "pci";
91*cb7aa33aSEmmanuel Vadot            #address-cells = <3>;
92*cb7aa33aSEmmanuel Vadot            #size-cells = <2>;
93*cb7aa33aSEmmanuel Vadot            clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
94*cb7aa33aSEmmanuel Vadot              <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
95*cb7aa33aSEmmanuel Vadot            clock-names = "aclk", "aclk-perf",
96*cb7aa33aSEmmanuel Vadot                    "hclk", "pm";
97*cb7aa33aSEmmanuel Vadot            interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
98*cb7aa33aSEmmanuel Vadot                  <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
99*cb7aa33aSEmmanuel Vadot                  <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
100*cb7aa33aSEmmanuel Vadot            interrupt-names = "sys", "legacy", "client";
101*cb7aa33aSEmmanuel Vadot            ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
102*cb7aa33aSEmmanuel Vadot            ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
103*cb7aa33aSEmmanuel Vadot                0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
104*cb7aa33aSEmmanuel Vadot            num-lanes = <4>;
105*cb7aa33aSEmmanuel Vadot            msi-map = <0x0 &its 0x0 0x1000>;
106*cb7aa33aSEmmanuel Vadot            reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>;
107*cb7aa33aSEmmanuel Vadot            reg-names = "axi-base", "apb-base";
108*cb7aa33aSEmmanuel Vadot            resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
109*cb7aa33aSEmmanuel Vadot              <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE> ,
110*cb7aa33aSEmmanuel Vadot              <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>, <&cru SRST_A_PCIE>;
111*cb7aa33aSEmmanuel Vadot            reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
112*cb7aa33aSEmmanuel Vadot                    "pm", "pclk", "aclk";
113*cb7aa33aSEmmanuel Vadot            /* deprecated legacy PHY model */
114*cb7aa33aSEmmanuel Vadot            phys = <&pcie_phy>;
115*cb7aa33aSEmmanuel Vadot            phy-names = "pcie-phy";
116*cb7aa33aSEmmanuel Vadot            pinctrl-names = "default";
117*cb7aa33aSEmmanuel Vadot            pinctrl-0 = <&pcie_clkreq>;
118*cb7aa33aSEmmanuel Vadot            #interrupt-cells = <1>;
119*cb7aa33aSEmmanuel Vadot            interrupt-map-mask = <0 0 0 7>;
120*cb7aa33aSEmmanuel Vadot            interrupt-map = <0 0 0 1 &pcie0_intc 0>,
121*cb7aa33aSEmmanuel Vadot                <0 0 0 2 &pcie0_intc 1>,
122*cb7aa33aSEmmanuel Vadot                <0 0 0 3 &pcie0_intc 2>,
123*cb7aa33aSEmmanuel Vadot                <0 0 0 4 &pcie0_intc 3>;
124*cb7aa33aSEmmanuel Vadot
125*cb7aa33aSEmmanuel Vadot            pcie0_intc: interrupt-controller {
126*cb7aa33aSEmmanuel Vadot                interrupt-controller;
127*cb7aa33aSEmmanuel Vadot                #address-cells = <0>;
128*cb7aa33aSEmmanuel Vadot                #interrupt-cells = <1>;
129*cb7aa33aSEmmanuel Vadot            };
130*cb7aa33aSEmmanuel Vadot        };
131*cb7aa33aSEmmanuel Vadot    };
132*cb7aa33aSEmmanuel Vadot...
133