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