1/*
2 * Copyright (c) 2023 TiaC Systems
3 * Copyright 2019,2023 NXP
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8/dts-v1/;
9
10#include <nxp/nxp_rt1010.dtsi>
11#include "mimxrt1010_evk-pinctrl.dtsi"
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14/ {
15	model = "NXP MIMXRT1010-EVK board";
16	compatible = "nxp,mimxrt1010";
17
18	aliases {
19		led0 = &green_led;
20		sw0 = &user_button;
21	};
22
23	chosen {
24		zephyr,sram = &ocram;
25		zephyr,itcm = &itcm;
26		zephyr,dtcm = &dtcm;
27		zephyr,console = &lpuart1;
28		zephyr,shell-uart = &lpuart1;
29		zephyr,flash = &at25sf128a;
30		zephyr,flash-controller = &at25sf128a;
31		zephyr,code-partition = &slot0_partition;
32	};
33
34	leds {
35		compatible = "gpio-leds";
36		green_led: led-1 {
37			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
38			label = "User LD1";
39		};
40	};
41
42	gpio_keys {
43		compatible = "gpio-keys";
44		user_button: button-1 {
45			label = "User SW4";
46			gpios = <&gpio2 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
47			zephyr,code = <INPUT_KEY_0>;
48		};
49	};
50
51	arduino_header: connector {
52		compatible = "arduino-header-r3";
53		#gpio-cells = <2>;
54		gpio-map-mask = <0xffffffff 0xffffffc0>;
55		gpio-map-pass-thru = <0 0x3f>;
56		gpio-map = <0 0 &gpio1 21 0>,	/* A0 */
57			   <1 0 &gpio1 23 0>,	/* A1 */
58			   <2 0 &gpio1 24 0>,	/* A2 */
59			   <3 0 &gpio1 28 0>,	/* A3 */
60			   <4 0 &gpio1 15 0>,	/* A4 (shared with D6) */
61			   <5 0 &gpio1 16 0>,	/* A5 (shared with D7) */
62			   <6 0 &gpio1 9 0>,	/* D0 */
63			   <7 0 &gpio1 10 0>,	/* D1 */
64			   <8 0 &gpio1 19 0>,	/* D2 (shared with D10) */
65			   <9 0 &gpio1 20 0>,	/* D3 (shared with D13) */
66			   /* R800 not populated,  D4 */
67			   /* R793 not populated,  D5 (shared with D14) */
68			   <12 0 &gpio1 15 0>,	/* D6 (shared with A4) */
69			   <13 0 &gpio1 16 0>,	/* D7 (shared with A5) */
70			   <14 0 &gpio2 2 0>,	/* D8 */
71			   /* R795 not populated,  D9 */
72			   <16 0 &gpio1 19 0>,	/* D10 (shared with D2) */
73			   <17 0 &gpio1 18 0>,	/* D11 */
74			   <18 0 &gpio1 17 0>,	/* D12 */
75			   <19 0 &gpio1 20 0>,	/* D13 (shared with D3) */
76			   <20 0 &gpio1 1 0>,	/* D14 */
77			   <21 0 &gpio1 2 0>;	/* D15 */
78	};
79};
80
81arduino_serial: &lpuart1 {};
82
83&lpuart4 {
84	pinctrl-0 = <&pinmux_lpuart4>;
85	pinctrl-1 = <&pinmux_lpuart4_sleep>;
86	pinctrl-names = "default", "sleep";
87};
88
89&flexspi {
90	status = "okay";
91	reg = <0x400a0000 0x4000>, <0x60000000 DT_SIZE_M(16)>;
92	at25sf128a: at25sf128a@0 {
93		compatible = "nxp,imx-flexspi-nor";
94		size = <DT_SIZE_M(16 * 8)>;
95		reg = <0>;
96		spi-max-frequency = <133000000>;
97		status = "okay";
98		jedec-id = [1f 89 01];
99		erase-block-size = <4096>;
100		write-block-size = <1>;
101
102		partitions {
103			compatible = "fixed-partitions";
104			#address-cells = <1>;
105			#size-cells = <1>;
106			boot_partition: partition@0 {
107				label = "mcuboot";
108				reg = <0x00000000 DT_SIZE_K(64)>;
109			};
110			slot0_partition: partition@10000 {
111				label = "image-0";
112				reg = <0x00010000 DT_SIZE_M(7)>;
113			};
114			slot1_partition: partition@710000 {
115				label = "image-1";
116				reg = <0x00710000 DT_SIZE_M(7)>;
117			};
118			storage_partition: partition@E10000 {
119				label = "storage";
120				reg = <0x00E10000 DT_SIZE_K(1984)>;
121			};
122		};
123	};
124};
125
126arduino_i2c: &lpi2c1 {
127	status = "okay";
128	pinctrl-0 = <&pinmux_lpi2c1>;
129	pinctrl-names = "default";
130};
131
132&lpuart1 {
133	status = "okay";
134	current-speed = <115200>;
135	pinctrl-0 = <&pinmux_lpuart1>;
136	pinctrl-1 = <&pinmux_lpuart1_sleep>;
137	pinctrl-names = "default", "sleep";
138};
139
140arduino_spi: &lpspi1 {
141	status = "okay";
142	/* DMA channels 0 and 1, muxed to LPSPI1 RX and TX */
143	dmas = <&edma0 0 13>, <&edma0 1 14>;
144	dma-names = "rx", "tx";
145	pinctrl-0 = <&pinmux_lpspi1>;
146	pinctrl-names = "default";
147};
148
149zephyr_udc0: &usb1 {
150	status = "okay";
151};
152
153&adc1 {
154	status = "okay";
155	pinctrl-0 = <&pinmux_adc1>;
156	pinctrl-names = "default";
157};
158
159&sai1 {
160	pinctrl-0 = <&pinmux_sai1>;
161	pinctrl-names = "default";
162};
163
164&edma0 {
165	status = "okay";
166};
167
168/* GPT and Systick are enabled. If power management is enabled, the GPT
169 * timer will be used instead of systick, as allows the core clock to
170 * be gated.
171 */
172&gpt_hw_timer {
173	status = "okay";
174};
175
176&systick {
177	status = "okay";
178};
179