[V2,0/2] power: regulator: pfuze100: Fix voltage calculation and support high-range
| Message ID | 20260111082347.1302003-1-michael@amarulasolutions.com |
|---|---|
| Headers |
Return-Path:
<linux-amarula+bncBCXK73FY3AFRBGV4RXFQMGQEOGCWEXY@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com
[209.85.208.71])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E939C3F1D4
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 11 Jan 2026 09:23:55 +0100 (CET)
Received: by mail-ed1-f71.google.com with SMTP id
4fb4d7f45d1cf-64ba73e83c9sf9109079a12.2
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 11 Jan 2026 00:23:55 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1768119835; cv=pass;
d=google.com; s=arc-20240605;
b=NG6YjT7CeaoRM+GaZwe9pSrY7d3ys7SOi0OWB7BrkyOprEtMr19fqdsv8rpFDesQ38
C42iKAtyvBLhZbgyx1VsJxAhH8ldwjaZVfZfQKsiPmkUUs+o3Hke2XraSWQAmV2u4C4M
bSP4grvJ3dCE4TECRfG2NN33K3Mg5XaFTlqVKOA39wF0gLexwQ8chWrMrH+dBTX87aPK
NLjVq2/3zF7j9UshSGbdWdfk+kUepnWD4idCZuwqD3yFyBW7Za46vubwFkEqh2e19gUk
q3yABP5JdTPyvPs1mjdLVErPazvJP24nq/onIc5VyKfHngbOtC+p5KobLUdBShQNAUxO
UImw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:message-id:date:subject:cc:to
:from:dkim-signature;
bh=kbGmRsihaAPJRDrnwjZSb1VZuSBhk7sF5mvY3MpmAyY=;
fh=Rn7dtvaK5BFZgP/UXflVaui6zoerACmzGP8fZ+20f5A=;
b=gUntBYjpNRyHLxxjG8zgP85NxJEcgVBfPqF0VwPxt4f0H9RZ7ieG9fljQkEoBpOiTd
keU4ECl7F9ltaCdT15jJbZXU4zeuWmmmIy3lsMUToKtGYhCXFBvEoQ1tePw+l1jK4WuQ
U1PnMJexEqvOAseY8KA3tvGPbow/UmUDKd7ds/86/MHRDTd/X70rrmTiu6+olWJKHbyV
QfS0XI2K5O8hUaXopHWqU6dLXxdh9DftYOhGZ/4Emwx6r125Z87gsOCYPnc0za5its3y
eWjy9f8XRtcIYqR2L3X98jQF7obMPTp8qqqvJXD16NVHpbuUG+NxYTkGL4jTvRptydtA
+ALQ==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=kwehf5Fo;
spf=pass (google.com: domain of michael@amarulasolutions.com designates
209.85.220.41 as permitted sender)
smtp.mailfrom=michael@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1768119835; x=1768724635;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=kbGmRsihaAPJRDrnwjZSb1VZuSBhk7sF5mvY3MpmAyY=;
b=G7VmguqO8GaFI6G7Bj/aXvKB+FiGfPYLDbdBKeAOSjoaUqwHp53N8DK6gN/z084nGI
VEhhVmPoPBRBHZtorYgAKv4mWQa41gy+gHvOl1AVyQzHv6mT9Fr5XVO1tU64aK+jQgSH
Y/7fx5fwckJd/9Z4Bs9zfZqt70tLaFqUya41M=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1768119835; x=1768724635;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:message-id:date:subject:cc:to:from:x-gm-gg:x-beenthere
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=kbGmRsihaAPJRDrnwjZSb1VZuSBhk7sF5mvY3MpmAyY=;
b=iVyYif6Gpa2yF50lVPk3heMqsKu8ehKQvkgUu/h2ZWmAOu2TN5Hmi+kTP1tqvvt008
4inYgDCuMhlpBUZ6440FrNs2nfctwPaKcZT/2vvGcSg+XLd9gcKYEiOMCKHvqtlMWCw3
XRW0f0urDe8cGjN52UrJRKmsUB8L9HhaDH+U1ZZC3tp+ASvRlSYZAPro98vNqPUgBzcH
g5V4TOTuX5NdnlN89Cz/L25WFK5jlfEyAEJMh4gGWAz2TOcBOUeIsuj/ZmaQEIxfImSP
SIr7IFWSuB0bJNd0DF4fFxFwZQ/Rx/VLWiizTpzdT/CmTmcomVtRER3QLcZ08FPRtccr
2ERA==
X-Forwarded-Encrypted: i=2;
AJvYcCV4qvJfB0xa2wslVrpgx5ZqgBtC4DjYsXwJFG+Iw2arusr2lsAxo4DfVa8weV1f1YrxAQWc9ljst3/2soEC@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YzS4WrQNj9BVp0Z7+VsPwSaxKSsMKPvIgoEQ7cEHsRGyZ87dWSI
NOBZZS9jak+Lxccc8QWZvl5JtwfxV7nmdbgn9Tyc/KRJbcKHhbPN/b+OU9sfU4tKGoJd6g==
X-Google-Smtp-Source:
AGHT+IHuFdTmiUcmyYXN4bs/zGxdoOr/swex9nU7knntjkV0AE9xb4pyGDagK5SXn8ltEtzuxX7jxA==
X-Received: by 2002:a05:6402:268a:b0:64d:bab:3490 with SMTP id
4fb4d7f45d1cf-65097defa5amr13183585a12.12.1768119835259;
Sun, 11 Jan 2026 00:23:55 -0800 (PST)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="AV1CL+H5nXkmRkK1ro23bsDcuI6VM7oLELBjN4sLi5iPRBqIWg=="
Received: by 2002:a05:6402:20c4:10b0:647:a4b1:7993 with SMTP id
4fb4d7f45d1cf-650748c8f82ls1072271a12.1.-pod-prod-03-eu; Sun, 11 Jan 2026
00:23:53 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AJvYcCU9lPqaCYDPwDT55FCPEOHMcWI7zAmzkUh1fXquyD3op9RaJEACA0zcMpkAjN7yLwnEKn3zZwbKyA7EDfA2@amarulasolutions.com
X-Received: by 2002:a05:6402:13c1:b0:64d:3b22:a5b9 with SMTP id
4fb4d7f45d1cf-65097ddba92mr12786366a12.9.1768119832926;
Sun, 11 Jan 2026 00:23:52 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1768119832; cv=none;
d=google.com; s=arc-20240605;
b=E1wNH4TpMhkJNjqTu1XrzKJOfaVE0pwQkrNsu6/TLOQA7j130ql7xY79FKaoASDcD0
W/AzVVDhL5W6fM33VZSk3Gvq9KiIGbhq8nVB+m5UYTdBtj7KZaWqPaKvFR0kjZzQnUjw
o4iAI0u+d1hX0RBsz2myhcz8ENW8vsR6zH5oD0cu4wX0qshgubullV+PI3FfFcHT+EtS
H+3EJ6kPkIKDyRAop24Q2Ug9vpx+aobDuebGTq96H4Eu/U+9bzm1cEmF5XvIRXesHbam
raWCHhFTQ/sp9Nh3Xmda7cwHDTLLWfK122ssZlQ8gdJ5oasSOgMsycJ7ajOiHWNjJzA3
DeYw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=1DWtB0NMZERFgO7txKyF3IFmC6378Zhy2ofmBH5qUjA=;
fh=L9Qz4I1GW59Lr+O/tZan1pJemYvqXTbl9of+xjGxgeM=;
b=iCO49xcKdSTv2528i80et9drSZCeXufOMHATNecs6ZFlCJjXPtQ57juRYxCMwF0GYA
QDH8pVIgb4pI2+bbuDXz8fwQiMNTRGwLBmOe9bOnG1fE9HMXrqxMQs3/4yYHnQD+NgM8
TMtLheGJlUT9obkpIJCnKCzFU1/KKeXd+0Mn9OyDCbpDLnOVIuLgsGu5qqT1BQe3ggVh
54/bSV1Ml34Daf6NcKGIpdHaCp/YTQiStKUIHwIuu22eMfp1R4AF0w6xkVtwRe4o066o
q9ZInodfyM72O2/9Js8SyzDBFWj6C/f5eE1LQJr2oEFiqzW7H065PnlNgY7EOFDL3eh0
t+iQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=kwehf5Fo;
spf=pass (google.com: domain of michael@amarulasolutions.com designates
209.85.220.41 as permitted sender)
smtp.mailfrom=michael@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
4fb4d7f45d1cf-6507bf697f8sor2852164a12.10.2026.01.11.00.23.52
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 11 Jan 2026 00:23:52 -0800 (PST)
Received-SPF: pass (google.com: domain of michael@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Forwarded-Encrypted: i=1;
AJvYcCX6qSzUvO/HYk/v34vnGS4wCFp7qHm7aEpTpkW/Q2K6VH4pITCG56RaYW+ODYCs7LxsGOEdN+E+mJc1f7Wk@amarulasolutions.com
X-Gm-Gg: AY/fxX4B86zpgdfHBmQTafFgvBjB8e+0cdukwBbfWu4MwsMI6LeAxlAoBTt1/Hsm7YM
zMbmpUeXAK65uNyiodLfCyLSmiALjwgFz/vAMNG1mqwxucel3rvTkAzUX/A1R8J3YmeqQ7KEDz6
D1r8cSIgvRgf2QaDF2mperb84uZoFHJ/RWN7/guhMxJI0g2IhmCRyldiOEmAcrPPm3ZHKPCbwGW
Ixa0yonQDZEFfQyUHcgfdWIR0cKrKE1wg7Gtpk8xmkzs6N4pc8k5a6Q1QYt4+k8e4Fl6WAkU+Z8
IG/OMFEQmnzIJtkgchcj/WIyJva6iKMi1Hc3mLDgrFde4tekw6WFXy2AWxMoJGpnEpn1pptXbGk
EwkQTEZ2wKBGNM07ZdYvVkkKPXXri/Bh2XjABvckzwvh6N2f3zd7Zt3zv1gr/5MNNCPzFfkueCo
XGrv4pyglS78JMxo/g3RNusHvJ2Ra/3z/L6JC/p395fVHtv0JaKUZk0gVyD1pakHxWuCy3DgPu0
d3FL7ya9I8K+TtyCdJFDNO2n4L7opbOERbxjVkpjySt0XCIUKolJ/Mc8w==
X-Received: by 2002:a05:6402:2345:b0:649:6ac4:79af with SMTP id
4fb4d7f45d1cf-65097dc62abmr13783815a12.6.1768119832434;
Sun, 11 Jan 2026 00:23:52 -0800 (PST)
Received: from panicking.homenet.telecomitalia.it
(host-87-5-117-220.retail.telecomitalia.it. [87.5.117.220])
by smtp.gmail.com with ESMTPSA id
4fb4d7f45d1cf-6507b9d44bfsm14608346a12.8.2026.01.11.00.23.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 11 Jan 2026 00:23:50 -0800 (PST)
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
Message-ID: <20260111082347.1302003-1-michael@amarulasolutions.com>
X-Mailer: git-send-email 2.51.0
MIME-Version: 1.0
X-Original-Sender: michael@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=kwehf5Fo;
spf=pass (google.com: domain of michael@amarulasolutions.com designates
209.85.220.41 as permitted sender)
smtp.mailfrom=michael@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
Message
Michael Trimarchi
Jan. 11, 2026, 8:23 a.m. UTC
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(-)