Skip to content

Commit b9466d2

Browse files
nandojvekartben
authored andcommitted
boards: atmel: sam0: Add rtc configs
Add configurations to allow use of RTC driver and tests. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
1 parent f2fa8f9 commit b9466d2

File tree

14 files changed

+69
-7
lines changed

14 files changed

+69
-7
lines changed

boards/atmel/sam0/samc21n_xpro/samc21n_xpro.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2022 Kamil Serwus
3+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -82,6 +83,14 @@
8283
pinctrl-names = "default";
8384
};
8485

86+
&rtc {
87+
status = "okay";
88+
counter-mode = "clock";
89+
prescaler = <1024>;
90+
91+
atmel,assigned-clocks = <&osc32kctrl 4>;
92+
};
93+
8594
&sercom0 {
8695
status = "okay";
8796
compatible = "atmel,sam0-uart";

boards/atmel/sam0/samc21n_xpro/samc21n_xpro.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2022 Kamil Serwus
2-
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
2+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
33
# SPDX-License-Identifier: Apache-2.0
44
identifier: samc21n_xpro
55
name: SAM C21N Xplained Pro
@@ -17,6 +17,7 @@ supported:
1717
- gpio
1818
- i2c
1919
- pwm
20+
- rtc
2021
- spi
2122
- uart
2223
vendor: atmel

boards/atmel/sam0/samd20_xpro/samd20_xpro.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2018 Sean Nyekjaer
3+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -51,6 +52,12 @@
5152
clock-frequency = <DT_FREQ_M(48)>;
5253
};
5354

55+
&rtc {
56+
status = "okay";
57+
counter-mode = "clock";
58+
prescaler = <1024>;
59+
};
60+
5461
&sercom0 {
5562
status = "okay";
5663
compatible = "atmel,sam0-spi";

boards/atmel/sam0/samd20_xpro/samd20_xpro.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
1+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
22
# SPDX-License-Identifier: Apache-2.0
33

44
identifier: samd20_xpro
@@ -14,6 +14,7 @@ supported:
1414
- flash
1515
- gpio
1616
- i2c
17+
- rtc
1718
- spi
1819
- uart
1920
- watchdog

boards/atmel/sam0/samd21_xpro/samd21_xpro.dts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2018 Bryan O'Donoghue
3-
* Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
3+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
44
*
55
* SPDX-License-Identifier: Apache-2.0
66
*/
@@ -71,6 +71,12 @@
7171
pinctrl-names = "default";
7272
};
7373

74+
&rtc {
75+
status = "okay";
76+
counter-mode = "clock";
77+
prescaler = <1024>;
78+
};
79+
7480
&sercom0 {
7581
status = "okay";
7682
compatible = "atmel,sam0-uart";

boards/atmel/sam0/samd21_xpro/samd21_xpro.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2018 Bryan O'Donoghue
2-
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
2+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
33
# SPDX-License-Identifier: Apache-2.0
44

55
identifier: samd21_xpro
@@ -17,6 +17,7 @@ supported:
1717
- gpio
1818
- i2c
1919
- pwm
20+
- rtc
2021
- spi
2122
- uart
2223
- usb_device

boards/atmel/sam0/same54_xpro/same54_xpro.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2019 Benjamin Valentin
3+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -68,6 +69,14 @@
6869
pinctrl-names = "default";
6970
};
7071

72+
&rtc {
73+
status = "okay";
74+
counter-mode = "clock";
75+
prescaler = <1024>;
76+
77+
atmel,assigned-clocks = <&osc32kctrl 4>;
78+
};
79+
7180
&sercom2 {
7281
status = "okay";
7382
compatible = "atmel,sam0-uart";

boards/atmel/sam0/same54_xpro/same54_xpro.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ supported:
1818
- i2c
1919
- netif:eth
2020
- pwm
21+
- rtc
2122
- spi
2223
- uart
2324
- usb_device

boards/atmel/sam0/saml21_xpro/saml21_xpro.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2021 Argentum Systems Ltd.
3+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -71,6 +72,14 @@
7172
pinctrl-names = "default";
7273
};
7374

75+
&rtc {
76+
status = "okay";
77+
counter-mode = "clock";
78+
prescaler = <1024>;
79+
80+
atmel,assigned-clocks = <&osc32kctrl 4>;
81+
};
82+
7483
&sercom0 {
7584
status = "okay";
7685
compatible = "atmel,sam0-spi";

boards/atmel/sam0/saml21_xpro/saml21_xpro.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2021 Argentum Systems Ltd.
2-
# Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
2+
# Copyright (c) 2024-2025 Gerson Fernando Budke <nandojve@gmail.com>
33
# SPDX-License-Identifier: Apache-2.0
44
identifier: saml21_xpro
55
name: SAM L21 Xplained Pro
@@ -17,6 +17,7 @@ supported:
1717
- gpio
1818
- i2c
1919
- pwm
20+
- rtc
2021
- spi
2122
- uart
2223
- usb_device

0 commit comments

Comments
 (0)