xref: /freebsd/sys/contrib/device-tree/Bindings/pci/sophgo,sg2044-pcie.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/pci/sophgo,sg2044-pcie.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: DesignWare based PCIe Root Complex controller on Sophgo SoCs
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotmaintainers:
10*833e5d42SEmmanuel Vadot  - Inochi Amaoto <inochiama@gmail.com>
11*833e5d42SEmmanuel Vadot
12*833e5d42SEmmanuel Vadotdescription:
13*833e5d42SEmmanuel Vadot  SG2044 SoC PCIe Root Complex controller is based on the Synopsys DesignWare
14*833e5d42SEmmanuel Vadot  PCIe IP and thus inherits all the common properties defined in
15*833e5d42SEmmanuel Vadot  snps,dw-pcie.yaml.
16*833e5d42SEmmanuel Vadot
17*833e5d42SEmmanuel VadotallOf:
18*833e5d42SEmmanuel Vadot  - $ref: /schemas/pci/pci-host-bridge.yaml#
19*833e5d42SEmmanuel Vadot  - $ref: /schemas/pci/snps,dw-pcie.yaml#
20*833e5d42SEmmanuel Vadot
21*833e5d42SEmmanuel Vadotproperties:
22*833e5d42SEmmanuel Vadot  compatible:
23*833e5d42SEmmanuel Vadot    const: sophgo,sg2044-pcie
24*833e5d42SEmmanuel Vadot
25*833e5d42SEmmanuel Vadot  reg:
26*833e5d42SEmmanuel Vadot    items:
27*833e5d42SEmmanuel Vadot      - description: Data Bus Interface (DBI) registers
28*833e5d42SEmmanuel Vadot      - description: iATU registers
29*833e5d42SEmmanuel Vadot      - description: Config registers
30*833e5d42SEmmanuel Vadot      - description: Sophgo designed configuration registers
31*833e5d42SEmmanuel Vadot
32*833e5d42SEmmanuel Vadot  reg-names:
33*833e5d42SEmmanuel Vadot    items:
34*833e5d42SEmmanuel Vadot      - const: dbi
35*833e5d42SEmmanuel Vadot      - const: atu
36*833e5d42SEmmanuel Vadot      - const: config
37*833e5d42SEmmanuel Vadot      - const: app
38*833e5d42SEmmanuel Vadot
39*833e5d42SEmmanuel Vadot  clocks:
40*833e5d42SEmmanuel Vadot    items:
41*833e5d42SEmmanuel Vadot      - description: core clk
42*833e5d42SEmmanuel Vadot
43*833e5d42SEmmanuel Vadot  clock-names:
44*833e5d42SEmmanuel Vadot    items:
45*833e5d42SEmmanuel Vadot      - const: core
46*833e5d42SEmmanuel Vadot
47*833e5d42SEmmanuel Vadot  interrupt-controller:
48*833e5d42SEmmanuel Vadot    description: Interrupt controller node for handling legacy PCI interrupts.
49*833e5d42SEmmanuel Vadot    type: object
50*833e5d42SEmmanuel Vadot
51*833e5d42SEmmanuel Vadot    properties:
52*833e5d42SEmmanuel Vadot      "#address-cells":
53*833e5d42SEmmanuel Vadot        const: 0
54*833e5d42SEmmanuel Vadot
55*833e5d42SEmmanuel Vadot      "#interrupt-cells":
56*833e5d42SEmmanuel Vadot        const: 1
57*833e5d42SEmmanuel Vadot
58*833e5d42SEmmanuel Vadot      interrupt-controller: true
59*833e5d42SEmmanuel Vadot
60*833e5d42SEmmanuel Vadot      interrupts:
61*833e5d42SEmmanuel Vadot        items:
62*833e5d42SEmmanuel Vadot          - description: combined legacy interrupt
63*833e5d42SEmmanuel Vadot
64*833e5d42SEmmanuel Vadot    required:
65*833e5d42SEmmanuel Vadot      - "#address-cells"
66*833e5d42SEmmanuel Vadot      - "#interrupt-cells"
67*833e5d42SEmmanuel Vadot      - interrupt-controller
68*833e5d42SEmmanuel Vadot      - interrupts
69*833e5d42SEmmanuel Vadot
70*833e5d42SEmmanuel Vadot    additionalProperties: false
71*833e5d42SEmmanuel Vadot
72*833e5d42SEmmanuel Vadot  msi-parent: true
73*833e5d42SEmmanuel Vadot
74*833e5d42SEmmanuel Vadot  ranges:
75*833e5d42SEmmanuel Vadot    maxItems: 5
76*833e5d42SEmmanuel Vadot
77*833e5d42SEmmanuel Vadotrequired:
78*833e5d42SEmmanuel Vadot  - compatible
79*833e5d42SEmmanuel Vadot  - reg
80*833e5d42SEmmanuel Vadot  - clocks
81*833e5d42SEmmanuel Vadot
82*833e5d42SEmmanuel VadotunevaluatedProperties: false
83*833e5d42SEmmanuel Vadot
84*833e5d42SEmmanuel Vadotexamples:
85*833e5d42SEmmanuel Vadot  - |
86*833e5d42SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
87*833e5d42SEmmanuel Vadot
88*833e5d42SEmmanuel Vadot    soc {
89*833e5d42SEmmanuel Vadot      #address-cells = <2>;
90*833e5d42SEmmanuel Vadot      #size-cells = <2>;
91*833e5d42SEmmanuel Vadot
92*833e5d42SEmmanuel Vadot      pcie@6c00400000 {
93*833e5d42SEmmanuel Vadot        compatible = "sophgo,sg2044-pcie";
94*833e5d42SEmmanuel Vadot        reg = <0x6c 0x00400000 0x0 0x00001000>,
95*833e5d42SEmmanuel Vadot              <0x6c 0x00700000 0x0 0x00004000>,
96*833e5d42SEmmanuel Vadot              <0x40 0x00000000 0x0 0x00001000>,
97*833e5d42SEmmanuel Vadot              <0x6c 0x00780c00 0x0 0x00000400>;
98*833e5d42SEmmanuel Vadot        reg-names = "dbi", "atu", "config", "app";
99*833e5d42SEmmanuel Vadot        #address-cells = <3>;
100*833e5d42SEmmanuel Vadot        #size-cells = <2>;
101*833e5d42SEmmanuel Vadot        bus-range = <0x00 0xff>;
102*833e5d42SEmmanuel Vadot        clocks = <&clk 0>;
103*833e5d42SEmmanuel Vadot        clock-names = "core";
104*833e5d42SEmmanuel Vadot        device_type = "pci";
105*833e5d42SEmmanuel Vadot        linux,pci-domain = <0>;
106*833e5d42SEmmanuel Vadot        msi-parent = <&msi>;
107*833e5d42SEmmanuel Vadot        ranges = <0x01000000 0x0  0x00000000  0x40 0x10000000  0x0 0x00200000>,
108*833e5d42SEmmanuel Vadot                 <0x42000000 0x0  0x00000000  0x0  0x00000000  0x0 0x04000000>,
109*833e5d42SEmmanuel Vadot                 <0x02000000 0x0  0x04000000  0x0  0x04000000  0x0 0x04000000>,
110*833e5d42SEmmanuel Vadot                 <0x43000000 0x42 0x00000000  0x42 0x00000000  0x2 0x00000000>,
111*833e5d42SEmmanuel Vadot                 <0x03000000 0x41 0x00000000  0x41 0x00000000  0x1 0x00000000>;
112*833e5d42SEmmanuel Vadot
113*833e5d42SEmmanuel Vadot        interrupt-controller {
114*833e5d42SEmmanuel Vadot          #address-cells = <0>;
115*833e5d42SEmmanuel Vadot          #interrupt-cells = <1>;
116*833e5d42SEmmanuel Vadot          interrupt-controller;
117*833e5d42SEmmanuel Vadot          interrupt-parent = <&intc>;
118*833e5d42SEmmanuel Vadot          interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
119*833e5d42SEmmanuel Vadot        };
120*833e5d42SEmmanuel Vadot      };
121*833e5d42SEmmanuel Vadot    };
122*833e5d42SEmmanuel Vadot...
123