kirkwood-netxbig.dtsi 4.5 KB

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