1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree common file for the Seagate Personal Cloud NAS 1 and 2-Bay
4 * (Armada 370 SoC).
5 *
6 * Copyright (C) 2015 Seagate
7 *
8 * Author: Simon Guinot <simon.guinot@sequanux.org>
9 */
10
11/*
12 * TODO: add support for the white SATA LED.
13 */
14
15#include "armada-370.dtsi"
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/input/input.h>
18
19/ {
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	memory@0 {
25		device_type = "memory";
26		reg = <0x00000000 0x20000000>; /* 512 MB */
27	};
28
29	soc {
30		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
31			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
32
33		internal-regs {
34			coherency-fabric@20200 {
35				broken-idle;
36			};
37
38			serial@12000 {
39				status = "okay";
40			};
41
42			ethernet@74000 {
43				status = "okay";
44				pinctrl-0 = <&ge1_rgmii_pins>;
45				pinctrl-names = "default";
46				phy = <&phy0>;
47				phy-mode = "rgmii-id";
48			};
49
50			usb@50000 {
51				status = "okay";
52			};
53		};
54	};
55
56	regulators {
57		compatible = "simple-bus";
58		#address-cells = <1>;
59		#size-cells = <0>;
60
61		regulator@0 {
62			compatible = "regulator-fixed";
63			reg = <0>;
64			regulator-name = "USB Power";
65			regulator-min-microvolt = <5000000>;
66			regulator-max-microvolt = <5000000>;
67			regulator-always-on;
68			regulator-boot-on;
69			gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
70		};
71		regulator@1 {
72			compatible = "regulator-fixed";
73			reg = <1>;
74			regulator-name = "SATA0 power";
75			regulator-min-microvolt = <5000000>;
76			regulator-max-microvolt = <5000000>;
77			enable-active-high;
78			regulator-always-on;
79			regulator-boot-on;
80			gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
81		};
82	};
83
84	gpio-keys {
85		compatible = "gpio-keys";
86
87		button-power {
88			label = "Power button";
89			linux,code = <KEY_POWER>;
90			gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
91			debounce-interval = <100>;
92		};
93		button-reset {
94			label = "Reset Button";
95			linux,code = <KEY_RESTART>;
96			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
97			debounce-interval = <100>;
98		};
99		button-usb {
100			label = "USB VBUS error";
101			linux,code = <KEY_UNKNOWN>;
102			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
103			debounce-interval = <100>;
104		};
105	};
106
107	gpio-leds {
108		compatible = "gpio-leds";
109
110		led-red-sata0 {
111			label = "cumulus:red:sata0";
112			gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
113			default-state = "off";
114		};
115	};
116
117	gpio_poweroff {
118		compatible = "gpio-poweroff";
119		gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
120	};
121};
122
123&pciec {
124	status = "okay";
125
126	/* USB 3.0 Bridge ASM1042A */
127	pcie@1,0 {
128		status = "okay";
129	};
130};
131
132&mdio {
133	pinctrl-0 = <&mdio_pins>;
134	pinctrl-names = "default";
135
136	phy0: ethernet-phy@0 {
137		reg = <0>;
138	};
139};
140
141&pinctrl {
142	pinctrl-0 = <&sata_led_pin>;
143	pinctrl-names = "default";
144
145	sata_led_pin: sata-led-pin {
146		marvell,pins = "mpp60";
147		marvell,function = "sata0";
148	};
149	gpio_led_pin: gpio-led-pin {
150		marvell,pins = "mpp60";
151		marvell,function = "gpio";
152	};
153};
154
155&spi0 {
156	status = "okay";
157	pinctrl-0 = <&spi0_pins2>;
158	pinctrl-names = "default";
159
160	flash@0 {
161		#address-cells = <1>;
162		#size-cells = <1>;
163		/* MX25L8006E */
164		compatible = "mxicy,mx25l8005", "jedec,spi-nor";
165		reg = <0>; /* Chip select 0 */
166		spi-max-frequency = <50000000>;
167
168		partition@0 {
169			label = "u-boot";
170			reg = <0x0 0x100000>;
171		};
172	};
173};
174