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