drivers: counter: rts5912: add support slow timer counter driver
Port rts5912 slow timer counter driver on Zephyr Signed-off-by: Titan Chen <titan.chen@realtek.com>
This commit is contained in:
parent
8f2f97ce32
commit
5a94a1ca66
6 changed files with 388 additions and 1 deletions
31
soc/realtek/ec/rts5912/reg/reg_slwtmr.h
Normal file
31
soc/realtek/ec/rts5912/reg/reg_slwtmr.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2025 Realtek, SIBG-SD7
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_SLWTMR_H
|
||||
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_SLWTMR_H
|
||||
|
||||
/**
|
||||
* @brief SLOW Timer Controller (SLWTMR)
|
||||
*/
|
||||
|
||||
struct slwtmr_type {
|
||||
uint32_t ldcnt;
|
||||
uint32_t cnt;
|
||||
uint32_t ctrl;
|
||||
uint32_t insts;
|
||||
};
|
||||
|
||||
/* CTRL */
|
||||
#define SLWTMR_CTRL_EN BIT(0)
|
||||
|
||||
#define SLWTMR_CTRL_MDSELS_ONESHOT 0
|
||||
#define SLWTMR_CTRL_MDSELS_PERIOD BIT(1)
|
||||
|
||||
#define SLWTMR_CTRL_INTEN_EN BIT(2)
|
||||
/* INTSTS */
|
||||
#define SLWTMR_INTSTS_STS BIT(0)
|
||||
|
||||
#endif /* ZEPHYR_SOC_REALTEK_RTS5912_REG_SLWTMR_H */
|
Loading…
Add table
Add a link
Reference in a new issue