driver: timer: Add timer driver initial version of RTS5912.
Add timer driver for Realtek RTS5912. Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
This commit is contained in:
parent
471cc3512d
commit
cfb2074a5e
8 changed files with 363 additions and 0 deletions
31
soc/realtek/ec/rts5912/reg/reg_rtmr.h
Normal file
31
soc/realtek/ec/rts5912/reg/reg_rtmr.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Realtek, SIBG-SD7
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_RTMR_H
|
||||
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_RTMR_H
|
||||
|
||||
/*
|
||||
* @brief RTOS Timer Controller (RTMR)
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t LDCNT;
|
||||
volatile uint32_t CNT;
|
||||
volatile uint32_t CTRL;
|
||||
volatile uint32_t INTSTS;
|
||||
} RTOSTMR_Type;
|
||||
/* CTRL */
|
||||
#define RTOSTMR_CTRL_EN_Pos (0UL)
|
||||
#define RTOSTMR_CTRL_EN_Msk BIT(RTOSTMR_CTRL_EN_Pos)
|
||||
#define RTOSTMR_CTRL_MDSEL_Pos (1UL)
|
||||
#define RTOSTMR_CTRL_MDSEL_Msk BIT(RTOSTMR_CTRL_MDSEL_Pos)
|
||||
#define RTOSTMR_CTRL_INTEN_Pos (2UL)
|
||||
#define RTOSTMR_CTRL_INTEN_Msk BIT(RTOSTMR_CTRL_INTEN_Pos)
|
||||
/* INTSTS */
|
||||
#define RTOSTMR_INTSTS_STS_Pos (0UL)
|
||||
#define RTOSTMR_INTSTS_STS_Msk BIT(RTOSTMR_INTSTS_STS_Pos)
|
||||
|
||||
#endif /* ZEPHYR_SOC_REALTEK_RTS5912_REG_RTMR_H */
|
Loading…
Add table
Add a link
Reference in a new issue