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:
parent
1766932b56
commit
4fd5a9cee1
3 changed files with 38 additions and 4 deletions
|
@ -61,6 +61,10 @@
|
||||||
clock-frequency = <39000000>;
|
clock-frequency = <39000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pstate_em3 {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
&usart0 {
|
&usart0 {
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
location-rx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(9)>;
|
location-rx = <GECKO_LOCATION(0) GECKO_PORT_A GECKO_PIN(9)>;
|
||||||
|
|
|
@ -25,15 +25,44 @@
|
||||||
device_type = "cpu";
|
device_type = "cpu";
|
||||||
compatible = "arm,cortex-m33";
|
compatible = "arm,cortex-m33";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
cpu-power-states = <&state0>;
|
cpu-power-states = <&pstate_em1 &pstate_em2 &pstate_em3>;
|
||||||
};
|
};
|
||||||
|
|
||||||
power-states {
|
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";
|
compatible = "zephyr,power-state";
|
||||||
power-state-name = "standby";
|
power-state-name = "standby";
|
||||||
min-residency-us = <50000>;
|
min-residency-us = <20000>;
|
||||||
exit-latency-us = <0>;
|
exit-latency-us = <2000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,7 @@ config NUM_IRQS
|
||||||
config PM
|
config PM
|
||||||
default n
|
default n
|
||||||
select COUNTER
|
select COUNTER
|
||||||
|
select UART_INTERRUPT_DRIVEN if SERIAL_SUPPORT_INTERRUPT
|
||||||
|
|
||||||
choice PM_POLICY
|
choice PM_POLICY
|
||||||
default PM_POLICY_DEFAULT
|
default PM_POLICY_DEFAULT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue