drivers: watchdog: esp32s2 add support

Add support of esp32s2 WDT1 & WDT2 using base esp32 driver

Use dts to determine WDT driver state

Signed-off-by: Pavlo Hamov <p.hamov@venstar.com>
This commit is contained in:
Pavlo Hamov 2021-10-06 15:30:52 +03:00 committed by Christopher Friedt
commit 39d6d0db4e
2 changed files with 22 additions and 2 deletions

View file

@ -3,9 +3,11 @@
# Copyright (C) 2017 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
DT_COMPAT_ESP32_WDT := espressif,esp32-watchdog
config WDT_ESP32
bool "ESP32 Watchdog (WDT) Driver"
depends on SOC_ESP32
default y
depends on SOC_ESP32 || SOC_ESP32S2
default $(dt_compat_enabled,$(DT_COMPAT_ESP32_WDT))
help
Enable WDT driver for ESP32.

View file

@ -177,6 +177,24 @@
clocks = <&rtc ESP32_HSPI_MODULE>;
status = "disabled";
};
wdt0: watchdog@3f41f048 {
compatible = "espressif,esp32-watchdog";
reg = <0x3f41f048 0x20>;
interrupts = <TG0_WDT_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "WDT_0";
status = "disabled";
};
wdt1: watchdog@3f42f048 {
compatible = "espressif,esp32-watchdog";
reg = <0x3f42f048 0x20>;
interrupts = <TG1_WDT_LEVEL_INTR_SOURCE>;
interrupt-parent = <&intc>;
label = "WDT_1";
status = "disabled";
};
};
};