diff --git a/boards/arm/efm32pg_stk3402a/doc/index.rst b/boards/arm/efm32pg_stk3402a/doc/index.rst index af37adeca26..18c00c61cec 100644 --- a/boards/arm/efm32pg_stk3402a/doc/index.rst +++ b/boards/arm/efm32pg_stk3402a/doc/index.rst @@ -59,6 +59,8 @@ The efm32pg_stk3402a board configuration supports the following hardware feature +-----------+------------+-------------------------------------+ | I2C | on-chip | i2c port-polling | +-----------+------------+-------------------------------------+ +| WATCHDOG | on-chip | watchdog | ++-----------+------------+-------------------------------------+ The default configuration can be found in the defconfig file: diff --git a/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a.yaml b/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a.yaml index a66ae5f0061..476b6e08893 100644 --- a/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a.yaml +++ b/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a.yaml @@ -12,6 +12,7 @@ supported: - i2c - gpio - nvs + - watchdog testing: ignore_tags: - net diff --git a/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a_common.dtsi b/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a_common.dtsi index f5b1a75b78d..68a9c35f97c 100644 --- a/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a_common.dtsi +++ b/boards/arm/efm32pg_stk3402a/efm32pg_stk3402a_common.dtsi @@ -13,6 +13,8 @@ zephyr,shell-uart = &usart0; zephyr,sram = &sram0; zephyr,flash = &flash0; + watchdog0 = &wdog0; + watchdog1 = &wdog1; }; /* These aliases are provided for compatibility with samples */ @@ -84,6 +86,15 @@ status = "okay"; }; +&wdog0 { + status = "okay"; +}; + +&wdog1 { + status = "okay"; +}; + + &flash0 { /* * For more information, see: diff --git a/dts/arm/silabs/efm32_jg_pg_12b.dtsi b/dts/arm/silabs/efm32_jg_pg_12b.dtsi index f9e51e98ce2..03bbd6338aa 100644 --- a/dts/arm/silabs/efm32_jg_pg_12b.dtsi +++ b/dts/arm/silabs/efm32_jg_pg_12b.dtsi @@ -202,6 +202,22 @@ gpio-controller; #gpio-cells = <2>; }; + + wdog0: wdog@40052000 { + compatible = "silabs,gecko-wdog"; + reg = <0x40052000 0x2C>; + label = "WDOG0"; + interrupts = <2 0>; + status = "disabled"; + }; + + wdog1: wdog@40052400 { + compatible = "silabs,gecko-wdog"; + reg = <0x40052400 0x2C>; + label = "WDOG1"; + interrupts = <3 0>; + status = "disabled"; + }; }; }; }; diff --git a/dts/bindings/watchdog/silabs,gecko-wdog.yaml b/dts/bindings/watchdog/silabs,gecko-wdog.yaml new file mode 100644 index 00000000000..19eefece597 --- /dev/null +++ b/dts/bindings/watchdog/silabs,gecko-wdog.yaml @@ -0,0 +1,19 @@ +# Copyright (c) 2019 Interay Solutions B.V. +# Copyright (c) Oane Kingma +# SPDX-License-Identifier: Apache-2.0 + +description: Silicon Labs Gecko Family Watchdog driver + +compatible: "silabs,gecko-wdog" + +include: base.yaml + +properties: + reg: + required: true + + label: + required: true + + interrupts: + required: true diff --git a/soc/arm/silabs_exx32/efm32gg11b/dts_fixup.h b/soc/arm/silabs_exx32/efm32gg11b/dts_fixup.h index 18922dc824b..f717f8cf303 100644 --- a/soc/arm/silabs_exx32/efm32gg11b/dts_fixup.h +++ b/soc/arm/silabs_exx32/efm32gg11b/dts_fixup.h @@ -31,4 +31,7 @@ #define DT_RTC_0_NAME DT_INST_0_SILABS_GECKO_RTCC_LABEL +#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL +#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL + /* End of SoC Level DTS fixup file */ diff --git a/soc/arm/silabs_exx32/efm32jg12b/dts_fixup.h b/soc/arm/silabs_exx32/efm32jg12b/dts_fixup.h index b1a483c6fa5..9f371934619 100644 --- a/soc/arm/silabs_exx32/efm32jg12b/dts_fixup.h +++ b/soc/arm/silabs_exx32/efm32jg12b/dts_fixup.h @@ -29,5 +29,7 @@ #define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL #define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL +#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL +#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL /* End of SoC Level DTS fixup file */ diff --git a/soc/arm/silabs_exx32/efm32pg12b/dts_fixup.h b/soc/arm/silabs_exx32/efm32pg12b/dts_fixup.h index 64b5703941d..8873b8e1a31 100644 --- a/soc/arm/silabs_exx32/efm32pg12b/dts_fixup.h +++ b/soc/arm/silabs_exx32/efm32pg12b/dts_fixup.h @@ -29,4 +29,7 @@ #define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1C0_LABEL #define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFM32_GPIO_PORT_4000A1F0_LABEL +#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL +#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL + /* End of SoC Level DTS fixup file */ diff --git a/soc/arm/silabs_exx32/efr32fg1p/dts_fixup.h b/soc/arm/silabs_exx32/efr32fg1p/dts_fixup.h index 553808e2a96..c479b51f6bc 100644 --- a/soc/arm/silabs_exx32/efr32fg1p/dts_fixup.h +++ b/soc/arm/silabs_exx32/efr32fg1p/dts_fixup.h @@ -28,4 +28,6 @@ #define DT_GPIO_GECKO_PORTE_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0C0_LABEL #define DT_GPIO_GECKO_PORTF_NAME DT_SILABS_EFR32XG1_GPIO_PORT_4000A0F0_LABEL +#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL + /* End of SoC Level DTS fixup file */ diff --git a/soc/arm/silabs_exx32/efr32mg12p/dts_fixup.h b/soc/arm/silabs_exx32/efr32mg12p/dts_fixup.h index 235521996f4..9969f6c7521 100644 --- a/soc/arm/silabs_exx32/efr32mg12p/dts_fixup.h +++ b/soc/arm/silabs_exx32/efr32mg12p/dts_fixup.h @@ -30,4 +30,7 @@ #define DT_GPIO_GECKO_PORTJ_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1B0_LABEL #define DT_GPIO_GECKO_PORTK_NAME DT_SILABS_EFR32MG_GPIO_PORT_4000A1E0_LABEL +#define DT_WDT_0_NAME DT_INST_0_SILABS_GECKO_WDOG_LABEL +#define DT_WDT_1_NAME DT_INST_1_SILABS_GECKO_WDOG_LABEL + /* End of SoC Level DTS fixup file */