Skip to content

Commit d9d01b1

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 8993aa7 commit d9d01b1

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
}
@@ -460,6 +466,10 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock,
460466
case STM32_CLOCK_BUS_AHB2:
461467
case STM32_CLOCK_BUS_AHB3:
462468
case STM32_CLOCK_BUS_AHB4:
469+
#if defined(CONFIG_SOC_SERIES_STM32H7RSX)
470+
/* HCLK5 i a possible source clock for some peripherals */
471+
case STM32_SRC_HCLK5:
472+
#endif /* CONFIG_SOC_SERIES_STM32H7RSX */
463473
*rate = ahb_clock;
464474
break;
465475
case STM32_CLOCK_BUS_APB1:
@@ -544,7 +554,7 @@ static int stm32_clock_control_get_subsys_rate(const struct device *clock,
544554
STM32_PLL_N_MULTIPLIER,
545555
STM32_PLL_S_DIVISOR);
546556
break;
547-
/* PLL 1 has no T-divider */
557+
/* PLL 1 has no T-divider */
548558
#endif /* CONFIG_SOC_SERIES_STM32H7RSX */
549559
#endif /* STM32_PLL_ENABLED */
550560
#if defined(STM32_PLL2_ENABLED)

0 commit comments

Comments
 (0)