blob: 50b51509c330c6c0bbb6638dac9603b38bcf417f [file] [log] [blame]
Arnaud Ebalard45e88152013-10-22 20:56:13 +02001/*
2 * Device Tree file for NETGEAR ReadyNAS 104
3 *
4 * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12/dts-v1/;
13
14#include "armada-370.dtsi"
Arnaud Ebalard100a5fa2013-11-22 00:00:12 +010015#include <dt-bindings/gpio/gpio.h>
Arnaud Ebalard45e88152013-10-22 20:56:13 +020016
17/ {
18 model = "NETGEAR ReadyNAS 104";
19 compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp";
20
21 chosen {
22 bootargs = "console=ttyS0,115200 earlyprintk";
23 };
24
25 memory {
26 device_type = "memory";
27 reg = <0x00000000 0x20000000>; /* 512 MB */
28 };
29
30 soc {
31 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
32 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
33
34 pcie-controller {
35 status = "okay";
36
37 /* Connected to FL1009 USB 3.0 controller */
38 pcie@1,0 {
39 /* Port 0, Lane 0 */
40 status = "okay";
41 };
42
43 /* Connected to Marvell 88SE9215 SATA controller */
44 pcie@2,0 {
45 /* Port 1, Lane 0 */
46 status = "okay";
47 };
48 };
49
50 internal-regs {
51 serial@12000 {
52 clock-frequency = <200000000>;
53 status = "okay";
54 };
55
56 pinctrl {
57 poweroff: poweroff {
58 marvell,pins = "mpp60";
59 marvell,function = "gpio";
60 };
61
62 backup_key_pin: backup-key-pin {
63 marvell,pins = "mpp52";
64 marvell,function = "gpio";
65 };
66
67 power_key_pin: power-key-pin {
68 marvell,pins = "mpp62";
69 marvell,function = "gpio";
70 };
71
72 backup_led_pin: backup-led-pin {
73 marvell,pins = "mpp63";
74 marvell,function = "gpo";
75 };
76
77 power_led_pin: power-led-pin {
78 marvell,pins = "mpp64";
79 marvell,function = "gpio";
80 };
81
82 reset_key_pin: reset-key-pin {
83 marvell,pins = "mpp65";
84 marvell,function = "gpio";
85 };
86 };
87
88 mdio {
89 phy0: ethernet-phy@0 {
90 reg = <0>;
91 };
92
93 phy1: ethernet-phy@1 {
94 reg = <1>;
95 };
96 };
97
98 ethernet@70000 {
99 status = "okay";
100 phy = <&phy0>;
101 phy-mode = "rgmii-id";
102 };
103
104 ethernet@74000 {
105 status = "okay";
106 phy = <&phy1>;
107 phy-mode = "rgmii-id";
108 };
109
110 usb@50000 {
111 status = "okay";
112 };
113
114 i2c@11000 {
115 compatible = "marvell,mv64xxx-i2c";
116 clock-frequency = <100000>;
117 status = "okay";
118
119 g762: g762@3e {
120 compatible = "gmt,g762";
121 reg = <0x3e>;
122 clocks = <&g762_clk>; /* input clock */
123 fan_gear_mode = <0>;
124 fan_startv = <1>;
125 pwm_polarity = <0>;
126 };
Arnaud Ebalard100a5fa2013-11-22 00:00:12 +0100127
128 pca9554: pca9554@23 {
129 compatible = "nxp,pca9554";
130 gpio-controller;
131 #gpio-cells = <2>;
132 reg = <0x23>;
133 };
Arnaud Ebalard45e88152013-10-22 20:56:13 +0200134 };
135 };
136 };
137
138 clocks {
139 #address-cells = <1>;
140 #size-cells = <0>;
141
142 g762_clk: fixedclk {
143 compatible = "fixed-clock";
144 #clock-cells = <0>;
145 clock-frequency = <8192>;
146 };
147 };
148
149 gpio_leds {
150 compatible = "gpio-leds";
151 pinctrl-0 = <&backup_led_pin &power_led_pin>;
152 pinctrl-names = "default";
153
154 blue_backup_led {
155 label = "rn104:blue:backup";
156 gpios = <&gpio1 31 0>; /* GPIO 63 Active High */
157 default-state = "off";
158 };
159
160 blue_power_led {
161 label = "rn104:blue:pwr";
162 gpios = <&gpio2 0 1>; /* GPIO 64 Active Low */
163 linux,default-trigger = "keep";
164 };
Arnaud Ebalard100a5fa2013-11-22 00:00:12 +0100165
166 sata1_led {
167 label = "rn104:blue:sata1";
168 gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
169 default-state = "off";
170 };
171
172 sata2_led {
173 label = "rn104:blue:sata2";
174 gpios = <&pca9554 1 GPIO_ACTIVE_LOW>;
175 default-state = "off";
176 };
177
178 sata3_led {
179 label = "rn104:blue:sata3";
180 gpios = <&pca9554 2 GPIO_ACTIVE_LOW>;
181 default-state = "off";
182 };
183
184 sata4_led {
185 label = "rn104:blue:sata4";
186 gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
187 default-state = "off";
188 };
Arnaud Ebalard45e88152013-10-22 20:56:13 +0200189 };
190
191 gpio_keys {
192 compatible = "gpio-keys";
193 #address-cells = <1>;
194 #size-cells = <0>;
195 pinctrl-0 = <&backup_key_pin
196 &power_key_pin
197 &reset_key_pin>;
198 pinctrl-names = "default";
199
200 button@1 {
201 label = "Backup Button";
202 linux,code = <133>; /* KEY_COPY */
203 gpios = <&gpio1 20 1>;
204 };
205
206 button@2 {
207 label = "Power Button";
208 linux,code = <116>; /* KEY_POWER */
209 gpios = <&gpio1 30 0>;
210 };
211
212 button@3 {
213 label = "Reset Button";
214 linux,code = <0x198>; /* KEY_RESTART */
215 gpios = <&gpio2 1 1>;
216 };
217 };
218
219 gpio_poweroff {
220 compatible = "gpio-poweroff";
221 pinctrl-0 = <&poweroff>;
222 pinctrl-names = "default";
223 gpios = <&gpio1 28 1>;
224 };
225};