armada-8040-clearfog-gt-8k.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2018 SolidRun ltd
  4. */
  5. #include "armada-8040.dtsi"
  6. / {
  7. model = "ClearFog-GT-8K";
  8. compatible = "solidrun,clearfog-gt-8k",
  9. "marvell,armada8040";
  10. chosen {
  11. stdout-path = "serial0:115200n8";
  12. };
  13. aliases {
  14. i2c0 = &cpm_i2c0;
  15. i2c1 = &cpm_i2c1;
  16. spi0 = &cps_spi1;
  17. };
  18. memory@00000000 {
  19. device_type = "memory";
  20. reg = <0x0 0x0 0x0 0x80000000>;
  21. };
  22. simple-bus {
  23. compatible = "simple-bus";
  24. reg_usb3h0_vbus: usb3-vbus0 {
  25. compatible = "regulator-fixed";
  26. pinctrl-names = "default";
  27. pinctrl-0 = <&cpm_xhci_vbus_pins>;
  28. regulator-name = "reg-usb3h0-vbus";
  29. regulator-min-microvolt = <5000000>;
  30. regulator-max-microvolt = <5000000>;
  31. startup-delay-us = <300000>;
  32. shutdown-delay-us = <500000>;
  33. regulator-force-boot-off;
  34. gpio = <&cpm_gpio1 15 GPIO_ACTIVE_LOW>; /* GPIO[47] */
  35. };
  36. };
  37. };
  38. &uart0 {
  39. status = "okay";
  40. };
  41. &ap_pinctl {
  42. /*
  43. * MPP Bus:
  44. * eMMC [0-10]
  45. * UART0 [11,19]
  46. */
  47. /* 0 1 2 3 4 5 6 7 8 9 */
  48. pin-func = < 1 1 1 1 1 1 1 1 1 1
  49. 1 3 0 0 0 0 0 0 0 3 >;
  50. };
  51. /* on-board eMMC */
  52. &ap_sdhci0 {
  53. pinctrl-names = "default";
  54. pinctrl-0 = <&ap_emmc_pins>;
  55. bus-width = <8>;
  56. status = "okay";
  57. };
  58. &cpm_pinctl {
  59. /*
  60. * MPP Bus:
  61. * [0-31] = 0xff: Keep default CP0_shared_pins:
  62. * [11] CLKOUT_MPP_11 (out)
  63. * [23] LINK_RD_IN_CP2CP (in)
  64. * [25] CLKOUT_MPP_25 (out)
  65. * [29] AVS_FB_IN_CP2CP (in)
  66. * [32, 33, 34] pci0/1/2 reset
  67. * [35-38] CP0 I2C1 and I2C0
  68. * [39] GPIO reset button
  69. * [40,41] LED0 and LED1
  70. * [43] 1512 phy reset
  71. * [47] USB VBUS EN (active low)
  72. * [48] FAN PWM
  73. * [49] SFP+ present signal
  74. * [50] TPM interrupt
  75. * [51] WLAN0 disable
  76. * [52] WLAN1 disable
  77. * [53] LTE disable
  78. * [54] NFC reset
  79. * [55] Micro SD card detect
  80. * [56-61] Micro SD
  81. */
  82. /* 0 1 2 3 4 5 6 7 8 9 */
  83. pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  84. 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  85. 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  86. 0xff 0 0 0 0 2 2 2 2 0
  87. 0 0 0 0 0 0 0 0 0 0
  88. 0 0 0 0 0 0 0xe 0xe 0xe 0xe
  89. 0xe 0xe 0 >;
  90. cpm_xhci_vbus_pins: cpm-xhci-vbus-pins {
  91. marvell,pins = < 47 >;
  92. marvell,function = <0>;
  93. };
  94. cps_1g_phy_reset: cps-1g-phy-reset {
  95. marvell,pins = < 43 >;
  96. marvell,function = <0>;
  97. };
  98. };
  99. /* uSD slot */
  100. &cpm_sdhci0 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&cpm_sdhci_pins>;
  103. bus-width = <4>;
  104. status = "okay";
  105. };
  106. &cpm_pcie0 {
  107. num-lanes = <1>;
  108. status = "okay";
  109. };
  110. &cpm_i2c0 {
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&cpm_i2c0_pins>;
  113. status = "okay";
  114. clock-frequency = <100000>;
  115. };
  116. &cpm_i2c1 {
  117. pinctrl-names = "default";
  118. pinctrl-0 = <&cpm_i2c1_pins>;
  119. status = "okay";
  120. clock-frequency = <100000>;
  121. };
  122. &cpm_sata0 {
  123. status = "okay";
  124. };
  125. &cpm_comphy {
  126. /*
  127. * CP0 Serdes Configuration:
  128. * Lane 0: PCIe0 (x1)
  129. * Lane 1: Not connected
  130. * Lane 2: SFI (10G)
  131. * Lane 3: Not connected
  132. * Lane 4: USB 3.0 host port1 (can be PCIe)
  133. * Lane 5: Not connected
  134. */
  135. phy0 {
  136. phy-type = <PHY_TYPE_PEX0>;
  137. };
  138. phy1 {
  139. phy-type = <PHY_TYPE_UNCONNECTED>;
  140. };
  141. phy2 {
  142. phy-type = <PHY_TYPE_SFI>;
  143. };
  144. phy3 {
  145. phy-type = <PHY_TYPE_UNCONNECTED>;
  146. };
  147. phy4 {
  148. phy-type = <PHY_TYPE_USB3_HOST1>;
  149. };
  150. phy5 {
  151. phy-type = <PHY_TYPE_UNCONNECTED>;
  152. };
  153. };
  154. &cpm_ethernet {
  155. pinctrl-names = "default";
  156. status = "okay";
  157. };
  158. /* 10G SFI SFP */
  159. &cpm_eth0 {
  160. status = "okay";
  161. phy-mode = "sfi";
  162. };
  163. &cps_sata0 {
  164. status = "okay";
  165. };
  166. &cps_usb3_0 {
  167. vbus-supply = <&reg_usb3h0_vbus>;
  168. status = "okay";
  169. };
  170. &cps_utmi0 {
  171. status = "okay";
  172. };
  173. &cps_pinctl {
  174. /*
  175. * MPP Bus:
  176. * [0-5] TDM
  177. * [6] VHV Enable
  178. * [7] CP1 SPI0 CSn1 (FXS)
  179. * [8] CP1 SPI0 CSn0 (TPM)
  180. * [9.11]CP1 SPI0 MOSI/MISO/CLK
  181. * [13] CP1 SPI1 MISO (TDM and SPI ROM shared)
  182. * [14] CP1 SPI1 CS0n (64Mb SPI ROM)
  183. * [15] CP1 SPI1 MOSI (TDM and SPI ROM shared)
  184. * [16] CP1 SPI1 CLK (TDM and SPI ROM shared)
  185. * [24] Topaz switch reset
  186. * [26] Buzzer
  187. * [27] CP1 SMI MDIO
  188. * [28] CP1 SMI MDC
  189. * [29] CP0 10G SFP TX Disable
  190. * [30] WPS button
  191. * [31] Front panel button
  192. * [32-62] = 0xff: Keep default CP1_shared_pins:
  193. */
  194. /* 0 1 2 3 4 5 6 7 8 9 */
  195. pin-func = < 0x4 0x4 0x4 0x4 0x4 0x4 0x0 0x4 0x4 0x4
  196. 0x4 0x4 0x0 0x3 0x3 0x3 0x3 0xff 0xff 0xff
  197. 0xff 0xff 0xff 0xff 0x0 0xff 0x0 0x8 0x8 0x0
  198. 0x0 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  199. 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  200. 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
  201. 0xff 0xff 0xff>;
  202. };
  203. &cps_spi1 {
  204. pinctrl-names = "default";
  205. pinctrl-0 = <&cps_spi1_pins>;
  206. status = "okay";
  207. spi-flash@0 {
  208. compatible = "jedec,spi-nor", "spi-flash";
  209. reg = <0>;
  210. spi-max-frequency = <10000000>;
  211. partitions {
  212. compatible = "fixed-partitions";
  213. #address-cells = <1>;
  214. #size-cells = <1>;
  215. partition@0 {
  216. label = "U-Boot";
  217. reg = <0 0x200000>;
  218. };
  219. partition@200000 {
  220. label = "Filesystem";
  221. reg = <0x200000 0xce0000>;
  222. };
  223. };
  224. };
  225. };
  226. &cps_comphy {
  227. /*
  228. * CP1 Serdes Configuration:
  229. * Lane 0: SATA 1 (RX swapped). Can be PCIe0
  230. * Lane 1: Not used
  231. * Lane 2: USB HOST 0
  232. * Lane 3: SGMII1 - Connected to 1512 port
  233. * Lane 4: Not used
  234. * Lane 5: SGMII2 - Connected to Topaz switch
  235. */
  236. phy0 {
  237. phy-type = <PHY_TYPE_SATA1>;
  238. phy-invert = <PHY_POLARITY_RXD_INVERT>;
  239. };
  240. phy1 {
  241. phy-type = <PHY_TYPE_UNCONNECTED>;
  242. };
  243. phy2 {
  244. phy-type = <PHY_TYPE_USB3_HOST0>;
  245. };
  246. phy3 {
  247. phy-type = <PHY_TYPE_SGMII1>;
  248. phy-speed = <PHY_SPEED_1_25G>;
  249. };
  250. phy4 {
  251. phy-type = <PHY_TYPE_UNCONNECTED>;
  252. };
  253. phy5 {
  254. phy-type = <PHY_TYPE_SGMII2>;
  255. phy-speed = <PHY_SPEED_3_125G>;
  256. };
  257. };
  258. &cps_mdio {
  259. phy0: ethernet-phy@0 {
  260. reg = <0>;
  261. };
  262. };
  263. &cps_ethernet {
  264. pinctrl-names = "default";
  265. pinctrl-0 = <&cps_1g_phy_reset>;
  266. status = "okay";
  267. };
  268. /* 1G SGMII */
  269. &cps_eth1 {
  270. status = "okay";
  271. phy-mode = "sgmii";
  272. phy = <&phy0>;
  273. phy-reset-gpios = <&cpm_gpio1 11 GPIO_ACTIVE_LOW>;
  274. };
  275. /* 2.5G to Topaz switch */
  276. &cps_eth2 {
  277. status = "okay";
  278. phy-mode = "sgmii";
  279. phy-speed = <2500>;
  280. phy-reset-gpios = <&cps_gpio0 24 GPIO_ACTIVE_LOW>;
  281. };