Commit | Line | Data |
---|---|---|
804a5dd6 JE |
1 | /* |
2 | * Common base for NXP LPC18xx and LPC43xx devices. | |
3 | * | |
4 | * Copyright 2015 Joachim Eastwood <manabian@gmail.com> | |
5 | * | |
6 | * This code is released using a dual license strategy: BSD/GPL | |
7 | * You can choose the licence that better fits your requirements. | |
8 | * | |
9 | * Released under the terms of 3-clause BSD License | |
10 | * Released under the terms of GNU General Public License Version 2.0 | |
11 | * | |
12 | */ | |
13 | ||
14 | #include "armv7-m.dtsi" | |
15 | ||
ba2db535 JE |
16 | #include "dt-bindings/clock/lpc18xx-cgu.h" |
17 | #include "dt-bindings/clock/lpc18xx-ccu.h" | |
18 | ||
7836dce4 JE |
19 | #define LPC_PIN(port, pin) (0x##port * 32 + pin) |
20 | #define LPC_GPIO(port, pin) (port * 32 + pin) | |
21 | ||
804a5dd6 JE |
22 | / { |
23 | cpus { | |
24 | #address-cells = <1>; | |
25 | #size-cells = <0>; | |
26 | ||
27 | cpu@0 { | |
28 | compatible = "arm,cortex-m3"; | |
29 | device_type = "cpu"; | |
30 | reg = <0x0>; | |
ba2db535 | 31 | clocks = <&ccu1 CLK_CPU_CORE>; |
804a5dd6 JE |
32 | }; |
33 | }; | |
34 | ||
35 | clocks { | |
36 | xtal: xtal { | |
37 | compatible = "fixed-clock"; | |
38 | #clock-cells = <0>; | |
39 | clock-frequency = <12000000>; | |
40 | }; | |
41 | ||
ba2db535 JE |
42 | xtal32: xtal32 { |
43 | compatible = "fixed-clock"; | |
44 | #clock-cells = <0>; | |
45 | clock-frequency = <32768>; | |
46 | }; | |
47 | ||
48 | enet_rx_clk: enet_rx_clk { | |
49 | compatible = "fixed-clock"; | |
50 | #clock-cells = <0>; | |
51 | clock-frequency = <0>; | |
52 | clock-output-names = "enet_rx_clk"; | |
53 | }; | |
54 | ||
55 | enet_tx_clk: enet_tx_clk { | |
56 | compatible = "fixed-clock"; | |
57 | #clock-cells = <0>; | |
58 | clock-frequency = <0>; | |
59 | clock-output-names = "enet_tx_clk"; | |
60 | }; | |
61 | ||
62 | gp_clkin: gp_clkin { | |
63 | compatible = "fixed-clock"; | |
804a5dd6 | 64 | #clock-cells = <0>; |
ba2db535 JE |
65 | clock-frequency = <0>; |
66 | clock-output-names = "gp_clkin"; | |
804a5dd6 JE |
67 | }; |
68 | }; | |
69 | ||
70 | soc { | |
5924007c JE |
71 | dmac: dma-controller@40002000 { |
72 | compatible = "arm,pl080", "arm,primecell"; | |
73 | arm,primecell-periphid = <0x00041080>; | |
74 | reg = <0x40002000 0x1000>; | |
75 | interrupts = <2>; | |
76 | clocks = <&ccu1 CLK_CPU_DMA>; | |
77 | clock-names = "apb_pclk"; | |
78 | resets = <&rgu 19>; | |
79 | #dma-cells = <2>; | |
80 | dma-channels = <8>; | |
81 | dma-requests = <16>; | |
82 | lli-bus-interface-ahb1; | |
83 | lli-bus-interface-ahb2; | |
84 | mem-bus-interface-ahb1; | |
85 | mem-bus-interface-ahb2; | |
86 | memcpy-burst-size = <256>; | |
87 | memcpy-bus-width = <32>; | |
88 | }; | |
89 | ||
4f85dd16 JE |
90 | spifi: flash-controller@40003000 { |
91 | compatible = "nxp,lpc1773-spifi"; | |
92 | reg = <0x40003000 0x1000>, <0x14000000 0x4000000>; | |
93 | reg-names = "spifi", "flash"; | |
94 | interrupts = <30>; | |
95 | clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>; | |
96 | clock-names = "spifi", "reg"; | |
97 | resets = <&rgu 53>; | |
98 | status = "disabled"; | |
99 | }; | |
100 | ||
cd07154f JE |
101 | mmcsd: mmcsd@40004000 { |
102 | compatible = "snps,dw-mshc"; | |
103 | reg = <0x40004000 0x1000>; | |
104 | interrupts = <6>; | |
105 | num-slots = <1>; | |
106 | clocks = <&ccu2 CLK_SDIO>, <&ccu1 CLK_CPU_SDIO>; | |
107 | clock-names = "ciu", "biu"; | |
108 | status = "disabled"; | |
109 | }; | |
110 | ||
b06cdb79 JE |
111 | usb0: ehci@40006100 { |
112 | compatible = "nxp,lpc1850-ehci", "generic-ehci"; | |
113 | reg = <0x40006100 0x100>; | |
114 | interrupts = <8>; | |
115 | clocks = <&ccu1 CLK_CPU_USB0>; | |
6d6d6b55 JE |
116 | phys = <&usb0_otg_phy>; |
117 | phy-names = "usb"; | |
b06cdb79 JE |
118 | has-transaction-translator; |
119 | status = "disabled"; | |
120 | }; | |
121 | ||
122 | usb1: ehci@40007100 { | |
123 | compatible = "nxp,lpc1850-ehci", "generic-ehci"; | |
124 | reg = <0x40007100 0x100>; | |
125 | interrupts = <9>; | |
126 | clocks = <&ccu1 CLK_CPU_USB1>; | |
127 | status = "disabled"; | |
128 | }; | |
129 | ||
50016385 JE |
130 | emc: memory-controller@40005000 { |
131 | compatible = "arm,pl172", "arm,primecell"; | |
132 | reg = <0x40005000 0x1000>; | |
133 | clocks = <&ccu1 CLK_CPU_EMCDIV>, <&ccu1 CLK_CPU_EMC>; | |
134 | clock-names = "mpmcclk", "apb_pclk"; | |
135 | #address-cells = <2>; | |
136 | #size-cells = <1>; | |
137 | ranges = <0 0 0x1c000000 0x1000000 | |
138 | 1 0 0x1d000000 0x1000000 | |
139 | 2 0 0x1e000000 0x1000000 | |
140 | 3 0 0x1f000000 0x1000000>; | |
141 | status = "disabled"; | |
142 | }; | |
143 | ||
9cf6267d JE |
144 | lcdc: lcd-controller@40008000 { |
145 | compatible = "arm,pl111", "arm,primecell"; | |
146 | reg = <0x40008000 0x1000>; | |
147 | interrupts = <7>; | |
148 | interrupt-names = "combined"; | |
149 | clocks = <&cgu BASE_LCD_CLK>, <&ccu1 CLK_CPU_LCD>; | |
150 | clock-names = "clcdclk", "apb_pclk"; | |
151 | status = "disabled"; | |
152 | }; | |
153 | ||
fe968589 JE |
154 | mac: ethernet@40010000 { |
155 | compatible = "nxp,lpc1850-dwmac", "snps,dwmac-3.611", "snps,dwmac"; | |
156 | reg = <0x40010000 0x2000>; | |
157 | interrupts = <5>; | |
158 | interrupt-names = "macirq"; | |
159 | clocks = <&ccu1 CLK_CPU_ETHERNET>; | |
160 | clock-names = "stmmaceth"; | |
161 | status = "disabled"; | |
162 | }; | |
163 | ||
16df2b86 JE |
164 | creg: syscon@40043000 { |
165 | compatible = "nxp,lpc1850-creg", "syscon", "simple-mfd"; | |
166 | reg = <0x40043000 0x1000>; | |
167 | clocks = <&ccu1 CLK_CPU_CREG>; | |
6d6d6b55 JE |
168 | |
169 | usb0_otg_phy: phy@004 { | |
170 | compatible = "nxp,lpc1850-usb-otg-phy"; | |
171 | clocks = <&ccu1 CLK_USB0>; | |
172 | #phy-cells = <0>; | |
173 | }; | |
5913f559 JE |
174 | |
175 | dmamux: dma-mux@11c { | |
176 | compatible = "nxp,lpc1850-dmamux"; | |
177 | #dma-cells = <3>; | |
178 | dma-requests = <64>; | |
179 | dma-masters = <&dmac>; | |
180 | }; | |
16df2b86 JE |
181 | }; |
182 | ||
ba2db535 JE |
183 | cgu: clock-controller@40050000 { |
184 | compatible = "nxp,lpc1850-cgu"; | |
185 | reg = <0x40050000 0x1000>; | |
186 | #clock-cells = <1>; | |
187 | clocks = <&xtal>, <&xtal32>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>; | |
188 | }; | |
189 | ||
190 | ccu1: clock-controller@40051000 { | |
191 | compatible = "nxp,lpc1850-ccu"; | |
192 | reg = <0x40051000 0x1000>; | |
193 | #clock-cells = <1>; | |
194 | clocks = <&cgu BASE_APB3_CLK>, <&cgu BASE_APB1_CLK>, | |
195 | <&cgu BASE_SPIFI_CLK>, <&cgu BASE_CPU_CLK>, | |
196 | <&cgu BASE_PERIPH_CLK>, <&cgu BASE_USB0_CLK>, | |
197 | <&cgu BASE_USB1_CLK>, <&cgu BASE_SPI_CLK>; | |
198 | clock-names = "base_apb3_clk", "base_apb1_clk", | |
199 | "base_spifi_clk", "base_cpu_clk", | |
200 | "base_periph_clk", "base_usb0_clk", | |
201 | "base_usb1_clk", "base_spi_clk"; | |
202 | }; | |
203 | ||
204 | ccu2: clock-controller@40052000 { | |
205 | compatible = "nxp,lpc1850-ccu"; | |
206 | reg = <0x40052000 0x1000>; | |
207 | #clock-cells = <1>; | |
208 | clocks = <&cgu BASE_AUDIO_CLK>, <&cgu BASE_UART3_CLK>, | |
209 | <&cgu BASE_UART2_CLK>, <&cgu BASE_UART1_CLK>, | |
210 | <&cgu BASE_UART0_CLK>, <&cgu BASE_SSP1_CLK>, | |
211 | <&cgu BASE_SSP0_CLK>, <&cgu BASE_SDIO_CLK>; | |
212 | clock-names = "base_audio_clk", "base_uart3_clk", | |
213 | "base_uart2_clk", "base_uart1_clk", | |
214 | "base_uart0_clk", "base_ssp1_clk", | |
215 | "base_ssp0_clk", "base_sdio_clk"; | |
216 | }; | |
217 | ||
0745c702 JE |
218 | rgu: reset-controller@40053000 { |
219 | compatible = "nxp,lpc1850-rgu"; | |
220 | reg = <0x40053000 0x1000>; | |
221 | clocks = <&cgu BASE_SAFE_CLK>, <&ccu1 CLK_CPU_BUS>; | |
222 | clock-names = "delay", "reg"; | |
223 | #reset-cells = <1>; | |
224 | }; | |
225 | ||
804a5dd6 | 226 | uart0: serial@40081000 { |
f2b1c507 | 227 | compatible = "nxp,lpc1850-uart", "ns16550a"; |
804a5dd6 JE |
228 | reg = <0x40081000 0x1000>; |
229 | reg-shift = <2>; | |
230 | interrupts = <24>; | |
ba2db535 | 231 | clocks = <&ccu2 CLK_APB0_UART0>, <&ccu1 CLK_CPU_UART0>; |
f2b1c507 | 232 | clock-names = "uartclk", "reg"; |
804a5dd6 JE |
233 | status = "disabled"; |
234 | }; | |
235 | ||
236 | uart1: serial@40082000 { | |
f2b1c507 | 237 | compatible = "nxp,lpc1850-uart", "ns16550a"; |
804a5dd6 JE |
238 | reg = <0x40082000 0x1000>; |
239 | reg-shift = <2>; | |
240 | interrupts = <25>; | |
ba2db535 | 241 | clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>; |
f2b1c507 | 242 | clock-names = "uartclk", "reg"; |
804a5dd6 JE |
243 | status = "disabled"; |
244 | }; | |
245 | ||
5d2ea79c JE |
246 | ssp0: spi@40083000 { |
247 | compatible = "arm,pl022", "arm,primecell"; | |
248 | reg = <0x40083000 0x1000>; | |
249 | interrupts = <22>; | |
250 | clocks = <&ccu2 CLK_APB0_SSP0>, <&ccu1 CLK_CPU_SSP0>; | |
251 | clock-names = "sspclk", "apb_pclk"; | |
252 | #address-cells = <1>; | |
253 | #size-cells = <0>; | |
254 | status = "disabled"; | |
255 | }; | |
256 | ||
804a5dd6 JE |
257 | timer0: timer@40084000 { |
258 | compatible = "nxp,lpc3220-timer"; | |
259 | reg = <0x40084000 0x1000>; | |
260 | interrupts = <12>; | |
ba2db535 | 261 | clocks = <&ccu1 CLK_CPU_TIMER0>; |
804a5dd6 JE |
262 | clock-names = "timerclk"; |
263 | }; | |
264 | ||
265 | timer1: timer@40085000 { | |
266 | compatible = "nxp,lpc3220-timer"; | |
267 | reg = <0x40085000 0x1000>; | |
268 | interrupts = <13>; | |
ba2db535 | 269 | clocks = <&ccu1 CLK_CPU_TIMER1>; |
804a5dd6 JE |
270 | clock-names = "timerclk"; |
271 | }; | |
272 | ||
d881f5e2 JE |
273 | pinctrl: pinctrl@40086000 { |
274 | compatible = "nxp,lpc1850-scu"; | |
275 | reg = <0x40086000 0x1000>; | |
276 | clocks = <&ccu1 CLK_CPU_SCU>; | |
277 | }; | |
278 | ||
7e6c8376 JE |
279 | can1: can@400a4000 { |
280 | compatible = "bosch,c_can"; | |
281 | reg = <0x400a4000 0x1000>; | |
282 | interrupts = <43>; | |
283 | clocks = <&ccu1 CLK_APB1_CAN1>; | |
284 | status = "disabled"; | |
285 | }; | |
286 | ||
804a5dd6 | 287 | uart2: serial@400c1000 { |
f2b1c507 | 288 | compatible = "nxp,lpc1850-uart", "ns16550a"; |
804a5dd6 JE |
289 | reg = <0x400c1000 0x1000>; |
290 | reg-shift = <2>; | |
291 | interrupts = <26>; | |
ba2db535 | 292 | clocks = <&ccu2 CLK_APB2_UART2>, <&ccu1 CLK_CPU_UART2>; |
f2b1c507 | 293 | clock-names = "uartclk", "reg"; |
804a5dd6 JE |
294 | status = "disabled"; |
295 | }; | |
296 | ||
297 | uart3: serial@400c2000 { | |
f2b1c507 | 298 | compatible = "nxp,lpc1850-uart", "ns16550a"; |
804a5dd6 JE |
299 | reg = <0x400c2000 0x1000>; |
300 | reg-shift = <2>; | |
301 | interrupts = <27>; | |
ba2db535 | 302 | clocks = <&ccu2 CLK_APB2_UART3>, <&ccu1 CLK_CPU_UART3>; |
f2b1c507 | 303 | clock-names = "uartclk", "reg"; |
804a5dd6 JE |
304 | status = "disabled"; |
305 | }; | |
306 | ||
307 | timer2: timer@400c3000 { | |
308 | compatible = "nxp,lpc3220-timer"; | |
309 | reg = <0x400c3000 0x1000>; | |
310 | interrupts = <14>; | |
ba2db535 | 311 | clocks = <&ccu1 CLK_CPU_TIMER2>; |
804a5dd6 JE |
312 | clock-names = "timerclk"; |
313 | }; | |
314 | ||
315 | timer3: timer@400c4000 { | |
316 | compatible = "nxp,lpc3220-timer"; | |
317 | reg = <0x400c4000 0x1000>; | |
318 | interrupts = <15>; | |
ba2db535 | 319 | clocks = <&ccu1 CLK_CPU_TIMER3>; |
804a5dd6 JE |
320 | clock-names = "timerclk"; |
321 | }; | |
7836dce4 | 322 | |
5d2ea79c JE |
323 | ssp1: spi@400c5000 { |
324 | compatible = "arm,pl022", "arm,primecell"; | |
325 | reg = <0x400c5000 0x1000>; | |
326 | interrupts = <23>; | |
327 | clocks = <&ccu2 CLK_APB2_SSP1>, <&ccu1 CLK_CPU_SSP1>; | |
328 | clock-names = "sspclk", "apb_pclk"; | |
329 | #address-cells = <1>; | |
330 | #size-cells = <0>; | |
331 | status = "disabled"; | |
332 | }; | |
333 | ||
7e6c8376 JE |
334 | can0: can@400e2000 { |
335 | compatible = "bosch,c_can"; | |
336 | reg = <0x400e2000 0x1000>; | |
337 | interrupts = <51>; | |
338 | clocks = <&ccu1 CLK_APB3_CAN0>; | |
339 | status = "disabled"; | |
340 | }; | |
341 | ||
7836dce4 JE |
342 | gpio: gpio@400f4000 { |
343 | compatible = "nxp,lpc1850-gpio"; | |
344 | reg = <0x400f4000 0x4000>; | |
345 | clocks = <&ccu1 CLK_CPU_GPIO>; | |
346 | gpio-controller; | |
347 | #gpio-cells = <2>; | |
348 | gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>, | |
349 | <&pinctrl LPC_GPIO(0,4) LPC_PIN(1,0) 1>, | |
350 | <&pinctrl LPC_GPIO(0,8) LPC_PIN(1,1) 4>, | |
351 | <&pinctrl LPC_GPIO(1,8) LPC_PIN(1,5) 2>, | |
352 | <&pinctrl LPC_GPIO(1,0) LPC_PIN(1,7) 8>, | |
353 | <&pinctrl LPC_GPIO(0,2) LPC_PIN(1,15) 2>, | |
354 | <&pinctrl LPC_GPIO(0,12) LPC_PIN(1,17) 2>, | |
355 | <&pinctrl LPC_GPIO(0,15) LPC_PIN(1,20) 1>, | |
356 | <&pinctrl LPC_GPIO(5,0) LPC_PIN(2,0) 7>, | |
357 | <&pinctrl LPC_GPIO(0,7) LPC_PIN(2,7) 1>, | |
358 | <&pinctrl LPC_GPIO(5,7) LPC_PIN(2,8) 1>, | |
359 | <&pinctrl LPC_GPIO(1,10) LPC_PIN(2,9) 1>, | |
360 | <&pinctrl LPC_GPIO(0,14) LPC_PIN(2,10) 1>, | |
361 | <&pinctrl LPC_GPIO(1,11) LPC_PIN(2,11) 3>, | |
362 | <&pinctrl LPC_GPIO(5,8) LPC_PIN(3,1) 2>, | |
363 | <&pinctrl LPC_GPIO(1,14) LPC_PIN(3,4) 2>, | |
364 | <&pinctrl LPC_GPIO(0,6) LPC_PIN(3,6) 1>, | |
365 | <&pinctrl LPC_GPIO(5,10) LPC_PIN(3,7) 2>, | |
366 | <&pinctrl LPC_GPIO(2,0) LPC_PIN(4,0) 7>, | |
367 | <&pinctrl LPC_GPIO(5,12) LPC_PIN(4,8) 3>, | |
368 | <&pinctrl LPC_GPIO(2,9) LPC_PIN(5,0) 7>, | |
369 | <&pinctrl LPC_GPIO(2,7) LPC_PIN(5,7) 1>, | |
370 | <&pinctrl LPC_GPIO(3,0) LPC_PIN(6,1) 5>, | |
371 | <&pinctrl LPC_GPIO(0,5) LPC_PIN(6,6) 1>, | |
372 | <&pinctrl LPC_GPIO(5,15) LPC_PIN(6,7) 2>, | |
373 | <&pinctrl LPC_GPIO(3,5) LPC_PIN(6,9) 3>, | |
374 | <&pinctrl LPC_GPIO(2,8) LPC_PIN(6,12) 1>, | |
375 | <&pinctrl LPC_GPIO(3,8) LPC_PIN(7,0) 8>, | |
376 | <&pinctrl LPC_GPIO(4,0) LPC_PIN(8,0) 8>, | |
377 | <&pinctrl LPC_GPIO(4,12) LPC_PIN(9,0) 4>, | |
378 | <&pinctrl LPC_GPIO(5,17) LPC_PIN(9,4) 2>, | |
379 | <&pinctrl LPC_GPIO(4,11) LPC_PIN(9,6) 1>, | |
380 | <&pinctrl LPC_GPIO(4,8) LPC_PIN(a,1) 3>, | |
381 | <&pinctrl LPC_GPIO(5,19) LPC_PIN(a,4) 1>, | |
382 | <&pinctrl LPC_GPIO(5,20) LPC_PIN(b,0) 7>, | |
383 | <&pinctrl LPC_GPIO(6,0) LPC_PIN(c,1) 14>, | |
384 | <&pinctrl LPC_GPIO(6,14) LPC_PIN(d,0) 17>, | |
385 | <&pinctrl LPC_GPIO(7,0) LPC_PIN(e,0) 16>, | |
386 | <&pinctrl LPC_GPIO(7,16) LPC_PIN(f,1) 3>, | |
387 | <&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>; | |
388 | }; | |
804a5dd6 JE |
389 | }; |
390 | }; |