summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t.dts
blob: 5b5e9eeec5ac4856ee91d09ac34f469a2243b887 (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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2023 Josua Mayer <josua@solid-run.com>
 *
 * DTS for SolidRun AM642 HummingBoard-T,
 * running on Cortex A53.
 *
 */

/dts-v1/;

#include <dt-bindings/leds/common.h>
#include <dt-bindings/phy/phy.h>

#include "k3-am642.dtsi"
#include "k3-am642-sr-som.dtsi"

/ {
	model = "SolidRun AM642 HummingBoard-T";
	compatible = "solidrun,am642-hummingboard-t", "solidrun,am642-sr-som", "ti,am642";

	aliases {
		serial5 = &main_uart3;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&leds_default_pins>;

		/* D24 */
		led1: led-1 {
			label = "led1";
			gpios = <&main_gpio0 29 GPIO_ACTIVE_HIGH>;
			color = <LED_COLOR_ID_GREEN>;
		};

		/* D25 */
		led2: led-2 {
			label = "led2";
			gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>;
			color = <LED_COLOR_ID_GREEN>;
		};

		/* D26 */
		led3: led-3 {
			label = "led3";
			gpios = <&main_gpio0 33 GPIO_ACTIVE_HIGH>;
			color = <LED_COLOR_ID_GREEN>;
		};
	};

	regulator-m2-3v3 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&regulator_pcie_3v3_default_pins>;
		regulator-name = "m2-3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&main_gpio1 17 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
	};

	regulator-vpp-1v8 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&regulator_vpp_1v8_default_pins>;
		regulator-name = "vpp-1v8";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		gpio = <&main_gpio1 78 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	serdes_mux: mux-controller {
		compatible = "gpio-mux";
		pinctrl-names = "default";
		pinctrl-0 = <&serdes_mux_default_pins>;
		#mux-control-cells = <0>;
		/*
		 * Mux has 2 IOs:
		 * - select: 0 = USB-3 (M2); 1 = PCIE (M1)
		 * - shutdown: 0 = active; 1 = disabled (high impedance)
		 */
		mux-gpios = <&main_gpio1 40 GPIO_ACTIVE_HIGH>, <&main_gpio1 41 GPIO_ACTIVE_HIGH>;
		/* default disabled */
		idle-state = <2>;
	};
};

&main_gpio0 {
	m2-reset-hog {
		gpio-hog;
		gpios = <12 GPIO_ACTIVE_LOW>;
		output-low; /* deasserted */
		line-name = "m2-reset";
	};

	m1-m2-w-disable1-hog {
		gpio-hog;
		gpios = <32 GPIO_ACTIVE_LOW>;
		output-low; /* deasserted */
		line-name = "m1-m2-pcie-w-disable1";
	};

	m1-m2-w-disable2-hog {
		gpio-hog;
		gpios = <34 GPIO_ACTIVE_LOW>;
		output-low; /* deasserted */
		line-name = "m1-m2-pcie-w-disable2";
	};
};

&main_gpio1 {
	m1-pcie-clkreq0-hog {
		gpio-hog;
		gpios = <11 GPIO_ACTIVE_LOW>;
		input;
		line-name = "m1-pcie-clkreq0";
	};

	m2-pcie-clkreq-hog {
		gpio-hog;
		gpios = <35 GPIO_ACTIVE_LOW>;
		input;
		line-name = "m2-pcie-clkreq";
	};
};

&main_i2c0 {
	pinctrl-0 = <&main_i2c0_default_pins>, <&main_i2c0_int_default_pins>;

	humidity-sensor@41 {
		compatible = "ti,hdc2010";
		reg = <0x41>;
		interrupt-parent = <&main_gpio0>;
		interrupts = <37 IRQ_TYPE_EDGE_FALLING>;
	};

	light-sensor@44 {
		compatible = "ti,opt3001";
		reg = <0x44>;
		interrupt-parent = <&main_gpio0>;
		interrupts = <37 IRQ_TYPE_EDGE_FALLING>;
	};

	/* charger@6a */
};

&main_i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c1_default_pins>;
	status = "okay";

	rtc@69 {
		compatible = "abracon,abx80x";
		reg = <0x69>;
		pinctrl-names = "default";
		pinctrl-0 = <&rtc_int_default_pins>;
		abracon,tc-diode = "schottky";
		abracon,tc-resistor = <3>;
		interrupt-parent = <&main_gpio0>;
		interrupts = <44 IRQ_TYPE_EDGE_FALLING>;
	};
};

&main_mcan0 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_mcan0_default_pins>;
	status = "okay";

	can-transceiver {
		max-bitrate = <8000000>;
	};
};

&main_mcan1 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_mcan1_default_pins>;
	status = "okay";

	can-transceiver {
		max-bitrate = <8000000>;
	};
};

&main_pmx0 {
	leds_default_pins: leds-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x0074, PIN_OUTPUT, 7) /* GPMC0_AD14.GPIO0_29 */
			AM64X_IOPAD(0x0078, PIN_OUTPUT, 7) /* GPMC0_AD15.GPIO0_30 */
			AM64X_IOPAD(0x0088, PIN_OUTPUT, 7) /* GPMC0_OEn_REn.GPIO0_33 */
		>;
	};

	main_i2c0_int_default_pins: main-i2c0-int-default-pins {
		pinctrl-single,pins = <
			/* external pull-up on Carrier */
			AM64X_IOPAD(0x0098, PIN_INPUT, 7) /* GPMC0_WAIT0.GPIO0_37 */
		>;
	};

	main_i2c1_default_pins: main-i2c1-default-pins {
		pinctrl-single,pins = <
			/* external pull-up on SoM */
			AM64X_IOPAD(0x0268, PIN_INPUT, 0) /* I2C1_SCL.I2C1_SCL */
			AM64X_IOPAD(0x026c, PIN_INPUT, 0) /* I2C1_SDA.I2C1_SDA */
		>;
	};

	main_mcan0_default_pins: main-mcan0-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x0254, PIN_INPUT, 0) /* MCAN0_RX.MCAN0_RX */
			AM64X_IOPAD(0x0250, PIN_OUTPUT, 0) /* MCAN0_TX.MCAN0_TX */
		>;
	};

	main_mcan1_default_pins: main-mcan1-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x025c, PIN_INPUT, 0) /* MCAN1_RX.MCAN1_RX */
			AM64X_IOPAD(0x0258, PIN_OUTPUT, 0) /* MCAN1_TX.MCAN1_TX */
		>;
	};

	main_uart3_default_pins: main-uart3-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x016c, PIN_INPUT, 10) /* PRG0_PRU0_GPO3.UART3_CTSn */
			AM64X_IOPAD(0x0170, PIN_OUTPUT, 10) /* PRG0_PRU0_GPO4.UART3_TXD */
			AM64X_IOPAD(0x0174, PIN_OUTPUT, 10) /* PRG0_PRU0_GPO5.UART3_RTSn */
			AM64X_IOPAD(0x01ac, PIN_INPUT, 10) /* PRG0_PRU0_GPO19.UART3_RXD */
		>;
	};

	pcie0_default_pins: pcie0-default-pins {
		pinctrl-single,pins = <
			/* connector M2 RESET */
			AM64X_IOPAD(0x0030, PIN_OUTPUT, 7) /* OSPI0_CSn1.GPIO0_12 */
			/* connectors M1 & M2 W_DISABLE1 */
			AM64X_IOPAD(0x0084, PIN_OUTPUT, 7) /* GPMC0_ADVN_ALE.GPIO0_32 */
			/* connectors M1 & M2 W_DISABLE2 */
			AM64X_IOPAD(0x008c, PIN_OUTPUT, 7) /* GPMC0_WEN.GPIO0_34 */
			/* connectors M1 & M2 PERST0 (PCI Reset) */
			AM64X_IOPAD(0x019c, PIN_OUTPUT, 7) /* PRG0_PRU0_GPO15.GPIO1_15 */
			/* connector M1 CLKREQ0 */
			AM64X_IOPAD(0x018c, PIN_INPUT, 7) /* PRG0_PRU0_GPO11.GPIO1_11 */
			/* connector M2 CLKREQ0 */
			AM64X_IOPAD(0x01ec, PIN_INPUT, 7) /* PRG0_PRU1_GPO15.GPIO1_35 */
		>;
	};

	regulator_pcie_3v3_default_pins: regulator-pcie-3v3-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x01a4, PIN_OUTPUT, 7) /* PRG0_PRU0_GPO17.GPIO1_17 */
		>;
	};

	regulator_vpp_1v8_default_pins: regulator-vpp-1v8-default-pins {
		pinctrl-single,pins = <
			AM64X_IOPAD(0x029c, PIN_OUTPUT, 7) /* MMC1_SDWP.GPIO1_78 */
		>;
	};

	rtc_int_default_pins: rtc-int-default-pins {
		pinctrl-single,pins = <
			/* external pull-up on Carrier */
			AM64X_IOPAD(0x00b4, PIN_INPUT, 7) /* GPMC0_CSn3.GPIO0_44 */
		>;
	};

	serdes_mux_default_pins: serdes-mux-default-pins {
		pinctrl-single,pins = <
			/* SEL, 10k pull-down on carrier, 2.2k pullup on SoM */
			AM64X_IOPAD(0x0200, PIN_OUTPUT, 7) /* PRG0_MDIO0_MDIO.GPIO1_40 */
			/* EN */
			AM64X_IOPAD(0x0204, PIN_OUTPUT, 7) /* PRG0_MDIO0_MDC.GPIO1_41 */
		>;
	};
};

&main_uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_uart3_default_pins>;
	uart-has-rtscts;
	linux,rs485-enabled-at-boot-time;
	status = "okay";
};

&usb0 {
	dr_mode = "host";
};