From 644f9ecbf05dd23bae0429b19c68a8d590ae1843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Thu, 16 Apr 2020 17:08:50 -0700 Subject: [PATCH] dts: nordic: introduce wdt0 / wdt1 distinction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add wdt0 node labels for all watchdogs. Keep the existing wdt node labels in place for backwards compatibility. Add a wdt1 node to the nRF5340 application core .dtsi, but leave it disabled. Leave the wdt node's label set to "WDT" on this core for backwards compatibility also, in case any users are getting it with a string literal instead of asking the devicetree. This can be changed later after this round of watchdog changes has been shaken out and tested more. Signed-off-by: Martí Bolívar --- dts/arm/nordic/nrf51822.dtsi | 2 +- dts/arm/nordic/nrf52810.dtsi | 2 +- dts/arm/nordic/nrf52811.dtsi | 2 +- dts/arm/nordic/nrf52832.dtsi | 2 +- dts/arm/nordic/nrf52833.dtsi | 2 +- dts/arm/nordic/nrf52840.dtsi | 2 +- dts/arm/nordic/nrf5340_cpuapp_common.dtsi | 10 +++++++++- dts/arm/nordic/nrf5340_cpunet.dtsi | 2 +- dts/arm/nordic/nrf9160_common.dtsi | 2 +- soc/arm/nordic_nrf/validate_base_addresses.c | 4 +++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/dts/arm/nordic/nrf51822.dtsi b/dts/arm/nordic/nrf51822.dtsi index cf9d7962671..1e072e1dbad 100644 --- a/dts/arm/nordic/nrf51822.dtsi +++ b/dts/arm/nordic/nrf51822.dtsi @@ -222,7 +222,7 @@ label = "TEMP_0"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf52810.dtsi b/dts/arm/nordic/nrf52810.dtsi index 44609e8af6c..e61342a62c4 100644 --- a/dts/arm/nordic/nrf52810.dtsi +++ b/dts/arm/nordic/nrf52810.dtsi @@ -217,7 +217,7 @@ label = "TEMP_0"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf52811.dtsi b/dts/arm/nordic/nrf52811.dtsi index d8f7692e11a..cf18003a945 100644 --- a/dts/arm/nordic/nrf52811.dtsi +++ b/dts/arm/nordic/nrf52811.dtsi @@ -241,7 +241,7 @@ label = "TEMP_0"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf52832.dtsi b/dts/arm/nordic/nrf52832.dtsi index 0e2fd6c56c7..4366c68ec7d 100644 --- a/dts/arm/nordic/nrf52832.dtsi +++ b/dts/arm/nordic/nrf52832.dtsi @@ -320,7 +320,7 @@ label = "TEMP_0"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf52833.dtsi b/dts/arm/nordic/nrf52833.dtsi index c8341c32753..2d0185dd757 100644 --- a/dts/arm/nordic/nrf52833.dtsi +++ b/dts/arm/nordic/nrf52833.dtsi @@ -381,7 +381,7 @@ label = "USBD"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf52840.dtsi b/dts/arm/nordic/nrf52840.dtsi index bd52a6a63c1..0036f10fb74 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -390,7 +390,7 @@ label = "USBD"; }; - wdt: watchdog@40010000 { + wdt: wdt0: watchdog@40010000 { compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; diff --git a/dts/arm/nordic/nrf5340_cpuapp_common.dtsi b/dts/arm/nordic/nrf5340_cpuapp_common.dtsi index 0c760226366..d722947919d 100644 --- a/dts/arm/nordic/nrf5340_cpuapp_common.dtsi +++ b/dts/arm/nordic/nrf5340_cpuapp_common.dtsi @@ -379,7 +379,7 @@ power: power@5000 { status = "okay"; }; -wdt: watchdog@18000 { +wdt: wdt0: watchdog@18000 { compatible = "nordic,nrf-watchdog"; reg = <0x18000 0x1000>; interrupts = <24 1>; @@ -387,6 +387,14 @@ wdt: watchdog@18000 { label = "WDT"; }; +wdt1: watchdog@19000 { + compatible = "nordic,nrf-watchdog"; + reg = <0x19000 0x1000>; + interrupts = <25 1>; + status = "disabled"; + label = "WDT_1"; +}; + timer0: timer@f000 { compatible = "nordic,nrf-timer"; status = "disabled"; diff --git a/dts/arm/nordic/nrf5340_cpunet.dtsi b/dts/arm/nordic/nrf5340_cpunet.dtsi index da2ffd0998b..648524bed31 100644 --- a/dts/arm/nordic/nrf5340_cpunet.dtsi +++ b/dts/arm/nordic/nrf5340_cpunet.dtsi @@ -253,7 +253,7 @@ status = "okay"; }; - wdt: watchdog@4100b000 { + wdt: wdt0: watchdog@4100b000 { compatible = "nordic,nrf-watchdog"; reg = <0x4100b000 0x1000>; interrupts = <11 1>; diff --git a/dts/arm/nordic/nrf9160_common.dtsi b/dts/arm/nordic/nrf9160_common.dtsi index e1ab47acefa..17ec556fa7f 100644 --- a/dts/arm/nordic/nrf9160_common.dtsi +++ b/dts/arm/nordic/nrf9160_common.dtsi @@ -344,7 +344,7 @@ power: power@5000 { status = "okay"; }; -wdt: watchdog@18000 { +wdt: wdt0: watchdog@18000 { compatible = "nordic,nrf-watchdog"; reg = <0x18000 0x1000>; interrupts = <24 1>; diff --git a/soc/arm/nordic_nrf/validate_base_addresses.c b/soc/arm/nordic_nrf/validate_base_addresses.c index 26bcf5455bb..ea7fd07f614 100644 --- a/soc/arm/nordic_nrf/validate_base_addresses.c +++ b/soc/arm/nordic_nrf/validate_base_addresses.c @@ -131,4 +131,6 @@ CHECK_DT_REG(uart3, NRF_UARTE3); CHECK_DT_REG(uicr, NRF_UICR); CHECK_DT_REG(usbd, NRF_USBD); CHECK_DT_REG(vmc, NRF_VMC); -CHECK_DT_REG(wdt, NRF_WDT0); +CHECK_DT_REG(wdt, NRF_WDT0); /* this should be the same node as wdt0 */ +CHECK_DT_REG(wdt0, NRF_WDT0); +CHECK_DT_REG(wdt1, NRF_WDT1);