drivers: wdog: add Realtek RTS5912 wdog driver

Port Realtek RTS5912 wdog driver to Zephyr.

Signed-off-by: Titan Chen <titan.chen@realtek.com>
This commit is contained in:
Titan Chen 2025-02-21 11:54:37 +08:00 committed by Benjamin Cabé
commit 865b8aa91d
7 changed files with 324 additions and 0 deletions

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2025 Realtek, SIBG-SD7
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_WDT_H
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_WDT_H
/**
* @brief WDT Controller (WDT)
*/
typedef struct {
volatile uint32_t CTRL;
const volatile uint32_t STS;
volatile uint32_t CNT;
volatile uint32_t DIV;
volatile uint32_t INTEN;
} WDT_Type;
/* CTRL */
#define WDT_CTRL_EN BIT(0)
#define WDT_CTRL_RSTEN BIT(1)
#define WDT_CTRL_RELOAD BIT(2)
#define WDT_CTRL_CLRRSTFLAG BIT(3)
/* STS */
#define WDT_STS_RSTFLAG BIT(0)
/* INTEN */
#define WDT_INTEN_WDTINTEN BIT(0)
#endif /* ZEPHYR_SOC_REALTEK_RTS5912_REG_WDT_H */