drivers: watchdog: Add STM32G4x Watchdog support

Add watchdog driver support for STM32G4X SoC series.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
This commit is contained in:
Erwan Gouriou 2019-09-06 11:31:28 +02:00 committed by Andrew Boie
commit e3c1683e8b
3 changed files with 33 additions and 0 deletions

View file

@ -167,6 +167,22 @@
label = "LPUART_1";
};
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>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000800>;
label = "WWDG";
interrupts = <0 7>;
status = "disabled";
};
i2c1: i2c@40005400 {
compatible = "st,stm32-i2c-v2";
clock-frequency = <I2C_BITRATE_STANDARD>;

View file

@ -251,4 +251,13 @@
#define DT_TIM_STM32_17_CLOCK_BITS DT_ST_STM32_TIMERS_40014800_CLOCK_BITS
#define DT_TIM_STM32_17_CLOCK_BUS DT_ST_STM32_TIMERS_40014800_CLOCK_BUS
#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
#define DT_WWDT_0_IRQ_PRI DT_INST_0_ST_STM32_WINDOW_WATCHDOG_IRQ_0_PRIORITY
#define DT_WWDT_0_CLOCK_BITS DT_INST_0_ST_STM32_WINDOW_WATCHDOG_CLOCK_BITS
#define DT_WWDT_0_CLOCK_BUS DT_INST_0_ST_STM32_WINDOW_WATCHDOG_CLOCK_BUS
/* End of SoC Level DTS fixup file */

View file

@ -60,6 +60,14 @@
#include <stm32g4xx_ll_adc.h>
#endif
#ifdef CONFIG_IWDG_STM32
#include <stm32g4xx_ll_iwdg.h>
#endif
#ifdef CONFIG_WWDG_STM32
#include <stm32l4xx_ll_wwdg.h>
#endif
#ifdef CONFIG_ENTROPY_STM32_RNG
#include <stm32g4xx_ll_rng.h>
#endif