Skip to content

Commit 8fde2b7

Browse files
mmahadevan108kartben
authored andcommitted
soc: nxp_rw6xx: Add support for XTAL32K clock
This clock is used for certain peripherals such as RTC. On certain RW612 boards such as rd_rw612_bga, XTAL32K and ENET share pins. Add code to check if ENET and XTAL32 are enabled at the same time. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 296716c commit 8fde2b7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

soc/nxp/rw/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@ endif # NXP_RW6XX_BOOT_HEADER
5555
rsource "../common/Kconfig.flexspi_xip"
5656
rsource "../common/Kconfig.nbu"
5757

58+
config XTAL32K
59+
bool "Use the External 32K clock"
60+
help
61+
This clock is used by certain peripherals such as RTC.
62+
5863
endif # SOC_SERIES_RW6XX

soc/nxp/rw/soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ __weak __ramfunc void clock_init(void)
201201
#if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm14), nxp_lpc_i2c, okay)) && CONFIG_I2C
202202
CLOCK_AttachClk(kSFRO_to_FLEXCOMM14);
203203
#endif
204+
#if CONFIG_XTAL32K
205+
CLOCK_EnableXtal32K(true);
206+
CLOCK_AttachClk(kXTAL32K_to_CLK32K);
207+
#endif
204208

205209
/* Clock flexcomms when used as SPI */
206210
#ifdef CONFIG_SPI

0 commit comments

Comments
 (0)