diff --git a/drivers/watchdog/wdt_nrfx.c b/drivers/watchdog/wdt_nrfx.c index 063f2fa44cc..19c2f030a91 100644 --- a/drivers/watchdog/wdt_nrfx.c +++ b/drivers/watchdog/wdt_nrfx.c @@ -197,13 +197,14 @@ static int init_wdt(struct device *dev) return -EBUSY; } - IRQ_CONNECT(DT_WDT_NRF_IRQ, DT_WDT_NRF_IRQ_PRI, + IRQ_CONNECT(DT_NORDIC_NRF_WATCHDOG_WDT_0_IRQ, + DT_NORDIC_NRF_WATCHDOG_WDT_0_IRQ_PRIORITY, nrfx_isr, nrfx_wdt_irq_handler, 0); - irq_enable(DT_WDT_NRF_IRQ); + irq_enable(DT_NORDIC_NRF_WATCHDOG_WDT_0_IRQ); return 0; } -DEVICE_AND_API_INIT(wdt_nrf, CONFIG_WDT_0_NAME, init_wdt, +DEVICE_AND_API_INIT(wdt_nrf, DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL, init_wdt, NULL, NULL, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &wdt_nrf_api); diff --git a/dts/arm/nordic/nrf51822.dtsi b/dts/arm/nordic/nrf51822.dtsi index cb280d0ce57..ea1ca632b0e 100644 --- a/dts/arm/nordic/nrf51822.dtsi +++ b/dts/arm/nordic/nrf51822.dtsi @@ -45,6 +45,7 @@ adc-0 = &adc; gpio-0 = &gpio0; gpiote-0 = &gpiote; + wdt-0 = &wdt; }; soc { @@ -135,7 +136,6 @@ compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; - interrupt-names = "wdt"; label = "WDT"; }; }; diff --git a/dts/arm/nordic/nrf52810.dtsi b/dts/arm/nordic/nrf52810.dtsi index ab534e6c301..727db474f7b 100644 --- a/dts/arm/nordic/nrf52810.dtsi +++ b/dts/arm/nordic/nrf52810.dtsi @@ -42,6 +42,7 @@ adc-0 = &adc; gpio-0 = &gpio0; gpiote-0 = &gpiote; + wdt-0 = &wdt; }; soc { @@ -112,7 +113,6 @@ 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 a5d77ae6c56..5ddbbc71882 100644 --- a/dts/arm/nordic/nrf52832.dtsi +++ b/dts/arm/nordic/nrf52832.dtsi @@ -46,6 +46,7 @@ adc-0 = &adc; gpio-0 = &gpio0; gpiote-0 = &gpiote; + wdt-0 = &wdt; }; soc { @@ -148,7 +149,6 @@ 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 eb0f906739d..fbeadc9d5c0 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -49,6 +49,7 @@ gpio-0 = &gpio0; gpio-1 = &gpio1; gpiote-0 = &gpiote; + wdt-0 = &wdt; }; soc { @@ -193,7 +194,6 @@ compatible = "nordic,nrf-watchdog"; reg = <0x40010000 0x1000>; interrupts = <16 1>; - interrupt-names = "wdt"; label = "WDT"; }; diff --git a/soc/arm/nordic_nrf/nrf51/dts_fixup.h b/soc/arm/nordic_nrf/nrf51/dts_fixup.h index 2e5d78cd417..f5189acaea0 100644 --- a/soc/arm/nordic_nrf/nrf51/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf51/dts_fixup.h @@ -31,8 +31,6 @@ #define DT_SPI_0_NAME DT_NORDIC_NRF_SPI_SPI_0_LABEL #define DT_SPI_1_NAME DT_NORDIC_NRF_SPI_SPI_1_LABEL -#define CONFIG_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_40010000_LABEL -#define DT_WDT_NRF_IRQ DT_NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT -#define DT_WDT_NRF_IRQ_PRI DT_NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT_PRIORITY +#define DT_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL /* End of SoC Level DTS fixup file */ diff --git a/soc/arm/nordic_nrf/nrf52/dts_fixup.h b/soc/arm/nordic_nrf/nrf52/dts_fixup.h index f186382f8eb..423e91eb151 100644 --- a/soc/arm/nordic_nrf/nrf52/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf52/dts_fixup.h @@ -44,9 +44,7 @@ #define DT_USBD_NRF_NUM_ISOOUT_EP DT_NORDIC_NRF_USBD_40027000_NUM_ISOOUT_ENDPOINTS #define DT_USBD_NRF_NAME DT_NORDIC_NRF_USBD_40027000_LABEL -#define CONFIG_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_40010000_LABEL -#define DT_WDT_NRF_IRQ DT_NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT -#define DT_WDT_NRF_IRQ_PRI DT_NORDIC_NRF_WATCHDOG_40010000_IRQ_WDT_PRIORITY +#define DT_WDT_0_NAME DT_NORDIC_NRF_WATCHDOG_WDT_0_LABEL #if defined(DT_NORDIC_NRF_CC310_5002A000_BASE_ADDRESS) #define DT_CC310_CTL_BASE_ADDR DT_NORDIC_NRF_CC310_5002A000_BASE_ADDRESS