public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Trimarchi <michael@amarulasolutions.com>
To: Peng Fan <peng.fan@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>
Cc: Tom Rini <trini@konsulko.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	u-boot@lists.denx.de, linux-amarula@amarulasolutions.com,
	Michael Trimarchi <michael@amarulasolutions.com>
Subject: [PATCH V2 0/2] power: regulator: pfuze100: Fix voltage calculation and support high-range
Date: Sun, 11 Jan 2026 09:23:45 +0100	[thread overview]
Message-ID: <20260111082347.1302003-1-michael@amarulasolutions.com> (raw)

This series addresses two significant issues in the pfuze100 regulator driver
regarding voltage calculation accuracy.

The first patch fixes the handling of the "high range" bit. PFUZE chips support
two voltage ranges (controlled by a register bit) with different step sizes
and base voltages. Previously, the driver assumed the low range, leading to
incorrect voltage settings on boards configured for the high range.

The second patch corrects the interpretation of min_uV. The driver was
incorrectly using the device tree's regulator-min-microvolt constraint as the
mathematical base (zero-index) for voltage calculations. This caused offset
errors whenever the DTS constraint differed from the hardware's absolute minimum.
The patch introduces physical minimums in the driver descriptors to ensure
calculations are based on the datasheet specifications, treating the DTS value
strictly as a safety constraint.

Together, these changes align the U-Boot driver logic with the Linux kernel
implementation and ensure correct voltage output.

Michael Trimarchi (2):
  power: regulator: pfuze100: support high voltage range bit
  power: regulator: pfuze100: Decouple hardware base voltage from DTS
    constraints

 drivers/power/regulator/pfuze100.c | 138 ++++++++++++++++++-----------
 1 file changed, 88 insertions(+), 50 deletions(-)

-- 
2.51.0


             reply	other threads:[~2026-01-11  8:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-11  8:23 Michael Trimarchi [this message]
2026-01-11  8:23 ` [PATCH V2 1/2] power: regulator: pfuze100: support high voltage range bit Michael Trimarchi
2026-01-11  8:23 ` [PATCH V2 2/2] power: regulator: pfuze100: Decouple hardware base voltage from DTS constraints Michael Trimarchi
2026-01-13  8:58 ` [PATCH V2 0/2] power: regulator: pfuze100: Fix voltage calculation and support high-range Peng Fan
2026-01-13 10:46   ` Michael Nazzareno Trimarchi
2026-01-13 12:16     ` Peng Fan
2026-01-13 18:16       ` Michael Nazzareno Trimarchi

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=20260111082347.1302003-1-michael@amarulasolutions.com \
    --to=michael@amarulasolutions.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.com \
    --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