xref: /linux/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright 2022 Toradex
4 */
5
6#include <dt-bindings/leds/common.h>
7
8/ {
9	aliases {
10		rtc0 = &rtc_i2c;
11		rtc1 = &rtc;
12	};
13
14	leds {
15		compatible = "gpio-leds";
16		pinctrl-names = "default";
17		pinctrl-0 = <&pinctrl_leds_ixora>;
18
19		/* LED_4_GREEN / MXM3_188 */
20		led-1 {
21			color = <LED_COLOR_ID_GREEN>;
22			default-state = "off";
23			function = LED_FUNCTION_STATUS;
24			gpios = <&lsio_gpio5 27 GPIO_ACTIVE_HIGH>;
25		};
26
27		/* LED_4_RED / MXM3_178 */
28		led-2 {
29			color = <LED_COLOR_ID_RED>;
30			default-state = "off";
31			function = LED_FUNCTION_STATUS;
32			gpios = <&lsio_gpio5 29 GPIO_ACTIVE_HIGH>;
33		};
34
35		/* LED_5_GREEN / MXM3_152 */
36		led-3 {
37			color = <LED_COLOR_ID_GREEN>;
38			default-state = "off";
39			function = LED_FUNCTION_STATUS;
40			gpios = <&lsio_gpio5 20 GPIO_ACTIVE_HIGH>;
41		};
42
43		/* LED_5_RED / MXM3_156 */
44		led-4 {
45			color = <LED_COLOR_ID_RED>;
46			default-state = "off";
47			function = LED_FUNCTION_STATUS;
48			gpios = <&lsio_gpio5 21 GPIO_ACTIVE_HIGH>;
49		};
50	};
51
52	reg_3v3_vmmc: regulator-3v3-vmmc {
53		compatible = "regulator-fixed";
54		pinctrl-names = "default";
55		pinctrl-0 = <&pinctrl_enable_3v3_vmmc>;
56		/* MMC1_PWR_CTRL */
57		gpio = <&lsio_gpio5 19 GPIO_ACTIVE_HIGH>;
58		enable-active-high;
59		regulator-max-microvolt = <3300000>;
60		regulator-min-microvolt = <3300000>;
61		regulator-name = "3v3_vmmc";
62	};
63
64	reg_can1_supply: regulator-can1-supply {
65		compatible = "regulator-fixed";
66		pinctrl-names = "default";
67		pinctrl-0 = <&pinctrl_enable_can1_power>;
68		gpio = <&lsio_gpio5 22 GPIO_ACTIVE_HIGH>;
69		enable-active-high;
70		regulator-name = "can1_supply";
71		startup-delay-us = <1000>;
72	};
73
74	reg_can2_supply: regulator-can2-supply {
75		compatible = "regulator-fixed";
76		pinctrl-names = "default";
77		pinctrl-0 = <&pinctrl_sata1_act>;
78		gpio = <&lsio_gpio2 8 GPIO_ACTIVE_HIGH>;
79		enable-active-high;
80		regulator-name = "can2_supply";
81		startup-delay-us = <1000>;
82	};
83
84	reg_usb_host_vbus: regulator-usb-host-vbus {
85		regulator-name = "VCC_USBH(2|4)";
86	};
87};
88
89&adc0 {
90	status = "okay";
91};
92
93&adc1 {
94	status = "okay";
95};
96
97&amix {
98	status = "okay";
99};
100
101&asrc0 {
102	status = "okay";
103};
104
105/* TODO: Display Controller */
106
107/* TODO: DPU */
108
109/* Apalis ETH1 */
110&fec1 {
111	status = "okay";
112};
113
114/* Apalis CAN1 */
115&flexcan1 {
116	xceiver-supply = <&reg_can1_supply>;
117	status = "okay";
118};
119
120/* Apalis CAN2 */
121&flexcan2 {
122	xceiver-supply = <&reg_can2_supply>;
123	status = "okay";
124};
125
126/* TODO: GPU */
127
128/* Apalis I2C1 */
129&i2c2 {
130	status = "okay";
131
132	eeprom: eeprom@50 {
133		compatible = "atmel,24c02";
134		reg = <0x50>;
135		pagesize = <16>;
136	};
137
138	/* M41T0M6 real time clock on carrier board */
139	rtc_i2c: rtc@68 {
140		status = "okay";
141	};
142};
143
144/* Apalis I2C3 (CAM) */
145&i2c3 {
146	status = "okay";
147};
148
149&iomuxc {
150	pinctrl-0 = <&pinctrl_cam1_gpios>, <&pinctrl_dap1_gpios>,
151		    <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>,
152		    <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_usbh_oc_n>,
153		    <&pinctrl_lpuart1ctrl>, <&pinctrl_lvds0_i2c0_gpio>,
154		    <&pinctrl_lvds1_i2c0_gpios>, <&pinctrl_mipi_dsi_0_1_en>,
155		    <&pinctrl_mipi_dsi1_gpios>, <&pinctrl_mlb_gpios>,
156		    <&pinctrl_qspi1a_gpios>, <&pinctrl_sim0_gpios>,
157		    <&pinctrl_uart24_forceoff>, <&pinctrl_usdhc1_gpios>;
158
159	/* PMIC MMC1 power-switch */
160	pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp {
161		fsl,pins = <IMX8QM_USDHC1_DATA4_LSIO_GPIO5_IO19	0x00000021>; /* MXM3_148, PMIC */
162	};
163
164	/* FlexCAN PMIC */
165	pinctrl_enable_can1_power: enablecan1powergrp {
166		fsl,pins = <IMX8QM_USDHC1_DATA7_LSIO_GPIO5_IO22	0x00000021>; /* MXM3_158, PMIC */
167	};
168
169	pinctrl_leds_ixora: ledsixoragrp {
170		fsl,pins = <IMX8QM_USDHC2_DATA1_LSIO_GPIO5_IO27	0x06000061>, /* LED_4_GREEN */
171			   <IMX8QM_USDHC2_DATA3_LSIO_GPIO5_IO29	0x06000061>, /* LED_4_RED */
172			   <IMX8QM_USDHC1_DATA5_LSIO_GPIO5_IO20	0x06000061>, /* LED_5_GREEN */
173			   <IMX8QM_USDHC1_DATA6_LSIO_GPIO5_IO21	0x06000061>; /* LED_5_RED */
174	};
175
176	pinctrl_uart24_forceoff: uart24forceoffgrp {
177		fsl,pins = <IMX8QM_USDHC2_CMD_LSIO_GPIO5_IO25		0x00000021>;
178	};
179};
180
181/* Apalis SPI1 */
182&lpspi0 {
183	status = "okay";
184};
185
186/* Apalis SPI2 */
187&lpspi2 {
188	status = "okay";
189};
190
191/* Apalis UART3 */
192&lpuart0 {
193	status = "okay";
194};
195
196/* Apalis UART1 */
197&lpuart1 {
198	status = "okay";
199};
200
201/* Apalis UART4 */
202&lpuart2 {
203	status = "okay";
204};
205
206/* Apalis UART2 */
207&lpuart3 {
208	status = "okay";
209};
210
211&lsio_gpio5 {
212	gpio-line-names = "gpio5-00", "gpio5-01", "gpio5-02", "gpio5-03",
213			  "gpio5-04", "gpio5-05", "gpio5-06", "gpio5-07",
214			  "gpio5-08", "gpio5-09", "gpio5-10", "gpio5-11",
215			  "gpio5-12", "gpio5-13", "gpio5-14", "gpio5-15",
216			  "gpio5-16", "gpio5-17", "gpio5-18", "gpio5-19",
217			  "LED-5-GREEN", "LED-5-RED", "gpio5-22", "gpio5-23",
218			  "gpio5-24", "UART24-FORCEOFF", "gpio5-26",
219			  "LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30",
220			  "gpio5-31";
221};
222
223/* Apalis PWM3, MXM3 pin 6 */
224&lsio_pwm0 {
225	status = "okay";
226};
227
228/* Apalis PWM4, MXM3 pin 8 */
229&lsio_pwm1 {
230	status = "okay";
231};
232
233/* Apalis PWM1, MXM3 pin 2 */
234&lsio_pwm2 {
235	status = "okay";
236};
237
238/* Apalis PWM2, MXM3 pin 4 */
239&lsio_pwm3 {
240	status = "okay";
241};
242
243/* TODO: Apalis PCIE1 */
244
245/* TODO: Apalis BKL1_PWM */
246
247/* Apalis DAP1 */
248&sai1 {
249	status = "okay";
250};
251
252&sai5 {
253	status = "okay";
254};
255
256&sai5_lpcg {
257	status = "okay";
258};
259
260/* TODO: Apalis SATA1 */
261
262/* Apalis SPDIF1 */
263&spdif0 {
264	status = "okay";
265};
266
267/* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */
268
269/* Apalis USBO1 */
270&usbotg1 {
271	status = "okay";
272};
273
274/* Apalis USBH4 SuperSpeed */
275&usbotg3_cdns3 {
276	status = "okay";
277};
278
279/* Apalis MMC1 */
280&usdhc2 {
281	pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>;
282	pinctrl-1 = <&pinctrl_usdhc2_4bit_100mhz>, <&pinctrl_mmc1_cd>;
283	pinctrl-2 = <&pinctrl_usdhc2_4bit_200mhz>, <&pinctrl_mmc1_cd>;
284	pinctrl-3 = <&pinctrl_usdhc2_4bit_sleep>, <&pinctrl_mmc1_cd_sleep>;
285	bus-width = <4>;
286	cap-power-off-card;
287	/delete-property/ no-1-8-v;
288	vmmc-supply = <&reg_3v3_vmmc>;
289	status = "okay";
290};
291