c1c227a5e9107847b30ca66c675c3ccfa70ae27d
[openwrt/openwrt.git] / target / linux / mvebu / files / arch / arm / boot / dts / armada-370-c200-v2.dts
1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2 /*
3 * Device Tree file for Ctera C200-V2
4 *
5 * Copyright (C) 2021 Pawel Dembicki <paweldembicki@gmail.com>
6 */
7
8 /dts-v1/;
9
10 #include "armada-370.dtsi"
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/thermal/thermal.h>
14 #include <dt-bindings/leds/common.h>
15
16 / {
17 model = "Ctera C200 V2";
18 compatible = "ctera,c200-v2", "marvell,armada370", "marvell,armada-370-xp";
19
20 aliases {
21 led-boot = &led_status_green;
22 led-failsafe = &led_status_red;
23 led-running = &led_status_green;
24 led-upgrade = &led_status_red;
25 };
26
27 chosen {
28 bootargs = "console=ttyS0,115200";
29 stdout-path = "serial0:115200n8";
30 };
31
32 memory {
33 device_type = "memory";
34 reg = <0x00000000 0x40000000>; /* 1024 MB */
35 };
36
37 soc {
38 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
39 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
40 MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
41 };
42
43 thermal-zones {
44 ethphy-thermal {
45 polling-delay = <20000>;
46 polling-delay-passive = <2000>;
47
48 thermal-sensors = <&ethphy0>;
49
50 trips {
51 ethphy_alert1: trip1 {
52 temperature = <65000>;
53 hysteresis = <4000>;
54 type = "passive";
55 };
56
57 ethphy_crit: trip2 {
58 temperature = <100000>;
59 hysteresis = <2000>;
60 type = "critical";
61 };
62 };
63 };
64 };
65
66 keys {
67 compatible = "gpio-keys";
68 pinctrl-0 = <&pmx_buttons>;
69 pinctrl-names = "default";
70
71 power {
72 label = "Power Button";
73 linux,code = <KEY_POWER>;
74 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
75 };
76
77 reset {
78 label = "Reset Button";
79 linux,code = <KEY_RESTART>;
80 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
81 };
82
83 usb1 {
84 label = "USB1 Button";
85 linux,code = <BTN_0>;
86 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
87 };
88
89 usb2 {
90 label = "USB2 Button";
91 linux,code = <BTN_1>;
92 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
93 };
94 };
95
96 gpio-poweroff {
97 compatible = "gpio-poweroff";
98 pinctrl-0 = <&pmx_poweroff>;
99 pinctrl-names = "default";
100 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
101 };
102
103 leds {
104 compatible = "gpio-leds";
105 pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
106 pinctrl-names = "default";
107
108 led-0 {
109 function = LED_FUNCTION_USB;
110 function-enumerator = <2>;
111 color = <LED_COLOR_ID_RED>;
112 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
113 };
114
115 led-1 {
116 function = LED_FUNCTION_USB;
117 function-enumerator = <2>;
118 color = <LED_COLOR_ID_GREEN>;
119 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
120 linux,default-trigger = "usbport";
121 trigger-sources = <&usb1_port 1>, <&usb2_port 1>;
122 };
123
124 led-2 {
125 function = LED_FUNCTION_USB;
126 function-enumerator = <1>;
127 color = <LED_COLOR_ID_RED>;
128 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
129 };
130
131 led-3 {
132 function = LED_FUNCTION_USB;
133 function-enumerator = <1>;
134 color = <LED_COLOR_ID_GREEN>;
135 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
136 linux,default-trigger = "usbport";
137 trigger-sources = <&usb1_port 2>, <&usb2_port 2>;
138 };
139
140 led-4 {
141 function = LED_FUNCTION_DISK;
142 function-enumerator = <2>;
143 color = <LED_COLOR_ID_GREEN>;
144 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
145 linux,default-trigger = "ata2";
146 };
147
148 led-5 {
149 function = LED_FUNCTION_DISK;
150 function-enumerator = <1>;
151 color = <LED_COLOR_ID_RED>;
152 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
153 };
154
155 led-6 {
156 function = LED_FUNCTION_DISK;
157 function-enumerator = <2>;
158 color = <LED_COLOR_ID_RED>;
159 gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
160 };
161
162 led-7 {
163 function = LED_FUNCTION_INDICATOR;
164 color = <LED_COLOR_ID_BLUE>;
165 gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
166 };
167
168 led-8 {
169 function = LED_FUNCTION_DISK_ERR;
170 color = <LED_COLOR_ID_RED>;
171 gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
172 };
173
174 led-9 {
175 function = LED_FUNCTION_DISK_ERR;
176 color = <LED_COLOR_ID_GREEN>;
177 gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
178 };
179
180 led_status_red: led-10 {
181 label = "red:status";
182 function = LED_FUNCTION_STATUS;
183 color = <LED_COLOR_ID_RED>;
184 gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
185 };
186
187 led-11 {
188 function = LED_FUNCTION_DISK;
189 function-enumerator = <1>;
190 color = <LED_COLOR_ID_GREEN>;
191 gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
192 linux,default-trigger = "ata1";
193 };
194
195 led_status_green: led-12 {
196 label = "green:status";
197 function = LED_FUNCTION_STATUS;
198 color = <LED_COLOR_ID_GREEN>;
199 gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
200 };
201 };
202 };
203
204 &coherencyfab {
205 broken-idle;
206 };
207
208 &eth1 {
209 pinctrl-0 = <&ge1_rgmii_pins>;
210 pinctrl-names = "default";
211 status = "okay";
212 phy-handle = <&ethphy0>;
213 phy-connection-type = "rgmii-id";
214 };
215
216 &i2c0 {
217 pinctrl-0 = <&i2c0_pins>;
218 pinctrl-names = "default";
219 clock-frequency = <100000>;
220 status = "okay";
221
222 hwmon@2a {
223 compatible = "nuvoton,nct7802";
224 reg = <0x2a>;
225 };
226
227 rtc@30 {
228 compatible = "sii,s35390a";
229 reg = <0x30>;
230 };
231 };
232
233 &mdio {
234 pinctrl-0 = <&mdio_pins>;
235 pinctrl-names = "default";
236
237 ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
238 reg = <0>;
239 #thermal-sensor-cells = <0>;
240 };
241 };
242
243 &nand_controller {
244 status = "okay";
245
246 nand@0 {
247 reg = <0>;
248 label = "pxa3xx_nand-0";
249 nand-rb = <0>;
250 marvell,nand-keep-config;
251 nand-on-flash-bbt;
252 nand-ecc-strength = <4>;
253 nand-ecc-step-size = <512>;
254
255 partitions {
256 compatible = "fixed-partitions";
257 #address-cells = <1>;
258 #size-cells = <1>;
259
260 partition@0 {
261 label = "uboot";
262 reg = <0x0000000 0x200000>;
263 read-only;
264 };
265
266 partition@200000 {
267 label = "certificate";
268 reg = <0x0200000 0x100000>;
269 read-only;
270 };
271
272 partition@300000 {
273 label = "preset_cfg";
274 reg = <0x0300000 0x100000>;
275 read-only;
276 };
277
278 partition@400000 {
279 label = "dev_params";
280 reg = <0x0400000 0x100000>;
281 read-only;
282 };
283 partition@500000 {
284 label = "active_bank";
285 reg = <0x0500000 0x0100000>;
286 };
287
288 partition@600000 {
289 label = "magic";
290 reg = <0x0600000 0x0100000>;
291 read-only;
292 };
293
294 partition@700000 {
295 label = "bank1";
296 reg = <0x0700000 0x2800000>;
297 };
298
299 partition@2f00000 {
300 label = "bank2";
301 reg = <0x2f00000 0x2800000>;
302 };
303
304 /* 0x5700000-0x5a00000 undefined in vendor firmware */
305
306 partition@5a00000 {
307 label = "reserved";
308 reg = <0x5a00000 0x2000000>;
309 };
310
311 partition@7a00000 {
312 label = "ubi";
313 reg = <0x7a00000 0x8600000>;
314 };
315 };
316 };
317 };
318
319 &pciec {
320 status = "okay";
321
322 pcie@1,0 {
323 pinctrl-0 = <&pmx_pcie>;
324 pinctrl-names = "default";
325 status = "okay";
326 reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
327
328 /* -[0000:00]---01.0-[01]----00.0 */
329 /* usbport trigger won't work */
330 bridge@0,1 {
331 compatible = "pci11ab,6710";
332 reg = <0x3800 0 0 0 0>;
333 #address-cells = <3>;
334 #size-cells = <2>;
335
336 usb@1,0 {
337 /* Renesas uPD720202 */
338 compatible = "pci1912,0015";
339 reg = <0x1000 0 0 0 0>;
340 #address-cells = <3>;
341 #size-cells = <2>;
342
343 usb1_port: port@1 {
344 reg = <1>;
345 #trigger-source-cells = <1>;
346 };
347
348 usb2_port: port@2 {
349 reg = <2>;
350 #trigger-source-cells = <1>;
351 };
352 };
353 };
354 };
355 };
356
357 &pinctrl {
358 pmx_poweroff: pmx-poweroff {
359 marvell,pins = "mpp7";
360 marvell,function = "gpo";
361 };
362
363 pmx_power_cpu: pmx-power-cpu {
364 marvell,pins = "mpp4";
365 marvell,function = "vdd";
366 };
367
368 pmx_buttons: pmx-buttons {
369 marvell,pins = "mpp6", "mpp10", "mpp14", "mpp32";
370 marvell,function = "gpio";
371 };
372
373 pmx_leds1: pmx-leds1 {
374 marvell,pins = "mpp47";
375 marvell,function = "gpo";
376 };
377
378 pmx_leds2: pmx-leds2 {
379 marvell,pins = "mpp12", "mpp13", "mpp15", "mpp16", "mpp50", "mpp51",
380 "mpp52", "mpp53", "mpp55", "mpp56", "mpp57", "mpp58";
381 marvell,function = "gpio";
382 };
383
384 pmx_pcie: pmx-pcie {
385 marvell,pins = "mpp59";
386 marvell,function = "gpio";
387 };
388
389 /* this gpio is connected to the pin of buzzer
390 * leave it as is due lack of proper driver
391 */
392 pmx_buzzer: pmx-buzzer {
393 marvell,pins = "mpp63";
394 marvell,function = "gpio";
395 };
396 };
397
398 &pmsu {
399 pinctrl-0 = <&pmx_power_cpu>;
400 pinctrl-names = "default";
401 };
402
403 &rtc {
404 status = "disabled";
405 };
406
407 &sata {
408 nr-ports = <2>;
409 status = "okay";
410 #address-cells = <1>;
411 #size-cells = <0>;
412
413 hdd0_temp: sata-port@0 {
414 reg = <0>;
415 #thermal-sensor-cells = <0>;
416 };
417
418 hdd1_temp: sata-port@1 {
419 reg = <1>;
420 #thermal-sensor-cells = <0>;
421 };
422 };
423
424 &uart0 {
425 status = "okay";
426 };