xref: /linux/scripts/dtc/include-prefixes/arm64/freescale/imx95-verdin-zinnia.dtsi (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright (c) Toradex
4 *
5 * Common dtsi for Verdin iMX95 SoM on Zinnia carrier board
6 *
7 * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx95
8 * https://www.toradex.com/products/carrier-board/zinnia-carrier-board
9 */
10
11#include <dt-bindings/leds/common.h>
12#include <dt-bindings/net/ti-dp83867.h>
13
14/ {
15	aliases {
16		eeprom1 = &carrier_eeprom;
17	};
18
19	leds {
20		compatible = "gpio-leds";
21		pinctrl-names = "default";
22		pinctrl-0 = <&pinctrl_zinnia_leds>;
23
24		/* LED1 Red - SODIMM 48 - LED1_R */
25		led-1 {
26			color = <LED_COLOR_ID_RED>;
27			default-state = "off";
28			function = LED_FUNCTION_STATUS;
29			function-enumerator = <1>;
30			gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>;
31		};
32
33		/* LED1 Blue - SODIMM 46 - LED1_B */
34		led-2 {
35			color = <LED_COLOR_ID_BLUE>;
36			default-state = "off";
37			function = LED_FUNCTION_STATUS;
38			function-enumerator = <1>;
39			gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
40		};
41
42		/* LED3 Red - SODIMM 44 - LED3_R */
43		led-3 {
44			color = <LED_COLOR_ID_RED>;
45			default-state = "off";
46			function = LED_FUNCTION_STATUS;
47			function-enumerator = <3>;
48			gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
49		};
50
51		/* LED3 Green - SODIMM 54 - LED3_G */
52		led-4 {
53			color = <LED_COLOR_ID_GREEN>;
54			default-state = "off";
55			function = LED_FUNCTION_STATUS;
56			function-enumerator = <3>;
57			gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;
58		};
59
60		/* LED3 Blue - SODIMM 36 - LED3_B */
61		led-5 {
62			color = <LED_COLOR_ID_BLUE>;
63			default-state = "off";
64			function = LED_FUNCTION_STATUS;
65			function-enumerator = <3>;
66			gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
67		};
68
69		/* LED4 Red - SODIMM 34 - LED4_R */
70		led-6 {
71			color = <LED_COLOR_ID_RED>;
72			default-state = "off";
73			function = LED_FUNCTION_STATUS;
74			function-enumerator = <4>;
75			gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
76		};
77
78		/* LED4 Green - SODIMM 32 - LED4_G */
79		led-7 {
80			color = <LED_COLOR_ID_GREEN>;
81			default-state = "off";
82			function = LED_FUNCTION_STATUS;
83			function-enumerator = <4>;
84			gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
85		};
86
87		/* LED4 Blue - SODIMM 30 - LED4_B */
88		led-8 {
89			color = <LED_COLOR_ID_BLUE>;
90			default-state = "off";
91			function = LED_FUNCTION_STATUS;
92			function-enumerator = <4>;
93			gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
94		};
95	};
96
97	/* Zinnia Power Supply Input Voltage */
98	zinnia-1v8-voltage {
99		compatible = "voltage-divider";
100		full-ohms = <39000>; /* 12k + 27k */
101		/* Verdin ADC_4 */
102		io-channels = <&adc1 3>;
103		output-ohms = <27000>;
104	};
105
106	zinnia-3v3-voltage {
107		compatible = "voltage-divider";
108		full-ohms = <54000>; /* 27k + 27k */
109		/* Verdin ADC_3 */
110		io-channels = <&adc1 2>;
111		output-ohms = <27000>;
112	};
113
114	zinnia-5v-voltage {
115		compatible = "voltage-divider";
116		full-ohms = <39000>; /* 27k + 12k */
117		/* Verdin ADC_2 */
118		io-channels = <&adc1 1>;
119		output-ohms = <12000>;
120	};
121
122	zinnia-input-voltage {
123		compatible = "voltage-divider";
124		full-ohms = <204700>; /* 200k + 4.7k */
125		/* Verdin ADC_1 */
126		io-channels = <&adc1 0>;
127		output-ohms = <4700>;
128	};
129};
130
131/* Verdin ADC_1, ADC_2, ADC_3 and ADC_4 */
132&adc1 {
133	status = "okay";
134};
135
136/* Verdin ETH_1 (On-module PHY) */
137&enetc_port0 {
138	status = "okay";
139};
140
141/* Verdin ETH_2_RGMII */
142&enetc_port1 {
143	phy-handle = <&ethphy2>;
144	phy-mode = "rgmii-id";
145
146	status = "okay";
147};
148
149/* Verdin CAN_1 */
150&flexcan1 {
151	status = "okay";
152};
153
154&gpio1 {
155	gpio-line-names =
156		"",
157		"",
158		"",
159		"",
160		"",
161		"",
162		"",
163		"",
164		"",
165		"",
166		"", /* 10 */
167		"",
168		"",
169		"",
170		"",
171		"";
172};
173
174&gpio2 {
175	pinctrl-names = "default";
176	pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>, <&pinctrl_gpio3>;
177	gpio-line-names =
178		"DO1_EN", /* SODIMM 206 */ /* 0 */
179		"",
180		"",
181		"",
182		"",
183		"",
184		"",
185		"",
186		"",
187		"",
188		"", /* 10 */
189		"",
190		"",
191		"",
192		"",
193		"",
194		"",
195		"",
196		"DI1_EN", /* SODIMM 208 */
197		"",
198		"", /* 20 */
199		"",
200		"",
201		"",
202		"DI1_RB", /* SODIMM 210 */
203		"",
204		"",
205		"",
206		"",
207		"",
208		"", /* 30 */
209		"";
210};
211
212&gpio3 {
213	pinctrl-names = "default";
214	pinctrl-0 = <&pinctrl_gpio6>;
215	gpio-line-names =
216		"", /* 0 */
217		"",
218		"",
219		"",
220		"",
221		"",
222		"",
223		"",
224		"",
225		"",
226		"", /* 10 */
227		"",
228		"",
229		"",
230		"",
231		"",
232		"",
233		"",
234		"",
235		"",
236		"", /* 20 */
237		"",
238		"",
239		"",
240		"",
241		"",
242		"",
243		"DI2_EN", /* SODIMM 218 */
244		"",
245		"",
246		"", /* 30 */
247		"";
248};
249
250&gpio4 {
251	pinctrl-names = "default";
252	pinctrl-0 = <&pinctrl_gpio5>;
253	gpio-line-names =
254		"",
255		"",
256		"",
257		"",
258		"",
259		"",
260		"",
261		"",
262		"",
263		"",
264		"", /* 10 */
265		"",
266		"",
267		"",
268		"",
269		"",
270		"",
271		"",
272		"",
273		"",
274		"", /* 20 */
275		"",
276		"",
277		"",
278		"",
279		"",
280		"",
281		"",
282		"DI2_RB", /* SODIMM 216 */
283		"";
284};
285
286&gpio5 {
287	pinctrl-names = "default";
288	pinctrl-0 = <&pinctrl_gpio4>, <&pinctrl_qspi1_io0_gpio>;
289	gpio-line-names =
290		"DI3_RB", /* SODIMM 56 */ /* 0 */
291		"",
292		"",
293		"",
294		"",
295		"",
296		"",
297		"",
298		"",
299		"",
300		"", /* 10 */
301		"",
302		"DO2_EN", /* SODIMM 212 */
303		"",
304		"",
305		"",
306		"",
307		"";
308};
309
310/* Verdin I2C_1 */
311&lpi2c4 {
312	status = "okay";
313
314	temperature-sensor@4f {
315		compatible = "ti,tmp1075";
316		reg = <0x4f>;
317	};
318
319	carrier_eeprom: eeprom@57 {
320		compatible = "st,24c02", "atmel,24c02";
321		reg = <0x57>;
322		pagesize = <16>;
323	};
324};
325
326/* Verdin SPI_1 */
327&lpspi6 {
328	pinctrl-names = "default";
329	pinctrl-0 = <&pinctrl_lpspi6>,
330		    <&pinctrl_spi1_cs>,
331		    <&pinctrl_uart8_cts_gpio>;
332	cs-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>,
333		   <&som_gpio_expander 13 GPIO_ACTIVE_LOW>,
334		   <&gpio4 29 GPIO_ACTIVE_LOW>;
335
336	tpm@2 {
337		compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
338		reg = <2>;
339		spi-max-frequency = <18500000>;
340	};
341};
342
343/* Verdin UART_3, used as the Linux console */
344&lpuart1 {
345	status = "okay";
346};
347
348/* Verdin UART_1 */
349&lpuart7 {
350	status = "okay";
351};
352
353/* Verdin UART_2, through RS485 transceiver */
354&lpuart8 {
355	pinctrl-names = "default";
356	pinctrl-0 = <&pinctrl_uart8>, <&pinctrl_uart8_rts>;
357	rs485-rx-during-tx;
358	linux,rs485-enabled-at-boot-time;
359
360	status = "okay";
361};
362
363&netc_emdio {
364	ethphy2: ethernet-phy@2 {
365		reg = <2>;
366		pinctrl-names = "default";
367		pinctrl-0 = <&pinctrl_eth2_rgmii_int>;
368		interrupt-parent = <&gpio1>;
369		interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
370		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
371		ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
372	};
373};
374
375&som_gpio_expander {
376	gpio-line-names =
377		"DO3_EN", /* SODIMM 220 */
378		"DI3_EN", /* SODIMM 222 */
379		"",
380		"",
381		"",
382		"",
383		"",
384		"",
385		"",
386		"",
387		"", /* 10 */
388		"",
389		"",
390		"",
391		"",
392		"";
393};
394
395/* Verdin USB_1 */
396&usb2 {
397	status = "okay";
398};
399
400/* Verdin USB_2 */
401&usb3 {
402	status = "okay";
403};
404
405&usb3_phy {
406	status = "okay";
407};
408
409/* Verdin SD_1 */
410&usdhc2 {
411	status = "okay";
412};
413
414&scmi_iomuxc {
415	pinctrl_uart8_cts_gpio: uart8ctsgrp {
416		fsl,pins = <IMX95_PAD_GPIO_IO14__GPIO2_IO_BIT14	0x51e>; /* SODIMM 143 */
417	};
418
419	pinctrl_zinnia_leds: zinnialedsgrp {
420		fsl,pins = <IMX95_PAD_GPIO_IO16__GPIO2_IO_BIT16		0x11e>, /* SODIMM 30 */
421			   <IMX95_PAD_GPIO_IO26__GPIO2_IO_BIT26		0x11e>, /* SODIMM 32 */
422			   <IMX95_PAD_GPIO_IO21__GPIO2_IO_BIT21		0x11e>, /* SODIMM 34 */
423			   <IMX95_PAD_GPIO_IO20__GPIO2_IO_BIT20		0x11e>, /* SODIMM 36 */
424			   <IMX95_PAD_XSPI1_DATA5__GPIO5_IO_BIT5	0x11e>, /* SODIMM 44 */
425			   <IMX95_PAD_XSPI1_DATA4__GPIO5_IO_BIT4	0x11e>, /* SODIMM 46 */
426			   <IMX95_PAD_XSPI1_DATA7__GPIO5_IO_BIT7	0x11e>, /* SODIMM 48 */
427			   <IMX95_PAD_XSPI1_SS0_B__GPIO5_IO_BIT10	0x11e>; /* SODIMM 54 */
428	};
429};
430