diff --git a/boards/arm/mimxrt685_evk/doc/index.rst b/boards/arm/mimxrt685_evk/doc/index.rst index 58acf72471c..14cab7fc1ca 100644 --- a/boards/arm/mimxrt685_evk/doc/index.rst +++ b/boards/arm/mimxrt685_evk/doc/index.rst @@ -85,6 +85,8 @@ features: +-----------+------------+-------------------------------------+ | HWINFO | on-chip | Unique device serial number | +-----------+------------+-------------------------------------+ +| RTC | on-chip | counter | ++-----------+------------+-------------------------------------+ The default configuration can be found in the defconfig file: diff --git a/boards/arm/mimxrt685_evk/mimxrt685_evk_cm33.dts b/boards/arm/mimxrt685_evk/mimxrt685_evk_cm33.dts index 2dc3c0dedbd..d16dcd81726 100644 --- a/boards/arm/mimxrt685_evk/mimxrt685_evk_cm33.dts +++ b/boards/arm/mimxrt685_evk/mimxrt685_evk_cm33.dts @@ -114,6 +114,10 @@ status = "okay"; }; +&rtc { + status = "okay"; +}; + &flexcomm0 { compatible = "nxp,lpc-usart"; status = "okay"; diff --git a/dts/arm/nxp/nxp_rt6xx_common.dtsi b/dts/arm/nxp/nxp_rt6xx_common.dtsi index 420c05529e1..06afd7ebb43 100644 --- a/dts/arm/nxp/nxp_rt6xx_common.dtsi +++ b/dts/arm/nxp/nxp_rt6xx_common.dtsi @@ -214,6 +214,14 @@ status = "disabled"; label = "OS_TIMER"; }; + + rtc: rtc@30000 { + compatible = "nxp,lpc-rtc"; + reg = <0x30000 0x1000>; + interrupts = <32 0>; + status = "disabled"; + label = "RTC_0"; + }; }; &nvic { diff --git a/modules/Kconfig.mcux b/modules/Kconfig.mcux index b5166be4163..5ef8137ac3d 100644 --- a/modules/Kconfig.mcux +++ b/modules/Kconfig.mcux @@ -148,6 +148,11 @@ config HAS_MCUX_RTC help Set if the real time clock (RTC) modules is present in the SoC. +config HAS_MCUX_LPC_RTC + bool + help + Set if the LPC real time clock (RTC) modules is present in the SoC. + config HAS_MCUX_SCG bool help diff --git a/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.mimxrt685_cm33 b/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.mimxrt685_cm33 index 290cea1b414..b657756e87a 100644 --- a/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.mimxrt685_cm33 +++ b/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.mimxrt685_cm33 @@ -54,4 +54,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC endif # CORTEX_M_SYSTICK +config COUNTER_MCUX_LPC_RTC + default y + depends on COUNTER + endif # SOC_MIMXRT685S_CM33 diff --git a/soc/arm/nxp_imx/rt6xx/Kconfig.soc b/soc/arm/nxp_imx/rt6xx/Kconfig.soc index a782ce1aafa..d077fbbeef5 100644 --- a/soc/arm/nxp_imx/rt6xx/Kconfig.soc +++ b/soc/arm/nxp_imx/rt6xx/Kconfig.soc @@ -22,6 +22,7 @@ config SOC_MIMXRT685S_CM33 select HAS_MCUX_CACHE select HAS_MCUX_LPC_DMA select HAS_MCUX_OS_TIMER + select HAS_MCUX_LPC_RTC select INIT_SYS_PLL endchoice