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