1/*
2 * Copyright (c) 2018, NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nxp/nxp_rt1064.dtsi>
10#include "mimxrt1064_evk-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "NXP MIMXRT1064-EVK board";
15	compatible = "nxp,mimxrt1064";
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,flash-controller = &is25wp064;
28		zephyr,flash = &w25q32jvwj0;
29		zephyr,code-partition = &slot0_partition;
30		zephyr,uart-mcumgr = &lpuart1;
31		zephyr,sram = &sdram0;
32		zephyr,itcm = &itcm;
33		zephyr,dtcm = &dtcm;
34		zephyr,console = &lpuart1;
35		zephyr,shell-uart = &lpuart1;
36		zephyr,canbus = &flexcan2;
37		zephyr,touch = &ft5336;
38	};
39
40	sdram0: memory@80000000 {
41		/* Micron MT48LC16M16A2B4-6AIT:G */
42		device_type = "memory";
43		reg = <0x80000000 DT_SIZE_M(32)>;
44	};
45
46	/*
47	 * This node describes the GPIO pins of the parallel FPC interface,
48	 * This interface is standard to several NXP EVKs, and is used with
49	 * several parallel LCD displays (available as zephyr shields)
50	 */
51	nxp_parallel_lcd_connector: parallel-connector {
52		compatible = "nxp,parallel-lcd-connector";
53		#gpio-cells = <2>;
54		gpio-map-mask = <0xffffffff 0xffffffc0>;
55		gpio-map-pass-thru = <0 0x3f>;
56		gpio-map =	<0  0 &gpio2 31 0>;	/* Pin 1, BL+ */
57	};
58
59	/*
60	 * This node describes the GPIO pins of the I2C display FPC interface,
61	 * This interface is standard to several NXP EVKs, and is used with
62	 * several parallel LCD displays (available as zephyr shields)
63	 */
64	nxp_i2c_touch_fpc: i2c-touch-connector {
65		compatible = "nxp,i2c-tsc-fpc";
66		#gpio-cells = <2>;
67		gpio-map-mask = <0xffffffff 0xffffffc0>;
68		gpio-map-pass-thru = <0 0x3f>;
69		gpio-map =	<1  0 &gpio1 2 0>,	/* Pin 2, LCD touch RST */
70				<2  0 &gpio1 11 0>;	/* Pin 3, LCD touch INT */
71	};
72
73	leds {
74		compatible = "gpio-leds";
75		green_led: led-1 {
76			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
77			label = "User LD1";
78		};
79	};
80
81	pwmleds {
82		compatible = "pwm-leds";
83
84		green_pwm_led: green_pwm_led {
85			pwms = <&flexpwm2_pwm3 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
86		};
87	};
88
89	gpio_keys {
90		compatible = "gpio-keys";
91		user_button: button-1 {
92			label = "User SW8";
93			gpios = <&gpio5 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
94			zephyr,code = <INPUT_KEY_0>;
95		};
96	};
97
98	lvgl_pointer {
99		compatible = "zephyr,lvgl-pointer-input";
100		input = <&ft5336>;
101	};
102
103	arduino_header: connector {
104		compatible = "arduino-header-r3";
105		#gpio-cells = <2>;
106		gpio-map-mask = <0xffffffff 0xffffffc0>;
107		gpio-map-pass-thru = <0 0x3f>;
108		gpio-map = <0 0 &gpio1 26 0>,	/* A0 */
109			   <1 0 &gpio1 27 0>,	/* A1 */
110			   <2 0 &gpio1 20 0>,	/* A2 */
111			   <3 0 &gpio1 21 0>,	/* A3 */
112			   <4 0 &gpio1 17 0>,	/* A4 */
113			   <5 0 &gpio1 16 0>,	/* A5 */
114			   <6 0 &gpio1 23 0>,	/* D0 */
115			   <7 0 &gpio1 22 0>,	/* D1 */
116			   <8 0 &gpio1 11 0>,	/* D2 */
117			   <9 0 &gpio1 24 0>,	/* D3 */
118			   <10 0 &gpio1 9 0>,	/* D4 */
119			   <11 0 &gpio1 10 0>,	/* D5 */
120			   <12 0 &gpio1 18 0>,	/* D6 */
121			   <13 0 &gpio1 19 0>,	/* D7 */
122			   <14 0 &gpio1 3 0>,	/* D8 */
123			   <15 0 &gpio1 2 0>,	/* D9 */
124			   <16 0 &gpio3 13 0>,	/* D10 */
125			   <17 0 &gpio3 14 0>,	/* D11 */
126			   <18 0 &gpio3 15 0>,	/* D12 */
127			   <19 0 &gpio3 12 0>,	/* D13 */
128			   <20 0 &gpio1 17 0>,	/* D14 */
129			   <21 0 &gpio1 16 0>;	/* D15 */
130	};
131};
132
133nxp_touch_i2c: &lpi2c1 {};
134
135zephyr_lcdif: &lcdif {
136	pinctrl-0 = <&pinmux_lcdif>;
137	pinctrl-names = "default";
138};
139
140nxp_parallel_i2c: &lpi2c1 {};
141
142&lpi2c1 {
143	status = "okay";
144
145	pinctrl-0 = <&pinmux_lpi2c1>;
146	pinctrl-names = "default";
147
148	ft5336: ft5336@38 {
149		compatible = "focaltech,ft5336";
150		reg = <0x38>;
151		int-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
152	};
153};
154
155&flexspi {
156	status = "okay";
157	pinctrl-0 = <&pinmux_flexspi1>;
158	pinctrl-names = "default";
159	ahb-prefetch;
160	ahb-read-addr-opt;
161	rx-clock-source = <1>;
162	reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>;
163	is25wp064: is25wp064@0 {
164		compatible = "nxp,imx-flexspi-nor";
165		size = <67108864>;
166		reg = <0>;
167		spi-max-frequency = <104000000>;
168		status = "okay";
169		jedec-id = [9d 70 17];
170
171		partitions {
172			compatible = "fixed-partitions";
173			#address-cells = <1>;
174			#size-cells = <1>;
175
176			storage_partition: partition@0 {
177				label = "storage";
178				reg = <0x00000000 DT_SIZE_M(8)>;
179			};
180		};
181	};
182};
183
184&w25q32jvwj0 {
185	partitions {
186		compatible = "fixed-partitions";
187		#address-cells = <1>;
188		#size-cells = <1>;
189		boot_partition: partition@0 {
190			label = "mcuboot";
191			reg = <0x00000000 DT_SIZE_K(128)>;
192		};
193		/* The MCUBoot swap-move algorithm uses the last 2 sectors
194		 * of the primary slot0 for swap status and move.
195		 */
196		slot0_partition: partition@20000 {
197			label = "image-0";
198			reg = <0x00020000 (DT_SIZE_K(1980) + DT_SIZE_K(8))>;
199		};
200		slot1_partition: partition@211000 {
201			label = "image-1";
202			reg = <0x00211000 DT_SIZE_K(1980)>;
203		};
204		/* The storage partition is located in is25wp064 */
205	};
206};
207
208&lpuart1 {
209	status = "okay";
210	pinctrl-0 = <&pinmux_lpuart1>;
211	pinctrl-1 = <&pinmux_lpuart1_sleep>;
212	pinctrl-names = "default", "sleep";
213	current-speed = <115200>;
214};
215
216arduino_serial: &lpuart3 {
217	current-speed = <115200>;
218	pinctrl-0 = <&pinmux_lpuart3>;
219	pinctrl-1 = <&pinmux_lpuart3_sleep>;
220	pinctrl-names = "default", "sleep";
221};
222
223&enet_mac {
224	status = "okay";
225	pinctrl-0 = <&pinmux_enet>;
226	pinctrl-names = "default";
227	phy-handle = <&phy>;
228	zephyr,random-mac-address;
229	phy-connection-type = "rmii";
230};
231
232&enet_mdio {
233	status = "okay";
234	pinctrl-0 = <&pinmux_enet_mdio>;
235	pinctrl-names = "default";
236	phy: phy@0 {
237		compatible = "microchip,ksz8081";
238		reg = <0>;
239		status = "okay";
240		reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
241		int-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
242		microchip,interface-type = "rmii";
243	};
244};
245
246&enet_ptp_clock {
247	status = "okay";
248	pinctrl-0 = <&pinmux_ptp>;
249	pinctrl-names = "default";
250};
251
252
253zephyr_udc0: &usb1 {
254	status = "okay";
255};
256
257&csi {
258	pinctrl-0 = <&pinmux_csi>;
259	pinctrl-names = "default";
260};
261
262&flexpwm2_pwm3 {
263	status = "okay";
264	pinctrl-0 = <&pinmux_flexpwm2>;
265	pinctrl-names = "default";
266};
267
268&usdhc1 {
269	status = "okay";
270	pwr-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
271	cd-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
272	pinctrl-0 = <&pinmux_usdhc1>;
273	pinctrl-1 = <&pinmux_usdhc1_slow>;
274	pinctrl-2 = <&pinmux_usdhc1_med>;
275	pinctrl-3 = <&pinmux_usdhc1_fast>;
276	pinctrl-names = "default", "slow", "med", "fast";
277	sdmmc {
278		compatible = "zephyr,sdmmc-disk";
279		disk-name = "SD";
280		status = "okay";
281	};
282};
283
284&edma0 {
285	status = "okay";
286};
287
288&flexcan2 {
289	status = "okay";
290	pinctrl-0 = <&pinmux_flexcan2>;
291	pinctrl-names = "default";
292
293	can-transceiver {
294		max-bitrate = <5000000>;
295	};
296};
297
298&wdog0 {
299	status = "okay";
300};
301
302&lpspi1 {
303	status = "okay";
304	/* DMA channels 0 and 1, muxed to LPSPI1 RX and TX */
305	dmas = <&edma0 0 13>, <&edma0 1 14>;
306	dma-names = "rx", "tx";
307	pinctrl-0 = <&pinmux_lpspi1>;
308	pinctrl-names = "default";
309};
310
311&lpspi3 {
312	status = "okay";
313	/* DMA channels 2 and 3, muxed to LPSPI3 RX and TX */
314	dmas = <&edma0 2 15>, <&edma0 3 16>;
315	dma-names = "rx", "tx";
316	pinctrl-0 = <&pinmux_lpspi3>;
317	pinctrl-names = "default";
318};
319
320&adc1 {
321	status = "okay";
322	pinctrl-0 = <&pinmux_adc1>;
323	pinctrl-names = "default";
324};
325
326/* GPT and Systick are enabled. If power management is enabled, the GPT
327 * timer will be used instead of systick, as allows the core clock to
328 * be gated.
329 */
330&gpt_hw_timer {
331	status = "okay";
332};
333
334&systick {
335	status = "okay";
336};
337
338&itm {
339	pinctrl-0 = <&pinmux_swo>;
340	pinctrl-names = "default";
341};
342
343&pxp {
344	status = "okay";
345};
346
347&pit0 {
348	status = "okay";
349};
350
351dvp_fpc24_i2c: &lpi2c1 {};
352
353dvp_fpc24_interface: &csi {};
354