Loading...
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Copyright 2014-2022 Toradex
4 * Copyright 2012 Freescale Semiconductor, Inc.
5 * Copyright 2011 Linaro Ltd.
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include "imx6q.dtsi"
14#include "imx6qdl-apalis.dtsi"
15
16/ {
17 model = "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board";
18 compatible = "toradex,apalis_imx6q-eval", "toradex,apalis_imx6q",
19 "fsl,imx6q";
20
21 aliases {
22 i2c0 = &i2c1;
23 i2c1 = &i2c3;
24 i2c2 = &i2c2;
25 rtc0 = &rtc_i2c;
26 rtc1 = &snvs_rtc;
27 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
33 reg_pcie_switch: regulator-pcie-switch {
34 compatible = "regulator-fixed";
35 enable-active-high;
36 gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
37 regulator-max-microvolt = <1800000>;
38 regulator-min-microvolt = <1800000>;
39 regulator-name = "pcie_switch";
40 startup-delay-us = <100000>;
41 status = "okay";
42 };
43
44 reg_3v3_sw: regulator-3v3-sw {
45 compatible = "regulator-fixed";
46 regulator-always-on;
47 regulator-max-microvolt = <3300000>;
48 regulator-min-microvolt = <3300000>;
49 regulator-name = "3.3V_SW";
50 };
51};
52
53&can1 {
54 xceiver-supply = <®_3v3_sw>;
55 status = "okay";
56};
57
58&can2 {
59 xceiver-supply = <®_3v3_sw>;
60 status = "okay";
61};
62
63/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
64&i2c1 {
65 status = "okay";
66
67 pcie-switch@58 {
68 compatible = "plx,pex8605";
69 reg = <0x58>;
70 };
71
72 /* M41T0M6 real time clock on carrier board */
73 rtc_i2c: rtc@68 {
74 compatible = "st,m41t0";
75 reg = <0x68>;
76 };
77};
78
79/*
80 * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
81 * board)
82 */
83&i2c3 {
84 status = "okay";
85};
86
87&pcie {
88 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_reset_moci>;
90 /* active-high meaning opposite of regular PERST# active-low polarity */
91 reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
92 reset-gpio-active-high;
93 vpcie-supply = <®_pcie_switch>;
94 status = "okay";
95};
96
97&pwm1 {
98 status = "okay";
99};
100
101&pwm2 {
102 status = "okay";
103};
104
105&pwm3 {
106 status = "okay";
107};
108
109&pwm4 {
110 status = "okay";
111};
112
113®_usb_host_vbus {
114 status = "okay";
115};
116
117®_usb_otg_vbus {
118 status = "okay";
119};
120
121&sata {
122 status = "okay";
123};
124
125&sound_spdif {
126 status = "okay";
127};
128
129&spdif {
130 status = "okay";
131};
132
133&uart1 {
134 status = "okay";
135};
136
137&uart2 {
138 status = "okay";
139};
140
141&uart4 {
142 status = "okay";
143};
144
145&uart5 {
146 status = "okay";
147};
148
149&usbh1 {
150 vbus-supply = <®_usb_host_vbus>;
151 status = "okay";
152};
153
154&usbotg {
155 vbus-supply = <®_usb_otg_vbus>;
156 status = "okay";
157};
158
159/* MMC1 */
160&usdhc1 {
161 status = "okay";
162};
163
164/* SD1 */
165&usdhc2 {
166 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
169 status = "okay";
170};
1/*
2 * Copyright 2014-2017 Toradex AG
3 * Copyright 2012 Freescale Semiconductor, Inc.
4 * Copyright 2011 Linaro Ltd.
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2 as published by the Free Software Foundation.
14 *
15 * This file is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively,
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use,
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
42 */
43
44/dts-v1/;
45
46#include <dt-bindings/gpio/gpio.h>
47#include <dt-bindings/input/input.h>
48#include <dt-bindings/interrupt-controller/irq.h>
49#include "imx6q.dtsi"
50#include "imx6qdl-apalis.dtsi"
51
52/ {
53 model = "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board";
54 compatible = "toradex,apalis_imx6q-eval", "toradex,apalis_imx6q",
55 "fsl,imx6q";
56
57 aliases {
58 i2c0 = &i2c1;
59 i2c1 = &i2c3;
60 i2c2 = &i2c2;
61 rtc0 = &rtc_i2c;
62 rtc1 = &snvs_rtc;
63 };
64
65 chosen {
66 stdout-path = "serial0:115200n8";
67 };
68
69 gpio-keys {
70 compatible = "gpio-keys";
71 pinctrl-names = "default";
72 pinctrl-0 = <&pinctrl_gpio_keys>;
73
74 wakeup {
75 label = "Wake-Up";
76 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WAKEUP>;
78 debounce-interval = <10>;
79 wakeup-source;
80 };
81 };
82
83 lcd_display: disp0 {
84 compatible = "fsl,imx-parallel-display";
85 #address-cells = <1>;
86 #size-cells = <0>;
87 interface-pix-fmt = "rgb24";
88 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_ipu1_lcdif>;
90 status = "okay";
91
92 port@0 {
93 reg = <0>;
94
95 lcd_display_in: endpoint {
96 remote-endpoint = <&ipu1_di1_disp1>;
97 };
98 };
99
100 port@1 {
101 reg = <1>;
102
103 lcd_display_out: endpoint {
104 remote-endpoint = <&lcd_panel_in>;
105 };
106 };
107 };
108
109 panel: panel {
110 /*
111 * edt,et057090dhu: EDT 5.7" LCD TFT
112 * edt,et070080dh6: EDT 7.0" LCD TFT
113 */
114 compatible = "edt,et057090dhu";
115 backlight = <&backlight>;
116 power-supply = <®_3v3_sw>;
117
118 port {
119 lcd_panel_in: endpoint {
120 remote-endpoint = <&lcd_display_out>;
121 };
122 };
123 };
124
125 reg_pcie_switch: regulator-pcie-switch {
126 compatible = "regulator-fixed";
127 regulator-name = "pcie_switch";
128 regulator-min-microvolt = <1800000>;
129 regulator-max-microvolt = <1800000>;
130 gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
131 startup-delay-us = <100000>;
132 enable-active-high;
133 status = "okay";
134 };
135
136 reg_3v3_sw: regulator-3v3-sw {
137 compatible = "regulator-fixed";
138 regulator-name = "3.3V_SW";
139 regulator-min-microvolt = <3300000>;
140 regulator-max-microvolt = <3300000>;
141 regulator-always-on;
142 };
143};
144
145&backlight {
146 brightness-levels = <0 127 191 223 239 247 251 255>;
147 default-brightness-level = <1>;
148 power-supply = <®_3v3_sw>;
149 status = "okay";
150};
151
152&can1 {
153 xceiver-supply = <®_3v3_sw>;
154 status = "okay";
155};
156
157&can2 {
158 xceiver-supply = <®_3v3_sw>;
159 status = "okay";
160};
161
162&hdmi {
163 status = "okay";
164};
165
166/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
167&i2c1 {
168 status = "okay";
169
170 pcie-switch@58 {
171 compatible = "plx,pex8605";
172 reg = <0x58>;
173 };
174
175 /* M41T0M6 real time clock on carrier board */
176 rtc_i2c: rtc@68 {
177 compatible = "st,m41t0";
178 reg = <0x68>;
179 };
180};
181
182/*
183 * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
184 * board)
185 */
186&i2c3 {
187 status = "okay";
188};
189
190&ipu1_di1_disp1 {
191 remote-endpoint = <&lcd_display_in>;
192};
193
194&ldb {
195 status = "okay";
196};
197
198&pcie {
199 pinctrl-names = "default";
200 pinctrl-0 = <&pinctrl_reset_moci>;
201 /* active-high meaning opposite of regular PERST# active-low polarity */
202 reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
203 reset-gpio-active-high;
204 vpcie-supply = <®_pcie_switch>;
205 status = "okay";
206};
207
208&pwm1 {
209 status = "okay";
210};
211
212&pwm2 {
213 status = "okay";
214};
215
216&pwm3 {
217 status = "okay";
218};
219
220&pwm4 {
221 status = "okay";
222};
223
224®_usb_otg_vbus {
225 status = "okay";
226};
227
228®_usb_host_vbus {
229 status = "okay";
230};
231
232&sata {
233 status = "okay";
234};
235
236&sound_spdif {
237 status = "okay";
238};
239
240&spdif {
241 status = "okay";
242};
243
244&uart1 {
245 status = "okay";
246};
247
248&uart2 {
249 status = "okay";
250};
251
252&uart4 {
253 status = "okay";
254};
255
256&uart5 {
257 status = "okay";
258};
259
260&usbh1 {
261 vbus-supply = <®_usb_host_vbus>;
262 status = "okay";
263};
264
265&usbotg {
266 vbus-supply = <®_usb_otg_vbus>;
267 status = "okay";
268};
269
270/* MMC1 */
271&usdhc1 {
272 pinctrl-names = "default";
273 pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_usdhc1_8bit &pinctrl_mmc_cd>;
274 cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
275 status = "okay";
276};
277
278/* SD1 */
279&usdhc2 {
280 pinctrl-names = "default";
281 pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
282 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
283 status = "okay";
284};
285
286&iomuxc {
287 /*
288 * Mux the Apalis GPIOs
289 */
290 pinctrl-names = "default";
291 pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
292 &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
293 &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
294 &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
295 >;
296};