1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Device Tree common file for the Seagate NAS 2 and 4-bay (Armada 370 SoC).
4*724ba675SRob Herring *
5*724ba675SRob Herring * Copyright (C) 2015 Seagate
6*724ba675SRob Herring *
7*724ba675SRob Herring * Author: Vincent Donnefort <vdonnefort@gmail.com>
8*724ba675SRob Herring */
9*724ba675SRob Herring
10*724ba675SRob Herring/*
11*724ba675SRob Herring * TODO: add support for the white SATA LEDs associated with HDD 0 and 1.
12*724ba675SRob Herring */
13*724ba675SRob Herring
14*724ba675SRob Herring#include "armada-370.dtsi"
15*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
16*724ba675SRob Herring#include <dt-bindings/input/input.h>
17*724ba675SRob Herring
18*724ba675SRob Herring/ {
19*724ba675SRob Herring	chosen {
20*724ba675SRob Herring		stdout-path = "serial0:115200n8";
21*724ba675SRob Herring	};
22*724ba675SRob Herring
23*724ba675SRob Herring	memory@0 {
24*724ba675SRob Herring		device_type = "memory";
25*724ba675SRob Herring		reg = <0x00000000 0x20000000>; /* 512 MB */
26*724ba675SRob Herring	};
27*724ba675SRob Herring
28*724ba675SRob Herring	soc {
29*724ba675SRob Herring		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
30*724ba675SRob Herring			  MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
31*724ba675SRob Herring
32*724ba675SRob Herring		internal-regs {
33*724ba675SRob Herring			serial@12000 {
34*724ba675SRob Herring				status = "okay";
35*724ba675SRob Herring			};
36*724ba675SRob Herring
37*724ba675SRob Herring			sata@a0000 {
38*724ba675SRob Herring				nr-ports = <2>;
39*724ba675SRob Herring				status = "okay";
40*724ba675SRob Herring			};
41*724ba675SRob Herring
42*724ba675SRob Herring			ethernet@70000 {
43*724ba675SRob Herring				status = "okay";
44*724ba675SRob Herring				pinctrl-0 = <&ge0_rgmii_pins>;
45*724ba675SRob Herring				pinctrl-names = "default";
46*724ba675SRob Herring				phy = <&phy0>;
47*724ba675SRob Herring				phy-mode = "rgmii-id";
48*724ba675SRob Herring			};
49*724ba675SRob Herring
50*724ba675SRob Herring			i2c@11000 {
51*724ba675SRob Herring				status = "okay";
52*724ba675SRob Herring				pinctrl-0 = <&i2c0_pins>;
53*724ba675SRob Herring				pinctrl-names = "default";
54*724ba675SRob Herring				clock-frequency = <100000>;
55*724ba675SRob Herring
56*724ba675SRob Herring				/* RTC - NXP 8563T (second source) */
57*724ba675SRob Herring				rtc@51 {
58*724ba675SRob Herring					compatible = "nxp,pcf8563";
59*724ba675SRob Herring					reg = <0x51>;
60*724ba675SRob Herring					interrupts = <110>;
61*724ba675SRob Herring				};
62*724ba675SRob Herring				/* RTC - MCP7940NT */
63*724ba675SRob Herring				rtc@6f {
64*724ba675SRob Herring					compatible = "microchip,mcp7941x";
65*724ba675SRob Herring					reg = <0x6f>;
66*724ba675SRob Herring					interrupts = <110>;
67*724ba675SRob Herring				};
68*724ba675SRob Herring			};
69*724ba675SRob Herring		};
70*724ba675SRob Herring
71*724ba675SRob Herring	};
72*724ba675SRob Herring
73*724ba675SRob Herring	regulators {
74*724ba675SRob Herring		compatible = "simple-bus";
75*724ba675SRob Herring		#address-cells = <1>;
76*724ba675SRob Herring		#size-cells = <0>;
77*724ba675SRob Herring		pinctrl-names = "default";
78*724ba675SRob Herring
79*724ba675SRob Herring		regulator@1 {
80*724ba675SRob Herring			compatible = "regulator-fixed";
81*724ba675SRob Herring			reg = <1>;
82*724ba675SRob Herring			regulator-name = "SATA0 power";
83*724ba675SRob Herring			regulator-min-microvolt = <5000000>;
84*724ba675SRob Herring			regulator-max-microvolt = <5000000>;
85*724ba675SRob Herring			enable-active-high;
86*724ba675SRob Herring			regulator-always-on;
87*724ba675SRob Herring			regulator-boot-on;
88*724ba675SRob Herring			gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
89*724ba675SRob Herring		};
90*724ba675SRob Herring		regulator@2 {
91*724ba675SRob Herring			compatible = "regulator-fixed";
92*724ba675SRob Herring			reg = <2>;
93*724ba675SRob Herring			regulator-name = "SATA1 power";
94*724ba675SRob Herring			regulator-min-microvolt = <5000000>;
95*724ba675SRob Herring			regulator-max-microvolt = <5000000>;
96*724ba675SRob Herring			enable-active-high;
97*724ba675SRob Herring			regulator-always-on;
98*724ba675SRob Herring			regulator-boot-on;
99*724ba675SRob Herring			gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
100*724ba675SRob Herring		};
101*724ba675SRob Herring	};
102*724ba675SRob Herring
103*724ba675SRob Herring	gpio-fan {
104*724ba675SRob Herring		compatible = "gpio-fan";
105*724ba675SRob Herring		gpios = <&gpio2 0 GPIO_ACTIVE_HIGH
106*724ba675SRob Herring			 &gpio2 1 GPIO_ACTIVE_HIGH>;
107*724ba675SRob Herring	};
108*724ba675SRob Herring
109*724ba675SRob Herring	gpio-keys {
110*724ba675SRob Herring		compatible = "gpio-keys";
111*724ba675SRob Herring
112*724ba675SRob Herring		button-power {
113*724ba675SRob Herring			label = "Power button";
114*724ba675SRob Herring			linux,code = <KEY_POWER>;
115*724ba675SRob Herring			gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
116*724ba675SRob Herring			debounce-interval = <100>;
117*724ba675SRob Herring		};
118*724ba675SRob Herring		button-backup {
119*724ba675SRob Herring			label = "Backup button";
120*724ba675SRob Herring			linux,code = <KEY_OPTION>;
121*724ba675SRob Herring			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
122*724ba675SRob Herring			debounce-interval = <100>;
123*724ba675SRob Herring		};
124*724ba675SRob Herring		button-reset {
125*724ba675SRob Herring			label = "Reset Button";
126*724ba675SRob Herring			linux,code = <KEY_RESTART>;
127*724ba675SRob Herring			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
128*724ba675SRob Herring			debounce-interval = <100>;
129*724ba675SRob Herring		};
130*724ba675SRob Herring	};
131*724ba675SRob Herring
132*724ba675SRob Herring	gpio-leds {
133*724ba675SRob Herring		compatible = "gpio-leds";
134*724ba675SRob Herring
135*724ba675SRob Herring		led-white-power {
136*724ba675SRob Herring			label = "dart:white:power";
137*724ba675SRob Herring			gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
138*724ba675SRob Herring			linux,default-trigger = "timer";
139*724ba675SRob Herring
140*724ba675SRob Herring		};
141*724ba675SRob Herring		led-red-power {
142*724ba675SRob Herring			label = "dart:red:power";
143*724ba675SRob Herring			gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
144*724ba675SRob Herring		};
145*724ba675SRob Herring		led-red-sata0 {
146*724ba675SRob Herring			label = "dart:red:sata0";
147*724ba675SRob Herring			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
148*724ba675SRob Herring		};
149*724ba675SRob Herring		led-red-sata1 {
150*724ba675SRob Herring			label = "dart:red:sata1";
151*724ba675SRob Herring			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
152*724ba675SRob Herring		};
153*724ba675SRob Herring	};
154*724ba675SRob Herring
155*724ba675SRob Herring	gpio_poweroff {
156*724ba675SRob Herring		compatible = "gpio-poweroff";
157*724ba675SRob Herring		gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
158*724ba675SRob Herring	};
159*724ba675SRob Herring};
160*724ba675SRob Herring
161*724ba675SRob Herring&pciec {
162*724ba675SRob Herring	status = "okay";
163*724ba675SRob Herring
164*724ba675SRob Herring	/* USB 3.0 bridge ASM1042A */
165*724ba675SRob Herring	pcie@2,0 {
166*724ba675SRob Herring		status = "okay";
167*724ba675SRob Herring	};
168*724ba675SRob Herring};
169*724ba675SRob Herring
170*724ba675SRob Herring
171*724ba675SRob Herring&mdio {
172*724ba675SRob Herring	pinctrl-0 = <&mdio_pins>;
173*724ba675SRob Herring	pinctrl-names = "default";
174*724ba675SRob Herring
175*724ba675SRob Herring	phy0: ethernet-phy@0 {
176*724ba675SRob Herring		reg = <0>;
177*724ba675SRob Herring	};
178*724ba675SRob Herring};
179*724ba675SRob Herring
180*724ba675SRob Herring&pinctrl {
181*724ba675SRob Herring	pinctrl-0 = <&hdd0_led_sata_pin>, <&hdd1_led_sata_pin>;
182*724ba675SRob Herring	pinctrl-names = "default";
183*724ba675SRob Herring
184*724ba675SRob Herring	hdd0_led_sata_pin: hdd0-led-sata-pin {
185*724ba675SRob Herring		marvell,pins = "mpp48";
186*724ba675SRob Herring		marvell,function = "sata1";
187*724ba675SRob Herring	};
188*724ba675SRob Herring	hdd0_led_gpio_pin: hdd0-led-gpio-pin {
189*724ba675SRob Herring		marvell,pins = "mpp48";
190*724ba675SRob Herring		marvell,function = "gpio";
191*724ba675SRob Herring	};
192*724ba675SRob Herring	hdd1_led_sata_pin: hdd1-led-sata-pin {
193*724ba675SRob Herring		marvell,pins = "mpp57";
194*724ba675SRob Herring		marvell,function = "sata0";
195*724ba675SRob Herring	};
196*724ba675SRob Herring	hdd1_led_gpio_pin: hdd1-led-gpio-pin {
197*724ba675SRob Herring		marvell,pins = "mpp57";
198*724ba675SRob Herring		marvell,function = "gpio";
199*724ba675SRob Herring	};
200*724ba675SRob Herring};
201*724ba675SRob Herring
202*724ba675SRob Herring&nand_controller {
203*724ba675SRob Herring	status = "okay";
204*724ba675SRob Herring
205*724ba675SRob Herring	nand@0 {
206*724ba675SRob Herring		reg = <0>;
207*724ba675SRob Herring		label = "pxa3xx_nand-0";
208*724ba675SRob Herring		nand-rb = <0>;
209*724ba675SRob Herring		marvell,nand-keep-config;
210*724ba675SRob Herring		nand-on-flash-bbt;
211*724ba675SRob Herring		nand-ecc-strength = <4>;
212*724ba675SRob Herring		nand-ecc-step-size = <512>;
213*724ba675SRob Herring
214*724ba675SRob Herring		partitions {
215*724ba675SRob Herring			compatible = "fixed-partitions";
216*724ba675SRob Herring			#address-cells = <1>;
217*724ba675SRob Herring			#size-cells = <1>;
218*724ba675SRob Herring
219*724ba675SRob Herring			partition@0 {
220*724ba675SRob Herring				label = "u-boot";
221*724ba675SRob Herring				reg = <0x0 0x300000>;
222*724ba675SRob Herring			};
223*724ba675SRob Herring			partition@300000 {
224*724ba675SRob Herring				label = "device-tree";
225*724ba675SRob Herring				reg = <0x300000 0x20000>;
226*724ba675SRob Herring			};
227*724ba675SRob Herring			partition@320000 {
228*724ba675SRob Herring				label = "linux";
229*724ba675SRob Herring				reg = <0x320000 0x2000000>;
230*724ba675SRob Herring			};
231*724ba675SRob Herring			partition@2320000 {
232*724ba675SRob Herring				label = "rootfs";
233*724ba675SRob Herring				reg = <0x2320000 0xdce0000>;
234*724ba675SRob Herring			};
235*724ba675SRob Herring		};
236*724ba675SRob Herring	};
237*724ba675SRob Herring};
238