]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/armada-370-netgear-rn104.dts
ARM: mvebu: ISL12057 rtc chip can now wake up RN102, RN102 and RN2120
[karo-tx-linux.git] / arch / arm / boot / dts / armada-370-netgear-rn104.dts
1 /*
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 <dt-bindings/input/input.h>
15 #include <dt-bindings/gpio/gpio.h>
16 #include "armada-370.dtsi"
17
18 / {
19         model = "NETGEAR ReadyNAS 104";
20         compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp";
21
22         chosen {
23                 bootargs = "console=ttyS0,115200 earlyprintk";
24         };
25
26         memory {
27                 device_type = "memory";
28                 reg = <0x00000000 0x20000000>; /* 512 MB */
29         };
30
31         soc {
32                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
33                           MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
34
35                 pcie-controller {
36                         status = "okay";
37
38                         /* Connected to FL1009 USB 3.0 controller */
39                         pcie@1,0 {
40                                 /* Port 0, Lane 0 */
41                                 status = "okay";
42                         };
43
44                         /* Connected to Marvell 88SE9215 SATA controller */
45                         pcie@2,0 {
46                                 /* Port 1, Lane 0 */
47                                 status = "okay";
48                         };
49                 };
50
51                 internal-regs {
52                         serial@12000 {
53                                 status = "okay";
54                         };
55
56                         mdio {
57                                 pinctrl-0 = <&mdio_pins>;
58                                 pinctrl-names = "default";
59                                 phy0: ethernet-phy@0 { /* Marvell 88E1318 */
60                                         reg = <0>;
61                                 };
62
63                                 phy1: ethernet-phy@1 { /* Marvell 88E1318 */
64                                         reg = <1>;
65                                 };
66                         };
67
68                         ethernet@70000 {
69                                 pinctrl-0 = <&ge0_rgmii_pins>;
70                                 pinctrl-names = "default";
71                                 status = "okay";
72                                 phy = <&phy0>;
73                                 phy-mode = "rgmii-id";
74                         };
75
76                         ethernet@74000 {
77                                 pinctrl-0 = <&ge1_rgmii_pins>;
78                                 pinctrl-names = "default";
79                                 status = "okay";
80                                 phy = <&phy1>;
81                                 phy-mode = "rgmii-id";
82                         };
83
84                         usb@50000 {
85                                 status = "okay";
86                         };
87
88                         i2c@11000 {
89                                 compatible = "marvell,mv64xxx-i2c";
90                                 clock-frequency = <100000>;
91                                 status = "okay";
92
93                                 isl12057: isl12057@68 {
94                                         compatible = "isil,isl12057";
95                                         reg = <0x68>;
96                                         isil,irq2-can-wakeup-machine;
97                                 };
98
99                                 g762: g762@3e {
100                                         compatible = "gmt,g762";
101                                         reg = <0x3e>;
102                                         clocks = <&g762_clk>; /* input clock */
103                                         fan_gear_mode = <0>;
104                                         fan_startv = <1>;
105                                         pwm_polarity = <0>;
106                                 };
107
108                                 pca9554: pca9554@23 {
109                                         compatible = "nxp,pca9554";
110                                         gpio-controller;
111                                         #gpio-cells = <2>;
112                                         reg = <0x23>;
113                                 };
114                         };
115
116                         nand@d0000 {
117                                 status = "okay";
118                                 num-cs = <1>;
119                                 marvell,nand-keep-config;
120                                 marvell,nand-enable-arbiter;
121                                 nand-on-flash-bbt;
122
123                                 /* Use Hardware BCH ECC */
124                                 nand-ecc-strength = <4>;
125                                 nand-ecc-step-size = <512>;
126
127                                 partition@0 {
128                                         label = "u-boot";
129                                         reg = <0x0000000 0x180000>;  /* 1.5MB */
130                                         read-only;
131                                 };
132
133                                 partition@180000 {
134                                         label = "u-boot-env";
135                                         reg = <0x180000 0x20000>;    /* 128KB */
136                                         read-only;
137                                 };
138
139                                 partition@200000 {
140                                         label = "uImage";
141                                         reg = <0x0200000 0x600000>;    /* 6MB */
142                                 };
143
144                                 partition@800000 {
145                                         label = "minirootfs";
146                                         reg = <0x0800000 0x400000>;    /* 4MB */
147                                 };
148
149                                 /* Last MB is for the BBT, i.e. not writable */
150                                 partition@c00000 {
151                                         label = "ubifs";
152                                         reg = <0x0c00000 0x7400000>; /* 116MB */
153                                 };
154                         };
155                 };
156         };
157
158         clocks {
159                g762_clk: g762-oscillator {
160                          compatible = "fixed-clock";
161                          #clock-cells = <0>;
162                          clock-frequency = <8192>;
163                };
164         };
165
166         gpio-leds {
167                 compatible = "gpio-leds";
168                 pinctrl-0 = <&backup_led_pin &power_led_pin>;
169                 pinctrl-names = "default";
170
171                 blue-backup-led {
172                         label = "rn104:blue:backup";
173                         gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
174                         default-state = "off";
175                 };
176
177                 blue-power-led {
178                         label = "rn104:blue:pwr";
179                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
180                         linux,default-trigger = "keep";
181                 };
182
183                 blue-sata1-led {
184                         label = "rn104:blue:sata1";
185                         gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
186                         default-state = "off";
187                 };
188
189                 blue-sata2-led {
190                         label = "rn104:blue:sata2";
191                         gpios = <&pca9554 1 GPIO_ACTIVE_LOW>;
192                         default-state = "off";
193                 };
194
195                 blue-sata3-led {
196                         label = "rn104:blue:sata3";
197                         gpios = <&pca9554 2 GPIO_ACTIVE_LOW>;
198                         default-state = "off";
199                 };
200
201                 blue-sata4-led {
202                         label = "rn104:blue:sata4";
203                         gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
204                         default-state = "off";
205                 };
206         };
207
208         gpio-keys {
209                 compatible = "gpio-keys";
210                 pinctrl-0 = <&backup_button_pin
211                              &power_button_pin
212                              &reset_button_pin>;
213                 pinctrl-names = "default";
214
215                 backup-button {
216                         label = "Backup Button";
217                         linux,code = <KEY_COPY>;
218                         gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
219                 };
220
221                 power-button {
222                         label = "Power Button";
223                         linux,code = <KEY_POWER>;
224                         gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
225                 };
226
227                 reset-button {
228                         label = "Reset Button";
229                         linux,code = <KEY_RESTART>;
230                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
231                 };
232         };
233
234         gpio-poweroff {
235                 compatible = "gpio-poweroff";
236                 pinctrl-0 = <&poweroff>;
237                 pinctrl-names = "default";
238                 gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
239         };
240 };
241
242 &pinctrl {
243         poweroff: poweroff {
244                 marvell,pins = "mpp60";
245                 marvell,function = "gpio";
246         };
247
248         backup_button_pin: backup-button-pin {
249                 marvell,pins = "mpp52";
250                 marvell,function = "gpio";
251         };
252
253         power_button_pin: power-button-pin {
254                 marvell,pins = "mpp62";
255                 marvell,function = "gpio";
256         };
257
258         backup_led_pin: backup-led-pin {
259                 marvell,pins = "mpp63";
260                 marvell,function = "gpo";
261         };
262
263         power_led_pin: power-led-pin {
264                 marvell,pins = "mpp64";
265                 marvell,function = "gpio";
266         };
267
268         reset_button_pin: reset-button-pin {
269                 marvell,pins = "mpp65";
270                 marvell,function = "gpio";
271         };
272 };