From: sashiko-bot@kernel.org
To: "Rakesh Kota" <rakesh.kota@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: Fix pm4125 vbus regulator compatible and constraints
Date: Wed, 01 Jul 2026 10:34:56 +0000 [thread overview]
Message-ID: <20260701103457.73E251F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260701-add_pm4125-vbus-reg-v2-3-6bac2bac7131@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The `PM4125_VBOOST_CFG` macro is defined twice in the driver with different values, causing the voltage selector address to be shadowed by the OTG configuration address. This leads to register corruption when applying the new device tree constraints.
--
commit ee5aeefd579f49a0fd9de6178216fb53f958a898
Author: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
arm64: dts: qcom: Fix pm4125 vbus regulator compatible and constraints
Remove pm8150b fallback compatible from pm4125_vbus and fix regulator
constraints in qrb2210 DTS files to use microvolt instead of
microamp.
> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> --- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
[ ... ]
> @@ -235,8 +235,8 @@ &mdss_dsi0_phy {
> };
>
> &pm4125_vbus {
> - regulator-min-microamp = <500000>;
> - regulator-max-microamp = <500000>;
> + regulator-min-microvolt = <4250000>;
> + regulator-max-microvolt = <5000000>;
[Severity: High]
This is a pre-existing issue, but does adding these voltage constraints now
trigger a hardware register corruption in the regulator driver?
Looking at the driver in drivers/regulator/qcom_usb_vbus-regulator.c,
PM4125_VBOOST_CFG is defined twice with different values:
drivers/regulator/qcom_usb_vbus-regulator.c:
#define PM4125_VBOOST_CFG 0x52
#define PM4125_VBOOST_CFG_MASK GENMASK(1, 0)
#define PM4125_VBOOST_CFG 0x56
Because of this shadowing, the pm4125_data struct initializes both .otg_cfg
and .vsel_reg to 0x56:
drivers/regulator/qcom_usb_vbus-regulator.c:
.otg_cfg = PM4125_VBOOST_CFG,
.otg_en_src_cfg = PM4125_OTG_EN_SRC_CFG,
.vsel_reg = PM4125_VBOOST_CFG,
With the new regulator-min-microvolt constraints added by this device tree
change, the regulator core will now call .set_voltage_sel on this regulator.
Will this cause the driver to incorrectly write the voltage selector mask
to the OTG config register at 0x56 instead of the intended voltage selector
register at 0x52, thereby overwriting OTG configuration bits?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701-add_pm4125-vbus-reg-v2-0-6bac2bac7131@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-07-01 10:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 10:28 [PATCH v2 0/3] regulator: qcom_usb_vbus: add pm4125 VBUS regulator support Rakesh Kota
2026-07-01 10:28 ` [PATCH v2 1/3] dt-bindings: regulator: qcom,usb-vbus-regulator: add qcom,pm4125-vbus-reg Rakesh Kota
2026-07-01 10:28 ` [PATCH v2 2/3] regulator: qcom_usb_vbus: add support for qcom,pm4125-vbus-reg Rakesh Kota
2026-07-01 10:34 ` sashiko-bot
2026-07-02 7:54 ` Rakesh Kota
2026-07-02 12:59 ` Dmitry Baryshkov
2026-07-01 11:25 ` Konrad Dybcio
2026-07-01 11:28 ` Bryan O'Donoghue
2026-07-02 7:51 ` Rakesh Kota
2026-07-01 10:28 ` [PATCH v2 3/3] arm64: dts: qcom: Fix pm4125 vbus regulator compatible and constraints Rakesh Kota
2026-07-01 10:34 ` sashiko-bot [this message]
2026-07-02 7:25 ` Rakesh Kota
2026-07-01 11:26 ` Konrad Dybcio
2026-07-02 7:33 ` Rakesh Kota
2026-07-02 12:07 ` Konrad Dybcio
2026-07-02 12:43 ` Rakesh Kota
2026-07-02 13:01 ` Dmitry Baryshkov
2026-07-01 11:29 ` Bryan O'Donoghue
2026-07-02 8:02 ` Rakesh Kota
2026-07-02 16:10 ` Bryan O'Donoghue
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=20260701103457.73E251F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=rakesh.kota@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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