soc: arm: nxp: lpc55xx flexcomm 3->7 clock init

Add clock init for FlexComm 3,4,5,6,7 in case they
are enabled in DeviceTree

Signed-off-by: Maxime Vincent <maxime@veemax.be>
This commit is contained in:
Maxime Vincent 2024-11-07 09:08:56 +01:00 committed by Anas Nashif
parent 73f3f7dbef
commit b77c50d7b8
1 changed files with 20 additions and 0 deletions

View File

@ -184,6 +184,10 @@ static ALWAYS_INLINE void clock_init(void)
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm3), nxp_lpc_usart, okay)
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM3);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm4), nxp_lpc_i2c, okay)
#if defined(CONFIG_SOC_LPC55S36)
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 0U, true);
@ -193,6 +197,22 @@ static ALWAYS_INLINE void clock_init(void)
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm4), nxp_lpc_usart, okay)
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM4);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm5), nxp_lpc_usart, okay)
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM5);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm6), nxp_lpc_usart, okay)
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM6);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm7), nxp_lpc_usart, okay)
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM7);
#endif
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hs_lspi))
/* Attach 12 MHz clock to HSLSPI */
CLOCK_AttachClk(kFRO_HF_DIV_to_HSLSPI);