armada-xp-linksys-mamba.dts 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. /*
  2. * Device Tree file for the Linksys WRT1900AC (Mamba).
  3. *
  4. * Note: this board is shipped with a new generation boot loader that
  5. * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
  6. * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
  7. * used.
  8. *
  9. * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
  10. *
  11. * Based on armada-xp-axpwifiap.dts:
  12. *
  13. * Copyright (C) 2013 Marvell
  14. *
  15. * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  16. *
  17. * This file is dual-licensed: you can use it either under the terms
  18. * of the GPL or the X11 license, at your option. Note that this dual
  19. * licensing only applies to this file, and not this project as a
  20. * whole.
  21. *
  22. * a) This file is licensed under the terms of the GNU General Public
  23. * License version 2. This program is licensed "as is" without
  24. * any warranty of any kind, whether express or implied.
  25. *
  26. * Or, alternatively,
  27. *
  28. * b) Permission is hereby granted, free of charge, to any person
  29. * obtaining a copy of this software and associated documentation
  30. * files (the "Software"), to deal in the Software without
  31. * restriction, including without limitation the rights to use,
  32. * copy, modify, merge, publish, distribute, sublicense, and/or
  33. * sell copies of the Software, and to permit persons to whom the
  34. * Software is furnished to do so, subject to the following
  35. * conditions:
  36. *
  37. * The above copyright notice and this permission notice shall be
  38. * included in all copies or substantial portions of the Software.
  39. *
  40. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  41. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  42. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  43. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  44. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  45. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  46. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  47. * OTHER DEALINGS IN THE SOFTWARE.
  48. */
  49. /dts-v1/;
  50. #include <dt-bindings/gpio/gpio.h>
  51. #include <dt-bindings/input/input.h>
  52. #include "armada-xp-mv78230.dtsi"
  53. / {
  54. model = "Linksys WRT1900AC";
  55. compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
  56. "marvell,armadaxp", "marvell,armada-370-xp";
  57. chosen {
  58. bootargs = "console=ttyS0,115200";
  59. stdout-path = &uart0;
  60. };
  61. memory {
  62. device_type = "memory";
  63. reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
  64. };
  65. soc {
  66. ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
  67. MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
  68. MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
  69. MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
  70. pcie-controller {
  71. status = "okay";
  72. /* Etron EJ168 USB 3.0 controller */
  73. pcie@1,0 {
  74. /* Port 0, Lane 0 */
  75. status = "okay";
  76. };
  77. /* First mini-PCIe port */
  78. pcie@2,0 {
  79. /* Port 0, Lane 1 */
  80. status = "okay";
  81. };
  82. /* Second mini-PCIe port */
  83. pcie@3,0 {
  84. /* Port 0, Lane 3 */
  85. status = "okay";
  86. };
  87. };
  88. internal-regs {
  89. rtc@10300 {
  90. /* No crystal connected to the internal RTC */
  91. status = "disabled";
  92. };
  93. /* J10: VCC, NC, RX, NC, TX, GND */
  94. serial@12000 {
  95. status = "okay";
  96. };
  97. sata@a0000 {
  98. nr-ports = <1>;
  99. status = "okay";
  100. };
  101. ethernet@70000 {
  102. pinctrl-0 = <&ge0_rgmii_pins>;
  103. pinctrl-names = "default";
  104. status = "okay";
  105. phy-mode = "rgmii-id";
  106. fixed-link {
  107. speed = <1000>;
  108. full-duplex;
  109. };
  110. };
  111. ethernet@74000 {
  112. pinctrl-0 = <&ge1_rgmii_pins>;
  113. pinctrl-names = "default";
  114. status = "okay";
  115. phy-mode = "rgmii-id";
  116. fixed-link {
  117. speed = <1000>;
  118. full-duplex;
  119. };
  120. };
  121. /* USB part of the eSATA/USB 2.0 port */
  122. usb@50000 {
  123. status = "okay";
  124. };
  125. i2c@11000 {
  126. status = "okay";
  127. clock-frequency = <100000>;
  128. tmp421@4c {
  129. compatible = "ti,tmp421";
  130. reg = <0x4c>;
  131. };
  132. tlc59116@68 {
  133. #address-cells = <1>;
  134. #size-cells = <0>;
  135. #gpio-cells = <2>;
  136. compatible = "ti,tlc59116";
  137. reg = <0x68>;
  138. wan_amber@0 {
  139. label = "mamba:amber:wan";
  140. reg = <0x0>;
  141. };
  142. wan_white@1 {
  143. label = "mamba:white:wan";
  144. reg = <0x1>;
  145. };
  146. wlan_2g@2 {
  147. label = "mamba:white:wlan_2g";
  148. reg = <0x2>;
  149. };
  150. wlan_5g@3 {
  151. label = "mamba:white:wlan_5g";
  152. reg = <0x3>;
  153. };
  154. esata@4 {
  155. label = "mamba:white:esata";
  156. reg = <0x4>;
  157. };
  158. usb2@5 {
  159. label = "mamba:white:usb2";
  160. reg = <0x5>;
  161. };
  162. usb3_1@6 {
  163. label = "mamba:white:usb3_1";
  164. reg = <0x6>;
  165. };
  166. usb3_2@7 {
  167. label = "mamba:white:usb3_2";
  168. reg = <0x7>;
  169. };
  170. wps_white@8 {
  171. label = "mamba:white:wps";
  172. reg = <0x8>;
  173. };
  174. wps_amber@9 {
  175. label = "mamba:amber:wps";
  176. reg = <0x9>;
  177. };
  178. };
  179. };
  180. nand@d0000 {
  181. status = "okay";
  182. num-cs = <1>;
  183. marvell,nand-keep-config;
  184. marvell,nand-enable-arbiter;
  185. nand-on-flash-bbt;
  186. nand-ecc-strength = <4>;
  187. nand-ecc-step-size = <512>;
  188. partition@0 {
  189. label = "u-boot";
  190. reg = <0x0000000 0x100000>; /* 1MB */
  191. read-only;
  192. };
  193. partition@100000 {
  194. label = "u_env";
  195. reg = <0x100000 0x40000>; /* 256KB */
  196. };
  197. partition@140000 {
  198. label = "s_env";
  199. reg = <0x140000 0x40000>; /* 256KB */
  200. };
  201. partition@900000 {
  202. label = "devinfo";
  203. reg = <0x900000 0x100000>; /* 1MB */
  204. read-only;
  205. };
  206. /* kernel1 overlaps with rootfs1 by design */
  207. partition@a00000 {
  208. label = "kernel1";
  209. reg = <0xa00000 0x2800000>; /* 40MB */
  210. };
  211. partition@d00000 {
  212. label = "rootfs1";
  213. reg = <0xd00000 0x2500000>; /* 37MB */
  214. };
  215. /* kernel2 overlaps with rootfs2 by design */
  216. partition@3200000 {
  217. label = "kernel2";
  218. reg = <0x3200000 0x2800000>; /* 40MB */
  219. };
  220. partition@3500000 {
  221. label = "rootfs2";
  222. reg = <0x3500000 0x2500000>; /* 37MB */
  223. };
  224. /*
  225. * 38MB, last MB is for the BBT, not writable
  226. */
  227. partition@5a00000 {
  228. label = "syscfg";
  229. reg = <0x5a00000 0x2600000>;
  230. };
  231. /*
  232. * Unused area between "s_env" and "devinfo".
  233. * Moved here because otherwise the renumbered
  234. * partitions would break the bootloader
  235. * supplied bootargs
  236. */
  237. partition@180000 {
  238. label = "unused_area";
  239. reg = <0x180000 0x780000>; /* 7.5MB */
  240. };
  241. };
  242. };
  243. };
  244. gpio_keys {
  245. compatible = "gpio-keys";
  246. #address-cells = <1>;
  247. #size-cells = <0>;
  248. pinctrl-0 = <&keys_pin>;
  249. pinctrl-names = "default";
  250. button@1 {
  251. label = "WPS";
  252. linux,code = <KEY_WPS_BUTTON>;
  253. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  254. };
  255. button@2 {
  256. label = "Factory Reset Button";
  257. linux,code = <KEY_RESTART>;
  258. gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  259. };
  260. };
  261. gpio-leds {
  262. compatible = "gpio-leds";
  263. pinctrl-0 = <&power_led_pin>;
  264. pinctrl-names = "default";
  265. power {
  266. label = "mamba:white:power";
  267. gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
  268. default-state = "on";
  269. };
  270. };
  271. gpio_fan {
  272. /* SUNON HA4010V4-0000-C99 */
  273. compatible = "gpio-fan";
  274. gpios = <&gpio0 24 0>;
  275. gpio-fan,speed-map = <0 0
  276. 4500 1>;
  277. };
  278. dsa@0 {
  279. compatible = "marvell,dsa";
  280. #address-cells = <2>;
  281. #size-cells = <0>;
  282. dsa,ethernet = <&eth0>;
  283. dsa,mii-bus = <&mdio>;
  284. switch@0 {
  285. #address-cells = <1>;
  286. #size-cells = <0>;
  287. reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
  288. port@0 {
  289. reg = <0>;
  290. label = "lan4";
  291. };
  292. port@1 {
  293. reg = <1>;
  294. label = "lan3";
  295. };
  296. port@2 {
  297. reg = <2>;
  298. label = "lan2";
  299. };
  300. port@3 {
  301. reg = <3>;
  302. label = "lan1";
  303. };
  304. port@4 {
  305. reg = <4>;
  306. label = "internet";
  307. };
  308. port@5 {
  309. reg = <5>;
  310. label = "cpu";
  311. };
  312. };
  313. };
  314. };
  315. &pinctrl {
  316. keys_pin: keys-pin {
  317. marvell,pins = "mpp32", "mpp33";
  318. marvell,function = "gpio";
  319. };
  320. power_led_pin: power-led-pin {
  321. marvell,pins = "mpp40";
  322. marvell,function = "gpio";
  323. };
  324. gpio_fan_pin: gpio-fan-pin {
  325. marvell,pins = "mpp24";
  326. marvell,function = "gpio";
  327. };
  328. };
  329. &spi0 {
  330. status = "okay";
  331. spi-flash@0 {
  332. #address-cells = <1>;
  333. #size-cells = <1>;
  334. compatible = "everspin,mr25h256";
  335. reg = <0>; /* Chip select 0 */
  336. spi-max-frequency = <40000000>;
  337. };
  338. };