1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Device Tree file for Seagate NAS 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 * Here are some information allowing to identify the device:
12*724ba675SRob Herring *
13*724ba675SRob Herring * Product name                 : Seagate NAS 4-Bay
14*724ba675SRob Herring * Code name (board/PCB)        : Dart 4-Bay
15*724ba675SRob Herring * Model name (case sticker)    : SRPD40
16*724ba675SRob Herring * Material desc (product spec) : STCUxxxxxxx
17*724ba675SRob Herring */
18*724ba675SRob Herring
19*724ba675SRob Herring/dts-v1/;
20*724ba675SRob Herring#include "armada-370-seagate-nas-xbay.dtsi"
21*724ba675SRob Herring#include <dt-bindings/leds/leds-ns2.h>
22*724ba675SRob Herring
23*724ba675SRob Herring/ {
24*724ba675SRob Herring	model = "Seagate NAS 4-Bay (Dart, SRPD40)";
25*724ba675SRob Herring	compatible = "seagate,dart-4", "marvell,armada370", "marvell,armada-370-xp";
26*724ba675SRob Herring
27*724ba675SRob Herring	soc {
28*724ba675SRob Herring		internal-regs {
29*724ba675SRob Herring			ethernet@74000 {
30*724ba675SRob Herring				status = "okay";
31*724ba675SRob Herring				pinctrl-0 = <&ge1_rgmii_pins>;
32*724ba675SRob Herring				pinctrl-names = "default";
33*724ba675SRob Herring				phy = <&phy1>;
34*724ba675SRob Herring				phy-mode = "rgmii-id";
35*724ba675SRob Herring			};
36*724ba675SRob Herring
37*724ba675SRob Herring			i2c@11000 {
38*724ba675SRob Herring				/* I2C GPIO expander (PCA9554A) */
39*724ba675SRob Herring				pca9554: pca9554@21 {
40*724ba675SRob Herring					compatible = "nxp,pca9554";
41*724ba675SRob Herring					reg = <0x21>;
42*724ba675SRob Herring					#gpio-cells = <2>;
43*724ba675SRob Herring					gpio-controller;
44*724ba675SRob Herring				};
45*724ba675SRob Herring			};
46*724ba675SRob Herring		};
47*724ba675SRob Herring	};
48*724ba675SRob Herring
49*724ba675SRob Herring	regulators {
50*724ba675SRob Herring		regulator@3 {
51*724ba675SRob Herring			compatible = "regulator-fixed";
52*724ba675SRob Herring			reg = <3>;
53*724ba675SRob Herring			regulator-name = "SATA2 power";
54*724ba675SRob Herring			regulator-min-microvolt = <5000000>;
55*724ba675SRob Herring			regulator-max-microvolt = <5000000>;
56*724ba675SRob Herring			enable-active-high;
57*724ba675SRob Herring			regulator-always-on;
58*724ba675SRob Herring			regulator-boot-on;
59*724ba675SRob Herring			gpio = <&pca9554 6 GPIO_ACTIVE_HIGH>;
60*724ba675SRob Herring		};
61*724ba675SRob Herring		regulator@4 {
62*724ba675SRob Herring			compatible = "regulator-fixed";
63*724ba675SRob Herring			reg = <4>;
64*724ba675SRob Herring			regulator-name = "SATA3 power";
65*724ba675SRob Herring			regulator-min-microvolt = <5000000>;
66*724ba675SRob Herring			regulator-max-microvolt = <5000000>;
67*724ba675SRob Herring			enable-active-high;
68*724ba675SRob Herring			regulator-always-on;
69*724ba675SRob Herring			regulator-boot-on;
70*724ba675SRob Herring			gpio = <&pca9554 7 GPIO_ACTIVE_HIGH>;
71*724ba675SRob Herring		};
72*724ba675SRob Herring	};
73*724ba675SRob Herring
74*724ba675SRob Herring	gpio-leds {
75*724ba675SRob Herring		led-red-sata2 {
76*724ba675SRob Herring			label = "dart:red:sata2";
77*724ba675SRob Herring			gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
78*724ba675SRob Herring		};
79*724ba675SRob Herring		led-red-sata3 {
80*724ba675SRob Herring			label = "dart:red:sata3";
81*724ba675SRob Herring			gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
82*724ba675SRob Herring		};
83*724ba675SRob Herring	};
84*724ba675SRob Herring
85*724ba675SRob Herring	leds-ns2 {
86*724ba675SRob Herring		compatible = "lacie,ns2-leds";
87*724ba675SRob Herring
88*724ba675SRob Herring		white-sata2 {
89*724ba675SRob Herring			label = "dart:white:sata2";
90*724ba675SRob Herring			cmd-gpio = <&pca9554 1 GPIO_ACTIVE_HIGH>;
91*724ba675SRob Herring			slow-gpio = <&pca9554 2 GPIO_ACTIVE_HIGH>;
92*724ba675SRob Herring			num-modes = <4>;
93*724ba675SRob Herring			modes-map = <NS_V2_LED_SATA 0 0
94*724ba675SRob Herring				     NS_V2_LED_OFF  0 1
95*724ba675SRob Herring				     NS_V2_LED_ON   1 0
96*724ba675SRob Herring				     NS_V2_LED_ON   1 1>;
97*724ba675SRob Herring		};
98*724ba675SRob Herring		white-sata3 {
99*724ba675SRob Herring			label = "dart:white:sata3";
100*724ba675SRob Herring			cmd-gpio = <&pca9554 4 GPIO_ACTIVE_HIGH>;
101*724ba675SRob Herring			slow-gpio = <&pca9554 5 GPIO_ACTIVE_HIGH>;
102*724ba675SRob Herring			num-modes = <4>;
103*724ba675SRob Herring			modes-map = <NS_V2_LED_SATA 0 0
104*724ba675SRob Herring				     NS_V2_LED_OFF  0 1
105*724ba675SRob Herring				     NS_V2_LED_ON   1 0
106*724ba675SRob Herring				     NS_V2_LED_ON   1 1>;
107*724ba675SRob Herring		};
108*724ba675SRob Herring	};
109*724ba675SRob Herring
110*724ba675SRob Herring	gpio-fan {
111*724ba675SRob Herring		gpio-fan,speed-map =
112*724ba675SRob Herring			<   0 3
113*724ba675SRob Herring			  800 2
114*724ba675SRob Herring			  1050 1
115*724ba675SRob Herring			  1300 0>;
116*724ba675SRob Herring	};
117*724ba675SRob Herring};
118*724ba675SRob Herring
119*724ba675SRob Herring&pciec {
120*724ba675SRob Herring	/* SATA AHCI controller 88SE9170 */
121*724ba675SRob Herring	pcie@1,0 {
122*724ba675SRob Herring		status = "okay";
123*724ba675SRob Herring	};
124*724ba675SRob Herring};
125*724ba675SRob Herring
126*724ba675SRob Herring&mdio {
127*724ba675SRob Herring	phy1: ethernet-phy@1 {
128*724ba675SRob Herring		reg = <1>;
129*724ba675SRob Herring	};
130*724ba675SRob Herring};
131*724ba675SRob Herring
132