Skip to content

Feature/mspm33 rtc driver support -- WIP PR #22

Draft
Aman-Lachhiramka-ti wants to merge 14 commits intodev_mspm33from
feature/mspm33-rtc-driver-support
Draft

Feature/mspm33 rtc driver support -- WIP PR #22
Aman-Lachhiramka-ti wants to merge 14 commits intodev_mspm33from
feature/mspm33-rtc-driver-support

Conversation

@Aman-Lachhiramka-ti
Copy link
Collaborator

WIP Draft PR for initial feedback

Rename RTC driver from mspm0 specific to a more generic msp family
name to prepare for supporting multiple devices in MSP family.
Driver functionality and dts bindings remain unchanged.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Rename dts binding from ti,mspm0-rtc to ti,msp-rtc compatible
and update all references atomically. This includes binding yaml,
dtsi compatible string, driver DT_DRV_COMPAT and Kconfig DT_HAS
dependency to maintain bisectability.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add RTC device tree node for MSPM33C321A at LFSS base address
0x400D8000 with IRQ 42. The RTC on MSPM33 is an LFSS-resident
peripheral (ti,rtc-x) with dual alarm support.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add board configuration and overlay for RTC API test on
lp_mspm33c321a, enabling RTC with alarm support.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add CONFIG_USE_MSP_DL_RTC_COMMON Kconfig symbol for mspm0 module
to enable conditional compilation of dl_rtc_common.c in the HAL.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add CONFIG_USE_MSP_DL_RTC_COMMON Kconfig symbol for mspm33 module
to enable conditional compilation of dl_rtc_common.c in the HAL.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Select USE_MSP_DL_RTC_COMMON when RTC_MSP is enabled to pull
in the shared dl_rtc_common.c from the HAL module.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Apply Zephyr clang-format style to align with upstream
coding conventions. No functional changes.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Clean up code style and improve robustness without changing
behavior. Replace __ASSERT with runtime -EINVAL checks, fix
get_alarm return types to uint16_t, use K_SPINLOCK macro
consistently, simplify ISR alarm pointer handling, add const
to config struct, and remove unused includes.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Use initCalendar/getCalendarTime HAL APIs with month/year
offset handling. Track time_set state to return -ENODATA
before first set_time. Handle register propagation delay
and RTCRDY keepout window. Support mask=0 alarm disable
and initialize alarm state during init.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add board overlay and platform entry to enable the RTC sample
on the LP_MSPM33C321A LaunchPad.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add per-second update callback using the RTCRDY interrupt.
Widen IRQ guards to support both alarm and update features.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add set/get calibration using the CAL register with PPB to
PPM conversion. Hardware range is ±240 PPM (±240000 PPB).

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Enable CONFIG_RTC_UPDATE and CONFIG_RTC_CALIBRATION in the
rtc_api test board configuration.

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant