ipq40xx: 6.6: fix DTS to use reference for usb node
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files-6.6 / arch / arm / boot / dts / qcom / qcom-ipq4028-wpj428.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 * Copyright (c) 2017, Christian Mehlis <christian@m3hlis.de>
3 * Copyright (c) 2017-2018, Sven Eckelmann <sven.eckelmann@openmesh.com>
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 *
17 */
18
19 #include "qcom-ipq4019.dtsi"
20 #include <dt-bindings/gpio/gpio.h>
21 #include <dt-bindings/input/input.h>
22 #include <dt-bindings/soc/qcom,tcsr.h>
23
24 / {
25 model = "Compex WPJ428";
26 compatible = "compex,wpj428";
27
28 chosen {
29 /*
30 * There's a chance that SPI reads fail even though the data itself is alright.
31 * The read result is cached and squashfs can't recover.
32 * Just panic when that happens and hope that next time it doesn't.
33 */
34 bootargs-append = " rootflags=errors=panic";
35 };
36
37 soc {
38 rng@22000 {
39 status = "okay";
40 };
41
42 mdio@90000 {
43 status = "okay";
44 pinctrl-0 = <&mdio_pins>;
45 pinctrl-names = "default";
46 reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
47 reset-delay-us = <2000>;
48 };
49
50 tcsr@194b000 {
51 /* select hostmode */
52 compatible = "qcom,tcsr";
53 reg = <0x194b000 0x100>;
54 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
55 status = "okay";
56 };
57
58 tcsr@1949000 {
59 compatible = "qcom,tcsr";
60 reg = <0x1949000 0x100>;
61 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
62 };
63
64 ess_tcsr@1953000 {
65 compatible = "qcom,tcsr";
66 reg = <0x1953000 0x1000>;
67 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
68 };
69
70 tcsr@1957000 {
71 compatible = "qcom,tcsr";
72 reg = <0x1957000 0x100>;
73 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
74 };
75
76 crypto@8e3a000 {
77 status = "okay";
78 };
79
80 watchdog@b017000 {
81 status = "okay";
82 };
83 };
84
85 keys {
86 compatible = "gpio-keys";
87
88 reset {
89 label = "reset";
90 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RESTART>;
92 };
93 };
94
95 aliases {
96 led-boot = &status;
97 led-failsafe = &status;
98 led-upgrade = &status;
99 };
100
101 leds {
102 compatible = "gpio-leds";
103
104 status: rss4 {
105 label = "green:rss4";
106 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
107 };
108
109 rss3 {
110 label = "green:rss3";
111 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
112 };
113 };
114
115 beeper: beeper {
116 compatible = "gpio-beeper";
117 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
118 };
119 };
120
121 &tlmm {
122 mdio_pins: mdio_pinmux {
123 mux_1 {
124 pins = "gpio53";
125 function = "mdio";
126 bias-pull-up;
127 };
128
129 mux_2 {
130 pins = "gpio52";
131 function = "mdc";
132 bias-pull-up;
133 };
134 };
135
136 serial_pins: serial_pinmux {
137 mux {
138 pins = "gpio60", "gpio61";
139 function = "blsp_uart0";
140 bias-disable;
141 };
142 };
143
144 spi_0_pins: spi_0_pinmux {
145 pin {
146 function = "blsp_spi0";
147 pins = "gpio55", "gpio56", "gpio57";
148 drive-strength = <12>;
149 bias-disable;
150 };
151 pin_cs {
152 function = "gpio";
153 pins = "gpio54";
154 drive-strength = <2>;
155 bias-disable;
156 output-high;
157 };
158 };
159 };
160
161 &blsp_dma {
162 status = "okay";
163 };
164
165 &blsp1_spi1 {
166 pinctrl-0 = <&spi_0_pins>;
167 pinctrl-names = "default";
168 status = "okay";
169 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
170
171 m25p80@0 {
172 compatible = "jedec,spi-nor";
173 reg = <0>;
174 spi-max-frequency = <24000000>;
175
176 partitions {
177 compatible = "fixed-partitions";
178 #address-cells = <1>;
179 #size-cells = <1>;
180
181 partition0@0 {
182 label = "0:SBL1";
183 reg = <0x00000000 0x00040000>;
184 read-only;
185 };
186 partition1@40000 {
187 label = "0:MIBIB";
188 reg = <0x00040000 0x00020000>;
189 read-only;
190 };
191 partition2@60000 {
192 label = "0:QSEE";
193 reg = <0x00060000 0x00060000>;
194 read-only;
195 };
196 partition3@c0000 {
197 label = "0:CDT";
198 reg = <0x000c0000 0x00010000>;
199 read-only;
200 };
201 partition4@d0000 {
202 label = "0:DDRPARAMS";
203 reg = <0x000d0000 0x00010000>;
204 read-only;
205 };
206 partition5@e0000 {
207 label = "0:APPSBLENV"; /* uboot env*/
208 reg = <0x000e0000 0x00010000>;
209 read-only;
210 };
211 partition5@f0000 {
212 label = "0:APPSBL"; /* uboot */
213 reg = <0x000f0000 0x00080000>;
214 read-only;
215 };
216 partition5@170000 {
217 label = "0:ART";
218 reg = <0x00170000 0x00010000>;
219 read-only;
220
221 nvmem-layout {
222 compatible = "fixed-layout";
223 #address-cells = <1>;
224 #size-cells = <1>;
225
226 macaddr_art_e010: mac-address@e010 {
227 reg = <0xe010 0x6>;
228 };
229
230 macaddr_art_e018: mac-address@e018 {
231 reg = <0xe018 0x6>;
232 };
233
234 precal_art_1000: precal@1000 {
235 reg = <0x1000 0x2f20>;
236 };
237
238 precal_art_5000: precal@5000 {
239 reg = <0x5000 0x2f20>;
240 };
241 };
242 };
243 partition6@180000 {
244 compatible = "denx,fit";
245 label = "firmware";
246 reg = <0x00180000 0x01e80000>;
247 };
248 };
249 };
250 };
251
252 &blsp1_uart1 {
253 pinctrl-0 = <&serial_pins>;
254 pinctrl-names = "default";
255 status = "okay";
256 };
257
258 &cryptobam {
259 status = "okay";
260 };
261
262 &gmac {
263 status = "okay";
264 };
265
266 &switch {
267 status = "okay";
268 };
269
270 &swport4 {
271 status = "okay";
272 label = "lan1";
273
274 nvmem-cells = <&macaddr_art_e018>;
275 nvmem-cell-names = "mac-address";
276 };
277
278 &swport5 {
279 status = "okay";
280 label = "lan2";
281
282 nvmem-cells = <&macaddr_art_e010>;
283 nvmem-cell-names = "mac-address";
284 };
285
286 &usb3 {
287 status = "okay";
288 };
289
290 &usb3_ss_phy {
291 status = "okay";
292 };
293
294 &usb3_hs_phy {
295 status = "okay";
296 };
297
298 &usb2 {
299 status = "okay";
300 };
301
302 &usb2_hs_phy {
303 status = "okay";
304 };
305
306 &wifi0 {
307 status = "okay";
308 nvmem-cell-names = "pre-calibration";
309 nvmem-cells = <&precal_art_1000>;
310 };
311
312 &wifi1 {
313 status = "okay";
314 nvmem-cell-names = "pre-calibration";
315 nvmem-cells = <&precal_art_5000>;
316 };