armada-388-clearfog.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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 <dt-bindings/input/input.h>
  50. #include <dt-bindings/gpio/gpio.h>
  51. #include "armada-388.dtsi"
  52. / {
  53. model = "SolidRun Clearfog A1";
  54. compatible = "solidrun,clearfog-a1", "marvell,armada388",
  55. "marvell,armada385", "marvell,armada380";
  56. aliases {
  57. /* So that mvebu u-boot can update the MAC addresses */
  58. ethernet1 = &eth0;
  59. ethernet2 = &eth1;
  60. ethernet3 = &eth2;
  61. };
  62. chosen {
  63. stdout-path = "serial0:115200n8";
  64. };
  65. memory {
  66. device_type = "memory";
  67. reg = <0x00000000 0x10000000>; /* 256 MB */
  68. };
  69. reg_3p3v: regulator-3p3v {
  70. compatible = "regulator-fixed";
  71. regulator-name = "3P3V";
  72. regulator-min-microvolt = <3300000>;
  73. regulator-max-microvolt = <3300000>;
  74. regulator-always-on;
  75. };
  76. soc {
  77. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  78. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  79. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  80. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
  81. internal-regs {
  82. ethernet@30000 {
  83. mac-address = [00 50 43 02 02 02];
  84. phy-mode = "sgmii";
  85. status = "okay";
  86. fixed-link {
  87. speed = <1000>;
  88. full-duplex;
  89. };
  90. };
  91. ethernet@34000 {
  92. mac-address = [00 50 43 02 02 03];
  93. managed = "in-band-status";
  94. phy-mode = "sgmii";
  95. status = "okay";
  96. };
  97. ethernet@70000 {
  98. mac-address = [00 50 43 02 02 01];
  99. pinctrl-0 = <&ge0_rgmii_pins>;
  100. pinctrl-names = "default";
  101. phy = <&phy_dedicated>;
  102. phy-mode = "rgmii-id";
  103. status = "okay";
  104. };
  105. i2c@11000 {
  106. /* Is there anything on this? */
  107. clock-frequency = <100000>;
  108. pinctrl-0 = <&i2c0_pins>;
  109. pinctrl-names = "default";
  110. status = "okay";
  111. /*
  112. * PCA9655 GPIO expander, up to 1MHz clock.
  113. * 0-CON3 CLKREQ#
  114. * 1-CON3 PERST#
  115. * 2-CON2 PERST#
  116. * 3-CON3 W_DISABLE
  117. * 4-CON2 CLKREQ#
  118. * 5-USB3 overcurrent
  119. * 6-USB3 power
  120. * 7-CON2 W_DISABLE
  121. * 8-JP4 P1
  122. * 9-JP4 P4
  123. * 10-JP4 P5
  124. * 11-m.2 DEVSLP
  125. * 12-SFP_LOS
  126. * 13-SFP_TX_FAULT
  127. * 14-SFP_TX_DISABLE
  128. * 15-SFP_MOD_DEF0
  129. */
  130. expander0: gpio-expander@20 {
  131. /*
  132. * This is how it should be:
  133. * compatible = "onnn,pca9655",
  134. * "nxp,pca9555";
  135. * but you can't do this because of
  136. * the way I2C works.
  137. */
  138. compatible = "nxp,pca9555";
  139. gpio-controller;
  140. #gpio-cells = <2>;
  141. reg = <0x20>;
  142. pcie1_0_clkreq {
  143. gpio-hog;
  144. gpios = <0 GPIO_ACTIVE_LOW>;
  145. input;
  146. line-name = "pcie1.0-clkreq";
  147. };
  148. pcie1_0_w_disable {
  149. gpio-hog;
  150. gpios = <3 GPIO_ACTIVE_LOW>;
  151. output-low;
  152. line-name = "pcie1.0-w-disable";
  153. };
  154. pcie2_0_clkreq {
  155. gpio-hog;
  156. gpios = <4 GPIO_ACTIVE_LOW>;
  157. input;
  158. line-name = "pcie2.0-clkreq";
  159. };
  160. pcie2_0_w_disable {
  161. gpio-hog;
  162. gpios = <7 GPIO_ACTIVE_LOW>;
  163. output-low;
  164. line-name = "pcie2.0-w-disable";
  165. };
  166. usb3_ilimit {
  167. gpio-hog;
  168. gpios = <5 GPIO_ACTIVE_LOW>;
  169. input;
  170. line-name = "usb3-current-limit";
  171. };
  172. usb3_power {
  173. gpio-hog;
  174. gpios = <6 GPIO_ACTIVE_HIGH>;
  175. output-high;
  176. line-name = "usb3-power";
  177. };
  178. m2_devslp {
  179. gpio-hog;
  180. gpios = <11 GPIO_ACTIVE_HIGH>;
  181. output-low;
  182. line-name = "m.2 devslp";
  183. };
  184. };
  185. /* The MCP3021 is 100kHz clock only */
  186. mikrobus_adc: mcp3021@4c {
  187. compatible = "microchip,mcp3021";
  188. reg = <0x4c>;
  189. };
  190. /* Also something at 0x64 */
  191. };
  192. i2c@11100 {
  193. /*
  194. * Routed to SFP, mikrobus, and PCIe.
  195. * SFP limits this to 100kHz, and requires
  196. * an AT24C01A/02/04 with address pins tied
  197. * low, which takes addresses 0x50 and 0x51.
  198. * Mikrobus doesn't specify beyond an I2C
  199. * bus being present.
  200. * PCIe uses ARP to assign addresses, or
  201. * 0x63-0x64.
  202. */
  203. clock-frequency = <100000>;
  204. pinctrl-0 = <&clearfog_i2c1_pins>;
  205. pinctrl-names = "default";
  206. status = "okay";
  207. };
  208. mdio@72004 {
  209. pinctrl-0 = <&mdio_pins>;
  210. pinctrl-names = "default";
  211. phy_dedicated: ethernet-phy@0 {
  212. /*
  213. * Annoyingly, the marvell phy driver
  214. * configures the LED register, rather
  215. * than preserving reset-loaded setting.
  216. * We undo that rubbish here.
  217. */
  218. marvell,reg-init = <3 16 0 0x101e>;
  219. reg = <0>;
  220. };
  221. };
  222. pinctrl@18000 {
  223. clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
  224. marvell,pins = "mpp46";
  225. marvell,function = "ref";
  226. };
  227. clearfog_dsa0_pins: clearfog-dsa0-pins {
  228. marvell,pins = "mpp23", "mpp41";
  229. marvell,function = "gpio";
  230. };
  231. clearfog_i2c1_pins: i2c1-pins {
  232. /* SFP, PCIe, mSATA, mikrobus */
  233. marvell,pins = "mpp26", "mpp27";
  234. marvell,function = "i2c1";
  235. };
  236. clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins {
  237. marvell,pins = "mpp20";
  238. marvell,function = "gpio";
  239. };
  240. clearfog_sdhci_pins: clearfog-sdhci-pins {
  241. marvell,pins = "mpp21", "mpp28",
  242. "mpp37", "mpp38",
  243. "mpp39", "mpp40";
  244. marvell,function = "sd0";
  245. };
  246. clearfog_spi1_cs_pins: spi1-cs-pins {
  247. marvell,pins = "mpp55";
  248. marvell,function = "spi1";
  249. };
  250. mikro_pins: mikro-pins {
  251. /* int: mpp22 rst: mpp29 */
  252. marvell,pins = "mpp22", "mpp29";
  253. marvell,function = "gpio";
  254. };
  255. mikro_spi_pins: mikro-spi-pins {
  256. marvell,pins = "mpp43";
  257. marvell,function = "spi1";
  258. };
  259. mikro_uart_pins: mikro-uart-pins {
  260. marvell,pins = "mpp24", "mpp25";
  261. marvell,function = "ua1";
  262. };
  263. rear_button_pins: rear-button-pins {
  264. marvell,pins = "mpp34";
  265. marvell,function = "gpio";
  266. };
  267. };
  268. rtc@a3800 {
  269. /*
  270. * If the rtc doesn't work, run "date reset"
  271. * twice in u-boot.
  272. */
  273. status = "okay";
  274. };
  275. sata@a8000 {
  276. /* pinctrl? */
  277. status = "okay";
  278. };
  279. sata@e0000 {
  280. /* pinctrl? */
  281. status = "okay";
  282. };
  283. sdhci@d8000 {
  284. bus-width = <4>;
  285. cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
  286. no-1-8-v;
  287. pinctrl-0 = <&clearfog_sdhci_pins
  288. &clearfog_sdhci_cd_pins>;
  289. pinctrl-names = "default";
  290. status = "okay";
  291. vmmc = <&reg_3p3v>;
  292. wp-inverted;
  293. };
  294. serial@12000 {
  295. pinctrl-0 = <&uart0_pins>;
  296. pinctrl-names = "default";
  297. status = "okay";
  298. u-boot,dm-pre-reloc;
  299. };
  300. serial@12100 {
  301. /* mikrobus uart */
  302. pinctrl-0 = <&mikro_uart_pins>;
  303. pinctrl-names = "default";
  304. status = "okay";
  305. };
  306. spi@10680 {
  307. /*
  308. * We don't seem to have the W25Q32 on the
  309. * A1 Rev 2.0 boards, so disable SPI.
  310. * CS0: W25Q32 (doesn't appear to be present)
  311. * CS1:
  312. * CS2: mikrobus
  313. */
  314. pinctrl-0 = <&spi1_pins &clearfog_spi1_cs_pins &mikro_spi_pins>;
  315. pinctrl-names = "default";
  316. status = "okay";
  317. spi-flash@0 {
  318. #address-cells = <1>;
  319. #size-cells = <0>;
  320. compatible = "w25q32", "jedec,spi-nor";
  321. reg = <0>; /* Chip select 0 */
  322. spi-max-frequency = <3000000>;
  323. status = "disabled";
  324. };
  325. };
  326. usb3@f8000 {
  327. status = "okay";
  328. };
  329. };
  330. pcie-controller {
  331. status = "okay";
  332. /*
  333. * The two PCIe units are accessible through
  334. * the mini-PCIe connectors on the board.
  335. */
  336. pcie@2,0 {
  337. /* Port 1, Lane 0. CONN3, nearest power. */
  338. reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
  339. status = "okay";
  340. };
  341. pcie@3,0 {
  342. /* Port 2, Lane 0. CONN2, nearest CPU. */
  343. reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
  344. status = "okay";
  345. };
  346. };
  347. };
  348. sfp: sfp {
  349. compatible = "sff,sfp";
  350. i2c-bus = <&i2c1>;
  351. los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
  352. moddef0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
  353. sfp,ethernet = <&eth2>;
  354. tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
  355. tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
  356. };
  357. dsa@0 {
  358. compatible = "marvell,dsa";
  359. dsa,ethernet = <&eth1>;
  360. dsa,mii-bus = <&mdio>;
  361. pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
  362. pinctrl-names = "default";
  363. #address-cells = <2>;
  364. #size-cells = <0>;
  365. switch@0 {
  366. #address-cells = <1>;
  367. #size-cells = <0>;
  368. reg = <4 0>;
  369. port@0 {
  370. reg = <0>;
  371. label = "lan1";
  372. };
  373. port@1 {
  374. reg = <1>;
  375. label = "lan2";
  376. };
  377. port@2 {
  378. reg = <2>;
  379. label = "lan3";
  380. };
  381. port@3 {
  382. reg = <3>;
  383. label = "lan4";
  384. };
  385. port@4 {
  386. reg = <4>;
  387. label = "lan5";
  388. };
  389. port@5 {
  390. reg = <5>;
  391. label = "cpu";
  392. };
  393. port@6 {
  394. /* 88E1512 external phy */
  395. reg = <6>;
  396. label = "lan6";
  397. fixed-link {
  398. speed = <1000>;
  399. full-duplex;
  400. };
  401. };
  402. };
  403. };
  404. gpio-keys {
  405. compatible = "gpio-keys";
  406. pinctrl-0 = <&rear_button_pins>;
  407. pinctrl-names = "default";
  408. button_0 {
  409. /* The rear SW3 button */
  410. label = "Rear Button";
  411. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  412. linux,can-disable;
  413. linux,code = <BTN_0>;
  414. };
  415. };
  416. };
  417. /*
  418. +#define A38x_CUSTOMER_BOARD_1_MPP16_23 0x00400011
  419. MPP18: gpio ? (pca9655 int?)
  420. MPP19: gpio ? (clkreq?)
  421. MPP20: gpio ? (sd0 detect)
  422. MPP21: sd0:cmd x sd0
  423. MPP22: gpio x mikro int
  424. MPP23: gpio x switch irq
  425. +#define A38x_CUSTOMER_BOARD_1_MPP24_31 0x22043333
  426. MPP24: ua1:rxd x mikro rx
  427. MPP25: ua1:txd x mikro tx
  428. MPP26: i2c1:sck x mikro sck
  429. MPP27: i2c1:sda x mikro sda
  430. MPP28: sd0:clk x sd0
  431. MPP29: gpio x mikro rst
  432. MPP30: ge1:txd2 ? (config)
  433. MPP31: ge1:txd3 ? (config)
  434. +#define A38x_CUSTOMER_BOARD_1_MPP32_39 0x44400002
  435. MPP32: ge1:txctl ? (unused)
  436. MPP33: gpio ? (pic_com0)
  437. MPP34: gpio x rear button (pic_com1)
  438. MPP35: gpio ? (pic_com2)
  439. MPP36: gpio ? (unused)
  440. MPP37: sd0:d3 x sd0
  441. MPP38: sd0:d0 x sd0
  442. MPP39: sd0:d1 x sd0
  443. +#define A38x_CUSTOMER_BOARD_1_MPP40_47 0x41144004
  444. MPP40: sd0:d2 x sd0
  445. MPP41: gpio x switch reset
  446. MPP42: gpio ? sw1-1
  447. MPP43: spi1:cs2 x mikro cs
  448. MPP44: sata3:prsnt ? (unused)
  449. MPP45: ref:clk_out0 ?
  450. MPP46: ref:clk_out1 x switch clk
  451. MPP47: 4 ? (unused)
  452. +#define A38x_CUSTOMER_BOARD_1_MPP48_55 0x40333333
  453. MPP48: tdm:pclk
  454. MPP49: tdm:fsync
  455. MPP50: tdm:drx
  456. MPP51: tdm:dtx
  457. MPP52: tdm:int
  458. MPP53: tdm:rst
  459. MPP54: gpio ? (pwm)
  460. MPP55: spi1:cs1 x slic
  461. +#define A38x_CUSTOMER_BOARD_1_MPP56_63 0x00004444
  462. MPP56: spi1:mosi x mikro mosi
  463. MPP57: spi1:sck x mikro sck
  464. MPP58: spi1:miso x mikro miso
  465. MPP59: spi1:cs0 x w25q32
  466. */