armada-385-linksys-rango.dts 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. /*
  2. * Device Tree file for the Linksys WRT3200ACM (Rango)
  3. *
  4. * Copyright (C) 2016 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. /dts-v1/;
  40. #include <dt-bindings/gpio/gpio.h>
  41. #include <dt-bindings/input/input.h>
  42. #include "armada-385.dtsi"
  43. / {
  44. model = "Linksys WRT3200ACM";
  45. compatible = "linksys,rango", "linksys,armada385", "marvell,armada385",
  46. "marvell,armada380";
  47. chosen {
  48. stdout-path = "serial0:115200n8";
  49. };
  50. memory {
  51. device_type = "memory";
  52. reg = <0x00000000 0x20000000>; /* 512 MB */
  53. };
  54. soc {
  55. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  56. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  57. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  58. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
  59. MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
  60. internal-regs {
  61. spi@10600 {
  62. status = "disabled";
  63. };
  64. i2c@11000 {
  65. pinctrl-names = "default";
  66. pinctrl-0 = <&i2c0_pins>;
  67. status = "okay";
  68. tmp421@4c {
  69. compatible = "ti,tmp421";
  70. reg = <0x4c>;
  71. };
  72. pca9635@68 {
  73. #address-cells = <1>;
  74. #size-cells = <0>;
  75. compatible = "nxp,pca9635";
  76. reg = <0x68>;
  77. wan_amber@0 {
  78. label = "rango:amber:wan";
  79. reg = <0x0>;
  80. };
  81. wan_white@1 {
  82. label = "rango:white:wan";
  83. reg = <0x1>;
  84. };
  85. usb2@5 {
  86. label = "rango:white:usb2";
  87. reg = <0x5>;
  88. };
  89. usb3_1@6 {
  90. label = "rango:white:usb3_1";
  91. reg = <0x6>;
  92. };
  93. usb3_2@7 {
  94. label = "rango:white:usb3_2";
  95. reg = <0x7>;
  96. };
  97. wps_white@8 {
  98. label = "rango:white:wps";
  99. reg = <0x8>;
  100. };
  101. wps_amber@9 {
  102. label = "rango:amber:wps";
  103. reg = <0x9>;
  104. };
  105. };
  106. };
  107. /* J10: VCC, NC, RX, NC, TX, GND */
  108. serial@12000 {
  109. status = "okay";
  110. };
  111. ethernet@70000 {
  112. status = "okay";
  113. phy-mode = "rgmii-id";
  114. buffer-manager = <&bm>;
  115. bm,pool-long = <0>;
  116. bm,pool-short = <3>;
  117. fixed-link {
  118. speed = <1000>;
  119. full-duplex;
  120. };
  121. };
  122. ethernet@34000 {
  123. status = "okay";
  124. phy-mode = "sgmii";
  125. buffer-manager = <&bm>;
  126. bm,pool-long = <2>;
  127. bm,pool-short = <3>;
  128. fixed-link {
  129. speed = <1000>;
  130. full-duplex;
  131. };
  132. };
  133. mdio {
  134. status = "okay";
  135. };
  136. bm@c8000 {
  137. status = "okay";
  138. };
  139. sata@a8000 {
  140. status = "okay";
  141. };
  142. sdhci@d8000 {
  143. pinctrl-names = "default";
  144. pinctrl-0 = <&sdhci_pins>;
  145. no-1-8-v;
  146. broken-cd;
  147. wp-inverted;
  148. bus-width = <8>;
  149. status = "okay";
  150. };
  151. /* USB part of the eSATA/USB 2.0 port */
  152. usb@58000 {
  153. status = "okay";
  154. };
  155. usb3@f8000 {
  156. status = "okay";
  157. usb-phy = <&usb3_phy>;
  158. };
  159. flash@d0000 {
  160. status = "okay";
  161. num-cs = <1>;
  162. nand-ecc-strength = <4>;
  163. nand-ecc-step-size = <512>;
  164. marvell,nand-keep-config;
  165. marvell,nand-enable-arbiter;
  166. nand-on-flash-bbt;
  167. partition@0 {
  168. label = "u-boot";
  169. reg = <0x0000000 0x200000>; /* 2MB */
  170. read-only;
  171. };
  172. partition@200000 {
  173. label = "u_env";
  174. reg = <0x200000 0x20000>; /* 128KB */
  175. };
  176. partition@220000 {
  177. label = "s_env";
  178. reg = <0x220000 0x40000>; /* 256KB */
  179. };
  180. partition@7e0000 {
  181. label = "devinfo";
  182. reg = <0x7e0000 0x40000>; /* 256KB */
  183. read-only;
  184. };
  185. partition@820000 {
  186. label = "sysdiag";
  187. reg = <0x820000 0x1e0000>; /* 1920KB */
  188. read-only;
  189. };
  190. /* kernel1 overlaps with rootfs1 by design */
  191. partition@a00000 {
  192. label = "kernel1";
  193. reg = <0xa00000 0x5000000>; /* 80MB */
  194. };
  195. partition@1000000 {
  196. label = "rootfs1";
  197. reg = <0x1000000 0x4a00000>; /* 74MB */
  198. };
  199. /* kernel2 overlaps with rootfs2 by design */
  200. partition@5a00000 {
  201. label = "kernel2";
  202. reg = <0x5a00000 0x5000000>; /* 80MB */
  203. };
  204. partition@6000000 {
  205. label = "rootfs2";
  206. reg = <0x6000000 0x4a00000>; /* 74MB */
  207. };
  208. /*
  209. * 86MB, last MB is for the BBT, not writable
  210. */
  211. partition@aa00000 {
  212. label = "syscfg";
  213. reg = <0xaa00000 0x5600000>;
  214. };
  215. /*
  216. * Unused area between "s_env" and "devinfo".
  217. * Moved here because otherwise the renumbered
  218. * partitions would break the bootloader
  219. * supplied bootargs
  220. */
  221. partition@180000 {
  222. label = "unused_area";
  223. reg = <0x260000 0x5c0000>; /* 5.75MB */
  224. };
  225. };
  226. };
  227. bm-bppi {
  228. status = "okay";
  229. };
  230. pcie-controller {
  231. status = "okay";
  232. pcie@1,0 {
  233. /* Marvell 88W8964, 5GHz-only */
  234. status = "okay";
  235. mwlwifi {
  236. marvell,2ghz = <0>;
  237. marvell,chainmask = <4 4>;
  238. };
  239. };
  240. pcie@2,0 {
  241. /* Marvell 88W8964, 2GHz-only */
  242. status = "okay";
  243. mwlwifi {
  244. marvell,5ghz = <0>;
  245. marvell,chainmask = <4 4>;
  246. };
  247. };
  248. };
  249. };
  250. usb3_phy: usb3_phy {
  251. compatible = "usb-nop-xceiv";
  252. vcc-supply = <&reg_xhci0_vbus>;
  253. };
  254. reg_xhci0_vbus: xhci0-vbus {
  255. compatible = "regulator-fixed";
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&xhci0_vbus_pins>;
  258. regulator-name = "xhci0-vbus";
  259. regulator-min-microvolt = <5000000>;
  260. regulator-max-microvolt = <5000000>;
  261. enable-active-high;
  262. gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  263. };
  264. gpio_keys {
  265. compatible = "gpio-keys";
  266. #address-cells = <1>;
  267. #size-cells = <0>;
  268. pinctrl-0 = <&reset_key_pin &wps_key_pin>;
  269. pinctrl-names = "default";
  270. button@1 {
  271. label = "WPS";
  272. linux,code = <KEY_WPS_BUTTON>;
  273. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  274. };
  275. button@2 {
  276. label = "Factory Reset Button";
  277. linux,code = <KEY_RESTART>;
  278. gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
  279. };
  280. };
  281. gpio-leds {
  282. compatible = "gpio-leds";
  283. pinctrl-0 = <&power_led_pin &sata_led_pin &wlan_2g_led_pin &wlan_5g_led_pin>;
  284. pinctrl-names = "default";
  285. sata {
  286. label = "rango:white:sata";
  287. gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  288. };
  289. wlan_2g {
  290. label = "rango:white:wlan_2g";
  291. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  292. };
  293. wlan_5g {
  294. label = "rango:white:wlan_5g";
  295. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  296. };
  297. power {
  298. label = "rango:white:power";
  299. gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
  300. default-state = "on";
  301. };
  302. };
  303. dsa@0 {
  304. compatible = "marvell,dsa";
  305. #address-cells = <2>;
  306. #size-cells = <0>;
  307. dsa,ethernet = <&eth2>;
  308. dsa,mii-bus = <&mdio>;
  309. switch@0 {
  310. #address-cells = <1>;
  311. #size-cells = <0>;
  312. reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
  313. port@0 {
  314. reg = <0>;
  315. label = "lan4";
  316. };
  317. port@1 {
  318. reg = <1>;
  319. label = "lan3";
  320. };
  321. port@2 {
  322. reg = <2>;
  323. label = "lan2";
  324. };
  325. port@3 {
  326. reg = <3>;
  327. label = "lan1";
  328. };
  329. port@4 {
  330. reg = <4>;
  331. label = "wan";
  332. };
  333. port@5 {
  334. reg = <5>;
  335. label = "cpu";
  336. };
  337. };
  338. };
  339. mvsw61xx {
  340. #address-cells = <1>;
  341. #size-cells = <0>;
  342. compatible = "marvell,88e6352";
  343. status = "okay";
  344. reg = <0x10>;
  345. mii-bus = <&mdio>;
  346. cpu-port-0 = <5>;
  347. cpu-port-1 = <6>;
  348. };
  349. };
  350. &pinctrl {
  351. sata_led_pin: sata-led-pin {
  352. marvell,pins = "mpp21";
  353. marvell,function = "gpio";
  354. };
  355. wps_key_pin: wps-key-pin {
  356. marvell,pins = "mpp24";
  357. marvell,function = "gpio";
  358. };
  359. reset_key_pin: reset-key-pin {
  360. marvell,pins = "mpp29";
  361. marvell,function = "gpio";
  362. };
  363. wlan_2g_led_pin: wlan-2g-led-pin {
  364. marvell,pins = "mpp45";
  365. marvell,function = "gpio";
  366. };
  367. wlan_5g_led_pin: wlan-5g-led-pin {
  368. marvell,pins = "mpp46";
  369. marvell,function = "gpio";
  370. };
  371. xhci0_vbus_pins: xhci0-vbus-pins {
  372. marvell,pins = "mpp47";
  373. marvell,function = "gpio";
  374. };
  375. power_led_pin: power-led-pin {
  376. marvell,pins = "mpp56";
  377. marvell,function = "gpio";
  378. };
  379. };