soc: arm: nxp_imx: Add GPIO clock enable for i.MX8ML M7 Core Series
Enable clock if GPIO bank is enabled in the devicetree. Signed-off-by: Daniel Fladerer <d.fladerer@gmx.de>
This commit is contained in:
parent
3e8d1182d4
commit
6d493776e9
1 changed files with 34 additions and 0 deletions
|
@ -148,6 +148,38 @@ static void SOC_ClockInit(void)
|
|||
CLOCK_EnableClock(kCLOCK_Sec_Debug);
|
||||
}
|
||||
|
||||
static void gpio_init(void)
|
||||
{
|
||||
|
||||
#if defined(CONFIG_GPIO_MCUX_IGPIO)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Gpio1);
|
||||
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay)
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Gpio2);
|
||||
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay)
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Gpio3);
|
||||
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay)
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Gpio4);
|
||||
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay)
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Gpio5);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static int nxp_mimx8ml8_init(void)
|
||||
{
|
||||
|
||||
|
@ -157,6 +189,8 @@ static int nxp_mimx8ml8_init(void)
|
|||
/* SoC specific Clock settings */
|
||||
SOC_ClockInit();
|
||||
|
||||
gpio_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue