Skip to content

Commit 0cdea63

Browse files
committed
drivers: timer: Enable NXP LPTMR as wakeup-source
The NXP LPTMR uses the interrupt number or a dedicated wakeup signal to wakeup the platform from low power modes. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 78b9eee commit 0cdea63

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/timer/mcux_lptmr_timer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ static int sys_clock_driver_init(void)
122122
LPTMR_SetTimerPeriod(LPTMR_BASE, CYCLES_PER_TICK);
123123
LPTMR_StartTimer(LPTMR_BASE);
124124

125+
#if (DT_INST_PROP(0, wakeup_source))
126+
/* Use wakeup-signal property if specified, else use the irq number */
127+
NXP_ENABLE_WAKEUP_SIGNAL(DT_INST_PROP_OR(0, wakeup_signal, DT_INST_IRQN(0)));
128+
#endif
125129
return 0;
126130
}
127131

dts/arm/nxp/nxp_mcxw7x_common.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@
301301
prescaler = <1>;
302302
resolution = <32>;
303303
status = "disabled";
304+
wakeup-source;
305+
wakeup-signal = <0>;
304306
};
305307

306308
lptmr1: timer@2e000 {

0 commit comments

Comments
 (0)