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:
Titan Chen 2025-02-25 16:59:01 +08:00 committed by Benjamin Cabé
commit 31f5d2826d
9 changed files with 265 additions and 0 deletions

View 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 */