summaryrefslogtreecommitdiff
path: root/arch/arm/dts/k3-am69-aquila.dtsi
blob: 222faa00b09196060ddf7fadb231ae6edf09b3a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2024 Toradex
 *
 * Common dtsi for Toradex Aquila AM69 SoM
 *
 * https://www.toradex.com/computer-on-modules/aquila-arm-family/ti-am69
 */

#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/gpio/gpio.h>
#include "k3-j784s4.dtsi"

/ {
	chosen {
		stdout-path = "serial2:115200n8";
	};

	aliases {
		mmc0 = &main_sdhci0;
		mmc1 = &main_sdhci1;
		serial2 = &main_uart8;
	};

	memory@80000000 {
		device_type = "memory";
		/* 32G RAM */
		reg = <0x00 0x80000000 0x00 0x80000000>,
		      <0x08 0x80000000 0x07 0x80000000>;
		bootph-pre-ram;
	};

	reserved_memory: reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		/* global cma region */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = <0x00 0x70000000>;
			linux,cma-default;
		};

		secure_ddr: optee@9e800000 {
			reg = <0x00 0x9e800000 0x00 0x01800000>;
			no-map;
		};
	};

	/* Aquila SD_1_PWR_EN */
	reg_sdhc1_vmmc: regulator-sdhci1 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_sd1_pwr_en>;
		enable-active-high;
		/* Aquila SD_1_PWR_EN (AQUILA A6) */
		gpio = <&main_gpio0 52 GPIO_ACTIVE_HIGH>;
		off-on-delay-us = <100000>;
		regulator-max-microvolt = <3300000>;
		regulator-min-microvolt = <3300000>;
		regulator-name = "+3V3_SD";
		startup-delay-us = <5000>;
	};

	reg_sdhc1_vqmmc: regulator-sdhci1-vqmmc {
		compatible = "regulator-gpio";
		/* SDIO_PWR_SEL_3.3V */
		gpios = <&som_gpio_expander 7 GPIO_ACTIVE_HIGH>;
		regulator-name = "+VDD_SD_DV";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <3300000>;
		states = <1800000 0x0>,
			 <3300000 0x1>;
	};
};

&main_pmx0 {
	/* Aquila SD_1_PWR_EN */
	pinctrl_sd1_pwr_en: main-gpio0-52-default-pins {
		pinctrl-single,pins = <
			J784S4_IOPAD(0x0d0, PIN_INPUT, 7) /* (AP38) SPI0_CS1.GPIO0_52 */ /* AQUILA A6 */
		>;
	};

	/* Aquila SD_1 */
	pinctrl_main_mmc1: main-mmc1-default-pins {
		pinctrl-single,pins = <
			J784S4_IOPAD(0x104, PIN_INPUT, 0) /* (AB38) MMC1_CLK  */ /* AQUILA A6 */
			J784S4_IOPAD(0x108, PIN_INPUT, 0) /* (AB36) MMC1_CMD  */ /* AQUILA A4 */
			J784S4_IOPAD(0x100, PIN_INPUT, 0) /* (No Pin) MMC1_CLKLB */
			J784S4_IOPAD(0x0fc, PIN_INPUT, 0) /* (AA33) MMC1_DAT0 */ /* AQUILA A8 */
			J784S4_IOPAD(0x0f8, PIN_INPUT, 0) /* (AB34) MMC1_DAT1 */ /* AQUILA A9 */
			J784S4_IOPAD(0x0f4, PIN_INPUT, 0) /* (AA32) MMC1_DAT2 */ /* AQUILA A1 */
			J784S4_IOPAD(0x0f0, PIN_INPUT, 0) /* (AC38) MMC1_DAT3 */ /* AQUILA A3 */
			J784S4_IOPAD(0x0e8, PIN_INPUT_PULLUP, 8) /* (AR38) TIMER_IO0.MMC1_SDCD */ /* AQUILA A10 */
		>;
	};

	/* Aquila UART_3, used as the Linux console */
	pinctrl_main_uart8: main-uart8-default-pins {
		pinctrl-single,pins = <
			J784S4_IOPAD(0x038, PIN_INPUT, 11)  /* (AK35) MCASP0_ACLKX.UART8_RXD */ /* AQUILA D19 */
			J784S4_IOPAD(0x03c, PIN_OUTPUT, 11) /* (AK38) MCASP0_AFSX.UART8_TXD  */ /* AQUILA D20 */
		>;
	};
};

&wkup_pmx2 {
	/* On-module I2C - WKUP_I2C0 */
	pinctrl_wkup_i2c0: wkup-i2c0-default-pins {
		pinctrl-single,pins = <
			J784S4_WKUP_IOPAD(0x098, PIN_INPUT, 0) /* (N33) WKUP_I2C0_SCL */
			J784S4_WKUP_IOPAD(0x09c, PIN_INPUT, 0) /* (N35) WKUP_I2C0_SDA */
		>;
	};
};

&main_gpio0 {
	status = "okay";
};

/* On-module eMMC */
&main_sdhci0 {
	disable-wp;
	no-mmc-hs400; /* TODO: verify the actual status, copied from TI SK AM69 */
	non-removable;
	ti,driver-strength-ohm = <50>;
	status = "okay";
};

/* Aquila SD_1 */
&main_sdhci1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_main_mmc1>;
	disable-wp;
	vmmc-supply = <&reg_sdhc1_vmmc>;
	vqmmc-supply = <&reg_sdhc1_vqmmc>;
	ti,driver-strength-ohm = <50>;
	ti,fails-without-test-cd;
	status = "disabled";
};

/* Aquila UART_3, used as the Linux console */
&main_uart8 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_main_uart8>;
	status = "disabled";
};

&wkup_gpio0 {
	status = "okay";
};

/* On-module I2C - WKUP_I2C0 */
&wkup_i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_wkup_i2c0>;
	clock-frequency = <400000>;
	status = "okay";

	som_gpio_expander: gpio@21 {
		compatible = "ti,tca6408";
		reg = <0x21>;
		#gpio-cells = <2>;
		gpio-controller;
		gpio-line-names =
			"USB_MUX_SEL",
			"COLD_RESET_REQ",
			"PWR_DOWN_REQ",
			"PCIE_3_RESET#",
			"PCIE_4_RESET#",
			"WIFI_DISABLE",
			"BT_DISABLE",
			"SDIO_PWR_SEL_3.3V";
	};
};