1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2724ba675SRob Herring/* 3724ba675SRob Herring * Device Tree file for Synology DS414 4724ba675SRob Herring * 5724ba675SRob Herring * Copyright (C) 2014, Arnaud EBALARD <arno@natisbad.org> 6724ba675SRob Herring * 7724ba675SRob Herring * Note: this Device Tree assumes that the bootloader has remapped the 8724ba675SRob Herring * internal registers to 0xf1000000 (instead of the old 0xd0000000). 9724ba675SRob Herring * The 0xf1000000 is the default used by the recent, DT-capable, U-Boot 10724ba675SRob Herring * bootloaders provided by Marvell. It is used in recent versions of 11724ba675SRob Herring * DSM software provided by Synology. Nonetheless, some earlier boards 12724ba675SRob Herring * were delivered with an older version of u-boot that left internal 13724ba675SRob Herring * registers mapped at 0xd0000000. If you have such a device you will 14724ba675SRob Herring * not be able to directly boot a kernel based on this Device Tree. In 15724ba675SRob Herring * that case, the preferred solution is to update your bootloader (e.g. 16724ba675SRob Herring * by upgrading to latest version of DSM, or building a new one and 17724ba675SRob Herring * installing it from u-boot prompt) or adjust the Devive Tree 18724ba675SRob Herring * (s/0xf1000000/0xd0000000/ in 'ranges' below). 19724ba675SRob Herring */ 20724ba675SRob Herring 21724ba675SRob Herring/dts-v1/; 22724ba675SRob Herring 23724ba675SRob Herring#include <dt-bindings/input/input.h> 24724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 25724ba675SRob Herring#include "armada-xp-mv78230.dtsi" 26724ba675SRob Herring 27724ba675SRob Herring/ { 28724ba675SRob Herring model = "Synology DS414"; 29724ba675SRob Herring compatible = "synology,ds414", "marvell,armadaxp-mv78230", 30724ba675SRob Herring "marvell,armadaxp", "marvell,armada-370-xp"; 31724ba675SRob Herring 32724ba675SRob Herring chosen { 33724ba675SRob Herring stdout-path = "serial0:115200n8"; 34724ba675SRob Herring }; 35724ba675SRob Herring 36724ba675SRob Herring memory@0 { 37724ba675SRob Herring device_type = "memory"; 38724ba675SRob Herring reg = <0 0x00000000 0 0x40000000>; /* 1GB */ 39724ba675SRob Herring }; 40724ba675SRob Herring 41724ba675SRob Herring soc { 42724ba675SRob Herring ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 43724ba675SRob Herring MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 44724ba675SRob Herring MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000 45724ba675SRob Herring MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>; 46724ba675SRob Herring 47724ba675SRob Herring internal-regs { 48724ba675SRob Herring 49724ba675SRob Herring /* RTC is provided by Seiko S-35390A below */ 50724ba675SRob Herring rtc@10300 { 51724ba675SRob Herring status = "disabled"; 52724ba675SRob Herring }; 53724ba675SRob Herring 54724ba675SRob Herring i2c@11000 { 55724ba675SRob Herring clock-frequency = <400000>; 56724ba675SRob Herring status = "okay"; 57724ba675SRob Herring 58724ba675SRob Herring s35390a: s35390a@30 { 59724ba675SRob Herring compatible = "sii,s35390a"; 60724ba675SRob Herring reg = <0x30>; 61724ba675SRob Herring }; 62724ba675SRob Herring }; 63724ba675SRob Herring 64724ba675SRob Herring /* Connected to a header on device's PCB. This 65724ba675SRob Herring * provides the main console for the device. 66724ba675SRob Herring * 67724ba675SRob Herring * Warning: the device may not boot with a 3.3V 68724ba675SRob Herring * USB-serial converter connected when the power 69724ba675SRob Herring * button is pressed. The converter needs to be 70724ba675SRob Herring * connected a few seconds after pressing the 71724ba675SRob Herring * power button. This is possibly due to UART0_TXD 72724ba675SRob Herring * pin being sampled at reset (bit 0 of SAR). 73724ba675SRob Herring */ 74724ba675SRob Herring serial@12000 { 75724ba675SRob Herring status = "okay"; 76724ba675SRob Herring }; 77724ba675SRob Herring 78724ba675SRob Herring /* Connected to a Microchip PIC16F883 for power control */ 79724ba675SRob Herring serial@12100 { 80724ba675SRob Herring status = "okay"; 81724ba675SRob Herring }; 82724ba675SRob Herring 83724ba675SRob Herring poweroff@12100 { 84724ba675SRob Herring compatible = "synology,power-off"; 85724ba675SRob Herring reg = <0x12100 0x100>; 86724ba675SRob Herring clocks = <&coreclk 0>; 87724ba675SRob Herring }; 88724ba675SRob Herring 89724ba675SRob Herring /* Front USB 2.0 port */ 90724ba675SRob Herring usb@50000 { 91724ba675SRob Herring status = "okay"; 92724ba675SRob Herring }; 93724ba675SRob Herring 94724ba675SRob Herring ethernet@70000 { 95724ba675SRob Herring status = "okay"; 96724ba675SRob Herring pinctrl-0 = <&ge0_rgmii_pins>; 97724ba675SRob Herring pinctrl-names = "default"; 98724ba675SRob Herring phy = <&phy1>; 99724ba675SRob Herring phy-mode = "rgmii-id"; 100724ba675SRob Herring }; 101724ba675SRob Herring 102724ba675SRob Herring ethernet@74000 { 103724ba675SRob Herring pinctrl-0 = <&ge1_rgmii_pins>; 104724ba675SRob Herring pinctrl-names = "default"; 105724ba675SRob Herring status = "okay"; 106724ba675SRob Herring phy = <&phy0>; 107724ba675SRob Herring phy-mode = "rgmii-id"; 108724ba675SRob Herring }; 109724ba675SRob Herring }; 110724ba675SRob Herring }; 111724ba675SRob Herring 112*afa6b4f3SKrzysztof Kozlowski sata1_regulator: sata1-regulator-1 { 113724ba675SRob Herring compatible = "regulator-fixed"; 114724ba675SRob Herring regulator-name = "SATA1 Power"; 115724ba675SRob Herring regulator-min-microvolt = <5000000>; 116724ba675SRob Herring regulator-max-microvolt = <5000000>; 117724ba675SRob Herring startup-delay-us = <2000000>; 118724ba675SRob Herring enable-active-high; 119724ba675SRob Herring regulator-always-on; 120724ba675SRob Herring regulator-boot-on; 121724ba675SRob Herring gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; 122*afa6b4f3SKrzysztof Kozlowski pinctrl-0 = <&sata1_pwr_pin>; 123*afa6b4f3SKrzysztof Kozlowski pinctrl-names = "default"; 124724ba675SRob Herring }; 125724ba675SRob Herring 126*afa6b4f3SKrzysztof Kozlowski sata2_regulator: sata2-regulator-2 { 127724ba675SRob Herring compatible = "regulator-fixed"; 128724ba675SRob Herring regulator-name = "SATA2 Power"; 129724ba675SRob Herring regulator-min-microvolt = <5000000>; 130724ba675SRob Herring regulator-max-microvolt = <5000000>; 131724ba675SRob Herring startup-delay-us = <4000000>; 132724ba675SRob Herring enable-active-high; 133724ba675SRob Herring regulator-always-on; 134724ba675SRob Herring regulator-boot-on; 135724ba675SRob Herring gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; 136*afa6b4f3SKrzysztof Kozlowski pinctrl-0 = <&sata2_pwr_pin>; 137*afa6b4f3SKrzysztof Kozlowski pinctrl-names = "default"; 138724ba675SRob Herring }; 139724ba675SRob Herring 140*afa6b4f3SKrzysztof Kozlowski sata3_regulator: sata3-regulator-3 { 141724ba675SRob Herring compatible = "regulator-fixed"; 142724ba675SRob Herring regulator-name = "SATA3 Power"; 143724ba675SRob Herring regulator-min-microvolt = <5000000>; 144724ba675SRob Herring regulator-max-microvolt = <5000000>; 145724ba675SRob Herring startup-delay-us = <6000000>; 146724ba675SRob Herring enable-active-high; 147724ba675SRob Herring regulator-always-on; 148724ba675SRob Herring regulator-boot-on; 149724ba675SRob Herring gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; 150*afa6b4f3SKrzysztof Kozlowski pinctrl-0 = <&sata3_pwr_pin>; 151*afa6b4f3SKrzysztof Kozlowski pinctrl-names = "default"; 152724ba675SRob Herring }; 153724ba675SRob Herring 154*afa6b4f3SKrzysztof Kozlowski sata4_regulator: sata4-regulator-4 { 155724ba675SRob Herring compatible = "regulator-fixed"; 156724ba675SRob Herring regulator-name = "SATA4 Power"; 157724ba675SRob Herring regulator-min-microvolt = <5000000>; 158724ba675SRob Herring regulator-max-microvolt = <5000000>; 159724ba675SRob Herring startup-delay-us = <8000000>; 160724ba675SRob Herring enable-active-high; 161724ba675SRob Herring regulator-always-on; 162724ba675SRob Herring regulator-boot-on; 163724ba675SRob Herring gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; 164*afa6b4f3SKrzysztof Kozlowski pinctrl-0 = <&sata4_pwr_pin>; 165*afa6b4f3SKrzysztof Kozlowski pinctrl-names = "default"; 166724ba675SRob Herring }; 167724ba675SRob Herring}; 168724ba675SRob Herring 169724ba675SRob Herring&pciec { 170724ba675SRob Herring status = "okay"; 171724ba675SRob Herring 172724ba675SRob Herring /* 173724ba675SRob Herring * Connected to Marvell 88SX7042 SATA-II controller 174724ba675SRob Herring * handling the four disks. 175724ba675SRob Herring */ 176724ba675SRob Herring pcie@1,0 { 177724ba675SRob Herring /* Port 0, Lane 0 */ 178724ba675SRob Herring status = "okay"; 179724ba675SRob Herring }; 180724ba675SRob Herring 181724ba675SRob Herring /* 182724ba675SRob Herring * Connected to EtronTech EJ168A XHCI controller 183724ba675SRob Herring * providing the two rear USB 3.0 ports. 184724ba675SRob Herring */ 185724ba675SRob Herring pcie@5,0 { 186724ba675SRob Herring /* Port 1, Lane 0 */ 187724ba675SRob Herring status = "okay"; 188724ba675SRob Herring }; 189724ba675SRob Herring}; 190724ba675SRob Herring 191724ba675SRob Herring 192724ba675SRob Herring&mdio { 193724ba675SRob Herring phy0: ethernet-phy@0 { /* Marvell 88E1512 */ 194724ba675SRob Herring reg = <0>; 195724ba675SRob Herring }; 196724ba675SRob Herring 197724ba675SRob Herring phy1: ethernet-phy@1 { /* Marvell 88E1512 */ 198724ba675SRob Herring reg = <1>; 199724ba675SRob Herring }; 200724ba675SRob Herring}; 201724ba675SRob Herring 202724ba675SRob Herring&pinctrl { 203724ba675SRob Herring sata1_pwr_pin: sata1-pwr-pin { 204724ba675SRob Herring marvell,pins = "mpp42"; 205724ba675SRob Herring marvell,function = "gpio"; 206724ba675SRob Herring }; 207724ba675SRob Herring 208724ba675SRob Herring sata2_pwr_pin: sata2-pwr-pin { 209724ba675SRob Herring marvell,pins = "mpp44"; 210724ba675SRob Herring marvell,function = "gpio"; 211724ba675SRob Herring }; 212724ba675SRob Herring 213724ba675SRob Herring sata3_pwr_pin: sata3-pwr-pin { 214724ba675SRob Herring marvell,pins = "mpp45"; 215724ba675SRob Herring marvell,function = "gpio"; 216724ba675SRob Herring }; 217724ba675SRob Herring 218724ba675SRob Herring sata4_pwr_pin: sata4-pwr-pin { 219724ba675SRob Herring marvell,pins = "mpp46"; 220724ba675SRob Herring marvell,function = "gpio"; 221724ba675SRob Herring }; 222724ba675SRob Herring 223724ba675SRob Herring sata1_pres_pin: sata1-pres-pin { 224724ba675SRob Herring marvell,pins = "mpp34"; 225724ba675SRob Herring marvell,function = "gpio"; 226724ba675SRob Herring }; 227724ba675SRob Herring 228724ba675SRob Herring sata2_pres_pin: sata2-pres-pin { 229724ba675SRob Herring marvell,pins = "mpp35"; 230724ba675SRob Herring marvell,function = "gpio"; 231724ba675SRob Herring }; 232724ba675SRob Herring 233724ba675SRob Herring sata3_pres_pin: sata3-pres-pin { 234724ba675SRob Herring marvell,pins = "mpp40"; 235724ba675SRob Herring marvell,function = "gpio"; 236724ba675SRob Herring }; 237724ba675SRob Herring 238724ba675SRob Herring sata4_pres_pin: sata4-pres-pin { 239724ba675SRob Herring marvell,pins = "mpp41"; 240724ba675SRob Herring marvell,function = "gpio"; 241724ba675SRob Herring }; 242724ba675SRob Herring 243724ba675SRob Herring syno_id_bit0_pin: syno-id-bit0-pin { 244724ba675SRob Herring marvell,pins = "mpp26"; 245724ba675SRob Herring marvell,function = "gpio"; 246724ba675SRob Herring }; 247724ba675SRob Herring 248724ba675SRob Herring syno_id_bit1_pin: syno-id-bit1-pin { 249724ba675SRob Herring marvell,pins = "mpp28"; 250724ba675SRob Herring marvell,function = "gpio"; 251724ba675SRob Herring }; 252724ba675SRob Herring 253724ba675SRob Herring syno_id_bit2_pin: syno-id-bit2-pin { 254724ba675SRob Herring marvell,pins = "mpp29"; 255724ba675SRob Herring marvell,function = "gpio"; 256724ba675SRob Herring }; 257724ba675SRob Herring 258724ba675SRob Herring fan1_alarm_pin: fan1-alarm-pin { 259724ba675SRob Herring marvell,pins = "mpp33"; 260724ba675SRob Herring marvell,function = "gpio"; 261724ba675SRob Herring }; 262724ba675SRob Herring 263724ba675SRob Herring fan2_alarm_pin: fan2-alarm-pin { 264724ba675SRob Herring marvell,pins = "mpp32"; 265724ba675SRob Herring marvell,function = "gpio"; 266724ba675SRob Herring }; 267724ba675SRob Herring}; 268724ba675SRob Herring 269724ba675SRob Herring&spi0 { 270724ba675SRob Herring status = "okay"; 271724ba675SRob Herring 272724ba675SRob Herring flash@0 { 273724ba675SRob Herring #address-cells = <1>; 274724ba675SRob Herring #size-cells = <1>; 275724ba675SRob Herring compatible = "micron,n25q064", "jedec,spi-nor"; 276724ba675SRob Herring reg = <0>; /* Chip select 0 */ 277724ba675SRob Herring spi-max-frequency = <20000000>; 278724ba675SRob Herring 279724ba675SRob Herring /* 280724ba675SRob Herring * Warning! 281724ba675SRob Herring * 282724ba675SRob Herring * Synology u-boot uses its compiled-in environment 283724ba675SRob Herring * and it seems Synology did not care to change u-boot 284724ba675SRob Herring * default configuration in order to allow saving a 285724ba675SRob Herring * modified environment at a sensible location. So, 286724ba675SRob Herring * if you do a 'saveenv' under u-boot, your modified 287724ba675SRob Herring * environment will be saved at 1MB after the start 288724ba675SRob Herring * of the flash, i.e. in the middle of the uImage. 289724ba675SRob Herring * For that reason, it is strongly advised not to 290724ba675SRob Herring * change the default environment, unless you know 291724ba675SRob Herring * what you are doing. 292724ba675SRob Herring */ 293724ba675SRob Herring partition@0 { /* u-boot */ 294724ba675SRob Herring label = "RedBoot"; 295724ba675SRob Herring reg = <0x00000000 0x000d0000>; /* 832KB */ 296724ba675SRob Herring }; 297724ba675SRob Herring 298724ba675SRob Herring partition@c0000 { /* uImage */ 299724ba675SRob Herring label = "zImage"; 300724ba675SRob Herring reg = <0x000d0000 0x002d0000>; /* 2880KB */ 301724ba675SRob Herring }; 302724ba675SRob Herring 303724ba675SRob Herring partition@3a0000 { /* uInitramfs */ 304724ba675SRob Herring label = "rd.gz"; 305724ba675SRob Herring reg = <0x003a0000 0x00430000>; /* 4250KB */ 306724ba675SRob Herring }; 307724ba675SRob Herring 308724ba675SRob Herring partition@7d0000 { /* MAC address and serial number */ 309724ba675SRob Herring label = "vendor"; 310724ba675SRob Herring reg = <0x007d0000 0x00010000>; /* 64KB */ 311724ba675SRob Herring }; 312724ba675SRob Herring 313724ba675SRob Herring partition@7e0000 { 314724ba675SRob Herring label = "RedBoot config"; 315724ba675SRob Herring reg = <0x007e0000 0x00010000>; /* 64KB */ 316724ba675SRob Herring }; 317724ba675SRob Herring 318724ba675SRob Herring partition@7f0000 { 319724ba675SRob Herring label = "FIS directory"; 320724ba675SRob Herring reg = <0x007f0000 0x00010000>; /* 64KB */ 321724ba675SRob Herring }; 322724ba675SRob Herring }; 323724ba675SRob Herring}; 324