imx8mm-venice-gw72xx.dtsi 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright 2020 Gateworks Corporation
  4. */
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/leds/common.h>
  7. #include <dt-bindings/phy/phy-imx8-pcie.h>
  8. / {
  9. aliases {
  10. ethernet1 = &eth1;
  11. usb0 = &usbotg1;
  12. usb1 = &usbotg2;
  13. };
  14. led-controller {
  15. compatible = "gpio-leds";
  16. pinctrl-names = "default";
  17. pinctrl-0 = <&pinctrl_gpio_leds>;
  18. led-0 {
  19. function = LED_FUNCTION_STATUS;
  20. color = <LED_COLOR_ID_GREEN>;
  21. gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
  22. default-state = "on";
  23. linux,default-trigger = "heartbeat";
  24. };
  25. led-1 {
  26. function = LED_FUNCTION_STATUS;
  27. color = <LED_COLOR_ID_RED>;
  28. gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
  29. default-state = "off";
  30. };
  31. };
  32. pcie0_refclk: pcie0-refclk {
  33. compatible = "fixed-clock";
  34. #clock-cells = <0>;
  35. clock-frequency = <100000000>;
  36. };
  37. pps {
  38. compatible = "pps-gpio";
  39. pinctrl-names = "default";
  40. pinctrl-0 = <&pinctrl_pps>;
  41. gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  42. status = "okay";
  43. };
  44. reg_3p3v: regulator-3p3v {
  45. compatible = "regulator-fixed";
  46. regulator-name = "3P3V";
  47. regulator-min-microvolt = <3300000>;
  48. regulator-max-microvolt = <3300000>;
  49. regulator-always-on;
  50. };
  51. reg_usb_otg1_vbus: regulator-usb-otg1 {
  52. pinctrl-names = "default";
  53. pinctrl-0 = <&pinctrl_reg_usb1_en>;
  54. compatible = "regulator-fixed";
  55. regulator-name = "usb_otg1_vbus";
  56. gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
  57. enable-active-high;
  58. regulator-min-microvolt = <5000000>;
  59. regulator-max-microvolt = <5000000>;
  60. };
  61. reg_usb_otg2_vbus: regulator-usb-otg2 {
  62. pinctrl-names = "default";
  63. pinctrl-0 = <&pinctrl_reg_usb2_en>;
  64. compatible = "regulator-fixed";
  65. regulator-name = "usb_otg2_vbus";
  66. gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
  67. enable-active-high;
  68. regulator-min-microvolt = <5000000>;
  69. regulator-max-microvolt = <5000000>;
  70. };
  71. };
  72. /* off-board header */
  73. &ecspi2 {
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&pinctrl_spi2>;
  76. cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
  77. status = "okay";
  78. };
  79. &gpio1 {
  80. gpio-line-names = "rs485_term", "mipi_gpio4", "", "",
  81. "", "", "pci_usb_sel", "dio0",
  82. "", "dio1", "", "", "", "", "", "",
  83. "", "", "", "", "", "", "", "",
  84. "", "", "", "", "", "", "", "";
  85. };
  86. &gpio4 {
  87. gpio-line-names = "rs485_en", "mipi_gpio3", "rs485_hd", "mipi_gpio2",
  88. "mipi_gpio1", "", "", "pci_wdis#",
  89. "", "", "", "", "", "", "", "",
  90. "", "", "", "", "", "", "", "",
  91. "", "", "", "", "", "", "", "";
  92. };
  93. &i2c2 {
  94. clock-frequency = <400000>;
  95. pinctrl-names = "default";
  96. pinctrl-0 = <&pinctrl_i2c2>;
  97. status = "okay";
  98. accelerometer@19 {
  99. pinctrl-names = "default";
  100. pinctrl-0 = <&pinctrl_accel>;
  101. compatible = "st,lis2de12";
  102. reg = <0x19>;
  103. st,drdy-int-pin = <1>;
  104. interrupt-parent = <&gpio4>;
  105. interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
  106. interrupt-names = "INT1";
  107. };
  108. };
  109. /* off-board header */
  110. &i2c3 {
  111. clock-frequency = <400000>;
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&pinctrl_i2c3>;
  114. status = "okay";
  115. };
  116. &pcie_phy {
  117. fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
  118. fsl,clkreq-unsupported;
  119. clocks = <&pcie0_refclk>;
  120. clock-names = "ref";
  121. status = "okay";
  122. };
  123. &pcie0 {
  124. pinctrl-names = "default";
  125. pinctrl-0 = <&pinctrl_pcie0>;
  126. reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>;
  127. clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>,
  128. <&pcie0_refclk>;
  129. clock-names = "pcie", "pcie_aux", "pcie_bus";
  130. assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
  131. <&clk IMX8MM_CLK_PCIE1_CTRL>;
  132. assigned-clock-rates = <10000000>, <250000000>;
  133. assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
  134. <&clk IMX8MM_SYS_PLL2_250M>;
  135. status = "okay";
  136. pcie@0,0 {
  137. reg = <0x0000 0 0 0 0>;
  138. #address-cells = <1>;
  139. #size-cells = <0>;
  140. pcie@1,0 {
  141. reg = <0x0000 0 0 0 0>;
  142. #address-cells = <1>;
  143. #size-cells = <0>;
  144. pcie@2,3 {
  145. reg = <0x1800 0 0 0 0>;
  146. #address-cells = <1>;
  147. #size-cells = <0>;
  148. eth1: pcie@5,0 {
  149. reg = <0x0000 0 0 0 0>;
  150. #address-cells = <1>;
  151. #size-cells = <0>;
  152. local-mac-address = [00 00 00 00 00 00];
  153. };
  154. };
  155. };
  156. };
  157. };
  158. /* off-board header */
  159. &sai3 {
  160. pinctrl-names = "default";
  161. pinctrl-0 = <&pinctrl_sai3>;
  162. assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
  163. assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
  164. assigned-clock-rates = <24576000>;
  165. status = "okay";
  166. };
  167. /* GPS */
  168. &uart1 {
  169. pinctrl-names = "default";
  170. pinctrl-0 = <&pinctrl_uart1>;
  171. status = "okay";
  172. };
  173. /* off-board header */
  174. &uart3 {
  175. pinctrl-names = "default";
  176. pinctrl-0 = <&pinctrl_uart3>;
  177. status = "okay";
  178. };
  179. /* RS232 */
  180. &uart4 {
  181. pinctrl-names = "default";
  182. pinctrl-0 = <&pinctrl_uart4>;
  183. status = "okay";
  184. };
  185. &usbotg1 {
  186. dr_mode = "otg";
  187. over-current-active-low;
  188. vbus-supply = <&reg_usb_otg1_vbus>;
  189. status = "okay";
  190. };
  191. &usbotg2 {
  192. dr_mode = "host";
  193. disable-over-current;
  194. vbus-supply = <&reg_usb_otg2_vbus>;
  195. status = "okay";
  196. };
  197. /* microSD */
  198. &usdhc2 {
  199. pinctrl-names = "default", "state_100mhz", "state_200mhz";
  200. pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
  201. pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
  202. pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
  203. cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
  204. bus-width = <4>;
  205. vmmc-supply = <&reg_3p3v>;
  206. status = "okay";
  207. };
  208. &iomuxc {
  209. pinctrl-names = "default";
  210. pinctrl-0 = <&pinctrl_hog>;
  211. pinctrl_hog: hoggrp {
  212. fsl,pins = <
  213. MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3 0x40000041 /* PLUG_TEST */
  214. MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x40000041 /* PCI_USBSEL */
  215. MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7 0x40000041 /* PCIE_WDIS# */
  216. MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x40000041 /* DIO0 */
  217. MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x40000041 /* DIO1 */
  218. MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x40000104 /* RS485_TERM */
  219. MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0x40000104 /* RS485 */
  220. MX8MM_IOMUXC_SAI1_RXD0_GPIO4_IO2 0x40000104 /* RS485_HALF */
  221. >;
  222. };
  223. pinctrl_accel: accelgrp {
  224. fsl,pins = <
  225. MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5 0x159
  226. >;
  227. };
  228. pinctrl_gpio_leds: gpioledgrp {
  229. fsl,pins = <
  230. MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x19
  231. MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x19
  232. >;
  233. };
  234. pinctrl_i2c3: i2c3grp {
  235. fsl,pins = <
  236. MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3
  237. MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3
  238. >;
  239. };
  240. pinctrl_pcie0: pcie0grp {
  241. fsl,pins = <
  242. MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6 0x41
  243. >;
  244. };
  245. pinctrl_pps: ppsgrp {
  246. fsl,pins = <
  247. MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x41
  248. >;
  249. };
  250. pinctrl_reg_usb1_en: regusb1grp {
  251. fsl,pins = <
  252. MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x41
  253. MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x41
  254. >;
  255. };
  256. pinctrl_reg_usb2_en: regusb2grp {
  257. fsl,pins = <
  258. MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x41
  259. >;
  260. };
  261. pinctrl_sai3: sai3grp {
  262. fsl,pins = <
  263. MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
  264. MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
  265. MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
  266. MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
  267. MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
  268. >;
  269. };
  270. pinctrl_spi2: spi2grp {
  271. fsl,pins = <
  272. MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
  273. MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
  274. MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
  275. MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
  276. >;
  277. };
  278. pinctrl_uart1: uart1grp {
  279. fsl,pins = <
  280. MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
  281. MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
  282. >;
  283. };
  284. pinctrl_uart3: uart3grp {
  285. fsl,pins = <
  286. MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
  287. MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
  288. >;
  289. };
  290. pinctrl_uart4: uart4grp {
  291. fsl,pins = <
  292. MX8MM_IOMUXC_UART4_RXD_UART4_DCE_RX 0x140
  293. MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX 0x140
  294. >;
  295. };
  296. pinctrl_usdhc1: usdhc1grp {
  297. fsl,pins = <
  298. MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190
  299. MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0
  300. MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0
  301. MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0
  302. MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0
  303. MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0
  304. >;
  305. };
  306. pinctrl_usdhc2: usdhc2grp {
  307. fsl,pins = <
  308. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
  309. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
  310. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
  311. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
  312. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
  313. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
  314. >;
  315. };
  316. pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
  317. fsl,pins = <
  318. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
  319. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
  320. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
  321. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
  322. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
  323. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
  324. >;
  325. };
  326. pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
  327. fsl,pins = <
  328. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
  329. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
  330. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
  331. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
  332. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
  333. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
  334. >;
  335. };
  336. pinctrl_usdhc2_gpio: usdhc2gpiogrp {
  337. fsl,pins = <
  338. MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x1c4
  339. MX8MM_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0x1d0
  340. MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
  341. >;
  342. };
  343. };