]>
Commit | Line | Data |
---|---|---|
40c2da45 BM |
1 | /* |
2 | * Device Tree file for Lenovo Iomega ix4-300d | |
3 | * | |
4 | * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com> | |
5 | * | |
e0b09e2f GC |
6 | * This file is dual-licensed: you can use it either under the terms |
7 | * of the GPL or the X11 license, at your option. Note that this dual | |
8 | * licensing only applies to this file, and not this project as a | |
9 | * whole. | |
10 | * | |
11 | * a) This file is free software; you can redistribute it and/or | |
12 | * modify it under the terms of the GNU General Public License as | |
13 | * published by the Free Software Foundation; either version 2 of the | |
14 | * License, or (at your option) any later version. | |
15 | * | |
24f0b6fe | 16 | * This file is distributed in the hope that it will be useful, |
e0b09e2f GC |
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | * GNU General Public License for more details. | |
20 | * | |
24f0b6fe | 21 | * Or, alternatively, |
e0b09e2f GC |
22 | * |
23 | * b) Permission is hereby granted, free of charge, to any person | |
24 | * obtaining a copy of this software and associated documentation | |
25 | * files (the "Software"), to deal in the Software without | |
24f0b6fe | 26 | * restriction, including without limitation the rights to use, |
e0b09e2f GC |
27 | * copy, modify, merge, publish, distribute, sublicense, and/or |
28 | * sell copies of the Software, and to permit persons to whom the | |
29 | * Software is furnished to do so, subject to the following | |
30 | * conditions: | |
31 | * | |
32 | * The above copyright notice and this permission notice shall be | |
33 | * included in all copies or substantial portions of the Software. | |
34 | * | |
24f0b6fe | 35 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
e0b09e2f GC |
36 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
37 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
38 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
24f0b6fe | 39 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
e0b09e2f GC |
40 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
41 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
42 | * OTHER DEALINGS IN THE SOFTWARE. | |
40c2da45 BM |
43 | */ |
44 | ||
45 | /dts-v1/; | |
46 | ||
47 | #include <dt-bindings/input/input.h> | |
48 | #include <dt-bindings/gpio/gpio.h> | |
49 | #include "armada-xp-mv78230.dtsi" | |
50 | ||
51 | / { | |
52 | model = "Lenovo Iomega ix4-300d"; | |
53 | compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230", | |
54 | "marvell,armadaxp", "marvell,armada-370-xp"; | |
55 | ||
56 | chosen { | |
9552203c | 57 | stdout-path = "serial0:115200n8"; |
40c2da45 BM |
58 | }; |
59 | ||
6f477f43 | 60 | memory@0 { |
40c2da45 BM |
61 | device_type = "memory"; |
62 | reg = <0 0x00000000 0 0x20000000>; /* 512MB */ | |
63 | }; | |
64 | ||
65 | soc { | |
66 | ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 | |
c466d997 | 67 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 |
d7d5a43c TP |
68 | MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000 |
69 | MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>; | |
40c2da45 | 70 | |
40c2da45 | 71 | internal-regs { |
40c2da45 BM |
72 | serial@12000 { |
73 | status = "okay"; | |
74 | }; | |
75 | ||
40c2da45 | 76 | ethernet@70000 { |
70ee4e9d | 77 | pinctrl-0 = <&ge0_rgmii_pins>; |
c06cf0a2 | 78 | pinctrl-names = "default"; |
40c2da45 BM |
79 | status = "okay"; |
80 | phy = <&phy0>; | |
81 | phy-mode = "rgmii-id"; | |
82 | }; | |
83 | ||
84 | ethernet@74000 { | |
70ee4e9d | 85 | pinctrl-0 = <&ge1_rgmii_pins>; |
c06cf0a2 | 86 | pinctrl-names = "default"; |
40c2da45 BM |
87 | status = "okay"; |
88 | phy = <&phy1>; | |
89 | phy-mode = "rgmii-id"; | |
90 | }; | |
91 | ||
92 | usb@50000 { | |
93 | status = "okay"; | |
94 | }; | |
95 | ||
96 | usb@51000 { | |
97 | status = "okay"; | |
98 | }; | |
99 | ||
100 | i2c@11000 { | |
101 | clock-frequency = <400000>; | |
102 | status = "okay"; | |
103 | ||
104 | adt7473@2e { | |
105 | compatible = "adi,adt7473"; | |
106 | reg = <0x2e>; | |
107 | }; | |
108 | ||
7207cef4 SH |
109 | eeprom@50 { |
110 | compatible = "atmel,24c64"; | |
111 | reg = <0x50>; | |
112 | }; | |
113 | ||
40c2da45 BM |
114 | pcf8563@51 { |
115 | compatible = "nxp,pcf8563"; | |
116 | reg = <0x51>; | |
117 | }; | |
118 | ||
119 | }; | |
120 | ||
121 | nand@d0000 { | |
122 | status = "okay"; | |
123 | num-cs = <1>; | |
124 | marvell,nand-keep-config; | |
125 | marvell,nand-enable-arbiter; | |
126 | nand-on-flash-bbt; | |
127 | ||
efc1aaa5 | 128 | partitions { |
293de94c | 129 | compatible = "fixed-partitions"; |
efc1aaa5 SH |
130 | #address-cells = <1>; |
131 | #size-cells = <1>; | |
132 | ||
133 | partition@0 { | |
134 | label = "u-boot"; | |
4627629b | 135 | reg = <0x00000000 0x000e0000>; |
efc1aaa5 SH |
136 | read-only; |
137 | }; | |
138 | ||
139 | partition@e0000 { | |
140 | label = "u-boot-env"; | |
4627629b | 141 | reg = <0x000e0000 0x00020000>; |
efc1aaa5 SH |
142 | read-only; |
143 | }; | |
144 | ||
145 | partition@100000 { | |
146 | label = "u-boot-env2"; | |
4627629b | 147 | reg = <0x00100000 0x00020000>; |
efc1aaa5 SH |
148 | read-only; |
149 | }; | |
150 | ||
151 | partition@120000 { | |
152 | label = "zImage"; | |
4627629b | 153 | reg = <0x00120000 0x00400000>; |
efc1aaa5 SH |
154 | }; |
155 | ||
156 | partition@520000 { | |
157 | label = "initrd"; | |
4627629b | 158 | reg = <0x00520000 0x00400000>; |
efc1aaa5 SH |
159 | }; |
160 | ||
4627629b | 161 | partition@e00000 { |
efc1aaa5 | 162 | label = "boot"; |
4627629b | 163 | reg = <0x00e00000 0x3f200000>; |
efc1aaa5 | 164 | }; |
40c2da45 | 165 | }; |
40c2da45 BM |
166 | }; |
167 | }; | |
168 | }; | |
169 | ||
170 | gpio-keys { | |
171 | compatible = "gpio-keys"; | |
172 | pinctrl-0 = <&power_button_pin &reset_button_pin | |
173 | &select_button_pin &scroll_button_pin>; | |
174 | pinctrl-names = "default"; | |
175 | ||
176 | power-button { | |
177 | label = "Power Button"; | |
178 | linux,code = <KEY_POWER>; | |
179 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; | |
180 | }; | |
181 | ||
182 | reset-button { | |
183 | label = "Reset Button"; | |
184 | linux,code = <KEY_RESTART>; | |
185 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; | |
186 | }; | |
187 | ||
188 | select-button { | |
189 | label = "Select Button"; | |
190 | linux,code = <BTN_SELECT>; | |
191 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; | |
192 | }; | |
193 | ||
194 | scroll-button { | |
195 | label = "Scroll Button"; | |
196 | linux,code = <KEY_SCROLLDOWN>; | |
197 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; | |
198 | }; | |
199 | }; | |
200 | ||
201 | spi3 { | |
202 | compatible = "spi-gpio"; | |
203 | status = "okay"; | |
204 | gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; | |
205 | gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ | |
206 | cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; | |
207 | num-chipselects = <1>; | |
208 | #address-cells = <1>; | |
209 | #size-cells = <0>; | |
210 | ||
211 | gpio_spi: gpio_spi@0 { | |
212 | compatible = "fairchild,74hc595"; | |
213 | gpio-controller; | |
214 | #gpio-cells = <2>; | |
215 | reg = <0>; | |
f5ed9ccc | 216 | registers-number = <1>; |
40c2da45 BM |
217 | spi-max-frequency = <100000>; |
218 | }; | |
219 | }; | |
220 | ||
221 | gpio-leds { | |
222 | compatible = "gpio-leds"; | |
223 | pinctrl-0 = <&hdd_led_pin>; | |
224 | pinctrl-names = "default"; | |
225 | ||
226 | hdd-led { | |
227 | label = "ix4-300d:hdd:blue"; | |
228 | gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; | |
229 | default-state = "off"; | |
230 | }; | |
231 | ||
232 | power-led { | |
233 | label = "ix4-300d:power:white"; | |
234 | gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; | |
235 | /* init blinking while booting */ | |
236 | linux,default-trigger = "timer"; | |
237 | default-state = "on"; | |
238 | }; | |
239 | ||
240 | sysfail-led { | |
241 | label = "ix4-300d:sysfail:red"; | |
242 | gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; | |
243 | default-state = "off"; | |
244 | }; | |
245 | ||
246 | sys-led { | |
247 | label = "ix4-300d:sys:blue"; | |
248 | gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; | |
249 | default-state = "off"; | |
250 | }; | |
251 | ||
252 | hddfail-led { | |
253 | label = "ix4-300d:hddfail:red"; | |
254 | gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; | |
255 | default-state = "off"; | |
256 | }; | |
257 | ||
258 | }; | |
259 | ||
260 | /* | |
261 | * Warning: you need both eth1 & 0 PHY initialized (i.e having | |
262 | * them up does the tweak) for poweroff to shutdown otherwise it | |
263 | * reboots | |
264 | */ | |
265 | gpio-poweroff { | |
266 | compatible = "gpio-poweroff"; | |
267 | pinctrl-0 = <&poweroff_pin>; | |
268 | pinctrl-names = "default"; | |
269 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; | |
270 | }; | |
271 | }; | |
007d05d8 GC |
272 | &pciec { |
273 | status = "okay"; | |
274 | ||
275 | /* Quad port sata: Marvell 88SX7042 */ | |
276 | pcie@1,0 { | |
277 | /* Port 0, Lane 0 */ | |
278 | status = "okay"; | |
279 | }; | |
280 | ||
281 | /* USB 3.0 xHCI controller: NEC D720200F1 */ | |
282 | pcie@5,0 { | |
283 | /* Port 1, Lane 0 */ | |
284 | status = "okay"; | |
285 | }; | |
286 | }; | |
01c43422 | 287 | |
1fc21295 GC |
288 | &mdio { |
289 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ | |
290 | reg = <0>; | |
291 | }; | |
292 | ||
293 | phy1: ethernet-phy@1 { /* Marvell 88E1318 */ | |
294 | reg = <1>; | |
295 | }; | |
296 | }; | |
297 | ||
01c43422 SH |
298 | &pinctrl { |
299 | poweroff_pin: poweroff-pin { | |
300 | marvell,pins = "mpp24"; | |
301 | marvell,function = "gpio"; | |
302 | }; | |
303 | ||
304 | power_button_pin: power-button-pin { | |
305 | marvell,pins = "mpp44"; | |
306 | marvell,function = "gpio"; | |
307 | }; | |
308 | ||
309 | reset_button_pin: reset-button-pin { | |
310 | marvell,pins = "mpp45"; | |
311 | marvell,function = "gpio"; | |
312 | }; | |
313 | select_button_pin: select-button-pin { | |
314 | marvell,pins = "mpp41"; | |
315 | marvell,function = "gpio"; | |
316 | }; | |
317 | ||
318 | scroll_button_pin: scroll-button-pin { | |
319 | marvell,pins = "mpp42"; | |
320 | marvell,function = "gpio"; | |
321 | }; | |
322 | ||
323 | hdd_led_pin: hdd-led-pin { | |
324 | marvell,pins = "mpp26"; | |
325 | marvell,function = "gpio"; | |
326 | }; | |
327 | }; |