diff --git a/arch/arm/soc/nordic_nrf/nrf51/dts.fixup b/arch/arm/soc/nordic_nrf/nrf51/dts.fixup index 5de06876ff8..8a6df41d37b 100644 --- a/arch/arm/soc/nordic_nrf/nrf51/dts.fixup +++ b/arch/arm/soc/nordic_nrf/nrf51/dts.fixup @@ -19,4 +19,8 @@ #define CONFIG_I2C_1_IRQ_PRI NORDIC_NRF5_I2C_40004000_IRQ_0_PRIORITY #define CONFIG_I2C_1_IRQ NORDIC_NRF5_I2C_40004000_IRQ_0 +#define CONFIG_WDT_0_NAME NORDIC_NRF_WATCHDOG_40010000_LABEL +#define CONFIG_WDT_NRF_IRQ NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT +#define CONFIG_WDT_NRF_IRQ_PRI NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT_PRIORITY + /* End of SoC Level DTS fixup file */ diff --git a/arch/arm/soc/nordic_nrf/nrf52/dts.fixup b/arch/arm/soc/nordic_nrf/nrf52/dts.fixup index 8a594b604fc..aaece8337a3 100644 --- a/arch/arm/soc/nordic_nrf/nrf52/dts.fixup +++ b/arch/arm/soc/nordic_nrf/nrf52/dts.fixup @@ -28,4 +28,8 @@ #define CONFIG_USBD_NRF5_NUM_ISOOUT_EP NORDIC_NRF_USBD_0X40027000_NUM_ISOOUT_ENDPOINTS #define CONFIG_USBD_NRF5_NAME NORDIC_NRF_USBD_0X40027000_LABEL +#define CONFIG_WDT_0_NAME NORDIC_NRF_WATCHDOG_40010000_LABEL +#define CONFIG_WDT_NRF_IRQ NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT +#define CONFIG_WDT_NRF_IRQ_PRI NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT_PRIORITY + /* End of SoC Level DTS fixup file */ diff --git a/dts/Kconfig b/dts/Kconfig index 80127c43b43..8f5dd2e5807 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -74,3 +74,11 @@ config HAS_DTS_USB help This option specifies that the target platform supports device tree configuration for USB. + +config HAS_DTS_WDT + bool + default n + depends on HAS_DTS + help + This option specifies that the target platform supports device tree + configuration for WDT. diff --git a/dts/arm/nordic/nrf51822.dtsi b/dts/arm/nordic/nrf51822.dtsi index a9fcafc3b80..b0fc0a1bc54 100644 --- a/dts/arm/nordic/nrf51822.dtsi +++ b/dts/arm/nordic/nrf51822.dtsi @@ -67,6 +67,14 @@ status = "disabled"; label = "I2C_1"; }; + + wdt: watchdog@40010000 { + compatible = "nordic,nrf-watchdog"; + reg = <0x40010000 0x1000>; + interrupts = <16 1>; + interrupt-names = "wdt"; + label = "WDT"; + }; }; }; diff --git a/dts/arm/nordic/nrf52832.dtsi b/dts/arm/nordic/nrf52832.dtsi index bd4a70e0167..ba8a6777770 100644 --- a/dts/arm/nordic/nrf52832.dtsi +++ b/dts/arm/nordic/nrf52832.dtsi @@ -67,6 +67,14 @@ status = "disabled"; label = "I2C_1"; }; + + wdt: watchdog@40010000 { + compatible = "nordic,nrf-watchdog"; + reg = <0x40010000 0x1000>; + interrupts = <16 1>; + interrupt-names = "wdt"; + label = "WDT"; + }; }; }; diff --git a/dts/arm/nordic/nrf52840.dtsi b/dts/arm/nordic/nrf52840.dtsi index 7ba4e801bf6..7ed81ce0bb5 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -89,6 +89,14 @@ status = "disabled"; label = "USBD"; }; + + wdt: watchdog@40010000 { + compatible = "nordic,nrf-watchdog"; + reg = <0x40010000 0x1000>; + interrupts = <16 1>; + interrupt-names = "wdt"; + label = "WDT"; + }; }; }; diff --git a/dts/bindings/watchdog/nordic,nrf-watchdog.yaml b/dts/bindings/watchdog/nordic,nrf-watchdog.yaml new file mode 100644 index 00000000000..ebfabe9946b --- /dev/null +++ b/dts/bindings/watchdog/nordic,nrf-watchdog.yaml @@ -0,0 +1,43 @@ +# +# Copyright (c) 2018, Nordic Semiconductor ASA +# +# SPDX-License-Identifier: Apache-2.0 +# +--- +title: Nordic Semiconductor NRF watchdog driver +id: nordic,nrf-watchdog +version: 0.1 + +description: > + This is a representation of the NRF watchdog + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "nordic,nrf-watchdog" + + reg: + type: int + description: mmio register space + generation: define + category: required + + label: + type: string + category: required + description: Human readable string describing the device (used by Zephyr for API name) + generation: define + + interrupts: + type: array + category: required + description: required interrupts + generation: define + + interrupt-names: + type: stringlist + category: optional + description: readable string describing the interrupts + generation: define