armada-xp-netgear-rn2120.dts 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /*
  2. * Device Tree file for NETGEAR ReadyNAS 2120
  3. *
  4. * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. /dts-v1/;
  12. #include <dt-bindings/input/input.h>
  13. #include <dt-bindings/gpio/gpio.h>
  14. #include "armada-xp-mv78230.dtsi"
  15. / {
  16. model = "NETGEAR ReadyNAS 2120";
  17. compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
  18. chosen {
  19. bootargs = "console=ttyS0,115200 earlyprintk";
  20. };
  21. memory {
  22. device_type = "memory";
  23. reg = <0 0x00000000 0 0x80000000>; /* 2GB */
  24. };
  25. soc {
  26. ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
  27. MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
  28. pcie-controller {
  29. status = "okay";
  30. /* Connected to first Marvell 88SE9170 SATA controller */
  31. pcie@1,0 {
  32. /* Port 0, Lane 0 */
  33. status = "okay";
  34. };
  35. /* Connected to second Marvell 88SE9170 SATA controller */
  36. pcie@2,0 {
  37. /* Port 0, Lane 1 */
  38. status = "okay";
  39. };
  40. /* Connected to Fresco Logic FL1009 USB 3.0 controller */
  41. pcie@5,0 {
  42. /* Port 1, Lane 0 */
  43. status = "okay";
  44. };
  45. };
  46. internal-regs {
  47. pinctrl {
  48. poweroff: poweroff {
  49. marvell,pins = "mpp42";
  50. marvell,function = "gpio";
  51. };
  52. power_button_pin: power-button-pin {
  53. marvell,pins = "mpp27";
  54. marvell,function = "gpio";
  55. };
  56. reset_button_pin: reset-button-pin {
  57. marvell,pins = "mpp41";
  58. marvell,function = "gpio";
  59. };
  60. sata1_led_pin: sata1-led-pin {
  61. marvell,pins = "mpp31";
  62. marvell,function = "gpio";
  63. };
  64. sata2_led_pin: sata2-led-pin {
  65. marvell,pins = "mpp40";
  66. marvell,function = "gpio";
  67. };
  68. sata3_led_pin: sata3-led-pin {
  69. marvell,pins = "mpp44";
  70. marvell,function = "gpio";
  71. };
  72. sata4_led_pin: sata4-led-pin {
  73. marvell,pins = "mpp47";
  74. marvell,function = "gpio";
  75. };
  76. sata1_power_pin: sata1-power-pin {
  77. marvell,pins = "mpp24";
  78. marvell,function = "gpio";
  79. };
  80. sata2_power_pin: sata2-power-pin {
  81. marvell,pins = "mpp25";
  82. marvell,function = "gpio";
  83. };
  84. sata3_power_pin: sata3-power-pin {
  85. marvell,pins = "mpp26";
  86. marvell,function = "gpio";
  87. };
  88. sata4_power_pin: sata4-power-pin {
  89. marvell,pins = "mpp28";
  90. marvell,function = "gpio";
  91. };
  92. sata1_pres_pin: sata1-pres-pin {
  93. marvell,pins = "mpp32";
  94. marvell,function = "gpio";
  95. };
  96. sata2_pres_pin: sata2-pres-pin {
  97. marvell,pins = "mpp33";
  98. marvell,function = "gpio";
  99. };
  100. sata3_pres_pin: sata3-pres-pin {
  101. marvell,pins = "mpp34";
  102. marvell,function = "gpio";
  103. };
  104. sata4_pres_pin: sata4-pres-pin {
  105. marvell,pins = "mpp35";
  106. marvell,function = "gpio";
  107. };
  108. err_led_pin: err-led-pin {
  109. marvell,pins = "mpp45";
  110. marvell,function = "gpio";
  111. };
  112. };
  113. serial@12000 {
  114. status = "okay";
  115. };
  116. mdio {
  117. phy0: ethernet-phy@0 { /* Marvell 88E1318 */
  118. reg = <0>;
  119. };
  120. phy1: ethernet-phy@1 { /* Marvell 88E1318 */
  121. reg = <1>;
  122. };
  123. };
  124. ethernet@70000 {
  125. status = "okay";
  126. phy = <&phy0>;
  127. phy-mode = "rgmii-id";
  128. };
  129. ethernet@74000 {
  130. status = "okay";
  131. phy = <&phy1>;
  132. phy-mode = "rgmii-id";
  133. };
  134. /* Front USB 2.0 port */
  135. usb@50000 {
  136. status = "okay";
  137. };
  138. i2c@11000 {
  139. compatible = "marvell,mv64xxx-i2c";
  140. clock-frequency = <400000>;
  141. status = "okay";
  142. isl12057: isl12057@68 {
  143. compatible = "isil,isl12057";
  144. reg = <0x68>;
  145. };
  146. /* Controller for rear fan #1 of 3 (Protechnic
  147. * MGT4012XB-O20, 8000RPM) near eSATA port */
  148. g762_fan1: g762@3e {
  149. compatible = "gmt,g762";
  150. reg = <0x3e>;
  151. clocks = <&g762_clk>; /* input clock */
  152. fan_gear_mode = <0>;
  153. fan_startv = <1>;
  154. pwm_polarity = <0>;
  155. };
  156. /* Controller for rear (center) fan #2 of 3 */
  157. g762_fan2: g762@48 {
  158. compatible = "gmt,g762";
  159. reg = <0x48>;
  160. clocks = <&g762_clk>; /* input clock */
  161. fan_gear_mode = <0>;
  162. fan_startv = <1>;
  163. pwm_polarity = <0>;
  164. };
  165. /* Controller for rear fan #3 of 3 */
  166. g762_fan3: g762@49 {
  167. compatible = "gmt,g762";
  168. reg = <0x49>;
  169. clocks = <&g762_clk>; /* input clock */
  170. fan_gear_mode = <0>;
  171. fan_startv = <1>;
  172. pwm_polarity = <0>;
  173. };
  174. /* Temperature sensor */
  175. g751: g751@4c {
  176. compatible = "gmt,g751";
  177. reg = <0x4c>;
  178. };
  179. };
  180. nand@d0000 {
  181. status = "okay";
  182. num-cs = <1>;
  183. marvell,nand-keep-config;
  184. marvell,nand-enable-arbiter;
  185. nand-on-flash-bbt;
  186. /* Use Hardware BCH ECC */
  187. nand-ecc-strength = <4>;
  188. nand-ecc-step-size = <512>;
  189. partition@0 {
  190. label = "u-boot";
  191. reg = <0x0000000 0x180000>; /* 1.5MB */
  192. read-only;
  193. };
  194. partition@180000 {
  195. label = "u-boot-env";
  196. reg = <0x180000 0x20000>; /* 128KB */
  197. read-only;
  198. };
  199. partition@200000 {
  200. label = "uImage";
  201. reg = <0x0200000 0x600000>; /* 6MB */
  202. };
  203. partition@800000 {
  204. label = "minirootfs";
  205. reg = <0x0800000 0x400000>; /* 4MB */
  206. };
  207. /* Last MB is for the BBT, i.e. not writable */
  208. partition@c00000 {
  209. label = "ubifs";
  210. reg = <0x0c00000 0x7400000>; /* 116MB */
  211. };
  212. };
  213. };
  214. };
  215. clocks {
  216. g762_clk: g762-oscillator {
  217. compatible = "fixed-clock";
  218. #clock-cells = <0>;
  219. clock-frequency = <32768>;
  220. };
  221. };
  222. gpio-leds {
  223. compatible = "gpio-leds";
  224. pinctrl-0 = <&sata1_led_pin &sata2_led_pin &err_led_pin
  225. &sata3_led_pin &sata4_led_pin>;
  226. pinctrl-names = "default";
  227. red-sata1-led {
  228. label = "rn2120:red:sata1";
  229. gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
  230. default-state = "off";
  231. };
  232. red-sata2-led {
  233. label = "rn2120:red:sata2";
  234. gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
  235. default-state = "off";
  236. };
  237. red-sata3-led {
  238. label = "rn2120:red:sata3";
  239. gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
  240. default-state = "off";
  241. };
  242. red-sata4-led {
  243. label = "rn2120:red:sata4";
  244. gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  245. default-state = "off";
  246. };
  247. red-err-led {
  248. label = "rn2120:red:err";
  249. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  250. default-state = "off";
  251. };
  252. };
  253. gpio-keys {
  254. compatible = "gpio-keys";
  255. pinctrl-0 = <&power_button_pin &reset_button_pin>;
  256. pinctrl-names = "default";
  257. power-button {
  258. label = "Power Button";
  259. linux,code = <KEY_POWER>;
  260. gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
  261. };
  262. reset-button {
  263. label = "Reset Button";
  264. linux,code = <KEY_RESTART>;
  265. gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
  266. };
  267. };
  268. gpio-poweroff {
  269. compatible = "gpio-poweroff";
  270. pinctrl-0 = <&poweroff>;
  271. pinctrl-names = "default";
  272. gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
  273. };
  274. };