ipq40xx: add netgear wac510 support
[openwrt/staging/dedeckeh.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-wac510.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/soc/qcom,tcsr.h>
8
9 / {
10 model = "Netgear WAC510";
11 compatible = "netgear,wac510";
12
13 aliases {
14 led-boot = &led_power_amber;
15 led-failsafe = &led_power_amber;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_amber;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs-append = " root=/dev/ubiblock0_1";
23 };
24
25 soc {
26 rng@22000 {
27 status = "okay";
28 };
29
30 ess-psgmii@98000 {
31 status = "okay";
32 };
33
34 counter@4a1000 {
35 compatible = "qcom,qca-gcnt";
36 reg = <0x4a1000 0x4>;
37 };
38
39 tcsr@1949000 {
40 compatible = "qcom,tcsr";
41 reg = <0x1949000 0x100>;
42 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
43 };
44
45 tcsr@194b000 {
46 status = "okay";
47
48 compatible = "qcom,tcsr";
49 reg = <0x194b000 0x100>;
50 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
51 };
52
53 ess_tcsr@1953000 {
54 compatible = "qcom,tcsr";
55 reg = <0x1953000 0x1000>;
56 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
57 };
58
59 tcsr@1957000 {
60 compatible = "qcom,tcsr";
61 reg = <0x1957000 0x100>;
62 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
63 };
64
65 usb2: usb2@60f8800 {
66 status = "okay";
67 };
68
69 usb3: usb3@8af8800 {
70 status = "okay";
71 };
72
73 crypto@8e3a000 {
74 status = "okay";
75 };
76
77 watchdog@b017000 {
78 status = "okay";
79 };
80
81 ess-switch@c000000 {
82 status = "okay";
83 };
84
85 edma@c080000 {
86 status = "okay";
87 };
88 };
89
90 keys {
91 compatible = "gpio-keys";
92
93 reset {
94 label = "reset";
95 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
96 linux,code = <KEY_RESTART>;
97 };
98 };
99
100 led_spi {
101 compatible = "spi-gpio";
102 #address-cells = <1>;
103 #size-cells = <0>;
104
105 sck-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
106 mosi-gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
107 num-chipselects = <0>;
108
109 ssr: ssr@0 {
110 compatible = "fairchild,74hc595";
111 reg = <0>;
112 gpio-controller;
113 #gpio-cells = <2>;
114 registers-number = <1>;
115 spi-max-frequency = <1000000>;
116 };
117 };
118
119 leds {
120 compatible = "gpio-leds";
121
122 led_power_amber: power_amber {
123 label = "amber:power";
124 gpios = <&ssr 6 GPIO_ACTIVE_LOW>;
125 panic-indicator;
126 };
127
128 led_power_green: power_green {
129 label = "green:power";
130 gpios = <&ssr 5 GPIO_ACTIVE_LOW>;
131 };
132
133 wlan2g_blue {
134 label = "blue:wlan2g";
135 gpios = <&ssr 4 GPIO_ACTIVE_LOW>;
136 linux,default-trigger = "phy0tpt";
137 };
138
139 wlan2g_green {
140 label = "green:wlan2g";
141 gpios = <&ssr 3 GPIO_ACTIVE_LOW>;
142 linux,default-trigger = "phy0radio";
143 };
144
145 wlan5g_blue {
146 label = "blue:wlan5g";
147 gpios = <&ssr 2 GPIO_ACTIVE_LOW>;
148 linux,default-trigger = "phy1tpt";
149 };
150
151 wlan5g_green {
152 label = "green:wlan5g";
153 gpios = <&ssr 1 GPIO_ACTIVE_LOW>;
154 linux,default-trigger = "phy1radio";
155 };
156
157 act_green {
158 label = "green:act";
159 gpios = <&ssr 0 GPIO_ACTIVE_LOW>;
160 };
161 };
162 };
163
164 &qpic_bam {
165 status = "okay";
166 };
167
168 &tlmm {
169 mdio_pins: mdio_pinmux {
170 mux_1 {
171 pins = "gpio53";
172 function = "mdio";
173 bias-pull-up;
174 };
175
176 mux_2 {
177 pins = "gpio52";
178 function = "mdc";
179 bias-pull-up;
180 };
181 };
182
183 serial_pins: serial_pinmux {
184 mux {
185 pins = "gpio60", "gpio61";
186 function = "blsp_uart0";
187 bias-disable;
188 };
189 };
190
191 spi_0_pins: spi_0_pinmux {
192 pinmux {
193 function = "blsp_spi0";
194 pins = "gpio55", "gpio56", "gpio57";
195 drive-strength = <12>;
196 bias-disable;
197 };
198
199 pinmux_cs {
200 function = "gpio";
201 pins = "gpio54", "gpio59";
202 drive-strength = <2>;
203 bias-disable;
204 output-high;
205 };
206 };
207 };
208
209 &blsp_dma {
210 status = "okay";
211 };
212
213 &blsp1_spi1 {
214 status = "okay";
215
216 pinctrl-0 = <&spi_0_pins>;
217 pinctrl-names = "default";
218 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
219 <&tlmm 59 GPIO_ACTIVE_HIGH>;
220
221 flash@0 {
222 compatible = "jedec,spi-nor";
223 spi-max-frequency = <50000000>;
224 reg = <0>;
225
226 partitions {
227 compatible = "fixed-partitions";
228 #address-cells = <1>;
229 #size-cells = <1>;
230
231 partition@0 {
232 label = "0:SBL1";
233 reg = <0x00000000 0x00040000>;
234 read-only;
235 };
236
237 partition@40000 {
238 label = "0:MIBIB";
239 reg = <0x00040000 0x00020000>;
240 read-only;
241 };
242
243 partition@60000 {
244 label = "0:QSEE";
245 reg = <0x00060000 0x00060000>;
246 read-only;
247 };
248
249 partition@c0000 {
250 label = "0:CDT";
251 reg = <0x000c0000 0x00010000>;
252 read-only;
253 };
254
255 partition@d0000 {
256 label = "0:DDRPARAMS";
257 reg = <0x000d0000 0x00010000>;
258 read-only;
259 };
260
261 partition@e0000 {
262 label = "0:APPSBLENV";
263 reg = <0x000e0000 0x00010000>;
264 };
265
266 partition@f0000 {
267 label = "0:APPSBL";
268 reg = <0x000f0000 0x000f0000>;
269 read-only;
270 };
271
272 partition@1e0000 {
273 label = "0:MANUDATA";
274 reg = <0x001e0000 0x00010000>;
275 read-only;
276 };
277
278 partition@1f0000 {
279 label = "0:ART";
280 reg = <0x001f0000 0x00010000>;
281 read-only;
282 };
283 };
284 };
285
286 nand@1 {
287 compatible = "spi-nand";
288 reg = <1>;
289 spi-max-frequency = <48000000>;
290
291 partitions {
292 compatible = "fixed-partitions";
293 #address-cells = <1>;
294 #size-cells = <1>;
295
296 partition@0 {
297 label = "rootfs";
298 reg = <0x00000000 0x03800000>;
299 };
300
301 partition@3800000 {
302 label = "rootfs_1";
303 reg = <0x03800000 0x03800000>;
304 };
305
306 partition@7000000 {
307 label = "var_config";
308 reg = <0x07000000 0x00f00000>;
309 read-only;
310 };
311
312 partition@7f00000 {
313 label = "Oops_log";
314 reg = <0x07f00000 0x000c0000>;
315 read-only;
316 };
317 };
318 };
319 };
320
321 &blsp1_uart1 {
322 status = "okay";
323
324 pinctrl-0 = <&serial_pins>;
325 pinctrl-names = "default";
326 };
327
328 &cryptobam {
329 status = "okay";
330 };
331
332 &mdio {
333 status = "okay";
334
335 pinctrl-0 = <&mdio_pins>;
336 pinctrl-names = "default";
337 reset-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
338 reset-delay-us = <2000>;
339 };
340
341 &gmac0 {
342 qcom,forced_duplex = <1>;
343 qcom,forced_speed = <1000>;
344 qcom,phy_mdio_addr = <3>;
345 qcom,poll_required = <1>;
346 vlan_tag = <1 0x10>;
347 };
348
349 &wifi0 {
350 status = "okay";
351
352 qcom,ath10k-calibration-variant = "Netgear-WAC510";
353 };
354
355 &wifi1 {
356 status = "okay";
357
358 qcom,ath10k-calibration-variant = "Netgear-WAC510";
359 };
360
361 &usb3_ss_phy {
362 status = "okay";
363 };
364
365 &usb3_hs_phy {
366 status = "okay";
367 };
368
369 &usb2_hs_phy {
370 status = "okay";
371 };