Skip to content

Commit 496ace1

Browse files
benpiccogalak
authored andcommitted
soc: atmel_sam0: Add SAME54
This adds supoprt for the Atmel SAME54 SoC. The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals with the sam0 Cortex-M0+ and saml1x Cortex-M23 parts. Signed-off-by: Benjamin Valentin <[email protected]>
1 parent aa45d7a commit 496ace1

File tree

18 files changed

+702
-0
lines changed

18 files changed

+702
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
/drivers/wifi/eswifi/ @loicpoulain
186186
/dts/arc/ @vonhust @ruuddw @iriszzw
187187
/dts/arm/atmel/samr21.dtsi @benpicco
188+
/dts/arm/atmel/sam*5*.dtsi @benpicco
188189
/dts/arm/st/ @erwango
189190
/dts/arm/ti/cc13?2* @bwitherspoon
190191
/dts/arm/ti/cc26?2* @bwitherspoon

dts/arm/atmel/samd5x.dtsi

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
/*
2+
* Copyright (c) 2019 ML!PA Consulting GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/armv7-m.dtsi>
8+
#include <dt-bindings/gpio/gpio.h>
9+
#include <dt-bindings/i2c/i2c.h>
10+
11+
/ {
12+
cpus {
13+
#address-cells = <1>;
14+
#size-cells = <0>;
15+
16+
cpu@0 {
17+
device_type = "cpu";
18+
compatible = "arm,cortex-m4";
19+
reg = <0>;
20+
};
21+
};
22+
23+
aliases {
24+
adc-0 = &adc0;
25+
adc-1 = &adc1;
26+
27+
pinmux-a = &pinmux_a;
28+
pinmux-b = &pinmux_b;
29+
pinmux-c = &pinmux_c;
30+
pinmux-d = &pinmux_d;
31+
32+
port-a = &porta;
33+
port-b = &portb;
34+
port-c = &portc;
35+
port-d = &portd;
36+
37+
sercom-0 = &sercom0;
38+
sercom-1 = &sercom1;
39+
sercom-2 = &sercom2;
40+
sercom-3 = &sercom3;
41+
sercom-4 = &sercom4;
42+
sercom-5 = &sercom5;
43+
sercom-6 = &sercom6;
44+
sercom-7 = &sercom7;
45+
46+
tc-0 = &tc0;
47+
tc-2 = &tc2;
48+
tc-4 = &tc4;
49+
tc-6 = &tc6;
50+
};
51+
52+
soc {
53+
flash0: flash@0 {
54+
compatible = "soc-nv-flash";
55+
label = "FLASH_0";
56+
write-block-size = <512>;
57+
};
58+
59+
sram0: memory@20000000 {
60+
compatible = "mmio-sram";
61+
reg = <0x20000000 0x40000>;
62+
};
63+
64+
backup0: memory@47000000 {
65+
compatible = "mmio-sram";
66+
reg = <0x47000000 0x2000>;
67+
};
68+
69+
id: device_id@8061fc {
70+
compatible = "atmel,sam0-id";
71+
reg = <0x008061FC 0x4>,
72+
<0x00806010 0x4>,
73+
<0x00806014 0x4>,
74+
<0x00806018 0x4>;
75+
};
76+
77+
nvmctrl: nvmctrl@41004000 {
78+
compatible = "atmel,sam0-nvmctrl";
79+
label = "FLASH_CTRL";
80+
reg = <0x41004000 0x22>;
81+
interrupts = <29 0>, <30 0>;
82+
lock-regions = <32>;
83+
84+
#address-cells = <1>;
85+
#size-cells = <1>;
86+
};
87+
88+
dma: dmac@4100A000 {
89+
compatible = "atmel,sam0-dmac";
90+
reg = <0x4100A000 0x50>;
91+
interrupts = <31 0>, <32 0>, <33 0>, <34 0>, <35 0>;
92+
label = "DMA_0";
93+
};
94+
95+
eic: eic@40002800 {
96+
compatible = "atmel,sam0-eic";
97+
reg = <0x40002800 0x38>;
98+
interrupts = <12 0>, <13 0>, <14 0>, <15 0>,
99+
<16 0>, <17 0>, <18 0>, <19 0>,
100+
<20 0>, <21 0>, <22 0>, <23 0>,
101+
<24 0>, <25 0>, <26 0>, <27 0>;
102+
label = "EIC";
103+
};
104+
105+
pinmux_a: pinmux@41008000 {
106+
compatible = "atmel,sam0-pinmux";
107+
reg = <0x41008000 0x80>;
108+
label = "PINMUX_A";
109+
};
110+
111+
pinmux_b: pinmux@41008080 {
112+
compatible = "atmel,sam0-pinmux";
113+
reg = <0x41008080 0x80>;
114+
label = "PINMUX_B";
115+
};
116+
117+
pinmux_c: pinmux@41008100 {
118+
compatible = "atmel,sam0-pinmux";
119+
reg = <0x41008100 0x80>;
120+
label = "PINMUX_C";
121+
};
122+
123+
pinmux_d: pinmux@41008180 {
124+
compatible = "atmel,sam0-pinmux";
125+
reg = <0x41008180 0x80>;
126+
label = "PINMUX_D";
127+
};
128+
129+
wdog: watchdog@40002000 {
130+
compatible = "atmel,sam0-watchdog";
131+
reg = <0x40002000 13>;
132+
interrupts = <10 0>;
133+
label = "WATCHDOG_0";
134+
};
135+
136+
sercom0: sercom@40003000 {
137+
compatible = "atmel,sam0-sercom";
138+
reg = <0x40003000 0x40>;
139+
interrupts = <46 0>, <47 0>, <48 0>, <49 0>;
140+
status = "disabled";
141+
label = "SERCOM0";
142+
};
143+
144+
sercom1: sercom@40003400 {
145+
compatible = "atmel,sam0-sercom";
146+
reg = <0x40003400 0x40>;
147+
interrupts = <50 0>, <51 0>, <52 0>, <53 0>;
148+
status = "disabled";
149+
label = "SERCOM1";
150+
};
151+
152+
sercom2: sercom@41012000 {
153+
compatible = "atmel,sam0-sercom";
154+
reg = <0x41012000 0x40>;
155+
interrupts = <54 0>, <55 0>, <56 0>, <57 0>;
156+
status = "disabled";
157+
label = "SERCOM2";
158+
};
159+
160+
sercom3: sercom@41014000 {
161+
compatible = "atmel,sam0-sercom";
162+
reg = <0x41014000 0x40>;
163+
interrupts = <58 0>, <59 0>, <60 0>, <61 0>;
164+
status = "disabled";
165+
label = "SERCOM3";
166+
};
167+
168+
sercom4: sercom@43000000 {
169+
compatible = "atmel,sam0-sercom";
170+
reg = <0x43000000 0x40>;
171+
interrupts = <62 0>, <63 0>, <64 0>, <65 0>;
172+
status = "disabled";
173+
label = "SERCOM4";
174+
};
175+
176+
sercom5: sercom@43000400 {
177+
compatible = "atmel,sam0-sercom";
178+
reg = <0x43000400 0x40>;
179+
interrupts = <66 0>, <67 0>, <68 0>, <69 0>;
180+
status = "disabled";
181+
label = "SERCOM5";
182+
};
183+
184+
sercom6: sercom@43000800 {
185+
compatible = "atmel,sam0-sercom";
186+
reg = <0x43000800 0x40>;
187+
interrupts = <70 0>, <71 0>, <72 0>, <73 0>;
188+
status = "disabled";
189+
label = "SERCOM6";
190+
};
191+
192+
sercom7: sercom@43000C00 {
193+
compatible = "atmel,sam0-sercom";
194+
reg = <0x43000C00 0x40>;
195+
interrupts = <74 0>, <75 0>, <76 0>, <77 0>;
196+
status = "disabled";
197+
label = "SERCOM7";
198+
};
199+
200+
porta: gpio@41008000 {
201+
compatible = "atmel,sam0-gpio";
202+
reg = <0x41008000 0x80>;
203+
label = "PORTA";
204+
gpio-controller;
205+
#gpio-cells = <2>;
206+
};
207+
208+
portb: gpio@41008080 {
209+
compatible = "atmel,sam0-gpio";
210+
reg = <0x41008080 0x80>;
211+
label = "PORTB";
212+
gpio-controller;
213+
#gpio-cells = <2>;
214+
};
215+
216+
portc: gpio@41008100 {
217+
compatible = "atmel,sam0-gpio";
218+
reg = <0x41008100 0x80>;
219+
label = "PORTC";
220+
gpio-controller;
221+
#gpio-cells = <2>;
222+
};
223+
224+
portd: gpio@41008180 {
225+
compatible = "atmel,sam0-gpio";
226+
reg = <0x41008180 0x80>;
227+
label = "PORTD";
228+
gpio-controller;
229+
#gpio-cells = <2>;
230+
};
231+
232+
usb0: usb@41000000 {
233+
compatible = "atmel,sam0-usb";
234+
status = "disabled";
235+
reg = <0x41000000 0x1000>;
236+
interrupts = <80 0>, <81 0>, <82 0>, <83 0>;
237+
num-bidir-endpoints = <8>;
238+
label = "USB0";
239+
};
240+
241+
rng: rng@42002800 {
242+
compatible = "atmel,sam0-trng";
243+
reg = <0x42002800 0x1e>;
244+
interrupts = <131 0>;
245+
label = "ENTROPY_0";
246+
};
247+
248+
rtc: rtc@40002400 {
249+
compatible = "atmel,sam0-rtc";
250+
reg = <0x40002400 0x1C>;
251+
interrupts = <11 0>;
252+
clock-generator = <0>;
253+
status = "disabled";
254+
label = "RTC";
255+
};
256+
257+
adc0: adc@43001C00 {
258+
compatible = "atmel,sam0-adc";
259+
reg = <0x43001C00 0x4A>;
260+
interrupts = <118 0>, <119 0>;
261+
label = "ADC_0";
262+
263+
/*
264+
* 16 MHz max, source clock must not exceed 100 MHz.
265+
* - table 54-8, section 54.6, page 2020
266+
* - table 54-24, section 54.10.4, page 2031
267+
* -> 48 MHz GCLK(2) / 4 = 12 MHz
268+
*/
269+
gclk = <2>;
270+
prescaler = <4>;
271+
#io-channel-cells = <1>;
272+
};
273+
274+
adc1: adc@43002000 {
275+
compatible = "atmel,sam0-adc";
276+
reg = <0x43002000 0x4A>;
277+
interrupts = <120 0>, <121 0>;
278+
label = "ADC_1";
279+
280+
/*
281+
* 16 MHz max, source clock must not exceed 100 MHz.
282+
* - table 54-8, section 54.6, page 2020
283+
* - table 54-24, section 54.10.4, page 2031
284+
* -> 48 MHz GCLK(2) / 4 = 12 MHz
285+
*/
286+
gclk = <2>;
287+
prescaler = <4>;
288+
#io-channel-cells = <1>;
289+
};
290+
291+
tc0: tc@40003800 {
292+
compatible = "atmel,sam0-tc32";
293+
reg = <0x40003800 0x34>;
294+
interrupts = <107 0>;
295+
label = "TIMER_0";
296+
};
297+
298+
tc2: tc@4101A000 {
299+
compatible = "atmel,sam0-tc32";
300+
reg = <0x4101A000 0x34>;
301+
interrupts = <109 0>;
302+
label = "TIMER_2";
303+
};
304+
305+
tc4: tc@42001400 {
306+
compatible = "atmel,sam0-tc32";
307+
reg = <0x42001400 0x34>;
308+
interrupts = <111 0>;
309+
label = "TIMER_4";
310+
};
311+
312+
tc6: tc@43001400 {
313+
compatible = "atmel,sam0-tc32";
314+
reg = <0x43001400 0x34>;
315+
interrupts = <113 0>;
316+
label = "TIMER_6";
317+
};
318+
};
319+
};
320+
321+
&nvic {
322+
arm,num-irq-priority-bits = <3>;
323+
};

