1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Device Tree file for Lenovo Iomega ix4-300d 4 * 5 * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com> 6 */ 7 8/dts-v1/; 9 10#include <dt-bindings/input/input.h> 11#include <dt-bindings/gpio/gpio.h> 12#include "armada-xp-mv78230.dtsi" 13 14/ { 15 model = "Lenovo Iomega ix4-300d"; 16 compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230", 17 "marvell,armadaxp", "marvell,armada-370-xp"; 18 19 chosen { 20 stdout-path = "serial0:115200n8"; 21 }; 22 23 memory@0 { 24 device_type = "memory"; 25 reg = <0 0x00000000 0 0x20000000>; /* 512MB */ 26 }; 27 28 soc { 29 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 30 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 31 MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000 32 MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>; 33 34 internal-regs { 35 serial@12000 { 36 status = "okay"; 37 }; 38 39 ethernet@70000 { 40 pinctrl-0 = <&ge0_rgmii_pins>; 41 pinctrl-names = "default"; 42 status = "okay"; 43 phy = <&phy0>; 44 phy-mode = "rgmii-id"; 45 }; 46 47 ethernet@74000 { 48 pinctrl-0 = <&ge1_rgmii_pins>; 49 pinctrl-names = "default"; 50 status = "okay"; 51 phy = <&phy1>; 52 phy-mode = "rgmii-id"; 53 }; 54 55 usb@50000 { 56 status = "okay"; 57 }; 58 59 usb@51000 { 60 status = "okay"; 61 }; 62 63 i2c@11000 { 64 clock-frequency = <400000>; 65 status = "okay"; 66 67 adt7473@2e { 68 compatible = "adi,adt7473"; 69 reg = <0x2e>; 70 }; 71 72 eeprom@50 { 73 compatible = "atmel,24c64"; 74 reg = <0x50>; 75 }; 76 77 pcf8563@51 { 78 compatible = "nxp,pcf8563"; 79 reg = <0x51>; 80 }; 81 82 }; 83 84 nand@d0000 { 85 status = "okay"; 86 label = "pxa3xx_nand-0"; 87 num-cs = <1>; 88 marvell,nand-keep-config; 89 nand-on-flash-bbt; 90 91 partitions { 92 compatible = "fixed-partitions"; 93 #address-cells = <1>; 94 #size-cells = <1>; 95 96 partition@0 { 97 label = "u-boot"; 98 reg = <0x00000000 0x000e0000>; 99 read-only; 100 }; 101 102 partition@e0000 { 103 label = "u-boot-env"; 104 reg = <0x000e0000 0x00020000>; 105 read-only; 106 }; 107 108 partition@100000 { 109 label = "u-boot-env2"; 110 reg = <0x00100000 0x00020000>; 111 read-only; 112 }; 113 114 partition@120000 { 115 label = "zImage"; 116 reg = <0x00120000 0x00400000>; 117 }; 118 119 partition@520000 { 120 label = "initrd"; 121 reg = <0x00520000 0x00400000>; 122 }; 123 124 partition@e00000 { 125 label = "boot"; 126 reg = <0x00e00000 0x3f200000>; 127 }; 128 }; 129 }; 130 }; 131 }; 132 133 gpio-keys { 134 compatible = "gpio-keys"; 135 pinctrl-0 = <&power_button_pin &reset_button_pin 136 &select_button_pin &scroll_button_pin>; 137 pinctrl-names = "default"; 138 139 power-button { 140 label = "Power Button"; 141 linux,code = <KEY_POWER>; 142 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 143 }; 144 145 reset-button { 146 label = "Reset Button"; 147 linux,code = <KEY_RESTART>; 148 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 149 }; 150 151 select-button { 152 label = "Select Button"; 153 linux,code = <BTN_SELECT>; 154 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 155 }; 156 157 scroll-button { 158 label = "Scroll Button"; 159 linux,code = <KEY_SCROLLDOWN>; 160 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 161 }; 162 }; 163 164 spi3 { 165 compatible = "spi-gpio"; 166 status = "okay"; 167 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>; 168 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/ 169 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; 170 num-chipselects = <1>; 171 #address-cells = <1>; 172 #size-cells = <0>; 173 174 gpio_spi: gpio_spi@0 { 175 compatible = "fairchild,74hc595"; 176 gpio-controller; 177 #gpio-cells = <2>; 178 reg = <0>; 179 registers-number = <1>; 180 spi-max-frequency = <100000>; 181 }; 182 }; 183 184 gpio-leds { 185 compatible = "gpio-leds"; 186 pinctrl-0 = <&hdd_led_pin>; 187 pinctrl-names = "default"; 188 189 hdd-led { 190 label = "ix4-300d:hdd:blue"; 191 gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; 192 default-state = "off"; 193 }; 194 195 power-led { 196 label = "ix4-300d:power:white"; 197 gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>; 198 /* init blinking while booting */ 199 linux,default-trigger = "timer"; 200 default-state = "on"; 201 }; 202 203 sysfail-led { 204 label = "ix4-300d:sysfail:red"; 205 gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>; 206 default-state = "off"; 207 }; 208 209 sys-led { 210 label = "ix4-300d:sys:blue"; 211 gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>; 212 default-state = "off"; 213 }; 214 215 hddfail-led { 216 label = "ix4-300d:hddfail:red"; 217 gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>; 218 default-state = "off"; 219 }; 220 221 }; 222 223 /* 224 * Warning: you need both eth1 & 0 PHY initialized (i.e having 225 * them up does the tweak) for poweroff to shutdown otherwise it 226 * reboots 227 */ 228 gpio-poweroff { 229 compatible = "gpio-poweroff"; 230 pinctrl-0 = <&poweroff_pin>; 231 pinctrl-names = "default"; 232 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; 233 }; 234}; 235&pciec { 236 status = "okay"; 237 238 /* Quad port sata: Marvell 88SX7042 */ 239 pcie@1,0 { 240 /* Port 0, Lane 0 */ 241 status = "okay"; 242 }; 243 244 /* USB 3.0 xHCI controller: NEC D720200F1 */ 245 pcie@5,0 { 246 /* Port 1, Lane 0 */ 247 status = "okay"; 248 }; 249}; 250 251&mdio { 252 phy0: ethernet-phy@0 { /* Marvell 88E1318 */ 253 reg = <0>; 254 }; 255 256 phy1: ethernet-phy@1 { /* Marvell 88E1318 */ 257 reg = <1>; 258 }; 259}; 260 261&pinctrl { 262 poweroff_pin: poweroff-pin { 263 marvell,pins = "mpp24"; 264 marvell,function = "gpio"; 265 }; 266 267 power_button_pin: power-button-pin { 268 marvell,pins = "mpp44"; 269 marvell,function = "gpio"; 270 }; 271 272 reset_button_pin: reset-button-pin { 273 marvell,pins = "mpp45"; 274 marvell,function = "gpio"; 275 }; 276 select_button_pin: select-button-pin { 277 marvell,pins = "mpp41"; 278 marvell,function = "gpio"; 279 }; 280 281 scroll_button_pin: scroll-button-pin { 282 marvell,pins = "mpp42"; 283 marvell,function = "gpio"; 284 }; 285 286 hdd_led_pin: hdd-led-pin { 287 marvell,pins = "mpp26"; 288 marvell,function = "gpio"; 289 }; 290}; 291