Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Device Tree file for Synology DS414
0004  *
0005  * Copyright (C) 2014, Arnaud EBALARD <arno@natisbad.org>
0006  *
0007  * Note: this Device Tree assumes that the bootloader has remapped the
0008  * internal registers to 0xf1000000 (instead of the old 0xd0000000).
0009  * The 0xf1000000 is the default used by the recent, DT-capable, U-Boot
0010  * bootloaders provided by Marvell. It is used in recent versions of
0011  * DSM software provided by Synology. Nonetheless, some earlier boards
0012  * were delivered with an older version of u-boot that left internal
0013  * registers mapped at 0xd0000000. If you have such a device you will
0014  * not be able to directly boot a kernel based on this Device Tree. In
0015  * that case, the preferred solution is to update your bootloader (e.g.
0016  * by upgrading to latest version of DSM, or building a new one and
0017  * installing it from u-boot prompt) or adjust the Devive Tree
0018  * (s/0xf1000000/0xd0000000/ in 'ranges' below).
0019  */
0020 
0021 /dts-v1/;
0022 
0023 #include <dt-bindings/input/input.h>
0024 #include <dt-bindings/gpio/gpio.h>
0025 #include "armada-xp-mv78230.dtsi"
0026 
0027 / {
0028         model = "Synology DS414";
0029         compatible = "synology,ds414", "marvell,armadaxp-mv78230",
0030                      "marvell,armadaxp", "marvell,armada-370-xp";
0031 
0032         chosen {
0033                 stdout-path = "serial0:115200n8";
0034         };
0035 
0036         memory@0 {
0037                 device_type = "memory";
0038                 reg = <0 0x00000000 0 0x40000000>; /* 1GB */
0039         };
0040 
0041         soc {
0042                 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
0043                           MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
0044                           MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
0045                           MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
0046 
0047                 internal-regs {
0048 
0049                         /* RTC is provided by Seiko S-35390A below */
0050                         rtc@10300 {
0051                                 status = "disabled";
0052                         };
0053 
0054                         i2c@11000 {
0055                                 clock-frequency = <400000>;
0056                                 status = "okay";
0057 
0058                                 s35390a: s35390a@30 {
0059                                          compatible = "sii,s35390a";
0060                                          reg = <0x30>;
0061                                 };
0062                         };
0063 
0064                         /* Connected to a header on device's PCB. This
0065                          * provides the main console for the device.
0066                          *
0067                          * Warning: the device may not boot with a 3.3V
0068                          * USB-serial converter connected when the power
0069                          * button is pressed. The converter needs to be
0070                          * connected a few seconds after pressing the
0071                          * power button. This is possibly due to UART0_TXD
0072                          * pin being sampled at reset (bit 0 of SAR).
0073                          */
0074                         serial@12000 {
0075                                 status = "okay";
0076                         };
0077 
0078                         /* Connected to a Microchip PIC16F883 for power control */
0079                         serial@12100 {
0080                                 status = "okay";
0081                         };
0082 
0083                         poweroff@12100 {
0084                                 compatible = "synology,power-off";
0085                                 reg = <0x12100 0x100>;
0086                                 clocks = <&coreclk 0>;
0087                         };
0088 
0089                         /* Front USB 2.0 port */
0090                         usb@50000 {
0091                                 status = "okay";
0092                         };
0093 
0094                         ethernet@70000 {
0095                                 status = "okay";
0096                                 pinctrl-0 = <&ge0_rgmii_pins>;
0097                                 pinctrl-names = "default";
0098                                 phy = <&phy1>;
0099                                 phy-mode = "rgmii-id";
0100                         };
0101 
0102                         ethernet@74000 {
0103                                 pinctrl-0 = <&ge1_rgmii_pins>;
0104                                 pinctrl-names = "default";
0105                                 status = "okay";
0106                                 phy = <&phy0>;
0107                                 phy-mode = "rgmii-id";
0108                         };
0109                 };
0110         };
0111 
0112         regulators {
0113                 compatible = "simple-bus";
0114                 #address-cells = <1>;
0115                 #size-cells = <0>;
0116                 pinctrl-0 = <&sata1_pwr_pin &sata2_pwr_pin
0117                              &sata3_pwr_pin &sata4_pwr_pin>;
0118                 pinctrl-names = "default";
0119 
0120                 sata1_regulator: sata1-regulator@1 {
0121                         compatible = "regulator-fixed";
0122                         reg = <1>;
0123                         regulator-name = "SATA1 Power";
0124                         regulator-min-microvolt = <5000000>;
0125                         regulator-max-microvolt = <5000000>;
0126                         startup-delay-us = <2000000>;
0127                         enable-active-high;
0128                         regulator-always-on;
0129                         regulator-boot-on;
0130                         gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
0131                 };
0132 
0133                 sata2_regulator: sata2-regulator@2 {
0134                         compatible = "regulator-fixed";
0135                         reg = <2>;
0136                         regulator-name = "SATA2 Power";
0137                         regulator-min-microvolt = <5000000>;
0138                         regulator-max-microvolt = <5000000>;
0139                         startup-delay-us = <4000000>;
0140                         enable-active-high;
0141                         regulator-always-on;
0142                         regulator-boot-on;
0143                         gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
0144                 };
0145 
0146                 sata3_regulator: sata3-regulator@3 {
0147                         compatible = "regulator-fixed";
0148                         reg = <3>;
0149                         regulator-name = "SATA3 Power";
0150                         regulator-min-microvolt = <5000000>;
0151                         regulator-max-microvolt = <5000000>;
0152                         startup-delay-us = <6000000>;
0153                         enable-active-high;
0154                         regulator-always-on;
0155                         regulator-boot-on;
0156                         gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
0157                 };
0158 
0159                 sata4_regulator: sata4-regulator@4 {
0160                         compatible = "regulator-fixed";
0161                         reg = <4>;
0162                         regulator-name = "SATA4 Power";
0163                         regulator-min-microvolt = <5000000>;
0164                         regulator-max-microvolt = <5000000>;
0165                         startup-delay-us = <8000000>;
0166                         enable-active-high;
0167                         regulator-always-on;
0168                         regulator-boot-on;
0169                         gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
0170                 };
0171         };
0172 };
0173 
0174 &pciec {
0175         status = "okay";
0176 
0177         /*
0178          * Connected to Marvell 88SX7042 SATA-II controller
0179          * handling the four disks.
0180          */
0181         pcie@1,0 {
0182                 /* Port 0, Lane 0 */
0183                 status = "okay";
0184         };
0185 
0186         /*
0187          * Connected to EtronTech EJ168A XHCI controller
0188          * providing the two rear USB 3.0 ports.
0189          */
0190         pcie@5,0 {
0191                 /* Port 1, Lane 0 */
0192                 status = "okay";
0193         };
0194 };
0195 
0196 
0197 &mdio {
0198         phy0: ethernet-phy@0 { /* Marvell 88E1512 */
0199                 reg = <0>;
0200         };
0201 
0202         phy1: ethernet-phy@1 { /* Marvell 88E1512 */
0203                 reg = <1>;
0204         };
0205 };
0206 
0207 &pinctrl {
0208         sata1_pwr_pin: sata1-pwr-pin {
0209                 marvell,pins = "mpp42";
0210                 marvell,function = "gpio";
0211         };
0212 
0213         sata2_pwr_pin: sata2-pwr-pin {
0214                 marvell,pins = "mpp44";
0215                 marvell,function = "gpio";
0216         };
0217 
0218         sata3_pwr_pin: sata3-pwr-pin {
0219                 marvell,pins = "mpp45";
0220                 marvell,function = "gpio";
0221         };
0222 
0223         sata4_pwr_pin: sata4-pwr-pin {
0224                 marvell,pins = "mpp46";
0225                 marvell,function = "gpio";
0226         };
0227 
0228         sata1_pres_pin: sata1-pres-pin {
0229                 marvell,pins = "mpp34";
0230                 marvell,function = "gpio";
0231         };
0232 
0233         sata2_pres_pin: sata2-pres-pin {
0234                 marvell,pins = "mpp35";
0235                 marvell,function = "gpio";
0236         };
0237 
0238         sata3_pres_pin: sata3-pres-pin {
0239                 marvell,pins = "mpp40";
0240                 marvell,function = "gpio";
0241         };
0242 
0243         sata4_pres_pin: sata4-pres-pin {
0244                 marvell,pins = "mpp41";
0245                 marvell,function = "gpio";
0246         };
0247 
0248         syno_id_bit0_pin: syno-id-bit0-pin {
0249                 marvell,pins = "mpp26";
0250                 marvell,function = "gpio";
0251         };
0252 
0253         syno_id_bit1_pin: syno-id-bit1-pin {
0254                 marvell,pins = "mpp28";
0255                 marvell,function = "gpio";
0256         };
0257 
0258         syno_id_bit2_pin: syno-id-bit2-pin {
0259                 marvell,pins = "mpp29";
0260                 marvell,function = "gpio";
0261         };
0262 
0263         fan1_alarm_pin: fan1-alarm-pin {
0264                 marvell,pins = "mpp33";
0265                 marvell,function = "gpio";
0266         };
0267 
0268         fan2_alarm_pin: fan2-alarm-pin {
0269                 marvell,pins = "mpp32";
0270                 marvell,function = "gpio";
0271         };
0272 };
0273 
0274 &spi0 {
0275         status = "okay";
0276 
0277         flash@0 {
0278                 #address-cells = <1>;
0279                 #size-cells = <1>;
0280                 compatible = "micron,n25q064", "jedec,spi-nor";
0281                 reg = <0>; /* Chip select 0 */
0282                 spi-max-frequency = <20000000>;
0283 
0284                 /*
0285                  * Warning!
0286                  *
0287                  * Synology u-boot uses its compiled-in environment
0288                  * and it seems Synology did not care to change u-boot
0289                  * default configuration in order to allow saving a
0290                  * modified environment at a sensible location. So,
0291                  * if you do a 'saveenv' under u-boot, your modified
0292                  * environment will be saved at 1MB after the start
0293                  * of the flash, i.e. in the middle of the uImage.
0294                  * For that reason, it is strongly advised not to
0295                  * change the default environment, unless you know
0296                  * what you are doing.
0297                  */
0298                 partition@0 { /* u-boot */
0299                         label = "RedBoot";
0300                         reg = <0x00000000 0x000d0000>; /* 832KB */
0301                 };
0302 
0303                 partition@c0000 { /* uImage */
0304                         label = "zImage";
0305                         reg = <0x000d0000 0x002d0000>; /* 2880KB */
0306                 };
0307 
0308                 partition@3a0000 { /* uInitramfs */
0309                         label = "rd.gz";
0310                         reg = <0x003a0000 0x00430000>; /* 4250KB */
0311                 };
0312 
0313                 partition@7d0000 { /* MAC address and serial number */
0314                         label = "vendor";
0315                         reg = <0x007d0000 0x00010000>; /* 64KB */
0316                 };
0317 
0318                 partition@7e0000 {
0319                         label = "RedBoot config";
0320                         reg = <0x007e0000 0x00010000>; /* 64KB */
0321                 };
0322 
0323                 partition@7f0000 {
0324                         label = "FIS directory";
0325                         reg = <0x007f0000 0x00010000>; /* 64KB */
0326                 };
0327         };
0328 };