ath79: Add support for Buffalo WZR-HP-G300NH
[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
58 gpio: gpio@18040000 {
59 compatible = "qca,qca9560-gpio",
60 "qca,ar9340-gpio";
61 reg = <0x18040000 0x28>;
62
63 interrupts = <2>;
64 ngpios = <24>;
65
66 gpio-controller;
67 #gpio-cells = <2>;
68
69 interrupt-controller;
70 #interrupt-cells = <2>;
71 };
72
73 pinmux: pinmux@1804002c {
74 compatible = "pinctrl-single";
75
76 reg = <0x1804002c 0x44>;
77
78 #size-cells = <0>;
79
80 pinctrl-single,bit-per-mux;
81 pinctrl-single,register-width = <32>;
82 pinctrl-single,function-mask = <0x1>;
83 #pinctrl-cells = <2>;
84
85 jtag_disable_pins: pinmux_jtag_disable_pins {
86 pinctrl-single,bits = <0x40 0x2 0x2>;
87 };
88 };
89
90 pll: pll-controller@18050000 {
91 compatible = "qca,qca9560-pll", "syscon";
92 reg = <0x18050000 0x50>;
93
94 #clock-cells = <1>;
95 clock-output-names = "cpu", "ddr", "ahb";
96
97 clocks = <&extosc>;
98 };
99
100 wdt: wdt@18060008 {
101 compatible = "qca,ar7130-wdt";
102 reg = <0x18060008 0x8>;
103
104 interrupts = <4>;
105
106 clocks = <&pll ATH79_CLK_AHB>;
107 clock-names = "wdt";
108 };
109
110 rst: reset-controller@1806001c {
111 compatible = "qca,qca9560-reset",
112 "qca,ar7100-reset";
113 reg = <0x1806001c 0x4>;
114
115 #reset-cells = <1>;
116 interrupt-parent = <&cpuintc>;
117
118 intc3: interrupt-controller {
119 compatible = "qca,ar9340-intc";
120
121 interrupt-parent = <&cpuintc>;
122 interrupts = <3>;
123
124 interrupt-controller;
125 #interrupt-cells = <1>;
126
127 qca,int-status-addr = <0xac>;
128 qca,pending-bits = <0x1f000>, /* pcie rc */
129 <0x1000000>, /* usb1 */
130 <0x10000000>; /* usb2 */
131 };
132 };
133
134 rst2: reset-controller@180600c0 {
135 compatible = "qca,qca9560-reset",
136 "qca,ar7100-reset",
137 "simple-bus";
138 reg = <0x180600c0 0x4>;
139
140 #reset-cells = <1>;
141 };
142 };
143
144 gmac: gmac@18070000 {
145 compatible = "qca,qca9560-gmac";
146 reg = <0x18070000 0x64>;
147 };
148
149 wmac: wmac@18100000 {
150 compatible = "qca,qca9560-wmac";
151 reg = <0x18100000 0x10000>;
152
153 interrupt-parent = <&cpuintc>;
154 interrupts = <2>;
155
156 status = "disabled";
157 };
158
159 pcie: pcie-controller@18250000 {
160 compatible = "qcom,ar7240-pci";
161 #address-cells = <3>;
162 #size-cells = <2>;
163 bus-range = <0x0 0x0>;
164 reg = <0x18250000 0x1000>, /* CRP */
165 <0x18280000 0x100>, /* CTRL */
166 <0x16000000 0x1000>; /* CFG */
167 reg-names = "crp_base", "ctrl_base", "cfg_base";
168 ranges = <0x2000000 0 0x12000000 0x12000000 0 0x02000000 /* pci memory */
169 0x1000000 0 0x00000000 0x0000000 0 0x000001>; /* io space */
170 interrupt-parent = <&intc3>;
171 interrupts = <0>;
172
173 device_type = "pci";
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 };