1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree file for Synology DS116 NAS 4f126890aSEmmanuel Vadot * 5f126890aSEmmanuel Vadot * Copyright (C) 2017 Willy Tarreau <w@1wt.eu> 6f126890aSEmmanuel Vadot */ 7f126890aSEmmanuel Vadot 8f126890aSEmmanuel Vadot/dts-v1/; 9f126890aSEmmanuel Vadot#include "armada-385.dtsi" 10f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 11f126890aSEmmanuel Vadot 12f126890aSEmmanuel Vadot/ { 13f126890aSEmmanuel Vadot model = "Synology DS116"; 14f126890aSEmmanuel Vadot compatible = "marvell,a385-gp", "marvell,armada385", "marvell,armada380"; 15f126890aSEmmanuel Vadot 16f126890aSEmmanuel Vadot chosen { 17f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 18f126890aSEmmanuel Vadot }; 19f126890aSEmmanuel Vadot 20f126890aSEmmanuel Vadot memory { 21f126890aSEmmanuel Vadot device_type = "memory"; 22f126890aSEmmanuel Vadot reg = <0x00000000 0x40000000>; /* 1 GB */ 23f126890aSEmmanuel Vadot }; 24f126890aSEmmanuel Vadot 25f126890aSEmmanuel Vadot soc { 26f126890aSEmmanuel Vadot ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 27f126890aSEmmanuel Vadot MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 28f126890aSEmmanuel Vadot MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 29f126890aSEmmanuel Vadot MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 30f126890aSEmmanuel Vadot MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; 31f126890aSEmmanuel Vadot 32f126890aSEmmanuel Vadot internal-regs { 33f126890aSEmmanuel Vadot i2c@11000 { 34f126890aSEmmanuel Vadot pinctrl-names = "default"; 35f126890aSEmmanuel Vadot pinctrl-0 = <&i2c0_pins>; 36f126890aSEmmanuel Vadot status = "okay"; 37f126890aSEmmanuel Vadot clock-frequency = <100000>; 38f126890aSEmmanuel Vadot 39f126890aSEmmanuel Vadot eeprom@57 { 40f126890aSEmmanuel Vadot compatible = "atmel,24c64"; 41f126890aSEmmanuel Vadot reg = <0x57>; 42f126890aSEmmanuel Vadot }; 43f126890aSEmmanuel Vadot }; 44f126890aSEmmanuel Vadot 45f126890aSEmmanuel Vadot serial@12000 { 46f126890aSEmmanuel Vadot pinctrl-names = "default"; 47f126890aSEmmanuel Vadot pinctrl-0 = <&uart0_pins>; 48f126890aSEmmanuel Vadot status = "okay"; 49f126890aSEmmanuel Vadot }; 50f126890aSEmmanuel Vadot 51f126890aSEmmanuel Vadot serial@12100 { 52f126890aSEmmanuel Vadot /* A PIC16F1829 is connected to uart1 at 9600 bps, 53f126890aSEmmanuel Vadot * and takes single-character orders : 54f126890aSEmmanuel Vadot * "1" : power off // already handled by the poweroff node 55f126890aSEmmanuel Vadot * "2" : short beep 56f126890aSEmmanuel Vadot * "3" : long beep 57f126890aSEmmanuel Vadot * "4" : turn the power LED ON 58f126890aSEmmanuel Vadot * "5" : flash the power LED 59f126890aSEmmanuel Vadot * "6" : turn the power LED OFF 60f126890aSEmmanuel Vadot * "7" : turn the status LED OFF 61f126890aSEmmanuel Vadot * "8" : turn the status LED ON 62f126890aSEmmanuel Vadot * "9" : flash the status LED 63f126890aSEmmanuel Vadot * "A" : flash the motherboard LED (D8) 64f126890aSEmmanuel Vadot * "B" : turn the motherboard LED OFF 65f126890aSEmmanuel Vadot * "C" : hard reset 66f126890aSEmmanuel Vadot */ 67f126890aSEmmanuel Vadot pinctrl-names = "default"; 68f126890aSEmmanuel Vadot pinctrl-0 = <&uart1_pins>; 69f126890aSEmmanuel Vadot status = "okay"; 70f126890aSEmmanuel Vadot }; 71f126890aSEmmanuel Vadot 72f126890aSEmmanuel Vadot poweroff@12100 { 73f126890aSEmmanuel Vadot compatible = "synology,power-off"; 74f126890aSEmmanuel Vadot reg = <0x12100 0x100>; 75f126890aSEmmanuel Vadot clocks = <&coreclk 0>; 76f126890aSEmmanuel Vadot }; 77f126890aSEmmanuel Vadot 78f126890aSEmmanuel Vadot ethernet@70000 { 79f126890aSEmmanuel Vadot pinctrl-names = "default"; 80f126890aSEmmanuel Vadot phy = <&phy0>; 81f126890aSEmmanuel Vadot phy-mode = "sgmii"; 82f126890aSEmmanuel Vadot buffer-manager = <&bm>; 83f126890aSEmmanuel Vadot bm,pool-long = <0>; 84f126890aSEmmanuel Vadot status = "okay"; 85f126890aSEmmanuel Vadot }; 86f126890aSEmmanuel Vadot 87f126890aSEmmanuel Vadot 88f126890aSEmmanuel Vadot mdio@72004 { 89f126890aSEmmanuel Vadot pinctrl-names = "default"; 90f126890aSEmmanuel Vadot pinctrl-0 = <&mdio_pins>; 91f126890aSEmmanuel Vadot 92f126890aSEmmanuel Vadot phy0: ethernet-phy@1 { 93f126890aSEmmanuel Vadot reg = <1>; 94f126890aSEmmanuel Vadot }; 95f126890aSEmmanuel Vadot }; 96f126890aSEmmanuel Vadot 97f126890aSEmmanuel Vadot sata@a8000 { 98f126890aSEmmanuel Vadot pinctrl-names = "default"; 99f126890aSEmmanuel Vadot pinctrl-0 = <&sata0_pins>; 100f126890aSEmmanuel Vadot status = "okay"; 101f126890aSEmmanuel Vadot #address-cells = <1>; 102f126890aSEmmanuel Vadot #size-cells = <0>; 103f126890aSEmmanuel Vadot 104f126890aSEmmanuel Vadot sata0: sata-port@0 { 105f126890aSEmmanuel Vadot reg = <0>; 106f126890aSEmmanuel Vadot target-supply = <®_5v_sata0>; 107f126890aSEmmanuel Vadot }; 108f126890aSEmmanuel Vadot }; 109f126890aSEmmanuel Vadot 110f126890aSEmmanuel Vadot bm@c8000 { 111f126890aSEmmanuel Vadot status = "okay"; 112f126890aSEmmanuel Vadot }; 113f126890aSEmmanuel Vadot 114f126890aSEmmanuel Vadot usb3@f0000 { 115f126890aSEmmanuel Vadot usb-phy = <&usb3_0_phy>; 116f126890aSEmmanuel Vadot status = "okay"; 117f126890aSEmmanuel Vadot }; 118f126890aSEmmanuel Vadot 119f126890aSEmmanuel Vadot usb3@f8000 { 120f126890aSEmmanuel Vadot usb-phy = <&usb3_1_phy>; 121f126890aSEmmanuel Vadot status = "okay"; 122f126890aSEmmanuel Vadot }; 123f126890aSEmmanuel Vadot }; 124f126890aSEmmanuel Vadot 125f126890aSEmmanuel Vadot bm-bppi { 126f126890aSEmmanuel Vadot status = "okay"; 127f126890aSEmmanuel Vadot }; 128f126890aSEmmanuel Vadot 129f126890aSEmmanuel Vadot gpio-fan { 130f126890aSEmmanuel Vadot compatible = "gpio-fan"; 131f126890aSEmmanuel Vadot gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>, 132f126890aSEmmanuel Vadot <&gpio1 17 GPIO_ACTIVE_HIGH>, 133f126890aSEmmanuel Vadot <&gpio1 16 GPIO_ACTIVE_HIGH>; 134*8d13bc63SEmmanuel Vadot gpio-fan,speed-map = < 0 0>, 135*8d13bc63SEmmanuel Vadot <1500 1>, 136*8d13bc63SEmmanuel Vadot <2500 2>, 137*8d13bc63SEmmanuel Vadot <3000 3>, 138*8d13bc63SEmmanuel Vadot <3400 4>, 139*8d13bc63SEmmanuel Vadot <3700 5>, 140*8d13bc63SEmmanuel Vadot <3900 6>, 141*8d13bc63SEmmanuel Vadot <4000 7>; 142f126890aSEmmanuel Vadot #cooling-cells = <2>; 143f126890aSEmmanuel Vadot }; 144f126890aSEmmanuel Vadot 145f126890aSEmmanuel Vadot gpio-leds { 146f126890aSEmmanuel Vadot compatible = "gpio-leds"; 147f126890aSEmmanuel Vadot 148f126890aSEmmanuel Vadot /* The green part is on gpio0.20 which is also used by 149f126890aSEmmanuel Vadot * sata0, and accesses to SATA disk 0 make it blink so it 150f126890aSEmmanuel Vadot * doesn't need to be declared here. 151f126890aSEmmanuel Vadot */ 152f126890aSEmmanuel Vadot led-orange { 153f126890aSEmmanuel Vadot gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; 154f126890aSEmmanuel Vadot label = "ds116:orange:disk"; 155f126890aSEmmanuel Vadot default-state = "off"; 156f126890aSEmmanuel Vadot }; 157f126890aSEmmanuel Vadot }; 158f126890aSEmmanuel Vadot }; 159f126890aSEmmanuel Vadot 160f126890aSEmmanuel Vadot usb3_0_phy: usb3_0_phy { 161f126890aSEmmanuel Vadot compatible = "usb-nop-xceiv"; 162f126890aSEmmanuel Vadot vcc-supply = <®_usb3_0_vbus>; 163f126890aSEmmanuel Vadot #phy-cells = <0>; 164f126890aSEmmanuel Vadot }; 165f126890aSEmmanuel Vadot 166f126890aSEmmanuel Vadot usb3_1_phy: usb3_1_phy { 167f126890aSEmmanuel Vadot compatible = "usb-nop-xceiv"; 168f126890aSEmmanuel Vadot vcc-supply = <®_usb3_1_vbus>; 169f126890aSEmmanuel Vadot #phy-cells = <0>; 170f126890aSEmmanuel Vadot }; 171f126890aSEmmanuel Vadot 172f126890aSEmmanuel Vadot reg_usb3_0_vbus: usb3-vbus0 { 173f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 174f126890aSEmmanuel Vadot regulator-name = "usb3-vbus0"; 175f126890aSEmmanuel Vadot pinctrl-names = "default"; 176f126890aSEmmanuel Vadot pinctrl-0 = <&xhci0_vbus_pins>; 177f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 178f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 179f126890aSEmmanuel Vadot enable-active-high; 180f126890aSEmmanuel Vadot gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>; 181f126890aSEmmanuel Vadot }; 182f126890aSEmmanuel Vadot 183f126890aSEmmanuel Vadot reg_usb3_1_vbus: usb3-vbus1 { 184f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 185f126890aSEmmanuel Vadot regulator-name = "usb3-vbus1"; 186f126890aSEmmanuel Vadot pinctrl-names = "default"; 187f126890aSEmmanuel Vadot pinctrl-0 = <&xhci1_vbus_pins>; 188f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 189f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 190f126890aSEmmanuel Vadot enable-active-high; 191f126890aSEmmanuel Vadot gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; 192f126890aSEmmanuel Vadot }; 193f126890aSEmmanuel Vadot 194f126890aSEmmanuel Vadot reg_sata0: pwr-sata0 { 195f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 196f126890aSEmmanuel Vadot regulator-name = "pwr_en_sata0"; 197f126890aSEmmanuel Vadot regulator-min-microvolt = <12000000>; 198f126890aSEmmanuel Vadot regulator-max-microvolt = <12000000>; 199f126890aSEmmanuel Vadot enable-active-high; 200f126890aSEmmanuel Vadot regulator-boot-on; 201f126890aSEmmanuel Vadot gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>; 202f126890aSEmmanuel Vadot }; 203f126890aSEmmanuel Vadot 204f126890aSEmmanuel Vadot reg_5v_sata0: v5-sata0 { 205f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 206f126890aSEmmanuel Vadot regulator-name = "v5.0-sata0"; 207f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 208f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 209f126890aSEmmanuel Vadot vin-supply = <®_sata0>; 210f126890aSEmmanuel Vadot }; 211f126890aSEmmanuel Vadot 212f126890aSEmmanuel Vadot reg_12v_sata0: v12-sata0 { 213f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 214f126890aSEmmanuel Vadot regulator-name = "v12.0-sata0"; 215f126890aSEmmanuel Vadot regulator-min-microvolt = <12000000>; 216f126890aSEmmanuel Vadot regulator-max-microvolt = <12000000>; 217f126890aSEmmanuel Vadot vin-supply = <®_sata0>; 218f126890aSEmmanuel Vadot }; 219f126890aSEmmanuel Vadot}; 220f126890aSEmmanuel Vadot 221f126890aSEmmanuel Vadot&spi0 { 222f126890aSEmmanuel Vadot pinctrl-names = "default"; 223f126890aSEmmanuel Vadot pinctrl-0 = <&spi0_pins>; 224f126890aSEmmanuel Vadot status = "okay"; 225f126890aSEmmanuel Vadot 226f126890aSEmmanuel Vadot flash@0 { 227f126890aSEmmanuel Vadot #address-cells = <1>; 228f126890aSEmmanuel Vadot #size-cells = <1>; 229f126890aSEmmanuel Vadot compatible = "macronix,mx25l6405d", "jedec,spi-nor"; 230f126890aSEmmanuel Vadot reg = <0>; /* Chip select 0 */ 231f126890aSEmmanuel Vadot spi-max-frequency = <50000000>; 232f126890aSEmmanuel Vadot m25p,fast-read; 233f126890aSEmmanuel Vadot 234f126890aSEmmanuel Vadot /* Note: there is a redboot partition table despite u-boot 235f126890aSEmmanuel Vadot * being used. The names presented here are the same as those 236f126890aSEmmanuel Vadot * found in the FIS directory. There is also a small device 237f126890aSEmmanuel Vadot * tree in the last 64kB of the RedBoot partition which is not 238f126890aSEmmanuel Vadot * enumerated. The MAC address and the serial number are listed 239f126890aSEmmanuel Vadot * in the "vendor" partition. 240f126890aSEmmanuel Vadot */ 241f126890aSEmmanuel Vadot partition@0 { 242f126890aSEmmanuel Vadot label = "RedBoot"; 243f126890aSEmmanuel Vadot reg = <0x00000000 0x000f0000>; 244f126890aSEmmanuel Vadot read-only; 245f126890aSEmmanuel Vadot }; 246f126890aSEmmanuel Vadot 247f126890aSEmmanuel Vadot partition@c0000 { 248f126890aSEmmanuel Vadot label = "zImage"; 249f126890aSEmmanuel Vadot reg = <0x000f0000 0x002d0000>; 250f126890aSEmmanuel Vadot }; 251f126890aSEmmanuel Vadot 252f126890aSEmmanuel Vadot partition@390000 { 253f126890aSEmmanuel Vadot label = "rd.gz"; 254f126890aSEmmanuel Vadot reg = <0x003c0000 0x00410000>; 255f126890aSEmmanuel Vadot }; 256f126890aSEmmanuel Vadot 257f126890aSEmmanuel Vadot partition@7d0000 { 258f126890aSEmmanuel Vadot label = "vendor"; 259f126890aSEmmanuel Vadot reg = <0x007d0000 0x00010000>; 260f126890aSEmmanuel Vadot read-only; 261f126890aSEmmanuel Vadot }; 262f126890aSEmmanuel Vadot 263f126890aSEmmanuel Vadot partition@7e0000 { 264f126890aSEmmanuel Vadot label = "RedBoot config"; 265f126890aSEmmanuel Vadot reg = <0x007e0000 0x00010000>; 266f126890aSEmmanuel Vadot read-only; 267f126890aSEmmanuel Vadot }; 268f126890aSEmmanuel Vadot 269f126890aSEmmanuel Vadot partition@7f0000 { 270f126890aSEmmanuel Vadot label = "FIS directory"; 271f126890aSEmmanuel Vadot reg = <0x007f0000 0x00010000>; 272f126890aSEmmanuel Vadot read-only; 273f126890aSEmmanuel Vadot }; 274f126890aSEmmanuel Vadot }; 275f126890aSEmmanuel Vadot}; 276f126890aSEmmanuel Vadot 277f126890aSEmmanuel Vadot&pinctrl { 278f126890aSEmmanuel Vadot /* use only one pin for UART1, as mpp20 is used by sata0 */ 279f126890aSEmmanuel Vadot uart1_pins: uart-pins-1 { 280f126890aSEmmanuel Vadot marvell,pins = "mpp19"; 281f126890aSEmmanuel Vadot marvell,function = "ua1"; 282f126890aSEmmanuel Vadot }; 283f126890aSEmmanuel Vadot 284f126890aSEmmanuel Vadot xhci0_vbus_pins: xhci0_vbus_pins { 285f126890aSEmmanuel Vadot marvell,pins = "mpp58"; 286f126890aSEmmanuel Vadot marvell,function = "gpio"; 287f126890aSEmmanuel Vadot }; 288f126890aSEmmanuel Vadot xhci1_vbus_pins: xhci1_vbus_pins { 289f126890aSEmmanuel Vadot marvell,pins = "mpp59"; 290f126890aSEmmanuel Vadot marvell,function = "gpio"; 291f126890aSEmmanuel Vadot }; 292f126890aSEmmanuel Vadot}; 293