File tree Expand file tree Collapse file tree 3 files changed +31
-4
lines changed
boards/espressif/esp32c6_devkitc
dts/riscv/espressif/esp32c6 Expand file tree Collapse file tree 3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 2323
2424 aliases {
2525 sw0 = &user_button1;
26+ watchdog0 = &wdt0;
2627 };
2728
2829 gpio_keys {
4950 status = "okay";
5051};
5152
53+ &wdt0 {
54+ status = "okay";
55+ };
56+
5257&flash0 {
5358 status = "okay";
5459 partitions {
Original file line number Diff line number Diff line change 77#define DT_DRV_COMPAT espressif_esp32_watchdog
88
99/* Include esp-idf headers first to avoid redefining BIT() macro */
10+ #if defined(CONFIG_SOC_SERIES_ESP32C6 )
11+ #include <soc/lp_aon_reg.h>
12+ #else
1013#include <soc/rtc_cntl_reg.h>
14+ #endif
1115#include <soc/timer_group_reg.h>
1216#include <hal/mwdt_ll.h>
1317#include <hal/wdt_hal.h>
1418
1519#include <string.h>
1620#include <zephyr/drivers/watchdog.h>
1721#include <zephyr/drivers/clock_control.h>
18- #ifndef CONFIG_SOC_SERIES_ESP32C3
19- #include <zephyr/drivers/interrupt_controller/intc_esp32.h>
20- #else
22+ #if defined(CONFIG_SOC_SERIES_ESP32C3 ) || defined(CONFIG_SOC_SERIES_ESP32C6 )
2123#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
24+ #else
25+ #include <zephyr/drivers/interrupt_controller/intc_esp32.h>
2226#endif
2327#include <zephyr/device.h>
2428
2529#include <zephyr/logging/log.h>
2630LOG_MODULE_REGISTER (wdt_esp32 , CONFIG_WDT_LOG_LEVEL );
2731
28- #ifdef CONFIG_SOC_SERIES_ESP32C3
32+ #if defined( CONFIG_SOC_SERIES_ESP32C3 ) || defined( CONFIG_SOC_SERIES_ESP32C6 )
2933#define ISR_HANDLER isr_handler_t
3034#else
3135#define ISR_HANDLER intr_handler_t
Original file line number Diff line number Diff line change 7878 };
7979 };
8080
81+ wdt0: watchdog@6001f048 {
82+ compatible = "espressif,esp32-watchdog";
83+ reg = <0x6001f048 0x20>;
84+ interrupts = <TG0_WDT_LEVEL_INTR_SOURCE>;
85+ interrupt-parent = <&intc>;
86+ clocks = <&rtc ESP32_TIMG0_MODULE>;
87+ status = "disabled";
88+ };
89+
90+ wdt1: watchdog@60020048 {
91+ compatible = "espressif,esp32-watchdog";
92+ reg = <0x60020048 0x20>;
93+ interrupts = <TG1_WDT_LEVEL_INTR_SOURCE>;
94+ interrupt-parent = <&intc>;
95+ clocks = <&rtc ESP32_TIMG1_MODULE>;
96+ status = "disabled";
97+ };
98+
8199 flash: flash-controller@60002000 {
82100 compatible = "espressif,esp32-flash-controller";
83101 reg = <0x60002000 0x1000>;
You can’t perform that action at this time.
0 commit comments