1/* 2 * Device Tree file for Lenovo Iomega ix4-300d 3 * 4 * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com> 5 * 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. 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 {
| 1/* 2 * Device Tree file for Lenovo Iomega ix4-300d 3 * 4 * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com> 5 * 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. 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 {
|
57 bootargs = "console=ttyS0,115200 earlyprintk"; 58 stdout-path = &uart0;
| 57 stdout-path = "serial0:115200n8";
|
59 }; 60 61 memory { 62 device_type = "memory"; 63 reg = <0 0x00000000 0 0x20000000>; /* 512MB */ 64 }; 65 66 soc { 67 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
| 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
|
68 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
| 67 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 68 MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 69 MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
69 70 pcie-controller { 71 status = "okay"; 72 73 /* Quad port sata: Marvell 88SX7042 */ 74 pcie@1,0 { 75 /* Port 0, Lane 0 */ 76 status = "okay"; 77 }; 78 79 /* USB 3.0 xHCI controller: NEC D720200F1 */ 80 pcie@5,0 { 81 /* Port 1, Lane 0 */ 82 status = "okay"; 83 }; 84 }; 85 86 internal-regs { 87 serial@12000 { 88 status = "okay"; 89 }; 90 91 mdio { 92 phy0: ethernet-phy@0 { /* Marvell 88E1318 */ 93 reg = <0>; 94 }; 95 96 phy1: ethernet-phy@1 { /* Marvell 88E1318 */ 97 reg = <1>; 98 }; 99 }; 100 101 ethernet@70000 { 102 pinctrl-0 = <&ge0_rgmii_pins>; 103 pinctrl-names = "default"; 104 status = "okay"; 105 phy = <&phy0>; 106 phy-mode = "rgmii-id"; 107 }; 108 109 ethernet@74000 { 110 pinctrl-0 = <&ge1_rgmii_pins>; 111 pinctrl-names = "default"; 112 status = "okay"; 113 phy = <&phy1>; 114 phy-mode = "rgmii-id"; 115 }; 116 117 usb@50000 { 118 status = "okay"; 119 }; 120 121 usb@51000 { 122 status = "okay"; 123 }; 124 125 i2c@11000 { 126 clock-frequency = <400000>; 127 status = "okay"; 128 129 adt7473@2e { 130 compatible = "adi,adt7473"; 131 reg = <0x2e>; 132 }; 133 134 eeprom@50 { 135 compatible = "atmel,24c64"; 136 reg = <0x50>; 137 }; 138 139 pcf8563@51 { 140 compatible = "nxp,pcf8563"; 141 reg = <0x51>; 142 }; 143 144 }; 145 146 nand@d0000 { 147 status = "okay"; 148 num-cs = <1>; 149 marvell,nand-keep-config; 150 marvell,nand-enable-arbiter; 151 nand-on-flash-bbt; 152
| 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 { 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 { 103 pinctrl-0 = <&ge0_rgmii_pins>; 104 pinctrl-names = "default"; 105 status = "okay"; 106 phy = <&phy0>; 107 phy-mode = "rgmii-id"; 108 }; 109 110 ethernet@74000 { 111 pinctrl-0 = <&ge1_rgmii_pins>; 112 pinctrl-names = "default"; 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 135 eeprom@50 { 136 compatible = "atmel,24c64"; 137 reg = <0x50>; 138 }; 139 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
|
153 partition@0 { 154 label = "u-boot"; 155 reg = <0x0000000 0xe0000>; 156 read-only; 157 };
| 154 partitions { 155 #address-cells = <1>; 156 #size-cells = <1>;
|
158
| 157
|
159 partition@e0000 { 160 label = "u-boot-env"; 161 reg = <0xe0000 0x20000>; 162 read-only; 163 };
| 158 partition@0 { 159 label = "u-boot"; 160 reg = <0x00000000 0x000e0000>; 161 read-only; 162 };
|
164
| 163
|
165 partition@100000 { 166 label = "u-boot-env2"; 167 reg = <0x100000 0x20000>; 168 read-only; 169 };
| 164 partition@e0000 { 165 label = "u-boot-env"; 166 reg = <0x000e0000 0x00020000>; 167 read-only; 168 };
|
170
| 169
|
171 partition@120000 { 172 label = "zImage"; 173 reg = <0x120000 0x400000>; 174 };
| 170 partition@100000 { 171 label = "u-boot-env2"; 172 reg = <0x00100000 0x00020000>; 173 read-only; 174 };
|
175
| 175
|
176 partition@520000 { 177 label = "initrd"; 178 reg = <0x520000 0x400000>; 179 };
| 176 partition@120000 { 177 label = "zImage"; 178 reg = <0x00120000 0x00400000>; 179 };
|
180
| 180
|
181 partition@xE00000 { 182 label = "boot"; 183 reg = <0xE00000 0x3F200000>; 184 };
| 181 partition@520000 { 182 label = "initrd"; 183 reg = <0x00520000 0x00400000>; 184 };
|
185
| 185
|
186 partition@flash { 187 label = "flash"; 188 reg = <0x0 0x40000000>;
| 186 partition@e00000 { 187 label = "boot"; 188 reg = <0x00e00000 0x3f200000>; 189 };
|
189 }; 190 }; 191 }; 192 }; 193 194 gpio-keys { 195 compatible = "gpio-keys"; 196 pinctrl-0 = <&power_button_pin &reset_button_pin 197 &select_button_pin &scroll_button_pin>; 198 pinctrl-names = "default"; 199 200 power-button { 201 label = "Power Button"; 202 linux,code = <KEY_POWER>; 203 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 204 }; 205 206 reset-button { 207 label = "Reset Button"; 208 linux,code = <KEY_RESTART>; 209 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 210 }; 211 212 select-button { 213 label = "Select Button"; 214 linux,code = <BTN_SELECT>; 215 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 216 }; 217 218 scroll-button { 219 label = "Scroll Button"; 220 linux,code = <KEY_SCROLLDOWN>; 221 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 222 }; 223 }; 224 225 spi3 { 226 compatible = "spi-gpio"; 227 status = "okay"; 228 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; 229 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ 230 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; 231 num-chipselects = <1>; 232 #address-cells = <1>; 233 #size-cells = <0>; 234 235 gpio_spi: gpio_spi@0 { 236 compatible = "fairchild,74hc595"; 237 gpio-controller; 238 #gpio-cells = <2>; 239 reg = <0>; 240 registers-number = <1>; 241 spi-max-frequency = <100000>; 242 }; 243 }; 244 245 gpio-leds { 246 compatible = "gpio-leds"; 247 pinctrl-0 = <&hdd_led_pin>; 248 pinctrl-names = "default"; 249 250 hdd-led { 251 label = "ix4-300d:hdd:blue"; 252 gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; 253 default-state = "off"; 254 }; 255 256 power-led { 257 label = "ix4-300d:power:white"; 258 gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; 259 /* init blinking while booting */ 260 linux,default-trigger = "timer"; 261 default-state = "on"; 262 }; 263 264 sysfail-led { 265 label = "ix4-300d:sysfail:red"; 266 gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; 267 default-state = "off"; 268 }; 269 270 sys-led { 271 label = "ix4-300d:sys:blue"; 272 gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; 273 default-state = "off"; 274 }; 275 276 hddfail-led { 277 label = "ix4-300d:hddfail:red"; 278 gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; 279 default-state = "off"; 280 }; 281 282 }; 283 284 /* 285 * Warning: you need both eth1 & 0 PHY initialized (i.e having 286 * them up does the tweak) for poweroff to shutdown otherwise it 287 * reboots 288 */ 289 gpio-poweroff { 290 compatible = "gpio-poweroff"; 291 pinctrl-0 = <&poweroff_pin>; 292 pinctrl-names = "default"; 293 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; 294 }; 295}; 296 297&pinctrl { 298 poweroff_pin: poweroff-pin { 299 marvell,pins = "mpp24"; 300 marvell,function = "gpio"; 301 }; 302 303 power_button_pin: power-button-pin { 304 marvell,pins = "mpp44"; 305 marvell,function = "gpio"; 306 }; 307 308 reset_button_pin: reset-button-pin { 309 marvell,pins = "mpp45"; 310 marvell,function = "gpio"; 311 }; 312 select_button_pin: select-button-pin { 313 marvell,pins = "mpp41"; 314 marvell,function = "gpio"; 315 }; 316 317 scroll_button_pin: scroll-button-pin { 318 marvell,pins = "mpp42"; 319 marvell,function = "gpio"; 320 }; 321 322 hdd_led_pin: hdd-led-pin { 323 marvell,pins = "mpp26"; 324 marvell,function = "gpio"; 325 }; 326};
| 190 }; 191 }; 192 }; 193 }; 194 195 gpio-keys { 196 compatible = "gpio-keys"; 197 pinctrl-0 = <&power_button_pin &reset_button_pin 198 &select_button_pin &scroll_button_pin>; 199 pinctrl-names = "default"; 200 201 power-button { 202 label = "Power Button"; 203 linux,code = <KEY_POWER>; 204 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 205 }; 206 207 reset-button { 208 label = "Reset Button"; 209 linux,code = <KEY_RESTART>; 210 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 211 }; 212 213 select-button { 214 label = "Select Button"; 215 linux,code = <BTN_SELECT>; 216 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 217 }; 218 219 scroll-button { 220 label = "Scroll Button"; 221 linux,code = <KEY_SCROLLDOWN>; 222 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 223 }; 224 }; 225 226 spi3 { 227 compatible = "spi-gpio"; 228 status = "okay"; 229 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; 230 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ 231 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; 232 num-chipselects = <1>; 233 #address-cells = <1>; 234 #size-cells = <0>; 235 236 gpio_spi: gpio_spi@0 { 237 compatible = "fairchild,74hc595"; 238 gpio-controller; 239 #gpio-cells = <2>; 240 reg = <0>; 241 registers-number = <1>; 242 spi-max-frequency = <100000>; 243 }; 244 }; 245 246 gpio-leds { 247 compatible = "gpio-leds"; 248 pinctrl-0 = <&hdd_led_pin>; 249 pinctrl-names = "default"; 250 251 hdd-led { 252 label = "ix4-300d:hdd:blue"; 253 gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; 254 default-state = "off"; 255 }; 256 257 power-led { 258 label = "ix4-300d:power:white"; 259 gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; 260 /* init blinking while booting */ 261 linux,default-trigger = "timer"; 262 default-state = "on"; 263 }; 264 265 sysfail-led { 266 label = "ix4-300d:sysfail:red"; 267 gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; 268 default-state = "off"; 269 }; 270 271 sys-led { 272 label = "ix4-300d:sys:blue"; 273 gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; 274 default-state = "off"; 275 }; 276 277 hddfail-led { 278 label = "ix4-300d:hddfail:red"; 279 gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; 280 default-state = "off"; 281 }; 282 283 }; 284 285 /* 286 * Warning: you need both eth1 & 0 PHY initialized (i.e having 287 * them up does the tweak) for poweroff to shutdown otherwise it 288 * reboots 289 */ 290 gpio-poweroff { 291 compatible = "gpio-poweroff"; 292 pinctrl-0 = <&poweroff_pin>; 293 pinctrl-names = "default"; 294 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; 295 }; 296}; 297 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};
|