• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Ixora Carrier Board";
54	compatible = "toradex,apalis_imx6q-ixora", "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: display@di0 {
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	leds {
121		compatible = "gpio-leds";
122
123		pinctrl-names = "default";
124		pinctrl-0 = <&pinctrl_leds_ixora>;
125
126		led4-green {
127			label = "LED_4_GREEN";
128			gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
129		};
130
131		led4-red {
132			label = "LED_4_RED";
133			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
134		};
135
136		led5-green {
137			label = "LED_5_GREEN";
138			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
139		};
140
141		led5-red {
142			label = "LED_5_RED";
143			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
144		};
145	};
146};
147
148&backlight {
149	brightness-levels = <0 127 191 223 239 247 251 255>;
150	default-brightness-level = <1>;
151	status = "okay";
152};
153
154&can1 {
155	status = "okay";
156};
157
158&can2 {
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	eeprom@50 {
171		compatible = "atmel,24c02";
172		reg = <0x50>;
173	};
174
175	/* M41T0M6 real time clock on carrier board */
176	rtc_i2c: rtc@68 {
177		compatible = "st,m41t00";
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	/* active-high meaning opposite of regular PERST# active-low polarity */
200	reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
201	reset-gpio-active-high;
202	status = "okay";
203};
204
205&pwm1 {
206	status = "okay";
207};
208
209&pwm2 {
210	status = "okay";
211};
212
213&pwm3 {
214	status = "okay";
215};
216
217&pwm4 {
218	status = "okay";
219};
220
221&reg_usb_otg_vbus {
222	status = "okay";
223};
224
225&reg_usb_host_vbus {
226	status = "okay";
227};
228
229&sata {
230	status = "okay";
231};
232
233&sound_spdif {
234	status = "okay";
235};
236
237&spdif {
238	status = "okay";
239};
240
241&uart1 {
242	status = "okay";
243};
244
245&uart2 {
246	status = "okay";
247};
248
249&uart4 {
250	status = "okay";
251};
252
253&uart5 {
254	status = "okay";
255};
256
257&usbh1 {
258	vbus-supply = <&reg_usb_host_vbus>;
259	status = "okay";
260};
261
262&usbotg {
263	vbus-supply = <&reg_usb_otg_vbus>;
264	status = "okay";
265};
266
267/* SD1 */
268&usdhc2 {
269	pinctrl-names = "default";
270	pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>;
271	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
272	status = "okay";
273};
274
275&iomuxc {
276	/* Mux the Apalis GPIOs */
277	pinctrl-names = "default";
278	pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
279		     &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
280		     &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
281		     &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
282		    >;
283
284	pinctrl_leds_ixora: ledsixoragrp {
285		fsl,pins = <
286			MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x1b0b0
287			MX6QDL_PAD_SD1_DAT3__GPIO1_IO21 0x1b0b0
288			MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0
289			MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0
290		>;
291	};
292};
293