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 | * |
| 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"; |
Arnaud Ebalard | f19d09e | 2014-11-22 00:45:44 +0100 | [diff] [blame] | 25 | stdout-path = &uart0; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 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 Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 54 | 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 { |
Arnaud Ebalard | 70ee4e9 | 2014-11-22 17:23:30 +0100 | [diff] [blame^] | 69 | pinctrl-0 = <&ge0_rgmii_pins>; |
Sebastian Hesselbarth | c06cf0a | 2014-09-19 21:29:27 +0200 | [diff] [blame] | 70 | pinctrl-names = "default"; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 71 | status = "okay"; |
| 72 | phy = <&phy0>; |
| 73 | phy-mode = "rgmii-id"; |
| 74 | }; |
| 75 | |
| 76 | ethernet@74000 { |
Arnaud Ebalard | 70ee4e9 | 2014-11-22 17:23:30 +0100 | [diff] [blame^] | 77 | pinctrl-0 = <&ge1_rgmii_pins>; |
Sebastian Hesselbarth | c06cf0a | 2014-09-19 21:29:27 +0200 | [diff] [blame] | 78 | pinctrl-names = "default"; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 79 | 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 | |
Sebastian Hesselbarth | 7207cef | 2014-09-19 21:34:11 +0200 | [diff] [blame] | 101 | eeprom@50 { |
| 102 | compatible = "atmel,24c64"; |
| 103 | reg = <0x50>; |
| 104 | }; |
| 105 | |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 106 | pcf8563@51 { |
| 107 | compatible = "nxp,pcf8563"; |
| 108 | reg = <0x51>; |
| 109 | }; |
| 110 | |
| 111 | }; |
| 112 | |
| 113 | nand@d0000 { |
| 114 | status = "okay"; |
| 115 | num-cs = <1>; |
| 116 | marvell,nand-keep-config; |
| 117 | marvell,nand-enable-arbiter; |
| 118 | nand-on-flash-bbt; |
| 119 | |
| 120 | partition@0 { |
| 121 | label = "u-boot"; |
| 122 | reg = <0x0000000 0xe0000>; |
| 123 | read-only; |
| 124 | }; |
| 125 | |
| 126 | partition@e0000 { |
| 127 | label = "u-boot-env"; |
| 128 | reg = <0xe0000 0x20000>; |
| 129 | read-only; |
| 130 | }; |
| 131 | |
| 132 | partition@100000 { |
| 133 | label = "u-boot-env2"; |
| 134 | reg = <0x100000 0x20000>; |
| 135 | read-only; |
| 136 | }; |
| 137 | |
| 138 | partition@120000 { |
| 139 | label = "zImage"; |
| 140 | reg = <0x120000 0x400000>; |
| 141 | }; |
| 142 | |
| 143 | partition@520000 { |
| 144 | label = "initrd"; |
| 145 | reg = <0x520000 0x400000>; |
| 146 | }; |
| 147 | |
| 148 | partition@xE00000 { |
| 149 | label = "boot"; |
| 150 | reg = <0xE00000 0x3F200000>; |
| 151 | }; |
| 152 | |
| 153 | partition@flash { |
| 154 | label = "flash"; |
| 155 | reg = <0x0 0x40000000>; |
| 156 | }; |
| 157 | }; |
| 158 | }; |
| 159 | }; |
| 160 | |
| 161 | gpio-keys { |
| 162 | compatible = "gpio-keys"; |
| 163 | pinctrl-0 = <&power_button_pin &reset_button_pin |
| 164 | &select_button_pin &scroll_button_pin>; |
| 165 | pinctrl-names = "default"; |
| 166 | |
| 167 | power-button { |
| 168 | label = "Power Button"; |
| 169 | linux,code = <KEY_POWER>; |
| 170 | gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; |
| 171 | }; |
| 172 | |
| 173 | reset-button { |
| 174 | label = "Reset Button"; |
| 175 | linux,code = <KEY_RESTART>; |
| 176 | gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; |
| 177 | }; |
| 178 | |
| 179 | select-button { |
| 180 | label = "Select Button"; |
| 181 | linux,code = <BTN_SELECT>; |
| 182 | gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; |
| 183 | }; |
| 184 | |
| 185 | scroll-button { |
| 186 | label = "Scroll Button"; |
| 187 | linux,code = <KEY_SCROLLDOWN>; |
| 188 | gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; |
| 189 | }; |
| 190 | }; |
| 191 | |
| 192 | spi3 { |
| 193 | compatible = "spi-gpio"; |
| 194 | status = "okay"; |
| 195 | gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; |
| 196 | gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ |
| 197 | cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; |
| 198 | num-chipselects = <1>; |
| 199 | #address-cells = <1>; |
| 200 | #size-cells = <0>; |
| 201 | |
| 202 | gpio_spi: gpio_spi@0 { |
| 203 | compatible = "fairchild,74hc595"; |
| 204 | gpio-controller; |
| 205 | #gpio-cells = <2>; |
| 206 | reg = <0>; |
Sebastian Hesselbarth | f5ed9cc | 2014-09-19 21:41:37 +0200 | [diff] [blame] | 207 | registers-number = <1>; |
Benoit Masson | 40c2da4 | 2014-07-27 16:30:39 -0700 | [diff] [blame] | 208 | spi-max-frequency = <100000>; |
| 209 | }; |
| 210 | }; |
| 211 | |
| 212 | gpio-leds { |
| 213 | compatible = "gpio-leds"; |
| 214 | pinctrl-0 = <&hdd_led_pin>; |
| 215 | pinctrl-names = "default"; |
| 216 | |
| 217 | hdd-led { |
| 218 | label = "ix4-300d:hdd:blue"; |
| 219 | gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; |
| 220 | default-state = "off"; |
| 221 | }; |
| 222 | |
| 223 | power-led { |
| 224 | label = "ix4-300d:power:white"; |
| 225 | gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; |
| 226 | /* init blinking while booting */ |
| 227 | linux,default-trigger = "timer"; |
| 228 | default-state = "on"; |
| 229 | }; |
| 230 | |
| 231 | sysfail-led { |
| 232 | label = "ix4-300d:sysfail:red"; |
| 233 | gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; |
| 234 | default-state = "off"; |
| 235 | }; |
| 236 | |
| 237 | sys-led { |
| 238 | label = "ix4-300d:sys:blue"; |
| 239 | gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; |
| 240 | default-state = "off"; |
| 241 | }; |
| 242 | |
| 243 | hddfail-led { |
| 244 | label = "ix4-300d:hddfail:red"; |
| 245 | gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; |
| 246 | default-state = "off"; |
| 247 | }; |
| 248 | |
| 249 | }; |
| 250 | |
| 251 | /* |
| 252 | * Warning: you need both eth1 & 0 PHY initialized (i.e having |
| 253 | * them up does the tweak) for poweroff to shutdown otherwise it |
| 254 | * reboots |
| 255 | */ |
| 256 | gpio-poweroff { |
| 257 | compatible = "gpio-poweroff"; |
| 258 | pinctrl-0 = <&poweroff_pin>; |
| 259 | pinctrl-names = "default"; |
| 260 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; |
| 261 | }; |
| 262 | }; |
Sebastian Hesselbarth | 01c4342 | 2014-09-19 21:20:09 +0200 | [diff] [blame] | 263 | |
| 264 | &pinctrl { |
| 265 | poweroff_pin: poweroff-pin { |
| 266 | marvell,pins = "mpp24"; |
| 267 | marvell,function = "gpio"; |
| 268 | }; |
| 269 | |
| 270 | power_button_pin: power-button-pin { |
| 271 | marvell,pins = "mpp44"; |
| 272 | marvell,function = "gpio"; |
| 273 | }; |
| 274 | |
| 275 | reset_button_pin: reset-button-pin { |
| 276 | marvell,pins = "mpp45"; |
| 277 | marvell,function = "gpio"; |
| 278 | }; |
| 279 | select_button_pin: select-button-pin { |
| 280 | marvell,pins = "mpp41"; |
| 281 | marvell,function = "gpio"; |
| 282 | }; |
| 283 | |
| 284 | scroll_button_pin: scroll-button-pin { |
| 285 | marvell,pins = "mpp42"; |
| 286 | marvell,function = "gpio"; |
| 287 | }; |
| 288 | |
| 289 | hdd_led_pin: hdd-led-pin { |
| 290 | marvell,pins = "mpp26"; |
| 291 | marvell,function = "gpio"; |
| 292 | }; |
| 293 | }; |