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