armada-388-clearfog.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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. status = "okay";
  76. fixed-link {
  77. speed = <1000>;
  78. full-duplex;
  79. };
  80. };
  81. ethernet@34000 {
  82. phy-mode = "sgmii";
  83. status = "okay";
  84. fixed-link {
  85. speed = <1000>;
  86. full-duplex;
  87. };
  88. };
  89. i2c@11000 {
  90. /* Is there anything on this? */
  91. clock-frequency = <100000>;
  92. pinctrl-0 = <&i2c0_pins>;
  93. pinctrl-names = "default";
  94. status = "okay";
  95. /*
  96. * PCA9655 GPIO expander, up to 1MHz clock.
  97. * 0-CON3 CLKREQ#
  98. * 1-CON3 PERST#
  99. * 2-CON2 PERST#
  100. * 3-CON3 W_DISABLE
  101. * 4-CON2 CLKREQ#
  102. * 5-USB3 overcurrent
  103. * 6-USB3 power
  104. * 7-CON2 W_DISABLE
  105. * 8-JP4 P1
  106. * 9-JP4 P4
  107. * 10-JP4 P5
  108. * 11-m.2 DEVSLP
  109. * 12-SFP_LOS
  110. * 13-SFP_TX_FAULT
  111. * 14-SFP_TX_DISABLE
  112. * 15-SFP_MOD_DEF0
  113. */
  114. expander0: gpio-expander@20 {
  115. /*
  116. * This is how it should be:
  117. * compatible = "onnn,pca9655",
  118. * "nxp,pca9555";
  119. * but you can't do this because of
  120. * the way I2C works.
  121. */
  122. compatible = "nxp,pca9555";
  123. gpio-controller;
  124. #gpio-cells = <2>;
  125. reg = <0x20>;
  126. pcie1_0_clkreq {
  127. gpio-hog;
  128. gpios = <0 GPIO_ACTIVE_LOW>;
  129. input;
  130. line-name = "pcie1.0-clkreq";
  131. };
  132. pcie1_0_w_disable {
  133. gpio-hog;
  134. gpios = <3 GPIO_ACTIVE_LOW>;
  135. output-low;
  136. line-name = "pcie1.0-w-disable";
  137. };
  138. pcie2_0_clkreq {
  139. gpio-hog;
  140. gpios = <4 GPIO_ACTIVE_LOW>;
  141. input;
  142. line-name = "pcie2.0-clkreq";
  143. };
  144. pcie2_0_w_disable {
  145. gpio-hog;
  146. gpios = <7 GPIO_ACTIVE_LOW>;
  147. output-low;
  148. line-name = "pcie2.0-w-disable";
  149. };
  150. usb3_ilimit {
  151. gpio-hog;
  152. gpios = <5 GPIO_ACTIVE_LOW>;
  153. input;
  154. line-name = "usb3-current-limit";
  155. };
  156. usb3_power {
  157. gpio-hog;
  158. gpios = <6 GPIO_ACTIVE_HIGH>;
  159. output-high;
  160. line-name = "usb3-power";
  161. };
  162. m2_devslp {
  163. gpio-hog;
  164. gpios = <11 GPIO_ACTIVE_HIGH>;
  165. output-low;
  166. line-name = "m.2 devslp";
  167. };
  168. sfp_los {
  169. /* SFP loss of signal */
  170. gpio-hog;
  171. gpios = <12 GPIO_ACTIVE_HIGH>;
  172. input;
  173. line-name = "sfp-los";
  174. };
  175. sfp_tx_fault {
  176. /* SFP laser fault */
  177. gpio-hog;
  178. gpios = <13 GPIO_ACTIVE_HIGH>;
  179. input;
  180. line-name = "sfp-tx-fault";
  181. };
  182. sfp_tx_disable {
  183. /* SFP transmit disable */
  184. gpio-hog;
  185. gpios = <14 GPIO_ACTIVE_HIGH>;
  186. output-low;
  187. line-name = "sfp-tx-disable";
  188. };
  189. sfp_mod_def0 {
  190. /* SFP module present */
  191. gpio-hog;
  192. gpios = <15 GPIO_ACTIVE_LOW>;
  193. input;
  194. line-name = "sfp-mod-def0";
  195. };
  196. };
  197. /* The MCP3021 is 100kHz clock only */
  198. mikrobus_adc: mcp3021@4c {
  199. compatible = "microchip,mcp3021";
  200. reg = <0x4c>;
  201. };
  202. /* Also something at 0x64 */
  203. };
  204. i2c@11100 {
  205. /*
  206. * Routed to SFP, mikrobus, and PCIe.
  207. * SFP limits this to 100kHz, and requires
  208. * an AT24C01A/02/04 with address pins tied
  209. * low, which takes addresses 0x50 and 0x51.
  210. * Mikrobus doesn't specify beyond an I2C
  211. * bus being present.
  212. * PCIe uses ARP to assign addresses, or
  213. * 0x63-0x64.
  214. */
  215. clock-frequency = <100000>;
  216. pinctrl-0 = <&clearfog_i2c1_pins>;
  217. pinctrl-names = "default";
  218. status = "okay";
  219. };
  220. mdio@72004 {
  221. pinctrl-0 = <&mdio_pins>;
  222. pinctrl-names = "default";
  223. phy_dedicated: ethernet-phy@0 {
  224. /*
  225. * Annoyingly, the marvell phy driver
  226. * configures the LED register, rather
  227. * than preserving reset-loaded setting.
  228. * We undo that rubbish here.
  229. */
  230. marvell,reg-init = <3 16 0 0x101e>;
  231. reg = <0>;
  232. };
  233. };
  234. pinctrl@18000 {
  235. clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
  236. marvell,pins = "mpp46";
  237. marvell,function = "ref";
  238. };
  239. clearfog_dsa0_pins: clearfog-dsa0-pins {
  240. marvell,pins = "mpp23", "mpp41";
  241. marvell,function = "gpio";
  242. };
  243. clearfog_i2c1_pins: i2c1-pins {
  244. /* SFP, PCIe, mSATA, mikrobus */
  245. marvell,pins = "mpp26", "mpp27";
  246. marvell,function = "i2c1";
  247. };
  248. clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins {
  249. marvell,pins = "mpp20";
  250. marvell,function = "gpio";
  251. };
  252. clearfog_sdhci_pins: clearfog-sdhci-pins {
  253. marvell,pins = "mpp21", "mpp28",
  254. "mpp37", "mpp38",
  255. "mpp39", "mpp40";
  256. marvell,function = "sd0";
  257. };
  258. clearfog_spi1_cs_pins: spi1-cs-pins {
  259. marvell,pins = "mpp55";
  260. marvell,function = "spi1";
  261. };
  262. mikro_pins: mikro-pins {
  263. /* int: mpp22 rst: mpp29 */
  264. marvell,pins = "mpp22", "mpp29";
  265. marvell,function = "gpio";
  266. };
  267. mikro_spi_pins: mikro-spi-pins {
  268. marvell,pins = "mpp43";
  269. marvell,function = "spi1";
  270. };
  271. mikro_uart_pins: mikro-uart-pins {
  272. marvell,pins = "mpp24", "mpp25";
  273. marvell,function = "ua1";
  274. };
  275. rear_button_pins: rear-button-pins {
  276. marvell,pins = "mpp34";
  277. marvell,function = "gpio";
  278. };
  279. };
  280. sata@a8000 {
  281. /* pinctrl? */
  282. status = "okay";
  283. };
  284. sata@e0000 {
  285. /* pinctrl? */
  286. status = "okay";
  287. };
  288. sdhci@d8000 {
  289. bus-width = <4>;
  290. cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
  291. no-1-8-v;
  292. pinctrl-0 = <&clearfog_sdhci_pins
  293. &clearfog_sdhci_cd_pins>;
  294. pinctrl-names = "default";
  295. status = "okay";
  296. vmmc = <&reg_3p3v>;
  297. wp-inverted;
  298. };
  299. serial@12100 {
  300. /* mikrobus uart */
  301. pinctrl-0 = <&mikro_uart_pins>;
  302. pinctrl-names = "default";
  303. status = "okay";
  304. };
  305. spi@10680 {
  306. /*
  307. * We don't seem to have the W25Q32 on the
  308. * A1 Rev 2.0 boards, so disable SPI.
  309. * CS0: W25Q32 (doesn't appear to be present)
  310. * CS1:
  311. * CS2: mikrobus
  312. */
  313. pinctrl-0 = <&spi1_pins
  314. &clearfog_spi1_cs_pins
  315. &mikro_spi_pins>;
  316. pinctrl-names = "default";
  317. status = "okay";
  318. spi-flash@0 {
  319. #address-cells = <1>;
  320. #size-cells = <0>;
  321. compatible = "w25q32", "jedec,spi-nor";
  322. reg = <0>; /* Chip select 0 */
  323. spi-max-frequency = <3000000>;
  324. status = "disabled";
  325. };
  326. };
  327. usb@58000 {
  328. /* CON3, nearest power. */
  329. status = "okay";
  330. };
  331. usb3@f0000 {
  332. /* CON2, nearest CPU, USB2 only. */
  333. status = "okay";
  334. };
  335. usb3@f8000 {
  336. /* CON7 */
  337. status = "okay";
  338. };
  339. };
  340. pcie-controller {
  341. status = "okay";
  342. /*
  343. * The two PCIe units are accessible through
  344. * the mini-PCIe connectors on the board.
  345. */
  346. pcie@2,0 {
  347. /* Port 1, Lane 0. CON3, nearest power. */
  348. reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
  349. status = "okay";
  350. };
  351. pcie@3,0 {
  352. /* Port 2, Lane 0. CON2, nearest CPU. */
  353. reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
  354. status = "okay";
  355. };
  356. };
  357. };
  358. dsa@0 {
  359. compatible = "marvell,dsa";
  360. dsa,ethernet = <&eth1>;
  361. dsa,mii-bus = <&mdio>;
  362. pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
  363. pinctrl-names = "default";
  364. #address-cells = <2>;
  365. #size-cells = <0>;
  366. switch@0 {
  367. #address-cells = <1>;
  368. #size-cells = <0>;
  369. reg = <4 0>;
  370. port@0 {
  371. reg = <0>;
  372. label = "lan1";
  373. };
  374. port@1 {
  375. reg = <1>;
  376. label = "lan2";
  377. };
  378. port@2 {
  379. reg = <2>;
  380. label = "lan3";
  381. };
  382. port@3 {
  383. reg = <3>;
  384. label = "lan4";
  385. };
  386. port@4 {
  387. reg = <4>;
  388. label = "lan5";
  389. };
  390. port@5 {
  391. reg = <5>;
  392. label = "cpu";
  393. };
  394. port@6 {
  395. /* 88E1512 external phy */
  396. reg = <6>;
  397. label = "lan6";
  398. fixed-link {
  399. speed = <1000>;
  400. full-duplex;
  401. };
  402. };
  403. };
  404. };
  405. gpio-keys {
  406. compatible = "gpio-keys";
  407. pinctrl-0 = <&rear_button_pins>;
  408. pinctrl-names = "default";
  409. button_0 {
  410. /* The rear SW3 button */
  411. label = "Rear Button";
  412. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  413. linux,can-disable;
  414. linux,code = <BTN_0>;
  415. };
  416. };
  417. };