orion5x-lacie-d2-network.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /*
  2. * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
  4. *
  5. * This file is licensed under the terms of the GNU General Public
  6. * License version 2. This program is licensed "as is" without any
  7. * warranty of any kind, whether express or implied.
  8. */
  9. /dts-v1/;
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/input/input.h>
  12. #include <dt-bindings/interrupt-controller/irq.h>
  13. #include "orion5x-mv88f5182.dtsi"
  14. / {
  15. model = "LaCie d2 Network";
  16. compatible = "lacie,d2-network", "marvell,orion5x-88f5182", "marvell,orion5x";
  17. memory {
  18. reg = <0x00000000 0x4000000>; /* 64 MB */
  19. };
  20. chosen {
  21. bootargs = "console=ttyS0,115200n8 earlyprintk";
  22. linux,stdout-path = &uart0;
  23. };
  24. soc {
  25. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
  26. <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
  27. <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>;
  28. };
  29. gpio-keys {
  30. compatible = "gpio-keys";
  31. pinctrl-0 = <&pmx_buttons>;
  32. pinctrl-names = "default";
  33. #address-cells = <1>;
  34. #size-cells = <0>;
  35. front_button {
  36. label = "Front Push Button";
  37. linux,code = <KEY_POWER>;
  38. gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
  39. };
  40. power_rocker_sw_on {
  41. label = "Power rocker switch (on|auto)";
  42. linux,input-type = <5>; /* EV_SW */
  43. linux,code = <1>; /* D2NET_SWITCH_POWER_ON */
  44. gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  45. };
  46. power_rocker_sw_off {
  47. label = "Power rocker switch (auto|off)";
  48. linux,input-type = <5>; /* EV_SW */
  49. linux,code = <2>; /* D2NET_SWITCH_POWER_OFF */
  50. gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  51. };
  52. };
  53. regulators {
  54. compatible = "simple-bus";
  55. #address-cells = <1>;
  56. #size-cells = <0>;
  57. pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power>;
  58. pinctrl-names = "default";
  59. sata0_power: regulator@0 {
  60. compatible = "regulator-fixed";
  61. reg = <0>;
  62. regulator-name = "SATA0 Power";
  63. regulator-min-microvolt = <5000000>;
  64. regulator-max-microvolt = <5000000>;
  65. enable-active-high;
  66. regulator-always-on;
  67. regulator-boot-on;
  68. gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
  69. };
  70. sata1_power: regulator@1 {
  71. compatible = "regulator-fixed";
  72. reg = <1>;
  73. regulator-name = "SATA1 Power";
  74. regulator-min-microvolt = <5000000>;
  75. regulator-max-microvolt = <5000000>;
  76. enable-active-high;
  77. regulator-always-on;
  78. regulator-boot-on;
  79. gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  80. };
  81. };
  82. };
  83. &devbus_bootcs {
  84. status = "okay";
  85. devbus,keep-config;
  86. /*
  87. * Currently the MTD code does not recognize the MX29LV400CBCT
  88. * as a bottom-type device. This could cause risks of
  89. * accidentally erasing critical flash sectors. We thus define
  90. * a single, write-protected partition covering the whole
  91. * flash. TODO: once the flash part TOP/BOTTOM detection
  92. * issue is sorted out in the MTD code, break this into at
  93. * least three partitions: 'u-boot code', 'u-boot environment'
  94. * and 'whatever is left'.
  95. */
  96. flash@0 {
  97. compatible = "cfi-flash";
  98. reg = <0 0x80000>;
  99. bank-width = <1>;
  100. #address-cells = <1>;
  101. #size-cells = <1>;
  102. partition@0 {
  103. label = "Full512Kb";
  104. reg = <0 0x80000>;
  105. read-only;
  106. };
  107. };
  108. };
  109. &mdio {
  110. status = "okay";
  111. ethphy: ethernet-phy {
  112. reg = <8>;
  113. };
  114. };
  115. &ehci0 {
  116. status = "okay";
  117. };
  118. &eth {
  119. status = "okay";
  120. ethernet-port@0 {
  121. phy-handle = <&ethphy>;
  122. };
  123. };
  124. &i2c {
  125. status = "okay";
  126. clock-frequency = <100000>;
  127. #address-cells = <1>;
  128. rtc@32 {
  129. compatible = "ricoh,rs5c372b";
  130. reg = <0x32>;
  131. };
  132. fan@3e {
  133. compatible = "gmt,g762";
  134. reg = <0x3e>;
  135. /* Not enough HW info */
  136. status = "disabled";
  137. };
  138. eeprom@50 {
  139. compatible = "atmel,24c08";
  140. reg = <0x50>;
  141. };
  142. };
  143. &pinctrl {
  144. pinctrl-0 = <&pmx_leds &pmx_board_id &pmx_fan_fail>;
  145. pinctrl-names = "default";
  146. pmx_board_id: pmx-board-id {
  147. marvell,pins = "mpp0", "mpp1", "mpp2";
  148. marvell,function = "gpio";
  149. };
  150. pmx_buttons: pmx-buttons {
  151. marvell,pins = "mpp8", "mpp9", "mpp18";
  152. marvell,function = "gpio";
  153. };
  154. pmx_fan_fail: pmx-fan-fail {
  155. marvell,pins = "mpp5";
  156. marvell,function = "gpio";
  157. };
  158. /*
  159. * MPP6: Red front LED
  160. * MPP16: Blue front LED blink control
  161. */
  162. pmx_leds: pmx-leds {
  163. marvell,pins = "mpp6", "mpp16";
  164. marvell,function = "gpio";
  165. };
  166. pmx_sata0_led_active: pmx-sata0-led-active {
  167. marvell,pins = "mpp14";
  168. marvell,function = "sata0";
  169. };
  170. pmx_sata0_power: pmx-sata0-power {
  171. marvell,pins = "mpp3";
  172. marvell,function = "gpio";
  173. };
  174. pmx_sata1_led_active: pmx-sata1-led-active {
  175. marvell,pins = "mpp15";
  176. marvell,function = "sata1";
  177. };
  178. pmx_sata1_power: pmx-sata1-power {
  179. marvell,pins = "mpp12";
  180. marvell,function = "gpio";
  181. };
  182. /*
  183. * Non MPP GPIOs:
  184. * GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
  185. * GPIO 23: Blue front LED off
  186. * GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
  187. */
  188. };
  189. &sata {
  190. pinctrl-0 = <&pmx_sata0_led_active
  191. &pmx_sata1_led_active>;
  192. pinctrl-names = "default";
  193. status = "okay";
  194. nr-ports = <2>;
  195. };
  196. &uart0 {
  197. status = "okay";
  198. };