Merge remote-tracking branches 'regulator/fix/da9211', 'regulator/fix/ltc3589' and...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / armada-xp-lenovo-ix4-300d.dts
1 /*
2  * Device Tree file for Lenovo Iomega ix4-300d
3  *
4  * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com>
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-xp-mv78230.dtsi"
17
18 / {
19         model = "Lenovo Iomega ix4-300d";
20         compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230",
21                      "marvell,armadaxp", "marvell,armada-370-xp";
22
23         chosen {
24                 bootargs = "console=ttyS0,115200 earlyprintk";
25                 stdout-path = "/soc/internal-regs/serial@12000";
26         };
27
28         memory {
29                 device_type = "memory";
30                 reg = <0 0x00000000 0 0x20000000>; /* 512MB */
31         };
32
33         soc {
34                 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
35                         MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
36
37                 pcie-controller {
38                         status = "okay";
39
40                         /* Quad port sata: Marvell 88SX7042 */
41                         pcie@1,0 {
42                                 /* Port 0, Lane 0 */
43                                 status = "okay";
44                         };
45
46                         /* USB 3.0 xHCI controller: NEC D720200F1 */
47                         pcie@5,0 {
48                                 /* Port 1, Lane 0 */
49                                 status = "okay";
50                         };
51                 };
52
53                 internal-regs {
54                         pinctrl {
55                                 poweroff_pin: poweroff-pin {
56                                         marvell,pins = "mpp24";
57                                         marvell,function = "gpio";
58                                 };
59
60                                 power_button_pin: power-button-pin {
61                                         marvell,pins = "mpp44";
62                                         marvell,function = "gpio";
63                                 };
64
65                                 reset_button_pin: reset-button-pin {
66                                         marvell,pins = "mpp45";
67                                         marvell,function = "gpio";
68                                 };
69                                 select_button_pin: select-button-pin {
70                                         marvell,pins = "mpp41";
71                                         marvell,function = "gpio";
72                                 };
73
74                                 scroll_button_pin: scroll-button-pin {
75                                         marvell,pins = "mpp42";
76                                         marvell,function = "gpio";
77                                 };
78
79                                 hdd_led_pin: hdd-led-pin {
80                                         marvell,pins = "mpp26";
81                                         marvell,function = "gpio";
82                                 };
83                         };
84
85                         serial@12000 {
86                                 status = "okay";
87                         };
88
89                         mdio {
90                                 phy0: ethernet-phy@0 { /* Marvell 88E1318 */
91                                         reg = <0>;
92                                 };
93
94                                 phy1: ethernet-phy@1 { /* Marvell 88E1318 */
95                                         reg = <1>;
96                                 };
97                         };
98
99                         ethernet@70000 {
100                                 status = "okay";
101                                 phy = <&phy0>;
102                                 phy-mode = "rgmii-id";
103                         };
104
105                         ethernet@74000 {
106                                 status = "okay";
107                                 phy = <&phy1>;
108                                 phy-mode = "rgmii-id";
109                         };
110
111                         usb@50000 {
112                                 status = "okay";
113                         };
114
115                         usb@51000 {
116                                 status = "okay";
117                         };
118
119                         i2c@11000 {
120                                 clock-frequency = <400000>;
121                                 status = "okay";
122
123                                 adt7473@2e {
124                                         compatible = "adi,adt7473";
125                                         reg = <0x2e>;
126                                 };
127
128                                 pcf8563@51 {
129                                         compatible = "nxp,pcf8563";
130                                         reg = <0x51>;
131                                 };
132
133                         };
134
135                         nand@d0000 {
136                                 status = "okay";
137                                 num-cs = <1>;
138                                 marvell,nand-keep-config;
139                                 marvell,nand-enable-arbiter;
140                                 nand-on-flash-bbt;
141
142                                 partition@0 {
143                                         label = "u-boot";
144                                         reg = <0x0000000 0xe0000>;
145                                         read-only;
146                                 };
147
148                                 partition@e0000 {
149                                         label = "u-boot-env";
150                                         reg = <0xe0000 0x20000>;
151                                         read-only;
152                                 };
153
154                                 partition@100000 {
155                                         label = "u-boot-env2";
156                                         reg = <0x100000 0x20000>;
157                                         read-only;
158                                 };
159
160                                 partition@120000 {
161                                         label = "zImage";
162                                         reg = <0x120000 0x400000>;
163                                 };
164
165                                 partition@520000 {
166                                         label = "initrd";
167                                         reg = <0x520000 0x400000>;
168                                 };
169
170                                 partition@xE00000 {
171                                         label = "boot";
172                                         reg = <0xE00000 0x3F200000>;
173                                 };
174
175                                 partition@flash {
176                                         label = "flash";
177                                         reg = <0x0 0x40000000>;
178                                 };
179                         };
180                 };
181         };
182
183         gpio-keys {
184                 compatible = "gpio-keys";
185                 pinctrl-0 = <&power_button_pin &reset_button_pin
186                         &select_button_pin &scroll_button_pin>;
187                 pinctrl-names = "default";
188
189                 power-button {
190                         label = "Power Button";
191                         linux,code = <KEY_POWER>;
192                         gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
193                 };
194
195                 reset-button {
196                         label = "Reset Button";
197                         linux,code = <KEY_RESTART>;
198                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
199                 };
200
201                 select-button {
202                         label = "Select Button";
203                         linux,code = <BTN_SELECT>;
204                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
205                 };
206
207                 scroll-button {
208                         label = "Scroll Button";
209                         linux,code = <KEY_SCROLLDOWN>;
210                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
211                 };
212         };
213
214         spi3 {
215                 compatible = "spi-gpio";
216                 status = "okay";
217                 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
218                 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
219                 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
220                 num-chipselects = <1>;
221                 #address-cells = <1>;
222                 #size-cells = <0>;
223
224                 gpio_spi: gpio_spi@0 {
225                         compatible = "fairchild,74hc595";
226                         gpio-controller;
227                         #gpio-cells = <2>;
228                         reg = <0>;
229                         registers-number = <2>;
230                         spi-max-frequency = <100000>;
231                 };
232         };
233
234         gpio-leds {
235                 compatible = "gpio-leds";
236                 pinctrl-0 = <&hdd_led_pin>;
237                 pinctrl-names = "default";
238
239                 hdd-led {
240                         label = "ix4-300d:hdd:blue";
241                         gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
242                         default-state = "off";
243                 };
244
245                 power-led {
246                         label = "ix4-300d:power:white";
247                         gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
248                         /* init blinking while booting */
249                         linux,default-trigger = "timer";
250                         default-state = "on";
251                 };
252
253                 sysfail-led {
254                         label = "ix4-300d:sysfail:red";
255                         gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
256                         default-state = "off";
257                 };
258
259                 sys-led {
260                         label = "ix4-300d:sys:blue";
261                         gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
262                         default-state = "off";
263                 };
264
265                 hddfail-led {
266                         label = "ix4-300d:hddfail:red";
267                         gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
268                         default-state = "off";
269                 };
270
271         };
272
273         /*
274          * Warning: you need both eth1 & 0 PHY initialized (i.e having
275          * them up does the tweak) for poweroff to shutdown otherwise it
276          * reboots
277          */
278         gpio-poweroff {
279                 compatible = "gpio-poweroff";
280                 pinctrl-0 = <&poweroff_pin>;
281                 pinctrl-names = "default";
282                 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
283         };
284 };