Skip to content

Commit b77c50d

Browse files
maximevincenashif
authored andcommitted
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 <[email protected]>
1 parent 73f3f7d commit b77c50d

File tree

1 file changed

+20
-0
lines changed
  • soc/nxp/lpc/lpc55xxx

1 file changed

+20
-0
lines changed

soc/nxp/lpc/lpc55xxx/soc.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ static ALWAYS_INLINE void clock_init(void)
184184
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2);
185185
#endif
186186

187+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm3), nxp_lpc_usart, okay)
188+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM3);
189+
#endif
190+
187191
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm4), nxp_lpc_i2c, okay)
188192
#if defined(CONFIG_SOC_LPC55S36)
189193
CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 0U, true);
@@ -193,6 +197,22 @@ static ALWAYS_INLINE void clock_init(void)
193197
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);
194198
#endif
195199

200+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm4), nxp_lpc_usart, okay)
201+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM4);
202+
#endif
203+
204+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm5), nxp_lpc_usart, okay)
205+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM5);
206+
#endif
207+
208+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm6), nxp_lpc_usart, okay)
209+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM6);
210+
#endif
211+
212+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm7), nxp_lpc_usart, okay)
213+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM7);
214+
#endif
215+
196216
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hs_lspi))
197217
/* Attach 12 MHz clock to HSLSPI */
198218
CLOCK_AttachClk(kFRO_HF_DIV_to_HSLSPI);

0 commit comments

Comments
 (0)