blob: 7b2130dbdb21982550dbdcbb8f7dbbe16e2afcde [file] [log] [blame]
Tim Harvey5fe2ef02021-03-02 14:00:20 -08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright 2020 Gateworks Corporation
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/leds/common.h>
Marcel Ziswilerca453f22022-07-21 15:27:40 +02008#include <dt-bindings/phy/phy-imx8-pcie.h>
Tim Harvey5fe2ef02021-03-02 14:00:20 -08009
10/ {
11 aliases {
Marcel Ziswilerca453f22022-07-21 15:27:40 +020012 ethernet1 = &eth1;
Tim Harvey5fe2ef02021-03-02 14:00:20 -080013 usb0 = &usbotg1;
14 usb1 = &usbotg2;
15 };
16
17 led-controller {
18 compatible = "gpio-leds";
19 pinctrl-names = "default";
20 pinctrl-0 = <&pinctrl_gpio_leds>;
21
22 led-0 {
23 function = LED_FUNCTION_STATUS;
24 color = <LED_COLOR_ID_GREEN>;
25 gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 linux,default-trigger = "heartbeat";
28 };
29
30 led-1 {
31 function = LED_FUNCTION_STATUS;
32 color = <LED_COLOR_ID_RED>;
33 gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
34 default-state = "off";
35 };
36 };
37
Marcel Ziswilerca453f22022-07-21 15:27:40 +020038 pcie0_refclk: pcie0-refclk {
39 compatible = "fixed-clock";
40 #clock-cells = <0>;
41 clock-frequency = <100000000>;
42 };
43
Tim Harvey5fe2ef02021-03-02 14:00:20 -080044 pps {
45 compatible = "pps-gpio";
46 pinctrl-names = "default";
47 pinctrl-0 = <&pinctrl_pps>;
48 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
49 status = "okay";
50 };
51
52 reg_1p8v: regulator-1p8v {
53 compatible = "regulator-fixed";
54 regulator-name = "1P8V";
55 regulator-min-microvolt = <1800000>;
56 regulator-max-microvolt = <1800000>;
57 regulator-always-on;
58 };
59
60 reg_3p3v: regulator-3p3v {
61 compatible = "regulator-fixed";
62 regulator-name = "3P3V";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-always-on;
66 };
67
68 reg_usb_otg1_vbus: regulator-usb-otg1 {
69 pinctrl-names = "default";
70 pinctrl-0 = <&pinctrl_reg_usb1_en>;
71 compatible = "regulator-fixed";
72 regulator-name = "usb_otg1_vbus";
73 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
74 enable-active-high;
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 };
78
79 reg_usb_otg2_vbus: regulator-usb-otg2 {
80 pinctrl-names = "default";
81 pinctrl-0 = <&pinctrl_reg_usb2_en>;
82 compatible = "regulator-fixed";
83 regulator-name = "usb_otg2_vbus";
84 gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
85 enable-active-high;
86 regulator-min-microvolt = <5000000>;
87 regulator-max-microvolt = <5000000>;
88 };
89
90 reg_wifi_en: regulator-wifi-en {
91 pinctrl-names = "default";
92 pinctrl-0 = <&pinctrl_reg_wl>;
93 compatible = "regulator-fixed";
94 regulator-name = "wl";
95 gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
96 startup-delay-us = <100>;
97 enable-active-high;
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
100 };
101};
102
103/* off-board header */
104&ecspi2 {
105 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_spi2>;
Tim Harvey66cc07c2023-10-18 11:33:38 -0700107 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
108 <&gpio1 10 GPIO_ACTIVE_LOW>;
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800109 status = "okay";
Tim Harvey66cc07c2023-10-18 11:33:38 -0700110
111 tpm@1 {
112 compatible = "tcg,tpm_tis-spi";
113 reg = <0x1>;
114 spi-max-frequency = <36000000>;
115 };
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800116};
117
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200118&gpio1 {
119 gpio-line-names = "rs485_term", "mipi_gpio4", "", "",
120 "", "", "pci_usb_sel", "dio0",
121 "", "dio1", "", "", "", "", "", "",
122 "", "", "", "", "", "", "", "",
123 "", "", "", "", "", "", "", "";
124};
125
126&gpio4 {
127 gpio-line-names = "rs485_en", "mipi_gpio3", "rs485_hd", "mipi_gpio2",
128 "mipi_gpio1", "", "", "pci_wdis#",
129 "", "", "", "", "", "", "", "",
130 "", "", "", "", "", "", "", "",
131 "", "", "", "", "", "", "", "";
132};
133
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800134&i2c2 {
135 clock-frequency = <400000>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&pinctrl_i2c2>;
138 status = "okay";
139
140 accelerometer@19 {
141 pinctrl-names = "default";
142 pinctrl-0 = <&pinctrl_accel>;
143 compatible = "st,lis2de12";
144 reg = <0x19>;
145 st,drdy-int-pin = <1>;
146 interrupt-parent = <&gpio4>;
147 interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
148 interrupt-names = "INT1";
149 };
150};
151
152/* off-board header */
153&i2c3 {
154 clock-frequency = <400000>;
155 pinctrl-names = "default";
156 pinctrl-0 = <&pinctrl_i2c3>;
157 status = "okay";
158};
159
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200160&pcie_phy {
161 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
162 fsl,clkreq-unsupported;
163 clocks = <&pcie0_refclk>;
164 clock-names = "ref";
165 status = "okay";
166};
167
168&pcie0 {
169 pinctrl-names = "default";
170 pinctrl-0 = <&pinctrl_pcie0>;
171 reset-gpio = <&gpio4 6 GPIO_ACTIVE_LOW>;
172 clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>,
173 <&pcie0_refclk>;
174 clock-names = "pcie", "pcie_aux", "pcie_bus";
175 assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
176 <&clk IMX8MM_CLK_PCIE1_CTRL>;
177 assigned-clock-rates = <10000000>, <250000000>;
178 assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
179 <&clk IMX8MM_SYS_PLL2_250M>;
180 status = "okay";
181
182 pcie@0,0 {
183 reg = <0x0000 0 0 0 0>;
184 #address-cells = <1>;
185 #size-cells = <0>;
186
187 pcie@1,0 {
188 reg = <0x0000 0 0 0 0>;
189 #address-cells = <1>;
190 #size-cells = <0>;
191
192 pcie@2,4 {
193 reg = <0x2000 0 0 0 0>;
194 #address-cells = <1>;
195 #size-cells = <0>;
196
197 eth1: pcie@6,0 {
198 reg = <0x0000 0 0 0 0>;
199 #address-cells = <1>;
200 #size-cells = <0>;
201
202 local-mac-address = [00 00 00 00 00 00];
203 };
204 };
205 };
206 };
207};
208
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800209/* off-board header */
210&sai3 {
211 pinctrl-names = "default";
212 pinctrl-0 = <&pinctrl_sai3>;
213 assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
214 assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
215 assigned-clock-rates = <24576000>;
216 status = "okay";
217};
218
219/* GPS */
220&uart1 {
221 pinctrl-names = "default";
222 pinctrl-0 = <&pinctrl_uart1>;
223 status = "okay";
224};
225
226/* bluetooth HCI */
227&uart3 {
228 pinctrl-names = "default";
229 pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_bten>;
230 cts-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
231 rts-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200232 uart-has-rtscts;
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800233 status = "okay";
234
235 bluetooth {
236 compatible = "brcm,bcm4330-bt";
237 shutdown-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
238 };
239};
240
241/* RS232 */
242&uart4 {
243 pinctrl-names = "default";
244 pinctrl-0 = <&pinctrl_uart4>;
245 status = "okay";
246};
247
248&usbotg1 {
249 dr_mode = "otg";
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200250 over-current-active-low;
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800251 vbus-supply = <&reg_usb_otg1_vbus>;
252 status = "okay";
253};
254
255&usbotg2 {
256 dr_mode = "host";
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200257 disable-over-current;
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800258 vbus-supply = <&reg_usb_otg2_vbus>;
259 status = "okay";
260};
261
262/* SDIO WiFi */
263&usdhc1 {
264 pinctrl-names = "default";
265 pinctrl-0 = <&pinctrl_usdhc1>;
266 bus-width = <4>;
267 non-removable;
268 vmmc-supply = <&reg_wifi_en>;
269 status = "okay";
270};
271
272/* microSD */
273&usdhc2 {
274 pinctrl-names = "default", "state_100mhz", "state_200mhz";
275 pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
276 pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
277 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
278 cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
279 bus-width = <4>;
280 vmmc-supply = <&reg_3p3v>;
281 status = "okay";
282};
283
284&iomuxc {
285 pinctrl-names = "default";
286 pinctrl-0 = <&pinctrl_hog>;
287
288 pinctrl_hog: hoggrp {
289 fsl,pins = <
290 MX8MM_IOMUXC_SPDIF_TX_GPIO5_IO3 0x40000041 /* PLUG_TEST */
291 MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x40000041 /* PCI_USBSEL */
292 MX8MM_IOMUXC_SAI1_RXD5_GPIO4_IO7 0x40000041 /* PCIE_WDIS# */
293 MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x40000041 /* DIO0 */
294 MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x40000041 /* DIO1 */
295 MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x40000104 /* RS485_TERM */
296 MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0x40000104 /* RS485 */
297 MX8MM_IOMUXC_SAI1_RXD0_GPIO4_IO2 0x40000104 /* RS485_HALF */
298 >;
299 };
300
301 pinctrl_accel: accelgrp {
302 fsl,pins = <
303 MX8MM_IOMUXC_SAI1_RXD3_GPIO4_IO5 0x159
304 >;
305 };
306
307 pinctrl_bten: btengrp {
308 fsl,pins = <
309 MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41
310 >;
311 };
312
313 pinctrl_gpio_leds: gpioledgrp {
314 fsl,pins = <
315 MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x19
316 MX8MM_IOMUXC_SPDIF_RX_GPIO5_IO4 0x19
317 >;
318 };
319
320 pinctrl_i2c3: i2c3grp {
321 fsl,pins = <
322 MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3
323 MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3
324 >;
325 };
326
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200327 pinctrl_pcie0: pcie0grp {
328 fsl,pins = <
329 MX8MM_IOMUXC_SAI1_RXD4_GPIO4_IO6 0x41
330 >;
331 };
332
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800333 pinctrl_pps: ppsgrp {
334 fsl,pins = <
335 MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x41
336 >;
337 };
338
339 pinctrl_reg_wl: regwlgrp {
340 fsl,pins = <
341 MX8MM_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x41
342 >;
343 };
344
345 pinctrl_reg_usb1_en: regusb1grp {
346 fsl,pins = <
347 MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x41
348 MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x41
349 >;
350 };
351
352 pinctrl_reg_usb2_en: regusb2grp {
353 fsl,pins = <
354 MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x41
355 >;
356 };
357
358 pinctrl_sai3: sai3grp {
359 fsl,pins = <
360 MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
361 MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
362 MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
363 MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
364 MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
365 >;
366 };
367
368 pinctrl_spi2: spi2grp {
369 fsl,pins = <
370 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
371 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
Marcel Ziswilerca453f22022-07-21 15:27:40 +0200372 MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800373 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
Tim Harvey66cc07c2023-10-18 11:33:38 -0700374 MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0xd6
Tim Harvey5fe2ef02021-03-02 14:00:20 -0800375 >;
376 };
377
378 pinctrl_uart1: uart1grp {
379 fsl,pins = <
380 MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
381 MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
382 >;
383 };
384
385 pinctrl_uart3: uart3grp {
386 fsl,pins = <
387 MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
388 MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
389 MX8MM_IOMUXC_ECSPI1_MISO_GPIO5_IO8 0x140
390 MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x140
391 >;
392 };
393
394 pinctrl_uart4: uart4grp {
395 fsl,pins = <
396 MX8MM_IOMUXC_UART4_RXD_UART4_DCE_RX 0x140
397 MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX 0x140
398 >;
399 };
400
401 pinctrl_usdhc1: usdhc1grp {
402 fsl,pins = <
403 MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190
404 MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0
405 MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0
406 MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0
407 MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0
408 MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0
409 >;
410 };
411
412 pinctrl_usdhc2: usdhc2grp {
413 fsl,pins = <
414 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
415 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
416 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
417 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
418 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
419 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
420 >;
421 };
422
423 pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
424 fsl,pins = <
425 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
426 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
427 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
428 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
429 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
430 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
431 >;
432 };
433
434 pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
435 fsl,pins = <
436 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
437 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
438 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
439 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
440 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
441 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
442 >;
443 };
444
445 pinctrl_usdhc2_gpio: usdhc2gpiogrp {
446 fsl,pins = <
447 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x1c4
448 MX8MM_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0x1d0
449 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
450 >;
451 };
452};