Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rw6xx: Add Support for Standby Power Mode #84945

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

mmahadevan108
Copy link
Collaborator

This maps to Power Mode 3 in the SoC Power Profile

This PR is dependent on #74371 and #84938

@mmahadevan108
Copy link
Collaborator Author

Push a commit from #74371 to fix CI failures.

Add PM action for MCUX LPC driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Add power action callback handlers to the driver.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This maps to Power Mode 3 in the SoC.
Add RTC node that is used to wakeup from this mode.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This is required to re-initialize the peripherals on
exit from Power Mode 3.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This clock is used for certain peripherals such
as RTC.
On certain RW612 boards such as rd_rw612_bga, XTAL32K
and ENET share pins. Add code to check if ENET and
XTAL32 are enabled at the same time.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Since the clock source when running in PM mode 3 is the
slower 1KHx clock, we adjust the SYS_CLOCK_TICKS_PER_SEC
value to get better accuracy.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This maps to Zephyr power state Standby. In this power
state the OS Timer cannot be used as a wakeup source as
it will be powered off. Hence the counter is enabled
and RTC is used to keep track of system ticks and wakeup
the system.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Update the clock init code to gate off unused clocks.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Power Domains are used to re-enable peripherals
when exit Power Mode 3 (Standby).

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Provide an API for other drivers to fire GPIO callbacks

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Call the API provided to fire a GPIO interrupt
if registered on wakeup from PM Mode 3.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This is used as wakeup source to wakeup from Power Modes
3 and 4.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Enable PM mode 3 on NXP FRDM_RW612 and RD_RW612 boards.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This driver triggers the TURN_ON and TURN_OFF actions for certain
power states. These power states are specified via device tree.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. The sys_clock_idle_exit function could be invoked multiple
   times. Hence add code so that is counter is stopped and the
   OS Timer is initialized once.
2. Reset the OS Timer when exiting low power modes where
   the OS Timer loses its state
3. Improve the cycles conversion algorithm. Round to the nearest
   microsecond when converting from ticks to microsecond rather
   than always rounding up to the next highest value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants