Skip to content

Commit a17730d

Browse files
Sizurkagalak
authored andcommitted
soc: sam0: Fix SAMD20 IRQ assignments
SAMD20 does not have the DMA or USB peripherals and as a result the IRQs for all subsequent lines are shifted down from SAMD21. This splits the interrupt assignment for the SERCOMs into the SoC specific DTS file and moves the USB definition to SAMD21 only. Signed-off-by: Derek Hageman <[email protected]>
1 parent c8b17ec commit a17730d

File tree

3 files changed

+61
-15
lines changed

3 files changed

+61
-15
lines changed

dts/arm/atmel/samd.dtsi

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,47 +65,41 @@
6565
sercom0: sercom@42000800 {
6666
compatible = "atmel,sam0-sercom";
6767
reg = <0x42000800 0x40>;
68-
interrupts = <9 0>;
6968
status = "disabled";
7069
label = "SERCOM0";
7170
};
7271

7372
sercom1: sercom@42000c00 {
7473
compatible = "atmel,sam0-sercom";
7574
reg = <0x42000c00 0x40>;
76-
interrupts = <10 0>;
7775
status = "disabled";
7876
label = "SERCOM1";
7977
};
8078

8179
sercom2: sercom@42001000 {
8280
compatible = "atmel,sam0-sercom";
8381
reg = <0x42001000 0x40>;
84-
interrupts = <11 0>;
8582
status = "disabled";
8683
label = "SERCOM2";
8784
};
8885

8986
sercom3: sercom@42001400 {
9087
compatible = "atmel,sam0-sercom";
9188
reg = <0x42001400 0x40>;
92-
interrupts = <12 0>;
9389
status = "disabled";
9490
label = "SERCOM3";
9591
};
9692

9793
sercom4: sercom@42001800 {
9894
compatible = "atmel,sam0-sercom";
9995
reg = <0x42001800 0x40>;
100-
interrupts = <13 0>;
10196
status = "disabled";
10297
label = "SERCOM4";
10398
};
10499

105100
sercom5: sercom@42001c00 {
106101
compatible = "atmel,sam0-sercom";
107102
reg = <0x42001c00 0x40>;
108-
interrupts = <14 0>;
109103
status = "disabled";
110104
label = "SERCOM5";
111105
};
@@ -126,15 +120,6 @@
126120
#gpio-cells = <2>;
127121
};
128122

129-
usb0: usb@41005000 {
130-
compatible = "atmel,sam0-usb";
131-
status = "disabled";
132-
reg = <0x41005000 0x1000>;
133-
interrupts = <7 0>;
134-
num-bidir-endpoints = <8>;
135-
label = "USB0";
136-
};
137-
138123
rtc: rtc@40001400 {
139124
compatible = "atmel,sam0-rtc";
140125
reg = <0x40001400 0x1C>;

dts/arm/atmel/samd20.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,27 @@
55
*/
66

77
#include <atmel/samd.dtsi>
8+
9+
&sercom0 {
10+
interrupts = <7 0>;
11+
};
12+
13+
&sercom1 {
14+
interrupts = <8 0>;
15+
};
16+
17+
&sercom2 {
18+
interrupts = <9 0>;
19+
};
20+
21+
&sercom3 {
22+
interrupts = <10 0>;
23+
};
24+
25+
&sercom4 {
26+
interrupts = <11 0>;
27+
};
28+
29+
&sercom5 {
30+
interrupts = <12 0>;
31+
};

dts/arm/atmel/samd21.dtsi

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,40 @@
55
*/
66

77
#include <atmel/samd.dtsi>
8+
9+
/ {
10+
soc {
11+
usb0: usb@41005000 {
12+
compatible = "atmel,sam0-usb";
13+
status = "disabled";
14+
reg = <0x41005000 0x1000>;
15+
interrupts = <7 0>;
16+
num-bidir-endpoints = <8>;
17+
label = "USB0";
18+
};
19+
};
20+
};
21+
22+
&sercom0 {
23+
interrupts = <9 0>;
24+
};
25+
26+
&sercom1 {
27+
interrupts = <10 0>;
28+
};
29+
30+
&sercom2 {
31+
interrupts = <11 0>;
32+
};
33+
34+
&sercom3 {
35+
interrupts = <12 0>;
36+
};
37+
38+
&sercom4 {
39+
interrupts = <13 0>;
40+
};
41+
42+
&sercom5 {
43+
interrupts = <14 0>;
44+
};

0 commit comments

Comments
 (0)