am3874-iceboard.dts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Device tree for Winterland IceBoard
  4. *
  5. * https://mcgillcosmology.com
  6. * https://threespeedlogic.com
  7. *
  8. * This is an ARM + FPGA instrumentation board used at telescopes in
  9. * Antarctica (the South Pole Telescope), Chile (POLARBEAR), and at the DRAO
  10. * observatory in British Columbia (CHIME).
  11. *
  12. * Copyright (c) 2019 Three-Speed Logic, Inc. <[email protected]>
  13. */
  14. /dts-v1/;
  15. #include "dm814x.dtsi"
  16. #include <dt-bindings/interrupt-controller/irq.h>
  17. / {
  18. model = "Winterland IceBoard";
  19. compatible = "ti,dm8148", "ti,dm814";
  20. chosen {
  21. stdout-path = "serial1:115200n8";
  22. bootargs = "earlycon";
  23. };
  24. memory@80000000 {
  25. device_type = "memory";
  26. reg = <0x80000000 0x40000000>; /* 1 GB */
  27. };
  28. vmmcsd_fixed: fixedregulator0 {
  29. compatible = "regulator-fixed";
  30. regulator-name = "vmmcsd_fixed";
  31. regulator-min-microvolt = <3300000>;
  32. regulator-max-microvolt = <3300000>;
  33. regulator-always-on;
  34. };
  35. };
  36. /* The MAC provides internal delay for the transmit path ONLY, which is enabled
  37. * provided no -id/-txid/-rxid suffix is provided to "phy-mode".
  38. *
  39. * The receive path is delayed at the PHY. The recommended register settings
  40. * are 0xf0 for the control bits, and 0x7777 for the data bits. However, the
  41. * conversion code in the kernel lies: the PHY's registers are 120 ps per tap,
  42. * and the kernel assumes 200 ps per tap. So we have fudged the numbers here to
  43. * obtain the correct register settings.
  44. */
  45. &mac { dual_emac = <1>; };
  46. &cpsw_emac0 {
  47. phy-handle = <&ethphy0>;
  48. phy-mode = "rgmii";
  49. dual_emac_res_vlan = <1>;
  50. };
  51. &cpsw_emac1 {
  52. phy-handle = <&ethphy1>;
  53. phy-mode = "rgmii";
  54. dual_emac_res_vlan = <2>;
  55. };
  56. &davinci_mdio {
  57. ethphy0: ethernet-phy@0 {
  58. reg = <0x2>;
  59. rxc-skew-ps = <3000>;
  60. rxdv-skew-ps = <0>;
  61. rxd3-skew-ps = <0>;
  62. rxd2-skew-ps = <0>;
  63. rxd1-skew-ps = <0>;
  64. rxd0-skew-ps = <0>;
  65. phy-reset-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
  66. };
  67. ethphy1: ethernet-phy@1 {
  68. reg = <0x1>;
  69. rxc-skew-ps = <3000>;
  70. rxdv-skew-ps = <0>;
  71. rxd3-skew-ps = <0>;
  72. rxd2-skew-ps = <0>;
  73. rxd1-skew-ps = <0>;
  74. rxd0-skew-ps = <0>;
  75. phy-reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
  76. };
  77. };
  78. &mmc1 { status = "disabled"; };
  79. &mmc2 {
  80. pinctrl-names = "default";
  81. pinctrl-0 = <&mmc2_pins>;
  82. vmmc-supply = <&vmmcsd_fixed>;
  83. bus-width = <4>;
  84. };
  85. &mmc3 { status = "disabled"; };
  86. &i2c1 {
  87. /* Most I2C activity happens through this port, with the sole exception
  88. * of the backplane. Since there are multiply assigned addresses, the
  89. * "i2c-mux-idle-disconnect" is important.
  90. */
  91. pca9548@70 {
  92. compatible = "nxp,pca9548";
  93. reg = <0x70>;
  94. #address-cells = <1>;
  95. #size-cells = <0>;
  96. i2c-mux-idle-disconnect;
  97. i2c@0 {
  98. /* FMC A */
  99. #address-cells = <1>;
  100. #size-cells = <0>;
  101. reg = <0>;
  102. };
  103. i2c@1 {
  104. /* FMC B */
  105. #address-cells = <1>;
  106. #size-cells = <0>;
  107. reg = <1>;
  108. };
  109. i2c@2 {
  110. /* QSFP A */
  111. #address-cells = <1>;
  112. #size-cells = <0>;
  113. reg = <2>;
  114. };
  115. i2c@3 {
  116. /* QSFP B */
  117. #address-cells = <1>;
  118. #size-cells = <0>;
  119. reg = <3>;
  120. };
  121. i2c@4 {
  122. /* SFP */
  123. #address-cells = <1>;
  124. #size-cells = <0>;
  125. reg = <4>;
  126. };
  127. i2c@5 {
  128. #address-cells = <1>;
  129. #size-cells = <0>;
  130. reg = <5>;
  131. ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <5000>; };
  132. ina230@41 { compatible = "ti,ina230"; reg = <0x41>; shunt-resistor = <5000>; };
  133. ina230@42 { compatible = "ti,ina230"; reg = <0x42>; shunt-resistor = <5000>; };
  134. ina230@44 { compatible = "ti,ina230"; reg = <0x44>; shunt-resistor = <5000>; };
  135. ina230@45 { compatible = "ti,ina230"; reg = <0x45>; shunt-resistor = <5000>; };
  136. ina230@46 { compatible = "ti,ina230"; reg = <0x46>; shunt-resistor = <5000>; };
  137. ina230@47 { compatible = "ti,ina230"; reg = <0x47>; shunt-resistor = <5500>; };
  138. ina230@48 { compatible = "ti,ina230"; reg = <0x48>; shunt-resistor = <2360>; };
  139. ina230@49 { compatible = "ti,ina230"; reg = <0x49>; shunt-resistor = <2360>; };
  140. ina230@43 { compatible = "ti,ina230"; reg = <0x43>; shunt-resistor = <2360>; };
  141. ina230@4b { compatible = "ti,ina230"; reg = <0x4b>; shunt-resistor = <5500>; };
  142. ina230@4c { compatible = "ti,ina230"; reg = <0x4c>; shunt-resistor = <2360>; };
  143. ina230@4d { compatible = "ti,ina230"; reg = <0x4d>; shunt-resistor = <770>; };
  144. ina230@4e { compatible = "ti,ina230"; reg = <0x4e>; shunt-resistor = <770>; };
  145. ina230@4f { compatible = "ti,ina230"; reg = <0x4f>; shunt-resistor = <770>; };
  146. };
  147. i2c@6 {
  148. /* Backplane */
  149. #address-cells = <1>;
  150. #size-cells = <0>;
  151. reg = <6>;
  152. };
  153. i2c@7 {
  154. #address-cells = <1>;
  155. #size-cells = <0>;
  156. reg = <7>;
  157. u41: pca9575@20 {
  158. compatible = "nxp,pca9575";
  159. reg = <0x20>;
  160. gpio-controller;
  161. #gpio-cells = <2>;
  162. gpio-line-names =
  163. "FMCA_EN_12V0", "FMCA_EN_3V3", "FMCA_EN_VADJ", "FMCA_PG_M2C",
  164. "FMCA_PG_C2M", "FMCA_PRSNT_M2C_L", "FMCA_CLK_DIR", "SFP_LOS",
  165. "FMCB_EN_12V0", "FMCB_EN_3V3", "FMCB_EN_VADJ", "FMCB_PG_M2C",
  166. "FMCB_PG_C2M", "FMCB_PRSNT_M2C_L", "FMCB_CLK_DIR", "SFP_ModPrsL";
  167. reset-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
  168. };
  169. u42: pca9575@21 {
  170. compatible = "nxp,pca9575";
  171. reg = <0x21>;
  172. gpio-controller;
  173. #gpio-cells = <2>;
  174. gpio-line-names =
  175. "QSFPA_ModPrsL", "QSFPA_IntL", "QSFPA_ResetL", "QSFPA_ModSelL",
  176. "QSFPA_LPMode", "QSFPB_ModPrsL", "QSFPB_IntL", "QSFPB_ResetL",
  177. "SFP_TxFault", "SFP_TxDisable", "SFP_RS0", "SFP_RS1",
  178. "QSFPB_ModSelL", "QSFPB_LPMode", "SEL_SFP", "ARM_MR";
  179. reset-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
  180. };
  181. u48: pca9575@22 {
  182. compatible = "nxp,pca9575";
  183. reg = <0x22>;
  184. gpio-controller;
  185. #gpio-cells = <2>;
  186. sw-gpios = <&u48 0 0>, <&u48 1 0>, <&u48 2 0>, <&u48 3 0>,
  187. <&u48 4 0>, <&u48 5 0>, <&u48 6 0>, <&u48 7 0>;
  188. led-gpios = <&u48 7 0>, <&u48 6 0>, <&u48 5 0>, <&u48 4 0>,
  189. <&u48 3 0>, <&u48 2 0>, <&u48 1 0>, <&u48 0 0>;
  190. gpio-line-names =
  191. "GP_SW1", "GP_SW2", "GP_SW3", "GP_SW4",
  192. "GP_SW5", "GP_SW6", "GP_SW7", "GP_SW8",
  193. "GP_LED8", "GP_LED7", "GP_LED6", "GP_LED5",
  194. "GP_LED4", "GP_LED3", "GP_LED2", "GP_LED1";
  195. reset-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
  196. };
  197. u59: pca9575@23 {
  198. compatible = "nxp,pca9575";
  199. reg = <0x23>;
  200. gpio-controller;
  201. #gpio-cells = <2>;
  202. gpio-line-names =
  203. "GP_LED9", "GP_LED10", "GP_LED11", "GP_LED12",
  204. "GTX1V8PowerFault", "PHYAPowerFault", "PHYBPowerFault", "ArmPowerFault",
  205. "BP_SLOW_GPIO0", "BP_SLOW_GPIO1", "BP_SLOW_GPIO2", "BP_SLOW_GPIO3",
  206. "BP_SLOW_GPIO4", "BP_SLOW_GPIO5", "__unused_u59_p16", "__unused_u59_p17";
  207. reset-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
  208. };
  209. tmp100@48 { compatible = "ti,tmp100"; reg = <0x48>; };
  210. tmp100@4a { compatible = "ti,tmp100"; reg = <0x4a>; };
  211. tmp100@4b { compatible = "ti,tmp100"; reg = <0x4b>; };
  212. tmp100@4c { compatible = "ti,tmp100"; reg = <0x4c>; };
  213. /* EEPROM bank and serial number are treated as separate devices */
  214. at24c01@57 { compatible = "atmel,24c01"; reg = <0x57>; };
  215. at24cs01@5f { compatible = "atmel,24cs01"; reg = <0x5f>; };
  216. };
  217. };
  218. };
  219. &i2c2 {
  220. pca9548@71 {
  221. compatible = "nxp,pca9548";
  222. reg = <0x71>;
  223. #address-cells = <1>;
  224. #size-cells = <0>;
  225. i2c@6 {
  226. /* Backplane */
  227. #address-cells = <1>;
  228. #size-cells = <0>;
  229. reg = <6>;
  230. multi-master;
  231. /* All backplanes should have this -- it's how we know they're there. */
  232. at24c08@54 { compatible="atmel,24c08"; reg=<0x54>; };
  233. at24cs08@5c { compatible="atmel,24cs08"; reg=<0x5c>; };
  234. /* 16 slot backplane */
  235. tmp421@4d { compatible="ti,tmp421"; reg=<0x4d>; };
  236. tmp421@4e { compatible="ti,tmp421"; reg=<0x4e>; };
  237. ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <2360>; };
  238. amc6821@18 { compatible = "ti,amc6821"; reg = <0x18>; };
  239. /* Single slot backplane */
  240. };
  241. };
  242. };
  243. &pincntl {
  244. mmc2_pins: pinmux_mmc2_pins {
  245. pinctrl-single,pins = <
  246. DM814X_IOPAD(0x0800, PIN_INPUT | 0x1) /* SD1_CLK */
  247. DM814X_IOPAD(0x0804, PIN_INPUT_PULLUP | 0x1) /* SD1_CMD */
  248. DM814X_IOPAD(0x0808, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[0] */
  249. DM814X_IOPAD(0x080c, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[1] */
  250. DM814X_IOPAD(0x0810, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[2] */
  251. DM814X_IOPAD(0x0814, PIN_INPUT_PULLUP | 0x1) /* SD1_DAT[3] */
  252. DM814X_IOPAD(0x0924, PIN_INPUT_PULLUP | 0x40) /* SD1_POW */
  253. DM814X_IOPAD(0x0928, PIN_INPUT | 0x40) /* SD1_SDWP */
  254. DM814X_IOPAD(0x093C, PIN_INPUT | 0x2) /* SD1_SDCD */
  255. >;
  256. };
  257. usb0_pins: pinmux_usb0_pins {
  258. pinctrl-single,pins = <
  259. DM814X_IOPAD(0x0c34, PIN_OUTPUT | 0x1) /* USB0_DRVVBUS */
  260. >;
  261. };
  262. usb1_pins: pinmux_usb1_pins {
  263. pinctrl-single,pins = <
  264. DM814X_IOPAD(0x0834, PIN_OUTPUT | 0x80) /* USB1_DRVVBUS */
  265. >;
  266. };
  267. gpio1_pins: pinmux_gpio1_pins {
  268. pinctrl-single,pins = <
  269. DM814X_IOPAD(0x081c, PIN_OUTPUT | 0x80) /* PROGRAM_B */
  270. DM814X_IOPAD(0x0820, PIN_INPUT | 0x80) /* INIT_B */
  271. DM814X_IOPAD(0x0824, PIN_INPUT | 0x80) /* DONE */
  272. DM814X_IOPAD(0x0838, PIN_INPUT_PULLUP | 0x80) /* FMCA_TMS */
  273. DM814X_IOPAD(0x083c, PIN_INPUT_PULLUP | 0x80) /* FMCA_TCK */
  274. DM814X_IOPAD(0x0898, PIN_INPUT_PULLUP | 0x80) /* FMCA_TDO */
  275. DM814X_IOPAD(0x089c, PIN_INPUT_PULLUP | 0x80) /* FMCA_TDI */
  276. DM814X_IOPAD(0x08ac, PIN_INPUT_PULLUP | 0x80) /* FMCA_TRST */
  277. DM814X_IOPAD(0x08b0, PIN_INPUT_PULLUP | 0x80) /* FMCB_TMS */
  278. DM814X_IOPAD(0x0a88, PIN_INPUT_PULLUP | 0x80) /* FMCB_TCK */
  279. DM814X_IOPAD(0x0a8c, PIN_INPUT_PULLUP | 0x80) /* FMCB_TDO */
  280. DM814X_IOPAD(0x08bc, PIN_INPUT_PULLUP | 0x80) /* FMCB_TDI */
  281. DM814X_IOPAD(0x0a94, PIN_INPUT_PULLUP | 0x80) /* FMCB_TRST */
  282. DM814X_IOPAD(0x08d4, PIN_INPUT_PULLUP | 0x80) /* FPGA_TMS */
  283. DM814X_IOPAD(0x0aa8, PIN_INPUT_PULLUP | 0x80) /* FPGA_TCK */
  284. DM814X_IOPAD(0x0adc, PIN_INPUT_PULLUP | 0x80) /* FPGA_TDO */
  285. DM814X_IOPAD(0x0ab0, PIN_INPUT_PULLUP | 0x80) /* FPGA_TDI */
  286. >;
  287. };
  288. gpio2_pins: pinmux_gpio2_pins {
  289. pinctrl-single,pins = <
  290. DM814X_IOPAD(0x090c, PIN_INPUT_PULLUP | 0x80) /* PHY A IRQ */
  291. DM814X_IOPAD(0x0910, PIN_INPUT_PULLUP | 0x80) /* PHY A RESET */
  292. DM814X_IOPAD(0x08f4, PIN_INPUT_PULLUP | 0x80) /* PHY B IRQ */
  293. DM814X_IOPAD(0x08f8, PIN_INPUT_PULLUP | 0x80) /* PHY B RESET */
  294. //DM814X_IOPAD(0x0a14, PIN_INPUT_PULLUP | 0x80) /* ARM IRQ */
  295. //DM814X_IOPAD(0x0900, PIN_INPUT | 0x80) /* GPIO IRQ */
  296. DM814X_IOPAD(0x0a2c, PIN_INPUT_PULLUP | 0x80) /* GPIO RESET */
  297. >;
  298. };
  299. gpio4_pins: pinmux_gpio4_pins {
  300. pinctrl-single,pins = <
  301. /* The PLL doesn't react well to the SPI controller reset, so
  302. * we force the CS lines to pull up as GPIOs until we're ready.
  303. * See https://e2e.ti.com/support/processors/f/791/t/276011?Linux-support-for-AM3874-DM8148-in-Arago-linux-omap3
  304. */
  305. DM814X_IOPAD(0x0b3c, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO0 */
  306. DM814X_IOPAD(0x0b40, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO1 */
  307. DM814X_IOPAD(0x0b44, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO2 */
  308. DM814X_IOPAD(0x0b48, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO3 */
  309. DM814X_IOPAD(0x0b4c, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO4 */
  310. DM814X_IOPAD(0x0b50, PIN_INPUT_PULLUP | 0x80) /* BP_ARM_GPIO5 */
  311. >;
  312. };
  313. spi2_pins: pinmux_spi2_pins {
  314. pinctrl-single,pins = <
  315. DM814X_IOPAD(0x0950, PIN_INPUT_PULLUP | 0x80) /* PLL SPI CS1 as GPIO */
  316. DM814X_IOPAD(0x0818, PIN_INPUT_PULLUP | 0x80) /* PLL SPI CS2 as GPIO */
  317. >;
  318. };
  319. spi4_pins: pinmux_spi4_pins {
  320. pinctrl-single,pins = <
  321. DM814X_IOPAD(0x0a7c, 0x20)
  322. DM814X_IOPAD(0x0b74, 0x20)
  323. DM814X_IOPAD(0x0b78, PIN_OUTPUT | 0x20)
  324. DM814X_IOPAD(0x0b7c, PIN_OUTPUT_PULLDOWN | 0x20)
  325. DM814X_IOPAD(0x0b80, PIN_INPUT | 0x20)
  326. >;
  327. };
  328. };
  329. &gpio1 {
  330. pinctrl-names = "default";
  331. pinctrl-0 = <&gpio1_pins>;
  332. gpio-line-names =
  333. "", "PROGRAM_B", "INIT_B", "DONE", /* 0-3 */
  334. "", "", "", "", /* 4-7 */
  335. "FMCA_TMS", "FMCA_TCK", "FMCA_TDO", "FMCA_TDI", /* 8-11 */
  336. "", "", "", "FMCA_TRST", /* 12-15 */
  337. "FMCB_TMS", "FMCB_TCK", "FMCB_TDO", "FMCB_TDI", /* 16-19 */
  338. "FMCB_TRST", "", "", "", /* 20-23 */
  339. "FPGA_TMS", "FPGA_TCK", "FPGA_TDO", "FPGA_TDI", /* 24-27 */
  340. "", "", "", ""; /* 28-31 */
  341. };
  342. &gpio2 {
  343. pinctrl-names = "default";
  344. pinctrl-0 = <&gpio2_pins>;
  345. gpio-line-names =
  346. "PHYA_IRQ_N", "PHYA_RESET_N", "", "", /* 0-3 */
  347. "", "", "", "PHYB_IRQ_N", /* 4-7 */
  348. "PHYB_RESET_N", "ARM_IRQ", "GPIO_IRQ", ""; /* 8-11 */
  349. };
  350. &gpio3 {
  351. pinctrl-names = "default";
  352. /*pinctrl-0 = <&gpio3_pins>;*/
  353. gpio-line-names =
  354. "", "", "ARMClkSel0", "", /* 0-3 */
  355. "EnFPGARef", "", "", "ARMClkSel1"; /* 4-7 */
  356. };
  357. &gpio4 {
  358. pinctrl-names = "default";
  359. pinctrl-0 = <&gpio4_pins>;
  360. gpio-line-names =
  361. "BP_ARM_GPIO0", "BP_ARM_GPIO1", "BP_ARM_GPIO2", "BP_ARM_GPIO3",
  362. "BP_ARM_GPIO4", "BP_ARM_GPIO5";
  363. };
  364. &usb0 {
  365. pinctrl-names = "default";
  366. pinctrl-0 = <&usb0_pins>;
  367. dr_mode = "host";
  368. };
  369. &usb1 {
  370. pinctrl-names = "default";
  371. pinctrl-0 = <&usb1_pins>;
  372. dr_mode = "host";
  373. };
  374. &mcspi1 {
  375. flash@0 {
  376. #address-cells = <1>;
  377. #size-cells = <1>;
  378. compatible = "jedec,spi-nor";
  379. reg = <0>;
  380. spi-max-frequency = <40000000>;
  381. fsbl@0 {
  382. /* 256 kB */
  383. label = "U-Boot-min";
  384. reg = <0 0x40000>;
  385. };
  386. ssbl@1 {
  387. /* 512 kB */
  388. label = "U-Boot";
  389. reg = <0x40000 0x80000>;
  390. };
  391. bootenv@2 {
  392. /* 256 kB */
  393. label = "U-Boot Env";
  394. reg = <0xc0000 0x40000>;
  395. };
  396. kernel@3 {
  397. /* 4 MB */
  398. label = "Kernel";
  399. reg = <0x100000 0x400000>;
  400. };
  401. ipmi@4 {
  402. label = "IPMI FRU";
  403. reg = <0x500000 0x40000>;
  404. };
  405. fs@5 {
  406. label = "File System";
  407. reg = <0x540000 0x1ac0000>;
  408. };
  409. };
  410. };
  411. &mcspi3 {
  412. /* DMA event numbers stolen from MCASP */
  413. dmas = <&edma_xbar 8 0 16 &edma_xbar 9 0 17
  414. &edma_xbar 10 0 18 &edma_xbar 11 0 19>;
  415. dma-names = "tx0", "rx0", "tx1", "rx1";
  416. };
  417. &mcspi4 {
  418. pinctrl-names = "default";
  419. pinctrl-0 = <&spi4_pins>;
  420. /* DMA event numbers stolen from MCASP, MCBSP */
  421. dmas = <&edma_xbar 12 0 20 &edma_xbar 13 0 21>;
  422. dma-names = "tx0", "rx0";
  423. };