ipq806x: add Edgecore ECW5410 support
[openwrt/openwrt.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8068-ecw5410.dts
1 #include "qcom-ipq8064-v2.0.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/soc/qcom,tcsr.h>
5
6 / {
7 model = "Edgecore ECW5410";
8 compatible = "edgecore,ecw5410", "qcom,ipq8064";
9
10 reserved-memory {
11 #address-cells = <1>;
12 #size-cells = <1>;
13 ranges;
14
15 nss@40000000 {
16 reg = <0x40000000 0x1000000>;
17 no-map;
18 };
19
20 smem: smem@41000000 {
21 reg = <0x41000000 0x200000>;
22 no-map;
23 };
24
25 wifi_dump@44000000 {
26 reg = <0x44000000 0x600000>;
27 no-map;
28 };
29
30 rsvd@41200000 {
31 reg = <0x41200000 0x300000>;
32 no-map;
33 };
34 };
35
36 cpus {
37 idle-states {
38 CPU_SPC: spc {
39 status = "disabled";
40 };
41 };
42 };
43
44 aliases {
45 serial0 = &gsbi4_serial;
46 serial1 = &gsbi1_serial;
47 mdio-gpio0 = &mdio0;
48 ethernet0 = &gmac3;
49 ethernet1 = &gmac2;
50
51 led-boot = &power_green;
52 led-failsafe = &power_red;
53 led-running = &power_green;
54 led-upgrade = &power_green;
55 };
56
57 chosen {
58 bootargs-append = " console=ttyMSM0,115200n8 root=/dev/ubiblock0_1";
59 stdout-path = "serial0:115200n8";
60 };
61
62 keys {
63 compatible = "gpio-keys";
64 pinctrl-0 = <&button_pins>;
65 pinctrl-names = "default";
66
67 reset {
68 label = "reset";
69 gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RESTART>;
71 };
72 };
73
74 leds {
75 compatible = "gpio-leds";
76 pinctrl-0 = <&led_pins>;
77 pinctrl-names = "default";
78
79 power_green: power_green {
80 label = "ecw5410:green:power";
81 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
82 };
83
84 wlan2g_green {
85 label = "ecw5410:green:wlan2g";
86 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_LOW>;
87 };
88
89 wlan2g_yellow {
90 label = "ecw5410:yellow:wlan2g";
91 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
92 };
93
94 wlan5g_green {
95 label = "ecw5410:green:wlan5g";
96 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
97 };
98
99 power_red: power_red {
100 label = "ecw5410:red:power";
101 gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>;
102 };
103
104 wlan5g_yellow {
105 label = "ecw5410:yellow:wlan5g";
106 gpios = <&qcom_pinmux 59 GPIO_ACTIVE_LOW>;
107 };
108 };
109 };
110
111
112 &qcom_pinmux {
113 spi_pins: spi_pins {
114 mux {
115 pins = "gpio18", "gpio19";
116 function = "gsbi5";
117 drive-strength = <10>;
118 bias-pull-down;
119 };
120
121 clk {
122 pins = "gpio21";
123 function = "gsbi5";
124 drive-strength = <12>;
125 bias-pull-down;
126 };
127
128 cs {
129 pins = "gpio20";
130 function = "gpio";
131 drive-strength = <10>;
132 bias-pull-up;
133 };
134 };
135
136 nand_pins: nand_pins {
137 disable {
138 pins = "gpio34", "gpio35", "gpio36", "gpio37",
139 "gpio38";
140 function = "nand";
141 drive-strength = <10>;
142 bias-disable;
143 };
144
145 pullups {
146 pins = "gpio39";
147 function = "nand";
148 drive-strength = <10>;
149 bias-pull-up;
150 };
151
152 hold {
153 pins = "gpio40", "gpio41", "gpio42", "gpio43",
154 "gpio44", "gpio45", "gpio46", "gpio47";
155 function = "nand";
156 drive-strength = <10>;
157 bias-bus-hold;
158 };
159 };
160
161 mdio0_pins: mdio0_pins {
162 mux {
163 pins = "gpio0", "gpio1";
164 function = "gpio";
165 drive-strength = <8>;
166 bias-disable;
167 };
168 };
169
170 led_pins: led_pins {
171 mux {
172 pins = "gpio16", "gpio23", "gpio24", "gpio26",
173 "gpio28", "gpio59";
174 function = "gpio";
175 drive-strength = <2>;
176 bias-pull-up;
177 };
178 };
179
180 button_pins: button_pins {
181 mux {
182 pins = "gpio25";
183 function = "gpio";
184 drive-strength = <2>;
185 bias-pull-up;
186 };
187 };
188
189 uart1_pins: uart1_pins {
190 mux {
191 pins = "gpio51", "gpio52", "gpio53", "gpio54";
192 function = "gsbi1";
193 drive-strength = <12>;
194 bias-none;
195 };
196 };
197 };
198
199 &gsbi1 {
200 qcom,mode = <GSBI_PROT_UART_W_FC>;
201 status = "okay";
202
203 serial@12450000 {
204 status = "okay";
205
206 pinctrl-0 = <&uart1_pins>;
207 pinctrl-names = "default";
208 };
209 };
210
211 &gsbi4 {
212 qcom,mode = <GSBI_PROT_I2C_UART>;
213 status = "okay";
214
215 serial@16340000 {
216 status = "okay";
217 };
218
219 /*
220 * The i2c device on gsbi4 should not be enabled.
221 * On ipq806x designs gsbi4 i2c is meant for exclusive
222 * RPM usage. Turning this on in kernel manifests as
223 * i2c failure for the RPM.
224 */
225 };
226
227 &gsbi5 {
228 qcom,mode = <GSBI_PROT_SPI>;
229 status = "okay";
230
231 spi4: spi@1a280000 {
232 status = "okay";
233 spi-max-frequency = <50000000>;
234
235 pinctrl-0 = <&spi_pins>;
236 pinctrl-names = "default";
237
238 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
239
240 m25p80@0 {
241 compatible = "jedec,spi-nor";
242 #address-cells = <1>;
243 #size-cells = <1>;
244 spi-max-frequency = <50000000>;
245 reg = <0>;
246
247 partitions {
248 compatible = "qcom,smem";
249 };
250 };
251 };
252 };
253
254 &hs_phy_0 { /* USB3 port 0 HS phy */
255 status = "okay";
256 };
257
258 &hs_phy_1 { /* USB3 port 1 HS phy */
259 status = "okay";
260 };
261
262 &ss_phy_0 { /* USB3 port 0 SS phy */
263 status = "okay";
264 };
265
266 &ss_phy_1 { /* USB3 port 1 SS phy */
267 status = "okay";
268 };
269
270 &usb3_0 {
271 status = "okay";
272 };
273
274 &usb3_1 {
275 status = "okay";
276 };
277
278 &pcie1 {
279 status = "okay";
280
281 /delete-property/ pinctrl-0;
282 /delete-property/ pinctrl-names;
283 /delete-property/ perst-gpios;
284
285 bridge@0,0 {
286 reg = <0x00000000 0 0 0 0>;
287 #address-cells = <3>;
288 #size-cells = <2>;
289 ranges;
290
291 wifi@1,0 {
292 compatible = "qcom,ath10k";
293 status = "okay";
294 reg = <0x00010000 0 0 0 0>;
295 qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
296 };
297 };
298 };
299
300 &pcie2 {
301 status = "okay";
302
303 /delete-property/ pinctrl-0;
304 /delete-property/ pinctrl-names;
305 /delete-property/ perst-gpios;
306
307 bridge@0,0 {
308 reg = <0x00000000 0 0 0 0>;
309 #address-cells = <3>;
310 #size-cells = <2>;
311 ranges;
312
313 wifi@1,0 {
314 compatible = "qcom,ath10k";
315 status = "okay";
316 reg = <0x00010000 0 0 0 0>;
317 qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L";
318 };
319 };
320 };
321
322 &soc {
323 nand@1ac00000 {
324 status = "okay";
325
326 pinctrl-0 = <&nand_pins>;
327 pinctrl-names = "default";
328
329 nand@0 {
330 compatible = "qcom,nandcs";
331
332 reg = <0>;
333
334 nand-ecc-strength = <4>;
335 nand-bus-width = <8>;
336 nand-ecc-step-size = <512>;
337
338 partitions {
339 compatible = "fixed-partitions";
340 #address-cells = <1>;
341 #size-cells = <1>;
342
343 rootfs1@0 {
344 label = "rootfs1";
345 reg = <0x0000000 0x4000000>;
346 };
347
348 rootfs2@4000000 {
349 label = "rootfs2";
350 reg = <0x4000000 0x4000000>;
351 };
352 };
353 };
354 };
355
356 mdio1: mdio {
357 compatible = "virtual,mdio-gpio";
358 #address-cells = <1>;
359 #size-cells = <0>;
360
361 status = "okay";
362
363 pinctrl-0 = <&mdio0_pins>;
364 pinctrl-names = "default";
365
366 gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
367
368 phy0: ethernet-phy@0 {
369 reg = <0>;
370 };
371
372 phy1: ethernet-phy@1 {
373 reg = <1>;
374 };
375 };
376 };
377
378 &gmac2 {
379 status = "okay";
380
381 qcom,id = <2>;
382 mdiobus = <&mdio0>;
383
384 phy-mode = "sgmii";
385 phy-handle = <&phy1>;
386 };
387
388 &gmac3 {
389 status = "okay";
390
391 qcom,id = <3>;
392 mdiobus = <&mdio1>;
393
394 phy-mode = "sgmii";
395 phy-handle = <&phy0>;
396 };
397
398 &adm_dma {
399 status = "okay";
400 };