boards: efr32_radio: Add PM support using BURTC timer

Add power management support running in EM1 and EM2 from BURTC timer.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
This commit is contained in:
Markus Fuchs 2023-07-28 15:16:25 +02:00 committed by Fabio Baltieri
parent 1766932b56
commit 4fd5a9cee1
3 changed files with 38 additions and 4 deletions

View file

@ -61,6 +61,10 @@
clock-frequency = <39000000>;
};
&pstate_em3 {
status = "disabled";
};
&usart0 {
current-speed = <115200>;
location-rx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(9)>;

View file

@ -25,15 +25,44 @@
device_type = "cpu";
compatible = "arm,cortex-m33";
reg = <0>;
cpu-power-states = <&state0>;
cpu-power-states = <&pstate_em1 &pstate_em2 &pstate_em3>;
};
power-states {
state0: state0 {
/*
* EM1 is a basic "CPU WFI idle", all high-freq clocks remain
* enabled.
*/
pstate_em1: em1 {
compatible = "zephyr,power-state";
power-state-name = "runtime-idle";
min-residency-us = <4>;
/* HFXO remains active */
exit-latency-us = <2>;
};
/*
* EM2 is a deepsleep with HF clocks disabled by HW, voltages
* scaled down, etc.
*/
pstate_em2: em2 {
compatible = "zephyr,power-state";
power-state-name = "suspend-to-idle";
min-residency-us = <260>;
exit-latency-us = <250>;
};
/*
* EM3 seems to be exactly the same as EM2 except that
* LFXO & LFRCO should be disabled, so you must use ULFRCO
* as BURTC clock for the system to not lose track of time and
* wake up.
*/
pstate_em3: em3 {
compatible = "zephyr,power-state";
power-state-name = "standby";
min-residency-us = <50000>;
exit-latency-us = <0>;
min-residency-us = <20000>;
exit-latency-us = <2000>;
};
};
};

View file

@ -19,6 +19,7 @@ config NUM_IRQS
config PM
default n
select COUNTER
select UART_INTERRUPT_DRIVEN if SERIAL_SUPPORT_INTERRUPT
choice PM_POLICY
default PM_POLICY_DEFAULT