ath79: qca95xx: add new intc2, correct intc3 and add second pcie on qca9557
[oweals/openwrt.git] / target / linux / ath79 / dts / qca956x.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,qca9560";
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 = <25000000>;
28         };
29
30         ahb {
31                 apb {
32                         ddr_ctrl: memory-controller@18000000 {
33                                 compatible = "qca,qca9560-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                         gpio: gpio@18040000 {
57                                 compatible = "qca,qca9560-gpio",
58                                                 "qca,ar9340-gpio";
59                                 reg = <0x18040000 0x28>;
60
61                                 interrupts = <2>;
62                                 ngpios = <24>;
63
64                                 gpio-controller;
65                                 #gpio-cells = <2>;
66
67                                 interrupt-controller;
68                                 #interrupt-cells = <2>;
69                         };
70
71                         pinmux: pinmux@1804002c {
72                                 compatible = "pinctrl-single";
73
74                                 reg = <0x1804002c 0x40>;
75
76                                 #size-cells = <0>;
77
78                                 pinctrl-single,bit-per-mux;
79                                 pinctrl-single,register-width = <32>;
80                                 pinctrl-single,function-mask = <0x1>;
81                                 #pinctrl-cells = <2>;
82
83                                 jtag_disable_pins: pinmux_jtag_disable_pins {
84                                         pinctrl-single,bits = <0x40 0x2 0x2>;
85                                 };
86                         };
87
88                         pll: pll-controller@18050000 {
89                                 compatible = "qca,qca9560-pll", "syscon";
90                                 reg = <0x18050000 0x50>;
91
92                                 #clock-cells = <1>;
93                                 clock-output-names = "cpu", "ddr", "ahb";
94
95                                 clocks = <&extosc>;
96                         };
97
98                         wdt: wdt@18060008 {
99                                 compatible = "qca,ar7130-wdt";
100                                 reg = <0x18060008 0x8>;
101
102                                 interrupts = <4>;
103
104                                 clocks = <&pll ATH79_CLK_AHB>;
105                                 clock-names = "wdt";
106                         };
107
108                         rst: reset-controller@1806001c {
109                                 compatible = "qca,qca9560-reset",
110                                                 "qca,ar7100-reset",
111                                                  "simple-bus";
112                                 reg = <0x1806001c 0x4>;
113
114                                 #reset-cells = <1>;
115                                 interrupt-parent = <&cpuintc>;
116
117                                 intc3: interrupt-controller@3 {
118                                         compatible = "qca,ar9340-intc";
119
120                                         interrupt-parent = <&cpuintc>;
121                                         interrupts = <3>;
122
123                                         interrupt-controller;
124                                         #interrupt-cells = <1>;
125
126                                         qca,int-status-addr = <0xac>;
127                                         qca,pending-bits = <0x1f000>,           /* pcie rc */
128                                                             <0x1000000>,        /* usb1 */
129                                                             <0x10000000>;       /* usb2 */
130                                 };
131                         };
132
133                         rst2: reset-controller@180600c0 {
134                                 compatible = "qca,qca9560-reset",
135                                                 "qca,ar7100-reset",
136                                                  "simple-bus";
137                                 reg = <0x180600c0 0x4>;
138
139                                 #reset-cells = <1>;
140                         };
141
142                         wmac: wmac@18100000 {
143                                 compatible = "qca,qca9560-wmac";
144                                 reg = <0x18100000 0x10000>;
145
146                                 interrupt-parent = <&cpuintc>;
147                                 interrupts = <2>;
148
149                                 status = "disabled";
150                         };
151
152                         pcie: pcie-controller@18250000 {
153                                 compatible = "qcom,ar7240-pci";
154                                 #address-cells = <3>;
155                                 #size-cells = <2>;
156                                 bus-range = <0x0 0x0>;
157                                 reg = <0x18250000 0x1000>, /* CRP */
158                                       <0x18280000 0x100>,  /* CTRL */
159                                       <0x16000000 0x1000>; /* CFG */
160                                 reg-names = "crp_base", "ctrl_base", "cfg_base";
161                                 ranges = <0x2000000 0 0x12000000 0x12000000 0 0x02000000        /* pci memory */
162                                           0x1000000 0 0x00000000 0x0000000 0 0x000001>;         /* io space */
163                                 interrupt-parent = <&intc3>;
164                                 interrupts = <0>;
165
166                                 interrupt-controller;
167                                 #interrupt-cells = <1>;
168
169                                 interrupt-map-mask = <0 0 0 1>;
170                                 interrupt-map = <0 0 0 0 &pcie 0>;
171                                 status = "disabled";
172                         };
173                 };
174
175                 usb0: usb@1b000000 {
176                         compatible = "generic-ehci";
177                         reg = <0x1b000000 0x1d8>;
178
179                         interrupt-parent = <&intc3>;
180                         interrupts = <1>;
181
182                         resets = <&rst 5>;
183                         reset-names = "usb-host";
184
185                         has-transaction-translator;
186                         caps-offset = <0x100>;
187
188                         phy-names = "usb-phy0";
189                         phys = <&usb_phy0>;
190
191                         status = "disabled";
192                 };
193
194                 usb1: usb@1b400000 {
195                         compatible = "generic-ehci";
196                         reg = <0x1b400000 0x1d8>;
197
198                         interrupt-parent = <&intc3>;
199                         interrupts = <2>;
200
201                         resets = <&rst2 5>;
202                         reset-names = "usb-host";
203
204                         has-transaction-translator;
205                         caps-offset = <0x100>;
206
207                         phy-names = "usb-phy1";
208                         phys = <&usb_phy1>;
209
210                         status = "disabled";
211                 };
212
213                 spi: spi@1f000000 {
214                         compatible = "qca,qca9560-spi", "qca,ar7100-spi";
215                         reg = <0x1f000000 0x10>;
216
217                         clocks = <&pll ATH79_CLK_AHB>;
218                         clock-names = "ahb";
219
220                         status = "disabled";
221
222                         #address-cells = <1>;
223                         #size-cells = <0>;
224                 };
225         };
226
227         usb_phy0: usb-phy {
228                 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
229
230                 reset-names = "usb-phy", "usb-suspend-override";
231                 resets = <&rst 4>, <&rst 3>;
232
233                 #phy-cells = <0>;
234
235                 status = "disabled";
236         };
237
238         usb_phy1: usb-phy {
239                 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
240
241                 reset-names = "usb-phy", "usb-suspend-override";
242                 resets = <&rst2 4>, <&rst2 3>;
243
244                 #phy-cells = <0>;
245
246                 status = "disabled";
247         };
248 };
249
250 &mdio0 {
251         resets = <&rst 22>;
252         reset-names = "mdio";
253 };
254
255 &eth0 {
256         compatible = "qca,qca9560-eth", "syscon";
257
258         pll-data = <0x03000000 0x00000101 0x00001919>;
259         pll-reg = <0 0x48 0>;
260         pll-handle = <&pll>;
261
262         phy-mode = "sgmii";
263
264         resets = <&rst 9>;
265         reset-names = "mac";
266 };
267
268 &mdio1 {
269         resets = <&rst 23>;
270         reset-names = "mdio";
271         builtin-switch;
272 };
273
274 &eth1 {
275         compatible = "qca,qca9560-eth", "syscon";
276
277         phy-mode = "gmii";
278
279         resets = <&rst 13>;
280         reset-names = "mac";
281
282         status = "disabled";
283 };