orion5x-lswsgl.dts 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. /*
  2. * Copyright (C) 2015 Benjamin Cama <[email protected]>
  3. * Copyright (C) 2014 Thomas Petazzoni <[email protected]>
  4. * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
  5. * Copyright (C) 2008 Alexey Kopytko <[email protected]>
  6. *
  7. * This file is dual-licensed: you can use it either under the terms
  8. * of the GPL or the X11 license, at your option. Note that this dual
  9. * licensing only applies to this file, and not this project as a
  10. * whole.
  11. *
  12. * a) This file is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This file is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * Or, alternatively,
  23. *
  24. * b) Permission is hereby granted, free of charge, to any person
  25. * obtaining a copy of this software and associated documentation
  26. * files (the "Software"), to deal in the Software without
  27. * restriction, including without limitation the rights to use,
  28. * copy, modify, merge, publish, distribute, sublicense, and/or
  29. * sell copies of the Software, and to permit persons to whom the
  30. * Software is furnished to do so, subject to the following
  31. * conditions:
  32. *
  33. * The above copyright notice and this permission notice shall be
  34. * included in all copies or substantial portions of the Software.
  35. *
  36. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  38. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  39. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  40. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  41. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  42. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  43. * OTHER DEALINGS IN THE SOFTWARE.
  44. */
  45. /dts-v1/;
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/input/input.h>
  48. #include <dt-bindings/interrupt-controller/irq.h>
  49. #include "orion5x-mv88f5182.dtsi"
  50. / {
  51. model = "Buffalo Linkstation Mini (LS-WSGL)";
  52. compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
  53. memory {
  54. device_type = "memory";
  55. reg = <0x00000000 0x8000000>; /* 128 MB */
  56. };
  57. chosen {
  58. bootargs = "console=ttyS0,115200 earlyprintk";
  59. stdout-path = &uart0;
  60. };
  61. soc {
  62. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
  63. <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
  64. <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
  65. };
  66. gpio-keys {
  67. compatible = "gpio-keys";
  68. pinctrl-0 = <&pmx_buttons>;
  69. pinctrl-names = "default";
  70. #address-cells = <1>;
  71. #size-cells = <0>;
  72. func {
  73. label = "Function Button";
  74. linux,code = <KEY_OPTION>;
  75. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  76. };
  77. power {
  78. label = "Power-on Switch";
  79. linux,input-type = <5>; /* EV_SW */
  80. linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
  81. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  82. };
  83. autopower {
  84. label = "Power-auto Switch";
  85. linux,input-type = <5>; /* EV_SW */
  86. linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
  87. gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
  88. };
  89. };
  90. gpio-leds {
  91. compatible = "gpio-leds";
  92. pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
  93. &pmx_led_power>;
  94. pinctrl-names = "default";
  95. alarm {
  96. label = "lswsgl:alarm:red";
  97. gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
  98. };
  99. info {
  100. label = "lswsgl:info:amber";
  101. gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
  102. };
  103. func {
  104. label = "lswsgl:func:blue:top";
  105. gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
  106. };
  107. power {
  108. label = "lswsgl:power:blue:bottom";
  109. gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
  110. default-state = "on";
  111. };
  112. };
  113. restart_poweroff {
  114. compatible = "restart-poweroff";
  115. };
  116. regulators {
  117. compatible = "simple-bus";
  118. #address-cells = <1>;
  119. #size-cells = <0>;
  120. pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
  121. pinctrl-names = "default";
  122. sata0_power: regulator@0 {
  123. compatible = "regulator-fixed";
  124. reg = <0>;
  125. regulator-name = "SATA0 Power";
  126. regulator-min-microvolt = <5000000>;
  127. regulator-max-microvolt = <5000000>;
  128. enable-active-high;
  129. regulator-always-on;
  130. regulator-boot-on;
  131. gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
  132. };
  133. sata1_power: regulator@1 {
  134. compatible = "regulator-fixed";
  135. reg = <1>;
  136. regulator-name = "SATA1 Power";
  137. regulator-min-microvolt = <5000000>;
  138. regulator-max-microvolt = <5000000>;
  139. enable-active-high;
  140. regulator-always-on;
  141. regulator-boot-on;
  142. gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
  143. };
  144. usb_power: regulator@2 {
  145. compatible = "regulator-fixed";
  146. reg = <2>;
  147. regulator-name = "USB Power";
  148. regulator-min-microvolt = <5000000>;
  149. regulator-max-microvolt = <5000000>;
  150. enable-active-high;
  151. regulator-always-on;
  152. regulator-boot-on;
  153. gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
  154. };
  155. };
  156. };
  157. &devbus_bootcs {
  158. status = "okay";
  159. devbus,keep-config;
  160. flash@0 {
  161. compatible = "cfi-flash";
  162. reg = <0 0x40000>;
  163. bank-width = <1>;
  164. #address-cells = <1>;
  165. #size-cells = <1>;
  166. partition@0 {
  167. label = "Full256Kb";
  168. reg = <0 0x40000>;
  169. read-only;
  170. };
  171. };
  172. };
  173. &mdio {
  174. status = "okay";
  175. ethphy: ethernet-phy {
  176. reg = <8>;
  177. };
  178. };
  179. &ehci0 {
  180. status = "okay";
  181. };
  182. &eth {
  183. status = "okay";
  184. ethernet-port@0 {
  185. phy-handle = <&ethphy>;
  186. };
  187. };
  188. &i2c {
  189. status = "okay";
  190. clock-frequency = <100000>;
  191. #address-cells = <1>;
  192. rtc@32 {
  193. compatible = "ricoh,rs5c372a";
  194. reg = <0x32>;
  195. };
  196. };
  197. &pinctrl {
  198. pmx_buttons: pmx-buttons {
  199. marvell,pins = "mpp15", "mpp17", "mpp18";
  200. marvell,function = "gpio";
  201. };
  202. pmx_led_alarm: pmx-leds {
  203. marvell,pins = "mpp2";
  204. marvell,function = "gpio";
  205. };
  206. pmx_led_info: pmx-leds {
  207. marvell,pins = "mpp3";
  208. marvell,function = "gpio";
  209. };
  210. pmx_led_func: pmx-leds {
  211. marvell,pins = "mpp9";
  212. marvell,function = "gpio";
  213. };
  214. pmx_led_power: pmx-leds {
  215. marvell,pins = "mpp14";
  216. marvell,function = "gpio";
  217. };
  218. pmx_sata0_power: pmx-sata0-power {
  219. marvell,pins = "mpp1";
  220. marvell,function = "gpio";
  221. };
  222. pmx_sata1_power: pmx-sata1-power {
  223. marvell,pins = "mpp19";
  224. marvell,function = "gpio";
  225. };
  226. pmx_usb_power: pmx-usb-power {
  227. marvell,pins = "mpp16";
  228. marvell,function = "gpio";
  229. };
  230. };
  231. &sata {
  232. status = "okay";
  233. nr-ports = <2>;
  234. };
  235. &uart0 {
  236. status = "okay";
  237. };