1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2724ba675SRob Herring/* 3724ba675SRob Herring * Device Tree file for Synology DS116 NAS 4724ba675SRob Herring * 5724ba675SRob Herring * Copyright (C) 2017 Willy Tarreau <w@1wt.eu> 6724ba675SRob Herring */ 7724ba675SRob Herring 8724ba675SRob Herring/dts-v1/; 9724ba675SRob Herring#include "armada-385.dtsi" 10724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 11724ba675SRob Herring 12724ba675SRob Herring/ { 13724ba675SRob Herring model = "Synology DS116"; 14724ba675SRob Herring compatible = "marvell,a385-gp", "marvell,armada385", "marvell,armada380"; 15724ba675SRob Herring 16724ba675SRob Herring chosen { 17724ba675SRob Herring stdout-path = "serial0:115200n8"; 18724ba675SRob Herring }; 19724ba675SRob Herring 20724ba675SRob Herring memory { 21724ba675SRob Herring device_type = "memory"; 22724ba675SRob Herring reg = <0x00000000 0x40000000>; /* 1 GB */ 23724ba675SRob Herring }; 24724ba675SRob Herring 25724ba675SRob Herring soc { 26724ba675SRob Herring ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 27724ba675SRob Herring MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 28724ba675SRob Herring MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 29724ba675SRob Herring MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 30724ba675SRob Herring MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; 31724ba675SRob Herring 32724ba675SRob Herring internal-regs { 33724ba675SRob Herring i2c@11000 { 34724ba675SRob Herring pinctrl-names = "default"; 35724ba675SRob Herring pinctrl-0 = <&i2c0_pins>; 36724ba675SRob Herring status = "okay"; 37724ba675SRob Herring clock-frequency = <100000>; 38724ba675SRob Herring 39724ba675SRob Herring eeprom@57 { 40724ba675SRob Herring compatible = "atmel,24c64"; 41724ba675SRob Herring reg = <0x57>; 42724ba675SRob Herring }; 43724ba675SRob Herring }; 44724ba675SRob Herring 45724ba675SRob Herring serial@12000 { 46724ba675SRob Herring pinctrl-names = "default"; 47724ba675SRob Herring pinctrl-0 = <&uart0_pins>; 48724ba675SRob Herring status = "okay"; 49724ba675SRob Herring }; 50724ba675SRob Herring 51724ba675SRob Herring serial@12100 { 52724ba675SRob Herring /* A PIC16F1829 is connected to uart1 at 9600 bps, 53724ba675SRob Herring * and takes single-character orders : 54724ba675SRob Herring * "1" : power off // already handled by the poweroff node 55724ba675SRob Herring * "2" : short beep 56724ba675SRob Herring * "3" : long beep 57724ba675SRob Herring * "4" : turn the power LED ON 58724ba675SRob Herring * "5" : flash the power LED 59724ba675SRob Herring * "6" : turn the power LED OFF 60724ba675SRob Herring * "7" : turn the status LED OFF 61724ba675SRob Herring * "8" : turn the status LED ON 62724ba675SRob Herring * "9" : flash the status LED 63724ba675SRob Herring * "A" : flash the motherboard LED (D8) 64724ba675SRob Herring * "B" : turn the motherboard LED OFF 65724ba675SRob Herring * "C" : hard reset 66724ba675SRob Herring */ 67724ba675SRob Herring pinctrl-names = "default"; 68724ba675SRob Herring pinctrl-0 = <&uart1_pins>; 69724ba675SRob Herring status = "okay"; 70724ba675SRob Herring }; 71724ba675SRob Herring 72724ba675SRob Herring poweroff@12100 { 73724ba675SRob Herring compatible = "synology,power-off"; 74724ba675SRob Herring reg = <0x12100 0x100>; 75724ba675SRob Herring clocks = <&coreclk 0>; 76724ba675SRob Herring }; 77724ba675SRob Herring 78724ba675SRob Herring ethernet@70000 { 79724ba675SRob Herring pinctrl-names = "default"; 80724ba675SRob Herring phy = <&phy0>; 81724ba675SRob Herring phy-mode = "sgmii"; 82724ba675SRob Herring buffer-manager = <&bm>; 83724ba675SRob Herring bm,pool-long = <0>; 84724ba675SRob Herring status = "okay"; 85724ba675SRob Herring }; 86724ba675SRob Herring 87724ba675SRob Herring 88724ba675SRob Herring mdio@72004 { 89724ba675SRob Herring pinctrl-names = "default"; 90724ba675SRob Herring pinctrl-0 = <&mdio_pins>; 91724ba675SRob Herring 92724ba675SRob Herring phy0: ethernet-phy@1 { 93724ba675SRob Herring reg = <1>; 94724ba675SRob Herring }; 95724ba675SRob Herring }; 96724ba675SRob Herring 97724ba675SRob Herring sata@a8000 { 98724ba675SRob Herring pinctrl-names = "default"; 99724ba675SRob Herring pinctrl-0 = <&sata0_pins>; 100724ba675SRob Herring status = "okay"; 101724ba675SRob Herring #address-cells = <1>; 102724ba675SRob Herring #size-cells = <0>; 103724ba675SRob Herring 104724ba675SRob Herring sata0: sata-port@0 { 105724ba675SRob Herring reg = <0>; 106724ba675SRob Herring target-supply = <®_5v_sata0>; 107724ba675SRob Herring }; 108724ba675SRob Herring }; 109724ba675SRob Herring 110724ba675SRob Herring bm@c8000 { 111724ba675SRob Herring status = "okay"; 112724ba675SRob Herring }; 113724ba675SRob Herring 114724ba675SRob Herring usb3@f0000 { 115724ba675SRob Herring usb-phy = <&usb3_0_phy>; 116724ba675SRob Herring status = "okay"; 117724ba675SRob Herring }; 118724ba675SRob Herring 119724ba675SRob Herring usb3@f8000 { 120724ba675SRob Herring usb-phy = <&usb3_1_phy>; 121724ba675SRob Herring status = "okay"; 122724ba675SRob Herring }; 123724ba675SRob Herring }; 124724ba675SRob Herring 125724ba675SRob Herring bm-bppi { 126724ba675SRob Herring status = "okay"; 127724ba675SRob Herring }; 128724ba675SRob Herring 129724ba675SRob Herring gpio-fan { 130724ba675SRob Herring compatible = "gpio-fan"; 131724ba675SRob Herring gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>, 132724ba675SRob Herring <&gpio1 17 GPIO_ACTIVE_HIGH>, 133724ba675SRob Herring <&gpio1 16 GPIO_ACTIVE_HIGH>; 134*62f34e3eSDavid Heidelberg gpio-fan,speed-map = < 0 0>, 135*62f34e3eSDavid Heidelberg <1500 1>, 136*62f34e3eSDavid Heidelberg <2500 2>, 137*62f34e3eSDavid Heidelberg <3000 3>, 138*62f34e3eSDavid Heidelberg <3400 4>, 139*62f34e3eSDavid Heidelberg <3700 5>, 140*62f34e3eSDavid Heidelberg <3900 6>, 141*62f34e3eSDavid Heidelberg <4000 7>; 142724ba675SRob Herring #cooling-cells = <2>; 143724ba675SRob Herring }; 144724ba675SRob Herring 145724ba675SRob Herring gpio-leds { 146724ba675SRob Herring compatible = "gpio-leds"; 147724ba675SRob Herring 148724ba675SRob Herring /* The green part is on gpio0.20 which is also used by 149724ba675SRob Herring * sata0, and accesses to SATA disk 0 make it blink so it 150724ba675SRob Herring * doesn't need to be declared here. 151724ba675SRob Herring */ 152724ba675SRob Herring led-orange { 153724ba675SRob Herring gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; 154724ba675SRob Herring label = "ds116:orange:disk"; 155724ba675SRob Herring default-state = "off"; 156724ba675SRob Herring }; 157724ba675SRob Herring }; 158724ba675SRob Herring }; 159724ba675SRob Herring 160724ba675SRob Herring usb3_0_phy: usb3_0_phy { 161724ba675SRob Herring compatible = "usb-nop-xceiv"; 162724ba675SRob Herring vcc-supply = <®_usb3_0_vbus>; 163724ba675SRob Herring #phy-cells = <0>; 164724ba675SRob Herring }; 165724ba675SRob Herring 166724ba675SRob Herring usb3_1_phy: usb3_1_phy { 167724ba675SRob Herring compatible = "usb-nop-xceiv"; 168724ba675SRob Herring vcc-supply = <®_usb3_1_vbus>; 169724ba675SRob Herring #phy-cells = <0>; 170724ba675SRob Herring }; 171724ba675SRob Herring 172724ba675SRob Herring reg_usb3_0_vbus: usb3-vbus0 { 173724ba675SRob Herring compatible = "regulator-fixed"; 174724ba675SRob Herring regulator-name = "usb3-vbus0"; 175724ba675SRob Herring pinctrl-names = "default"; 176724ba675SRob Herring pinctrl-0 = <&xhci0_vbus_pins>; 177724ba675SRob Herring regulator-min-microvolt = <5000000>; 178724ba675SRob Herring regulator-max-microvolt = <5000000>; 179724ba675SRob Herring enable-active-high; 180724ba675SRob Herring gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>; 181724ba675SRob Herring }; 182724ba675SRob Herring 183724ba675SRob Herring reg_usb3_1_vbus: usb3-vbus1 { 184724ba675SRob Herring compatible = "regulator-fixed"; 185724ba675SRob Herring regulator-name = "usb3-vbus1"; 186724ba675SRob Herring pinctrl-names = "default"; 187724ba675SRob Herring pinctrl-0 = <&xhci1_vbus_pins>; 188724ba675SRob Herring regulator-min-microvolt = <5000000>; 189724ba675SRob Herring regulator-max-microvolt = <5000000>; 190724ba675SRob Herring enable-active-high; 191724ba675SRob Herring gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; 192724ba675SRob Herring }; 193724ba675SRob Herring 194724ba675SRob Herring reg_sata0: pwr-sata0 { 195724ba675SRob Herring compatible = "regulator-fixed"; 196724ba675SRob Herring regulator-name = "pwr_en_sata0"; 197724ba675SRob Herring regulator-min-microvolt = <12000000>; 198724ba675SRob Herring regulator-max-microvolt = <12000000>; 199724ba675SRob Herring enable-active-high; 200724ba675SRob Herring regulator-boot-on; 201724ba675SRob Herring gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>; 202724ba675SRob Herring }; 203724ba675SRob Herring 204724ba675SRob Herring reg_5v_sata0: v5-sata0 { 205724ba675SRob Herring compatible = "regulator-fixed"; 206724ba675SRob Herring regulator-name = "v5.0-sata0"; 207724ba675SRob Herring regulator-min-microvolt = <5000000>; 208724ba675SRob Herring regulator-max-microvolt = <5000000>; 209724ba675SRob Herring vin-supply = <®_sata0>; 210724ba675SRob Herring }; 211724ba675SRob Herring 212724ba675SRob Herring reg_12v_sata0: v12-sata0 { 213724ba675SRob Herring compatible = "regulator-fixed"; 214724ba675SRob Herring regulator-name = "v12.0-sata0"; 215724ba675SRob Herring regulator-min-microvolt = <12000000>; 216724ba675SRob Herring regulator-max-microvolt = <12000000>; 217724ba675SRob Herring vin-supply = <®_sata0>; 218724ba675SRob Herring }; 219724ba675SRob Herring}; 220724ba675SRob Herring 221724ba675SRob Herring&spi0 { 222724ba675SRob Herring pinctrl-names = "default"; 223724ba675SRob Herring pinctrl-0 = <&spi0_pins>; 224724ba675SRob Herring status = "okay"; 225724ba675SRob Herring 226724ba675SRob Herring flash@0 { 227724ba675SRob Herring #address-cells = <1>; 228724ba675SRob Herring #size-cells = <1>; 229724ba675SRob Herring compatible = "macronix,mx25l6405d", "jedec,spi-nor"; 230724ba675SRob Herring reg = <0>; /* Chip select 0 */ 231724ba675SRob Herring spi-max-frequency = <50000000>; 232724ba675SRob Herring m25p,fast-read; 233724ba675SRob Herring 234724ba675SRob Herring /* Note: there is a redboot partition table despite u-boot 235724ba675SRob Herring * being used. The names presented here are the same as those 236724ba675SRob Herring * found in the FIS directory. There is also a small device 237724ba675SRob Herring * tree in the last 64kB of the RedBoot partition which is not 238724ba675SRob Herring * enumerated. The MAC address and the serial number are listed 239724ba675SRob Herring * in the "vendor" partition. 240724ba675SRob Herring */ 241724ba675SRob Herring partition@0 { 242724ba675SRob Herring label = "RedBoot"; 243724ba675SRob Herring reg = <0x00000000 0x000f0000>; 244724ba675SRob Herring read-only; 245724ba675SRob Herring }; 246724ba675SRob Herring 247724ba675SRob Herring partition@c0000 { 248724ba675SRob Herring label = "zImage"; 249724ba675SRob Herring reg = <0x000f0000 0x002d0000>; 250724ba675SRob Herring }; 251724ba675SRob Herring 252724ba675SRob Herring partition@390000 { 253724ba675SRob Herring label = "rd.gz"; 254724ba675SRob Herring reg = <0x003c0000 0x00410000>; 255724ba675SRob Herring }; 256724ba675SRob Herring 257724ba675SRob Herring partition@7d0000 { 258724ba675SRob Herring label = "vendor"; 259724ba675SRob Herring reg = <0x007d0000 0x00010000>; 260724ba675SRob Herring read-only; 261724ba675SRob Herring }; 262724ba675SRob Herring 263724ba675SRob Herring partition@7e0000 { 264724ba675SRob Herring label = "RedBoot config"; 265724ba675SRob Herring reg = <0x007e0000 0x00010000>; 266724ba675SRob Herring read-only; 267724ba675SRob Herring }; 268724ba675SRob Herring 269724ba675SRob Herring partition@7f0000 { 270724ba675SRob Herring label = "FIS directory"; 271724ba675SRob Herring reg = <0x007f0000 0x00010000>; 272724ba675SRob Herring read-only; 273724ba675SRob Herring }; 274724ba675SRob Herring }; 275724ba675SRob Herring}; 276724ba675SRob Herring 277724ba675SRob Herring&pinctrl { 278724ba675SRob Herring /* use only one pin for UART1, as mpp20 is used by sata0 */ 279724ba675SRob Herring uart1_pins: uart-pins-1 { 280724ba675SRob Herring marvell,pins = "mpp19"; 281724ba675SRob Herring marvell,function = "ua1"; 282724ba675SRob Herring }; 283724ba675SRob Herring 284724ba675SRob Herring xhci0_vbus_pins: xhci0_vbus_pins { 285724ba675SRob Herring marvell,pins = "mpp58"; 286724ba675SRob Herring marvell,function = "gpio"; 287724ba675SRob Herring }; 288724ba675SRob Herring xhci1_vbus_pins: xhci1_vbus_pins { 289724ba675SRob Herring marvell,pins = "mpp59"; 290724ba675SRob Herring marvell,function = "gpio"; 291724ba675SRob Herring }; 292724ba675SRob Herring}; 293