Skip to content

Commit c2ef2c5

Browse files
AlessandroLuokartben
authored andcommitted
drivers: rtc: add rtc support for apollo510
This commit adds support for apollo510 rtc Signed-off-by: Hao Luo <hluo@ambiq.com>
1 parent e589fd6 commit c2ef2c5

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

boards/ambiq/apollo510_evb/apollo510_evb.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
pinctrl-names = "default";
9090
};
9191

92+
&rtc0 {
93+
status = "disabled";
94+
clock = "XTAL";
95+
};
96+
9297
&uart0 {
9398
current-speed = <115200>;
9499
pinctrl-0 = <&uart0_default>;

boards/ambiq/apollo510_evb/apollo510_evb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ supported:
1111
- uart
1212
- watchdog
1313
- gpio
14+
- rtc
1415
- clock_control
1516
- mspi
1617
testing:

dts/arm/ambiq/ambiq_apollo510.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@
149149
status = "okay";
150150
};
151151

152+
rtc0: rtc@RTC_BASE_NAME {
153+
compatible = "ambiq,rtc";
154+
reg = <RTC_REG_BASE RTC_REG_SIZE>;
155+
interrupts = <2 0>;
156+
alarms-count = <1>;
157+
status = "disabled";
158+
};
159+
152160
wdt0: watchdog@WDT_BASE_NAME {
153161
compatible = "ambiq,watchdog";
154162
reg = <WDT_REG_BASE WDT_REG_SIZE>;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Ambiq Micro Inc. <www.ambiq.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
rtc = &rtc0;
10+
};
11+
};
12+
13+
&rtc0 {
14+
status = "okay";
15+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_RTC_ALARM=y
5+
CONFIG_TEST_RTC_ALARM_TIME_MASK=79
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Ambiq Micro Inc. <www.ambiq.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
rtc = &rtc0;
10+
};
11+
};
12+
13+
&rtc0 {
14+
status = "okay";
15+
};

0 commit comments

Comments
 (0)