1/*
2 * Copyright (c) 2019, NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include "lpcxpresso55s69-pinctrl.dtsi"
8
9/ {
10	aliases{
11		led0 = &red_led;
12		led1 = &green_led;
13		led2 = &blue_led;
14		spi-8 = &hs_lspi;
15		usart-0 = &flexcomm0;
16	};
17
18	leds {
19		compatible = "gpio-leds";
20		green_led: led_1 {
21			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
22			label = "User LD2";
23			status = "disabled";
24		};
25		blue_led: led_2 {
26			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
27			label = "User LD3";
28			status = "disabled";
29		};
30		red_led: led_3 {
31			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
32			label = "User LD4";
33			status = "disabled";
34		};
35	};
36
37	mikrobus_header: mikrobus-connector {
38		compatible = "mikro-bus";
39		#gpio-cells = <2>;
40		gpio-map-mask = <0xffffffff 0xffffffc0>;
41		gpio-map-pass-thru = <0 0x3f>;
42		gpio-map =	<0 0 &gpio0 16 0>,	/* AN  */
43				/* Not a GPIO*/		/* RST */
44				<2 0 &gpio1 1 0>,	/* CS   */
45				<3 0 &gpio1 2 0>,	/* SCK  */
46				<4 0 &gpio1 3 0>,	/* MISO */
47				<5 0 &gpio0 26 0>,	/* MOSI */
48							/* +3.3V */
49							/* GND */
50				<6 0 &gpio1 5 0>,	/* PWM  */
51				<7 0 &gpio1 18 0>,	/* INT  */
52				<8 0 &gpio1 24 0>,	/* RX   */
53				<9 0 &gpio0 27 0>,	/* TX   */
54				<10 0 &gpio1 20 0>,	/* SCL  */
55				<11 0 &gpio1 21 0>;	/* SDA  */
56							/* +5V */
57							/* GND */
58	};
59
60	arduino_header: arduino-connector {
61		compatible = "arduino-header-r3";
62		#gpio-cells = <2>;
63		gpio-map-mask = <0xffffffff 0xffffffc0>;
64		gpio-map-pass-thru = <0 0x3f>;
65		gpio-map =	<0 0 &gpio0 16 0>,	/* A0 */
66				<1 0 &gpio0 23 0>,	/* A1 */
67				<2 0 &gpio0 0 0>,	/* A2 */
68				<3 0 &gpio1 31 0>,	/* A3 */
69				<4 0 &gpio0 13 0>,	/* A4 */
70				<5 0 &gpio0 14 0>,	/* A5 */
71				<6 0 &gpio1 24 0>,	/* D0 */
72				<7 0 &gpio0 27 0>,	/* D1 */
73				<8 0 &gpio0 15 0>,	/* D2 */
74				<9 0 &gpio1 6 0>,	/* D3 */
75				<10 0 &gpio1 7 0>,	/* D4 */
76				<11 0 &gpio1 4 0>,	/* D5 */
77				<12 0 &gpio1 10 0>,	/* D6 */
78				<13 0 &gpio1 9 0>,	/* D7 */
79				<14 0 &gpio1 8 0>,	/* D8 */
80				<15 0 &gpio1 5 0>,	/* D9 */
81				<16 0 &gpio1 1 0>,	/* D10 */
82				<17 0 &gpio0 26 0>,	/* D11 */
83				<18 0 &gpio1 3 0>,	/* D12 */
84				<19 0 &gpio1 2 0>,	/* D13 */
85				<20 0 &gpio1 21 0>,	/* D14 */
86				<21 0 &gpio1 20 0>;	/* D15 */
87	};
88
89	reserved-memory {
90		#address-cells = <1>;
91		#size-cells = <1>;
92		ranges;
93
94		/* RAM split used by TFM */
95		secure_ram: partition@20000000 {
96			label = "secure-memory";
97			reg = <0x20000000 DT_SIZE_K(136)>;
98		};
99
100		non_secure_ram: partition@20022000 {
101			label = "non-secure-memory";
102			reg = <0x20022000 DT_SIZE_K(136)>;
103		};
104	};
105};
106
107&flexcomm0 {
108	compatible = "nxp,lpc-usart";
109	current-speed = <115200>;
110	dmas = <&dma0 4>, <&dma0 5>;
111	dma-names = "rx", "tx";
112};
113
114&flash0 {
115
116	partitions {
117		compatible = "fixed-partitions";
118		#address-cells = <1>;
119		#size-cells = <1>;
120		/* Please enable mcuboot's swap move, no scratch */
121
122		boot_partition: partition@0 {
123			label = "mcuboot";
124			reg = <0x00000000 0x00008000>;
125			read-only;
126		};
127		slot0_partition: partition@8000 {
128			label = "image-0";
129			reg = <0x00008000 0x00028000>;
130		};
131		slot1_partition: partition@30000 {
132			label = "image-1";
133			reg = <0x00030000 0x00018000>;
134		};
135		slot2_partition: partition@48000 {
136			label = "image-2";
137			reg = <0x00048000 0x00028000>;
138		};
139		slot3_partition: partition@70000 {
140			label = "image-3";
141			reg = <0x00070000 0x00018000>;
142		};
143		/*
144		 * The flash starting at 0x88000 and ending at
145		 * 0x949FF is reserved for the application.
146		 */
147		storage_partition: partition@88000 {
148			label = "storage";
149			reg = <0x00088000 0x0000ca00>;
150		};
151	};
152};
153
154arduino_i2c: &flexcomm4 {
155	compatible = "nxp,lpc-i2c";
156	clock-frequency = <I2C_BITRATE_STANDARD>;
157	#address-cells = <1>;
158	#size-cells = <0>;
159
160	mma8652fc: mma8652fc@1d {
161		compatible = "nxp,fxos8700","nxp,mma8652fc";
162		reg = <0x1d>;
163		int1-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
164	};
165};
166
167arduino_serial: &flexcomm2 {
168	compatible = "nxp,lpc-usart";
169	current-speed = <115200>;
170};
171
172arduino_spi: &hs_lspi {
173};
174
175arduino_gpio: &gpio1 {
176};
177
178mikrobus_serial: &flexcomm2 {
179};
180
181mikrobus_spi: &hs_lspi {
182};
183
184&flexcomm0 {
185	pinctrl-0 = <&pinmux_flexcomm0_usart>;
186	pinctrl-names = "default";
187};
188
189&flexcomm2 {
190	pinctrl-0 = <&pinmux_flexcomm2_usart>;
191	pinctrl-names = "default";
192};
193
194&flexcomm4 {
195	pinctrl-0 = <&pinmux_flexcomm4_i2c>;
196	pinctrl-names = "default";
197};
198
199&flexcomm6 {
200	pinctrl-0 = <&pinmux_flexcomm6_i2s>;
201	pinctrl-names = "default";
202};
203
204&flexcomm7 {
205	pinctrl-0 = <&pinmux_flexcomm7_i2s>;
206	pinctrl-names = "default";
207};
208
209&hs_lspi {
210	pinctrl-0 = <&pinmux_hs_lspi_default>;
211	pinctrl-names = "default";
212};
213
214&sc_timer {
215	pinctrl-0 = <&pinmux_sctimer_default>;
216	pinctrl-names = "default";
217};
218