File tree Expand file tree Collapse file tree 5 files changed +25
-14
lines changed Expand file tree Collapse file tree 5 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -199,13 +199,15 @@ void board_early_init_hook(void)
199199#endif
200200
201201#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi0 ))
202+ /* Configure input clock to be able to reach the datasheet specified band rate. */
202203 CLOCK_SetClockDiv (kCLOCK_DivLPSPI0 , 1u );
203- CLOCK_AttachClk (kFRO12M_to_LPSPI0 );
204+ CLOCK_AttachClk (kFRO_HF_DIV_to_LPSPI0 );
204205#endif
205206
206207#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lpspi1 ))
208+ /* Configure input clock to be able to reach the datasheet specified band rate. */
207209 CLOCK_SetClockDiv (kCLOCK_DivLPSPI1 , 1u );
208- CLOCK_AttachClk (kFRO12M_to_LPSPI1 );
210+ CLOCK_AttachClk (kFRO_HF_DIV_to_LPSPI1 );
209211#endif
210212
211213#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lptmr0 ))
Original file line number Diff line number Diff line change @@ -119,23 +119,27 @@ void board_early_init_hook(void)
119119#endif
120120
121121#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm1 ))
122+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
122123 CLOCK_SetClkDiv (kCLOCK_DivFlexcom1Clk , 1u );
123- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM1 );
124+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM1 );
124125#endif
125126
126127#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm2 ))
128+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
127129 CLOCK_SetClkDiv (kCLOCK_DivFlexcom2Clk , 1u );
128- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM2 );
130+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM2 );
129131#endif
130132
131133#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm3 ))
134+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
132135 CLOCK_SetClkDiv (kCLOCK_DivFlexcom3Clk , 1u );
133- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM3 );
136+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM3 );
134137#endif
135138
136139#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm4 ))
140+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
137141 CLOCK_SetClkDiv (kCLOCK_DivFlexcom4Clk , 1u );
138- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM4 );
142+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM4 );
139143#endif
140144
141145#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm5 ))
Original file line number Diff line number Diff line change @@ -148,23 +148,27 @@ void board_early_init_hook(void)
148148#endif
149149
150150#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm1 ))
151+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
151152 CLOCK_SetClkDiv (kCLOCK_DivFlexcom1Clk , 1u );
152- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM1 );
153+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM1 );
153154#endif
154155
155156#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm2 ))
157+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
156158 CLOCK_SetClkDiv (kCLOCK_DivFlexcom2Clk , 1u );
157- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM2 );
159+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM2 );
158160#endif
159161
160162#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm4 ))
163+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
161164 CLOCK_SetClkDiv (kCLOCK_DivFlexcom4Clk , 1u );
162- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM4 );
165+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM4 );
163166#endif
164167
165168#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (flexcomm7 ))
169+ /* Configure input clock to be able to reach the datasheet specified SPI band rate. */
166170 CLOCK_SetClkDiv (kCLOCK_DivFlexcom7Clk , 1u );
167- CLOCK_AttachClk (kFRO12M_to_FLEXCOMM7 );
171+ CLOCK_AttachClk (kFRO_HF_DIV_to_FLEXCOMM7 );
168172#endif
169173
170174#if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (os_timer ))
Original file line number Diff line number Diff line change @@ -209,8 +209,9 @@ __weak void clock_init(void)
209209#endif
210210
211211#ifdef CONFIG_SPI_MCUX_LPSPI
212- CLOCK_SetMux (kCLOCK_LpspiMux , 1 ); /* Set SPI source to USB1 PFD0 720M */
213- CLOCK_SetDiv (kCLOCK_LpspiDiv , 7 ); /* Set SPI divider to 8 */
212+ /* Configure input clock to be able to reach the datasheet specified band rate. */
213+ CLOCK_SetMux (kCLOCK_LpspiMux , 1 ); /* Set SPI source to USB1 PFD0 */
214+ CLOCK_SetDiv (kCLOCK_LpspiDiv , 0 ); /* Set SPI divider to 1 */
214215#endif
215216
216217#ifdef CONFIG_DISPLAY_MCUX_ELCDIF
Original file line number Diff line number Diff line change @@ -463,8 +463,8 @@ __weak void clock_init(void)
463463#endif
464464
465465#ifdef CONFIG_SPI_MCUX_LPSPI
466- /* Configure lpspi using Osc48MDiv2 */
467- rootCfg .mux = kCLOCK_LPSPI1_ClockRoot_MuxOscRc48MDiv2 ;
466+ /* Configure input clock to be able to reach the datasheet specified band rate. */
467+ rootCfg .mux = kCLOCK_LPSPI1_ClockRoot_MuxOscRc400M ;
468468 rootCfg .div = 1 ;
469469 CLOCK_SetRootClock (kCLOCK_Root_Lpspi1 , & rootCfg );
470470#endif
You can’t perform that action at this time.
0 commit comments