From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Quentin Schulz <foss+uboot@0leil.net>
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu,
kever.yang@rock-chips.com, alpernebiyasak@gmail.com,
email2tema@gmail.com, u-boot@lists.denx.de,
Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: Re: [SPAM] [RFC PATCH 1/2] spl: enable regulator-boot-on and disable regulator-force-boot-off
Date: Mon, 18 Jul 2022 22:12:31 +0200 [thread overview]
Message-ID: <20220718201230.GG1686@begut> (raw)
In-Reply-To: <20220715151426.953412-1-foss+uboot@0leil.net>
El Fri, Jul 15, 2022 at 05:14:25PM +0200, Quentin Schulz deia:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> This makes sure regulators that need to be turned on or off at boot are
> turned on or off in the SPL.
>
> This may be required for the SPL to do some operations, such as finding
> possible loading media for U-Boot proper.
>
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>
Tested on a Rock-Pi-4B and didn't see any regression.
Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
> - RFC because only tested on Puma Haikou RK3399
>
> common/spl/spl.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index c8c463f80b..762e9918c7 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -37,6 +37,9 @@
> #include <fdt_support.h>
> #include <bootcount.h>
> #include <wdt.h>
> +#if CONFIG_IS_ENABLED(DM_REGULATOR)
> +#include <power/regulator.h>
> +#endif
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -766,6 +769,15 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
> if (CONFIG_IS_ENABLED(GPIO_HOG))
> gpio_hog_probe_all();
>
> + if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
> + if (regulators_enable_boot_on(false))
> + debug("%s: Cannot enable boot on regulator\n",
> + __func__);
> + if (regulators_enable_boot_off(false))
> + debug("%s: Cannot enable boot off regulator\n",
> + __func__);
> + }
> +
> #if CONFIG_IS_ENABLED(BOARD_INIT)
> spl_board_init();
> #endif
> --
> 2.36.1
>
prev parent reply other threads:[~2022-07-18 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 15:14 [RFC PATCH 1/2] spl: enable regulator-boot-on and disable regulator-force-boot-off Quentin Schulz
2022-07-15 15:14 ` [RFC PATCH 2/2] rockchip: rk3399: remove duplicate call to regulators_enable_boot_on Quentin Schulz
2022-07-18 20:13 ` [SPAM] " Xavier Drudis Ferran
2022-07-18 8:34 ` [SPAM] [RFC PATCH 1/2] spl: enable regulator-boot-on and disable regulator-force-boot-off Xavier Drudis Ferran
2022-07-18 8:42 ` Xavier Drudis Ferran
2022-07-18 20:12 ` Xavier Drudis Ferran [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718201230.GG1686@begut \
--to=xdrudis@tinet.cat \
--cc=alpernebiyasak@gmail.com \
--cc=email2tema@gmail.com \
--cc=foss+uboot@0leil.net \
--cc=kever.yang@rock-chips.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@theobroma-systems.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox