armada-385-synology-ds116.dts 6.2 KB

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