drivers: pwm: rts5912: port pwm driver on Zephyr
Add PWM driver support for Realtek RTS5912 Signed-off-by: Titan Chen <titan.chen@realtek.com>
This commit is contained in:
parent
29197ac963
commit
31f5d2826d
9 changed files with 265 additions and 0 deletions
26
soc/realtek/ec/rts5912/reg/reg_pwm.h
Normal file
26
soc/realtek/ec/rts5912/reg/reg_pwm.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2025 Realtek, SIBG-SD7
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_SOC_REALTEK_RTS5912_REG_PWM_H
|
||||
#define ZEPHYR_SOC_REALTEK_RTS5912_REG_PWM_H
|
||||
|
||||
/*
|
||||
* @brief PWM Controller (PWM)
|
||||
*/
|
||||
|
||||
struct pwm_regs {
|
||||
uint32_t duty;
|
||||
uint32_t div;
|
||||
uint32_t ctrl;
|
||||
};
|
||||
|
||||
/* CTRL */
|
||||
#define PWM_CTRL_CLKSRC BIT(28)
|
||||
#define PWM_CTRL_INVT BIT(29)
|
||||
#define PWM_CTRL_RST BIT(30)
|
||||
#define PWM_CTRL_EN BIT(31)
|
||||
|
||||
#endif /* ZEPHYR_SOC_REALTEK_RTS5912_REG_PWM_H */
|
Loading…
Add table
Add a link
Reference in a new issue