public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@denx.de>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: u-boot@lists.denx.de, Jaehoon Chung <jh80.chung@samsung.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Samuel Holland <samuel@sholland.org>,
	Simon Glass <sjg@chromium.org>,
	Kever Yang <kever.yang@rock-chips.com>,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>,
	Lukasz Majewski <lukma@denx.de>,
	Stephan Gerhold <stephan@gerhold.net>,
	Marek Vasut <marex@denx.de>,
	Frieder Schrempf <frieder.schrempf@kontron.de>
Subject: Re: [PATCH 2/2] pmic: pca9450: clear PRESET_EN bit for BUCK1/2/3 voltage settings
Date: Tue, 28 Jun 2022 17:02:24 -0300	[thread overview]
Message-ID: <9b4676a0952be0e6ae8b7364c20d9d48@denx.de> (raw)
In-Reply-To: <20220628140621.254550-3-heiko.thiery@gmail.com>

On 28/06/2022 11:06, Heiko Thiery wrote:
> The regulator driver uses the DVS registers PCA9450_REG_BUCKxOUT_DVS0 
> to
> set the voltage for the buck regulators 1, 2 and 3. This has no effect 
> as the
> PRESET_EN bit is set by default and therefore the preset values are 
> used
> instead, which are set to 850 mV.
> 
> This is a port of the same change in the Linux kernel:
> 98b94b6e38ca0 ("regulator: pca9450: Clear PRESET_EN bit to fix
> BUCK1/2/3 voltage setting")
> 
> Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
>  drivers/power/pmic/pca9450.c | 6 ++++++
>  include/power/pca9450.h      | 3 +++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/power/pmic/pca9450.c 
> b/drivers/power/pmic/pca9450.c
> index fecab0496f..1c59362ab4 100644
> --- a/drivers/power/pmic/pca9450.c
> +++ b/drivers/power/pmic/pca9450.c
> @@ -94,6 +94,12 @@ static int pca9450_probe(struct udevice *dev)
> 
>  	priv->regmap = syscon_node_to_regmap(dev_ofnode(dev));
> 
> +	/* Clear PRESET_EN bit in BUCK123_DVS to use DVS registers */
> +	if (CONFIG_IS_ENABLED(DM_REGULATOR_PCA9450)) {
> +		ret = regmap_update_bits(priv->regmap, PCA9450_BUCK123_DVS,
> +					 BUCK123_PRESET_EN, 0);
> +	}

Nit: the braces could be dropped.

Reviewed-by: Fabio Estevam <festevam@denx.de>

  reply	other threads:[~2022-06-28 20:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 14:06 [PATCH 0/2] pmic: pca9450: Initialization of pmic like done in linux Heiko Thiery
2022-06-28 14:06 ` [PATCH 1/2] pmic: pca9450: enable system reset on WDOG_B assertion Heiko Thiery
2022-06-28 19:59   ` Fabio Estevam
2022-06-29  6:34   ` Frieder Schrempf
2022-06-28 14:06 ` [PATCH 2/2] pmic: pca9450: clear PRESET_EN bit for BUCK1/2/3 voltage settings Heiko Thiery
2022-06-28 20:02   ` Fabio Estevam [this message]
2022-06-28 20:11     ` Marek Vasut
2022-06-29  6:36   ` Frieder Schrempf

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=9b4676a0952be0e6ae8b7364c20d9d48@denx.de \
    --to=festevam@denx.de \
    --cc=andre.przywara@arm.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=heiko.thiery@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=kever.yang@rock-chips.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=samuel@sholland.org \
    --cc=sjg@chromium.org \
    --cc=stephan@gerhold.net \
    --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