dts/arm/atmel/samd5xx18.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2019 ML!PA Consulting GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <atmel/samd5x.dtsi>
9+
10+
/ {
11+
flash0: flash@0 {
12+
reg = <0x0 DT_SIZE_K(256)>;
13+
};
14+
15+
sram0: memory@20000000 {
16+
reg = <0x20000000 DT_SIZE_K(128)>;
17+
};
18+
};

dts/arm/atmel/samd5xx19.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2019 ML!PA Consulting GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <atmel/samd5x.dtsi>
9+
10+
/ {
11+
flash0: flash@0 {
12+
reg = <0x0 DT_SIZE_K(512)>;
13+
};
14+
15+
sram0: memory@20000000 {
16+
reg = <0x20000000 DT_SIZE_K(192)>;
17+
};
18+
};

dts/arm/atmel/samd5xx20.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2019 ML!PA Consulting GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <atmel/samd5x.dtsi>
9+
10+
/ {
11+
flash0: flash@0 {
12+
reg = <0x0 DT_SIZE_K(1024)>;
13+
};
14+
15+
sram0: memory@20000000 {
16+
reg = <0x20000000 DT_SIZE_K(256)>;
17+
};
18+
};

dts/arm/atmel/same5xx18.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2019 ML!PA Consulting GmbH
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <atmel/samd5xx18.dtsi>

0 commit comments

Comments
 (0)