armada-xp-synology-ds414.dts revision 295436
1279377Simp/* 2279377Simp * Device Tree file for Synology DS414 3279377Simp * 4279377Simp * Copyright (C) 2014, Arnaud EBALARD <arno@natisbad.org> 5279377Simp * 6279377Simp * This file is dual-licensed: you can use it either under the terms 7279377Simp * of the GPL or the X11 license, at your option. Note that this dual 8279377Simp * licensing only applies to this file, and not this project as a 9279377Simp * whole. 10279377Simp * 11279377Simp * a) This file is free software; you can redistribute it and/or 12279377Simp * modify it under the terms of the GNU General Public License as 13279377Simp * published by the Free Software Foundation; either version 2 of the 14279377Simp * License, or (at your option) any later version. 15279377Simp * 16279377Simp * This file is distributed in the hope that it will be useful 17279377Simp * but WITHOUT ANY WARRANTY; without even the implied warranty of 18279377Simp * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19279377Simp * GNU General Public License for more details. 20279377Simp * 21279377Simp * Or, alternatively 22279377Simp * 23279377Simp * b) Permission is hereby granted, free of charge, to any person 24279377Simp * obtaining a copy of this software and associated documentation 25279377Simp * files (the "Software"), to deal in the Software without 26279377Simp * restriction, including without limitation the rights to use 27279377Simp * copy, modify, merge, publish, distribute, sublicense, and/or 28279377Simp * sell copies of the Software, and to permit persons to whom the 29279377Simp * Software is furnished to do so, subject to the following 30279377Simp * conditions: 31279377Simp * 32279377Simp * The above copyright notice and this permission notice shall be 33279377Simp * included in all copies or substantial portions of the Software. 34279377Simp * 35279377Simp * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND 36279377Simp * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37279377Simp * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38279377Simp * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39279377Simp * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY 40279377Simp * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41279377Simp * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42279377Simp * OTHER DEALINGS IN THE SOFTWARE. 43279377Simp * 44279377Simp * Note: this Device Tree assumes that the bootloader has remapped the 45279377Simp * internal registers to 0xf1000000 (instead of the old 0xd0000000). 46279377Simp * The 0xf1000000 is the default used by the recent, DT-capable, U-Boot 47279377Simp * bootloaders provided by Marvell. It is used in recent versions of 48279377Simp * DSM software provided by Synology. Nonetheless, some earlier boards 49279377Simp * were delivered with an older version of u-boot that left internal 50279377Simp * registers mapped at 0xd0000000. If you have such a device you will 51279377Simp * not be able to directly boot a kernel based on this Device Tree. In 52279377Simp * that case, the preferred solution is to update your bootloader (e.g. 53279377Simp * by upgrading to latest version of DSM, or building a new one and 54279377Simp * installing it from u-boot prompt) or adjust the Devive Tree 55279377Simp * (s/0xf1000000/0xd0000000/ in 'ranges' below). 56279377Simp */ 57279377Simp 58279377Simp/dts-v1/; 59279377Simp 60279377Simp#include <dt-bindings/input/input.h> 61279377Simp#include <dt-bindings/gpio/gpio.h> 62279377Simp#include "armada-xp-mv78230.dtsi" 63279377Simp 64279377Simp/ { 65279377Simp model = "Synology DS414"; 66279377Simp compatible = "synology,ds414", "marvell,armadaxp-mv78230", 67279377Simp "marvell,armadaxp", "marvell,armada-370-xp"; 68279377Simp 69279377Simp chosen { 70295436Sandrew stdout-path = "serial0:115200n8"; 71279377Simp }; 72279377Simp 73279377Simp memory { 74279377Simp device_type = "memory"; 75279377Simp reg = <0 0x00000000 0 0x40000000>; /* 1GB */ 76279377Simp }; 77279377Simp 78279377Simp soc { 79279377Simp ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 80295436Sandrew MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 81295436Sandrew MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 82295436Sandrew MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; 83279377Simp 84279377Simp pcie-controller { 85279377Simp status = "okay"; 86279377Simp 87279377Simp /* 88279377Simp * Connected to Marvell 88SX7042 SATA-II controller 89279377Simp * handling the four disks. 90279377Simp */ 91279377Simp pcie@1,0 { 92279377Simp /* Port 0, Lane 0 */ 93279377Simp status = "okay"; 94279377Simp }; 95279377Simp 96279377Simp /* 97279377Simp * Connected to EtronTech EJ168A XHCI controller 98279377Simp * providing the two rear USB 3.0 ports. 99279377Simp */ 100279377Simp pcie@5,0 { 101279377Simp /* Port 1, Lane 0 */ 102279377Simp status = "okay"; 103279377Simp }; 104279377Simp }; 105279377Simp 106279377Simp internal-regs { 107279377Simp 108279377Simp /* RTC is provided by Seiko S-35390A below */ 109279377Simp rtc@10300 { 110279377Simp status = "disabled"; 111279377Simp }; 112279377Simp 113279377Simp spi0: spi@10600 { 114279377Simp status = "okay"; 115279377Simp 116279377Simp spi-flash@0 { 117279377Simp #address-cells = <1>; 118279377Simp #size-cells = <1>; 119295436Sandrew compatible = "micron,n25q064", "jedec,spi-nor"; 120279377Simp reg = <0>; /* Chip select 0 */ 121279377Simp spi-max-frequency = <20000000>; 122279377Simp 123279377Simp /* 124279377Simp * Warning! 125279377Simp * 126279377Simp * Synology u-boot uses its compiled-in environment 127279377Simp * and it seems Synology did not care to change u-boot 128279377Simp * default configuration in order to allow saving a 129279377Simp * modified environment at a sensible location. So, 130279377Simp * if you do a 'saveenv' under u-boot, your modified 131279377Simp * environment will be saved at 1MB after the start 132279377Simp * of the flash, i.e. in the middle of the uImage. 133279377Simp * For that reason, it is strongly advised not to 134279377Simp * change the default environment, unless you know 135279377Simp * what you are doing. 136279377Simp */ 137279377Simp partition@00000000 { /* u-boot */ 138279377Simp label = "RedBoot"; 139279377Simp reg = <0x00000000 0x000d0000>; /* 832KB */ 140279377Simp }; 141279377Simp 142279377Simp partition@000c0000 { /* uImage */ 143279377Simp label = "zImage"; 144279377Simp reg = <0x000d0000 0x002d0000>; /* 2880KB */ 145279377Simp }; 146279377Simp 147279377Simp partition@003a0000 { /* uInitramfs */ 148279377Simp label = "rd.gz"; 149279377Simp reg = <0x003a0000 0x00430000>; /* 4250KB */ 150279377Simp }; 151279377Simp 152279377Simp partition@007d0000 { /* MAC address and serial number */ 153279377Simp label = "vendor"; 154279377Simp reg = <0x007d0000 0x00010000>; /* 64KB */ 155279377Simp }; 156279377Simp 157279377Simp partition@007e0000 { 158279377Simp label = "RedBoot config"; 159279377Simp reg = <0x007e0000 0x00010000>; /* 64KB */ 160279377Simp }; 161279377Simp 162279377Simp partition@007f0000 { 163279377Simp label = "FIS directory"; 164279377Simp reg = <0x007f0000 0x00010000>; /* 64KB */ 165279377Simp }; 166279377Simp }; 167279377Simp }; 168279377Simp 169279377Simp i2c@11000 { 170279377Simp clock-frequency = <400000>; 171279377Simp status = "okay"; 172279377Simp 173279377Simp s35390a: s35390a@30 { 174279377Simp compatible = "sii,s35390a"; 175279377Simp reg = <0x30>; 176279377Simp }; 177279377Simp }; 178279377Simp 179279377Simp /* Connected to a header on device's PCB. This 180279377Simp * provides the main console for the device. 181279377Simp * 182279377Simp * Warning: the device may not boot with a 3.3V 183279377Simp * USB-serial converter connected when the power 184279377Simp * button is pressed. The converter needs to be 185279377Simp * connected a few seconds after pressing the 186279377Simp * power button. This is possibly due to UART0_TXD 187279377Simp * pin being sampled at reset (bit 0 of SAR). 188279377Simp */ 189279377Simp serial@12000 { 190279377Simp status = "okay"; 191279377Simp }; 192279377Simp 193279377Simp /* Connected to a Microchip PIC16F883 for power control */ 194279377Simp serial@12100 { 195279377Simp status = "okay"; 196279377Simp }; 197279377Simp 198279377Simp poweroff@12100 { 199279377Simp compatible = "synology,power-off"; 200279377Simp reg = <0x12100 0x100>; 201279377Simp clocks = <&coreclk 0>; 202279377Simp }; 203279377Simp 204279377Simp /* Front USB 2.0 port */ 205279377Simp usb@50000 { 206279377Simp status = "okay"; 207279377Simp }; 208279377Simp 209279377Simp mdio { 210279377Simp phy0: ethernet-phy@0 { /* Marvell 88E1512 */ 211279377Simp reg = <0>; 212279377Simp }; 213279377Simp 214279377Simp phy1: ethernet-phy@1 { /* Marvell 88E1512 */ 215279377Simp reg = <1>; 216279377Simp }; 217279377Simp }; 218279377Simp 219279377Simp ethernet@70000 { 220279377Simp status = "okay"; 221279377Simp pinctrl-0 = <&ge0_rgmii_pins>; 222279377Simp pinctrl-names = "default"; 223279377Simp phy = <&phy1>; 224279377Simp phy-mode = "rgmii-id"; 225279377Simp }; 226279377Simp 227279377Simp ethernet@74000 { 228279377Simp pinctrl-0 = <&ge1_rgmii_pins>; 229279377Simp pinctrl-names = "default"; 230279377Simp status = "okay"; 231279377Simp phy = <&phy0>; 232279377Simp phy-mode = "rgmii-id"; 233279377Simp }; 234279377Simp }; 235279377Simp }; 236279377Simp 237279377Simp regulators { 238279377Simp compatible = "simple-bus"; 239279377Simp #address-cells = <1>; 240279377Simp #size-cells = <0>; 241279377Simp pinctrl-0 = <&sata1_pwr_pin &sata2_pwr_pin 242279377Simp &sata3_pwr_pin &sata4_pwr_pin>; 243279377Simp pinctrl-names = "default"; 244279377Simp 245279377Simp sata1_regulator: sata1-regulator { 246279377Simp compatible = "regulator-fixed"; 247279377Simp reg = <1>; 248279377Simp regulator-name = "SATA1 Power"; 249279377Simp regulator-min-microvolt = <5000000>; 250279377Simp regulator-max-microvolt = <5000000>; 251279377Simp startup-delay-us = <2000000>; 252279377Simp enable-active-high; 253279377Simp regulator-always-on; 254279377Simp regulator-boot-on; 255279377Simp gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; 256279377Simp }; 257279377Simp 258279377Simp sata2_regulator: sata2-regulator { 259279377Simp compatible = "regulator-fixed"; 260279377Simp reg = <2>; 261279377Simp regulator-name = "SATA2 Power"; 262279377Simp regulator-min-microvolt = <5000000>; 263279377Simp regulator-max-microvolt = <5000000>; 264279377Simp startup-delay-us = <4000000>; 265279377Simp enable-active-high; 266279377Simp regulator-always-on; 267279377Simp regulator-boot-on; 268279377Simp gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; 269279377Simp }; 270279377Simp 271279377Simp sata3_regulator: sata3-regulator { 272279377Simp compatible = "regulator-fixed"; 273279377Simp reg = <3>; 274279377Simp regulator-name = "SATA3 Power"; 275279377Simp regulator-min-microvolt = <5000000>; 276279377Simp regulator-max-microvolt = <5000000>; 277279377Simp startup-delay-us = <6000000>; 278279377Simp enable-active-high; 279279377Simp regulator-always-on; 280279377Simp regulator-boot-on; 281279377Simp gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; 282279377Simp }; 283279377Simp 284279377Simp sata4_regulator: sata4-regulator { 285279377Simp compatible = "regulator-fixed"; 286279377Simp reg = <4>; 287279377Simp regulator-name = "SATA4 Power"; 288279377Simp regulator-min-microvolt = <5000000>; 289279377Simp regulator-max-microvolt = <5000000>; 290279377Simp startup-delay-us = <8000000>; 291279377Simp enable-active-high; 292279377Simp regulator-always-on; 293279377Simp regulator-boot-on; 294279377Simp gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; 295279377Simp }; 296279377Simp }; 297279377Simp}; 298279377Simp 299279377Simp&pinctrl { 300279377Simp sata1_pwr_pin: sata1-pwr-pin { 301279377Simp marvell,pins = "mpp42"; 302279377Simp marvell,function = "gpio"; 303279377Simp }; 304279377Simp 305279377Simp sata2_pwr_pin: sata2-pwr-pin { 306279377Simp marvell,pins = "mpp44"; 307279377Simp marvell,function = "gpio"; 308279377Simp }; 309279377Simp 310279377Simp sata3_pwr_pin: sata3-pwr-pin { 311279377Simp marvell,pins = "mpp45"; 312279377Simp marvell,function = "gpio"; 313279377Simp }; 314279377Simp 315279377Simp sata4_pwr_pin: sata4-pwr-pin { 316279377Simp marvell,pins = "mpp46"; 317279377Simp marvell,function = "gpio"; 318279377Simp }; 319279377Simp 320279377Simp sata1_pres_pin: sata1-pres-pin { 321279377Simp marvell,pins = "mpp34"; 322279377Simp marvell,function = "gpio"; 323279377Simp }; 324279377Simp 325279377Simp sata2_pres_pin: sata2-pres-pin { 326279377Simp marvell,pins = "mpp35"; 327279377Simp marvell,function = "gpio"; 328279377Simp }; 329279377Simp 330279377Simp sata3_pres_pin: sata3-pres-pin { 331279377Simp marvell,pins = "mpp40"; 332279377Simp marvell,function = "gpio"; 333279377Simp }; 334279377Simp 335279377Simp sata4_pres_pin: sata4-pres-pin { 336279377Simp marvell,pins = "mpp41"; 337279377Simp marvell,function = "gpio"; 338279377Simp }; 339279377Simp 340279377Simp syno_id_bit0_pin: syno-id-bit0-pin { 341279377Simp marvell,pins = "mpp26"; 342279377Simp marvell,function = "gpio"; 343279377Simp }; 344279377Simp 345279377Simp syno_id_bit1_pin: syno-id-bit1-pin { 346279377Simp marvell,pins = "mpp28"; 347279377Simp marvell,function = "gpio"; 348279377Simp }; 349279377Simp 350279377Simp syno_id_bit2_pin: syno-id-bit2-pin { 351279377Simp marvell,pins = "mpp29"; 352279377Simp marvell,function = "gpio"; 353279377Simp }; 354279377Simp 355279377Simp fan1_alarm_pin: fan1-alarm-pin { 356279377Simp marvell,pins = "mpp33"; 357279377Simp marvell,function = "gpio"; 358279377Simp }; 359279377Simp 360279377Simp fan2_alarm_pin: fan2-alarm-pin { 361279377Simp marvell,pins = "mpp32"; 362279377Simp marvell,function = "gpio"; 363279377Simp }; 364279377Simp}; 365