soc: arm: nxp_imx: r5xx: add Kconfig to clock FC0 from FRO
Flexcomm0 has option to clock from FRO. Signed-off-by: Derek Snell <derek.snell@nxp.com>
This commit is contained in:
parent
b2626faced
commit
3f2ded3455
|
@ -1,6 +1,6 @@
|
|||
# i.MX RT5XX Series
|
||||
|
||||
# Copyright (c) 2022, NXP
|
||||
# Copyright 2022-2023, NXP
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice
|
||||
|
@ -129,4 +129,16 @@ config IMXRT5XX_CODE_CACHE
|
|||
Enable code cache for FlexSPI region at boot. If this Kconfig is
|
||||
cleared, the CACHE64 controller will be disabled during SOC init
|
||||
|
||||
choice FLEXCOMM0_CLK_SRC
|
||||
prompt "Clock source for Flexcomm0"
|
||||
default FLEXCOMM0_CLK_SRC_FRG
|
||||
|
||||
config FLEXCOMM0_CLK_SRC_FRG
|
||||
bool "FRG is source of Flexcomm0 clock"
|
||||
|
||||
config FLEXCOMM0_CLK_SRC_FRO
|
||||
bool "FRO_DIV4 is source of Flexcomm0 clock"
|
||||
|
||||
endchoice
|
||||
|
||||
endif # SOC_SERIES_IMX_RT5XX
|
||||
|
|
|
@ -281,8 +281,12 @@ void __weak rt5xx_clock_init(void)
|
|||
/* Switch SYSTICK_CLK to MAIN_CLK_DIV */
|
||||
CLOCK_AttachClk(kMAIN_CLK_DIV_to_SYSTICK_CLK);
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm0), nxp_lpc_usart, okay)
|
||||
/* Switch FLEXCOMM0 to FRG */
|
||||
CLOCK_AttachClk(kFRG_to_FLEXCOMM0);
|
||||
#ifdef CONFIG_FLEXCOMM0_CLK_SRC_FRG
|
||||
/* Switch FLEXCOMM0 to FRG */
|
||||
CLOCK_AttachClk(kFRG_to_FLEXCOMM0);
|
||||
#elif defined(CONFIG_FLEXCOMM0_CLK_SRC_FRO)
|
||||
CLOCK_AttachClk(kFRO_DIV4_to_FLEXCOMM0);
|
||||
#endif
|
||||
#endif
|
||||
#if CONFIG_USB_DC_NXP_LPCIP3511
|
||||
usb_device_clock_init();
|
||||
|
|
Loading…
Reference in a new issue