drivers: pwm: stm32: add stm32h7rs bus prescalers

The clock tree of the STM32H7RS series uses the ppre1
and ppre2 naming convention instead of apb1_prescaler
and apb2_prescaler for bus prescaler.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This commit is contained in:
Fabrice DJIATSA 2025-07-03 16:42:56 +02:00 committed by Daniel DeGrasse
parent 12fdde6694
commit 24af0c8ee1

View File

@ -247,6 +247,8 @@ static int get_tim_clk(const struct stm32_pclken *pclken, uint32_t *tim_clk)
if (pclken->bus == STM32_CLOCK_BUS_APB1) {
#if defined(CONFIG_SOC_SERIES_STM32MP1X)
apb_psc = (uint32_t)(READ_BIT(RCC->APB1DIVR, RCC_APB1DIVR_APB1DIV));
#elif defined(CONFIG_SOC_SERIES_STM32H7RSX)
apb_psc = STM32_PPRE1;
#else
apb_psc = STM32_APB1_PRESCALER;
#endif
@ -256,6 +258,8 @@ static int get_tim_clk(const struct stm32_pclken *pclken, uint32_t *tim_clk)
else {
#if defined(CONFIG_SOC_SERIES_STM32MP1X)
apb_psc = (uint32_t)(READ_BIT(RCC->APB2DIVR, RCC_APB2DIVR_APB2DIV));
#elif defined(CONFIG_SOC_SERIES_STM32H7RSX)
apb_psc = STM32_PPRE2;
#else
apb_psc = STM32_APB2_PRESCALER;
#endif