soc: nxp: mcxc: add power management support
Add the MCXC power management implementation and wire it into the SoC
build and Kconfig flow.
Default MCUX_LPTMR_TIMER to y when CONFIG_PM is enabled and the
zephyr,system-timer chosen property points to an LPTMR node, so the
LPTMR serves as the tickless system timer in PM use cases. (Zephyr
4.5 stopped auto-defaulting MCUX_LPTMR_TIMER from the chosen property,
matching the convention later adopted for MCXW7XX.) When LPTMR is
selected, override the SoC-side SysTick default, set
SYS_CLOCK_TICKS_PER_SEC=1024 and derive SYS_CLOCK_HW_CYCLES_PER_SEC
from the chosen LPTMR's clock-frequency. Default WUC to y whenever PM
and an LLWU node are enabled, so the LPTMR system timer driver can
register itself as a wakeup source through the WUC API.
Set OSC0_CR.EREFSTEN once at PM init so the system OSC keeps running
across STOP modes. This keeps ERCLK32K alive as the LPTMR system-timer
clock source while the CPU is suspended; without it the timer would
lose its clock on STOP entry and never wake the CPU.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
4 files changed