[Uboot-stm32] [PATCH 8/9] board: stm32mp1: update vddcore in SPL
Patrice CHOTARD
patrice.chotard at st.com
Mon May 11 15:54:47 CEST 2020
Hi Patrick
On 4/21/20 5:11 PM, Patrick Delaunay wrote:
> For board using STPMIC1, the vddcore is provided by BUCK1 of STMPIC1
> and need to be updated for 800MHz support and only after the clock
> tree initialization.
>
> The VDDCORE voltage value in provide by clock driver, saved in global
> variable opp_voltage_mv and udpated SPL in board_early_init_f().
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
> board/st/stm32mp1/spl.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c
> index e65ff288ea..616fb1d6f2 100644
> --- a/board/st/stm32mp1/spl.c
> +++ b/board/st/stm32mp1/spl.c
> @@ -12,6 +12,26 @@
> #include <power/pmic.h>
> #include <power/stpmic1.h>
> #include <asm/arch/ddr.h>
> +#include "../common/stpmic1.h"
> +
> +/* board early initialisation in board_f: need to use global variable */
> +#if defined(CONFIG_PMIC_STPMIC1) && defined(CONFIG_SPL_POWER_SUPPORT)
> +static u32 opp_voltage_mv __section(".data");
> +
> +void board_vddcore_init(u32 voltage_mv)
> +{
> + opp_voltage_mv = voltage_mv;
> +}
> +#endif
> +
> +int board_early_init_f(void)
> +{
> +#if defined(CONFIG_PMIC_STPMIC1) && defined(CONFIG_SPL_POWER_SUPPORT)
> + stmpic_buck1_set(opp_voltage_mv);
> +#endif
> +
> + return 0;
> +}
>
> void spl_board_init(void)
> {
Reviewed-by: Patrice Chotard <patrice.chotard at st.com>
Thanks
Patrice
More information about the U-Boot
mailing list