jh71x0: refresh patches and configs once again
[openwrt/staging/wigyori.git] / target / linux / jh71x0 / patches-6.1 / 0094-dt-binding-pci-add-JH7110-PCIe-dt-binding-documents.patch
1 From 3d555cfd72df1a02849565f281149d321e0f8425 Mon Sep 17 00:00:00 2001
2 From: Minda Chen <minda.chen@starfivetech.com>
3 Date: Thu, 6 Apr 2023 19:11:40 +0800
4 Subject: [PATCH 094/122] dt-binding: pci: add JH7110 PCIe dt-binding
5 documents.
6
7 Add PCIe controller driver dt-binding documents
8 for StarFive JH7110 SoC platform.
9
10 Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
11 ---
12 .../bindings/pci/starfive,jh7110-pcie.yaml | 163 ++++++++++++++++++
13 1 file changed, 163 insertions(+)
14 create mode 100644 Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
15
16 diff --git a/Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml b/Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
17 new file mode 100644
18 index 000000000000..fa4829766195
19 --- /dev/null
20 +++ b/Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
21 @@ -0,0 +1,163 @@
22 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
23 +%YAML 1.2
24 +---
25 +$id: http://devicetree.org/schemas/pci/starfive,jh7110-pcie.yaml#
26 +$schema: http://devicetree.org/meta-schemas/core.yaml#
27 +
28 +title: StarFive JH7110 PCIe 2.0 host controller
29 +
30 +maintainers:
31 + - Minda Chen <minda.chen@starfivetech.com>
32 +
33 +allOf:
34 + - $ref: /schemas/pci/pci-bus.yaml#
35 + - $ref: /schemas/interrupt-controller/msi-controller.yaml#
36 +
37 +properties:
38 + compatible:
39 + const: starfive,jh7110-pcie
40 +
41 + reg:
42 + maxItems: 2
43 +
44 + reg-names:
45 + items:
46 + - const: reg
47 + - const: config
48 +
49 + msi-parent: true
50 +
51 + interrupts:
52 + maxItems: 1
53 +
54 + clocks:
55 + maxItems: 4
56 +
57 + clock-names:
58 + items:
59 + - const: noc
60 + - const: tl
61 + - const: axi_mst0
62 + - const: apb
63 +
64 + resets:
65 + items:
66 + - description: AXI MST0 reset
67 + - description: AXI SLAVE reset
68 + - description: AXI SLAVE0 reset
69 + - description: PCIE BRIDGE reset
70 + - description: PCIE CORE reset
71 + - description: PCIE APB reset
72 +
73 + reset-names:
74 + items:
75 + - const: mst0
76 + - const: slv0
77 + - const: slv
78 + - const: brg
79 + - const: core
80 + - const: apb
81 +
82 + starfive,stg-syscon:
83 + $ref: /schemas/types.yaml#/definitions/phandle-array
84 + items:
85 + items:
86 + - description: phandle to System Register Controller stg_syscon node.
87 + - description: register0 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
88 + - description: register1 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
89 + - description: register2 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
90 + - description: register3 offset of STG_SYSCONSAIF__SYSCFG register for PCIe.
91 + description:
92 + The phandle to System Register Controller syscon node and the offset
93 + of STG_SYSCONSAIF__SYSCFG register for PCIe. Total 4 regsisters offset
94 + for PCIe.
95 +
96 + pwren-gpios:
97 + description: Should specify the GPIO for controlling the PCI bus device power on.
98 + maxItems: 1
99 +
100 + reset-gpios:
101 + maxItems: 1
102 +
103 + phys:
104 + maxItems: 1
105 +
106 + interrupt-controller:
107 + type: object
108 + properties:
109 + '#address-cells':
110 + const: 0
111 +
112 + '#interrupt-cells':
113 + const: 1
114 +
115 + interrupt-controller: true
116 +
117 + required:
118 + - '#address-cells'
119 + - '#interrupt-cells'
120 + - interrupt-controller
121 +
122 + additionalProperties: false
123 +
124 +required:
125 + - reg
126 + - reg-names
127 + - "#interrupt-cells"
128 + - interrupts
129 + - interrupt-map-mask
130 + - interrupt-map
131 + - clocks
132 + - clock-names
133 + - resets
134 + - msi-controller
135 +
136 +unevaluatedProperties: false
137 +
138 +examples:
139 + - |
140 + bus {
141 + #address-cells = <2>;
142 + #size-cells = <2>;
143 +
144 + pcie0: pcie@2B000000 {
145 + compatible = "starfive,jh7110-pcie";
146 + #address-cells = <3>;
147 + #size-cells = <2>;
148 + #interrupt-cells = <1>;
149 + reg = <0x0 0x2B000000 0x0 0x1000000>,
150 + <0x9 0x40000000 0x0 0x10000000>;
151 + reg-names = "reg", "config";
152 + device_type = "pci";
153 + starfive,stg-syscon = <&stg_syscon 0xc0 0xc4 0x130 0x1b8>;
154 + bus-range = <0x0 0xff>;
155 + ranges = <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>,
156 + <0xc3000000 0x9 0x00000000 0x9 0x00000000 0x0 0x40000000>;
157 + interrupt-parent = <&plic>;
158 + interrupts = <56>;
159 + interrupt-map-mask = <0x0 0x0 0x0 0x7>;
160 + interrupt-map = <0x0 0x0 0x0 0x1 &pcie_intc0 0x1>,
161 + <0x0 0x0 0x0 0x2 &pcie_intc0 0x2>,
162 + <0x0 0x0 0x0 0x3 &pcie_intc0 0x3>,
163 + <0x0 0x0 0x0 0x4 &pcie_intc0 0x4>;
164 + msi-parent = <&pcie0>;
165 + msi-controller;
166 + clocks = <&syscrg 86>,
167 + <&stgcrg 10>,
168 + <&stgcrg 8>,
169 + <&stgcrg 9>;
170 + clock-names = "noc", "tl", "axi_mst0", "apb";
171 + resets = <&stgcrg 11>,
172 + <&stgcrg 12>,
173 + <&stgcrg 13>,
174 + <&stgcrg 14>,
175 + <&stgcrg 15>,
176 + <&stgcrg 16>;
177 +
178 + pcie_intc0: interrupt-controller {
179 + #address-cells = <0>;
180 + #interrupt-cells = <1>;
181 + interrupt-controller;
182 + };
183 + };
184 + };
185 --
186 2.20.1
187