drivers: counter: rts5912: add support timer32 counter driver
Port rts5912 timer32 counter driver on Zephyr Signed-off-by: Titan Chen <titan.chen@realtek.com>
This commit is contained in:
parent
e219da1ff6
commit
2bca8d4e59
7 changed files with 514 additions and 0 deletions
34
soc/realtek/ec/rts5912/reg/reg_timer.h
Normal file
34
soc/realtek/ec/rts5912/reg/reg_timer.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2025 Realtek, SIBG-SD7
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_TMRER_H
|
||||
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_TMRER_H
|
||||
|
||||
/**
|
||||
* @brief 32-bit Timer Controller (TMR)
|
||||
*/
|
||||
|
||||
struct timer32_type {
|
||||
uint32_t ldcnt;
|
||||
uint32_t cnt;
|
||||
uint32_t ctrl;
|
||||
uint32_t intclr;
|
||||
uint32_t intsts;
|
||||
};
|
||||
|
||||
/* CTRL */
|
||||
#define TIMER32_CTRL_EN BIT(0)
|
||||
|
||||
#define TIMER32_CTRL_MDSELS_ONESHOT 0
|
||||
#define TIMER32_CTRL_MDSELS_PERIOD BIT(1)
|
||||
|
||||
#define TIMER32_CTRL_INTEN_DIS BIT(2)
|
||||
/* INTCLR */
|
||||
#define TIMER32_INTCLR_INTCLR BIT(0)
|
||||
/* INTSTS */
|
||||
#define TIMER32_INTSTS_STS (0UL)
|
||||
|
||||
#endif /* ZEPHYR_SOC_REALTEK_RTS5912_REG_TMRER_H */
|
Loading…
Add table
Add a link
Reference in a new issue