spacepaste

  1.  
  2. /*
  3. * Device Tree file for Zyxel NAS326
  4. *
  5. * Copyright (C) 2017 bodhi <mibodhi@gmail.com>
  6. * Taras Ivaniukovich <rr-m@rr-m.org>
  7. * Henrik Andersson <henrik.4e@gmail.com>
  8. *
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without any
  12. * warranty of any kind, whether express or implied.
  13. */
  14. /dts-v1/;
  15. #include <dt-bindings/input/input.h>
  16. #include <dt-bindings/gpio/gpio.h>
  17. #include "armada-380.dtsi"
  18. / {
  19. model = "Zyxel NAS326";
  20. compatible = "zyxel,nas326", "marvell,armada380", "marvell,armada38x";
  21. chosen {
  22. bootargs = "console=ttyS0,115200";
  23. };
  24. memory {
  25. device_type = "memory";
  26. reg = <0x00000000 0x20000000>; /* 512 MB */
  27. };
  28. soc {
  29. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  30. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  31. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 /* CESA0: PHYS=0xf1100000
  32. size 64K */
  33. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; /* CESA1: PHYS=0xf1110000
  34. size 64K */
  35. internal-regs {
  36. ethernet@70000 {
  37. status = "okay";
  38. phy-mode = "rgmii";
  39. mac-address = [ 1a 07 a8 2c 04 76 ];
  40. fixed-link {
  41. speed = <1000>;
  42. full-duplex;
  43. };
  44. };
  45. i2c0: i2c@11000 {
  46. status = "okay";
  47. clock-frequency = <100000>;
  48. };
  49. i2c1: i2c@11100 {
  50. status = "okay";
  51. clock-frequency = <100000>;
  52. };
  53. mdio {
  54. status = "okay";
  55. };
  56. sata@a8000 {
  57. status = "okay";
  58. };
  59. sdhci@d8000 {
  60. broken-cd;
  61. wp-inverted;
  62. bus-width = <8>;
  63. status = "okay";
  64. };
  65. serial@12000 {
  66. status = "okay";
  67. };
  68. usb@58000 {
  69. status = "okay";
  70. };
  71. usb3@f0000 {
  72. status = "okay";
  73. };
  74. usb3@f8000 {
  75. status = "okay";
  76. };
  77. flash@d0000 {
  78. status = "okay";
  79. num-cs = <1>;
  80. marvell,nand-keep-config;
  81. marvell,nand-enable-arbiter;
  82. nand-on-flash-bbt;
  83. partition@00000000 {
  84. label = "U-Boot";
  85. reg = <0x00000000 0x00200000>; /* 2 MB */
  86. };
  87. partition@00200000 {
  88. label = "U-Boot env";
  89. reg = <0x00200000 0x00200000>; /* 2 MB */
  90. };
  91. partition@00400000 {
  92. label = "Config";
  93. reg = <0x00400000 0x00A00000>; /* 10 MB */
  94. };
  95. partition@00600000 {
  96. label = "Kernel-1";
  97. reg = <0x00E00000 0x00F00000>; /* 15 MB */
  98. };
  99. partition@01500000 {
  100. label = "RootFS-1";
  101. reg = <0x01D00000 0x06A00000>; /* 106 MB */
  102. };
  103. partition@08300000 {
  104. label = "Kernel-2";
  105. reg = <0x08700000 0x00F00000>; /* 15 MB */
  106. };
  107. partition@09200000 {
  108. label = "RootFS-2";
  109. reg = <0x09600000 0x06A00000>; /* 106 MB */
  110. };
  111. };
  112. crypto@9D000 {
  113. status = "okay";
  114. };
  115. pinctrl@18000 {
  116. pinctrl-names = "default";
  117. pmx_power_button: pmx_power-button {
  118. marvell,pins = "mpp46";
  119. marvell,function = "gpio";
  120. };
  121. pmx_copy_button: pmx_copy-button {
  122. marvell,pins = "mpp39";
  123. marvell,function = "gpio";
  124. };
  125. pmx_reset_button: pmx_reset-button {
  126. marvell,pins = "mpp49";
  127. marvell,function = "gpio";
  128. };
  129. pmx_sata1_white_led: pmx_sata1_white_led {
  130. marvell,pins = "mpp50";
  131. marvell,function = "gpio";
  132. };
  133. pmx_sata1_red_led: pmx_sata1_red_led {
  134. marvell,pins = "mpp48";
  135. marvell,function = "gpio";
  136. };
  137. pmx_sata2_white_led: pmx_sata2_white_led {
  138. marvell,pins = "mpp53";
  139. marvell,function = "gpio";
  140. };
  141. pmx_sata2_red_led: pmx_sata2_red_led {
  142. marvell,pins = "mpp54";
  143. marvell,function = "gpio";
  144. };
  145. pmx_sys_white_led: pmx_sys_white_led {
  146. marvell,pins = "mpp52";
  147. marvell,function = "gpio";
  148. };
  149. pmx_sys_red_led: pmx_sys_red_led {
  150. marvell,pins = "mpp55";
  151. marvell,function = "gpio";
  152. };
  153. pmx_usb_white_led: pmx_usb_white_led {
  154. marvell,pins = "mpp21";
  155. marvell,function = "gpio";
  156. };
  157. pmx_copy_white_led: pmx_copy_white_led {
  158. marvell,pins = "mpp26";
  159. marvell,function = "gpio";
  160. };
  161. pmx_copy_red_led: pmx_copy_red_led {
  162. marvell,pins = "mpp37";
  163. marvell,function = "gpio";
  164. };
  165. pmx_buzzer: pmx_buzzer {
  166. marvell,pins = "mpp19";
  167. marvell,function = "gpio";
  168. };
  169. };
  170. };
  171. pcie-controller {
  172. status = "okay";
  173. /*
  174. * The two PCIe units are accessible through
  175. * standard PCIe slots on the board.
  176. */
  177. pcie@1,0 {
  178. /* Port 0, Lane 0 */
  179. status = "okay";
  180. };
  181. pcie@2,0 {
  182. /* Port 1, Lane 0 */
  183. status = "okay";
  184. };
  185. };
  186. };
  187. usb2_phy: usb2_phy {
  188. compatible = "usb-nop-xceiv";
  189. vcc-supply = <&usb2_power>;
  190. };
  191. gpio-keys {
  192. compatible = "gpio-keys";
  193. #address-cells = <1>;
  194. #size-cells = <0>;
  195. pinctrl-0 = <&pmx_power_button &pmx_copy_button &pmx_reset_button>;
  196. pinctrl-names = "default";
  197. button@1 {
  198. label = "Power Button";
  199. linux,code = <KEY_POWER>;
  200. gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  201. };
  202. button@2 {
  203. label = "Copy Button";
  204. linux,code = <KEY_COPY>;
  205. gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
  206. };
  207. button@3 {
  208. label = "Reset Button";
  209. linux,code = <KEY_RESTART>;
  210. gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
  211. };
  212. };
  213. gpio-leds {
  214. compatible = "gpio-leds";
  215. pinctrl-0 = <&pmx_sata1_white_led
  216. &pmx_sata1_red_led
  217. &pmx_sata2_white_led
  218. &pmx_sata2_red_led
  219. &pmx_sys_white_led
  220. &pmx_sys_red_led
  221. &pmx_usb_white_led>;
  222. pinctrl-names = "default";
  223. white_sata1 {
  224. label = "nsa326:white:sata1";
  225. gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
  226. linux,default-trigger = "ide-disk1";
  227. };
  228. red_sata1 {
  229. label = "nsa326:red:sata1";
  230. gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
  231. };
  232. white-sata2 {
  233. label = "nsa326:white:sata2";
  234. gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
  235. };
  236. red-sata2 {
  237. label = "nsa326:red:sata2";
  238. gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
  239. };
  240. white-usb {
  241. label = "nsa326:white:usb";
  242. gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
  243. linux,default-trigger = "usb-host";
  244. };
  245. white-sys {
  246. label = "nsa326:white:sys";
  247. gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
  248. linux,default-trigger = "default-on";
  249. };
  250. red-sys {
  251. label = "nsa326:red:sys";
  252. gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  253. };
  254. white-copy {
  255. label = "nsa326:white:copy";
  256. gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  257. };
  258. red-copy {
  259. label = "nsa326:red:copy";
  260. gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
  261. };
  262. };
  263. regulators {
  264. compatible = "simple-bus";
  265. #address-cells = <1>;
  266. #size-cells = <0>;
  267. usb2_power: regulator@1 {
  268. compatible = "regulator-fixed";
  269. reg = <1>;
  270. regulator-name = "USB2 Power";
  271. regulator-min-microvolt = <5000000>;
  272. regulator-max-microvolt = <5000000>;
  273. enable-active-high;
  274. regulator-always-on;
  275. regulator-boot-on;
  276. gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
  277. };
  278. reg_sata0: regulator@2 {
  279. compatible = "regulator-fixed";
  280. regulator-name = "pwr_en_sata0";
  281. regulator-min-microvolt = <12000000>;
  282. regulator-max-microvolt = <12000000>;
  283. enable-active-high;
  284. regulator-boot-on;
  285. gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>;
  286. };
  287. reg_5v_sata0: v5-sata0 {
  288. compatible = "regulator-fixed";
  289. regulator-name = "v5.0-sata0";
  290. regulator-min-microvolt = <5000000>;
  291. regulator-max-microvolt = <5000000>;
  292. vin-supply = <&reg_sata0>;
  293. };
  294. reg_12v_sata0: v12-sata0 {
  295. compatible = "regulator-fixed";
  296. regulator-name = "v12.0-sata0";
  297. regulator-min-microvolt = <12000000>;
  298. regulator-max-microvolt = <12000000>;
  299. vin-supply = <&reg_sata0>;
  300. };
  301. reg_sata1: regulator@3 {
  302. regulator-name = "pwr_en_sata1";
  303. compatible = "regulator-fixed";
  304. regulator-min-microvolt = <12000000>;
  305. regulator-max-microvolt = <12000000>;
  306. enable-active-high;
  307. regulator-boot-on;
  308. gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
  309. };
  310. reg_5v_sata1: v5-sata1 {
  311. compatible = "regulator-fixed";
  312. regulator-name = "v5.0-sata1";
  313. regulator-min-microvolt = <5000000>;
  314. regulator-max-microvolt = <5000000>;
  315. vin-supply = <&reg_sata1>;
  316. };
  317. reg_12v_sata1: v12-sata1 {
  318. compatible = "regulator-fixed";
  319. regulator-name = "v12.0-sata1";
  320. regulator-min-microvolt = <12000000>;
  321. regulator-max-microvolt = <12000000>;
  322. vin-supply = <&reg_sata1>;
  323. };
  324. };
  325. gpio-poweroff {
  326. compatible = "gpio-poweroff";
  327. pinctrl-0 = <&uart0_pins>;
  328. pinctrl-names = "default";
  329. gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
  330. };
  331. };
  332.