Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Otto Pflüger" <otto.pflueger@abscue.de>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 4/4] regulator: Add regulator driver for Unisoc SC2730 PMIC
Date: Thu, 21 May 2026 17:57:38 +0000	[thread overview]
Message-ID: <20260521175738.F15271F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260521-sc2730-regulators-v4-4-1ac8a3b5ed82@abscue.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The register offset for `SC2730_LDO_VDDCAMIO_VOL` is defined as `0x28`, which breaks the LDO register layout pattern and points to the DCDC/global control region. This is highly likely a typo and could cause silent corruption of another PMIC register when setting the LDO voltage.
--

commit 5c1a2f6397caa4ad7997b2f6f912d7c202d97041
Author: Otto Pflüger <otto.pflueger@abscue.de>
Subject: regulator: Add regulator driver for Unisoc SC2730 PMIC

This commit adds a regulator driver for the Spreadtrum/Unisoc SC2730 PMIC,
which is used with SoCs like the UMS512 and UMS9230. The new driver is
based on a downstream Unisoc driver and the existing SC2731 driver.

> diff --git a/drivers/regulator/sc2730-regulator.c b/drivers/regulator/sc2730-regulator.c
> new file mode 100644
> index 0000000000000..9e40c6eae4943
> --- /dev/null
> +++ b/drivers/regulator/sc2730-regulator.c

[ ... ]

> +/*
> + * SC2730 vsel register
> + */
> +#define SC2730_DCDC_CPU_VOL		(SC2730_REGULATOR_BASE + 0x44)

[ ... ]

> +#define SC2730_LDO_AVDD18_VOL		(SC2730_REGULATOR_BASE + 0x104)
> +#define SC2730_LDO_VDDRF18_VOL		(SC2730_REGULATOR_BASE + 0x110)
> +#define SC2730_LDO_VDDCAMIO_VOL		(SC2730_REGULATOR_BASE + 0x28)

[Severity: High]
Is 0x28 the correct offset for the VDDCAMIO voltage register?

All other LDO voltage and power-down registers are clustered in the 0x100
to 0x210 range. Defining this at 0x28 places it in the DCDC or global
control region.

Could writing voltage configurations to this offset fail to configure the
VDDCAMIO regulator and potentially corrupt another PMIC register instead?

> +#define SC2730_LDO_VDDWCN_VOL		(SC2730_REGULATOR_BASE + 0x120)
> +#define SC2730_LDO_VDDCAMD1_VOL		(SC2730_REGULATOR_BASE + 0x12c)

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260521-sc2730-regulators-v4-0-1ac8a3b5ed82@abscue.de?part=4

      reply	other threads:[~2026-05-21 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 16:17 [PATCH v4 0/4] regulator: Add support for Unisoc SC2730 PMIC regulators Otto Pflüger
2026-05-21 16:17 ` [PATCH v4 1/4] regulator: dt-bindings: Add Unisoc SC2730 PMIC Otto Pflüger
2026-05-22  6:14   ` Krzysztof Kozlowski
2026-05-21 16:17 ` [PATCH v4 2/4] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings Otto Pflüger
2026-05-21 16:52   ` sashiko-bot
2026-05-22  6:28   ` Krzysztof Kozlowski
2026-05-22  6:32     ` Otto Pflüger
2026-05-22  7:06       ` Krzysztof Kozlowski
2026-05-21 16:17 ` [PATCH v4 3/4] mfd: sprd-sc27xx: Add SC2730 regulator cell Otto Pflüger
2026-05-21 17:33   ` sashiko-bot
2026-05-21 16:17 ` [PATCH v4 4/4] regulator: Add regulator driver for Unisoc SC2730 PMIC Otto Pflüger
2026-05-21 17:57   ` sashiko-bot [this message]

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=20260521175738.F15271F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=otto.pflueger@abscue.de \
    --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