kirkwood-netxbig.dtsi 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /*
  2. * Device Tree common file for LaCie 2Big and 5Big Network v2
  3. *
  4. * Copyright (C) 2014
  5. *
  6. * Andrew Lunn <andrew@lunn.ch>
  7. *
  8. * Based on netxbig_v2-setup.c,
  9. * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
  10. *
  11. * This file is licensed under the terms of the GNU General Public
  12. * License version 2. This program is licensed "as is" without any
  13. * warranty of any kind, whether express or implied.
  14. */
  15. #include <dt-bindings/leds/leds-netxbig.h>
  16. #include "kirkwood.dtsi"
  17. #include "kirkwood-6281.dtsi"
  18. / {
  19. chosen {
  20. bootargs = "console=ttyS0,115200n8";
  21. stdout-path = &uart0;
  22. };
  23. ocp@f1000000 {
  24. serial@12000 {
  25. status = "okay";
  26. };
  27. spi@10600 {
  28. status = "okay";
  29. flash@0 {
  30. #address-cells = <1>;
  31. #size-cells = <1>;
  32. compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
  33. reg = <0>;
  34. spi-max-frequency = <20000000>;
  35. mode = <0>;
  36. partition@0 {
  37. reg = <0x0 0x80000>;
  38. label = "u-boot";
  39. };
  40. };
  41. };
  42. sata@80000 {
  43. status = "okay";
  44. nr-ports = <2>;
  45. };
  46. };
  47. gpio-keys {
  48. compatible = "gpio-keys";
  49. #address-cells = <1>;
  50. #size-cells = <0>;
  51. /*
  52. * esc and power represent a three position rocker
  53. * switch. Thus the conventional KEY_POWER does not fit
  54. */
  55. exc {
  56. label = "Back power switch (on|auto)";
  57. linux,code = <KEY_ESC>;
  58. linux,input-type = <5>;
  59. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  60. };
  61. power {
  62. label = "Back power switch (auto|off)";
  63. linux,code = <KEY_1>;
  64. linux,input-type = <5>;
  65. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  66. };
  67. option {
  68. label = "Function button";
  69. linux,code = <KEY_OPTION>;
  70. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  71. };
  72. };
  73. gpio-poweroff {
  74. compatible = "gpio-poweroff";
  75. gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  76. };
  77. regulators: regulators {
  78. status = "okay";
  79. compatible = "simple-bus";
  80. #address-cells = <1>;
  81. #size-cells = <0>;
  82. pinctrl-names = "default";
  83. regulator@1 {
  84. compatible = "regulator-fixed";
  85. reg = <1>;
  86. regulator-name = "hdd0power";
  87. regulator-min-microvolt = <5000000>;
  88. regulator-max-microvolt = <5000000>;
  89. enable-active-high;
  90. regulator-always-on;
  91. regulator-boot-on;
  92. gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
  93. };
  94. };
  95. netxbig_gpio_ext: netxbig-gpio-ext {
  96. compatible = "lacie,netxbig-gpio-ext";
  97. addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
  98. &gpio1 16 GPIO_ACTIVE_HIGH
  99. &gpio1 17 GPIO_ACTIVE_HIGH>;
  100. data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
  101. &gpio1 13 GPIO_ACTIVE_HIGH
  102. &gpio1 14 GPIO_ACTIVE_HIGH>;
  103. enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
  104. };
  105. netxbig-leds {
  106. compatible = "lacie,netxbig-leds";
  107. gpio-ext = <&netxbig_gpio_ext>;
  108. timers = <NETXBIG_LED_TIMER1 500 500
  109. NETXBIG_LED_TIMER2 500 1000>;
  110. blue-power {
  111. label = "netxbig:blue:power";
  112. mode-addr = <0>;
  113. mode-val = <NETXBIG_LED_OFF 0
  114. NETXBIG_LED_ON 1
  115. NETXBIG_LED_TIMER1 3
  116. NETXBIG_LED_TIMER2 7>;
  117. bright-addr = <1>;
  118. max-brightness = <7>;
  119. };
  120. red-power {
  121. label = "netxbig:red:power";
  122. mode-addr = <0>;
  123. mode-val = <NETXBIG_LED_OFF 0
  124. NETXBIG_LED_ON 2
  125. NETXBIG_LED_TIMER1 4>;
  126. bright-addr = <1>;
  127. max-brightness = <7>;
  128. };
  129. blue-sata0 {
  130. label = "netxbig:blue:sata0";
  131. mode-addr = <3>;
  132. mode-val = <NETXBIG_LED_OFF 0
  133. NETXBIG_LED_ON 7
  134. NETXBIG_LED_SATA 1
  135. NETXBIG_LED_TIMER1 3>;
  136. bright-addr = <2>;
  137. max-brightness = <7>;
  138. };
  139. red-sata0 {
  140. label = "netxbig:red:sata0";
  141. mode-addr = <3>;
  142. mode-val = <NETXBIG_LED_OFF 0
  143. NETXBIG_LED_ON 2
  144. NETXBIG_LED_TIMER1 4>;
  145. bright-addr = <2>;
  146. max-brightness = <7>;
  147. };
  148. blue-sata1 {
  149. label = "netxbig:blue:sata1";
  150. mode-addr = <4>;
  151. mode-val = <NETXBIG_LED_OFF 0
  152. NETXBIG_LED_ON 7
  153. NETXBIG_LED_SATA 1
  154. NETXBIG_LED_TIMER1 3>;
  155. bright-addr = <2>;
  156. max-brightness = <7>;
  157. };
  158. red-sata1 {
  159. label = "netxbig:red:sata1";
  160. mode-addr = <4>;
  161. mode-val = <NETXBIG_LED_OFF 0
  162. NETXBIG_LED_ON 2
  163. NETXBIG_LED_TIMER1 4>;
  164. bright-addr = <2>;
  165. max-brightness = <7>;
  166. };
  167. };
  168. };
  169. &mdio {
  170. status = "okay";
  171. ethphy0: ethernet-phy@0 {
  172. reg = <8>;
  173. };
  174. ethphy1: ethernet-phy@1 {
  175. reg = <0>;
  176. };
  177. };
  178. &eth0 {
  179. status = "okay";
  180. ethernet0-port@0 {
  181. phy-handle = <&ethphy0>;
  182. };
  183. };
  184. &pinctrl {
  185. pinctrl-names = "default";
  186. pmx_button_function: pmx-button-function {
  187. marvell,pins = "mpp34";
  188. marvell,function = "gpio";
  189. };
  190. pmx_button_power_off: pmx-button-power-off {
  191. marvell,pins = "mpp15";
  192. marvell,function = "gpio";
  193. };
  194. pmx_button_power_on: pmx-button-power-on {
  195. marvell,pins = "mpp13";
  196. marvell,function = "gpio";
  197. };
  198. };
  199. &i2c0 {
  200. status = "okay";
  201. eeprom@50 {
  202. compatible = "atmel,24c04";
  203. pagesize = <16>;
  204. reg = <0x50>;
  205. };
  206. };