Skip to content

Commit 33f50ee

Browse files
tpamborfabiobaltieri
authored andcommitted
drivers: clock_control: stm32: enable fractional divider for PLL2/3
Configure the fractional divider (FRACN) for PLL2 and PLL3 on STM32H5 series when specified in the device tree. Signed-off-by: Tim Pambor <[email protected]>
1 parent e4f518b commit 33f50ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/clock_control/clock_stm32_ll_h5.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,10 @@ static int set_up_plls(void)
612612
LL_RCC_PLL2_SetN(STM32_PLL2_N_MULTIPLIER);
613613

614614
LL_RCC_PLL2FRACN_Disable();
615+
if (IS_ENABLED(STM32_PLL2_FRACN_ENABLED)) {
616+
LL_RCC_PLL2_SetFRACN(STM32_PLL2_FRACN_VALUE);
617+
LL_RCC_PLL2FRACN_Enable();
618+
}
615619

616620
if (IS_ENABLED(STM32_PLL2_P_ENABLED)) {
617621
LL_RCC_PLL2_SetP(STM32_PLL2_P_DIVISOR);
@@ -671,6 +675,10 @@ static int set_up_plls(void)
671675
LL_RCC_PLL3_SetN(STM32_PLL3_N_MULTIPLIER);
672676

673677
LL_RCC_PLL3FRACN_Disable();
678+
if (IS_ENABLED(STM32_PLL3_FRACN_ENABLED)) {
679+
LL_RCC_PLL3_SetFRACN(STM32_PLL3_FRACN_VALUE);
680+
LL_RCC_PLL3FRACN_Enable();
681+
}
674682

675683
if (IS_ENABLED(STM32_PLL3_P_ENABLED)) {
676684
LL_RCC_PLL3_SetP(STM32_PLL3_P_DIVISOR);

0 commit comments

Comments
 (0)