xref: /linux/arch/arm64/boot/dts/freescale/imx8mm-phygate-tauri-l.dts (revision 6315d93541f8a5f77c5ef5c4f25233e66d189603)
1// 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>
10#include <dt-bindings/phy/phy-imx8-pcie.h>
11#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 {
124		compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
125		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
189&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
198&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	interrupt-parent = <&gpio1>;
219	interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
220	pinctrl-0 = <&pinctrl_rtc>;
221	pinctrl-names = "default";
222	aux-voltage-chargeable = <1>;
223	trickle-resistor-ohms = <3000>;
224	wakeup-source;
225};
226
227&uart1 {
228	assigned-clocks = <&clk IMX8MM_CLK_UART1>;
229	assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
230	pinctrl-names = "default";
231	pinctrl-0 = <&pinctrl_uart1>;
232	status = "okay";
233};
234
235/* UART2 - RS232 */
236&uart2 {
237	assigned-clocks = <&clk IMX8MM_CLK_UART2>;
238	assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
239	pinctrl-names = "default";
240	pinctrl-0 = <&pinctrl_uart2>;
241	status = "okay";
242};
243
244/* UART - console */
245&uart3 {
246	pinctrl-names = "default";
247	pinctrl-0 = <&pinctrl_uart3>;
248	status = "okay";
249};
250
251/* USB */
252&usbotg1 {
253	adp-disable;
254	dr_mode = "otg";
255	over-current-active-low;
256	samsung,picophy-pre-emp-curr-control = <3>;
257	samsung,picophy-dc-vol-level-adjust = <7>;
258	pinctrl-names = "default";
259	pinctrl-0 = <&pinctrl_usbotg1>;
260	srp-disable;
261	vbus-supply = <&reg_usb_otg1_vbus>;
262	status = "okay";
263};
264
265&usbotg2 {
266	disable-over-current;
267	dr_mode = "host";
268	samsung,picophy-pre-emp-curr-control = <3>;
269	samsung,picophy-dc-vol-level-adjust = <7>;
270	vbus-supply = <&reg_usb_hub_vbus>;
271	status = "okay";
272};
273
274/* SD-Card */
275&usdhc2 {
276	assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
277	assigned-clock-rates = <200000000>;
278	bus-width = <4>;
279	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
280	disable-wp;
281	pinctrl-names = "default", "state_100mhz", "state_200mhz";
282	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
283	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
284	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
285	vmmc-supply = <&reg_usdhc2_vmmc>;
286	vqmmc-supply = <&reg_nvcc_sd2>;
287	status = "okay";
288};
289
290&iomuxc {
291	pinctrl_can_int: can-intgrp {
292		fsl,pins = <
293			MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8	0x00
294		>;
295	};
296
297	pinctrl_ecspi1: ecspi1grp {
298		fsl,pins = <
299			MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO	0x82
300			MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI	0x82
301			MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK	0x82
302		>;
303	};
304
305	pinctrl_ecspi1_cs: ecspi1csgrp {
306		fsl,pins = <
307			MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9	0x00
308			MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13	0x00
309			MX8MM_IOMUXC_SAI3_MCLK_GPIO5_IO2	0x00
310		>;
311	};
312
313	pinctrl_gpiokeys: keygrp {
314		fsl,pins = <
315			MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9	0x00
316		>;
317	};
318
319	pinctrl_i2c2: i2c2grp {
320		fsl,pins = <
321			MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL	0x400001c2
322			MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA	0x400001c2
323		>;
324	};
325
326	pinctrl_i2c2_gpio: i2c2gpiogrp {
327		fsl,pins = <
328			MX8MM_IOMUXC_I2C2_SDA_GPIO5_IO17		0x1e0
329			MX8MM_IOMUXC_I2C2_SCL_GPIO5_IO16		0x1e0
330		>;
331	};
332
333
334	pinctrl_i2c3: i2c3grp {
335		fsl,pins = <
336			MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL	0x400001c2
337			MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA	0x400001c2
338		>;
339	};
340
341	pinctrl_i2c3_gpio: i2c3gpiogrp {
342		fsl,pins = <
343			MX8MM_IOMUXC_I2C3_SDA_GPIO5_IO19		0x1e0
344			MX8MM_IOMUXC_I2C3_SCL_GPIO5_IO18		0x1e0
345		>;
346	};
347
348	pinctrl_i2c4: i2c4grp {
349		fsl,pins = <
350			MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL	0x400001c2
351			MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA	0x400001c2
352		>;
353	};
354
355	pinctrl_i2c4_gpio: i2c4gpiogrp {
356		fsl,pins = <
357			MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21		0x1e0
358			MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20		0x1e0
359		>;
360	};
361
362	pinctrl_leds: leds1grp {
363		fsl,pins = <
364			MX8MM_IOMUXC_SAI3_RXD_GPIO4_IO30	0x00
365			MX8MM_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5	0x00
366		>;
367	};
368
369	pinctrl_pcie: pciegrp {
370		fsl,pins = <
371			/* COEX2 */
372			MX8MM_IOMUXC_SAI5_RXD1_GPIO3_IO22	0x00
373			/* COEX1 */
374			MX8MM_IOMUXC_SAI1_TXD0_GPIO4_IO12	0x12
375		>;
376	};
377
378	pinctrl_pwm1: pwm1grp {
379		fsl,pins = <
380			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x40
381		>;
382	};
383
384	pinctrl_pwm3: pwm3grp {
385		fsl,pins = <
386			MX8MM_IOMUXC_SPDIF_TX_PWM3_OUT		0x40
387		>;
388	};
389
390	pinctrl_pwm4: pwm4grp {
391		fsl,pins = <
392			MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT	0x40
393		>;
394	};
395
396	pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
397		fsl,pins = <
398			MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19     0x40
399		>;
400	};
401
402	pinctrl_rtc: rtcgrp {
403		fsl,pins = <
404			MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3		0x1c0
405		>;
406	};
407
408	pinctrl_tempsense: tempsensegrp {
409		fsl,pins = <
410			MX8MM_IOMUXC_SAI3_TXFS_GPIO4_IO31	0x00
411		>;
412	};
413
414	pinctrl_tpm: tpmgrp {
415		fsl,pins = <
416			MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11	0x140
417		>;
418	};
419
420	pinctrl_uart1: uart1grp {
421		fsl,pins = <
422			MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX	0x00
423			MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX	0x00
424		>;
425	};
426
427	pinctrl_uart2: uart2grp {
428		fsl,pins = <
429			MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX	0x00
430			MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX	0x00
431		>;
432	};
433
434	pinctrl_uart3: uart3grp {
435		fsl,pins = <
436			MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX	0x140
437			MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX	0x140
438		>;
439	};
440
441	pinctrl_usbhubpwr: usbhubpwrgrp {
442		fsl,pins = <
443			MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14	0x00
444		>;
445	};
446
447	pinctrl_usbotg1pwr: usbotg1pwrgrp {
448		fsl,pins = <
449			MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12	0x00
450		>;
451	};
452
453	pinctrl_usbotg1: usbotg1grp {
454		fsl,pins = <
455			MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC	0x80
456		>;
457	};
458
459	pinctrl_usdhc1: usdhc1grp {
460		fsl,pins = <
461			MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK		0x182
462			MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD		0xc6
463			MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0	0xc6
464			MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1	0xc6
465			MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2	0xc6
466			MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3	0xc6
467		>;
468	};
469
470	pinctrl_usdhc2_gpio: usdhc2gpiogrp {
471		fsl,pins = <
472			MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12	0x40
473		>;
474	};
475
476	pinctrl_usdhc2: usdhc2grp {
477		fsl,pins = <
478			MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT	0x1d0
479			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK		0x192
480			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD		0x1d2
481			MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0	0x1d2
482			MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1	0x1d2
483			MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2	0x1d2
484			MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3	0x1d2
485		>;
486	};
487
488	pinctrl_usdhc2_100mhz: usdhc2100mhzgrp {
489		fsl,pins = <
490			MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT	0x1d0
491			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK		0x194
492			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD		0x1d4
493			MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0	0x1d4
494			MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1	0x1d4
495			MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2	0x1d4
496			MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3	0x1d4
497		>;
498	};
499
500	pinctrl_usdhc2_200mhz: usdhc2200mhzgrp {
501		fsl,pins = <
502			MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT	0x1d0
503			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK		0x196
504			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD		0x1d6
505			MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0	0x1d6
506			MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1	0x1d6
507			MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2	0x1d6
508			MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3	0x1d6
509		>;
510	};
511};
512