Loading...
1// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Copyright 2014-2020 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 gpio-keys {
34 compatible = "gpio-keys";
35 pinctrl-names = "default";
36 pinctrl-0 = <&pinctrl_gpio_keys>;
37
38 wakeup {
39 label = "Wake-Up";
40 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WAKEUP>;
42 debounce-interval = <10>;
43 wakeup-source;
44 };
45 };
46
47 lcd_display: disp0 {
48 compatible = "fsl,imx-parallel-display";
49 #address-cells = <1>;
50 #size-cells = <0>;
51 interface-pix-fmt = "rgb24";
52 pinctrl-names = "default";
53 pinctrl-0 = <&pinctrl_ipu1_lcdif>;
54 status = "okay";
55
56 port@0 {
57 reg = <0>;
58
59 lcd_display_in: endpoint {
60 remote-endpoint = <&ipu1_di1_disp1>;
61 };
62 };
63
64 port@1 {
65 reg = <1>;
66
67 lcd_display_out: endpoint {
68 remote-endpoint = <&lcd_panel_in>;
69 };
70 };
71 };
72
73 panel: panel {
74 /*
75 * edt,et057090dhu: EDT 5.7" LCD TFT
76 * edt,et070080dh6: EDT 7.0" LCD TFT
77 */
78 compatible = "edt,et057090dhu";
79 backlight = <&backlight>;
80 power-supply = <®_3v3_sw>;
81
82 port {
83 lcd_panel_in: endpoint {
84 remote-endpoint = <&lcd_display_out>;
85 };
86 };
87 };
88
89 reg_pcie_switch: regulator-pcie-switch {
90 compatible = "regulator-fixed";
91 regulator-name = "pcie_switch";
92 regulator-min-microvolt = <1800000>;
93 regulator-max-microvolt = <1800000>;
94 gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
95 startup-delay-us = <100000>;
96 enable-active-high;
97 status = "okay";
98 };
99
100 reg_3v3_sw: regulator-3v3-sw {
101 compatible = "regulator-fixed";
102 regulator-name = "3.3V_SW";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
105 regulator-always-on;
106 };
107};
108
109&backlight {
110 brightness-levels = <0 127 191 223 239 247 251 255>;
111 default-brightness-level = <1>;
112 power-supply = <®_3v3_sw>;
113 status = "okay";
114};
115
116&can1 {
117 xceiver-supply = <®_3v3_sw>;
118 status = "okay";
119};
120
121&can2 {
122 xceiver-supply = <®_3v3_sw>;
123 status = "okay";
124};
125
126&hdmi {
127 status = "okay";
128};
129
130/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
131&i2c1 {
132 status = "okay";
133
134 /*
135 * Touchscreen is using SODIMM 28/30, also used for PWM<B>, PWM<C>,
136 * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms
137 */
138 touchscreen@4a {
139 compatible = "atmel,maxtouch";
140 reg = <0x4a>;
141 interrupt-parent = <&gpio6>;
142 interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
143 reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */
144 status = "disabled";
145 };
146
147 pcie-switch@58 {
148 compatible = "plx,pex8605";
149 reg = <0x58>;
150 };
151
152 /* M41T0M6 real time clock on carrier board */
153 rtc_i2c: rtc@68 {
154 compatible = "st,m41t0";
155 reg = <0x68>;
156 };
157};
158
159/*
160 * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
161 * board)
162 */
163&i2c3 {
164 status = "okay";
165};
166
167&ipu1_di1_disp1 {
168 remote-endpoint = <&lcd_display_in>;
169};
170
171&ldb {
172 status = "okay";
173};
174
175&pcie {
176 pinctrl-names = "default";
177 pinctrl-0 = <&pinctrl_reset_moci>;
178 /* active-high meaning opposite of regular PERST# active-low polarity */
179 reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
180 reset-gpio-active-high;
181 vpcie-supply = <®_pcie_switch>;
182 status = "okay";
183};
184
185&pwm1 {
186 status = "okay";
187};
188
189&pwm2 {
190 status = "okay";
191};
192
193&pwm3 {
194 status = "okay";
195};
196
197&pwm4 {
198 status = "okay";
199};
200
201®_usb_otg_vbus {
202 status = "okay";
203};
204
205®_usb_host_vbus {
206 status = "okay";
207};
208
209&sata {
210 status = "okay";
211};
212
213&sound_spdif {
214 status = "okay";
215};
216
217&spdif {
218 status = "okay";
219};
220
221&uart1 {
222 status = "okay";
223};
224
225&uart2 {
226 status = "okay";
227};
228
229&uart4 {
230 status = "okay";
231};
232
233&uart5 {
234 status = "okay";
235};
236
237&usbh1 {
238 vbus-supply = <®_usb_host_vbus>;
239 status = "okay";
240};
241
242&usbotg {
243 vbus-supply = <®_usb_otg_vbus>;
244 status = "okay";
245};
246
247/* MMC1 */
248&usdhc1 {
249 pinctrl-names = "default";
250 pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_usdhc1_8bit &pinctrl_mmc_cd>;
251 cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
252 status = "okay";
253};
254
255/* SD1 */
256&usdhc2 {
257 pinctrl-names = "default";
258 pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
259 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
260 status = "okay";
261};
262
263&iomuxc {
264 /*
265 * Mux the Apalis GPIOs
266 */
267 pinctrl-names = "default";
268 pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
269 &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
270 &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
271 &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
272 >;
273};
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 gpio-keys {
66 compatible = "gpio-keys";
67 pinctrl-names = "default";
68 pinctrl-0 = <&pinctrl_gpio_keys>;
69
70 wakeup {
71 label = "Wake-Up";
72 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_WAKEUP>;
74 debounce-interval = <10>;
75 wakeup-source;
76 };
77 };
78
79 lcd_display: disp0 {
80 compatible = "fsl,imx-parallel-display";
81 #address-cells = <1>;
82 #size-cells = <0>;
83 interface-pix-fmt = "rgb24";
84 pinctrl-names = "default";
85 pinctrl-0 = <&pinctrl_ipu1_lcdif>;
86 status = "okay";
87
88 port@0 {
89 reg = <0>;
90
91 lcd_display_in: endpoint {
92 remote-endpoint = <&ipu1_di1_disp1>;
93 };
94 };
95
96 port@1 {
97 reg = <1>;
98
99 lcd_display_out: endpoint {
100 remote-endpoint = <&lcd_panel_in>;
101 };
102 };
103 };
104
105 panel: panel {
106 /*
107 * edt,et057090dhu: EDT 5.7" LCD TFT
108 * edt,et070080dh6: EDT 7.0" LCD TFT
109 */
110 compatible = "edt,et057090dhu";
111 backlight = <&backlight>;
112
113 port {
114 lcd_panel_in: endpoint {
115 remote-endpoint = <&lcd_display_out>;
116 };
117 };
118 };
119
120 reg_pcie_switch: regulator-pcie-switch {
121 compatible = "regulator-fixed";
122 regulator-name = "pcie_switch";
123 regulator-min-microvolt = <1800000>;
124 regulator-max-microvolt = <1800000>;
125 gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
126 startup-delay-us = <100000>;
127 enable-active-high;
128 status = "okay";
129 };
130};
131
132&backlight {
133 brightness-levels = <0 127 191 223 239 247 251 255>;
134 default-brightness-level = <1>;
135 status = "okay";
136};
137
138&can1 {
139 status = "okay";
140};
141
142&can2 {
143 status = "okay";
144};
145
146&hdmi {
147 status = "okay";
148};
149
150/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */
151&i2c1 {
152 status = "okay";
153
154 pcie-switch@58 {
155 compatible = "plx,pex8605";
156 reg = <0x58>;
157 };
158
159 /* M41T0M6 real time clock on carrier board */
160 rtc_i2c: rtc@68 {
161 compatible = "st,m41t0";
162 reg = <0x68>;
163 };
164};
165
166/*
167 * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier
168 * board)
169 */
170&i2c3 {
171 status = "okay";
172};
173
174&ipu1_di1_disp1 {
175 remote-endpoint = <&lcd_display_in>;
176};
177
178&ldb {
179 status = "okay";
180};
181
182&pcie {
183 /* active-high meaning opposite of regular PERST# active-low polarity */
184 reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
185 reset-gpio-active-high;
186 vpcie-supply = <®_pcie_switch>;
187 status = "okay";
188};
189
190&pwm1 {
191 status = "okay";
192};
193
194&pwm2 {
195 status = "okay";
196};
197
198&pwm3 {
199 status = "okay";
200};
201
202&pwm4 {
203 status = "okay";
204};
205
206®_usb_otg_vbus {
207 status = "okay";
208};
209
210®_usb_host_vbus {
211 status = "okay";
212};
213
214&sata {
215 status = "okay";
216};
217
218&sound_spdif {
219 status = "okay";
220};
221
222&spdif {
223 status = "okay";
224};
225
226&uart1 {
227 status = "okay";
228};
229
230&uart2 {
231 status = "okay";
232};
233
234&uart4 {
235 status = "okay";
236};
237
238&uart5 {
239 status = "okay";
240};
241
242&usbh1 {
243 vbus-supply = <®_usb_host_vbus>;
244 status = "okay";
245};
246
247&usbotg {
248 vbus-supply = <®_usb_otg_vbus>;
249 status = "okay";
250};
251
252/* MMC1 */
253&usdhc1 {
254 pinctrl-names = "default";
255 pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_usdhc1_8bit &pinctrl_mmc_cd>;
256 cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
257 status = "okay";
258};
259
260/* SD1 */
261&usdhc2 {
262 pinctrl-names = "default";
263 pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
264 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
265 status = "okay";
266};
267
268&iomuxc {
269 /*
270 * Mux the Apalis GPIOs
271 */
272 pinctrl-names = "default";
273 pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
274 &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
275 &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
276 &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
277 >;
278};