0001 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
0002 /*
0003 * Device Tree file for Synology DS116 NAS
0004 *
0005 * Copyright (C) 2017 Willy Tarreau <w@1wt.eu>
0006 */
0007
0008 /dts-v1/;
0009 #include "armada-385.dtsi"
0010 #include <dt-bindings/gpio/gpio.h>
0011
0012 / {
0013 model = "Synology DS116";
0014 compatible = "marvell,a385-gp", "marvell,armada385", "marvell,armada380";
0015
0016 chosen {
0017 stdout-path = "serial0:115200n8";
0018 };
0019
0020 memory {
0021 device_type = "memory";
0022 reg = <0x00000000 0x40000000>; /* 1 GB */
0023 };
0024
0025 soc {
0026 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
0027 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
0028 MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
0029 MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
0030 MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
0031
0032 internal-regs {
0033 i2c@11000 {
0034 pinctrl-names = "default";
0035 pinctrl-0 = <&i2c0_pins>;
0036 status = "okay";
0037 clock-frequency = <100000>;
0038
0039 eeprom@57 {
0040 compatible = "atmel,24c64";
0041 reg = <0x57>;
0042 };
0043 };
0044
0045 serial@12000 {
0046 pinctrl-names = "default";
0047 pinctrl-0 = <&uart0_pins>;
0048 status = "okay";
0049 };
0050
0051 serial@12100 {
0052 /* A PIC16F1829 is connected to uart1 at 9600 bps,
0053 * and takes single-character orders :
0054 * "1" : power off // already handled by the poweroff node
0055 * "2" : short beep
0056 * "3" : long beep
0057 * "4" : turn the power LED ON
0058 * "5" : flash the power LED
0059 * "6" : turn the power LED OFF
0060 * "7" : turn the status LED OFF
0061 * "8" : turn the status LED ON
0062 * "9" : flash the status LED
0063 * "A" : flash the motherboard LED (D8)
0064 * "B" : turn the motherboard LED OFF
0065 * "C" : hard reset
0066 */
0067 pinctrl-names = "default";
0068 pinctrl-0 = <&uart1_pins>;
0069 status = "okay";
0070 };
0071
0072 poweroff@12100 {
0073 compatible = "synology,power-off";
0074 reg = <0x12100 0x100>;
0075 clocks = <&coreclk 0>;
0076 };
0077
0078 ethernet@70000 {
0079 pinctrl-names = "default";
0080 phy = <&phy0>;
0081 phy-mode = "sgmii";
0082 buffer-manager = <&bm>;
0083 bm,pool-long = <0>;
0084 status = "okay";
0085 };
0086
0087
0088 mdio@72004 {
0089 pinctrl-names = "default";
0090 pinctrl-0 = <&mdio_pins>;
0091
0092 phy0: ethernet-phy@1 {
0093 reg = <1>;
0094 };
0095 };
0096
0097 sata@a8000 {
0098 pinctrl-names = "default";
0099 pinctrl-0 = <&sata0_pins>;
0100 status = "okay";
0101 #address-cells = <1>;
0102 #size-cells = <0>;
0103
0104 sata0: sata-port@0 {
0105 reg = <0>;
0106 target-supply = <®_5v_sata0>;
0107 };
0108 };
0109
0110 bm@c8000 {
0111 status = "okay";
0112 };
0113
0114 usb3@f0000 {
0115 usb-phy = <&usb3_0_phy>;
0116 status = "okay";
0117 };
0118
0119 usb3@f8000 {
0120 usb-phy = <&usb3_1_phy>;
0121 status = "okay";
0122 };
0123 };
0124
0125 bm-bppi {
0126 status = "okay";
0127 };
0128
0129 gpio-fan {
0130 compatible = "gpio-fan";
0131 gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>,
0132 <&gpio1 17 GPIO_ACTIVE_HIGH>,
0133 <&gpio1 16 GPIO_ACTIVE_HIGH>;
0134 gpio-fan,speed-map = < 0 0
0135 1500 1
0136 2500 2
0137 3000 3
0138 3400 4
0139 3700 5
0140 3900 6
0141 4000 7>;
0142 #cooling-cells = <2>;
0143 };
0144
0145 gpio-leds {
0146 compatible = "gpio-leds";
0147
0148 /* The green part is on gpio0.20 which is also used by
0149 * sata0, and accesses to SATA disk 0 make it blink so it
0150 * doesn't need to be declared here.
0151 */
0152 orange {
0153 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
0154 label = "ds116:orange:disk";
0155 default-state = "off";
0156 };
0157 };
0158 };
0159
0160 usb3_0_phy: usb3_0_phy {
0161 compatible = "usb-nop-xceiv";
0162 vcc-supply = <®_usb3_0_vbus>;
0163 #phy-cells = <0>;
0164 };
0165
0166 usb3_1_phy: usb3_1_phy {
0167 compatible = "usb-nop-xceiv";
0168 vcc-supply = <®_usb3_1_vbus>;
0169 #phy-cells = <0>;
0170 };
0171
0172 reg_usb3_0_vbus: usb3-vbus0 {
0173 compatible = "regulator-fixed";
0174 regulator-name = "usb3-vbus0";
0175 pinctrl-names = "default";
0176 pinctrl-0 = <&xhci0_vbus_pins>;
0177 regulator-min-microvolt = <5000000>;
0178 regulator-max-microvolt = <5000000>;
0179 enable-active-high;
0180 gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
0181 };
0182
0183 reg_usb3_1_vbus: usb3-vbus1 {
0184 compatible = "regulator-fixed";
0185 regulator-name = "usb3-vbus1";
0186 pinctrl-names = "default";
0187 pinctrl-0 = <&xhci1_vbus_pins>;
0188 regulator-min-microvolt = <5000000>;
0189 regulator-max-microvolt = <5000000>;
0190 enable-active-high;
0191 gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
0192 };
0193
0194 reg_sata0: pwr-sata0 {
0195 compatible = "regulator-fixed";
0196 regulator-name = "pwr_en_sata0";
0197 regulator-min-microvolt = <12000000>;
0198 regulator-max-microvolt = <12000000>;
0199 enable-active-high;
0200 regulator-boot-on;
0201 gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
0202 };
0203
0204 reg_5v_sata0: v5-sata0 {
0205 compatible = "regulator-fixed";
0206 regulator-name = "v5.0-sata0";
0207 regulator-min-microvolt = <5000000>;
0208 regulator-max-microvolt = <5000000>;
0209 vin-supply = <®_sata0>;
0210 };
0211
0212 reg_12v_sata0: v12-sata0 {
0213 compatible = "regulator-fixed";
0214 regulator-name = "v12.0-sata0";
0215 regulator-min-microvolt = <12000000>;
0216 regulator-max-microvolt = <12000000>;
0217 vin-supply = <®_sata0>;
0218 };
0219 };
0220
0221 &spi0 {
0222 pinctrl-names = "default";
0223 pinctrl-0 = <&spi0_pins>;
0224 status = "okay";
0225
0226 flash@0 {
0227 #address-cells = <1>;
0228 #size-cells = <1>;
0229 compatible = "macronix,mx25l6405d", "jedec,spi-nor";
0230 reg = <0>; /* Chip select 0 */
0231 spi-max-frequency = <50000000>;
0232 m25p,fast-read;
0233
0234 /* Note: there is a redboot partition table despite u-boot
0235 * being used. The names presented here are the same as those
0236 * found in the FIS directory. There is also a small device
0237 * tree in the last 64kB of the RedBoot partition which is not
0238 * enumerated. The MAC address and the serial number are listed
0239 * in the "vendor" partition.
0240 */
0241 partition@0 {
0242 label = "RedBoot";
0243 reg = <0x00000000 0x000f0000>;
0244 read-only;
0245 };
0246
0247 partition@c0000 {
0248 label = "zImage";
0249 reg = <0x000f0000 0x002d0000>;
0250 };
0251
0252 partition@390000 {
0253 label = "rd.gz";
0254 reg = <0x003c0000 0x00410000>;
0255 };
0256
0257 partition@7d0000 {
0258 label = "vendor";
0259 reg = <0x007d0000 0x00010000>;
0260 read-only;
0261 };
0262
0263 partition@7e0000 {
0264 label = "RedBoot config";
0265 reg = <0x007e0000 0x00010000>;
0266 read-only;
0267 };
0268
0269 partition@7f0000 {
0270 label = "FIS directory";
0271 reg = <0x007f0000 0x00010000>;
0272 read-only;
0273 };
0274 };
0275 };
0276
0277 &pinctrl {
0278 /* use only one pin for UART1, as mpp20 is used by sata0 */
0279 uart1_pins: uart-pins-1 {
0280 marvell,pins = "mpp19";
0281 marvell,function = "ua1";
0282 };
0283
0284 xhci0_vbus_pins: xhci0_vbus_pins {
0285 marvell,pins = "mpp58";
0286 marvell,function = "gpio";
0287 };
0288 xhci1_vbus_pins: xhci1_vbus_pins {
0289 marvell,pins = "mpp59";
0290 marvell,function = "gpio";
0291 };
0292 };