armada-388-clearfog.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. /*
  2. * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828)
  3. *
  4. * Copyright (C) 2015 Russell King
  5. *
  6. * This board is in development; the contents of this file work with
  7. * the A1 rev 2.0 of the board, which does not represent final
  8. * production board. Things will change, don't expect this file to
  9. * remain compatible info the future.
  10. *
  11. * This file is dual-licensed: you can use it either under the terms
  12. * of the GPL or the X11 license, at your option. Note that this dual
  13. * licensing only applies to this file, and not this project as a
  14. * whole.
  15. *
  16. * a) This file is free software; you can redistribute it and/or
  17. * modify it under the terms of the GNU General Public License
  18. * version 2 as published by the Free Software Foundation.
  19. *
  20. * This file is distributed in the hope that it will be useful
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * Or, alternatively
  26. *
  27. * b) Permission is hereby granted, free of charge, to any person
  28. * obtaining a copy of this software and associated documentation
  29. * files (the "Software"), to deal in the Software without
  30. * restriction, including without limitation the rights to use
  31. * copy, modify, merge, publish, distribute, sublicense, and/or
  32. * sell copies of the Software, and to permit persons to whom the
  33. * Software is furnished to do so, subject to the following
  34. * conditions:
  35. *
  36. * The above copyright notice and this permission notice shall be
  37. * included in all copies or substantial portions of the Software.
  38. *
  39. * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
  40. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  41. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  42. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  43. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
  44. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  45. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  46. * OTHER DEALINGS IN THE SOFTWARE.
  47. */
  48. /dts-v1/;
  49. #include "armada-388.dtsi"
  50. #include "armada-38x-solidrun-microsom.dtsi"
  51. / {
  52. model = "SolidRun Clearfog A1";
  53. compatible = "solidrun,clearfog-a1", "marvell,armada388",
  54. "marvell,armada385", "marvell,armada380";
  55. aliases {
  56. /* So that mvebu u-boot can update the MAC addresses */
  57. ethernet1 = &eth0;
  58. ethernet2 = &eth1;
  59. ethernet3 = &eth2;
  60. };
  61. chosen {
  62. stdout-path = "serial0:115200n8";
  63. };
  64. reg_3p3v: regulator-3p3v {
  65. compatible = "regulator-fixed";
  66. regulator-name = "3P3V";
  67. regulator-min-microvolt = <3300000>;
  68. regulator-max-microvolt = <3300000>;
  69. regulator-always-on;
  70. };
  71. soc {
  72. internal-regs {
  73. ethernet@30000 {
  74. phy-mode = "sgmii";
  75. buffer-manager = <&bm>;
  76. bm,pool-long = <2>;
  77. bm,pool-short = <1>;
  78. status = "okay";
  79. fixed-link {
  80. speed = <1000>;
  81. full-duplex;
  82. };
  83. };
  84. ethernet@34000 {
  85. phy-mode = "sgmii";
  86. buffer-manager = <&bm>;
  87. bm,pool-long = <3>;
  88. bm,pool-short = <1>;
  89. status = "okay";
  90. fixed-link {
  91. speed = <1000>;
  92. full-duplex;
  93. };
  94. };
  95. i2c@11000 {
  96. /* Is there anything on this? */
  97. clock-frequency = <100000>;
  98. pinctrl-0 = <&i2c0_pins>;
  99. pinctrl-names = "default";
  100. status = "okay";
  101. /*
  102. * PCA9655 GPIO expander, up to 1MHz clock.
  103. * 0-CON3 CLKREQ#
  104. * 1-CON3 PERST#
  105. * 2-CON2 PERST#
  106. * 3-CON3 W_DISABLE
  107. * 4-CON2 CLKREQ#
  108. * 5-USB3 overcurrent
  109. * 6-USB3 power
  110. * 7-CON2 W_DISABLE
  111. * 8-JP4 P1
  112. * 9-JP4 P4
  113. * 10-JP4 P5
  114. * 11-m.2 DEVSLP
  115. * 12-SFP_LOS
  116. * 13-SFP_TX_FAULT
  117. * 14-SFP_TX_DISABLE
  118. * 15-SFP_MOD_DEF0
  119. */
  120. expander0: gpio-expander@20 {
  121. /*
  122. * This is how it should be:
  123. * compatible = "onnn,pca9655",
  124. * "nxp,pca9555";
  125. * but you can't do this because of
  126. * the way I2C works.
  127. */
  128. compatible = "nxp,pca9555";
  129. gpio-controller;
  130. #gpio-cells = <2>;
  131. reg = <0x20>;
  132. pcie1_0_clkreq {
  133. gpio-hog;
  134. gpios = <0 GPIO_ACTIVE_LOW>;
  135. input;
  136. line-name = "pcie1.0-clkreq";
  137. };
  138. pcie1_0_w_disable {
  139. gpio-hog;
  140. gpios = <3 GPIO_ACTIVE_LOW>;
  141. output-low;
  142. line-name = "pcie1.0-w-disable";
  143. };
  144. pcie2_0_clkreq {
  145. gpio-hog;
  146. gpios = <4 GPIO_ACTIVE_LOW>;
  147. input;
  148. line-name = "pcie2.0-clkreq";
  149. };
  150. pcie2_0_w_disable {
  151. gpio-hog;
  152. gpios = <7 GPIO_ACTIVE_LOW>;
  153. output-low;
  154. line-name = "pcie2.0-w-disable";
  155. };
  156. usb3_ilimit {
  157. gpio-hog;
  158. gpios = <5 GPIO_ACTIVE_LOW>;
  159. input;
  160. line-name = "usb3-current-limit";
  161. };
  162. usb3_power {
  163. gpio-hog;
  164. gpios = <6 GPIO_ACTIVE_HIGH>;
  165. output-high;
  166. line-name = "usb3-power";
  167. };
  168. m2_devslp {
  169. gpio-hog;
  170. gpios = <11 GPIO_ACTIVE_HIGH>;
  171. output-low;
  172. line-name = "m.2 devslp";
  173. };
  174. sfp_los {
  175. /* SFP loss of signal */
  176. gpio-hog;
  177. gpios = <12 GPIO_ACTIVE_HIGH>;
  178. input;
  179. line-name = "sfp-los";
  180. };
  181. sfp_tx_fault {
  182. /* SFP laser fault */
  183. gpio-hog;
  184. gpios = <13 GPIO_ACTIVE_HIGH>;
  185. input;
  186. line-name = "sfp-tx-fault";
  187. };
  188. sfp_tx_disable {
  189. /* SFP transmit disable */
  190. gpio-hog;
  191. gpios = <14 GPIO_ACTIVE_HIGH>;
  192. output-low;
  193. line-name = "sfp-tx-disable";
  194. };
  195. sfp_mod_def0 {
  196. /* SFP module present */
  197. gpio-hog;
  198. gpios = <15 GPIO_ACTIVE_LOW>;
  199. input;
  200. line-name = "sfp-mod-def0";
  201. };
  202. };
  203. /* The MCP3021 is 100kHz clock only */
  204. mikrobus_adc: mcp3021@4c {
  205. compatible = "microchip,mcp3021";
  206. reg = <0x4c>;
  207. };
  208. /* Also something at 0x64 */
  209. };
  210. i2c@11100 {
  211. /*
  212. * Routed to SFP, mikrobus, and PCIe.
  213. * SFP limits this to 100kHz, and requires
  214. * an AT24C01A/02/04 with address pins tied
  215. * low, which takes addresses 0x50 and 0x51.
  216. * Mikrobus doesn't specify beyond an I2C
  217. * bus being present.
  218. * PCIe uses ARP to assign addresses, or
  219. * 0x63-0x64.
  220. */
  221. clock-frequency = <100000>;
  222. pinctrl-0 = <&clearfog_i2c1_pins>;
  223. pinctrl-names = "default";
  224. status = "okay";
  225. };
  226. pinctrl@18000 {
  227. clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
  228. marvell,pins = "mpp46";
  229. marvell,function = "ref";
  230. };
  231. clearfog_dsa0_pins: clearfog-dsa0-pins {
  232. marvell,pins = "mpp23", "mpp41";
  233. marvell,function = "gpio";
  234. };
  235. clearfog_i2c1_pins: i2c1-pins {
  236. /* SFP, PCIe, mSATA, mikrobus */
  237. marvell,pins = "mpp26", "mpp27";
  238. marvell,function = "i2c1";
  239. };
  240. clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins {
  241. marvell,pins = "mpp20";
  242. marvell,function = "gpio";
  243. };
  244. clearfog_sdhci_pins: clearfog-sdhci-pins {
  245. marvell,pins = "mpp21", "mpp28",
  246. "mpp37", "mpp38",
  247. "mpp39", "mpp40";
  248. marvell,function = "sd0";
  249. };
  250. clearfog_spi1_cs_pins: spi1-cs-pins {
  251. marvell,pins = "mpp55";
  252. marvell,function = "spi1";
  253. };
  254. mikro_pins: mikro-pins {
  255. /* int: mpp22 rst: mpp29 */
  256. marvell,pins = "mpp22", "mpp29";
  257. marvell,function = "gpio";
  258. };
  259. mikro_spi_pins: mikro-spi-pins {
  260. marvell,pins = "mpp43";
  261. marvell,function = "spi1";
  262. };
  263. mikro_uart_pins: mikro-uart-pins {
  264. marvell,pins = "mpp24", "mpp25";
  265. marvell,function = "ua1";
  266. };
  267. rear_button_pins: rear-button-pins {
  268. marvell,pins = "mpp34";
  269. marvell,function = "gpio";
  270. };
  271. };
  272. sata@a8000 {
  273. /* pinctrl? */
  274. status = "okay";
  275. };
  276. sata@e0000 {
  277. /* pinctrl? */
  278. status = "okay";
  279. };
  280. sdhci@d8000 {
  281. bus-width = <4>;
  282. cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
  283. no-1-8-v;
  284. pinctrl-0 = <&clearfog_sdhci_pins
  285. &clearfog_sdhci_cd_pins>;
  286. pinctrl-names = "default";
  287. status = "okay";
  288. vmmc = <&reg_3p3v>;
  289. wp-inverted;
  290. };
  291. serial@12100 {
  292. /* mikrobus uart */
  293. pinctrl-0 = <&mikro_uart_pins>;
  294. pinctrl-names = "default";
  295. status = "okay";
  296. };
  297. usb@58000 {
  298. /* CON3, nearest power. */
  299. status = "okay";
  300. };
  301. usb3@f0000 {
  302. /* CON2, nearest CPU, USB2 only. */
  303. status = "okay";
  304. };
  305. usb3@f8000 {
  306. /* CON7 */
  307. status = "okay";
  308. };
  309. };
  310. pcie-controller {
  311. status = "okay";
  312. /*
  313. * The two PCIe units are accessible through
  314. * the mini-PCIe connectors on the board.
  315. */
  316. pcie@2,0 {
  317. /* Port 1, Lane 0. CON3, nearest power. */
  318. reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
  319. status = "okay";
  320. };
  321. pcie@3,0 {
  322. /* Port 2, Lane 0. CON2, nearest CPU. */
  323. reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
  324. status = "okay";
  325. };
  326. };
  327. };
  328. dsa@0 {
  329. compatible = "marvell,dsa";
  330. dsa,ethernet = <&eth1>;
  331. dsa,mii-bus = <&mdio>;
  332. pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
  333. pinctrl-names = "default";
  334. #address-cells = <2>;
  335. #size-cells = <0>;
  336. switch@0 {
  337. #address-cells = <1>;
  338. #size-cells = <0>;
  339. reg = <4 0>;
  340. port@0 {
  341. reg = <0>;
  342. label = "lan5";
  343. };
  344. port@1 {
  345. reg = <1>;
  346. label = "lan4";
  347. };
  348. port@2 {
  349. reg = <2>;
  350. label = "lan3";
  351. };
  352. port@3 {
  353. reg = <3>;
  354. label = "lan2";
  355. };
  356. port@4 {
  357. reg = <4>;
  358. label = "lan1";
  359. };
  360. port@5 {
  361. reg = <5>;
  362. label = "cpu";
  363. };
  364. port@6 {
  365. /* 88E1512 external phy */
  366. reg = <6>;
  367. label = "lan6";
  368. fixed-link {
  369. speed = <1000>;
  370. full-duplex;
  371. };
  372. };
  373. };
  374. };
  375. gpio-keys {
  376. compatible = "gpio-keys";
  377. pinctrl-0 = <&rear_button_pins>;
  378. pinctrl-names = "default";
  379. button_0 {
  380. /* The rear SW3 button */
  381. label = "Rear Button";
  382. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  383. linux,can-disable;
  384. linux,code = <BTN_0>;
  385. };
  386. };
  387. };
  388. &spi1 {
  389. /*
  390. * We don't seem to have the W25Q32 on the
  391. * A1 Rev 2.0 boards, so disable SPI.
  392. * CS0: W25Q32 (doesn't appear to be present)
  393. * CS1:
  394. * CS2: mikrobus
  395. */
  396. pinctrl-0 = <&spi1_pins
  397. &clearfog_spi1_cs_pins
  398. &mikro_spi_pins>;
  399. pinctrl-names = "default";
  400. status = "okay";
  401. spi-flash@0 {
  402. #address-cells = <1>;
  403. #size-cells = <0>;
  404. compatible = "w25q32", "jedec,spi-nor";
  405. reg = <0>; /* Chip select 0 */
  406. spi-max-frequency = <3000000>;
  407. status = "disabled";
  408. };
  409. };