-
Notifications
You must be signed in to change notification settings - Fork 8.4k
NXP drivers: counter_mcux_ctimer: Adds PM low-power recovery support #89284
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
NXP drivers: counter_mcux_ctimer: Adds PM low-power recovery support #89284
Conversation
|
Hello @tsi-chung, and thank you very much for your first pull request to the Zephyr project! |
453aa01 to
01787d6
Compare
decsny
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
|
@tsi-chung , this PR should address some of the counter test failures you were seeing. #89340 |
apparently CONFIG_PM_DEVICE=n will not remove PM device from the build, so the implementation should work
01787d6 to
0fff5f4
Compare
| CONFIG_COUNTER_MCUX_CTIMER=n | ||
| CONFIG_COUNTER_NXP_MRT=n |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated. Will push later
drivers/counter/counter_nxp_mrt.c
Outdated
| #include <zephyr/device.h> | ||
| #include <zephyr/irq.h> | ||
| #include <zephyr/drivers/reset.h> | ||
| #include <zephyr/pm/policy.h> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated. Will push later
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>
0fff5f4 to
0cc5210
Compare
0cc5210 to
107941c
Compare
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>
107941c to
53f817b
Compare
|
|
Hi @tsi-chung! 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! 🪁 |



Enables Sleep mode (PM3) in RW61x for Ctimer.