1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
4 */
5
6/dts-v1/;
7
8#include "k3-am654.dtsi"
9
10/ {
11	compatible =  "ti,am654-evm", "ti,am654";
12	model = "Texas Instruments AM654 Base Board";
13
14	chosen {
15		stdout-path = "serial2:115200n8";
16		bootargs = "earlycon=ns16550a,mmio32,0x02800000";
17	};
18
19	memory@80000000 {
20		device_type = "memory";
21		/* 4G RAM */
22		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
23		      <0x00000008 0x80000000 0x00000000 0x80000000>;
24	};
25
26	reserved-memory {
27		#address-cells = <2>;
28		#size-cells = <2>;
29		ranges;
30		secure_ddr: secure_ddr@9e800000 {
31			reg = <0 0x9e800000 0 0x01800000>; /* for OP-TEE */
32			alignment = <0x1000>;
33			no-map;
34		};
35	};
36};
37
38&wkup_pmx0 {
39	wkup_i2c0_pins_default: wkup-i2c0-pins-default {
40		pinctrl-single,pins = <
41			AM65X_WKUP_IOPAD(0x00e0, PIN_INPUT, 0) /* (AC7) WKUP_I2C0_SCL */
42			AM65X_WKUP_IOPAD(0x00e4, PIN_INPUT, 0) /* (AD6) WKUP_I2C0_SDA */
43		>;
44	};
45};
46
47&main_pmx0 {
48	main_uart0_pins_default: main-uart0-pins-default {
49		pinctrl-single,pins = <
50			AM65X_IOPAD(0x01e4, PIN_INPUT, 0)	/* (AF11) UART0_RXD */
51			AM65X_IOPAD(0x01e8, PIN_OUTPUT, 0)	/* (AE11) UART0_TXD */
52			AM65X_IOPAD(0x01ec, PIN_INPUT, 0)	/* (AG11) UART0_CTSn */
53			AM65X_IOPAD(0x01f0, PIN_OUTPUT, 0)	/* (AD11) UART0_RTSn */
54		>;
55	};
56
57	main_i2c2_pins_default: main-i2c2-pins-default {
58		pinctrl-single,pins = <
59			AM65X_IOPAD(0x0074, PIN_INPUT, 5) /* (T27) GPMC0_CSn3.I2C2_SCL */
60			AM65X_IOPAD(0x0070, PIN_INPUT, 5) /* (R25) GPMC0_CSn2.I2C2_SDA */
61		>;
62	};
63
64	main_spi0_pins_default: main-spi0-pins-default {
65		pinctrl-single,pins = <
66			AM65X_IOPAD(0x01c4, PIN_INPUT, 0) /* (AH13) SPI0_CLK */
67			AM65X_IOPAD(0x01c8, PIN_INPUT, 0) /* (AE13) SPI0_D0 */
68			AM65X_IOPAD(0x01cc, PIN_INPUT, 0) /* (AD13) SPI0_D1 */
69			AM65X_IOPAD(0x01bc, PIN_OUTPUT, 0) /* (AG13) SPI0_CS0 */
70		>;
71	};
72
73	main_mmc0_pins_default: main-mmc0-pins-default {
74		pinctrl-single,pins = <
75			AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */
76			AM65X_IOPAD(0x01ac, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */
77			AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */
78			AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */
79			AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */
80			AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */
81			AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */
82			AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */
83			AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */
84			AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */
85			AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */
86			AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
87		>;
88	};
89
90	usb1_pins_default: usb1_pins_default {
91		pinctrl-single,pins = <
92			AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) USB1_DRVVBUS */
93		>;
94	};
95};
96
97&main_pmx1 {
98	main_i2c0_pins_default: main-i2c0-pins-default {
99		pinctrl-single,pins = <
100			AM65X_IOPAD(0x0000, PIN_INPUT, 0) /* (D20) I2C0_SCL */
101			AM65X_IOPAD(0x0004, PIN_INPUT, 0) /* (C21) I2C0_SDA */
102		>;
103	};
104
105	main_i2c1_pins_default: main-i2c1-pins-default {
106		pinctrl-single,pins = <
107			AM65X_IOPAD(0x0008, PIN_INPUT, 0) /* (B21) I2C1_SCL */
108			AM65X_IOPAD(0x000c, PIN_INPUT, 0) /* (E21) I2C1_SDA */
109		>;
110	};
111
112	ecap0_pins_default: ecap0-pins-default {
113		pinctrl-single,pins = <
114			AM65X_IOPAD(0x0010, PIN_INPUT, 0) /* (D21) ECAP0_IN_APWM_OUT */
115		>;
116	};
117};
118
119&wkup_uart0 {
120	/* Wakeup UART is used by System firmware */
121	status = "disabled";
122};
123
124&main_uart0 {
125	pinctrl-names = "default";
126	pinctrl-0 = <&main_uart0_pins_default>;
127};
128
129&wkup_i2c0 {
130	pinctrl-names = "default";
131	pinctrl-0 = <&wkup_i2c0_pins_default>;
132	clock-frequency = <400000>;
133
134	pca9554: gpio@39 {
135		compatible = "nxp,pca9554";
136		reg = <0x39>;
137		gpio-controller;
138		#gpio-cells = <2>;
139	};
140};
141
142&main_i2c0 {
143	pinctrl-names = "default";
144	pinctrl-0 = <&main_i2c0_pins_default>;
145	clock-frequency = <400000>;
146
147	pca9555: gpio@21 {
148		compatible = "nxp,pca9555";
149		reg = <0x21>;
150		gpio-controller;
151		#gpio-cells = <2>;
152	};
153};
154
155&main_i2c1 {
156	pinctrl-names = "default";
157	pinctrl-0 = <&main_i2c1_pins_default>;
158	clock-frequency = <400000>;
159};
160
161&main_i2c2 {
162	pinctrl-names = "default";
163	pinctrl-0 = <&main_i2c2_pins_default>;
164	clock-frequency = <400000>;
165};
166
167&ecap0 {
168	pinctrl-names = "default";
169	pinctrl-0 = <&ecap0_pins_default>;
170};
171
172&main_spi0 {
173	pinctrl-names = "default";
174	pinctrl-0 = <&main_spi0_pins_default>;
175	#address-cells = <1>;
176	#size-cells= <0>;
177	ti,pindir-d0-out-d1-in = <1>;
178
179	flash@0{
180		compatible = "jedec,spi-nor";
181		reg = <0x0>;
182		spi-tx-bus-width = <1>;
183		spi-rx-bus-width = <1>;
184		spi-max-frequency = <48000000>;
185		#address-cells = <1>;
186		#size-cells= <1>;
187	};
188};
189
190&sdhci0 {
191	pinctrl-names = "default";
192	pinctrl-0 = <&main_mmc0_pins_default>;
193	bus-width = <8>;
194	non-removable;
195	ti,driver-strength-ohm = <50>;
196};
197
198&dwc3_1 {
199	status = "okay";
200};
201
202&usb1_phy {
203	status = "okay";
204};
205
206&usb1 {
207	pinctrl-names = "default";
208	pinctrl-0 = <&usb1_pins_default>;
209	dr_mode = "otg";
210};
211
212&dwc3_0 {
213	status = "disabled";
214};
215
216&usb0_phy {
217	status = "disabled";
218};
219
220&tscadc0 {
221	adc {
222		ti,adc-channels = <0 1 2 3 4 5 6 7>;
223	};
224};
225
226&tscadc1 {
227	adc {
228		ti,adc-channels = <0 1 2 3 4 5 6 7>;
229	};
230};
231