From f38b01c7ac82e4cf889a78456f39086092b7f76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Arg=C3=BCelles?= Date: Sun, 21 Jan 2024 14:33:54 +0700 Subject: [PATCH] soc: arm: nxp_s32: s32k1: enable watchdog driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable on-chip watchdog driver support for S32K1 devices. Signed-off-by: Manuel Argüelles --- dts/arm/nxp/nxp_s32k1xx.dtsi | 15 ++++++++++++++- soc/arm/nxp_s32/s32k1/Kconfig.series | 3 ++- soc/arm/nxp_s32/s32k1/soc.c | 2 -- west.yml | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dts/arm/nxp/nxp_s32k1xx.dtsi b/dts/arm/nxp/nxp_s32k1xx.dtsi index a8c07d14028..10c3d207bf7 100644 --- a/dts/arm/nxp/nxp_s32k1xx.dtsi +++ b/dts/arm/nxp/nxp_s32k1xx.dtsi @@ -1,5 +1,5 @@ /* - * Copyright 2023 NXP + * Copyright 2023-2024 NXP * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,10 @@ #include / { + aliases { + watchdog0 = &wdog; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -124,6 +128,15 @@ clocks = <&clock NXP_S32_PORTE_CLK>; }; + wdog: watchdog@40052000 { + compatible = "nxp,kinetis-wdog32"; + reg = <0x40052000 0x1000>; + interrupts = <22 0>; + clocks = <&clock NXP_S32_LPO_128K_CLK>; + clk-source = <1>; + clk-divider = <256>; + }; + clock: clock-controller@40064000 { compatible = "nxp,s32-clock"; reg = <0x40064000 0x1000>, <0x40065000 0x1000>; diff --git a/soc/arm/nxp_s32/s32k1/Kconfig.series b/soc/arm/nxp_s32/s32k1/Kconfig.series index 12d74205412..07fe41bda9e 100644 --- a/soc/arm/nxp_s32/s32k1/Kconfig.series +++ b/soc/arm/nxp_s32/s32k1/Kconfig.series @@ -1,6 +1,6 @@ # NXP S32K1XX MCU series -# Copyright 2023 NXP +# Copyright 2023-2024 NXP # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_S32K1XX @@ -18,5 +18,6 @@ config SOC_SERIES_S32K1XX select HAS_MCUX_LPSPI select HAS_MCUX_FTM select HAS_MCUX_FLEXCAN + select HAS_MCUX_WDOG32 help Enable support for NXP S32K1XX MCU series. diff --git a/soc/arm/nxp_s32/s32k1/soc.c b/soc/arm/nxp_s32/s32k1/soc.c index 50cff147846..bed85dbc91d 100644 --- a/soc/arm/nxp_s32/s32k1/soc.c +++ b/soc/arm/nxp_s32/s32k1/soc.c @@ -20,8 +20,6 @@ #endif #if defined(CONFIG_WDOG_INIT) -#define WDOG_UPDATE_KEY 0xD928C520U - void z_arm_watchdog_init(void) { /* diff --git a/west.yml b/west.yml index 904d857d6e0..79af241f523 100644 --- a/west.yml +++ b/west.yml @@ -193,7 +193,7 @@ manifest: groups: - hal - name: hal_nxp - revision: d6d43cab73f1a0fc73ec26084dab3f54c6324d2e + revision: 3d4be32141dd8605515d95f8d1a2340974190cff path: modules/hal/nxp groups: - hal