ath79: TP-Link EAP245 v3: convert radios to nvmem-cells
[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 #address-cells = <1>;
205 #size-cells = <0>;
206 };
207
208 usb1: usb@1b400000 {
209 compatible = "generic-ehci";
210 reg = <0x1b400000 0x1d8>;
211
212 interrupt-parent = <&intc3>;
213 interrupts = <2>;
214
215 resets = <&rst2 5>;
216 reset-names = "usb-host";
217
218 has-transaction-translator;
219 caps-offset = <0x100>;
220
221 phy-names = "usb-phy1";
222 phys = <&usb_phy1>;
223
224 status = "disabled";
225
226 #address-cells = <1>;
227 #size-cells = <0>;
228 };
229
230 spi: spi@1f000000 {
231 compatible = "qca,ar934x-spi";
232 reg = <0x1f000000 0x1c>;
233
234 clocks = <&pll ATH79_CLK_AHB>;
235
236 status = "disabled";
237
238 #address-cells = <1>;
239 #size-cells = <0>;
240 };
241 };
242
243 usb_phy0: usb-phy {
244 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
245
246 reset-names = "usb-phy", "usb-suspend-override";
247 resets = <&rst 4>, <&rst 3>;
248
249 #phy-cells = <0>;
250
251 status = "disabled";
252 };
253
254 usb_phy1: usb-phy {
255 compatible = "qca,qca9560-usb-phy", "qca,ar7200-usb-phy";
256
257 reset-names = "usb-phy", "usb-suspend-override";
258 resets = <&rst2 4>, <&rst2 3>;
259
260 #phy-cells = <0>;
261
262 status = "disabled";
263 };
264 };
265
266 &mdio0 {
267 resets = <&rst 22>;
268 reset-names = "mdio";
269 };
270
271 &eth0 {
272 compatible = "qca,qca9560-eth", "syscon";
273
274 pll-data = <0x03000000 0x00000101 0x00001919>;
275 pll-reg = <0 0x48 0>;
276 pll-handle = <&pll>;
277
278 resets = <&rst 9>;
279 reset-names = "mac";
280 };
281
282 &mdio1 {
283 status = "okay";
284 resets = <&rst 23>;
285 reset-names = "mdio";
286 builtin-switch;
287
288 builtin_switch: switch0@1f {
289 compatible = "qca,ar8229";
290 reg = <0x1f>;
291 resets = <&rst 8>;
292 reset-names = "switch";
293 phy-mode = "gmii";
294 qca,phy4-mii-enable;
295 qca,mib-poll-interval = <500>;
296
297 mdio-bus {
298 #address-cells = <1>;
299 #size-cells = <0>;
300
301 swphy0: ethernet-phy@0 {
302 reg = <0>;
303 phy-mode = "mii";
304 };
305
306 swphy4: ethernet-phy@4 {
307 reg = <4>;
308 phy-mode = "mii";
309 };
310 };
311 };
312 };
313
314 &eth1 {
315 compatible = "qca,qca9560-eth", "syscon";
316
317 phy-mode = "gmii";
318
319 resets = <&rst 13>;
320 reset-names = "mac";
321
322 fixed-link {
323 speed = <1000>;
324 full-duplex;
325 };
326 };