1/*
2 * Copyright 2018,2024 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nxp/nxp_rt1060.dtsi>
10#include "mimxrt1060_evk-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "NXP MIMXRT1060-EVK board";
15	compatible = "nxp,mimxrt1062";
16
17	aliases {
18		led0 = &green_led;
19		pwm-led0 = &green_pwm_led;
20		sw0 = &user_button;
21		watchdog0 = &wdog0;
22		sdhc0 = &usdhc1;
23		mcuboot-button0 = &user_button;
24	};
25
26	chosen {
27		zephyr,sram = &sdram0;
28		zephyr,itcm = &itcm;
29		zephyr,dtcm = &dtcm;
30		zephyr,uart-mcumgr = &lpuart1;
31		zephyr,console = &lpuart1;
32		zephyr,shell-uart = &lpuart1;
33		zephyr,canbus = &flexcan3;
34	};
35
36	sdram0: memory@80000000 {
37		/* Micron MT48LC16M16A2B4-6AIT:G */
38		device_type = "memory";
39		reg = <0x80000000 DT_SIZE_M(32)>;
40	};
41
42	/*
43	 * This node describes the GPIO pins of the parallel FPC interface,
44	 * This interface is standard to several NXP EVKs, and is used with
45	 * several parallel LCD displays (available as zephyr shields)
46	 */
47	nxp_parallel_lcd_connector: parallel-connector {
48		compatible = "nxp,parallel-lcd-connector";
49		#gpio-cells = <2>;
50		gpio-map-mask = <0xffffffff 0xffffffc0>;
51		gpio-map-pass-thru = <0 0x3f>;
52		gpio-map =	<0  0 &gpio2 31 0>;	/* Pin 1, BL+ */
53	};
54
55	/*
56	 * This node describes the GPIO pins of the I2C display FPC interface,
57	 * This interface is standard to several NXP EVKs, and is used with
58	 * several parallel LCD displays (available as zephyr shields)
59	 */
60	nxp_i2c_touch_fpc: i2c-touch-connector {
61		compatible = "nxp,i2c-tsc-fpc";
62		#gpio-cells = <2>;
63		gpio-map-mask = <0xffffffff 0xffffffc0>;
64		gpio-map-pass-thru = <0 0x3f>;
65		gpio-map =	<1  0 &gpio1 2 0>,	/* Pin 2, LCD touch RST */
66				<2  0 &gpio1 11 0>;	/* Pin 3, LCD touch INT */
67	};
68
69	leds {
70		compatible = "gpio-leds";
71		green_led: led-1 {
72			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
73			label = "User LED1";
74		};
75	};
76
77	pwmleds {
78		compatible = "pwm-leds";
79		green_pwm_led: green_pwm_led {
80			pwms = <&flexpwm2_pwm3 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
81		};
82	};
83
84	gpio_keys {
85		compatible = "gpio-keys";
86		user_button: button-1 {
87			label = "User SW8";
88			gpios = <&gpio5 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
89			zephyr,code = <INPUT_KEY_0>;
90		};
91	};
92
93	arduino_header: connector {
94		compatible = "arduino-header-r3";
95		#gpio-cells = <2>;
96		gpio-map-mask = <0xffffffff 0xffffffc0>;
97		gpio-map-pass-thru = <0 0x3f>;
98		gpio-map = <0 0 &gpio1 26 0>,	/* A0 */
99			   <1 0 &gpio1 27 0>,	/* A1 */
100			   <2 0 &gpio1 20 0>,	/* A2 */
101			   <3 0 &gpio1 21 0>,	/* A3 */
102			   <4 0 &gpio1 17 0>,	/* A4 */
103			   <5 0 &gpio1 16 0>,	/* A5 */
104			   <6 0 &gpio1 23 0>,	/* D0 */
105			   <7 0 &gpio1 22 0>,	/* D1 */
106			   <8 0 &gpio1 11 0>,	/* D2 */
107			   <9 0 &gpio1 24 0>,	/* D3 */
108			   <10 0 &gpio1 9 0>,	/* D4 */
109			   <11 0 &gpio1 10 0>,	/* D5 */
110			   <12 0 &gpio1 18 0>,	/* D6 */
111			   <13 0 &gpio1 19 0>,	/* D7 */
112			   <14 0 &gpio1 3 0>,	/* D8 */
113			   <15 0 &gpio1 2 0>,	/* D9 */
114			   <16 0 &gpio3 13 0>,	/* D10 */
115			   <17 0 &gpio3 14 0>,	/* D11 */
116			   <18 0 &gpio3 15 0>,	/* D12 */
117			   <19 0 &gpio3 12 0>,	/* D13 */
118			   <20 0 &gpio1 17 0>,	/* D14 */
119			   <21 0 &gpio1 16 0>;	/* D15 */
120	};
121};
122
123arduino_serial: &lpuart3 {
124	pinctrl-0 = <&pinmux_lpuart3>;
125	pinctrl-1 = <&pinmux_lpuart3_flow_control>;
126	pinctrl-2 = <&pinmux_lpuart3_sleep>;
127	pinctrl-names = "default", "flowcontrol", "sleep";
128};
129
130zephyr_lcdif: &lcdif {
131	pinctrl-0 = <&pinmux_lcdif>;
132	pinctrl-names = "default";
133};
134
135nxp_touch_i2c: &lpi2c1 {};
136
137arduino_i2c: &lpi2c1 {
138	status = "okay";
139	pinctrl-0 = <&pinmux_lpi2c1>;
140	pinctrl-names = "default";
141};
142
143&lpuart1 {
144	status = "okay";
145	current-speed = <115200>;
146	pinctrl-0 = <&pinmux_lpuart1>;
147	pinctrl-1 = <&pinmux_lpuart1_sleep>;
148	pinctrl-names = "default", "sleep";
149};
150
151&enet_mac {
152	status = "okay";
153	pinctrl-0 = <&pinmux_enet>;
154	pinctrl-names = "default";
155	phy-handle = <&phy>;
156	zephyr,random-mac-address;
157	phy-connection-type = "rmii";
158};
159
160&enet_mdio {
161	status = "okay";
162	pinctrl-0 = <&pinmux_enet_mdio>;
163	pinctrl-names = "default";
164	phy: phy@0 {
165		compatible = "microchip,ksz8081";
166		reg = <0>;
167		status = "okay";
168		reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
169		int-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
170		microchip,interface-type = "rmii";
171	};
172};
173
174&enet_ptp_clock {
175	status = "okay";
176	pinctrl-0 = <&pinmux_ptp>;
177	pinctrl-names = "default";
178};
179
180&adc1 {
181	status = "okay";
182	pinctrl-0 = <&pinmux_adc1>;
183	pinctrl-names = "default";
184};
185
186zephyr_udc0: &usb1 {
187	status = "okay";
188	phy_handle = <&usbphy1>;
189};
190
191&usbphy1 {
192	status = "okay";
193	tx-d-cal = <12>;
194	tx-cal-45-dp-ohms = <6>;
195	tx-cal-45-dm-ohms = <6>;
196};
197
198&csi {
199	pinctrl-0 = <&pinmux_csi>;
200	pinctrl-names = "default";
201};
202
203&flexpwm2_pwm3 {
204	status = "okay";
205	pinctrl-0 = <&pinmux_flexpwm2_3>;
206	pinctrl-names = "default";
207};
208
209&flexpwm1_pwm0 {
210	pinctrl-0 = <&pinmux_flexpwm1_0>;
211	pinctrl-names = "default";
212};
213
214&flexpwm1_pwm3 {
215	pinctrl-0 = <&pinmux_flexpwm1>;
216	pinctrl-names = "default";
217};
218
219&usdhc1 {
220	status = "okay";
221	power-delay-ms = <1000>;
222	pwr-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
223	cd-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
224	status = "okay";
225	pinctrl-0 = <&pinmux_usdhc1>;
226	pinctrl-1 = <&pinmux_usdhc1_slow>;
227	pinctrl-2 = <&pinmux_usdhc1_med>;
228	pinctrl-3 = <&pinmux_usdhc1_fast>;
229	pinctrl-names = "default", "slow", "med", "fast";
230	sdmmc {
231		compatible = "zephyr,sdmmc-disk";
232		disk-name = "SD";
233		status = "okay";
234	};
235};
236
237&edma0 {
238	status = "okay";
239};
240
241&flexcan3 {
242	status = "okay";
243	pinctrl-0 = <&pinmux_flexcan3>;
244	pinctrl-names = "default";
245
246	can-transceiver {
247		max-bitrate = <5000000>;
248	};
249};
250
251&wdog0 {
252	status = "okay";
253};
254
255arduino_spi: &lpspi1 {
256	status = "okay";
257	/* DMA channels 0 and 1, muxed to LPSPI1 RX and TX */
258	dmas = <&edma0 0 13>, <&edma0 1 14>;
259	dma-names = "rx", "tx";
260	pinctrl-0 = <&pinmux_lpspi1>;
261	pinctrl-names = "default";
262};
263
264&lpspi3 {
265	status = "okay";
266	/* DMA channels 2 and 3, muxed to LPSPI3 RX and TX */
267	dmas = <&edma0 2 15>, <&edma0 3 16>;
268	dma-names = "rx", "tx";
269	pinctrl-0 = <&pinmux_lpspi3>;
270	pinctrl-names = "default";
271
272};
273
274&sai1 {
275	status = "okay";
276	pinctrl-0 = <&pinmux_sai1>;
277	pinctrl-names = "default";
278};
279
280/* GPT and Systick are enabled. If power management is enabled, the GPT
281 * timer will be used instead of systick, as allows the core clock to
282 * be gated.
283 */
284&gpt_hw_timer {
285	status = "okay";
286};
287
288&systick {
289	status = "okay";
290};
291
292&iomuxcgpr {
293	status = "okay";
294};
295
296&itm {
297	pinctrl-0 = <&pinmux_swo>;
298	pinctrl-names = "default";
299};
300
301&pxp {
302	status = "okay";
303};
304
305&pit0 {
306	status = "okay";
307};
308
309dvp_fpc24_i2c: &lpi2c1 {};
310
311dvp_fpc24_interface: &csi {};
312