armada-370-netgear-rn104.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*
  2. * Device Tree file for NETGEAR ReadyNAS 104
  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-370.dtsi"
  15. / {
  16. model = "NETGEAR ReadyNAS 104";
  17. compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp";
  18. chosen {
  19. bootargs = "console=ttyS0,115200 earlyprintk";
  20. };
  21. memory {
  22. device_type = "memory";
  23. reg = <0x00000000 0x20000000>; /* 512 MB */
  24. };
  25. soc {
  26. ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
  27. MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
  28. pcie-controller {
  29. status = "okay";
  30. /* Connected to FL1009 USB 3.0 controller */
  31. pcie@1,0 {
  32. /* Port 0, Lane 0 */
  33. status = "okay";
  34. };
  35. /* Connected to Marvell 88SE9215 SATA controller */
  36. pcie@2,0 {
  37. /* Port 1, Lane 0 */
  38. status = "okay";
  39. };
  40. };
  41. internal-regs {
  42. serial@12000 {
  43. status = "okay";
  44. };
  45. pinctrl {
  46. poweroff: poweroff {
  47. marvell,pins = "mpp60";
  48. marvell,function = "gpio";
  49. };
  50. backup_button_pin: backup-button-pin {
  51. marvell,pins = "mpp52";
  52. marvell,function = "gpio";
  53. };
  54. power_button_pin: power-button-pin {
  55. marvell,pins = "mpp62";
  56. marvell,function = "gpio";
  57. };
  58. backup_led_pin: backup-led-pin {
  59. marvell,pins = "mpp63";
  60. marvell,function = "gpo";
  61. };
  62. power_led_pin: power-led-pin {
  63. marvell,pins = "mpp64";
  64. marvell,function = "gpio";
  65. };
  66. reset_button_pin: reset-button-pin {
  67. marvell,pins = "mpp65";
  68. marvell,function = "gpio";
  69. };
  70. };
  71. mdio {
  72. pinctrl-0 = <&mdio_pins>;
  73. pinctrl-names = "default";
  74. phy0: ethernet-phy@0 { /* Marvell 88E1318 */
  75. reg = <0>;
  76. };
  77. phy1: ethernet-phy@1 { /* Marvell 88E1318 */
  78. reg = <1>;
  79. };
  80. };
  81. ethernet@70000 {
  82. pinctrl-0 = <&ge0_rgmii_pins>;
  83. pinctrl-names = "default";
  84. status = "okay";
  85. phy = <&phy0>;
  86. phy-mode = "rgmii-id";
  87. };
  88. ethernet@74000 {
  89. pinctrl-0 = <&ge1_rgmii_pins>;
  90. pinctrl-names = "default";
  91. status = "okay";
  92. phy = <&phy1>;
  93. phy-mode = "rgmii-id";
  94. };
  95. usb@50000 {
  96. status = "okay";
  97. };
  98. i2c@11000 {
  99. compatible = "marvell,mv64xxx-i2c";
  100. clock-frequency = <100000>;
  101. status = "okay";
  102. isl12057: isl12057@68 {
  103. compatible = "isil,isl12057";
  104. reg = <0x68>;
  105. };
  106. g762: g762@3e {
  107. compatible = "gmt,g762";
  108. reg = <0x3e>;
  109. clocks = <&g762_clk>; /* input clock */
  110. fan_gear_mode = <0>;
  111. fan_startv = <1>;
  112. pwm_polarity = <0>;
  113. };
  114. pca9554: pca9554@23 {
  115. compatible = "nxp,pca9554";
  116. gpio-controller;
  117. #gpio-cells = <2>;
  118. reg = <0x23>;
  119. };
  120. };
  121. nand@d0000 {
  122. status = "okay";
  123. num-cs = <1>;
  124. marvell,nand-keep-config;
  125. marvell,nand-enable-arbiter;
  126. nand-on-flash-bbt;
  127. /* Use Hardware BCH ECC */
  128. nand-ecc-strength = <4>;
  129. nand-ecc-step-size = <512>;
  130. partition@0 {
  131. label = "u-boot";
  132. reg = <0x0000000 0x180000>; /* 1.5MB */
  133. read-only;
  134. };
  135. partition@180000 {
  136. label = "u-boot-env";
  137. reg = <0x180000 0x20000>; /* 128KB */
  138. read-only;
  139. };
  140. partition@200000 {
  141. label = "uImage";
  142. reg = <0x0200000 0x600000>; /* 6MB */
  143. };
  144. partition@800000 {
  145. label = "minirootfs";
  146. reg = <0x0800000 0x400000>; /* 4MB */
  147. };
  148. /* Last MB is for the BBT, i.e. not writable */
  149. partition@c00000 {
  150. label = "ubifs";
  151. reg = <0x0c00000 0x7400000>; /* 116MB */
  152. };
  153. };
  154. };
  155. };
  156. clocks {
  157. g762_clk: g762-oscillator {
  158. compatible = "fixed-clock";
  159. #clock-cells = <0>;
  160. clock-frequency = <8192>;
  161. };
  162. };
  163. gpio-leds {
  164. compatible = "gpio-leds";
  165. pinctrl-0 = <&backup_led_pin &power_led_pin>;
  166. pinctrl-names = "default";
  167. blue-backup-led {
  168. label = "rn104:blue:backup";
  169. gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
  170. default-state = "off";
  171. };
  172. blue-power-led {
  173. label = "rn104:blue:pwr";
  174. gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  175. linux,default-trigger = "keep";
  176. };
  177. blue-sata1-led {
  178. label = "rn104:blue:sata1";
  179. gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
  180. default-state = "off";
  181. };
  182. blue-sata2-led {
  183. label = "rn104:blue:sata2";
  184. gpios = <&pca9554 1 GPIO_ACTIVE_LOW>;
  185. default-state = "off";
  186. };
  187. blue-sata3-led {
  188. label = "rn104:blue:sata3";
  189. gpios = <&pca9554 2 GPIO_ACTIVE_LOW>;
  190. default-state = "off";
  191. };
  192. blue-sata4-led {
  193. label = "rn104:blue:sata4";
  194. gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
  195. default-state = "off";
  196. };
  197. };
  198. gpio-keys {
  199. compatible = "gpio-keys";
  200. pinctrl-0 = <&backup_button_pin
  201. &power_button_pin
  202. &reset_button_pin>;
  203. pinctrl-names = "default";
  204. backup-button {
  205. label = "Backup Button";
  206. linux,code = <KEY_COPY>;
  207. gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
  208. };
  209. power-button {
  210. label = "Power Button";
  211. linux,code = <KEY_POWER>;
  212. gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
  213. };
  214. reset-button {
  215. label = "Reset Button";
  216. linux,code = <KEY_RESTART>;
  217. gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
  218. };
  219. };
  220. gpio-poweroff {
  221. compatible = "gpio-poweroff";
  222. pinctrl-0 = <&poweroff>;
  223. pinctrl-names = "default";
  224. gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
  225. };
  226. };