-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
soc: arm: nxp_imx: rt5xx: make deepsleep pin config functions weak #64808
Conversation
Allows a board to override. A board might not want the ISP pins to be changed because they were configured for alternate function during runtime. A board might also want to do additional deepsleep pin configurations. Signed-off-by: Mike J. Chen <[email protected]>
For this issue, would @mmahadevan108 - would it be possible to instead make this behavior optional with a Kconfig? That seems a bit more inline with the "Zephyr" way of handling an issue like this |
If the current code used a notifier to change the ISP pins, we'd still need to change the notifier if it was in rt5xx/power.c Flexspi also changes pincfg, but uses the CONFIG_PM_DEVICE method to switch pinctrl config. But ISP isn't a device, so I presume it's using this method instead. I'm wondering if those code should actually be moved. If the ISP pins have default pulls, wouldn't it be better to disable those pulls all the time once we're booted, and not just in deep sleep? Why waste power during runtime? If this code was moved to like board/mimxrt595_evk/board.c's mimxrt595_evk_init(), wouldn't it save power all the time? I wasn't sure if there was any reset path that would get messed up by this though. Is it the ROM that reads the ISP pin values and determines boot, and is it enabling the pulls, or are the pulls enabled by default and the ROM expects the pulls to be enabled when it reads the ISP pins? |
Hi @mjchen0 , Yes, the ROM reads the ISP pins by default after reset. The ROM uses those pins to determine how it should boot. And using those ISP pins at boot can also be disabled by programming the OTP fuses. The app could disable the ISP pull-down resistors all the time to conserve power. The examples for the NXP EVK only do that during the lowest power modes for ease of use. But users should have easier control of this in their board files. Thanks for raising this. |
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 going to block this for the time being. I think in this case, we don't need to resort to weak functions to fix the issue here. @mmahadevan108 has offered to create a PR that moves the deepsleep pin configuration code into the RT595 EVK board port (using pm subsystem state callbacks), and should fix this issue in a way that doesn't require the user to redefine these functions at the board level
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
#67453 should fix this issue. |
Declining because #67453 removed this code anyways and addressed the same problem, feel free to reopen if you feel otherwise |
Allows a board to override. A board might not want the ISP pins to be changed because they were configured for alternate function during runtime. A board might also want to do additional deepsleep pin configurations.