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