armada-385-clearfog-gtr.dtsi 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /*
  3. * Device Tree file for Clearfog GTR machines rev 1.0 (88F6825)
  4. *
  5. * Rabeeh Khoury <[email protected]>, based on Russell King clearfog work
  6. */
  7. /*
  8. SERDES mapping -
  9. 0. SATA1 on CON18, or optionally mini PCIe CON3 - PCIe0
  10. 1. 6141 switch (2.5Gbps capable)
  11. 2. SATA0 on CON17, or optionally mini PCIe CON4 - PCIe1
  12. 3. USB 3.0 Host
  13. 4. mini PCIe CON2 - PCIe2
  14. 5. SFP connector, or optionally SGMII Ethernet 1512 PHY
  15. USB 2.0 mapping -
  16. 0. USB 2.0 - 0 USB pins header CON12
  17. 1. USB 2.0 - 1 mini PCIe CON2
  18. 2. USB 2.0 - 2 to USB 3.0 connector (used with SERDES #3)
  19. Pin mapping -
  20. 0,1 - console UART
  21. 2,3 - I2C0 - connected to I2C EEPROM, two temperature sensors,
  22. front panel and PSE controller
  23. 4,5 - MDC/MDIO
  24. 6..17 - RGMII
  25. 18 - Topaz switch reset (active low)
  26. 19 - 1512 phy reset
  27. 20 - 1512 phy reset (eth2, optional)
  28. 21,28,37,38,39,40 - SD0
  29. 22 - USB 3.0 current limiter enable (active high)
  30. 24 - SFP TX fault (input active high)
  31. 25 - SFP present (input active low)
  32. 26,27 - I2C1 - connected to SFP
  33. 29 - Fan PWM
  34. 30 - CON4 mini PCIe wifi disable
  35. 31 - CON3 mini PCIe wifi disable
  36. 32 - Fuse programming power toggle (1.8v)
  37. 33 - CON4 mini PCIe reset
  38. 34 - CON2 mini PCIe wifi disable
  39. 35 - CON3 mini PCIe reset
  40. 36 - Rear button (GPIO active low)
  41. 41 - CON1 front panel connector
  42. 42 - Front LED1, or front panel CON1
  43. 43 - Micron L-PBGA 24 ball SPI (1Gb) CS, or TPM SPI CS
  44. 44 - CON2 mini PCIe reset
  45. 45 - TPM PIRQ signal, or front panel CON1
  46. 46 - SFP TX disable
  47. 47 - Control isolation of boot sensitive SAR signals
  48. 48 - PSE reset
  49. 49 - PSE OSS signal
  50. 50 - PSE interrupt
  51. 52 - Front LED2, or front panel
  52. 53 - Front button
  53. 54 - SFP LOS (input active high)
  54. 55 - Fan sense
  55. 56(mosi),57(clk),58(miso) - SPI interface - 32Mb SPI, 1Gb SPI and TPM
  56. 59 - SPI 32Mb W25Q32BVZPIG CS0 chip select (bootable)
  57. */
  58. /dts-v1/;
  59. #include <dt-bindings/input/input.h>
  60. #include <dt-bindings/gpio/gpio.h>
  61. #include <dt-bindings/leds/common.h>
  62. #include "armada-385.dtsi"
  63. / {
  64. compatible = "marvell,armada385", "marvell,armada380";
  65. aliases {
  66. /* So that mvebu u-boot can update the MAC addresses */
  67. ethernet1 = &eth0;
  68. ethernet2 = &eth1;
  69. ethernet3 = &eth2;
  70. i2c0 = &i2c0;
  71. i2c1 = &i2c1;
  72. };
  73. chosen {
  74. stdout-path = "serial0:115200n8";
  75. };
  76. memory {
  77. device_type = "memory";
  78. reg = <0x00000000 0x10000000>; /* 256 MB */
  79. };
  80. reg_3p3v: regulator-3p3v {
  81. compatible = "regulator-fixed";
  82. regulator-name = "3P3V";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. regulator-always-on;
  86. };
  87. reg_5p0v: regulator-5p0v {
  88. compatible = "regulator-fixed";
  89. regulator-name = "5P0V";
  90. regulator-min-microvolt = <5000000>;
  91. regulator-max-microvolt = <5000000>;
  92. regulator-always-on;
  93. };
  94. v_usb3_con: regulator-v-usb3-con {
  95. compatible = "regulator-fixed";
  96. gpio = <&gpio0 22 GPIO_ACTIVE_LOW>;
  97. pinctrl-names = "default";
  98. pinctrl-0 = <&cf_gtr_usb3_con_vbus>;
  99. regulator-max-microvolt = <5000000>;
  100. regulator-min-microvolt = <5000000>;
  101. regulator-name = "v_usb3_con";
  102. vin-supply = <&reg_5p0v>;
  103. regulator-boot-on;
  104. regulator-always-on;
  105. };
  106. soc {
  107. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  108. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  109. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  110. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
  111. MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
  112. internal-regs {
  113. rtc@a3800 {
  114. status = "okay";
  115. };
  116. i2c@11000 { /* ROM, temp sensor and front panel */
  117. pinctrl-0 = <&i2c0_pins>;
  118. pinctrl-names = "default";
  119. status = "okay";
  120. };
  121. i2c@11100 { /* SFP (CON5/CON6) */
  122. pinctrl-0 = <&cf_gtr_i2c1_pins>;
  123. pinctrl-names = "default";
  124. status = "okay";
  125. };
  126. pinctrl@18000 {
  127. cf_gtr_switch_reset_pins: cf-gtr-switch-reset-pins {
  128. marvell,pins = "mpp18";
  129. marvell,function = "gpio";
  130. };
  131. cf_gtr_usb3_con_vbus: cf-gtr-usb3-con-vbus {
  132. marvell,pins = "mpp22";
  133. marvell,function = "gpio";
  134. };
  135. cf_gtr_fan_pwm: cf-gtr-fan-pwm {
  136. marvell,pins = "mpp23";
  137. marvell,function = "gpio";
  138. };
  139. cf_gtr_i2c1_pins: i2c1-pins {
  140. /* SFP */
  141. marvell,pins = "mpp26", "mpp27";
  142. marvell,function = "i2c1";
  143. };
  144. cf_gtr_sdhci_pins: cf-gtr-sdhci-pins {
  145. marvell,pins = "mpp21", "mpp28",
  146. "mpp37", "mpp38",
  147. "mpp39", "mpp40";
  148. marvell,function = "sd0";
  149. };
  150. cf_gtr_isolation_pins: cf-gtr-isolation-pins {
  151. marvell,pins = "mpp47";
  152. marvell,function = "gpio";
  153. };
  154. cf_gtr_poe_reset_pins: cf-gtr-poe-reset-pins {
  155. marvell,pins = "mpp48";
  156. marvell,function = "gpio";
  157. };
  158. cf_gtr_spi1_cs_pins: spi1-cs-pins {
  159. marvell,pins = "mpp59";
  160. marvell,function = "spi1";
  161. };
  162. cf_gtr_front_button_pins: cf-gtr-front-button-pins {
  163. marvell,pins = "mpp53";
  164. marvell,function = "gpio";
  165. };
  166. cf_gtr_rear_button_pins: cf-gtr-rear-button-pins {
  167. marvell,pins = "mpp36";
  168. marvell,function = "gpio";
  169. };
  170. };
  171. sdhci@d8000 {
  172. bus-width = <4>;
  173. no-1-8-v;
  174. non-removable;
  175. pinctrl-0 = <&cf_gtr_sdhci_pins>;
  176. pinctrl-names = "default";
  177. status = "okay";
  178. vmmc = <&reg_3p3v>;
  179. wp-inverted;
  180. };
  181. usb@58000 {
  182. status = "okay";
  183. };
  184. usb3@f0000 {
  185. status = "okay";
  186. };
  187. usb3@f8000 {
  188. vbus-supply = <&v_usb3_con>;
  189. status = "okay";
  190. };
  191. };
  192. pcie {
  193. status = "okay";
  194. /*
  195. * The PCIe units are accessible through
  196. * the mini-PCIe connectors on the board.
  197. */
  198. pcie@1,0 {
  199. reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
  200. status = "okay";
  201. };
  202. pcie@2,0 {
  203. reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  204. status = "okay";
  205. };
  206. pcie@3,0 {
  207. reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  208. status = "okay";
  209. };
  210. };
  211. };
  212. sfp0: sfp {
  213. compatible = "sff,sfp";
  214. i2c-bus = <&i2c1>;
  215. los-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
  216. mod-def0-gpio = <&gpio0 25 GPIO_ACTIVE_LOW>;
  217. tx-disable-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  218. };
  219. gpio-keys {
  220. compatible = "gpio-keys";
  221. pinctrl-0 = <&cf_gtr_rear_button_pins &cf_gtr_front_button_pins>;
  222. pinctrl-names = "default";
  223. button-0 {
  224. label = "Rear Button";
  225. gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
  226. linux,can-disable;
  227. linux,code = <BTN_0>;
  228. };
  229. button-1 {
  230. label = "Front Button";
  231. gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
  232. linux,can-disable;
  233. linux,code = <BTN_1>;
  234. };
  235. };
  236. gpio-leds {
  237. compatible = "gpio-leds";
  238. led1 {
  239. function = LED_FUNCTION_CPU;
  240. color = <LED_COLOR_ID_GREEN>;
  241. gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
  242. };
  243. led2 {
  244. function = LED_FUNCTION_HEARTBEAT;
  245. color = <LED_COLOR_ID_GREEN>;
  246. gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
  247. };
  248. };
  249. };
  250. &bm {
  251. status = "okay";
  252. };
  253. &bm_bppi {
  254. status = "okay";
  255. };
  256. &eth0 {
  257. /* ethernet@70000 */
  258. pinctrl-0 = <&ge0_rgmii_pins>;
  259. pinctrl-names = "default";
  260. phy = <&phy_dedicated>;
  261. phy-mode = "rgmii-id";
  262. buffer-manager = <&bm>;
  263. bm,pool-long = <0>;
  264. bm,pool-short = <1>;
  265. status = "okay";
  266. };
  267. &eth1 {
  268. /* ethernet@30000 */
  269. bm,pool-long = <2>;
  270. bm,pool-short = <1>;
  271. buffer-manager = <&bm>;
  272. phys = <&comphy1 1>;
  273. phy-mode = "2500base-x";
  274. status = "okay";
  275. fixed-link {
  276. speed = <2500>;
  277. full-duplex;
  278. };
  279. };
  280. &eth2 {
  281. /* ethernet@34000 */
  282. bm,pool-long = <3>;
  283. bm,pool-short = <1>;
  284. buffer-manager = <&bm>;
  285. managed = "in-band-status";
  286. phys = <&comphy5 1>;
  287. phy-mode = "sgmii";
  288. sfp = <&sfp0>;
  289. status = "okay";
  290. };
  291. &mdio {
  292. pinctrl-names = "default";
  293. pinctrl-0 = <&mdio_pins>;
  294. status = "okay";
  295. phy_dedicated: ethernet-phy@0 {
  296. /*
  297. * Annoyingly, the marvell phy driver configures the LED
  298. * register, rather than preserving reset-loaded setting.
  299. * We undo that rubbish here.
  300. */
  301. marvell,reg-init = <3 16 0 0x1017>;
  302. reg = <0>;
  303. };
  304. };
  305. &uart0 {
  306. pinctrl-0 = <&uart0_pins>;
  307. pinctrl-names = "default";
  308. status = "okay";
  309. };
  310. &spi1 {
  311. /*
  312. * CS0: W25Q32 flash
  313. */
  314. pinctrl-0 = <&spi1_pins &cf_gtr_spi1_cs_pins>;
  315. pinctrl-names = "default";
  316. status = "okay";
  317. 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 = "okay";
  324. };
  325. };
  326. &i2c0 {
  327. pinctrl-0 = <&i2c0_pins>;
  328. pinctrl-names = "default";
  329. status = "okay";
  330. /* U26 temperature sensor placed near SoC */
  331. temp1: nct75@4c {
  332. compatible = "lm75";
  333. reg = <0x4c>;
  334. };
  335. /* U27 temperature sensor placed near RTC battery */
  336. temp2: nct75@4d {
  337. compatible = "lm75";
  338. reg = <0x4d>;
  339. };
  340. /* 2Kb eeprom */
  341. eeprom@53 {
  342. compatible = "atmel,24c02";
  343. reg = <0x53>;
  344. };
  345. };
  346. &ahci0 {
  347. status = "okay";
  348. };
  349. &ahci1 {
  350. status = "okay";
  351. };
  352. &gpio0 {
  353. pinctrl-0 = <&cf_gtr_fan_pwm>;
  354. pinctrl-names = "default";
  355. wifi-disable {
  356. gpio-hog;
  357. gpios = <30 GPIO_ACTIVE_LOW>, <31 GPIO_ACTIVE_LOW>;
  358. output-low;
  359. line-name = "wifi-disable";
  360. };
  361. };
  362. &gpio1 {
  363. pinctrl-0 = <&cf_gtr_isolation_pins &cf_gtr_poe_reset_pins>;
  364. pinctrl-names = "default";
  365. lte-disable {
  366. gpio-hog;
  367. gpios = <2 GPIO_ACTIVE_LOW>;
  368. output-low;
  369. line-name = "lte-disable";
  370. };
  371. /*
  372. * This signal, when asserted, isolates Armada 38x sample at reset pins
  373. * from control of external devices. Should be de-asserted after reset.
  374. */
  375. sar-isolation {
  376. gpio-hog;
  377. gpios = <15 GPIO_ACTIVE_LOW>;
  378. output-low;
  379. line-name = "sar-isolation";
  380. };
  381. poe-reset {
  382. gpio-hog;
  383. gpios = <16 GPIO_ACTIVE_LOW>;
  384. output-low;
  385. line-name = "poe-reset";
  386. };
  387. };