ath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / qca9557.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 #include <dt-bindings/clock/ath79-clk.h>
3 #include "ath79.dtsi"
4
5 / {
6 compatible = "qca,qca9557";
7
8 #address-cells = <1>;
9 #size-cells = <1>;
10
11 cpus {
12 #address-cells = <1>;
13 #size-cells = <0>;
14
15 cpu@0 {
16 device_type = "cpu";
17 compatible = "mips,mips74Kc";
18 clocks = <&pll ATH79_CLK_CPU>;
19 reg = <0>;
20 };
21 };
22
23 extosc: ref {
24 compatible = "fixed-clock";
25 #clock-cells = <0>;
26 clock-output-names = "ref";
27 clock-frequency = <40000000>;
28 };
29
30 ahb {
31 apb {
32 ddr_ctrl: memory-controller@18000000 {
33 compatible = "qca,ar9557-ddr-controller",
34 "qca,ar7240-ddr-controller";
35 reg = <0x18000000 0x100>;
36
37 #qca,ddr-wb-channel-cells = <1>;
38 };
39
40 uart: uart@18020000 {
41 compatible = "ns16550a";
42 reg = <0x18020000 0x20>;
43
44 interrupts = <3>;
45
46 clocks = <&pll ATH79_CLK_REF>;
47 clock-names = "uart";
48
49 reg-io-width = <4>;
50 reg-shift = <2>;
51 no-loopback-test;
52
53 status = "disabled";
54 };
55
56 usb_phy0: usb-phy@18030000 {
57 compatible ="qca,qca9550-usb-phy", "qca,ar7200-usb-phy";
58
59 reset-names = "usb-phy", "usb-suspend-override";
60 resets = <&rst 4>, <&rst 3>;
61
62 #phy-cells = <0>;
63
64 status = "disabled";
65 };
66
67 usb_phy1: usb-phy {
68 compatible = "qca,qca9550-usb-phy", "qca,ar7200-usb-phy";
69
70 reset-names = "usb-phy", "usb-suspend-override";
71 resets = <&rst2 4>, <&rst2 3>;
72
73 #phy-cells = <0>;
74
75 status = "disabled";
76 };
77
78 gpio: gpio@18040000 {
79 compatible = "qca,ar9557-gpio",
80 "qca,ar9340-gpio";
81 reg = <0x18040000 0x28>;
82
83 interrupts = <2>;
84 ngpios = <24>;
85
86 gpio-controller;
87 #gpio-cells = <2>;
88
89 interrupt-controller;
90 #interrupt-cells = <2>;
91 };
92
93 pinmux: pinmux@1804002c {
94 compatible = "pinctrl-single";
95
96 reg = <0x1804002c 0x40>;
97
98 #size-cells = <0>;
99
100 pinctrl-single,bit-per-mux;
101 pinctrl-single,register-width = <32>;
102 pinctrl-single,function-mask = <0x1>;
103 #pinctrl-cells = <2>;
104
105 jtag_disable_pins: pinmux_jtag_disable_pins {
106 pinctrl-single,bits = <0x40 0x2 0x2>;
107 };
108 };
109
110 pll: pll-controller@18050000 {
111 compatible = "qca,ar9557-pll",
112 "qca,qca9550-pll";
113 reg = <0x18050000 0x50>;
114
115 #clock-cells = <1>;
116 clock-output-names = "cpu", "ddr", "ahb";
117
118 clocks = <&extosc>;
119 };
120
121 wdt: wdt@18060008 {
122 compatible = "qca,ar7130-wdt";
123 reg = <0x18060008 0x8>;
124
125 interrupts = <4>;
126
127 clocks = <&pll ATH79_CLK_AHB>;
128 clock-names = "wdt";
129 };
130
131 rst: reset-controller@1806001c {
132 compatible = "qca,qca9550-reset",
133 "qca,ar7100-reset",
134 "simple-bus";
135 reg = <0x1806001c 0x4>;
136
137 #reset-cells = <1>;
138 interrupt-parent = <&cpuintc>;
139
140 intc2: interrupt-controller@2 {
141 compatible = "qca,ar9340-intc";
142
143 interrupt-parent = <&cpuintc>;
144 interrupts = <2>;
145
146 interrupt-controller;
147 #interrupt-cells = <1>;
148
149 qca,int-status-addr = <0xac>;
150 qca,pending-bits = <0xf>, /* wmac */
151 <0x1f0>; /* pcie rc 0 */
152 };
153
154 intc3: interrupt-controller@3 {
155 compatible = "qca,ar9340-intc";
156
157 interrupt-parent = <&cpuintc>;
158 interrupts = <3>;
159
160 interrupt-controller;
161 #interrupt-cells = <1>;
162
163 qca,int-status-addr = <0xac>;
164 qca,pending-bits = <0x1f000>, /* pcie rc 1 */
165 <0x1000000>, /* usb1 */
166 <0x10000000>; /* usb2 */
167 };
168 };
169
170 rst2: reset-controller@180600c0 {
171 compatible = "qca,qca9550-reset",
172 "qca,ar7100-reset",
173 "simple-bus";
174 reg = <0x180600c0 0x4>;
175
176 #reset-cells = <1>;
177 };
178
179 pcie0: pcie-controller@180c0000 {
180 compatible = "qcom,ar7240-pci";
181 #address-cells = <3>;
182 #size-cells = <2>;
183 bus-range = <0x0 0x0>;
184 reg = <0x180c0000 0x1000>, /* CRP */
185 <0x180f0000 0x100>, /* CTRL */
186 <0x14000000 0x1000>; /* CFG */
187 reg-names = "crp_base", "ctrl_base", "cfg_base";
188 ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000 /* pci memory */
189 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */
190 interrupt-parent = <&intc2>;
191 interrupts = <1>;
192
193 interrupt-controller;
194 #interrupt-cells = <1>;
195
196 interrupt-map-mask = <0 0 0 1>;
197 interrupt-map = <0 0 0 0 &pcie0 0>;
198 status = "disabled";
199 };
200
201 pcie1: pcie-controller@18250000 {
202 compatible = "qcom,ar7240-pci";
203 #address-cells = <3>;
204 #size-cells = <2>;
205 bus-range = <0x0 0x0>;
206 reg = <0x18250000 0x1000>, /* CRP */
207 <0x18280000 0x100>, /* CTRL */
208 <0x16000000 0x1000>; /* CFG */
209 reg-names = "crp_base", "ctrl_base", "cfg_base";
210 ranges = <0x2000000 0 0x12000000 0x12000000 0 0x02000000 /* pci memory */
211 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */
212 interrupt-parent = <&intc3>;
213 interrupts = <0>;
214
215 interrupt-controller;
216 #interrupt-cells = <1>;
217
218 interrupt-map-mask = <0 0 0 1>;
219 interrupt-map = <0 0 0 0 &pcie1 0>;
220 status = "disabled";
221 };
222
223 wmac: wmac@18100000 {
224 compatible = "qca,qca9550-wmac";
225 reg = <0x18100000 0x10000>;
226
227 interrupt-parent = <&intc2>;
228 interrupts = <0>;
229
230 status = "disabled";
231 };
232 };
233
234 usb0: usb@1b000000 {
235 compatible = "generic-ehci";
236 reg = <0x1b000000 0x1fc>;
237
238 interrupt-parent = <&intc3>;
239 interrupts = <1>;
240 resets = <&rst 5>;
241 reset-names = "usb-host";
242
243 has-transaction-translator;
244 caps-offset = <0x100>;
245
246 phy-names = "usb-phy0";
247 phys = <&usb_phy0>;
248
249 status = "disabled";
250 };
251
252 usb1: usb@1b400000 {
253 compatible = "generic-ehci";
254 reg = <0x1b400000 0x1fc>;
255
256 interrupt-parent = <&intc3>;
257 interrupts = <2>;
258 resets = <&rst2 5>;
259 reset-names = "usb-host";
260
261 has-transaction-translator;
262 caps-offset = <0x100>;
263
264 phy-names = "usb-phy1";
265 phys = <&usb_phy1>;
266
267 status = "disabled";
268 };
269
270 spi: spi@1f000000 {
271 compatible = "qca,ar9557-spi", "qca,ar7100-spi";
272 reg = <0x1f000000 0x10>;
273
274 clocks = <&pll ATH79_CLK_AHB>;
275 clock-names = "ahb";
276
277 status = "disabled";
278
279 #address-cells = <1>;
280 #size-cells = <0>;
281 };
282 };
283 };
284
285 &mdio0 {
286 resets = <&rst 22>;
287 reset-names = "mdio";
288 };
289
290 &eth0 {
291 compatible = "qca,qca9550-eth", "syscon";
292
293 pll-data = <0x82000101 0x80000101 0x80001313>;
294 phy-mode = "rgmii";
295
296 resets = <&rst 9>;
297 reset-names = "mac";
298 };
299
300 &mdio1 {
301 resets = <&rst 23>;
302 reset-names = "mdio";
303 };
304
305 &eth1 {
306 compatible = "qca,qca9550-eth", "syscon";
307
308 pll-data = <0x82000101 0x80000101 0x80001313>;
309 phy-mode = "sgmii";
310
311 resets = <&rst 13>;
312 reset-names = "mac";
313 };