]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/armada-370-netgear-rn102.dts
41c54b130d5a85324dde796c3e8efede6a612889
[karo-tx-linux.git] / arch / arm / boot / dts / armada-370-netgear-rn102.dts
1 /*
2  * Device Tree file for NETGEAR ReadyNAS 102
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 102";
20         compatible = "netgear,readynas-102", "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 Marvell SATA controller */
39                         pcie@1,0 {
40                                 /* Port 0, Lane 0 */
41                                 status = "okay";
42                         };
43
44                         /* Connected to FL1009 USB 3.0 controller */
45                         pcie@2,0 {
46                                 /* Port 1, Lane 0 */
47                                 status = "okay";
48                         };
49                 };
50
51                 internal-regs {
52                         serial@12000 {
53                                 clock-frequency = <200000000>;
54                                 status = "okay";
55                         };
56
57                         sata@a0000 {
58                                 nr-ports = <2>;
59                                 status = "okay";
60                         };
61
62                         pinctrl {
63                                 power_led_pin: power-led-pin {
64                                         marvell,pins = "mpp57";
65                                         marvell,function = "gpio";
66                                 };
67                                 sata1_led_pin: sata1-led-pin {
68                                         marvell,pins = "mpp15";
69                                         marvell,function = "gpio";
70                                 };
71
72                                 sata2_led_pin: sata2-led-pin {
73                                         marvell,pins = "mpp14";
74                                         marvell,function = "gpio";
75                                 };
76
77                                 backup_led_pin: backup-led-pin {
78                                         marvell,pins = "mpp56";
79                                         marvell,function = "gpio";
80                                 };
81
82                                 backup_button_pin: backup-button-pin {
83                                         marvell,pins = "mpp58";
84                                         marvell,function = "gpio";
85                                 };
86
87                                 power_button_pin: power-button-pin {
88                                         marvell,pins = "mpp62";
89                                         marvell,function = "gpio";
90                                 };
91
92                                 reset_button_pin: reset-button-pin {
93                                         marvell,pins = "mpp6";
94                                         marvell,function = "gpio";
95                                 };
96
97                                 poweroff: poweroff {
98                                         marvell,pins = "mpp8";
99                                         marvell,function = "gpio";
100                                 };
101                         };
102
103                         mdio {
104                                 phy0: ethernet-phy@0 { /* Marvell 88E1318 */
105                                         reg = <0>;
106                                 };
107                         };
108
109                         ethernet@74000 {
110                                 status = "okay";
111                                 phy = <&phy0>;
112                                 phy-mode = "rgmii-id";
113                         };
114
115                         usb@50000 {
116                                 status = "okay";
117                         };
118
119                         i2c@11000 {
120                                 compatible = "marvell,mv64xxx-i2c";
121                                 clock-frequency = <100000>;
122                                 status = "okay";
123
124                                 g762: g762@3e {
125                                         compatible = "gmt,g762";
126                                         reg = <0x3e>;
127                                         clocks = <&g762_clk>; /* input clock */
128                                         fan_gear_mode = <0>;
129                                         fan_startv = <1>;
130                                         pwm_polarity = <0>;
131                                 };
132                         };
133                 };
134         };
135
136         clocks {
137                g762_clk: g762-oscillator {
138                          compatible = "fixed-clock";
139                          #clock-cells = <0>;
140                          clock-frequency = <8192>;
141                };
142         };
143
144         gpio-leds {
145                 compatible = "gpio-leds";
146                 pinctrl-0 = <&power_led_pin
147                              &sata1_led_pin
148                              &sata2_led_pin
149                              &backup_led_pin>;
150                 pinctrl-names = "default";
151
152                 blue-power-led {
153                         label = "rn102:blue:pwr";
154                         gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
155                         default-state = "keep";
156                 };
157
158                 green-sata1-led {
159                         label = "rn102:green:sata1";
160                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
161                         default-state = "on";
162                 };
163
164                 green-sata2-led {
165                         label = "rn102:green:sata2";
166                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
167                         default-state = "on";
168                 };
169
170                 green-backup-led {
171                         label = "rn102:green:backup";
172                         gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
173                         default-state = "on";
174                 };
175         };
176
177         gpio-keys {
178                 compatible = "gpio-keys";
179                 pinctrl-0 = <&power_button_pin
180                              &reset_button_pin
181                              &backup_button_pin>;
182                 pinctrl-names = "default";
183
184                 power-button {
185                         label = "Power Button";
186                         linux,code = <KEY_POWER>;
187                         gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
188                 };
189
190                 reset-button {
191                         label = "Reset Button";
192                         linux,code = <KEY_RESTART>;
193                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
194                 };
195
196                 backup-button {
197                         label = "Backup Button";
198                         linux,code = <KEY_COPY>;
199                         gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
200                 };
201         };
202
203         gpio-poweroff {
204                 compatible = "gpio-poweroff";
205                 pinctrl-0 = <&poweroff>;
206                 pinctrl-names = "default";
207                 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
208         };
209 };