blob: 253cf011308162a5f3539787c5ef303ba1aa86bc [file] [log] [blame]
Tony Dinh63eba132023-02-01 15:13:05 -08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Device Tree file for Thecus N2350 board
4 *
5 * Copyright (C) 2018-2023 Tony Dinh <mibodhi@gmail.com>
6 * Copyright (C) 2018 Manuel Jung <manuel.jung@hotmail.com>
7 */
8
9/dts-v1/;
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/gpio/gpio.h>
12#include "armada-385.dtsi"
13
14/ {
15 model = "Thecus N2350";
16 compatible = "thecus,n2350", "marvell,armada385";
17
18 aliases {
19 ethernet0 = &eth0;
20 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
Tony Dinh2b1715b2023-06-06 14:45:39 -070026 memory@0 {
Tony Dinh63eba132023-02-01 15:13:05 -080027 device_type = "memory";
28 reg = <0x00000000 0x40000000>; /* 1GB */
29 };
30
31 soc {
32 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
33 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
34 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
35 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
36 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
37
38 };
39
Tony Dinh2b1715b2023-06-06 14:45:39 -070040 usb3_0_phy: usb-phy {
Tony Dinh63eba132023-02-01 15:13:05 -080041 compatible = "usb-nop-xceiv";
42 vcc-supply = <&usb3_0_power>;
Tony Dinh2b1715b2023-06-06 14:45:39 -070043 #phy-cells = <0>;
Tony Dinh63eba132023-02-01 15:13:05 -080044 };
45
Tony Dinh2b1715b2023-06-06 14:45:39 -070046 usb3_1_phy: usb-phy {
Tony Dinh63eba132023-02-01 15:13:05 -080047 compatible = "usb-nop-xceiv";
48 vcc-supply = <&usb3_1_power>;
Tony Dinh2b1715b2023-06-06 14:45:39 -070049 #phy-cells = <0>;
Tony Dinh63eba132023-02-01 15:13:05 -080050 };
51
Tony Dinh2b1715b2023-06-06 14:45:39 -070052 keys {
Tony Dinh63eba132023-02-01 15:13:05 -080053 compatible = "gpio-keys";
Tony Dinh63eba132023-02-01 15:13:05 -080054 pinctrl-0 = <&pmx_power_button &pmx_copy_button &pmx_reset_button>;
55 pinctrl-names = "default";
56
Tony Dinh2b1715b2023-06-06 14:45:39 -070057 button-1 {
Tony Dinh63eba132023-02-01 15:13:05 -080058 label = "Power Button";
59 linux,code = <KEY_POWER>;
60 gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
61 };
62
Tony Dinh2b1715b2023-06-06 14:45:39 -070063 button-2 {
Tony Dinh63eba132023-02-01 15:13:05 -080064 label = "Copy Button";
65 linux,code = <KEY_COPY>;
66 gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
67 };
68
Tony Dinh2b1715b2023-06-06 14:45:39 -070069 button-3 {
Tony Dinh63eba132023-02-01 15:13:05 -080070 label = "Reset Button";
71 linux,code = <KEY_RESTART>;
72 gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
73 };
74 };
75
Tony Dinh2b1715b2023-06-06 14:45:39 -070076 leds {
Tony Dinh63eba132023-02-01 15:13:05 -080077 compatible = "gpio-leds";
78 pinctrl-0 = <&pmx_sata1_white_led
79 &pmx_sata1_red_led
80 &pmx_sata2_white_led
81 &pmx_sata2_red_led
82 &pmx_sys_white_led
83 &pmx_sys_red_led
84 &pmx_pwr_blue_led
85 &pmx_pwr_red_led
86 &pmx_usb_white_led
87 &pmx_usb_red_led>;
88
89 pinctrl-names = "default";
90
Tony Dinh2b1715b2023-06-06 14:45:39 -070091 led-1 {
Tony Dinh63eba132023-02-01 15:13:05 -080092 label = "n2350:white:sata1";
93 gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
Tony Dinh63eba132023-02-01 15:13:05 -080094 };
95
Tony Dinh2b1715b2023-06-06 14:45:39 -070096 led-2 {
Tony Dinh63eba132023-02-01 15:13:05 -080097 label = "n2350:red:sata1";
98 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
99 };
100
Tony Dinh2b1715b2023-06-06 14:45:39 -0700101 led-3 {
Tony Dinh63eba132023-02-01 15:13:05 -0800102 label = "n2350:white:sata2";
103 gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
104 };
105
Tony Dinh2b1715b2023-06-06 14:45:39 -0700106 led-4 {
Tony Dinh63eba132023-02-01 15:13:05 -0800107 label = "n2350:red:sata2";
108 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
109 };
110
Tony Dinh2b1715b2023-06-06 14:45:39 -0700111 led-5 {
Tony Dinh63eba132023-02-01 15:13:05 -0800112 label = "n2350:white:sys";
113 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
114 linux,default-trigger = "default-on";
115 };
116
Tony Dinh2b1715b2023-06-06 14:45:39 -0700117 led-6 {
Tony Dinh63eba132023-02-01 15:13:05 -0800118 label = "n2350:red:sys";
119 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
120 };
121
Tony Dinh2b1715b2023-06-06 14:45:39 -0700122 led-7 {
Tony Dinh63eba132023-02-01 15:13:05 -0800123 label = "n2350:blue:pwr";
124 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
125 };
126
Tony Dinh2b1715b2023-06-06 14:45:39 -0700127 led-8 {
Tony Dinh63eba132023-02-01 15:13:05 -0800128 label = "n2350:red:pwr";
129 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
130 };
131
Tony Dinh2b1715b2023-06-06 14:45:39 -0700132 led-9 {
Tony Dinh63eba132023-02-01 15:13:05 -0800133 label = "n2350:white:usb";
134 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
135 };
136
Tony Dinh2b1715b2023-06-06 14:45:39 -0700137 led-10 {
Tony Dinh63eba132023-02-01 15:13:05 -0800138 label = "n2350:red:usb";
139 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
140 };
141 };
142
Tony Dinh65ea7742023-06-20 16:20:22 -0700143 fan {
144 compatible = "gpio-fan";
145 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
146 gpio-fan,speed-map = < 0 0
147 600 1
148 3000 2 >;
149 pinctrl-0 = <&pmx_fan>;
150 pinctrl-names = "default";
151 };
152
Tony Dinh2b1715b2023-06-06 14:45:39 -0700153 usb3_0_power: v5-vbus0 {
154 compatible = "regulator-fixed";
155 regulator-name = "USB3_0_Power";
156 regulator-min-microvolt = <5000000>;
157 regulator-max-microvolt = <5000000>;
158 enable-active-high;
159 regulator-always-on;
160 regulator-boot-on;
161 gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
162 };
Tony Dinh63eba132023-02-01 15:13:05 -0800163
Tony Dinh2b1715b2023-06-06 14:45:39 -0700164 usb3_1_power: v5-vbus1 {
165 compatible = "regulator-fixed";
166 regulator-name = "USB3_1_Power";
167 regulator-min-microvolt = <5000000>;
168 regulator-max-microvolt = <5000000>;
169 enable-active-high;
170 regulator-always-on;
171 regulator-boot-on;
172 gpio = <&gpio0 24 GPIO_ACTIVE_HIGH>;
173 };
Tony Dinh63eba132023-02-01 15:13:05 -0800174
Tony Dinh2b1715b2023-06-06 14:45:39 -0700175 reg_sata0: pwr-sata0 {
176 compatible = "regulator-fixed";
177 regulator-name = "pwr_en_sata0";
178 regulator-min-microvolt = <12000000>;
179 regulator-max-microvolt = <12000000>;
180 enable-active-high;
181 regulator-always-on;
182 regulator-boot-on;
183 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
184 };
Tony Dinh63eba132023-02-01 15:13:05 -0800185
Tony Dinh2b1715b2023-06-06 14:45:39 -0700186 reg_5v_sata0: v5-sata0 {
187 compatible = "regulator-fixed";
188 regulator-name = "v5.0-sata0";
189 regulator-min-microvolt = <5000000>;
190 regulator-max-microvolt = <5000000>;
191 vin-supply = <&reg_sata0>;
192 };
Tony Dinh63eba132023-02-01 15:13:05 -0800193
Tony Dinh2b1715b2023-06-06 14:45:39 -0700194 reg_12v_sata0: v12-sata0 {
195 compatible = "regulator-fixed";
196 regulator-name = "v12.0-sata0";
197 regulator-min-microvolt = <12000000>;
198 regulator-max-microvolt = <12000000>;
199 vin-supply = <&reg_sata0>;
200 };
Tony Dinh63eba132023-02-01 15:13:05 -0800201
Tony Dinh2b1715b2023-06-06 14:45:39 -0700202 reg_sata1: pwr-sata0 {
203 regulator-name = "pwr_en_sata1";
204 compatible = "regulator-fixed";
205 regulator-min-microvolt = <12000000>;
206 regulator-max-microvolt = <12000000>;
207 enable-active-high;
208 regulator-always-on;
209 regulator-boot-on;
210 gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
211 };
Tony Dinh63eba132023-02-01 15:13:05 -0800212
Tony Dinh2b1715b2023-06-06 14:45:39 -0700213 reg_5v_sata1: v5-sata1 {
214 compatible = "regulator-fixed";
215 regulator-name = "v5.0-sata1";
216 regulator-min-microvolt = <5000000>;
217 regulator-max-microvolt = <5000000>;
218 vin-supply = <&reg_sata1>;
219 };
Tony Dinh63eba132023-02-01 15:13:05 -0800220
Tony Dinh2b1715b2023-06-06 14:45:39 -0700221 reg_12v_sata1: v12-sata1 {
222 compatible = "regulator-fixed";
223 regulator-name = "v12.0-sata1";
224 regulator-min-microvolt = <12000000>;
225 regulator-max-microvolt = <12000000>;
226 vin-supply = <&reg_sata1>;
Tony Dinh63eba132023-02-01 15:13:05 -0800227 };
228
229 gpio-poweroff {
230 compatible = "gpio-poweroff";
231 pinctrl-0 = <&pmx_pwr_off>;
232 pinctrl-names = "default";
233 gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
234 };
235
236};
237
238&ahci0 {
239 status = "okay";
240};
241
242&bm {
243 status = "okay";
244};
245
246&bm_bppi {
247 status = "okay";
248};
249
250&eth0 {
251 status = "okay";
252 phy = <&phy0>;
253 phy-mode = "sgmii";
254 buffer-manager = <&bm>;
255 bm,pool-long = <0>;
256 bm,pool-short = <1>;
257};
258
259&i2c0 {
260 status = "okay";
261 clock-frequency = <100000>;
262};
263
264&i2c1 {
265 status = "okay";
266 clock-frequency = <100000>;
267};
268
269&mdio {
Tony Dinh2b1715b2023-06-06 14:45:39 -0700270 phy0: ethernet-phy@1 {
Tony Dinh63eba132023-02-01 15:13:05 -0800271 reg = <1>;
272 };
273};
274
275&nand_controller {
276 status = "okay";
277
278 nand@0 {
279 status = "okay";
280 reg = <0>;
281 label = "pxa3xx_nand-0";
282 nand-rb = <0>;
283 marvell,nand-keep-config;
284 nand-on-flash-bbt;
285 nand-ecc-strength = <4>;
286 nand-ecc-step-size = <512>;
287
288 partitions {
289 compatible = "fixed-partitions";
290 #address-cells = <1>;
291 #size-cells = <1>;
292
293 partition@0 {
294 label = "rootfs";
295 reg = <0x00000000 0x20000000>;
296 };
297
298 };
299 };
300};
301
302&pciec {
303 status = "okay";
Tony Dinh2b1715b2023-06-06 14:45:39 -0700304};
305
306&pcie1 {
307 status = "okay";
Tony Dinh63eba132023-02-01 15:13:05 -0800308};
309
Tony Dinh2b1715b2023-06-06 14:45:39 -0700310&pcie2 {
311 status = "okay";
312};
313
Tony Dinh63eba132023-02-01 15:13:05 -0800314&pinctrl {
315 pinctrl-names = "default";
316
317 pmx_power_button: pmx-power-button {
318 marvell,pins = "mpp49";
319 marvell,function = "gpio";
320 };
321
322 pmx_copy_button: pmx-copy-button {
323 marvell,pins = "mpp52";
324 marvell,function = "gpio";
325 };
326
327 pmx_reset_button: pmx-reset-button {
328 marvell,pins = "mpp50";
329 marvell,function = "gpio";
330 };
331
332 pmx_sata1_white_led: pmx-sata1-white-led {
333 marvell,pins = "mpp20";
334 marvell,function = "gpio";
335 };
336
337 pmx_sata1_red_led: pmx-sata1-red-led {
338 marvell,pins = "mpp46";
339 marvell,function = "gpio";
340 };
341
342 pmx_sata2_white_led: pmx-sata2-white-led {
343 marvell,pins = "mpp19";
344 marvell,function = "gpio";
345 };
346
347 pmx_sata2_red_led: pmx-sata2-red-led {
348 marvell,pins = "mpp47";
349 marvell,function = "gpio";
350 };
351
352 pmx_sys_white_led: pmx-sys-white-led {
353 marvell,pins = "mpp14";
354 marvell,function = "gpio";
355 };
356
357 pmx_sys_red_led: pmx-sys-red-led {
358 marvell,pins = "mpp15";
359 marvell,function = "gpio";
360 };
361
362 pmx_buzzer: pmx-buzzer {
363 marvell,pins = "mpp51";
364 marvell,function = "gpio";
365 };
366
367 pmx_pwr_off: pmx-pwr-off {
368 marvell,pins = "mpp54";
369 marvell,function = "gpio";
370 };
371
372 pmx_pwr_blue_led: pmx-pwr-blue-led {
373 marvell,pins = "mpp43";
374 marvell,function = "gpio";
375 };
376
377 pmx_pwr_red_led: pmx-pwr-red-led {
378 marvell,pins = "mpp18";
379 marvell,function = "gpio";
380 };
381
382 pmx_usb_white_led: pmx-usb-white-led {
383 marvell,pins = "mpp16";
384 marvell,function = "gpio";
385 };
386
387 pmx_usb_red_led: pmx-usb-red-led {
388 marvell,pins = "mpp17";
389 marvell,function = "gpio";
390 };
Tony Dinh65ea7742023-06-20 16:20:22 -0700391
392 pmx_fan: pmx-fan {
393 marvell,pins = "mpp48";
394 marvell,function = "gpio";
395 };
Tony Dinh63eba132023-02-01 15:13:05 -0800396};
397
398&sdhci {
399 broken-cd;
400 wp-inverted;
401 bus-width = <8>;
402 status = "okay";
403 no-1-8-v;
404};
405
406&spi1 {
407 pinctrl-names = "default";
408 pinctrl-0 = <&spi1_pins>;
409 status = "okay";
410
411 /* spi: 4M Flash Macronix MX25L3205D */
Tony Dinh2b1715b2023-06-06 14:45:39 -0700412 flash@0 {
Tony Dinh63eba132023-02-01 15:13:05 -0800413 #address-cells = <1>;
414 #size-cells = <0>;
Tony Dinh2b1715b2023-06-06 14:45:39 -0700415 compatible = "jedec,spi-nor";
Tony Dinh63eba132023-02-01 15:13:05 -0800416 reg = <0>;
417
418 spi-max-frequency = <108000000>;
419 spi-cpha;
420
421 partition@0 {
422 label = "u-boot";
423 reg = <0x00000000 0x00100000>;
424 };
425
426 partition@100000 {
427 label = "u-boot-env";
428 reg = <0x00100000 0x00010000>;
429 };
430 };
431};
432
433&uart0 {
434 status = "okay";
435};
436
437&usb0 {
438 status = "okay";
439};
440
441&usb3_0 {
442 status = "okay";
443};
444
445&usb3_1 {
446 status = "okay";
447};