Lines Matching +full:power +full:- +full:on
4 * SPDX-License-Identifier: Apache-2.0
9 * @brief Nuvoton NPCX power management driver
11 * This file contains the drivers of NPCX Power Manager Modules that improves
12 * the efficiency of ec operation by adjusting the chip’s power consumption to
14 * summarizes the main properties of the various power states and shows the
15 * activity levels of the various clocks while in these power states.
17 * +--------------------------------------------------------------------------+
18 * | Power State | LFCLK | HFCLK | APB/AHB | Core | RAM/Regs | VCC | VSBY |
19 * |--------------------------------------------------------------------------|
20 * | Active | On | On | On | Active | Active | On | On |
21 * | Idle (wfi) | On | On | On | Wait | Active | On | On |
22 * | Sleep | On | On | Stop | Stop | Preserved | On | On |
23 * | Deep Sleep | On | Stop | Stop | Stop | Power Down | On | On |
24 * | Stand-By | Off | Off | Off | Off | Off | Off | On |
25 * +--------------------------------------------------------------------------+
27 * LFCLK - Low-Frequency Clock. Its frequency is fixed to 32kHz.
28 * HFCLK - High-Frequency (PLL) Clock. Its frequency is configured to OFMCLK.
30 * Based on the following criteria:
32 * - A delay of 'Instant' wake-up from 'Deep Sleep' is 20 us.
33 * - A delay of 'Standard' wake-up from 'Deep Sleep' is 3.43 ms.
34 * - Max residency time in Deep Sleep for 'Instant' wake-up is 200 ms
35 * - Min Residency time in Deep Sleep for 'Instant' wake-up is 61 us
36 * - The unit to determine power state residency policy is tick.
38 * this driver implements one power state, PM_STATE_SUSPEND_TO_IDLE, with
39 * two sub-states for power management system.
40 * Sub-state 0 - "Deep Sleep" mode with “Instant” wake-up if residency time
42 * Sub-state 1 - "Deep Sleep" mode with "Standard" wake-up if residency time
65 "push {r0-r5}\n" /* Save the registers used for delay */ \
67 "ldm %0, {r0-r5}\n" /* Add a delay before instructions fetching */ \
68 "pop {r0-r5}\n" /* Restore the registers used for delay */ \
83 /* Supported wake-up mode in npcx series */
102 * Get io array which have leakage current from 'leak-gpios' property of
104 * save power consumption when ec enter deep sleep.
107 * leak-gpios = <&gpio0 0 0
146 * Disable priority mask temporarily to make sure that wake-up events in npcx_power_enter_system_sleep()
157 * input buffer to save power consumption. in npcx_power_enter_system_sleep()
161 /* Turn on eSPI/LPC host access wake-up interrupt. */ in npcx_power_enter_system_sleep()
166 /* Turn on UART RX wake-up interrupt. */ in npcx_power_enter_system_sleep()
172 * Capture the reading of low-freq timer for compensation before ec in npcx_power_enter_system_sleep()
181 * Compensate system timer by the elapsed time of low-freq timer during in npcx_power_enter_system_sleep()
186 /* Turn off eSPI/LPC host access wake-up interrupt. */ in npcx_power_enter_system_sleep()
201 /* Invoke when enter "Suspend/Low Power" mode. */
205 LOG_DBG("Unsupported power state %u", state); in pm_state_set()
208 case 0: /* Sub-state 0: Deep sleep with instant wake-up */ in pm_state_set()
215 case 1: /* Sub-state 1: Deep sleep with standard wake-up */ in pm_state_set()
223 LOG_DBG("Unsupported power substate-id %u", in pm_state_set()
230 /* Handle soc specific activity after exiting "Suspend/Low Power" mode. */
234 LOG_DBG("Unsupported power state %u", state); in pm_state_exit_post_ops()
237 case 0: /* Sub-state 0: Deep sleep with instant wake-up */ in pm_state_exit_post_ops()
241 case 1: /* Sub-state 1: Deep sleep with standard wake-up */ in pm_state_exit_post_ops()
246 LOG_DBG("Unsupported power substate-id %u", in pm_state_exit_post_ops()