xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/imx/imx6q-apalis-ixora-v1.2.dts (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Copyright 2014-2022 Toradex
4f126890aSEmmanuel Vadot * Copyright 2012 Freescale Semiconductor, Inc.
5f126890aSEmmanuel Vadot * Copyright 2011 Linaro Ltd.
6f126890aSEmmanuel Vadot */
7f126890aSEmmanuel Vadot
8f126890aSEmmanuel Vadot/dts-v1/;
9f126890aSEmmanuel Vadot
10f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
11f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
12f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
13f126890aSEmmanuel Vadot#include "imx6q.dtsi"
14f126890aSEmmanuel Vadot#include "imx6qdl-apalis.dtsi"
15f126890aSEmmanuel Vadot
16f126890aSEmmanuel Vadot/ {
17f126890aSEmmanuel Vadot	model = "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.2";
18f126890aSEmmanuel Vadot	compatible = "toradex,apalis_imx6q-ixora-v1.2", "toradex,apalis_imx6q",
19f126890aSEmmanuel Vadot		     "fsl,imx6q";
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot	aliases {
22f126890aSEmmanuel Vadot		i2c0 = &i2c1;
23f126890aSEmmanuel Vadot		i2c1 = &i2c3;
24f126890aSEmmanuel Vadot		i2c2 = &i2c2;
25f126890aSEmmanuel Vadot		rtc0 = &rtc_i2c;
26f126890aSEmmanuel Vadot		rtc1 = &snvs_rtc;
27f126890aSEmmanuel Vadot	};
28f126890aSEmmanuel Vadot
29f126890aSEmmanuel Vadot	chosen {
30f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
31f126890aSEmmanuel Vadot	};
32f126890aSEmmanuel Vadot
33f126890aSEmmanuel Vadot	leds {
34f126890aSEmmanuel Vadot		compatible = "gpio-leds";
35f126890aSEmmanuel Vadot
36f126890aSEmmanuel Vadot		pinctrl-names = "default";
37f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_leds_ixora>;
38f126890aSEmmanuel Vadot
39f126890aSEmmanuel Vadot		led4-green {
40f126890aSEmmanuel Vadot			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
41f126890aSEmmanuel Vadot			label = "LED_4_GREEN";
42f126890aSEmmanuel Vadot		};
43f126890aSEmmanuel Vadot
44f126890aSEmmanuel Vadot		led4-red {
45f126890aSEmmanuel Vadot			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
46f126890aSEmmanuel Vadot			label = "LED_4_RED";
47f126890aSEmmanuel Vadot		};
48f126890aSEmmanuel Vadot
49f126890aSEmmanuel Vadot		led5-green {
50f126890aSEmmanuel Vadot			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
51f126890aSEmmanuel Vadot			label = "LED_5_GREEN";
52f126890aSEmmanuel Vadot		};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot		led5-red {
55f126890aSEmmanuel Vadot			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
56f126890aSEmmanuel Vadot			label = "LED_5_RED";
57f126890aSEmmanuel Vadot		};
58f126890aSEmmanuel Vadot	};
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot	reg_3v3_vmmc: regulator-3v3-vmmc {
61f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
62f126890aSEmmanuel Vadot		enable-active-high;
63f126890aSEmmanuel Vadot		gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
64f126890aSEmmanuel Vadot		pinctrl-names = "default";
65f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_enable_3v3_vmmc>;
66f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
67f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
68f126890aSEmmanuel Vadot		regulator-name = "3v3_vmmc";
69f126890aSEmmanuel Vadot		startup-delay-us = <100>;
70f126890aSEmmanuel Vadot	};
71f126890aSEmmanuel Vadot
72f126890aSEmmanuel Vadot	reg_can1_supply: regulator-can1-supply {
73f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
74f126890aSEmmanuel Vadot		enable-active-high;
75f126890aSEmmanuel Vadot		gpio = <&gpio2 3 GPIO_ACTIVE_HIGH>;
76f126890aSEmmanuel Vadot		pinctrl-names = "default";
77f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_enable_can1_power>;
78f126890aSEmmanuel Vadot		regulator-name = "can1_supply";
79*8d13bc63SEmmanuel Vadot		startup-delay-us = <1000>;
80f126890aSEmmanuel Vadot	};
81f126890aSEmmanuel Vadot
82f126890aSEmmanuel Vadot	reg_can2_supply: regulator-can2-supply {
83f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
84f126890aSEmmanuel Vadot		enable-active-high;
85f126890aSEmmanuel Vadot		gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
86f126890aSEmmanuel Vadot		pinctrl-names = "default";
87f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_enable_can2_power>;
88f126890aSEmmanuel Vadot		regulator-name = "can2_supply";
89*8d13bc63SEmmanuel Vadot		startup-delay-us = <1000>;
90f126890aSEmmanuel Vadot	};
91f126890aSEmmanuel Vadot};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot&can1 {
94f126890aSEmmanuel Vadot	xceiver-supply = <&reg_can1_supply>;
95f126890aSEmmanuel Vadot	status = "okay";
96f126890aSEmmanuel Vadot};
97f126890aSEmmanuel Vadot
98f126890aSEmmanuel Vadot&can2 {
99f126890aSEmmanuel Vadot	xceiver-supply = <&reg_can2_supply>;
100f126890aSEmmanuel Vadot	status = "okay";
101f126890aSEmmanuel Vadot};
102f126890aSEmmanuel Vadot
103f126890aSEmmanuel Vadot&gpio1 {
104f126890aSEmmanuel Vadot	pinctrl-names = "default";
105f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_uart24_forceoff>;
106f126890aSEmmanuel Vadot
107f126890aSEmmanuel Vadot	/*
108f126890aSEmmanuel Vadot	 * uart-2-4-on-x21-enable-hog enables the UART transceiver for Apalis
109f126890aSEmmanuel Vadot	 * UART2 and UART3. If one wants to disable the transceiver force
110f126890aSEmmanuel Vadot	 * the GPIO to output-low, if one wants to control the transceiver
111f126890aSEmmanuel Vadot	 * from user space delete the hog node.
112f126890aSEmmanuel Vadot	 */
113f126890aSEmmanuel Vadot	uart-2-4-on-x21-enable-hog {
114f126890aSEmmanuel Vadot		gpio-hog;
115f126890aSEmmanuel Vadot		gpios = <11 GPIO_ACTIVE_HIGH>; /* MXM3 180 */
116f126890aSEmmanuel Vadot		output-high;
117f126890aSEmmanuel Vadot	};
118f126890aSEmmanuel Vadot};
119f126890aSEmmanuel Vadot
120f126890aSEmmanuel Vadot/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
121f126890aSEmmanuel Vadot&i2c1 {
122f126890aSEmmanuel Vadot	status = "okay";
123f126890aSEmmanuel Vadot
124f126890aSEmmanuel Vadot	/* M41T0M6 real time clock on carrier board */
125f126890aSEmmanuel Vadot	rtc_i2c: rtc@68 {
126f126890aSEmmanuel Vadot		compatible = "st,m41t0";
127f126890aSEmmanuel Vadot		reg = <0x68>;
128f126890aSEmmanuel Vadot	};
129f126890aSEmmanuel Vadot
130f126890aSEmmanuel Vadot	eeprom: eeprom@50 {
131f126890aSEmmanuel Vadot		compatible = "atmel,24c02";
132f126890aSEmmanuel Vadot		reg = <0x50>;
133f126890aSEmmanuel Vadot		pagesize = <16>;
134f126890aSEmmanuel Vadot	};
135f126890aSEmmanuel Vadot};
136f126890aSEmmanuel Vadot
137f126890aSEmmanuel Vadot/*
138f126890aSEmmanuel Vadot * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
139f126890aSEmmanuel Vadot * board)
140f126890aSEmmanuel Vadot */
141f126890aSEmmanuel Vadot&i2c3 {
142f126890aSEmmanuel Vadot	status = "okay";
143f126890aSEmmanuel Vadot};
144f126890aSEmmanuel Vadot
145f126890aSEmmanuel Vadot&pcie {
146f126890aSEmmanuel Vadot	pinctrl-names = "default";
147f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_reset_moci>;
148f126890aSEmmanuel Vadot	/* active-high meaning opposite of regular PERST# active-low polarity */
149f126890aSEmmanuel Vadot	reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
150f126890aSEmmanuel Vadot	reset-gpio-active-high;
151f126890aSEmmanuel Vadot	status = "okay";
152f126890aSEmmanuel Vadot};
153f126890aSEmmanuel Vadot
154f126890aSEmmanuel Vadot&pwm1 {
155f126890aSEmmanuel Vadot	status = "okay";
156f126890aSEmmanuel Vadot};
157f126890aSEmmanuel Vadot
158f126890aSEmmanuel Vadot&pwm2 {
159f126890aSEmmanuel Vadot	status = "okay";
160f126890aSEmmanuel Vadot};
161f126890aSEmmanuel Vadot
162f126890aSEmmanuel Vadot&pwm3 {
163f126890aSEmmanuel Vadot	status = "okay";
164f126890aSEmmanuel Vadot};
165f126890aSEmmanuel Vadot
166f126890aSEmmanuel Vadot&pwm4 {
167f126890aSEmmanuel Vadot	status = "okay";
168f126890aSEmmanuel Vadot};
169f126890aSEmmanuel Vadot
170f126890aSEmmanuel Vadot&reg_usb_host_vbus {
171f126890aSEmmanuel Vadot	status = "okay";
172f126890aSEmmanuel Vadot};
173f126890aSEmmanuel Vadot
174f126890aSEmmanuel Vadot&reg_usb_otg_vbus {
175f126890aSEmmanuel Vadot	status = "okay";
176f126890aSEmmanuel Vadot};
177f126890aSEmmanuel Vadot
178f126890aSEmmanuel Vadot&sata {
179f126890aSEmmanuel Vadot	status = "okay";
180f126890aSEmmanuel Vadot};
181f126890aSEmmanuel Vadot
182f126890aSEmmanuel Vadot&sound_spdif {
183f126890aSEmmanuel Vadot	status = "okay";
184f126890aSEmmanuel Vadot};
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot&spdif {
187f126890aSEmmanuel Vadot	status = "okay";
188f126890aSEmmanuel Vadot};
189f126890aSEmmanuel Vadot
190f126890aSEmmanuel Vadot&uart1 {
191f126890aSEmmanuel Vadot	status = "okay";
192f126890aSEmmanuel Vadot};
193f126890aSEmmanuel Vadot
194f126890aSEmmanuel Vadot&uart2 {
195f126890aSEmmanuel Vadot	status = "okay";
196f126890aSEmmanuel Vadot};
197f126890aSEmmanuel Vadot
198f126890aSEmmanuel Vadot&uart4 {
199f126890aSEmmanuel Vadot	status = "okay";
200f126890aSEmmanuel Vadot};
201f126890aSEmmanuel Vadot
202f126890aSEmmanuel Vadot&uart5 {
203f126890aSEmmanuel Vadot	status = "okay";
204f126890aSEmmanuel Vadot};
205f126890aSEmmanuel Vadot
206f126890aSEmmanuel Vadot&usbh1 {
207f126890aSEmmanuel Vadot	disable-over-current;
208f126890aSEmmanuel Vadot	vbus-supply = <&reg_usb_host_vbus>;
209f126890aSEmmanuel Vadot	status = "okay";
210f126890aSEmmanuel Vadot};
211f126890aSEmmanuel Vadot
212f126890aSEmmanuel Vadot&usbotg {
213f126890aSEmmanuel Vadot	disable-over-current;
214f126890aSEmmanuel Vadot	vbus-supply = <&reg_usb_otg_vbus>;
215f126890aSEmmanuel Vadot	status = "okay";
216f126890aSEmmanuel Vadot};
217f126890aSEmmanuel Vadot
218f126890aSEmmanuel Vadot/* MMC1 */
219f126890aSEmmanuel Vadot&usdhc1 {
220f126890aSEmmanuel Vadot	pinctrl-names = "default", "sleep";
221f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>;
222f126890aSEmmanuel Vadot	pinctrl-1 = <&pinctrl_usdhc1_4bit_sleep &pinctrl_mmc_cd_sleep>;
223f126890aSEmmanuel Vadot	bus-width = <4>;
224f126890aSEmmanuel Vadot	cap-power-off-card;
225f126890aSEmmanuel Vadot	vmmc-supply = <&reg_3v3_vmmc>;
226f126890aSEmmanuel Vadot	status = "okay";
227f126890aSEmmanuel Vadot};
228f126890aSEmmanuel Vadot
229f126890aSEmmanuel Vadot&iomuxc {
230f126890aSEmmanuel Vadot	pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp {
231f126890aSEmmanuel Vadot		fsl,pins = <
232f126890aSEmmanuel Vadot			MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0
233f126890aSEmmanuel Vadot		>;
234f126890aSEmmanuel Vadot	};
235f126890aSEmmanuel Vadot
236f126890aSEmmanuel Vadot	pinctrl_enable_can1_power: enablecan1powergrp {
237f126890aSEmmanuel Vadot		fsl,pins = <
238f126890aSEmmanuel Vadot			MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0
239f126890aSEmmanuel Vadot		>;
240f126890aSEmmanuel Vadot	};
241f126890aSEmmanuel Vadot
242f126890aSEmmanuel Vadot	pinctrl_enable_can2_power: enablecan2powergrp {
243f126890aSEmmanuel Vadot		fsl,pins = <
244f126890aSEmmanuel Vadot			MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x1b0b0
245f126890aSEmmanuel Vadot		>;
246f126890aSEmmanuel Vadot	};
247f126890aSEmmanuel Vadot
248f126890aSEmmanuel Vadot	pinctrl_uart24_forceoff: uart24forceoffgrp {
249f126890aSEmmanuel Vadot		fsl,pins = <
250f126890aSEmmanuel Vadot			MX6QDL_PAD_SD2_CMD__GPIO1_IO11 0x1b0b0
251f126890aSEmmanuel Vadot		>;
252f126890aSEmmanuel Vadot	};
253f126890aSEmmanuel Vadot
254f126890aSEmmanuel Vadot	pinctrl_leds_ixora: ledsixoragrp {
255f126890aSEmmanuel Vadot		fsl,pins = <
256f126890aSEmmanuel Vadot			MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0
257f126890aSEmmanuel Vadot			MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0
258f126890aSEmmanuel Vadot			MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0
259f126890aSEmmanuel Vadot			MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0
260f126890aSEmmanuel Vadot		>;
261f126890aSEmmanuel Vadot	};
262f126890aSEmmanuel Vadot
263f126890aSEmmanuel Vadot	pinctrl_mmc_cd_sleep: mmccdslpgrp {
264f126890aSEmmanuel Vadot		fsl,pins = <
265f126890aSEmmanuel Vadot			 /* MMC1 CD */
266f126890aSEmmanuel Vadot			MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x0
267f126890aSEmmanuel Vadot		>;
268f126890aSEmmanuel Vadot	};
269f126890aSEmmanuel Vadot
270f126890aSEmmanuel Vadot	pinctrl_usdhc1_4bit_sleep: usdhc1-4bitslpgrp {
271f126890aSEmmanuel Vadot		fsl,pins = <
272f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_CMD__SD1_CMD     0x3000
273f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_CLK__SD1_CLK     0x3000
274f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_DAT0__SD1_DATA0  0x3000
275f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_DAT1__SD1_DATA1  0x3000
276f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_DAT2__SD1_DATA2  0x3000
277f126890aSEmmanuel Vadot			MX6QDL_PAD_SD1_DAT3__SD1_DATA3  0x3000
278f126890aSEmmanuel Vadot		>;
279f126890aSEmmanuel Vadot	};
280f126890aSEmmanuel Vadot};
281