blob: 742e11bfbcc769ef56c3530b280e72f84f6c6907 [file] [log] [blame]
Kumar Gala46a15f32020-04-14 19:58:12 -05001/*
2 * Copyright (c) 2020, Linaro Ltd.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <mem.h>
Gerard Marull-Paretas0d859312022-05-06 11:02:05 +02008#include <zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h>
9#include <zephyr/dt-bindings/gpio/gpio.h>
10#include <zephyr/dt-bindings/i2c/i2c.h>
Kumar Gala46a15f32020-04-14 19:58:12 -050011#include <arm/armv8-m.dtsi>
12
13/ {
14 aliases {
Jiří Keresteš3a875172020-07-09 17:56:21 +020015 watchdog0 = &wwdt0;
Kumar Gala46a15f32020-04-14 19:58:12 -050016 };
17
Kumar Gala7a15afc2020-04-22 13:46:15 -050018 chosen {
19 zephyr,flash-controller = &iap;
20 };
21
Kumar Gala46a15f32020-04-14 19:58:12 -050022 cpus: cpus {
23 #address-cells = <1>;
24 #size-cells = <0>;
25
26 cpu@0 {
27 compatible = "arm,cortex-m33f";
28 reg = <0>;
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 mpu: mpu@e000ed90 {
33 compatible = "arm,armv8m-mpu";
34 reg = <0xe000ed90 0x40>;
35 arm,num-mpu-regions = <8>;
36 };
37 };
38 cpu@1 {
39 compatible = "arm,cortex-m33";
40 reg = <1>;
41 };
42 };
43};
44
45&sram {
46 #address-cells = <1>;
47 #size-cells = <1>;
48
49 sramx: memory@4000000 {
50 compatible = "mmio-sram";
51 reg = <0x4000000 DT_SIZE_K(32)>;
52 };
53
David Leache41d6992022-04-26 23:59:29 -050054 /* lpc55S6x Memory configurations:
55 *
56 * RAM blocks SRAM0 through SRAM4 are contiguous address ranges
57 *
58 * LPC55S66: 144KB RAM, RAMX: 32K, SRAM0: 32K
59 * LPC55S69: 320KB RAM, RAMX: 32K, SRAM0: 64K, SRAM1: 64K,
60 * SRAM2: 64K, SRAM3: 64K, SRAM4: 16K
61 */
Kumar Gala46a15f32020-04-14 19:58:12 -050062 sram0: memory@20000000 {
63 compatible = "mmio-sram";
64 reg = <0x20000000 DT_SIZE_K(64)>;
65 };
66
67 sram1: memory@20010000 {
David Leache41d6992022-04-26 23:59:29 -050068 compatible = "mmio-sram";
69 reg = <0x20010000 DT_SIZE_K(64)>;
Kumar Gala46a15f32020-04-14 19:58:12 -050070 };
71
Mahesh Mahadevan32e2e1c2022-08-23 16:30:59 -050072 sram2: memory@20020000 {
David Leache41d6992022-04-26 23:59:29 -050073 compatible = "mmio-sram";
74 reg = <0x20020000 DT_SIZE_K(64)>;
Kumar Gala46a15f32020-04-14 19:58:12 -050075 };
76
Mahesh Mahadevan32e2e1c2022-08-23 16:30:59 -050077 sram3: memory@20030000 {
David Leache41d6992022-04-26 23:59:29 -050078 compatible = "mmio-sram";
79 reg = <0x20030000 DT_SIZE_K(64)>;
Kumar Gala46a15f32020-04-14 19:58:12 -050080 };
81
Mahesh Mahadevan32e2e1c2022-08-23 16:30:59 -050082 sram4: memory@20040000 {
David Leache41d6992022-04-26 23:59:29 -050083 compatible = "mmio-sram";
84 reg = <0x20040000 DT_SIZE_K(16)>;
Kumar Gala46a15f32020-04-14 19:58:12 -050085 };
Mahesh Mahadevan32e2e1c2022-08-23 16:30:59 -050086
87 usb_sram: memory@40100000 {
88 compatible = "zephyr,memory-region", "mmio-sram";
89 reg = <0x40100000 DT_SIZE_K(16)>;
90 zephyr,memory-region = "USB_SRAM";
91 };
Kumar Gala46a15f32020-04-14 19:58:12 -050092};
93
94&peripheral {
95 #address-cells = <1>;
96 #size-cells = <1>;
97
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -050098 syscon: syscon@0 {
99 compatible = "nxp,lpc-syscon";
Christian Taedcke1897dcf2020-12-02 17:26:58 +0100100 reg = <0x0 0x1000>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500101 #clock-cells = <1>;
102 };
103
Kumar Gala46a15f32020-04-14 19:58:12 -0500104 iap: flash-controller@34000 {
Yves Vandervennetda3d0b32022-08-12 09:05:25 -0500105 compatible = "nxp,iap-fmc55";
Christian Taedcke1897dcf2020-12-02 17:26:58 +0100106 reg = <0x34000 0x1000>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500107 #address-cells = <1>;
108 #size-cells = <1>;
Daniel DeGrassea52f3992022-08-17 18:04:56 -0500109 status = "disabled";
Kumar Gala46a15f32020-04-14 19:58:12 -0500110 flash0: flash@0 {
111 compatible = "soc-nv-flash";
Kumar Gala46a15f32020-04-14 19:58:12 -0500112 reg = <0x0 DT_SIZE_K(630)>;
113 erase-block-size = <512>;
114 write-block-size = <512>;
115 };
116
117 flash_reserved: flash@9D800 {
118 compatible = "soc-nv-flash";
Mahesh Mahadevan6d86e482021-06-23 11:36:43 -0500119 reg = <0x9D800 DT_SIZE_K(9)>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500120 status = "disabled";
121 };
122
Kumar Galab12c6db2021-06-24 09:32:04 -0500123 uuid: flash@9fc70 {
Mahesh Mahadevan6d86e482021-06-23 11:36:43 -0500124 compatible = "nxp,lpc-uid";
Kumar Galab12c6db2021-06-24 09:32:04 -0500125 reg = <0x9fc70 0x10>;
Mahesh Mahadevan6d86e482021-06-23 11:36:43 -0500126 };
127
Kumar Gala46a15f32020-04-14 19:58:12 -0500128 boot_rom: flash@3000000 {
129 compatible = "soc-nv-flash";
130 reg = <0x3000000 DT_SIZE_K(128)>;
131 };
132 };
133
Kumar Gala686968b2020-04-14 18:23:20 -0500134 iocon: iocon@1000 {
135 compatible = "nxp,lpc-iocon";
136 reg = <0x1000 0x100>;
137 #address-cells = <1>;
138 #size-cells = <1>;
139 ranges = <0x0 0x1000 0x100>;
Daniel DeGrasse2910da42022-03-04 13:01:59 -0600140 pinctrl: pinctrl {
141 compatible = "nxp,lpc-iocon-pinctrl";
142 };
Kumar Gala686968b2020-04-14 18:23:20 -0500143 pio0: pio0@0 {
144 compatible = "nxp,lpc-iocon-pio";
145 reg = <0x0 0x80>;
146 };
147 pio1: pio0@80 {
148 compatible = "nxp,lpc-iocon-pio";
149 reg = <0x80 0x80>;
150 };
151 };
152
Kumar Gala46a15f32020-04-14 19:58:12 -0500153 gpio0: gpio@0 {
154 compatible = "nxp,lpc-gpio";
155 reg = <0x8c000 0x2488>;
156 interrupts = <4 2>,<5 2>,<6 2>,<7 2>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500157 gpio-controller;
158 #gpio-cells = <2>;
Kumar Gala5fcbe5e2021-05-28 10:24:59 -0500159 port = <0>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500160 };
161
162 gpio1: gpio@1 {
163 compatible = "nxp,lpc-gpio";
164 reg = <0x8c000 0x2488>;
165 interrupts = <32 2>,<33 2>,<34 2>,<35 2>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500166 gpio-controller;
167 #gpio-cells = <2>;
Kumar Gala5fcbe5e2021-05-28 10:24:59 -0500168 port = <1>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500169 };
170
Mahesh Mahadevan2526ca12020-10-06 09:53:31 -0500171 dma0: dma-controller@82000 {
172 compatible = "nxp,lpc-dma";
173 reg = <0x82000 0x1000>;
174 interrupts = <1 0>;
Mahesh Mahadevan2526ca12020-10-06 09:53:31 -0500175 status = "disabled";
176 #dma-cells = <1>;
177 };
178
179 dma1: dma-controller@a7000 {
180 compatible = "nxp,lpc-dma";
181 reg = <0xa7000 0x1000>;
182 interrupts = <58 0>;
Mahesh Mahadevan2526ca12020-10-06 09:53:31 -0500183 status = "disabled";
184 #dma-cells = <1>;
185 };
186
Andrei Gansari329691c2020-12-16 18:05:35 +0200187 mailbox0:mailbox@8b000 {
188 compatible = "nxp,lpc-mailbox";
189 reg = <0x8b000 0xEC>;
190 interrupts = <31 0>;
Andrei Gansari329691c2020-12-16 18:05:35 +0200191 status = "disabled";
192 };
193
Kumar Gala46a15f32020-04-14 19:58:12 -0500194 flexcomm0: flexcomm@86000 {
195 compatible = "nxp,lpc-flexcomm";
196 reg = <0x86000 0x1000>;
197 interrupts = <14 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500198 clocks = <&syscon MCUX_FLEXCOMM0_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500199 status = "disabled";
200 };
201
202 flexcomm1: flexcomm@87000 {
203 compatible = "nxp,lpc-flexcomm";
204 reg = <0x87000 0x1000>;
205 interrupts = <15 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500206 clocks = <&syscon MCUX_FLEXCOMM1_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500207 status = "disabled";
208 };
209
210 flexcomm2: flexcomm@88000 {
211 compatible = "nxp,lpc-flexcomm";
212 reg = <0x88000 0x1000>;
213 interrupts = <16 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500214 clocks = <&syscon MCUX_FLEXCOMM2_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500215 status = "disabled";
216 };
217
218 flexcomm3: flexcomm@89000 {
219 compatible = "nxp,lpc-flexcomm";
220 reg = <0x89000 0x1000>;
221 interrupts = <17 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500222 clocks = <&syscon MCUX_FLEXCOMM3_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500223 status = "disabled";
224 };
225
226 flexcomm4: flexcomm@8a000 {
227 compatible = "nxp,lpc-flexcomm";
228 reg = <0x8a000 0x1000>;
229 interrupts = <18 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500230 clocks = <&syscon MCUX_FLEXCOMM4_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500231 status = "disabled";
232 };
233
234 flexcomm5: flexcomm@96000 {
235 compatible = "nxp,lpc-flexcomm";
236 reg = <0x96000 0x1000>;
237 interrupts = <19 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500238 clocks = <&syscon MCUX_FLEXCOMM5_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500239 status = "disabled";
240 };
241
242 flexcomm6: flexcomm@97000 {
243 compatible = "nxp,lpc-flexcomm";
244 reg = <0x97000 0x1000>;
245 interrupts = <20 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500246 clocks = <&syscon MCUX_FLEXCOMM6_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500247 status = "disabled";
248 };
249
250 flexcomm7: flexcomm@98000 {
251 compatible = "nxp,lpc-flexcomm";
252 reg = <0x98000 0x1000>;
253 interrupts = <21 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500254 clocks = <&syscon MCUX_FLEXCOMM7_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500255 status = "disabled";
256 };
257
Daniel DeGrasse03654962022-05-06 18:19:38 -0500258 sdif: sdif@9b000 {
259 compatible = "nxp,lpc-sdif";
260 reg = <0x9b000 0x1000>;
261 interrupts = <42 0>;
262 clocks = <&syscon MCUX_SDIF_CLK>;
263 status = "disabled";
264 };
265
Kumar Gala4f434b32020-04-14 23:44:04 -0500266 hs_lspi: spi@9f000 {
267 compatible = "nxp,lpc-spi";
Andrei Gansari17eca1b2020-06-23 14:00:16 +0300268 /* Enabling cs-gpios below will allow using GPIO CS,
269 rather than Flexcomm SS */
270 /* cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>,
Peter Bigot9dc76402020-07-06 14:57:30 -0500271 <&gpio1 1 GPIO_ACTIVE_LOW>,
272 <&gpio1 12 GPIO_ACTIVE_LOW>,
Andrei Gansari17eca1b2020-06-23 14:00:16 +0300273 <&gpio1 26 GPIO_ACTIVE_LOW>; */
Kumar Gala46a15f32020-04-14 19:58:12 -0500274 reg = <0x9f000 0x1000>;
275 interrupts = <59 0>;
Mahesh Mahadevanc2a40a82020-08-25 16:15:03 -0500276 clocks = <&syscon MCUX_HS_SPI_CLK>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500277 status = "disabled";
Kumar Gala4f434b32020-04-14 23:44:04 -0500278 #address-cells = <1>;
279 #size-cells = <0>;
Kumar Gala46a15f32020-04-14 19:58:12 -0500280 };
Andrei Gansaribfbbf922020-05-04 17:46:46 +0300281
282 rng: rng@3a000 {
283 compatible = "nxp,lpc-rng";
284 reg = <0x3a000 0x1000>;
285 status = "okay";
Andrei Gansaribfbbf922020-05-04 17:46:46 +0300286 };
Jiří Keresteš3a875172020-07-09 17:56:21 +0200287
288 wwdt0: watchdog@c000 {
289 compatible = "nxp,lpc-wwdt";
290 reg = <0xc000 0x1000>;
291 interrupts = <0 0>;
292 status = "disabled";
293 clk-divider = <1>;
Jiří Keresteš3a875172020-07-09 17:56:21 +0200294 };
Toby Firthdc37f9882020-08-12 11:12:19 +0100295
296 adc0: adc@A0000 {
297 compatible = "nxp,lpc-lpadc";
Christian Taedcke1897dcf2020-12-02 17:26:58 +0100298 reg = <0xA0000 0x1000>;
Toby Firthdc37f9882020-08-12 11:12:19 +0100299 interrupts = <22 0>;
300 status = "disabled";
301 clk-divider = <8>;
302 clk-source = <0>;
303 voltage-ref= <2>;
304 calibration-average = <128>;
305 power-level = <1>;
Toby Firthdc37f9882020-08-12 11:12:19 +0100306 offset-value-a = <10>;
307 offset-value-b = <10>;
308 #io-channel-cells = <1>;
309 };
Mahesh Mahadevanac402572021-07-22 14:42:11 -0500310
311 usbhs: usbhs@144000 {
312 compatible = "nxp,mcux-usbd";
313 reg = <0x94000 0x1000>;
314 interrupts = <47 1>;
315 num-bidir-endpoints = <5>;
Mahesh Mahadevan3a7c7192022-08-12 16:38:03 -0500316 usb-controller-index = "LpcIp3511Hs0";
Mahesh Mahadevanac402572021-07-22 14:42:11 -0500317 status = "disabled";
Mahesh Mahadevanac402572021-07-22 14:42:11 -0500318 };
Toby Firth893bfc02021-08-10 17:04:20 +0100319
320 ctimer0: ctimer@8000 {
321 compatible = "nxp,lpc-ctimer";
322 reg = <0x8000 0x1000>;
323 interrupts = <10 0>;
324 status = "disabled";
325 clk-source = <3>;
326 clocks = <&syscon MCUX_CTIMER0_CLK>;
327 mode = <0>;
328 input = <0>;
329 prescale = <0>;
Toby Firth893bfc02021-08-10 17:04:20 +0100330 };
331
332 ctimer1: ctimer@9000 {
333 compatible = "nxp,lpc-ctimer";
334 reg = <0x9000 0x1000>;
335 interrupts = <11 0>;
336 status = "disabled";
337 clk-source = <3>;
338 clocks = <&syscon MCUX_CTIMER1_CLK>;
339 mode = <0>;
340 input = <0>;
341 prescale = <0>;
Toby Firth893bfc02021-08-10 17:04:20 +0100342 };
343
344 ctimer2: ctimer@28000 {
345 compatible = "nxp,lpc-ctimer";
346 reg = <0x28000 0x1000>;
347 interrupts = <36 0>;
348 status = "disabled";
349 clk-source = <3>;
350 clocks = <&syscon MCUX_CTIMER2_CLK>;
351 mode = <0>;
352 input = <0>;
353 prescale = <0>;
Toby Firth893bfc02021-08-10 17:04:20 +0100354 };
355
356 ctimer3: ctimer@29000 {
357 compatible = "nxp,lpc-ctimer";
358 reg = <0x29000 0x1000>;
359 interrupts = <13 0>;
360 status = "disabled";
361 clk-source = <3>;
362 clocks = <&syscon MCUX_CTIMER3_CLK>;
363 mode = <0>;
364 input = <0>;
365 prescale = <0>;
Toby Firth893bfc02021-08-10 17:04:20 +0100366 };
367
368 ctimer4: ctimer@2A000 {
369 compatible = "nxp,lpc-ctimer";
370 reg = <0x2A000 0x1000>;
371 interrupts = <37 0>;
372 status = "disabled";
373 clk-source = <3>;
374 clocks = <&syscon MCUX_CTIMER4_CLK>;
375 mode = <0>;
376 input = <0>;
377 prescale = <0>;
Toby Firth893bfc02021-08-10 17:04:20 +0100378 };
Mahesh Mahadevan34ffd5a2021-09-02 16:42:12 -0500379
380 sc_timer: pwm@85000 {
381 compatible = "nxp,sctimer-pwm";
382 reg = <0x85000 0x1000>;
383 interrupts = <12 0>;
384 status = "disabled";
385 prescaler = <2>;
Gerard Marull-Paretas9f8e3352022-04-22 12:10:25 +0200386 #pwm-cells = <3>;
Mahesh Mahadevan34ffd5a2021-09-02 16:42:12 -0500387 };
Kumar Gala46a15f32020-04-14 19:58:12 -0500388};
389
390&nvic {
391 arm,num-irq-priority-bits = <3>;
392};