blob: ba6ce3c7f4779da8f91081083c43459f71cff298 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2023 PHYTEC Messtechnik GmbH
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/input/linux-event-codes.h>
9#include <dt-bindings/leds/common.h>
Tom Rini6b642ac2024-10-01 12:20:28 -060010#include <dt-bindings/phy/phy-imx8-pcie.h>
Tom Rini53633a82024-02-29 12:33:36 -050011#include "imx8mm-phycore-som.dtsi"
12
13/ {
14 model = "PHYTEC phyGATE-Tauri-L-iMX8MM";
15 compatible = "phytec,imx8mm-phygate-tauri-l",
16 "phytec,imx8mm-phycore-som", "fsl,imx8mm";
17
18 chosen {
19 stdout-path = &uart3;
20 };
21
22 can_osc_40m: clock-can {
23 compatible = "fixed-clock";
24 clock-frequency = <40000000>;
25 clock-output-names = "can_osc_40m";
26 #clock-cells = <0>;
27 };
28
29 gpio-keys {
30 compatible = "gpio-keys";
31 pinctrl-names = "default";
32 pinctrl-0 = <&pinctrl_gpiokeys>;
33
34 key {
35 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
36 label = "KEY-A";
37 linux,code = <KEY_A>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_leds>;
45
46 led-1 {
47 color = <LED_COLOR_ID_RED>;
48 gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
49 linux,default-trigger = "none";
50 };
51
52 led-2 {
53 color = <LED_COLOR_ID_YELLOW>;
54 gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
55 linux,default-trigger = "none";
56 };
57 };
58
59 usdhc1_pwrseq: pwr-seq {
60 compatible = "mmc-pwrseq-simple";
61 post-power-on-delay-ms = <100>;
62 power-off-delay-us = <60>;
63 reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
64 };
65
66 reg_usb_hub_vbus: regulator-hub-otg1 {
67 compatible = "regulator-fixed";
68 gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
69 enable-active-high;
70 pinctrl-names = "default";
71 pinctrl-0 = <&pinctrl_usbhubpwr>;
72 regulator-name = "usb_hub_vbus";
73 regulator-max-microvolt = <5000000>;
74 regulator-min-microvolt = <5000000>;
75 };
76
77 reg_usb_otg1_vbus: regulator-usb-otg1 {
78 compatible = "regulator-fixed";
79 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
80 enable-active-high;
81 pinctrl-names = "default";
82 pinctrl-0 = <&pinctrl_usbotg1pwr>;
83 regulator-name = "usb_otg1_vbus";
84 regulator-max-microvolt = <5000000>;
85 regulator-min-microvolt = <5000000>;
86 };
87
88 reg_usdhc2_vmmc: regulator-usdhc2 {
89 compatible = "regulator-fixed";
90 gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
91 enable-active-high;
92 off-on-delay-us = <20000>;
93 pinctrl-names = "default";
94 pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
95 regulator-max-microvolt = <3300000>;
96 regulator-min-microvolt = <3300000>;
97 regulator-name = "VSD_3V3";
98 };
99};
100
101&ecspi1 {
102 cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>,
103 <&gpio5 13 GPIO_ACTIVE_LOW>,
104 <&gpio5 2 GPIO_ACTIVE_LOW>;
105 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_ecspi1_cs>;
107 #address-cells = <1>;
108 #size-cells = <0>;
109 status = "okay";
110
111 /* CAN MCP251XFD */
112 can0: can@0 {
113 compatible = "microchip,mcp251xfd";
114 reg = <0>;
115 clocks = <&can_osc_40m>;
116 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
117 interrupt-parent = <&gpio1>;
118 pinctrl-names = "default";
119 pinctrl-0 = <&pinctrl_can_int>;
120 spi-max-frequency = <10000000>;
121 };
122
123 tpm: tpm@1 {
Tom Rini93743d22024-04-01 09:08:13 -0400124 compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
Tom Rini53633a82024-02-29 12:33:36 -0500125 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
126 interrupt-parent = <&gpio2>;
127 pinctrl-names = "default";
128 pinctrl-0 = <&pinctrl_tpm>;
129 reg = <1>;
130 spi-max-frequency = <38000000>;
131 };
132};
133
134&i2c2 {
135 clock-frequency = <400000>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&pinctrl_i2c2>;
138 pinctrl-1 = <&pinctrl_i2c2_gpio>;
139 scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
140 sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
141 status = "okay";
142
143 temp_sense0: temperature-sensor@49 {
144 compatible = "ti,tmp102";
145 reg = <0x49>;
146 interrupt-parent = <&gpio4>;
147 interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
148 pinctrl-names = "default";
149 pinctrl-0 = <&pinctrl_tempsense>;
150 #thermal-sensor-cells = <1>;
151 };
152};
153
154&i2c3 {
155 clock-frequency = <400000>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&pinctrl_i2c3>;
158 pinctrl-1 = <&pinctrl_i2c3_gpio>;
159 scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
160 sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
161 status = "okay";
162};
163
164&i2c4 {
165 clock-frequency = <400000>;
166 pinctrl-names = "default";
167 pinctrl-0 = <&pinctrl_i2c4>;
168 pinctrl-1 = <&pinctrl_i2c4_gpio>;
169 scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
170 sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
171 status = "okay";
172};
173
174/* PCIe */
175&pcie0 {
176 assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
177 <&clk IMX8MM_CLK_PCIE1_PHY>,
178 <&clk IMX8MM_CLK_PCIE1_CTRL>;
179 assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
180 <&clk IMX8MM_SYS_PLL2_100M>,
181 <&clk IMX8MM_SYS_PLL2_250M>;
182 assigned-clock-rates = <10000000>, <100000000>, <250000000>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&pinctrl_pcie>;
185 reset-gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
186 status = "okay";
187};
188
Tom Rini6b642ac2024-10-01 12:20:28 -0600189&pcie_phy {
190 clocks = <&clk IMX8MM_CLK_PCIE1_PHY>;
191 fsl,clkreq-unsupported;
192 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
193 fsl,tx-deemph-gen1 = <0x2d>;
194 fsl,tx-deemph-gen2 = <0xf>;
195 status = "okay";
196};
197
Tom Rini53633a82024-02-29 12:33:36 -0500198&pwm1 {
199 pinctrl-names = "default";
200 pinctrl-0 = <&pinctrl_pwm1>;
201 status = "okay";
202};
203
204&pwm3 {
205 pinctrl-names = "default";
206 pinctrl-0 = <&pinctrl_pwm3>;
207 status = "okay";
208};
209
210&pwm4 {
211 pinctrl-names = "default";
212 pinctrl-0 = <&pinctrl_pwm4>;
213 status = "okay";
214};
215
216/* RTC */
217&rv3028 {
218 trickle-resistor-ohms = <3000>;
219};
220
221&uart1 {
222 assigned-clocks = <&clk IMX8MM_CLK_UART1>;
223 assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
224 pinctrl-names = "default";
225 pinctrl-0 = <&pinctrl_uart1>;
226 status = "okay";
227};
228
229/* UART2 - RS232 */
230&uart2 {
231 assigned-clocks = <&clk IMX8MM_CLK_UART2>;
232 assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
233 pinctrl-names = "default";
234 pinctrl-0 = <&pinctrl_uart2>;
235 status = "okay";
236};
237
238/* UART - console */
239&uart3 {
240 pinctrl-names = "default";
241 pinctrl-0 = <&pinctrl_uart3>;
242 status = "okay";
243};
244
245/* USB */
246&usbotg1 {
247 adp-disable;
248 dr_mode = "otg";
249 over-current-active-low;
250 samsung,picophy-pre-emp-curr-control = <3>;
251 samsung,picophy-dc-vol-level-adjust = <7>;
252 pinctrl-names = "default";
253 pinctrl-0 = <&pinctrl_usbotg1>;
254 srp-disable;
255 vbus-supply = <&reg_usb_otg1_vbus>;
256 status = "okay";
257};
258
259&usbotg2 {
260 disable-over-current;
261 dr_mode = "host";
262 samsung,picophy-pre-emp-curr-control = <3>;
263 samsung,picophy-dc-vol-level-adjust = <7>;
264 vbus-supply = <&reg_usb_hub_vbus>;
265 status = "okay";
266};
267
268/* SD-Card */
269&usdhc2 {
270 assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
271 assigned-clock-rates = <200000000>;
272 bus-width = <4>;
273 cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
274 disable-wp;
275 pinctrl-names = "default", "state_100mhz", "state_200mhz";
276 pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
277 pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
278 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
279 vmmc-supply = <&reg_usdhc2_vmmc>;
280 vqmmc-supply = <&reg_nvcc_sd2>;
281 status = "okay";
282};
283
284&iomuxc {
285 pinctrl_can_int: can-intgrp {
286 fsl,pins = <
287 MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x00
288 >;
289 };
290
291 pinctrl_ecspi1: ecspi1grp {
292 fsl,pins = <
293 MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x82
294 MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x82
295 MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x82
296 >;
297 };
298
299 pinctrl_ecspi1_cs: ecspi1csgrp {
300 fsl,pins = <
301 MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x00
302 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x00
303 MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2 0x00
304 >;
305 };
306
307 pinctrl_gpiokeys: keygrp {
308 fsl,pins = <
309 MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x00
310 >;
311 };
312
313 pinctrl_i2c2: i2c2grp {
314 fsl,pins = <
315 MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c2
316 MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c2
317 >;
318 };
319
320 pinctrl_i2c2_gpio: i2c2gpiogrp {
321 fsl,pins = <
322 MX8MM_IOMUXC_I2C2_SDA_GPIO5_IO17 0x1e0
323 MX8MM_IOMUXC_I2C2_SCL_GPIO5_IO16 0x1e0
324 >;
325 };
326
327
328 pinctrl_i2c3: i2c3grp {
329 fsl,pins = <
330 MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c2
331 MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c2
332 >;
333 };
334
335 pinctrl_i2c3_gpio: i2c3gpiogrp {
336 fsl,pins = <
337 MX8MM_IOMUXC_I2C3_SDA_GPIO5_IO19 0x1e0
338 MX8MM_IOMUXC_I2C3_SCL_GPIO5_IO18 0x1e0
339 >;
340 };
341
342 pinctrl_i2c4: i2c4grp {
343 fsl,pins = <
344 MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c2
345 MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c2
346 >;
347 };
348
349 pinctrl_i2c4_gpio: i2c4gpiogrp {
350 fsl,pins = <
351 MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0x1e0
352 MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20 0x1e0
353 >;
354 };
355
356 pinctrl_leds: leds1grp {
357 fsl,pins = <
358 MX8MM_IOMUXC_SAI3_RXD_GPIO4_IO30 0x00
359 MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x00
360 >;
361 };
362
363 pinctrl_pcie: pciegrp {
364 fsl,pins = <
365 /* COEX2 */
366 MX8MM_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x00
367 /* COEX1 */
368 MX8MM_IOMUXC_SAI1_TXD0_GPIO4_IO12 0x12
369 >;
370 };
371
372 pinctrl_pwm1: pwm1grp {
373 fsl,pins = <
374 MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x40
375 >;
376 };
377
378 pinctrl_pwm3: pwm3grp {
379 fsl,pins = <
380 MX8MM_IOMUXC_SPDIF_TX_PWM3_OUT 0x40
381 >;
382 };
383
384 pinctrl_pwm4: pwm4grp {
385 fsl,pins = <
386 MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT 0x40
387 >;
388 };
389
390 pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
391 fsl,pins = <
392 MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x40
393 >;
394 };
395
396 pinctrl_tempsense: tempsensegrp {
397 fsl,pins = <
398 MX8MM_IOMUXC_SAI3_TXFS_GPIO4_IO31 0x00
399 >;
400 };
401
402 pinctrl_tpm: tpmgrp {
403 fsl,pins = <
404 MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x140
405 >;
406 };
407
408 pinctrl_uart1: uart1grp {
409 fsl,pins = <
410 MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x00
411 MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x00
412 >;
413 };
414
415 pinctrl_uart2: uart2grp {
416 fsl,pins = <
417 MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x00
418 MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x00
419 >;
420 };
421
422 pinctrl_uart3: uart3grp {
423 fsl,pins = <
424 MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
425 MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
426 >;
427 };
428
429 pinctrl_usbhubpwr: usbhubpwrgrp {
430 fsl,pins = <
431 MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x00
432 >;
433 };
434
435 pinctrl_usbotg1pwr: usbotg1pwrgrp {
436 fsl,pins = <
437 MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x00
438 >;
439 };
440
441 pinctrl_usbotg1: usbotg1grp {
442 fsl,pins = <
443 MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x80
444 >;
445 };
446
447 pinctrl_usdhc1: usdhc1grp {
448 fsl,pins = <
449 MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x182
450 MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0xc6
451 MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc6
452 MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc6
453 MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc6
454 MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc6
455 >;
456 };
457
458 pinctrl_usdhc2_gpio: usdhc2gpiogrp {
459 fsl,pins = <
460 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x40
461 >;
462 };
463
464 pinctrl_usdhc2: usdhc2grp {
465 fsl,pins = <
466 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
467 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x192
468 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d2
469 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d2
470 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d2
471 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d2
472 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d2
473 >;
474 };
475
476 pinctrl_usdhc2_100mhz: usdhc2100mhzgrp {
477 fsl,pins = <
478 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
479 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
480 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
481 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
482 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
483 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
484 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
485 >;
486 };
487
488 pinctrl_usdhc2_200mhz: usdhc2200mhzgrp {
489 fsl,pins = <
490 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
491 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
492 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
493 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
494 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
495 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
496 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
497 >;
498 };
499};