File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
# i.MX RT5XX Series
2
2
3
- # Copyright (c) 2022, NXP
3
+ # Copyright 2022-2023 , NXP
4
4
# SPDX-License-Identifier: Apache-2.0
5
5
6
6
choice
@@ -129,4 +129,16 @@ config IMXRT5XX_CODE_CACHE
129
129
Enable code cache for FlexSPI region at boot. If this Kconfig is
130
130
cleared, the CACHE64 controller will be disabled during SOC init
131
131
132
+ choice FLEXCOMM0_CLK_SRC
133
+ prompt "Clock source for Flexcomm0"
134
+ default FLEXCOMM0_CLK_SRC_FRG
135
+
136
+ config FLEXCOMM0_CLK_SRC_FRG
137
+ bool "FRG is source of Flexcomm0 clock"
138
+
139
+ config FLEXCOMM0_CLK_SRC_FRO
140
+ bool "FRO_DIV4 is source of Flexcomm0 clock"
141
+
142
+ endchoice
143
+
132
144
endif # SOC_SERIES_IMX_RT5XX
Original file line number Diff line number Diff line change @@ -281,8 +281,12 @@ void __weak rt5xx_clock_init(void)
281
281
/* Switch SYSTICK_CLK to MAIN_CLK_DIV */
282
282
CLOCK_AttachClk (kMAIN_CLK_DIV_to_SYSTICK_CLK );
283
283
#if DT_NODE_HAS_COMPAT_STATUS (DT_NODELABEL (flexcomm0 ), nxp_lpc_usart , okay )
284
- /* Switch FLEXCOMM0 to FRG */
285
- CLOCK_AttachClk (kFRG_to_FLEXCOMM0 );
284
+ #ifdef CONFIG_FLEXCOMM0_CLK_SRC_FRG
285
+ /* Switch FLEXCOMM0 to FRG */
286
+ CLOCK_AttachClk (kFRG_to_FLEXCOMM0 );
287
+ #elif defined(CONFIG_FLEXCOMM0_CLK_SRC_FRO )
288
+ CLOCK_AttachClk (kFRO_DIV4_to_FLEXCOMM0 );
289
+ #endif
286
290
#endif
287
291
#if CONFIG_USB_DC_NXP_LPCIP3511
288
292
usb_device_clock_init ();
You can’t perform that action at this time.
0 commit comments