diff --git a/boards/arm/mimxrt595_evk/doc/index.rst b/boards/arm/mimxrt595_evk/doc/index.rst index 9586e8d757c..51506a78b29 100644 --- a/boards/arm/mimxrt595_evk/doc/index.rst +++ b/boards/arm/mimxrt595_evk/doc/index.rst @@ -83,6 +83,8 @@ features: +-----------+------------+-------------------------------------+ | CTIMER | on-chip | counter | +-----------+------------+-------------------------------------+ +| WDT | on-chip | watchdog | ++-----------+------------+-------------------------------------+ The default configuration can be found in the defconfig file: diff --git a/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts b/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts index 8a3ba488b31..5831b462f73 100644 --- a/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts +++ b/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts @@ -21,6 +21,7 @@ led1 = &blue_led; led2 = &red_led; usart-0 = &flexcomm0; + watchdog0 = &wwdt0; }; chosen { @@ -220,6 +221,10 @@ arduino_serial: &flexcomm12 { status = "okay"; }; +&wwdt0 { + status = "okay"; +}; + &flexspi { mx25um51345g: mx25um51345g@2 { compatible = "nxp,imx-flexspi-mx25um51345g"; diff --git a/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.yaml b/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.yaml index 38781582510..6bd71c8e87a 100644 --- a/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.yaml +++ b/boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.yaml @@ -23,3 +23,4 @@ supported: - gpio - i2c - spi + - watchdog diff --git a/drivers/watchdog/wdt_mcux_wwdt.c b/drivers/watchdog/wdt_mcux_wwdt.c index 754e4f36458..779732e9d84 100644 --- a/drivers/watchdog/wdt_mcux_wwdt.c +++ b/drivers/watchdog/wdt_mcux_wwdt.c @@ -80,7 +80,7 @@ static int mcux_wwdt_install_timeout(const struct device *dev, return -ENOMEM; } -#if defined(CONFIG_SOC_MIMXRT685S_CM33) +#if defined(CONFIG_SOC_MIMXRT685S_CM33) || defined(CONFIG_SOC_MIMXRT595S_CM33) clock_freq = CLOCK_GetWdtClkFreq(0); #else const struct mcux_wwdt_config *config = dev->config; diff --git a/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.mimxrt595_cm33 b/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.mimxrt595_cm33 index 5e11eef31cf..83fd8f0f4bc 100644 --- a/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.mimxrt595_cm33 +++ b/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.mimxrt595_cm33 @@ -40,6 +40,10 @@ config COUNTER_MCUX_CTIMER default y depends on COUNTER +config WDT_MCUX_WWDT + default y + depends on WATCHDOG + if MCUX_OS_TIMER config SYS_CLOCK_HW_CYCLES_PER_SEC diff --git a/tests/drivers/watchdog/wdt_basic_api/testcase.yaml b/tests/drivers/watchdog/wdt_basic_api/testcase.yaml index 59c93ddb5bb..9f948fd2297 100644 --- a/tests/drivers/watchdog/wdt_basic_api/testcase.yaml +++ b/tests/drivers/watchdog/wdt_basic_api/testcase.yaml @@ -4,7 +4,7 @@ common: tests: drivers.watchdog: filter: not (CONFIG_WDT_SAM or dt_compat_enabled("st,stm32-window-watchdog") or dt_compat_enabled("st,stm32-watchdog")) - platform_exclude: mec15xxevb_assy6853 mimxrt685_evk_cm33 + platform_exclude: mec15xxevb_assy6853 mimxrt685_evk_cm33 mimxrt595_evk_cm33 drivers.watchdog.stm32wwdg: filter: dt_compat_enabled("st,stm32-window-watchdog") or dt_compat_enabled("st,stm32-watchdog") extra_args: DTC_OVERLAY_FILE="boards/stm32_wwdg.overlay"