ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.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 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 resets = <&rst 6>, <&rst 7>;
176 reset-names = "hc", "phy";
177
178 interrupt-controller;
179 #interrupt-cells = <1>;
180
181 interrupt-map-mask = <0 0 0 1>;
182 interrupt-map = <0 0 0 0 &pcie 0>;
183 status = "disabled";
184 };
185
186 usb0: usb@1b000000 {
187 compatible = "generic-ehci";
188 reg = <0x1b000000 0x1d8>;
189
190 interrupt-parent = <&intc3>;
191 interrupts = <1>;
192
193 resets = <&rst 5>;
194 reset-names = "usb-host";
195
196 has-transaction-translator;
197 caps-offset = <0x100>;
198
199 phy-names = "usb-phy0";
200 phys = <&usb_phy0>;
201
202 status = "disabled";
203 };
204
205 usb1: usb@1b400000 {
206 compatible = "generic-ehci";
207 reg = <0x1b400000 0x1d8>;
208
209 interrupt-parent = <&intc3>;
210 interrupts = <2>;
211
212 resets = <&rst2 5>;
213 reset-names = "usb-host";
214
215 has-transaction-translator;
216 caps-offset = <0x100>;
217
218 phy-names = "usb-phy1";
219 phys = <&usb_phy1>;
220
221 status = "disabled";
222 };
223
224 spi: spi@1f000000 {
225 compatible = "qca,ar934x-spi";
226 reg = <0x1f000000 0x1c>;
227
228 clocks = <&pll ATH79_CLK_AHB>;
229
230 status = "disabled";
231
232 #address-cells = <1>;
233 #size-cells = <0>;
234 };
235 };
236
237 usb_phy0: usb-phy {
238 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
239
240 reset-names = "usb-phy", "usb-suspend-override";
241 resets = <&rst 4>, <&rst 3>;
242
243 #phy-cells = <0>;
244
245 status = "disabled";
246 };
247
248 usb_phy1: usb-phy {
249 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
250
251 reset-names = "usb-phy", "usb-suspend-override";
252 resets = <&rst2 4>, <&rst2 3>;
253
254 #phy-cells = <0>;
255
256 status = "disabled";
257 };
258 };
259
260 &mdio0 {
261 resets = <&rst 22>;
262 reset-names = "mdio";
263 };
264
265 &eth0 {
266 compatible = "qca,qca9560-eth", "syscon";
267
268 pll-data = <0x03000000 0x00000101 0x00001919>;
269 pll-reg = <0 0x48 0>;
270 pll-handle = <&pll>;
271
272 resets = <&rst 9>;
273 reset-names = "mac";
274 };
275
276 &mdio1 {
277 status = "okay";
278 resets = <&rst 23>;
279 reset-names = "mdio";
280 builtin-switch;
281
282 builtin_switch: switch0@1f {
283 compatible = "qca,ar8229";
284 reg = <0x1f>;
285 resets = <&rst 8>;
286 reset-names = "switch";
287 phy-mode = "gmii";
288 qca,phy4-mii-enable;
289 qca,mib-poll-interval = <500>;
290
291 mdio-bus {
292 #address-cells = <1>;
293 #size-cells = <0>;
294
295 swphy0: ethernet-phy@0 {
296 reg = <0>;
297 phy-mode = "mii";
298 };
299
300 swphy4: ethernet-phy@4 {
301 reg = <4>;
302 phy-mode = "mii";
303 };
304 };
305 };
306 };
307
308 &eth1 {
309 compatible = "qca,qca9560-eth", "syscon";
310
311 phy-mode = "gmii";
312
313 resets = <&rst 13>;
314 reset-names = "mac";
315
316 fixed-link {
317 speed = <1000>;
318 full-duplex;
319 };
320 };