1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0
2724ba675SRob Herring/*
3724ba675SRob Herring * Device Tree file for Seagate NAS 4-Bay (Armada 370 SoC).
4724ba675SRob Herring *
5724ba675SRob Herring * Copyright (C) 2015 Seagate
6724ba675SRob Herring *
7724ba675SRob Herring * Author: Vincent Donnefort <vdonnefort@gmail.com>
8724ba675SRob Herring */
9724ba675SRob Herring
10724ba675SRob Herring/*
11724ba675SRob Herring * Here are some information allowing to identify the device:
12724ba675SRob Herring *
13724ba675SRob Herring * Product name                 : Seagate NAS 4-Bay
14724ba675SRob Herring * Code name (board/PCB)        : Dart 4-Bay
15724ba675SRob Herring * Model name (case sticker)    : SRPD40
16724ba675SRob Herring * Material desc (product spec) : STCUxxxxxxx
17724ba675SRob Herring */
18724ba675SRob Herring
19724ba675SRob Herring/dts-v1/;
20724ba675SRob Herring#include "armada-370-seagate-nas-xbay.dtsi"
21724ba675SRob Herring#include <dt-bindings/leds/leds-ns2.h>
22724ba675SRob Herring
23724ba675SRob Herring/ {
24724ba675SRob Herring	model = "Seagate NAS 4-Bay (Dart, SRPD40)";
25724ba675SRob Herring	compatible = "seagate,dart-4", "marvell,armada370", "marvell,armada-370-xp";
26724ba675SRob Herring
27724ba675SRob Herring	soc {
28724ba675SRob Herring		internal-regs {
29724ba675SRob Herring			ethernet@74000 {
30724ba675SRob Herring				status = "okay";
31724ba675SRob Herring				pinctrl-0 = <&ge1_rgmii_pins>;
32724ba675SRob Herring				pinctrl-names = "default";
33724ba675SRob Herring				phy = <&phy1>;
34724ba675SRob Herring				phy-mode = "rgmii-id";
35724ba675SRob Herring			};
36724ba675SRob Herring
37724ba675SRob Herring			i2c@11000 {
38724ba675SRob Herring				/* I2C GPIO expander (PCA9554A) */
39724ba675SRob Herring				pca9554: pca9554@21 {
40724ba675SRob Herring					compatible = "nxp,pca9554";
41724ba675SRob Herring					reg = <0x21>;
42724ba675SRob Herring					#gpio-cells = <2>;
43724ba675SRob Herring					gpio-controller;
44724ba675SRob Herring				};
45724ba675SRob Herring			};
46724ba675SRob Herring		};
47724ba675SRob Herring	};
48724ba675SRob Herring
49*afa6b4f3SKrzysztof Kozlowski	regulator-3 {
50724ba675SRob Herring		compatible = "regulator-fixed";
51724ba675SRob Herring		regulator-name = "SATA2 power";
52724ba675SRob Herring		regulator-min-microvolt = <5000000>;
53724ba675SRob Herring		regulator-max-microvolt = <5000000>;
54724ba675SRob Herring		enable-active-high;
55724ba675SRob Herring		regulator-always-on;
56724ba675SRob Herring		regulator-boot-on;
57724ba675SRob Herring		gpio = <&pca9554 6 GPIO_ACTIVE_HIGH>;
58724ba675SRob Herring	};
59*afa6b4f3SKrzysztof Kozlowski
60*afa6b4f3SKrzysztof Kozlowski	regulator-4 {
61724ba675SRob Herring		compatible = "regulator-fixed";
62724ba675SRob Herring		regulator-name = "SATA3 power";
63724ba675SRob Herring		regulator-min-microvolt = <5000000>;
64724ba675SRob Herring		regulator-max-microvolt = <5000000>;
65724ba675SRob Herring		enable-active-high;
66724ba675SRob Herring		regulator-always-on;
67724ba675SRob Herring		regulator-boot-on;
68724ba675SRob Herring		gpio = <&pca9554 7 GPIO_ACTIVE_HIGH>;
69724ba675SRob Herring	};
70724ba675SRob Herring
71724ba675SRob Herring	gpio-leds {
72724ba675SRob Herring		led-red-sata2 {
73724ba675SRob Herring			label = "dart:red:sata2";
74724ba675SRob Herring			gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
75724ba675SRob Herring		};
76724ba675SRob Herring		led-red-sata3 {
77724ba675SRob Herring			label = "dart:red:sata3";
78724ba675SRob Herring			gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
79724ba675SRob Herring		};
80724ba675SRob Herring	};
81724ba675SRob Herring
82724ba675SRob Herring	leds-ns2 {
83724ba675SRob Herring		compatible = "lacie,ns2-leds";
84724ba675SRob Herring
85724ba675SRob Herring		white-sata2 {
86724ba675SRob Herring			label = "dart:white:sata2";
87724ba675SRob Herring			cmd-gpio = <&pca9554 1 GPIO_ACTIVE_HIGH>;
88724ba675SRob Herring			slow-gpio = <&pca9554 2 GPIO_ACTIVE_HIGH>;
89724ba675SRob Herring			num-modes = <4>;
90724ba675SRob Herring			modes-map = <NS_V2_LED_SATA 0 0
91724ba675SRob Herring				     NS_V2_LED_OFF  0 1
92724ba675SRob Herring				     NS_V2_LED_ON   1 0
93724ba675SRob Herring				     NS_V2_LED_ON   1 1>;
94724ba675SRob Herring		};
95724ba675SRob Herring		white-sata3 {
96724ba675SRob Herring			label = "dart:white:sata3";
97724ba675SRob Herring			cmd-gpio = <&pca9554 4 GPIO_ACTIVE_HIGH>;
98724ba675SRob Herring			slow-gpio = <&pca9554 5 GPIO_ACTIVE_HIGH>;
99724ba675SRob Herring			num-modes = <4>;
100724ba675SRob Herring			modes-map = <NS_V2_LED_SATA 0 0
101724ba675SRob Herring				     NS_V2_LED_OFF  0 1
102724ba675SRob Herring				     NS_V2_LED_ON   1 0
103724ba675SRob Herring				     NS_V2_LED_ON   1 1>;
104724ba675SRob Herring		};
105724ba675SRob Herring	};
106724ba675SRob Herring
107724ba675SRob Herring	gpio-fan {
108724ba675SRob Herring		gpio-fan,speed-map =
109724ba675SRob Herring			<   0 3
110724ba675SRob Herring			  800 2
111724ba675SRob Herring			  1050 1
112724ba675SRob Herring			  1300 0>;
113724ba675SRob Herring	};
114724ba675SRob Herring};
115724ba675SRob Herring
116724ba675SRob Herring&pciec {
117724ba675SRob Herring	/* SATA AHCI controller 88SE9170 */
118724ba675SRob Herring	pcie@1,0 {
119724ba675SRob Herring		status = "okay";
120724ba675SRob Herring	};
121724ba675SRob Herring};
122724ba675SRob Herring
123724ba675SRob Herring&mdio {
124724ba675SRob Herring	phy1: ethernet-phy@1 {
125724ba675SRob Herring		reg = <1>;
126724ba675SRob Herring	};
127724ba675SRob Herring};
128724ba675SRob Herring
129