Skip to content

Commit 88918da

Browse files
decsnykartben
authored andcommitted
boards: frdm_mcxn947: Add missing flexcomm clocks
Add the missing flexcomm clocking code for this board. Signed-off-by: Declan Snyder <[email protected]>
1 parent 4a67a61 commit 88918da

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

boards/nxp/frdm_mcxn947/board.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ void board_early_init_hook(void)
152152
CLOCK_SetClkDiv(kCLOCK_DivPLL1Clk0, 1U);
153153
#endif
154154

155+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm0))
156+
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
157+
CLOCK_SetClkDiv(kCLOCK_DivFlexcom0Clk, 1u);
158+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM0);
159+
#endif
160+
155161
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm1))
156162
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
157163
CLOCK_SetClkDiv(kCLOCK_DivFlexcom1Clk, 1u);
@@ -176,12 +182,36 @@ void board_early_init_hook(void)
176182
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM4);
177183
#endif
178184

185+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm5))
186+
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
187+
CLOCK_SetClkDiv(kCLOCK_DivFlexcom5Clk, 1u);
188+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM5);
189+
#endif
190+
191+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm6))
192+
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
193+
CLOCK_SetClkDiv(kCLOCK_DivFlexcom6Clk, 1u);
194+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM6);
195+
#endif
196+
179197
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm7))
180198
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
181199
CLOCK_SetClkDiv(kCLOCK_DivFlexcom7Clk, 1u);
182200
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM7);
183201
#endif
184202

203+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm8))
204+
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
205+
CLOCK_SetClkDiv(kCLOCK_DivFlexcom8Clk, 1u);
206+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM8);
207+
#endif
208+
209+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm9))
210+
/* Configure input clock to be able to reach the datasheet specified SPI band rate. */
211+
CLOCK_SetClkDiv(kCLOCK_DivFlexcom9Clk, 1u);
212+
CLOCK_AttachClk(kFRO_HF_DIV_to_FLEXCOMM9);
213+
#endif
214+
185215
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(os_timer))
186216
CLOCK_AttachClk(kCLK_1M_to_OSTIMER);
187217
#endif

0 commit comments

Comments
 (0)