soc: stm32g0: Add support for STM32 IWDG

The driver for STM32's independent watchdog already exists and is
compatible with the stm32g0 SoC. Enable the independent watchdog
for the stm32g0 series for use with this driver.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2020-03-04 23:39:28 +01:00 committed by Johan Hedberg
commit a44e9f496e
3 changed files with 13 additions and 0 deletions

View file

@ -105,6 +105,13 @@
};
};
iwdg: watchdog@40003000 {
compatible = "st,stm32-watchdog";
reg = <0x40003000 0x400>;
label = "IWDG";
status = "disabled";
};
wwdg: watchdog@40002c00 {
compatible = "st,stm32-window-watchdog";
reg = <0x40002C00 0x400>;

View file

@ -97,6 +97,8 @@
#define DT_UART_STM32_USART_2_CLOCK_BUS DT_ST_STM32_USART_40004400_CLOCK_BUS
#define DT_UART_STM32_USART_2_HW_FLOW_CONTROL DT_ST_STM32_USART_40004400_HW_FLOW_CONTROL
#define DT_WDT_0_NAME DT_INST_0_ST_STM32_WATCHDOG_LABEL
#define DT_WWDT_0_BASE_ADDRESS DT_INST_0_ST_STM32_WINDOW_WATCHDOG_BASE_ADDRESS
#define DT_WWDT_0_NAME DT_INST_0_ST_STM32_WINDOW_WATCHDOG_LABEL
#define DT_WWDT_0_IRQ DT_INST_0_ST_STM32_WINDOW_WATCHDOG_IRQ_0

View file

@ -44,6 +44,10 @@
#include <stm32g0xx_ll_i2c.h>
#endif
#ifdef CONFIG_IWDG_STM32
#include <stm32g0xx_ll_iwdg.h>
#endif
#ifdef CONFIG_WWDG_STM32
#include <stm32g0xx_ll_wwdg.h>
#endif