Power Management for SiWx91x#
Zephyr supports several modes of power management. See the upstream documentation for an overview of the different modes:
CONFIG_PM: System Power Management - handles suspending the CPU and entering sleep states.CONFIG_PM_DEVICE: Device Power Management - handles suspending and resuming device drivers:CONFIG_PM_DEVICE_SYSTEM_MANAGED: System-managed Device Power Management - device drivers are suspended and resumed together with the CPU.CONFIG_PM_DEVICE_RUNTIME: Device Runtime Power Management - device drivers have an independent lifecycle from the CPU.
On SiWx91x devices, Device Runtime Power Management is the default when Device Power Management is selected.
System Power Management#
On Silicon Labs SiWx91x devices, system power management is implemented using the WiSeConnect Power Manager, which acts as a backend for the Zephyr Power Management subsystem.
The Zephyr PM subsystem determines the desired sleep state based on its power management policy. This decision is passed to the WiSeConnect Power Manager as a power-state requirement. The WiSeConnect Power Manager performs the action of going to sleep, synchronizing the decision with the Network Processor (NWP).
Supported Power States#
A subset of the power states available in SiWx91x are supported in Simplicity SDK for Zephyr.
Zephyr Power State | WiSeConnect Power State | Description |
|---|---|---|
Active | PS4 | CPU active. All peripherals enabled. |
Runtime idle | PS4 Standby | CPU suspended. All peripherals enabled. |
Suspend to idle | PS4 Sleep | CPU suspended. HP and ULP peripherals disabled. |
Device Runtime Power Management#
SiWx91x devices use Device Runtime Power Management with power-domain integration.
When System Power Management enters PS4 Sleep, the Power Domain driver is suspended. This invokes
the TURN_OFF power management action on all High-Power (HP) and Ultra-Low-Power (ULP) peripheral drivers on the power domain
(child devices of the power domain). Upon wakeup, the TURN_ON action is invoked on those devices.
The TURN_ON action typically includes:
Enabling the peripheral clock
Configuring
pinctrlto thedefaultstateInitializing the hardware (from reset or wakeup)
The RESUME and SUSPEND actions may apply additional configuration.
Device Runtime Power Management requires correct reference counting using the
pm_device_driver_get(dev) and pm_device_driver_put(dev) APIs by all subsystems that use the driver.
Out of reset, devices are initialized to the SUSPENDED state, and a reference must be taken to
wake them up. Most peripherals with transactional APIs take a reference internally as part of the
transaction, ensuring that the peripheral is available for the duration of the transaction. However,
for consistency, it is recommended to always take a reference to a driver before using it.