From: Patrice CHOTARD Date: Mon, 11 May 2020 13:54:47 +0000 Subject: [Uboot-stm32] [PATCH 8/9] board: stm32mp1: update vddcore in SPL In-Reply-To: <20200421171123.8.I6f11a8bc7a6681ab18c3bbbc1ac73cbdac030982@changeid> References: <20200421151128.18072-1-patrick.delaunay@st.com> <20200421171123.8.I6f11a8bc7a6681ab18c3bbbc1ac73cbdac030982@changeid> Message-ID: <478c1cd9-272a-92c6-b616-b8e437e855ec@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > > 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 > #include > #include > +#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 Thanks Patrice