Skip to content

Commit c1a4044

Browse files
committed
drivers: clock control: stm32H7RS has a PLL2 & 3 or HCLK5 output
Add the definitions of the PLL2 and PLL3 outputs for the stm32H7RS mcus and the HCLk5 which is clock source for the XSPI instance. Signed-off-by: Francois Ramu <[email protected]>
1 parent cf85c61 commit c1a4044

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ int enabled_clock(uint32_t src_clk)
337337
((src_clk == STM32_SRC_PLL2_R) && IS_ENABLED(STM32_PLL2_R_ENABLED)) ||
338338
((src_clk == STM32_SRC_PLL3_P) && IS_ENABLED(STM32_PLL3_P_ENABLED)) ||
339339
((src_clk == STM32_SRC_PLL3_Q) && IS_ENABLED(STM32_PLL3_Q_ENABLED)) ||
340+
#if defined(CONFIG_SOC_SERIES_STM32H7RSX)
341+
(src_clk == STM32_SRC_HCLK5) ||
342+
((src_clk == STM32_SRC_PLL2_S) && IS_ENABLED(STM32_PLL2_S_ENABLED)) ||
343+
((src_clk == STM32_SRC_PLL2_T) && IS_ENABLED(STM32_PLL2_T_ENABLED)) ||
344+
((src_clk == STM32_SRC_PLL3_S) && IS_ENABLED(STM32_PLL3_S_ENABLED)) ||
345+
#endif
340346
((src_clk == STM32_SRC_PLL3_R) && IS_ENABLED(STM32_PLL3_R_ENABLED))) {
341347
return 0;
342348
}
@@ -455,6 +461,10 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock,
455461
case STM32_CLOCK_BUS_AHB2:
456462
case STM32_CLOCK_BUS_AHB3:
457463
case STM32_CLOCK_BUS_AHB4:
464+
#if defined(CONFIG_SOC_SERIES_STM32H7RSX)
465+
/* HCLK5 i a possible source clock for some peripherals */
466+
case STM32_SRC_HCLK5:
467+
#endif /* CONFIG_SOC_SERIES_STM32H7RSX */
458468
*rate = ahb_clock;
459469
break;
460470
case STM32_CLOCK_BUS_APB1:
@@ -539,7 +549,7 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock,
539549
STM32_PLL_N_MULTIPLIER,
540550
STM32_PLL_S_DIVISOR);
541551
break;
542-
/* PLL 1 has no T-divider */
552+
/* PLL 1 has no T-divider */
543553
#endif /* CONFIG_SOC_SERIES_STM32H7RSX */
544554
#endif /* STM32_PLL_ENABLED */
545555
#if defined(STM32_PLL2_ENABLED)

0 commit comments

Comments
 (0)