Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFBA7C43334 for ; Tue, 28 Jun 2022 20:02:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D137383AC7; Tue, 28 Jun 2022 22:02:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1656446545; bh=y9cO00t/S6c1qB03tyZVVDnHIhZ19IO5xu/Ga7WO3/E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KvCs9fyL8CxFheZV2xcSCGbTxSQmSNindAVF4fCPaoNT/qgpQUqQ8hlAeAWVGUxBv Qq5IWNpSYMMY8XW2qhsgN76YDvC5FAfxEOXEZFdHHbNF8VOZW769O7bAWyrfMKUyCN barJnMOTSdOb6BwWYAgmPb/jHQZ7O5rzRqN9QkCnKe8sx3peXSchbGCeYHAksWVJCg 1KtYhRGmQNbuEBx6SMMKByy9pPAivjuTbzaEs4ZAbz7oGEXY5z+qvbZOnbNsefmve5 nQFqVJ6rdDBdCfXrgDMHmuucTC06McTxoI7M/fuZwUMQPJ9ptgI76tDzy6kjmjlm38 G2N3AxNOcgb9g== Received: from mail.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: festevam@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id ECEBF83300; Tue, 28 Jun 2022 22:02:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1656446545; bh=y9cO00t/S6c1qB03tyZVVDnHIhZ19IO5xu/Ga7WO3/E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tq4uG0QbDGP+2/NlNCJLtZ4kbjf4e1ArLwCIMWn9p4rLyqJSsFfGpCRt6sHDAWamR Hwx7SdQHq+rqW2+LeidQ+EBHoCxXeNYaZ7GJB1tTK3cngd2tfVdZZzRDeBGNMWSe+N JpMkZyV85Bw/Nx5RC1O1lonsRI2YF9LnzTFUR/Oy0SWPyfTCZtBoZjGZ6/flxyUvOV XSPiq+BYCwt9alkaZgDuxS9VKNGS9CaI74iIAS0IUQi/JDIHAtatxDyIaA3b5EUztq jI4I+vgKl75yoeOLPqsLpiYWly3OrevKc84td0qJVdVsnFWbtg1pmY+V9AvXI80tM2 EcX53EONXgrKg== MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 28 Jun 2022 17:02:24 -0300 From: Fabio Estevam To: Heiko Thiery Cc: u-boot@lists.denx.de, Jaehoon Chung , Andre Przywara , Samuel Holland , Simon Glass , Kever Yang , Quentin Schulz , Lukasz Majewski , Stephan Gerhold , Marek Vasut , Frieder Schrempf Subject: Re: [PATCH 2/2] pmic: pca9450: clear PRESET_EN bit for BUCK1/2/3 voltage settings In-Reply-To: <20220628140621.254550-3-heiko.thiery@gmail.com> References: <20220628140621.254550-1-heiko.thiery@gmail.com> <20220628140621.254550-3-heiko.thiery@gmail.com> Message-ID: <9b4676a0952be0e6ae8b7364c20d9d48@denx.de> X-Sender: festevam@denx.de User-Agent: Roundcube Webmail/1.3.6 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 > Signed-off-by: Heiko Thiery > --- > 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