driver: clock: stm32: boost voltage when clock exceeds 150MHz
This patch activates the boost mode for the main regulator when the system frequency above 150MHz for stm32g4xx soc series. To save power, the boost mode should be disabled below 150MHz. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
0b4fbb916e
commit
5c0687e58b
|
@ -29,6 +29,11 @@ void config_pll_init(LL_UTILS_PLLInitTypeDef *pllinit)
|
||||||
pllinit->PLLM = pllm(CONFIG_CLOCK_STM32_PLL_M_DIVISOR);
|
pllinit->PLLM = pllm(CONFIG_CLOCK_STM32_PLL_M_DIVISOR);
|
||||||
pllinit->PLLN = CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER;
|
pllinit->PLLN = CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER;
|
||||||
pllinit->PLLR = pllr(CONFIG_CLOCK_STM32_PLL_R_DIVISOR);
|
pllinit->PLLR = pllr(CONFIG_CLOCK_STM32_PLL_R_DIVISOR);
|
||||||
|
|
||||||
|
/* set power boost mode for sys clock greater than 150MHz */
|
||||||
|
if (sys_clock_hw_cycles_per_sec() >= MHZ(150)) {
|
||||||
|
LL_PWR_EnableRange1BoostMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL */
|
#endif /* CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue