1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3
4#include <dt-bindings/input/input.h>
5#include "tegra30-apalis.dtsi"
6
7/ {
8	model = "Toradex Apalis T30 on Apalis Evaluation Board";
9	compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30",
10		     "nvidia,tegra30";
11
12	aliases {
13		rtc0 = "/i2c@7000c000/rtc@68";
14		rtc1 = "/i2c@7000d000/pmic@2d";
15		rtc2 = "/rtc@7000e000";
16		serial0 = &uarta;
17		serial1 = &uartb;
18		serial2 = &uartc;
19		serial3 = &uartd;
20	};
21
22	chosen {
23		stdout-path = "serial0:115200n8";
24	};
25
26	pcie@3000 {
27		pci@1,0 {
28			status = "okay";
29		};
30
31		pci@2,0 {
32			status = "okay";
33		};
34	};
35
36	host1x@50000000 {
37		dc@54200000 {
38			rgb {
39				status = "okay";
40				nvidia,panel = <&panel>;
41			};
42		};
43
44		hdmi@54280000 {
45			status = "okay";
46			hdmi-supply = <&reg_5v0>;
47		};
48	};
49
50	gpio@6000d000 {
51		/* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
52		pex-perst-n-hog {
53			gpio-hog;
54			gpios = <TEGRA_GPIO(S, 7) GPIO_ACTIVE_HIGH>;
55			output-high;
56			line-name = "PEX_PERST_N";
57		};
58	};
59
60	/* Apalis UART1 */
61	serial@70006000 {
62		/delete-property/ dmas;
63		/delete-property/ dma-names;
64		status = "okay";
65	};
66
67	/* Apalis UART2 */
68	serial@70006040 {
69		status = "okay";
70	};
71
72	/* Apalis UART3 */
73	serial@70006200 {
74		status = "okay";
75	};
76
77	/* Apalis UART4 */
78	serial@70006300 {
79		status = "okay";
80	};
81
82	pwm@7000a000 {
83		status = "okay";
84	};
85
86	/*
87	 * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
88	 * board)
89	 */
90	i2c@7000c000 {
91		status = "okay";
92		clock-frequency = <400000>;
93
94		pcie-switch@58 {
95			compatible = "plx,pex8605";
96			reg = <0x58>;
97		};
98
99		/* M41T0M6 real time clock on carrier board */
100		rtc@68 {
101			compatible = "st,m41t0";
102			reg = <0x68>;
103		};
104	};
105
106	/* GEN2_I2C: unused */
107
108	/*
109	 * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
110	 * carrier board)
111	 */
112	i2c@7000c500 {
113		status = "okay";
114		clock-frequency = <400000>;
115	};
116
117	/* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
118	i2c@7000c700 {
119		status = "okay";
120	};
121
122	/* SPI1: Apalis SPI1 */
123	spi@7000d400 {
124		status = "okay";
125		spi-max-frequency = <25000000>;
126	};
127
128	/* SPI5: Apalis SPI2 */
129	spi@7000dc00 {
130		status = "okay";
131		spi-max-frequency = <25000000>;
132	};
133
134	/* Apalis SD1 */
135	mmc@78000000 {
136		status = "okay";
137		bus-width = <4>;
138		/* SD1_CD# */
139		cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_LOW>;
140		no-1-8-v;
141	};
142
143	/* Apalis MMC1 */
144	mmc@78000400 {
145		status = "okay";
146		bus-width = <8>;
147		/* MMC1_CD# */
148		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
149		no-1-8-v;
150	};
151
152	/* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
153	usb@7d000000 {
154		status = "okay";
155		dr_mode = "otg";
156	};
157
158	usb-phy@7d000000 {
159		status = "okay";
160		vbus-supply = <&reg_usbo1_vbus>;
161	};
162
163	/* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
164	usb@7d004000 {
165		status = "okay";
166	};
167
168	usb-phy@7d004000 {
169		status = "okay";
170		vbus-supply = <&reg_usbh_vbus>;
171	};
172
173	/* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
174	usb@7d008000 {
175		status = "okay";
176	};
177
178	usb-phy@7d008000 {
179		status = "okay";
180		vbus-supply = <&reg_usbh_vbus>;
181	};
182
183	backlight: backlight {
184		compatible = "pwm-backlight";
185		brightness-levels = <255 231 223 207 191 159 127 0>;
186		default-brightness-level = <6>;
187		/* BKL1_ON */
188		enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
189		power-supply = <&reg_3v3>;
190		pwms = <&pwm 0 5000000>; /* BKL1_PWM */
191	};
192
193	gpio-keys {
194		compatible = "gpio-keys";
195
196		key-wakeup {
197			label = "WAKE1_MICO";
198			gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
199			linux,code = <KEY_WAKEUP>;
200			debounce-interval = <10>;
201			wakeup-source;
202		};
203	};
204
205	panel: panel {
206		/*
207		 * edt,et057090dhu: EDT 5.7" LCD TFT
208		 * edt,et070080dh6: EDT 7.0" LCD TFT
209		 */
210		compatible = "edt,et057090dhu";
211		backlight = <&backlight>;
212		power-supply = <&reg_3v3>;
213	};
214
215	reg_3v3: regulator-3v3 {
216		compatible = "regulator-fixed";
217		regulator-name = "3.3V_SW";
218		regulator-min-microvolt = <3300000>;
219		regulator-max-microvolt = <3300000>;
220	};
221
222	reg_5v0: regulator-5v0 {
223		compatible = "regulator-fixed";
224		regulator-name = "5V_SW";
225		regulator-min-microvolt = <5000000>;
226		regulator-max-microvolt = <5000000>;
227	};
228
229	/* USBO1_EN */
230	reg_usbo1_vbus: regulator-usbo1-vbus {
231		compatible = "regulator-fixed";
232		regulator-name = "VCC_USBO1";
233		regulator-min-microvolt = <5000000>;
234		regulator-max-microvolt = <5000000>;
235		gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
236		enable-active-high;
237		vin-supply = <&reg_5v0>;
238	};
239
240	/* USBH_EN */
241	reg_usbh_vbus: regulator-usbh-vbus {
242		compatible = "regulator-fixed";
243		regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
244		regulator-min-microvolt = <5000000>;
245		regulator-max-microvolt = <5000000>;
246		gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
247		enable-active-high;
248		vin-supply = <&reg_5v0>;
249	};
250};
251