1/*
2 * Copyright (c) 2021, NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include "mimxrt1170_evk-pinctrl.dtsi"
8
9/ {
10	aliases {
11		led0 = &green_led;
12		led1 = &red_led;
13		sw0 = &user_button;
14		magn0 = &fxos8700;
15		accel0 = &fxos8700;
16		sdhc0 = &usdhc1;
17	};
18
19	leds {
20		compatible = "gpio-leds";
21		green_led: led-1 {
22			gpios = <&gpio9 3 GPIO_ACTIVE_HIGH>;
23			label = "User LED D6";
24		};
25
26		red_led: led-2 {
27			gpios = <&gpio9 25 GPIO_ACTIVE_LOW>;
28			label = "User LED D34";
29		};
30	};
31
32	gpio_keys {
33		compatible = "gpio-keys";
34		user_button: button-1 {
35			label = "User SW7";
36			gpios = <&gpio13 0 GPIO_ACTIVE_HIGH>;
37		};
38	};
39
40	pwmleds {
41		compatible = "pwm-leds";
42
43		green_pwm_led: green_pwm_led {
44			pwms = <&flexpwm1_pwm2 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
45		};
46	};
47};
48
49&lpi2c5 {
50	status = "okay";
51	pinctrl-0 = <&pinmux_lpi2c5>;
52	pinctrl-names = "default";
53
54	fxos8700: fxos8700@1f {
55		compatible = "nxp,fxos8700";
56		reg = <0x1f>;
57
58		/* Two zero ohm resistors (R256 and R270) isolate sensor
59		 * interrupt gpios from the soc and are unpopulated by default.
60		 * Note that if you populate them, they conflict with camera and
61		 * ethernet PHY reset signals.
62		 */
63		int1-gpios = <&gpio11 14 GPIO_ACTIVE_LOW>;
64		int2-gpios = <&gpio11 15 GPIO_ACTIVE_LOW>;
65	};
66};
67
68&lpuart1 {
69	status = "okay";
70	pinctrl-0 = <&pinmux_lpuart1>;
71	pinctrl-1 = <&pinmux_lpuart1_sleep>;
72	pinctrl-names = "default", "sleep";
73	current-speed = <115200>;
74};
75
76&lpuart2 {
77	pinctrl-0 = <&pinmux_lpuart2>;
78	pinctrl-1 = <&pinmux_lpuart2_sleep>;
79	pinctrl-names = "default", "sleep";
80};
81
82&user_button {
83	status = "okay";
84};
85
86&green_led {
87	status = "okay";
88};
89
90&flexpwm1_pwm2 {
91	status = "okay";
92	pinctrl-0 = <&pinmux_flexpwm1>;
93	pinctrl-names = "default";
94};
95
96&enet {
97	pinctrl-0 = <&pinmux_enet>;
98	pinctrl-names = "default";
99	ptp {
100		pinctrl-0 = <&pinmux_ptp>;
101		pinctrl-names = "default";
102	};
103};
104
105&csi {
106	pinctrl-0 = <&pinmux_csi>;
107	pinctrl-names = "default";
108};
109
110&flexcan3 {
111	pinctrl-0 = <&pinmux_flexcan3>;
112	pinctrl-names = "default";
113};
114
115&lcdif {
116	pinctrl-0 = <&pinmux_lcdif>;
117	pinctrl-names = "default";
118};
119
120&lpi2c1 {
121	pinctrl-0 =<&pinmux_lpi2c1>;
122	pinctrl-names = "default";
123};
124
125&lpspi1 {
126	pinctrl-0 = <&pinmux_lpspi1>;
127	pinctrl-names = "default";
128};
129
130&lpuart2 {
131	pinctrl-0 = <&pinmux_lpuart2>;
132	pinctrl-1 = <&pinmux_lpuart2_sleep>;
133	pinctrl-names = "default", "sleep";
134};
135
136&sai1 {
137	pinctrl-0 = <&pinmux_sai1>;
138	pinctrl-names = "default";
139};
140
141&lpadc0 {
142	pinctrl-0 = <&pinmux_lpadc0>;
143	pinctrl-names = "default";
144};
145
146&flexspi {
147	pinctrl-0 = <&pinmux_flexspi1>;
148	pinctrl-names = "default";
149};
150
151&usdhc1 {
152	pinctrl-0 = <&pinmux_usdhc1>;
153	pinctrl-1 = <&pinmux_usdhc1_dat3_nopull>;
154	pinctrl-names = "default", "nopull";
155};
156
157&flexspi {
158	status = "okay";
159	ahb-prefetch;
160	ahb-read-addr-opt;
161	rx-clock-source = <1>;
162	reg = <0x400cc000 0x4000>, <0x30000000 DT_SIZE_M(16)>;
163	is25wp128: is25wp128@0 {
164		compatible = "nxp,imx-flexspi-nor";
165		size = <134217728>;
166		reg = <0>;
167		spi-max-frequency = <133000000>;
168		status = "okay";
169		jedec-id = [9d 70 17];
170		erase-block-size = <4096>;
171		write-block-size = <1>;
172
173		partitions {
174			compatible = "fixed-partitions";
175			#address-cells = <1>;
176			#size-cells = <1>;
177
178			boot_partition: partition@0 {
179				label = "mcuboot";
180				reg = <0x00000000 DT_SIZE_K(128)>;
181			};
182			/* Note slot 0 has one additional sector,
183			 * this is intended for use with the swap move algorithm
184			 */
185			slot0_partition: partition@20000 {
186				label = "image-0";
187				reg = <0x00020000 0x301000>;
188			};
189			slot1_partition: partition@321000 {
190				label = "image-1";
191				reg = <0x00321000 0x300000>;
192			};
193			scratch_partition: partition@621000 {
194				label = "image-scratch";
195				reg = <0x00621000 DT_SIZE_K(128)>;
196			};
197			storage_partition: partition@641000 {
198				label = "storage";
199				reg = <0x00641000 DT_SIZE_K(1856)>;
200			};
201		};
202	};
203};
204