blob: c5ee6c00766c9c0f2b7dd0a8d82ef3a72bd07971 [file] [log] [blame]
Benoit Masson40c2da42014-07-27 16:30:39 -07001/*
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 {
Benoit Masson40c2da42014-07-27 16:30:39 -070054 serial@12000 {
55 status = "okay";
56 };
57
58 mdio {
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 {
Sebastian Hesselbarthc06cf0a2014-09-19 21:29:27 +020069 pinctrl-0 = <&pmx_ge0_rgmii>;
70 pinctrl-names = "default";
Benoit Masson40c2da42014-07-27 16:30:39 -070071 status = "okay";
72 phy = <&phy0>;
73 phy-mode = "rgmii-id";
74 };
75
76 ethernet@74000 {
Sebastian Hesselbarthc06cf0a2014-09-19 21:29:27 +020077 pinctrl-0 = <&pmx_ge1_rgmii>;
78 pinctrl-names = "default";
Benoit Masson40c2da42014-07-27 16:30:39 -070079 status = "okay";
80 phy = <&phy1>;
81 phy-mode = "rgmii-id";
82 };
83
84 usb@50000 {
85 status = "okay";
86 };
87
88 usb@51000 {
89 status = "okay";
90 };
91
92 i2c@11000 {
93 clock-frequency = <400000>;
94 status = "okay";
95
96 adt7473@2e {
97 compatible = "adi,adt7473";
98 reg = <0x2e>;
99 };
100
101 pcf8563@51 {
102 compatible = "nxp,pcf8563";
103 reg = <0x51>;
104 };
105
106 };
107
108 nand@d0000 {
109 status = "okay";
110 num-cs = <1>;
111 marvell,nand-keep-config;
112 marvell,nand-enable-arbiter;
113 nand-on-flash-bbt;
114
115 partition@0 {
116 label = "u-boot";
117 reg = <0x0000000 0xe0000>;
118 read-only;
119 };
120
121 partition@e0000 {
122 label = "u-boot-env";
123 reg = <0xe0000 0x20000>;
124 read-only;
125 };
126
127 partition@100000 {
128 label = "u-boot-env2";
129 reg = <0x100000 0x20000>;
130 read-only;
131 };
132
133 partition@120000 {
134 label = "zImage";
135 reg = <0x120000 0x400000>;
136 };
137
138 partition@520000 {
139 label = "initrd";
140 reg = <0x520000 0x400000>;
141 };
142
143 partition@xE00000 {
144 label = "boot";
145 reg = <0xE00000 0x3F200000>;
146 };
147
148 partition@flash {
149 label = "flash";
150 reg = <0x0 0x40000000>;
151 };
152 };
153 };
154 };
155
156 gpio-keys {
157 compatible = "gpio-keys";
158 pinctrl-0 = <&power_button_pin &reset_button_pin
159 &select_button_pin &scroll_button_pin>;
160 pinctrl-names = "default";
161
162 power-button {
163 label = "Power Button";
164 linux,code = <KEY_POWER>;
165 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
166 };
167
168 reset-button {
169 label = "Reset Button";
170 linux,code = <KEY_RESTART>;
171 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
172 };
173
174 select-button {
175 label = "Select Button";
176 linux,code = <BTN_SELECT>;
177 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
178 };
179
180 scroll-button {
181 label = "Scroll Button";
182 linux,code = <KEY_SCROLLDOWN>;
183 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
184 };
185 };
186
187 spi3 {
188 compatible = "spi-gpio";
189 status = "okay";
190 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
191 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
192 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
193 num-chipselects = <1>;
194 #address-cells = <1>;
195 #size-cells = <0>;
196
197 gpio_spi: gpio_spi@0 {
198 compatible = "fairchild,74hc595";
199 gpio-controller;
200 #gpio-cells = <2>;
201 reg = <0>;
202 registers-number = <2>;
203 spi-max-frequency = <100000>;
204 };
205 };
206
207 gpio-leds {
208 compatible = "gpio-leds";
209 pinctrl-0 = <&hdd_led_pin>;
210 pinctrl-names = "default";
211
212 hdd-led {
213 label = "ix4-300d:hdd:blue";
214 gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
215 default-state = "off";
216 };
217
218 power-led {
219 label = "ix4-300d:power:white";
220 gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
221 /* init blinking while booting */
222 linux,default-trigger = "timer";
223 default-state = "on";
224 };
225
226 sysfail-led {
227 label = "ix4-300d:sysfail:red";
228 gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
229 default-state = "off";
230 };
231
232 sys-led {
233 label = "ix4-300d:sys:blue";
234 gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
235 default-state = "off";
236 };
237
238 hddfail-led {
239 label = "ix4-300d:hddfail:red";
240 gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
241 default-state = "off";
242 };
243
244 };
245
246 /*
247 * Warning: you need both eth1 & 0 PHY initialized (i.e having
248 * them up does the tweak) for poweroff to shutdown otherwise it
249 * reboots
250 */
251 gpio-poweroff {
252 compatible = "gpio-poweroff";
253 pinctrl-0 = <&poweroff_pin>;
254 pinctrl-names = "default";
255 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
256 };
257};
Sebastian Hesselbarth01c43422014-09-19 21:20:09 +0200258
259&pinctrl {
260 poweroff_pin: poweroff-pin {
261 marvell,pins = "mpp24";
262 marvell,function = "gpio";
263 };
264
265 power_button_pin: power-button-pin {
266 marvell,pins = "mpp44";
267 marvell,function = "gpio";
268 };
269
270 reset_button_pin: reset-button-pin {
271 marvell,pins = "mpp45";
272 marvell,function = "gpio";
273 };
274 select_button_pin: select-button-pin {
275 marvell,pins = "mpp41";
276 marvell,function = "gpio";
277 };
278
279 scroll_button_pin: scroll-button-pin {
280 marvell,pins = "mpp42";
281 marvell,function = "gpio";
282 };
283
284 hdd_led_pin: hdd-led-pin {
285 marvell,pins = "mpp26";
286 marvell,function = "gpio";
287 };
288};