soc: rt5xx: Restore ISP pins state in soc init

ROM configures the ISP boot pins as gpio to determine what boot mode to
be in. But some ROM revisions have a bug where they do not restore the
reset state of these pins before booting application. This can cause
power leakage on these pins and is not an intended configuration from
Zephyr user/board point of view, so restore the reset state as part of
early SOC init (disable the pins). Configuration of pins should be
left up to app/board devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2024-01-29 09:33:14 -06:00 committed by Fabio Baltieri
commit a37bd8e7ba

View file

@ -530,6 +530,14 @@ static int nxp_rt500_init(void)
CACHE64_DisableCache(CACHE64_CTRL0);
#endif
/* Some ROM versions may have errata leaving these pins in a non-reset state,
* which can often cause power leakage on most expected board designs,
* restore the reset state here and leave the pin configuration up to board/user DT
*/
IOPCTL->PIO[1][15] = 0;
IOPCTL->PIO[3][28] = 0;
IOPCTL->PIO[3][29] = 0;
return 0;
}