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