Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Device Tree file for Lenovo Iomega ix4-300d |
| 3 | * |
| 4 | * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com> |
| 5 | * |
Gregory CLEMENT | e0b09e2 | 2015-01-26 15:16:04 +0100 | [diff] [blame] | 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 | * |
| 16 | * This file is distributed in the hope that it will be useful |
| 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 | * |
| 21 | * Or, alternatively |
| 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 |
| 26 | * restriction, including without limitation the rights to use |
| 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 | * |
| 35 | * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND |
| 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 |
| 39 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY |
| 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. |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 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 { |
Thomas Petazzoni | 9552203 | 2015-03-03 15:41:02 +0100 | [diff] [blame] | 57 | stdout-path = "serial0:115200n8"; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | memory { |
| 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 |
Boris Brezillon | c466d99 | 2015-08-18 10:08:53 +0200 | [diff] [blame] | 67 | MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 |
Thomas Petazzoni | d7d5a43 | 2016-03-08 16:59:57 +0100 | [diff] [blame] | 68 | MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000 |
| 69 | MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 70 | |
| 71 | pcie-controller { |
| 72 | status = "okay"; |
| 73 | |
| 74 | /* Quad port sata: Marvell 88SX7042 */ |
| 75 | pcie@1,0 { |
| 76 | /* Port 0, Lane 0 */ |
| 77 | status = "okay"; |
| 78 | }; |
| 79 | |
| 80 | /* USB 3.0 xHCI controller: NEC D720200F1 */ |
| 81 | pcie@5,0 { |
| 82 | /* Port 1, Lane 0 */ |
| 83 | status = "okay"; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | internal-regs { |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 88 | serial@12000 { |
| 89 | status = "okay"; |
| 90 | }; |
| 91 | |
| 92 | mdio { |
| 93 | phy0: ethernet-phy@0 { /* Marvell 88E1318 */ |
| 94 | reg = <0>; |
| 95 | }; |
| 96 | |
| 97 | phy1: ethernet-phy@1 { /* Marvell 88E1318 */ |
| 98 | reg = <1>; |
| 99 | }; |
| 100 | }; |
| 101 | |
| 102 | ethernet@70000 { |
Arnaud Ebalard | 70ee4e9 | 2014-11-22 17:23:30 +0100 | [diff] [blame] | 103 | pinctrl-0 = <&ge0_rgmii_pins>; |
Sebastian Hesselbarth | c06cf0a | 2014-09-19 21:29:27 +0200 | [diff] [blame] | 104 | pinctrl-names = "default"; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 105 | status = "okay"; |
| 106 | phy = <&phy0>; |
| 107 | phy-mode = "rgmii-id"; |
| 108 | }; |
| 109 | |
| 110 | ethernet@74000 { |
Arnaud Ebalard | 70ee4e9 | 2014-11-22 17:23:30 +0100 | [diff] [blame] | 111 | pinctrl-0 = <&ge1_rgmii_pins>; |
Sebastian Hesselbarth | c06cf0a | 2014-09-19 21:29:27 +0200 | [diff] [blame] | 112 | pinctrl-names = "default"; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 113 | status = "okay"; |
| 114 | phy = <&phy1>; |
| 115 | phy-mode = "rgmii-id"; |
| 116 | }; |
| 117 | |
| 118 | usb@50000 { |
| 119 | status = "okay"; |
| 120 | }; |
| 121 | |
| 122 | usb@51000 { |
| 123 | status = "okay"; |
| 124 | }; |
| 125 | |
| 126 | i2c@11000 { |
| 127 | clock-frequency = <400000>; |
| 128 | status = "okay"; |
| 129 | |
| 130 | adt7473@2e { |
| 131 | compatible = "adi,adt7473"; |
| 132 | reg = <0x2e>; |
| 133 | }; |
| 134 | |
Sebastian Hesselbarth | 7207cef | 2014-09-19 21:34:11 +0200 | [diff] [blame] | 135 | eeprom@50 { |
| 136 | compatible = "atmel,24c64"; |
| 137 | reg = <0x50>; |
| 138 | }; |
| 139 | |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 140 | pcf8563@51 { |
| 141 | compatible = "nxp,pcf8563"; |
| 142 | reg = <0x51>; |
| 143 | }; |
| 144 | |
| 145 | }; |
| 146 | |
| 147 | nand@d0000 { |
| 148 | status = "okay"; |
| 149 | num-cs = <1>; |
| 150 | marvell,nand-keep-config; |
| 151 | marvell,nand-enable-arbiter; |
| 152 | nand-on-flash-bbt; |
| 153 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 154 | partitions { |
Geert Uytterhoeven | 293de94 | 2015-12-21 11:33:45 +0100 | [diff] [blame] | 155 | compatible = "fixed-partitions"; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 156 | #address-cells = <1>; |
| 157 | #size-cells = <1>; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 158 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 159 | partition@0 { |
| 160 | label = "u-boot"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 161 | reg = <0x00000000 0x000e0000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 162 | read-only; |
| 163 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 164 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 165 | partition@e0000 { |
| 166 | label = "u-boot-env"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 167 | reg = <0x000e0000 0x00020000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 168 | read-only; |
| 169 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 170 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 171 | partition@100000 { |
| 172 | label = "u-boot-env2"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 173 | reg = <0x00100000 0x00020000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 174 | read-only; |
| 175 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 176 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 177 | partition@120000 { |
| 178 | label = "zImage"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 179 | reg = <0x00120000 0x00400000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 180 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 181 | |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 182 | partition@520000 { |
| 183 | label = "initrd"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 184 | reg = <0x00520000 0x00400000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 185 | }; |
| 186 | |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 187 | partition@e00000 { |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 188 | label = "boot"; |
Sebastian Hesselbarth | 4627629 | 2015-11-28 12:14:07 +0100 | [diff] [blame] | 189 | reg = <0x00e00000 0x3f200000>; |
Sebastian Hesselbarth | efc1aaa | 2015-11-28 12:14:06 +0100 | [diff] [blame] | 190 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 191 | }; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 192 | }; |
| 193 | }; |
| 194 | }; |
| 195 | |
| 196 | gpio-keys { |
| 197 | compatible = "gpio-keys"; |
| 198 | pinctrl-0 = <&power_button_pin &reset_button_pin |
| 199 | &select_button_pin &scroll_button_pin>; |
| 200 | pinctrl-names = "default"; |
| 201 | |
| 202 | power-button { |
| 203 | label = "Power Button"; |
| 204 | linux,code = <KEY_POWER>; |
| 205 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; |
| 206 | }; |
| 207 | |
| 208 | reset-button { |
| 209 | label = "Reset Button"; |
| 210 | linux,code = <KEY_RESTART>; |
| 211 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; |
| 212 | }; |
| 213 | |
| 214 | select-button { |
| 215 | label = "Select Button"; |
| 216 | linux,code = <BTN_SELECT>; |
| 217 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
| 218 | }; |
| 219 | |
| 220 | scroll-button { |
| 221 | label = "Scroll Button"; |
| 222 | linux,code = <KEY_SCROLLDOWN>; |
| 223 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
| 224 | }; |
| 225 | }; |
| 226 | |
| 227 | spi3 { |
| 228 | compatible = "spi-gpio"; |
| 229 | status = "okay"; |
| 230 | gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; |
| 231 | gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ |
| 232 | cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; |
| 233 | num-chipselects = <1>; |
| 234 | #address-cells = <1>; |
| 235 | #size-cells = <0>; |
| 236 | |
| 237 | gpio_spi: gpio_spi@0 { |
| 238 | compatible = "fairchild,74hc595"; |
| 239 | gpio-controller; |
| 240 | #gpio-cells = <2>; |
| 241 | reg = <0>; |
Sebastian Hesselbarth | f5ed9cc | 2014-09-19 21:41:37 +0200 | [diff] [blame] | 242 | registers-number = <1>; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 243 | spi-max-frequency = <100000>; |
| 244 | }; |
| 245 | }; |
| 246 | |
| 247 | gpio-leds { |
| 248 | compatible = "gpio-leds"; |
| 249 | pinctrl-0 = <&hdd_led_pin>; |
| 250 | pinctrl-names = "default"; |
| 251 | |
| 252 | hdd-led { |
| 253 | label = "ix4-300d:hdd:blue"; |
| 254 | gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; |
| 255 | default-state = "off"; |
| 256 | }; |
| 257 | |
| 258 | power-led { |
| 259 | label = "ix4-300d:power:white"; |
| 260 | gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; |
| 261 | /* init blinking while booting */ |
| 262 | linux,default-trigger = "timer"; |
| 263 | default-state = "on"; |
| 264 | }; |
| 265 | |
| 266 | sysfail-led { |
| 267 | label = "ix4-300d:sysfail:red"; |
| 268 | gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; |
| 269 | default-state = "off"; |
| 270 | }; |
| 271 | |
| 272 | sys-led { |
| 273 | label = "ix4-300d:sys:blue"; |
| 274 | gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; |
| 275 | default-state = "off"; |
| 276 | }; |
| 277 | |
| 278 | hddfail-led { |
| 279 | label = "ix4-300d:hddfail:red"; |
| 280 | gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; |
| 281 | default-state = "off"; |
| 282 | }; |
| 283 | |
| 284 | }; |
| 285 | |
| 286 | /* |
| 287 | * Warning: you need both eth1 & 0 PHY initialized (i.e having |
| 288 | * them up does the tweak) for poweroff to shutdown otherwise it |
| 289 | * reboots |
| 290 | */ |
| 291 | gpio-poweroff { |
| 292 | compatible = "gpio-poweroff"; |
| 293 | pinctrl-0 = <&poweroff_pin>; |
| 294 | pinctrl-names = "default"; |
| 295 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; |
| 296 | }; |
| 297 | }; |
Sebastian Hesselbarth | 01c4342 | 2014-09-19 21:20:09 +0200 | [diff] [blame] | 298 | |
| 299 | &pinctrl { |
| 300 | poweroff_pin: poweroff-pin { |
| 301 | marvell,pins = "mpp24"; |
| 302 | marvell,function = "gpio"; |
| 303 | }; |
| 304 | |
| 305 | power_button_pin: power-button-pin { |
| 306 | marvell,pins = "mpp44"; |
| 307 | marvell,function = "gpio"; |
| 308 | }; |
| 309 | |
| 310 | reset_button_pin: reset-button-pin { |
| 311 | marvell,pins = "mpp45"; |
| 312 | marvell,function = "gpio"; |
| 313 | }; |
| 314 | select_button_pin: select-button-pin { |
| 315 | marvell,pins = "mpp41"; |
| 316 | marvell,function = "gpio"; |
| 317 | }; |
| 318 | |
| 319 | scroll_button_pin: scroll-button-pin { |
| 320 | marvell,pins = "mpp42"; |
| 321 | marvell,function = "gpio"; |
| 322 | }; |
| 323 | |
| 324 | hdd_led_pin: hdd-led-pin { |
| 325 | marvell,pins = "mpp26"; |
| 326 | marvell,function = "gpio"; |
| 327 | }; |
| 328 | }; |