Skip to content

Conversation

@tsi-chung
Copy link
Contributor

Enables Sleep mode (PM3) in RW61x for Ctimer.

@github-actions
Copy link

Hello @tsi-chung, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

decsny
decsny previously requested changes Apr 29, 2025
Copy link
Member

@decsny decsny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please ensure driver will still work if PM_DEVICE is not configured

#
# SPDX-License-Identifier Apache-2.0
#
CONFIG_COUNTER_MCUX_CTIMER=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be needed, it gets enabled if DT node is enabled

@mmahadevan108
Copy link
Contributor

@tsi-chung , this PR should address some of the counter test failures you were seeing. #89340

@decsny decsny dismissed their stale review April 30, 2025 20:33

apparently CONFIG_PM_DEVICE=n will not remove PM device from the build, so the implementation should work

@tsi-chung tsi-chung force-pushed the rw612-ctimer-pm3 branch from 01787d6 to 0fff5f4 Compare May 2, 2025 15:52
@tsi-chung tsi-chung marked this pull request as ready for review May 2, 2025 21:46
Comment on lines 6 to 7
CONFIG_COUNTER_MCUX_CTIMER=n
CONFIG_COUNTER_NXP_MRT=n
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change, wouldn't this make the counters not get tested

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated and pushed

CONFIG_COUNTER_NXP_MRT=n

CONFIG_PM=y
CONFIG_PM_DEVICE=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_PM_DEVICE should already be enabled if standby mode is enabled in DT on this SOC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link https://docs.zephyrproject.org/latest/services/pm/device.html said that set CONFIG_PM_DEVICE; however, there isn't any doc said that not to set it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying not to set it, I'm saying we are already setting it. You can leave it here if you want, it doesn't hurt anything, it's just redundant AFAIK

#include <zephyr/drivers/clock_control.h>
#include <zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h>
#include <zephyr/irq.h>
#include <zephyr/pm/policy.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything from this header being used in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Will push later

#include <zephyr/device.h>
#include <zephyr/irq.h>
#include <zephyr/drivers/reset.h>
#include <zephyr/pm/policy.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything from this header being used in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Will push later

tsi-chung added 2 commits May 6, 2025 15:53
Enables Sleep mode (PM3) in RW61x for Ctimer.

Signed-off-by: Tsi-Chung Liew <Tsi-Chung.Liew@nxp.com>
Enables Sleep mode (PM3) in RW61x for MRT.

Signed-off-by: Tsi-Chung Liew <Tsi-Chung.Liew@nxp.com>
@tsi-chung tsi-chung force-pushed the rw612-ctimer-pm3 branch from 0fff5f4 to 0cc5210 Compare May 6, 2025 21:19
New test case enables low-power standby mode, but disables testing
the lpc_rtc_highres driver, since it is used to wake the device from
standby mode.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
@tsi-chung tsi-chung force-pushed the rw612-ctimer-pm3 branch from 107941c to 53f817b Compare May 9, 2025 19:57
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 9, 2025

@kartben kartben merged commit f1c9799 into zephyrproject-rtos:main May 12, 2025
26 checks passed
@github-actions
Copy link

Hi @tsi-chung!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Counter platform: NXP Drivers NXP Semiconductors, drivers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants