armada-385-linksys.dtsi 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /*
  2. * Device Tree include file for Armada 385 based Linksys boards
  3. *
  4. * Copyright (C) 2015 Imre Kaloz <kaloz@openwrt.org>
  5. *
  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 licensed under the terms of the GNU General Public
  13. * License version 2. This program is licensed "as is" without
  14. * any warranty of any kind, whether express or implied.
  15. *
  16. * Or, alternatively,
  17. *
  18. * b) Permission is hereby granted, free of charge, to any person
  19. * obtaining a copy of this software and associated documentation
  20. * files (the "Software"), to deal in the Software without
  21. * restriction, including without limitation the rights to use,
  22. * copy, modify, merge, publish, distribute, sublicense, and/or
  23. * sell copies of the Software, and to permit persons to whom the
  24. * Software is furnished to do so, subject to the following
  25. * conditions:
  26. *
  27. * The above copyright notice and this permission notice shall be
  28. * included in all copies or substantial portions of the Software.
  29. *
  30. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  31. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  32. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  33. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  34. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  35. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  36. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  37. * OTHER DEALINGS IN THE SOFTWARE.
  38. */
  39. #include <dt-bindings/gpio/gpio.h>
  40. #include <dt-bindings/input/input.h>
  41. #include "armada-385.dtsi"
  42. / {
  43. model = "Linksys boards based on Armada 385";
  44. compatible = "linksys,armada385", "marvell,armada385",
  45. "marvell,armada380";
  46. chosen {
  47. stdout-path = "serial0:115200n8";
  48. };
  49. memory {
  50. device_type = "memory";
  51. reg = <0x00000000 0x20000000>; /* 512 MB */
  52. };
  53. soc {
  54. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  55. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  56. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  57. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
  58. internal-regs {
  59. i2c@11000 {
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&i2c0_pins>;
  62. status = "okay";
  63. tmp421@4c {
  64. compatible = "ti,tmp421";
  65. reg = <0x4c>;
  66. };
  67. pca9635@68 {
  68. #address-cells = <1>;
  69. #size-cells = <0>;
  70. compatible = "nxp,pca9635";
  71. reg = <0x68>;
  72. };
  73. };
  74. /* J10: VCC, NC, RX, NC, TX, GND */
  75. serial@12000 {
  76. status = "okay";
  77. };
  78. ethernet@70000 {
  79. status = "okay";
  80. phy-mode = "rgmii-id";
  81. fixed-link {
  82. speed = <1000>;
  83. full-duplex;
  84. };
  85. };
  86. ethernet@34000 {
  87. status = "okay";
  88. phy-mode = "sgmii";
  89. fixed-link {
  90. speed = <1000>;
  91. full-duplex;
  92. };
  93. };
  94. mdio {
  95. status = "okay";
  96. };
  97. sata@a8000 {
  98. status = "okay";
  99. };
  100. /* USB part of the eSATA/USB 2.0 port */
  101. usb@58000 {
  102. status = "okay";
  103. };
  104. usb3@f8000 {
  105. status = "okay";
  106. usb-phy = <&usb3_phy>;
  107. };
  108. flash@d0000 {
  109. status = "okay";
  110. num-cs = <1>;
  111. marvell,nand-keep-config;
  112. marvell,nand-enable-arbiter;
  113. nand-on-flash-bbt;
  114. partition@0 {
  115. label = "u-boot";
  116. reg = <0x0000000 0x200000>; /* 2MB */
  117. read-only;
  118. };
  119. partition@100000 {
  120. label = "u_env";
  121. reg = <0x200000 0x40000>; /* 256KB */
  122. };
  123. partition@140000 {
  124. label = "s_env";
  125. reg = <0x240000 0x40000>; /* 256KB */
  126. };
  127. partition@900000 {
  128. label = "devinfo";
  129. reg = <0x900000 0x100000>; /* 1MB */
  130. read-only;
  131. };
  132. /* kernel1 overlaps with rootfs1 by design */
  133. partition@a00000 {
  134. label = "kernel1";
  135. reg = <0xa00000 0x2800000>; /* 40MB */
  136. };
  137. partition@1000000 {
  138. label = "rootfs1";
  139. reg = <0x1000000 0x2200000>; /* 34MB */
  140. };
  141. /* kernel2 overlaps with rootfs2 by design */
  142. partition@3200000 {
  143. label = "kernel2";
  144. reg = <0x3200000 0x2800000>; /* 40MB */
  145. };
  146. partition@3800000 {
  147. label = "rootfs2";
  148. reg = <0x3800000 0x2200000>; /* 34MB */
  149. };
  150. /*
  151. * 38MB, last MB is for the BBT, not writable
  152. */
  153. partition@5a00000 {
  154. label = "syscfg";
  155. reg = <0x5a00000 0x2600000>;
  156. };
  157. /*
  158. * Unused area between "s_env" and "devinfo".
  159. * Moved here because otherwise the renumbered
  160. * partitions would break the bootloader
  161. * supplied bootargs
  162. */
  163. partition@180000 {
  164. label = "unused_area";
  165. reg = <0x280000 0x680000>; /* 6.5MB */
  166. };
  167. };
  168. };
  169. pcie-controller {
  170. status = "okay";
  171. pcie@1,0 {
  172. /* Marvell 88W8864, 5GHz-only */
  173. status = "okay";
  174. };
  175. pcie@2,0 {
  176. /* Marvell 88W8864, 2GHz-only */
  177. status = "okay";
  178. };
  179. };
  180. };
  181. usb3_phy: usb3_phy {
  182. compatible = "usb-nop-xceiv";
  183. vcc-supply = <&reg_xhci0_vbus>;
  184. };
  185. reg_xhci0_vbus: xhci0-vbus {
  186. compatible = "regulator-fixed";
  187. pinctrl-names = "default";
  188. pinctrl-0 = <&xhci0_vbus_pins>;
  189. regulator-name = "xhci0-vbus";
  190. regulator-min-microvolt = <5000000>;
  191. regulator-max-microvolt = <5000000>;
  192. enable-active-high;
  193. gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
  194. };
  195. gpio_keys {
  196. compatible = "gpio-keys";
  197. #address-cells = <1>;
  198. #size-cells = <0>;
  199. pinctrl-0 = <&keys_pin>;
  200. pinctrl-names = "default";
  201. button@1 {
  202. label = "WPS";
  203. linux,code = <KEY_WPS_BUTTON>;
  204. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  205. };
  206. button@2 {
  207. label = "Factory Reset Button";
  208. linux,code = <KEY_RESTART>;
  209. gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
  210. };
  211. };
  212. gpio-leds {
  213. compatible = "gpio-leds";
  214. pinctrl-0 = <&power_led_pin &sata_led_pin>;
  215. pinctrl-names = "default";
  216. power {
  217. gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  218. default-state = "on";
  219. };
  220. sata {
  221. gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
  222. default-state = "off";
  223. };
  224. };
  225. dsa@0 {
  226. compatible = "marvell,dsa";
  227. #address-cells = <2>;
  228. #size-cells = <0>;
  229. dsa,ethernet = <&eth2>;
  230. dsa,mii-bus = <&mdio>;
  231. switch@0 {
  232. #address-cells = <1>;
  233. #size-cells = <0>;
  234. reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
  235. port@0 {
  236. reg = <0>;
  237. label = "lan4";
  238. };
  239. port@1 {
  240. reg = <1>;
  241. label = "lan3";
  242. };
  243. port@2 {
  244. reg = <2>;
  245. label = "lan2";
  246. };
  247. port@3 {
  248. reg = <3>;
  249. label = "lan1";
  250. };
  251. port@4 {
  252. reg = <4>;
  253. label = "wan";
  254. };
  255. port@5 {
  256. reg = <5>;
  257. label = "cpu";
  258. };
  259. };
  260. };
  261. };
  262. &pinctrl {
  263. keys_pin: keys-pin {
  264. marvell,pins = "mpp24", "mpp29";
  265. marvell,function = "gpio";
  266. };
  267. power_led_pin: power-led-pin {
  268. marvell,pins = "mpp55";
  269. marvell,function = "gpio";
  270. };
  271. sata_led_pin: sata-led-pin {
  272. marvell,pins = "mpp54";
  273. marvell,function = "gpio";
  274. };
  275. xhci0_vbus_pins: xhci0-vbus-pins {
  276. marvell,pins = "mpp50";
  277. marvell,function = "gpio";
  278. };
  279. };
  280. &spi0 {
  281. status = "disabled";
  282. };